diff --git a/assets/AiDeadlinesView-CqVp2xDx.js b/assets/AiDeadlinesView-D2u6GuEG.js similarity index 97% rename from assets/AiDeadlinesView-CqVp2xDx.js rename to assets/AiDeadlinesView-D2u6GuEG.js index 092b5b96e3158176111a877cbccb564c159b3374..8f29ab8224aa9c44463249c4540301413cab062a 100644 --- a/assets/AiDeadlinesView-CqVp2xDx.js +++ b/assets/AiDeadlinesView-D2u6GuEG.js @@ -1,3 +1,3 @@ -import{r as x,j as t,b as E}from"./index-BOKpx1zD.js";import{u as A}from"./useQuery-Cj0zK8BW.js";import{S as B}from"./switch-DWeySqLP.js";import{S as U}from"./skeleton-C5u4dxsY.js";import{A as W,a as O}from"./alert-De0V5ndO.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-Ba_4mPeV.js";import"./index-DdlAvtSd.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),H=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(H).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),z=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},I=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>I(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=I(e);return a.length?a[a.length-1]:null},Q=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=z(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` +import{r as x,j as t,b as E}from"./index-CSNOTM3s.js";import{u as A}from"./useQuery-DCf2mroJ.js";import{S as B}from"./switch-CuAwYhBU.js";import{S as U}from"./skeleton-DIecj65I.js";import{A as W,a as O}from"./alert-DuO9Nm7q.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-CQwQlPi_.js";import"./index-CAtHIP-4.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),H=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(H).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),z=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},I=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>I(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=I(e);return a.length?a[a.length-1]:null},Q=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=z(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`;window.open(s,"_blank","noopener,noreferrer")},ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),g=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(g),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},te=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?I(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),g=e?z(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,p=s?new Date(s.deadline_at).getTime():null;return t.jsx(V,{open:a,onOpenChange:n,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(Y,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[g&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:g})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),p!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(p,r)},children:J(p,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,m)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(u?null:y,r)},children:X(y,r)})]},`${d.type??"deadline"}-${m}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},M=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ne=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),g=s?new Date(s.deadline_at).getTime():null,c=_(i?g:null,a),p=z(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:m=>m.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:g!=null?Q(g,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[p&&t.jsx("span",{children:p}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(m=>{const y=n.has(m);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(m)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(m)},m)})})]})},ce=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,g]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),p=A({queryKey:["conference-deadlines"],queryFn:()=>E.getConferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(u=>{const h=new Set(u);return h.has(l)?h.delete(l):h.add(l),h})},m=x.useMemo(()=>{var u;const l=new Map;return(u=p.data)==null||u.results.forEach(h=>{D(h).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((h,j)=>j[1]-h[1]).map(([h])=>h)},[p.data]),y=x.useMemo(()=>{var j;const u=(((j=p.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),h=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,w)=>{const v=h(f),N=h(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[p.data,e,n,o,c]);return p.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(M,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(M,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),m.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[m.map(l=>{const u=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:p.isLoading?"…":`${y.length} conferences`})}),p.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ne,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:g},l.id))}),t.jsx(te,{conf:s,open:s!==null,onOpenChange:l=>{l||g(null)}})]})};export{ce as default}; diff --git a/assets/AuthorDetailView-biYTIR2y.js b/assets/AuthorDetailView-biYTIR2y.js new file mode 100644 index 0000000000000000000000000000000000000000..a4bc28e786a2d6d188b60d1505570e6cd5841c5f --- /dev/null +++ b/assets/AuthorDetailView-biYTIR2y.js @@ -0,0 +1 @@ +import{d as m,j as e,L as g,b as d}from"./index-CSNOTM3s.js";import{u as h}from"./useQuery-DCf2mroJ.js";import{S as c}from"./skeleton-DIecj65I.js";import x from"./NotFound-BOZqMg2G.js";const N=()=>{var l,n,i,o,u;const{authorId:a}=m(),r=h({queryKey:["author",a],queryFn:()=>d.getAuthor(a),enabled:!!a}),t=h({queryKey:["author-papers",a],queryFn:()=>d.getAuthorPapers(a,{page:1,page_size:20}),enabled:!!a});return((l=r.error)==null?void 0:l.status)===404?e.jsx(x,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((n=r.data)==null?void 0:n.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((i=r.data)==null?void 0:i.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(g,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{N as default}; diff --git a/assets/BenchmarkDetailView-Ch-Y4w1t.js b/assets/BenchmarkDetailView-DXXwkMF6.js similarity index 98% rename from assets/BenchmarkDetailView-Ch-Y4w1t.js rename to assets/BenchmarkDetailView-DXXwkMF6.js index c580bc78246687c45b9cfdfaaeba095464820606..5d79b5891df8a1299947c89a22fc620a2e09b739 100644 --- a/assets/BenchmarkDetailView-Ch-Y4w1t.js +++ b/assets/BenchmarkDetailView-DXXwkMF6.js @@ -1,2 +1,2 @@ -import{d as vt,u as jt,$ as _t,r as w,j as n,L as me,a5 as ne,s as kt,a as St,b as ee}from"./index-BOKpx1zD.js";import{u as te}from"./useQuery-Cj0zK8BW.js";import{S as xe}from"./skeleton-C5u4dxsY.js";import{S as Je}from"./switch-DWeySqLP.js";import{A as Ct,a as Et}from"./alert-De0V5ndO.js";import{L as ye}from"./LatexTitle-B4ZTuCxc.js";import{I as Nt}from"./components-BkQ2EWK-.js";import{C as Rt,E as $t}from"./ExternalSourceEvalBadge-CZdsMWe1.js";import{B as Tt}from"./BenchmarkTrendSparkline-QiCYNsTg.js";import"./index-DdlAvtSd.js";import"./katex.min-BSBacQyE.js";import"./transform-DLPfRTia.js";import"./hover-card-BJtl0mwj.js";function Mt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const Ft=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;rD||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Dt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),a=s.length,i=new Uint8Array(a);for(let c=0;c{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Bt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ht(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Bt(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function Vt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ot(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function Ut(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?Vt(r):Ot(r,s);return document.createTextNode(`${a}{${i}}`)}function Ze(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=Ft();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(Ut(c,r,a,s)),t.appendChild(l)}function Wt(e,t,r){Ze(e,t,":before",r),Ze(e,t,":after",r)}const et="application/font-woff",tt="image/jpeg",qt={woff:et,woff2:et,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:tt,jpeg:tt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function zt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Te(e){const t=zt(e).toLowerCase();return qt[t]||""}function Gt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Kt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ce={};function Qt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Me(e,t,r){const s=Qt(e,t,r.includeQueryParams);if(Ce[s]!=null)return Ce[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Gt(l)));a=Kt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ce[s]=a,a}async function Xt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function Yt(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=Te(r),a=await Me(r,s,t);return ve(a)}async function Jt(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Zt(e,t){return P(e,HTMLCanvasElement)?Xt(e):P(e,HTMLVideoElement)?Yt(e,t):P(e,HTMLIFrameElement)?Jt(e,t):e.cloneNode(ht(e))}const er=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function tr(e,t,r){var s,a;if(ht(t))return t;let i=[];return er(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function rr(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function sr(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function nr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function ar(e,t,r){return P(t,Element)&&(rr(e,t,r),Wt(e,t,r),sr(e,t),nr(e,t)),t}async function ir(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;iZt(s,t)).then(s=>tr(e,s,t)).then(s=>ar(e,s,t)).then(s=>ir(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,lr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function or(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function dr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function ur(e,t,r,s,a){try{const i=r?Mt(t,r):t,c=Te(t);let l;return a||(l=await Me(i,c,s)),e.replace(or(t),`$1${l}$3`)}catch{}return e}function mr(e,{preferredFontFormat:t}){return t?e.replace(lr,r=>{for(;;){const[s,,a]=cr.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=mr(e,r);return dr(s).reduce((i,c)=>i.then(l=>ur(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function hr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function fr(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,Te(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function pr(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await hr(e,t),await fr(e,t),await pr(e,t))}function gr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(a=>{r[a]=s[a]}),e}const rt={};async function st(e){let t=rt[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},rt[e]=t,t}async function nt(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function at(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function xr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=st(u).then(f=>nt(f,t)).then(f=>at(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(st(a.href).then(l=>nt(l,t)).then(l=>at(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function br(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function yr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await xr(r,t);return br(s)}function bt(e){return e.trim().replace(/["']/g,"")}function wr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function vr(e,t){const r=await yr(e,t),s=wr(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(` +import{d as vt,u as jt,$ as _t,r as w,j as n,L as me,a5 as ne,s as kt,a as St,b as ee}from"./index-CSNOTM3s.js";import{u as te}from"./useQuery-DCf2mroJ.js";import{S as xe}from"./skeleton-DIecj65I.js";import{S as Je}from"./switch-CuAwYhBU.js";import{A as Ct,a as Et}from"./alert-DuO9Nm7q.js";import{L as ye}from"./LatexTitle-D0X1MVE6.js";import{I as Nt}from"./components-PxXQJAWo.js";import{C as Rt,E as $t}from"./ExternalSourceEvalBadge-CuljE-w8.js";import{B as Tt}from"./BenchmarkTrendSparkline-DiSd6PbY.js";import"./index-CAtHIP-4.js";import"./katex.min-BSBacQyE.js";import"./transform-BGwKHn4w.js";import"./hover-card-D24Q2Pl3.js";function Mt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const Ft=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;rD||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Dt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),a=s.length,i=new Uint8Array(a);for(let c=0;c{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Bt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ht(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Bt(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function Vt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ot(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function Ut(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?Vt(r):Ot(r,s);return document.createTextNode(`${a}{${i}}`)}function Ze(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=Ft();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(Ut(c,r,a,s)),t.appendChild(l)}function Wt(e,t,r){Ze(e,t,":before",r),Ze(e,t,":after",r)}const et="application/font-woff",tt="image/jpeg",qt={woff:et,woff2:et,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:tt,jpeg:tt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function zt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Te(e){const t=zt(e).toLowerCase();return qt[t]||""}function Gt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Kt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ce={};function Qt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Me(e,t,r){const s=Qt(e,t,r.includeQueryParams);if(Ce[s]!=null)return Ce[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Gt(l)));a=Kt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ce[s]=a,a}async function Xt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function Yt(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=Te(r),a=await Me(r,s,t);return ve(a)}async function Jt(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Zt(e,t){return P(e,HTMLCanvasElement)?Xt(e):P(e,HTMLVideoElement)?Yt(e,t):P(e,HTMLIFrameElement)?Jt(e,t):e.cloneNode(ht(e))}const er=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function tr(e,t,r){var s,a;if(ht(t))return t;let i=[];return er(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function rr(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function sr(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function nr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function ar(e,t,r){return P(t,Element)&&(rr(e,t,r),Wt(e,t,r),sr(e,t),nr(e,t)),t}async function ir(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;iZt(s,t)).then(s=>tr(e,s,t)).then(s=>ar(e,s,t)).then(s=>ir(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,lr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function or(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function dr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function ur(e,t,r,s,a){try{const i=r?Mt(t,r):t,c=Te(t);let l;return a||(l=await Me(i,c,s)),e.replace(or(t),`$1${l}$3`)}catch{}return e}function mr(e,{preferredFontFormat:t}){return t?e.replace(lr,r=>{for(;;){const[s,,a]=cr.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=mr(e,r);return dr(s).reduce((i,c)=>i.then(l=>ur(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function hr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function fr(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,Te(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function pr(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await hr(e,t),await fr(e,t),await pr(e,t))}function gr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(a=>{r[a]=s[a]}),e}const rt={};async function st(e){let t=rt[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},rt[e]=t,t}async function nt(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function at(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function xr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=st(u).then(f=>nt(f,t)).then(f=>at(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(st(a.href).then(l=>nt(l,t)).then(l=>at(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function br(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function yr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await xr(r,t);return br(s)}function bt(e){return e.trim().replace(/["']/g,"")}function wr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function vr(e,t){const r=await yr(e,t),s=wr(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(` `)}async function jr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await vr(e,t);if(r){const s=document.createElement("style"),a=document.createTextNode(r);s.appendChild(a),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function _r(e,t={}){const{width:r,height:s}=ut(e,t),a=await je(e,t,!0);return await jr(a,t),await xt(a,t),gr(a,t),await Ht(a,r,s)}async function kr(e,t={}){const{width:r,height:s}=ut(e,t),a=await _r(e,t),i=await ve(a),c=document.createElement("canvas"),l=c.getContext("2d"),u=t.pixelRatio||Pt(),p=t.canvasWidth||r,f=t.canvasHeight||s;return c.width=p*u,c.height=f*u,t.skipAutoScale||At(c),c.style.width=`${p}`,c.style.height=`${f}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height),c}async function Sr(e,t={}){const r=await kr(e,t);return await Dt(r)}const $e="#ffffff";function Cr(){return typeof window>"u"?$e:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||$e}function Er(e){if(typeof window>"u")return $e;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Cr():t}async function Nr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Sr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Er(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}function Rr(e,t,r){const s=t?(e??[]).filter(c=>c.task_id===t):e??[],a=s.filter(c=>c.is_open===!1),i=a.reduce((c,l)=>c?(l.best_rank??Number.POSITIVE_INFINITY)<(c.best_rank??Number.POSITIVE_INFINITY)?l:c:l,null);return{visible:r?s.filter(c=>c.is_open!==!1):s,hiddenClosed:a,topHiddenClosed:i}}const $r=5;function Tr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function be(e,t){return e?n.jsx(ye,{title:e}):t||"—"}function it(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ne(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Mr(e,t){if(e===t){const{year:u,month:p}=Ne(e);return[{timestamp:new Date(u,p,1).getTime(),key:`${u}-${p}`,label:`${Ee[p]} ${u}`}]}const r=Ne(e),s=Ne(t);if(r.year===s.year){const u=s.month-r.month+1;let p=1;const f=12;u>f&&(p=Math.ceil(u/f));const y=[];for(let x=r.month;x<=s.month;x+=p)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${Ee[x]} ${r.year}`:Ee[x]});return y}const a=s.year-r.year+1;let i=1;const c=12;a>c&&(i=Math.ceil(a/c));const l=[];for(let u=r.year;u<=s.year;u+=i)l.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return l}const Fr=({points:e,metric:t})=>{const r=St(),[s,a]=w.useState(null),i=880,c=320,l=60,u=30,p=40,f=50,y=e.map(o=>o.value),x=Math.min(...y),U=Math.max(...y)-x||1,ae=i-l-u,L=c-p-f,T=e.map(o=>it(o.date)),z=Math.min(...T),I=Math.max(...T),ie=I-z||1,Y=o=>z===I?l+ae/2:l+(o-z)/ie*ae,G=e.map((o,m)=>{const k=Y(it(o.date)),v=(o.value-x)/U,M=p+L*(1-v);return{x:k,y:M,data:o,idx:m}}),N=G.filter(o=>o.data.isSota);let O="";if(N.length>=2){O=`M${N[0].x},${N[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,v=k.length*H;let M=o.x-v/2,C=o.x+v/2,V="middle";return Mi-u&&(C=i-u,M=C-v,V="end"),{x:V==="start"?l:V==="end"?i-u:o.x,y:o.y-J,text:k,anchor:V,left:M,right:C}},ce=[],b=N.length>0?A(N[N.length-1]):null;let _e=-1/0;for(let o=0;ob.left-fe||(_e=m.right,ce.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}b&&ce.push({x:b.x,y:b.y,text:b.text,anchor:b.anchor});const K=Mr(z,I),W=5,le=o=>a(m=>m===o?null:m),oe=o=>{o&&r(`/paper/${o}`)},pe=(o,m)=>{const v=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${ne(o.data.value)} on ${o.data.dateLabel}`,M=!!o.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:M?"pointer":"default",outline:"none"},tabIndex:0,role:M?"link":"img","aria-label":v,onMouseEnter:()=>a(o.idx),onMouseLeave:()=>le(o.idx),onFocus:()=>a(o.idx),onBlur:()=>le(o.idx),onClick:()=>oe(o.data.paperRouteId),onKeyDown:C=>{M&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),oe(o.data.paperRouteId))},children:n.jsx("title",{children:v})})]},o.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${c}`,style:{display:"block"},children:[n.jsx("text",{x:l-38,y:p+L/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${l-38} ${p+L/2})`,children:t}),Array.from({length:W}).map((o,m)=>{const k=m/(W-1),v=p+L*(1-k),M=x+U*k;return n.jsxs("g",{children:[n.jsx("line",{x1:l,y1:v,x2:i-u,y2:v,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:l-10,y:v+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ne(M)})]},m)}),K.map(o=>{const m=Y(o.timestamp);return n.jsx("text",{x:m,y:c-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),G.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),O&&n.jsx("path",{d:O,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ce.map((o,m)=>n.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&G[s]&&(()=>{const o=G[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",v=`${m.length>40?m.slice(0,39)+"…":m}: ${ne(o.data.value)}`,C=Math.max(120,Math.min(340,v.length*6.6+24)),V=30;let B=o.x-C/2;Bi-u&&(B=i-u-C);const Q=o.y-V-14>=p?o.y-V-12:o.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:B,y:Q,width:C,height:V,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),n.jsx("text",{x:B+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:v})]})})()]})};function he(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}function Lr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Ir(e){const t=new Map;for(const r of e){const s=Lr(r),a=t.get(s);if(!a){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}a.metrics={...a.metrics,...r.metrics||{}},a.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(a.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function ct(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function lt(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Pr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var E;const y=he((E=f.metrics)==null?void 0:E[t]),x=f.paper_published_date||"";return{eval:f,value:y,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,y)=>f.date.localeCompare(y.date)),a=[];let i=null;for(const f of s){const y=i==null?!0:r==="↓"?f.valuei;y&&(i=f.value),a.push({value:f.value,date:f.date,dateLabel:f.date.slice(0,7),modelName:f.eval.model_name||"",paperTitle:f.eval.paper_title||"",paperRouteId:f.eval.paper_arxiv_id||f.eval.paper_id||null,isSota:y})}const l=e.map(f=>{var y;return{eval:f,value:he((y=f.metrics)==null?void 0:y[t])}}).filter(f=>f.value!==null).sort((f,y)=>r==="↓"?f.value-y.value:y.value-f.value)[0],u=(l==null?void 0:l.value)??0,p=(l==null?void 0:l.eval.model_name)||(l==null?void 0:l.eval.paper_title)||"";return{points:a,sota:u,sotaModel:p}}const ot=({targetRef:e,label:t})=>{const{toast:r}=kt(),[s,a]=w.useState("idle"),i=w.useRef(null);w.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const c=w.useCallback(async()=>{const u=e.current;if(u){a("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(p=>window.requestAnimationFrame(()=>p()));try{await Nr(u),a("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>a("idle"),1500)}catch(p){a("idle"),r({title:"Copy failed",description:p instanceof Error&&p.message?p.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),l=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:c,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(Nt,{name:"copy",size:11}),l]})},Xr=()=>{var Le,Ie,Pe,Ae,De,Be,He,Ve,Oe,Ue,We,qe,ze;const{datasetSlug:e}=vt(),[t]=jt(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:a,setHideClosedSourceEvals:i}=_t(),[c,l]=w.useState(void 0),u=w.useRef(null),p=w.useRef(!1),f=w.useRef(null),y=w.useRef(null),x=te({queryKey:["dataset",e,"with-paper",r,a.hide_closed_source_evals?"open":"all"],queryFn:()=>ee.getDatasetBySlug(e,{include_paper:!0,task:r,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=te({queryKey:["dataset-evals",(Le=x.data)==null?void 0:Le.id],queryFn:()=>ee.getEvaluationsByDataset(x.data.id),enabled:!!((Ie=x.data)!=null&&Ie.id),staleTime:5*60*1e3}),U=te({queryKey:["dataset-tasks",(Pe=x.data)==null?void 0:Pe.id],queryFn:()=>ee.getDatasetTasks(x.data.id),enabled:!!((Ae=x.data)!=null&&Ae.id),staleTime:10*60*1e3}),ae=te({queryKey:["metric-directions"],queryFn:()=>ee.getMetricDirections(),staleTime:60*60*1e3}),L=w.useMemo(()=>{var d;return!s||!((d=E.data)!=null&&d.length)?null:E.data.find(g=>g.id===s)||null},[s,E.data]),T=w.useMemo(()=>{const d=U.data||[];if(d.length===0)return null;if(L!=null&&L.task_id&&d.some(h=>h.id===L.task_id))return L.task_id;if(r){const h=d.find(S=>S.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const g=E.data||[];if(g.length>0){const h=new Map;for(const j of g)h.set(j.task_id,(h.get(j.task_id)||0)+1);let S=null,$=-1;for(const j of d){const ue=h.get(j.id)||0;ue>$&&($=ue,S=j.id)}if(S)return S}return d[0].id},[U.data,E.data,r,L]),z=te({queryKey:["task-benchmark-trends",T,a.hide_closed_source_evals?!0:void 0],queryFn:()=>ee.getTrendingBenchmarks(T,{limit:100,min_recent_papers:0,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!T&&!!((De=x.data)!=null&&De.id),staleTime:10*60*1e3}),I=w.useMemo(()=>{var d;return(((d=z.data)==null?void 0:d.results)||[]).find(g=>{var h;return g.id===((h=x.data)==null?void 0:h.id)})||null},[z.data,(Be=x.data)==null?void 0:Be.id]),ie=te({queryKey:["leaderboard-metrics",(He=x.data)==null?void 0:He.id,T],queryFn:()=>ee.getLeaderboardMetrics(x.data.id,T),enabled:!!((Ve=x.data)!=null&&Ve.id)&&!!T,staleTime:10*60*1e3}),Y=w.useMemo(()=>Rr(E.data,T,a.hide_closed_source_evals),[E.data,T,a.hide_closed_source_evals]),G=Y.visible,N=Y.hiddenClosed,O=Y.topHiddenClosed,H=w.useMemo(()=>Ir(G),[G]),fe=w.useMemo(()=>{const d=new Set;return H.forEach(g=>{g.best_metric&&d.add(g.best_metric),Object.keys(g.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[H]),J=w.useMemo(()=>(ie.data||[]).map(d=>d.metric_name),[ie.data]),A=J.length?J:fe,ce=w.useMemo(()=>{var S;if(H.length===0)return A[0]||"";const d=new Map;for(const $ of H)for(const j of Object.keys($.metrics||{}))J.length&&!A.includes(j)||d.set(j,(d.get(j)||0)+1);let g=null,h=0;for(const[$,j]of d)j>h&&(h=j,g=$);return g||A[0]||((S=H[0])==null?void 0:S.best_metric)||""},[H,A,J]),b=c||(L==null?void 0:L.best_metric)||ce,K=(((Ue=(Oe=ae.data)==null?void 0:Oe.directions)==null?void 0:Ue[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",W=w.useMemo(()=>!b||!A.includes(b)?A:[b,...A.filter(d=>d!==b)],[A,b]),le=w.useMemo(()=>W.length===0?b?[b]:[]:W.slice(0,$r),[W,b]),{points:oe,sota:pe,sotaModel:o}=w.useMemo(()=>Pr(H,b,K),[H,b,K]),m=(We=x.data)==null?void 0:We.leaderboard_summary,k=E.isSuccess&&U.isSuccess&&ae.isSuccess&&(!T||ie.isSuccess),v=k?b:m==null?void 0:m.metric,M=k?pe:m==null?void 0:m.value,C=k?o:m==null?void 0:m.model_name,V=!k&&!m;w.useEffect(()=>{if(p.current||!s||!E.data||E.data.length===0)return;const d=u.current;d&&(p.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,E.data]);const B=w.useMemo(()=>{const d=U.data||[];return T?d.find(g=>g.id===T)||d[0]||null:d[0]||null},[U.data,T]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(xe,{className:"h-12 w-1/2 mb-6"}),n.jsx(xe,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(Ct,{variant:"destructive",children:n.jsx(Et,{children:"Benchmark not found."})})});const _=x.data,Q=H.slice().sort((d,g)=>{var $,j;const h=he(($=d.metrics)==null?void 0:$[b]),S=he((j=g.metrics)==null?void 0:j[b]);return h!==null&&S!==null?K==="↓"?h-S:S-h:h!==null?-1:S!==null?1:lt(d,b)-lt(g,b)}),Fe=!!_.supports_harness,R=s&&Q.find(d=>ct(d,s))||null,F=_.introducing_paper??void 0,de=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||Tr(_.paper_url),X=(F==null?void 0:F.title)||_.introducing_paper_title||null,Z=((qe=F==null?void 0:F.published)==null?void 0:qe.slice(0,4))||_.introduced_year||null,yt=!!de||!!_.paper_url||!!X,wt=F!=null&&F.arxiv_id||(ze=_.paper_url)!=null&&ze.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${de}`:`Paper ${de}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(me,{to:"/tasks",children:"Tasks"}),B&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(me,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:_.name})]}),n.jsxs("div",{className:"bm-title-row",children:[n.jsx("h1",{className:"bm-title",children:_.name}),I&&n.jsxs("div",{className:"bm-title-trend","aria-label":`${_.name} reporting trend`,children:[n.jsx(Tt,{history:I.history,benchmarkName:I.name}),n.jsxs("span",{className:"bm-title-trend-summary",children:[n.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&n.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):n.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),n.jsxs("div",{className:"bm-subtitle",children:[V?n.jsx(xe,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):n.jsxs("span",{children:[v&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:v}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),C?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:ne(M)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:C})]}):n.jsxs("span",{children:[Q.length," evaluations"]})]}),_.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:_.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),_.description&&n.jsx("p",{className:"bm-description",children:_.description}),a.hide_closed_source_evals&&N.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",O!=null&&O.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:O.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{i(!1)},children:"Show closed-source"})]}),yt&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),de?n.jsxs(me,{to:`/paper/${de}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):wt}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):_.paper_url?n.jsxs("a",{href:_.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):_.paper_url}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):null}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]})]}),oe.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:f,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ot,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(Fr,{points:oe,metric:b})}),n.jsxs("div",{className:"bm-chart-foot",children:[n.jsx("span",{className:"legend-dot"}),"All models over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),R&&(()=>{var $,j;const d=R.paper_arxiv_id||R.paper_id,g=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),h=R.best_metric&&(($=R.metrics)==null?void 0:$[R.best_metric])!==void 0?R.best_metric:b,S=(j=R.metrics)==null?void 0:j[h];return n.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[n.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),n.jsxs("div",{className:"bm-highlight-text",children:[n.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),n.jsxs("span",{className:"bm-highlight-paper",children:[R.model_name||g||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[S!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",ne(S),g?" · ":""]}):null,d?n.jsx(me,{to:`/paper/${d}`,children:be(R.paper_title,g)}):be(R.paper_title,g)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:y,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ot,{targetRef:y,label:"leaderboard"})]})]}),E.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,g)=>n.jsx(xe,{className:"h-10 w-full mb-2"},g))}):Q.length===0?n.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):n.jsx("div",{className:"bm-table-scroll",children:n.jsxs("table",{className:"bm-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{className:"col-rank",children:"Rank"}),n.jsx("th",{className:"col-model",children:"Model"}),Fe&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const g=d===b;return n.jsx("th",{className:`col-value ${g?"is-active":""}`,"aria-sort":g?K==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>l(d),"aria-pressed":g,title:`Sort by ${d}`,children:[d,g?` ${K}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,g=0;return Q.map((h,S)=>{var Ke,Qe;const $=he((Ke=h.metrics)==null?void 0:Ke[b]);let j=null;$!==null&&((d===null||$!==d)&&(g=S+1,d=$),j=g);const ue=h.paper_arxiv_id||h.paper_id,Ge=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ke=ct(h,s);return n.jsxs("tr",{ref:ke?u:void 0,className:ke?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ke&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),h.hf_model_url?n.jsx("a",{href:h.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${h.model_name||"model"} on Hugging Face`,children:h.model_name||"—"}):h.model_name||"—",h.is_open===!1&&n.jsx(Rt,{}),(h.external??h.is_external)&&n.jsx($t,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Fe&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),le.map(Se=>{var Ye;const Xe=Se===b,ge=(Ye=h.metrics)==null?void 0:Ye[Se];return n.jsx("td",{className:`col-value${Xe?" is-active":""}${Xe&&j===1?" is-best":""}`,children:ge!=null&&ge!==""?ne(ge):"—"},Se)}),n.jsx("td",{className:"col-paper",children:ue?n.jsx(me,{to:`/paper/${ue}`,children:be(h.paper_title,Ge)}):be(h.paper_title,Ge)}),n.jsx("td",{className:"col-year",children:((Qe=h.paper_published_date)==null?void 0:Qe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Xr as default}; diff --git a/assets/BenchmarkTrendSparkline-QiCYNsTg.js b/assets/BenchmarkTrendSparkline-DiSd6PbY.js similarity index 97% rename from assets/BenchmarkTrendSparkline-QiCYNsTg.js rename to assets/BenchmarkTrendSparkline-DiSd6PbY.js index bd059daf31b0ec04ef2b17fb80a760bab8d90cb1..bcbd1edcc197e4789fb81cf90e9e316a6d45ce2b 100644 --- a/assets/BenchmarkTrendSparkline-QiCYNsTg.js +++ b/assets/BenchmarkTrendSparkline-DiSd6PbY.js @@ -1 +1 @@ -import{r as C,j as t}from"./index-BOKpx1zD.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B}; +import{r as C,j as t}from"./index-CSNOTM3s.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B}; diff --git a/assets/ChatView-BCGQJFEn.js b/assets/ChatView-CZcqmRIk.js similarity index 99% rename from assets/ChatView-BCGQJFEn.js rename to assets/ChatView-CZcqmRIk.js index 4b5e52d78593b8c511c9241048b4287d89672806..a968a98c3b44f5eaa16bdc1b1ec5c7a2806ffee8 100644 --- a/assets/ChatView-BCGQJFEn.js +++ b/assets/ChatView-CZcqmRIk.js @@ -1,4 +1,4 @@ -import{r as d,j as t,c as Ee,d as Fe,a as Ue,u as $e,e as We}from"./index-BOKpx1zD.js";import{M as Be,S as X,A as qe,C as He,a as Le,b as Ve,r as Ke,F as Ge,D as Xe,l as ze,c as xe,d as be,e as ve,f as Je,g as Qe,h as G,t as Q,P as Ze,i as we,j as et,T as tt,u as je,k as st}from"./chatSessions-C-yr7eOL.js";import"./katex.min-BSBacQyE.js";import{P as at,r as nt,a as rt}from"./PaperPreviewLink-Bbvo9u5G.js";import{M as ot,r as it,d as ct}from"./index-B-skc6rz.js";import"./useQuery-Cj0zK8BW.js";import"./hover-card-BJtl0mwj.js";const _e=({onSend:e,busy:s,placeholder:n,autoFocus:h,draft:l,onDraftChange:u,onStop:p,models:y=[],selectedModel:x,onModelChange:j})=>{const[w,_]=d.useState(""),O=d.useRef(null);d.useEffect(()=>{const f=O.current;f&&(f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,200)}px`)},[w]),d.useEffect(()=>{var f;h&&((f=O.current)==null||f.focus())},[h]),d.useEffect(()=>{l!==void 0&&_(l)},[l]);const T=()=>{const f=w.trim();!f||s||(_(""),u==null||u(""),e(f))};return t.jsxs("div",{className:"chat-composer",children:[t.jsx("textarea",{ref:O,rows:1,value:w,placeholder:n||"Ask anything about research…",onChange:f=>{_(f.target.value),u==null||u(f.target.value)},onKeyDown:f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),T())}}),t.jsxs("div",{className:"chat-composer-row",children:[t.jsxs("div",{className:"chat-composer-tools",children:[y.length>0&&x&&j&&t.jsx(Be,{models:y,selectedModel:x,onModelChange:j,disabled:s}),t.jsx("span",{className:"chat-composer-hint",children:"Enter to send · Shift+Enter for newline"})]}),t.jsx("button",{type:"button",className:`chat-send${s||w.trim()?" chat-send-on":""}`,onClick:s?p:T,disabled:s?!p:!w.trim(),"aria-label":s?"Stop generating":"Send message",children:s?p?t.jsx("span",{"aria-hidden":"true",children:"■"}):t.jsx(X,{light:!0}):t.jsx(qe,{})})]})]})};function lt(e,s,n){if(s)return{routeId:e,title:s.title,arxivId:s.metadata.arxiv_id,source:s.metadata.source,sourceUrl:s.metadata.source_url,thumbnailUrl:s.metadata.thumbnail_url,authors:s.metadata.authors.map(h=>h.name),published:s.metadata.published,conference:s.metadata.conference,citationCount:s.metadata.citation_count,tasks:s.metadata.tasks};if(n)return{routeId:e,title:n.title,arxivId:n.arxiv_id??null,source:n.arxiv_id?"arxiv":"external",sourceUrl:n.source_url,thumbnailUrl:n.thumbnail_url??null,authors:n.authors??[],published:n.published??null,conference:n.conference??null,citationCount:n.citation_count??null,tasks:[]}}const se=({routeId:e,paper:s,citation:n,className:h="chat-paper-link",children:l})=>t.jsx(at,{routeId:e,initialData:lt(e,s,n),className:h,target:"_blank",children:l});function dt(e){const s=e.lastIndexOf("[");if(s===-1)return e;const n=e.slice(s);return/^\[[^\]]*(\]\(?[^)\s]*)?$/.test(n)?e.slice(0,s):e}const ut=e=>e.startsWith("paper:")?e:ct(e),ht=({text:e,streaming:s,papers:n,citations:h})=>{const l=s?dt(e):e;return t.jsx(ot,{remarkPlugins:[it,rt],rehypePlugins:[nt],urlTransform:ut,components:{a:({href:u,children:p})=>{if(u!=null&&u.startsWith("paper:")){const y=u.slice(6);return!n[y]&&!(h!=null&&h[y])?t.jsx("span",{className:"chat-invalid-citation",children:p}):t.jsx(se,{routeId:y,paper:n[y],citation:h==null?void 0:h[y],children:p})}return t.jsx("span",{children:p})}},children:l})};function mt(e){if(!e.authors.length)return"";const s=e.authors.slice(0,3).map(n=>n.name).join(", ");return e.authors.length>3?`${s}, et al.`:s}function pt(e){var n;if(e.conference)return e.conference;const s=(n=e.published)==null?void 0:n.slice(0,4);if(e.arxiv_id)return s?`arXiv ${s}`:"arXiv";if(e.source_url)try{return new URL(e.source_url).hostname.replace(/^www\./,"")}catch{}return s??"external"}function ft(e,s=240){const n=e.content.trim();return n.length<=s?n:`${n.slice(0,s).trimEnd()}…`}const Ce=()=>t.jsx("span",{className:"chat-caret"}),gt=({text:e,papers:s,citations:n})=>{const h=[],l=/\[([^\]\n]+)\]\(paper:([^) \t\n]+)\)/g;let u=0;for(const p of e.matchAll(l)){const y=p.index??0;h.push(e.slice(u,y));const[,x,j]=p;h.push(n[j]||s[j]?t.jsx(se,{routeId:j,paper:s[j],citation:n[j],children:x},`${y}-${j}`):t.jsx("span",{children:x},`${y}-${j}`)),u=y+p[0].length}return h.push(e.slice(u)),t.jsx(t.Fragment,{children:h})},yt=({block:e,papers:s,citations:n,onToggle:h})=>e.active?t.jsxs("div",{className:"chat-reason-live",children:[t.jsxs("div",{className:"chat-reason-live-head",children:[t.jsx(X,{})," ",t.jsx("span",{children:"Thinking…"})]}),t.jsxs("div",{className:"chat-reason-live-body",children:[e.text,t.jsx(Ce,{})]})]}):t.jsxs("div",{className:"chat-reason-done",children:[t.jsxs("button",{type:"button",className:"chat-reason-done-head",onClick:h,children:[t.jsx(He,{}),t.jsx("span",{children:"Thought for a few seconds"}),t.jsx(Le,{open:e.open})]}),e.open&&t.jsx("div",{className:"chat-reason-done-body",children:t.jsx(gt,{text:e.text,papers:s,citations:n})})]}),xt=({block:e,papers:s,onToggle:n})=>{var w,_,O,T;const h=e.status==="running",l=e.schema_version===2||!!e.content,u=e.status==="error"||e.status==="denied",p=typeof e.args.query=="string"?e.args.query:"",y=typeof e.args.command=="string"?e.args.command:typeof e.args.file_path=="string"?e.args.file_path:p,x=((w=e.content)==null?void 0:w.map(f=>f.text).join(""))??"",j=h?"running…":l?`${e.status} · ${e.took_ms??0} ms`:`${e.hits} results · ${e.took_ms} ms`;return t.jsxs("div",{className:`chat-tool${h?" chat-tool-running":""}${u?" chat-tool-failed":""}`,children:[t.jsxs("button",{type:"button",className:"chat-tool-head",onClick:n,disabled:h,"aria-expanded":h?void 0:e.open,children:[t.jsxs("span",{className:"chat-tool-head-left",children:[h?t.jsx(X,{}):t.jsx(Ve,{}),t.jsx("code",{className:"chat-tool-name",children:e.name}),t.jsx("span",{className:"chat-tool-query",children:l?y:`("${p}")`})]}),t.jsxs("span",{className:"chat-tool-head-right",children:[t.jsx("span",{className:"chat-tool-status",children:j}),!h&&t.jsx(Le,{open:e.open})]})]}),!h&&e.open&&t.jsxs("div",{className:"chat-tool-body",children:[t.jsxs("div",{className:"chat-tool-args",children:[t.jsx("span",{className:"chat-tool-label",children:"arguments"}),t.jsx("pre",{children:JSON.stringify(e.args,null,2)})]}),l?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"chat-tool-output-head",children:[t.jsx("span",{className:"chat-tool-label",children:"result"}),t.jsx("button",{type:"button",className:"chat-tool-copy",onClick:()=>void navigator.clipboard.writeText(x),children:"Copy"})]}),t.jsx("pre",{className:"chat-tool-output",children:t.jsx("code",{children:x})}),((_=e.metadata)==null?void 0:_.output_truncated)&&t.jsx("div",{className:"chat-tool-truncated",children:"Output was truncated."})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"chat-tool-label chat-tool-results-label",children:["returned ",((O=e.results)==null?void 0:O.length)??0," papers"]}),t.jsx("ol",{className:"chat-tool-results",children:(T=e.results)==null?void 0:T.map(f=>t.jsxs("li",{className:"chat-hit",children:[t.jsx("div",{className:"chat-hit-top",children:t.jsx(se,{routeId:f.route_id,paper:s[f.route_id],className:"chat-hit-title",children:f.title})}),t.jsx("div",{className:"chat-hit-meta",children:[mt(f.metadata),pt(f.metadata)].filter(Boolean).join(" · ")}),t.jsxs("div",{className:"chat-hit-snippet",children:[ft(f),f.content_truncated&&t.jsx("span",{className:"chat-hit-truncated",children:" (truncated)"})]})]},f.route_id))})]})]})]})},bt=({block:e,papers:s,citations:n})=>t.jsxs("div",{className:"chat-answer",children:[t.jsx(ht,{text:e.text,streaming:!e.done,papers:s,citations:n}),!e.done&&!!e.text.trim()&&t.jsx(Ce,{})]}),vt=({text:e})=>t.jsx("div",{className:"chat-msg chat-msg-user",children:t.jsx("div",{className:"chat-bubble",children:e})}),wt=({msg:e,papers:s,onToggleBlock:n})=>{var h,l;return t.jsx("div",{className:"chat-msg chat-msg-assistant",children:t.jsxs("div",{className:"chat-msg-blocks",children:[e.streaming&&(((h=e.blocks)==null?void 0:h.length)??0)===0&&t.jsxs("div",{className:"chat-reason-live-head",children:[t.jsx(X,{})," ",t.jsx("span",{children:"Thinking…"})]}),(l=e.blocks)==null?void 0:l.map((u,p)=>{const y=`${e.id}-${p}`,x="citations"in u&&u.citations!==void 0?u.citations:e.citations??[],j=Object.fromEntries(x.map(w=>[w.route_id,w]));return u.kind==="reasoning"?t.jsx(yt,{block:u,papers:s,citations:j,onToggle:()=>n(e.id,p)},y):u.kind==="tool"?t.jsx(xt,{block:u,papers:s,onToggle:()=>n(e.id,p)},y):t.jsx(bt,{block:u,papers:s,citations:j},y)}),e.error&&t.jsxs("div",{className:"chat-error",children:["The assistant hit an error: ",e.error]}),!e.streaming&&e.finishReason&&e.finishReason!=="success"&&t.jsx("div",{className:"chat-finish-note",children:["tool_limit","max_turns"].includes(e.finishReason)?"The assistant stopped at the execution limit.":`The assistant stopped early (${e.finishReason.replace(/_/g," ")}).`})]})})},E=(e,s)=>new Promise(n=>{const h=setTimeout(l,e);function l(){s==null||s.removeEventListener("abort",l),clearTimeout(h),n()}s==null||s.addEventListener("abort",l)}),P=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),I={name:"Object Detection",slug:"object-detection"},A={name:"Real-Time Object Detection",slug:"real-time-object-detection"},jt={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:P({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[I,A],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:P({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[I,A],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:P({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[I,A],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:P({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[I,A],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:P({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[I,A],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:P({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[I,A],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:P({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},I],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:P({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[I,A],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Se=e=>e.map(s=>jt[s]),Oe=Se(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Re=Se(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Te="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",Ne="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",ke=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. +import{r as d,j as t,c as Ee,d as Fe,a as Ue,u as $e,e as We}from"./index-CSNOTM3s.js";import{M as Be,S as X,A as qe,C as He,a as Le,b as Ve,r as Ke,F as Ge,D as Xe,l as ze,c as xe,d as be,e as ve,f as Je,g as Qe,h as G,t as Q,P as Ze,i as we,j as et,T as tt,u as je,k as st}from"./chatSessions-Dmenu8US.js";import"./katex.min-BSBacQyE.js";import{P as at,r as nt,a as rt}from"./PaperPreviewLink-AqikhUz3.js";import{M as ot,r as it,d as ct}from"./index-CVIt_dyy.js";import"./useQuery-DCf2mroJ.js";import"./hover-card-D24Q2Pl3.js";const _e=({onSend:e,busy:s,placeholder:n,autoFocus:h,draft:l,onDraftChange:u,onStop:p,models:y=[],selectedModel:x,onModelChange:j})=>{const[w,_]=d.useState(""),O=d.useRef(null);d.useEffect(()=>{const f=O.current;f&&(f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,200)}px`)},[w]),d.useEffect(()=>{var f;h&&((f=O.current)==null||f.focus())},[h]),d.useEffect(()=>{l!==void 0&&_(l)},[l]);const T=()=>{const f=w.trim();!f||s||(_(""),u==null||u(""),e(f))};return t.jsxs("div",{className:"chat-composer",children:[t.jsx("textarea",{ref:O,rows:1,value:w,placeholder:n||"Ask anything about research…",onChange:f=>{_(f.target.value),u==null||u(f.target.value)},onKeyDown:f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),T())}}),t.jsxs("div",{className:"chat-composer-row",children:[t.jsxs("div",{className:"chat-composer-tools",children:[y.length>0&&x&&j&&t.jsx(Be,{models:y,selectedModel:x,onModelChange:j,disabled:s}),t.jsx("span",{className:"chat-composer-hint",children:"Enter to send · Shift+Enter for newline"})]}),t.jsx("button",{type:"button",className:`chat-send${s||w.trim()?" chat-send-on":""}`,onClick:s?p:T,disabled:s?!p:!w.trim(),"aria-label":s?"Stop generating":"Send message",children:s?p?t.jsx("span",{"aria-hidden":"true",children:"■"}):t.jsx(X,{light:!0}):t.jsx(qe,{})})]})]})};function lt(e,s,n){if(s)return{routeId:e,title:s.title,arxivId:s.metadata.arxiv_id,source:s.metadata.source,sourceUrl:s.metadata.source_url,thumbnailUrl:s.metadata.thumbnail_url,authors:s.metadata.authors.map(h=>h.name),published:s.metadata.published,conference:s.metadata.conference,citationCount:s.metadata.citation_count,tasks:s.metadata.tasks};if(n)return{routeId:e,title:n.title,arxivId:n.arxiv_id??null,source:n.arxiv_id?"arxiv":"external",sourceUrl:n.source_url,thumbnailUrl:n.thumbnail_url??null,authors:n.authors??[],published:n.published??null,conference:n.conference??null,citationCount:n.citation_count??null,tasks:[]}}const se=({routeId:e,paper:s,citation:n,className:h="chat-paper-link",children:l})=>t.jsx(at,{routeId:e,initialData:lt(e,s,n),className:h,target:"_blank",children:l});function dt(e){const s=e.lastIndexOf("[");if(s===-1)return e;const n=e.slice(s);return/^\[[^\]]*(\]\(?[^)\s]*)?$/.test(n)?e.slice(0,s):e}const ut=e=>e.startsWith("paper:")?e:ct(e),ht=({text:e,streaming:s,papers:n,citations:h})=>{const l=s?dt(e):e;return t.jsx(ot,{remarkPlugins:[it,rt],rehypePlugins:[nt],urlTransform:ut,components:{a:({href:u,children:p})=>{if(u!=null&&u.startsWith("paper:")){const y=u.slice(6);return!n[y]&&!(h!=null&&h[y])?t.jsx("span",{className:"chat-invalid-citation",children:p}):t.jsx(se,{routeId:y,paper:n[y],citation:h==null?void 0:h[y],children:p})}return t.jsx("span",{children:p})}},children:l})};function mt(e){if(!e.authors.length)return"";const s=e.authors.slice(0,3).map(n=>n.name).join(", ");return e.authors.length>3?`${s}, et al.`:s}function pt(e){var n;if(e.conference)return e.conference;const s=(n=e.published)==null?void 0:n.slice(0,4);if(e.arxiv_id)return s?`arXiv ${s}`:"arXiv";if(e.source_url)try{return new URL(e.source_url).hostname.replace(/^www\./,"")}catch{}return s??"external"}function ft(e,s=240){const n=e.content.trim();return n.length<=s?n:`${n.slice(0,s).trimEnd()}…`}const Ce=()=>t.jsx("span",{className:"chat-caret"}),gt=({text:e,papers:s,citations:n})=>{const h=[],l=/\[([^\]\n]+)\]\(paper:([^) \t\n]+)\)/g;let u=0;for(const p of e.matchAll(l)){const y=p.index??0;h.push(e.slice(u,y));const[,x,j]=p;h.push(n[j]||s[j]?t.jsx(se,{routeId:j,paper:s[j],citation:n[j],children:x},`${y}-${j}`):t.jsx("span",{children:x},`${y}-${j}`)),u=y+p[0].length}return h.push(e.slice(u)),t.jsx(t.Fragment,{children:h})},yt=({block:e,papers:s,citations:n,onToggle:h})=>e.active?t.jsxs("div",{className:"chat-reason-live",children:[t.jsxs("div",{className:"chat-reason-live-head",children:[t.jsx(X,{})," ",t.jsx("span",{children:"Thinking…"})]}),t.jsxs("div",{className:"chat-reason-live-body",children:[e.text,t.jsx(Ce,{})]})]}):t.jsxs("div",{className:"chat-reason-done",children:[t.jsxs("button",{type:"button",className:"chat-reason-done-head",onClick:h,children:[t.jsx(He,{}),t.jsx("span",{children:"Thought for a few seconds"}),t.jsx(Le,{open:e.open})]}),e.open&&t.jsx("div",{className:"chat-reason-done-body",children:t.jsx(gt,{text:e.text,papers:s,citations:n})})]}),xt=({block:e,papers:s,onToggle:n})=>{var w,_,O,T;const h=e.status==="running",l=e.schema_version===2||!!e.content,u=e.status==="error"||e.status==="denied",p=typeof e.args.query=="string"?e.args.query:"",y=typeof e.args.command=="string"?e.args.command:typeof e.args.file_path=="string"?e.args.file_path:p,x=((w=e.content)==null?void 0:w.map(f=>f.text).join(""))??"",j=h?"running…":l?`${e.status} · ${e.took_ms??0} ms`:`${e.hits} results · ${e.took_ms} ms`;return t.jsxs("div",{className:`chat-tool${h?" chat-tool-running":""}${u?" chat-tool-failed":""}`,children:[t.jsxs("button",{type:"button",className:"chat-tool-head",onClick:n,disabled:h,"aria-expanded":h?void 0:e.open,children:[t.jsxs("span",{className:"chat-tool-head-left",children:[h?t.jsx(X,{}):t.jsx(Ve,{}),t.jsx("code",{className:"chat-tool-name",children:e.name}),t.jsx("span",{className:"chat-tool-query",children:l?y:`("${p}")`})]}),t.jsxs("span",{className:"chat-tool-head-right",children:[t.jsx("span",{className:"chat-tool-status",children:j}),!h&&t.jsx(Le,{open:e.open})]})]}),!h&&e.open&&t.jsxs("div",{className:"chat-tool-body",children:[t.jsxs("div",{className:"chat-tool-args",children:[t.jsx("span",{className:"chat-tool-label",children:"arguments"}),t.jsx("pre",{children:JSON.stringify(e.args,null,2)})]}),l?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"chat-tool-output-head",children:[t.jsx("span",{className:"chat-tool-label",children:"result"}),t.jsx("button",{type:"button",className:"chat-tool-copy",onClick:()=>void navigator.clipboard.writeText(x),children:"Copy"})]}),t.jsx("pre",{className:"chat-tool-output",children:t.jsx("code",{children:x})}),((_=e.metadata)==null?void 0:_.output_truncated)&&t.jsx("div",{className:"chat-tool-truncated",children:"Output was truncated."})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"chat-tool-label chat-tool-results-label",children:["returned ",((O=e.results)==null?void 0:O.length)??0," papers"]}),t.jsx("ol",{className:"chat-tool-results",children:(T=e.results)==null?void 0:T.map(f=>t.jsxs("li",{className:"chat-hit",children:[t.jsx("div",{className:"chat-hit-top",children:t.jsx(se,{routeId:f.route_id,paper:s[f.route_id],className:"chat-hit-title",children:f.title})}),t.jsx("div",{className:"chat-hit-meta",children:[mt(f.metadata),pt(f.metadata)].filter(Boolean).join(" · ")}),t.jsxs("div",{className:"chat-hit-snippet",children:[ft(f),f.content_truncated&&t.jsx("span",{className:"chat-hit-truncated",children:" (truncated)"})]})]},f.route_id))})]})]})]})},bt=({block:e,papers:s,citations:n})=>t.jsxs("div",{className:"chat-answer",children:[t.jsx(ht,{text:e.text,streaming:!e.done,papers:s,citations:n}),!e.done&&!!e.text.trim()&&t.jsx(Ce,{})]}),vt=({text:e})=>t.jsx("div",{className:"chat-msg chat-msg-user",children:t.jsx("div",{className:"chat-bubble",children:e})}),wt=({msg:e,papers:s,onToggleBlock:n})=>{var h,l;return t.jsx("div",{className:"chat-msg chat-msg-assistant",children:t.jsxs("div",{className:"chat-msg-blocks",children:[e.streaming&&(((h=e.blocks)==null?void 0:h.length)??0)===0&&t.jsxs("div",{className:"chat-reason-live-head",children:[t.jsx(X,{})," ",t.jsx("span",{children:"Thinking…"})]}),(l=e.blocks)==null?void 0:l.map((u,p)=>{const y=`${e.id}-${p}`,x="citations"in u&&u.citations!==void 0?u.citations:e.citations??[],j=Object.fromEntries(x.map(w=>[w.route_id,w]));return u.kind==="reasoning"?t.jsx(yt,{block:u,papers:s,citations:j,onToggle:()=>n(e.id,p)},y):u.kind==="tool"?t.jsx(xt,{block:u,papers:s,onToggle:()=>n(e.id,p)},y):t.jsx(bt,{block:u,papers:s,citations:j},y)}),e.error&&t.jsxs("div",{className:"chat-error",children:["The assistant hit an error: ",e.error]}),!e.streaming&&e.finishReason&&e.finishReason!=="success"&&t.jsx("div",{className:"chat-finish-note",children:["tool_limit","max_turns"].includes(e.finishReason)?"The assistant stopped at the execution limit.":`The assistant stopped early (${e.finishReason.replace(/_/g," ")}).`})]})})},E=(e,s)=>new Promise(n=>{const h=setTimeout(l,e);function l(){s==null||s.removeEventListener("abort",l),clearTimeout(h),n()}s==null||s.addEventListener("abort",l)}),P=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),I={name:"Object Detection",slug:"object-detection"},A={name:"Real-Time Object Detection",slug:"real-time-object-detection"},jt={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:P({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[I,A],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:P({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[I,A],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:P({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[I,A],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:P({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[I,A],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:P({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[I,A],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:P({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[I,A],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:P({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},I],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:P({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[I,A],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Se=e=>e.map(s=>jt[s]),Oe=Se(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Re=Se(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Te="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",Ne="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",ke=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. **At the fast / edge end**, [YOLOv12](paper:2502.12524) is the current leader. Its area-attention design pushes attention into the YOLO backbone without the usual latency hit — YOLOv12-N reaches 40.6 mAP at ~1.6 ms on a T4, roughly +1.5 mAP over [YOLOv10](paper:2405.14458) at matched speed. [YOLOv10](paper:2405.14458) is still very relevant because it made the YOLO head NMS-free, cutting real end-to-end latency. diff --git a/assets/ConferenceDetailView-8p_yVjpd.js b/assets/ConferenceDetailView-BUTsuBU8.js similarity index 94% rename from assets/ConferenceDetailView-8p_yVjpd.js rename to assets/ConferenceDetailView-BUTsuBU8.js index 59bddc7bccc168d81d9f0c046ef2a1f6439b8350..b68512d270c6b508d48a160b6d9c03f464f92721 100644 --- a/assets/ConferenceDetailView-8p_yVjpd.js +++ b/assets/ConferenceDetailView-BUTsuBU8.js @@ -1 +1 @@ -import{d as L,r as D,j as e,L as p,b as C}from"./index-BOKpx1zD.js";import{u as T}from"./useQuery-Cj0zK8BW.js";import{M as F}from"./MarkdownText-CFWVPyKn.js";import{e as B,h as A,d as E}from"./transform-DLPfRTia.js";import{S as f}from"./skeleton-C5u4dxsY.js";import{A as P,a as z}from"./alert-De0V5ndO.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bbvo9u5G.js";import"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";const M=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",R=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},G=()=>{var k,b,S,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[M(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((b=t.data)==null?void 0:b.total_paper_count)??0,m=((S=t.data)==null?void 0:S.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?R(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",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:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((r,n)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},n))}):i.map(r=>{const n=r.tasks;if(n.length===0)return null;const o=n.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",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:r.name}),r.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:r.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:n.map(l=>{const d=l.slug||"",x=B(A(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},r.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(r=>r.tasks.length>0).length," areas."]})]})};export{G as default}; +import{d as L,r as D,j as e,L as p,b as C}from"./index-CSNOTM3s.js";import{u as T}from"./useQuery-DCf2mroJ.js";import{M as F}from"./MarkdownText-DJVhHGem.js";import{e as B,h as A,d as E}from"./transform-BGwKHn4w.js";import{S as f}from"./skeleton-DIecj65I.js";import{A as P,a as z}from"./alert-DuO9Nm7q.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-AqikhUz3.js";import"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";const M=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",R=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},G=()=>{var k,b,S,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[M(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((b=t.data)==null?void 0:b.total_paper_count)??0,m=((S=t.data)==null?void 0:S.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?R(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",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:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((r,n)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},n))}):i.map(r=>{const n=r.tasks;if(n.length===0)return null;const o=n.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",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:r.name}),r.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:r.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:n.map(l=>{const d=l.slug||"",x=B(A(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},r.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(r=>r.tasks.length>0).length," areas."]})]})};export{G as default}; diff --git a/assets/ConferenceTaskView-C43k4-yt.js b/assets/ConferenceTaskView-BOaZO01e.js similarity index 89% rename from assets/ConferenceTaskView-C43k4-yt.js rename to assets/ConferenceTaskView-BOaZO01e.js index f47a6a48383cb862ee1be76f560356e1f3be5d79..79c7319451bef13eb09f719a3746436adf97b4fd 100644 --- a/assets/ConferenceTaskView-C43k4-yt.js +++ b/assets/ConferenceTaskView-BOaZO01e.js @@ -1 +1 @@ -import{d as Q,u as K,r as u,j as e,L as P,Y as V,b as L}from"./index-BOKpx1zD.js";import{u as E}from"./useQuery-Cj0zK8BW.js";import{P as $}from"./components-BkQ2EWK-.js";import{M as g}from"./MarkdownText-CFWVPyKn.js";import{t as D,d as U}from"./transform-DLPfRTia.js";import{c as W}from"./usePapers-B51Q6z7s.js";import{u as Y}from"./useIntersectionObserver-DVOSMcnN.js";import{S as G}from"./skeleton-C5u4dxsY.js";import{A as J,a as X}from"./alert-De0V5ndO.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bbvo9u5G.js";import"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";import"./useInfiniteQuery-B9BAVqQL.js";const Z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",xe=()=>{var w,R,F,C,O,T;const{confSlug:s,taskSlug:r}=Q(),[v,M]=K(),b=ee(v.get("order_by")),z=n=>{const a=new URLSearchParams(v);a.set("order_by",n),M(a)},y=r==="all",x=r==="oral",f=r==="spotlight",c=r==="outstanding",l=r==="best-paper-finalists",S=c||l,d=y||x||f||c||l,I=d?void 0:r,q=x?"oral":f?"spotlight":c?"outstanding":l?"best_paper_finalist":void 0,p=E({queryKey:["conference",s],queryFn:()=>L.getConference(s),enabled:!!s,staleTime:10*60*1e3}),h=E({queryKey:["task",r],queryFn:()=>L.getTask(r),enabled:!!r&&!d,staleTime:10*60*1e3}),i=W({conferenceSlug:s||"",taskSlug:I,presentation:q,page_size:12,order_by:b,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:H,isIntersecting:_}=Y({rootMargin:"200px"});u.useEffect(()=>{_&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[_,i.hasNextPage,i.isFetchingNextPage]),u.useEffect(()=>{window.scrollTo(0,0)},[s,r]);const j=u.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(o=>o.results)},[i.data]),N=u.useMemo(()=>j.map(D),[j]),m=y?"All papers":x?"Oral papers":f?"Spotlight papers":c?"Outstanding papers":l?"Best paper finalists":U(((w=h.data)==null?void 0:w.name)||r||"",((R=h.data)==null?void 0:R.slug)||r),k=((C=(F=i.data)==null?void 0:F.pages[0])==null?void 0:C.count)??((O=p.data)==null?void 0:O.paper_count)??0,t=h.data;return p.error||h.error||i.error?e.jsx("div",{className:"page",children:e.jsx(J,{variant:"destructive",children:e.jsx(X,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(P,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:`/conferences/${s}`,children:((T=p.data)==null?void 0:T.name)??s}),e.jsx("span",{children:" / "}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:!d&&(t!=null&&t.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:d?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:m}),c&&s==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),c&&s==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),l&&s==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!d&&(t==null?void 0:t.description)&&e.jsx(g,{className:"task-explainer",text:t.description}),p.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:k.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:p.data.name})]})]}),!d&&(t==null?void 0:t.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:t.image_url,alt:`${m} schematic`,onError:n=>{var a,o;(o=(a=n.currentTarget.parentElement)==null?void 0:a.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",m,t.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:S?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",k.toLocaleString(),"]"]})]})]}),!S&&e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:Z.map(([n,a])=>e.jsx("button",{className:`sort-btn ${b===n?"active":""}`,onClick:()=>z(n),children:a},n))}),e.jsxs("div",{className:"results-count",children:[N.length," loaded in ",e.jsx("span",{children:m})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,a)=>e.jsx(G,{className:"h-40 w-full"},a))}):N.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((n,a)=>{var B;const o=(B=j[a])==null?void 0:B.conference_award,A=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!l?"Best Paper Finalist":null;return e.jsxs(V.Fragment,{children:[A&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:A}),e.jsx($,{paper:n,rank:a+1})]},n.id)})}),e.jsx("div",{ref:H,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{xe as default}; +import{d as Q,u as K,r as u,j as e,L as P,Y as V,b as L}from"./index-CSNOTM3s.js";import{u as E}from"./useQuery-DCf2mroJ.js";import{P as $}from"./components-PxXQJAWo.js";import{M as g}from"./MarkdownText-DJVhHGem.js";import{t as D,d as U}from"./transform-BGwKHn4w.js";import{c as W}from"./usePapers-CFugWskp.js";import{u as Y}from"./useIntersectionObserver-CUA0CMpl.js";import{S as G}from"./skeleton-DIecj65I.js";import{A as J,a as X}from"./alert-DuO9Nm7q.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-AqikhUz3.js";import"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";import"./useInfiniteQuery-_jD1bF9N.js";const Z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",xe=()=>{var w,R,F,C,O,T;const{confSlug:s,taskSlug:r}=Q(),[v,M]=K(),b=ee(v.get("order_by")),z=n=>{const a=new URLSearchParams(v);a.set("order_by",n),M(a)},y=r==="all",x=r==="oral",f=r==="spotlight",c=r==="outstanding",l=r==="best-paper-finalists",S=c||l,d=y||x||f||c||l,I=d?void 0:r,q=x?"oral":f?"spotlight":c?"outstanding":l?"best_paper_finalist":void 0,p=E({queryKey:["conference",s],queryFn:()=>L.getConference(s),enabled:!!s,staleTime:10*60*1e3}),h=E({queryKey:["task",r],queryFn:()=>L.getTask(r),enabled:!!r&&!d,staleTime:10*60*1e3}),i=W({conferenceSlug:s||"",taskSlug:I,presentation:q,page_size:12,order_by:b,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:H,isIntersecting:_}=Y({rootMargin:"200px"});u.useEffect(()=>{_&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[_,i.hasNextPage,i.isFetchingNextPage]),u.useEffect(()=>{window.scrollTo(0,0)},[s,r]);const j=u.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(o=>o.results)},[i.data]),N=u.useMemo(()=>j.map(D),[j]),m=y?"All papers":x?"Oral papers":f?"Spotlight papers":c?"Outstanding papers":l?"Best paper finalists":U(((w=h.data)==null?void 0:w.name)||r||"",((R=h.data)==null?void 0:R.slug)||r),k=((C=(F=i.data)==null?void 0:F.pages[0])==null?void 0:C.count)??((O=p.data)==null?void 0:O.paper_count)??0,t=h.data;return p.error||h.error||i.error?e.jsx("div",{className:"page",children:e.jsx(J,{variant:"destructive",children:e.jsx(X,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(P,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:`/conferences/${s}`,children:((T=p.data)==null?void 0:T.name)??s}),e.jsx("span",{children:" / "}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:!d&&(t!=null&&t.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:d?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:m}),c&&s==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),c&&s==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),l&&s==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!d&&(t==null?void 0:t.description)&&e.jsx(g,{className:"task-explainer",text:t.description}),p.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:k.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:p.data.name})]})]}),!d&&(t==null?void 0:t.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:t.image_url,alt:`${m} schematic`,onError:n=>{var a,o;(o=(a=n.currentTarget.parentElement)==null?void 0:a.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",m,t.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:S?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",k.toLocaleString(),"]"]})]})]}),!S&&e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:Z.map(([n,a])=>e.jsx("button",{className:`sort-btn ${b===n?"active":""}`,onClick:()=>z(n),children:a},n))}),e.jsxs("div",{className:"results-count",children:[N.length," loaded in ",e.jsx("span",{children:m})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,a)=>e.jsx(G,{className:"h-40 w-full"},a))}):N.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((n,a)=>{var B;const o=(B=j[a])==null?void 0:B.conference_award,A=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!l?"Best Paper Finalist":null;return e.jsxs(V.Fragment,{children:[A&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:A}),e.jsx($,{paper:n,rank:a+1})]},n.id)})}),e.jsx("div",{ref:H,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{xe as default}; diff --git a/assets/ConferencesIndexView-Btn6PGBN.js b/assets/ConferencesIndexView-CAuDOq-J.js similarity index 87% rename from assets/ConferencesIndexView-Btn6PGBN.js rename to assets/ConferencesIndexView-CAuDOq-J.js index 1cf4a8457c19ca61c3056db89d9adfb754da2dd1..0e6e148af57c43458d33a9b070d98944e3a61acd 100644 --- a/assets/ConferencesIndexView-Btn6PGBN.js +++ b/assets/ConferencesIndexView-CAuDOq-J.js @@ -1 +1 @@ -import{r as m,j as e,L as p,b as u}from"./index-BOKpx1zD.js";import{u as h}from"./useQuery-Cj0zK8BW.js";import{S as d}from"./skeleton-C5u4dxsY.js";import{A as g,a as f}from"./alert-De0V5ndO.js";import{T as x}from"./TaxonomySuggestionTile-BZeB9d42.js";import"./SignInToEditDialog-DcJcnDsG.js";import"./button-COASHtHZ.js";import"./textarea-BKXasfzv.js";import"./dialog-Ba_4mPeV.js";import"./useMutation-1Slfgn9F.js";import"./loader-circle-kP6qHte6.js";const j=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),a=n?new Date(`${n}T00:00:00`):null,s=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return a&&a.getTime()!==t.getTime()?t.getMonth()===a.getMonth()?`${s(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${a.getDate()}, ${i}`:`${s(t)} – ${s(a)}, ${i}`:`${s(t)}, ${i}`},y=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const n=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return n?Number(n):0},v=(r,n)=>{if(r.start_date&&n.start_date){const t=r.start_date.localeCompare(n.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(n.start_date)return 1}return r.name.localeCompare(n.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},B=()=>{const r=h({queryKey:["conferences"],queryFn:()=>u.getConferences(),staleTime:6e5}),n=m.useMemo(()=>{var a;if(!((a=r.data)!=null&&a.results))return null;const t={};return r.data.results.forEach(s=>{const i=y(s);(t[i]||(t[i]=[])).push(s)}),Object.values(t).forEach(s=>s.sort(v)),Object.keys(t).map(Number).sort((s,i)=>i-s).map(s=>({year:s,conferences:t[s]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(f,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,a)=>e.jsxs("div",{children:[e.jsx(d,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((s,i)=>e.jsx(d,{className:"h-32"},i))})]},a))}):n==null?void 0:n.map(({year:t,conferences:a})=>{const s=a.reduce((l,o)=>l+(o.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"conference":"conferences"," ·"," ",s.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[a.map(l=>{const o=j(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(p,{to:`/conferences/${l.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:l.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})]})]},l.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{B as default}; +import{r as m,j as e,L as p,b as u}from"./index-CSNOTM3s.js";import{u as h}from"./useQuery-DCf2mroJ.js";import{S as d}from"./skeleton-DIecj65I.js";import{A as g,a as f}from"./alert-DuO9Nm7q.js";import{T as x}from"./TaxonomySuggestionTile-NN3nK-Nj.js";import"./SignInToEditDialog-qIIvqqtG.js";import"./button-KGqIZs29.js";import"./textarea-BajbF2-p.js";import"./dialog-CQwQlPi_.js";import"./useMutation-D90cYkan.js";import"./loader-circle-BCRahFjZ.js";const j=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),a=n?new Date(`${n}T00:00:00`):null,s=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return a&&a.getTime()!==t.getTime()?t.getMonth()===a.getMonth()?`${s(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${a.getDate()}, ${i}`:`${s(t)} – ${s(a)}, ${i}`:`${s(t)}, ${i}`},y=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const n=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return n?Number(n):0},v=(r,n)=>{if(r.start_date&&n.start_date){const t=r.start_date.localeCompare(n.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(n.start_date)return 1}return r.name.localeCompare(n.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},B=()=>{const r=h({queryKey:["conferences"],queryFn:()=>u.getConferences(),staleTime:6e5}),n=m.useMemo(()=>{var a;if(!((a=r.data)!=null&&a.results))return null;const t={};return r.data.results.forEach(s=>{const i=y(s);(t[i]||(t[i]=[])).push(s)}),Object.values(t).forEach(s=>s.sort(v)),Object.keys(t).map(Number).sort((s,i)=>i-s).map(s=>({year:s,conferences:t[s]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(f,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,a)=>e.jsxs("div",{children:[e.jsx(d,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((s,i)=>e.jsx(d,{className:"h-32"},i))})]},a))}):n==null?void 0:n.map(({year:t,conferences:a})=>{const s=a.reduce((l,o)=>l+(o.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"conference":"conferences"," ·"," ",s.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[a.map(l=>{const o=j(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(p,{to:`/conferences/${l.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:l.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})]})]},l.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{B as default}; diff --git a/assets/CronDashboard-B3JEoT_n.js b/assets/CronDashboard-BHCv8xsU.js similarity index 98% rename from assets/CronDashboard-B3JEoT_n.js rename to assets/CronDashboard-BHCv8xsU.js index 5183a284c1c907f1d8b6557b7f1b4d2a2fb02c19..7084f1bd0e6258152314573eaa8b5f3de124864b 100644 --- a/assets/CronDashboard-B3JEoT_n.js +++ b/assets/CronDashboard-BHCv8xsU.js @@ -1,4 +1,4 @@ -import{f as h,r as l,j as e,p as u,a9 as ye,k as ve,h as D,E as be,am as we,an as ke,m as I,P as Ce,o as _e,ao as W,L as Te,e as Re,b as Se}from"./index-BOKpx1zD.js";import{u as K}from"./useQuery-Cj0zK8BW.js";import{B as k,D as B,f as Me}from"./codexAddEvals-CUJKpU1a.js";import{B as O}from"./button-COASHtHZ.js";import{C as Ae}from"./chevron-down-DDO48iug.js";import{C as M,a as H,R as z,S as Fe}from"./shield-alert-Dk6P9oCq.js";import{L as R}from"./loader-circle-kP6qHte6.js";/** +import{f as h,r as l,j as e,p as u,a9 as ye,k as ve,h as D,E as be,am as we,an as ke,m as I,P as Ce,o as _e,ao as W,L as Te,e as Re,b as Se}from"./index-CSNOTM3s.js";import{u as K}from"./useQuery-DCf2mroJ.js";import{B as k,D as B,f as Me}from"./codexAddEvals-DqYnwrnj.js";import{B as O}from"./button-KGqIZs29.js";import{C as Ae}from"./chevron-down-CnQ_UTkP.js";import{C as M,a as H,R as z,S as Fe}from"./shield-alert-jW3iPtxV.js";import{L as R}from"./loader-circle-BCRahFjZ.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-CZdsMWe1.js b/assets/ExternalSourceEvalBadge-CuljE-w8.js similarity index 92% rename from assets/ExternalSourceEvalBadge-CZdsMWe1.js rename to assets/ExternalSourceEvalBadge-CuljE-w8.js index 65b2890b8f20a49678bae19e8eabcb3e298da17c..13a104139a39a263d8156eece9e45327e3da476f 100644 --- a/assets/ExternalSourceEvalBadge-CZdsMWe1.js +++ b/assets/ExternalSourceEvalBadge-CuljE-w8.js @@ -1 +1 @@ -import{j as e,L as l}from"./index-BOKpx1zD.js";import{H as t,a as n,b as o}from"./hover-card-BJtl0mwj.js";const u=()=>e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",e.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function i(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const p=({sourceUrl:a})=>{const r=i(a);return e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",a?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e.jsxs(e.Fragment,{children:[" ",r,"."]})]})]})};export{u as C,p as E}; +import{j as e,L as l}from"./index-CSNOTM3s.js";import{H as t,a as n,b as o}from"./hover-card-D24Q2Pl3.js";const u=()=>e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",e.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function i(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const p=({sourceUrl:a})=>{const r=i(a);return e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",a?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e.jsxs(e.Fragment,{children:[" ",r,"."]})]})]})};export{u as C,p as E}; diff --git a/assets/FeedView-DE_cbYeq.js b/assets/FeedView-CN0Q9tkf.js similarity index 90% rename from assets/FeedView-DE_cbYeq.js rename to assets/FeedView-CN0Q9tkf.js index 1fed1f0080836b7e29cc414144d1f82546ceaa0d..2fc9f986ab1043f6c5ef55e1ea4a126a3df5babf 100644 --- a/assets/FeedView-DE_cbYeq.js +++ b/assets/FeedView-CN0Q9tkf.js @@ -1 +1 @@ -import{u as M,r as o,j as e,L as u,i as S,a as C,b as T}from"./index-BOKpx1zD.js";import{P as D}from"./components-BkQ2EWK-.js";import{D as E,M as F,F as O,A as I,q as R}from"./chatSessions-C-yr7eOL.js";import{t as q,d as _}from"./transform-DLPfRTia.js";import{u as $}from"./usePapers-B51Q6z7s.js";import{u as K}from"./useIntersectionObserver-DVOSMcnN.js";import{P as B}from"./usePeriodFilter-CfD2sXw8.js";import{S as l}from"./skeleton-C5u4dxsY.js";import{A as H,a as U}from"./alert-De0V5ndO.js";import{u as k}from"./useQuery-Cj0zK8BW.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-B9BAVqQL.js";const W=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],z={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},Q={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},V=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",X=t=>t==="today"||t==="week"||t==="month"||t==="all_time"?t:"all_time",G=()=>{const t=C(),[n,d]=o.useState(""),[c,x]=o.useState(E),m=o.useRef(null);o.useEffect(()=>{const i=m.current;i&&(i.style.height="auto",i.style.height=`${Math.min(i.scrollHeight,160)}px`)},[n]);const h=()=>{const i=n.trim();i&&(R(i,c),t("/chat"))};return e.jsxs("div",{className:"ask-home",children:[e.jsx("textarea",{ref:m,rows:1,value:n,placeholder:"Ask the assistant about papers, tasks, methods, or benchmarks…",onChange:i=>d(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),h())}}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(F,{models:O,selectedModel:c,onModelChange:x}),e.jsxs("span",{className:"ask-home-hint",children:["Via 🤗"," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:h,disabled:!n.trim(),"aria-label":"Ask the assistant",children:e.jsx(I,{})})]})]})},de=()=>{var j,N,y,b,v;const[t,n]=M(),d=V(t.get("order_by")),c=X(t.get("time")),x=Q[c],m=s=>{const a=new URLSearchParams(t);a.set("order_by",s),n(a)},h=s=>{const a=new URLSearchParams(t);a.set("time",z[s]),n(a)},i=k({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),p=k({queryKey:["trending-tasks-sidebar"],queryFn:()=>T.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),r=$({page_size:30,order_by:d,order_dir:"desc",time:c,include_resources:!0}),g=o.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages.flatMap(L=>L.results))||[]).map(q)},[r.data]),{targetRef:P,isIntersecting:f}=K({rootMargin:"400px"});o.useEffect(()=>{f&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[f,r.hasNextPage,r.isFetchingNextPage]);const w=r.isLoading,A=r.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),i.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),(j=i.data)==null?void 0:j.map(s=>e.jsxs(u,{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(u,{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"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),((y=(N=p.data)==null?void 0:N.results)==null?void 0:y.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(v=(b=p.data)==null?void 0:b.results)==null?void 0:v.map(s=>e.jsxs(u,{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:[S()&&e.jsx(G,{}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:W.map(([s,a])=>e.jsx("button",{className:`sort-btn ${d===s?"active":""}`,onClick:()=>m(s),children:a},s))}),e.jsx("div",{className:"sort-options sort-options-time",children:B.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${x===s?"active":""}`,onClick:()=>h(s),children:s},s))})]}),A&&e.jsx(H,{variant:"destructive",className:"mb-4",children:e.jsx(U,{children:"Failed to load papers. Please try again."})}),w?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(l,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(l,{className:"h-6 w-3/4"}),e.jsx(l,{className:"h-4 w-1/2"}),e.jsx(l,{className:"h-12 w-full"})]})]},a))}):g.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:g.map((s,a)=>e.jsx(D,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:P,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{de as default}; +import{u as M,r as o,j as e,L as u,i as S,a as C,b as T}from"./index-CSNOTM3s.js";import{P as D}from"./components-PxXQJAWo.js";import{D as E,M as F,F as O,A as I,q as R}from"./chatSessions-Dmenu8US.js";import{t as q,d as _}from"./transform-BGwKHn4w.js";import{u as $}from"./usePapers-CFugWskp.js";import{u as K}from"./useIntersectionObserver-CUA0CMpl.js";import{P as B}from"./usePeriodFilter-CWtHCaJm.js";import{S as l}from"./skeleton-DIecj65I.js";import{A as H,a as U}from"./alert-DuO9Nm7q.js";import{u as k}from"./useQuery-DCf2mroJ.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-_jD1bF9N.js";const W=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],z={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},Q={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},V=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",X=t=>t==="today"||t==="week"||t==="month"||t==="all_time"?t:"all_time",G=()=>{const t=C(),[n,d]=o.useState(""),[c,x]=o.useState(E),m=o.useRef(null);o.useEffect(()=>{const i=m.current;i&&(i.style.height="auto",i.style.height=`${Math.min(i.scrollHeight,160)}px`)},[n]);const h=()=>{const i=n.trim();i&&(R(i,c),t("/chat"))};return e.jsxs("div",{className:"ask-home",children:[e.jsx("textarea",{ref:m,rows:1,value:n,placeholder:"Ask the assistant about papers, tasks, methods, or benchmarks…",onChange:i=>d(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),h())}}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(F,{models:O,selectedModel:c,onModelChange:x}),e.jsxs("span",{className:"ask-home-hint",children:["Via 🤗"," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:h,disabled:!n.trim(),"aria-label":"Ask the assistant",children:e.jsx(I,{})})]})]})},de=()=>{var j,N,y,b,v;const[t,n]=M(),d=V(t.get("order_by")),c=X(t.get("time")),x=Q[c],m=s=>{const a=new URLSearchParams(t);a.set("order_by",s),n(a)},h=s=>{const a=new URLSearchParams(t);a.set("time",z[s]),n(a)},i=k({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),p=k({queryKey:["trending-tasks-sidebar"],queryFn:()=>T.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),r=$({page_size:30,order_by:d,order_dir:"desc",time:c,include_resources:!0}),g=o.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages.flatMap(L=>L.results))||[]).map(q)},[r.data]),{targetRef:P,isIntersecting:f}=K({rootMargin:"400px"});o.useEffect(()=>{f&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[f,r.hasNextPage,r.isFetchingNextPage]);const w=r.isLoading,A=r.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),i.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),(j=i.data)==null?void 0:j.map(s=>e.jsxs(u,{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(u,{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"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),((y=(N=p.data)==null?void 0:N.results)==null?void 0:y.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(v=(b=p.data)==null?void 0:b.results)==null?void 0:v.map(s=>e.jsxs(u,{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:[S()&&e.jsx(G,{}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:W.map(([s,a])=>e.jsx("button",{className:`sort-btn ${d===s?"active":""}`,onClick:()=>m(s),children:a},s))}),e.jsx("div",{className:"sort-options sort-options-time",children:B.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${x===s?"active":""}`,onClick:()=>h(s),children:s},s))})]}),A&&e.jsx(H,{variant:"destructive",className:"mb-4",children:e.jsx(U,{children:"Failed to load papers. Please try again."})}),w?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(l,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(l,{className:"h-6 w-3/4"}),e.jsx(l,{className:"h-4 w-1/2"}),e.jsx(l,{className:"h-12 w-full"})]})]},a))}):g.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:g.map((s,a)=>e.jsx(D,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:P,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{de as default}; diff --git a/assets/FrameworksIndexView-E16SQ_m7.js b/assets/FrameworksIndexView-BohW9nNa.js similarity index 98% rename from assets/FrameworksIndexView-E16SQ_m7.js rename to assets/FrameworksIndexView-BohW9nNa.js index ad03398d76801ec8235b9bb777e42ea17050883c..93058eda7c499c4ea311958bd794cbb02f9c7a40 100644 --- a/assets/FrameworksIndexView-E16SQ_m7.js +++ b/assets/FrameworksIndexView-BohW9nNa.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-BOKpx1zD.js";import{I as l}from"./components-BkQ2EWK-.js";import{e as c,h as g}from"./transform-DLPfRTia.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";const d={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},s=[{id:"llm",name:"Large Language Models",blurb:"Frameworks for running, serving, fine-tuning, and post-training LLMs — from local CPU inference to large-scale GPU serving and RL.",categories:[{id:"inference",name:"Inference & Serving",blurb:"Pick your inference engine based on hardware: GPU servers for throughput, CPU or Apple silicon for local/offline use.",guideUrl:"https://x.com/TheAhmadOsman/status/2057183854444843202",guideLabel:"2026 inference engine guide",frameworks:[{slug:"vllm",name:"vLLM",org:"vLLM Project",description:"High-throughput LLM serving with PagedAttention and continuous batching.",whenToUse:"Best when you have NVIDIA GPU compute and need production-grade throughput.",platforms:["gpu"],github:"https://github.com/vllm-project/vllm",url:"https://docs.vllm.ai/",paperId:"2309.06180"},{slug:"sglang",name:"SGLang",org:"SGLang Project",description:"Fast structured generation and multi-model serving for LLMs and VLMs.",whenToUse:"Strong choice for GPU clusters, agentic workloads, and structured outputs.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://sgl-project.github.io/",paperId:"2312.07104"},{slug:"llama-cpp",name:"llama.cpp",org:"ggml-org",description:"Portable C/C++ inference for LLMs with broad quantization support.",whenToUse:"Run models locally on CPU or Apple silicon without a GPU.",platforms:["cpu","apple"],github:"https://github.com/ggml-org/llama.cpp"},{slug:"mlx-lm",name:"MLX-LM",org:"Apple MLX",description:"Run and fine-tune LLMs on Apple silicon using the MLX array framework.",whenToUse:"Native Mac inference and lightweight fine-tuning on M-series chips.",platforms:["apple"],github:"https://github.com/ml-explore/mlx-lm",url:"https://ml-explore.github.io/mlx/build/html/index.html"},{slug:"mlx-vlm",name:"MLX-VLM",org:"Blaizzy",description:"Inference and fine-tuning for vision-language models on Mac via MLX.",whenToUse:"Multimodal models (image + text) on Apple silicon.",platforms:["apple"],github:"https://github.com/Blaizzy/mlx-vlm"},{slug:"ollama",name:"Ollama",org:"Ollama",description:"Easy local model pulling, quantization, and chat API for developers.",whenToUse:"Quick local prototyping — abstracts away model download and runtime setup.",platforms:["cpu","apple","gpu"],github:"https://github.com/ollama/ollama",url:"https://ollama.com/"}]},{id:"training",name:"Training & Fine-tuning",blurb:"Libraries for supervised fine-tuning (SFT), preference optimization (RLHF), and reinforcement learning from verifiable rewards (RLVR).",frameworks:[{slug:"trl",name:"TRL",org:"Hugging Face",description:"Transformer Reinforcement Learning — SFT, DPO, PPO, GRPO, and reward modeling.",whenToUse:"The standard Hugging Face stack for both SFT and RL-style post-training.",platforms:["gpu"],github:"https://github.com/huggingface/trl",url:"https://huggingface.co/docs/trl/"},{slug:"unsloth",name:"Unsloth",org:"Unsloth AI",description:"Memory-efficient, fast fine-tuning and RL for LLMs with optimized kernels.",whenToUse:"Fast iteration on SFT and RL when VRAM or training speed is the bottleneck.",platforms:["gpu"],github:"https://github.com/unslothai/unsloth",url:"https://docs.unsloth.ai/"},{slug:"prime-rl",name:"prime-rl",org:"Prime Intellect",description:"Agentic RL training at scale with distributed rollout and training loops.",whenToUse:"Large-scale RL for agents and tool-use when you need custom distributed training.",platforms:["gpu"],github:"https://github.com/PrimeIntellect-ai/prime-rl"},{slug:"verl",name:"verl",org:"HybridFlow",description:"Flexible RL post-training framework (HybridFlow) for LLM alignment at scale.",whenToUse:"Production RL post-training pipelines — PPO, GRPO, and custom reward functions.",platforms:["gpu"],github:"https://github.com/verl-project/verl",url:"https://verl.readthedocs.io/",paperId:"2409.19256"}]}]},{id:"image-video-generation",name:"Image and video generation",blurb:"Frameworks for building, running, and accelerating image and video generation workflows.",categories:[{id:"generation-inference",name:"Generation & Inference",blurb:"Libraries, interfaces, and inference engines for diffusion and diffusion-transformer models.",frameworks:[{slug:"diffusers",name:"Diffusers",org:"Hugging Face",description:"A modular PyTorch library for pretrained diffusion models across image, video, and audio generation.",whenToUse:"Build or train customizable generation pipelines with a broad model ecosystem.",platforms:["gpu"],github:"https://github.com/huggingface/diffusers",url:"https://huggingface.co/docs/diffusers/"},{slug:"comfyui",name:"ComfyUI",org:"Comfy Org",description:"A node-based interface, API, and backend for composing diffusion generation workflows.",whenToUse:"Design and share visual generation pipelines without wiring every step in code.",platforms:["gpu"],github:"https://github.com/comfy-org/comfyui"},{slug:"sglang-diffusion",name:"SGLang Diffusion",org:"SGLang Project",description:"A high-performance serving framework for image and video generation models.",whenToUse:"Serve diffusion models with production-oriented throughput and distributed execution.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://docs.sglang.io/docs/sglang-diffusion/index"},{slug:"cache-dit",name:"Cache-DiT",org:"Vipshop",description:"A PyTorch-native inference engine with caching, parallelism, quantization, and CPU offload for DiTs.",whenToUse:"Speed up diffusion-transformer inference with composable acceleration techniques.",platforms:["gpu"],github:"https://github.com/vipshop/cache-dit"},{slug:"fastvideo",name:"FastVideo",org:"Hao AI Lab",description:"A unified inference and post-training framework for accelerated video generation.",whenToUse:"Train, fine-tune, or serve video generation models in one optimized framework.",platforms:["gpu"],github:"https://github.com/hao-ai-lab/FastVideo"},{slug:"xdit",name:"xDiT",org:"xDiT Project",description:"A scalable inference engine for diffusion transformers using multiple parallelism strategies.",whenToUse:"Scale large image and video diffusion transformers across multiple GPUs.",platforms:["gpu"],github:"https://github.com/xdit-project/xDiT"}]}]}],m={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},u={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},p={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},h={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},f=({platform:i})=>{const r=c(g(i));return e.jsx("span",{className:"framework-platform-chip",style:{background:r.bg,color:r.text},children:d[i]})},b=({framework:i})=>e.jsxs("article",{className:"framework-card",children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:i.name}),i.org&&e.jsx("div",{className:"framework-card-org",children:i.org})]}),i.platforms&&i.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:i.platforms.map(r=>e.jsx(f,{platform:r},r))})]}),e.jsx("p",{className:"framework-card-desc",children:i.description}),i.whenToUse&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),i.whenToUse]}),(i.github||i.url||i.paperId)&&e.jsxs("div",{className:"framework-card-links",children:[i.paperId&&e.jsx(t,{to:`/paper/${i.paperId}`,className:"framework-link",children:"Paper"}),i.github&&e.jsxs("a",{href:i.github,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(l,{name:"github",size:13}),"GitHub"]}),i.url&&i.url!==i.github&&e.jsx("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),k=()=>{const i=s.reduce((r,n)=>r+n.categories.reduce((o,a)=>o+a.frameworks.length,0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.map(r=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:m,children:[e.jsxs("div",{children:[e.jsx("h2",{style:u,children:r.name}),e.jsx("div",{style:p,children:r.blurb})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.categories.length," ",r.categories.length===1?"category":"categories"," ·"," ",r.categories.reduce((n,o)=>n+o.frameworks.length,0)," frameworks"]})]}),r.categories.map(n=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:h,children:n.name}),n.blurb&&e.jsx("p",{className:"framework-category-blurb",children:n.blurb}),n.guideUrl&&e.jsxs("a",{href:n.guideUrl,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[n.guideLabel??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[n.frameworks.length," ",n.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:n.frameworks.map(o=>e.jsx(b,{framework:o},o.slug))})]},n.id))]},r.id)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[i," frameworks across ",s.length," ",s.length===1?"domain":"domains",". More areas coming soon."]})]})};export{k as default}; +import{j as e,L as t}from"./index-CSNOTM3s.js";import{I as l}from"./components-PxXQJAWo.js";import{e as c,h as g}from"./transform-BGwKHn4w.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";const d={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},s=[{id:"llm",name:"Large Language Models",blurb:"Frameworks for running, serving, fine-tuning, and post-training LLMs — from local CPU inference to large-scale GPU serving and RL.",categories:[{id:"inference",name:"Inference & Serving",blurb:"Pick your inference engine based on hardware: GPU servers for throughput, CPU or Apple silicon for local/offline use.",guideUrl:"https://x.com/TheAhmadOsman/status/2057183854444843202",guideLabel:"2026 inference engine guide",frameworks:[{slug:"vllm",name:"vLLM",org:"vLLM Project",description:"High-throughput LLM serving with PagedAttention and continuous batching.",whenToUse:"Best when you have NVIDIA GPU compute and need production-grade throughput.",platforms:["gpu"],github:"https://github.com/vllm-project/vllm",url:"https://docs.vllm.ai/",paperId:"2309.06180"},{slug:"sglang",name:"SGLang",org:"SGLang Project",description:"Fast structured generation and multi-model serving for LLMs and VLMs.",whenToUse:"Strong choice for GPU clusters, agentic workloads, and structured outputs.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://sgl-project.github.io/",paperId:"2312.07104"},{slug:"llama-cpp",name:"llama.cpp",org:"ggml-org",description:"Portable C/C++ inference for LLMs with broad quantization support.",whenToUse:"Run models locally on CPU or Apple silicon without a GPU.",platforms:["cpu","apple"],github:"https://github.com/ggml-org/llama.cpp"},{slug:"mlx-lm",name:"MLX-LM",org:"Apple MLX",description:"Run and fine-tune LLMs on Apple silicon using the MLX array framework.",whenToUse:"Native Mac inference and lightweight fine-tuning on M-series chips.",platforms:["apple"],github:"https://github.com/ml-explore/mlx-lm",url:"https://ml-explore.github.io/mlx/build/html/index.html"},{slug:"mlx-vlm",name:"MLX-VLM",org:"Blaizzy",description:"Inference and fine-tuning for vision-language models on Mac via MLX.",whenToUse:"Multimodal models (image + text) on Apple silicon.",platforms:["apple"],github:"https://github.com/Blaizzy/mlx-vlm"},{slug:"ollama",name:"Ollama",org:"Ollama",description:"Easy local model pulling, quantization, and chat API for developers.",whenToUse:"Quick local prototyping — abstracts away model download and runtime setup.",platforms:["cpu","apple","gpu"],github:"https://github.com/ollama/ollama",url:"https://ollama.com/"}]},{id:"training",name:"Training & Fine-tuning",blurb:"Libraries for supervised fine-tuning (SFT), preference optimization (RLHF), and reinforcement learning from verifiable rewards (RLVR).",frameworks:[{slug:"trl",name:"TRL",org:"Hugging Face",description:"Transformer Reinforcement Learning — SFT, DPO, PPO, GRPO, and reward modeling.",whenToUse:"The standard Hugging Face stack for both SFT and RL-style post-training.",platforms:["gpu"],github:"https://github.com/huggingface/trl",url:"https://huggingface.co/docs/trl/"},{slug:"unsloth",name:"Unsloth",org:"Unsloth AI",description:"Memory-efficient, fast fine-tuning and RL for LLMs with optimized kernels.",whenToUse:"Fast iteration on SFT and RL when VRAM or training speed is the bottleneck.",platforms:["gpu"],github:"https://github.com/unslothai/unsloth",url:"https://docs.unsloth.ai/"},{slug:"prime-rl",name:"prime-rl",org:"Prime Intellect",description:"Agentic RL training at scale with distributed rollout and training loops.",whenToUse:"Large-scale RL for agents and tool-use when you need custom distributed training.",platforms:["gpu"],github:"https://github.com/PrimeIntellect-ai/prime-rl"},{slug:"verl",name:"verl",org:"HybridFlow",description:"Flexible RL post-training framework (HybridFlow) for LLM alignment at scale.",whenToUse:"Production RL post-training pipelines — PPO, GRPO, and custom reward functions.",platforms:["gpu"],github:"https://github.com/verl-project/verl",url:"https://verl.readthedocs.io/",paperId:"2409.19256"}]}]},{id:"image-video-generation",name:"Image and video generation",blurb:"Frameworks for building, running, and accelerating image and video generation workflows.",categories:[{id:"generation-inference",name:"Generation & Inference",blurb:"Libraries, interfaces, and inference engines for diffusion and diffusion-transformer models.",frameworks:[{slug:"diffusers",name:"Diffusers",org:"Hugging Face",description:"A modular PyTorch library for pretrained diffusion models across image, video, and audio generation.",whenToUse:"Build or train customizable generation pipelines with a broad model ecosystem.",platforms:["gpu"],github:"https://github.com/huggingface/diffusers",url:"https://huggingface.co/docs/diffusers/"},{slug:"comfyui",name:"ComfyUI",org:"Comfy Org",description:"A node-based interface, API, and backend for composing diffusion generation workflows.",whenToUse:"Design and share visual generation pipelines without wiring every step in code.",platforms:["gpu"],github:"https://github.com/comfy-org/comfyui"},{slug:"sglang-diffusion",name:"SGLang Diffusion",org:"SGLang Project",description:"A high-performance serving framework for image and video generation models.",whenToUse:"Serve diffusion models with production-oriented throughput and distributed execution.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://docs.sglang.io/docs/sglang-diffusion/index"},{slug:"cache-dit",name:"Cache-DiT",org:"Vipshop",description:"A PyTorch-native inference engine with caching, parallelism, quantization, and CPU offload for DiTs.",whenToUse:"Speed up diffusion-transformer inference with composable acceleration techniques.",platforms:["gpu"],github:"https://github.com/vipshop/cache-dit"},{slug:"fastvideo",name:"FastVideo",org:"Hao AI Lab",description:"A unified inference and post-training framework for accelerated video generation.",whenToUse:"Train, fine-tune, or serve video generation models in one optimized framework.",platforms:["gpu"],github:"https://github.com/hao-ai-lab/FastVideo"},{slug:"xdit",name:"xDiT",org:"xDiT Project",description:"A scalable inference engine for diffusion transformers using multiple parallelism strategies.",whenToUse:"Scale large image and video diffusion transformers across multiple GPUs.",platforms:["gpu"],github:"https://github.com/xdit-project/xDiT"}]}]}],m={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},u={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},p={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},h={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},f=({platform:i})=>{const r=c(g(i));return e.jsx("span",{className:"framework-platform-chip",style:{background:r.bg,color:r.text},children:d[i]})},b=({framework:i})=>e.jsxs("article",{className:"framework-card",children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:i.name}),i.org&&e.jsx("div",{className:"framework-card-org",children:i.org})]}),i.platforms&&i.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:i.platforms.map(r=>e.jsx(f,{platform:r},r))})]}),e.jsx("p",{className:"framework-card-desc",children:i.description}),i.whenToUse&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),i.whenToUse]}),(i.github||i.url||i.paperId)&&e.jsxs("div",{className:"framework-card-links",children:[i.paperId&&e.jsx(t,{to:`/paper/${i.paperId}`,className:"framework-link",children:"Paper"}),i.github&&e.jsxs("a",{href:i.github,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(l,{name:"github",size:13}),"GitHub"]}),i.url&&i.url!==i.github&&e.jsx("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),k=()=>{const i=s.reduce((r,n)=>r+n.categories.reduce((o,a)=>o+a.frameworks.length,0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.map(r=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:m,children:[e.jsxs("div",{children:[e.jsx("h2",{style:u,children:r.name}),e.jsx("div",{style:p,children:r.blurb})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.categories.length," ",r.categories.length===1?"category":"categories"," ·"," ",r.categories.reduce((n,o)=>n+o.frameworks.length,0)," frameworks"]})]}),r.categories.map(n=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:h,children:n.name}),n.blurb&&e.jsx("p",{className:"framework-category-blurb",children:n.blurb}),n.guideUrl&&e.jsxs("a",{href:n.guideUrl,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[n.guideLabel??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[n.frameworks.length," ",n.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:n.frameworks.map(o=>e.jsx(b,{framework:o},o.slug))})]},n.id))]},r.id)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[i," frameworks across ",s.length," ",s.length===1?"domain":"domains",". More areas coming soon."]})]})};export{k as default}; diff --git a/assets/LatexTitle-B4ZTuCxc.js b/assets/LatexTitle-D0X1MVE6.js similarity index 98% rename from assets/LatexTitle-B4ZTuCxc.js rename to assets/LatexTitle-D0X1MVE6.js index 51796ba5e745913b9d8c71a63594a5458fb85680..8ef1add1cb7f12bf6fe2d15a48764813ec1815be 100644 --- a/assets/LatexTitle-B4ZTuCxc.js +++ b/assets/LatexTitle-D0X1MVE6.js @@ -1 +1 @@ -import{j as o,r as g}from"./index-BOKpx1zD.js";import{k as T}from"./katex.min-BSBacQyE.js";const j=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),C={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},M={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},_={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},b={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":C,"`":M,"^":_,'"':b,"~":{n:"ñ",N:"Ñ"}},E={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(e,s){var n;return((n=O[e])==null?void 0:n[s])??null}function N(e){const s=[];let n=0,i="";const l=()=>{i&&(s.push({type:"text",content:i}),i="")};for(;n=e.length)return{name:"",end:n};if(!/[a-zA-Z]/.test(e[n]))return{name:e[n],end:n+1};const i=n;for(;n=e.length)return null;if(e[s+1]==="{"){const i=d(e,s+1);return i?{end:i.end}:null}return/[A-Za-z0-9+\-=.]/.test(e[s+1])?{end:s+2}:null}function y(e,s){let n=s;if(e[n]==="\\"){const{name:t,end:a}=$(e,n);if(!t)return null;if(n=a,e[n]==="{"){const f=d(e,n);f&&(n=f.end)}}else if(/[A-Za-z0-9]/.test(e[n])){let t=n+1;for(;t`${s}-${l++}`,a=(f,u)=>f==="strong"?o.jsx("strong",{children:u},t()):o.jsx("em",{children:u},t());for(;ii&&n.push(e.slice(i,u)),i=u}return n}function A({latex:e,display:s}){const n=g.useMemo(()=>{try{return T.renderToString(e.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[e,s]);return n?o.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:n}}):o.jsx(o.Fragment,{children:s?`$$${e}$$`:`$${e}$`})}function k(e){const s=N(e),n=[];return s.forEach((i,l)=>{const t=`latex-${l}`;if(i.type==="text"){const a=p(i.content,t);a.length===1?n.push(a[0]):a.length>1&&n.push(o.jsx(g.Fragment,{children:a},t));return}if(i.type==="display"){n.push(o.jsx(A,{latex:i.content,display:!0},t));return}n.push(o.jsx(A,{latex:i.content,display:!1},t))}),n.length===1?n[0]:o.jsx(o.Fragment,{children:n})}const U=({text:e,className:s=""})=>{const n=g.useMemo(()=>k(e),[e]);return o.jsx("span",{className:s,children:n})},X=({title:e,className:s=""})=>o.jsx(U,{text:e,className:s});export{X as L,U as a}; +import{j as o,r as g}from"./index-CSNOTM3s.js";import{k as T}from"./katex.min-BSBacQyE.js";const j=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),C={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},M={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},_={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},b={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":C,"`":M,"^":_,'"':b,"~":{n:"ñ",N:"Ñ"}},E={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(e,s){var n;return((n=O[e])==null?void 0:n[s])??null}function N(e){const s=[];let n=0,i="";const l=()=>{i&&(s.push({type:"text",content:i}),i="")};for(;n=e.length)return{name:"",end:n};if(!/[a-zA-Z]/.test(e[n]))return{name:e[n],end:n+1};const i=n;for(;n=e.length)return null;if(e[s+1]==="{"){const i=d(e,s+1);return i?{end:i.end}:null}return/[A-Za-z0-9+\-=.]/.test(e[s+1])?{end:s+2}:null}function y(e,s){let n=s;if(e[n]==="\\"){const{name:t,end:a}=$(e,n);if(!t)return null;if(n=a,e[n]==="{"){const f=d(e,n);f&&(n=f.end)}}else if(/[A-Za-z0-9]/.test(e[n])){let t=n+1;for(;t`${s}-${l++}`,a=(f,u)=>f==="strong"?o.jsx("strong",{children:u},t()):o.jsx("em",{children:u},t());for(;ii&&n.push(e.slice(i,u)),i=u}return n}function A({latex:e,display:s}){const n=g.useMemo(()=>{try{return T.renderToString(e.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[e,s]);return n?o.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:n}}):o.jsx(o.Fragment,{children:s?`$$${e}$$`:`$${e}$`})}function k(e){const s=N(e),n=[];return s.forEach((i,l)=>{const t=`latex-${l}`;if(i.type==="text"){const a=p(i.content,t);a.length===1?n.push(a[0]):a.length>1&&n.push(o.jsx(g.Fragment,{children:a},t));return}if(i.type==="display"){n.push(o.jsx(A,{latex:i.content,display:!0},t));return}n.push(o.jsx(A,{latex:i.content,display:!1},t))}),n.length===1?n[0]:o.jsx(o.Fragment,{children:n})}const U=({text:e,className:s=""})=>{const n=g.useMemo(()=>k(e),[e]);return o.jsx("span",{className:s,children:n})},X=({title:e,className:s=""})=>o.jsx(U,{text:e,className:s});export{X as L,U as a}; diff --git a/assets/MarkdownText-CFWVPyKn.js b/assets/MarkdownText-DJVhHGem.js similarity index 84% rename from assets/MarkdownText-CFWVPyKn.js rename to assets/MarkdownText-DJVhHGem.js index 5053f42bd4b3636e69c0d54a3ecf3e84bde4e21e..75e362f1739d9e2b5f67804a530c0634ae67d031 100644 --- a/assets/MarkdownText-CFWVPyKn.js +++ b/assets/MarkdownText-DJVhHGem.js @@ -1 +1 @@ -import{_ as l,j as s,L as u}from"./index-BOKpx1zD.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-Bbvo9u5G.js";import{M as d,r as w}from"./index-B-skc6rz.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M}; +import{_ as l,j as s,L as u}from"./index-CSNOTM3s.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-AqikhUz3.js";import{M as d,r as w}from"./index-CVIt_dyy.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M}; diff --git a/assets/MethodDetailView-juvY71ct.js b/assets/MethodDetailView-ClFfXzVB.js similarity index 95% rename from assets/MethodDetailView-juvY71ct.js rename to assets/MethodDetailView-ClFfXzVB.js index 5900436f2885a58eb6f9bef0576b92309d3a21c2..51cc500a8a74d6e8f696ffeeb7ff453be921d93b 100644 --- a/assets/MethodDetailView-juvY71ct.js +++ b/assets/MethodDetailView-ClFfXzVB.js @@ -1 +1 @@ -import{j as e,d as E,r as y,L as M,b as g,ae as D}from"./index-BOKpx1zD.js";import{u as F}from"./useQuery-Cj0zK8BW.js";import{u as B}from"./useInfiniteQuery-B9BAVqQL.js";import{M as L,P as C}from"./components-BkQ2EWK-.js";import{M as b}from"./MarkdownText-CFWVPyKn.js";import{t as P}from"./transform-DLPfRTia.js";import{u as T}from"./useIntersectionObserver-DVOSMcnN.js";import{S as u}from"./skeleton-C5u4dxsY.js";import{A as $,a as I}from"./alert-De0V5ndO.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bbvo9u5G.js";import"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),R=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:R,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},ce=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx($,{variant:"destructive",children:e.jsx(I,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${n.slug==="grokking"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ce as default}; +import{j as e,d as E,r as y,L as M,b as g,ae as D}from"./index-CSNOTM3s.js";import{u as F}from"./useQuery-DCf2mroJ.js";import{u as B}from"./useInfiniteQuery-_jD1bF9N.js";import{M as L,P as C}from"./components-PxXQJAWo.js";import{M as b}from"./MarkdownText-DJVhHGem.js";import{t as P}from"./transform-BGwKHn4w.js";import{u as T}from"./useIntersectionObserver-CUA0CMpl.js";import{S as u}from"./skeleton-DIecj65I.js";import{A as $,a as I}from"./alert-DuO9Nm7q.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-AqikhUz3.js";import"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),R=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:R,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},ce=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx($,{variant:"destructive",children:e.jsx(I,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${n.slug==="grokking"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ce as default}; diff --git a/assets/MethodsIndexView-C8nwWxKb.js b/assets/MethodsIndexView-DrXSSTgg.js similarity index 85% rename from assets/MethodsIndexView-C8nwWxKb.js rename to assets/MethodsIndexView-DrXSSTgg.js index 3ba7befc3d90606bccbf46ec149894f848a761c7..f88c3c4d33115e55807225fcd51a142269fb9a16 100644 --- a/assets/MethodsIndexView-C8nwWxKb.js +++ b/assets/MethodsIndexView-DrXSSTgg.js @@ -1 +1 @@ -import{r as u,j as e,L as x,b as c}from"./index-BOKpx1zD.js";import{u as m}from"./useQuery-Cj0zK8BW.js";import{S as h}from"./skeleton-C5u4dxsY.js";import{A as g,a as j}from"./alert-De0V5ndO.js";import{T as f}from"./TaxonomySuggestionTile-BZeB9d42.js";import"./SignInToEditDialog-DcJcnDsG.js";import"./button-COASHtHZ.js";import"./textarea-BKXasfzv.js";import"./dialog-Ba_4mPeV.js";import"./useMutation-1Slfgn9F.js";import"./loader-circle-kP6qHte6.js";const z=()=>{var l,d;const i=m({queryKey:["areas-all"],queryFn:()=>c.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=m({queryKey:["methods-all"],queryFn:async()=>(await c.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),o=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(t=>{const r=t.area_id??"_unassigned";(a[r]||(a[r]=[])).push(t)}),Object.values(a).forEach(t=>t.sort((r,s)=>(s.paper_count||0)-(r.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,t)=>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:8}).map((r,s)=>e.jsx(h,{className:"h-20"},s))})]},t))}):(d=(l=i.data)==null?void 0:l.results)==null?void 0:d.map(a=>{const t=(o==null?void 0:o[a.id])||[];if(t.length===0)return null;const r=t.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:[t.length," methods · ",r.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.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)),e.jsx(f,{kind:"method"})]})]},a.id)})]})};export{z as default}; +import{r as u,j as e,L as x,b as c}from"./index-CSNOTM3s.js";import{u as m}from"./useQuery-DCf2mroJ.js";import{S as h}from"./skeleton-DIecj65I.js";import{A as g,a as j}from"./alert-DuO9Nm7q.js";import{T as f}from"./TaxonomySuggestionTile-NN3nK-Nj.js";import"./SignInToEditDialog-qIIvqqtG.js";import"./button-KGqIZs29.js";import"./textarea-BajbF2-p.js";import"./dialog-CQwQlPi_.js";import"./useMutation-D90cYkan.js";import"./loader-circle-BCRahFjZ.js";const z=()=>{var l,d;const i=m({queryKey:["areas-all"],queryFn:()=>c.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=m({queryKey:["methods-all"],queryFn:async()=>(await c.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),o=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(t=>{const r=t.area_id??"_unassigned";(a[r]||(a[r]=[])).push(t)}),Object.values(a).forEach(t=>t.sort((r,s)=>(s.paper_count||0)-(r.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,t)=>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:8}).map((r,s)=>e.jsx(h,{className:"h-20"},s))})]},t))}):(d=(l=i.data)==null?void 0:l.results)==null?void 0:d.map(a=>{const t=(o==null?void 0:o[a.id])||[];if(t.length===0)return null;const r=t.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:[t.length," methods · ",r.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.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)),e.jsx(f,{kind:"method"})]})]},a.id)})]})};export{z as default}; diff --git a/assets/NotFound-D2bAWljO.js b/assets/NotFound-BOZqMg2G.js similarity index 89% rename from assets/NotFound-D2bAWljO.js rename to assets/NotFound-BOZqMg2G.js index ac2dd4407611d84d19a546fe2a797a29af0f53fc..56189d199ca5c8fc5aaf89654fd86dbf4219f1ab 100644 --- a/assets/NotFound-D2bAWljO.js +++ b/assets/NotFound-BOZqMg2G.js @@ -1 +1 @@ -import{aH as o,r as a,j as t,L as s}from"./index-BOKpx1zD.js";const r=()=>{const e=o();return a.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(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; +import{aH as o,r as a,j as t,L as s}from"./index-CSNOTM3s.js";const r=()=>{const e=o();return a.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(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; diff --git a/assets/OrganizationDetailView-C6v-f05b.js b/assets/OrganizationDetailView-B9UCvr8P.js similarity index 90% rename from assets/OrganizationDetailView-C6v-f05b.js rename to assets/OrganizationDetailView-B9UCvr8P.js index 2e589f30cd3d3f7344c7f92ce3e200bb868b27f6..b593417ed97efc73810f0ee4c041043999cd3ea2 100644 --- a/assets/OrganizationDetailView-C6v-f05b.js +++ b/assets/OrganizationDetailView-B9UCvr8P.js @@ -1 +1 @@ -import{d as j,r as y,j as e,L as f,b as v}from"./index-BOKpx1zD.js";import{u as b}from"./useQuery-Cj0zK8BW.js";import{M as k}from"./MarkdownText-CFWVPyKn.js";import{e as N,h as S,d as _}from"./transform-DLPfRTia.js";import{S as p}from"./skeleton-C5u4dxsY.js";import{A as w,a as F}from"./alert-De0V5ndO.js";import A from"./NotFound-D2bAWljO.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bbvo9u5G.js";import"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";const B=i=>(i==null?void 0:i.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",M=()=>{var g,x;const{orgSlug:i}=j(),n=b({queryKey:["organization-areas-with-tasks",i],queryFn:()=>v.getOrganizationAreasWithTasks(i),enabled:!!i,staleTime:10*60*1e3}),m=y.useMemo(()=>{if(!n.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>t[B(o)]??999;return[...n.data.results].sort((o,a)=>{const l=r(o.name),d=r(a.name);return l!==d?l-d:o.name.localeCompare(a.name)})},[n.data]),s=(g=n.data)==null?void 0:g.organization,c=((x=n.data)==null?void 0:x.total_paper_count)??0,h=m.reduce((t,r)=>t+r.tasks.length,0);if(n.error)return n.error.status===404?e.jsx(A,{}):e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load organization. Please try again."})})});const u=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title",style:{display:"flex",alignItems:"center",gap:12},children:[(s==null?void 0:s.logo_url)&&e.jsx("img",{src:s.logo_url,alt:"",style:{height:"0.9em",width:"auto",borderRadius:4,objectFit:"contain"},onError:t=>{t.currentTarget.style.display="none"}}),u??e.jsx(p,{className:"h-10 w-64 inline-block"})]}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("span",{children:[c.toLocaleString()," papers"]}),(s==null?void 0:s.website_url)&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.website_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.github_url)&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.github_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(k,{className:"method-description",text:s.description})]}),!n.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,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:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All papers attributed to this organization."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:e.jsxs(f,{to:`/${i}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]})})]}),n.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(p,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>e.jsx(p,{className:"h-24"},a))})]},r))}):m.map(t=>{const r=t.tasks;if(r.length===0)return null;const o=r.reduce((a,l)=>a+(l.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"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(a=>{const l=a.slug||"",d=N(S(l));return e.jsxs(f,{to:`/${i}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),_(a.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)})})]},t.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",m.filter(t=>t.tasks.length>0).length," areas."]})]})};export{M as default}; +import{d as j,r as y,j as e,L as f,b as v}from"./index-CSNOTM3s.js";import{u as b}from"./useQuery-DCf2mroJ.js";import{M as k}from"./MarkdownText-DJVhHGem.js";import{e as N,h as S,d as _}from"./transform-BGwKHn4w.js";import{S as p}from"./skeleton-DIecj65I.js";import{A as w,a as F}from"./alert-DuO9Nm7q.js";import A from"./NotFound-BOZqMg2G.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-AqikhUz3.js";import"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";const B=i=>(i==null?void 0:i.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",M=()=>{var g,x;const{orgSlug:i}=j(),n=b({queryKey:["organization-areas-with-tasks",i],queryFn:()=>v.getOrganizationAreasWithTasks(i),enabled:!!i,staleTime:10*60*1e3}),m=y.useMemo(()=>{if(!n.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>t[B(o)]??999;return[...n.data.results].sort((o,a)=>{const l=r(o.name),d=r(a.name);return l!==d?l-d:o.name.localeCompare(a.name)})},[n.data]),s=(g=n.data)==null?void 0:g.organization,c=((x=n.data)==null?void 0:x.total_paper_count)??0,h=m.reduce((t,r)=>t+r.tasks.length,0);if(n.error)return n.error.status===404?e.jsx(A,{}):e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load organization. Please try again."})})});const u=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title",style:{display:"flex",alignItems:"center",gap:12},children:[(s==null?void 0:s.logo_url)&&e.jsx("img",{src:s.logo_url,alt:"",style:{height:"0.9em",width:"auto",borderRadius:4,objectFit:"contain"},onError:t=>{t.currentTarget.style.display="none"}}),u??e.jsx(p,{className:"h-10 w-64 inline-block"})]}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("span",{children:[c.toLocaleString()," papers"]}),(s==null?void 0:s.website_url)&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.website_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.github_url)&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.github_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(k,{className:"method-description",text:s.description})]}),!n.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,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:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All papers attributed to this organization."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:e.jsxs(f,{to:`/${i}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]})})]}),n.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(p,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>e.jsx(p,{className:"h-24"},a))})]},r))}):m.map(t=>{const r=t.tasks;if(r.length===0)return null;const o=r.reduce((a,l)=>a+(l.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"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(a=>{const l=a.slug||"",d=N(S(l));return e.jsxs(f,{to:`/${i}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),_(a.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)})})]},t.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",m.filter(t=>t.tasks.length>0).length," areas."]})]})};export{M as default}; diff --git a/assets/OrganizationTaskView-CxtwAWXj.js b/assets/OrganizationTaskView-VN_RdDoW.js similarity index 85% rename from assets/OrganizationTaskView-CxtwAWXj.js rename to assets/OrganizationTaskView-VN_RdDoW.js index 6e540e2f5d653540368595b07fc8950820eaa3a1..acded5b8c9c8fb8f2c22acea633bf05c2848c212 100644 --- a/assets/OrganizationTaskView-CxtwAWXj.js +++ b/assets/OrganizationTaskView-VN_RdDoW.js @@ -1 +1 @@ -import{d as w,u as R,r as m,j as e,L as p,b}from"./index-BOKpx1zD.js";import{u as k}from"./useQuery-Cj0zK8BW.js";import{P as B}from"./components-BkQ2EWK-.js";import{t as E,d as L}from"./transform-DLPfRTia.js";import{d as q}from"./usePapers-B51Q6z7s.js";import{u as C}from"./useIntersectionObserver-DVOSMcnN.js";import{S as I}from"./skeleton-C5u4dxsY.js";import{A as Q,a as K}from"./alert-De0V5ndO.js";import M from"./NotFound-D2bAWljO.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-B9BAVqQL.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],D=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",re=()=>{var j,f,N,y,P,v,S;const{orgSlug:s,taskSlug:n}=w(),[g,_]=R(),h=D(g.get("order_by")),z=t=>{const r=new URLSearchParams(g);r.set("order_by",t),_(r)},o=n==="all",O=o?void 0:n,i=k({queryKey:["organization",s],queryFn:()=>b.getOrganization(s),enabled:!!s,staleTime:10*60*1e3}),c=k({queryKey:["task",n],queryFn:()=>b.getTask(n),enabled:!!n&&!o,staleTime:10*60*1e3}),a=q({organizationSlug:s||"",taskSlug:O,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:T,isIntersecting:u}=C({rootMargin:"200px"});m.useEffect(()=>{u&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[u,a.hasNextPage,a.isFetchingNextPage]),m.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const l=m.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(F=>F.results.map(E))},[a.data]),d=o?"All papers":L(((j=c.data)==null?void 0:j.name)||n||"",((f=c.data)==null?void 0:f.slug)||n),x=((y=(N=a.data)==null?void 0:N.pages[0])==null?void 0:y.count)??((P=i.data)==null?void 0:P.paper_count)??0,A=((v=i.data)==null?void 0:v.name)??s;return i.error||c.error||a.error?((S=i.error)==null?void 0:S.status)===404?e.jsx(M,{}):e.jsx("div",{className:"page",children:e.jsx(Q,{variant:"destructive",children:e.jsx(K,{children:"Failed to load organization papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(p,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:`/${s}`,children:A}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{style:{marginTop:16,marginBottom:28},children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:o?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:x.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:"Organization papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",x.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([t,r])=>e.jsx("button",{className:`sort-btn ${h===t?"active":""}`,onClick:()=>z(t),children:r},t))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded in ",e.jsx("span",{children:d})]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,r)=>e.jsx(I,{className:"h-40 w-full"},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((t,r)=>e.jsx(B,{paper:t,rank:r+1},t.id))}),e.jsx("div",{ref:T,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}; +import{d as w,u as R,r as m,j as e,L as p,b}from"./index-CSNOTM3s.js";import{u as k}from"./useQuery-DCf2mroJ.js";import{P as B}from"./components-PxXQJAWo.js";import{t as E,d as L}from"./transform-BGwKHn4w.js";import{d as q}from"./usePapers-CFugWskp.js";import{u as C}from"./useIntersectionObserver-CUA0CMpl.js";import{S as I}from"./skeleton-DIecj65I.js";import{A as Q,a as K}from"./alert-DuO9Nm7q.js";import M from"./NotFound-BOZqMg2G.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-_jD1bF9N.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],D=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",re=()=>{var j,f,N,y,P,v,S;const{orgSlug:s,taskSlug:n}=w(),[g,_]=R(),h=D(g.get("order_by")),z=t=>{const r=new URLSearchParams(g);r.set("order_by",t),_(r)},o=n==="all",O=o?void 0:n,i=k({queryKey:["organization",s],queryFn:()=>b.getOrganization(s),enabled:!!s,staleTime:10*60*1e3}),c=k({queryKey:["task",n],queryFn:()=>b.getTask(n),enabled:!!n&&!o,staleTime:10*60*1e3}),a=q({organizationSlug:s||"",taskSlug:O,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:T,isIntersecting:u}=C({rootMargin:"200px"});m.useEffect(()=>{u&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[u,a.hasNextPage,a.isFetchingNextPage]),m.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const l=m.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(F=>F.results.map(E))},[a.data]),d=o?"All papers":L(((j=c.data)==null?void 0:j.name)||n||"",((f=c.data)==null?void 0:f.slug)||n),x=((y=(N=a.data)==null?void 0:N.pages[0])==null?void 0:y.count)??((P=i.data)==null?void 0:P.paper_count)??0,A=((v=i.data)==null?void 0:v.name)??s;return i.error||c.error||a.error?((S=i.error)==null?void 0:S.status)===404?e.jsx(M,{}):e.jsx("div",{className:"page",children:e.jsx(Q,{variant:"destructive",children:e.jsx(K,{children:"Failed to load organization papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(p,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:`/${s}`,children:A}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{style:{marginTop:16,marginBottom:28},children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:o?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:x.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:"Organization papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",x.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([t,r])=>e.jsx("button",{className:`sort-btn ${h===t?"active":""}`,onClick:()=>z(t),children:r},t))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded in ",e.jsx("span",{children:d})]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,r)=>e.jsx(I,{className:"h-40 w-full"},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((t,r)=>e.jsx(B,{paper:t,rank:r+1},t.id))}),e.jsx("div",{ref:T,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}; diff --git a/assets/OrganizationsIndexView-CGTYh2nu.js b/assets/OrganizationsIndexView-BVmFsOq_.js similarity index 91% rename from assets/OrganizationsIndexView-CGTYh2nu.js rename to assets/OrganizationsIndexView-BVmFsOq_.js index 2ff5444d9365334a1d08ab32c8f9044cca490f0f..b18604403e38caaaabe837927be6785679283e7c 100644 --- a/assets/OrganizationsIndexView-CGTYh2nu.js +++ b/assets/OrganizationsIndexView-BVmFsOq_.js @@ -1 +1 @@ -import{j as e,L as l,b as o}from"./index-BOKpx1zD.js";import{u as d}from"./useQuery-Cj0zK8BW.js";import{S as c}from"./skeleton-C5u4dxsY.js";import{A as m,a as h}from"./alert-De0V5ndO.js";const g={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},f=()=>{var n;const t=d({queryKey:["organizations"],queryFn:()=>o.getOrganizations(),staleTime:6e5});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(m,{variant:"destructive",children:e.jsx(h,{children:"Failed to load organizations. Please try again."})})});const i=((n=t.data)==null?void 0:n.results)??[],r=i.reduce((a,s)=>a+(s.paper_count??0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research papers grouped by the labs and companies behind them."})]})}),t.isLoading?e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,s)=>e.jsx(c,{className:"h-24"},s))}):e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:g,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Organizations"})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.length," ",i.length===1?"organization":"organizations"," ·"," ",r.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:i.map(a=>e.jsxs(l,{to:`/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{display:"flex",alignItems:"center",gap:10},children:[a.logo_url&&e.jsx("img",{src:a.logo_url,alt:"",width:24,height:24,style:{borderRadius:4,objectFit:"contain",flexShrink:0},onError:s=>{s.currentTarget.style.display="none"}}),a.name]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id))})]})]})};export{f as default}; +import{j as e,L as l,b as o}from"./index-CSNOTM3s.js";import{u as d}from"./useQuery-DCf2mroJ.js";import{S as c}from"./skeleton-DIecj65I.js";import{A as m,a as h}from"./alert-DuO9Nm7q.js";const g={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},f=()=>{var n;const t=d({queryKey:["organizations"],queryFn:()=>o.getOrganizations(),staleTime:6e5});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(m,{variant:"destructive",children:e.jsx(h,{children:"Failed to load organizations. Please try again."})})});const i=((n=t.data)==null?void 0:n.results)??[],r=i.reduce((a,s)=>a+(s.paper_count??0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research papers grouped by the labs and companies behind them."})]})}),t.isLoading?e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,s)=>e.jsx(c,{className:"h-24"},s))}):e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:g,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Organizations"})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.length," ",i.length===1?"organization":"organizations"," ·"," ",r.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:i.map(a=>e.jsxs(l,{to:`/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{display:"flex",alignItems:"center",gap:10},children:[a.logo_url&&e.jsx("img",{src:a.logo_url,alt:"",width:24,height:24,style:{borderRadius:4,objectFit:"contain",flexShrink:0},onError:s=>{s.currentTarget.style.display="none"}}),a.name]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id))})]})]})};export{f as default}; diff --git a/assets/PaperDetailView-DhpDOu-D.js b/assets/PaperDetailView-DhpDOu-D.js deleted file mode 100644 index 75b4f42f46b330a3cdf5da42875397865d21a576..0000000000000000000000000000000000000000 --- a/assets/PaperDetailView-DhpDOu-D.js +++ /dev/null @@ -1,38 +0,0 @@ -import{f as Ve,g as Er,r as i,j as e,P as Pt,h as te,k as ks,l as lt,m as xe,n as Sr,o as _s,C as me,p as ae,q as je,s as ye,X as ws,t as De,v as Pr,w as Ns,x as Rr,y as Ir,z as Ar,A as Fr,B as $r,D as Le,R as Tr,E as ve,F as Cs,G as Es,H as Lr,I as Mr,J as Dr,K as Ur,M as qr,N as Br,O as Or,Q as Hr,S as ls,T as Kr,U as zr,V as Qr,W as Vr,e as ct,Y as Rt,b as ot,Z as Ss,c as Ps,d as Gr,_ as Wr,a as Jr,$ as Xr,L as ge,a0 as Yr,a1 as Zr,a2 as ea,a3 as ta,a4 as sa,a5 as ra,a6 as aa}from"./index-BOKpx1zD.js";import{u as oe}from"./useQuery-Cj0zK8BW.js";import{I as ee,S as na,a as ia,T as oa,M as la}from"./components-BkQ2EWK-.js";import{C as ca,E as da}from"./ExternalSourceEvalBadge-CZdsMWe1.js";import{L as st,a as ua}from"./LatexTitle-B4ZTuCxc.js";import{c as ma}from"./transform-DLPfRTia.js";import{f as pa,D as ha}from"./latexPlainText-ChVkH0gY.js";import{a as fa}from"./usePapers-B51Q6z7s.js";import{S as Ke}from"./skeleton-C5u4dxsY.js";import{A as ga,a as xa}from"./alert-De0V5ndO.js";import{B as K}from"./button-COASHtHZ.js";import{u as va}from"./index-DdlAvtSd.js";import{I as ie}from"./textarea-BKXasfzv.js";import{D as ke,a as _e,b as we,c as Ne,d as Ce,e as Ee,R as ba,P as ja,O as ya,C as ka}from"./dialog-Ba_4mPeV.js";import{u as Se}from"./useMutation-1Slfgn9F.js";import{S as It,P as At,a as _a}from"./SignInToEditDialog-DcJcnDsG.js";import{L as le}from"./loader-circle-kP6qHte6.js";import{B as Rs,D as wa,c as Na,g as Ca,s as Ea,a as Sa,b as Pa,d as Ra,i as Ia,e as Aa}from"./codexAddEvals-CUJKpU1a.js";import{G as cs}from"./github-V6TTeQuy.js";import{M as Fa,r as $a}from"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-B9BAVqQL.js";/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ta=Ve("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ds=Ve("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qe=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Is=Ve("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ft=Ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function La(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function Ma(t,s,a="https://paperswithcode.co"){return s.map(c=>{const n=encodeURIComponent(c.evaluation_id),o=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,l=new URLSearchParams({task:c.task_slug,eval:c.evaluation_id}),m=`${a}/benchmark/${encodeURIComponent(c.dataset_slug)}?${l.toString()}`;return`[![${`Papers with Code: ${c.best_rank===1?"SOTA":`#${c.best_rank}`} on ${c.dataset_name}`}](${o})](${m})`}).join(` -`)}function Da(t,s=!0){return oe({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return Er(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const As=t=>t.replace(/v\d+$/,""),Ua={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},xt=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},vt=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(c=>{if(typeof c=="string")return c;if(c&&typeof c=="object"){const n=c;return n.id||n.repoId||null}return null}).filter(c=>!!c).map(c=>`${Ua[s]}${c}`):[]},qa=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${As(t)}`)).ok}catch{return!1}},Ba=async t=>{const s=As(t),[a,c]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async m=>m.ok?m.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${m.status}`),null)).catch(m=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,m),null)),qa(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:c};const n=xt(a,"models"),o=xt(a,"datasets"),l=xt(a,"spaces");return{models:n.count,datasets:o.count,spaces:l.count,modelUrls:vt(a,"models"),datasetUrls:vt(a,"datasets"),spaceUrls:vt(a,"spaces"),isLimited:n.isLimited||o.isLimited||l.isLimited,paperExists:c}},Oa=t=>oe({queryKey:["huggingface-repos",t],queryFn:()=>Ba(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function Ha(){const[t,s]=i.useState(!1),[a,c]=i.useState(!1),[n,o]=i.useState(!1),[l,m]=i.useState(!1),[r,h]=i.useState(!1),[y,k]=i.useState(!1);return{isEditingTasks:t,openTasksDialog:()=>s(!0),closeTasksDialog:()=>s(!1),setIsEditingTasks:s,isEditingMethods:a,openMethodsDialog:()=>c(!0),closeMethodsDialog:()=>c(!1),setIsEditingMethods:c,isEditingRepositories:n,openRepositoriesDialog:()=>o(!0),closeRepositoriesDialog:()=>o(!1),setIsEditingRepositories:o,isEditingProjectPages:l,openProjectPagesDialog:()=>m(!0),closeProjectPagesDialog:()=>m(!1),setIsEditingProjectPages:m,isEditingEvaluations:r,openEvaluationsDialog:()=>h(!0),closeEvaluationsDialog:()=>h(!1),setIsEditingEvaluations:h,isEditingSourceUrl:y,openSourceUrlDialog:()=>k(!0),closeSourceUrlDialog:()=>k(!1),setIsEditingSourceUrl:k}}var dt="Checkbox",[Ka]=_s(dt),[za,$t]=Ka(dt);function Qa(t){const{__scopeCheckbox:s,checked:a,children:c,defaultChecked:n,disabled:o,form:l,name:m,onCheckedChange:r,required:h,value:y="on",internal_do_not_use_render:k}=t,[P,E]=ks({prop:a,defaultProp:n??!1,onChange:r,caller:dt}),[v,$]=i.useState(null),[U,T]=i.useState(null),L=i.useRef(!1),q=v?!!l||!!v.closest("form"):!0,D={checked:P,disabled:o,setChecked:E,control:v,setControl:$,name:m,form:l,value:y,hasConsumerStoppedPropagationRef:L,required:h,defaultChecked:de(n)?!1:n,isFormControl:q,bubbleInput:U,setBubbleInput:T};return e.jsx(za,{scope:s,...D,children:Va(k)?k(D):c})}var Fs="CheckboxTrigger",$s=i.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...c},n)=>{const{control:o,value:l,disabled:m,checked:r,required:h,setControl:y,setChecked:k,hasConsumerStoppedPropagationRef:P,isFormControl:E,bubbleInput:v}=$t(Fs,t),$=lt(n,y),U=i.useRef(r);return i.useEffect(()=>{const T=o==null?void 0:o.form;if(T){const L=()=>k(U.current);return T.addEventListener("reset",L),()=>T.removeEventListener("reset",L)}},[o,k]),e.jsx(te.button,{type:"button",role:"checkbox","aria-checked":de(r)?"mixed":r,"aria-required":h,"data-state":Us(r),"data-disabled":m?"":void 0,disabled:m,value:l,...c,ref:$,onKeyDown:xe(s,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:xe(a,T=>{k(L=>de(L)?!0:!L),v&&E&&(P.current=T.isPropagationStopped(),P.current||T.stopPropagation())})})});$s.displayName=Fs;var Tt=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:c,checked:n,defaultChecked:o,required:l,disabled:m,value:r,onCheckedChange:h,form:y,...k}=t;return e.jsx(Qa,{__scopeCheckbox:a,checked:n,defaultChecked:o,disabled:m,required:l,onCheckedChange:h,name:c,form:y,value:r,internal_do_not_use_render:({isFormControl:P})=>e.jsxs(e.Fragment,{children:[e.jsx($s,{...k,ref:s,__scopeCheckbox:a}),P&&e.jsx(Ds,{__scopeCheckbox:a})]})})});Tt.displayName=dt;var Ts="CheckboxIndicator",Ls=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:c,...n}=t,o=$t(Ts,a);return e.jsx(Pt,{present:c||de(o.checked)||o.checked===!0,children:e.jsx(te.span,{"data-state":Us(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});Ls.displayName=Ts;var Ms="CheckboxBubbleInput",Ds=i.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:c,hasConsumerStoppedPropagationRef:n,checked:o,defaultChecked:l,required:m,disabled:r,name:h,value:y,form:k,bubbleInput:P,setBubbleInput:E}=$t(Ms,t),v=lt(a,E),$=va(o),U=Sr(c);i.useEffect(()=>{const L=P;if(!L)return;const q=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(q,"checked").set,f=!n.current;if($!==o&&N){const x=new Event("click",{bubbles:f});L.indeterminate=de(o),N.call(L,de(o)?!1:o),L.dispatchEvent(x)}},[P,$,o,n]);const T=i.useRef(de(o)?!1:o);return e.jsx(te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??T.current,required:m,disabled:r,name:h,value:y,form:k,...s,tabIndex:-1,ref:v,style:{...s.style,...U,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ds.displayName=Ms;function Va(t){return typeof t=="function"}function de(t){return t==="indeterminate"}function Us(t){return de(t)?"indeterminate":t?"checked":"unchecked"}const Lt=i.forwardRef(({className:t,style:s,...a},c)=>e.jsx(Tt,{ref:c,className:ae("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(Ls,{className:ae("flex items-center justify-center text-current"),children:e.jsx(me,{className:"h-4 w-4"})})}));Lt.displayName=Tt.displayName;function Ga(t,s,a){if(!t)return t;const c=n=>n.paper_id!==s||n.paper_title===a?n:{...n,paper_title:a};if(Array.isArray(t)){const n=t.map(c);return n.some((l,m)=>l!==t[m])?n:t}if(Array.isArray(t.results)){const n=t.results.map(c);return n.some((l,m)=>l!==t.results[m])?{...t,results:n}:t}return t}function Ge(t,s,a){new Set([...a,s.id,s.arxiv_id].filter(l=>!!l)).forEach(l=>{t.setQueryData(["paper",l],s),t.setQueryData(["paper-arxiv",l],s)}),t.invalidateQueries({queryKey:["papers"],refetchType:"none"}),t.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),t.invalidateQueries({queryKey:["task-papers-infinite"],refetchType:"none"});const n=String(s.id),o=l=>Ga(l,n,s.title);t.setQueriesData({queryKey:["evaluations"]},o),t.setQueriesData({queryKey:["dataset-evals"]},o),t.invalidateQueries({queryKey:["evaluations"],refetchType:"none"}),t.invalidateQueries({queryKey:["dataset-evals"],refetchType:"none"})}function Ue({isAuthor:t=!1}){return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:t?"We can see this paper is yours. While we're in early access an admin still reviews each edit; this will become automatic for authors soon.":"Submissions are queued for review and don't change the paper page until an admin approves them."})]})}const Wa=250,Ja=100;function Xa({open:t,onOpenChange:s,paperId:a,arxivId:c,initialTaskIds:n,initialTasks:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const[h,y]=i.useState(n),[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState(""),[T,L]=i.useState(new Map),q=je(),{toast:D}=ye(),N=i.useRef(!1);i.useEffect(()=>{if(!t){N.current=!1;return}if(N.current)return;N.current=!0,y(n),v(""),U("");const b=new Map;(o||[]).forEach(R=>{const F=parseInt(R.id);Number.isNaN(F)||b.set(F,R)}),L(b)},[t,n,o]),i.useEffect(()=>{const b=window.setTimeout(()=>{U(E.trim())},Wa);return()=>window.clearTimeout(b)},[E]);const{data:f,isFetching:x}=oe({queryKey:["tasks-search",$],queryFn:()=>Ns({page_size:Ja,visible_only:!0,...$?{q:$}:{}}),enabled:t});i.useEffect(()=>{var b;(b=f==null?void 0:f.results)!=null&&b.length&&L(R=>{const F=new Map(R);return f.results.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||F.set(I,A)}),F})},[f]);const M=i.useMemo(()=>{const b=(f==null?void 0:f.results)||[],R=new Set,F=[];return h.forEach(A=>{if(R.has(A))return;const I=T.get(A);I&&(F.push(I),R.add(A))}),b.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||R.has(I)||(F.push(A),R.add(I))}),F},[f,h,T]),B=Se({mutationFn:async({paperId:b,taskIds:R})=>m==="pending"?(await De({paper_id:parseInt(b),edit_type:"tasks",proposed_payload:{task_ids:R}}),null):Pr(b,R),onMutate:async({taskIds:b})=>{if(m==="pending")return{snapshots:[]};const R=b.map(I=>T.get(I)).filter(I=>!!I).map(I=>({id:I.id,name:I.name,slug:I.slug})).sort((I,X)=>I.name.localeCompare(X.name)),F=Array.from(new Set([a,c].filter(I=>!!I)));await Promise.all(F.flatMap(I=>[q.cancelQueries({queryKey:["paper",I]}),q.cancelQueries({queryKey:["paper-arxiv",I]})]));const A=[];return F.forEach(I=>{["paper","paper-arxiv"].forEach(X=>{const j=[X,I],_=q.getQueryData(j);A.push({key:j,data:_}),_&&q.setQueryData(j,{..._,tasks:R})})}),D({title:"Tasks updated",description:`Saved ${b.length} task${b.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1),{snapshots:A}},onSuccess:b=>{if(m==="pending"){D({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),l==null||l(),s(!1);return}b&&Ge(q,b,[a,c])},onError:(b,R,F)=>{var X,j;(X=F==null?void 0:F.snapshots)==null||X.forEach(({key:_,data:u})=>{q.setQueryData(_,u)});const A=b;let I=A.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");if(A.response)try{const _=JSON.parse(A.response);typeof(_==null?void 0:_.detail)=="string"?I=_.detail:Array.isArray(_==null?void 0:_.detail)&&((j=_.detail[0])!=null&&j.msg)&&(I=_.detail[0].msg)}catch{I=A.response}D({title:m==="pending"?"Could not submit edit":"Could not save tasks",description:I,variant:"destructive"})}}),O=()=>{B.mutate({paperId:a,taskIds:h})},z=i.useMemo(()=>{if(h.length!==n.length)return!0;const b=new Set(n);return h.some(R=>!b.has(R))},[h,n]),V=(b,R)=>{y(F=>R?F.includes(b)?F:[...F,b]:F.filter(A=>A!==b))},Z=()=>v("");return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Tasks"}),e.jsx(Ce,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Qe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ie,{type:"text",placeholder:"Search tasks...",value:E,onChange:b=>v(b.target.value),className:"pl-9 pr-9"}),E&&e.jsx("button",{type:"button",onClick:Z,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ws,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:M.length>0?e.jsx("div",{className:"space-y-2",children:M.map(b=>{const R=parseInt(b.id),F=h.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Lt,{id:`task-${b.id}`,checked:F,onCheckedChange:A=>V(R,A===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${b.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[b.name,b.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[b.description.substring(0,100),b.description.length>100?"...":""]})]})]},b.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(le,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Qe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:$?`No tasks found matching "${$}"`:"No tasks available"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"ghost",className:"sm:mr-auto",onClick:()=>P(!0),children:"Suggest a new task"}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:O,disabled:B.isPending||!z,children:B.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:k,onOpenChange:P,paperId:a,kind:"task"})]})}const Ya=250,Za=100;function en({open:t,onOpenChange:s,paperId:a,arxivId:c,initialMethodIds:n,initialMethods:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const[h,y]=i.useState(n),[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState(""),[T,L]=i.useState(new Map),q=je(),{toast:D}=ye(),N=i.useRef(!1);i.useEffect(()=>{if(!t){N.current=!1;return}if(N.current)return;N.current=!0,y(n),v(""),U("");const b=new Map;(o||[]).forEach(R=>{const F=parseInt(R.id);Number.isNaN(F)||b.set(F,R)}),L(b)},[t,n,o]),i.useEffect(()=>{const b=window.setTimeout(()=>{U(E.trim())},Ya);return()=>window.clearTimeout(b)},[E]);const{data:f,isFetching:x}=oe({queryKey:["methods-search",$],queryFn:()=>Ir({page_size:Za,...$?{q:$}:{}}),enabled:t});i.useEffect(()=>{var b;(b=f==null?void 0:f.results)!=null&&b.length&&L(R=>{const F=new Map(R);return f.results.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||F.set(I,A)}),F})},[f]);const M=i.useMemo(()=>{const b=(f==null?void 0:f.results)||[],R=new Set,F=[];return h.forEach(A=>{if(R.has(A))return;const I=T.get(A);I&&(F.push(I),R.add(A))}),b.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||R.has(I)||(F.push(A),R.add(I))}),F},[f,h,T]),B=Se({mutationFn:async({paperId:b,methodIds:R})=>m==="pending"?(await De({paper_id:parseInt(b),edit_type:"methods",proposed_payload:{method_ids:R}}),null):Rr(b,R),onSuccess:b=>{if(m==="pending"){D({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),l==null||l(),s(!1);return}b&&Ge(q,b,[a,c]),D({title:"Methods updated",description:`Saved ${h.length} method${h.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1)},onError:b=>{var A;const R=b;let F=R.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");if(R.response)try{const I=JSON.parse(R.response);typeof(I==null?void 0:I.detail)=="string"?F=I.detail:Array.isArray(I==null?void 0:I.detail)&&((A=I.detail[0])!=null&&A.msg)&&(F=I.detail[0].msg)}catch{F=R.response}D({title:m==="pending"?"Could not submit edit":"Could not save methods",description:F,variant:"destructive"})}}),O=()=>{B.mutate({paperId:a,methodIds:h})},z=i.useMemo(()=>{if(h.length!==n.length)return!0;const b=new Set(n);return h.some(R=>!b.has(R))},[h,n]),V=(b,R)=>{y(F=>R?F.includes(b)?F:[...F,b]:F.filter(A=>A!==b))},Z=()=>v("");return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Methods"}),e.jsx(Ce,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Qe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ie,{type:"text",placeholder:"Search methods...",value:E,onChange:b=>v(b.target.value),className:"pl-9 pr-9"}),E&&e.jsx("button",{type:"button",onClick:Z,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ws,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:M.length>0?e.jsx("div",{className:"space-y-2",children:M.map(b=>{const R=parseInt(b.id),F=h.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Lt,{id:`method-${b.id}`,checked:F,onCheckedChange:A=>V(R,A===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${b.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[b.name,b.full_name&&b.full_name!==b.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:b.full_name}),b.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[b.description.substring(0,100),b.description.length>100?"...":""]})]})]},b.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(le,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Qe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:$?`No methods found matching "${$}"`:"No methods available"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"ghost",className:"sm:mr-auto",onClick:()=>P(!0),children:"Suggest a new method"}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:O,disabled:B.isPending||!z,children:B.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:k,onOpenChange:P,paperId:a,kind:"method"})]})}function ze(t){const s=t.trim();if(!s)return null;let a=s;!a.startsWith("http://")&&!a.startsWith("https://")&&(a=`https://${a}`);try{const c=new URL(a);if(c.hostname.toLowerCase()!=="github.com")return null;const n=c.pathname.split("/").filter(Boolean);if(n.length<2)return null;const o=n[0].toLowerCase();let l=n[1].toLowerCase();return l.endsWith(".git")&&(l=l.slice(0,-4)),`https://github.com/${o}/${l}`}catch{return null}}function us(t,s){const a=ze(t),c=ze(s);return a&&c?a===c:t.trim()===s.trim()}function tn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialRepositories:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),[y,k]=i.useState(""),P=je(),{toast:E}=ye(),v=i.useRef(!1);i.useEffect(()=>{if(!t){v.current=!1;return}v.current||(v.current=!0,h(n),k(""))},[t,n]);const $=Se({mutationFn:async({paperId:x,repositories:M})=>l==="pending"?(await De({paper_id:parseInt(x),edit_type:"repositories",proposed_payload:{repositories:M}}),null):Ar(x,M),onSuccess:x=>{if(l==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),o==null||o(),s(!1),k("");return}x&&Ge(P,x,[a,c]),o==null||o(),s(!1),k("")},onError:x=>{var O;const M=x;let B=M.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");if(M.response)try{const z=JSON.parse(M.response);typeof(z==null?void 0:z.detail)=="string"?B=z.detail:Array.isArray(z==null?void 0:z.detail)&&((O=z.detail[0])!=null&&O.msg)&&(B=z.detail[0].msg)}catch{B=M.response}E({title:l==="pending"?"Could not submit edit":"Could not save repositories",description:B,variant:"destructive"})}}),U=x=>{const M=[];for(const B of x){const O=M.find(z=>us(z.url,B.url));if(O)O.is_official=O.is_official||B.is_official;else{const z=ze(B.url);M.push({url:z??B.url.trim(),is_official:B.is_official})}}return M},T=()=>{const x=y.trim(),M=x?[...r,{url:x,is_official:!1}]:r;return x&&r.some(B=>us(B.url,x))?(alert("This repository URL is already added"),null):U(M)},L=()=>{const x=T();x!==null&&x.length!==r.length&&(h(x),k(""))},q=x=>{h(r.filter(M=>M.url!==x))},D=x=>{h(r.map(M=>M.url===x?{...M,is_official:!M.is_official}:M))},N=()=>{const x=T();x!==null&&$.mutate({paperId:a,repositories:x})},f=i.useMemo(()=>{const x=y.trim(),M=x?[...r,{url:x,is_official:!1}]:r;if(M.length!==n.length)return!0;const B=U(n),O=U(M);if(O.length!==B.length)return!0;const z=new Map(B.map(V=>[ze(V.url)??V.url.trim(),!!V.is_official]));return O.some(V=>{const Z=ze(V.url)??V.url.trim(),b=z.get(Z);return b===void 0||b!==!!V.is_official})},[r,y,n]);return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Repositories"}),e.jsx(Ce,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(ie,{type:"url",placeholder:"https://github.com/owner/repo",value:y,onChange:x=>k(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),L())},className:"flex-1"}),e.jsxs(K,{onClick:L,size:"sm",disabled:!y.trim(),children:[e.jsx(At,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((x,M)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(cs,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:x.url}),x.is_official&&e.jsx(Rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(K,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>D(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(Is,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>q(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Ft,{className:"w-4 h-4"})})]})]},M))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(cs,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:N,disabled:$.isPending||!f,children:$.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function sn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialProjectPages:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),[y,k]=i.useState(""),P=je(),{toast:E}=ye(),v=i.useRef(!1);i.useEffect(()=>{if(!t){v.current=!1;return}v.current||(v.current=!0,h(n),k(""))},[t,n]);const $=Se({mutationFn:async({paperId:f,projectPages:x})=>l==="pending"?(await De({paper_id:parseInt(f),edit_type:"project_pages",proposed_payload:{project_pages:x}}),null):Fr(f,x),onSuccess:f=>{if(l==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),o==null||o(),s(!1),k("");return}f&&Ge(P,f,[a,c]),o==null||o(),s(!1),k("")},onError:f=>{var B;const x=f;let M=x.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");if(x.response)try{const O=JSON.parse(x.response);typeof(O==null?void 0:O.detail)=="string"?M=O.detail:Array.isArray(O==null?void 0:O.detail)&&((B=O.detail[0])!=null&&B.msg)&&(M=O.detail[0].msg)}catch{M=x.response}E({title:l==="pending"?"Could not submit edit":"Could not save project pages",description:M,variant:"destructive"})}}),U=()=>{const f=y.trim();return f?r.some(x=>x.url===f)?(alert("This project page URL is already added"),null):[...r,{url:f,is_official:!1}]:r},T=()=>{const f=U();f!==null&&f.length!==r.length&&(h(f),k(""))},L=f=>{h(r.filter(x=>x.url!==f))},q=f=>{h(r.map(x=>x.url===f?{...x,is_official:!x.is_official}:x))},D=()=>{const f=U();f!==null&&$.mutate({paperId:a,projectPages:f})},N=i.useMemo(()=>{const f=y.trim(),x=f?[...r,{url:f,is_official:!1}]:r;if(x.length!==n.length)return!0;const M=new Map(n.map(B=>[B.url.trim(),!!B.is_official]));return x.some(B=>{const O=M.get(B.url.trim());return O===void 0||O!==!!B.is_official})},[r,y,n]);return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Project Pages"}),e.jsx(Ce,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(ie,{type:"url",placeholder:"https://example.com/project",value:y,onChange:f=>k(f.target.value),onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),T())},className:"flex-1"}),e.jsxs(K,{onClick:T,size:"sm",disabled:!y.trim(),children:[e.jsx(At,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((f,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(ds,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:f.url}),f.is_official&&e.jsx(Rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(K,{variant:f.is_official?"default":"outline",size:"sm",onClick:()=>q(f.url),className:"h-8 px-2 text-xs",title:f.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(Is,{className:`w-3.5 h-3.5 mr-1 ${f.is_official?"fill-current":""}`}),f.is_official?"Official":"Mark official"]}),e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>L(f.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Ft,{className:"w-4 h-4"})})]})]},x))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ds,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:D,disabled:$.isPending||!N,children:$.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function rn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialUrl:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),y=je(),{toast:k}=ye(),P=i.useRef(!1);i.useEffect(()=>{if(!t){P.current=!1;return}P.current||(P.current=!0,h(n))},[t,n]);const E=Se({mutationFn:async({paperId:L,sourceUrl:q})=>l==="pending"?(await De({paper_id:parseInt(L),edit_type:"source_url",proposed_payload:{source_url:q}}),null):$r(L,q),onSuccess:L=>{if(l==="pending"){k({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),o==null||o(),s(!1);return}L&&Ge(y,L,[a,c]),o==null||o(),s(!1)},onError:L=>{var N;const q=L;let D=q.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");if(q.response)try{const f=JSON.parse(q.response);typeof(f==null?void 0:f.detail)=="string"?D=f.detail:Array.isArray(f==null?void 0:f.detail)&&((N=f.detail[0])!=null&&N.msg)&&(D=f.detail[0].msg)}catch{D=q.response}k({title:l==="pending"?"Could not submit edit":"Could not save source URL",description:D,variant:"destructive"})}}),v=r.trim(),$=/^https?:\/\//i.test(v),U=v!==(n||"").trim(),T=()=>{$&&E.mutate({paperId:a,sourceUrl:v})};return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Source URL"}),e.jsxs(Ce,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(ie,{type:"url",placeholder:"https://example.com/paper",value:r,onChange:L=>h(L.target.value),onKeyPress:L=>{L.key==="Enter"&&$&&U&&(L.preventDefault(),T())}}),!$&&v.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:T,disabled:E.isPending||!$||!U,children:E.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function an(t){const s=nn(t),a=i.forwardRef((c,n)=>{const{children:o,...l}=c,m=i.Children.toArray(o),r=m.find(ln);if(r){const h=r.props.children,y=m.map(k=>k===r?i.Children.count(h)>1?i.Children.only(null):i.isValidElement(h)?h.props.children:null:k);return e.jsx(s,{...l,ref:n,children:i.isValidElement(h)?i.cloneElement(h,void 0,y):null})}return e.jsx(s,{...l,ref:n,children:o})});return a.displayName=`${t}.Slot`,a}function nn(t){const s=i.forwardRef((a,c)=>{const{children:n,...o}=a;if(i.isValidElement(n)){const l=dn(n),m=cn(o,n.props);return n.type!==i.Fragment&&(m.ref=c?Le(c,l):l),i.cloneElement(n,m)}return i.Children.count(n)>1?i.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var on=Symbol("radix.slottable");function ln(t){return i.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===on}function cn(t,s){const a={...s};for(const c in s){const n=t[c],o=s[c];/^on[A-Z]/.test(c)?n&&o?a[c]=(...m)=>{const r=o(...m);return n(...m),r}:n&&(a[c]=n):c==="style"?a[c]={...n,...o}:c==="className"&&(a[c]=[n,o].filter(Boolean).join(" "))}return{...t,...a}}function dn(t){var c,n;let s=(c=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:c.get,a=s&&"isReactWarning"in s&&s.isReactWarning;return a?t.ref:(s=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,a=s&&"isReactWarning"in s&&s.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var ut="Popover",[qs]=_s(ut,[Es]),We=Es(),[un,pe]=qs(ut),Bs=t=>{const{__scopePopover:s,children:a,open:c,defaultOpen:n,onOpenChange:o,modal:l=!1}=t,m=We(s),r=i.useRef(null),[h,y]=i.useState(!1),[k,P]=ks({prop:c,defaultProp:n??!1,onChange:o,caller:ut});return e.jsx(Tr,{...m,children:e.jsx(un,{scope:s,contentId:ve(),triggerRef:r,open:k,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(E=>!E),[P]),hasCustomAnchor:h,onCustomAnchorAdd:i.useCallback(()=>y(!0),[]),onCustomAnchorRemove:i.useCallback(()=>y(!1),[]),modal:l,children:a})})};Bs.displayName=ut;var Os="PopoverAnchor",mn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=pe(Os,a),o=We(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:m}=n;return i.useEffect(()=>(l(),()=>m()),[l,m]),e.jsx(Cs,{...o,...c,ref:s})});mn.displayName=Os;var Hs="PopoverTrigger",Ks=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=pe(Hs,a),o=We(a),l=lt(s,n.triggerRef),m=e.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Ws(n.open),...c,ref:l,onClick:xe(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?m:e.jsx(Cs,{asChild:!0,...o,children:m})});Ks.displayName=Hs;var Mt="PopoverPortal",[pn,hn]=qs(Mt,{forceMount:void 0}),zs=t=>{const{__scopePopover:s,forceMount:a,children:c,container:n}=t,o=pe(Mt,s);return e.jsx(pn,{scope:s,forceMount:a,children:e.jsx(Pt,{present:a||o.open,children:e.jsx(Lr,{asChild:!0,container:n,children:c})})})};zs.displayName=Mt;var Me="PopoverContent",Qs=i.forwardRef((t,s)=>{const a=hn(Me,t.__scopePopover),{forceMount:c=a.forceMount,...n}=t,o=pe(Me,t.__scopePopover);return e.jsx(Pt,{present:c||o.open,children:o.modal?e.jsx(gn,{...n,ref:s}):e.jsx(xn,{...n,ref:s})})});Qs.displayName=Me;var fn=an("PopoverContent.RemoveScroll"),gn=i.forwardRef((t,s)=>{const a=pe(Me,t.__scopePopover),c=i.useRef(null),n=lt(s,c),o=i.useRef(!1);return i.useEffect(()=>{const l=c.current;if(l)return Mr(l)},[]),e.jsx(Dr,{as:fn,allowPinchZoom:!0,children:e.jsx(Vs,{...t,ref:n,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(t.onCloseAutoFocus,l=>{var m;l.preventDefault(),o.current||(m=a.triggerRef.current)==null||m.focus()}),onPointerDownOutside:xe(t.onPointerDownOutside,l=>{const m=l.detail.originalEvent,r=m.button===0&&m.ctrlKey===!0,h=m.button===2||r;o.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:xe(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),xn=i.forwardRef((t,s)=>{const a=pe(Me,t.__scopePopover),c=i.useRef(!1),n=i.useRef(!1);return e.jsx(Vs,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,m;(l=t.onCloseAutoFocus)==null||l.call(t,o),o.defaultPrevented||(c.current||(m=a.triggerRef.current)==null||m.focus(),o.preventDefault()),c.current=!1,n.current=!1},onInteractOutside:o=>{var r,h;(r=t.onInteractOutside)==null||r.call(t,o),o.defaultPrevented||(c.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=o.target;((h=a.triggerRef.current)==null?void 0:h.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),Vs=i.forwardRef((t,s)=>{const{__scopePopover:a,trapFocus:c,onOpenAutoFocus:n,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:r,onFocusOutside:h,onInteractOutside:y,...k}=t,P=pe(Me,a),E=We(a);return Ur(),e.jsx(qr,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:n,onUnmountAutoFocus:o,children:e.jsx(Br,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:y,onEscapeKeyDown:m,onPointerDownOutside:r,onFocusOutside:h,onDismiss:()=>P.onOpenChange(!1),children:e.jsx(Or,{"data-state":Ws(P.open),role:"dialog",id:P.contentId,...E,...k,ref:s,style:{...k.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Gs="PopoverClose",vn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=pe(Gs,a);return e.jsx(te.button,{type:"button",...c,ref:s,onClick:xe(t.onClick,()=>n.onOpenChange(!1))})});vn.displayName=Gs;var bn="PopoverArrow",jn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=We(a);return e.jsx(Hr,{...n,...c,ref:s})});jn.displayName=bn;function Ws(t){return t?"open":"closed"}var yn=Bs,kn=Ks,_n=zs,Js=Qs;const wn=yn,Nn=kn,Xs=i.forwardRef(({className:t,align:s="center",sideOffset:a=4,...c},n)=>e.jsx(_n,{children:e.jsx(Js,{ref:n,align:s,sideOffset:a,className:ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...c})}));Xs.displayName=Js.displayName;var ms=1,Cn=.9,En=.8,Sn=.17,bt=.1,jt=.999,Pn=.9999,Rn=.99,In=/[\\\/_+.#"@\[\(\{&]/,An=/[\\\/_+.#"@\[\(\{&]/g,Fn=/[\s-]/,Ys=/[\s-]/g;function Et(t,s,a,c,n,o,l){if(o===s.length)return n===t.length?ms:Rn;var m=`${n},${o}`;if(l[m]!==void 0)return l[m];for(var r=c.charAt(o),h=a.indexOf(r,n),y=0,k,P,E,v;h>=0;)k=Et(t,s,a,c,h+1,o+1,l),k>y&&(h===n?k*=ms:In.test(t.charAt(h-1))?(k*=En,E=t.slice(n,h-1).match(An),E&&n>0&&(k*=Math.pow(jt,E.length))):Fn.test(t.charAt(h-1))?(k*=Cn,v=t.slice(n,h-1).match(Ys),v&&n>0&&(k*=Math.pow(jt,v.length))):(k*=Sn,n>0&&(k*=Math.pow(jt,h-n))),t.charAt(h)!==s.charAt(o)&&(k*=Pn)),(kk&&(k=P*bt)),k>y&&(y=k),h=a.indexOf(r,h+1);return l[m]=y,y}function ps(t){return t.toLowerCase().replace(Ys," ")}function $n(t,s,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,Et(t,s,ps(t),ps(s),0,0,{})}var Oe='[cmdk-group=""]',yt='[cmdk-group-items=""]',Tn='[cmdk-group-heading=""]',Zs='[cmdk-item=""]',hs=`${Zs}:not([aria-disabled="true"])`,St="cmdk-item-select",Fe="data-value",Ln=(t,s,a)=>$n(t,s,a),er=i.createContext(void 0),Je=()=>i.useContext(er),tr=i.createContext(void 0),Dt=()=>i.useContext(tr),sr=i.createContext(void 0),rr=i.forwardRef((t,s)=>{let a=$e(()=>{var u,p;return{search:"",value:(p=(u=t.value)!=null?u:t.defaultValue)!=null?p:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=$e(()=>new Set),n=$e(()=>new Map),o=$e(()=>new Map),l=$e(()=>new Set),m=ar(t),{label:r,children:h,value:y,onValueChange:k,filter:P,shouldFilter:E,loop:v,disablePointerSelection:$=!1,vimBindings:U=!0,...T}=t,L=ve(),q=ve(),D=ve(),N=i.useRef(null),f=Vn();be(()=>{if(y!==void 0){let u=y.trim();a.current.value=u,x.emit()}},[y]),be(()=>{f(6,Z)},[]);let x=i.useMemo(()=>({subscribe:u=>(l.current.add(u),()=>l.current.delete(u)),snapshot:()=>a.current,setState:(u,p,g)=>{var w,S,H,G;if(!Object.is(a.current[u],p)){if(a.current[u]=p,u==="search")V(),O(),f(1,z);else if(u==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let W=document.getElementById(D);W?W.focus():(w=document.getElementById(L))==null||w.focus()}if(f(7,()=>{var W;a.current.selectedItemId=(W=b())==null?void 0:W.id,x.emit()}),g||f(5,Z),((S=m.current)==null?void 0:S.value)!==void 0){let W=p??"";(G=(H=m.current).onValueChange)==null||G.call(H,W);return}}x.emit()}},emit:()=>{l.current.forEach(u=>u())}}),[]),M=i.useMemo(()=>({value:(u,p,g)=>{var w;p!==((w=o.current.get(u))==null?void 0:w.value)&&(o.current.set(u,{value:p,keywords:g}),a.current.filtered.items.set(u,B(p,g)),f(2,()=>{O(),x.emit()}))},item:(u,p)=>(c.current.add(u),p&&(n.current.has(p)?n.current.get(p).add(u):n.current.set(p,new Set([u]))),f(3,()=>{V(),O(),a.current.value||z(),x.emit()}),()=>{o.current.delete(u),c.current.delete(u),a.current.filtered.items.delete(u);let g=b();f(4,()=>{V(),(g==null?void 0:g.getAttribute("id"))===u&&z(),x.emit()})}),group:u=>(n.current.has(u)||n.current.set(u,new Set),()=>{o.current.delete(u),n.current.delete(u)}),filter:()=>m.current.shouldFilter,label:r||t["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:L,inputId:D,labelId:q,listInnerRef:N}),[]);function B(u,p){var g,w;let S=(w=(g=m.current)==null?void 0:g.filter)!=null?w:Ln;return u?S(u,a.current.search,p):0}function O(){if(!a.current.search||m.current.shouldFilter===!1)return;let u=a.current.filtered.items,p=[];a.current.filtered.groups.forEach(w=>{let S=n.current.get(w),H=0;S.forEach(G=>{let W=u.get(G);H=Math.max(W,H)}),p.push([w,H])});let g=N.current;R().sort((w,S)=>{var H,G;let W=w.getAttribute("id"),ce=S.getAttribute("id");return((H=u.get(ce))!=null?H:0)-((G=u.get(W))!=null?G:0)}).forEach(w=>{let S=w.closest(yt);S?S.appendChild(w.parentElement===S?w:w.closest(`${yt} > *`)):g.appendChild(w.parentElement===g?w:w.closest(`${yt} > *`))}),p.sort((w,S)=>S[1]-w[1]).forEach(w=>{var S;let H=(S=N.current)==null?void 0:S.querySelector(`${Oe}[${Fe}="${encodeURIComponent(w[0])}"]`);H==null||H.parentElement.appendChild(H)})}function z(){let u=R().find(g=>g.getAttribute("aria-disabled")!=="true"),p=u==null?void 0:u.getAttribute(Fe);x.setState("value",p||void 0)}function V(){var u,p,g,w;if(!a.current.search||m.current.shouldFilter===!1){a.current.filtered.count=c.current.size;return}a.current.filtered.groups=new Set;let S=0;for(let H of c.current){let G=(p=(u=o.current.get(H))==null?void 0:u.value)!=null?p:"",W=(w=(g=o.current.get(H))==null?void 0:g.keywords)!=null?w:[],ce=B(G,W);a.current.filtered.items.set(H,ce),ce>0&&S++}for(let[H,G]of n.current)for(let W of G)if(a.current.filtered.items.get(W)>0){a.current.filtered.groups.add(H);break}a.current.filtered.count=S}function Z(){var u,p,g;let w=b();w&&(((u=w.parentElement)==null?void 0:u.firstChild)===w&&((g=(p=w.closest(Oe))==null?void 0:p.querySelector(Tn))==null||g.scrollIntoView({block:"nearest"})),w.scrollIntoView({block:"nearest"}))}function b(){var u;return(u=N.current)==null?void 0:u.querySelector(`${Zs}[aria-selected="true"]`)}function R(){var u;return Array.from(((u=N.current)==null?void 0:u.querySelectorAll(hs))||[])}function F(u){let p=R()[u];p&&x.setState("value",p.getAttribute(Fe))}function A(u){var p;let g=b(),w=R(),S=w.findIndex(G=>G===g),H=w[S+u];(p=m.current)!=null&&p.loop&&(H=S+u<0?w[w.length-1]:S+u===w.length?w[0]:w[S+u]),H&&x.setState("value",H.getAttribute(Fe))}function I(u){let p=b(),g=p==null?void 0:p.closest(Oe),w;for(;g&&!w;)g=u>0?zn(g,Oe):Qn(g,Oe),w=g==null?void 0:g.querySelector(hs);w?x.setState("value",w.getAttribute(Fe)):A(u)}let X=()=>F(R().length-1),j=u=>{u.preventDefault(),u.metaKey?X():u.altKey?I(1):A(1)},_=u=>{u.preventDefault(),u.metaKey?F(0):u.altKey?I(-1):A(-1)};return i.createElement(te.div,{ref:s,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:u=>{var p;(p=T.onKeyDown)==null||p.call(T,u);let g=u.nativeEvent.isComposing||u.keyCode===229;if(!(u.defaultPrevented||g))switch(u.key){case"n":case"j":{U&&u.ctrlKey&&j(u);break}case"ArrowDown":{j(u);break}case"p":case"k":{U&&u.ctrlKey&&_(u);break}case"ArrowUp":{_(u);break}case"Home":{u.preventDefault(),F(0);break}case"End":{u.preventDefault(),X();break}case"Enter":{u.preventDefault();let w=b();if(w){let S=new Event(St);w.dispatchEvent(S)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:Wn},r),mt(t,u=>i.createElement(tr.Provider,{value:x},i.createElement(er.Provider,{value:M},u))))}),Mn=i.forwardRef((t,s)=>{var a,c;let n=ve(),o=i.useRef(null),l=i.useContext(sr),m=Je(),r=ar(t),h=(c=(a=r.current)==null?void 0:a.forceMount)!=null?c:l==null?void 0:l.forceMount;be(()=>{if(!h)return m.item(n,l==null?void 0:l.id)},[h]);let y=nr(n,o,[t.value,t.children,o],t.keywords),k=Dt(),P=ue(f=>f.value&&f.value===y.current),E=ue(f=>h||m.filter()===!1?!0:f.search?f.filtered.items.get(n)>0:!0);i.useEffect(()=>{let f=o.current;if(!(!f||t.disabled))return f.addEventListener(St,v),()=>f.removeEventListener(St,v)},[E,t.onSelect,t.disabled]);function v(){var f,x;$(),(x=(f=r.current).onSelect)==null||x.call(f,y.current)}function $(){k.setState("value",y.current,!0)}if(!E)return null;let{disabled:U,value:T,onSelect:L,forceMount:q,keywords:D,...N}=t;return i.createElement(te.div,{ref:Le(o,s),...N,id:n,"cmdk-item":"",role:"option","aria-disabled":!!U,"aria-selected":!!P,"data-disabled":!!U,"data-selected":!!P,onPointerMove:U||m.getDisablePointerSelection()?void 0:$,onClick:U?void 0:v},t.children)}),Dn=i.forwardRef((t,s)=>{let{heading:a,children:c,forceMount:n,...o}=t,l=ve(),m=i.useRef(null),r=i.useRef(null),h=ve(),y=Je(),k=ue(E=>n||y.filter()===!1?!0:E.search?E.filtered.groups.has(l):!0);be(()=>y.group(l),[]),nr(l,m,[t.value,t.heading,r]);let P=i.useMemo(()=>({id:l,forceMount:n}),[n]);return i.createElement(te.div,{ref:Le(m,s),...o,"cmdk-group":"",role:"presentation",hidden:k?void 0:!0},a&&i.createElement("div",{ref:r,"cmdk-group-heading":"","aria-hidden":!0,id:h},a),mt(t,E=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?h:void 0},i.createElement(sr.Provider,{value:P},E))))}),Un=i.forwardRef((t,s)=>{let{alwaysRender:a,...c}=t,n=i.useRef(null),o=ue(l=>!l.search);return!a&&!o?null:i.createElement(te.div,{ref:Le(n,s),...c,"cmdk-separator":"",role:"separator"})}),qn=i.forwardRef((t,s)=>{let{onValueChange:a,...c}=t,n=t.value!=null,o=Dt(),l=ue(h=>h.search),m=ue(h=>h.selectedItemId),r=Je();return i.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),i.createElement(te.input,{ref:s,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":r.listId,"aria-labelledby":r.labelId,"aria-activedescendant":m,id:r.inputId,type:"text",value:n?t.value:l,onChange:h=>{n||o.setState("search",h.target.value),a==null||a(h.target.value)}})}),Bn=i.forwardRef((t,s)=>{let{children:a,label:c="Suggestions",...n}=t,o=i.useRef(null),l=i.useRef(null),m=ue(h=>h.selectedItemId),r=Je();return i.useEffect(()=>{if(l.current&&o.current){let h=l.current,y=o.current,k,P=new ResizeObserver(()=>{k=requestAnimationFrame(()=>{let E=h.offsetHeight;y.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return P.observe(h),()=>{cancelAnimationFrame(k),P.unobserve(h)}}},[]),i.createElement(te.div,{ref:Le(o,s),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:r.listId},mt(t,h=>i.createElement("div",{ref:Le(l,r.listInnerRef),"cmdk-list-sizer":""},h)))}),On=i.forwardRef((t,s)=>{let{open:a,onOpenChange:c,overlayClassName:n,contentClassName:o,container:l,...m}=t;return i.createElement(ba,{open:a,onOpenChange:c},i.createElement(ja,{container:l},i.createElement(ya,{"cmdk-overlay":"",className:n}),i.createElement(ka,{"aria-label":t.label,"cmdk-dialog":"",className:o},i.createElement(rr,{ref:s,...m}))))}),Hn=i.forwardRef((t,s)=>ue(a=>a.filtered.count===0)?i.createElement(te.div,{ref:s,...t,"cmdk-empty":"",role:"presentation"}):null),Kn=i.forwardRef((t,s)=>{let{progress:a,children:c,label:n="Loading...",...o}=t;return i.createElement(te.div,{ref:s,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},mt(t,l=>i.createElement("div",{"aria-hidden":!0},l)))}),Y=Object.assign(rr,{List:Bn,Item:Mn,Input:qn,Group:Dn,Separator:Un,Dialog:On,Empty:Hn,Loading:Kn});function zn(t,s){let a=t.nextElementSibling;for(;a;){if(a.matches(s))return a;a=a.nextElementSibling}}function Qn(t,s){let a=t.previousElementSibling;for(;a;){if(a.matches(s))return a;a=a.previousElementSibling}}function ar(t){let s=i.useRef(t);return be(()=>{s.current=t}),s}var be=typeof window>"u"?i.useEffect:i.useLayoutEffect;function $e(t){let s=i.useRef();return s.current===void 0&&(s.current=t()),s}function ue(t){let s=Dt(),a=()=>t(s.snapshot());return i.useSyncExternalStore(s.subscribe,a,a)}function nr(t,s,a,c=[]){let n=i.useRef(),o=Je();return be(()=>{var l;let m=(()=>{var h;for(let y of a){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(h=y.current.textContent)==null?void 0:h.trim():n.current}})(),r=c.map(h=>h.trim());o.value(t,m,r),(l=s.current)==null||l.setAttribute(Fe,m),n.current=m}),n}var Vn=()=>{let[t,s]=i.useState(),a=$e(()=>new Map);return be(()=>{a.current.forEach(c=>c()),a.current=new Map},[t]),(c,n)=>{a.current.set(c,n),s({})}};function Gn(t){let s=t.type;return typeof s=="function"?s(t.props):"render"in s?s.render(t.props):t}function mt({asChild:t,children:s},a){return t&&i.isValidElement(s)?i.cloneElement(Gn(s),{ref:s.ref},a(s.props.children)):a(s)}var Wn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ir=i.forwardRef(({className:t,...s},a)=>e.jsx(Y,{ref:a,className:ae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...s}));ir.displayName=Y.displayName;const or=i.forwardRef(({className:t,...s},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(Qe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Y.Input,{ref:a,className:ae("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...s})]}));or.displayName=Y.Input.displayName;const lr=i.forwardRef(({className:t,...s},a)=>e.jsx(Y.List,{ref:a,className:ae("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...s}));lr.displayName=Y.List.displayName;const cr=i.forwardRef((t,s)=>e.jsx(Y.Empty,{ref:s,className:"py-6 text-center text-sm",...t}));cr.displayName=Y.Empty.displayName;const dr=i.forwardRef(({className:t,...s},a)=>e.jsx(Y.Group,{ref:a,className:ae("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...s}));dr.displayName=Y.Group.displayName;const Jn=i.forwardRef(({className:t,...s},a)=>e.jsx(Y.Separator,{ref:a,className:ae("-mx-1 h-px bg-border",t),...s}));Jn.displayName=Y.Separator.displayName;const ur=i.forwardRef(({className:t,...s},a)=>e.jsx(Y.Item,{ref:a,className:ae("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",t),...s}));ur.displayName=Y.Item.displayName;const Xn=250;function fs({value:t,onChange:s,placeholder:a="Select...",searchPlaceholder:c="Search...",emptyMessage:n="No results found.",disabled:o=!1,selectedOption:l,queryKey:m,queryFn:r,enabled:h=!0,className:y}){const[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState("");i.useEffect(()=>{const N=window.setTimeout(()=>{U(E.trim())},Xn);return()=>window.clearTimeout(N)},[E]),i.useEffect(()=>{k||(v(""),U(""))},[k]);const{data:T=[],isFetching:L}=oe({queryKey:[...m,$],queryFn:()=>r($),enabled:h&&k}),q=i.useMemo(()=>!t||T.some(N=>N.value===t)?T:(l==null?void 0:l.value)===t?[l,...T]:T,[T,l,t]),D=i.useMemo(()=>{if(!t)return a;const N=q.find(f=>f.value===t)??((l==null?void 0:l.value)===t?l:null);return(N==null?void 0:N.label)??a},[q,a,l,t]);return e.jsxs(wn,{open:k,onOpenChange:P,modal:!0,children:[e.jsx(Nn,{asChild:!0,children:e.jsxs(K,{type:"button",variant:"outline",role:"combobox","aria-expanded":k,disabled:o,className:ae("h-8 w-full justify-between px-2 text-sm font-normal",!t&&"text-muted-foreground",y),children:[e.jsx("span",{className:"truncate",children:D}),e.jsx(Ta,{className:"ml-1 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(Xs,{className:"z-[60] w-[var(--radix-popover-trigger-width)] max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0",align:"start",collisionPadding:8,onWheel:N=>N.stopPropagation(),children:e.jsxs(ir,{shouldFilter:!1,className:"h-full",children:[e.jsx(or,{placeholder:c,value:E,onValueChange:v}),e.jsx(lr,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.75rem))] min-h-0 overscroll-contain",children:L?e.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[e.jsx(le,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):q.length===0?e.jsx(cr,{children:n}):e.jsx(dr,{children:q.map(N=>e.jsxs(ur,{value:N.value,onSelect:()=>{s(N.value),P(!1)},children:[e.jsx(me,{className:ae("mr-2 h-4 w-4",t===N.value?"opacity-100":"opacity-0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate",children:N.label}),N.description?e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:N.description}):null]})]},N.value))})})]})})]})}const kt=100;function Yn(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function gs(t){const s=parseInt(t.task_id,10),a=parseInt(t.dataset_id,10);return!(!Number.isFinite(s)||!Number.isFinite(a)||!t.metric_name.trim()||!t.metric_value.trim())}function Zn(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0],c=s.metrics[a];return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a||"",metric_value:String(c||""),best_rank:s.best_rank?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function ei(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function ti(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function xs(t,s){return`${t}:${s}`}function rt(t){const s=t.trim();if(s==="")return null;const a=Number(s);return!Number.isFinite(a)||a<0?null:Math.trunc(a)}function at(t){const s=t.trim();return s===""?null:s}function si({open:t,onOpenChange:s,paperId:a,arxivId:c,initialEvaluations:n,paperTasks:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const h=Yn(o),[y,k]=i.useState([]),[P,E]=i.useState(null),[v,$]=i.useState(new Map),[U,T]=i.useState(new Map),L=je(),{toast:q}=ye(),D=i.useRef(!1),N=i.useRef(!1);i.useEffect(()=>{if(!t){D.current=!1,N.current=!1;return}D.current||N.current||n.length!==0&&(D.current=!0,k(Zn(n)),$(ei(n)),T(ti(n)))},[t,n]);const f=i.useMemo(()=>Array.from(new Set(y.map(j=>j.task_id).filter(j=>j&&j!==""))),[y]),x=i.useMemo(()=>{const j=new Set;return y.forEach(_=>{_.task_id&&_.dataset_id&&j.add(xs(_.task_id,_.dataset_id))}),Array.from(j)},[y]),M=oe({queryKey:["datasets-by-tasks-for-eval-edit",f,t],queryFn:async()=>{const j={};return await Promise.all(f.map(async _=>{try{const u=await ls({task_id:parseInt(_),page_size:kt});j[_]=u.results}catch(u){console.error(`Error fetching datasets for task ${_}:`,u),j[_]=[]}})),j},enabled:t&&f.length>0});i.useEffect(()=>{M.data&&T(j=>{const _=new Map(j);return Object.values(M.data).forEach(u=>{u.forEach(p=>{_.set(p.id,p)})}),_})},[M.data]);const B=oe({queryKey:["leaderboard-metrics-for-eval-edit",x,t],queryFn:async()=>{const j={};return await Promise.all(x.map(async _=>{const[u,p]=_.split(":");try{j[_]=await Vr(p,u)}catch(g){console.error(`Error fetching metrics for leaderboard ${_}:`,g),j[_]=[]}})),j},enabled:t&&x.length>0}),O=async j=>{const _=await Ns({page_size:kt,visible_only:!0,...j?{q:j}:{}});return $(u=>{const p=new Map(u);return _.results.forEach(g=>p.set(g.id,g)),p}),_.results.map(u=>{var p;return{value:u.id,label:u.name,description:(p=u.description)==null?void 0:p.slice(0,100)}})},z=j=>async _=>{const u=await ls({task_id:parseInt(j),page_size:kt,..._?{q:_}:{}});return T(p=>{const g=new Map(p);return u.results.forEach(w=>g.set(w.id,w)),g}),u.results.map(p=>({value:p.id,label:p.name,description:p.full_name}))},V=(j,_)=>{if(!j||!_)return!1;const u=U.get(_);return!!(u!=null&&u.supports_harness)},Z=(j,_,u)=>{var w;if(!j||!_)return[];const g=(((w=B.data)==null?void 0:w[xs(j,_)])||[]).map(S=>({value:S.metric_name,label:S.metric_name,description:S.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return u&&!g.some(S=>S.value===u)&&g.unshift({value:u,label:`${u} (legacy)`,description:void 0}),g},b=Se({mutationFn:async({paperId:j,evaluations:_})=>{if(m==="pending"){const p=[];for(const g of _){if(g.operation==="delete"&&g.id){p.push({op:"delete",evaluation_id:parseInt(g.id)});continue}const w=V(g.task_id,g.dataset_id);if(g.operation==="create"){if(!gs(g))continue;const S=rt(g.num_parameters),H={task_id:parseInt(g.task_id),dataset_id:parseInt(g.dataset_id),metrics:{[g.metric_name]:g.metric_value},best_metric:g.metric_name},G=at(g.hf_model_url);g.model_name&&(H.model_name=g.model_name),w&&g.harness&&(H.harness=g.harness),g.best_rank&&(H.best_rank=parseInt(g.best_rank)),S!=null&&(H.num_parameters=S),G!=null&&(H.hf_model_url=G),H.is_open=g.is_open,p.push({op:"create",data:H})}else if(g.operation==="update"&&g.id){const S={task_id:parseInt(g.task_id),dataset_id:parseInt(g.dataset_id),model_name:g.model_name||void 0,harness:w&&g.harness||null,metrics:{[g.metric_name]:g.metric_value},best_metric:g.metric_name,best_rank:g.best_rank?parseInt(g.best_rank):void 0,num_parameters:rt(g.num_parameters),hf_model_url:at(g.hf_model_url),is_open:g.is_open};p.push({op:"update",evaluation_id:parseInt(g.id),data:S})}}return p.length===0?{submitted:!1}:(await De({paper_id:parseInt(j),edit_type:"evaluations",proposed_payload:{operations:p}}),{submitted:!0})}let u=!1;for(const p of _)if(p.operation==="delete"&&p.id){u=!0;try{await Kr(p.id)}catch(g){if((typeof g=="object"&&g!==null&&"status"in g?g.status:void 0)!==404)throw g;console.log(`Evaluation ${p.id} already deleted or not found`)}}else if(p.operation==="create"){if(!gs(p))continue;u=!0;const g=V(p.task_id,p.dataset_id),w=rt(p.num_parameters);await zr({paper_id:parseInt(j),task_id:parseInt(p.task_id),dataset_id:parseInt(p.dataset_id),model_name:p.model_name||void 0,harness:g&&p.harness||void 0,metrics:{[p.metric_name]:p.metric_value},best_metric:p.metric_name,best_rank:p.best_rank?parseInt(p.best_rank):void 0,num_parameters:w??void 0,hf_model_url:at(p.hf_model_url)??void 0,is_open:p.is_open})}else if(p.operation==="update"&&p.id){u=!0;const g=V(p.task_id,p.dataset_id);await Qr(p.id,{task_id:parseInt(p.task_id),dataset_id:parseInt(p.dataset_id),model_name:p.model_name||void 0,harness:g&&p.harness||null,metrics:{[p.metric_name]:p.metric_value},best_metric:p.metric_name,best_rank:p.best_rank?parseInt(p.best_rank):void 0,num_parameters:rt(p.num_parameters),hf_model_url:at(p.hf_model_url),is_open:p.is_open})}return{submitted:u}},onSuccess:j=>{if(m==="pending"){j!=null&&j.submitted?q({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}):q({title:"No changes to submit",description:"Your evaluation list matches the existing data."}),l==null||l(),s(!1);return}L.invalidateQueries({queryKey:["paper-arxiv",c]}),L.invalidateQueries({queryKey:["evaluations","paper",a]}),l==null||l(),s(!1)},onError:j=>{var p;const _=j;let u=_.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");if(_.response)try{const g=JSON.parse(_.response);typeof(g==null?void 0:g.detail)=="string"?u=g.detail:Array.isArray(g==null?void 0:g.detail)&&((p=g.detail[0])!=null&&p.msg)&&(u=g.detail[0].msg)}catch{u=_.response}q({title:m==="pending"?"Could not submit edit":"Could not save evaluations",description:u,variant:"destructive"})}}),R=()=>{N.current=!0,k([...y,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},F=j=>{N.current=!0,y[j].id?k(y.map((u,p)=>p===j?{...u,operation:"delete"}:u)):k(y.filter((u,p)=>p!==j))},A=(j,_,u)=>{N.current=!0,k(y.map((p,g)=>{if(g!==j)return p;const w={...p,[_]:u};return _==="task_id"&&(w.dataset_id="",w.metric_name="",w.harness=""),_==="dataset_id"&&(w.metric_name="",u&&!V(w.task_id,u)&&(w.harness="")),p.operation==="unchanged"&&(w.operation="update"),w}))},I=(j,_)=>{N.current=!0,k(y.map((u,p)=>{if(p!==j)return u;const g={...u,is_open:_};return u.operation==="unchanged"&&(g.operation="update"),g}))},X=()=>{const j=y.filter(_=>_.operation!=="delete"||_.id);b.mutate({paperId:a,evaluations:j})};return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Evaluation Results"}),e.jsx(Ce,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[y.filter(j=>j.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:`text-left py-2 px-2 font-medium text-sm ${h?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),h&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:y.map((j,_)=>{if(j.operation==="delete")return null;const u=v.get(j.task_id),p=U.get(j.dataset_id),g=Z(j.task_id,j.dataset_id,j.metric_name),w=!!(j.task_id&&j.dataset_id)&&B.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsx(fs,{value:j.task_id,onChange:S=>A(_,"task_id",S),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:u?{value:u.id,label:u.name}:null,queryKey:["eval-edit-task-search"],queryFn:O,enabled:t})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(fs,{value:j.dataset_id,onChange:S=>A(_,"dataset_id",S),placeholder:j.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:j.task_id?"No datasets found for this task.":"Select a task first.",disabled:!j.task_id,selectedOption:p?{value:p.id,label:p.name}:null,queryKey:["eval-edit-dataset-search",j.task_id],queryFn:z(j.task_id),enabled:t&&!!j.task_id})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ie,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:j.model_name,onChange:S=>A(_,"model_name",S.target.value)})}),h&&e.jsx("td",{className:"py-2 px-2",children:V(j.task_id,j.dataset_id)?e.jsx(ie,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:j.harness,onChange:S=>A(_,"harness",S.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsx("td",{className:"py-2 px-2",children:!j.task_id||!j.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):w?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(le,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):g.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",value:j.metric_name,onChange:S=>A(_,"metric_name",S.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),g.map(S=>e.jsx("option",{value:S.value,children:S.label},S.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ie,{type:"text",className:"w-full text-sm",placeholder:"44.9",value:j.metric_value,onChange:S=>A(_,"metric_value",S.target.value)})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ie,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",value:j.num_parameters,onChange:S=>A(_,"num_parameters",S.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ie,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:j.hf_model_url,onChange:S=>A(_,"hf_model_url",S.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:j.is_open,onChange:S=>I(_,S.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>F(_),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Delete row",children:e.jsx(Ft,{className:"w-4 h-4"})})})]},_)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(wa,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(K,{variant:"outline",size:"sm",onClick:R,className:"flex items-center space-x-2",children:[e.jsx(At,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(Ee,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(K,{variant:"ghost",onClick:()=>E("benchmark"),children:"Suggest a new benchmark"}),e.jsx(K,{variant:"ghost",onClick:()=>E("metric"),children:"Suggest a new metric"})]}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:X,disabled:b.isPending,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:P!==null,onOpenChange:j=>{j||E(null)},paperId:a,kind:P??"benchmark"})]})}const Te=["my-bookmark-ids"];function ri(){var c,n;const{user:t}=ct(),s=oe({queryKey:Te,queryFn:()=>ot.getMyBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Rt.useMemo(()=>{var o;return new Set(((o=s.data)==null?void 0:o.paper_ids)??[])},[(c=s.data)==null?void 0:c.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function ai(){const{user:t}=ct(),s=je(),a=Se({mutationFn:async({paperId:n,isBookmarked:o})=>{o?await ot.removeBookmark(n):await ot.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:o})=>{await s.cancelQueries({queryKey:Te});const l=s.getQueryData(Te),m=typeof n=="string"?Number(n):n,r=(l==null?void 0:l.paper_ids)??[],h=o?r.filter(y=>y!==m):[m,...r.filter(y=>y!==m)];return s.setQueryData(Te,{paper_ids:h}),{previous:l}},onError:(n,o,l)=>{l!=null&&l.previous&&s.setQueryData(Te,l.previous)},onSettled:()=>{s.invalidateQueries({queryKey:Te}),s.invalidateQueries({queryKey:["my-bookmarks"]})}});return{toggle:Rt.useCallback((n,o)=>{if(!t){if(Ss())return;const l=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Ps(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(l)}`);return}a.mutate({paperId:n,isBookmarked:o})},[a,t]),isPending:a.isPending}}const ni=({paperId:t})=>{const{user:s}=ct(),{idSet:a}=ri(),{toggle:c,isPending:n}=ai();if(Ss())return null;const o=Number(t),l=!!s&&a.has(o),m=()=>{Number.isFinite(o)&&c(o,l)},r=s&&l?"Saved":"Save",h=s?l?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${l?" is-saved":""}`,onClick:m,disabled:n,"aria-pressed":l,"aria-label":h,title:h,children:[e.jsx(ee,{name:"bookmark",size:12}),r]})};function nt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:c}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":c,children:"edit"})]}):t}const ii={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:Ra,get:Pa,cancel:Sa},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:Ea,get:Ca,cancel:Na}};function oi({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Fa,{remarkPlugins:[$a],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function mr({kind:t,paperId:s,paperTitle:a,triggerClassName:c,onComplete:n}){const o=ii[t],[l,m]=i.useState(!1),[r,h]=i.useState(null),[y,k]=i.useState(!1),[P,E]=i.useState(null),v=i.useRef(null),$=(r==null?void 0:r.status)==="queued"||(r==null?void 0:r.status)==="dispatching"||(r==null?void 0:r.status)==="running",U=r==null?void 0:r.id;i.useEffect(()=>{if(!$||!U)return;let D=!1;const N=window.setInterval(async()=>{try{const f=await o.get(U);D||(h(f),E(null))}catch(f){D||E(f instanceof Error?f.message:"Could not check job status.")}},2e3);return()=>{D=!0,window.clearInterval(N)}},[$,o,U]),i.useEffect(()=>{(r==null?void 0:r.status)!=="completed"||v.current===r.id||(v.current=r.id,n())},[r,n]);const T=async()=>{k(!0),E(null);try{h(await o.start(s))}catch(D){E(D instanceof Error?D.message:"Could not start Codex.")}finally{k(!1)}},L=()=>{h(null),E(null),v.current=null},q=async()=>{if(r){E(null);try{h(await o.cancel(r.id))}catch(D){E(D instanceof Error?D.message:"Could not cancel Codex.")}}};return e.jsxs(ke,{open:l,onOpenChange:m,children:[e.jsx("button",{type:"button",className:c,onClick:()=>m(!0),children:$?o.running:(r==null?void 0:r.status)==="completed"?o.complete:o.trigger}),e.jsxs(_e,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(we,{className:"min-w-0",children:[e.jsx(Ne,{children:o.title}),e.jsx(Ce,{children:o.description(a)})]}),r?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",r.status]}),r.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:r.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),$&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[r.status==="queued"?"This job is queued and will start after the current Codex job finishes.":o.progress," ","This can take several minutes; you can close this window and return."]}),r.report&&e.jsx(oi,{report:r.report}),r.error&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:r.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:o.notice}),P&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:P}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>m(!1),children:$?"Close":"Cancel"}),$&&e.jsx(K,{variant:"outline",onClick:()=>void q(),children:"Cancel job"}),!r&&e.jsx(K,{onClick:T,disabled:y,children:y?"Starting…":o.action}),r&&!$&&e.jsx(K,{variant:"outline",onClick:L,children:"Run again"})]})]})]})}function li(t){return e.jsx(mr,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function ci(t){return e.jsx(mr,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const di={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","source-url":"source URL"},it=360,_t=3,ui=3,mi=["tldr","abstract","tasks","methods","results"];function pi(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!mi.includes(s))return{section:null,resultsTaskSlug:null};const c=s;return c!=="results"||!a?{section:c,resultsTaskSlug:null}:{section:c,resultsTaskSlug:new URLSearchParams(a).get("task")}}function vs(t){return`results-task-${t}`}function hi(t){return`#results?task=${encodeURIComponent(t)}`}function He({id:t,label:s,accent:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:t,children:[e.jsx("span",{children:e.jsx("a",{href:`#${t}`,className:"section-anchor-link",children:s})}),a]})}function bs(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function js(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ys(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const Bi=()=>{var Zt,es,ts,ss,rs,as,ns,is,os;const{arxivId:t}=Gr(),s=t?Wr(t):"",a=Jr(),{toast:c}=ye(),{user:n}=ct(),o=(n==null?void 0:n.is_admin)??!1,l=!!n,m=!0,{data:r,isLoading:h,error:y,refetch:k}=fa(s||"",!!s),[P,E]=i.useState(!1);i.useEffect(()=>{if(!t||t===s)return;const d=window.location.search+window.location.hash;a(`/paper/${s}${d}`,{replace:!0})},[s,a,t]),i.useEffect(()=>{if(r!=null&&r.title)return document.title=pa(r.title),()=>{document.title=ha}},[r==null?void 0:r.title]),i.useEffect(()=>{if(E(!1),!(r!=null&&r.id))return;const d=window.setTimeout(()=>E(!0),0);return()=>window.clearTimeout(d)},[r==null?void 0:r.id]);const{data:v,isLoading:$}=Oa(P?r==null?void 0:r.arxiv_id:void 0),{data:U,isLoading:T,refetch:L}=Da(r==null?void 0:r.id,P&&!!(r!=null&&r.id)),{preferences:q}=Xr(),D=i.useMemo(()=>!U||!q.hide_closed_source_evals?U:U.filter(d=>d.is_open!==!1),[U,q.hide_closed_source_evals]),N=i.useMemo(()=>({models:(r==null?void 0:r.hf_models)??[],datasets:(r==null?void 0:r.hf_datasets)??[],spaces:(r==null?void 0:r.hf_spaces)??[]}),[r==null?void 0:r.hf_models,r==null?void 0:r.hf_datasets,r==null?void 0:r.hf_spaces]),f=i.useMemo(()=>{const d=(C,Q,J)=>{const fe=new Set,se=[];for(const re of[...C,...Q??[]])if(!fe.has(re)&&(fe.add(re),se.push({href:re,label:ys(re,J)}),se.length>=ui))break;return se};return{models:d(N.models,v==null?void 0:v.modelUrls,"Model"),datasets:d(N.datasets,v==null?void 0:v.datasetUrls,"Dataset"),spaces:d(N.spaces,v==null?void 0:v.spaceUrls,"Space")}},[N.models,N.datasets,N.spaces,v==null?void 0:v.modelUrls,v==null?void 0:v.datasetUrls,v==null?void 0:v.spaceUrls]),x=i.useMemo(()=>{if(!D)return[];const d=new Map;for(const C of D){const Q=C.task_id,J=d.get(Q);J?J.rows.push(C):d.set(Q,{taskId:Q,taskName:C.task_name||"—",taskSlug:C.task_slug,rows:[C]})}return Array.from(d.values())},[D]),M=i.useMemo(()=>x.map(d=>d.taskSlug??"").join("|"),[x]),B=oe({queryKey:["paper-versions",r==null?void 0:r.arxiv_id],queryFn:async()=>{const d=r.arxiv_id.replace(/v\d+$/,""),C=await fetch(Ps(`/api/v1/papers/arxiv/${d}/versions`));return C.ok?await C.json():[]},enabled:P&&!!(r!=null&&r.arxiv_id),staleTime:10*60*1e3}),O=oe({queryKey:["related-papers",r==null?void 0:r.id],queryFn:()=>ot.getRelatedPapers(r.arxiv_id||r.id,4),enabled:P&&!!(r!=null&&r.id),staleTime:10*60*1e3}),[z,V]=i.useState(!1),[Z,b]=i.useState(!1),[R,F]=i.useState(!1),A=i.useRef(!1);i.useEffect(()=>{A.current=!1},[s]),i.useEffect(()=>{let d=0;const C=(J=!1,fe=!1)=>{const{section:se,resultsTaskSlug:re}=pi(window.location.hash.slice(1));if(!se||!r||se==="tldr"&&!r.tldr||se==="results"&&(!P||T)||!J&&A.current)return;let Ae=null;if(se==="results"&&re){if(Ae=document.getElementById(vs(re)),!Ae){if(x.find(Cr=>Cr.taskSlug===re))return;Ae=document.getElementById("results")}}else Ae=document.getElementById(se);if(!Ae)return;const Nr=Ae;d=window.requestAnimationFrame(()=>{A.current=!0,Nr.scrollIntoView({block:"start",behavior:fe?"smooth":"auto"})})};C();const Q=()=>{A.current=!1,C(!0,!0)};return window.addEventListener("hashchange",Q),()=>{window.removeEventListener("hashchange",Q),d&&window.cancelAnimationFrame(d)}},[r,r==null?void 0:r.tldr,P,T,M,x]);const{isEditingTasks:I,setIsEditingTasks:X,isEditingMethods:j,setIsEditingMethods:_,isEditingRepositories:u,setIsEditingRepositories:p,isEditingProjectPages:g,setIsEditingProjectPages:w,isEditingEvaluations:S,setIsEditingEvaluations:H,isEditingSourceUrl:G,setIsEditingSourceUrl:W}=Ha(),[ce,Ut]=i.useState(null),Pe=i.useMemo(()=>{if(!n||!(r!=null&&r.author_links))return!1;const d=n.username.toLowerCase();return r.author_links.some(C=>!!C.hf_username&&C.hf_username.toLowerCase()===d)},[n,r==null?void 0:r.author_links]),Re=o?"direct":"pending",ne=d=>{if(!l){Ut(d);return}switch(d){case"tasks":X(!0);return;case"methods":_(!0);return;case"results":H(!0);return;case"repositories":p(!0);return;case"project-pages":w(!0);return;case"source-url":W(!0);return}},[qt,pt]=i.useState("idle"),[Bt,Ot]=i.useState(null),[Ht,Kt]=i.useState(null),pr=async()=>{if(s){pt("indexing"),Ot(null),Kt(null);try{await aa(s),c({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>k(),1200),pt("idle")}catch(d){const C=d;let Q=C.message||"Failed to index paper";if(C.response)try{Q=JSON.parse(C.response).detail||Q}catch{Q=C.response}Ot(Q),(C.status===429||C.status===503)&&Kt("Try again later after arXiv has lifted the temporary limit."),pt("idle")}}},{citationDisplay:hr,citationCopy:zt}=i.useMemo(()=>{if(!r)return{citationDisplay:"",citationCopy:""};const d=`${r.title.slice(0,60)}${r.title.length>60?"…":""}`,C=`${r.authors[0]||""}${r.authors.length>1?" et al.":""}`,Q=r.authors.join(" and "),J=(r.published||"").slice(0,4)||"—",fe=(se,re)=>r.arxiv_id?`@article{${r.arxiv_id.replace(".","")}, - title={{${se}}}, - author=${re}, - year={{${J}}}, - eprint={{${r.arxiv_id}}}, - archivePrefix={{arXiv}} -}`:`@misc{paper${r.id}, - title={{${se}}}, - author=${re}, - year={{${J}}}, - url={{${r.source_url||r.url_abs||""}}} -}`;return{citationDisplay:fe(d,`{{${C}}}`),citationCopy:fe(r.title,`{${Q}}`)}},[r]),Qt=i.useMemo(()=>La(r==null?void 0:r.leaderboard_ranks),[r==null?void 0:r.leaderboard_ranks]),[fr,Vt]=i.useState(!1),gr=async()=>{if(zt)try{await navigator.clipboard.writeText(zt),Vt(!0),c({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>Vt(!1),1500)}catch{c({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},xr=async()=>{if(!r)return;const d=r.arxiv_id||r.id,C=Ma(d,Qt);if(C)try{await navigator.clipboard.writeText(C),c({title:"PwC badges copied",description:"Each badge links to its highlighted leaderboard row."})}catch{c({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(h)return e.jsxs("div",{className:"page",children:[e.jsx(Ke,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ke,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ke,{className:"h-64 w-full"})]});if(y||!r)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ge,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",s]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",s]})," in the database. You can index it from arXiv right now."]}),Bt&&e.jsx(ga,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(xa,{children:[e.jsx("div",{children:Bt}),Ht&&e.jsx("div",{className:"mt-2",children:Ht})]})}),e.jsxs("div",{className:"action-row",children:[o&&e.jsxs("button",{className:"action-btn",onClick:pr,disabled:qt==="indexing",children:[e.jsx(ee,{name:"sparkle",size:12}),qt==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(K,{variant:"outline",onClick:()=>a("/papers"),children:"Browse Papers"})]})]});const Gt=B.data||[],qe=ma(r.repositories),he=[...r.repositories??[]].sort((d,C)=>{const Q=d.is_official?1:0,J=C.is_official?1:0;return Q!==J?J-Q:(C.num_stars||0)-(d.num_stars||0)}),vr=R?he:he.slice(0,_t),ht=((Zt=r.arxiv_id)==null?void 0:Zt.replace(/v\d+$/,""))??null,ft=r.arxiv_id?{isLoading:$,paperHref:`https://huggingface.co/papers/${ht}`,rows:[{label:"Models",href:Nt(`https://huggingface.co/models?other=arxiv:${r.arxiv_id}`,N.models),count:Ct(N.models,v==null?void 0:v.modelUrls,v==null?void 0:v.models),isLimited:v==null?void 0:v.isLimited,links:f.models},{label:"Datasets",href:Nt(`https://huggingface.co/datasets?other=arxiv:${r.arxiv_id}`,N.datasets),count:Ct(N.datasets,v==null?void 0:v.datasetUrls,v==null?void 0:v.datasets),isLimited:v==null?void 0:v.isLimited,links:f.datasets},{label:"Spaces",href:Nt(`https://huggingface.co/papers/${ht}`,N.spaces),count:Ct(N.spaces,v==null?void 0:v.spaceUrls,v==null?void 0:v.spaces),isLimited:v==null?void 0:v.isLimited,links:f.spaces}],footer:`Cite arxiv.org/abs/${ht} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:wt(N.models),count:N.models.length,links:f.models},{label:"Datasets",href:wt(N.datasets),count:N.datasets.length,links:f.datasets},{label:"Spaces",href:wt(N.spaces),count:N.spaces.length,links:f.spaces}],footer:null},Wt=r.tldr||null,Jt=r.num_pages||null,Ie=r.abstract||"",br=Ie.length>it?Ie.slice(0,it)+"…":Ie,jr=z||Ie.length<=it?Ie:br,Xe=(r.methods||[]).filter(d=>d.source_paper_id===r.id),Ye=r.introduced_benchmarks||[],yr=Xe.length>0||Ye.length>0,Xt=r.arxiv_id?`arXiv:${r.arxiv_id}`:"External resource",kr=r.source==="external"?"Source page":"arXiv page",Be=((es=r.project_pages)==null?void 0:es.filter(d=>d.url))??[],_r=(()=>{const d=[];return Xe.length>0&&d.push(Xe.length===1?"this method":"these methods"),Ye.length>0&&d.push(Ye.length===1?"this benchmark":"these benchmarks"),d.length===0?"":d.length===1?d[0]:d.join(" and ")})(),Ze=r.predecessor_papers||[],et=r.successor_papers||[],wr=Ze.length>0||et.length>0,tt=12,gt=r.authors.map((d,C)=>{var Q,J;return{name:d,hf_username:((J=(Q=r.author_links)==null?void 0:Q[C])==null?void 0:J.hf_username)??null}}),Yt=Z||gt.length<=tt?gt:gt.slice(0,tt);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ge,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:Xt})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsx("h1",{className:"detail-title",children:e.jsx(st,{title:r.title})}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:Xt}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",bs(r.published)]}),Jt&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Jt," pages"]})]}),r.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[r.citation_count.toLocaleString()," citations"]})]}),(r.proceeding||r.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),r.conference_slug?e.jsx("a",{href:`/conferences/${r.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(r.proceeding||r.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:r.proceeding.replace(/\s+\d{1,2}$/,"")})]}),Gt.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:r.version,onChange:d=>{const C=d.target.value;r.arxiv_id&&a(`/paper/${r.arxiv_id.replace(/v\d+$/,"")}${C?`?version=${C}`:""}`)},children:Gt.map(d=>e.jsxs("option",{value:d.version,children:[d.version," — ",bs(d.published)]},d.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Yt.map((d,C)=>e.jsxs(Rt.Fragment,{children:[d.hf_username?e.jsx("a",{href:`https://huggingface.co/${d.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${d.hf_username} on Hugging Face`,children:d.name}):e.jsx("a",{children:d.name}),Ctt&&e.jsx("button",{className:"show-more-authors",onClick:()=>b(d=>!d),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:Z?"show fewer":`+${r.authors.length-tt} more`})]}),e.jsxs("div",{className:"action-row",children:[r.url_pdf&&e.jsxs("a",{className:"action-btn",href:r.url_pdf,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ee,{name:"pdf",size:12})," View PDF"]}),r.url_abs&&e.jsx(nt,{showEdit:r.source==="external"&&m,onEdit:()=>ne("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:r.source==="external"&&m?"action-btn-segment action-btn-main":"action-btn",href:r.url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ee,{name:"external",size:12})," ",kr]})}),ft.paperHref&&(v==null?void 0:v.paperExists)&&e.jsxs("a",{className:"bm-action-btn",href:ft.paperHref,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Hugging Face",children:["View on ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})]}),qe.githubUrl&&e.jsx(nt,{showEdit:m,onEdit:()=>ne("repositories"),editAriaLabel:"Edit code repositories",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:qe.githubUrl,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ee,{name:"github",size:12})," Code",qe.github!=null&&e.jsxs("span",{style:{opacity:.7,marginLeft:4},children:["· ",js(qe.github)," ★"]})]})}),qe.githubUrl?null:e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>ne("repositories"),title:"Add GitHub repository",children:[e.jsx(ee,{name:"github",size:12})," Add code"]}),Be.length===1?e.jsx(nt,{showEdit:m,onEdit:()=>ne("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Be[0].url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ee,{name:"globe",size:12})," Project page"]})}):null,Be.length>1?e.jsx(nt,{showEdit:m,onEdit:()=>ne("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Yr,{children:[e.jsx(Zr,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(ee,{name:"globe",size:12})," Project page"]})}),e.jsx(ea,{align:"start",className:"project-page-menu",children:Be.map((d,C)=>e.jsx(ta,{asChild:!0,children:e.jsx("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",children:ys(d.url,`Project page ${C+1}`)})},d.url))})]})}):null,Be.length===0&&l?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>ne("project-pages"),title:"Add project page",children:[e.jsx(ee,{name:"globe",size:12})," Add project page"]}):null,r.conference_url_abs&&e.jsxs("a",{className:"action-btn",href:r.conference_url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ee,{name:"external",size:12})," Conference"]}),(r.organizations||[]).map(d=>e.jsxs(ge,{to:`/${d.slug}`,className:"action-btn",title:d.name,"aria-label":d.name,children:[d.logo_url&&e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:16,width:16,borderRadius:3,overflow:"hidden"},children:e.jsx("img",{src:d.logo_url,alt:"",style:{height:"150%",width:"150%",objectFit:"contain"},onError:C=>{C.currentTarget.style.display="none"}})}),d.name]},d.id)),o&&Ia()&&e.jsx(ci,{paperId:r.id,paperTitle:r.title,onComplete:()=>void k()}),e.jsx(ni,{paperId:r.id})]}),r.leaderboard_ranks&&r.leaderboard_ranks.length>0&&e.jsx(na,{wrap:!0,paperHref:`/paper/${r.arxiv_id||r.id}`,ranks:r.leaderboard_ranks.filter(d=>d.best_rank>=1&&d.best_rank<=3).map(d=>({name:d.dataset_name,slug:d.dataset_slug||null,rank:d.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(ia,{paperId:r.arxiv_id||r.id,title:r.title,thumbnailUrl:sa(r.thumbnail_url),priority:!0})})]}),yr&&e.jsxs("div",{className:"introduced-banner",children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Xe.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/methods/${d.slug||d.id}`),children:[d.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${d.id}`)),Ye.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/benchmark/${d.slug||d.id}`),children:[d.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${d.id}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",_r,"."]})]}),wr&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[et.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:et.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:et.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${d.route_identifier}`),children:[e.jsx(st,{title:d.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${d.id}`))})]}),Ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ze.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:Ze.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${d.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(st,{title:d.title})]},`predecessor-${d.id}`))})]})]}),Wt&&e.jsxs(e.Fragment,{children:[e.jsx(He,{id:"tldr",label:"TL;DR · AI-generated"}),e.jsx("div",{className:"tldr-box",children:Wt})]}),e.jsx(He,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(ua,{text:jr})}),Ie.length>it&&e.jsx("div",{className:"read-full",onClick:()=>V(d=>!d),children:z?"− collapse abstract":"+ read full abstract"}),e.jsx(He,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((ts=r.tasks)==null?void 0:ts.length)||0," tagged",e.jsx("button",{type:"button",onClick:()=>ne("tasks"),className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks||[]).map(d=>e.jsx(oa,{slug:d.slug||"",label:d.name},d.id))}),e.jsx(He,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((ss=r.methods)==null?void 0:ss.length)||0," used",e.jsx("button",{type:"button",onClick:()=>ne("methods"),className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods||[]).map(d=>e.jsx(la,{method:d},d.id))}),e.jsx(He,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[(D==null?void 0:D.length)||0," benchmarks",Qt.length>0&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:xr,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(ee,{name:"copy",size:10})," Copy PwC badge"]}),o&&Aa()&&e.jsx(li,{paperId:r.id,paperTitle:r.title,onComplete:()=>void L()}),e.jsx("button",{type:"button",onClick:()=>ne("results"),className:"edit-link",children:"edit"})]})}),T?e.jsx(Ke,{className:"h-32 w-full"}):x.length>0?x.map(d=>e.jsxs("div",{className:d.taskSlug?"paper-section-anchor":void 0,id:d.taskSlug?vs(d.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:d.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(ge,{to:`/tasks/${d.taskSlug}`,children:d.taskName}),e.jsx("a",{href:hi(d.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${d.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):d.taskName}),e.jsxs("span",{className:"accent",children:[d.rows.length," ",d.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:d.rows.map(C=>{var Q;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:C.dataset_slug?e.jsx(ge,{to:`/benchmark/${C.dataset_slug}`,children:C.dataset_name||"—"}):C.dataset_name||"—"}),e.jsxs("td",{className:"model",title:C.model_name||void 0,children:[C.hf_model_url?e.jsx("a",{href:C.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${C.model_name||"model"} on Hugging Face`,children:C.model_name||"—"}):C.model_name||"—",C.is_open===!1&&e.jsx(ca,{}),(C.external??C.is_external)&&e.jsx(da,{sourceUrl:C.source_url||C.external_source_url||C.result_url})]}),e.jsx("td",{className:"metric",children:C.best_metric}),e.jsx("td",{className:"value",children:ra((Q=C.metrics)==null?void 0:Q[C.best_metric||""])}),e.jsx("td",{className:"rank",children:C.best_rank!=null?`#${C.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:C.dataset_slug&&e.jsx(ge,{to:`/benchmark/${C.dataset_slug}?${[C.task_slug?`task=${encodeURIComponent(C.task_slug)}`:"",`eval=${encodeURIComponent(C.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},C.id)})})]})]},d.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]}),e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[he.length," repo",he.length===1?"":"s",e.jsx("button",{type:"button",onClick:()=>ne("repositories"),className:"edit-link",children:"edit"})]})]}),vr.map(d=>e.jsxs("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(ee,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[d.owner,"/",d.name]}),d.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",js(d.num_stars)]})]},d.id)),he.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),he.length>_t&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>F(d=>!d),children:R?"− show top 3":`+ show ${he.length-_t} more repos`})]}),e.jsx(fi,{viewer:ft}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:gr,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(ee,{name:"copy",size:11}),fr?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:hr})]}),O.isLoading&&e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}),!O.isLoading&&(((rs=O.data)==null?void 0:rs.length)??0)>0&&e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),O.data.map(d=>e.jsxs(ge,{to:`/paper/${d.arxiv_id||d.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(st,{title:d.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:d.arxiv_id?`arXiv:${d.arxiv_id}`:"External resource"}),d.citation_count!=null&&e.jsxs("span",{children:[d.citation_count.toLocaleString()," cites"]})]})]},d.id))]})]})]}),e.jsx(Xa,{open:I,onOpenChange:X,paperId:r.id,arxivId:s,initialTaskIds:((as=r.tasks)==null?void 0:as.map(d=>parseInt(d.id)))||[],initialTasks:r.tasks||[],submitMode:Re,isAuthor:Pe}),e.jsx(en,{open:j,onOpenChange:_,paperId:r.id,arxivId:s,initialMethodIds:((ns=r.methods)==null?void 0:ns.map(d=>parseInt(d.id)))||[],initialMethods:r.methods||[],submitMode:Re,isAuthor:Pe}),e.jsx(tn,{open:u,onOpenChange:p,paperId:r.id,arxivId:s,initialRepositories:((is=r.repositories)==null?void 0:is.map(d=>({url:d.url,is_official:d.is_official||!1})))||[],submitMode:Re,isAuthor:Pe}),e.jsx(sn,{open:g,onOpenChange:w,paperId:r.id,arxivId:s,initialProjectPages:((os=r.project_pages)==null?void 0:os.map(d=>({url:d.url,is_official:d.is_official||!1})))||[],submitMode:Re,isAuthor:Pe}),e.jsx(si,{open:S,onOpenChange:H,paperId:r.id,arxivId:s,initialEvaluations:U||[],paperTasks:r.tasks||[],submitMode:Re,isAuthor:Pe}),e.jsx(rn,{open:G,onOpenChange:W,paperId:r.id,arxivId:s,initialUrl:r.source_url??r.url_abs??"",submitMode:Re,isAuthor:Pe}),e.jsx(_a,{open:ce!==null,onOpenChange:d=>{d||Ut(null)},sectionLabel:ce?di[ce]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})},fi=({viewer:t})=>e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:t.paperHref?e.jsx("a",{href:t.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"})}),t.isLoading?e.jsx(Ke,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[t.rows.map(s=>e.jsx(gi,{...s},s.label)),t.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:t.footer})]})]}),gi=({label:t,href:s,count:a,isLimited:c,links:n})=>{const o=((n==null?void 0:n.length)??0)>0,l=a!=null?`${a}${c?"+":""}`:"—",m=a?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:l}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:l});return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:t}),m]}),o&&e.jsx("div",{className:"hf-artifact-links",children:n.map(r=>e.jsx("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",children:r.label},r.href))})]})};function wt(t){return t[0]??"https://huggingface.co"}function Nt(t,s){return s[0]??t}function Ct(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const c=new Set([...t,...s??[]]);return Math.max(a??0,c.size)}export{Bi as default}; diff --git a/assets/PaperDetailView-xIdW2JSy.js b/assets/PaperDetailView-xIdW2JSy.js new file mode 100644 index 0000000000000000000000000000000000000000..75f3cf0959dcff2221e6b24f702e25f98306a7b8 --- /dev/null +++ b/assets/PaperDetailView-xIdW2JSy.js @@ -0,0 +1,38 @@ +import{f as Ve,g as Er,r as i,j as e,P as Pt,h as se,k as ks,l as lt,m as xe,n as Sr,o as _s,C as he,p as ae,q as je,s as ye,X as ws,t as De,v as Pr,w as Ns,x as Rr,y as Ir,z as Ar,A as Fr,B as $r,D as Le,R as Tr,E as ve,F as Cs,G as Es,H as Lr,I as Mr,J as Dr,K as Ur,M as qr,N as Br,O as Or,Q as Hr,S as ls,T as Kr,U as zr,V as Qr,W as Vr,e as ct,Y as Rt,b as ot,Z as Ss,c as Ps,d as Gr,_ as Wr,a as Jr,$ as Xr,L as ue,a0 as Yr,a1 as Zr,a2 as ea,a3 as ta,a4 as sa,a5 as ra,a6 as aa}from"./index-CSNOTM3s.js";import{u as le}from"./useQuery-DCf2mroJ.js";import{I as te,S as na,a as ia,T as oa,M as la}from"./components-PxXQJAWo.js";import{C as ca,E as da}from"./ExternalSourceEvalBadge-CuljE-w8.js";import{L as st,a as ua}from"./LatexTitle-D0X1MVE6.js";import{c as ma}from"./transform-BGwKHn4w.js";import{f as pa,D as ha}from"./latexPlainText-ChVkH0gY.js";import{a as fa}from"./usePapers-CFugWskp.js";import{S as Ke}from"./skeleton-DIecj65I.js";import{A as ga,a as xa}from"./alert-DuO9Nm7q.js";import{B as K}from"./button-KGqIZs29.js";import{u as va}from"./index-CAtHIP-4.js";import{I as oe}from"./textarea-BajbF2-p.js";import{D as ke,a as _e,b as we,c as Ne,d as Ce,e as Ee,R as ba,P as ja,O as ya,C as ka}from"./dialog-CQwQlPi_.js";import{u as Se}from"./useMutation-D90cYkan.js";import{S as It,P as At,a as _a}from"./SignInToEditDialog-qIIvqqtG.js";import{L as ce}from"./loader-circle-BCRahFjZ.js";import{B as Rs,D as wa,c as Na,g as Ca,s as Ea,a as Sa,b as Pa,d as Ra,i as Ia,e as Aa}from"./codexAddEvals-DqYnwrnj.js";import{G as cs}from"./github-x66pH1Ze.js";import{M as Fa,r as $a}from"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-_jD1bF9N.js";/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ta=Ve("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ds=Ve("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qe=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Is=Ve("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ft=Ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function La(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function Ma(t,s,a="https://paperswithcode.co"){return s.map(c=>{const n=encodeURIComponent(c.evaluation_id),o=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,l=new URLSearchParams({task:c.task_slug,eval:c.evaluation_id}),m=`${a}/benchmark/${encodeURIComponent(c.dataset_slug)}?${l.toString()}`;return`[![${`Papers with Code: ${c.best_rank===1?"SOTA":`#${c.best_rank}`} on ${c.dataset_name}`}](${o})](${m})`}).join(` +`)}function Da(t,s=!0){return le({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return Er(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const As=t=>t.replace(/v\d+$/,""),Ua={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},xt=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},vt=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(c=>{if(typeof c=="string")return c;if(c&&typeof c=="object"){const n=c;return n.id||n.repoId||null}return null}).filter(c=>!!c).map(c=>`${Ua[s]}${c}`):[]},qa=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${As(t)}`)).ok}catch{return!1}},Ba=async t=>{const s=As(t),[a,c]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async m=>m.ok?m.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${m.status}`),null)).catch(m=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,m),null)),qa(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:c};const n=xt(a,"models"),o=xt(a,"datasets"),l=xt(a,"spaces");return{models:n.count,datasets:o.count,spaces:l.count,modelUrls:vt(a,"models"),datasetUrls:vt(a,"datasets"),spaceUrls:vt(a,"spaces"),isLimited:n.isLimited||o.isLimited||l.isLimited,paperExists:c}},Oa=t=>le({queryKey:["huggingface-repos",t],queryFn:()=>Ba(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function Ha(){const[t,s]=i.useState(!1),[a,c]=i.useState(!1),[n,o]=i.useState(!1),[l,m]=i.useState(!1),[r,h]=i.useState(!1),[y,k]=i.useState(!1);return{isEditingTasks:t,openTasksDialog:()=>s(!0),closeTasksDialog:()=>s(!1),setIsEditingTasks:s,isEditingMethods:a,openMethodsDialog:()=>c(!0),closeMethodsDialog:()=>c(!1),setIsEditingMethods:c,isEditingRepositories:n,openRepositoriesDialog:()=>o(!0),closeRepositoriesDialog:()=>o(!1),setIsEditingRepositories:o,isEditingProjectPages:l,openProjectPagesDialog:()=>m(!0),closeProjectPagesDialog:()=>m(!1),setIsEditingProjectPages:m,isEditingEvaluations:r,openEvaluationsDialog:()=>h(!0),closeEvaluationsDialog:()=>h(!1),setIsEditingEvaluations:h,isEditingSourceUrl:y,openSourceUrlDialog:()=>k(!0),closeSourceUrlDialog:()=>k(!1),setIsEditingSourceUrl:k}}var dt="Checkbox",[Ka]=_s(dt),[za,$t]=Ka(dt);function Qa(t){const{__scopeCheckbox:s,checked:a,children:c,defaultChecked:n,disabled:o,form:l,name:m,onCheckedChange:r,required:h,value:y="on",internal_do_not_use_render:k}=t,[P,E]=ks({prop:a,defaultProp:n??!1,onChange:r,caller:dt}),[v,$]=i.useState(null),[U,T]=i.useState(null),L=i.useRef(!1),q=v?!!l||!!v.closest("form"):!0,D={checked:P,disabled:o,setChecked:E,control:v,setControl:$,name:m,form:l,value:y,hasConsumerStoppedPropagationRef:L,required:h,defaultChecked:me(n)?!1:n,isFormControl:q,bubbleInput:U,setBubbleInput:T};return e.jsx(za,{scope:s,...D,children:Va(k)?k(D):c})}var Fs="CheckboxTrigger",$s=i.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...c},n)=>{const{control:o,value:l,disabled:m,checked:r,required:h,setControl:y,setChecked:k,hasConsumerStoppedPropagationRef:P,isFormControl:E,bubbleInput:v}=$t(Fs,t),$=lt(n,y),U=i.useRef(r);return i.useEffect(()=>{const T=o==null?void 0:o.form;if(T){const L=()=>k(U.current);return T.addEventListener("reset",L),()=>T.removeEventListener("reset",L)}},[o,k]),e.jsx(se.button,{type:"button",role:"checkbox","aria-checked":me(r)?"mixed":r,"aria-required":h,"data-state":Us(r),"data-disabled":m?"":void 0,disabled:m,value:l,...c,ref:$,onKeyDown:xe(s,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:xe(a,T=>{k(L=>me(L)?!0:!L),v&&E&&(P.current=T.isPropagationStopped(),P.current||T.stopPropagation())})})});$s.displayName=Fs;var Tt=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:c,checked:n,defaultChecked:o,required:l,disabled:m,value:r,onCheckedChange:h,form:y,...k}=t;return e.jsx(Qa,{__scopeCheckbox:a,checked:n,defaultChecked:o,disabled:m,required:l,onCheckedChange:h,name:c,form:y,value:r,internal_do_not_use_render:({isFormControl:P})=>e.jsxs(e.Fragment,{children:[e.jsx($s,{...k,ref:s,__scopeCheckbox:a}),P&&e.jsx(Ds,{__scopeCheckbox:a})]})})});Tt.displayName=dt;var Ts="CheckboxIndicator",Ls=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:c,...n}=t,o=$t(Ts,a);return e.jsx(Pt,{present:c||me(o.checked)||o.checked===!0,children:e.jsx(se.span,{"data-state":Us(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});Ls.displayName=Ts;var Ms="CheckboxBubbleInput",Ds=i.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:c,hasConsumerStoppedPropagationRef:n,checked:o,defaultChecked:l,required:m,disabled:r,name:h,value:y,form:k,bubbleInput:P,setBubbleInput:E}=$t(Ms,t),v=lt(a,E),$=va(o),U=Sr(c);i.useEffect(()=>{const L=P;if(!L)return;const q=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(q,"checked").set,f=!n.current;if($!==o&&C){const x=new Event("click",{bubbles:f});L.indeterminate=me(o),C.call(L,me(o)?!1:o),L.dispatchEvent(x)}},[P,$,o,n]);const T=i.useRef(me(o)?!1:o);return e.jsx(se.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??T.current,required:m,disabled:r,name:h,value:y,form:k,...s,tabIndex:-1,ref:v,style:{...s.style,...U,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ds.displayName=Ms;function Va(t){return typeof t=="function"}function me(t){return t==="indeterminate"}function Us(t){return me(t)?"indeterminate":t?"checked":"unchecked"}const Lt=i.forwardRef(({className:t,style:s,...a},c)=>e.jsx(Tt,{ref:c,className:ae("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(Ls,{className:ae("flex items-center justify-center text-current"),children:e.jsx(he,{className:"h-4 w-4"})})}));Lt.displayName=Tt.displayName;function Ga(t,s,a){if(!t)return t;const c=n=>n.paper_id!==s||n.paper_title===a?n:{...n,paper_title:a};if(Array.isArray(t)){const n=t.map(c);return n.some((l,m)=>l!==t[m])?n:t}if(Array.isArray(t.results)){const n=t.results.map(c);return n.some((l,m)=>l!==t.results[m])?{...t,results:n}:t}return t}function Ge(t,s,a){new Set([...a,s.id,s.arxiv_id].filter(l=>!!l)).forEach(l=>{t.setQueryData(["paper",l],s),t.setQueryData(["paper-arxiv",l],s)}),t.invalidateQueries({queryKey:["papers"],refetchType:"none"}),t.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),t.invalidateQueries({queryKey:["task-papers-infinite"],refetchType:"none"});const n=String(s.id),o=l=>Ga(l,n,s.title);t.setQueriesData({queryKey:["evaluations"]},o),t.setQueriesData({queryKey:["dataset-evals"]},o),t.invalidateQueries({queryKey:["evaluations"],refetchType:"none"}),t.invalidateQueries({queryKey:["dataset-evals"],refetchType:"none"})}function Ue({isAuthor:t=!1}){return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:t?"We can see this paper is yours. While we're in early access an admin still reviews each edit; this will become automatic for authors soon.":"Submissions are queued for review and don't change the paper page until an admin approves them."})]})}const Wa=250,Ja=100;function Xa({open:t,onOpenChange:s,paperId:a,arxivId:c,initialTaskIds:n,initialTasks:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const[h,y]=i.useState(n),[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState(""),[T,L]=i.useState(new Map),q=je(),{toast:D}=ye(),C=i.useRef(!1);i.useEffect(()=>{if(!t){C.current=!1;return}if(C.current)return;C.current=!0,y(n),v(""),U("");const b=new Map;(o||[]).forEach(R=>{const F=parseInt(R.id);Number.isNaN(F)||b.set(F,R)}),L(b)},[t,n,o]),i.useEffect(()=>{const b=window.setTimeout(()=>{U(E.trim())},Wa);return()=>window.clearTimeout(b)},[E]);const{data:f,isFetching:x}=le({queryKey:["tasks-search",$],queryFn:()=>Ns({page_size:Ja,visible_only:!0,...$?{q:$}:{}}),enabled:t});i.useEffect(()=>{var b;(b=f==null?void 0:f.results)!=null&&b.length&&L(R=>{const F=new Map(R);return f.results.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||F.set(I,A)}),F})},[f]);const M=i.useMemo(()=>{const b=(f==null?void 0:f.results)||[],R=new Set,F=[];return h.forEach(A=>{if(R.has(A))return;const I=T.get(A);I&&(F.push(I),R.add(A))}),b.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||R.has(I)||(F.push(A),R.add(I))}),F},[f,h,T]),B=Se({mutationFn:async({paperId:b,taskIds:R})=>m==="pending"?(await De({paper_id:parseInt(b),edit_type:"tasks",proposed_payload:{task_ids:R}}),null):Pr(b,R),onMutate:async({taskIds:b})=>{if(m==="pending")return{snapshots:[]};const R=b.map(I=>T.get(I)).filter(I=>!!I).map(I=>({id:I.id,name:I.name,slug:I.slug})).sort((I,Y)=>I.name.localeCompare(Y.name)),F=Array.from(new Set([a,c].filter(I=>!!I)));await Promise.all(F.flatMap(I=>[q.cancelQueries({queryKey:["paper",I]}),q.cancelQueries({queryKey:["paper-arxiv",I]})]));const A=[];return F.forEach(I=>{["paper","paper-arxiv"].forEach(Y=>{const j=[Y,I],_=q.getQueryData(j);A.push({key:j,data:_}),_&&q.setQueryData(j,{..._,tasks:R})})}),D({title:"Tasks updated",description:`Saved ${b.length} task${b.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1),{snapshots:A}},onSuccess:b=>{if(m==="pending"){D({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),l==null||l(),s(!1);return}b&&Ge(q,b,[a,c])},onError:(b,R,F)=>{var Y,j;(Y=F==null?void 0:F.snapshots)==null||Y.forEach(({key:_,data:u})=>{q.setQueryData(_,u)});const A=b;let I=A.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");if(A.response)try{const _=JSON.parse(A.response);typeof(_==null?void 0:_.detail)=="string"?I=_.detail:Array.isArray(_==null?void 0:_.detail)&&((j=_.detail[0])!=null&&j.msg)&&(I=_.detail[0].msg)}catch{I=A.response}D({title:m==="pending"?"Could not submit edit":"Could not save tasks",description:I,variant:"destructive"})}}),O=()=>{B.mutate({paperId:a,taskIds:h})},z=i.useMemo(()=>{if(h.length!==n.length)return!0;const b=new Set(n);return h.some(R=>!b.has(R))},[h,n]),V=(b,R)=>{y(F=>R?F.includes(b)?F:[...F,b]:F.filter(A=>A!==b))},ee=()=>v("");return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Tasks"}),e.jsx(Ce,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Qe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(oe,{type:"text",placeholder:"Search tasks...",value:E,onChange:b=>v(b.target.value),className:"pl-9 pr-9"}),E&&e.jsx("button",{type:"button",onClick:ee,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ws,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:M.length>0?e.jsx("div",{className:"space-y-2",children:M.map(b=>{const R=parseInt(b.id),F=h.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Lt,{id:`task-${b.id}`,checked:F,onCheckedChange:A=>V(R,A===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${b.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[b.name,b.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[b.description.substring(0,100),b.description.length>100?"...":""]})]})]},b.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ce,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Qe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:$?`No tasks found matching "${$}"`:"No tasks available"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"ghost",className:"sm:mr-auto",onClick:()=>P(!0),children:"Suggest a new task"}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:O,disabled:B.isPending||!z,children:B.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:k,onOpenChange:P,paperId:a,kind:"task"})]})}const Ya=250,Za=100;function en({open:t,onOpenChange:s,paperId:a,arxivId:c,initialMethodIds:n,initialMethods:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const[h,y]=i.useState(n),[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState(""),[T,L]=i.useState(new Map),q=je(),{toast:D}=ye(),C=i.useRef(!1);i.useEffect(()=>{if(!t){C.current=!1;return}if(C.current)return;C.current=!0,y(n),v(""),U("");const b=new Map;(o||[]).forEach(R=>{const F=parseInt(R.id);Number.isNaN(F)||b.set(F,R)}),L(b)},[t,n,o]),i.useEffect(()=>{const b=window.setTimeout(()=>{U(E.trim())},Ya);return()=>window.clearTimeout(b)},[E]);const{data:f,isFetching:x}=le({queryKey:["methods-search",$],queryFn:()=>Ir({page_size:Za,...$?{q:$}:{}}),enabled:t});i.useEffect(()=>{var b;(b=f==null?void 0:f.results)!=null&&b.length&&L(R=>{const F=new Map(R);return f.results.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||F.set(I,A)}),F})},[f]);const M=i.useMemo(()=>{const b=(f==null?void 0:f.results)||[],R=new Set,F=[];return h.forEach(A=>{if(R.has(A))return;const I=T.get(A);I&&(F.push(I),R.add(A))}),b.forEach(A=>{const I=parseInt(A.id);Number.isNaN(I)||R.has(I)||(F.push(A),R.add(I))}),F},[f,h,T]),B=Se({mutationFn:async({paperId:b,methodIds:R})=>m==="pending"?(await De({paper_id:parseInt(b),edit_type:"methods",proposed_payload:{method_ids:R}}),null):Rr(b,R),onSuccess:b=>{if(m==="pending"){D({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),l==null||l(),s(!1);return}b&&Ge(q,b,[a,c]),D({title:"Methods updated",description:`Saved ${h.length} method${h.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1)},onError:b=>{var A;const R=b;let F=R.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");if(R.response)try{const I=JSON.parse(R.response);typeof(I==null?void 0:I.detail)=="string"?F=I.detail:Array.isArray(I==null?void 0:I.detail)&&((A=I.detail[0])!=null&&A.msg)&&(F=I.detail[0].msg)}catch{F=R.response}D({title:m==="pending"?"Could not submit edit":"Could not save methods",description:F,variant:"destructive"})}}),O=()=>{B.mutate({paperId:a,methodIds:h})},z=i.useMemo(()=>{if(h.length!==n.length)return!0;const b=new Set(n);return h.some(R=>!b.has(R))},[h,n]),V=(b,R)=>{y(F=>R?F.includes(b)?F:[...F,b]:F.filter(A=>A!==b))},ee=()=>v("");return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Methods"}),e.jsx(Ce,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Qe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(oe,{type:"text",placeholder:"Search methods...",value:E,onChange:b=>v(b.target.value),className:"pl-9 pr-9"}),E&&e.jsx("button",{type:"button",onClick:ee,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ws,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:M.length>0?e.jsx("div",{className:"space-y-2",children:M.map(b=>{const R=parseInt(b.id),F=h.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Lt,{id:`method-${b.id}`,checked:F,onCheckedChange:A=>V(R,A===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${b.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[b.name,b.full_name&&b.full_name!==b.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:b.full_name}),b.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[b.description.substring(0,100),b.description.length>100?"...":""]})]})]},b.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ce,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Qe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:$?`No methods found matching "${$}"`:"No methods available"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"ghost",className:"sm:mr-auto",onClick:()=>P(!0),children:"Suggest a new method"}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:O,disabled:B.isPending||!z,children:B.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:k,onOpenChange:P,paperId:a,kind:"method"})]})}function ze(t){const s=t.trim();if(!s)return null;let a=s;!a.startsWith("http://")&&!a.startsWith("https://")&&(a=`https://${a}`);try{const c=new URL(a);if(c.hostname.toLowerCase()!=="github.com")return null;const n=c.pathname.split("/").filter(Boolean);if(n.length<2)return null;const o=n[0].toLowerCase();let l=n[1].toLowerCase();return l.endsWith(".git")&&(l=l.slice(0,-4)),`https://github.com/${o}/${l}`}catch{return null}}function us(t,s){const a=ze(t),c=ze(s);return a&&c?a===c:t.trim()===s.trim()}function tn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialRepositories:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),[y,k]=i.useState(""),P=je(),{toast:E}=ye(),v=i.useRef(!1);i.useEffect(()=>{if(!t){v.current=!1;return}v.current||(v.current=!0,h(n),k(""))},[t,n]);const $=Se({mutationFn:async({paperId:x,repositories:M})=>l==="pending"?(await De({paper_id:parseInt(x),edit_type:"repositories",proposed_payload:{repositories:M}}),null):Ar(x,M),onSuccess:x=>{if(l==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),o==null||o(),s(!1),k("");return}x&&Ge(P,x,[a,c]),o==null||o(),s(!1),k("")},onError:x=>{var O;const M=x;let B=M.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");if(M.response)try{const z=JSON.parse(M.response);typeof(z==null?void 0:z.detail)=="string"?B=z.detail:Array.isArray(z==null?void 0:z.detail)&&((O=z.detail[0])!=null&&O.msg)&&(B=z.detail[0].msg)}catch{B=M.response}E({title:l==="pending"?"Could not submit edit":"Could not save repositories",description:B,variant:"destructive"})}}),U=x=>{const M=[];for(const B of x){const O=M.find(z=>us(z.url,B.url));if(O)O.is_official=O.is_official||B.is_official;else{const z=ze(B.url);M.push({url:z??B.url.trim(),is_official:B.is_official})}}return M},T=()=>{const x=y.trim(),M=x?[...r,{url:x,is_official:!1}]:r;return x&&r.some(B=>us(B.url,x))?(alert("This repository URL is already added"),null):U(M)},L=()=>{const x=T();x!==null&&x.length!==r.length&&(h(x),k(""))},q=x=>{h(r.filter(M=>M.url!==x))},D=x=>{h(r.map(M=>M.url===x?{...M,is_official:!M.is_official}:M))},C=()=>{const x=T();x!==null&&$.mutate({paperId:a,repositories:x})},f=i.useMemo(()=>{const x=y.trim(),M=x?[...r,{url:x,is_official:!1}]:r;if(M.length!==n.length)return!0;const B=U(n),O=U(M);if(O.length!==B.length)return!0;const z=new Map(B.map(V=>[ze(V.url)??V.url.trim(),!!V.is_official]));return O.some(V=>{const ee=ze(V.url)??V.url.trim(),b=z.get(ee);return b===void 0||b!==!!V.is_official})},[r,y,n]);return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Repositories"}),e.jsx(Ce,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(oe,{type:"url",placeholder:"https://github.com/owner/repo",value:y,onChange:x=>k(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),L())},className:"flex-1"}),e.jsxs(K,{onClick:L,size:"sm",disabled:!y.trim(),children:[e.jsx(At,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((x,M)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(cs,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:x.url}),x.is_official&&e.jsx(Rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(K,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>D(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(Is,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>q(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Ft,{className:"w-4 h-4"})})]})]},M))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(cs,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:C,disabled:$.isPending||!f,children:$.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function sn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialProjectPages:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),[y,k]=i.useState(""),P=je(),{toast:E}=ye(),v=i.useRef(!1);i.useEffect(()=>{if(!t){v.current=!1;return}v.current||(v.current=!0,h(n),k(""))},[t,n]);const $=Se({mutationFn:async({paperId:f,projectPages:x})=>l==="pending"?(await De({paper_id:parseInt(f),edit_type:"project_pages",proposed_payload:{project_pages:x}}),null):Fr(f,x),onSuccess:f=>{if(l==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),o==null||o(),s(!1),k("");return}f&&Ge(P,f,[a,c]),o==null||o(),s(!1),k("")},onError:f=>{var B;const x=f;let M=x.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");if(x.response)try{const O=JSON.parse(x.response);typeof(O==null?void 0:O.detail)=="string"?M=O.detail:Array.isArray(O==null?void 0:O.detail)&&((B=O.detail[0])!=null&&B.msg)&&(M=O.detail[0].msg)}catch{M=x.response}E({title:l==="pending"?"Could not submit edit":"Could not save project pages",description:M,variant:"destructive"})}}),U=()=>{const f=y.trim();return f?r.some(x=>x.url===f)?(alert("This project page URL is already added"),null):[...r,{url:f,is_official:!1}]:r},T=()=>{const f=U();f!==null&&f.length!==r.length&&(h(f),k(""))},L=f=>{h(r.filter(x=>x.url!==f))},q=f=>{h(r.map(x=>x.url===f?{...x,is_official:!x.is_official}:x))},D=()=>{const f=U();f!==null&&$.mutate({paperId:a,projectPages:f})},C=i.useMemo(()=>{const f=y.trim(),x=f?[...r,{url:f,is_official:!1}]:r;if(x.length!==n.length)return!0;const M=new Map(n.map(B=>[B.url.trim(),!!B.is_official]));return x.some(B=>{const O=M.get(B.url.trim());return O===void 0||O!==!!B.is_official})},[r,y,n]);return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Paper Project Pages"}),e.jsx(Ce,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(oe,{type:"url",placeholder:"https://example.com/project",value:y,onChange:f=>k(f.target.value),onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),T())},className:"flex-1"}),e.jsxs(K,{onClick:T,size:"sm",disabled:!y.trim(),children:[e.jsx(At,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((f,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(ds,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:f.url}),f.is_official&&e.jsx(Rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(K,{variant:f.is_official?"default":"outline",size:"sm",onClick:()=>q(f.url),className:"h-8 px-2 text-xs",title:f.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(Is,{className:`w-3.5 h-3.5 mr-1 ${f.is_official?"fill-current":""}`}),f.is_official?"Official":"Mark official"]}),e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>L(f.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Ft,{className:"w-4 h-4"})})]})]},x))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ds,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:D,disabled:$.isPending||!C,children:$.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function rn({open:t,onOpenChange:s,paperId:a,arxivId:c,initialUrl:n,onSuccess:o,submitMode:l="direct",isAuthor:m=!1}){const[r,h]=i.useState(n),y=je(),{toast:k}=ye(),P=i.useRef(!1);i.useEffect(()=>{if(!t){P.current=!1;return}P.current||(P.current=!0,h(n))},[t,n]);const E=Se({mutationFn:async({paperId:L,sourceUrl:q})=>l==="pending"?(await De({paper_id:parseInt(L),edit_type:"source_url",proposed_payload:{source_url:q}}),null):$r(L,q),onSuccess:L=>{if(l==="pending"){k({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),o==null||o(),s(!1);return}L&&Ge(y,L,[a,c]),o==null||o(),s(!1)},onError:L=>{var C;const q=L;let D=q.message||(l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");if(q.response)try{const f=JSON.parse(q.response);typeof(f==null?void 0:f.detail)=="string"?D=f.detail:Array.isArray(f==null?void 0:f.detail)&&((C=f.detail[0])!=null&&C.msg)&&(D=f.detail[0].msg)}catch{D=q.response}k({title:l==="pending"?"Could not submit edit":"Could not save source URL",description:D,variant:"destructive"})}}),v=r.trim(),$=/^https?:\/\//i.test(v),U=v!==(n||"").trim(),T=()=>{$&&E.mutate({paperId:a,sourceUrl:v})};return e.jsx(ke,{open:t,onOpenChange:s,children:e.jsxs(_e,{className:"max-w-2xl",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Source URL"}),e.jsxs(Ce,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),l==="pending"&&e.jsx(Ue,{isAuthor:m}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(oe,{type:"url",placeholder:"https://example.com/paper",value:r,onChange:L=>h(L.target.value),onKeyPress:L=>{L.key==="Enter"&&$&&U&&(L.preventDefault(),T())}}),!$&&v.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:T,disabled:E.isPending||!$||!U,children:E.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function an(t){const s=nn(t),a=i.forwardRef((c,n)=>{const{children:o,...l}=c,m=i.Children.toArray(o),r=m.find(ln);if(r){const h=r.props.children,y=m.map(k=>k===r?i.Children.count(h)>1?i.Children.only(null):i.isValidElement(h)?h.props.children:null:k);return e.jsx(s,{...l,ref:n,children:i.isValidElement(h)?i.cloneElement(h,void 0,y):null})}return e.jsx(s,{...l,ref:n,children:o})});return a.displayName=`${t}.Slot`,a}function nn(t){const s=i.forwardRef((a,c)=>{const{children:n,...o}=a;if(i.isValidElement(n)){const l=dn(n),m=cn(o,n.props);return n.type!==i.Fragment&&(m.ref=c?Le(c,l):l),i.cloneElement(n,m)}return i.Children.count(n)>1?i.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var on=Symbol("radix.slottable");function ln(t){return i.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===on}function cn(t,s){const a={...s};for(const c in s){const n=t[c],o=s[c];/^on[A-Z]/.test(c)?n&&o?a[c]=(...m)=>{const r=o(...m);return n(...m),r}:n&&(a[c]=n):c==="style"?a[c]={...n,...o}:c==="className"&&(a[c]=[n,o].filter(Boolean).join(" "))}return{...t,...a}}function dn(t){var c,n;let s=(c=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:c.get,a=s&&"isReactWarning"in s&&s.isReactWarning;return a?t.ref:(s=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,a=s&&"isReactWarning"in s&&s.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var ut="Popover",[qs]=_s(ut,[Es]),We=Es(),[un,fe]=qs(ut),Bs=t=>{const{__scopePopover:s,children:a,open:c,defaultOpen:n,onOpenChange:o,modal:l=!1}=t,m=We(s),r=i.useRef(null),[h,y]=i.useState(!1),[k,P]=ks({prop:c,defaultProp:n??!1,onChange:o,caller:ut});return e.jsx(Tr,{...m,children:e.jsx(un,{scope:s,contentId:ve(),triggerRef:r,open:k,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(E=>!E),[P]),hasCustomAnchor:h,onCustomAnchorAdd:i.useCallback(()=>y(!0),[]),onCustomAnchorRemove:i.useCallback(()=>y(!1),[]),modal:l,children:a})})};Bs.displayName=ut;var Os="PopoverAnchor",mn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=fe(Os,a),o=We(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:m}=n;return i.useEffect(()=>(l(),()=>m()),[l,m]),e.jsx(Cs,{...o,...c,ref:s})});mn.displayName=Os;var Hs="PopoverTrigger",Ks=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=fe(Hs,a),o=We(a),l=lt(s,n.triggerRef),m=e.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Ws(n.open),...c,ref:l,onClick:xe(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?m:e.jsx(Cs,{asChild:!0,...o,children:m})});Ks.displayName=Hs;var Mt="PopoverPortal",[pn,hn]=qs(Mt,{forceMount:void 0}),zs=t=>{const{__scopePopover:s,forceMount:a,children:c,container:n}=t,o=fe(Mt,s);return e.jsx(pn,{scope:s,forceMount:a,children:e.jsx(Pt,{present:a||o.open,children:e.jsx(Lr,{asChild:!0,container:n,children:c})})})};zs.displayName=Mt;var Me="PopoverContent",Qs=i.forwardRef((t,s)=>{const a=hn(Me,t.__scopePopover),{forceMount:c=a.forceMount,...n}=t,o=fe(Me,t.__scopePopover);return e.jsx(Pt,{present:c||o.open,children:o.modal?e.jsx(gn,{...n,ref:s}):e.jsx(xn,{...n,ref:s})})});Qs.displayName=Me;var fn=an("PopoverContent.RemoveScroll"),gn=i.forwardRef((t,s)=>{const a=fe(Me,t.__scopePopover),c=i.useRef(null),n=lt(s,c),o=i.useRef(!1);return i.useEffect(()=>{const l=c.current;if(l)return Mr(l)},[]),e.jsx(Dr,{as:fn,allowPinchZoom:!0,children:e.jsx(Vs,{...t,ref:n,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(t.onCloseAutoFocus,l=>{var m;l.preventDefault(),o.current||(m=a.triggerRef.current)==null||m.focus()}),onPointerDownOutside:xe(t.onPointerDownOutside,l=>{const m=l.detail.originalEvent,r=m.button===0&&m.ctrlKey===!0,h=m.button===2||r;o.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:xe(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),xn=i.forwardRef((t,s)=>{const a=fe(Me,t.__scopePopover),c=i.useRef(!1),n=i.useRef(!1);return e.jsx(Vs,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,m;(l=t.onCloseAutoFocus)==null||l.call(t,o),o.defaultPrevented||(c.current||(m=a.triggerRef.current)==null||m.focus(),o.preventDefault()),c.current=!1,n.current=!1},onInteractOutside:o=>{var r,h;(r=t.onInteractOutside)==null||r.call(t,o),o.defaultPrevented||(c.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=o.target;((h=a.triggerRef.current)==null?void 0:h.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),Vs=i.forwardRef((t,s)=>{const{__scopePopover:a,trapFocus:c,onOpenAutoFocus:n,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:r,onFocusOutside:h,onInteractOutside:y,...k}=t,P=fe(Me,a),E=We(a);return Ur(),e.jsx(qr,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:n,onUnmountAutoFocus:o,children:e.jsx(Br,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:y,onEscapeKeyDown:m,onPointerDownOutside:r,onFocusOutside:h,onDismiss:()=>P.onOpenChange(!1),children:e.jsx(Or,{"data-state":Ws(P.open),role:"dialog",id:P.contentId,...E,...k,ref:s,style:{...k.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Gs="PopoverClose",vn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=fe(Gs,a);return e.jsx(se.button,{type:"button",...c,ref:s,onClick:xe(t.onClick,()=>n.onOpenChange(!1))})});vn.displayName=Gs;var bn="PopoverArrow",jn=i.forwardRef((t,s)=>{const{__scopePopover:a,...c}=t,n=We(a);return e.jsx(Hr,{...n,...c,ref:s})});jn.displayName=bn;function Ws(t){return t?"open":"closed"}var yn=Bs,kn=Ks,_n=zs,Js=Qs;const wn=yn,Nn=kn,Xs=i.forwardRef(({className:t,align:s="center",sideOffset:a=4,...c},n)=>e.jsx(_n,{children:e.jsx(Js,{ref:n,align:s,sideOffset:a,className:ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...c})}));Xs.displayName=Js.displayName;var ms=1,Cn=.9,En=.8,Sn=.17,bt=.1,jt=.999,Pn=.9999,Rn=.99,In=/[\\\/_+.#"@\[\(\{&]/,An=/[\\\/_+.#"@\[\(\{&]/g,Fn=/[\s-]/,Ys=/[\s-]/g;function Et(t,s,a,c,n,o,l){if(o===s.length)return n===t.length?ms:Rn;var m=`${n},${o}`;if(l[m]!==void 0)return l[m];for(var r=c.charAt(o),h=a.indexOf(r,n),y=0,k,P,E,v;h>=0;)k=Et(t,s,a,c,h+1,o+1,l),k>y&&(h===n?k*=ms:In.test(t.charAt(h-1))?(k*=En,E=t.slice(n,h-1).match(An),E&&n>0&&(k*=Math.pow(jt,E.length))):Fn.test(t.charAt(h-1))?(k*=Cn,v=t.slice(n,h-1).match(Ys),v&&n>0&&(k*=Math.pow(jt,v.length))):(k*=Sn,n>0&&(k*=Math.pow(jt,h-n))),t.charAt(h)!==s.charAt(o)&&(k*=Pn)),(kk&&(k=P*bt)),k>y&&(y=k),h=a.indexOf(r,h+1);return l[m]=y,y}function ps(t){return t.toLowerCase().replace(Ys," ")}function $n(t,s,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,Et(t,s,ps(t),ps(s),0,0,{})}var Oe='[cmdk-group=""]',yt='[cmdk-group-items=""]',Tn='[cmdk-group-heading=""]',Zs='[cmdk-item=""]',hs=`${Zs}:not([aria-disabled="true"])`,St="cmdk-item-select",Fe="data-value",Ln=(t,s,a)=>$n(t,s,a),er=i.createContext(void 0),Je=()=>i.useContext(er),tr=i.createContext(void 0),Dt=()=>i.useContext(tr),sr=i.createContext(void 0),rr=i.forwardRef((t,s)=>{let a=$e(()=>{var u,p;return{search:"",value:(p=(u=t.value)!=null?u:t.defaultValue)!=null?p:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=$e(()=>new Set),n=$e(()=>new Map),o=$e(()=>new Map),l=$e(()=>new Set),m=ar(t),{label:r,children:h,value:y,onValueChange:k,filter:P,shouldFilter:E,loop:v,disablePointerSelection:$=!1,vimBindings:U=!0,...T}=t,L=ve(),q=ve(),D=ve(),C=i.useRef(null),f=Vn();be(()=>{if(y!==void 0){let u=y.trim();a.current.value=u,x.emit()}},[y]),be(()=>{f(6,ee)},[]);let x=i.useMemo(()=>({subscribe:u=>(l.current.add(u),()=>l.current.delete(u)),snapshot:()=>a.current,setState:(u,p,g)=>{var w,S,H,G;if(!Object.is(a.current[u],p)){if(a.current[u]=p,u==="search")V(),O(),f(1,z);else if(u==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let W=document.getElementById(D);W?W.focus():(w=document.getElementById(L))==null||w.focus()}if(f(7,()=>{var W;a.current.selectedItemId=(W=b())==null?void 0:W.id,x.emit()}),g||f(5,ee),((S=m.current)==null?void 0:S.value)!==void 0){let W=p??"";(G=(H=m.current).onValueChange)==null||G.call(H,W);return}}x.emit()}},emit:()=>{l.current.forEach(u=>u())}}),[]),M=i.useMemo(()=>({value:(u,p,g)=>{var w;p!==((w=o.current.get(u))==null?void 0:w.value)&&(o.current.set(u,{value:p,keywords:g}),a.current.filtered.items.set(u,B(p,g)),f(2,()=>{O(),x.emit()}))},item:(u,p)=>(c.current.add(u),p&&(n.current.has(p)?n.current.get(p).add(u):n.current.set(p,new Set([u]))),f(3,()=>{V(),O(),a.current.value||z(),x.emit()}),()=>{o.current.delete(u),c.current.delete(u),a.current.filtered.items.delete(u);let g=b();f(4,()=>{V(),(g==null?void 0:g.getAttribute("id"))===u&&z(),x.emit()})}),group:u=>(n.current.has(u)||n.current.set(u,new Set),()=>{o.current.delete(u),n.current.delete(u)}),filter:()=>m.current.shouldFilter,label:r||t["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:L,inputId:D,labelId:q,listInnerRef:C}),[]);function B(u,p){var g,w;let S=(w=(g=m.current)==null?void 0:g.filter)!=null?w:Ln;return u?S(u,a.current.search,p):0}function O(){if(!a.current.search||m.current.shouldFilter===!1)return;let u=a.current.filtered.items,p=[];a.current.filtered.groups.forEach(w=>{let S=n.current.get(w),H=0;S.forEach(G=>{let W=u.get(G);H=Math.max(W,H)}),p.push([w,H])});let g=C.current;R().sort((w,S)=>{var H,G;let W=w.getAttribute("id"),de=S.getAttribute("id");return((H=u.get(de))!=null?H:0)-((G=u.get(W))!=null?G:0)}).forEach(w=>{let S=w.closest(yt);S?S.appendChild(w.parentElement===S?w:w.closest(`${yt} > *`)):g.appendChild(w.parentElement===g?w:w.closest(`${yt} > *`))}),p.sort((w,S)=>S[1]-w[1]).forEach(w=>{var S;let H=(S=C.current)==null?void 0:S.querySelector(`${Oe}[${Fe}="${encodeURIComponent(w[0])}"]`);H==null||H.parentElement.appendChild(H)})}function z(){let u=R().find(g=>g.getAttribute("aria-disabled")!=="true"),p=u==null?void 0:u.getAttribute(Fe);x.setState("value",p||void 0)}function V(){var u,p,g,w;if(!a.current.search||m.current.shouldFilter===!1){a.current.filtered.count=c.current.size;return}a.current.filtered.groups=new Set;let S=0;for(let H of c.current){let G=(p=(u=o.current.get(H))==null?void 0:u.value)!=null?p:"",W=(w=(g=o.current.get(H))==null?void 0:g.keywords)!=null?w:[],de=B(G,W);a.current.filtered.items.set(H,de),de>0&&S++}for(let[H,G]of n.current)for(let W of G)if(a.current.filtered.items.get(W)>0){a.current.filtered.groups.add(H);break}a.current.filtered.count=S}function ee(){var u,p,g;let w=b();w&&(((u=w.parentElement)==null?void 0:u.firstChild)===w&&((g=(p=w.closest(Oe))==null?void 0:p.querySelector(Tn))==null||g.scrollIntoView({block:"nearest"})),w.scrollIntoView({block:"nearest"}))}function b(){var u;return(u=C.current)==null?void 0:u.querySelector(`${Zs}[aria-selected="true"]`)}function R(){var u;return Array.from(((u=C.current)==null?void 0:u.querySelectorAll(hs))||[])}function F(u){let p=R()[u];p&&x.setState("value",p.getAttribute(Fe))}function A(u){var p;let g=b(),w=R(),S=w.findIndex(G=>G===g),H=w[S+u];(p=m.current)!=null&&p.loop&&(H=S+u<0?w[w.length-1]:S+u===w.length?w[0]:w[S+u]),H&&x.setState("value",H.getAttribute(Fe))}function I(u){let p=b(),g=p==null?void 0:p.closest(Oe),w;for(;g&&!w;)g=u>0?zn(g,Oe):Qn(g,Oe),w=g==null?void 0:g.querySelector(hs);w?x.setState("value",w.getAttribute(Fe)):A(u)}let Y=()=>F(R().length-1),j=u=>{u.preventDefault(),u.metaKey?Y():u.altKey?I(1):A(1)},_=u=>{u.preventDefault(),u.metaKey?F(0):u.altKey?I(-1):A(-1)};return i.createElement(se.div,{ref:s,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:u=>{var p;(p=T.onKeyDown)==null||p.call(T,u);let g=u.nativeEvent.isComposing||u.keyCode===229;if(!(u.defaultPrevented||g))switch(u.key){case"n":case"j":{U&&u.ctrlKey&&j(u);break}case"ArrowDown":{j(u);break}case"p":case"k":{U&&u.ctrlKey&&_(u);break}case"ArrowUp":{_(u);break}case"Home":{u.preventDefault(),F(0);break}case"End":{u.preventDefault(),Y();break}case"Enter":{u.preventDefault();let w=b();if(w){let S=new Event(St);w.dispatchEvent(S)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:Wn},r),mt(t,u=>i.createElement(tr.Provider,{value:x},i.createElement(er.Provider,{value:M},u))))}),Mn=i.forwardRef((t,s)=>{var a,c;let n=ve(),o=i.useRef(null),l=i.useContext(sr),m=Je(),r=ar(t),h=(c=(a=r.current)==null?void 0:a.forceMount)!=null?c:l==null?void 0:l.forceMount;be(()=>{if(!h)return m.item(n,l==null?void 0:l.id)},[h]);let y=nr(n,o,[t.value,t.children,o],t.keywords),k=Dt(),P=pe(f=>f.value&&f.value===y.current),E=pe(f=>h||m.filter()===!1?!0:f.search?f.filtered.items.get(n)>0:!0);i.useEffect(()=>{let f=o.current;if(!(!f||t.disabled))return f.addEventListener(St,v),()=>f.removeEventListener(St,v)},[E,t.onSelect,t.disabled]);function v(){var f,x;$(),(x=(f=r.current).onSelect)==null||x.call(f,y.current)}function $(){k.setState("value",y.current,!0)}if(!E)return null;let{disabled:U,value:T,onSelect:L,forceMount:q,keywords:D,...C}=t;return i.createElement(se.div,{ref:Le(o,s),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!U,"aria-selected":!!P,"data-disabled":!!U,"data-selected":!!P,onPointerMove:U||m.getDisablePointerSelection()?void 0:$,onClick:U?void 0:v},t.children)}),Dn=i.forwardRef((t,s)=>{let{heading:a,children:c,forceMount:n,...o}=t,l=ve(),m=i.useRef(null),r=i.useRef(null),h=ve(),y=Je(),k=pe(E=>n||y.filter()===!1?!0:E.search?E.filtered.groups.has(l):!0);be(()=>y.group(l),[]),nr(l,m,[t.value,t.heading,r]);let P=i.useMemo(()=>({id:l,forceMount:n}),[n]);return i.createElement(se.div,{ref:Le(m,s),...o,"cmdk-group":"",role:"presentation",hidden:k?void 0:!0},a&&i.createElement("div",{ref:r,"cmdk-group-heading":"","aria-hidden":!0,id:h},a),mt(t,E=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?h:void 0},i.createElement(sr.Provider,{value:P},E))))}),Un=i.forwardRef((t,s)=>{let{alwaysRender:a,...c}=t,n=i.useRef(null),o=pe(l=>!l.search);return!a&&!o?null:i.createElement(se.div,{ref:Le(n,s),...c,"cmdk-separator":"",role:"separator"})}),qn=i.forwardRef((t,s)=>{let{onValueChange:a,...c}=t,n=t.value!=null,o=Dt(),l=pe(h=>h.search),m=pe(h=>h.selectedItemId),r=Je();return i.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),i.createElement(se.input,{ref:s,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":r.listId,"aria-labelledby":r.labelId,"aria-activedescendant":m,id:r.inputId,type:"text",value:n?t.value:l,onChange:h=>{n||o.setState("search",h.target.value),a==null||a(h.target.value)}})}),Bn=i.forwardRef((t,s)=>{let{children:a,label:c="Suggestions",...n}=t,o=i.useRef(null),l=i.useRef(null),m=pe(h=>h.selectedItemId),r=Je();return i.useEffect(()=>{if(l.current&&o.current){let h=l.current,y=o.current,k,P=new ResizeObserver(()=>{k=requestAnimationFrame(()=>{let E=h.offsetHeight;y.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return P.observe(h),()=>{cancelAnimationFrame(k),P.unobserve(h)}}},[]),i.createElement(se.div,{ref:Le(o,s),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:r.listId},mt(t,h=>i.createElement("div",{ref:Le(l,r.listInnerRef),"cmdk-list-sizer":""},h)))}),On=i.forwardRef((t,s)=>{let{open:a,onOpenChange:c,overlayClassName:n,contentClassName:o,container:l,...m}=t;return i.createElement(ba,{open:a,onOpenChange:c},i.createElement(ja,{container:l},i.createElement(ya,{"cmdk-overlay":"",className:n}),i.createElement(ka,{"aria-label":t.label,"cmdk-dialog":"",className:o},i.createElement(rr,{ref:s,...m}))))}),Hn=i.forwardRef((t,s)=>pe(a=>a.filtered.count===0)?i.createElement(se.div,{ref:s,...t,"cmdk-empty":"",role:"presentation"}):null),Kn=i.forwardRef((t,s)=>{let{progress:a,children:c,label:n="Loading...",...o}=t;return i.createElement(se.div,{ref:s,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},mt(t,l=>i.createElement("div",{"aria-hidden":!0},l)))}),Z=Object.assign(rr,{List:Bn,Item:Mn,Input:qn,Group:Dn,Separator:Un,Dialog:On,Empty:Hn,Loading:Kn});function zn(t,s){let a=t.nextElementSibling;for(;a;){if(a.matches(s))return a;a=a.nextElementSibling}}function Qn(t,s){let a=t.previousElementSibling;for(;a;){if(a.matches(s))return a;a=a.previousElementSibling}}function ar(t){let s=i.useRef(t);return be(()=>{s.current=t}),s}var be=typeof window>"u"?i.useEffect:i.useLayoutEffect;function $e(t){let s=i.useRef();return s.current===void 0&&(s.current=t()),s}function pe(t){let s=Dt(),a=()=>t(s.snapshot());return i.useSyncExternalStore(s.subscribe,a,a)}function nr(t,s,a,c=[]){let n=i.useRef(),o=Je();return be(()=>{var l;let m=(()=>{var h;for(let y of a){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(h=y.current.textContent)==null?void 0:h.trim():n.current}})(),r=c.map(h=>h.trim());o.value(t,m,r),(l=s.current)==null||l.setAttribute(Fe,m),n.current=m}),n}var Vn=()=>{let[t,s]=i.useState(),a=$e(()=>new Map);return be(()=>{a.current.forEach(c=>c()),a.current=new Map},[t]),(c,n)=>{a.current.set(c,n),s({})}};function Gn(t){let s=t.type;return typeof s=="function"?s(t.props):"render"in s?s.render(t.props):t}function mt({asChild:t,children:s},a){return t&&i.isValidElement(s)?i.cloneElement(Gn(s),{ref:s.ref},a(s.props.children)):a(s)}var Wn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ir=i.forwardRef(({className:t,...s},a)=>e.jsx(Z,{ref:a,className:ae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...s}));ir.displayName=Z.displayName;const or=i.forwardRef(({className:t,...s},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(Qe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Z.Input,{ref:a,className:ae("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...s})]}));or.displayName=Z.Input.displayName;const lr=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.List,{ref:a,className:ae("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...s}));lr.displayName=Z.List.displayName;const cr=i.forwardRef((t,s)=>e.jsx(Z.Empty,{ref:s,className:"py-6 text-center text-sm",...t}));cr.displayName=Z.Empty.displayName;const dr=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Group,{ref:a,className:ae("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...s}));dr.displayName=Z.Group.displayName;const Jn=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Separator,{ref:a,className:ae("-mx-1 h-px bg-border",t),...s}));Jn.displayName=Z.Separator.displayName;const ur=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Item,{ref:a,className:ae("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",t),...s}));ur.displayName=Z.Item.displayName;const Xn=250;function fs({value:t,onChange:s,placeholder:a="Select...",searchPlaceholder:c="Search...",emptyMessage:n="No results found.",disabled:o=!1,selectedOption:l,queryKey:m,queryFn:r,enabled:h=!0,className:y}){const[k,P]=i.useState(!1),[E,v]=i.useState(""),[$,U]=i.useState("");i.useEffect(()=>{const C=window.setTimeout(()=>{U(E.trim())},Xn);return()=>window.clearTimeout(C)},[E]),i.useEffect(()=>{k||(v(""),U(""))},[k]);const{data:T=[],isFetching:L}=le({queryKey:[...m,$],queryFn:()=>r($),enabled:h&&k}),q=i.useMemo(()=>!t||T.some(C=>C.value===t)?T:(l==null?void 0:l.value)===t?[l,...T]:T,[T,l,t]),D=i.useMemo(()=>{if(!t)return a;const C=q.find(f=>f.value===t)??((l==null?void 0:l.value)===t?l:null);return(C==null?void 0:C.label)??a},[q,a,l,t]);return e.jsxs(wn,{open:k,onOpenChange:P,modal:!0,children:[e.jsx(Nn,{asChild:!0,children:e.jsxs(K,{type:"button",variant:"outline",role:"combobox","aria-expanded":k,disabled:o,className:ae("h-8 w-full justify-between px-2 text-sm font-normal",!t&&"text-muted-foreground",y),children:[e.jsx("span",{className:"truncate",children:D}),e.jsx(Ta,{className:"ml-1 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(Xs,{className:"z-[60] w-[var(--radix-popover-trigger-width)] max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0",align:"start",collisionPadding:8,onWheel:C=>C.stopPropagation(),children:e.jsxs(ir,{shouldFilter:!1,className:"h-full",children:[e.jsx(or,{placeholder:c,value:E,onValueChange:v}),e.jsx(lr,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.75rem))] min-h-0 overscroll-contain",children:L?e.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[e.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):q.length===0?e.jsx(cr,{children:n}):e.jsx(dr,{children:q.map(C=>e.jsxs(ur,{value:C.value,onSelect:()=>{s(C.value),P(!1)},children:[e.jsx(he,{className:ae("mr-2 h-4 w-4",t===C.value?"opacity-100":"opacity-0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate",children:C.label}),C.description?e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:C.description}):null]})]},C.value))})})]})})]})}const kt=100;function Yn(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function gs(t){const s=parseInt(t.task_id,10),a=parseInt(t.dataset_id,10);return!(!Number.isFinite(s)||!Number.isFinite(a)||!t.metric_name.trim()||!t.metric_value.trim())}function Zn(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0],c=s.metrics[a];return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a||"",metric_value:String(c||""),best_rank:s.best_rank?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function ei(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function ti(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function xs(t,s){return`${t}:${s}`}function rt(t){const s=t.trim();if(s==="")return null;const a=Number(s);return!Number.isFinite(a)||a<0?null:Math.trunc(a)}function at(t){const s=t.trim();return s===""?null:s}function si({open:t,onOpenChange:s,paperId:a,arxivId:c,initialEvaluations:n,paperTasks:o,onSuccess:l,submitMode:m="direct",isAuthor:r=!1}){const h=Yn(o),[y,k]=i.useState([]),[P,E]=i.useState(null),[v,$]=i.useState(new Map),[U,T]=i.useState(new Map),L=je(),{toast:q}=ye(),D=i.useRef(!1),C=i.useRef(!1);i.useEffect(()=>{if(!t){D.current=!1,C.current=!1;return}D.current||C.current||n.length!==0&&(D.current=!0,k(Zn(n)),$(ei(n)),T(ti(n)))},[t,n]);const f=i.useMemo(()=>Array.from(new Set(y.map(j=>j.task_id).filter(j=>j&&j!==""))),[y]),x=i.useMemo(()=>{const j=new Set;return y.forEach(_=>{_.task_id&&_.dataset_id&&j.add(xs(_.task_id,_.dataset_id))}),Array.from(j)},[y]),M=le({queryKey:["datasets-by-tasks-for-eval-edit",f,t],queryFn:async()=>{const j={};return await Promise.all(f.map(async _=>{try{const u=await ls({task_id:parseInt(_),page_size:kt});j[_]=u.results}catch(u){console.error(`Error fetching datasets for task ${_}:`,u),j[_]=[]}})),j},enabled:t&&f.length>0});i.useEffect(()=>{M.data&&T(j=>{const _=new Map(j);return Object.values(M.data).forEach(u=>{u.forEach(p=>{_.set(p.id,p)})}),_})},[M.data]);const B=le({queryKey:["leaderboard-metrics-for-eval-edit",x,t],queryFn:async()=>{const j={};return await Promise.all(x.map(async _=>{const[u,p]=_.split(":");try{j[_]=await Vr(p,u)}catch(g){console.error(`Error fetching metrics for leaderboard ${_}:`,g),j[_]=[]}})),j},enabled:t&&x.length>0}),O=async j=>{const _=await Ns({page_size:kt,visible_only:!0,...j?{q:j}:{}});return $(u=>{const p=new Map(u);return _.results.forEach(g=>p.set(g.id,g)),p}),_.results.map(u=>{var p;return{value:u.id,label:u.name,description:(p=u.description)==null?void 0:p.slice(0,100)}})},z=j=>async _=>{const u=await ls({task_id:parseInt(j),page_size:kt,..._?{q:_}:{}});return T(p=>{const g=new Map(p);return u.results.forEach(w=>g.set(w.id,w)),g}),u.results.map(p=>({value:p.id,label:p.name,description:p.full_name}))},V=(j,_)=>{if(!j||!_)return!1;const u=U.get(_);return!!(u!=null&&u.supports_harness)},ee=(j,_,u)=>{var w;if(!j||!_)return[];const g=(((w=B.data)==null?void 0:w[xs(j,_)])||[]).map(S=>({value:S.metric_name,label:S.metric_name,description:S.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return u&&!g.some(S=>S.value===u)&&g.unshift({value:u,label:`${u} (legacy)`,description:void 0}),g},b=Se({mutationFn:async({paperId:j,evaluations:_})=>{if(m==="pending"){const p=[];for(const g of _){if(g.operation==="delete"&&g.id){p.push({op:"delete",evaluation_id:parseInt(g.id)});continue}const w=V(g.task_id,g.dataset_id);if(g.operation==="create"){if(!gs(g))continue;const S=rt(g.num_parameters),H={task_id:parseInt(g.task_id),dataset_id:parseInt(g.dataset_id),metrics:{[g.metric_name]:g.metric_value},best_metric:g.metric_name},G=at(g.hf_model_url);g.model_name&&(H.model_name=g.model_name),w&&g.harness&&(H.harness=g.harness),g.best_rank&&(H.best_rank=parseInt(g.best_rank)),S!=null&&(H.num_parameters=S),G!=null&&(H.hf_model_url=G),H.is_open=g.is_open,p.push({op:"create",data:H})}else if(g.operation==="update"&&g.id){const S={task_id:parseInt(g.task_id),dataset_id:parseInt(g.dataset_id),model_name:g.model_name||void 0,harness:w&&g.harness||null,metrics:{[g.metric_name]:g.metric_value},best_metric:g.metric_name,best_rank:g.best_rank?parseInt(g.best_rank):void 0,num_parameters:rt(g.num_parameters),hf_model_url:at(g.hf_model_url),is_open:g.is_open};p.push({op:"update",evaluation_id:parseInt(g.id),data:S})}}return p.length===0?{submitted:!1}:(await De({paper_id:parseInt(j),edit_type:"evaluations",proposed_payload:{operations:p}}),{submitted:!0})}let u=!1;for(const p of _)if(p.operation==="delete"&&p.id){u=!0;try{await Kr(p.id)}catch(g){if((typeof g=="object"&&g!==null&&"status"in g?g.status:void 0)!==404)throw g;console.log(`Evaluation ${p.id} already deleted or not found`)}}else if(p.operation==="create"){if(!gs(p))continue;u=!0;const g=V(p.task_id,p.dataset_id),w=rt(p.num_parameters);await zr({paper_id:parseInt(j),task_id:parseInt(p.task_id),dataset_id:parseInt(p.dataset_id),model_name:p.model_name||void 0,harness:g&&p.harness||void 0,metrics:{[p.metric_name]:p.metric_value},best_metric:p.metric_name,best_rank:p.best_rank?parseInt(p.best_rank):void 0,num_parameters:w??void 0,hf_model_url:at(p.hf_model_url)??void 0,is_open:p.is_open})}else if(p.operation==="update"&&p.id){u=!0;const g=V(p.task_id,p.dataset_id);await Qr(p.id,{task_id:parseInt(p.task_id),dataset_id:parseInt(p.dataset_id),model_name:p.model_name||void 0,harness:g&&p.harness||null,metrics:{[p.metric_name]:p.metric_value},best_metric:p.metric_name,best_rank:p.best_rank?parseInt(p.best_rank):void 0,num_parameters:rt(p.num_parameters),hf_model_url:at(p.hf_model_url),is_open:p.is_open})}return{submitted:u}},onSuccess:j=>{if(m==="pending"){j!=null&&j.submitted?q({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}):q({title:"No changes to submit",description:"Your evaluation list matches the existing data."}),l==null||l(),s(!1);return}L.invalidateQueries({queryKey:["paper-arxiv",c]}),L.invalidateQueries({queryKey:["evaluations","paper",a]}),l==null||l(),s(!1)},onError:j=>{var p;const _=j;let u=_.message||(m==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");if(_.response)try{const g=JSON.parse(_.response);typeof(g==null?void 0:g.detail)=="string"?u=g.detail:Array.isArray(g==null?void 0:g.detail)&&((p=g.detail[0])!=null&&p.msg)&&(u=g.detail[0].msg)}catch{u=_.response}q({title:m==="pending"?"Could not submit edit":"Could not save evaluations",description:u,variant:"destructive"})}}),R=()=>{C.current=!0,k([...y,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},F=j=>{C.current=!0,y[j].id?k(y.map((u,p)=>p===j?{...u,operation:"delete"}:u)):k(y.filter((u,p)=>p!==j))},A=(j,_,u)=>{C.current=!0,k(y.map((p,g)=>{if(g!==j)return p;const w={...p,[_]:u};return _==="task_id"&&(w.dataset_id="",w.metric_name="",w.harness=""),_==="dataset_id"&&(w.metric_name="",u&&!V(w.task_id,u)&&(w.harness="")),p.operation==="unchanged"&&(w.operation="update"),w}))},I=(j,_)=>{C.current=!0,k(y.map((u,p)=>{if(p!==j)return u;const g={...u,is_open:_};return u.operation==="unchanged"&&(g.operation="update"),g}))},Y=()=>{const j=y.filter(_=>_.operation!=="delete"||_.id);b.mutate({paperId:a,evaluations:j})};return e.jsxs(ke,{open:t,onOpenChange:s,children:[e.jsxs(_e,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:"Edit Evaluation Results"}),e.jsx(Ce,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),m==="pending"&&e.jsx(Ue,{isAuthor:r}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[y.filter(j=>j.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:`text-left py-2 px-2 font-medium text-sm ${h?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),h&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:y.map((j,_)=>{if(j.operation==="delete")return null;const u=v.get(j.task_id),p=U.get(j.dataset_id),g=ee(j.task_id,j.dataset_id,j.metric_name),w=!!(j.task_id&&j.dataset_id)&&B.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsx(fs,{value:j.task_id,onChange:S=>A(_,"task_id",S),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:u?{value:u.id,label:u.name}:null,queryKey:["eval-edit-task-search"],queryFn:O,enabled:t})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(fs,{value:j.dataset_id,onChange:S=>A(_,"dataset_id",S),placeholder:j.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:j.task_id?"No datasets found for this task.":"Select a task first.",disabled:!j.task_id,selectedOption:p?{value:p.id,label:p.name}:null,queryKey:["eval-edit-dataset-search",j.task_id],queryFn:z(j.task_id),enabled:t&&!!j.task_id})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(oe,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:j.model_name,onChange:S=>A(_,"model_name",S.target.value)})}),h&&e.jsx("td",{className:"py-2 px-2",children:V(j.task_id,j.dataset_id)?e.jsx(oe,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:j.harness,onChange:S=>A(_,"harness",S.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsx("td",{className:"py-2 px-2",children:!j.task_id||!j.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):w?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(ce,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):g.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",value:j.metric_name,onChange:S=>A(_,"metric_name",S.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),g.map(S=>e.jsx("option",{value:S.value,children:S.label},S.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(oe,{type:"text",className:"w-full text-sm",placeholder:"44.9",value:j.metric_value,onChange:S=>A(_,"metric_value",S.target.value)})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(oe,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",value:j.num_parameters,onChange:S=>A(_,"num_parameters",S.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(oe,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:j.hf_model_url,onChange:S=>A(_,"hf_model_url",S.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:j.is_open,onChange:S=>I(_,S.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(K,{variant:"ghost",size:"sm",onClick:()=>F(_),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Delete row",children:e.jsx(Ft,{className:"w-4 h-4"})})})]},_)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(wa,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(K,{variant:"outline",size:"sm",onClick:R,className:"flex items-center space-x-2",children:[e.jsx(At,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(Ee,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(K,{variant:"ghost",onClick:()=>E("benchmark"),children:"Suggest a new benchmark"}),e.jsx(K,{variant:"ghost",onClick:()=>E("metric"),children:"Suggest a new metric"})]}),e.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(K,{onClick:Y,disabled:b.isPending,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),m==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),m==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(It,{open:P!==null,onOpenChange:j=>{j||E(null)},paperId:a,kind:P??"benchmark"})]})}const Te=["my-bookmark-ids"];function ri(){var c,n;const{user:t}=ct(),s=le({queryKey:Te,queryFn:()=>ot.getMyBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Rt.useMemo(()=>{var o;return new Set(((o=s.data)==null?void 0:o.paper_ids)??[])},[(c=s.data)==null?void 0:c.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function ai(){const{user:t}=ct(),s=je(),a=Se({mutationFn:async({paperId:n,isBookmarked:o})=>{o?await ot.removeBookmark(n):await ot.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:o})=>{await s.cancelQueries({queryKey:Te});const l=s.getQueryData(Te),m=typeof n=="string"?Number(n):n,r=(l==null?void 0:l.paper_ids)??[],h=o?r.filter(y=>y!==m):[m,...r.filter(y=>y!==m)];return s.setQueryData(Te,{paper_ids:h}),{previous:l}},onError:(n,o,l)=>{l!=null&&l.previous&&s.setQueryData(Te,l.previous)},onSettled:()=>{s.invalidateQueries({queryKey:Te}),s.invalidateQueries({queryKey:["my-bookmarks"]})}});return{toggle:Rt.useCallback((n,o)=>{if(!t){if(Ss())return;const l=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Ps(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(l)}`);return}a.mutate({paperId:n,isBookmarked:o})},[a,t]),isPending:a.isPending}}const ni=({paperId:t})=>{const{user:s}=ct(),{idSet:a}=ri(),{toggle:c,isPending:n}=ai();if(Ss())return null;const o=Number(t),l=!!s&&a.has(o),m=()=>{Number.isFinite(o)&&c(o,l)},r=s&&l?"Saved":"Save",h=s?l?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${l?" is-saved":""}`,onClick:m,disabled:n,"aria-pressed":l,"aria-label":h,title:h,children:[e.jsx(te,{name:"bookmark",size:12}),r]})};function nt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:c}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":c,children:"edit"})]}):t}const ii={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:Ra,get:Pa,cancel:Sa},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:Ea,get:Ca,cancel:Na}};function oi({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Fa,{remarkPlugins:[$a],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function mr({kind:t,paperId:s,paperTitle:a,triggerClassName:c,onComplete:n}){const o=ii[t],[l,m]=i.useState(!1),[r,h]=i.useState(null),[y,k]=i.useState(!1),[P,E]=i.useState(null),v=i.useRef(null),$=(r==null?void 0:r.status)==="queued"||(r==null?void 0:r.status)==="dispatching"||(r==null?void 0:r.status)==="running",U=r==null?void 0:r.id;i.useEffect(()=>{if(!$||!U)return;let D=!1;const C=window.setInterval(async()=>{try{const f=await o.get(U);D||(h(f),E(null))}catch(f){D||E(f instanceof Error?f.message:"Could not check job status.")}},2e3);return()=>{D=!0,window.clearInterval(C)}},[$,o,U]),i.useEffect(()=>{(r==null?void 0:r.status)!=="completed"||v.current===r.id||(v.current=r.id,n())},[r,n]);const T=async()=>{k(!0),E(null);try{h(await o.start(s))}catch(D){E(D instanceof Error?D.message:"Could not start Codex.")}finally{k(!1)}},L=()=>{h(null),E(null),v.current=null},q=async()=>{if(r){E(null);try{h(await o.cancel(r.id))}catch(D){E(D instanceof Error?D.message:"Could not cancel Codex.")}}};return e.jsxs(ke,{open:l,onOpenChange:m,children:[e.jsx("button",{type:"button",className:c,onClick:()=>m(!0),children:$?o.running:(r==null?void 0:r.status)==="completed"?o.complete:o.trigger}),e.jsxs(_e,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(we,{className:"min-w-0",children:[e.jsx(Ne,{children:o.title}),e.jsx(Ce,{children:o.description(a)})]}),r?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",r.status]}),r.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:r.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),$&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[r.status==="queued"?"This job is queued and will start after the current Codex job finishes.":o.progress," ","This can take several minutes; you can close this window and return."]}),r.report&&e.jsx(oi,{report:r.report}),r.error&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:r.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:o.notice}),P&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:P}),e.jsxs(Ee,{children:[e.jsx(K,{variant:"outline",onClick:()=>m(!1),children:$?"Close":"Cancel"}),$&&e.jsx(K,{variant:"outline",onClick:()=>void q(),children:"Cancel job"}),!r&&e.jsx(K,{onClick:T,disabled:y,children:y?"Starting…":o.action}),r&&!$&&e.jsx(K,{variant:"outline",onClick:L,children:"Run again"})]})]})]})}function li(t){return e.jsx(mr,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function ci(t){return e.jsx(mr,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const di={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","source-url":"source URL"},it=360,_t=3,ui=3,mi=["tldr","abstract","tasks","methods","results"];function pi(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!mi.includes(s))return{section:null,resultsTaskSlug:null};const c=s;return c!=="results"||!a?{section:c,resultsTaskSlug:null}:{section:c,resultsTaskSlug:new URLSearchParams(a).get("task")}}function vs(t){return`results-task-${t}`}function hi(t){return`#results?task=${encodeURIComponent(t)}`}function He({id:t,label:s,accent:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:t,children:[e.jsx("span",{children:e.jsx("a",{href:`#${t}`,className:"section-anchor-link",children:s})}),a]})}function bs(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function js(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ys(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const Bi=()=>{var Zt,es,ts,ss,rs,as,ns,is,os;const{arxivId:t}=Gr(),s=t?Wr(t):"",a=Jr(),{toast:c}=ye(),{user:n}=ct(),o=(n==null?void 0:n.is_admin)??!1,l=!!n,m=!0,{data:r,isLoading:h,error:y,refetch:k}=fa(s||"",!!s),[P,E]=i.useState(!1);i.useEffect(()=>{if(!t||t===s)return;const d=window.location.search+window.location.hash;a(`/paper/${s}${d}`,{replace:!0})},[s,a,t]),i.useEffect(()=>{if(r!=null&&r.title)return document.title=pa(r.title),()=>{document.title=ha}},[r==null?void 0:r.title]),i.useEffect(()=>{if(E(!1),!(r!=null&&r.id))return;const d=window.setTimeout(()=>E(!0),0);return()=>window.clearTimeout(d)},[r==null?void 0:r.id]);const{data:v,isLoading:$}=Oa(P?r==null?void 0:r.arxiv_id:void 0),{data:U,isLoading:T,refetch:L}=Da(r==null?void 0:r.id,P&&!!(r!=null&&r.id)),{preferences:q}=Xr(),D=i.useMemo(()=>!U||!q.hide_closed_source_evals?U:U.filter(d=>d.is_open!==!1),[U,q.hide_closed_source_evals]),C=i.useMemo(()=>({models:(r==null?void 0:r.hf_models)??[],datasets:(r==null?void 0:r.hf_datasets)??[],spaces:(r==null?void 0:r.hf_spaces)??[]}),[r==null?void 0:r.hf_models,r==null?void 0:r.hf_datasets,r==null?void 0:r.hf_spaces]),f=i.useMemo(()=>{const d=(N,Q,J)=>{const ie=new Set,X=[];for(const re of[...N,...Q??[]])if(!ie.has(re)&&(ie.add(re),X.push({href:re,label:ys(re,J)}),X.length>=ui))break;return X};return{models:d(C.models,v==null?void 0:v.modelUrls,"Model"),datasets:d(C.datasets,v==null?void 0:v.datasetUrls,"Dataset"),spaces:d(C.spaces,v==null?void 0:v.spaceUrls,"Space")}},[C.models,C.datasets,C.spaces,v==null?void 0:v.modelUrls,v==null?void 0:v.datasetUrls,v==null?void 0:v.spaceUrls]),x=i.useMemo(()=>{if(!D)return[];const d=new Map;for(const N of D){const Q=N.task_id,J=d.get(Q);J?J.rows.push(N):d.set(Q,{taskId:Q,taskName:N.task_name||"—",taskSlug:N.task_slug,rows:[N]})}return Array.from(d.values())},[D]),M=i.useMemo(()=>x.map(d=>d.taskSlug??"").join("|"),[x]),B=le({queryKey:["paper-versions",r==null?void 0:r.arxiv_id],queryFn:async()=>{const d=r.arxiv_id.replace(/v\d+$/,""),N=await fetch(Ps(`/api/v1/papers/arxiv/${d}/versions`));return N.ok?await N.json():[]},enabled:P&&!!(r!=null&&r.arxiv_id),staleTime:10*60*1e3}),O=le({queryKey:["related-papers",r==null?void 0:r.id],queryFn:()=>ot.getRelatedPapers(r.arxiv_id||r.id,4),enabled:P&&!!(r!=null&&r.id),staleTime:10*60*1e3}),[z,V]=i.useState(!1),[ee,b]=i.useState(!1),[R,F]=i.useState(!1),A=i.useRef(!1);i.useEffect(()=>{A.current=!1},[s]),i.useEffect(()=>{let d=0;const N=(J=!1,ie=!1)=>{const{section:X,resultsTaskSlug:re}=pi(window.location.hash.slice(1));if(!X||!r||X==="tldr"&&!r.tldr||X==="results"&&(!P||T)||!J&&A.current)return;let Ae=null;if(X==="results"&&re){if(Ae=document.getElementById(vs(re)),!Ae){if(x.find(Cr=>Cr.taskSlug===re))return;Ae=document.getElementById("results")}}else Ae=document.getElementById(X);if(!Ae)return;const Nr=Ae;d=window.requestAnimationFrame(()=>{A.current=!0,Nr.scrollIntoView({block:"start",behavior:ie?"smooth":"auto"})})};N();const Q=()=>{A.current=!1,N(!0,!0)};return window.addEventListener("hashchange",Q),()=>{window.removeEventListener("hashchange",Q),d&&window.cancelAnimationFrame(d)}},[r,r==null?void 0:r.tldr,P,T,M,x]);const{isEditingTasks:I,setIsEditingTasks:Y,isEditingMethods:j,setIsEditingMethods:_,isEditingRepositories:u,setIsEditingRepositories:p,isEditingProjectPages:g,setIsEditingProjectPages:w,isEditingEvaluations:S,setIsEditingEvaluations:H,isEditingSourceUrl:G,setIsEditingSourceUrl:W}=Ha(),[de,Ut]=i.useState(null),Pe=i.useMemo(()=>{if(!n||!(r!=null&&r.author_links))return!1;const d=n.username.toLowerCase();return r.author_links.some(N=>!!N.hf_username&&N.hf_username.toLowerCase()===d)},[n,r==null?void 0:r.author_links]),Re=o?"direct":"pending",ne=d=>{if(!l){Ut(d);return}switch(d){case"tasks":Y(!0);return;case"methods":_(!0);return;case"results":H(!0);return;case"repositories":p(!0);return;case"project-pages":w(!0);return;case"source-url":W(!0);return}},[qt,pt]=i.useState("idle"),[Bt,Ot]=i.useState(null),[Ht,Kt]=i.useState(null),pr=async()=>{if(s){pt("indexing"),Ot(null),Kt(null);try{await aa(s),c({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>k(),1200),pt("idle")}catch(d){const N=d;let Q=N.message||"Failed to index paper";if(N.response)try{Q=JSON.parse(N.response).detail||Q}catch{Q=N.response}Ot(Q),(N.status===429||N.status===503)&&Kt("Try again later after arXiv has lifted the temporary limit."),pt("idle")}}},{citationDisplay:hr,citationCopy:zt}=i.useMemo(()=>{if(!r)return{citationDisplay:"",citationCopy:""};const d=`${r.title.slice(0,60)}${r.title.length>60?"…":""}`,N=`${r.authors[0]||""}${r.authors.length>1?" et al.":""}`,Q=r.authors.join(" and "),J=(r.published||"").slice(0,4)||"—",ie=(X,re)=>r.arxiv_id?`@article{${r.arxiv_id.replace(".","")}, + title={{${X}}}, + author=${re}, + year={{${J}}}, + eprint={{${r.arxiv_id}}}, + archivePrefix={{arXiv}} +}`:`@misc{paper${r.id}, + title={{${X}}}, + author=${re}, + year={{${J}}}, + url={{${r.source_url||r.url_abs||""}}} +}`;return{citationDisplay:ie(d,`{{${N}}}`),citationCopy:ie(r.title,`{${Q}}`)}},[r]),Qt=i.useMemo(()=>La(r==null?void 0:r.leaderboard_ranks),[r==null?void 0:r.leaderboard_ranks]),[fr,Vt]=i.useState(!1),gr=async()=>{if(zt)try{await navigator.clipboard.writeText(zt),Vt(!0),c({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>Vt(!1),1500)}catch{c({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},xr=async()=>{if(!r)return;const d=r.arxiv_id||r.id,N=Ma(d,Qt);if(N)try{await navigator.clipboard.writeText(N),c({title:"PwC badges copied",description:"Each badge links to its highlighted leaderboard row."})}catch{c({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(h)return e.jsxs("div",{className:"page",children:[e.jsx(Ke,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ke,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ke,{className:"h-64 w-full"})]});if(y||!r)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",s]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",s]})," in the database. You can index it from arXiv right now."]}),Bt&&e.jsx(ga,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(xa,{children:[e.jsx("div",{children:Bt}),Ht&&e.jsx("div",{className:"mt-2",children:Ht})]})}),e.jsxs("div",{className:"action-row",children:[o&&e.jsxs("button",{className:"action-btn",onClick:pr,disabled:qt==="indexing",children:[e.jsx(te,{name:"sparkle",size:12}),qt==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(K,{variant:"outline",onClick:()=>a("/papers"),children:"Browse Papers"})]})]});const Gt=B.data||[],qe=ma(r.repositories),ge=[...r.repositories??[]].sort((d,N)=>{const Q=d.is_official?1:0,J=N.is_official?1:0;return Q!==J?J-Q:(N.num_stars||0)-(d.num_stars||0)}),vr=R?ge:ge.slice(0,_t),ht=((Zt=r.arxiv_id)==null?void 0:Zt.replace(/v\d+$/,""))??null,ft=r.arxiv_id?{isLoading:$,paperHref:`https://huggingface.co/papers/${ht}`,rows:[{label:"Models",href:Nt(`https://huggingface.co/models?other=arxiv:${r.arxiv_id}`,C.models),count:Ct(C.models,v==null?void 0:v.modelUrls,v==null?void 0:v.models),isLimited:v==null?void 0:v.isLimited,links:f.models},{label:"Datasets",href:Nt(`https://huggingface.co/datasets?other=arxiv:${r.arxiv_id}`,C.datasets),count:Ct(C.datasets,v==null?void 0:v.datasetUrls,v==null?void 0:v.datasets),isLimited:v==null?void 0:v.isLimited,links:f.datasets},{label:"Spaces",href:Nt(`https://huggingface.co/papers/${ht}`,C.spaces),count:Ct(C.spaces,v==null?void 0:v.spaceUrls,v==null?void 0:v.spaces),isLimited:v==null?void 0:v.isLimited,links:f.spaces}],footer:`Cite arxiv.org/abs/${ht} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:wt(C.models),count:C.models.length,links:f.models},{label:"Datasets",href:wt(C.datasets),count:C.datasets.length,links:f.datasets},{label:"Spaces",href:wt(C.spaces),count:C.spaces.length,links:f.spaces}],footer:null},Wt=r.tldr||null,Jt=r.num_pages||null,Ie=r.abstract||"",br=Ie.length>it?Ie.slice(0,it)+"…":Ie,jr=z||Ie.length<=it?Ie:br,Xe=(r.methods||[]).filter(d=>d.source_paper_id===r.id),Ye=r.introduced_benchmarks||[],yr=Xe.length>0||Ye.length>0,Xt=r.arxiv_id?`arXiv:${r.arxiv_id}`:"External resource",kr=r.source==="external"?"Source page":"arXiv page",Be=((es=r.project_pages)==null?void 0:es.filter(d=>d.url))??[],_r=(()=>{const d=[];return Xe.length>0&&d.push(Xe.length===1?"this method":"these methods"),Ye.length>0&&d.push(Ye.length===1?"this benchmark":"these benchmarks"),d.length===0?"":d.length===1?d[0]:d.join(" and ")})(),Ze=r.predecessor_papers||[],et=r.successor_papers||[],wr=Ze.length>0||et.length>0,tt=12,gt=r.authors.map((d,N)=>{var Q,J,ie,X;return{name:d,id:((J=(Q=r.author_links)==null?void 0:Q[N])==null?void 0:J.id)??null,hf_username:((X=(ie=r.author_links)==null?void 0:ie[N])==null?void 0:X.hf_username)??null}}),Yt=ee||gt.length<=tt?gt:gt.slice(0,tt);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:Xt})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsx("h1",{className:"detail-title",children:e.jsx(st,{title:r.title})}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:Xt}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",bs(r.published)]}),Jt&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Jt," pages"]})]}),r.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[r.citation_count.toLocaleString()," citations"]})]}),(r.proceeding||r.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),r.conference_slug?e.jsx("a",{href:`/conferences/${r.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(r.proceeding||r.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:r.proceeding.replace(/\s+\d{1,2}$/,"")})]}),Gt.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:r.version,onChange:d=>{const N=d.target.value;r.arxiv_id&&a(`/paper/${r.arxiv_id.replace(/v\d+$/,"")}${N?`?version=${N}`:""}`)},children:Gt.map(d=>e.jsxs("option",{value:d.version,children:[d.version," — ",bs(d.published)]},d.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Yt.map((d,N)=>e.jsxs(Rt.Fragment,{children:[d.id?e.jsx(ue,{to:`/authors/${d.id}`,children:d.name}):d.hf_username?e.jsx("a",{href:`https://huggingface.co/${d.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${d.hf_username} on Hugging Face`,children:d.name}):e.jsx("a",{children:d.name}),Ntt&&e.jsx("button",{className:"show-more-authors",onClick:()=>b(d=>!d),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:ee?"show fewer":`+${r.authors.length-tt} more`})]}),e.jsxs("div",{className:"action-row",children:[r.url_pdf&&e.jsxs("a",{className:"action-btn",href:r.url_pdf,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"pdf",size:12})," View PDF"]}),r.url_abs&&e.jsx(nt,{showEdit:r.source==="external"&&m,onEdit:()=>ne("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:r.source==="external"&&m?"action-btn-segment action-btn-main":"action-btn",href:r.url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"external",size:12})," ",kr]})}),ft.paperHref&&(v==null?void 0:v.paperExists)&&e.jsxs("a",{className:"bm-action-btn",href:ft.paperHref,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Hugging Face",children:["View on ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})]}),qe.githubUrl&&e.jsx(nt,{showEdit:m,onEdit:()=>ne("repositories"),editAriaLabel:"Edit code repositories",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:qe.githubUrl,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"github",size:12})," Code",qe.github!=null&&e.jsxs("span",{style:{opacity:.7,marginLeft:4},children:["· ",js(qe.github)," ★"]})]})}),qe.githubUrl?null:e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>ne("repositories"),title:"Add GitHub repository",children:[e.jsx(te,{name:"github",size:12})," Add code"]}),Be.length===1?e.jsx(nt,{showEdit:m,onEdit:()=>ne("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Be[0].url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"globe",size:12})," Project page"]})}):null,Be.length>1?e.jsx(nt,{showEdit:m,onEdit:()=>ne("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Yr,{children:[e.jsx(Zr,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(te,{name:"globe",size:12})," Project page"]})}),e.jsx(ea,{align:"start",className:"project-page-menu",children:Be.map((d,N)=>e.jsx(ta,{asChild:!0,children:e.jsx("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",children:ys(d.url,`Project page ${N+1}`)})},d.url))})]})}):null,Be.length===0&&l?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>ne("project-pages"),title:"Add project page",children:[e.jsx(te,{name:"globe",size:12})," Add project page"]}):null,r.conference_url_abs&&e.jsxs("a",{className:"action-btn",href:r.conference_url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"external",size:12})," Conference"]}),(r.organizations||[]).map(d=>e.jsxs(ue,{to:`/${d.slug}`,className:"action-btn",title:d.name,"aria-label":d.name,children:[d.logo_url&&e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:16,width:16,borderRadius:3,overflow:"hidden"},children:e.jsx("img",{src:d.logo_url,alt:"",style:{height:"150%",width:"150%",objectFit:"contain"},onError:N=>{N.currentTarget.style.display="none"}})}),d.name]},d.id)),o&&Ia()&&e.jsx(ci,{paperId:r.id,paperTitle:r.title,onComplete:()=>void k()}),e.jsx(ni,{paperId:r.id})]}),r.leaderboard_ranks&&r.leaderboard_ranks.length>0&&e.jsx(na,{wrap:!0,paperHref:`/paper/${r.arxiv_id||r.id}`,ranks:r.leaderboard_ranks.filter(d=>d.best_rank>=1&&d.best_rank<=3).map(d=>({name:d.dataset_name,slug:d.dataset_slug||null,rank:d.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(ia,{paperId:r.arxiv_id||r.id,title:r.title,thumbnailUrl:sa(r.thumbnail_url),priority:!0})})]}),yr&&e.jsxs("div",{className:"introduced-banner",children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Xe.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/methods/${d.slug||d.id}`),children:[d.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${d.id}`)),Ye.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/benchmark/${d.slug||d.id}`),children:[d.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${d.id}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",_r,"."]})]}),wr&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[et.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:et.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:et.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${d.route_identifier}`),children:[e.jsx(st,{title:d.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${d.id}`))})]}),Ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ze.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:Ze.map(d=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${d.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(st,{title:d.title})]},`predecessor-${d.id}`))})]})]}),Wt&&e.jsxs(e.Fragment,{children:[e.jsx(He,{id:"tldr",label:"TL;DR · AI-generated"}),e.jsx("div",{className:"tldr-box",children:Wt})]}),e.jsx(He,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(ua,{text:jr})}),Ie.length>it&&e.jsx("div",{className:"read-full",onClick:()=>V(d=>!d),children:z?"− collapse abstract":"+ read full abstract"}),e.jsx(He,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((ts=r.tasks)==null?void 0:ts.length)||0," tagged",e.jsx("button",{type:"button",onClick:()=>ne("tasks"),className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks||[]).map(d=>e.jsx(oa,{slug:d.slug||"",label:d.name},d.id))}),e.jsx(He,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((ss=r.methods)==null?void 0:ss.length)||0," used",e.jsx("button",{type:"button",onClick:()=>ne("methods"),className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods||[]).map(d=>e.jsx(la,{method:d},d.id))}),e.jsx(He,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[(D==null?void 0:D.length)||0," benchmarks",Qt.length>0&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:xr,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(te,{name:"copy",size:10})," Copy PwC badge"]}),o&&Aa()&&e.jsx(li,{paperId:r.id,paperTitle:r.title,onComplete:()=>void L()}),e.jsx("button",{type:"button",onClick:()=>ne("results"),className:"edit-link",children:"edit"})]})}),T?e.jsx(Ke,{className:"h-32 w-full"}):x.length>0?x.map(d=>e.jsxs("div",{className:d.taskSlug?"paper-section-anchor":void 0,id:d.taskSlug?vs(d.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:d.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(ue,{to:`/tasks/${d.taskSlug}`,children:d.taskName}),e.jsx("a",{href:hi(d.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${d.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):d.taskName}),e.jsxs("span",{className:"accent",children:[d.rows.length," ",d.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:d.rows.map(N=>{var Q;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:N.dataset_slug?e.jsx(ue,{to:`/benchmark/${N.dataset_slug}`,children:N.dataset_name||"—"}):N.dataset_name||"—"}),e.jsxs("td",{className:"model",title:N.model_name||void 0,children:[N.hf_model_url?e.jsx("a",{href:N.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${N.model_name||"model"} on Hugging Face`,children:N.model_name||"—"}):N.model_name||"—",N.is_open===!1&&e.jsx(ca,{}),(N.external??N.is_external)&&e.jsx(da,{sourceUrl:N.source_url||N.external_source_url||N.result_url})]}),e.jsx("td",{className:"metric",children:N.best_metric}),e.jsx("td",{className:"value",children:ra((Q=N.metrics)==null?void 0:Q[N.best_metric||""])}),e.jsx("td",{className:"rank",children:N.best_rank!=null?`#${N.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:N.dataset_slug&&e.jsx(ue,{to:`/benchmark/${N.dataset_slug}?${[N.task_slug?`task=${encodeURIComponent(N.task_slug)}`:"",`eval=${encodeURIComponent(N.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},N.id)})})]})]},d.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]}),e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[ge.length," repo",ge.length===1?"":"s",e.jsx("button",{type:"button",onClick:()=>ne("repositories"),className:"edit-link",children:"edit"})]})]}),vr.map(d=>e.jsxs("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(te,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[d.owner,"/",d.name]}),d.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",js(d.num_stars)]})]},d.id)),ge.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),ge.length>_t&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>F(d=>!d),children:R?"− show top 3":`+ show ${ge.length-_t} more repos`})]}),e.jsx(fi,{viewer:ft}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:gr,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(te,{name:"copy",size:11}),fr?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:hr})]}),O.isLoading&&e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}),!O.isLoading&&(((rs=O.data)==null?void 0:rs.length)??0)>0&&e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),O.data.map(d=>e.jsxs(ue,{to:`/paper/${d.arxiv_id||d.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(st,{title:d.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:d.arxiv_id?`arXiv:${d.arxiv_id}`:"External resource"}),d.citation_count!=null&&e.jsxs("span",{children:[d.citation_count.toLocaleString()," cites"]})]})]},d.id))]})]})]}),e.jsx(Xa,{open:I,onOpenChange:Y,paperId:r.id,arxivId:s,initialTaskIds:((as=r.tasks)==null?void 0:as.map(d=>parseInt(d.id)))||[],initialTasks:r.tasks||[],submitMode:Re,isAuthor:Pe}),e.jsx(en,{open:j,onOpenChange:_,paperId:r.id,arxivId:s,initialMethodIds:((ns=r.methods)==null?void 0:ns.map(d=>parseInt(d.id)))||[],initialMethods:r.methods||[],submitMode:Re,isAuthor:Pe}),e.jsx(tn,{open:u,onOpenChange:p,paperId:r.id,arxivId:s,initialRepositories:((is=r.repositories)==null?void 0:is.map(d=>({url:d.url,is_official:d.is_official||!1})))||[],submitMode:Re,isAuthor:Pe}),e.jsx(sn,{open:g,onOpenChange:w,paperId:r.id,arxivId:s,initialProjectPages:((os=r.project_pages)==null?void 0:os.map(d=>({url:d.url,is_official:d.is_official||!1})))||[],submitMode:Re,isAuthor:Pe}),e.jsx(si,{open:S,onOpenChange:H,paperId:r.id,arxivId:s,initialEvaluations:U||[],paperTasks:r.tasks||[],submitMode:Re,isAuthor:Pe}),e.jsx(rn,{open:G,onOpenChange:W,paperId:r.id,arxivId:s,initialUrl:r.source_url??r.url_abs??"",submitMode:Re,isAuthor:Pe}),e.jsx(_a,{open:de!==null,onOpenChange:d=>{d||Ut(null)},sectionLabel:de?di[de]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})},fi=({viewer:t})=>e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:t.paperHref?e.jsx("a",{href:t.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"})}),t.isLoading?e.jsx(Ke,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[t.rows.map(s=>e.jsx(gi,{...s},s.label)),t.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:t.footer})]})]}),gi=({label:t,href:s,count:a,isLimited:c,links:n})=>{const o=((n==null?void 0:n.length)??0)>0,l=a!=null?`${a}${c?"+":""}`:"—",m=a?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:l}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:l});return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:t}),m]}),o&&e.jsx("div",{className:"hf-artifact-links",children:n.map(r=>e.jsx("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",children:r.label},r.href))})]})};function wt(t){return t[0]??"https://huggingface.co"}function Nt(t,s){return s[0]??t}function Ct(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const c=new Set([...t,...s??[]]);return Math.max(a??0,c.size)}export{Bi as default}; diff --git a/assets/PaperPreviewLink-Bbvo9u5G.js b/assets/PaperPreviewLink-AqikhUz3.js similarity index 98% rename from assets/PaperPreviewLink-Bbvo9u5G.js rename to assets/PaperPreviewLink-AqikhUz3.js index 8196928aa1d402df7cad1d14e233ec67bbb09f70..9d9f586bfcc09e5491247cdd7f103a6e4d8c0bbc 100644 --- a/assets/PaperPreviewLink-Bbvo9u5G.js +++ b/assets/PaperPreviewLink-AqikhUz3.js @@ -1,4 +1,4 @@ -import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-B-skc6rz.js";import{k as z}from"./katex.min-BSBacQyE.js";import{j as f,Y as T,a4 as ce,_ as ue,L as he,af as pe}from"./index-BOKpx1zD.js";import{u as me}from"./useQuery-Cj0zK8BW.js";import{H as fe,a as de,b as ge}from"./hover-card-BJtl0mwj.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-CVIt_dyy.js";import{k as z}from"./katex.min-BSBacQyE.js";import{j as f,Y as T,a4 as ce,_ as ue,L as he,af as pe}from"./index-CSNOTM3s.js";import{u as me}from"./useQuery-DCf2mroJ.js";import{H as fe,a as de,b as ge}from"./hover-card-D24Q2Pl3.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:` `,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(` `),u&&(x+=p.move(u+` diff --git a/assets/PapersListView-Cl3cg4aG.js b/assets/PapersListView-BWkrERaM.js similarity index 84% rename from assets/PapersListView-Cl3cg4aG.js rename to assets/PapersListView-BWkrERaM.js index 8382bbc3032be956727cf90f7d163f7fb3ae614e..f97605035de86ba13d57addeda3f631a7b2f7833 100644 --- a/assets/PapersListView-Cl3cg4aG.js +++ b/assets/PapersListView-BWkrERaM.js @@ -1 +1 @@ -import{u as A,r as i,j as e,L as I,b as T}from"./index-BOKpx1zD.js";import{I as F,P as L}from"./components-BkQ2EWK-.js";import{t as C,d as R}from"./transform-DLPfRTia.js";import{u as k}from"./usePapers-B51Q6z7s.js";import{u as D}from"./useDebounce-CKxXZkmt.js";import{u as E,P as O}from"./usePeriodFilter-CfD2sXw8.js";import{u as B}from"./useIntersectionObserver-DVOSMcnN.js";import{S as c}from"./skeleton-C5u4dxsY.js";import{A as $,a as M}from"./alert-De0V5ndO.js";import{u as q}from"./useQuery-Cj0zK8BW.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-B9BAVqQL.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f;const[d,N]=A(),o=d.get("search")||"",[p,v]=i.useState(o),t=D(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),N(s,{replace:!0})},[t]);const[n,b]=i.useState("new"),{period:P,setPeriod:y,publishedAfter:S}=E("All Time"),a=k({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:S,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(_=>_.results))||[]).map(C)},[a.data]),{targetRef:w,isIntersecting:h}=B({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:O.map(s=>e.jsx("button",{className:`period-btn ${P===s?"active":""}`,onClick:()=>y(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(F,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>v(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))}),(f=m.data)==null?void 0:f.map(s=>e.jsxs(I,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(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:z.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>b(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx($,{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(L,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:w,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}; +import{u as A,r as i,j as e,L as I,b as T}from"./index-CSNOTM3s.js";import{I as F,P as L}from"./components-PxXQJAWo.js";import{t as C,d as R}from"./transform-BGwKHn4w.js";import{u as k}from"./usePapers-CFugWskp.js";import{u as D}from"./useDebounce-D60wCwma.js";import{u as E,P as O}from"./usePeriodFilter-CWtHCaJm.js";import{u as B}from"./useIntersectionObserver-CUA0CMpl.js";import{S as c}from"./skeleton-DIecj65I.js";import{A as $,a as M}from"./alert-DuO9Nm7q.js";import{u as q}from"./useQuery-DCf2mroJ.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-_jD1bF9N.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f;const[d,N]=A(),o=d.get("search")||"",[p,v]=i.useState(o),t=D(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),N(s,{replace:!0})},[t]);const[n,b]=i.useState("new"),{period:P,setPeriod:y,publishedAfter:S}=E("All Time"),a=k({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:S,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(_=>_.results))||[]).map(C)},[a.data]),{targetRef:w,isIntersecting:h}=B({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:O.map(s=>e.jsx("button",{className:`period-btn ${P===s?"active":""}`,onClick:()=>y(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(F,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>v(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))}),(f=m.data)==null?void 0:f.map(s=>e.jsxs(I,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(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:z.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>b(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx($,{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(L,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:w,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}; diff --git a/assets/SavedPapersView-Bb2puS13.js b/assets/SavedPapersView-DN1bdjfb.js similarity index 86% rename from assets/SavedPapersView-Bb2puS13.js rename to assets/SavedPapersView-DN1bdjfb.js index e5522d06b0c9871e6992b3b72560050a1a874bf9..2358e0bff46f3963bbc6562090cd5c55121f46b1 100644 --- a/assets/SavedPapersView-Bb2puS13.js +++ b/assets/SavedPapersView-DN1bdjfb.js @@ -1 +1 @@ -import{e as o,j as s,ac as m,L as p,b as h}from"./index-BOKpx1zD.js";import{u as x}from"./useQuery-Cj0zK8BW.js";import{T as u,P as j}from"./components-BkQ2EWK-.js";import{S as r}from"./skeleton-C5u4dxsY.js";import{A as v,a as N}from"./alert-De0V5ndO.js";import{t as g}from"./transform-DLPfRTia.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";const L=()=>{var l;const{user:d,isLoading:c}=o(),a=x({queryKey:["my-bookmarks"],queryFn:()=>h.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return c?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(v,{variant:"destructive",className:"mb-4",children:s.jsx(N,{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(u,{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(t=>s.jsx(j,{paper:g(t),rank:1},t.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{L as default}; +import{e as o,j as s,ac as m,L as p,b as h}from"./index-CSNOTM3s.js";import{u as x}from"./useQuery-DCf2mroJ.js";import{T as u,P as j}from"./components-PxXQJAWo.js";import{S as r}from"./skeleton-DIecj65I.js";import{A as v,a as N}from"./alert-DuO9Nm7q.js";import{t as g}from"./transform-BGwKHn4w.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";const L=()=>{var l;const{user:d,isLoading:c}=o(),a=x({queryKey:["my-bookmarks"],queryFn:()=>h.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return c?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(v,{variant:"destructive",className:"mb-4",children:s.jsx(N,{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(u,{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(t=>s.jsx(j,{paper:g(t),rank:1},t.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{L as default}; diff --git a/assets/SearchOverlay-6KiZu-e3.js b/assets/SearchOverlay-BfdeDJKQ.js similarity index 93% rename from assets/SearchOverlay-6KiZu-e3.js rename to assets/SearchOverlay-BfdeDJKQ.js index 6cd233a94feb9a47692536307e24803a4debd8a0..1bae55c1c1936b82c20296929ec9f6b3672f6f25 100644 --- a/assets/SearchOverlay-6KiZu-e3.js +++ b/assets/SearchOverlay-BfdeDJKQ.js @@ -1 +1 @@ -import{r as C,a as L,Y as T,i as $,j as s,b as m}from"./index-BOKpx1zD.js";import{u as p}from"./useQuery-Cj0zK8BW.js";import{L as A}from"./LatexTitle-B4ZTuCxc.js";import{u as D}from"./useDebounce-CKxXZkmt.js";import{e as z,h as M,d as B}from"./transform-DLPfRTia.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:n,onClose:l})=>{var _,f,F,q,E,P;const v=C.useRef(null),w=L(),[c,R]=T.useState(""),[h,g]=T.useState(1),a=D(c,200),x=$();C.useEffect(()=>{var r;if(!n)return;(r=v.current)==null||r.focus();const e=K=>{K.key==="Escape"&&l()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,l]);const t=p({queryKey:["search-papers",a,h],queryFn:()=>m.searchPapers(a,h,I),enabled:n&&a.length>=2,staleTime:6e4}),k=p({queryKey:["search-tasks",a],queryFn:()=>m.getTasks({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),y=p({queryKey:["search-methods",a],queryFn:()=>m.getMethods({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),N=p({queryKey:["search-benchmarks",a],queryFn:()=>m.getDatasets({q:a,page_size:6,ordering:"-paper_count",min_eval_count:2}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((_=k.data)==null?void 0:_.results)||[],d=((f=y.data)==null?void 0:f.results)||[],u=((F=N.data)==null?void 0:F.results)||[],j=((q=t.data)==null?void 0:q.results)||[],Q=t.isFetching||k.isFetching||y.isFetching||N.isFetching,S=o.length||j.length||d.length||u.length,i=e=>{l(),w(e)},b=()=>{const e=c.trim();e&&i(`/chat?q=${encodeURIComponent(e)}`)};return s.jsx("div",{className:"search-overlay",onClick:l,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:c,onChange:e=>{R(e.target.value),g(1)},onKeyDown:e=>{x&&e.key==="Enter"&&(e.preventDefault(),b())}}),s.jsxs("div",{className:"search-results",children:[x&&c.trim()&&s.jsxs("button",{type:"button",className:"search-ask-row",onClick:b,children:[s.jsx("span",{className:"search-ask-chip",children:"assistant"}),s.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),s.jsx("kbd",{children:"↵"})]}),!a&&s.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&s.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!Q&&!S&&s.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(e=>{const r=z(M(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),s.jsx("span",{className:"name",children:B(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),d.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",d.length]}),d.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/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))]}),u.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),j.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · page ",h]}),j.map(e=>{var r;return s.jsxs("div",{className:"search-result",onClick:()=>i(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(A,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((r=e.authors)==null?void 0:r[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)}),(((E=t.data)==null?void 0:E.previous_page)||((P=t.data)==null?void 0:P.next_page))&&s.jsxs("div",{className:"search-paper-pagination",children:[s.jsx("button",{type:"button",disabled:!t.data.previous_page||t.isFetching,onClick:()=>{var e;return g(((e=t.data)==null?void 0:e.previous_page)||1)},children:"Previous"}),s.jsxs("span",{children:["Page ",h]}),s.jsx("button",{type:"button",disabled:!t.data.next_page||t.isFetching,onClick:()=>{var e;(e=t.data)!=null&&e.next_page&&g(t.data.next_page)},children:"Next"})]})]})]})]})})};export{Z as default}; +import{r as C,a as L,Y as T,i as $,j as s,b as m}from"./index-CSNOTM3s.js";import{u as p}from"./useQuery-DCf2mroJ.js";import{L as A}from"./LatexTitle-D0X1MVE6.js";import{u as D}from"./useDebounce-D60wCwma.js";import{e as z,h as M,d as B}from"./transform-BGwKHn4w.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:n,onClose:l})=>{var _,f,F,q,E,P;const v=C.useRef(null),w=L(),[c,R]=T.useState(""),[h,g]=T.useState(1),a=D(c,200),x=$();C.useEffect(()=>{var r;if(!n)return;(r=v.current)==null||r.focus();const e=K=>{K.key==="Escape"&&l()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,l]);const t=p({queryKey:["search-papers",a,h],queryFn:()=>m.searchPapers(a,h,I),enabled:n&&a.length>=2,staleTime:6e4}),k=p({queryKey:["search-tasks",a],queryFn:()=>m.getTasks({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),y=p({queryKey:["search-methods",a],queryFn:()=>m.getMethods({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),N=p({queryKey:["search-benchmarks",a],queryFn:()=>m.getDatasets({q:a,page_size:6,ordering:"-paper_count",min_eval_count:2}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((_=k.data)==null?void 0:_.results)||[],d=((f=y.data)==null?void 0:f.results)||[],u=((F=N.data)==null?void 0:F.results)||[],j=((q=t.data)==null?void 0:q.results)||[],Q=t.isFetching||k.isFetching||y.isFetching||N.isFetching,S=o.length||j.length||d.length||u.length,i=e=>{l(),w(e)},b=()=>{const e=c.trim();e&&i(`/chat?q=${encodeURIComponent(e)}`)};return s.jsx("div",{className:"search-overlay",onClick:l,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:c,onChange:e=>{R(e.target.value),g(1)},onKeyDown:e=>{x&&e.key==="Enter"&&(e.preventDefault(),b())}}),s.jsxs("div",{className:"search-results",children:[x&&c.trim()&&s.jsxs("button",{type:"button",className:"search-ask-row",onClick:b,children:[s.jsx("span",{className:"search-ask-chip",children:"assistant"}),s.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),s.jsx("kbd",{children:"↵"})]}),!a&&s.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&s.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!Q&&!S&&s.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(e=>{const r=z(M(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),s.jsx("span",{className:"name",children:B(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),d.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",d.length]}),d.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/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))]}),u.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),j.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · page ",h]}),j.map(e=>{var r;return s.jsxs("div",{className:"search-result",onClick:()=>i(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(A,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((r=e.authors)==null?void 0:r[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)}),(((E=t.data)==null?void 0:E.previous_page)||((P=t.data)==null?void 0:P.next_page))&&s.jsxs("div",{className:"search-paper-pagination",children:[s.jsx("button",{type:"button",disabled:!t.data.previous_page||t.isFetching,onClick:()=>{var e;return g(((e=t.data)==null?void 0:e.previous_page)||1)},children:"Previous"}),s.jsxs("span",{children:["Page ",h]}),s.jsx("button",{type:"button",disabled:!t.data.next_page||t.isFetching,onClick:()=>{var e;(e=t.data)!=null&&e.next_page&&g(t.data.next_page)},children:"Next"})]})]})]})]})})};export{Z as default}; diff --git a/assets/SettingsView-C5eHJ-g8.js b/assets/SettingsView-CxN_MMdg.js similarity index 97% rename from assets/SettingsView-C5eHJ-g8.js rename to assets/SettingsView-CxN_MMdg.js index 3bb90b63e635eb20c7a8a8cb56988fc423d648b7..1f5972aeb85b2801a3686b122fdda5c45fd43ac1 100644 --- a/assets/SettingsView-C5eHJ-g8.js +++ b/assets/SettingsView-CxN_MMdg.js @@ -1,4 +1,4 @@ -import{f as t,e as m,$ as u,ak as p,Y as x,j as e,ac as y}from"./index-BOKpx1zD.js";import{S as j}from"./switch-DWeySqLP.js";import{f as g,D as v}from"./latexPlainText-ChVkH0gY.js";import"./index-DdlAvtSd.js";/** +import{f as t,e as m,$ as u,ak as p,Y as x,j as e,ac as y}from"./index-CSNOTM3s.js";import{S as j}from"./switch-CuAwYhBU.js";import{f as g,D as v}from"./latexPlainText-ChVkH0gY.js";import"./index-CAtHIP-4.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SignInToEditDialog-DcJcnDsG.js b/assets/SignInToEditDialog-qIIvqqtG.js similarity index 96% rename from assets/SignInToEditDialog-DcJcnDsG.js rename to assets/SignInToEditDialog-qIIvqqtG.js index bf3b2af97ac96d5d3a56d6fd78d33450c672c487..811ca5d6345b89d93a70ac08d6a13a843d5c6dd4 100644 --- a/assets/SignInToEditDialog-DcJcnDsG.js +++ b/assets/SignInToEditDialog-qIIvqqtG.js @@ -1,4 +1,4 @@ -import{f as X,r as i,j as e,aa as W,p as q,ab as Q,s as Z,t as ee,X as te,C as se,ac as ae}from"./index-BOKpx1zD.js";import{B as D}from"./button-COASHtHZ.js";import{I as h,T as re}from"./textarea-BKXasfzv.js";import{D as U,a as H,b as O,c as V,d as $,e as ne}from"./dialog-Ba_4mPeV.js";import{u as oe}from"./useMutation-1Slfgn9F.js";import{L as ie}from"./loader-circle-kP6qHte6.js";/** +import{f as X,r as i,j as e,aa as W,p as q,ab as Q,s as Z,t as ee,X as te,C as se,ac as ae}from"./index-CSNOTM3s.js";import{B as D}from"./button-KGqIZs29.js";import{I as h,T as re}from"./textarea-BajbF2-p.js";import{D as U,a as H,b as O,c as V,d as $,e as ne}from"./dialog-CQwQlPi_.js";import{u as oe}from"./useMutation-D90cYkan.js";import{L as ie}from"./loader-circle-BCRahFjZ.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmissionsDashboard-yrnZ-D0f.js b/assets/SubmissionsDashboard-DRjK6x_I.js similarity index 99% rename from assets/SubmissionsDashboard-yrnZ-D0f.js rename to assets/SubmissionsDashboard-DRjK6x_I.js index a950187619a3991894668bacd83fc023ba0c2b9d..0747fc79f7fdbabade03b77a3606fbf1c2cb9c5d 100644 --- a/assets/SubmissionsDashboard-yrnZ-D0f.js +++ b/assets/SubmissionsDashboard-DRjK6x_I.js @@ -1,4 +1,4 @@ -var fe=s=>{throw TypeError(s)};var X=(s,t,i)=>t.has(s)||fe("Cannot "+i);var p=(s,t,i)=>(X(s,t,"read from private field"),i?i.call(s):t.get(s)),E=(s,t,i)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),_=(s,t,i,n)=>(X(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),C=(s,t,i)=>(X(s,t,"access private method"),i);import{aq as Ae,ar as ee,as as Oe,at as Me,q as ke,r as $,au as qe,f as Fe,j as e,av as Se,aw as Qe,Y as N,p as Q,ax as Ie,a4 as Ue,e as De,s as we,af as Le,ay as $e,az as Te,aA as Be,aB as ze,aC as He,aD as se}from"./index-BOKpx1zD.js";import{Q as Ee,b as Ke,c as Pe,e as Je,d as We,f as Ye,s as pe,g as Ve,h as Ge,u as ge}from"./useQuery-Cj0zK8BW.js";import{u as be}from"./useMutation-1Slfgn9F.js";import{R as Xe,S as Ze,C as es,a as ss}from"./shield-alert-Dk6P9oCq.js";import{L as B}from"./loader-circle-kP6qHte6.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var D,S,L,U,w,F,z,H,K,P,v,te,ie,Ce,ne,re,ae,_e,is=(_e=class extends Ae{constructor(t,i,n){super();E(this,v);E(this,D);E(this,S);E(this,L);E(this,U);E(this,w);E(this,F);E(this,z);E(this,H);E(this,K);E(this,P,[]);_(this,D,t),_(this,U,n),_(this,L,[]),_(this,w,[]),_(this,S,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&p(this,w).forEach(t=>{t.subscribe(i=>{C(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,w).forEach(t=>{t.destroy()})}setQueries(t,i){_(this,L,t),_(this,U,i),ee.batch(()=>{const n=p(this,w),r=C(this,v,ne).call(this,p(this,L));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const c=r.map(a=>a.observer),l=c.map(a=>a.getCurrentResult()),d=n.length!==c.length,m=c.some((a,o)=>a!==n[o]),b=d||m,x=b?!0:l.some((a,o)=>{const u=p(this,S)[o];return!u||!Oe(a,u)});!b&&!x||(b&&(_(this,P,r),_(this,w,c)),_(this,S,l),this.hasListeners()&&(b&&(je(n,c).forEach(a=>{a.destroy()}),je(c,n).forEach(a=>{a.subscribe(o=>{C(this,v,re).call(this,a,o)})})),C(this,v,ae).call(this)))})}getCurrentResult(){return p(this,S)}getQueries(){return p(this,w).map(t=>t.getCurrentQuery())}getObservers(){return p(this,w)}getOptimisticResult(t,i){const n=C(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),c=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>C(this,v,ie).call(this,l??r,i,c),()=>C(this,v,te).call(this,r,n)]}},D=new WeakMap,S=new WeakMap,L=new WeakMap,U=new WeakMap,w=new WeakMap,F=new WeakMap,z=new WeakMap,H=new WeakMap,K=new WeakMap,P=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const c=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?c:n.observer.trackResult(c,l=>{i.forEach(d=>{d.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=p(this,K),c=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,d)=>l!==r[d]));return(!p(this,F)||p(this,S)!==p(this,H)||c||i!==p(this,z))&&(_(this,z,i),_(this,H,p(this,S)),n!==void 0&&_(this,K,n),_(this,F,Me(p(this,F),i(t)))),p(this,F)}return t},Ce=function(){var t;return((t=p(this,U))==null?void 0:t.combine)!==void 0&&p(this,w).some((i,n)=>{var r;return i.options.suspense&&((r=p(this,S)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;p(this,w).forEach(r=>{const c=r.options.queryHash;if(!c)return;const l=i.get(c);l?l.push(r):i.set(c,[r])});const n=[];return t.forEach(r=>{var m;const c=p(this,D).defaultQueryOptions(r),d=((m=i.get(c.queryHash))==null?void 0:m.shift())??new Ee(p(this,D),c);n.push({defaultedQueryOptions:c,observer:d})}),n},re=function(t,i){const n=p(this,w).indexOf(t);n!==-1&&(_(this,S,ts(p(this,S),n,i)),C(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=C(this,v,te).call(this,p(this,S),p(this,P)),n=C(this,v,Ce).call(this),r=p(this,F),c=n?r:C(this,v,ie).call(this,i,(t=p(this,U))==null?void 0:t.combine);(n||r!==c)&&ee.batch(()=>{this.listeners.forEach(l=>{l(p(this,S))})})}},_e);function V({queries:s,...t},i){const n=ke(),r=Ke(),c=Pe(),l=$.useMemo(()=>s.map(h=>{const y=n.defaultQueryOptions(h);return y._optimisticResults=r?"isRestoring":"optimistic",y}),[s,n,r]);l.forEach(h=>{Je(h);const y=n.getQueryCache().get(h.queryHash);We(h,c,y)}),Ye(c);const[d]=$.useState(()=>new is(n,l,t)),[m,b,x]=d.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(h=>a?d.subscribe(ee.batchCalls(h)):qe,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$.useEffect(()=>{d.setQueries(l,t)},[l,t,d]);const u=m.some((h,y)=>pe(l[y],h))?m.flatMap((h,y)=>{const f=l[y];if(f&&pe(f,h)){const I=new Ee(n,f);return Ve(f,I,c)}return[]}):[];if(u.length>0)throw Promise.all(u);const j=m.find((h,y)=>{const f=l[y];return f&&Ge({result:h,errorResetBoundary:c,throwOnError:f.throwOnError,query:n.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(j!=null&&j.error)throw j.error;return b(x())}/** +var fe=s=>{throw TypeError(s)};var X=(s,t,i)=>t.has(s)||fe("Cannot "+i);var p=(s,t,i)=>(X(s,t,"read from private field"),i?i.call(s):t.get(s)),E=(s,t,i)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),_=(s,t,i,n)=>(X(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),C=(s,t,i)=>(X(s,t,"access private method"),i);import{aq as Ae,ar as ee,as as Oe,at as Me,q as ke,r as $,au as qe,f as Fe,j as e,av as Se,aw as Qe,Y as N,p as Q,ax as Ie,a4 as Ue,e as De,s as we,af as Le,ay as $e,az as Te,aA as Be,aB as ze,aC as He,aD as se}from"./index-CSNOTM3s.js";import{Q as Ee,b as Ke,c as Pe,e as Je,d as We,f as Ye,s as pe,g as Ve,h as Ge,u as ge}from"./useQuery-DCf2mroJ.js";import{u as be}from"./useMutation-D90cYkan.js";import{R as Xe,S as Ze,C as es,a as ss}from"./shield-alert-jW3iPtxV.js";import{L as B}from"./loader-circle-BCRahFjZ.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var D,S,L,U,w,F,z,H,K,P,v,te,ie,Ce,ne,re,ae,_e,is=(_e=class extends Ae{constructor(t,i,n){super();E(this,v);E(this,D);E(this,S);E(this,L);E(this,U);E(this,w);E(this,F);E(this,z);E(this,H);E(this,K);E(this,P,[]);_(this,D,t),_(this,U,n),_(this,L,[]),_(this,w,[]),_(this,S,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&p(this,w).forEach(t=>{t.subscribe(i=>{C(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,w).forEach(t=>{t.destroy()})}setQueries(t,i){_(this,L,t),_(this,U,i),ee.batch(()=>{const n=p(this,w),r=C(this,v,ne).call(this,p(this,L));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const c=r.map(a=>a.observer),l=c.map(a=>a.getCurrentResult()),d=n.length!==c.length,m=c.some((a,o)=>a!==n[o]),b=d||m,x=b?!0:l.some((a,o)=>{const u=p(this,S)[o];return!u||!Oe(a,u)});!b&&!x||(b&&(_(this,P,r),_(this,w,c)),_(this,S,l),this.hasListeners()&&(b&&(je(n,c).forEach(a=>{a.destroy()}),je(c,n).forEach(a=>{a.subscribe(o=>{C(this,v,re).call(this,a,o)})})),C(this,v,ae).call(this)))})}getCurrentResult(){return p(this,S)}getQueries(){return p(this,w).map(t=>t.getCurrentQuery())}getObservers(){return p(this,w)}getOptimisticResult(t,i){const n=C(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),c=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>C(this,v,ie).call(this,l??r,i,c),()=>C(this,v,te).call(this,r,n)]}},D=new WeakMap,S=new WeakMap,L=new WeakMap,U=new WeakMap,w=new WeakMap,F=new WeakMap,z=new WeakMap,H=new WeakMap,K=new WeakMap,P=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const c=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?c:n.observer.trackResult(c,l=>{i.forEach(d=>{d.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=p(this,K),c=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,d)=>l!==r[d]));return(!p(this,F)||p(this,S)!==p(this,H)||c||i!==p(this,z))&&(_(this,z,i),_(this,H,p(this,S)),n!==void 0&&_(this,K,n),_(this,F,Me(p(this,F),i(t)))),p(this,F)}return t},Ce=function(){var t;return((t=p(this,U))==null?void 0:t.combine)!==void 0&&p(this,w).some((i,n)=>{var r;return i.options.suspense&&((r=p(this,S)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;p(this,w).forEach(r=>{const c=r.options.queryHash;if(!c)return;const l=i.get(c);l?l.push(r):i.set(c,[r])});const n=[];return t.forEach(r=>{var m;const c=p(this,D).defaultQueryOptions(r),d=((m=i.get(c.queryHash))==null?void 0:m.shift())??new Ee(p(this,D),c);n.push({defaultedQueryOptions:c,observer:d})}),n},re=function(t,i){const n=p(this,w).indexOf(t);n!==-1&&(_(this,S,ts(p(this,S),n,i)),C(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=C(this,v,te).call(this,p(this,S),p(this,P)),n=C(this,v,Ce).call(this),r=p(this,F),c=n?r:C(this,v,ie).call(this,i,(t=p(this,U))==null?void 0:t.combine);(n||r!==c)&&ee.batch(()=>{this.listeners.forEach(l=>{l(p(this,S))})})}},_e);function V({queries:s,...t},i){const n=ke(),r=Ke(),c=Pe(),l=$.useMemo(()=>s.map(h=>{const y=n.defaultQueryOptions(h);return y._optimisticResults=r?"isRestoring":"optimistic",y}),[s,n,r]);l.forEach(h=>{Je(h);const y=n.getQueryCache().get(h.queryHash);We(h,c,y)}),Ye(c);const[d]=$.useState(()=>new is(n,l,t)),[m,b,x]=d.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(h=>a?d.subscribe(ee.batchCalls(h)):qe,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$.useEffect(()=>{d.setQueries(l,t)},[l,t,d]);const u=m.some((h,y)=>pe(l[y],h))?m.flatMap((h,y)=>{const f=l[y];if(f&&pe(f,h)){const I=new Ee(n,f);return Ve(f,I,c)}return[]}):[];if(u.length>0)throw Promise.all(u);const j=m.find((h,y)=>{const f=l[y];return f&&Ge({result:h,errorResetBoundary:c,throwOnError:f.throwOnError,query:n.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(j!=null&&j.error)throw j.error;return b(x())}/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-B_2rf5ES.js b/assets/SubmitView-CZpScvZm.js similarity index 94% rename from assets/SubmitView-B_2rf5ES.js rename to assets/SubmitView-CZpScvZm.js index 6cf8f0fb4eb8781e0921560091455834a037efe2..2487d9ca891f44ed76de2e121dae37a7e358bf9d 100644 --- a/assets/SubmitView-B_2rf5ES.js +++ b/assets/SubmitView-CZpScvZm.js @@ -1 +1 @@ -import{a as R,q as T,s as _,Y as n,j as e,al as D}from"./index-BOKpx1zD.js";import{u as k}from"./useMutation-1Slfgn9F.js";import{A as w,a as C}from"./alert-De0V5ndO.js";import{B as j}from"./button-COASHtHZ.js";import{I as h,T as z}from"./textarea-BKXasfzv.js";const E=/^\d{4}\.\d{4,5}(v\d+)?$/i,F=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,X=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function S(r){const a=r.trim();return a?E.test(a)||F.test(a)||X.test(a)?"arxiv":/^https?:\/\//i.test(a)?"external":"arxiv":"empty"}function L(r,a){const i=r.trim();if(S(i)==="arxiv")return/^https?:\/\//i.test(i)?{source_url:i}:{arxiv_id:i};const s={source_url:i},l=a.title.trim();l&&(s.title=l);const p=a.abstract.trim();p&&(s.abstract=p);const o=a.authors.split(/[,\n]/).map(x=>x.trim()).filter(Boolean);return o.length>0&&(s.authors=o),a.datePublished&&(s.date_published=a.datePublished),s}function q(r){const a=r;if(!a)return"Submission failed";if(a.response)try{const i=JSON.parse(a.response);if(typeof i.detail=="string")return i.detail}catch{return a.response}return a.message||"Submission failed"}const Q=()=>{const r=R(),a=T(),{toast:i}=_(),[d,s]=n.useState(""),[l,p]=n.useState(""),[o,x]=n.useState(""),[f,I]=n.useState(""),[y,A]=n.useState(""),[b,g]=n.useState(null),u=S(d),v=u==="external",c=k({mutationFn:t=>D(t),onSuccess:t=>{a.invalidateQueries({queryKey:["papers"],refetchType:"none"}),a.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),a.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const m=t.refreshed&&t.created&&t.latest_version;i({title:m?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:m?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),r(`/paper/${t.route_identifier}`)},onError:t=>{g(q(t))}}),P=t=>{if(t.preventDefault(),g(null),u==="empty"){g("Enter an arXiv ID or a paper URL to submit.");return}const m=L(d,{title:l,abstract:o,authors:f,datePublished:y});c.mutate(m)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:"Index an arXiv paper or add a non-arXiv paper (blog post, technical report, model release page). Submissions are public and appear in the feed immediately."}),e.jsxs("form",{onSubmit:P,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:d,onChange:t=>s(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:u==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":u==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),v&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:l,onChange:t=>p(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(z,{id:"submit-abstract",value:o,onChange:t=>x(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:f,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:y,onChange:t=>A(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),b&&e.jsx(w,{variant:"destructive",children:e.jsx(C,{children:b})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(j,{type:"submit",disabled:c.isPending,children:c.isPending?v?"Fetching & indexing…":"Indexing…":"Submit paper"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>r(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Q as default}; +import{a as R,q as T,s as _,Y as n,j as e,al as D}from"./index-CSNOTM3s.js";import{u as k}from"./useMutation-D90cYkan.js";import{A as w,a as C}from"./alert-DuO9Nm7q.js";import{B as j}from"./button-KGqIZs29.js";import{I as h,T as z}from"./textarea-BajbF2-p.js";const E=/^\d{4}\.\d{4,5}(v\d+)?$/i,F=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,X=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function S(r){const a=r.trim();return a?E.test(a)||F.test(a)||X.test(a)?"arxiv":/^https?:\/\//i.test(a)?"external":"arxiv":"empty"}function L(r,a){const i=r.trim();if(S(i)==="arxiv")return/^https?:\/\//i.test(i)?{source_url:i}:{arxiv_id:i};const s={source_url:i},l=a.title.trim();l&&(s.title=l);const p=a.abstract.trim();p&&(s.abstract=p);const o=a.authors.split(/[,\n]/).map(x=>x.trim()).filter(Boolean);return o.length>0&&(s.authors=o),a.datePublished&&(s.date_published=a.datePublished),s}function q(r){const a=r;if(!a)return"Submission failed";if(a.response)try{const i=JSON.parse(a.response);if(typeof i.detail=="string")return i.detail}catch{return a.response}return a.message||"Submission failed"}const Q=()=>{const r=R(),a=T(),{toast:i}=_(),[d,s]=n.useState(""),[l,p]=n.useState(""),[o,x]=n.useState(""),[f,I]=n.useState(""),[y,A]=n.useState(""),[b,g]=n.useState(null),u=S(d),v=u==="external",c=k({mutationFn:t=>D(t),onSuccess:t=>{a.invalidateQueries({queryKey:["papers"],refetchType:"none"}),a.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),a.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const m=t.refreshed&&t.created&&t.latest_version;i({title:m?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:m?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),r(`/paper/${t.route_identifier}`)},onError:t=>{g(q(t))}}),P=t=>{if(t.preventDefault(),g(null),u==="empty"){g("Enter an arXiv ID or a paper URL to submit.");return}const m=L(d,{title:l,abstract:o,authors:f,datePublished:y});c.mutate(m)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:"Index an arXiv paper or add a non-arXiv paper (blog post, technical report, model release page). Submissions are public and appear in the feed immediately."}),e.jsxs("form",{onSubmit:P,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:d,onChange:t=>s(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:u==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":u==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),v&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:l,onChange:t=>p(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(z,{id:"submit-abstract",value:o,onChange:t=>x(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:f,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:y,onChange:t=>A(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),b&&e.jsx(w,{variant:"destructive",children:e.jsx(C,{children:b})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(j,{type:"submit",disabled:c.isPending,children:c.isPending?v?"Fetching & indexing…":"Indexing…":"Submit paper"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>r(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Q as default}; diff --git a/assets/TagBrowseView-ClVbIghl.js b/assets/TagBrowseView-BX-GwgjY.js similarity index 96% rename from assets/TagBrowseView-ClVbIghl.js rename to assets/TagBrowseView-BX-GwgjY.js index 07c3e8f18f79b53723c11a70d7412d7c606b80d3..4acebb5249b705c0585fda8e62447052797be57b 100644 --- a/assets/TagBrowseView-ClVbIghl.js +++ b/assets/TagBrowseView-BX-GwgjY.js @@ -1,4 +1,4 @@ -import{f as ze,r as h,k as Y,j as e,h as B,E as xe,m as ge,P as Ge,o as be,l as je,a7 as Qe,Y as v,a8 as We,a9 as Ye,p as Z,d as Ze,a as Je,u as Xe,$ as es,L as R,a4 as ss,b as he}from"./index-BOKpx1zD.js";import{u as ue}from"./useQuery-Cj0zK8BW.js";import{P as as,M as ns}from"./components-BkQ2EWK-.js";import{B as ts}from"./BenchmarkTrendSparkline-QiCYNsTg.js";import{M as G}from"./MarkdownText-CFWVPyKn.js";import{t as rs,d as F}from"./transform-DLPfRTia.js";import{b as os}from"./usePapers-B51Q6z7s.js";import{u as cs}from"./useIntersectionObserver-DVOSMcnN.js";import{S as L}from"./skeleton-C5u4dxsY.js";import{A as is,a as ls}from"./alert-De0V5ndO.js";import{C as ds}from"./chevron-down-DDO48iug.js";import{G as ms}from"./github-V6TTeQuy.js";import"./LatexTitle-B4ZTuCxc.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bbvo9u5G.js";import"./index-B-skc6rz.js";import"./hover-card-BJtl0mwj.js";import"./useInfiniteQuery-B9BAVqQL.js";/** +import{f as ze,r as h,k as Y,j as e,h as B,E as xe,m as ge,P as Ge,o as be,l as je,a7 as Qe,Y as v,a8 as We,a9 as Ye,p as Z,d as Ze,a as Je,u as Xe,$ as es,L as R,a4 as ss,b as he}from"./index-CSNOTM3s.js";import{u as ue}from"./useQuery-DCf2mroJ.js";import{P as as,M as ns}from"./components-PxXQJAWo.js";import{B as ts}from"./BenchmarkTrendSparkline-DiSd6PbY.js";import{M as G}from"./MarkdownText-DJVhHGem.js";import{t as rs,d as F}from"./transform-BGwKHn4w.js";import{b as os}from"./usePapers-CFugWskp.js";import{u as cs}from"./useIntersectionObserver-CUA0CMpl.js";import{S as L}from"./skeleton-DIecj65I.js";import{A as is,a as ls}from"./alert-DuO9Nm7q.js";import{C as ds}from"./chevron-down-CnQ_UTkP.js";import{G as ms}from"./github-x66pH1Ze.js";import"./LatexTitle-D0X1MVE6.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-AqikhUz3.js";import"./index-CVIt_dyy.js";import"./hover-card-D24Q2Pl3.js";import"./useInfiniteQuery-_jD1bF9N.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TagsIndexView-DfMgNEhz.js b/assets/TagsIndexView-SPf3jDGK.js similarity index 84% rename from assets/TagsIndexView-DfMgNEhz.js rename to assets/TagsIndexView-SPf3jDGK.js index 76cb0d912194fb00c0de81b152cbc195f2372081..ff01a9c562516eb5332dcf363fe227de46591191 100644 --- a/assets/TagsIndexView-DfMgNEhz.js +++ b/assets/TagsIndexView-SPf3jDGK.js @@ -1 +1 @@ -import{r as d,j as e,L as p,b as h}from"./index-BOKpx1zD.js";import{u as g}from"./useQuery-Cj0zK8BW.js";import{e as x,h as f,d as u}from"./transform-DLPfRTia.js";import{S as m}from"./skeleton-C5u4dxsY.js";import{A as j,a as y}from"./alert-De0V5ndO.js";import{T as k}from"./TaxonomySuggestionTile-BZeB9d42.js";import"./SignInToEditDialog-DcJcnDsG.js";import"./button-COASHtHZ.js";import"./textarea-BKXasfzv.js";import"./dialog-Ba_4mPeV.js";import"./useMutation-1Slfgn9F.js";import"./loader-circle-kP6qHte6.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",D=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>h.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},t=n=>s[v(n)]??999;return[...r.data.results].sort((n,a)=>{const i=t(n.name),l=t(a.name);return i!==l?i-l:n.name.localeCompare(a.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,t)=>s+t.tasks.length,0),[o]);return r.error?e.jsx("div",{className:"page",children:e.jsx(j,{variant:"destructive",children:e.jsx(y,{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."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,t)=>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:6}).map((n,a)=>e.jsx(m,{className:"h-24"},a))})]},t))}):o.map(s=>{const t=s.tasks;if(t.length===0)return null;const n=t.reduce((a,i)=>a+(i.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:s.name}),s.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:s.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[t.length," ",t.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return e.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),e.jsx(k,{kind:"task"})]})]},s.id)}),c>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(s=>s.tasks.length>0).length," areas."]})]})};export{D as default}; +import{r as d,j as e,L as p,b as h}from"./index-CSNOTM3s.js";import{u as g}from"./useQuery-DCf2mroJ.js";import{e as x,h as f,d as u}from"./transform-BGwKHn4w.js";import{S as m}from"./skeleton-DIecj65I.js";import{A as j,a as y}from"./alert-DuO9Nm7q.js";import{T as k}from"./TaxonomySuggestionTile-NN3nK-Nj.js";import"./SignInToEditDialog-qIIvqqtG.js";import"./button-KGqIZs29.js";import"./textarea-BajbF2-p.js";import"./dialog-CQwQlPi_.js";import"./useMutation-D90cYkan.js";import"./loader-circle-BCRahFjZ.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",D=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>h.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},t=n=>s[v(n)]??999;return[...r.data.results].sort((n,a)=>{const i=t(n.name),l=t(a.name);return i!==l?i-l:n.name.localeCompare(a.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,t)=>s+t.tasks.length,0),[o]);return r.error?e.jsx("div",{className:"page",children:e.jsx(j,{variant:"destructive",children:e.jsx(y,{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."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,t)=>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:6}).map((n,a)=>e.jsx(m,{className:"h-24"},a))})]},t))}):o.map(s=>{const t=s.tasks;if(t.length===0)return null;const n=t.reduce((a,i)=>a+(i.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:s.name}),s.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:s.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[t.length," ",t.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return e.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),e.jsx(k,{kind:"task"})]})]},s.id)}),c>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(s=>s.tasks.length>0).length," areas."]})]})};export{D as default}; diff --git a/assets/TaxonomySuggestionTile-BZeB9d42.js b/assets/TaxonomySuggestionTile-NN3nK-Nj.js similarity index 83% rename from assets/TaxonomySuggestionTile-BZeB9d42.js rename to assets/TaxonomySuggestionTile-NN3nK-Nj.js index 646765cfab63c8546becfc13012917e26dad7c5c..603e154c50ba8c34eed2f5deb26a3c1f2360e5dc 100644 --- a/assets/TaxonomySuggestionTile-BZeB9d42.js +++ b/assets/TaxonomySuggestionTile-NN3nK-Nj.js @@ -1 +1 @@ -import{e as u,r as o,j as e}from"./index-BOKpx1zD.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-DcJcnDsG.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T}; +import{e as u,r as o,j as e}from"./index-CSNOTM3s.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-qIIvqqtG.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T}; diff --git a/assets/TrendsView-DdwMqPok.js b/assets/TrendsView-DU4iFMLV.js similarity index 97% rename from assets/TrendsView-DdwMqPok.js rename to assets/TrendsView-DU4iFMLV.js index dec9b302002a2edf15ccecf594305de5df2c6f65..5a1661c2705baf5b45adafc1f366c37c32751c67 100644 --- a/assets/TrendsView-DdwMqPok.js +++ b/assets/TrendsView-DU4iFMLV.js @@ -1 +1 @@ -import{b as X,Y as G,j as e}from"./index-BOKpx1zD.js";import{u as J}from"./useQuery-Cj0zK8BW.js";import{A as Y,a as q}from"./alert-De0V5ndO.js";import{S as P}from"./skeleton-C5u4dxsY.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},E=()=>X.getResearchTrends(),f=980,j=400,x=62,B=26,g=30,Q=58,u=f-x-B,F=j-g-Q,v=g+F,V=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r{const[a,y]=G.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>g+F*(1-n/b);if(s===0)return null;const R=i.map((n,h)=>[d(h),p(n.percent)]),A=V(R),_=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(i[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(i[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:r,display:"inline-block"}}),i[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},L={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},M={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=J({queryKey:["research-trends"],queryFn:E,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(Y,{variant:"destructive",children:e.jsx(q,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:L,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:L,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; +import{b as X,Y as G,j as e}from"./index-CSNOTM3s.js";import{u as J}from"./useQuery-DCf2mroJ.js";import{A as Y,a as q}from"./alert-DuO9Nm7q.js";import{S as P}from"./skeleton-DIecj65I.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},E=()=>X.getResearchTrends(),f=980,j=400,x=62,B=26,g=30,Q=58,u=f-x-B,F=j-g-Q,v=g+F,V=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r{const[a,y]=G.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>g+F*(1-n/b);if(s===0)return null;const R=i.map((n,h)=>[d(h),p(n.percent)]),A=V(R),_=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(i[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(i[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:r,display:"inline-block"}}),i[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},L={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},M={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=J({queryKey:["research-trends"],queryFn:E,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(Y,{variant:"destructive",children:e.jsx(q,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:L,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:L,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; diff --git a/assets/alert-De0V5ndO.js b/assets/alert-DuO9Nm7q.js similarity index 92% rename from assets/alert-De0V5ndO.js rename to assets/alert-DuO9Nm7q.js index ea79ca79231d06405ca3dbf6ad2e225feed29be8..8c587e584b950ceb3252a894122ed04c2c9e66b0 100644 --- a/assets/alert-De0V5ndO.js +++ b/assets/alert-DuO9Nm7q.js @@ -1 +1 @@ -import{r as a,j as s,p as l,ab as i}from"./index-BOKpx1zD.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{r as a,j as s,p as l,ab as i}from"./index-CSNOTM3s.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/button-COASHtHZ.js b/assets/button-KGqIZs29.js similarity index 89% rename from assets/button-COASHtHZ.js rename to assets/button-KGqIZs29.js index bd5381ff10e6572fe3fe9749e9c93e2341b5a7e7..b7442feaa34d802afd5514cdf1c41a4f8637fc64 100644 --- a/assets/button-COASHtHZ.js +++ b/assets/button-KGqIZs29.js @@ -1 +1 @@ -import{r as a,j as d,ap as u,p as c,ab as f}from"./index-BOKpx1zD.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; +import{r as a,j as d,ap as u,p as c,ab as f}from"./index-CSNOTM3s.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; diff --git a/assets/chatSessions-C-yr7eOL.js b/assets/chatSessions-Dmenu8US.js similarity index 98% rename from assets/chatSessions-C-yr7eOL.js rename to assets/chatSessions-Dmenu8US.js index 7244af6c665eae8b311fae6a3266b04c3af4bce2..d365eb223262d4f45622aecc1dc945c136006a5d 100644 --- a/assets/chatSessions-C-yr7eOL.js +++ b/assets/chatSessions-Dmenu8US.js @@ -1 +1 @@ -import{j as n,c as p}from"./index-BOKpx1zD.js";const g=({light:t})=>n.jsx("span",{className:`chat-spinner${t?" chat-spinner-light":""}`}),m=({open:t})=>n.jsx("svg",{className:`chat-chev${t?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"m6 9 6 6 6-6"})}),x=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"12",cy:"12",r:"9"}),n.jsx("path",{d:"m9 12 2 2 4-4"})]}),w=({size:t=14})=>n.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"11",cy:"11",r:"7"}),n.jsx("path",{d:"m21 21-4.3-4.3"})]}),j=()=>n.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:n.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),C=()=>n.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"M12 5v14M5 12h14"})}),y=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[n.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),n.jsx("path",{d:"M9 4v16"})]}),S=()=>n.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),_=({models:t,selectedModel:r,onModelChange:o,disabled:e})=>{var i;const s=((i=t.find(a=>a.id===r))==null?void 0:i.label)??`${r} (unavailable)`,c=Math.min(Math.max(s.length+5,12),32);return n.jsxs("select",{className:"chat-model-select",style:{width:`${c}ch`},value:r,disabled:e,onChange:a=>o(a.target.value),"aria-label":"Research model",children:[!t.some(a=>a.id===r)&&n.jsx("option",{value:r,disabled:!0,children:s}),t.map(a=>n.jsx("option",{value:a.id,children:a.label},a.id))]})},h="pwc:chat-oauth-draft",l="pwc:chat-oauth-model",d="pwc:chat-oauth-auto-send";function k(t,r){const o=t.trim();o&&(sessionStorage.setItem(h,o),sessionStorage.setItem(d,"1"),r&&sessionStorage.setItem(l,r))}function T(){var r;if(typeof window>"u"||sessionStorage.getItem(d)!=="1")return null;const t=(r=sessionStorage.getItem(h))==null?void 0:r.trim();return t?{prompt:t,model:sessionStorage.getItem(l)}:null}function M(){sessionStorage.removeItem(h),sessionStorage.removeItem(l),sessionStorage.removeItem(d)}const f="deepseek-ai/DeepSeek-V4-Flash",D=[{id:f,label:"DeepSeek V4 Flash"},{id:"zai-org/GLM-5.2",label:"GLM 5.2"}];async function u(t,r){const o=await fetch(p(t),{credentials:"include",headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const e=await o.json().catch(()=>null),s=e==null?void 0:e.detail;throw new Error((s==null?void 0:s.message)||s||`Chat request failed (${o.status})`)}return o.status===204?void 0:o.json()}async function I(){const t=[];let r=null;do{const o=new URLSearchParams({limit:"50"});r&&o.set("cursor",r);const e=await u(`/api/v1/chat/sessions?${o.toString()}`);t.push(...e.items),r=e.next_cursor}while(r&&t.length<100);return t}function L(t){return u(`/api/v1/chat/sessions/${t}`)}function A(t,r){return u(`/api/v1/chat/sessions/${t}`,{method:"PATCH",body:JSON.stringify(r)})}function E(t){return u(`/api/v1/chat/sessions/${t}`,{method:"DELETE"})}async function b(){return u("/api/v1/chat/models")}function $(t){const r=e=>e.map(s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s.kind==="tool"?{...s,status:s.status==="running"?"error":s.status,open:s.status==="error"||s.status==="denied"||s.status==="running"}:{...s,done:!0}),o=e=>e==="provider_error"?"The model provider failed before completing the response. You can edit and retry your question.":e==="persistence_error"?"The response could not be saved. You can edit and retry your question.":e==="transcript_mirror_error"?"The conversation could not be saved. Please try again in a new chat.":"The response did not complete. You can edit and retry your question.";return t.messages.flatMap(e=>{if(e.role==="assistant")return[{id:e.id,role:"assistant",blocks:r(e.display_blocks),followups:e.followups,citations:e.citations,streaming:!1}];const s={id:e.id,role:"user",text:e.content,revision:e.revision,status:e.status,error:e.status==="complete"?void 0:e.error_code||e.status};return e.status!=="error"?[s]:[s,{id:`${e.id}-error`,role:"assistant",blocks:r(e.display_blocks),streaming:!1,error:o(e.error_code)}]})}function q(t){const r=Date.now(),o=new Date().setHours(0,0,0,0),e=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const s of[...t].sort((c,i)=>Date.parse(i.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(s.updated_at),i=r-c;c>=o?e[0].items.push(s):i<7*864e5?e[1].items.push(s):i<30*864e5?e[2].items.push(s):e[3].items.push(s)}return e.filter(s=>s.items.length>0)}export{j as A,x as C,f as D,D as F,_ as M,C as P,g as S,S as T,m as a,w as b,h as c,l as d,d as e,M as f,b as g,L as h,y as i,q as j,E as k,I as l,k as q,T as r,$ as t,A as u}; +import{j as n,c as p}from"./index-CSNOTM3s.js";const g=({light:t})=>n.jsx("span",{className:`chat-spinner${t?" chat-spinner-light":""}`}),m=({open:t})=>n.jsx("svg",{className:`chat-chev${t?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"m6 9 6 6 6-6"})}),x=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"12",cy:"12",r:"9"}),n.jsx("path",{d:"m9 12 2 2 4-4"})]}),w=({size:t=14})=>n.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"11",cy:"11",r:"7"}),n.jsx("path",{d:"m21 21-4.3-4.3"})]}),j=()=>n.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:n.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),C=()=>n.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"M12 5v14M5 12h14"})}),y=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[n.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),n.jsx("path",{d:"M9 4v16"})]}),S=()=>n.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),_=({models:t,selectedModel:r,onModelChange:o,disabled:e})=>{var i;const s=((i=t.find(a=>a.id===r))==null?void 0:i.label)??`${r} (unavailable)`,c=Math.min(Math.max(s.length+5,12),32);return n.jsxs("select",{className:"chat-model-select",style:{width:`${c}ch`},value:r,disabled:e,onChange:a=>o(a.target.value),"aria-label":"Research model",children:[!t.some(a=>a.id===r)&&n.jsx("option",{value:r,disabled:!0,children:s}),t.map(a=>n.jsx("option",{value:a.id,children:a.label},a.id))]})},h="pwc:chat-oauth-draft",l="pwc:chat-oauth-model",d="pwc:chat-oauth-auto-send";function k(t,r){const o=t.trim();o&&(sessionStorage.setItem(h,o),sessionStorage.setItem(d,"1"),r&&sessionStorage.setItem(l,r))}function T(){var r;if(typeof window>"u"||sessionStorage.getItem(d)!=="1")return null;const t=(r=sessionStorage.getItem(h))==null?void 0:r.trim();return t?{prompt:t,model:sessionStorage.getItem(l)}:null}function M(){sessionStorage.removeItem(h),sessionStorage.removeItem(l),sessionStorage.removeItem(d)}const f="deepseek-ai/DeepSeek-V4-Flash",D=[{id:f,label:"DeepSeek V4 Flash"},{id:"zai-org/GLM-5.2",label:"GLM 5.2"}];async function u(t,r){const o=await fetch(p(t),{credentials:"include",headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const e=await o.json().catch(()=>null),s=e==null?void 0:e.detail;throw new Error((s==null?void 0:s.message)||s||`Chat request failed (${o.status})`)}return o.status===204?void 0:o.json()}async function I(){const t=[];let r=null;do{const o=new URLSearchParams({limit:"50"});r&&o.set("cursor",r);const e=await u(`/api/v1/chat/sessions?${o.toString()}`);t.push(...e.items),r=e.next_cursor}while(r&&t.length<100);return t}function L(t){return u(`/api/v1/chat/sessions/${t}`)}function A(t,r){return u(`/api/v1/chat/sessions/${t}`,{method:"PATCH",body:JSON.stringify(r)})}function E(t){return u(`/api/v1/chat/sessions/${t}`,{method:"DELETE"})}async function b(){return u("/api/v1/chat/models")}function $(t){const r=e=>e.map(s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s.kind==="tool"?{...s,status:s.status==="running"?"error":s.status,open:s.status==="error"||s.status==="denied"||s.status==="running"}:{...s,done:!0}),o=e=>e==="provider_error"?"The model provider failed before completing the response. You can edit and retry your question.":e==="persistence_error"?"The response could not be saved. You can edit and retry your question.":e==="transcript_mirror_error"?"The conversation could not be saved. Please try again in a new chat.":"The response did not complete. You can edit and retry your question.";return t.messages.flatMap(e=>{if(e.role==="assistant")return[{id:e.id,role:"assistant",blocks:r(e.display_blocks),followups:e.followups,citations:e.citations,streaming:!1}];const s={id:e.id,role:"user",text:e.content,revision:e.revision,status:e.status,error:e.status==="complete"?void 0:e.error_code||e.status};return e.status!=="error"?[s]:[s,{id:`${e.id}-error`,role:"assistant",blocks:r(e.display_blocks),streaming:!1,error:o(e.error_code)}]})}function q(t){const r=Date.now(),o=new Date().setHours(0,0,0,0),e=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const s of[...t].sort((c,i)=>Date.parse(i.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(s.updated_at),i=r-c;c>=o?e[0].items.push(s):i<7*864e5?e[1].items.push(s):i<30*864e5?e[2].items.push(s):e[3].items.push(s)}return e.filter(s=>s.items.length>0)}export{j as A,x as C,f as D,D as F,_ as M,C as P,g as S,S as T,m as a,w as b,h as c,l as d,d as e,M as f,b as g,L as h,y as i,q as j,E as k,I as l,k as q,T as r,$ as t,A as u}; diff --git a/assets/chevron-down-DDO48iug.js b/assets/chevron-down-CnQ_UTkP.js similarity index 85% rename from assets/chevron-down-DDO48iug.js rename to assets/chevron-down-CnQ_UTkP.js index 47dcce38ac3f0e08b619f5cc2348e83f06727175..2babae117bec29d4a787bd54f8b22e48eed0a01f 100644 --- a/assets/chevron-down-DDO48iug.js +++ b/assets/chevron-down-CnQ_UTkP.js @@ -1,4 +1,4 @@ -import{f as o}from"./index-BOKpx1zD.js";/** +import{f as o}from"./index-CSNOTM3s.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codexAddEvals-CUJKpU1a.js b/assets/codexAddEvals-DqYnwrnj.js similarity index 97% rename from assets/codexAddEvals-CUJKpU1a.js rename to assets/codexAddEvals-DqYnwrnj.js index f78c316601e9ee8d4ace1a4b4479bde57c61c424..8ac2fbc7a69a693ac1ff3d7745f6420f316c7e40 100644 --- a/assets/codexAddEvals-CUJKpU1a.js +++ b/assets/codexAddEvals-DqYnwrnj.js @@ -1,4 +1,4 @@ -import{f as o,j as i,p as c,ab as d,c as n}from"./index-BOKpx1zD.js";/** +import{f as o,j as i,p as c,ab as d,c as n}from"./index-CSNOTM3s.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/components-BkQ2EWK-.js b/assets/components-PxXQJAWo.js similarity index 98% rename from assets/components-BkQ2EWK-.js rename to assets/components-PxXQJAWo.js index 3cacdadafa8314454b7f8b5a1c32356876be0701..7bd5582d1c93092f61cef3654a419f909027f117 100644 --- a/assets/components-BkQ2EWK-.js +++ b/assets/components-PxXQJAWo.js @@ -1 +1 @@ -import{q as R,Y as g,b as T,j as e,L,a as w}from"./index-BOKpx1zD.js";import{L as E,a as z}from"./LatexTitle-B4ZTuCxc.js";import{h as P,d as Z,f as B,e as H}from"./transform-DLPfRTia.js";const D=({slug:t,label:s,onClick:r})=>{const l=w(),x=P(t),o=H(x),h=i=>{if(i.stopPropagation(),r){r(t);return}l(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),Z(s||B(t),t)]})},G=({method:t,onClick:s})=>{const r=w(),l=t.slug||t.id||"";if(!l)return null;const x=o=>{if(o.stopPropagation(),s){s(l);return}r(`/methods/${l}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},N={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=g.useRef(null),l=g.useRef(null),[x,o]=g.useState(t.length);if(g.useLayoutEffect(()=>{const n=r.current,a=l.current;if(!n||!a||t.length===0)return;const m=f=>(a.textContent=f,a.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let c=0,d=0;for(const C of t){const p=m(C.measureText);if(c+p<=f)c+=p,d+=1;else break}if(d0&&c+m(` · +${t.length-d} more`)>f;)d-=1,c-=m(t[d].measureText);d===0&&(d=1)}o(d)};M();const u=new ResizeObserver(M);return u.observe(n),()=>u.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:l,className:"paper-sota-measure","aria-hidden":"true"}),h.map((n,a)=>e.jsxs(g.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[a>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:N[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${a}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",i," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const l=g.useMemo(()=>{const o=[];let h=!0;for(const i of[1,2,3]){const n=t.filter(a=>a.rank===i);n.forEach((a,m)=>{const M=m===0,u=M?`${h?"":" · "}${N[i]} on `:", ";o.push({name:a.name,slug:a.slug,rank:i,isGroupStart:M,measureText:u+a.name})}),n.length>0&&(h=!1)}return o},[t]),x=g.useMemo(()=>[1,2,3].map(o=>t.filter(i=>i.rank===o).map((i,n)=>({name:i.name,slug:i.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${N[o]} on `:", ")+i.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):l.length===0?null:e.jsx(F,{units:l,paperHref:s})},O=({name:t,size:s=14})=>{const r={search:e.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:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.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:e.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:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.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:e.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:e.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:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),K=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},_=({paperId:t})=>{const s=K(t),r=160,l=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let k=0;k.3,a=Math.floor(s()*3),m=[],M=6+Math.floor(s()*3);for(let k=0;ke.jsx("rect",{x:c+(r-c*2)*(1-k)/2,y:S+v*2.4,width:(r-c*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:c+(r-c*2)*(1-o)/2,y:W,width:(r-c*2)*o,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:c,y:A,width:6,height:1,fill:f,opacity:.6}),h.map((k,v)=>{const y=j+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:C,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:p,y:j,width:d,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),a===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${p+2},${j+11} ${p+6},${j+8} ${p+10},${j+9} ${p+14},${j+5} ${p+18},${j+6} ${p+22},${j+3}`})}),a===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:p+d/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:p+2,y:j+11,width:d-4,height:1.5,fill:u})]}),a===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:p+3,y:j+5,width:d-6,height:1,fill:f}),e.jsx("rect",{x:p+6,y:j+8,width:d-12,height:.8,fill:f})]})]}),m.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:p,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`r${v}`)})]})})},V=({paperId:t,title:s,thumbnailUrl:r,priority:l=!1})=>{const[x,o]=g.useState(!1),[h,i]=g.useState(0),[n,a]=g.useState(l),m=g.useRef(null);g.useEffect(()=>{o(!1),i(0)},[r]);const M=g.useMemo(()=>{if(!r)return null;if(h===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${h}`},[r,h]);return g.useEffect(()=>{if(l||n)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[l,n]),r&&!x?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(l||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:l?"eager":"lazy",decoding:"async",fetchPriority:l?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(u=>u+1);return}o(!0)}},M)}):e.jsx(_,{paperId:t})},q="language-modeling";function $(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Y(t){return $(t.slug)==="large language model"||$(t.name)==="large language model"}function Q(t){return t.tags.includes(q)?t.methods.filter(s=>!Y(s)):t.methods}const se=({paper:t,rank:s,onClickTag:r})=>{const l=R(),x=`/paper/${t.id}`,o=g.useCallback(()=>{l.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>T.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),h=t.authors.slice(0,3).join(", "),i=t.authors.length,n=Q(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:x,className:"paper-thumb-wrap",onFocus:o,onMouseEnter:o,children:e.jsx(V,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsx("h3",{className:"paper-title",children:e.jsx(L,{to:x,onFocus:o,onMouseEnter:o,children:e.jsx(E,{title:t.title})})}),e.jsxs("div",{className:"paper-authors",children:[h,i>3&&e.jsxs("span",{children:[", ","+",i-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[i>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[i>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(z,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:x}),(t.tags.length>0||n.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(a=>e.jsx(D,{slug:a,onClick:r},a)),n.map(a=>e.jsx(G,{method:a},a.id||a.slug||a.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[t.githubUrl&&e.jsxs("a",{className:"paper-resource is-link",href:t.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:a=>a.stopPropagation(),children:[e.jsx(O,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),J(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),t.hfUrl&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:t.hfUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:a=>a.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function J(t){return t.toFixed(1)}export{O as I,G as M,se as P,I as S,D as T,V as a}; +import{q as R,Y as g,b as T,j as e,L,a as w}from"./index-CSNOTM3s.js";import{L as E,a as z}from"./LatexTitle-D0X1MVE6.js";import{h as P,d as Z,f as B,e as H}from"./transform-BGwKHn4w.js";const D=({slug:t,label:s,onClick:r})=>{const l=w(),x=P(t),o=H(x),h=i=>{if(i.stopPropagation(),r){r(t);return}l(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),Z(s||B(t),t)]})},G=({method:t,onClick:s})=>{const r=w(),l=t.slug||t.id||"";if(!l)return null;const x=o=>{if(o.stopPropagation(),s){s(l);return}r(`/methods/${l}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},N={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=g.useRef(null),l=g.useRef(null),[x,o]=g.useState(t.length);if(g.useLayoutEffect(()=>{const n=r.current,a=l.current;if(!n||!a||t.length===0)return;const m=f=>(a.textContent=f,a.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let c=0,d=0;for(const C of t){const p=m(C.measureText);if(c+p<=f)c+=p,d+=1;else break}if(d0&&c+m(` · +${t.length-d} more`)>f;)d-=1,c-=m(t[d].measureText);d===0&&(d=1)}o(d)};M();const u=new ResizeObserver(M);return u.observe(n),()=>u.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:l,className:"paper-sota-measure","aria-hidden":"true"}),h.map((n,a)=>e.jsxs(g.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[a>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:N[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${a}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",i," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const l=g.useMemo(()=>{const o=[];let h=!0;for(const i of[1,2,3]){const n=t.filter(a=>a.rank===i);n.forEach((a,m)=>{const M=m===0,u=M?`${h?"":" · "}${N[i]} on `:", ";o.push({name:a.name,slug:a.slug,rank:i,isGroupStart:M,measureText:u+a.name})}),n.length>0&&(h=!1)}return o},[t]),x=g.useMemo(()=>[1,2,3].map(o=>t.filter(i=>i.rank===o).map((i,n)=>({name:i.name,slug:i.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${N[o]} on `:", ")+i.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):l.length===0?null:e.jsx(F,{units:l,paperHref:s})},O=({name:t,size:s=14})=>{const r={search:e.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:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.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:e.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:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.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:e.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:e.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:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),K=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},_=({paperId:t})=>{const s=K(t),r=160,l=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let k=0;k.3,a=Math.floor(s()*3),m=[],M=6+Math.floor(s()*3);for(let k=0;ke.jsx("rect",{x:c+(r-c*2)*(1-k)/2,y:S+v*2.4,width:(r-c*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:c+(r-c*2)*(1-o)/2,y:W,width:(r-c*2)*o,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:c,y:A,width:6,height:1,fill:f,opacity:.6}),h.map((k,v)=>{const y=j+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:C,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:p,y:j,width:d,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),a===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${p+2},${j+11} ${p+6},${j+8} ${p+10},${j+9} ${p+14},${j+5} ${p+18},${j+6} ${p+22},${j+3}`})}),a===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:p+d/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:p+2,y:j+11,width:d-4,height:1.5,fill:u})]}),a===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:p+3,y:j+5,width:d-6,height:1,fill:f}),e.jsx("rect",{x:p+6,y:j+8,width:d-12,height:.8,fill:f})]})]}),m.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:p,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`r${v}`)})]})})},V=({paperId:t,title:s,thumbnailUrl:r,priority:l=!1})=>{const[x,o]=g.useState(!1),[h,i]=g.useState(0),[n,a]=g.useState(l),m=g.useRef(null);g.useEffect(()=>{o(!1),i(0)},[r]);const M=g.useMemo(()=>{if(!r)return null;if(h===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${h}`},[r,h]);return g.useEffect(()=>{if(l||n)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[l,n]),r&&!x?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(l||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:l?"eager":"lazy",decoding:"async",fetchPriority:l?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(u=>u+1);return}o(!0)}},M)}):e.jsx(_,{paperId:t})},q="language-modeling";function $(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Y(t){return $(t.slug)==="large language model"||$(t.name)==="large language model"}function Q(t){return t.tags.includes(q)?t.methods.filter(s=>!Y(s)):t.methods}const se=({paper:t,rank:s,onClickTag:r})=>{const l=R(),x=`/paper/${t.id}`,o=g.useCallback(()=>{l.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>T.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),h=t.authors.slice(0,3).join(", "),i=t.authors.length,n=Q(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:x,className:"paper-thumb-wrap",onFocus:o,onMouseEnter:o,children:e.jsx(V,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsx("h3",{className:"paper-title",children:e.jsx(L,{to:x,onFocus:o,onMouseEnter:o,children:e.jsx(E,{title:t.title})})}),e.jsxs("div",{className:"paper-authors",children:[h,i>3&&e.jsxs("span",{children:[", ","+",i-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[i>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[i>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(z,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:x}),(t.tags.length>0||n.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(a=>e.jsx(D,{slug:a,onClick:r},a)),n.map(a=>e.jsx(G,{method:a},a.id||a.slug||a.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[t.githubUrl&&e.jsxs("a",{className:"paper-resource is-link",href:t.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:a=>a.stopPropagation(),children:[e.jsx(O,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),J(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),t.hfUrl&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:t.hfUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:a=>a.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function J(t){return t.toFixed(1)}export{O as I,G as M,se as P,I as S,D as T,V as a}; diff --git a/assets/dialog-Ba_4mPeV.js b/assets/dialog-CQwQlPi_.js similarity index 99% rename from assets/dialog-Ba_4mPeV.js rename to assets/dialog-CQwQlPi_.js index 7ad2f9d9e006571c8b683f2a0ce4c630374d839c..399271031ac2e6145b8dbd4f9e188c7032f35b0a 100644 --- a/assets/dialog-Ba_4mPeV.js +++ b/assets/dialog-CQwQlPi_.js @@ -1,4 +1,4 @@ -import{r as s,j as i,D as Z,k as q,E as R,P as N,H as J,h as D,m as x,o as U,l as h,I as X,J as Y,K as Q,M as ee,N as te,ad as oe,X as ne,p}from"./index-BOKpx1zD.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?Z(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=U(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=q({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=h(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),w=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(N,{present:o||r.open,children:i.jsx(J,{asChild:!0,container:n,children:l})}))})};w.displayName=E;var y="DialogOverlay",A=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(N,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});A.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(Y,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(N,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=h(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return X(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=h(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",M=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});M.displayName=_;var F="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(F,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=F;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,G]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=G(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +import{r as s,j as i,D as Z,k as q,E as R,P as N,H as J,h as D,m as x,o as U,l as h,I as X,J as Y,K as Q,M as ee,N as te,ad as oe,X as ne,p}from"./index-CSNOTM3s.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?Z(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=U(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=q({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=h(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),w=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(N,{present:o||r.open,children:i.jsx(J,{asChild:!0,container:n,children:l})}))})};w.displayName=E;var y="DialogOverlay",A=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(N,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});A.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(Y,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(N,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=h(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return X(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=h(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",M=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});M.displayName=_;var F="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(F,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=F;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,G]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=G(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. diff --git a/assets/github-V6TTeQuy.js b/assets/github-x66pH1Ze.js similarity index 92% rename from assets/github-V6TTeQuy.js rename to assets/github-x66pH1Ze.js index 622f44363c6206f995f8c67d7a716d2c2e13a461..d9d43d0150d12712e2ec59b869fe437b9f38d92d 100644 --- a/assets/github-V6TTeQuy.js +++ b/assets/github-x66pH1Ze.js @@ -1,4 +1,4 @@ -import{f as c}from"./index-BOKpx1zD.js";/** +import{f as c}from"./index-CSNOTM3s.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-BJtl0mwj.js b/assets/hover-card-D24Q2Pl3.js similarity index 98% rename from assets/hover-card-BJtl0mwj.js rename to assets/hover-card-D24Q2Pl3.js index 1cf3e0d23223187da10deb72cc72e32ca6aa17ce..6b82fcb02d2794b3166b46c324615dc434490dc8 100644 --- a/assets/hover-card-BJtl0mwj.js +++ b/assets/hover-card-D24Q2Pl3.js @@ -1 +1 @@ -import{r as n,k as F,j as c,R as M,F as I,h as U,m as l,G as T,P as O,H as $,o as W,l as z,N as B,O as G,Q as K,p as Q}from"./index-BOKpx1zD.js";var E,g="HoverCard",[N]=W(g,[T]),w=T(),[V,S]=N(g),y=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=F({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(M,{...d,children:r})})};y.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[q,J]=N(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(q,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=J(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=y,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:Q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; +import{r as n,k as F,j as c,R as M,F as I,h as U,m as l,G as T,P as O,H as $,o as W,l as z,N as B,O as G,Q as K,p as Q}from"./index-CSNOTM3s.js";var E,g="HoverCard",[N]=W(g,[T]),w=T(),[V,S]=N(g),y=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=F({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(M,{...d,children:r})})};y.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[q,J]=N(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(q,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=J(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=y,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:Q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; diff --git a/assets/index-DdlAvtSd.js b/assets/index-CAtHIP-4.js similarity index 72% rename from assets/index-DdlAvtSd.js rename to assets/index-CAtHIP-4.js index 67c8ee04038beb444721b9be013520086bce2b1a..a535bf1528bce10c2fd502e8fcc0f8c857454147 100644 --- a/assets/index-DdlAvtSd.js +++ b/assets/index-CAtHIP-4.js @@ -1 +1 @@ -import{r as u}from"./index-BOKpx1zD.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; +import{r as u}from"./index-CSNOTM3s.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; diff --git a/assets/index-BOKpx1zD.js b/assets/index-CSNOTM3s.js similarity index 85% rename from assets/index-BOKpx1zD.js rename to assets/index-CSNOTM3s.js index 9779366a3f16634243b226ba674f7c97451ef69c..90485f701fd530f11def6dcd60ffa54f92cc9afc 100644 --- a/assets/index-BOKpx1zD.js +++ b/assets/index-CSNOTM3s.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-DE_cbYeq.js","assets/components-BkQ2EWK-.js","assets/LatexTitle-B4ZTuCxc.js","assets/katex.min-BSBacQyE.js","assets/katex-wklAmtGL.css","assets/transform-DLPfRTia.js","assets/chatSessions-C-yr7eOL.js","assets/usePapers-B51Q6z7s.js","assets/useQuery-Cj0zK8BW.js","assets/useInfiniteQuery-B9BAVqQL.js","assets/useIntersectionObserver-DVOSMcnN.js","assets/usePeriodFilter-CfD2sXw8.js","assets/skeleton-C5u4dxsY.js","assets/alert-De0V5ndO.js","assets/ChatView-BCGQJFEn.js","assets/PaperPreviewLink-Bbvo9u5G.js","assets/index-B-skc6rz.js","assets/hover-card-BJtl0mwj.js","assets/PapersListView-Cl3cg4aG.js","assets/useDebounce-CKxXZkmt.js","assets/PaperDetailView-DhpDOu-D.js","assets/ExternalSourceEvalBadge-CZdsMWe1.js","assets/latexPlainText-ChVkH0gY.js","assets/button-COASHtHZ.js","assets/index-DdlAvtSd.js","assets/textarea-BKXasfzv.js","assets/dialog-Ba_4mPeV.js","assets/useMutation-1Slfgn9F.js","assets/SignInToEditDialog-DcJcnDsG.js","assets/loader-circle-kP6qHte6.js","assets/codexAddEvals-CUJKpU1a.js","assets/github-V6TTeQuy.js","assets/TagsIndexView-DfMgNEhz.js","assets/TaxonomySuggestionTile-BZeB9d42.js","assets/TagBrowseView-ClVbIghl.js","assets/BenchmarkTrendSparkline-QiCYNsTg.js","assets/MarkdownText-CFWVPyKn.js","assets/chevron-down-DDO48iug.js","assets/MethodsIndexView-C8nwWxKb.js","assets/FrameworksIndexView-E16SQ_m7.js","assets/TrendsView-DdwMqPok.js","assets/ConferencesIndexView-Btn6PGBN.js","assets/AiDeadlinesView-CqVp2xDx.js","assets/switch-DWeySqLP.js","assets/ConferenceDetailView-8p_yVjpd.js","assets/ConferenceTaskView-C43k4-yt.js","assets/OrganizationsIndexView-CGTYh2nu.js","assets/OrganizationDetailView-C6v-f05b.js","assets/NotFound-D2bAWljO.js","assets/OrganizationTaskView-CxtwAWXj.js","assets/MethodDetailView-juvY71ct.js","assets/BenchmarkDetailView-Ch-Y4w1t.js","assets/SavedPapersView-Bb2puS13.js","assets/SettingsView-C5eHJ-g8.js","assets/SubmitView-B_2rf5ES.js","assets/CronDashboard-B3JEoT_n.js","assets/shield-alert-Dk6P9oCq.js","assets/CronDashboard-55WCoakE.css","assets/SubmissionsDashboard-yrnZ-D0f.js","assets/SearchOverlay-6KiZu-e3.js"])))=>i.map(i=>d[i]); -var w0=Object.defineProperty;var sf=e=>{throw TypeError(e)};var x0=(e,t,n)=>t in e?w0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pa=(e,t,n)=>x0(e,typeof t!="symbol"?t+"":t,n),ha=(e,t,n)=>t.has(e)||sf("Cannot "+n);var N=(e,t,n)=>(ha(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?sf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),W=(e,t,n,r)=>(ha(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(ha(e,t,"access private method"),n);var es=(e,t,n,r)=>({set _(o){W(e,t,o,n)},get _(){return N(e,t,r)}});function S0(e,t){for(var n=0;nr[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 IN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oh={exports:{}},_l={},Ah={exports:{}},Z={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-CN0Q9tkf.js","assets/components-PxXQJAWo.js","assets/LatexTitle-D0X1MVE6.js","assets/katex.min-BSBacQyE.js","assets/katex-wklAmtGL.css","assets/transform-BGwKHn4w.js","assets/chatSessions-Dmenu8US.js","assets/usePapers-CFugWskp.js","assets/useQuery-DCf2mroJ.js","assets/useInfiniteQuery-_jD1bF9N.js","assets/useIntersectionObserver-CUA0CMpl.js","assets/usePeriodFilter-CWtHCaJm.js","assets/skeleton-DIecj65I.js","assets/alert-DuO9Nm7q.js","assets/ChatView-CZcqmRIk.js","assets/PaperPreviewLink-AqikhUz3.js","assets/index-CVIt_dyy.js","assets/hover-card-D24Q2Pl3.js","assets/PapersListView-BWkrERaM.js","assets/useDebounce-D60wCwma.js","assets/PaperDetailView-xIdW2JSy.js","assets/ExternalSourceEvalBadge-CuljE-w8.js","assets/latexPlainText-ChVkH0gY.js","assets/button-KGqIZs29.js","assets/index-CAtHIP-4.js","assets/textarea-BajbF2-p.js","assets/dialog-CQwQlPi_.js","assets/useMutation-D90cYkan.js","assets/SignInToEditDialog-qIIvqqtG.js","assets/loader-circle-BCRahFjZ.js","assets/codexAddEvals-DqYnwrnj.js","assets/github-x66pH1Ze.js","assets/TagsIndexView-SPf3jDGK.js","assets/TaxonomySuggestionTile-NN3nK-Nj.js","assets/TagBrowseView-BX-GwgjY.js","assets/BenchmarkTrendSparkline-DiSd6PbY.js","assets/MarkdownText-DJVhHGem.js","assets/chevron-down-CnQ_UTkP.js","assets/MethodsIndexView-DrXSSTgg.js","assets/FrameworksIndexView-BohW9nNa.js","assets/TrendsView-DU4iFMLV.js","assets/ConferencesIndexView-CAuDOq-J.js","assets/AiDeadlinesView-D2u6GuEG.js","assets/switch-CuAwYhBU.js","assets/ConferenceDetailView-BUTsuBU8.js","assets/ConferenceTaskView-BOaZO01e.js","assets/OrganizationsIndexView-BVmFsOq_.js","assets/OrganizationDetailView-B9UCvr8P.js","assets/NotFound-BOZqMg2G.js","assets/OrganizationTaskView-VN_RdDoW.js","assets/AuthorDetailView-biYTIR2y.js","assets/MethodDetailView-ClFfXzVB.js","assets/BenchmarkDetailView-DXXwkMF6.js","assets/SavedPapersView-DN1bdjfb.js","assets/SettingsView-CxN_MMdg.js","assets/SubmitView-CZpScvZm.js","assets/CronDashboard-BHCv8xsU.js","assets/shield-alert-jW3iPtxV.js","assets/CronDashboard-55WCoakE.css","assets/SubmissionsDashboard-DRjK6x_I.js","assets/SearchOverlay-BfdeDJKQ.js"])))=>i.map(i=>d[i]); +var w0=Object.defineProperty;var sf=e=>{throw TypeError(e)};var x0=(e,t,n)=>t in e?w0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pa=(e,t,n)=>x0(e,typeof t!="symbol"?t+"":t,n),ha=(e,t,n)=>t.has(e)||sf("Cannot "+n);var N=(e,t,n)=>(ha(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?sf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),W=(e,t,n,r)=>(ha(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(ha(e,t,"access private method"),n);var es=(e,t,n,r)=>({set _(o){W(e,t,o,n)},get _(){return N(e,t,r)}});function S0(e,t){for(var n=0;nr[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 DN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oh={exports:{}},Pl={},Ah={exports:{}},Z={};/** * @license React * react.production.min.js * @@ -7,7 +7,7 @@ var w0=Object.defineProperty;var sf=e=>{throw TypeError(e)};var x0=(e,t,n)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fi=Symbol.for("react.element"),E0=Symbol.for("react.portal"),C0=Symbol.for("react.fragment"),b0=Symbol.for("react.strict_mode"),P0=Symbol.for("react.profiler"),_0=Symbol.for("react.provider"),k0=Symbol.for("react.context"),T0=Symbol.for("react.forward_ref"),R0=Symbol.for("react.suspense"),N0=Symbol.for("react.memo"),M0=Symbol.for("react.lazy"),lf=Symbol.iterator;function O0(e){return e===null||typeof e!="object"?null:(e=lf&&e[lf]||e["@@iterator"],typeof e=="function"?e:null)}var jh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lh=Object.assign,Ih={};function No(e,t,n){this.props=e,this.context=t,this.refs=Ih,this.updater=n||jh}No.prototype.isReactComponent={};No.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};No.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dh(){}Dh.prototype=No.prototype;function Cc(e,t,n){this.props=e,this.context=t,this.refs=Ih,this.updater=n||jh}var bc=Cc.prototype=new Dh;bc.constructor=Cc;Lh(bc,No.prototype);bc.isPureReactComponent=!0;var af=Array.isArray,$h=Object.prototype.hasOwnProperty,Pc={current:null},Fh={key:!0,ref:!0,__self:!0,__source:!0};function zh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)$h.call(t,r)&&!Fh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{throw TypeError(e)};var x0=(e,t,n)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var D0=f,$0=Symbol.for("react.element"),F0=Symbol.for("react.fragment"),z0=Object.prototype.hasOwnProperty,U0=D0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,B0={key:!0,ref:!0,__self:!0,__source:!0};function Bh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)z0.call(t,r)&&!B0.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:$0,type:e,key:i,ref:s,props:o,_owner:U0.current}}_l.Fragment=F0;_l.jsx=Bh;_l.jsxs=Bh;Oh.exports=_l;var m=Oh.exports,Vh={exports:{}},st={},Wh={exports:{}},Hh={};/** + */var D0=f,$0=Symbol.for("react.element"),F0=Symbol.for("react.fragment"),z0=Object.prototype.hasOwnProperty,U0=D0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,B0={key:!0,ref:!0,__self:!0,__source:!0};function Bh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)z0.call(t,r)&&!B0.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:$0,type:e,key:i,ref:s,props:o,_owner:U0.current}}Pl.Fragment=F0;Pl.jsx=Bh;Pl.jsxs=Bh;Oh.exports=Pl;var m=Oh.exports,Vh={exports:{}},st={},Wh={exports:{}},Hh={};/** * @license React * scheduler.production.min.js * @@ -23,7 +23,7 @@ var w0=Object.defineProperty;var sf=e=>{throw TypeError(e)};var x0=(e,t,n)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(M,k){var L=M.length;M.push(k);e:for(;0>>1,F=M[B];if(0>>1;Bo(fe,L))yeo(J,fe)?(M[B]=J,M[ye]=L,B=ye):(M[B]=fe,M[X]=L,B=X);else if(yeo(J,L))M[B]=J,M[ye]=L,B=ye;else break e}}return k}function o(M,k){var L=M.sortIndex-k.sortIndex;return L!==0?L:M.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],d=1,c=null,h=3,p=!1,E=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var k=n(u);k!==null;){if(k.callback===null)r(u);else if(k.startTime<=M)r(u),k.sortIndex=k.expirationTime,t(a,k);else break;k=n(u)}}function S(M){if(y=!1,w(M),!E)if(n(a)!==null)E=!0,U(C);else{var k=n(u);k!==null&&H(S,k.startTime-M)}}function C(M,k){E=!1,y&&(y=!1,v(T),T=-1),p=!0;var L=h;try{for(w(k),c=n(a);c!==null&&(!(c.expirationTime>k)||M&&!z());){var B=c.callback;if(typeof B=="function"){c.callback=null,h=c.priorityLevel;var F=B(c.expirationTime<=k);k=e.unstable_now(),typeof F=="function"?c.callback=F:c===n(a)&&r(a),w(k)}else r(a);c=n(a)}if(c!==null)var G=!0;else{var X=n(u);X!==null&&H(S,X.startTime-k),G=!1}return G}finally{c=null,h=L,p=!1}}var b=!1,P=null,T=-1,j=5,A=-1;function z(){return!(e.unstable_now()-AM||125B?(M.sortIndex=L,t(u,M),n(a)===null&&M===n(u)&&(y?(v(T),T=-1):y=!0,H(S,L-B))):(M.sortIndex=F,t(a,M),E||p||(E=!0,U(C))),M},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(M){var k=h;return function(){var L=h;h=k;try{return M.apply(this,arguments)}finally{h=L}}}})(Hh);Wh.exports=Hh;var V0=Wh.exports;/** + */(function(e){function t(M,k){var L=M.length;M.push(k);e:for(;0>>1,F=M[B];if(0>>1;Bo(fe,L))yeo(J,fe)?(M[B]=J,M[ye]=L,B=ye):(M[B]=fe,M[X]=L,B=X);else if(yeo(J,L))M[B]=J,M[ye]=L,B=ye;else break e}}return k}function o(M,k){var L=M.sortIndex-k.sortIndex;return L!==0?L:M.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],d=1,c=null,h=3,p=!1,E=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var k=n(u);k!==null;){if(k.callback===null)r(u);else if(k.startTime<=M)r(u),k.sortIndex=k.expirationTime,t(a,k);else break;k=n(u)}}function S(M){if(y=!1,w(M),!E)if(n(a)!==null)E=!0,U(C);else{var k=n(u);k!==null&&H(S,k.startTime-M)}}function C(M,k){E=!1,y&&(y=!1,v(T),T=-1),p=!0;var L=h;try{for(w(k),c=n(a);c!==null&&(!(c.expirationTime>k)||M&&!z());){var B=c.callback;if(typeof B=="function"){c.callback=null,h=c.priorityLevel;var F=B(c.expirationTime<=k);k=e.unstable_now(),typeof F=="function"?c.callback=F:c===n(a)&&r(a),w(k)}else r(a);c=n(a)}if(c!==null)var G=!0;else{var X=n(u);X!==null&&H(S,X.startTime-k),G=!1}return G}finally{c=null,h=L,p=!1}}var b=!1,_=null,T=-1,j=5,A=-1;function z(){return!(e.unstable_now()-AM||125B?(M.sortIndex=L,t(u,M),n(a)===null&&M===n(u)&&(y?(v(T),T=-1):y=!0,H(S,L-B))):(M.sortIndex=F,t(a,M),E||p||(E=!0,U(C))),M},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(M){var k=h;return function(){var L=h;h=k;try{return M.apply(this,arguments)}finally{h=L}}}})(Hh);Wh.exports=Hh;var V0=Wh.exports;/** * @license React * react-dom.production.min.js * @@ -35,10 +35,10 @@ var w0=Object.defineProperty;var sf=e=>{throw TypeError(e)};var x0=(e,t,n)=>t in `+ma+e}var va=!1;function ya(e,t){if(!e||va)return"";va=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(` `),i=r.stack.split(` `),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{va=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yo(e):""}function Q0(e){switch(e.tag){case 5:return Yo(e.type);case 16:return Yo("Lazy");case 13:return Yo("Suspense");case 19:return Yo("SuspenseList");case 0:case 2:case 15:return e=ya(e.type,!1),e;case 11:return e=ya(e.type.render,!1),e;case 1:return e=ya(e.type,!0),e;default:return""}}function cu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Ur:return"Portal";case lu:return"Profiler";case Nc:return"StrictMode";case au:return"Suspense";case uu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gh:return(e.displayName||"Context")+".Consumer";case qh:return(e._context.displayName||"Context")+".Provider";case Mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oc:return t=e.displayName||null,t!==null?t:cu(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return cu(e(t))}catch{}}return null}function Y0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cu(t);case 8:return t===Nc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X0(e){var t=Yh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rs(e){e._valueTracker||(e._valueTracker=X0(e))}function Xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ws(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function du(e,t){var n=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Jh(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function fu(e,t){Jh(e,t);var n=Kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&pu(e,t.type,Kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pu(e,t,n){(t!=="number"||Ws(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xo=Array.isArray;function Zr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=os.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ti={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},J0=["Webkit","ms","Moz","O"];Object.keys(ti).forEach(function(e){J0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ti[t]=ti[e]})});function ng(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ti.hasOwnProperty(e)&&ti[e]?(""+t).trim():t+"px"}function rg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ng(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Z0=me({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mu(e,t){if(t){if(Z0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function vu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yu=null;function Ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wu=null,eo=null,to=null;function vf(e){if(e=Bi(e)){if(typeof wu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Ol(t),wu(e.stateNode,e.type,t))}}function og(e){eo?to?to.push(e):to=[e]:eo=e}function ig(){if(eo){var e=eo,t=to;if(to=eo=null,vf(e),t)for(e=0;e>>=0,e===0?32:31-(cx(e)/dx|0)|0}var is=64,ss=4194304;function Jo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Jo(l):(i&=s,i!==0&&(r=Jo(i)))}else s=n&~o,s!==0?r=Jo(s):i!==0&&(r=Jo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function gx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ri),_f=" ",kf=!1;function Pg(e,t){switch(e){case"keyup":return Vx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _g(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function Hx(e,t){switch(e){case"compositionend":return _g(t);case"keypress":return t.which!==32?null:(kf=!0,_f);case"textInput":return e=t.data,e===_f&&kf?null:e;default:return null}}function Kx(e,t){if(Vr)return e==="compositionend"||!Uc&&Pg(e,t)?(e=Cg(),Ns=$c=jn=null,Vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mf(n)}}function Ng(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ng(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mg(){for(var e=window,t=Ws();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ws(e.document)}return t}function Bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function tS(e){var t=Mg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ng(n.ownerDocument.documentElement,n)){if(r!==null&&Bc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Of(n,i);var s=Of(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wr=null,Pu=null,ii=null,_u=!1;function Af(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_u||Wr==null||Wr!==Ws(r)||(r=Wr,"selectionStart"in r&&Bc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&yi(ii,r)||(ii=r,r=Xs(Pu,"onSelect"),0qr||(e.current=Ou[qr],Ou[qr]=null,qr--)}function ie(e,t){qr++,Ou[qr]=e.current,e.current=t}var qn={},Fe=Jn(qn),Qe=Jn(!1),mr=qn;function xo(e,t){var n=e.type.contextTypes;if(!n)return qn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ye(e){return e=e.childContextTypes,e!=null}function Zs(){ae(Qe),ae(Fe)}function zf(e,t,n){if(Fe.current!==qn)throw Error(O(168));ie(Fe,t),ie(Qe,n)}function zg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,Y0(e)||"Unknown",o));return me({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,mr=Fe.current,ie(Fe,e),ie(Qe,Qe.current),!0}function Uf(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=zg(e,t,mr),r.__reactInternalMemoizedMergedChildContext=e,ae(Qe),ae(Fe),ie(Fe,e)):ae(Qe),ie(Qe,n)}var Yt=null,Al=!1,Oa=!1;function Ug(e){Yt===null?Yt=[e]:Yt.push(e)}function pS(e){Al=!0,Ug(e)}function Zn(){if(!Oa&&Yt!==null){Oa=!0;var e=0,t=re;try{var n=Yt;for(re=1;e>=s,o-=s,Jt=1<<32-Tt(t)+o|n<T?(j=P,P=null):j=P.sibling;var A=h(v,P,w[T],S);if(A===null){P===null&&(P=j);break}e&&P&&A.alternate===null&&t(v,P),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A,P=j}if(T===w.length)return n(v,P),de&&rr(v,T),C;if(P===null){for(;TT?(j=P,P=null):j=P.sibling;var z=h(v,P,A.value,S);if(z===null){P===null&&(P=j);break}e&&P&&z.alternate===null&&t(v,P),g=i(z,g,T),b===null?C=z:b.sibling=z,b=z,P=j}if(A.done)return n(v,P),de&&rr(v,T),C;if(P===null){for(;!A.done;T++,A=w.next())A=c(v,A.value,S),A!==null&&(g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return de&&rr(v,T),C}for(P=r(v,P);!A.done;T++,A=w.next())A=p(P,v,T,A.value,S),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?T:A.key),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return e&&P.forEach(function(D){return t(v,D)}),de&&rr(v,T),C}function x(v,g,w,S){if(typeof w=="object"&&w!==null&&w.type===Br&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ns:e:{for(var C=w.key,b=g;b!==null;){if(b.key===C){if(C=w.type,C===Br){if(b.tag===7){n(v,b.sibling),g=o(b,w.props.children),g.return=v,v=g;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&Wf(C)===b.type){n(v,b.sibling),g=o(b,w.props),g.ref=Wo(v,b,w),g.return=v,v=g;break e}n(v,b);break}else t(v,b);b=b.sibling}w.type===Br?(g=gr(w.props.children,v.mode,S,w.key),g.return=v,v=g):(S=$s(w.type,w.key,w.props,null,v.mode,S),S.ref=Wo(v,g,w),S.return=v,v=S)}return s(v);case Ur:e:{for(b=w.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(v,g.sibling),g=o(g,w.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=za(w,v.mode,S),g.return=v,v=g}return s(v);case bn:return b=w._init,x(v,g,b(w._payload),S)}if(Xo(w))return E(v,g,w,S);if(Fo(w))return y(v,g,w,S);ps(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(v,g.sibling),g=o(g,w),g.return=v,v=g):(n(v,g),g=Fa(w,v.mode,S),g.return=v,v=g),s(v)):n(v,g)}return x}var Eo=Hg(!0),Kg=Hg(!1),rl=Jn(null),ol=null,Yr=null,Kc=null;function qc(){Kc=Yr=ol=null}function Gc(e){var t=rl.current;ae(rl),e._currentValue=t}function Lu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ro(e,t){ol=e,Kc=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Kc!==e)if(e={context:e,memoizedValue:t,next:null},Yr===null){if(ol===null)throw Error(O(308));Yr=e,ol.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return t}var sr=null;function Qc(e){sr===null?sr=[e]:sr.push(e)}function qg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Qc(t)):(n.next=o.next,o.next=n),t.interleaved=n,rn(e,r)}function rn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Pn=!1;function Yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,rn(e,n)}return o=r.interleaved,o===null?(t.next=t,Qc(r)):(t.next=o.next,o.next=t),r.interleaved=t,rn(e,n)}function Os(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lc(e,n)}}function Hf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function il(e,t,n,r){var o=e.updateQueue;Pn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(i!==null){var c=o.baseState;s=0,d=u=a=null,l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var E=e,y=l;switch(h=t,p=n,y.tag){case 1:if(E=y.payload,typeof E=="function"){c=E.call(p,c,h);break e}c=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=y.payload,h=typeof E=="function"?E.call(p,c,h):E,h==null)break e;c=me({},c,h);break e;case 2:Pn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,a=c):d=d.next=p,s|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(a=c),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);wr|=s,e.lanes=s,e.memoizedState=c}}function Kf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ja.transition;ja.transition={};try{e(!1),t()}finally{re=n,ja.transition=r}}function dm(){return mt().memoizedState}function vS(e,t,n){var r=Vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fm(e))pm(t,n);else if(n=qg(e,t,n,r),n!==null){var o=Be();Rt(n,e,r,o),hm(n,t,r)}}function yS(e,t,n){var r=Vn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fm(e))pm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Nt(l,s)){var a=t.interleaved;a===null?(o.next=o,Qc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=qg(e,t,o,r),n!==null&&(o=Be(),Rt(n,e,r,o),hm(n,t,r))}}function fm(e){var t=e.alternate;return e===he||t!==null&&t===he}function pm(e,t){si=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lc(e,n)}}var al={readContext:gt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},wS={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Gf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,js(4194308,4,sm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:qf,useDebugValue:od,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=qf(!1),t=e[0];return e=mS.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,o=Lt();if(de){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Te===null)throw Error(O(349));yr&30||Jg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Gf(em.bind(null,r,i,e),[e]),r.flags|=2048,_i(9,Zg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Te.identifierPrefix;if(de){var n=Zt,r=Jt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bi++,0")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{va=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yo(e):""}function Q0(e){switch(e.tag){case 5:return Yo(e.type);case 16:return Yo("Lazy");case 13:return Yo("Suspense");case 19:return Yo("SuspenseList");case 0:case 2:case 15:return e=ya(e.type,!1),e;case 11:return e=ya(e.type.render,!1),e;case 1:return e=ya(e.type,!0),e;default:return""}}function cu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Ur:return"Portal";case lu:return"Profiler";case Nc:return"StrictMode";case au:return"Suspense";case uu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gh:return(e.displayName||"Context")+".Consumer";case qh:return(e._context.displayName||"Context")+".Provider";case Mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oc:return t=e.displayName||null,t!==null?t:cu(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return cu(e(t))}catch{}}return null}function Y0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cu(t);case 8:return t===Nc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X0(e){var t=Yh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rs(e){e._valueTracker||(e._valueTracker=X0(e))}function Xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ws(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function du(e,t){var n=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Jh(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function fu(e,t){Jh(e,t);var n=Kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&pu(e,t.type,Kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pu(e,t,n){(t!=="number"||Ws(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xo=Array.isArray;function Zr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=os.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ti={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},J0=["Webkit","ms","Moz","O"];Object.keys(ti).forEach(function(e){J0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ti[t]=ti[e]})});function ng(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ti.hasOwnProperty(e)&&ti[e]?(""+t).trim():t+"px"}function rg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ng(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Z0=me({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mu(e,t){if(t){if(Z0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function vu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yu=null;function Ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wu=null,eo=null,to=null;function vf(e){if(e=Bi(e)){if(typeof wu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Ol(t),wu(e.stateNode,e.type,t))}}function og(e){eo?to?to.push(e):to=[e]:eo=e}function ig(){if(eo){var e=eo,t=to;if(to=eo=null,vf(e),t)for(e=0;e>>=0,e===0?32:31-(cx(e)/dx|0)|0}var is=64,ss=4194304;function Jo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Jo(l):(i&=s,i!==0&&(r=Jo(i)))}else s=n&~o,s!==0?r=Jo(s):i!==0&&(r=Jo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function gx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ri),Pf=" ",kf=!1;function _g(e,t){switch(e){case"keyup":return Vx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function Hx(e,t){switch(e){case"compositionend":return Pg(t);case"keypress":return t.which!==32?null:(kf=!0,Pf);case"textInput":return e=t.data,e===Pf&&kf?null:e;default:return null}}function Kx(e,t){if(Vr)return e==="compositionend"||!Uc&&_g(e,t)?(e=Cg(),Ns=$c=jn=null,Vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mf(n)}}function Ng(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ng(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mg(){for(var e=window,t=Ws();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ws(e.document)}return t}function Bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function tS(e){var t=Mg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ng(n.ownerDocument.documentElement,n)){if(r!==null&&Bc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Of(n,i);var s=Of(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wr=null,_u=null,ii=null,Pu=!1;function Af(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pu||Wr==null||Wr!==Ws(r)||(r=Wr,"selectionStart"in r&&Bc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&yi(ii,r)||(ii=r,r=Xs(_u,"onSelect"),0qr||(e.current=Ou[qr],Ou[qr]=null,qr--)}function ie(e,t){qr++,Ou[qr]=e.current,e.current=t}var qn={},Fe=Jn(qn),Qe=Jn(!1),mr=qn;function xo(e,t){var n=e.type.contextTypes;if(!n)return qn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ye(e){return e=e.childContextTypes,e!=null}function Zs(){ue(Qe),ue(Fe)}function zf(e,t,n){if(Fe.current!==qn)throw Error(O(168));ie(Fe,t),ie(Qe,n)}function zg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,Y0(e)||"Unknown",o));return me({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,mr=Fe.current,ie(Fe,e),ie(Qe,Qe.current),!0}function Uf(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=zg(e,t,mr),r.__reactInternalMemoizedMergedChildContext=e,ue(Qe),ue(Fe),ie(Fe,e)):ue(Qe),ie(Qe,n)}var Yt=null,Al=!1,Oa=!1;function Ug(e){Yt===null?Yt=[e]:Yt.push(e)}function pS(e){Al=!0,Ug(e)}function Zn(){if(!Oa&&Yt!==null){Oa=!0;var e=0,t=re;try{var n=Yt;for(re=1;e>=s,o-=s,Jt=1<<32-Tt(t)+o|n<T?(j=_,_=null):j=_.sibling;var A=h(v,_,w[T],S);if(A===null){_===null&&(_=j);break}e&&_&&A.alternate===null&&t(v,_),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A,_=j}if(T===w.length)return n(v,_),de&&rr(v,T),C;if(_===null){for(;TT?(j=_,_=null):j=_.sibling;var z=h(v,_,A.value,S);if(z===null){_===null&&(_=j);break}e&&_&&z.alternate===null&&t(v,_),g=i(z,g,T),b===null?C=z:b.sibling=z,b=z,_=j}if(A.done)return n(v,_),de&&rr(v,T),C;if(_===null){for(;!A.done;T++,A=w.next())A=c(v,A.value,S),A!==null&&(g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return de&&rr(v,T),C}for(_=r(v,_);!A.done;T++,A=w.next())A=p(_,v,T,A.value,S),A!==null&&(e&&A.alternate!==null&&_.delete(A.key===null?T:A.key),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return e&&_.forEach(function(D){return t(v,D)}),de&&rr(v,T),C}function x(v,g,w,S){if(typeof w=="object"&&w!==null&&w.type===Br&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ns:e:{for(var C=w.key,b=g;b!==null;){if(b.key===C){if(C=w.type,C===Br){if(b.tag===7){n(v,b.sibling),g=o(b,w.props.children),g.return=v,v=g;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&Wf(C)===b.type){n(v,b.sibling),g=o(b,w.props),g.ref=Wo(v,b,w),g.return=v,v=g;break e}n(v,b);break}else t(v,b);b=b.sibling}w.type===Br?(g=gr(w.props.children,v.mode,S,w.key),g.return=v,v=g):(S=$s(w.type,w.key,w.props,null,v.mode,S),S.ref=Wo(v,g,w),S.return=v,v=S)}return s(v);case Ur:e:{for(b=w.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(v,g.sibling),g=o(g,w.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=za(w,v.mode,S),g.return=v,v=g}return s(v);case bn:return b=w._init,x(v,g,b(w._payload),S)}if(Xo(w))return E(v,g,w,S);if(Fo(w))return y(v,g,w,S);ps(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(v,g.sibling),g=o(g,w),g.return=v,v=g):(n(v,g),g=Fa(w,v.mode,S),g.return=v,v=g),s(v)):n(v,g)}return x}var Eo=Hg(!0),Kg=Hg(!1),rl=Jn(null),ol=null,Yr=null,Kc=null;function qc(){Kc=Yr=ol=null}function Gc(e){var t=rl.current;ue(rl),e._currentValue=t}function Lu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ro(e,t){ol=e,Kc=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Kc!==e)if(e={context:e,memoizedValue:t,next:null},Yr===null){if(ol===null)throw Error(O(308));Yr=e,ol.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return t}var sr=null;function Qc(e){sr===null?sr=[e]:sr.push(e)}function qg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Qc(t)):(n.next=o.next,o.next=n),t.interleaved=n,rn(e,r)}function rn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var _n=!1;function Yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,rn(e,n)}return o=r.interleaved,o===null?(t.next=t,Qc(r)):(t.next=o.next,o.next=t),r.interleaved=t,rn(e,n)}function Os(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lc(e,n)}}function Hf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function il(e,t,n,r){var o=e.updateQueue;_n=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(i!==null){var c=o.baseState;s=0,d=u=a=null,l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var E=e,y=l;switch(h=t,p=n,y.tag){case 1:if(E=y.payload,typeof E=="function"){c=E.call(p,c,h);break e}c=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=y.payload,h=typeof E=="function"?E.call(p,c,h):E,h==null)break e;c=me({},c,h);break e;case 2:_n=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,a=c):d=d.next=p,s|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(a=c),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);wr|=s,e.lanes=s,e.memoizedState=c}}function Kf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ja.transition;ja.transition={};try{e(!1),t()}finally{re=n,ja.transition=r}}function dm(){return mt().memoizedState}function vS(e,t,n){var r=Vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fm(e))pm(t,n);else if(n=qg(e,t,n,r),n!==null){var o=Be();Rt(n,e,r,o),hm(n,t,r)}}function yS(e,t,n){var r=Vn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fm(e))pm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Nt(l,s)){var a=t.interleaved;a===null?(o.next=o,Qc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=qg(e,t,o,r),n!==null&&(o=Be(),Rt(n,e,r,o),hm(n,t,r))}}function fm(e){var t=e.alternate;return e===he||t!==null&&t===he}function pm(e,t){si=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lc(e,n)}}var al={readContext:gt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},wS={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Gf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,js(4194308,4,sm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:qf,useDebugValue:od,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=qf(!1),t=e[0];return e=mS.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,o=Lt();if(de){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Te===null)throw Error(O(349));yr&30||Jg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Gf(em.bind(null,r,i,e),[e]),r.flags|=2048,Pi(9,Zg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Te.identifierPrefix;if(de){var n=Zt,r=Jt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ft]=t,e[Si]=r,bm(e,t,!1,!1),t.stateNode=e;e:{switch(s=vu(n,r),n){case"dialog":le("cancel",e),le("close",e),o=r;break;case"iframe":case"object":case"embed":le("load",e),o=r;break;case"video":case"audio":for(o=0;oPo&&(t.flags|=128,r=!0,Ho(i,!1),t.lanes=4194304)}else{if(!r)if(e=sl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ho(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!de)return Ie(t),null}else 2*Se()-i.renderingStartTime>Po&&n!==1073741824&&(t.flags|=128,r=!0,Ho(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=pe.current,ie(pe,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return cd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function kS(e,t){switch(Wc(t),t.tag){case 1:return Ye(t.type)&&Zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),ae(Qe),ae(Fe),Zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jc(t),null;case 13:if(ae(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));So()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(pe),null;case 4:return Co(),null;case 10:return Gc(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var gs=!1,$e=!1,TS=typeof WeakSet=="function"?WeakSet:Set,$=null;function Xr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function Wu(e,t,n){try{n()}catch(r){xe(e,t,r)}}var ip=!1;function RS(e,t){if(ku=Qs,e=Mg(),Bc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,d=0,c=e,h=null;t:for(;;){for(var p;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++d===r&&(a=s),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tu={focusedElem:e,selectionRange:n},Qs=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var y=E.memoizedProps,x=E.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ct(t.type,y),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(S){xe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return E=ip,ip=!1,E}function li(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Wu(t,n,i)}o=o.next}while(o!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function km(e){var t=e.alternate;t!==null&&(e.alternate=null,km(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[Si],delete t[Mu],delete t[dS],delete t[fS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tm(e){return e.tag===5||e.tag===3||e.tag===4}function sp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ku(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Js));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function qu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qu(e,t,n),e=e.sibling;e!==null;)qu(e,t,n),e=e.sibling}var Oe=null,_t=!1;function yn(e,t,n){for(n=n.child;n!==null;)Rm(e,t,n),n=n.sibling}function Rm(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Tl,n)}catch{}switch(n.tag){case 5:$e||Xr(n,t);case 6:var r=Oe,o=_t;Oe=null,yn(e,t,n),Oe=r,_t=o,Oe!==null&&(_t?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(_t?(e=Oe,n=n.stateNode,e.nodeType===8?Ma(e.parentNode,n):e.nodeType===1&&Ma(e,n),mi(e)):Ma(Oe,n.stateNode));break;case 4:r=Oe,o=_t,Oe=n.stateNode.containerInfo,_t=!0,yn(e,t,n),Oe=r,_t=o;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Wu(n,t,s),o=o.next}while(o!==r)}yn(e,t,n);break;case 1:if(!$e&&(Xr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){xe(n,t,l)}yn(e,t,n);break;case 21:yn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,yn(e,t,n),$e=r):yn(e,t,n);break;default:yn(e,t,n)}}function lp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TS),t.forEach(function(r){var o=$S.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MS(r/1960))-r,10e?16:e,Ln===null)var r=!1;else{if(e=Ln,Ln=null,dl=0,te&6)throw Error(O(331));var o=te;for(te|=4,$=e.current;$!==null;){var i=$,s=i.child;if($.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aSe()-ad?hr(e,0):ld|=n),Xe(e,t)}function Dm(e,t){t===0&&(e.mode&1?(t=ss,ss<<=1,!(ss&130023424)&&(ss=4194304)):t=1);var n=Be();e=rn(e,t),e!==null&&(zi(e,t,n),Xe(e,n))}function DS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dm(e,n)}function $S(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Dm(e,n)}var $m;$m=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,PS(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,de&&t.flags&1048576&&Bg(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ls(e,t),e=t.pendingProps;var o=xo(t,Fe.current);ro(t,n),o=td(null,t,r,e,o,n);var i=nd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(i=!0,el(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Yc(t),o.updater=Ll,t.stateNode=o,o._reactInternals=t,Du(t,r,e,n),t=zu(null,t,r,!0,i,n)):(t.tag=0,de&&i&&Vc(t),ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ls(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=zS(r),e=Ct(r,e),o){case 0:t=Fu(null,t,r,e,n);break e;case 1:t=np(null,t,r,e,n);break e;case 11:t=ep(null,t,r,e,n);break e;case 14:t=tp(null,t,r,Ct(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Fu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),np(e,t,r,o,n);case 3:e:{if(Sm(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Gg(e,t),il(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bo(Error(O(423)),t),t=rp(e,t,r,n,o);break e}else if(r!==o){o=bo(Error(O(424)),t),t=rp(e,t,r,n,o);break e}else for(nt=zn(t.stateNode.containerInfo.firstChild),rt=t,de=!0,kt=null,n=Kg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(So(),r===o){t=on(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Qg(t),e===null&&ju(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ru(r,o)?s=null:i!==null&&Ru(r,i)&&(t.flags|=32),xm(e,t),ze(e,t,s,n),t.child;case 6:return e===null&&ju(t),null;case 13:return Em(e,t,n);case 4:return Xc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Eo(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),ep(e,t,r,o,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ie(rl,r._currentValue),r._currentValue=s,i!==null)if(Nt(i.value,s)){if(i.children===o.children&&!Qe.current){t=on(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=en(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Lu(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(O(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Lu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ro(t,n),o=gt(o),r=r(o),t.flags|=1,ze(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),tp(e,t,r,o,n);case 15:return ym(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Ls(e,t),t.tag=1,Ye(r)?(e=!0,el(t)):e=!1,ro(t,n),gm(t,r,o),Du(t,r,o,n),zu(null,t,r,!0,e,n);case 19:return Cm(e,t,n);case 22:return wm(e,t,n)}throw Error(O(156,t.tag))};function Fm(e,t){return fg(e,t)}function FS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,r){return new FS(e,t,n,r)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zS(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mc)return 11;if(e===Oc)return 14}return 2}function Wn(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $s(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")fd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return gr(n.children,o,i,t);case Nc:s=8,o|=8;break;case lu:return e=ft(12,n,t,o|2),e.elementType=lu,e.lanes=i,e;case au:return e=ft(13,n,t,o),e.elementType=au,e.lanes=i,e;case uu:return e=ft(19,n,t,o),e.elementType=uu,e.lanes=i,e;case Qh:return $l(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qh:s=10;break e;case Gh:s=9;break e;case Mc:s=11;break e;case Oc:s=14;break e;case bn:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=ft(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function gr(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=ft(22,e,r,t),e.elementType=Qh,e.lanes=n,e.stateNode={isHidden:!1},e}function Fa(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function za(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function US(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xa(0),this.expirationTimes=xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function pd(e,t,n,r,o,i,s,l,a){return e=new US(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yc(i),e}function BS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vm)}catch(e){console.error(e)}}Vm(),Vh.exports=st;var Wi=Vh.exports;const Wm=Mh(Wi);var Hm,gp=Wi;Hm=gp.createRoot,gp.hydrateRoot;var hl=["light","dark"],vd="(prefers-color-scheme: dark)",qS=typeof window>"u",yd=f.createContext(void 0),GS={setTheme:e=>{},themes:[]},QS=()=>{var e;return(e=f.useContext(yd))!=null?e:GS},YS=e=>f.useContext(yd)?e.children:f.createElement(JS,{...e}),XS=["light","dark"],JS=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:i=XS,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:a,children:u,nonce:d})=>{let[c,h]=f.useState(()=>mp(o,s)),[p,E]=f.useState(()=>mp(o)),y=a?Object.values(a):i,x=f.useCallback(S=>{let C=S;if(!C)return;S==="system"&&n&&(C=vp());let b=a?a[C]:C,P=t?e1():null,T=document.documentElement;if(l==="class"?(T.classList.remove(...y),b&&T.classList.add(b)):b?T.setAttribute(l,b):T.removeAttribute(l),r){let j=hl.includes(s)?s:null,A=hl.includes(C)?C:j;T.style.colorScheme=A}P==null||P()},[]),v=f.useCallback(S=>{let C=typeof S=="function"?S(S):S;h(C);try{localStorage.setItem(o,C)}catch{}},[e]),g=f.useCallback(S=>{let C=vp(S);E(C),c==="system"&&n&&!e&&x("system")},[c,e]);f.useEffect(()=>{let S=window.matchMedia(vd);return S.addListener(g),g(S),()=>S.removeListener(g)},[g]),f.useEffect(()=>{let S=C=>{if(C.key!==o)return;let b=C.newValue||s;v(b)};return window.addEventListener("storage",S),()=>window.removeEventListener("storage",S)},[v]),f.useEffect(()=>{x(e??c)},[e,c]);let w=f.useMemo(()=>({theme:c,setTheme:v,forcedTheme:e,resolvedTheme:c==="system"?p:c,themes:n?[...i,"system"]:i,systemTheme:n?p:void 0}),[c,v,e,p,n,i]);return f.createElement(yd.Provider,{value:w},f.createElement(ZS,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:o,themes:i,defaultTheme:s,attribute:l,value:a,children:u,attrs:y,nonce:d}),u)},ZS=f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:l,nonce:a})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(E=>`'${E}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?hl.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(E,y=!1,x=!0)=>{let v=s?s[E]:E,g=y?E+"|| ''":`'${v}'`,w="";return o&&x&&!y&&hl.includes(E)&&(w+=`d.style.colorScheme = '${E}';`),n==="class"?y||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${vd}',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:a,dangerouslySetInnerHTML:{__html:p}})}),mp=(e,t)=>{if(qS)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},e1=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},vp=e=>(e||(e=window.matchMedia(vd)),e.matches?"dark":"light");class t1 extends R.Component{constructor(){super(...arguments);pa(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n){console.error("The application could not render",n)}render(){return this.state.failed?m.jsx("main",{children:m.jsxs("div",{className:"page",role:"alert",children:[m.jsx("h1",{children:"This page could not load"}),m.jsx("p",{children:"The site may have been updated while this tab was open."}),m.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>window.location.reload(),children:"Reload page"})]})}):this.props.children}}const Ua="pwc:chunk-reload-at",Km=6e4;function n1(e,t){if(!e)return!0;const n=Number(e);return!Number.isFinite(n)||t-n>=Km}function r1(){if(typeof window>"u")return()=>{};const e=n=>{const r=Date.now();n1(sessionStorage.getItem(Ua),r)&&(n.preventDefault(),sessionStorage.setItem(Ua,String(r)),window.location.reload())};window.addEventListener("vite:preloadError",e);const t=window.setTimeout(()=>sessionStorage.removeItem(Ua),Km);return()=>{window.removeEventListener("vite:preloadError",e),window.clearTimeout(t)}}const o1="modulepreload",i1=function(e){return"/"+e},yp={},ue=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=i1(a),a in yp)return;yp[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":o1,u||(c.as="script"),c.crossOrigin="",c.href=a,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((h,p)=>{c.addEventListener("load",h),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};/** +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Da(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ES=typeof WeakMap=="function"?WeakMap:Map;function mm(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cl||(cl=!0,Gu=r),$u(e,t)},n}function vm(e,t,n){n=en(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){$u(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$u(e,t),typeof r!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Xf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ES;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=IS.bind(null,e,t,n),t.then(e,e))}function Jf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zf(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=en(-1,1),t.tag=2,Un(n,t,1))),n.lanes|=1),e)}var CS=an.ReactCurrentOwner,Ge=!1;function ze(e,t,n,r){t.child=e===null?Kg(t,null,n,r):Eo(t,e.child,n,r)}function ep(e,t,n,r,o){n=n.render;var i=t.ref;return ro(t,o),r=td(e,t,n,r,i,o),n=nd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,on(e,t,o)):(de&&n&&Vc(t),t.flags|=1,ze(e,t,r,o),t.child)}function tp(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!fd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ym(e,t,i,r,o)):(e=$s(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:yi,n(s,r)&&e.ref===t.ref)return on(e,t,o)}return t.flags|=1,e=Wn(i,r),e.ref=t.ref,e.return=t,t.child=e}function ym(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(yi(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,on(e,t,o)}return Fu(e,t,n,r,o)}function wm(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(Jr,Ze),Ze|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(Jr,Ze),Ze|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ie(Jr,Ze),Ze|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ie(Jr,Ze),Ze|=r;return ze(e,t,o,n),t.child}function xm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fu(e,t,n,r,o){var i=Ye(n)?mr:Fe.current;return i=xo(t,i),ro(t,o),n=td(e,t,n,r,i,o),r=nd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,on(e,t,o)):(de&&r&&Vc(t),t.flags|=1,ze(e,t,n,o),t.child)}function np(e,t,n,r,o){if(Ye(n)){var i=!0;el(t)}else i=!1;if(ro(t,o),t.stateNode===null)Ls(e,t),gm(t,n,r),Du(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=gt(u):(u=Ye(n)?mr:Fe.current,u=xo(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Yf(t,s,r,u),_n=!1;var h=t.memoizedState;s.state=h,il(t,r,s,o),a=t.memoizedState,l!==r||h!==a||Qe.current||_n?(typeof d=="function"&&(Iu(t,n,d,r),a=t.memoizedState),(l=_n||Qf(t,n,l,r,h,a,u))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Gg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ct(t.type,l),s.props=u,c=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=gt(a):(a=Ye(n)?mr:Fe.current,a=xo(t,a));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==c||h!==a)&&Yf(t,s,r,a),_n=!1,h=t.memoizedState,s.state=h,il(t,r,s,o);var E=t.memoizedState;l!==c||h!==E||Qe.current||_n?(typeof p=="function"&&(Iu(t,n,p,r),E=t.memoizedState),(u=_n||Qf(t,n,u,r,h,E,a)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,E,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,E,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),s.props=r,s.state=E,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return zu(e,t,n,r,i,o)}function zu(e,t,n,r,o,i){xm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Uf(t,n,!1),on(e,t,i);r=t.stateNode,CS.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Eo(t,e.child,null,i),t.child=Eo(t,null,l,i)):ze(e,t,l,i),t.memoizedState=r.state,o&&Uf(t,n,!0),t.child}function Sm(e){var t=e.stateNode;t.pendingContext?zf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zf(e,t.context,!1),Xc(e,t.containerInfo)}function rp(e,t,n,r,o){return So(),Hc(o),t.flags|=256,ze(e,t,n,r),t.child}var Uu={dehydrated:null,treeContext:null,retryLane:0};function Bu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Em(e,t,n){var r=t.pendingProps,o=pe.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ie(pe,o&1),e===null)return ju(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=$l(s,r,0,null),e=gr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Bu(n),t.memoizedState=Uu,e):id(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return bS(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Wn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=Wn(l,i):(i=gr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Bu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Uu,r}return i=e.child,e=i.sibling,r=Wn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function id(e,t){return t=$l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hs(e,t,n,r){return r!==null&&Hc(r),Eo(t,e.child,null,n),e=id(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bS(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Da(Error(O(422))),hs(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=$l({mode:"visible",children:r.children},o,0,null),i=gr(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Eo(t,e.child,null,s),t.child.memoizedState=Bu(s),t.memoizedState=Uu,i);if(!(t.mode&1))return hs(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(O(419)),r=Da(i,r,void 0),hs(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ge||l){if(r=Te,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,rn(e,o),Rt(r,e,o,-1))}return dd(),r=Da(Error(O(421))),hs(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=DS.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,nt=zn(o.nextSibling),rt=t,de=!0,kt=null,e!==null&&(ct[dt++]=Jt,ct[dt++]=Zt,ct[dt++]=vr,Jt=e.id,Zt=e.overflow,vr=t),t=id(t,r.children),t.flags|=4096,t)}function op(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lu(e.return,t,n)}function $a(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Cm(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ze(e,t,r.children,n),r=pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&op(e,n,t);else if(e.tag===19)op(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ie(pe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&sl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),$a(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&sl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}$a(t,!0,n,null,i);break;case"together":$a(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ls(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function on(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=Wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _S(e,t,n){switch(t.tag){case 3:Sm(t),So();break;case 5:Qg(t);break;case 1:Ye(t.type)&&el(t);break;case 4:Xc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ie(rl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ie(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?Em(e,t,n):(ie(pe,pe.current&1),e=on(e,t,n),e!==null?e.sibling:null);ie(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ie(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,wm(e,t,n)}return on(e,t,n)}var bm,Vu,_m,Pm;bm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Vu=function(){};_m=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,lr(Vt.current);var i=null;switch(n){case"input":o=du(e,o),r=du(e,r),i=[];break;case"select":o=me({},o,{value:void 0}),r=me({},r,{value:void 0}),i=[];break;case"textarea":o=hu(e,o),r=hu(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Js)}mu(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(di.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(di.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ae("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Pm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ho(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function PS(e,t,n){var r=t.pendingProps;switch(Wc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ye(t.type)&&Zs(),Ie(t),null;case 3:return r=t.stateNode,Co(),ue(Qe),ue(Fe),Zc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kt!==null&&(Xu(kt),kt=null))),Vu(e,t),Ie(t),null;case 5:Jc(t);var o=lr(Ci.current);if(n=t.type,e!==null&&t.stateNode!=null)_m(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ie(t),null}if(e=lr(Vt.current),fs(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ft]=t,r[Si]=i,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ft]=t,e[Si]=r,bm(e,t,!1,!1),t.stateNode=e;e:{switch(s=vu(n,r),n){case"dialog":ae("cancel",e),ae("close",e),o=r;break;case"iframe":case"object":case"embed":ae("load",e),o=r;break;case"video":case"audio":for(o=0;o_o&&(t.flags|=128,r=!0,Ho(i,!1),t.lanes=4194304)}else{if(!r)if(e=sl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ho(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!de)return Ie(t),null}else 2*Se()-i.renderingStartTime>_o&&n!==1073741824&&(t.flags|=128,r=!0,Ho(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=pe.current,ie(pe,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return cd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function kS(e,t){switch(Wc(t),t.tag){case 1:return Ye(t.type)&&Zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),ue(Qe),ue(Fe),Zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jc(t),null;case 13:if(ue(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));So()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(pe),null;case 4:return Co(),null;case 10:return Gc(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var gs=!1,$e=!1,TS=typeof WeakSet=="function"?WeakSet:Set,$=null;function Xr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function Wu(e,t,n){try{n()}catch(r){xe(e,t,r)}}var ip=!1;function RS(e,t){if(ku=Qs,e=Mg(),Bc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,d=0,c=e,h=null;t:for(;;){for(var p;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++d===r&&(a=s),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tu={focusedElem:e,selectionRange:n},Qs=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var y=E.memoizedProps,x=E.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ct(t.type,y),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(S){xe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return E=ip,ip=!1,E}function li(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Wu(t,n,i)}o=o.next}while(o!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function km(e){var t=e.alternate;t!==null&&(e.alternate=null,km(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[Si],delete t[Mu],delete t[dS],delete t[fS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tm(e){return e.tag===5||e.tag===3||e.tag===4}function sp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ku(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Js));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function qu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qu(e,t,n),e=e.sibling;e!==null;)qu(e,t,n),e=e.sibling}var Oe=null,Pt=!1;function yn(e,t,n){for(n=n.child;n!==null;)Rm(e,t,n),n=n.sibling}function Rm(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Tl,n)}catch{}switch(n.tag){case 5:$e||Xr(n,t);case 6:var r=Oe,o=Pt;Oe=null,yn(e,t,n),Oe=r,Pt=o,Oe!==null&&(Pt?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(Pt?(e=Oe,n=n.stateNode,e.nodeType===8?Ma(e.parentNode,n):e.nodeType===1&&Ma(e,n),mi(e)):Ma(Oe,n.stateNode));break;case 4:r=Oe,o=Pt,Oe=n.stateNode.containerInfo,Pt=!0,yn(e,t,n),Oe=r,Pt=o;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Wu(n,t,s),o=o.next}while(o!==r)}yn(e,t,n);break;case 1:if(!$e&&(Xr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){xe(n,t,l)}yn(e,t,n);break;case 21:yn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,yn(e,t,n),$e=r):yn(e,t,n);break;default:yn(e,t,n)}}function lp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TS),t.forEach(function(r){var o=$S.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MS(r/1960))-r,10e?16:e,Ln===null)var r=!1;else{if(e=Ln,Ln=null,dl=0,te&6)throw Error(O(331));var o=te;for(te|=4,$=e.current;$!==null;){var i=$,s=i.child;if($.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aSe()-ad?hr(e,0):ld|=n),Xe(e,t)}function Dm(e,t){t===0&&(e.mode&1?(t=ss,ss<<=1,!(ss&130023424)&&(ss=4194304)):t=1);var n=Be();e=rn(e,t),e!==null&&(zi(e,t,n),Xe(e,n))}function DS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dm(e,n)}function $S(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Dm(e,n)}var $m;$m=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,_S(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,de&&t.flags&1048576&&Bg(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ls(e,t),e=t.pendingProps;var o=xo(t,Fe.current);ro(t,n),o=td(null,t,r,e,o,n);var i=nd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(i=!0,el(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Yc(t),o.updater=Ll,t.stateNode=o,o._reactInternals=t,Du(t,r,e,n),t=zu(null,t,r,!0,i,n)):(t.tag=0,de&&i&&Vc(t),ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ls(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=zS(r),e=Ct(r,e),o){case 0:t=Fu(null,t,r,e,n);break e;case 1:t=np(null,t,r,e,n);break e;case 11:t=ep(null,t,r,e,n);break e;case 14:t=tp(null,t,r,Ct(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Fu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),np(e,t,r,o,n);case 3:e:{if(Sm(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Gg(e,t),il(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bo(Error(O(423)),t),t=rp(e,t,r,n,o);break e}else if(r!==o){o=bo(Error(O(424)),t),t=rp(e,t,r,n,o);break e}else for(nt=zn(t.stateNode.containerInfo.firstChild),rt=t,de=!0,kt=null,n=Kg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(So(),r===o){t=on(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Qg(t),e===null&&ju(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ru(r,o)?s=null:i!==null&&Ru(r,i)&&(t.flags|=32),xm(e,t),ze(e,t,s,n),t.child;case 6:return e===null&&ju(t),null;case 13:return Em(e,t,n);case 4:return Xc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Eo(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),ep(e,t,r,o,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ie(rl,r._currentValue),r._currentValue=s,i!==null)if(Nt(i.value,s)){if(i.children===o.children&&!Qe.current){t=on(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=en(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Lu(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(O(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Lu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ro(t,n),o=gt(o),r=r(o),t.flags|=1,ze(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),tp(e,t,r,o,n);case 15:return ym(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Ls(e,t),t.tag=1,Ye(r)?(e=!0,el(t)):e=!1,ro(t,n),gm(t,r,o),Du(t,r,o,n),zu(null,t,r,!0,e,n);case 19:return Cm(e,t,n);case 22:return wm(e,t,n)}throw Error(O(156,t.tag))};function Fm(e,t){return fg(e,t)}function FS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,r){return new FS(e,t,n,r)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zS(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mc)return 11;if(e===Oc)return 14}return 2}function Wn(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $s(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")fd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return gr(n.children,o,i,t);case Nc:s=8,o|=8;break;case lu:return e=ft(12,n,t,o|2),e.elementType=lu,e.lanes=i,e;case au:return e=ft(13,n,t,o),e.elementType=au,e.lanes=i,e;case uu:return e=ft(19,n,t,o),e.elementType=uu,e.lanes=i,e;case Qh:return $l(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qh:s=10;break e;case Gh:s=9;break e;case Mc:s=11;break e;case Oc:s=14;break e;case bn:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=ft(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function gr(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=ft(22,e,r,t),e.elementType=Qh,e.lanes=n,e.stateNode={isHidden:!1},e}function Fa(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function za(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function US(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xa(0),this.expirationTimes=xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function pd(e,t,n,r,o,i,s,l,a){return e=new US(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yc(i),e}function BS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vm)}catch(e){console.error(e)}}Vm(),Vh.exports=st;var Wi=Vh.exports;const Wm=Mh(Wi);var Hm,gp=Wi;Hm=gp.createRoot,gp.hydrateRoot;var hl=["light","dark"],vd="(prefers-color-scheme: dark)",qS=typeof window>"u",yd=f.createContext(void 0),GS={setTheme:e=>{},themes:[]},QS=()=>{var e;return(e=f.useContext(yd))!=null?e:GS},YS=e=>f.useContext(yd)?e.children:f.createElement(JS,{...e}),XS=["light","dark"],JS=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:i=XS,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:a,children:u,nonce:d})=>{let[c,h]=f.useState(()=>mp(o,s)),[p,E]=f.useState(()=>mp(o)),y=a?Object.values(a):i,x=f.useCallback(S=>{let C=S;if(!C)return;S==="system"&&n&&(C=vp());let b=a?a[C]:C,_=t?e1():null,T=document.documentElement;if(l==="class"?(T.classList.remove(...y),b&&T.classList.add(b)):b?T.setAttribute(l,b):T.removeAttribute(l),r){let j=hl.includes(s)?s:null,A=hl.includes(C)?C:j;T.style.colorScheme=A}_==null||_()},[]),v=f.useCallback(S=>{let C=typeof S=="function"?S(S):S;h(C);try{localStorage.setItem(o,C)}catch{}},[e]),g=f.useCallback(S=>{let C=vp(S);E(C),c==="system"&&n&&!e&&x("system")},[c,e]);f.useEffect(()=>{let S=window.matchMedia(vd);return S.addListener(g),g(S),()=>S.removeListener(g)},[g]),f.useEffect(()=>{let S=C=>{if(C.key!==o)return;let b=C.newValue||s;v(b)};return window.addEventListener("storage",S),()=>window.removeEventListener("storage",S)},[v]),f.useEffect(()=>{x(e??c)},[e,c]);let w=f.useMemo(()=>({theme:c,setTheme:v,forcedTheme:e,resolvedTheme:c==="system"?p:c,themes:n?[...i,"system"]:i,systemTheme:n?p:void 0}),[c,v,e,p,n,i]);return f.createElement(yd.Provider,{value:w},f.createElement(ZS,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:o,themes:i,defaultTheme:s,attribute:l,value:a,children:u,attrs:y,nonce:d}),u)},ZS=f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:l,nonce:a})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(E=>`'${E}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?hl.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(E,y=!1,x=!0)=>{let v=s?s[E]:E,g=y?E+"|| ''":`'${v}'`,w="";return o&&x&&!y&&hl.includes(E)&&(w+=`d.style.colorScheme = '${E}';`),n==="class"?y||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${vd}',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:a,dangerouslySetInnerHTML:{__html:p}})}),mp=(e,t)=>{if(qS)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},e1=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},vp=e=>(e||(e=window.matchMedia(vd)),e.matches?"dark":"light");class t1 extends R.Component{constructor(){super(...arguments);pa(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n){console.error("The application could not render",n)}render(){return this.state.failed?m.jsx("main",{children:m.jsxs("div",{className:"page",role:"alert",children:[m.jsx("h1",{children:"This page could not load"}),m.jsx("p",{children:"The site may have been updated while this tab was open."}),m.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>window.location.reload(),children:"Reload page"})]})}):this.props.children}}const Ua="pwc:chunk-reload-at",Km=6e4;function n1(e,t){if(!e)return!0;const n=Number(e);return!Number.isFinite(n)||t-n>=Km}function r1(){if(typeof window>"u")return()=>{};const e=n=>{const r=Date.now();n1(sessionStorage.getItem(Ua),r)&&(n.preventDefault(),sessionStorage.setItem(Ua,String(r)),window.location.reload())};window.addEventListener("vite:preloadError",e);const t=window.setTimeout(()=>sessionStorage.removeItem(Ua),Km);return()=>{window.removeEventListener("vite:preloadError",e),window.clearTimeout(t)}}const o1="modulepreload",i1=function(e){return"/"+e},yp={},se=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=i1(a),a in yp)return;yp[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":o1,u||(c.as="script"),c.crossOrigin="",c.href=a,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((h,p)=>{c.addEventListener("load",h),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -47,7 +47,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Vl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a1(){return Math.random().toString(36).substr(2,8)}function xp(e,t){return{usr:e.state,key:e.key,idx:t}}function gl(e,t,n,r){return n===void 0&&(n=null),Ti({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?br(t):t,{state:n,key:t&&t.key||r||a1()})}function Ri(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function br(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function qm(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=In.Pop,a=null,u=d();u==null&&(u=0,s.replaceState(Ti({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){l=In.Pop;let x=d(),v=x==null?null:x-u;u=x,a&&a({action:l,location:y.location,delta:v})}function h(x,v){l=In.Push;let g=gl(y.location,x,v);n&&n(g,x),u=d()+1;let w=xp(g,u),S=y.createHref(g);try{s.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(S)}i&&a&&a({action:l,location:y.location,delta:1})}function p(x,v){l=In.Replace;let g=gl(y.location,x,v);n&&n(g,x),u=d();let w=xp(g,u),S=y.createHref(g);s.replaceState(w,"",S),i&&a&&a({action:l,location:y.location,delta:0})}function E(x){let v=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof x=="string"?x:Ri(x);return g=g.replace(/ $/,"%20"),ge(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return l},get location(){return e(o,s)},listen(x){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(wp,c),a=x,()=>{o.removeEventListener(wp,c),a=null}},createHref(x){return t(o,x)},createURL:E,encodeLocation(x){let v=E(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(x){return s.go(x)}};return y}var Sp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sp||(Sp={}));function u1(e,t,n){return n===void 0&&(n="/"),c1(e,t,n)}function c1(e,t,n,r){let o=typeof t=="string"?br(t):t,i=_o(o.pathname||"/",n);if(i==null)return null;let s=Gm(e);d1(s);let l=null;for(let a=0;l==null&&a{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(ge(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Hn([r,a.relativePath]),d=n.concat(a);i.children&&i.children.length>0&&(ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Gm(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:y1(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of Qm(i.path))o(i,s,a)}),t}function Qm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Qm(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function d1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:w1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const f1=/^:[\w-]+$/,p1=3,h1=2,g1=1,m1=10,v1=-2,Ep=e=>e==="*";function y1(e,t){let n=e.split("/"),r=n.length;return n.some(Ep)&&(r+=v1),t&&(r+=h1),n.filter(o=>!Ep(o)).reduce((o,i)=>o+(f1.test(i)?p1:i===""?g1:m1),r)}function w1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function x1(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l{let{paramName:h,isOptional:p}=d;if(h==="*"){let y=l[c]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const E=l[c];return p&&!E?u[h]=void 0:u[h]=(E||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function S1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Vl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function E1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _o(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const C1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b1=e=>C1.test(e);function P1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?br(e):e,i;if(n)if(b1(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Vl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?i=Cp(n.substring(1),"/"):i=Cp(n,t)}else i=t;return{pathname:i,search:T1(r),hash:R1(o)}}function Cp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ba(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wd(e,t){let n=_1(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xd(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=br(e):(o=Ti({},e),ge(!o.pathname||!o.pathname.includes("?"),Ba("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Ba("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Ba("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),c-=1;o.pathname=h.join("/")}l=c>=0?t[c]:"/"}let a=P1(o,l),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||d)&&(a.pathname+="/"),a}const Hn=e=>e.join("/").replace(/\/\/+/g,"/"),k1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),T1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,R1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ym=["post","put","patch","delete"];new Set(Ym);const M1=["get",...Ym];new Set(M1);/** + */function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Vl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a1(){return Math.random().toString(36).substr(2,8)}function xp(e,t){return{usr:e.state,key:e.key,idx:t}}function gl(e,t,n,r){return n===void 0&&(n=null),Ti({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?br(t):t,{state:n,key:t&&t.key||r||a1()})}function Ri(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function br(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function qm(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=In.Pop,a=null,u=d();u==null&&(u=0,s.replaceState(Ti({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){l=In.Pop;let x=d(),v=x==null?null:x-u;u=x,a&&a({action:l,location:y.location,delta:v})}function h(x,v){l=In.Push;let g=gl(y.location,x,v);n&&n(g,x),u=d()+1;let w=xp(g,u),S=y.createHref(g);try{s.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(S)}i&&a&&a({action:l,location:y.location,delta:1})}function p(x,v){l=In.Replace;let g=gl(y.location,x,v);n&&n(g,x),u=d();let w=xp(g,u),S=y.createHref(g);s.replaceState(w,"",S),i&&a&&a({action:l,location:y.location,delta:0})}function E(x){let v=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof x=="string"?x:Ri(x);return g=g.replace(/ $/,"%20"),ge(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return l},get location(){return e(o,s)},listen(x){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(wp,c),a=x,()=>{o.removeEventListener(wp,c),a=null}},createHref(x){return t(o,x)},createURL:E,encodeLocation(x){let v=E(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(x){return s.go(x)}};return y}var Sp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sp||(Sp={}));function u1(e,t,n){return n===void 0&&(n="/"),c1(e,t,n)}function c1(e,t,n,r){let o=typeof t=="string"?br(t):t,i=Po(o.pathname||"/",n);if(i==null)return null;let s=Gm(e);d1(s);let l=null;for(let a=0;l==null&&a{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(ge(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Hn([r,a.relativePath]),d=n.concat(a);i.children&&i.children.length>0&&(ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Gm(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:y1(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of Qm(i.path))o(i,s,a)}),t}function Qm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Qm(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function d1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:w1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const f1=/^:[\w-]+$/,p1=3,h1=2,g1=1,m1=10,v1=-2,Ep=e=>e==="*";function y1(e,t){let n=e.split("/"),r=n.length;return n.some(Ep)&&(r+=v1),t&&(r+=h1),n.filter(o=>!Ep(o)).reduce((o,i)=>o+(f1.test(i)?p1:i===""?g1:m1),r)}function w1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function x1(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l{let{paramName:h,isOptional:p}=d;if(h==="*"){let y=l[c]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const E=l[c];return p&&!E?u[h]=void 0:u[h]=(E||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function S1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Vl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function E1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Po(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const C1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b1=e=>C1.test(e);function _1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?br(e):e,i;if(n)if(b1(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Vl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?i=Cp(n.substring(1),"/"):i=Cp(n,t)}else i=t;return{pathname:i,search:T1(r),hash:R1(o)}}function Cp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ba(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function P1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wd(e,t){let n=P1(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xd(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=br(e):(o=Ti({},e),ge(!o.pathname||!o.pathname.includes("?"),Ba("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Ba("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Ba("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),c-=1;o.pathname=h.join("/")}l=c>=0?t[c]:"/"}let a=_1(o,l),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||d)&&(a.pathname+="/"),a}const Hn=e=>e.join("/").replace(/\/\/+/g,"/"),k1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),T1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,R1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ym=["post","put","patch","delete"];new Set(Ym);const M1=["get",...Ym];new Set(M1);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ni(){return Ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let c=xd(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Hn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,i,e])}function Ed(){let{matches:e}=f.useContext(cn),t=e[e.length-1];return t?t.params:{}}function Kl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=f.useContext(un),{matches:o}=f.useContext(cn),{pathname:i}=dn(),s=JSON.stringify(wd(o,r.v7_relativeSplatPath));return f.useMemo(()=>xd(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function j1(e,t){return L1(e,t)}function L1(e,t,n,r){Ao()||ge(!1);let{navigator:o}=f.useContext(un),{matches:i}=f.useContext(cn),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=dn(),d;if(t){var c;let x=typeof t=="string"?br(t):t;a==="/"||(c=x.pathname)!=null&&c.startsWith(a)||ge(!1),d=x}else d=u;let h=d.pathname||"/",p=h;if(a!=="/"){let x=a.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let E=u1(e,{pathname:p}),y=z1(E&&E.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Hn([a,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?a:Hn([a,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&y?f.createElement(Hl.Provider,{value:{location:Ni({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:In.Pop}},y):y}function I1(){let e=W1(),t=N1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const D1=f.createElement(I1,null);class $1 extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(cn.Provider,{value:this.props.routeContext},f.createElement(Jm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function F1(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(Wl);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(cn.Provider,{value:t},r)}function z1(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let d=s.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);d>=0||ge(!1),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,h)=>{let p,E=!1,y=null,x=null;n&&(p=l&&c.route.id?l[c.route.id]:void 0,y=c.route.errorElement||D1,a&&(u<0&&h===0?(K1("route-fallback"),E=!0,x=null):u===h&&(E=!0,x=c.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),g=()=>{let w;return p?w=y:E?w=x:c.route.Component?w=f.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,f.createElement(F1,{match:c,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?f.createElement($1,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var ev=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ev||{}),tv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tv||{});function U1(e){let t=f.useContext(Wl);return t||ge(!1),t}function B1(e){let t=f.useContext(Xm);return t||ge(!1),t}function V1(e){let t=f.useContext(cn);return t||ge(!1),t}function nv(e){let t=V1(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function W1(){var e;let t=f.useContext(Jm),n=B1(),r=nv();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function H1(){let{router:e}=U1(ev.UseNavigateStable),t=nv(tv.UseNavigateStable),n=f.useRef(!1);return Zm(()=>{n.current=!0}),f.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ni({fromRouteId:t},i)))},[e,t])}const bp={};function K1(e,t,n){bp[e]||(bp[e]=!0)}function rv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Gn(e){let{to:t,replace:n,state:r,relative:o}=e;Ao()||ge(!1);let{future:i,static:s}=f.useContext(un),{matches:l}=f.useContext(cn),{pathname:a}=dn(),u=Sd(),d=xd(t,wd(l,i.v7_relativeSplatPath),a,o==="path"),c=JSON.stringify(d);return f.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:o}),[u,c,o,n,r]),null}function ne(e){ge(!1)}function ov(e){let{basename:t="/",children:n=null,location:r,navigationType:o=In.Pop,navigator:i,static:s=!1,future:l}=e;Ao()&&ge(!1);let a=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:a,navigator:i,static:s,future:Ni({v7_relativeSplatPath:!1},l)}),[a,l,i,s]);typeof r=="string"&&(r=br(r));let{pathname:d="/",search:c="",hash:h="",state:p=null,key:E="default"}=r,y=f.useMemo(()=>{let x=_o(d,a);return x==null?null:{location:{pathname:x,search:c,hash:h,state:p,key:E},navigationType:o}},[a,d,c,h,p,E,o]);return y==null?null:f.createElement(un.Provider,{value:u},f.createElement(Hl.Provider,{children:n,value:y}))}function q1(e){let{children:t,location:n}=e;return j1(Zu(t),n)}new Promise(()=>{});function Zu(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let i=[...t,o];if(r.type===f.Fragment){n.push.apply(n,Zu(r.props.children,i));return}r.type!==ne&&ge(!1),!r.props.index||!r.props.children||ge(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Zu(r.props.children,i)),n.push(s)}),n}/** + */function Ni(){return Ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let c=xd(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Hn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,i,e])}function Ed(){let{matches:e}=f.useContext(cn),t=e[e.length-1];return t?t.params:{}}function Kl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=f.useContext(un),{matches:o}=f.useContext(cn),{pathname:i}=dn(),s=JSON.stringify(wd(o,r.v7_relativeSplatPath));return f.useMemo(()=>xd(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function j1(e,t){return L1(e,t)}function L1(e,t,n,r){Ao()||ge(!1);let{navigator:o}=f.useContext(un),{matches:i}=f.useContext(cn),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=dn(),d;if(t){var c;let x=typeof t=="string"?br(t):t;a==="/"||(c=x.pathname)!=null&&c.startsWith(a)||ge(!1),d=x}else d=u;let h=d.pathname||"/",p=h;if(a!=="/"){let x=a.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let E=u1(e,{pathname:p}),y=z1(E&&E.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Hn([a,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?a:Hn([a,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&y?f.createElement(Hl.Provider,{value:{location:Ni({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:In.Pop}},y):y}function I1(){let e=W1(),t=N1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const D1=f.createElement(I1,null);class $1 extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(cn.Provider,{value:this.props.routeContext},f.createElement(Jm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function F1(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(Wl);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(cn.Provider,{value:t},r)}function z1(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let d=s.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);d>=0||ge(!1),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,h)=>{let p,E=!1,y=null,x=null;n&&(p=l&&c.route.id?l[c.route.id]:void 0,y=c.route.errorElement||D1,a&&(u<0&&h===0?(K1("route-fallback"),E=!0,x=null):u===h&&(E=!0,x=c.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),g=()=>{let w;return p?w=y:E?w=x:c.route.Component?w=f.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,f.createElement(F1,{match:c,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?f.createElement($1,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var ev=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ev||{}),tv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tv||{});function U1(e){let t=f.useContext(Wl);return t||ge(!1),t}function B1(e){let t=f.useContext(Xm);return t||ge(!1),t}function V1(e){let t=f.useContext(cn);return t||ge(!1),t}function nv(e){let t=V1(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function W1(){var e;let t=f.useContext(Jm),n=B1(),r=nv();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function H1(){let{router:e}=U1(ev.UseNavigateStable),t=nv(tv.UseNavigateStable),n=f.useRef(!1);return Zm(()=>{n.current=!0}),f.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ni({fromRouteId:t},i)))},[e,t])}const bp={};function K1(e,t,n){bp[e]||(bp[e]=!0)}function rv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Gn(e){let{to:t,replace:n,state:r,relative:o}=e;Ao()||ge(!1);let{future:i,static:s}=f.useContext(un),{matches:l}=f.useContext(cn),{pathname:a}=dn(),u=Sd(),d=xd(t,wd(l,i.v7_relativeSplatPath),a,o==="path"),c=JSON.stringify(d);return f.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:o}),[u,c,o,n,r]),null}function ne(e){ge(!1)}function ov(e){let{basename:t="/",children:n=null,location:r,navigationType:o=In.Pop,navigator:i,static:s=!1,future:l}=e;Ao()&&ge(!1);let a=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:a,navigator:i,static:s,future:Ni({v7_relativeSplatPath:!1},l)}),[a,l,i,s]);typeof r=="string"&&(r=br(r));let{pathname:d="/",search:c="",hash:h="",state:p=null,key:E="default"}=r,y=f.useMemo(()=>{let x=Po(d,a);return x==null?null:{location:{pathname:x,search:c,hash:h,state:p,key:E},navigationType:o}},[a,d,c,h,p,E,o]);return y==null?null:f.createElement(un.Provider,{value:u},f.createElement(Hl.Provider,{children:n,value:y}))}function q1(e){let{children:t,location:n}=e;return j1(Zu(t),n)}new Promise(()=>{});function Zu(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let i=[...t,o];if(r.type===f.Fragment){n.push.apply(n,Zu(r.props.children,i));return}r.type!==ne&&ge(!1),!r.props.index||!r.props.children||ge(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Zu(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function G1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Q1(e,t){return e.button===0&&(!t||t==="_self")&&!G1(e)}function ec(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function Y1(e,t){let n=ec(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const X1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],J1=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Z1="6";try{window.__reactRouterVersion=Z1}catch{}const eE=f.createContext({isTransitioning:!1}),tE="startTransition",vl=kl[tE];function nE(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=s1({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&vl?vl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>rv(r),[r]),f.createElement(ov,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}function rE(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=l1({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&vl?vl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>rv(r),[r]),f.createElement(ov,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const oE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zr=f.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:d,viewTransition:c}=t,h=iv(t,X1),{basename:p}=f.useContext(un),E,y=!1;if(typeof u=="string"&&iE.test(u)&&(E=u,oE))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=_o(S.pathname,p);S.origin===w.origin&&C!=null?u=C+S.search+S.hash:y=!0}catch{}let x=O1(u,{relative:o}),v=lE(u,{replace:s,state:l,target:a,preventScrollReset:d,relative:o,viewTransition:c});function g(w){r&&r(w),w.defaultPrevented||v(w)}return f.createElement("a",ml({},h,{href:E||x,onClick:y||i?r:g,ref:n,target:a}))}),Ir=f.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:l,to:a,viewTransition:u,children:d}=t,c=iv(t,J1),h=Kl(a,{relative:c.relative}),p=dn(),E=f.useContext(Xm),{navigator:y,basename:x}=f.useContext(un),v=E!=null&&aE(h)&&u===!0,g=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,w=p.pathname,S=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;o||(w=w.toLowerCase(),S=S?S.toLowerCase():null,g=g.toLowerCase()),S&&x&&(S=_o(S,x)||S);const C=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let b=w===g||!s&&w.startsWith(g)&&w.charAt(C)==="/",P=S!=null&&(S===g||!s&&S.startsWith(g)&&S.charAt(g.length)==="/"),T={isActive:b,isPending:P,isTransitioning:v},j=b?r:void 0,A;typeof i=="function"?A=i(T):A=[i,b?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(T):l;return f.createElement(zr,ml({},c,{"aria-current":j,className:A,ref:n,style:z,to:a,viewTransition:u}),typeof d=="function"?d(T):d)});var tc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tc||(tc={}));var Pp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Pp||(Pp={}));function sE(e){let t=f.useContext(Wl);return t||ge(!1),t}function lE(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}=t===void 0?{}:t,a=Sd(),u=dn(),d=Kl(e,{relative:s});return f.useCallback(c=>{if(Q1(c,n)){c.preventDefault();let h=r!==void 0?r:Ri(u)===Ri(d);a(e,{replace:h,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[u,a,d,r,o,n,e,i,s,l])}function DN(e){let t=f.useRef(ec(e)),n=f.useRef(!1),r=dn(),o=f.useMemo(()=>Y1(r.search,n.current?null:t.current),[r.search]),i=Sd(),s=f.useCallback((l,a)=>{const u=ec(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,a)},[i,o]);return[o,s]}function aE(e,t){t===void 0&&(t={});let n=f.useContext(eE);n==null&&ge(!1);let{basename:r}=sE(tc.useViewTransitionState),o=Kl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=_o(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=_o(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ju(o.pathname,s)!=null||Ju(o.pathname,i)!=null}var ql=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ar,Tn,uo,Eh,uE=(Eh=class extends ql{constructor(){super();ee(this,ar);ee(this,Tn);ee(this,uo);W(this,uo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Tn)||this.setEventListener(N(this,uo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Tn))==null||t.call(this),W(this,Tn,void 0))}setEventListener(t){var n;W(this,uo,t),(n=N(this,Tn))==null||n.call(this),W(this,Tn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){N(this,ar)!==t&&(W(this,ar,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof N(this,ar)=="boolean"?N(this,ar):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ar=new WeakMap,Tn=new WeakMap,uo=new WeakMap,Eh),sv=new uE,cE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Rn,Ec,Ch,dE=(Ch=class{constructor(){ee(this,Rn,cE);ee(this,Ec,!1)}setTimeoutProvider(e){W(this,Rn,e)}setTimeout(e,t){return N(this,Rn).setTimeout(e,t)}clearTimeout(e){N(this,Rn).clearTimeout(e)}setInterval(e,t){return N(this,Rn).setInterval(e,t)}clearInterval(e){N(this,Rn).clearInterval(e)}},Rn=new WeakMap,Ec=new WeakMap,Ch),nc=new dE;function fE(e){setTimeout(e,0)}var pE=typeof window>"u"||"Deno"in globalThis;function bt(){}function hE(e,t){return typeof e=="function"?e(t):e}function gE(e){return typeof e=="number"&&e>=0&&e!==1/0}function mE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rc(e,t){return typeof e=="function"?e(t):e}function vE(e,t){return typeof e=="function"?e(t):e}function _p(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==Cd(s,t.options))return!1}else if(!Oi(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function kp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Mi(t.options.mutationKey)!==Mi(i))return!1}else if(!Oi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Cd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mi)(e)}function Mi(e){return JSON.stringify(e,(t,n)=>oc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Oi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Oi(e[n],t[n])):!1}var yE=Object.prototype.hasOwnProperty;function lv(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Tp(e)&&Tp(t);if(!r&&!(oc(e)&&oc(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,a=r?new Array(l):{};let u=0;for(let d=0;d{nc.setTimeout(t,e)})}function xE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?lv(e,t):t}function FN(e){return e}function SE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function EE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bd=Symbol();function av(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function zN(e,t){return typeof e=="function"?e(...t):!!e}function CE(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var uv=(()=>{let e=()=>pE;return{isServer(){return e()},setIsServer(t){e=t}}})();function bE(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var PE=fE;function _E(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=PE;const i=l=>{t?e.push(l):o(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||s()}return a},batchCalls:l=>(...a)=>{i(()=>{l(...a)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var Ue=_E(),co,Nn,fo,bh,kE=(bh=class extends ql{constructor(){super();ee(this,co,!0);ee(this,Nn);ee(this,fo);W(this,fo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){N(this,Nn)||this.setEventListener(N(this,fo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Nn))==null||t.call(this),W(this,Nn,void 0))}setEventListener(t){var n;W(this,fo,t),(n=N(this,Nn))==null||n.call(this),W(this,Nn,t(this.setOnline.bind(this)))}setOnline(t){N(this,co)!==t&&(W(this,co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return N(this,co)}},co=new WeakMap,Nn=new WeakMap,fo=new WeakMap,bh),yl=new kE;function TE(e){return Math.min(1e3*2**e,3e4)}function cv(e){return(e??"online")==="online"?yl.isOnline():!0}var ic=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dv(e){let t=!1,n=0,r;const o=bE(),i=()=>o.status!=="pending",s=y=>{var x;if(!i()){const v=new ic(y);h(v),(x=e.onCancel)==null||x.call(e,v)}},l=()=>{t=!0},a=()=>{t=!1},u=()=>sv.isFocused()&&(e.networkMode==="always"||yl.isOnline())&&e.canRun(),d=()=>cv(e.networkMode)&&e.canRun(),c=y=>{i()||(r==null||r(),o.resolve(y))},h=y=>{i()||(r==null||r(),o.reject(y))},p=()=>new Promise(y=>{var x;r=v=>{(i()||u())&&y(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),E=()=>{if(i())return;let y;const x=n===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(c).catch(v=>{var b;if(i())return;const g=e.retry??(uv.isServer()?0:3),w=e.retryDelay??TE,S=typeof w=="function"?w(n,v):w,C=g===!0||typeof g=="number"&&nu()?void 0:p()).then(()=>{t?h(v):E()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:l,continueRetry:a,canStart:d,start:()=>(d()?E():p().then(E),o)}}var ur,Ph,fv=(Ph=class{constructor(){ee(this,ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gE(this.gcTime)&&W(this,ur,nc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uv.isServer()?1/0:5*60*1e3))}clearGcTimeout(){N(this,ur)!==void 0&&(nc.clearTimeout(N(this,ur)),W(this,ur,void 0))}},ur=new WeakMap,Ph);function RE(e){return{onFetch:(t,n)=>{var d,c,h,p,E;const r=t.options,o=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const u=async()=>{let y=!1;const x=w=>{CE(w,()=>t.signal,()=>y=!0)},v=av(t.options,t.fetchOptions),g=async(w,S,C)=>{if(y)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const P=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return x(z),z})(),T=await v(P),{maxPages:j}=t.options,A=C?EE:SE;return{pages:A(w.pages,T,j),pageParams:A(w.pageParams,S,j)}};if(o&&i.length){const w=o==="backward",S=w?pv:sc,C={pages:i,pageParams:s},b=S(r,C);l=await g(C,b,w)}else{const w=e??i.length;do{const S=a===0?s[0]??r.initialPageParam:sc(r,l);if(a>0&&S==null)break;l=await g(l,S),a++}while(a{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function sc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pv(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function UN(e,t){return t?sc(e,t)!=null:!1}function BN(e,t){return!t||!e.getPreviousPageParam?!1:pv(e,t)!=null}var po,cr,ho,ut,dr,_e,Ii,fr,et,hv,Gt,_h,NE=(_h=class extends fv{constructor(t){super();ee(this,et);ee(this,po);ee(this,cr);ee(this,ho);ee(this,ut);ee(this,dr);ee(this,_e);ee(this,Ii);ee(this,fr);W(this,fr,!1),W(this,Ii,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,dr,t.client),W(this,ut,N(this,dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,cr,Mp(this.options)),this.state=t.state??N(this,cr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,po)}get promise(){var t;return(t=N(this,_e))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,Ii),...t},t!=null&&t._type&&W(this,po,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mp(this.options);n.data!==void 0&&(this.setState(Np(n.data,n.dataUpdatedAt)),W(this,cr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,ut).remove(this)}setData(t,n){const r=xE(this.state.data,t,this.options);return Me(this,et,Gt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Me(this,et,Gt).call(this,{type:"setState",state:t})}cancel(t){var r,o;const n=(r=N(this,_e))==null?void 0:r.promise;return(o=N(this,_e))==null||o.cancel(t),n?n.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,cr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>vE(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,_e))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,_e))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(N(this,_e)&&(N(this,fr)||Me(this,et,hv).call(this)?N(this,_e).cancel({revert:!0}):N(this,_e).cancelRetry()),this.scheduleGc()),N(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,et,Gt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,c,h,p,E,y,x,v,g,w;if(this.state.fetchStatus!=="idle"&&((u=N(this,_e))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,_e))return N(this,_e).continueRetry(),N(this,_e).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(C=>C.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,o=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(W(this,fr,!0),r.signal)})},i=()=>{const S=av(this.options,n),b=(()=>{const P={client:N(this,dr),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return W(this,fr,!1),this.options.persister?this.options.persister(S,b,this):S(b)},l=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,dr),state:this.state,fetchFn:i};return o(S),S})(),a=N(this,po)==="infinite"?RE(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),W(this,ho,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Me(this,et,Gt).call(this,{type:"fetch",meta:(c=l.fetchOptions)==null?void 0:c.meta}),W(this,_e,dv({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:S=>{S instanceof ic&&S.revert&&this.setState({...N(this,ho),fetchStatus:"idle"}),r.abort()},onFail:(S,C)=>{Me(this,et,Gt).call(this,{type:"failed",failureCount:S,error:C})},onPause:()=>{Me(this,et,Gt).call(this,{type:"pause"})},onContinue:()=>{Me(this,et,Gt).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const S=await N(this,_e).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(h=N(this,ut).config).onSuccess)==null||p.call(h,S,this),(y=(E=N(this,ut).config).onSettled)==null||y.call(E,S,this.state.error,this),S}catch(S){if(S instanceof ic){if(S.silent)return N(this,_e).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw Me(this,et,Gt).call(this,{type:"error",error:S}),(v=(x=N(this,ut).config).onError)==null||v.call(x,S,this),(w=(g=N(this,ut).config).onSettled)==null||w.call(g,this.state.data,S,this),S}finally{this.scheduleGc()}}},po=new WeakMap,cr=new WeakMap,ho=new WeakMap,ut=new WeakMap,dr=new WeakMap,_e=new WeakMap,Ii=new WeakMap,fr=new WeakMap,et=new WeakSet,hv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Gt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ME(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Np(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,ho,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),N(this,ut).notify({query:this,type:"updated",action:t})})},_h);function ME(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Np(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Di,It,De,pr,Dt,Sn,kh,OE=(kh=class extends fv{constructor(t){super();ee(this,Dt);ee(this,Di);ee(this,It);ee(this,De);ee(this,pr);W(this,Di,t.client),this.mutationId=t.mutationId,W(this,De,t.mutationCache),W(this,It,[]),this.state=t.state||AE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,It).includes(t)||(N(this,It).push(t),this.clearGcTimeout(),N(this,De).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,It,N(this,It).filter(n=>n!==t)),this.scheduleGc(),N(this,De).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,It).length||(this.state.status==="pending"?this.scheduleGc():N(this,De).remove(this))}continue(){var t;return((t=N(this,pr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,a,u,d,c,h,p,E,y,x,v,g,w,S,C,b,P;const n=()=>{Me(this,Dt,Sn).call(this,{type:"continue"})},r={client:N(this,Di),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,pr,dv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,j)=>{Me(this,Dt,Sn).call(this,{type:"failed",failureCount:T,error:j})},onPause:()=>{Me(this,Dt,Sn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,De).canRun(this)}));const o=this.state.status==="pending",i=!N(this,pr).canStart();try{if(o)n();else{Me(this,Dt,Sn).call(this,{type:"pending",variables:t,isPaused:i}),N(this,De).config.onMutate&&await N(this,De).config.onMutate(t,this,r);const j=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));j!==this.state.context&&Me(this,Dt,Sn).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const T=await N(this,pr).start();return await((u=(a=N(this,De).config).onSuccess)==null?void 0:u.call(a,T,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,T,t,this.state.context,r)),await((p=(h=N(this,De).config).onSettled)==null?void 0:p.call(h,T,null,this.state.variables,this.state.context,this,r)),await((y=(E=this.options).onSettled)==null?void 0:y.call(E,T,null,t,this.state.context,r)),Me(this,Dt,Sn).call(this,{type:"success",data:T}),T}catch(T){try{await((v=(x=N(this,De).config).onError)==null?void 0:v.call(x,T,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((w=(g=this.options).onError)==null?void 0:w.call(g,T,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((C=(S=N(this,De).config).onSettled)==null?void 0:C.call(S,void 0,T,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((P=(b=this.options).onSettled)==null?void 0:P.call(b,void 0,T,t,this.state.context,r))}catch(j){Promise.reject(j)}throw Me(this,Dt,Sn).call(this,{type:"error",error:T}),T}finally{N(this,De).runNext(this)}}},Di=new WeakMap,It=new WeakMap,De=new WeakMap,pr=new WeakMap,Dt=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ue.batch(()=>{N(this,It).forEach(r=>{r.onMutationUpdate(t)}),N(this,De).notify({mutation:this,type:"updated",action:t})})},kh);function AE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xt,Pt,$i,Th,jE=(Th=class extends ql{constructor(t={}){super();ee(this,Xt);ee(this,Pt);ee(this,$i);this.config=t,W(this,Xt,new Set),W(this,Pt,new Map),W(this,$i,0)}build(t,n,r){const o=new OE({client:t,mutationCache:this,mutationId:++es(this,$i)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){N(this,Xt).add(t);const n=ys(t);if(typeof n=="string"){const r=N(this,Pt).get(n);r?r.push(t):N(this,Pt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Xt).delete(t)){const n=ys(t);if(typeof n=="string"){const r=N(this,Pt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&N(this,Pt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ys(t);if(typeof n=="string"){const r=N(this,Pt).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ys(t);if(typeof n=="string"){const o=(r=N(this,Pt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ue.batch(()=>{N(this,Xt).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Xt).clear(),N(this,Pt).clear()})}getAll(){return Array.from(N(this,Xt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>kp(n,r))}findAll(t={}){return this.getAll().filter(n=>kp(t,n))}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ue.batch(()=>Promise.all(t.map(n=>n.continue().catch(bt))))}},Xt=new WeakMap,Pt=new WeakMap,$i=new WeakMap,Th);function ys(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $t,Rh,LE=(Rh=class extends ql{constructor(t={}){super();ee(this,$t);this.config=t,W(this,$t,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Cd(o,n);let s=this.get(i);return s||(s=new NE({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){N(this,$t).has(t.queryHash)||(N(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=N(this,$t).get(t.queryHash);n&&(t.destroy(),n===t&&N(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,$t).get(t)}getAll(){return[...N(this,$t).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_p(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_p(t,r)):n}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,Rh),we,Mn,On,go,mo,An,vo,yo,Nh,IE=(Nh=class{constructor(e={}){ee(this,we);ee(this,Mn);ee(this,On);ee(this,go);ee(this,mo);ee(this,An);ee(this,vo);ee(this,yo);W(this,we,e.queryCache||new LE),W(this,Mn,e.mutationCache||new jE),W(this,On,e.defaultOptions||{}),W(this,go,new Map),W(this,mo,new Map),W(this,An,0)}mount(){es(this,An)._++,N(this,An)===1&&(W(this,vo,sv.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,we).onFocus())})),W(this,yo,yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,we).onOnline())})))}unmount(){var e,t;es(this,An)._--,N(this,An)===0&&((e=N(this,vo))==null||e.call(this),W(this,vo,void 0),(t=N(this,yo))==null||t.call(this),W(this,yo,void 0))}isFetching(e){return N(this,we).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Mn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,we).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=N(this,we).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return N(this,we).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=N(this,we).get(r.queryHash),i=o==null?void 0:o.state.data,s=hE(t,i);if(s!==void 0)return N(this,we).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ue.batch(()=>N(this,we).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,we).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=N(this,we);Ue.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=N(this,we);return Ue.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ue.batch(()=>N(this,we).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(e,t={}){return Ue.batch(()=>(N(this,we).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ue.batch(()=>N(this,we).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=N(this,we).build(this,t);return n.isStaleByTime(rc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bt).catch(bt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bt).catch(bt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yl.isOnline()?N(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,we)}getMutationCache(){return N(this,Mn)}getDefaultOptions(){return N(this,On)}setDefaultOptions(e){W(this,On,e)}setQueryDefaults(e,t){N(this,go).set(Mi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,go).values()],n={};return t.forEach(r=>{Oi(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){N(this,mo).set(Mi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,mo).values()],n={};return t.forEach(r=>{Oi(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,On).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===bd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,On).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,we).clear(),N(this,Mn).clear()}},we=new WeakMap,Mn=new WeakMap,On=new WeakMap,go=new WeakMap,mo=new WeakMap,An=new WeakMap,vo=new WeakMap,yo=new WeakMap,Nh),gv=f.createContext(void 0),VN=e=>{const t=f.useContext(gv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DE=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(gv.Provider,{value:e,children:t}));const Op=e=>e.endsWith("/")?e.slice(0,-1):e;function Pd(){const e="https://paperswithcode.co".trim();if(!e)return"";try{const t=e.startsWith("http")?new URL(e):new URL(e,typeof window<"u"?window.location.origin:"http://localhost");return Op(t.origin)}catch{return Op(e)}}function io(e){const t=e.startsWith("/")?e:`/${e}`,n=Pd();return n?`${n}${t}`:t}function mv(e){const t=e.startsWith("/")?e:`/${e}`;return io(t)}function WN(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("//"))return e;if(e.startsWith("/")){const t=Pd();return t?`${t}${e}`:e}return e}function Hi(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function vv(){const t=String("0").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function $E(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}const FE="/hf-logo.svg?v=20260513b",Ap=({size:e=14})=>m.jsx("img",{src:FE,alt:"",width:Math.round(e*95/88),height:e,"aria-hidden":"true",draggable:!1,style:{display:"block"}}),yv=({returnTo:e,compact:t=!1})=>{if(Hi())return null;const n=()=>{const r=mv("/api/v1/auth/hf/login"),i=new URL(r,window.location.origin).origin===window.location.origin?e:new URL(e,window.location.origin).toString(),s=`${r}?return_to=${encodeURIComponent(i)}`;window.location.href=s};return t?m.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:n,children:m.jsx(Ap,{size:16})}):m.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:n,"aria-label":"Sign in with Hugging Face",children:[m.jsx(Ap,{size:18}),m.jsx("span",{children:"Sign in"})]})};function zE(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s);l.displayName=i+"Context";const a=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...E}=c,y=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,x=f.useMemo(()=>E,Object.values(E));return m.jsx(y.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[a])||l,E=f.useContext(p);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,UE(o,...t)]}function UE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var vt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function jp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=jp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{let{children:i,...s}=r;wv(i)&&typeof wl=="function"&&(i=wl(i._payload));const l=f.Children.toArray(i),a=l.find(KE);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var HN=xv("Slot");function WE(e){const t=f.forwardRef((n,r)=>{let{children:o,...i}=n;if(wv(o)&&typeof wl=="function"&&(o=wl(o._payload)),f.isValidElement(o)){const s=GE(o),l=qE(i,o.props);return o.type!==f.Fragment&&(l.ref=r?Pr(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HE=Symbol("radix.slottable");function KE(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HE}function qE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function GE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_d=QE.reduce((e,t)=>{const n=xv(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Sv={exports:{}},Ev={};/** + */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function G1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Q1(e,t){return e.button===0&&(!t||t==="_self")&&!G1(e)}function ec(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function Y1(e,t){let n=ec(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const X1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],J1=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Z1="6";try{window.__reactRouterVersion=Z1}catch{}const eE=f.createContext({isTransitioning:!1}),tE="startTransition",vl=kl[tE];function nE(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=s1({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&vl?vl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>rv(r),[r]),f.createElement(ov,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}function rE(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=l1({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&vl?vl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>rv(r),[r]),f.createElement(ov,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const oE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zr=f.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:d,viewTransition:c}=t,h=iv(t,X1),{basename:p}=f.useContext(un),E,y=!1;if(typeof u=="string"&&iE.test(u)&&(E=u,oE))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=Po(S.pathname,p);S.origin===w.origin&&C!=null?u=C+S.search+S.hash:y=!0}catch{}let x=O1(u,{relative:o}),v=lE(u,{replace:s,state:l,target:a,preventScrollReset:d,relative:o,viewTransition:c});function g(w){r&&r(w),w.defaultPrevented||v(w)}return f.createElement("a",ml({},h,{href:E||x,onClick:y||i?r:g,ref:n,target:a}))}),Ir=f.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:l,to:a,viewTransition:u,children:d}=t,c=iv(t,J1),h=Kl(a,{relative:c.relative}),p=dn(),E=f.useContext(Xm),{navigator:y,basename:x}=f.useContext(un),v=E!=null&&aE(h)&&u===!0,g=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,w=p.pathname,S=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;o||(w=w.toLowerCase(),S=S?S.toLowerCase():null,g=g.toLowerCase()),S&&x&&(S=Po(S,x)||S);const C=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let b=w===g||!s&&w.startsWith(g)&&w.charAt(C)==="/",_=S!=null&&(S===g||!s&&S.startsWith(g)&&S.charAt(g.length)==="/"),T={isActive:b,isPending:_,isTransitioning:v},j=b?r:void 0,A;typeof i=="function"?A=i(T):A=[i,b?"active":null,_?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(T):l;return f.createElement(zr,ml({},c,{"aria-current":j,className:A,ref:n,style:z,to:a,viewTransition:u}),typeof d=="function"?d(T):d)});var tc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tc||(tc={}));var _p;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(_p||(_p={}));function sE(e){let t=f.useContext(Wl);return t||ge(!1),t}function lE(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}=t===void 0?{}:t,a=Sd(),u=dn(),d=Kl(e,{relative:s});return f.useCallback(c=>{if(Q1(c,n)){c.preventDefault();let h=r!==void 0?r:Ri(u)===Ri(d);a(e,{replace:h,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[u,a,d,r,o,n,e,i,s,l])}function $N(e){let t=f.useRef(ec(e)),n=f.useRef(!1),r=dn(),o=f.useMemo(()=>Y1(r.search,n.current?null:t.current),[r.search]),i=Sd(),s=f.useCallback((l,a)=>{const u=ec(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,a)},[i,o]);return[o,s]}function aE(e,t){t===void 0&&(t={});let n=f.useContext(eE);n==null&&ge(!1);let{basename:r}=sE(tc.useViewTransitionState),o=Kl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Po(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Po(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ju(o.pathname,s)!=null||Ju(o.pathname,i)!=null}var ql=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ar,Tn,uo,Eh,uE=(Eh=class extends ql{constructor(){super();ee(this,ar);ee(this,Tn);ee(this,uo);W(this,uo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Tn)||this.setEventListener(N(this,uo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Tn))==null||t.call(this),W(this,Tn,void 0))}setEventListener(t){var n;W(this,uo,t),(n=N(this,Tn))==null||n.call(this),W(this,Tn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){N(this,ar)!==t&&(W(this,ar,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof N(this,ar)=="boolean"?N(this,ar):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ar=new WeakMap,Tn=new WeakMap,uo=new WeakMap,Eh),sv=new uE,cE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Rn,Ec,Ch,dE=(Ch=class{constructor(){ee(this,Rn,cE);ee(this,Ec,!1)}setTimeoutProvider(e){W(this,Rn,e)}setTimeout(e,t){return N(this,Rn).setTimeout(e,t)}clearTimeout(e){N(this,Rn).clearTimeout(e)}setInterval(e,t){return N(this,Rn).setInterval(e,t)}clearInterval(e){N(this,Rn).clearInterval(e)}},Rn=new WeakMap,Ec=new WeakMap,Ch),nc=new dE;function fE(e){setTimeout(e,0)}var pE=typeof window>"u"||"Deno"in globalThis;function bt(){}function hE(e,t){return typeof e=="function"?e(t):e}function gE(e){return typeof e=="number"&&e>=0&&e!==1/0}function mE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rc(e,t){return typeof e=="function"?e(t):e}function vE(e,t){return typeof e=="function"?e(t):e}function Pp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==Cd(s,t.options))return!1}else if(!Oi(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function kp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Mi(t.options.mutationKey)!==Mi(i))return!1}else if(!Oi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Cd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mi)(e)}function Mi(e){return JSON.stringify(e,(t,n)=>oc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Oi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Oi(e[n],t[n])):!1}var yE=Object.prototype.hasOwnProperty;function lv(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Tp(e)&&Tp(t);if(!r&&!(oc(e)&&oc(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,a=r?new Array(l):{};let u=0;for(let d=0;d{nc.setTimeout(t,e)})}function xE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?lv(e,t):t}function zN(e){return e}function SE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function EE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bd=Symbol();function av(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function UN(e,t){return typeof e=="function"?e(...t):!!e}function CE(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var uv=(()=>{let e=()=>pE;return{isServer(){return e()},setIsServer(t){e=t}}})();function bE(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var _E=fE;function PE(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=_E;const i=l=>{t?e.push(l):o(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||s()}return a},batchCalls:l=>(...a)=>{i(()=>{l(...a)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var Ue=PE(),co,Nn,fo,bh,kE=(bh=class extends ql{constructor(){super();ee(this,co,!0);ee(this,Nn);ee(this,fo);W(this,fo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){N(this,Nn)||this.setEventListener(N(this,fo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Nn))==null||t.call(this),W(this,Nn,void 0))}setEventListener(t){var n;W(this,fo,t),(n=N(this,Nn))==null||n.call(this),W(this,Nn,t(this.setOnline.bind(this)))}setOnline(t){N(this,co)!==t&&(W(this,co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return N(this,co)}},co=new WeakMap,Nn=new WeakMap,fo=new WeakMap,bh),yl=new kE;function TE(e){return Math.min(1e3*2**e,3e4)}function cv(e){return(e??"online")==="online"?yl.isOnline():!0}var ic=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dv(e){let t=!1,n=0,r;const o=bE(),i=()=>o.status!=="pending",s=y=>{var x;if(!i()){const v=new ic(y);h(v),(x=e.onCancel)==null||x.call(e,v)}},l=()=>{t=!0},a=()=>{t=!1},u=()=>sv.isFocused()&&(e.networkMode==="always"||yl.isOnline())&&e.canRun(),d=()=>cv(e.networkMode)&&e.canRun(),c=y=>{i()||(r==null||r(),o.resolve(y))},h=y=>{i()||(r==null||r(),o.reject(y))},p=()=>new Promise(y=>{var x;r=v=>{(i()||u())&&y(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),E=()=>{if(i())return;let y;const x=n===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(c).catch(v=>{var b;if(i())return;const g=e.retry??(uv.isServer()?0:3),w=e.retryDelay??TE,S=typeof w=="function"?w(n,v):w,C=g===!0||typeof g=="number"&&nu()?void 0:p()).then(()=>{t?h(v):E()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:l,continueRetry:a,canStart:d,start:()=>(d()?E():p().then(E),o)}}var ur,_h,fv=(_h=class{constructor(){ee(this,ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gE(this.gcTime)&&W(this,ur,nc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uv.isServer()?1/0:5*60*1e3))}clearGcTimeout(){N(this,ur)!==void 0&&(nc.clearTimeout(N(this,ur)),W(this,ur,void 0))}},ur=new WeakMap,_h);function RE(e){return{onFetch:(t,n)=>{var d,c,h,p,E;const r=t.options,o=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const u=async()=>{let y=!1;const x=w=>{CE(w,()=>t.signal,()=>y=!0)},v=av(t.options,t.fetchOptions),g=async(w,S,C)=>{if(y)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return x(z),z})(),T=await v(_),{maxPages:j}=t.options,A=C?EE:SE;return{pages:A(w.pages,T,j),pageParams:A(w.pageParams,S,j)}};if(o&&i.length){const w=o==="backward",S=w?pv:sc,C={pages:i,pageParams:s},b=S(r,C);l=await g(C,b,w)}else{const w=e??i.length;do{const S=a===0?s[0]??r.initialPageParam:sc(r,l);if(a>0&&S==null)break;l=await g(l,S),a++}while(a{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function sc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pv(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function BN(e,t){return t?sc(e,t)!=null:!1}function VN(e,t){return!t||!e.getPreviousPageParam?!1:pv(e,t)!=null}var po,cr,ho,ut,dr,Pe,Ii,fr,et,hv,Gt,Ph,NE=(Ph=class extends fv{constructor(t){super();ee(this,et);ee(this,po);ee(this,cr);ee(this,ho);ee(this,ut);ee(this,dr);ee(this,Pe);ee(this,Ii);ee(this,fr);W(this,fr,!1),W(this,Ii,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,dr,t.client),W(this,ut,N(this,dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,cr,Mp(this.options)),this.state=t.state??N(this,cr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,po)}get promise(){var t;return(t=N(this,Pe))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,Ii),...t},t!=null&&t._type&&W(this,po,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mp(this.options);n.data!==void 0&&(this.setState(Np(n.data,n.dataUpdatedAt)),W(this,cr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,ut).remove(this)}setData(t,n){const r=xE(this.state.data,t,this.options);return Me(this,et,Gt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Me(this,et,Gt).call(this,{type:"setState",state:t})}cancel(t){var r,o;const n=(r=N(this,Pe))==null?void 0:r.promise;return(o=N(this,Pe))==null||o.cancel(t),n?n.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,cr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>vE(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,Pe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,Pe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(N(this,Pe)&&(N(this,fr)||Me(this,et,hv).call(this)?N(this,Pe).cancel({revert:!0}):N(this,Pe).cancelRetry()),this.scheduleGc()),N(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,et,Gt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,c,h,p,E,y,x,v,g,w;if(this.state.fetchStatus!=="idle"&&((u=N(this,Pe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,Pe))return N(this,Pe).continueRetry(),N(this,Pe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(C=>C.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,o=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(W(this,fr,!0),r.signal)})},i=()=>{const S=av(this.options,n),b=(()=>{const _={client:N(this,dr),queryKey:this.queryKey,meta:this.meta};return o(_),_})();return W(this,fr,!1),this.options.persister?this.options.persister(S,b,this):S(b)},l=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,dr),state:this.state,fetchFn:i};return o(S),S})(),a=N(this,po)==="infinite"?RE(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),W(this,ho,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Me(this,et,Gt).call(this,{type:"fetch",meta:(c=l.fetchOptions)==null?void 0:c.meta}),W(this,Pe,dv({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:S=>{S instanceof ic&&S.revert&&this.setState({...N(this,ho),fetchStatus:"idle"}),r.abort()},onFail:(S,C)=>{Me(this,et,Gt).call(this,{type:"failed",failureCount:S,error:C})},onPause:()=>{Me(this,et,Gt).call(this,{type:"pause"})},onContinue:()=>{Me(this,et,Gt).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const S=await N(this,Pe).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(h=N(this,ut).config).onSuccess)==null||p.call(h,S,this),(y=(E=N(this,ut).config).onSettled)==null||y.call(E,S,this.state.error,this),S}catch(S){if(S instanceof ic){if(S.silent)return N(this,Pe).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw Me(this,et,Gt).call(this,{type:"error",error:S}),(v=(x=N(this,ut).config).onError)==null||v.call(x,S,this),(w=(g=N(this,ut).config).onSettled)==null||w.call(g,this.state.data,S,this),S}finally{this.scheduleGc()}}},po=new WeakMap,cr=new WeakMap,ho=new WeakMap,ut=new WeakMap,dr=new WeakMap,Pe=new WeakMap,Ii=new WeakMap,fr=new WeakMap,et=new WeakSet,hv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Gt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ME(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Np(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,ho,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),N(this,ut).notify({query:this,type:"updated",action:t})})},Ph);function ME(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Np(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Di,It,De,pr,Dt,Sn,kh,OE=(kh=class extends fv{constructor(t){super();ee(this,Dt);ee(this,Di);ee(this,It);ee(this,De);ee(this,pr);W(this,Di,t.client),this.mutationId=t.mutationId,W(this,De,t.mutationCache),W(this,It,[]),this.state=t.state||AE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,It).includes(t)||(N(this,It).push(t),this.clearGcTimeout(),N(this,De).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,It,N(this,It).filter(n=>n!==t)),this.scheduleGc(),N(this,De).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,It).length||(this.state.status==="pending"?this.scheduleGc():N(this,De).remove(this))}continue(){var t;return((t=N(this,pr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,a,u,d,c,h,p,E,y,x,v,g,w,S,C,b,_;const n=()=>{Me(this,Dt,Sn).call(this,{type:"continue"})},r={client:N(this,Di),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,pr,dv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,j)=>{Me(this,Dt,Sn).call(this,{type:"failed",failureCount:T,error:j})},onPause:()=>{Me(this,Dt,Sn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,De).canRun(this)}));const o=this.state.status==="pending",i=!N(this,pr).canStart();try{if(o)n();else{Me(this,Dt,Sn).call(this,{type:"pending",variables:t,isPaused:i}),N(this,De).config.onMutate&&await N(this,De).config.onMutate(t,this,r);const j=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));j!==this.state.context&&Me(this,Dt,Sn).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const T=await N(this,pr).start();return await((u=(a=N(this,De).config).onSuccess)==null?void 0:u.call(a,T,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,T,t,this.state.context,r)),await((p=(h=N(this,De).config).onSettled)==null?void 0:p.call(h,T,null,this.state.variables,this.state.context,this,r)),await((y=(E=this.options).onSettled)==null?void 0:y.call(E,T,null,t,this.state.context,r)),Me(this,Dt,Sn).call(this,{type:"success",data:T}),T}catch(T){try{await((v=(x=N(this,De).config).onError)==null?void 0:v.call(x,T,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((w=(g=this.options).onError)==null?void 0:w.call(g,T,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((C=(S=N(this,De).config).onSettled)==null?void 0:C.call(S,void 0,T,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((_=(b=this.options).onSettled)==null?void 0:_.call(b,void 0,T,t,this.state.context,r))}catch(j){Promise.reject(j)}throw Me(this,Dt,Sn).call(this,{type:"error",error:T}),T}finally{N(this,De).runNext(this)}}},Di=new WeakMap,It=new WeakMap,De=new WeakMap,pr=new WeakMap,Dt=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ue.batch(()=>{N(this,It).forEach(r=>{r.onMutationUpdate(t)}),N(this,De).notify({mutation:this,type:"updated",action:t})})},kh);function AE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xt,_t,$i,Th,jE=(Th=class extends ql{constructor(t={}){super();ee(this,Xt);ee(this,_t);ee(this,$i);this.config=t,W(this,Xt,new Set),W(this,_t,new Map),W(this,$i,0)}build(t,n,r){const o=new OE({client:t,mutationCache:this,mutationId:++es(this,$i)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){N(this,Xt).add(t);const n=ys(t);if(typeof n=="string"){const r=N(this,_t).get(n);r?r.push(t):N(this,_t).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Xt).delete(t)){const n=ys(t);if(typeof n=="string"){const r=N(this,_t).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&N(this,_t).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ys(t);if(typeof n=="string"){const r=N(this,_t).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ys(t);if(typeof n=="string"){const o=(r=N(this,_t).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ue.batch(()=>{N(this,Xt).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Xt).clear(),N(this,_t).clear()})}getAll(){return Array.from(N(this,Xt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>kp(n,r))}findAll(t={}){return this.getAll().filter(n=>kp(t,n))}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ue.batch(()=>Promise.all(t.map(n=>n.continue().catch(bt))))}},Xt=new WeakMap,_t=new WeakMap,$i=new WeakMap,Th);function ys(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $t,Rh,LE=(Rh=class extends ql{constructor(t={}){super();ee(this,$t);this.config=t,W(this,$t,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Cd(o,n);let s=this.get(i);return s||(s=new NE({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){N(this,$t).has(t.queryHash)||(N(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=N(this,$t).get(t.queryHash);n&&(t.destroy(),n===t&&N(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,$t).get(t)}getAll(){return[...N(this,$t).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Pp(t,r)):n}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,Rh),we,Mn,On,go,mo,An,vo,yo,Nh,IE=(Nh=class{constructor(e={}){ee(this,we);ee(this,Mn);ee(this,On);ee(this,go);ee(this,mo);ee(this,An);ee(this,vo);ee(this,yo);W(this,we,e.queryCache||new LE),W(this,Mn,e.mutationCache||new jE),W(this,On,e.defaultOptions||{}),W(this,go,new Map),W(this,mo,new Map),W(this,An,0)}mount(){es(this,An)._++,N(this,An)===1&&(W(this,vo,sv.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,we).onFocus())})),W(this,yo,yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,we).onOnline())})))}unmount(){var e,t;es(this,An)._--,N(this,An)===0&&((e=N(this,vo))==null||e.call(this),W(this,vo,void 0),(t=N(this,yo))==null||t.call(this),W(this,yo,void 0))}isFetching(e){return N(this,we).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Mn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,we).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=N(this,we).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return N(this,we).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=N(this,we).get(r.queryHash),i=o==null?void 0:o.state.data,s=hE(t,i);if(s!==void 0)return N(this,we).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ue.batch(()=>N(this,we).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,we).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=N(this,we);Ue.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=N(this,we);return Ue.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ue.batch(()=>N(this,we).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(e,t={}){return Ue.batch(()=>(N(this,we).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ue.batch(()=>N(this,we).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=N(this,we).build(this,t);return n.isStaleByTime(rc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bt).catch(bt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bt).catch(bt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yl.isOnline()?N(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,we)}getMutationCache(){return N(this,Mn)}getDefaultOptions(){return N(this,On)}setDefaultOptions(e){W(this,On,e)}setQueryDefaults(e,t){N(this,go).set(Mi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,go).values()],n={};return t.forEach(r=>{Oi(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){N(this,mo).set(Mi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,mo).values()],n={};return t.forEach(r=>{Oi(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,On).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===bd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,On).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,we).clear(),N(this,Mn).clear()}},we=new WeakMap,Mn=new WeakMap,On=new WeakMap,go=new WeakMap,mo=new WeakMap,An=new WeakMap,vo=new WeakMap,yo=new WeakMap,Nh),gv=f.createContext(void 0),WN=e=>{const t=f.useContext(gv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DE=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(gv.Provider,{value:e,children:t}));const Op=e=>e.endsWith("/")?e.slice(0,-1):e;function _d(){const e="https://paperswithcode.co".trim();if(!e)return"";try{const t=e.startsWith("http")?new URL(e):new URL(e,typeof window<"u"?window.location.origin:"http://localhost");return Op(t.origin)}catch{return Op(e)}}function io(e){const t=e.startsWith("/")?e:`/${e}`,n=_d();return n?`${n}${t}`:t}function mv(e){const t=e.startsWith("/")?e:`/${e}`;return io(t)}function HN(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("//"))return e;if(e.startsWith("/")){const t=_d();return t?`${t}${e}`:e}return e}function Hi(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function vv(){const t=String("0").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function $E(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}const FE="/hf-logo.svg?v=20260513b",Ap=({size:e=14})=>m.jsx("img",{src:FE,alt:"",width:Math.round(e*95/88),height:e,"aria-hidden":"true",draggable:!1,style:{display:"block"}}),yv=({returnTo:e,compact:t=!1})=>{if(Hi())return null;const n=()=>{const r=mv("/api/v1/auth/hf/login"),i=new URL(r,window.location.origin).origin===window.location.origin?e:new URL(e,window.location.origin).toString(),s=`${r}?return_to=${encodeURIComponent(i)}`;window.location.href=s};return t?m.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:n,children:m.jsx(Ap,{size:16})}):m.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:n,"aria-label":"Sign in with Hugging Face",children:[m.jsx(Ap,{size:18}),m.jsx("span",{children:"Sign in"})]})};function zE(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s);l.displayName=i+"Context";const a=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...E}=c,y=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,x=f.useMemo(()=>E,Object.values(E));return m.jsx(y.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[a])||l,E=f.useContext(p);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,UE(o,...t)]}function UE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var vt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function jp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _r(...e){return t=>{let n=!1;const r=e.map(o=>{const i=jp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{let{children:i,...s}=r;wv(i)&&typeof wl=="function"&&(i=wl(i._payload));const l=f.Children.toArray(i),a=l.find(KE);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var KN=xv("Slot");function WE(e){const t=f.forwardRef((n,r)=>{let{children:o,...i}=n;if(wv(o)&&typeof wl=="function"&&(o=wl(o._payload)),f.isValidElement(o)){const s=GE(o),l=qE(i,o.props);return o.type!==f.Fragment&&(l.ref=r?_r(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HE=Symbol("radix.slottable");function KE(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HE}function qE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function GE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pd=QE.reduce((e,t)=>{const n=xv(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Sv={exports:{}},Ev={};/** * @license React * use-sync-external-store-shim.production.js * @@ -73,8 +73,8 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ko=f;function YE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XE=typeof Object.is=="function"?Object.is:YE,JE=ko.useState,ZE=ko.useEffect,eC=ko.useLayoutEffect,tC=ko.useDebugValue;function nC(e,t){var n=t(),r=JE({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return eC(function(){o.value=n,o.getSnapshot=t,Va(o)&&i({inst:o})},[e,n,t]),ZE(function(){return Va(o)&&i({inst:o}),e(function(){Va(o)&&i({inst:o})})},[e]),tC(n),n}function Va(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XE(e,n)}catch{return!0}}function rC(e,t){return t()}var oC=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rC:nC;Ev.useSyncExternalStore=ko.useSyncExternalStore!==void 0?ko.useSyncExternalStore:oC;Sv.exports=Ev;var iC=Sv.exports;function sC(){return iC.useSyncExternalStore(lC,()=>!0,()=>!1)}function lC(){return()=>{}}var kd="Avatar",[aC]=zE(kd),[uC,Cv]=aC(kd),bv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=f.useState("idle");return m.jsx(uC,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:m.jsx(_d.span,{...r,ref:t})})});bv.displayName=kd;var Pv="AvatarImage",_v=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,s=Cv(Pv,n),l=cC(r,i),a=Je(u=>{o(u),s.onImageLoadingStatusChange(u)});return vt(()=>{l!=="idle"&&a(l)},[l,a]),l==="loaded"?m.jsx(_d.img,{...i,ref:t,src:r}):null});_v.displayName=Pv;var kv="AvatarFallback",Tv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Cv(kv,n),[s,l]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const a=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(a)}},[r]),s&&i.imageLoadingStatus!=="loaded"?m.jsx(_d.span,{...o,ref:t}):null});Tv.displayName=kv;function Lp(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cC(e,{referrerPolicy:t,crossOrigin:n}){const r=sC(),o=f.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=f.useState(()=>Lp(i,e));return vt(()=>{l(Lp(i,e))},[i,e]),vt(()=>{const a=c=>()=>{l(c)};if(!i)return;const u=a("loaded"),d=a("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),s}var Rv=bv,Nv=_v,Mv=Tv;function Ov(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=pC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Td);return l[0]===""&&l.length!==1&&l.shift(),jv(l,t)||fC(s)},getConflictingClassGroupIds:(s,l)=>{const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}}},jv=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jv(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Td);return(s=t.validators.find(({validator:l})=>l(i)))==null?void 0:s.classGroupId},Ip=/^\[(.+)\]$/,fC=e=>{if(Ip.test(e)){const t=Ip.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pC=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gC(Object.entries(e.classGroups),n).forEach(([i,s])=>{lc(s,r,i,t)}),r},lc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(hC(o)){lc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{lc(s,Dp(t,i),n,r)})})},Dp=(e,t)=>{let n=e;return t.split(Td).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hC=e=>e.isThemeGetter,gC=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e,mC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Lv="!",vC=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=l=>{const a=[];let u=0,d=0,c;for(let x=0;xd?c-d:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:E,maybePostfixModifierPosition:y}};return n?l=>n({className:l,parseClassName:s}):s},yC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},wC=e=>({cache:mC(e.cacheSize),parseClassName:vC(e),...dC(e)}),xC=/\s+/,SC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(xC);let l="";for(let a=s.length-1;a>=0;a-=1){const u=s[a],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let E=!!p,y=r(E?h.substring(0,p):h);if(!y){if(!E){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}E=!1}const x=yC(d).join(":"),v=c?x+Lv:x,g=v+y;if(i.includes(g))continue;i.push(g);const w=o(y,E);for(let S=0;S0?" "+l:l)}return l};function EC(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(d),e());return n=wC(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const d=SC(a,n);return o(a,d),d}return function(){return i(EC.apply(null,arguments))}}const se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Dv=/^\[(?:([a-z-]+):)?(.+)\]$/i,bC=/^\d+\/\d+$/,PC=new Set(["px","full","screen"]),_C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,RC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>so(e)||PC.has(e)||bC.test(e),wn=e=>jo(e,"length",$C),so=e=>!!e&&!Number.isNaN(Number(e)),Wa=e=>jo(e,"number",so),qo=e=>!!e&&Number.isInteger(Number(e)),MC=e=>e.endsWith("%")&&so(e.slice(0,-1)),Q=e=>Dv.test(e),xn=e=>_C.test(e),OC=new Set(["length","size","percentage"]),AC=e=>jo(e,OC,$v),jC=e=>jo(e,"position",$v),LC=new Set(["image","url"]),IC=e=>jo(e,LC,zC),DC=e=>jo(e,"",FC),Go=()=>!0,jo=(e,t,n)=>{const r=Dv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},$C=e=>kC.test(e)&&!TC.test(e),$v=()=>!1,FC=e=>RC.test(e),zC=e=>NC.test(e),UC=()=>{const e=se("colors"),t=se("spacing"),n=se("blur"),r=se("brightness"),o=se("borderColor"),i=se("borderRadius"),s=se("borderSpacing"),l=se("borderWidth"),a=se("contrast"),u=se("grayscale"),d=se("hueRotate"),c=se("invert"),h=se("gap"),p=se("gradientColorStops"),E=se("gradientColorStopPositions"),y=se("inset"),x=se("margin"),v=se("opacity"),g=se("padding"),w=se("saturate"),S=se("scale"),C=se("sepia"),b=se("skew"),P=se("space"),T=se("translate"),j=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Q,t],D=()=>[Q,t],K=()=>["",qt,wn],I=()=>["auto",so,Q],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",Q],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[so,Q];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[qt,wn],blur:["none","",xn,Q],brightness:B(),borderColor:[e],borderRadius:["none","","full",xn,Q],borderSpacing:D(),borderWidth:K(),contrast:B(),grayscale:k(),hueRotate:B(),invert:k(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[MC,wn],inset:z(),margin:z(),opacity:B(),padding:D(),saturate:B(),scale:B(),sepia:k(),skew:B(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[xn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Q]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qo,Q]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",qo,Q]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",qo,Q]},Q]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[qo,Q]},Q]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[xn]},xn]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wa]}],"font-family":[{font:[Go]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",so,Wa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qt,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qt,wn]}],"underline-offset":[{"underline-offset":["auto",qt,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),jC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",AC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:U()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[qt,Q]}],"outline-w":[{outline:[qt,wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[qt,wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xn,DC]}],"shadow-color":[{shadow:[Go]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",xn,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[qo,Q]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qt,wn,Wa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BC=CC(UC);function Ne(...e){return BC(Av(e))}function KN(e){const t=e.trim(),n=t.match(/^(\d{4})-(\d{4,5})(v\d+)?$/);if(n)return`${n[1]}.${n[2]}`;const r=t.match(/^(\d{4}\.\d{4,5})(v\d+)$/);return r?r[1]:t}function qN(e){if(e==null||e==="")return"—";const t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=10?t.toFixed(1):t.toFixed(2):String(e)}const Fv=f.forwardRef(({className:e,...t},n)=>m.jsx(Rv,{ref:n,className:Ne("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fv.displayName=Rv.displayName;const zv=f.forwardRef(({className:e,...t},n)=>m.jsx(Nv,{ref:n,className:Ne("aspect-square h-full w-full",e),...t}));zv.displayName=Nv.displayName;const Uv=f.forwardRef(({className:e,...t},n)=>m.jsx(Mv,{ref:n,className:Ne("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Uv.displayName=Mv.displayName;function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function GN(e,t){const n=f.createContext(t),r=i=>{const{children:s,...l}=i,a=f.useMemo(()=>l,Object.values(l));return m.jsx(n.Provider,{value:a,children:s})};r.displayName=e+"Provider";function o(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function _r(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s),a=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...E}=c,y=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,x=f.useMemo(()=>E,Object.values(E));return m.jsx(y.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[a])||l,E=f.useContext(p);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,VC(o,...t)]}function VC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var WC=kl[" useInsertionEffect ".trim().toString()]||vt;function Rd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=HC({defaultProp:t,onChange:n}),l=e!==void 0,a=l?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const c=d.current;c!==l&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=f.useCallback(d=>{var c;if(l){const h=KC(d)?d(e):d;h!==e&&((c=s.current)==null||c.call(s,h))}else i(d)},[l,e,i,s]);return[a,u]}function HC({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return WC(()=>{i.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function KC(e){return typeof e=="function"}function qC(e){const t=GC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(YC);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function GC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=JC(o),l=XC(i,o.props);return o.type!==f.Fragment&&(l.ref=r?Pr(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QC=Symbol("radix.slottable");function YC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QC}function XC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function JC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=ZC.reduce((e,t)=>{const n=qC(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nd(e,t){e&&Wi.flushSync(()=>e.dispatchEvent(t))}function $p(e){const t=eb(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(nb);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function eb(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=ob(o),l=rb(i,o.props);return o.type!==f.Fragment&&(l.ref=r?Pr(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tb=Symbol("radix.slottable");function nb(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tb}function rb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ob(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Md(e){const t=e+"CollectionProvider",[n,r]=_r(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:x,children:v}=y,g=R.useRef(null),w=R.useRef(new Map).current;return m.jsx(o,{scope:x,itemMap:w,collectionRef:g,children:v})};s.displayName=t;const l=e+"CollectionSlot",a=$p(l),u=R.forwardRef((y,x)=>{const{scope:v,children:g}=y,w=i(l,v),S=Re(x,w.collectionRef);return m.jsx(a,{ref:S,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",c="data-radix-collection-item",h=$p(d),p=R.forwardRef((y,x)=>{const{scope:v,children:g,...w}=y,S=R.useRef(null),C=Re(x,S),b=i(d,v);return R.useEffect(()=>(b.itemMap.set(S,{ref:S,...w}),()=>void b.itemMap.delete(S))),m.jsx(h,{[c]:"",ref:C,children:g})});p.displayName=d;function E(y){const x=i(e+"CollectionConsumer",y);return R.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((b,P)=>w.indexOf(b.ref.current)-w.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},E,r]}var ib=f.createContext(void 0);function Bv(e){const t=f.useContext(ib);return e||t||"ltr"}function sb(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var lb="DismissableLayer",ac="dismissableLayer.update",ab="dismissableLayer.pointerDownOutside",ub="dismissableLayer.focusOutside",Fp,Vv=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gl=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...a}=e,u=f.useContext(Vv),[d,c]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),E=Re(t,P=>c(P)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(x),g=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,C=db(P=>{const T=P.target,j=[...u.branches].some(A=>A.contains(T));!S||j||(o==null||o(P),s==null||s(P),P.defaultPrevented||l==null||l())},h),b=fb(P=>{const T=P.target;[...u.branches].some(A=>A.contains(T))||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},h);return sb(P=>{g===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},h),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Fp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),zp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fp)}},[d,h,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),zp())},[d,u]),f.useEffect(()=>{const P=()=>p({});return document.addEventListener(ac,P),()=>document.removeEventListener(ac,P)},[]),m.jsx(ve.div,{...a,ref:E,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,b.onFocusCapture),onBlurCapture:V(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Gl.displayName=lb;var cb="DismissableLayerBranch",Wv=f.forwardRef((e,t)=>{const n=f.useContext(Vv),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(ve.div,{...e,ref:o})});Wv.displayName=cb;function db(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let a=function(){Hv(ab,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fb(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Hv(ub,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zp(){const e=new CustomEvent(ac);document.dispatchEvent(e)}function Hv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nd(o,i):o.dispatchEvent(i)}var pb=Gl,hb=Wv,Ha=0;function gb(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Up()),document.body.insertAdjacentElement("beforeend",e[1]??Up()),Ha++,()=>{Ha===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ha--}},[])}function Up(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ka="focusScope.autoFocusOnMount",qa="focusScope.autoFocusOnUnmount",Bp={bubbles:!1,cancelable:!0},mb="FocusScope",Kv=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=f.useState(null),u=Je(o),d=Je(i),c=f.useRef(null),h=Re(t,y=>a(y)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let y=function(w){if(p.paused||!l)return;const S=w.target;l.contains(S)?c.current=S:En(c.current,{select:!0})},x=function(w){if(p.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||En(c.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&En(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",x);const g=new MutationObserver(v);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),g.disconnect()}}},[r,l,p.paused]),f.useEffect(()=>{if(l){Wp.add(p);const y=document.activeElement;if(!l.contains(y)){const v=new CustomEvent(Ka,Bp);l.addEventListener(Ka,u),l.dispatchEvent(v),v.defaultPrevented||(vb(Eb(qv(l)),{select:!0}),document.activeElement===y&&En(l))}return()=>{l.removeEventListener(Ka,u),setTimeout(()=>{const v=new CustomEvent(qa,Bp);l.addEventListener(qa,d),l.dispatchEvent(v),v.defaultPrevented||En(y??document.body,{select:!0}),l.removeEventListener(qa,d),Wp.remove(p)},0)}}},[l,u,d,p]);const E=f.useCallback(y=>{if(!n&&!r||p.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(x&&v){const g=y.currentTarget,[w,S]=yb(g);w&&S?!y.shiftKey&&v===S?(y.preventDefault(),n&&En(w,{select:!0})):y.shiftKey&&v===w&&(y.preventDefault(),n&&En(S,{select:!0})):v===g&&y.preventDefault()}},[n,r,p.paused]);return m.jsx(ve.div,{tabIndex:-1,...s,ref:h,onKeyDown:E})});Kv.displayName=mb;function vb(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function yb(e){const t=qv(e),n=Vp(t,e),r=Vp(t.reverse(),e);return[n,r]}function qv(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 Vp(e,t){for(const n of e)if(!wb(n,{upTo:t}))return n}function wb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xb(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xb(e)&&t&&e.select()}}var Wp=Sb();function Sb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hp(e,t),e.unshift(t)},remove(t){var n;e=Hp(e,t),(n=e[0])==null||n.resume()}}}function Hp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eb(e){return e.filter(t=>t.tagName!=="A")}var Cb=kl[" useId ".trim().toString()]||(()=>{}),bb=0;function uc(e){const[t,n]=f.useState(Cb());return vt(()=>{n(r=>r??String(bb++))},[e]),t?`radix-${t}`:""}const Pb=["top","right","bottom","left"],Qn=Math.min,tt=Math.max,xl=Math.round,ws=Math.floor,Wt=e=>({x:e,y:e}),_b={left:"right",right:"left",bottom:"top",top:"bottom"};function cc(e,t,n){return tt(e,Qn(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function Lo(e){return e.split("-")[1]}function Od(e){return e==="x"?"y":"x"}function Ad(e){return e==="y"?"height":"width"}function Ut(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jd(e){return Od(Ut(e))}function kb(e,t,n){n===void 0&&(n=!1);const r=Lo(e),o=jd(e),i=Ad(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sl(s)),[s,Sl(s)]}function Tb(e){const t=Sl(e);return[dc(e),t,dc(t)]}function dc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Kp=["left","right"],qp=["right","left"],Rb=["top","bottom"],Nb=["bottom","top"];function Mb(e,t,n){switch(e){case"top":case"bottom":return n?t?qp:Kp:t?Kp:qp;case"left":case"right":return t?Rb:Nb;default:return[]}}function Ob(e,t,n,r){const o=Lo(e);let i=Mb(ln(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(dc)))),i}function Sl(e){const t=ln(e);return _b[t]+e.slice(t.length)}function Ab(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gv(e){return typeof e!="number"?Ab(e):{top:e,right:e,bottom:e,left:e}}function El(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gp(e,t,n){let{reference:r,floating:o}=e;const i=Ut(t),s=jd(t),l=Ad(s),a=ln(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(a){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-o.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Lo(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}async function jb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=sn(t,e),E=Gv(p),x=l[h?c==="floating"?"reference":"floating":c],v=El(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:a})),g=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=El(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:w,strategy:a}):g);return{top:(v.top-C.top+E.top)/S.y,bottom:(C.bottom-v.bottom+E.bottom)/S.y,left:(v.left-C.left+E.left)/S.x,right:(C.right-v.right+E.right)/S.x}}const Lb=50,Ib=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:jb},a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Gp(u,r,a),h=r,p=0;const E={};for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:d=0}=sn(e,t)||{};if(u==null)return{};const c=Gv(d),h={x:n,y:r},p=jd(o),E=Ad(p),y=await s.getDimensions(u),x=p==="y",v=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=i.reference[E]+i.reference[p]-h[p]-i.floating[E],C=h[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let P=b?b[w]:0;(!P||!await(s.isElement==null?void 0:s.isElement(b)))&&(P=l.floating[w]||i.floating[E]);const T=S/2-C/2,j=P/2-y[E]/2-1,A=Qn(c[v],j),z=Qn(c[g],j),D=A,K=P-y[E]-z,I=P/2-y[E]/2+T,Y=cc(D,I,K),U=!a.arrow&&Lo(o)!=null&&I!==Y&&i.reference[E]/2-(II<=0)){var z,D;const I=(((z=i.flip)==null?void 0:z.index)||0)+1,Y=P[I];if(Y&&(!(c==="alignment"?g!==Ut(Y):!1)||A.every(M=>Ut(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:I,overflows:A},reset:{placement:Y}};let U=(D=A.filter(H=>H.overflows[0]<=0).sort((H,M)=>H.overflows[1]-M.overflows[1])[0])==null?void 0:D.placement;if(!U)switch(p){case"bestFit":{var K;const H=(K=A.filter(M=>{if(b){const k=Ut(M.placement);return k===g||k==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(k=>k>0).reduce((k,L)=>k+L,0)]).sort((M,k)=>M[1]-k[1])[0])==null?void 0:K[0];H&&(U=H);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Qp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yp(e){return Pb.some(t=>e[t]>=0)}const Fb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=sn(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Qp(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Yp(l)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Qp(s,n.floating);return{data:{escapedOffsets:l,escaped:Yp(l)}}}default:return{}}}}},Qv=new Set(["left","top"]);async function zb(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ln(n),l=Lo(n),a=Ut(n)==="y",u=Qv.has(s)?-1:1,d=i&&a?-1:1,c=sn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:E}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof E=="number"&&(p=l==="end"?E*-1:E),a?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Ub=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await zb(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Bb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...u}=sn(e,t),d={x:n,y:r},c=await i.detectOverflow(t,u),h=Ut(ln(o)),p=Od(h);let E=d[p],y=d[h];if(s){const v=p==="y"?"top":"left",g=p==="y"?"bottom":"right",w=E+c[v],S=E-c[g];E=cc(w,E,S)}if(l){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=y+c[v],S=y-c[g];y=cc(w,y,S)}const x=a.fn({...t,[p]:E,[h]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[h]:l}}}}}},Vb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:u=!0}=sn(e,t),d={x:n,y:r},c=Ut(o),h=Od(c);let p=d[h],E=d[c];const y=sn(l,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(a){const w=h==="y"?"height":"width",S=i.reference[h]-i.floating[w]+x.mainAxis,C=i.reference[h]+i.reference[w]-x.mainAxis;pC&&(p=C)}if(u){var v,g;const w=h==="y"?"width":"height",S=Qv.has(ln(o)),C=i.reference[c]-i.floating[w]+(S&&((v=s.offset)==null?void 0:v[c])||0)+(S?0:x.crossAxis),b=i.reference[c]+i.reference[w]+(S?0:((g=s.offset)==null?void 0:g[c])||0)-(S?x.crossAxis:0);Eb&&(E=b)}return{[h]:p,[c]:E}}}},Wb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=sn(e,t),d=await s.detectOverflow(t,u),c=ln(o),h=Lo(o),p=Ut(o)==="y",{width:E,height:y}=i.floating;let x,v;c==="top"||c==="bottom"?(x=c,v=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(v=c,x=h==="end"?"top":"bottom");const g=y-d.top-d.bottom,w=E-d.left-d.right,S=Qn(y-d[x],g),C=Qn(E-d[v],w),b=!t.middlewareData.shift;let P=S,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=g),b&&!h){const A=tt(d.left,0),z=tt(d.right,0),D=tt(d.top,0),K=tt(d.bottom,0);p?T=E-2*(A!==0||z!==0?A+z:tt(d.left,d.right)):P=y-2*(D!==0||K!==0?D+K:tt(d.top,d.bottom))}await a({...t,availableWidth:T,availableHeight:P});const j=await s.getDimensions(l.floating);return E!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function Ql(){return typeof window<"u"}function Io(e){return Yv(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Yv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yv(e){return Ql()?e instanceof Node||e instanceof ot(e).Node:!1}function Mt(e){return Ql()?e instanceof Element||e instanceof ot(e).Element:!1}function fn(e){return Ql()?e instanceof HTMLElement||e instanceof ot(e).HTMLElement:!1}function Xp(e){return!Ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Hb(e){return/^(table|td|th)$/.test(Io(e))}function Yl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Kb=/transform|translate|scale|rotate|perspective|filter/,qb=/paint|layout|strict|content/,nr=e=>!!e&&e!=="none";let Ga;function Ld(e){const t=Mt(e)?Ot(e):e;return nr(t.transform)||nr(t.translate)||nr(t.scale)||nr(t.rotate)||nr(t.perspective)||!Id()&&(nr(t.backdropFilter)||nr(t.filter))||Kb.test(t.willChange||"")||qb.test(t.contain||"")}function Gb(e){let t=Yn(e);for(;fn(t)&&!To(t);){if(Ld(t))return t;if(Yl(t))return null;t=Yn(t)}return null}function Id(){return Ga==null&&(Ga=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ga}function To(e){return/^(html|body|#document)$/.test(Io(e))}function Ot(e){return ot(e).getComputedStyle(e)}function Xl(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xp(e)&&e.host||Ht(e);return Xp(t)?t.host:t}function Xv(e){const t=Yn(e);return To(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&Ki(t)?t:Xv(t)}function Ai(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ot(o);if(i){const l=fc(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],l&&n?Ai(l):[])}else return t.concat(o,Ai(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jv(e){const t=Ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=xl(n)!==i||xl(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Dd(e){return Mt(e)?e:e.contextElement}function lo(e){const t=Dd(e);if(!fn(t))return Wt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jv(t);let s=(i?xl(n.width):n.width)/r,l=(i?xl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Qb=Wt(0);function Zv(e){const t=ot(e);return!Id()||!t.visualViewport?Qb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ot(e)?!1:t}function Sr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Dd(e);let s=Wt(1);t&&(r?Mt(r)&&(s=lo(r)):s=lo(e));const l=Yb(i,n,r)?Zv(i):Wt(0);let a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const h=ot(i),p=r&&Mt(r)?ot(r):r;let E=h,y=fc(E);for(;y&&r&&p!==E;){const x=lo(y),v=y.getBoundingClientRect(),g=Ot(y),w=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,S=v.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;a*=x.x,u*=x.y,d*=x.x,c*=x.y,a+=w,u+=S,E=ot(y),y=fc(E)}}return El({width:d,height:c,x:a,y:u})}function Jl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:Sr(Ht(e)).left+n}function ey(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Jl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ht(r),l=t?Yl(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=Wt(1);const d=Wt(0),c=fn(r);if((c||!c&&!i)&&((Io(r)!=="body"||Ki(s))&&(a=Xl(r)),c)){const p=Sr(r);u=lo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!c&&!i?ey(s,a):Wt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-a.scrollTop*u.y+d.y+h.y}}function Jb(e){return Array.from(e.getClientRects())}function Zb(e){const t=Ht(e),n=Xl(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Jl(e);const l=-n.scrollTop;return Ot(r).direction==="rtl"&&(s+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Jp=25;function eP(e,t){const n=ot(e),r=Ht(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const d=Id();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const u=Jl(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,E=Math.abs(r.clientWidth-c.clientWidth-p);E<=Jp&&(i-=E)}else u<=Jp&&(i+=u);return{width:i,height:s,x:l,y:a}}function tP(e,t){const n=Sr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=fn(e)?lo(e):Wt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function Zp(e,t,n){let r;if(t==="viewport")r=eP(e,n);else if(t==="document")r=Zb(Ht(e));else if(Mt(t))r=tP(t,n);else{const o=Zv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return El(r)}function ty(e,t){const n=Yn(e);return n===t||!Mt(n)||To(n)?!1:Ot(n).position==="fixed"||ty(n,t)}function nP(e,t){const n=t.get(e);if(n)return n;let r=Ai(e,[],!1).filter(l=>Mt(l)&&Io(l)!=="body"),o=null;const i=Ot(e).position==="fixed";let s=i?Yn(e):e;for(;Mt(s)&&!To(s);){const l=Ot(s),a=Ld(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ki(s)&&!a&&ty(e,s))?r=r.filter(d=>d!==s):o=l,s=Yn(s)}return t.set(e,r),r}function rP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Yl(t)?[]:nP(t,this._c):[].concat(n),r],l=Zp(t,s[0],o);let a=l.top,u=l.right,d=l.bottom,c=l.left;for(let h=1;h{s(!1,1e-7)},1e3)}P===1&&!ry(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),i}function cP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Dd(e),d=o||i?[...u?Ai(u):[],...t?Ai(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const c=u&&l?uP(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!a&&p.observe(u),t&&p.observe(t));let E,y=a?Sr(e):null;a&&x();function x(){const v=Sr(e);y&&!ry(y,v)&&n(),y=v,E=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),c==null||c(),(v=p)==null||v.disconnect(),p=null,a&&cancelAnimationFrame(E)}}const dP=Ub,fP=Bb,pP=$b,hP=Wb,gP=Fb,th=Db,mP=Vb,vP=(e,t,n)=>{const r=new Map,o={platform:aP,...n},i={...o.platform,_c:r};return Ib(e,t,{...o,platform:i})};var yP=typeof document<"u",wP=function(){},Fs=yP?f.useLayoutEffect:wP;function Cl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Cl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function oy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nh(e,t){const n=oy(e);return Math.round(t*n)/n}function Ya(e){const t=f.useRef(e);return Fs(()=>{t.current=e}),t}function xP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[d,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);Cl(h,r)||p(r);const[E,y]=f.useState(null),[x,v]=f.useState(null),g=f.useCallback(M=>{M!==b.current&&(b.current=M,y(M))},[]),w=f.useCallback(M=>{M!==P.current&&(P.current=M,v(M))},[]),S=i||E,C=s||x,b=f.useRef(null),P=f.useRef(null),T=f.useRef(d),j=a!=null,A=Ya(a),z=Ya(o),D=Ya(u),K=f.useCallback(()=>{if(!b.current||!P.current)return;const M={placement:t,strategy:n,middleware:h};z.current&&(M.platform=z.current),vP(b.current,P.current,M).then(k=>{const L={...k,isPositioned:D.current!==!1};I.current&&!Cl(T.current,L)&&(T.current=L,Wi.flushSync(()=>{c(L)}))})},[h,t,n,z,D]);Fs(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(M=>({...M,isPositioned:!1})))},[u]);const I=f.useRef(!1);Fs(()=>(I.current=!0,()=>{I.current=!1}),[]),Fs(()=>{if(S&&(b.current=S),C&&(P.current=C),S&&C){if(A.current)return A.current(S,C,K);K()}},[S,C,K,A,j]);const Y=f.useMemo(()=>({reference:b,floating:P,setReference:g,setFloating:w}),[g,w]),U=f.useMemo(()=>({reference:S,floating:C}),[S,C]),H=f.useMemo(()=>{const M={position:n,left:0,top:0};if(!U.floating)return M;const k=nh(U.floating,d.x),L=nh(U.floating,d.y);return l?{...M,transform:"translate("+k+"px, "+L+"px)",...oy(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:L}},[n,l,U.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:K,refs:Y,elements:U,floatingStyles:H}),[d,K,Y,U,H])}const SP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?th({element:r.current,padding:o}).fn(n):{}:r?th({element:r,padding:o}).fn(n):{}}}},EP=(e,t)=>{const n=dP(e);return{name:n.name,fn:n.fn,options:[e,t]}},CP=(e,t)=>{const n=fP(e);return{name:n.name,fn:n.fn,options:[e,t]}},bP=(e,t)=>({fn:mP(e).fn,options:[e,t]}),PP=(e,t)=>{const n=pP(e);return{name:n.name,fn:n.fn,options:[e,t]}},_P=(e,t)=>{const n=hP(e);return{name:n.name,fn:n.fn,options:[e,t]}},kP=(e,t)=>{const n=gP(e);return{name:n.name,fn:n.fn,options:[e,t]}},TP=(e,t)=>{const n=SP(e);return{name:n.name,fn:n.fn,options:[e,t]}};var RP="Arrow",iy=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(ve.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});iy.displayName=RP;var NP=iy;function MP(e){const[t,n]=f.useState(void 0);return vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $d="Popper",[sy,Zl]=_r($d),[OP,ly]=sy($d),ay=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return m.jsx(OP,{scope:t,anchor:r,onAnchorChange:o,children:n})};ay.displayName=$d;var uy="PopperAnchor",cy=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ly(uy,n),s=f.useRef(null),l=Re(t,s),a=f.useRef(null);return f.useEffect(()=>{const u=a.current;a.current=(r==null?void 0:r.current)||s.current,u!==a.current&&i.onAnchorChange(a.current)}),r?null:m.jsx(ve.div,{...o,ref:l})});cy.displayName=uy;var Fd="PopperContent",[AP,jP]=sy(Fd),dy=f.forwardRef((e,t)=>{var J,Kt,Pe,At,pn,Nr;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:E,...y}=e,x=ly(Fd,n),[v,g]=f.useState(null),w=Re(t,hn=>g(hn)),[S,C]=f.useState(null),b=MP(S),P=(b==null?void 0:b.width)??0,T=(b==null?void 0:b.height)??0,j=r+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],D=z.length>0,K={padding:A,boundary:z.filter(IP),altBoundary:D},{refs:I,floatingStyles:Y,placement:U,isPositioned:H,middlewareData:M}=xP({strategy:"fixed",placement:j,whileElementsMounted:(...hn)=>cP(...hn,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[EP({mainAxis:o+T,alignmentAxis:s}),a&&CP({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?bP():void 0,...K}),a&&PP({...K}),_P({...K,apply:({elements:hn,rects:Xi,availableWidth:ua,availableHeight:Ji})=>{const{width:ca,height:Do}=Xi.reference,Mr=hn.floating.style;Mr.setProperty("--radix-popper-available-width",`${ua}px`),Mr.setProperty("--radix-popper-available-height",`${Ji}px`),Mr.setProperty("--radix-popper-anchor-width",`${ca}px`),Mr.setProperty("--radix-popper-anchor-height",`${Do}px`)}}),S&&TP({element:S,padding:l}),DP({arrowWidth:P,arrowHeight:T}),h&&kP({strategy:"referenceHidden",...K})]}),[k,L]=hy(U),B=Je(E);vt(()=>{H&&(B==null||B())},[H,B]);const F=(J=M.arrow)==null?void 0:J.x,G=(Kt=M.arrow)==null?void 0:Kt.y,X=((Pe=M.arrow)==null?void 0:Pe.centerOffset)!==0,[fe,ye]=f.useState();return vt(()=>{v&&ye(window.getComputedStyle(v).zIndex)},[v]),m.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(At=M.transformOrigin)==null?void 0:At.x,(pn=M.transformOrigin)==null?void 0:pn.y].join(" "),...((Nr=M.hide)==null?void 0:Nr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(AP,{scope:n,placedSide:k,onArrowChange:C,arrowX:F,arrowY:G,shouldHideArrow:X,children:m.jsx(ve.div,{"data-side":k,"data-align":L,...y,ref:w,style:{...y.style,animation:H?void 0:"none"}})})})});dy.displayName=Fd;var fy="PopperArrow",LP={top:"bottom",right:"left",bottom:"top",left:"right"},py=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=jP(fy,r),s=LP[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(NP,{...o,ref:n,style:{...o.style,display:"block"}})})});py.displayName=fy;function IP(e){return e!==null}var DP=e=>({name:"transformOrigin",options:e,fn(t){var x,v,g;const{placement:n,rects:r,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[u,d]=hy(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((v=o.arrow)==null?void 0:v.x)??0)+l/2,p=(((g=o.arrow)==null?void 0:g.y)??0)+a/2;let E="",y="";return u==="bottom"?(E=s?c:`${h}px`,y=`${-a}px`):u==="top"?(E=s?c:`${h}px`,y=`${r.floating.height+a}px`):u==="right"?(E=`${-a}px`,y=s?c:`${p}px`):u==="left"&&(E=`${r.floating.width+a}px`,y=s?c:`${p}px`),{data:{x:E,y}}}});function hy(e){const[t,n="center"]=e.split("-");return[t,n]}var $P=ay,gy=cy,my=dy,vy=py,FP="Portal",zd=f.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=f.useState(!1);vt(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Wm.createPortal(m.jsx(ve.div,{...r,ref:t}),s):null});zd.displayName=FP;function zP(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var kr=e=>{const{present:t,children:n}=e,r=UP(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=Re(r.ref,BP(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};kr.displayName="Presence";function UP(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[l,a]=zP(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=xs(r.current);i.current=l==="mounted"?u:"none"},[l]),vt(()=>{const u=r.current,d=o.current;if(d!==e){const h=i.current,p=xs(u);e?a("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),vt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const y=xs(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(a("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(i.current=xs(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function xs(e){return(e==null?void 0:e.animationName)||"none"}function BP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xa="rovingFocusGroup.onEntryFocus",VP={bubbles:!1,cancelable:!0},qi="RovingFocusGroup",[pc,yy,WP]=Md(qi),[HP,wy]=_r(qi,[WP]),[KP,qP]=HP(qi),xy=f.forwardRef((e,t)=>m.jsx(pc.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(pc.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(GP,{...e,ref:t})})}));xy.displayName=qi;var GP=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,h=f.useRef(null),p=Re(t,h),E=Bv(i),[y,x]=Rd({prop:s,defaultProp:l??null,onChange:a,caller:qi}),[v,g]=f.useState(!1),w=Je(u),S=yy(n),C=f.useRef(!1),[b,P]=f.useState(0);return f.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(Xa,w),()=>T.removeEventListener(Xa,w)},[w]),m.jsx(KP,{scope:n,orientation:r,dir:E,loop:o,currentTabStopId:y,onItemFocus:f.useCallback(T=>x(T),[x]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>P(T=>T+1),[]),onFocusableItemRemove:f.useCallback(()=>P(T=>T-1),[]),children:m.jsx(ve.div,{tabIndex:v||b===0?-1:0,"data-orientation":r,...c,ref:p,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,T=>{const j=!C.current;if(T.target===T.currentTarget&&j&&!v){const A=new CustomEvent(Xa,VP);if(T.currentTarget.dispatchEvent(A),!A.defaultPrevented){const z=S().filter(U=>U.focusable),D=z.find(U=>U.active),K=z.find(U=>U.id===y),Y=[D,K,...z].filter(Boolean).map(U=>U.ref.current);Cy(Y,d)}}C.current=!1}),onBlur:V(e.onBlur,()=>g(!1))})})}),Sy="RovingFocusGroupItem",Ey=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...l}=e,a=uc(),u=i||a,d=qP(Sy,n),c=d.currentTabStopId===u,h=yy(n),{onFocusableItemAdd:p,onFocusableItemRemove:E,currentTabStopId:y}=d;return f.useEffect(()=>{if(r)return p(),()=>E()},[r,p,E]),m.jsx(pc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(ve.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:V(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:V(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:V(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=XP(x,d.orientation,d.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=h().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(x.currentTarget);w=d.loop?JP(w,S+1):w.slice(S+1)}setTimeout(()=>Cy(w))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:y!=null}):s})})});Ey.displayName=Sy;var QP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function XP(e,t,n){const r=YP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return QP[r]}function Cy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function JP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ZP=xy,e_=Ey;function t_(e){const t=n_(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(o_);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function n_(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=s_(o),l=i_(i,o.props);return o.type!==f.Fragment&&(l.ref=r?Pr(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var r_=Symbol("radix.slottable");function o_(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===r_}function i_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function s_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var l_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Dr=new WeakMap,Ss=new WeakMap,Es={},Ja=0,by=function(e){return e&&(e.host||by(e.parentNode))},a_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=by(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},u_=function(e,t,n,r){var o=a_(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var i=Es[n],s=[],l=new Set,a=new Set(o),u=function(c){!c||l.has(c)||(l.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||a.has(c)||Array.prototype.forEach.call(c.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(r),E=p!==null&&p!=="false",y=(Dr.get(h)||0)+1,x=(i.get(h)||0)+1;Dr.set(h,y),i.set(h,x),s.push(h),y===1&&E&&Ss.set(h,!0),x===1&&h.setAttribute(n,"true"),E||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),l.clear(),Ja++,function(){s.forEach(function(c){var h=Dr.get(c)-1,p=i.get(c)-1;Dr.set(c,h),i.set(c,p),h||(Ss.has(c)||c.removeAttribute(r),Ss.delete(c)),p||c.removeAttribute(n)}),Ja--,Ja||(Dr=new WeakMap,Dr=new WeakMap,Ss=new WeakMap,Es={})}},c_=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=l_(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),u_(r,o,n,"aria-hidden")):function(){return null}},zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return k_;var t=T_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N_=Ty(),ao="data-scroll-locked",M_=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),` - .`.concat(f_,` { + */var ko=f;function YE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XE=typeof Object.is=="function"?Object.is:YE,JE=ko.useState,ZE=ko.useEffect,eC=ko.useLayoutEffect,tC=ko.useDebugValue;function nC(e,t){var n=t(),r=JE({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return eC(function(){o.value=n,o.getSnapshot=t,Va(o)&&i({inst:o})},[e,n,t]),ZE(function(){return Va(o)&&i({inst:o}),e(function(){Va(o)&&i({inst:o})})},[e]),tC(n),n}function Va(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XE(e,n)}catch{return!0}}function rC(e,t){return t()}var oC=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rC:nC;Ev.useSyncExternalStore=ko.useSyncExternalStore!==void 0?ko.useSyncExternalStore:oC;Sv.exports=Ev;var iC=Sv.exports;function sC(){return iC.useSyncExternalStore(lC,()=>!0,()=>!1)}function lC(){return()=>{}}var kd="Avatar",[aC]=zE(kd),[uC,Cv]=aC(kd),bv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=f.useState("idle");return m.jsx(uC,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:m.jsx(Pd.span,{...r,ref:t})})});bv.displayName=kd;var _v="AvatarImage",Pv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,s=Cv(_v,n),l=cC(r,i),a=Je(u=>{o(u),s.onImageLoadingStatusChange(u)});return vt(()=>{l!=="idle"&&a(l)},[l,a]),l==="loaded"?m.jsx(Pd.img,{...i,ref:t,src:r}):null});Pv.displayName=_v;var kv="AvatarFallback",Tv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Cv(kv,n),[s,l]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const a=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(a)}},[r]),s&&i.imageLoadingStatus!=="loaded"?m.jsx(Pd.span,{...o,ref:t}):null});Tv.displayName=kv;function Lp(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cC(e,{referrerPolicy:t,crossOrigin:n}){const r=sC(),o=f.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=f.useState(()=>Lp(i,e));return vt(()=>{l(Lp(i,e))},[i,e]),vt(()=>{const a=c=>()=>{l(c)};if(!i)return;const u=a("loaded"),d=a("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),s}var Rv=bv,Nv=Pv,Mv=Tv;function Ov(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=pC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Td);return l[0]===""&&l.length!==1&&l.shift(),jv(l,t)||fC(s)},getConflictingClassGroupIds:(s,l)=>{const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}}},jv=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jv(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Td);return(s=t.validators.find(({validator:l})=>l(i)))==null?void 0:s.classGroupId},Ip=/^\[(.+)\]$/,fC=e=>{if(Ip.test(e)){const t=Ip.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pC=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gC(Object.entries(e.classGroups),n).forEach(([i,s])=>{lc(s,r,i,t)}),r},lc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(hC(o)){lc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{lc(s,Dp(t,i),n,r)})})},Dp=(e,t)=>{let n=e;return t.split(Td).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hC=e=>e.isThemeGetter,gC=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e,mC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Lv="!",vC=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=l=>{const a=[];let u=0,d=0,c;for(let x=0;xd?c-d:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:E,maybePostfixModifierPosition:y}};return n?l=>n({className:l,parseClassName:s}):s},yC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},wC=e=>({cache:mC(e.cacheSize),parseClassName:vC(e),...dC(e)}),xC=/\s+/,SC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(xC);let l="";for(let a=s.length-1;a>=0;a-=1){const u=s[a],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let E=!!p,y=r(E?h.substring(0,p):h);if(!y){if(!E){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}E=!1}const x=yC(d).join(":"),v=c?x+Lv:x,g=v+y;if(i.includes(g))continue;i.push(g);const w=o(y,E);for(let S=0;S0?" "+l:l)}return l};function EC(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(d),e());return n=wC(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const d=SC(a,n);return o(a,d),d}return function(){return i(EC.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Dv=/^\[(?:([a-z-]+):)?(.+)\]$/i,bC=/^\d+\/\d+$/,_C=new Set(["px","full","screen"]),PC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,RC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>so(e)||_C.has(e)||bC.test(e),wn=e=>jo(e,"length",$C),so=e=>!!e&&!Number.isNaN(Number(e)),Wa=e=>jo(e,"number",so),qo=e=>!!e&&Number.isInteger(Number(e)),MC=e=>e.endsWith("%")&&so(e.slice(0,-1)),Q=e=>Dv.test(e),xn=e=>PC.test(e),OC=new Set(["length","size","percentage"]),AC=e=>jo(e,OC,$v),jC=e=>jo(e,"position",$v),LC=new Set(["image","url"]),IC=e=>jo(e,LC,zC),DC=e=>jo(e,"",FC),Go=()=>!0,jo=(e,t,n)=>{const r=Dv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},$C=e=>kC.test(e)&&!TC.test(e),$v=()=>!1,FC=e=>RC.test(e),zC=e=>NC.test(e),UC=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),o=le("borderColor"),i=le("borderRadius"),s=le("borderSpacing"),l=le("borderWidth"),a=le("contrast"),u=le("grayscale"),d=le("hueRotate"),c=le("invert"),h=le("gap"),p=le("gradientColorStops"),E=le("gradientColorStopPositions"),y=le("inset"),x=le("margin"),v=le("opacity"),g=le("padding"),w=le("saturate"),S=le("scale"),C=le("sepia"),b=le("skew"),_=le("space"),T=le("translate"),j=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Q,t],D=()=>[Q,t],K=()=>["",qt,wn],I=()=>["auto",so,Q],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",Q],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[so,Q];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[qt,wn],blur:["none","",xn,Q],brightness:B(),borderColor:[e],borderRadius:["none","","full",xn,Q],borderSpacing:D(),borderWidth:K(),contrast:B(),grayscale:k(),hueRotate:B(),invert:k(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[MC,wn],inset:z(),margin:z(),opacity:B(),padding:D(),saturate:B(),scale:B(),sepia:k(),skew:B(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[xn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Q]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qo,Q]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",qo,Q]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",qo,Q]},Q]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[qo,Q]},Q]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[xn]},xn]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wa]}],"font-family":[{font:[Go]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",so,Wa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qt,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qt,wn]}],"underline-offset":[{"underline-offset":["auto",qt,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),jC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",AC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:U()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[qt,Q]}],"outline-w":[{outline:[qt,wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[qt,wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xn,DC]}],"shadow-color":[{shadow:[Go]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",xn,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[qo,Q]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qt,wn,Wa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BC=CC(UC);function Ne(...e){return BC(Av(e))}function qN(e){const t=e.trim(),n=t.match(/^(\d{4})-(\d{4,5})(v\d+)?$/);if(n)return`${n[1]}.${n[2]}`;const r=t.match(/^(\d{4}\.\d{4,5})(v\d+)$/);return r?r[1]:t}function GN(e){if(e==null||e==="")return"—";const t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=10?t.toFixed(1):t.toFixed(2):String(e)}const Fv=f.forwardRef(({className:e,...t},n)=>m.jsx(Rv,{ref:n,className:Ne("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fv.displayName=Rv.displayName;const zv=f.forwardRef(({className:e,...t},n)=>m.jsx(Nv,{ref:n,className:Ne("aspect-square h-full w-full",e),...t}));zv.displayName=Nv.displayName;const Uv=f.forwardRef(({className:e,...t},n)=>m.jsx(Mv,{ref:n,className:Ne("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Uv.displayName=Mv.displayName;function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function QN(e,t){const n=f.createContext(t),r=i=>{const{children:s,...l}=i,a=f.useMemo(()=>l,Object.values(l));return m.jsx(n.Provider,{value:a,children:s})};r.displayName=e+"Provider";function o(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Pr(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s),a=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...E}=c,y=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,x=f.useMemo(()=>E,Object.values(E));return m.jsx(y.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[a])||l,E=f.useContext(p);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,VC(o,...t)]}function VC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var WC=kl[" useInsertionEffect ".trim().toString()]||vt;function Rd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=HC({defaultProp:t,onChange:n}),l=e!==void 0,a=l?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const c=d.current;c!==l&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=f.useCallback(d=>{var c;if(l){const h=KC(d)?d(e):d;h!==e&&((c=s.current)==null||c.call(s,h))}else i(d)},[l,e,i,s]);return[a,u]}function HC({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return WC(()=>{i.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function KC(e){return typeof e=="function"}function qC(e){const t=GC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(YC);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function GC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=JC(o),l=XC(i,o.props);return o.type!==f.Fragment&&(l.ref=r?_r(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QC=Symbol("radix.slottable");function YC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QC}function XC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function JC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=ZC.reduce((e,t)=>{const n=qC(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nd(e,t){e&&Wi.flushSync(()=>e.dispatchEvent(t))}function $p(e){const t=eb(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(nb);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function eb(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=ob(o),l=rb(i,o.props);return o.type!==f.Fragment&&(l.ref=r?_r(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tb=Symbol("radix.slottable");function nb(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tb}function rb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ob(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Md(e){const t=e+"CollectionProvider",[n,r]=Pr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:x,children:v}=y,g=R.useRef(null),w=R.useRef(new Map).current;return m.jsx(o,{scope:x,itemMap:w,collectionRef:g,children:v})};s.displayName=t;const l=e+"CollectionSlot",a=$p(l),u=R.forwardRef((y,x)=>{const{scope:v,children:g}=y,w=i(l,v),S=Re(x,w.collectionRef);return m.jsx(a,{ref:S,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",c="data-radix-collection-item",h=$p(d),p=R.forwardRef((y,x)=>{const{scope:v,children:g,...w}=y,S=R.useRef(null),C=Re(x,S),b=i(d,v);return R.useEffect(()=>(b.itemMap.set(S,{ref:S,...w}),()=>void b.itemMap.delete(S))),m.jsx(h,{[c]:"",ref:C,children:g})});p.displayName=d;function E(y){const x=i(e+"CollectionConsumer",y);return R.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((b,_)=>w.indexOf(b.ref.current)-w.indexOf(_.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},E,r]}var ib=f.createContext(void 0);function Bv(e){const t=f.useContext(ib);return e||t||"ltr"}function sb(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var lb="DismissableLayer",ac="dismissableLayer.update",ab="dismissableLayer.pointerDownOutside",ub="dismissableLayer.focusOutside",Fp,Vv=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gl=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...a}=e,u=f.useContext(Vv),[d,c]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),E=Re(t,_=>c(_)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(x),g=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,C=db(_=>{const T=_.target,j=[...u.branches].some(A=>A.contains(T));!S||j||(o==null||o(_),s==null||s(_),_.defaultPrevented||l==null||l())},h),b=fb(_=>{const T=_.target;[...u.branches].some(A=>A.contains(T))||(i==null||i(_),s==null||s(_),_.defaultPrevented||l==null||l())},h);return sb(_=>{g===u.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},h),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Fp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),zp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fp)}},[d,h,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),zp())},[d,u]),f.useEffect(()=>{const _=()=>p({});return document.addEventListener(ac,_),()=>document.removeEventListener(ac,_)},[]),m.jsx(ve.div,{...a,ref:E,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,b.onFocusCapture),onBlurCapture:V(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Gl.displayName=lb;var cb="DismissableLayerBranch",Wv=f.forwardRef((e,t)=>{const n=f.useContext(Vv),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(ve.div,{...e,ref:o})});Wv.displayName=cb;function db(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let a=function(){Hv(ab,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fb(e,t=globalThis==null?void 0:globalThis.document){const n=Je(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Hv(ub,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zp(){const e=new CustomEvent(ac);document.dispatchEvent(e)}function Hv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nd(o,i):o.dispatchEvent(i)}var pb=Gl,hb=Wv,Ha=0;function gb(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Up()),document.body.insertAdjacentElement("beforeend",e[1]??Up()),Ha++,()=>{Ha===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ha--}},[])}function Up(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ka="focusScope.autoFocusOnMount",qa="focusScope.autoFocusOnUnmount",Bp={bubbles:!1,cancelable:!0},mb="FocusScope",Kv=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=f.useState(null),u=Je(o),d=Je(i),c=f.useRef(null),h=Re(t,y=>a(y)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let y=function(w){if(p.paused||!l)return;const S=w.target;l.contains(S)?c.current=S:En(c.current,{select:!0})},x=function(w){if(p.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||En(c.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&En(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",x);const g=new MutationObserver(v);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),g.disconnect()}}},[r,l,p.paused]),f.useEffect(()=>{if(l){Wp.add(p);const y=document.activeElement;if(!l.contains(y)){const v=new CustomEvent(Ka,Bp);l.addEventListener(Ka,u),l.dispatchEvent(v),v.defaultPrevented||(vb(Eb(qv(l)),{select:!0}),document.activeElement===y&&En(l))}return()=>{l.removeEventListener(Ka,u),setTimeout(()=>{const v=new CustomEvent(qa,Bp);l.addEventListener(qa,d),l.dispatchEvent(v),v.defaultPrevented||En(y??document.body,{select:!0}),l.removeEventListener(qa,d),Wp.remove(p)},0)}}},[l,u,d,p]);const E=f.useCallback(y=>{if(!n&&!r||p.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(x&&v){const g=y.currentTarget,[w,S]=yb(g);w&&S?!y.shiftKey&&v===S?(y.preventDefault(),n&&En(w,{select:!0})):y.shiftKey&&v===w&&(y.preventDefault(),n&&En(S,{select:!0})):v===g&&y.preventDefault()}},[n,r,p.paused]);return m.jsx(ve.div,{tabIndex:-1,...s,ref:h,onKeyDown:E})});Kv.displayName=mb;function vb(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function yb(e){const t=qv(e),n=Vp(t,e),r=Vp(t.reverse(),e);return[n,r]}function qv(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 Vp(e,t){for(const n of e)if(!wb(n,{upTo:t}))return n}function wb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xb(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xb(e)&&t&&e.select()}}var Wp=Sb();function Sb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hp(e,t),e.unshift(t)},remove(t){var n;e=Hp(e,t),(n=e[0])==null||n.resume()}}}function Hp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eb(e){return e.filter(t=>t.tagName!=="A")}var Cb=kl[" useId ".trim().toString()]||(()=>{}),bb=0;function uc(e){const[t,n]=f.useState(Cb());return vt(()=>{n(r=>r??String(bb++))},[e]),t?`radix-${t}`:""}const _b=["top","right","bottom","left"],Qn=Math.min,tt=Math.max,xl=Math.round,ws=Math.floor,Wt=e=>({x:e,y:e}),Pb={left:"right",right:"left",bottom:"top",top:"bottom"};function cc(e,t,n){return tt(e,Qn(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function Lo(e){return e.split("-")[1]}function Od(e){return e==="x"?"y":"x"}function Ad(e){return e==="y"?"height":"width"}function Ut(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jd(e){return Od(Ut(e))}function kb(e,t,n){n===void 0&&(n=!1);const r=Lo(e),o=jd(e),i=Ad(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sl(s)),[s,Sl(s)]}function Tb(e){const t=Sl(e);return[dc(e),t,dc(t)]}function dc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Kp=["left","right"],qp=["right","left"],Rb=["top","bottom"],Nb=["bottom","top"];function Mb(e,t,n){switch(e){case"top":case"bottom":return n?t?qp:Kp:t?Kp:qp;case"left":case"right":return t?Rb:Nb;default:return[]}}function Ob(e,t,n,r){const o=Lo(e);let i=Mb(ln(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(dc)))),i}function Sl(e){const t=ln(e);return Pb[t]+e.slice(t.length)}function Ab(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gv(e){return typeof e!="number"?Ab(e):{top:e,right:e,bottom:e,left:e}}function El(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gp(e,t,n){let{reference:r,floating:o}=e;const i=Ut(t),s=jd(t),l=Ad(s),a=ln(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(a){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-o.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Lo(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}async function jb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=sn(t,e),E=Gv(p),x=l[h?c==="floating"?"reference":"floating":c],v=El(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:a})),g=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=El(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:w,strategy:a}):g);return{top:(v.top-C.top+E.top)/S.y,bottom:(C.bottom-v.bottom+E.bottom)/S.y,left:(v.left-C.left+E.left)/S.x,right:(C.right-v.right+E.right)/S.x}}const Lb=50,Ib=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:jb},a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Gp(u,r,a),h=r,p=0;const E={};for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:d=0}=sn(e,t)||{};if(u==null)return{};const c=Gv(d),h={x:n,y:r},p=jd(o),E=Ad(p),y=await s.getDimensions(u),x=p==="y",v=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=i.reference[E]+i.reference[p]-h[p]-i.floating[E],C=h[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let _=b?b[w]:0;(!_||!await(s.isElement==null?void 0:s.isElement(b)))&&(_=l.floating[w]||i.floating[E]);const T=S/2-C/2,j=_/2-y[E]/2-1,A=Qn(c[v],j),z=Qn(c[g],j),D=A,K=_-y[E]-z,I=_/2-y[E]/2+T,Y=cc(D,I,K),U=!a.arrow&&Lo(o)!=null&&I!==Y&&i.reference[E]/2-(II<=0)){var z,D;const I=(((z=i.flip)==null?void 0:z.index)||0)+1,Y=_[I];if(Y&&(!(c==="alignment"?g!==Ut(Y):!1)||A.every(M=>Ut(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:I,overflows:A},reset:{placement:Y}};let U=(D=A.filter(H=>H.overflows[0]<=0).sort((H,M)=>H.overflows[1]-M.overflows[1])[0])==null?void 0:D.placement;if(!U)switch(p){case"bestFit":{var K;const H=(K=A.filter(M=>{if(b){const k=Ut(M.placement);return k===g||k==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(k=>k>0).reduce((k,L)=>k+L,0)]).sort((M,k)=>M[1]-k[1])[0])==null?void 0:K[0];H&&(U=H);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Qp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yp(e){return _b.some(t=>e[t]>=0)}const Fb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=sn(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Qp(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Yp(l)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Qp(s,n.floating);return{data:{escapedOffsets:l,escaped:Yp(l)}}}default:return{}}}}},Qv=new Set(["left","top"]);async function zb(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ln(n),l=Lo(n),a=Ut(n)==="y",u=Qv.has(s)?-1:1,d=i&&a?-1:1,c=sn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:E}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof E=="number"&&(p=l==="end"?E*-1:E),a?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Ub=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await zb(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Bb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...u}=sn(e,t),d={x:n,y:r},c=await i.detectOverflow(t,u),h=Ut(ln(o)),p=Od(h);let E=d[p],y=d[h];if(s){const v=p==="y"?"top":"left",g=p==="y"?"bottom":"right",w=E+c[v],S=E-c[g];E=cc(w,E,S)}if(l){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=y+c[v],S=y-c[g];y=cc(w,y,S)}const x=a.fn({...t,[p]:E,[h]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[h]:l}}}}}},Vb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:u=!0}=sn(e,t),d={x:n,y:r},c=Ut(o),h=Od(c);let p=d[h],E=d[c];const y=sn(l,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(a){const w=h==="y"?"height":"width",S=i.reference[h]-i.floating[w]+x.mainAxis,C=i.reference[h]+i.reference[w]-x.mainAxis;pC&&(p=C)}if(u){var v,g;const w=h==="y"?"width":"height",S=Qv.has(ln(o)),C=i.reference[c]-i.floating[w]+(S&&((v=s.offset)==null?void 0:v[c])||0)+(S?0:x.crossAxis),b=i.reference[c]+i.reference[w]+(S?0:((g=s.offset)==null?void 0:g[c])||0)-(S?x.crossAxis:0);Eb&&(E=b)}return{[h]:p,[c]:E}}}},Wb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=sn(e,t),d=await s.detectOverflow(t,u),c=ln(o),h=Lo(o),p=Ut(o)==="y",{width:E,height:y}=i.floating;let x,v;c==="top"||c==="bottom"?(x=c,v=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(v=c,x=h==="end"?"top":"bottom");const g=y-d.top-d.bottom,w=E-d.left-d.right,S=Qn(y-d[x],g),C=Qn(E-d[v],w),b=!t.middlewareData.shift;let _=S,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=g),b&&!h){const A=tt(d.left,0),z=tt(d.right,0),D=tt(d.top,0),K=tt(d.bottom,0);p?T=E-2*(A!==0||z!==0?A+z:tt(d.left,d.right)):_=y-2*(D!==0||K!==0?D+K:tt(d.top,d.bottom))}await a({...t,availableWidth:T,availableHeight:_});const j=await s.getDimensions(l.floating);return E!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function Ql(){return typeof window<"u"}function Io(e){return Yv(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Yv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yv(e){return Ql()?e instanceof Node||e instanceof ot(e).Node:!1}function Mt(e){return Ql()?e instanceof Element||e instanceof ot(e).Element:!1}function fn(e){return Ql()?e instanceof HTMLElement||e instanceof ot(e).HTMLElement:!1}function Xp(e){return!Ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Hb(e){return/^(table|td|th)$/.test(Io(e))}function Yl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Kb=/transform|translate|scale|rotate|perspective|filter/,qb=/paint|layout|strict|content/,nr=e=>!!e&&e!=="none";let Ga;function Ld(e){const t=Mt(e)?Ot(e):e;return nr(t.transform)||nr(t.translate)||nr(t.scale)||nr(t.rotate)||nr(t.perspective)||!Id()&&(nr(t.backdropFilter)||nr(t.filter))||Kb.test(t.willChange||"")||qb.test(t.contain||"")}function Gb(e){let t=Yn(e);for(;fn(t)&&!To(t);){if(Ld(t))return t;if(Yl(t))return null;t=Yn(t)}return null}function Id(){return Ga==null&&(Ga=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ga}function To(e){return/^(html|body|#document)$/.test(Io(e))}function Ot(e){return ot(e).getComputedStyle(e)}function Xl(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xp(e)&&e.host||Ht(e);return Xp(t)?t.host:t}function Xv(e){const t=Yn(e);return To(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&Ki(t)?t:Xv(t)}function Ai(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ot(o);if(i){const l=fc(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],l&&n?Ai(l):[])}else return t.concat(o,Ai(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jv(e){const t=Ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=xl(n)!==i||xl(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Dd(e){return Mt(e)?e:e.contextElement}function lo(e){const t=Dd(e);if(!fn(t))return Wt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jv(t);let s=(i?xl(n.width):n.width)/r,l=(i?xl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Qb=Wt(0);function Zv(e){const t=ot(e);return!Id()||!t.visualViewport?Qb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ot(e)?!1:t}function Sr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Dd(e);let s=Wt(1);t&&(r?Mt(r)&&(s=lo(r)):s=lo(e));const l=Yb(i,n,r)?Zv(i):Wt(0);let a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const h=ot(i),p=r&&Mt(r)?ot(r):r;let E=h,y=fc(E);for(;y&&r&&p!==E;){const x=lo(y),v=y.getBoundingClientRect(),g=Ot(y),w=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,S=v.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;a*=x.x,u*=x.y,d*=x.x,c*=x.y,a+=w,u+=S,E=ot(y),y=fc(E)}}return El({width:d,height:c,x:a,y:u})}function Jl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:Sr(Ht(e)).left+n}function ey(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Jl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ht(r),l=t?Yl(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=Wt(1);const d=Wt(0),c=fn(r);if((c||!c&&!i)&&((Io(r)!=="body"||Ki(s))&&(a=Xl(r)),c)){const p=Sr(r);u=lo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!c&&!i?ey(s,a):Wt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-a.scrollTop*u.y+d.y+h.y}}function Jb(e){return Array.from(e.getClientRects())}function Zb(e){const t=Ht(e),n=Xl(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Jl(e);const l=-n.scrollTop;return Ot(r).direction==="rtl"&&(s+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Jp=25;function e_(e,t){const n=ot(e),r=Ht(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const d=Id();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const u=Jl(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,E=Math.abs(r.clientWidth-c.clientWidth-p);E<=Jp&&(i-=E)}else u<=Jp&&(i+=u);return{width:i,height:s,x:l,y:a}}function t_(e,t){const n=Sr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=fn(e)?lo(e):Wt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function Zp(e,t,n){let r;if(t==="viewport")r=e_(e,n);else if(t==="document")r=Zb(Ht(e));else if(Mt(t))r=t_(t,n);else{const o=Zv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return El(r)}function ty(e,t){const n=Yn(e);return n===t||!Mt(n)||To(n)?!1:Ot(n).position==="fixed"||ty(n,t)}function n_(e,t){const n=t.get(e);if(n)return n;let r=Ai(e,[],!1).filter(l=>Mt(l)&&Io(l)!=="body"),o=null;const i=Ot(e).position==="fixed";let s=i?Yn(e):e;for(;Mt(s)&&!To(s);){const l=Ot(s),a=Ld(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ki(s)&&!a&&ty(e,s))?r=r.filter(d=>d!==s):o=l,s=Yn(s)}return t.set(e,r),r}function r_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Yl(t)?[]:n_(t,this._c):[].concat(n),r],l=Zp(t,s[0],o);let a=l.top,u=l.right,d=l.bottom,c=l.left;for(let h=1;h{s(!1,1e-7)},1e3)}_===1&&!ry(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),i}function c_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Dd(e),d=o||i?[...u?Ai(u):[],...t?Ai(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const c=u&&l?u_(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!a&&p.observe(u),t&&p.observe(t));let E,y=a?Sr(e):null;a&&x();function x(){const v=Sr(e);y&&!ry(y,v)&&n(),y=v,E=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),c==null||c(),(v=p)==null||v.disconnect(),p=null,a&&cancelAnimationFrame(E)}}const d_=Ub,f_=Bb,p_=$b,h_=Wb,g_=Fb,th=Db,m_=Vb,v_=(e,t,n)=>{const r=new Map,o={platform:a_,...n},i={...o.platform,_c:r};return Ib(e,t,{...o,platform:i})};var y_=typeof document<"u",w_=function(){},Fs=y_?f.useLayoutEffect:w_;function Cl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Cl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function oy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nh(e,t){const n=oy(e);return Math.round(t*n)/n}function Ya(e){const t=f.useRef(e);return Fs(()=>{t.current=e}),t}function x_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[d,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);Cl(h,r)||p(r);const[E,y]=f.useState(null),[x,v]=f.useState(null),g=f.useCallback(M=>{M!==b.current&&(b.current=M,y(M))},[]),w=f.useCallback(M=>{M!==_.current&&(_.current=M,v(M))},[]),S=i||E,C=s||x,b=f.useRef(null),_=f.useRef(null),T=f.useRef(d),j=a!=null,A=Ya(a),z=Ya(o),D=Ya(u),K=f.useCallback(()=>{if(!b.current||!_.current)return;const M={placement:t,strategy:n,middleware:h};z.current&&(M.platform=z.current),v_(b.current,_.current,M).then(k=>{const L={...k,isPositioned:D.current!==!1};I.current&&!Cl(T.current,L)&&(T.current=L,Wi.flushSync(()=>{c(L)}))})},[h,t,n,z,D]);Fs(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(M=>({...M,isPositioned:!1})))},[u]);const I=f.useRef(!1);Fs(()=>(I.current=!0,()=>{I.current=!1}),[]),Fs(()=>{if(S&&(b.current=S),C&&(_.current=C),S&&C){if(A.current)return A.current(S,C,K);K()}},[S,C,K,A,j]);const Y=f.useMemo(()=>({reference:b,floating:_,setReference:g,setFloating:w}),[g,w]),U=f.useMemo(()=>({reference:S,floating:C}),[S,C]),H=f.useMemo(()=>{const M={position:n,left:0,top:0};if(!U.floating)return M;const k=nh(U.floating,d.x),L=nh(U.floating,d.y);return l?{...M,transform:"translate("+k+"px, "+L+"px)",...oy(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:L}},[n,l,U.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:K,refs:Y,elements:U,floatingStyles:H}),[d,K,Y,U,H])}const S_=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?th({element:r.current,padding:o}).fn(n):{}:r?th({element:r,padding:o}).fn(n):{}}}},E_=(e,t)=>{const n=d_(e);return{name:n.name,fn:n.fn,options:[e,t]}},C_=(e,t)=>{const n=f_(e);return{name:n.name,fn:n.fn,options:[e,t]}},b_=(e,t)=>({fn:m_(e).fn,options:[e,t]}),__=(e,t)=>{const n=p_(e);return{name:n.name,fn:n.fn,options:[e,t]}},P_=(e,t)=>{const n=h_(e);return{name:n.name,fn:n.fn,options:[e,t]}},k_=(e,t)=>{const n=g_(e);return{name:n.name,fn:n.fn,options:[e,t]}},T_=(e,t)=>{const n=S_(e);return{name:n.name,fn:n.fn,options:[e,t]}};var R_="Arrow",iy=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(ve.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});iy.displayName=R_;var N_=iy;function M_(e){const[t,n]=f.useState(void 0);return vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $d="Popper",[sy,Zl]=Pr($d),[O_,ly]=sy($d),ay=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return m.jsx(O_,{scope:t,anchor:r,onAnchorChange:o,children:n})};ay.displayName=$d;var uy="PopperAnchor",cy=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ly(uy,n),s=f.useRef(null),l=Re(t,s),a=f.useRef(null);return f.useEffect(()=>{const u=a.current;a.current=(r==null?void 0:r.current)||s.current,u!==a.current&&i.onAnchorChange(a.current)}),r?null:m.jsx(ve.div,{...o,ref:l})});cy.displayName=uy;var Fd="PopperContent",[A_,j_]=sy(Fd),dy=f.forwardRef((e,t)=>{var J,Kt,_e,At,pn,Nr;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:E,...y}=e,x=ly(Fd,n),[v,g]=f.useState(null),w=Re(t,hn=>g(hn)),[S,C]=f.useState(null),b=M_(S),_=(b==null?void 0:b.width)??0,T=(b==null?void 0:b.height)??0,j=r+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],D=z.length>0,K={padding:A,boundary:z.filter(I_),altBoundary:D},{refs:I,floatingStyles:Y,placement:U,isPositioned:H,middlewareData:M}=x_({strategy:"fixed",placement:j,whileElementsMounted:(...hn)=>c_(...hn,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[E_({mainAxis:o+T,alignmentAxis:s}),a&&C_({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?b_():void 0,...K}),a&&__({...K}),P_({...K,apply:({elements:hn,rects:Xi,availableWidth:ua,availableHeight:Ji})=>{const{width:ca,height:Do}=Xi.reference,Mr=hn.floating.style;Mr.setProperty("--radix-popper-available-width",`${ua}px`),Mr.setProperty("--radix-popper-available-height",`${Ji}px`),Mr.setProperty("--radix-popper-anchor-width",`${ca}px`),Mr.setProperty("--radix-popper-anchor-height",`${Do}px`)}}),S&&T_({element:S,padding:l}),D_({arrowWidth:_,arrowHeight:T}),h&&k_({strategy:"referenceHidden",...K})]}),[k,L]=hy(U),B=Je(E);vt(()=>{H&&(B==null||B())},[H,B]);const F=(J=M.arrow)==null?void 0:J.x,G=(Kt=M.arrow)==null?void 0:Kt.y,X=((_e=M.arrow)==null?void 0:_e.centerOffset)!==0,[fe,ye]=f.useState();return vt(()=>{v&&ye(window.getComputedStyle(v).zIndex)},[v]),m.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(At=M.transformOrigin)==null?void 0:At.x,(pn=M.transformOrigin)==null?void 0:pn.y].join(" "),...((Nr=M.hide)==null?void 0:Nr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(A_,{scope:n,placedSide:k,onArrowChange:C,arrowX:F,arrowY:G,shouldHideArrow:X,children:m.jsx(ve.div,{"data-side":k,"data-align":L,...y,ref:w,style:{...y.style,animation:H?void 0:"none"}})})})});dy.displayName=Fd;var fy="PopperArrow",L_={top:"bottom",right:"left",bottom:"top",left:"right"},py=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=j_(fy,r),s=L_[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(N_,{...o,ref:n,style:{...o.style,display:"block"}})})});py.displayName=fy;function I_(e){return e!==null}var D_=e=>({name:"transformOrigin",options:e,fn(t){var x,v,g;const{placement:n,rects:r,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[u,d]=hy(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((v=o.arrow)==null?void 0:v.x)??0)+l/2,p=(((g=o.arrow)==null?void 0:g.y)??0)+a/2;let E="",y="";return u==="bottom"?(E=s?c:`${h}px`,y=`${-a}px`):u==="top"?(E=s?c:`${h}px`,y=`${r.floating.height+a}px`):u==="right"?(E=`${-a}px`,y=s?c:`${p}px`):u==="left"&&(E=`${r.floating.width+a}px`,y=s?c:`${p}px`),{data:{x:E,y}}}});function hy(e){const[t,n="center"]=e.split("-");return[t,n]}var $_=ay,gy=cy,my=dy,vy=py,F_="Portal",zd=f.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=f.useState(!1);vt(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Wm.createPortal(m.jsx(ve.div,{...r,ref:t}),s):null});zd.displayName=F_;function z_(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var kr=e=>{const{present:t,children:n}=e,r=U_(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=Re(r.ref,B_(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};kr.displayName="Presence";function U_(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[l,a]=z_(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=xs(r.current);i.current=l==="mounted"?u:"none"},[l]),vt(()=>{const u=r.current,d=o.current;if(d!==e){const h=i.current,p=xs(u);e?a("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),vt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const y=xs(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(a("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(i.current=xs(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function xs(e){return(e==null?void 0:e.animationName)||"none"}function B_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xa="rovingFocusGroup.onEntryFocus",V_={bubbles:!1,cancelable:!0},qi="RovingFocusGroup",[pc,yy,W_]=Md(qi),[H_,wy]=Pr(qi,[W_]),[K_,q_]=H_(qi),xy=f.forwardRef((e,t)=>m.jsx(pc.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(pc.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(G_,{...e,ref:t})})}));xy.displayName=qi;var G_=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,h=f.useRef(null),p=Re(t,h),E=Bv(i),[y,x]=Rd({prop:s,defaultProp:l??null,onChange:a,caller:qi}),[v,g]=f.useState(!1),w=Je(u),S=yy(n),C=f.useRef(!1),[b,_]=f.useState(0);return f.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(Xa,w),()=>T.removeEventListener(Xa,w)},[w]),m.jsx(K_,{scope:n,orientation:r,dir:E,loop:o,currentTabStopId:y,onItemFocus:f.useCallback(T=>x(T),[x]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>_(T=>T+1),[]),onFocusableItemRemove:f.useCallback(()=>_(T=>T-1),[]),children:m.jsx(ve.div,{tabIndex:v||b===0?-1:0,"data-orientation":r,...c,ref:p,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,T=>{const j=!C.current;if(T.target===T.currentTarget&&j&&!v){const A=new CustomEvent(Xa,V_);if(T.currentTarget.dispatchEvent(A),!A.defaultPrevented){const z=S().filter(U=>U.focusable),D=z.find(U=>U.active),K=z.find(U=>U.id===y),Y=[D,K,...z].filter(Boolean).map(U=>U.ref.current);Cy(Y,d)}}C.current=!1}),onBlur:V(e.onBlur,()=>g(!1))})})}),Sy="RovingFocusGroupItem",Ey=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...l}=e,a=uc(),u=i||a,d=q_(Sy,n),c=d.currentTabStopId===u,h=yy(n),{onFocusableItemAdd:p,onFocusableItemRemove:E,currentTabStopId:y}=d;return f.useEffect(()=>{if(r)return p(),()=>E()},[r,p,E]),m.jsx(pc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(ve.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:V(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:V(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:V(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=X_(x,d.orientation,d.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=h().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(x.currentTarget);w=d.loop?J_(w,S+1):w.slice(S+1)}setTimeout(()=>Cy(w))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:y!=null}):s})})});Ey.displayName=Sy;var Q_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function X_(e,t,n){const r=Y_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Q_[r]}function Cy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function J_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Z_=xy,eP=Ey;function tP(e){const t=nP(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(oP);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function nP(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=sP(o),l=iP(i,o.props);return o.type!==f.Fragment&&(l.ref=r?_r(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rP=Symbol("radix.slottable");function oP(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rP}function iP(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function sP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Dr=new WeakMap,Ss=new WeakMap,Es={},Ja=0,by=function(e){return e&&(e.host||by(e.parentNode))},aP=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=by(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uP=function(e,t,n,r){var o=aP(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var i=Es[n],s=[],l=new Set,a=new Set(o),u=function(c){!c||l.has(c)||(l.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||a.has(c)||Array.prototype.forEach.call(c.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(r),E=p!==null&&p!=="false",y=(Dr.get(h)||0)+1,x=(i.get(h)||0)+1;Dr.set(h,y),i.set(h,x),s.push(h),y===1&&E&&Ss.set(h,!0),x===1&&h.setAttribute(n,"true"),E||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),l.clear(),Ja++,function(){s.forEach(function(c){var h=Dr.get(c)-1,p=i.get(c)-1;Dr.set(c,h),i.set(c,p),h||(Ss.has(c)||c.removeAttribute(r),Ss.delete(c)),p||c.removeAttribute(n)}),Ja--,Ja||(Dr=new WeakMap,Dr=new WeakMap,Ss=new WeakMap,Es={})}},cP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=lP(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),uP(r,o,n,"aria-hidden")):function(){return null}},zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return kP;var t=TP(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},NP=Ty(),ao="data-scroll-locked",MP=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),` + .`.concat(fP,` { overflow: hidden `).concat(r,`; padding-right: `).concat(l,"px ").concat(r,`; } @@ -108,17 +108,17 @@ Error generating stack: `+i.message+` } body[`).concat(ao,`] { - `).concat(p_,": ").concat(l,`px; + `).concat(pP,": ").concat(l,`px; } -`)},oh=function(){var e=parseInt(document.body.getAttribute(ao)||"0",10);return isFinite(e)?e:0},O_=function(){f.useEffect(function(){return document.body.setAttribute(ao,(oh()+1).toString()),function(){var e=oh()-1;e<=0?document.body.removeAttribute(ao):document.body.setAttribute(ao,e.toString())}},[])},A_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;O_();var i=f.useMemo(function(){return R_(o)},[o]);return f.createElement(N_,{styles:M_(i,!t,o,n?"":"!important")})},hc=!1;if(typeof window<"u")try{var Cs=Object.defineProperty({},"passive",{get:function(){return hc=!0,!0}});window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch{hc=!1}var $r=hc?{passive:!1}:!1,j_=function(e){return e.tagName==="TEXTAREA"},Ry=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!j_(e)&&n[t]==="visible")},L_=function(e){return Ry(e,"overflowY")},I_=function(e){return Ry(e,"overflowX")},ih=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ny(e,r);if(o){var i=My(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D_=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$_=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ny=function(e,t){return e==="v"?L_(t):I_(t)},My=function(e,t){return e==="v"?D_(t):$_(t)},F_=function(e,t){return e==="h"&&t==="rtl"?-1:1},z_=function(e,t,n,r,o){var i=F_(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,d=s>0,c=0,h=0;do{if(!l)break;var p=My(e,l),E=p[0],y=p[1],x=p[2],v=y-x-i*E;(E||v)&&Ny(e,l)&&(c+=v,h+=E);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(d&&Math.abs(c)<1||!d&&Math.abs(h)<1)&&(u=!0),u},bs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sh=function(e){return[e.deltaX,e.deltaY]},lh=function(e){return e&&"current"in e?e.current:e},U_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},B_=function(e){return` +`)},oh=function(){var e=parseInt(document.body.getAttribute(ao)||"0",10);return isFinite(e)?e:0},OP=function(){f.useEffect(function(){return document.body.setAttribute(ao,(oh()+1).toString()),function(){var e=oh()-1;e<=0?document.body.removeAttribute(ao):document.body.setAttribute(ao,e.toString())}},[])},AP=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;OP();var i=f.useMemo(function(){return RP(o)},[o]);return f.createElement(NP,{styles:MP(i,!t,o,n?"":"!important")})},hc=!1;if(typeof window<"u")try{var Cs=Object.defineProperty({},"passive",{get:function(){return hc=!0,!0}});window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch{hc=!1}var $r=hc?{passive:!1}:!1,jP=function(e){return e.tagName==="TEXTAREA"},Ry=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jP(e)&&n[t]==="visible")},LP=function(e){return Ry(e,"overflowY")},IP=function(e){return Ry(e,"overflowX")},ih=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ny(e,r);if(o){var i=My(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},DP=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$P=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ny=function(e,t){return e==="v"?LP(t):IP(t)},My=function(e,t){return e==="v"?DP(t):$P(t)},FP=function(e,t){return e==="h"&&t==="rtl"?-1:1},zP=function(e,t,n,r,o){var i=FP(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,d=s>0,c=0,h=0;do{if(!l)break;var p=My(e,l),E=p[0],y=p[1],x=p[2],v=y-x-i*E;(E||v)&&Ny(e,l)&&(c+=v,h+=E);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(d&&Math.abs(c)<1||!d&&Math.abs(h)<1)&&(u=!0),u},bs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sh=function(e){return[e.deltaX,e.deltaY]},lh=function(e){return e&&"current"in e?e.current:e},UP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BP=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},V_=0,Fr=[];function W_(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(V_++)[0],i=f.useState(Ty)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=d_([e.lockRef.current],(e.shards||[]).map(lh),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var v=bs(y),g=n.current,w="deltaX"in y?y.deltaX:g[0]-v[0],S="deltaY"in y?y.deltaY:g[1]-v[1],C,b=y.target,P=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in y&&P==="h"&&b.type==="range")return!1;var T=window.getSelection(),j=T&&T.anchorNode,A=j?j===b||j.contains(b):!1;if(A)return!1;var z=ih(P,b);if(!z)return!0;if(z?C=P:(C=P==="v"?"h":"v",z=ih(P,b)),!z)return!1;if(!r.current&&"changedTouches"in y&&(w||S)&&(r.current=C),!C)return!0;var D=r.current||C;return z_(D,x,y,D==="h"?w:S)},[]),a=f.useCallback(function(y){var x=y;if(!(!Fr.length||Fr[Fr.length-1]!==i)){var v="deltaY"in x?sh(x):bs(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&U_(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var w=(s.current.shards||[]).map(lh).filter(Boolean).filter(function(C){return C.contains(x.target)}),S=w.length>0?l(x,w[0]):!s.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=f.useCallback(function(y,x,v,g){var w={name:y,delta:x,target:v,should:g,shadowParent:H_(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=f.useCallback(function(y){n.current=bs(y),r.current=void 0},[]),c=f.useCallback(function(y){u(y.type,sh(y),y.target,l(y,e.lockRef.current))},[]),h=f.useCallback(function(y){u(y.type,bs(y),y.target,l(y,e.lockRef.current))},[]);f.useEffect(function(){return Fr.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",a,$r),document.addEventListener("touchmove",a,$r),document.addEventListener("touchstart",d,$r),function(){Fr=Fr.filter(function(y){return y!==i}),document.removeEventListener("wheel",a,$r),document.removeEventListener("touchmove",a,$r),document.removeEventListener("touchstart",d,$r)}},[]);var p=e.removeScrollBar,E=e.inert;return f.createElement(f.Fragment,null,E?f.createElement(i,{styles:B_(o)}):null,p?f.createElement(A_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const K_=x_(ky,W_);var Oy=f.forwardRef(function(e,t){return f.createElement(ea,zt({},e,{ref:t,sideCar:K_}))});Oy.classNames=ea.classNames;var gc=["Enter"," "],q_=["ArrowDown","PageUp","Home"],Ay=["ArrowUp","PageDown","End"],G_=[...q_,...Ay],Q_={ltr:[...gc,"ArrowRight"],rtl:[...gc,"ArrowLeft"]},Y_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gi="Menu",[ji,X_,J_]=Md(Gi),[Tr,jy]=_r(Gi,[J_,Zl,wy]),ta=Zl(),Ly=wy(),[Z_,Rr]=Tr(Gi),[ek,Qi]=Tr(Gi),Iy=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=ta(t),[a,u]=f.useState(null),d=f.useRef(!1),c=Je(i),h=Bv(o);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),m.jsx($P,{...l,children:m.jsx(Z_,{scope:t,open:n,onOpenChange:c,content:a,onContentChange:u,children:m.jsx(ek,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:h,modal:s,children:r})})})};Iy.displayName=Gi;var tk="MenuAnchor",Ud=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ta(n);return m.jsx(gy,{...o,...r,ref:t})});Ud.displayName=tk;var Bd="MenuPortal",[nk,Dy]=Tr(Bd,{forceMount:void 0}),$y=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Rr(Bd,t);return m.jsx(nk,{scope:t,forceMount:n,children:m.jsx(kr,{present:n||i.open,children:m.jsx(zd,{asChild:!0,container:o,children:r})})})};$y.displayName=Bd;var ht="MenuContent",[rk,Vd]=Tr(ht),Fy=f.forwardRef((e,t)=>{const n=Dy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Qi(ht,e.__scopeMenu);return m.jsx(ji.Provider,{scope:e.__scopeMenu,children:m.jsx(kr,{present:r||i.open,children:m.jsx(ji.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(ok,{...o,ref:t}):m.jsx(ik,{...o,ref:t})})})})}),ok=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return c_(i)},[]),m.jsx(Wd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ik=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu);return m.jsx(Wd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),sk=t_("MenuContent.ScrollLock"),Wd=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,disableOutsideScroll:E,...y}=e,x=Rr(ht,n),v=Qi(ht,n),g=ta(n),w=Ly(n),S=X_(n),[C,b]=f.useState(null),P=f.useRef(null),T=Re(t,P,x.onContentChange),j=f.useRef(0),A=f.useRef(""),z=f.useRef(0),D=f.useRef(null),K=f.useRef("right"),I=f.useRef(0),Y=E?Oy:f.Fragment,U=E?{as:sk,allowPinchZoom:!0}:void 0,H=k=>{var J,Kt;const L=A.current+k,B=S().filter(Pe=>!Pe.disabled),F=document.activeElement,G=(J=B.find(Pe=>Pe.ref.current===F))==null?void 0:J.textValue,X=B.map(Pe=>Pe.textValue),fe=yk(X,L,G),ye=(Kt=B.find(Pe=>Pe.textValue===fe))==null?void 0:Kt.ref.current;(function Pe(At){A.current=At,window.clearTimeout(j.current),At!==""&&(j.current=window.setTimeout(()=>Pe(""),1e3))})(L),ye&&setTimeout(()=>ye.focus())};f.useEffect(()=>()=>window.clearTimeout(j.current),[]),gb();const M=f.useCallback(k=>{var B,F;return K.current===((B=D.current)==null?void 0:B.side)&&xk(k,(F=D.current)==null?void 0:F.area)},[]);return m.jsx(rk,{scope:n,searchRef:A,onItemEnter:f.useCallback(k=>{M(k)&&k.preventDefault()},[M]),onItemLeave:f.useCallback(k=>{var L;M(k)||((L=P.current)==null||L.focus(),b(null))},[M]),onTriggerLeave:f.useCallback(k=>{M(k)&&k.preventDefault()},[M]),pointerGraceTimerRef:z,onPointerGraceIntentChange:f.useCallback(k=>{D.current=k},[]),children:m.jsx(Y,{...U,children:m.jsx(Kv,{asChild:!0,trapped:o,onMountAutoFocus:V(i,k=>{var L;k.preventDefault(),(L=P.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,children:m.jsx(ZP,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:V(a,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(my,{role:"menu","aria-orientation":"vertical","data-state":tw(x.open),"data-radix-menu-content":"",dir:v.dir,...g,...y,ref:T,style:{outline:"none",...y.style},onKeyDown:V(y.onKeyDown,k=>{const B=k.target.closest("[data-radix-menu-content]")===k.currentTarget,F=k.ctrlKey||k.altKey||k.metaKey,G=k.key.length===1;B&&(k.key==="Tab"&&k.preventDefault(),!F&&G&&H(k.key));const X=P.current;if(k.target!==X||!G_.includes(k.key))return;k.preventDefault();const ye=S().filter(J=>!J.disabled).map(J=>J.ref.current);Ay.includes(k.key)&&ye.reverse(),mk(ye)}),onBlur:V(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(j.current),A.current="")}),onPointerMove:V(e.onPointerMove,Li(k=>{const L=k.target,B=I.current!==k.clientX;if(k.currentTarget.contains(L)&&B){const F=k.clientX>I.current?"right":"left";K.current=F,I.current=k.clientX}}))})})})})})})});Fy.displayName=ht;var lk="MenuGroup",Hd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{role:"group",...r,ref:t})});Hd.displayName=lk;var ak="MenuLabel",zy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});zy.displayName=ak;var bl="MenuItem",ah="menu.itemSelect",na=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=f.useRef(null),s=Qi(bl,e.__scopeMenu),l=Vd(bl,e.__scopeMenu),a=Re(t,i),u=f.useRef(!1),d=()=>{const c=i.current;if(!n&&c){const h=new CustomEvent(ah,{bubbles:!0,cancelable:!0});c.addEventListener(ah,p=>r==null?void 0:r(p),{once:!0}),Nd(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return m.jsx(Uy,{...o,ref:a,disabled:n,onClick:V(e.onClick,d),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:V(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:V(e.onKeyDown,c=>{const h=l.searchRef.current!=="";n||h&&c.key===" "||gc.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});na.displayName=bl;var Uy=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=Vd(bl,n),l=Ly(n),a=f.useRef(null),u=Re(t,a),[d,c]=f.useState(!1),[h,p]=f.useState("");return f.useEffect(()=>{const E=a.current;E&&p((E.textContent??"").trim())},[i.children]),m.jsx(ji.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:m.jsx(e_,{asChild:!0,...l,focusable:!r,children:m.jsx(ve.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:V(e.onPointerMove,Li(E=>{r?s.onItemLeave(E):(s.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,Li(E=>s.onItemLeave(E))),onFocus:V(e.onFocus,()=>c(!0)),onBlur:V(e.onBlur,()=>c(!1))})})})}),uk="MenuCheckboxItem",By=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(qy,{scope:e.__scopeMenu,checked:n,children:m.jsx(na,{role:"menuitemcheckbox","aria-checked":Pl(n)?"mixed":n,...o,ref:t,"data-state":qd(n),onSelect:V(o.onSelect,()=>r==null?void 0:r(Pl(n)?!0:!n),{checkForDefaultPrevented:!1})})})});By.displayName=uk;var Vy="MenuRadioGroup",[ck,dk]=Tr(Vy,{value:void 0,onValueChange:()=>{}}),Wy=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Je(r);return m.jsx(ck,{scope:e.__scopeMenu,value:n,onValueChange:i,children:m.jsx(Hd,{...o,ref:t})})});Wy.displayName=Vy;var Hy="MenuRadioItem",Ky=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=dk(Hy,e.__scopeMenu),i=n===o.value;return m.jsx(qy,{scope:e.__scopeMenu,checked:i,children:m.jsx(na,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":qd(i),onSelect:V(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Ky.displayName=Hy;var Kd="MenuItemIndicator",[qy,fk]=Tr(Kd,{checked:!1}),Gy=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=fk(Kd,n);return m.jsx(kr,{present:r||Pl(i.checked)||i.checked===!0,children:m.jsx(ve.span,{...o,ref:t,"data-state":qd(i.checked)})})});Gy.displayName=Kd;var pk="MenuSeparator",Qy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Qy.displayName=pk;var hk="MenuArrow",Yy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ta(n);return m.jsx(vy,{...o,...r,ref:t})});Yy.displayName=hk;var gk="MenuSub",[QN,Xy]=Tr(gk),ei="MenuSubTrigger",Jy=f.forwardRef((e,t)=>{const n=Rr(ei,e.__scopeMenu),r=Qi(ei,e.__scopeMenu),o=Xy(ei,e.__scopeMenu),i=Vd(ei,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:a}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const c=l.current;return()=>{window.clearTimeout(c),a(null)}},[l,a]),m.jsx(Ud,{asChild:!0,...u,children:m.jsx(Uy,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":tw(n.open),...e,ref:Pr(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,Li(c=>{i.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:V(e.onPointerLeave,Li(c=>{var p,E;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const y=(E=n.content)==null?void 0:E.dataset.side,x=y==="right",v=x?-5:5,g=h[x?"left":"right"],w=h[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:c.clientX+v,y:c.clientY},{x:g,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:g,y:h.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(c),c.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,c=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&c.key===" "||Q_[r.dir].includes(c.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),c.preventDefault())})})})});Jy.displayName=ei;var Zy="MenuSubContent",ew=f.forwardRef((e,t)=>{const n=Dy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Qi(ht,e.__scopeMenu),l=Xy(Zy,e.__scopeMenu),a=f.useRef(null),u=Re(t,a);return m.jsx(ji.Provider,{scope:e.__scopeMenu,children:m.jsx(kr,{present:r||i.open,children:m.jsx(ji.Slot,{scope:e.__scopeMenu,children:m.jsx(Wd,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=a.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:V(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{var p;const c=d.currentTarget.contains(d.target),h=Y_[s.dir].includes(d.key);c&&h&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});ew.displayName=Zy;function tw(e){return e?"open":"closed"}function Pl(e){return e==="indeterminate"}function qd(e){return Pl(e)?"indeterminate":e?"checked":"unchecked"}function mk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yk(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=vk(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function wk(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function xk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wk(n,t)}function Li(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Sk=Iy,Ek=Ud,Ck=$y,bk=Fy,Pk=Hd,_k=zy,kk=na,Tk=By,Rk=Wy,Nk=Ky,Mk=Gy,Ok=Qy,Ak=Yy,jk=Jy,Lk=ew,ra="DropdownMenu",[Ik]=_r(ra,[jy]),He=jy(),[Dk,nw]=Ik(ra),rw=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,a=He(t),u=f.useRef(null),[d,c]=Rd({prop:o,defaultProp:i??!1,onChange:s,caller:ra});return m.jsx(Dk,{scope:t,triggerId:uc(),triggerRef:u,contentId:uc(),open:d,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:l,children:m.jsx(Sk,{...a,open:d,onOpenChange:c,dir:r,modal:l,children:n})})};rw.displayName=ra;var ow="DropdownMenuTrigger",iw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=nw(ow,n),s=He(n);return m.jsx(Ek,{asChild:!0,...s,children:m.jsx(ve.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Pr(t,i.triggerRef),onPointerDown:V(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:V(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});iw.displayName=ow;var $k="DropdownMenuPortal",sw=e=>{const{__scopeDropdownMenu:t,...n}=e,r=He(t);return m.jsx(Ck,{...r,...n})};sw.displayName=$k;var lw="DropdownMenuContent",aw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nw(lw,n),i=He(n),s=f.useRef(!1);return m.jsx(bk,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,l=>{var a;s.current||(a=o.triggerRef.current)==null||a.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:V(e.onInteractOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aw.displayName=lw;var Fk="DropdownMenuGroup",zk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Pk,{...o,...r,ref:t})});zk.displayName=Fk;var Uk="DropdownMenuLabel",uw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(_k,{...o,...r,ref:t})});uw.displayName=Uk;var Bk="DropdownMenuItem",cw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(kk,{...o,...r,ref:t})});cw.displayName=Bk;var Vk="DropdownMenuCheckboxItem",dw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Tk,{...o,...r,ref:t})});dw.displayName=Vk;var Wk="DropdownMenuRadioGroup",Hk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Rk,{...o,...r,ref:t})});Hk.displayName=Wk;var Kk="DropdownMenuRadioItem",fw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Nk,{...o,...r,ref:t})});fw.displayName=Kk;var qk="DropdownMenuItemIndicator",pw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Mk,{...o,...r,ref:t})});pw.displayName=qk;var Gk="DropdownMenuSeparator",hw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Ok,{...o,...r,ref:t})});hw.displayName=Gk;var Qk="DropdownMenuArrow",Yk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Ak,{...o,...r,ref:t})});Yk.displayName=Qk;var Xk="DropdownMenuSubTrigger",gw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(jk,{...o,...r,ref:t})});gw.displayName=Xk;var Jk="DropdownMenuSubContent",mw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Lk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mw.displayName=Jk;var Zk=rw,eT=iw,tT=sw,vw=aw,yw=uw,ww=cw,xw=dw,Sw=fw,Ew=pw,Cw=hw,bw=gw,Pw=mw;/** +`)},VP=0,Fr=[];function WP(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(VP++)[0],i=f.useState(Ty)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=dP([e.lockRef.current],(e.shards||[]).map(lh),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var v=bs(y),g=n.current,w="deltaX"in y?y.deltaX:g[0]-v[0],S="deltaY"in y?y.deltaY:g[1]-v[1],C,b=y.target,_=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in y&&_==="h"&&b.type==="range")return!1;var T=window.getSelection(),j=T&&T.anchorNode,A=j?j===b||j.contains(b):!1;if(A)return!1;var z=ih(_,b);if(!z)return!0;if(z?C=_:(C=_==="v"?"h":"v",z=ih(_,b)),!z)return!1;if(!r.current&&"changedTouches"in y&&(w||S)&&(r.current=C),!C)return!0;var D=r.current||C;return zP(D,x,y,D==="h"?w:S)},[]),a=f.useCallback(function(y){var x=y;if(!(!Fr.length||Fr[Fr.length-1]!==i)){var v="deltaY"in x?sh(x):bs(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&UP(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var w=(s.current.shards||[]).map(lh).filter(Boolean).filter(function(C){return C.contains(x.target)}),S=w.length>0?l(x,w[0]):!s.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=f.useCallback(function(y,x,v,g){var w={name:y,delta:x,target:v,should:g,shadowParent:HP(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=f.useCallback(function(y){n.current=bs(y),r.current=void 0},[]),c=f.useCallback(function(y){u(y.type,sh(y),y.target,l(y,e.lockRef.current))},[]),h=f.useCallback(function(y){u(y.type,bs(y),y.target,l(y,e.lockRef.current))},[]);f.useEffect(function(){return Fr.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",a,$r),document.addEventListener("touchmove",a,$r),document.addEventListener("touchstart",d,$r),function(){Fr=Fr.filter(function(y){return y!==i}),document.removeEventListener("wheel",a,$r),document.removeEventListener("touchmove",a,$r),document.removeEventListener("touchstart",d,$r)}},[]);var p=e.removeScrollBar,E=e.inert;return f.createElement(f.Fragment,null,E?f.createElement(i,{styles:BP(o)}):null,p?f.createElement(AP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KP=xP(ky,WP);var Oy=f.forwardRef(function(e,t){return f.createElement(ea,zt({},e,{ref:t,sideCar:KP}))});Oy.classNames=ea.classNames;var gc=["Enter"," "],qP=["ArrowDown","PageUp","Home"],Ay=["ArrowUp","PageDown","End"],GP=[...qP,...Ay],QP={ltr:[...gc,"ArrowRight"],rtl:[...gc,"ArrowLeft"]},YP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gi="Menu",[ji,XP,JP]=Md(Gi),[Tr,jy]=Pr(Gi,[JP,Zl,wy]),ta=Zl(),Ly=wy(),[ZP,Rr]=Tr(Gi),[ek,Qi]=Tr(Gi),Iy=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=ta(t),[a,u]=f.useState(null),d=f.useRef(!1),c=Je(i),h=Bv(o);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),m.jsx($_,{...l,children:m.jsx(ZP,{scope:t,open:n,onOpenChange:c,content:a,onContentChange:u,children:m.jsx(ek,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:h,modal:s,children:r})})})};Iy.displayName=Gi;var tk="MenuAnchor",Ud=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ta(n);return m.jsx(gy,{...o,...r,ref:t})});Ud.displayName=tk;var Bd="MenuPortal",[nk,Dy]=Tr(Bd,{forceMount:void 0}),$y=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Rr(Bd,t);return m.jsx(nk,{scope:t,forceMount:n,children:m.jsx(kr,{present:n||i.open,children:m.jsx(zd,{asChild:!0,container:o,children:r})})})};$y.displayName=Bd;var ht="MenuContent",[rk,Vd]=Tr(ht),Fy=f.forwardRef((e,t)=>{const n=Dy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Qi(ht,e.__scopeMenu);return m.jsx(ji.Provider,{scope:e.__scopeMenu,children:m.jsx(kr,{present:r||i.open,children:m.jsx(ji.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(ok,{...o,ref:t}):m.jsx(ik,{...o,ref:t})})})})}),ok=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return cP(i)},[]),m.jsx(Wd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ik=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu);return m.jsx(Wd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),sk=tP("MenuContent.ScrollLock"),Wd=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,disableOutsideScroll:E,...y}=e,x=Rr(ht,n),v=Qi(ht,n),g=ta(n),w=Ly(n),S=XP(n),[C,b]=f.useState(null),_=f.useRef(null),T=Re(t,_,x.onContentChange),j=f.useRef(0),A=f.useRef(""),z=f.useRef(0),D=f.useRef(null),K=f.useRef("right"),I=f.useRef(0),Y=E?Oy:f.Fragment,U=E?{as:sk,allowPinchZoom:!0}:void 0,H=k=>{var J,Kt;const L=A.current+k,B=S().filter(_e=>!_e.disabled),F=document.activeElement,G=(J=B.find(_e=>_e.ref.current===F))==null?void 0:J.textValue,X=B.map(_e=>_e.textValue),fe=yk(X,L,G),ye=(Kt=B.find(_e=>_e.textValue===fe))==null?void 0:Kt.ref.current;(function _e(At){A.current=At,window.clearTimeout(j.current),At!==""&&(j.current=window.setTimeout(()=>_e(""),1e3))})(L),ye&&setTimeout(()=>ye.focus())};f.useEffect(()=>()=>window.clearTimeout(j.current),[]),gb();const M=f.useCallback(k=>{var B,F;return K.current===((B=D.current)==null?void 0:B.side)&&xk(k,(F=D.current)==null?void 0:F.area)},[]);return m.jsx(rk,{scope:n,searchRef:A,onItemEnter:f.useCallback(k=>{M(k)&&k.preventDefault()},[M]),onItemLeave:f.useCallback(k=>{var L;M(k)||((L=_.current)==null||L.focus(),b(null))},[M]),onTriggerLeave:f.useCallback(k=>{M(k)&&k.preventDefault()},[M]),pointerGraceTimerRef:z,onPointerGraceIntentChange:f.useCallback(k=>{D.current=k},[]),children:m.jsx(Y,{...U,children:m.jsx(Kv,{asChild:!0,trapped:o,onMountAutoFocus:V(i,k=>{var L;k.preventDefault(),(L=_.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,children:m.jsx(Z_,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:V(a,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(my,{role:"menu","aria-orientation":"vertical","data-state":tw(x.open),"data-radix-menu-content":"",dir:v.dir,...g,...y,ref:T,style:{outline:"none",...y.style},onKeyDown:V(y.onKeyDown,k=>{const B=k.target.closest("[data-radix-menu-content]")===k.currentTarget,F=k.ctrlKey||k.altKey||k.metaKey,G=k.key.length===1;B&&(k.key==="Tab"&&k.preventDefault(),!F&&G&&H(k.key));const X=_.current;if(k.target!==X||!GP.includes(k.key))return;k.preventDefault();const ye=S().filter(J=>!J.disabled).map(J=>J.ref.current);Ay.includes(k.key)&&ye.reverse(),mk(ye)}),onBlur:V(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(j.current),A.current="")}),onPointerMove:V(e.onPointerMove,Li(k=>{const L=k.target,B=I.current!==k.clientX;if(k.currentTarget.contains(L)&&B){const F=k.clientX>I.current?"right":"left";K.current=F,I.current=k.clientX}}))})})})})})})});Fy.displayName=ht;var lk="MenuGroup",Hd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{role:"group",...r,ref:t})});Hd.displayName=lk;var ak="MenuLabel",zy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});zy.displayName=ak;var bl="MenuItem",ah="menu.itemSelect",na=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=f.useRef(null),s=Qi(bl,e.__scopeMenu),l=Vd(bl,e.__scopeMenu),a=Re(t,i),u=f.useRef(!1),d=()=>{const c=i.current;if(!n&&c){const h=new CustomEvent(ah,{bubbles:!0,cancelable:!0});c.addEventListener(ah,p=>r==null?void 0:r(p),{once:!0}),Nd(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return m.jsx(Uy,{...o,ref:a,disabled:n,onClick:V(e.onClick,d),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:V(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:V(e.onKeyDown,c=>{const h=l.searchRef.current!=="";n||h&&c.key===" "||gc.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});na.displayName=bl;var Uy=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=Vd(bl,n),l=Ly(n),a=f.useRef(null),u=Re(t,a),[d,c]=f.useState(!1),[h,p]=f.useState("");return f.useEffect(()=>{const E=a.current;E&&p((E.textContent??"").trim())},[i.children]),m.jsx(ji.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:m.jsx(eP,{asChild:!0,...l,focusable:!r,children:m.jsx(ve.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:V(e.onPointerMove,Li(E=>{r?s.onItemLeave(E):(s.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,Li(E=>s.onItemLeave(E))),onFocus:V(e.onFocus,()=>c(!0)),onBlur:V(e.onBlur,()=>c(!1))})})})}),uk="MenuCheckboxItem",By=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(qy,{scope:e.__scopeMenu,checked:n,children:m.jsx(na,{role:"menuitemcheckbox","aria-checked":_l(n)?"mixed":n,...o,ref:t,"data-state":qd(n),onSelect:V(o.onSelect,()=>r==null?void 0:r(_l(n)?!0:!n),{checkForDefaultPrevented:!1})})})});By.displayName=uk;var Vy="MenuRadioGroup",[ck,dk]=Tr(Vy,{value:void 0,onValueChange:()=>{}}),Wy=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Je(r);return m.jsx(ck,{scope:e.__scopeMenu,value:n,onValueChange:i,children:m.jsx(Hd,{...o,ref:t})})});Wy.displayName=Vy;var Hy="MenuRadioItem",Ky=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=dk(Hy,e.__scopeMenu),i=n===o.value;return m.jsx(qy,{scope:e.__scopeMenu,checked:i,children:m.jsx(na,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":qd(i),onSelect:V(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Ky.displayName=Hy;var Kd="MenuItemIndicator",[qy,fk]=Tr(Kd,{checked:!1}),Gy=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=fk(Kd,n);return m.jsx(kr,{present:r||_l(i.checked)||i.checked===!0,children:m.jsx(ve.span,{...o,ref:t,"data-state":qd(i.checked)})})});Gy.displayName=Kd;var pk="MenuSeparator",Qy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ve.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Qy.displayName=pk;var hk="MenuArrow",Yy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ta(n);return m.jsx(vy,{...o,...r,ref:t})});Yy.displayName=hk;var gk="MenuSub",[YN,Xy]=Tr(gk),ei="MenuSubTrigger",Jy=f.forwardRef((e,t)=>{const n=Rr(ei,e.__scopeMenu),r=Qi(ei,e.__scopeMenu),o=Xy(ei,e.__scopeMenu),i=Vd(ei,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:a}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const c=l.current;return()=>{window.clearTimeout(c),a(null)}},[l,a]),m.jsx(Ud,{asChild:!0,...u,children:m.jsx(Uy,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":tw(n.open),...e,ref:_r(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,Li(c=>{i.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:V(e.onPointerLeave,Li(c=>{var p,E;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const y=(E=n.content)==null?void 0:E.dataset.side,x=y==="right",v=x?-5:5,g=h[x?"left":"right"],w=h[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:c.clientX+v,y:c.clientY},{x:g,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:g,y:h.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(c),c.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,c=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&c.key===" "||QP[r.dir].includes(c.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),c.preventDefault())})})})});Jy.displayName=ei;var Zy="MenuSubContent",ew=f.forwardRef((e,t)=>{const n=Dy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Qi(ht,e.__scopeMenu),l=Xy(Zy,e.__scopeMenu),a=f.useRef(null),u=Re(t,a);return m.jsx(ji.Provider,{scope:e.__scopeMenu,children:m.jsx(kr,{present:r||i.open,children:m.jsx(ji.Slot,{scope:e.__scopeMenu,children:m.jsx(Wd,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=a.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:V(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{var p;const c=d.currentTarget.contains(d.target),h=YP[s.dir].includes(d.key);c&&h&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});ew.displayName=Zy;function tw(e){return e?"open":"closed"}function _l(e){return e==="indeterminate"}function qd(e){return _l(e)?"indeterminate":e?"checked":"unchecked"}function mk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yk(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=vk(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function wk(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function xk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wk(n,t)}function Li(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Sk=Iy,Ek=Ud,Ck=$y,bk=Fy,_k=Hd,Pk=zy,kk=na,Tk=By,Rk=Wy,Nk=Ky,Mk=Gy,Ok=Qy,Ak=Yy,jk=Jy,Lk=ew,ra="DropdownMenu",[Ik]=Pr(ra,[jy]),He=jy(),[Dk,nw]=Ik(ra),rw=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,a=He(t),u=f.useRef(null),[d,c]=Rd({prop:o,defaultProp:i??!1,onChange:s,caller:ra});return m.jsx(Dk,{scope:t,triggerId:uc(),triggerRef:u,contentId:uc(),open:d,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:l,children:m.jsx(Sk,{...a,open:d,onOpenChange:c,dir:r,modal:l,children:n})})};rw.displayName=ra;var ow="DropdownMenuTrigger",iw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=nw(ow,n),s=He(n);return m.jsx(Ek,{asChild:!0,...s,children:m.jsx(ve.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:_r(t,i.triggerRef),onPointerDown:V(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:V(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});iw.displayName=ow;var $k="DropdownMenuPortal",sw=e=>{const{__scopeDropdownMenu:t,...n}=e,r=He(t);return m.jsx(Ck,{...r,...n})};sw.displayName=$k;var lw="DropdownMenuContent",aw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nw(lw,n),i=He(n),s=f.useRef(!1);return m.jsx(bk,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,l=>{var a;s.current||(a=o.triggerRef.current)==null||a.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:V(e.onInteractOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aw.displayName=lw;var Fk="DropdownMenuGroup",zk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(_k,{...o,...r,ref:t})});zk.displayName=Fk;var Uk="DropdownMenuLabel",uw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Pk,{...o,...r,ref:t})});uw.displayName=Uk;var Bk="DropdownMenuItem",cw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(kk,{...o,...r,ref:t})});cw.displayName=Bk;var Vk="DropdownMenuCheckboxItem",dw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Tk,{...o,...r,ref:t})});dw.displayName=Vk;var Wk="DropdownMenuRadioGroup",Hk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Rk,{...o,...r,ref:t})});Hk.displayName=Wk;var Kk="DropdownMenuRadioItem",fw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Nk,{...o,...r,ref:t})});fw.displayName=Kk;var qk="DropdownMenuItemIndicator",pw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Mk,{...o,...r,ref:t})});pw.displayName=qk;var Gk="DropdownMenuSeparator",hw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Ok,{...o,...r,ref:t})});hw.displayName=Gk;var Qk="DropdownMenuArrow",Yk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Ak,{...o,...r,ref:t})});Yk.displayName=Qk;var Xk="DropdownMenuSubTrigger",gw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(jk,{...o,...r,ref:t})});gw.displayName=Xk;var Jk="DropdownMenuSubContent",mw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=He(n);return m.jsx(Lk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mw.displayName=Jk;var Zk=rw,eT=iw,tT=sw,vw=aw,yw=uw,ww=cw,xw=dw,Sw=fw,Ew=pw,Cw=hw,bw=gw,_w=mw;/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_w=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + */const nT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -128,12 +128,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oT=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},a)=>f.createElement("svg",{ref:a,...rT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_w("lucide",o),...l},[...s.map(([u,d])=>f.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** + */const oT=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},a)=>f.createElement("svg",{ref:a,...rT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pw("lucide",o),...l},[...s.map(([u,d])=>f.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oa=(e,t)=>{const n=f.forwardRef(({className:r,...o},i)=>f.createElement(oT,{ref:i,iconNode:t,className:_w(`lucide-${nT(e)}`,r),...o}));return n.displayName=`${e}`,n};/** + */const oa=(e,t)=>{const n=f.forwardRef(({className:r,...o},i)=>f.createElement(oT,{ref:i,iconNode:t,className:Pw(`lucide-${nT(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -153,5 +153,5 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aT=oa("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uT=Zk,cT=eT,dT=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(bw,{ref:o,className:Ne("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,m.jsx(sT,{className:"ml-auto h-4 w-4"})]}));dT.displayName=bw.displayName;const fT=f.forwardRef(({className:e,...t},n)=>m.jsx(Pw,{ref:n,className:Ne("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}));fT.displayName=Pw.displayName;const kw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(tT,{children:m.jsx(vw,{ref:r,sideOffset:t,className:Ne("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})}));kw.displayName=vw.displayName;const Cn=f.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(ww,{ref:r,className:Ne("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}));Cn.displayName=ww.displayName;const pT=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(xw,{ref:o,className:Ne("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Ew,{children:m.jsx(iT,{className:"h-4 w-4"})})}),t]}));pT.displayName=xw.displayName;const hT=f.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Sw,{ref:r,className:Ne("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Ew,{children:m.jsx(lT,{className:"h-2 w-2 fill-current"})})}),t]}));hT.displayName=Sw.displayName;const Tw=f.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(yw,{ref:r,className:Ne("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Tw.displayName=yw.displayName;const mc=f.forwardRef(({className:e,...t},n)=>m.jsx(Cw,{ref:n,className:Ne("-mx-1 my-1 h-px bg-muted",e),...t}));mc.displayName=Cw.displayName;function gT(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 mT=({user:e,onLogout:t})=>m.jsxs(uT,{children:[m.jsx(cT,{asChild:!0,children:m.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:m.jsxs(Fv,{className:"h-8 w-8",children:[e.avatar_url&&m.jsx(zv,{src:e.avatar_url,alt:e.username}),m.jsx(Uv,{className:"text-xs",children:gT(e)})]})})}),m.jsxs(kw,{align:"end",className:"w-56",children:[m.jsxs(Tw,{className:"flex flex-col gap-0.5 py-2",children:[m.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),m.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&m.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"})]}),m.jsx(mc,{}),m.jsx(Cn,{asChild:!0,children:m.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/frameworks",children:"Frameworks"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/trends",children:"Trends"})}),e.is_admin&&m.jsxs(m.Fragment,{children:[m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/admin-dashboard",children:"Admin dashboard"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/submissions",children:"Review submissions"})})]}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/settings",children:"Settings"})}),m.jsx(mc,{}),m.jsx(Cn,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),Rw=R.createContext(null),uh="pwc:auth-stale";async function vT(){if(Hi())return null;const e=await fetch(io("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const yT=({children:e})=>{const[t,n]=R.useState(null),[r,o]=R.useState(!0),i=R.useCallback(async()=>{o(!0);const a=await vT();n(a),o(!1)},[]),s=R.useCallback(async()=>{const a=mv("/api/v1/auth/logout");if(new URL(a,window.location.origin).origin!==window.location.origin){const u=document.createElement("form");u.method="POST",u.action=`${a}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(u),u.submit();return}await fetch(io("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);R.useEffect(()=>{i()},[i]),R.useEffect(()=>{const a=()=>n(null);return window.addEventListener(uh,a),()=>window.removeEventListener(uh,a)},[]);const l=R.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return m.jsx(Rw.Provider,{value:l,children:e})};function Gd(){const e=R.useContext(Rw);if(!e)throw new Error("useAuth must be used inside an ");return e}const Qo=({name:e,size:t=14})=>{const n={search:m.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:m.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:m.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:m.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return m.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},ch="https://github.com/huggingface/paperswithcode-feedback/issues",dh=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/submit",label:"Submit",end:!1}],wT=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},xT=()=>{const[e,t]=R.useState(!1);return R.useEffect(()=>{t(wT())},[]),m.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},ST=({onOpenSearch:e})=>{const[t,n]=R.useState(!1),r=()=>n(!1),{user:o,logout:i}=Gd(),s=dn(),l=vv()&&(s.pathname==="/chat"||s.pathname.startsWith("/chat/")),a=`${s.pathname}${s.search}`||"/",u=Hi();return m.jsxs(m.Fragment,{children:[m.jsx("header",{className:`app-header${l?" app-header-chat":""}`,children:m.jsxs("div",{className:"app-header-inner",children:[m.jsxs(Ir,{to:"/",className:"brand",onClick:r,children:[m.jsx("span",{className:"brand-mark"}),m.jsxs("span",{className:"brand-name",children:["Papers ",m.jsx("em",{children:"With Code"})]})]}),m.jsx("nav",{className:"nav",children:dh.map(({to:d,label:c,end:h})=>m.jsx(Ir,{to:d,end:h,className:({isActive:p})=>`nav-item ${p?"active":""}`,children:c},d))}),m.jsx("div",{className:"header-spacer"}),m.jsx("a",{className:"feedback-link header-feedback-link",href:ch,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),m.jsxs("button",{className:"search-trigger",onClick:e,children:[m.jsx(Qo,{name:"search",size:13}),m.jsx("span",{children:"Search papers, authors, domains…"}),m.jsx(xT,{})]}),m.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:m.jsx(Qo,{name:"search",size:14})}),!u&&m.jsx(Ir,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:m.jsx(Qo,{name:"bookmark",size:13})}),u?null:o?m.jsx(mT,{user:o,onLogout:i}):m.jsx(yv,{returnTo:a}),m.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(d=>!d),children:m.jsx(Qo,{name:t?"close":"menu",size:14})})]})}),t&&m.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:m.jsxs("div",{className:"mobile-nav-panel",onClick:d=>d.stopPropagation(),children:[m.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[m.jsx(Qo,{name:"search",size:14}),m.jsx("span",{children:"Search papers, authors, domains…"})]}),dh.map(({to:d,label:c,end:h})=>m.jsx(Ir,{to:d,end:h,className:"mobile-nav-link",onClick:r,children:c},d)),m.jsx("a",{className:"mobile-nav-link",href:ch,target:"_blank",rel:"noreferrer",onClick:r,children:"Submit feedback"}),!u&&m.jsx(Ir,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),!u&&(o==null?void 0:o.is_admin)&&m.jsx(Ir,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:r,children:"Admin dashboard"})]})})]})},ET=1,CT=1e6;let nu=0;function bT(){return nu=(nu+1)%Number.MAX_SAFE_INTEGER,nu.toString()}const ru=new Map,fh=e=>{if(ru.has(e))return;const t=setTimeout(()=>{ru.delete(e),ci({type:"REMOVE_TOAST",toastId:e})},CT);ru.set(e,t)},PT=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ET)};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?fh(n):e.toasts.forEach(r=>{fh(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)}}},Bs=[];let Vs={toasts:[]};function ci(e){Vs=PT(Vs,e),Bs.forEach(t=>{t(Vs)})}function _T({...e}){const t=bT(),n=o=>ci({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ci({type:"DISMISS_TOAST",toastId:t});return ci({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function kT(){const[e,t]=f.useState(Vs);return f.useEffect(()=>(Bs.push(t),()=>{const n=Bs.indexOf(t);n>-1&&Bs.splice(n,1)}),[e]),{...e,toast:_T,dismiss:n=>ci({type:"DISMISS_TOAST",toastId:n})}}var TT=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"}),RT="VisuallyHidden",ia=f.forwardRef((e,t)=>m.jsx(ve.span,{...e,ref:t,style:{...TT,...e.style}}));ia.displayName=RT;var NT=ia,Qd="ToastProvider",[Yd,MT,OT]=Md("Toast"),[Nw]=_r("Toast",[OT]),[AT,sa]=Nw(Qd),Mw=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[l,a]=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 \`${Qd}\`. Expected non-empty \`string\`.`),m.jsx(Yd.Provider,{scope:t,children:m.jsx(AT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:a,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};Mw.displayName=Qd;var Ow="ToastViewport",jT=["F8"],vc="toast.viewportPause",yc="toast.viewportResume",Aw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jT,label:o="Notifications ({hotkey})",...i}=e,s=sa(Ow,n),l=MT(n),a=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=Re(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=s.toastCount>0;f.useEffect(()=>{const x=v=>{var w;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((w=c.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),f.useEffect(()=>{const x=a.current,v=c.current;if(E&&x&&v){const g=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(vc);v.dispatchEvent(b),s.isClosePausedRef.current=!0}},w=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(yc);v.dispatchEvent(b),s.isClosePausedRef.current=!1}},S=b=>{!x.contains(b.relatedTarget)&&w()},C=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",g),x.addEventListener("focusout",S),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",C),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[E,s.isClosePausedRef]);const y=f.useCallback(({tabbingDirection:x})=>{const g=l().map(w=>{const S=w.ref.current,C=[S,...qT(S)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?g.reverse():g).flat()},[l]);return f.useEffect(()=>{const x=c.current;if(x){const v=g=>{var C,b,P;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const T=document.activeElement,j=g.shiftKey;if(g.target===x&&j){(C=u.current)==null||C.focus();return}const D=y({tabbingDirection:j?"backwards":"forwards"}),K=D.findIndex(I=>I===T);ou(D.slice(K+1))?g.preventDefault():j?(b=u.current)==null||b.focus():(P=d.current)==null||P.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[l,y]),m.jsxs(hb,{ref:a,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&m.jsx(wc,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});ou(x)}}),m.jsx(Yd.Slot,{scope:n,children:m.jsx(ve.ol,{tabIndex:-1,...i,ref:h})}),E&&m.jsx(wc,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});ou(x)}})]})});Aw.displayName=Ow;var jw="ToastFocusProxy",wc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=sa(jw,n);return m.jsx(ia,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const l=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});wc.displayName=jw;var Yi="Toast",LT="toast.swipeStart",IT="toast.swipeMove",DT="toast.swipeCancel",$T="toast.swipeEnd",Lw=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[l,a]=Rd({prop:r,defaultProp:o??!0,onChange:i,caller:Yi});return m.jsx(kr,{present:n||l,children:m.jsx(UT,{open:l,...s,ref:t,onClose:()=>a(!1),onPause:Je(e.onPause),onResume:Je(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(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:V(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:V(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`),a(!1)})})})});Lw.displayName=Yi;var[FT,zT]=Nw(Yi,{onClose(){}}),UT=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:l,onPause:a,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...E}=e,y=sa(Yi,n),[x,v]=f.useState(null),g=Re(t,I=>v(I)),w=f.useRef(null),S=f.useRef(null),C=o||y.duration,b=f.useRef(0),P=f.useRef(C),T=f.useRef(0),{onToastAdd:j,onToastRemove:A}=y,z=Je(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=y.viewport)==null||Y.focus()),s()}),D=f.useCallback(I=>{!I||I===1/0||(window.clearTimeout(T.current),b.current=new Date().getTime(),T.current=window.setTimeout(z,I))},[z]);f.useEffect(()=>{const I=y.viewport;if(I){const Y=()=>{D(P.current),u==null||u()},U=()=>{const H=new Date().getTime()-b.current;P.current=P.current-H,window.clearTimeout(T.current),a==null||a()};return I.addEventListener(vc,U),I.addEventListener(yc,Y),()=>{I.removeEventListener(vc,U),I.removeEventListener(yc,Y)}}},[y.viewport,C,a,u,D]),f.useEffect(()=>{i&&!y.isClosePausedRef.current&&D(C)},[i,C,y.isClosePausedRef,D]),f.useEffect(()=>(j(),()=>A()),[j,A]);const K=f.useMemo(()=>x?Bw(x):null,[x]);return y.viewport?m.jsxs(m.Fragment,{children:[K&&m.jsx(BT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:K}),m.jsx(FT,{scope:n,onClose:z,children:Wi.createPortal(m.jsx(Yd.ItemSlot,{scope:n,children:m.jsx(pb,{asChild:!0,onEscapeKeyDown:V(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||z(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(ve.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...E,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:V(e.onPointerDown,I=>{I.button===0&&(w.current={x:I.clientX,y:I.clientY})}),onPointerMove:V(e.onPointerMove,I=>{if(!w.current)return;const Y=I.clientX-w.current.x,U=I.clientY-w.current.y,H=!!S.current,M=["left","right"].includes(y.swipeDirection),k=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,L=M?k(0,Y):0,B=M?0:k(0,U),F=I.pointerType==="touch"?10:2,G={x:L,y:B},X={originalEvent:I,delta:G};H?(S.current=G,Ps(IT,c,X,{discrete:!1})):ph(G,y.swipeDirection,F)?(S.current=G,Ps(LT,d,X,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(Y)>F||Math.abs(U)>F)&&(w.current=null)}),onPointerUp:V(e.onPointerUp,I=>{const Y=S.current,U=I.target;if(U.hasPointerCapture(I.pointerId)&&U.releasePointerCapture(I.pointerId),S.current=null,w.current=null,Y){const H=I.currentTarget,M={originalEvent:I,delta:Y};ph(Y,y.swipeDirection,y.swipeThreshold)?Ps($T,p,M,{discrete:!0}):Ps(DT,h,M,{discrete:!0}),H.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),BT=e=>{const{__scopeToast:t,children:n,...r}=e,o=sa(Yi,t),[i,s]=f.useState(!1),[l,a]=f.useState(!1);return HT(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:m.jsx(zd,{asChild:!0,children:m.jsx(ia,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},VT="ToastTitle",Iw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});Iw.displayName=VT;var WT="ToastDescription",Dw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});Dw.displayName=WT;var $w="ToastAction",Fw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Uw,{altText:n,asChild:!0,children:m.jsx(Xd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$w}\`. Expected non-empty \`string\`.`),null)});Fw.displayName=$w;var zw="ToastClose",Xd=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=zT(zw,n);return m.jsx(Uw,{asChild:!0,children:m.jsx(ve.button,{type:"button",...r,ref:t,onClick:V(e.onClick,o.onClose)})})});Xd.displayName=zw;var Uw=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Bw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),KT(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(...Bw(r))}}),t}function Ps(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?Nd(o,i):o.dispatchEvent(i)}var ph=(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=Je(e);vt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function KT(e){return e.nodeType===e.ELEMENT_NODE}function qT(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 ou(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var GT=Mw,Vw=Aw,Ww=Lw,Hw=Iw,Kw=Dw,qw=Fw,Gw=Xd;const hh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gh=Av,QT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gh(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=hh(d)||hh(c);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),a=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(E=>{let[y,x]=E;return Array.isArray(x)?x.includes({...i,...l}[y]):{...i,...l}[y]===x})?[...u,c,h]:u},[]);return gh(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)},YT=GT,Qw=f.forwardRef(({className:e,...t},n)=>m.jsx(Vw,{ref:n,className:Ne("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}));Qw.displayName=Vw.displayName;const XT=QT("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"}}),Yw=f.forwardRef(({className:e,variant:t,...n},r)=>m.jsx(Ww,{ref:r,className:Ne(XT({variant:t}),e),...n}));Yw.displayName=Ww.displayName;const JT=f.forwardRef(({className:e,...t},n)=>m.jsx(qw,{ref:n,className:Ne("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}));JT.displayName=qw.displayName;const Xw=f.forwardRef(({className:e,...t},n)=>m.jsx(Gw,{ref:n,className:Ne("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:m.jsx(aT,{className:"h-4 w-4"})}));Xw.displayName=Gw.displayName;const Jw=f.forwardRef(({className:e,...t},n)=>m.jsx(Hw,{ref:n,className:Ne("text-sm font-semibold",e),...t}));Jw.displayName=Hw.displayName;const Zw=f.forwardRef(({className:e,...t},n)=>m.jsx(Kw,{ref:n,className:Ne("text-sm opacity-90",e),...t}));Zw.displayName=Kw.displayName;function ZT(){const{toasts:e}=kT();return m.jsxs(YT,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return m.jsxs(Yw,{...i,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(Jw,{children:n}),r&&m.jsx(Zw,{children:r})]}),o,m.jsx(Xw,{})]},t)}),m.jsx(Qw,{})]})}var eR=e=>{switch(e){case"success":return rR;case"info":return iR;case"warning":return oR;case"error":return sR;default:return null}},tR=Array(12).fill(0),nR=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},tR.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),rR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),oR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.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"})),iR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),sR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),lR=R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),aR=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},xc=1,uR=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:xc++,i=this.toasts.find(l=>l.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(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):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 a=>{if(i=["resolve",a],R.isValidElement(a))o=!1,this.create({id:n,type:"default",message:a});else if(dR(a)&&!a.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.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(a):t.success,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async a=>{if(i=["reject",a],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(a):t.error,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var a;o&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),l=()=>new Promise((a,u)=>s.then(()=>i[0]==="reject"?u(i[1]):a(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||xc++;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}},Ke=new uR,cR=(e,t)=>{let n=(t==null?void 0:t.id)||xc++;return Ke.addToast({title:e,...t,id:n}),n},dR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",fR=cR,pR=()=>Ke.toasts,hR=()=>Ke.getActiveToasts();Object.assign(fR,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:pR,getToasts:hR});function gR(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))}gR(`: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%)} -`);function _s(e){return e.label!==void 0}var mR=3,vR="32px",yR="16px",mh=4e3,wR=356,xR=14,SR=20,ER=200;function Et(...e){return e.filter(Boolean).join(" ")}function CR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var bR=e=>{var t,n,r,o,i,s,l,a,u,d,c;let{invert:h,toast:p,unstyled:E,interacting:y,setHeights:x,visibleToasts:v,heights:g,index:w,toasts:S,expanded:C,removeToast:b,defaultRichColors:P,closeButton:T,style:j,cancelButtonStyle:A,actionButtonStyle:z,className:D="",descriptionClassName:K="",duration:I,position:Y,gap:U,loadingIcon:H,expandByDefault:M,classNames:k,icons:L,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:F}=e,[G,X]=R.useState(null),[fe,ye]=R.useState(null),[J,Kt]=R.useState(!1),[Pe,At]=R.useState(!1),[pn,Nr]=R.useState(!1),[hn,Xi]=R.useState(!1),[ua,Ji]=R.useState(!1),[ca,Do]=R.useState(0),[Mr,Zd]=R.useState(0),$o=R.useRef(p.duration||I||mh),ef=R.useRef(null),er=R.useRef(null),c0=w===0,d0=w+1<=v,at=p.type,Or=p.dismissible!==!1,f0=p.className||"",p0=p.descriptionClassName||"",Zi=R.useMemo(()=>g.findIndex(q=>q.toastId===p.id)||0,[g,p.id]),h0=R.useMemo(()=>{var q;return(q=p.closeButton)!=null?q:T},[p.closeButton,T]),tf=R.useMemo(()=>p.duration||I||mh,[p.duration,I]),da=R.useRef(0),Ar=R.useRef(0),nf=R.useRef(0),jr=R.useRef(null),[g0,m0]=Y.split("-"),rf=R.useMemo(()=>g.reduce((q,oe,ce)=>ce>=Zi?q:q+oe.height,0),[g,Zi]),of=aR(),v0=p.invert||h,fa=at==="loading";Ar.current=R.useMemo(()=>Zi*U+rf,[Zi,rf]),R.useEffect(()=>{$o.current=tf},[tf]),R.useEffect(()=>{Kt(!0)},[]),R.useEffect(()=>{let q=er.current;if(q){let oe=q.getBoundingClientRect().height;return Zd(oe),x(ce=>[{toastId:p.id,height:oe,position:p.position},...ce]),()=>x(ce=>ce.filter(yt=>yt.toastId!==p.id))}},[x,p.id]),R.useLayoutEffect(()=>{if(!J)return;let q=er.current,oe=q.style.height;q.style.height="auto";let ce=q.getBoundingClientRect().height;q.style.height=oe,Zd(ce),x(yt=>yt.find(wt=>wt.toastId===p.id)?yt.map(wt=>wt.toastId===p.id?{...wt,height:ce}:wt):[{toastId:p.id,height:ce,position:p.position},...yt])},[J,p.title,p.description,x,p.id]);let gn=R.useCallback(()=>{At(!0),Do(Ar.current),x(q=>q.filter(oe=>oe.toastId!==p.id)),setTimeout(()=>{b(p)},ER)},[p,b,x,Ar]);R.useEffect(()=>{if(p.promise&&at==="loading"||p.duration===1/0||p.type==="loading")return;let q;return C||y||F&&of?(()=>{if(nf.current{var oe;(oe=p.onAutoClose)==null||oe.call(p,p),gn()},$o.current)),()=>clearTimeout(q)},[C,y,p,at,F,of,gn]),R.useEffect(()=>{p.delete&&gn()},[gn,p.delete]);function y0(){var q,oe,ce;return L!=null&&L.loading?R.createElement("div",{className:Et(k==null?void 0:k.loader,(q=p==null?void 0:p.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":at==="loading"},L.loading):H?R.createElement("div",{className:Et(k==null?void 0:k.loader,(oe=p==null?void 0:p.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":at==="loading"},H):R.createElement(nR,{className:Et(k==null?void 0:k.loader,(ce=p==null?void 0:p.classNames)==null?void 0:ce.loader),visible:at==="loading"})}return R.createElement("li",{tabIndex:0,ref:er,className:Et(D,f0,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[at],(n=p==null?void 0:p.classNames)==null?void 0:n[at]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||E),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":ua,"data-removed":Pe,"data-visible":d0,"data-y-position":g0,"data-x-position":m0,"data-index":w,"data-front":c0,"data-swiping":pn,"data-dismissible":Or,"data-type":at,"data-invert":v0,"data-swipe-out":hn,"data-swipe-direction":fe,"data-expanded":!!(C||M&&J),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Pe?ca:Ar.current}px`,"--initial-height":M?"auto":`${Mr}px`,...j,...p.style},onDragEnd:()=>{Nr(!1),X(null),jr.current=null},onPointerDown:q=>{fa||!Or||(ef.current=new Date,Do(Ar.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(Nr(!0),jr.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,oe,ce,yt;if(hn||!Or)return;jr.current=null;let wt=Number(((q=er.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),mn=Number(((oe=er.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tr=new Date().getTime()-((ce=ef.current)==null?void 0:ce.getTime()),xt=G==="x"?wt:mn,vn=Math.abs(xt)/tr;if(Math.abs(xt)>=SR||vn>.11){Do(Ar.current),(yt=p.onDismiss)==null||yt.call(p,p),ye(G==="x"?wt>0?"right":"left":mn>0?"down":"up"),gn(),Xi(!0),Ji(!1);return}Nr(!1),X(null)},onPointerMove:q=>{var oe,ce,yt,wt;if(!jr.current||!Or||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let mn=q.clientY-jr.current.y,tr=q.clientX-jr.current.x,xt=(ce=e.swipeDirections)!=null?ce:CR(Y);!G&&(Math.abs(tr)>1||Math.abs(mn)>1)&&X(Math.abs(tr)>Math.abs(mn)?"x":"y");let vn={x:0,y:0};G==="y"?(xt.includes("top")||xt.includes("bottom"))&&(xt.includes("top")&&mn<0||xt.includes("bottom")&&mn>0)&&(vn.y=mn):G==="x"&&(xt.includes("left")||xt.includes("right"))&&(xt.includes("left")&&tr<0||xt.includes("right")&&tr>0)&&(vn.x=tr),(Math.abs(vn.x)>0||Math.abs(vn.y)>0)&&Ji(!0),(yt=er.current)==null||yt.style.setProperty("--swipe-amount-x",`${vn.x}px`),(wt=er.current)==null||wt.style.setProperty("--swipe-amount-y",`${vn.y}px`)}},h0&&!p.jsx?R.createElement("button",{"aria-label":B,"data-disabled":fa,"data-close-button":!0,onClick:fa||!Or?()=>{}:()=>{var q;gn(),(q=p.onDismiss)==null||q.call(p,p)},className:Et(k==null?void 0:k.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=L==null?void 0:L.close)!=null?i:lR):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:R.createElement(R.Fragment,null,at||p.icon||p.promise?R.createElement("div",{"data-icon":"",className:Et(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||y0():null,p.type!=="loading"?p.icon||(L==null?void 0:L[at])||eR(at):null):null,R.createElement("div",{"data-content":"",className:Et(k==null?void 0:k.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},R.createElement("div",{"data-title":"",className:Et(k==null?void 0:k.title,(a=p==null?void 0:p.classNames)==null?void 0:a.title)},typeof p.title=="function"?p.title():p.title),p.description?R.createElement("div",{"data-description":"",className:Et(K,p0,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&&_s(p.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:q=>{var oe,ce;_s(p.cancel)&&Or&&((ce=(oe=p.cancel).onClick)==null||ce.call(oe,q),gn())},className:Et(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&&_s(p.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:q=>{var oe,ce;_s(p.action)&&((ce=(oe=p.action).onClick)==null||ce.call(oe,q),!q.defaultPrevented&&gn())},className:Et(k==null?void 0:k.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function vh(){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 PR(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",l=i?yR:vR;function a(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?a(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=l:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):a(l)}),n}var _R=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:a,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:E=mR,toastOptions:y,dir:x=vh(),gap:v=xR,loadingIcon:g,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:C}=e,[b,P]=R.useState([]),T=R.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[j,A]=R.useState([]),[z,D]=R.useState(!1),[K,I]=R.useState(!1),[Y,U]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=R.useRef(null),M=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=R.useRef(null),L=R.useRef(!1),B=R.useCallback(F=>{P(G=>{var X;return(X=G.find(fe=>fe.id===F.id))!=null&&X.delete||Ke.dismiss(F.id),G.filter(({id:fe})=>fe!==F.id)})},[]);return R.useEffect(()=>Ke.subscribe(F=>{if(F.dismiss){P(G=>G.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Wm.flushSync(()=>{P(G=>{let X=G.findIndex(fe=>fe.id===F.id);return X!==-1?[...G.slice(0,X),{...G[X],...F},...G.slice(X+1)]:[F,...G]})})})}),[]),R.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:G})=>{U(G?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{U(X?"dark":"light")}catch(fe){console.error(fe)}})}},[d]),R.useEffect(()=>{b.length<=1&&D(!1)},[b]),R.useEffect(()=>{let F=G=>{var X,fe;o.every(ye=>G[ye]||G.code===ye)&&(D(!0),(X=H.current)==null||X.focus()),G.code==="Escape"&&(document.activeElement===H.current||(fe=H.current)!=null&&fe.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),R.useEffect(()=>{if(H.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,L.current=!1)}},[H.current]),R.createElement("section",{ref:t,"aria-label":`${S} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,G)=>{var X;let[fe,ye]=F.split("-");return b.length?R.createElement("ol",{key:F,dir:x==="auto"?vh():x,tabIndex:-1,ref:H,className:l,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":fe,"data-lifted":z&&b.length>1&&!i,"data-x-position":ye,style:{"--front-toast-height":`${((X=j[0])==null?void 0:X.height)||0}px`,"--width":`${wR}px`,"--gap":`${v}px`,...p,...PR(a,u)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,k.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{K||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},b.filter(J=>!J.position&&G===0||J.position===F).map((J,Kt)=>{var Pe,At;return R.createElement(bR,{key:J.id,icons:w,index:Kt,toast:J,defaultRichColors:c,duration:(Pe=y==null?void 0:y.duration)!=null?Pe:h,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:E,closeButton:(At=y==null?void 0:y.closeButton)!=null?At:s,interacting:K,position:F,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:B,toasts:b.filter(pn=>pn.position==J.position),heights:j.filter(pn=>pn.position==J.position),setHeights:A,expandByDefault:i,gap:v,loadingIcon:g,expanded:z,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const kR=({...e})=>{const{theme:t="system"}=QS();return m.jsx(_R,{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 TR=Symbol("radix.slottable");function RR(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=TR,t}var[la]=_r("Tooltip",[Zl]),Jd=Zl(),e0="TooltipProvider",NR=700,yh="tooltip.open",[MR,t0]=la(e0),n0=e=>{const{__scopeTooltip:t,delayDuration:n=NR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),l=f.useRef(!1),a=f.useRef(0);return f.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),m.jsx(MR,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};n0.displayName=e0;var r0="Tooltip",[YN,aa]=la(r0),Sc="TooltipTrigger",OR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=aa(Sc,n),i=t0(Sc,n),s=Jd(n),l=f.useRef(null),a=Re(t,l,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),m.jsx(gy,{asChild:!0,...s,children:m.jsx(ve.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:a,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});OR.displayName=Sc;var AR="TooltipPortal",[XN,jR]=la(AR,{forceMount:void 0}),Ro="TooltipContent",o0=f.forwardRef((e,t)=>{const n=jR(Ro,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=aa(Ro,e.__scopeTooltip);return m.jsx(kr,{present:r||s.open,children:s.disableHoverableContent?m.jsx(i0,{side:o,...i,ref:t}):m.jsx(LR,{side:o,...i,ref:t})})}),LR=f.forwardRef((e,t)=>{const n=aa(Ro,e.__scopeTooltip),r=t0(Ro,e.__scopeTooltip),o=f.useRef(null),i=Re(t,o),[s,l]=f.useState(null),{trigger:a,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{l(null),c(!1)},[c]),p=f.useCallback((E,y)=>{const x=E.currentTarget,v={x:E.clientX,y:E.clientY},g=zR(v,x.getBoundingClientRect()),w=UR(v,g),S=BR(y.getBoundingClientRect()),C=WR([...w,...S]);l(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(a&&d){const E=x=>p(x,d),y=x=>p(x,a);return a.addEventListener("pointerleave",E),d.addEventListener("pointerleave",y),()=>{a.removeEventListener("pointerleave",E),d.removeEventListener("pointerleave",y)}}},[a,d,p,h]),f.useEffect(()=>{if(s){const E=y=>{const x=y.target,v={x:y.clientX,y:y.clientY},g=(a==null?void 0:a.contains(x))||(d==null?void 0:d.contains(x)),w=!VR(v,s);g?h():w&&(h(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[a,d,s,u,h]),m.jsx(i0,{...e,ref:i})}),[IR,DR]=la(r0,{isInside:!1}),$R=RR("TooltipContent"),i0=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,a=aa(Ro,n),u=Jd(n),{onClose:d}=a;return f.useEffect(()=>(document.addEventListener(yh,d),()=>document.removeEventListener(yh,d)),[d]),f.useEffect(()=>{if(a.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(a.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[a.trigger,d]),m.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:m.jsxs(my,{"data-state":a.stateAttribute,...u,...l,ref:t,style:{...l.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:[m.jsx($R,{children:r}),m.jsx(IR,{scope:n,isInside:!0,children:m.jsx(NT,{id:a.contentId,role:"tooltip",children:o||r})})]})})});o0.displayName=Ro;var s0="TooltipArrow",FR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jd(n);return DR(s0,n).isInside?null:m.jsx(vy,{...o,...r,ref:t})});FR.displayName=s0;function zR(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 UR(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 BR(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 VR(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function WR(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),HR(t)}function HR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=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 KR=n0,l0=o0;const qR=KR,GR=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(l0,{ref:r,sideOffset:t,className:Ne("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}));GR.displayName=l0.displayName;function QR(){const{pathname:e,search:t,hash:n}=dn();f.useEffect(()=>{n||window.scrollTo(0,0)},[e,t,n])}const YR="cronAdminToken";function XR(){var e;return typeof window>"u"?"":((e=window.localStorage.getItem(YR))==null?void 0:e.trim())??""}const JR=`${Pd()}/api/v1`,wh=!1;class ZR{constructor(t=JR){pa(this,"baseUrl");this.baseUrl=t}async request(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:o,...i}=n??{},s=XR(),a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",u=await fetch(r,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:{"Content-Type":"application/json",...s?{"X-Admin-Token":s}:{},...o}});if(!u.ok){const c=await u.text();console.error("[API] Error response:",c),u.status===401&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"));const h=new Error(`API request failed: ${u.status} ${u.statusText}`);throw h.status=u.status,h.statusText=u.statusText,h.response=c,h}return u.status===204?void 0:await u.json()}catch(o){throw console.error(`[API] Request to ${r} failed:`,o),o}}async getPapers(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir),t!=null&&t.time&&n.append("time",t.time),t!=null&&t.published_after&&n.append("published_after",t.published_after),t!=null&&t.published_before&&n.append("published_before",t.published_before),t!=null&&t.conference&&n.append("conference",t.conference),(t==null?void 0:t.latest_only)!==void 0&&n.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&n.append("include_resources",t.include_resources.toString());const r=`/papers/${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-cache"})}async searchPapers(t,n=1,r=10,o){const i=new URLSearchParams;return i.append("q",t),i.append("page",n.toString()),i.append("page_size",r.toString()),o&&i.append("mode",o),this.request(`/papers/search?${i.toString()}`)}async getPaper(t,n=!0){const r=`/papers/${t}${n?"?include_resources=true":""}`;return this.request(r)}async getPaperByArxivId(t,n=!0){const r=`/papers/arxiv/${t}${n?"?include_resources=true":""}`;return this.request(r)}async getRelatedPapers(t,n=4){const r=new URLSearchParams({limit:n.toString()});return this.request(`/papers/${encodeURIComponent(t)}/related?${r.toString()}`)}async indexPaperFromArxiv(t){const n=`/papers/index/${t}`;return this.request(n,{method:"POST"})}async submitPaper(t){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(t)})}async updatePaperTasks(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("task_ids",i.toString()));const o=`/papers/${t}/tasks?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperMethods(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("method_ids",i.toString()));const o=`/papers/${t}/methods?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperRepositories(t,n){const r=`/papers/${t}/repositories`;return this.request(r,{method:"PUT",body:JSON.stringify({repositories:n})})}async updatePaperProjectPages(t,n){const r=`/papers/${t}/project-pages`;return this.request(r,{method:"PUT",body:JSON.stringify({project_pages:n})})}async updatePaperSourceUrl(t,n){const r=`/papers/${t}/source-url`;return this.request(r,{method:"PUT",body:JSON.stringify({source_url:n})})}async updatePaperHfArtifacts(t,n){const r=`/papers/${t}/hf-artifacts`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async getTrendingPapers(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.max_age_days&&n.append("max_age_days",t.max_age_days.toString()),(t==null?void 0:t.min_velocity)!==void 0&&n.append("min_velocity",t.min_velocity.toString());const r=`/papers/trending${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getRepositoriesForPaper(t){return this.request(`/papers/${t}/repositories`)}async getRepositories(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.owner&&n.append("owner",t.owner),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.min_stars&&n.append("min_stars",t.min_stars.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/repositories/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getProjectPagesForPaper(t){return this.request(`/papers/${t}/project-pages`)}async getProjectPages(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/project-pages/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthors(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.sort_by&&n.append("sort_by",t.sort_by),t!=null&&t.sort_order&&n.append("sort_order",t.sort_order);const r=`/authors${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthor(t){return this.request(`/authors/${t}`)}async getAreas(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/areas/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getArea(t){return this.request(`/areas/${t}`)}async getAreasWithTasks(){return this.request("/areas/with-tasks/")}async getConferences(){return this.request("/conferences/")}async getConferenceDeadlines(){return this.request("/conferences/deadlines")}async getConference(t){return this.request(`/conferences/${t}`)}async getConferenceAreasWithTasks(t){return this.request(`/conferences/${t}/areas-with-tasks`)}async getConferencePapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.presentation&&r.append("presentation",n.presentation),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/conferences/${t}/papers?${o}`:`/conferences/${t}/papers`;return this.request(i)}async getOrganizations(){return this.request("/organizations/")}async getOrganization(t){return this.request(`/organizations/${t}`)}async getOrganizationAreasWithTasks(t){return this.request(`/organizations/${t}/areas-with-tasks`)}async getOrganizationPapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/organizations/${t}/papers?${o}`:`/organizations/${t}/papers`;return this.request(i)}async getAreaTasks(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString());const o=`/areas/${t}/tasks${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTasks(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.area_id&&n.append("area_id",t.area_id.toString()),t!=null&&t.parent_id&&n.append("parent_id",t.parent_id.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),t!=null&&t.visible_only&&n.append("visible_only","true"),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/tasks/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getTask(t){return this.request(`/tasks/${t}`)}async getTopTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString());const r=n.toString(),o=r?`/tasks/top?${r}`:"/tasks/top";return this.request(o)}async getTrendingTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.recent_days&&n.append("recent_days",t.recent_days.toString()),t!=null&&t.baseline_days&&n.append("baseline_days",t.baseline_days.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),(t==null?void 0:t.min_recent_papers)!==void 0&&n.append("min_recent_papers",t.min_recent_papers.toString()),(t==null?void 0:t.min_baseline_papers)!==void 0&&n.append("min_baseline_papers",t.min_baseline_papers.toString()),(t==null?void 0:t.min_share_lift)!==void 0&&n.append("min_share_lift",t.min_share_lift.toString());const r=n.toString(),o=r?`/tasks/trending?${r}`:"/tasks/trending";return this.request(o)}async getTaskChildren(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.visible_only&&r.append("visible_only","true");const o=`/tasks/${t}/children${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTaskParents(t){return this.request(`/tasks/${t}/parents`)}async getTaskPage(t,n){const r=new URLSearchParams;(n==null?void 0:n.is_open)!==void 0&&r.append("is_open",n.is_open.toString());const o=`/tasks/${t}/page${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTrendingBenchmarks(t,n){const r=new URLSearchParams;(n==null?void 0:n.limit)!==void 0&&r.append("limit",n.limit.toString()),(n==null?void 0:n.recent_days)!==void 0&&r.append("recent_days",n.recent_days.toString()),(n==null?void 0:n.baseline_days)!==void 0&&r.append("baseline_days",n.baseline_days.toString()),(n==null?void 0:n.min_recent_papers)!==void 0&&r.append("min_recent_papers",n.min_recent_papers.toString()),(n==null?void 0:n.include_descendants)!==void 0&&r.append("include_descendants",n.include_descendants.toString()),(n==null?void 0:n.bucket_days)!==void 0&&r.append("bucket_days",n.bucket_days.toString()),(n==null?void 0:n.history_buckets)!==void 0&&r.append("history_buckets",n.history_buckets.toString()),(n==null?void 0:n.is_open)!==void 0&&r.append("is_open",n.is_open.toString());const o=r.toString(),i=`/tasks/${encodeURIComponent(t)}/trending-benchmarks${o?`?${o}`:""}`;return this.request(i)}async getTaskPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/tasks/${t}/papers?${o}`:`/tasks/${t}/papers`;return this.request(i)}async getMethods(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.introduced_year&&n.append("introduced_year",t.introduced_year.toString()),(t==null?void 0:t.area_id)!==void 0&&n.append("area_id",t.area_id.toString()),(t==null?void 0:t.exclude_id)!==void 0&&n.append("exclude_id",t.exclude_id.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/methods/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMethod(t){return this.request(`/methods/${encodeURIComponent(t)}`)}async getMethodPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/methods/${encodeURIComponent(t)}/papers?${o}`:`/methods/${encodeURIComponent(t)}/papers`;return this.request(i)}async getDatasets(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.task&&n.append("task",t.task),t!=null&&t.task_id&&n.append("task",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),(t==null?void 0:t.min_eval_count)!==void 0&&n.append("min_eval_count",t.min_eval_count.toString()),(t==null?void 0:t.is_open)!==void 0&&n.append("is_open",t.is_open.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/datasets/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getDataset(t){return this.request(`/datasets/${t}`)}async getDatasetBySlug(t,n){const r=new URLSearchParams;n!=null&&n.include_paper&&r.set("include_paper","true"),n!=null&&n.task&&r.set("task",n.task),(n==null?void 0:n.is_open)!==void 0&&r.set("is_open",String(n.is_open));const o=r.size?`?${r.toString()}`:"";return this.request(`/datasets/${t}${o}`)}async getDatasetTasks(t){return(await this.request(`/datasets/${t}/tasks/`)).results}async getLeaderboardMetrics(t,n){return(await this.request(`/datasets/${t}/tasks/${n}/metrics`)).metrics}async getEvaluations(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.task_id&&n.append("task_id",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),t!=null&&t.dataset_id&&n.append("dataset_id",t.dataset_id.toString()),t!=null&&t.best_metric&&n.append("best_metric",t.best_metric),(t==null?void 0:t.external)!==void 0&&n.append("external",String(t.external)),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/evaluations/${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getEvaluation(t){return this.request(`/evaluations/${t}`)}async getEvaluationsByPaper(t){const r=parseInt(t),o=await this.getEvaluations({paper_id:r,page_size:100,ordering:"-benchmark_popularity"}),i=[...o.results];let s=o.next_page;for(;s;){const l=await this.getEvaluations({paper_id:r,page:s,page_size:100,ordering:"-benchmark_popularity"});i.push(...l.results),s=l.next_page}return i}async getEvaluationsByDataset(t,n){const o=parseInt(t),i=await this.getEvaluations({dataset_id:o,best_metric:n,page_size:100,ordering:"best_rank"}),s=[...i.results];let l=i.next_page;for(;l;){const a=await this.getEvaluations({dataset_id:o,best_metric:n,page:l,page_size:100,ordering:"best_rank"});s.push(...a.results),l=a.next_page}return s}async createEvaluation(t){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(t)})}async updateEvaluation(t,n){const r=`/evaluations/${t}`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async deleteEvaluation(t){const n=`/evaluations/${t}`;return this.request(n,{method:"DELETE"})}async generateThumbnail(t){const n=io(`/api/thumbnails/generate/${t}`),r=await fetch(n,{method:"POST"});if(!r.ok)throw new Error(`Thumbnail generation failed: ${r.status}`);return await r.json()}async getThumbnailStatus(t){const n=io(`/api/thumbnails/status/${t}`),r=await fetch(n);if(!r.ok)throw new Error(`Thumbnail status check failed: ${r.status}`);return await r.json()}async healthCheck(){const t=io("/health"),n=await fetch(t);if(!n.ok)throw new Error(`Health check failed: ${n.status}`);return await n.json()}async getMetrics(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.direction&&n.append("direction",t.direction),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/metrics/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMetric(t){return this.request(`/metrics/${t}`)}async getMetricDirections(){return this.request("/metrics/directions")}async submitPendingPaperEdit(t){return this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(t)})}async listPendingPaperEdits(t){const n=new URLSearchParams;t!=null&&t.status&&n.append("status",t.status),t!=null&&t.edit_type&&n.append("edit_type",t.edit_type),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString());const r=`/admin/paper-edits${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getPendingPaperEdit(t){return this.request(`/admin/paper-edits/${t}`)}async approvePendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/approve`,{method:"POST",body:JSON.stringify(n??{})})}async rejectPendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/reject`,{method:"POST",body:JSON.stringify(n??{})})}async getMyBookmarkIds(){return this.request("/me/bookmarks/ids")}async getMyBookmarks(){return this.request("/me/bookmarks")}async addBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"POST"})}async removeBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"DELETE"})}async getMyPreferences(){return this.request("/me/preferences")}async updateMyPreferences(t){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(t)})}async getCronStatus(){return this.request("/cron/status",{cache:"no-store"})}async getResearchTrends(){return this.request("/stats/trends")}}const _=new ZR;_.getPapers.bind(_);const JN=_.getPaper.bind(_);_.getPaperByArxivId.bind(_);const ZN=_.indexPaperFromArxiv.bind(_),eM=_.submitPaper.bind(_),tM=_.updatePaperTasks.bind(_),nM=_.updatePaperMethods.bind(_),rM=_.updatePaperRepositories.bind(_),oM=_.updatePaperProjectPages.bind(_),iM=_.updatePaperSourceUrl.bind(_);_.updatePaperHfArtifacts.bind(_);_.getTrendingPapers.bind(_);_.getRepositoriesForPaper.bind(_);_.getRepositories.bind(_);_.getProjectPagesForPaper.bind(_);_.getProjectPages.bind(_);_.getAuthors.bind(_);_.getAuthor.bind(_);_.getAreas.bind(_);_.getArea.bind(_);_.getAreasWithTasks.bind(_);_.getConferences.bind(_);_.getConferenceDeadlines.bind(_);_.getConference.bind(_);_.getConferenceAreasWithTasks.bind(_);_.getConferencePapers.bind(_);_.getOrganizations.bind(_);_.getOrganization.bind(_);_.getOrganizationAreasWithTasks.bind(_);_.getOrganizationPapers.bind(_);_.getAreaTasks.bind(_);const sM=_.getTasks.bind(_),lM=_.getTask.bind(_);_.getTopTasks.bind(_);_.getTrendingTasks.bind(_);_.getTaskChildren.bind(_);_.getTaskParents.bind(_);_.getTaskPage.bind(_);_.getTaskPapers.bind(_);const aM=_.getMethods.bind(_),uM=_.getMethod.bind(_);_.getMethodPapers.bind(_);const cM=_.getDatasets.bind(_),dM=_.getDataset.bind(_);_.getDatasetBySlug.bind(_);_.getDatasetTasks.bind(_);const fM=_.getLeaderboardMetrics.bind(_);_.getEvaluations.bind(_);_.getEvaluation.bind(_);const pM=_.getEvaluationsByPaper.bind(_);_.getEvaluationsByDataset.bind(_);const hM=_.createEvaluation.bind(_),gM=_.updateEvaluation.bind(_),mM=_.deleteEvaluation.bind(_);_.generateThumbnail.bind(_);_.getThumbnailStatus.bind(_);_.getMetrics.bind(_);_.getMetric.bind(_);_.getMetricDirections.bind(_);_.getResearchTrends.bind(_);_.healthCheck.bind(_);_.getMyBookmarkIds.bind(_);_.getMyBookmarks.bind(_);_.addBookmark.bind(_);_.getMyPreferences.bind(_);_.updateMyPreferences.bind(_);const vM=_.submitPendingPaperEdit.bind(_),yM=_.listPendingPaperEdits.bind(_);_.getPendingPaperEdit.bind(_);const wM=_.approvePendingPaperEdit.bind(_),xM=_.rejectPendingPaperEdit.bind(_);_.removeBookmark.bind(_);const iu={hide_closed_source_evals:!1},a0=R.createContext(null),eN=({children:e})=>{const{user:t}=Gd(),[n,r]=R.useState(iu),[o,i]=R.useState(!1);R.useEffect(()=>{let a=!1;if(!t){r(iu);return}return i(!0),_.getMyPreferences().then(u=>{a||r(u)}).catch(()=>{a||r(iu)}).finally(()=>{a||i(!1)}),()=>{a=!0}},[t]);const s=R.useCallback(async a=>{const u={...n,hide_closed_source_evals:a};if(r(u),!!t)try{const d=await _.updateMyPreferences(u);r(d)}catch{r(n)}},[n,t]),l=R.useMemo(()=>({preferences:n,canPersist:!!t,isLoading:o,setHideClosedSourceEvals:s}),[n,t,o,s]);return m.jsx(a0.Provider,{value:l,children:e})};function SM(){const e=R.useContext(a0);if(!e)throw new Error("usePreferences must be used inside a ");return e}const u0=$E(),tN=u0?rE:nE;if(!u0&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const nN=R.lazy(()=>ue(()=>import("./FeedView-DE_cbYeq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),rN=R.lazy(()=>ue(()=>import("./ChatView-BCGQJFEn.js"),__vite__mapDeps([14,6,3,4,15,16,8,17]))),oN=R.lazy(()=>ue(()=>import("./PapersListView-Cl3cg4aG.js"),__vite__mapDeps([18,1,2,3,4,5,7,8,9,19,11,10,12,13]))),iN=R.lazy(()=>ue(()=>import("./PaperDetailView-DhpDOu-D.js"),__vite__mapDeps([20,8,1,2,3,4,5,21,17,22,7,9,12,13,23,24,25,26,27,28,29,30,31,16]))),sN=R.lazy(()=>ue(()=>import("./TagsIndexView-DfMgNEhz.js"),__vite__mapDeps([32,8,5,12,13,33,28,23,25,26,27,29]))),lN=R.lazy(()=>ue(()=>import("./TagBrowseView-ClVbIghl.js"),__vite__mapDeps([34,8,1,2,3,4,5,35,36,15,16,17,7,9,10,12,13,37,31]))),aN=R.lazy(()=>ue(()=>import("./MethodsIndexView-C8nwWxKb.js"),__vite__mapDeps([38,8,12,13,33,28,23,25,26,27,29]))),uN=R.lazy(()=>ue(()=>import("./FrameworksIndexView-E16SQ_m7.js"),__vite__mapDeps([39,1,2,3,4,5]))),cN=R.lazy(()=>ue(()=>import("./TrendsView-DdwMqPok.js"),__vite__mapDeps([40,8,13,12]))),dN=R.lazy(()=>ue(()=>import("./ConferencesIndexView-Btn6PGBN.js"),__vite__mapDeps([41,8,12,13,33,28,23,25,26,27,29]))),fN=R.lazy(()=>ue(()=>import("./AiDeadlinesView-CqVp2xDx.js"),__vite__mapDeps([42,8,43,24,12,13,26]))),pN=R.lazy(()=>ue(()=>import("./ConferenceDetailView-8p_yVjpd.js"),__vite__mapDeps([44,8,36,3,4,15,16,17,5,12,13]))),hN=R.lazy(()=>ue(()=>import("./ConferenceTaskView-C43k4-yt.js"),__vite__mapDeps([45,8,1,2,3,4,5,36,15,16,17,7,9,10,12,13]))),gN=R.lazy(()=>ue(()=>import("./OrganizationsIndexView-CGTYh2nu.js"),__vite__mapDeps([46,8,12,13]))),mN=R.lazy(()=>ue(()=>import("./OrganizationDetailView-C6v-f05b.js"),__vite__mapDeps([47,8,36,3,4,15,16,17,5,12,13,48]))),vN=R.lazy(()=>ue(()=>import("./OrganizationTaskView-CxtwAWXj.js"),__vite__mapDeps([49,8,1,2,3,4,5,7,9,10,12,13,48]))),yN=R.lazy(()=>ue(()=>import("./MethodDetailView-juvY71ct.js"),__vite__mapDeps([50,8,9,1,2,3,4,5,36,15,16,17,10,12,13]))),wN=R.lazy(()=>ue(()=>import("./BenchmarkDetailView-Ch-Y4w1t.js"),__vite__mapDeps([51,8,12,43,24,13,2,3,4,1,5,21,17,35]))),xN=R.lazy(()=>ue(()=>import("./SavedPapersView-Bb2puS13.js"),__vite__mapDeps([52,8,1,2,3,4,5,12,13]))),SN=R.lazy(()=>ue(()=>import("./SettingsView-C5eHJ-g8.js"),__vite__mapDeps([53,43,24,22]))),EN=R.lazy(()=>ue(()=>import("./SubmitView-B_2rf5ES.js"),__vite__mapDeps([54,27,13,23,25]))),CN=R.lazy(()=>ue(()=>import("./CronDashboard-B3JEoT_n.js"),__vite__mapDeps([55,8,30,23,37,56,29,57]))),bN=R.lazy(()=>ue(()=>import("./SubmissionsDashboard-yrnZ-D0f.js"),__vite__mapDeps([58,8,27,56,29]))),PN=R.lazy(()=>ue(()=>import("./NotFound-D2bAWljO.js"),[])),_N=R.lazy(()=>ue(()=>import("./SearchOverlay-6KiZu-e3.js"),__vite__mapDeps([59,8,2,3,4,19,5]))),kN=()=>m.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),m.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),TN=new IE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),RN=()=>{const{arxivId:e}=Ed();return m.jsx(Gn,{to:e?`/paper/${e}`:"/papers",replace:!0})},NN=()=>{const{taskSlug:e}=Ed();return m.jsx(Gn,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},xh=()=>{const{orgSlug:e,taskSlug:t}=Ed();return e?m.jsx(Gn,{to:t?`/${e}/${t}`:`/${e}`,replace:!0}):m.jsx(Gn,{to:"/organizations",replace:!0})},Sh=({element:e})=>Hi()?m.jsx(Gn,{to:"/",replace:!0}):m.jsx(m.Fragment,{children:e}),MN=({element:e})=>{const{user:t,isLoading:n}=Gd();return Hi()?m.jsx(Gn,{to:"/",replace:!0}):n?m.jsx("div",{className:"page",children:m.jsx("div",{className:"submission-loading",children:m.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?m.jsx(m.Fragment,{children:e}):m.jsx("div",{className:"page",children:m.jsxs("div",{className:"submission-empty submission-empty-warn",children:[m.jsx("h1",{children:"Admin access required"}),m.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):m.jsx("div",{className:"page",children:m.jsxs("div",{className:"submission-empty submission-empty-warn",children:[m.jsx("h1",{children:"Sign in required"}),m.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),m.jsx(yv,{returnTo:"/admin-dashboard"})]})})},ON=()=>{const[e,t]=R.useState(!1);return QR(),R.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),m.jsxs(m.Fragment,{children:[m.jsx(ST,{onOpenSearch:()=>t(!0)}),m.jsx("main",{children:m.jsx(R.Suspense,{fallback:m.jsx(kN,{}),children:m.jsxs(q1,{children:[m.jsx(ne,{path:"/",element:m.jsx(nN,{})}),m.jsx(ne,{path:"/chat/:sessionId?",element:vv()?m.jsx(rN,{}):m.jsx(Gn,{to:"/",replace:!0})}),m.jsx(ne,{path:"/papers",element:m.jsx(oN,{})}),m.jsx(ne,{path:"/papers/:arxivId",element:m.jsx(RN,{})}),m.jsx(ne,{path:"/paper/:arxivId",element:m.jsx(iN,{})}),m.jsx(ne,{path:"/tasks",element:m.jsx(sN,{})}),m.jsx(ne,{path:"/tasks/:taskSlug",element:m.jsx(lN,{})}),m.jsx(ne,{path:"/task/:taskSlug",element:m.jsx(NN,{})}),m.jsx(ne,{path:"/methods",element:m.jsx(aN,{})}),m.jsx(ne,{path:"/methods/:methodSlug",element:m.jsx(yN,{})}),m.jsx(ne,{path:"/frameworks",element:m.jsx(uN,{})}),m.jsx(ne,{path:"/trends",element:m.jsx(cN,{})}),m.jsx(ne,{path:"/conferences",element:m.jsx(dN,{})}),m.jsx(ne,{path:"/ai-deadlines",element:m.jsx(fN,{})}),m.jsx(ne,{path:"/conferences/:confSlug",element:m.jsx(pN,{})}),m.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:m.jsx(hN,{})}),m.jsx(ne,{path:"/organizations",element:m.jsx(gN,{})}),m.jsx(ne,{path:"/organizations/:orgSlug",element:m.jsx(xh,{})}),m.jsx(ne,{path:"/organizations/:orgSlug/:taskSlug",element:m.jsx(xh,{})}),m.jsx(ne,{path:"/benchmark/:datasetSlug",element:m.jsx(wN,{})}),m.jsx(ne,{path:"/submit",element:m.jsx(EN,{})}),m.jsx(ne,{path:"/saved",element:m.jsx(Sh,{element:m.jsx(xN,{})})}),m.jsx(ne,{path:"/settings",element:m.jsx(SN,{})}),m.jsx(ne,{path:"/admin-dashboard",element:m.jsx(MN,{element:m.jsx(CN,{})})}),m.jsx(ne,{path:"/cron-dashboard",element:m.jsx(Gn,{to:"/admin-dashboard",replace:!0})}),m.jsx(ne,{path:"/submissions",element:m.jsx(Sh,{element:m.jsx(bN,{})})}),m.jsx(ne,{path:"/:orgSlug",element:m.jsx(mN,{})}),m.jsx(ne,{path:"/:orgSlug/:taskSlug",element:m.jsx(vN,{})}),m.jsx(ne,{path:"*",element:m.jsx(PN,{})})]})})}),e&&m.jsx(R.Suspense,{fallback:null,children:m.jsx(_N,{open:e,onClose:()=>t(!1)})})]})},AN=()=>m.jsx(DE,{client:TN,children:m.jsx(yT,{children:m.jsx(eN,{children:m.jsxs(qR,{children:[m.jsx(tN,{children:m.jsx(ON,{})}),m.jsx(ZT,{}),m.jsx(kR,{}),!1]})})})});r1();const jN=Hm(document.getElementById("root"));jN.render(m.jsx(R.StrictMode,{children:m.jsx(YS,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:m.jsx(t1,{children:m.jsx(AN,{})})})}));export{SM as $,oM as A,iM as B,iT as C,Pr as D,uc as E,gy as F,Zl as G,zd as H,c_ as I,Oy as J,gb as K,zr as L,Kv as M,Gl as N,my as O,kr as P,vy as Q,$P as R,cM as S,mM as T,hM as U,gM as V,fM as W,aT as X,R as Y,Hi as Z,KN as _,Sd as a,uT as a0,cT as a1,kw as a2,Cn as a3,WN as a4,qN as a5,ZN as a6,vt as a7,Md as a8,Bv as a9,Uv as aA,wM as aB,xM as aC,yM as aD,Mi as aE,AE as aF,zN as aG,dn as aH,bE as aI,vE as aJ,rc as aK,uv as aL,gE as aM,mE as aN,nc as aO,sv as aP,ME as aQ,xE as aR,xv as aa,QT as ab,yv as ac,GN as ad,FN as ae,JN as af,IN as ag,Mh as ah,BN as ai,UN as aj,QS as ak,eM as al,ZP as am,e_ as an,wy as ao,HN as ap,ql as aq,Ue as ar,$N as as,lv as at,bt as au,lM as av,uM as aw,dM as ax,Fv as ay,zv as az,_ as b,io as c,Ed as d,Gd as e,oa as f,pM as g,ve as h,vv as i,m as j,Rd as k,Re as l,V as m,MP as n,_r as o,Ne as p,VN as q,f as r,kT as s,vM as t,DN as u,tM as v,sM as w,nM as x,aM as y,rM as z}; + */const aT=oa("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uT=Zk,cT=eT,dT=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(bw,{ref:o,className:Ne("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,m.jsx(sT,{className:"ml-auto h-4 w-4"})]}));dT.displayName=bw.displayName;const fT=f.forwardRef(({className:e,...t},n)=>m.jsx(_w,{ref:n,className:Ne("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}));fT.displayName=_w.displayName;const kw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(tT,{children:m.jsx(vw,{ref:r,sideOffset:t,className:Ne("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})}));kw.displayName=vw.displayName;const Cn=f.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(ww,{ref:r,className:Ne("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}));Cn.displayName=ww.displayName;const pT=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(xw,{ref:o,className:Ne("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Ew,{children:m.jsx(iT,{className:"h-4 w-4"})})}),t]}));pT.displayName=xw.displayName;const hT=f.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Sw,{ref:r,className:Ne("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Ew,{children:m.jsx(lT,{className:"h-2 w-2 fill-current"})})}),t]}));hT.displayName=Sw.displayName;const Tw=f.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(yw,{ref:r,className:Ne("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Tw.displayName=yw.displayName;const mc=f.forwardRef(({className:e,...t},n)=>m.jsx(Cw,{ref:n,className:Ne("-mx-1 my-1 h-px bg-muted",e),...t}));mc.displayName=Cw.displayName;function gT(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 mT=({user:e,onLogout:t})=>m.jsxs(uT,{children:[m.jsx(cT,{asChild:!0,children:m.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:m.jsxs(Fv,{className:"h-8 w-8",children:[e.avatar_url&&m.jsx(zv,{src:e.avatar_url,alt:e.username}),m.jsx(Uv,{className:"text-xs",children:gT(e)})]})})}),m.jsxs(kw,{align:"end",className:"w-56",children:[m.jsxs(Tw,{className:"flex flex-col gap-0.5 py-2",children:[m.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),m.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&m.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"})]}),m.jsx(mc,{}),m.jsx(Cn,{asChild:!0,children:m.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/frameworks",children:"Frameworks"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/trends",children:"Trends"})}),e.is_admin&&m.jsxs(m.Fragment,{children:[m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/admin-dashboard",children:"Admin dashboard"})}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/submissions",children:"Review submissions"})})]}),m.jsx(Cn,{asChild:!0,children:m.jsx(zr,{to:"/settings",children:"Settings"})}),m.jsx(mc,{}),m.jsx(Cn,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),Rw=R.createContext(null),uh="pwc:auth-stale";async function vT(){if(Hi())return null;const e=await fetch(io("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const yT=({children:e})=>{const[t,n]=R.useState(null),[r,o]=R.useState(!0),i=R.useCallback(async()=>{o(!0);const a=await vT();n(a),o(!1)},[]),s=R.useCallback(async()=>{const a=mv("/api/v1/auth/logout");if(new URL(a,window.location.origin).origin!==window.location.origin){const u=document.createElement("form");u.method="POST",u.action=`${a}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(u),u.submit();return}await fetch(io("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);R.useEffect(()=>{i()},[i]),R.useEffect(()=>{const a=()=>n(null);return window.addEventListener(uh,a),()=>window.removeEventListener(uh,a)},[]);const l=R.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return m.jsx(Rw.Provider,{value:l,children:e})};function Gd(){const e=R.useContext(Rw);if(!e)throw new Error("useAuth must be used inside an ");return e}const Qo=({name:e,size:t=14})=>{const n={search:m.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:m.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:m.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:m.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return m.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},ch="https://github.com/huggingface/paperswithcode-feedback/issues",dh=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/submit",label:"Submit",end:!1}],wT=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},xT=()=>{const[e,t]=R.useState(!1);return R.useEffect(()=>{t(wT())},[]),m.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},ST=({onOpenSearch:e})=>{const[t,n]=R.useState(!1),r=()=>n(!1),{user:o,logout:i}=Gd(),s=dn(),l=vv()&&(s.pathname==="/chat"||s.pathname.startsWith("/chat/")),a=`${s.pathname}${s.search}`||"/",u=Hi();return m.jsxs(m.Fragment,{children:[m.jsx("header",{className:`app-header${l?" app-header-chat":""}`,children:m.jsxs("div",{className:"app-header-inner",children:[m.jsxs(Ir,{to:"/",className:"brand",onClick:r,children:[m.jsx("span",{className:"brand-mark"}),m.jsxs("span",{className:"brand-name",children:["Papers ",m.jsx("em",{children:"With Code"})]})]}),m.jsx("nav",{className:"nav",children:dh.map(({to:d,label:c,end:h})=>m.jsx(Ir,{to:d,end:h,className:({isActive:p})=>`nav-item ${p?"active":""}`,children:c},d))}),m.jsx("div",{className:"header-spacer"}),m.jsx("a",{className:"feedback-link header-feedback-link",href:ch,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),m.jsxs("button",{className:"search-trigger",onClick:e,children:[m.jsx(Qo,{name:"search",size:13}),m.jsx("span",{children:"Search papers, authors, domains…"}),m.jsx(xT,{})]}),m.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:m.jsx(Qo,{name:"search",size:14})}),!u&&m.jsx(Ir,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:m.jsx(Qo,{name:"bookmark",size:13})}),u?null:o?m.jsx(mT,{user:o,onLogout:i}):m.jsx(yv,{returnTo:a}),m.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(d=>!d),children:m.jsx(Qo,{name:t?"close":"menu",size:14})})]})}),t&&m.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:m.jsxs("div",{className:"mobile-nav-panel",onClick:d=>d.stopPropagation(),children:[m.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[m.jsx(Qo,{name:"search",size:14}),m.jsx("span",{children:"Search papers, authors, domains…"})]}),dh.map(({to:d,label:c,end:h})=>m.jsx(Ir,{to:d,end:h,className:"mobile-nav-link",onClick:r,children:c},d)),m.jsx("a",{className:"mobile-nav-link",href:ch,target:"_blank",rel:"noreferrer",onClick:r,children:"Submit feedback"}),!u&&m.jsx(Ir,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),!u&&(o==null?void 0:o.is_admin)&&m.jsx(Ir,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:r,children:"Admin dashboard"})]})})]})},ET=1,CT=1e6;let nu=0;function bT(){return nu=(nu+1)%Number.MAX_SAFE_INTEGER,nu.toString()}const ru=new Map,fh=e=>{if(ru.has(e))return;const t=setTimeout(()=>{ru.delete(e),ci({type:"REMOVE_TOAST",toastId:e})},CT);ru.set(e,t)},_T=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ET)};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?fh(n):e.toasts.forEach(r=>{fh(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)}}},Bs=[];let Vs={toasts:[]};function ci(e){Vs=_T(Vs,e),Bs.forEach(t=>{t(Vs)})}function PT({...e}){const t=bT(),n=o=>ci({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ci({type:"DISMISS_TOAST",toastId:t});return ci({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function kT(){const[e,t]=f.useState(Vs);return f.useEffect(()=>(Bs.push(t),()=>{const n=Bs.indexOf(t);n>-1&&Bs.splice(n,1)}),[e]),{...e,toast:PT,dismiss:n=>ci({type:"DISMISS_TOAST",toastId:n})}}var TT=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"}),RT="VisuallyHidden",ia=f.forwardRef((e,t)=>m.jsx(ve.span,{...e,ref:t,style:{...TT,...e.style}}));ia.displayName=RT;var NT=ia,Qd="ToastProvider",[Yd,MT,OT]=Md("Toast"),[Nw]=Pr("Toast",[OT]),[AT,sa]=Nw(Qd),Mw=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[l,a]=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 \`${Qd}\`. Expected non-empty \`string\`.`),m.jsx(Yd.Provider,{scope:t,children:m.jsx(AT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:a,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};Mw.displayName=Qd;var Ow="ToastViewport",jT=["F8"],vc="toast.viewportPause",yc="toast.viewportResume",Aw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jT,label:o="Notifications ({hotkey})",...i}=e,s=sa(Ow,n),l=MT(n),a=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=Re(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=s.toastCount>0;f.useEffect(()=>{const x=v=>{var w;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((w=c.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),f.useEffect(()=>{const x=a.current,v=c.current;if(E&&x&&v){const g=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(vc);v.dispatchEvent(b),s.isClosePausedRef.current=!0}},w=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(yc);v.dispatchEvent(b),s.isClosePausedRef.current=!1}},S=b=>{!x.contains(b.relatedTarget)&&w()},C=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",g),x.addEventListener("focusout",S),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",C),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[E,s.isClosePausedRef]);const y=f.useCallback(({tabbingDirection:x})=>{const g=l().map(w=>{const S=w.ref.current,C=[S,...qT(S)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?g.reverse():g).flat()},[l]);return f.useEffect(()=>{const x=c.current;if(x){const v=g=>{var C,b,_;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const T=document.activeElement,j=g.shiftKey;if(g.target===x&&j){(C=u.current)==null||C.focus();return}const D=y({tabbingDirection:j?"backwards":"forwards"}),K=D.findIndex(I=>I===T);ou(D.slice(K+1))?g.preventDefault():j?(b=u.current)==null||b.focus():(_=d.current)==null||_.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[l,y]),m.jsxs(hb,{ref:a,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&m.jsx(wc,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});ou(x)}}),m.jsx(Yd.Slot,{scope:n,children:m.jsx(ve.ol,{tabIndex:-1,...i,ref:h})}),E&&m.jsx(wc,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});ou(x)}})]})});Aw.displayName=Ow;var jw="ToastFocusProxy",wc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=sa(jw,n);return m.jsx(ia,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const l=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});wc.displayName=jw;var Yi="Toast",LT="toast.swipeStart",IT="toast.swipeMove",DT="toast.swipeCancel",$T="toast.swipeEnd",Lw=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[l,a]=Rd({prop:r,defaultProp:o??!0,onChange:i,caller:Yi});return m.jsx(kr,{present:n||l,children:m.jsx(UT,{open:l,...s,ref:t,onClose:()=>a(!1),onPause:Je(e.onPause),onResume:Je(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(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:V(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:V(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`),a(!1)})})})});Lw.displayName=Yi;var[FT,zT]=Nw(Yi,{onClose(){}}),UT=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:l,onPause:a,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...E}=e,y=sa(Yi,n),[x,v]=f.useState(null),g=Re(t,I=>v(I)),w=f.useRef(null),S=f.useRef(null),C=o||y.duration,b=f.useRef(0),_=f.useRef(C),T=f.useRef(0),{onToastAdd:j,onToastRemove:A}=y,z=Je(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=y.viewport)==null||Y.focus()),s()}),D=f.useCallback(I=>{!I||I===1/0||(window.clearTimeout(T.current),b.current=new Date().getTime(),T.current=window.setTimeout(z,I))},[z]);f.useEffect(()=>{const I=y.viewport;if(I){const Y=()=>{D(_.current),u==null||u()},U=()=>{const H=new Date().getTime()-b.current;_.current=_.current-H,window.clearTimeout(T.current),a==null||a()};return I.addEventListener(vc,U),I.addEventListener(yc,Y),()=>{I.removeEventListener(vc,U),I.removeEventListener(yc,Y)}}},[y.viewport,C,a,u,D]),f.useEffect(()=>{i&&!y.isClosePausedRef.current&&D(C)},[i,C,y.isClosePausedRef,D]),f.useEffect(()=>(j(),()=>A()),[j,A]);const K=f.useMemo(()=>x?Bw(x):null,[x]);return y.viewport?m.jsxs(m.Fragment,{children:[K&&m.jsx(BT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:K}),m.jsx(FT,{scope:n,onClose:z,children:Wi.createPortal(m.jsx(Yd.ItemSlot,{scope:n,children:m.jsx(pb,{asChild:!0,onEscapeKeyDown:V(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||z(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(ve.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...E,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:V(e.onPointerDown,I=>{I.button===0&&(w.current={x:I.clientX,y:I.clientY})}),onPointerMove:V(e.onPointerMove,I=>{if(!w.current)return;const Y=I.clientX-w.current.x,U=I.clientY-w.current.y,H=!!S.current,M=["left","right"].includes(y.swipeDirection),k=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,L=M?k(0,Y):0,B=M?0:k(0,U),F=I.pointerType==="touch"?10:2,G={x:L,y:B},X={originalEvent:I,delta:G};H?(S.current=G,_s(IT,c,X,{discrete:!1})):ph(G,y.swipeDirection,F)?(S.current=G,_s(LT,d,X,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(Y)>F||Math.abs(U)>F)&&(w.current=null)}),onPointerUp:V(e.onPointerUp,I=>{const Y=S.current,U=I.target;if(U.hasPointerCapture(I.pointerId)&&U.releasePointerCapture(I.pointerId),S.current=null,w.current=null,Y){const H=I.currentTarget,M={originalEvent:I,delta:Y};ph(Y,y.swipeDirection,y.swipeThreshold)?_s($T,p,M,{discrete:!0}):_s(DT,h,M,{discrete:!0}),H.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),BT=e=>{const{__scopeToast:t,children:n,...r}=e,o=sa(Yi,t),[i,s]=f.useState(!1),[l,a]=f.useState(!1);return HT(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:m.jsx(zd,{asChild:!0,children:m.jsx(ia,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},VT="ToastTitle",Iw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});Iw.displayName=VT;var WT="ToastDescription",Dw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(ve.div,{...r,ref:t})});Dw.displayName=WT;var $w="ToastAction",Fw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Uw,{altText:n,asChild:!0,children:m.jsx(Xd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$w}\`. Expected non-empty \`string\`.`),null)});Fw.displayName=$w;var zw="ToastClose",Xd=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=zT(zw,n);return m.jsx(Uw,{asChild:!0,children:m.jsx(ve.button,{type:"button",...r,ref:t,onClick:V(e.onClick,o.onClose)})})});Xd.displayName=zw;var Uw=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Bw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),KT(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(...Bw(r))}}),t}function _s(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?Nd(o,i):o.dispatchEvent(i)}var ph=(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=Je(e);vt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function KT(e){return e.nodeType===e.ELEMENT_NODE}function qT(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 ou(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var GT=Mw,Vw=Aw,Ww=Lw,Hw=Iw,Kw=Dw,qw=Fw,Gw=Xd;const hh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gh=Av,QT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gh(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=hh(d)||hh(c);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),a=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(E=>{let[y,x]=E;return Array.isArray(x)?x.includes({...i,...l}[y]):{...i,...l}[y]===x})?[...u,c,h]:u},[]);return gh(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)},YT=GT,Qw=f.forwardRef(({className:e,...t},n)=>m.jsx(Vw,{ref:n,className:Ne("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}));Qw.displayName=Vw.displayName;const XT=QT("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"}}),Yw=f.forwardRef(({className:e,variant:t,...n},r)=>m.jsx(Ww,{ref:r,className:Ne(XT({variant:t}),e),...n}));Yw.displayName=Ww.displayName;const JT=f.forwardRef(({className:e,...t},n)=>m.jsx(qw,{ref:n,className:Ne("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}));JT.displayName=qw.displayName;const Xw=f.forwardRef(({className:e,...t},n)=>m.jsx(Gw,{ref:n,className:Ne("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:m.jsx(aT,{className:"h-4 w-4"})}));Xw.displayName=Gw.displayName;const Jw=f.forwardRef(({className:e,...t},n)=>m.jsx(Hw,{ref:n,className:Ne("text-sm font-semibold",e),...t}));Jw.displayName=Hw.displayName;const Zw=f.forwardRef(({className:e,...t},n)=>m.jsx(Kw,{ref:n,className:Ne("text-sm opacity-90",e),...t}));Zw.displayName=Kw.displayName;function ZT(){const{toasts:e}=kT();return m.jsxs(YT,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return m.jsxs(Yw,{...i,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(Jw,{children:n}),r&&m.jsx(Zw,{children:r})]}),o,m.jsx(Xw,{})]},t)}),m.jsx(Qw,{})]})}var eR=e=>{switch(e){case"success":return rR;case"info":return iR;case"warning":return oR;case"error":return sR;default:return null}},tR=Array(12).fill(0),nR=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},tR.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),rR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),oR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.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"})),iR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),sR=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),lR=R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),aR=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},xc=1,uR=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:xc++,i=this.toasts.find(l=>l.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(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):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 a=>{if(i=["resolve",a],R.isValidElement(a))o=!1,this.create({id:n,type:"default",message:a});else if(dR(a)&&!a.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.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(a):t.success,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async a=>{if(i=["reject",a],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(a):t.error,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var a;o&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),l=()=>new Promise((a,u)=>s.then(()=>i[0]==="reject"?u(i[1]):a(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||xc++;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}},Ke=new uR,cR=(e,t)=>{let n=(t==null?void 0:t.id)||xc++;return Ke.addToast({title:e,...t,id:n}),n},dR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",fR=cR,pR=()=>Ke.toasts,hR=()=>Ke.getActiveToasts();Object.assign(fR,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:pR,getToasts:hR});function gR(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))}gR(`: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%)} +`);function Ps(e){return e.label!==void 0}var mR=3,vR="32px",yR="16px",mh=4e3,wR=356,xR=14,SR=20,ER=200;function Et(...e){return e.filter(Boolean).join(" ")}function CR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var bR=e=>{var t,n,r,o,i,s,l,a,u,d,c;let{invert:h,toast:p,unstyled:E,interacting:y,setHeights:x,visibleToasts:v,heights:g,index:w,toasts:S,expanded:C,removeToast:b,defaultRichColors:_,closeButton:T,style:j,cancelButtonStyle:A,actionButtonStyle:z,className:D="",descriptionClassName:K="",duration:I,position:Y,gap:U,loadingIcon:H,expandByDefault:M,classNames:k,icons:L,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:F}=e,[G,X]=R.useState(null),[fe,ye]=R.useState(null),[J,Kt]=R.useState(!1),[_e,At]=R.useState(!1),[pn,Nr]=R.useState(!1),[hn,Xi]=R.useState(!1),[ua,Ji]=R.useState(!1),[ca,Do]=R.useState(0),[Mr,Zd]=R.useState(0),$o=R.useRef(p.duration||I||mh),ef=R.useRef(null),er=R.useRef(null),c0=w===0,d0=w+1<=v,at=p.type,Or=p.dismissible!==!1,f0=p.className||"",p0=p.descriptionClassName||"",Zi=R.useMemo(()=>g.findIndex(q=>q.toastId===p.id)||0,[g,p.id]),h0=R.useMemo(()=>{var q;return(q=p.closeButton)!=null?q:T},[p.closeButton,T]),tf=R.useMemo(()=>p.duration||I||mh,[p.duration,I]),da=R.useRef(0),Ar=R.useRef(0),nf=R.useRef(0),jr=R.useRef(null),[g0,m0]=Y.split("-"),rf=R.useMemo(()=>g.reduce((q,oe,ce)=>ce>=Zi?q:q+oe.height,0),[g,Zi]),of=aR(),v0=p.invert||h,fa=at==="loading";Ar.current=R.useMemo(()=>Zi*U+rf,[Zi,rf]),R.useEffect(()=>{$o.current=tf},[tf]),R.useEffect(()=>{Kt(!0)},[]),R.useEffect(()=>{let q=er.current;if(q){let oe=q.getBoundingClientRect().height;return Zd(oe),x(ce=>[{toastId:p.id,height:oe,position:p.position},...ce]),()=>x(ce=>ce.filter(yt=>yt.toastId!==p.id))}},[x,p.id]),R.useLayoutEffect(()=>{if(!J)return;let q=er.current,oe=q.style.height;q.style.height="auto";let ce=q.getBoundingClientRect().height;q.style.height=oe,Zd(ce),x(yt=>yt.find(wt=>wt.toastId===p.id)?yt.map(wt=>wt.toastId===p.id?{...wt,height:ce}:wt):[{toastId:p.id,height:ce,position:p.position},...yt])},[J,p.title,p.description,x,p.id]);let gn=R.useCallback(()=>{At(!0),Do(Ar.current),x(q=>q.filter(oe=>oe.toastId!==p.id)),setTimeout(()=>{b(p)},ER)},[p,b,x,Ar]);R.useEffect(()=>{if(p.promise&&at==="loading"||p.duration===1/0||p.type==="loading")return;let q;return C||y||F&&of?(()=>{if(nf.current{var oe;(oe=p.onAutoClose)==null||oe.call(p,p),gn()},$o.current)),()=>clearTimeout(q)},[C,y,p,at,F,of,gn]),R.useEffect(()=>{p.delete&&gn()},[gn,p.delete]);function y0(){var q,oe,ce;return L!=null&&L.loading?R.createElement("div",{className:Et(k==null?void 0:k.loader,(q=p==null?void 0:p.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":at==="loading"},L.loading):H?R.createElement("div",{className:Et(k==null?void 0:k.loader,(oe=p==null?void 0:p.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":at==="loading"},H):R.createElement(nR,{className:Et(k==null?void 0:k.loader,(ce=p==null?void 0:p.classNames)==null?void 0:ce.loader),visible:at==="loading"})}return R.createElement("li",{tabIndex:0,ref:er,className:Et(D,f0,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[at],(n=p==null?void 0:p.classNames)==null?void 0:n[at]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:_,"data-styled":!(p.jsx||p.unstyled||E),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":ua,"data-removed":_e,"data-visible":d0,"data-y-position":g0,"data-x-position":m0,"data-index":w,"data-front":c0,"data-swiping":pn,"data-dismissible":Or,"data-type":at,"data-invert":v0,"data-swipe-out":hn,"data-swipe-direction":fe,"data-expanded":!!(C||M&&J),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${_e?ca:Ar.current}px`,"--initial-height":M?"auto":`${Mr}px`,...j,...p.style},onDragEnd:()=>{Nr(!1),X(null),jr.current=null},onPointerDown:q=>{fa||!Or||(ef.current=new Date,Do(Ar.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(Nr(!0),jr.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,oe,ce,yt;if(hn||!Or)return;jr.current=null;let wt=Number(((q=er.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),mn=Number(((oe=er.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tr=new Date().getTime()-((ce=ef.current)==null?void 0:ce.getTime()),xt=G==="x"?wt:mn,vn=Math.abs(xt)/tr;if(Math.abs(xt)>=SR||vn>.11){Do(Ar.current),(yt=p.onDismiss)==null||yt.call(p,p),ye(G==="x"?wt>0?"right":"left":mn>0?"down":"up"),gn(),Xi(!0),Ji(!1);return}Nr(!1),X(null)},onPointerMove:q=>{var oe,ce,yt,wt;if(!jr.current||!Or||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let mn=q.clientY-jr.current.y,tr=q.clientX-jr.current.x,xt=(ce=e.swipeDirections)!=null?ce:CR(Y);!G&&(Math.abs(tr)>1||Math.abs(mn)>1)&&X(Math.abs(tr)>Math.abs(mn)?"x":"y");let vn={x:0,y:0};G==="y"?(xt.includes("top")||xt.includes("bottom"))&&(xt.includes("top")&&mn<0||xt.includes("bottom")&&mn>0)&&(vn.y=mn):G==="x"&&(xt.includes("left")||xt.includes("right"))&&(xt.includes("left")&&tr<0||xt.includes("right")&&tr>0)&&(vn.x=tr),(Math.abs(vn.x)>0||Math.abs(vn.y)>0)&&Ji(!0),(yt=er.current)==null||yt.style.setProperty("--swipe-amount-x",`${vn.x}px`),(wt=er.current)==null||wt.style.setProperty("--swipe-amount-y",`${vn.y}px`)}},h0&&!p.jsx?R.createElement("button",{"aria-label":B,"data-disabled":fa,"data-close-button":!0,onClick:fa||!Or?()=>{}:()=>{var q;gn(),(q=p.onDismiss)==null||q.call(p,p)},className:Et(k==null?void 0:k.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=L==null?void 0:L.close)!=null?i:lR):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:R.createElement(R.Fragment,null,at||p.icon||p.promise?R.createElement("div",{"data-icon":"",className:Et(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||y0():null,p.type!=="loading"?p.icon||(L==null?void 0:L[at])||eR(at):null):null,R.createElement("div",{"data-content":"",className:Et(k==null?void 0:k.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},R.createElement("div",{"data-title":"",className:Et(k==null?void 0:k.title,(a=p==null?void 0:p.classNames)==null?void 0:a.title)},typeof p.title=="function"?p.title():p.title),p.description?R.createElement("div",{"data-description":"",className:Et(K,p0,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&&Ps(p.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:q=>{var oe,ce;Ps(p.cancel)&&Or&&((ce=(oe=p.cancel).onClick)==null||ce.call(oe,q),gn())},className:Et(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&&Ps(p.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:q=>{var oe,ce;Ps(p.action)&&((ce=(oe=p.action).onClick)==null||ce.call(oe,q),!q.defaultPrevented&&gn())},className:Et(k==null?void 0:k.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function vh(){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 _R(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",l=i?yR:vR;function a(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?a(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=l:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):a(l)}),n}var PR=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:a,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:E=mR,toastOptions:y,dir:x=vh(),gap:v=xR,loadingIcon:g,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:C}=e,[b,_]=R.useState([]),T=R.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[j,A]=R.useState([]),[z,D]=R.useState(!1),[K,I]=R.useState(!1),[Y,U]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=R.useRef(null),M=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=R.useRef(null),L=R.useRef(!1),B=R.useCallback(F=>{_(G=>{var X;return(X=G.find(fe=>fe.id===F.id))!=null&&X.delete||Ke.dismiss(F.id),G.filter(({id:fe})=>fe!==F.id)})},[]);return R.useEffect(()=>Ke.subscribe(F=>{if(F.dismiss){_(G=>G.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Wm.flushSync(()=>{_(G=>{let X=G.findIndex(fe=>fe.id===F.id);return X!==-1?[...G.slice(0,X),{...G[X],...F},...G.slice(X+1)]:[F,...G]})})})}),[]),R.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:G})=>{U(G?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{U(X?"dark":"light")}catch(fe){console.error(fe)}})}},[d]),R.useEffect(()=>{b.length<=1&&D(!1)},[b]),R.useEffect(()=>{let F=G=>{var X,fe;o.every(ye=>G[ye]||G.code===ye)&&(D(!0),(X=H.current)==null||X.focus()),G.code==="Escape"&&(document.activeElement===H.current||(fe=H.current)!=null&&fe.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),R.useEffect(()=>{if(H.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,L.current=!1)}},[H.current]),R.createElement("section",{ref:t,"aria-label":`${S} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,G)=>{var X;let[fe,ye]=F.split("-");return b.length?R.createElement("ol",{key:F,dir:x==="auto"?vh():x,tabIndex:-1,ref:H,className:l,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":fe,"data-lifted":z&&b.length>1&&!i,"data-x-position":ye,style:{"--front-toast-height":`${((X=j[0])==null?void 0:X.height)||0}px`,"--width":`${wR}px`,"--gap":`${v}px`,...p,..._R(a,u)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,k.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{K||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},b.filter(J=>!J.position&&G===0||J.position===F).map((J,Kt)=>{var _e,At;return R.createElement(bR,{key:J.id,icons:w,index:Kt,toast:J,defaultRichColors:c,duration:(_e=y==null?void 0:y.duration)!=null?_e:h,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:E,closeButton:(At=y==null?void 0:y.closeButton)!=null?At:s,interacting:K,position:F,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:B,toasts:b.filter(pn=>pn.position==J.position),heights:j.filter(pn=>pn.position==J.position),setHeights:A,expandByDefault:i,gap:v,loadingIcon:g,expanded:z,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const kR=({...e})=>{const{theme:t="system"}=QS();return m.jsx(PR,{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 TR=Symbol("radix.slottable");function RR(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=TR,t}var[la]=Pr("Tooltip",[Zl]),Jd=Zl(),e0="TooltipProvider",NR=700,yh="tooltip.open",[MR,t0]=la(e0),n0=e=>{const{__scopeTooltip:t,delayDuration:n=NR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),l=f.useRef(!1),a=f.useRef(0);return f.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),m.jsx(MR,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};n0.displayName=e0;var r0="Tooltip",[XN,aa]=la(r0),Sc="TooltipTrigger",OR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=aa(Sc,n),i=t0(Sc,n),s=Jd(n),l=f.useRef(null),a=Re(t,l,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),m.jsx(gy,{asChild:!0,...s,children:m.jsx(ve.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:a,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});OR.displayName=Sc;var AR="TooltipPortal",[JN,jR]=la(AR,{forceMount:void 0}),Ro="TooltipContent",o0=f.forwardRef((e,t)=>{const n=jR(Ro,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=aa(Ro,e.__scopeTooltip);return m.jsx(kr,{present:r||s.open,children:s.disableHoverableContent?m.jsx(i0,{side:o,...i,ref:t}):m.jsx(LR,{side:o,...i,ref:t})})}),LR=f.forwardRef((e,t)=>{const n=aa(Ro,e.__scopeTooltip),r=t0(Ro,e.__scopeTooltip),o=f.useRef(null),i=Re(t,o),[s,l]=f.useState(null),{trigger:a,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{l(null),c(!1)},[c]),p=f.useCallback((E,y)=>{const x=E.currentTarget,v={x:E.clientX,y:E.clientY},g=zR(v,x.getBoundingClientRect()),w=UR(v,g),S=BR(y.getBoundingClientRect()),C=WR([...w,...S]);l(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(a&&d){const E=x=>p(x,d),y=x=>p(x,a);return a.addEventListener("pointerleave",E),d.addEventListener("pointerleave",y),()=>{a.removeEventListener("pointerleave",E),d.removeEventListener("pointerleave",y)}}},[a,d,p,h]),f.useEffect(()=>{if(s){const E=y=>{const x=y.target,v={x:y.clientX,y:y.clientY},g=(a==null?void 0:a.contains(x))||(d==null?void 0:d.contains(x)),w=!VR(v,s);g?h():w&&(h(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[a,d,s,u,h]),m.jsx(i0,{...e,ref:i})}),[IR,DR]=la(r0,{isInside:!1}),$R=RR("TooltipContent"),i0=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,a=aa(Ro,n),u=Jd(n),{onClose:d}=a;return f.useEffect(()=>(document.addEventListener(yh,d),()=>document.removeEventListener(yh,d)),[d]),f.useEffect(()=>{if(a.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(a.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[a.trigger,d]),m.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:m.jsxs(my,{"data-state":a.stateAttribute,...u,...l,ref:t,style:{...l.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:[m.jsx($R,{children:r}),m.jsx(IR,{scope:n,isInside:!0,children:m.jsx(NT,{id:a.contentId,role:"tooltip",children:o||r})})]})})});o0.displayName=Ro;var s0="TooltipArrow",FR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jd(n);return DR(s0,n).isInside?null:m.jsx(vy,{...o,...r,ref:t})});FR.displayName=s0;function zR(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 UR(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 BR(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 VR(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function WR(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),HR(t)}function HR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=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 KR=n0,l0=o0;const qR=KR,GR=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(l0,{ref:r,sideOffset:t,className:Ne("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}));GR.displayName=l0.displayName;function QR(){const{pathname:e,search:t,hash:n}=dn();f.useEffect(()=>{n||window.scrollTo(0,0)},[e,t,n])}const YR="cronAdminToken";function XR(){var e;return typeof window>"u"?"":((e=window.localStorage.getItem(YR))==null?void 0:e.trim())??""}const JR=`${_d()}/api/v1`,wh=!1;class ZR{constructor(t=JR){pa(this,"baseUrl");this.baseUrl=t}async request(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:o,...i}=n??{},s=XR(),a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",u=await fetch(r,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:{"Content-Type":"application/json",...s?{"X-Admin-Token":s}:{},...o}});if(!u.ok){const c=await u.text();console.error("[API] Error response:",c),u.status===401&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"));const h=new Error(`API request failed: ${u.status} ${u.statusText}`);throw h.status=u.status,h.statusText=u.statusText,h.response=c,h}return u.status===204?void 0:await u.json()}catch(o){throw console.error(`[API] Request to ${r} failed:`,o),o}}async getPapers(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir),t!=null&&t.time&&n.append("time",t.time),t!=null&&t.published_after&&n.append("published_after",t.published_after),t!=null&&t.published_before&&n.append("published_before",t.published_before),t!=null&&t.conference&&n.append("conference",t.conference),(t==null?void 0:t.latest_only)!==void 0&&n.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&n.append("include_resources",t.include_resources.toString());const r=`/papers/${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-cache"})}async searchPapers(t,n=1,r=10,o){const i=new URLSearchParams;return i.append("q",t),i.append("page",n.toString()),i.append("page_size",r.toString()),o&&i.append("mode",o),this.request(`/papers/search?${i.toString()}`)}async getPaper(t,n=!0){const r=`/papers/${t}${n?"?include_resources=true":""}`;return this.request(r)}async getPaperByArxivId(t,n=!0){const r=`/papers/arxiv/${t}${n?"?include_resources=true":""}`;return this.request(r)}async getRelatedPapers(t,n=4){const r=new URLSearchParams({limit:n.toString()});return this.request(`/papers/${encodeURIComponent(t)}/related?${r.toString()}`)}async indexPaperFromArxiv(t){const n=`/papers/index/${t}`;return this.request(n,{method:"POST"})}async submitPaper(t){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(t)})}async updatePaperTasks(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("task_ids",i.toString()));const o=`/papers/${t}/tasks?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperMethods(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("method_ids",i.toString()));const o=`/papers/${t}/methods?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperRepositories(t,n){const r=`/papers/${t}/repositories`;return this.request(r,{method:"PUT",body:JSON.stringify({repositories:n})})}async updatePaperProjectPages(t,n){const r=`/papers/${t}/project-pages`;return this.request(r,{method:"PUT",body:JSON.stringify({project_pages:n})})}async updatePaperSourceUrl(t,n){const r=`/papers/${t}/source-url`;return this.request(r,{method:"PUT",body:JSON.stringify({source_url:n})})}async updatePaperHfArtifacts(t,n){const r=`/papers/${t}/hf-artifacts`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async getTrendingPapers(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.max_age_days&&n.append("max_age_days",t.max_age_days.toString()),(t==null?void 0:t.min_velocity)!==void 0&&n.append("min_velocity",t.min_velocity.toString());const r=`/papers/trending${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getRepositoriesForPaper(t){return this.request(`/papers/${t}/repositories`)}async getRepositories(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.owner&&n.append("owner",t.owner),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.min_stars&&n.append("min_stars",t.min_stars.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/repositories/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getProjectPagesForPaper(t){return this.request(`/papers/${t}/project-pages`)}async getProjectPages(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/project-pages/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthors(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.sort_by&&n.append("sort_by",t.sort_by),t!=null&&t.sort_order&&n.append("sort_order",t.sort_order);const r=`/authors${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthor(t){return this.request(`/authors/${t}`)}async getAuthorPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString());const o=r.toString();return this.request(`/authors/${t}/papers${o?`?${o}`:""}`)}async getAreas(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/areas/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getArea(t){return this.request(`/areas/${t}`)}async getAreasWithTasks(){return this.request("/areas/with-tasks/")}async getConferences(){return this.request("/conferences/")}async getConferenceDeadlines(){return this.request("/conferences/deadlines")}async getConference(t){return this.request(`/conferences/${t}`)}async getConferenceAreasWithTasks(t){return this.request(`/conferences/${t}/areas-with-tasks`)}async getConferencePapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.presentation&&r.append("presentation",n.presentation),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/conferences/${t}/papers?${o}`:`/conferences/${t}/papers`;return this.request(i)}async getOrganizations(){return this.request("/organizations/")}async getOrganization(t){return this.request(`/organizations/${t}`)}async getOrganizationAreasWithTasks(t){return this.request(`/organizations/${t}/areas-with-tasks`)}async getOrganizationPapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/organizations/${t}/papers?${o}`:`/organizations/${t}/papers`;return this.request(i)}async getAreaTasks(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString());const o=`/areas/${t}/tasks${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTasks(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.area_id&&n.append("area_id",t.area_id.toString()),t!=null&&t.parent_id&&n.append("parent_id",t.parent_id.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),t!=null&&t.visible_only&&n.append("visible_only","true"),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/tasks/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getTask(t){return this.request(`/tasks/${t}`)}async getTopTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString());const r=n.toString(),o=r?`/tasks/top?${r}`:"/tasks/top";return this.request(o)}async getTrendingTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.recent_days&&n.append("recent_days",t.recent_days.toString()),t!=null&&t.baseline_days&&n.append("baseline_days",t.baseline_days.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),(t==null?void 0:t.min_recent_papers)!==void 0&&n.append("min_recent_papers",t.min_recent_papers.toString()),(t==null?void 0:t.min_baseline_papers)!==void 0&&n.append("min_baseline_papers",t.min_baseline_papers.toString()),(t==null?void 0:t.min_share_lift)!==void 0&&n.append("min_share_lift",t.min_share_lift.toString());const r=n.toString(),o=r?`/tasks/trending?${r}`:"/tasks/trending";return this.request(o)}async getTaskChildren(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.visible_only&&r.append("visible_only","true");const o=`/tasks/${t}/children${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTaskParents(t){return this.request(`/tasks/${t}/parents`)}async getTaskPage(t,n){const r=new URLSearchParams;(n==null?void 0:n.is_open)!==void 0&&r.append("is_open",n.is_open.toString());const o=`/tasks/${t}/page${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTrendingBenchmarks(t,n){const r=new URLSearchParams;(n==null?void 0:n.limit)!==void 0&&r.append("limit",n.limit.toString()),(n==null?void 0:n.recent_days)!==void 0&&r.append("recent_days",n.recent_days.toString()),(n==null?void 0:n.baseline_days)!==void 0&&r.append("baseline_days",n.baseline_days.toString()),(n==null?void 0:n.min_recent_papers)!==void 0&&r.append("min_recent_papers",n.min_recent_papers.toString()),(n==null?void 0:n.include_descendants)!==void 0&&r.append("include_descendants",n.include_descendants.toString()),(n==null?void 0:n.bucket_days)!==void 0&&r.append("bucket_days",n.bucket_days.toString()),(n==null?void 0:n.history_buckets)!==void 0&&r.append("history_buckets",n.history_buckets.toString()),(n==null?void 0:n.is_open)!==void 0&&r.append("is_open",n.is_open.toString());const o=r.toString(),i=`/tasks/${encodeURIComponent(t)}/trending-benchmarks${o?`?${o}`:""}`;return this.request(i)}async getTaskPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/tasks/${t}/papers?${o}`:`/tasks/${t}/papers`;return this.request(i)}async getMethods(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.introduced_year&&n.append("introduced_year",t.introduced_year.toString()),(t==null?void 0:t.area_id)!==void 0&&n.append("area_id",t.area_id.toString()),(t==null?void 0:t.exclude_id)!==void 0&&n.append("exclude_id",t.exclude_id.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/methods/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMethod(t){return this.request(`/methods/${encodeURIComponent(t)}`)}async getMethodPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/methods/${encodeURIComponent(t)}/papers?${o}`:`/methods/${encodeURIComponent(t)}/papers`;return this.request(i)}async getDatasets(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.task&&n.append("task",t.task),t!=null&&t.task_id&&n.append("task",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),(t==null?void 0:t.min_eval_count)!==void 0&&n.append("min_eval_count",t.min_eval_count.toString()),(t==null?void 0:t.is_open)!==void 0&&n.append("is_open",t.is_open.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/datasets/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getDataset(t){return this.request(`/datasets/${t}`)}async getDatasetBySlug(t,n){const r=new URLSearchParams;n!=null&&n.include_paper&&r.set("include_paper","true"),n!=null&&n.task&&r.set("task",n.task),(n==null?void 0:n.is_open)!==void 0&&r.set("is_open",String(n.is_open));const o=r.size?`?${r.toString()}`:"";return this.request(`/datasets/${t}${o}`)}async getDatasetTasks(t){return(await this.request(`/datasets/${t}/tasks/`)).results}async getLeaderboardMetrics(t,n){return(await this.request(`/datasets/${t}/tasks/${n}/metrics`)).metrics}async getEvaluations(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.task_id&&n.append("task_id",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),t!=null&&t.dataset_id&&n.append("dataset_id",t.dataset_id.toString()),t!=null&&t.best_metric&&n.append("best_metric",t.best_metric),(t==null?void 0:t.external)!==void 0&&n.append("external",String(t.external)),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/evaluations/${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getEvaluation(t){return this.request(`/evaluations/${t}`)}async getEvaluationsByPaper(t){const r=parseInt(t),o=await this.getEvaluations({paper_id:r,page_size:100,ordering:"-benchmark_popularity"}),i=[...o.results];let s=o.next_page;for(;s;){const l=await this.getEvaluations({paper_id:r,page:s,page_size:100,ordering:"-benchmark_popularity"});i.push(...l.results),s=l.next_page}return i}async getEvaluationsByDataset(t,n){const o=parseInt(t),i=await this.getEvaluations({dataset_id:o,best_metric:n,page_size:100,ordering:"best_rank"}),s=[...i.results];let l=i.next_page;for(;l;){const a=await this.getEvaluations({dataset_id:o,best_metric:n,page:l,page_size:100,ordering:"best_rank"});s.push(...a.results),l=a.next_page}return s}async createEvaluation(t){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(t)})}async updateEvaluation(t,n){const r=`/evaluations/${t}`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async deleteEvaluation(t){const n=`/evaluations/${t}`;return this.request(n,{method:"DELETE"})}async generateThumbnail(t){const n=io(`/api/thumbnails/generate/${t}`),r=await fetch(n,{method:"POST"});if(!r.ok)throw new Error(`Thumbnail generation failed: ${r.status}`);return await r.json()}async getThumbnailStatus(t){const n=io(`/api/thumbnails/status/${t}`),r=await fetch(n);if(!r.ok)throw new Error(`Thumbnail status check failed: ${r.status}`);return await r.json()}async healthCheck(){const t=io("/health"),n=await fetch(t);if(!n.ok)throw new Error(`Health check failed: ${n.status}`);return await n.json()}async getMetrics(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.direction&&n.append("direction",t.direction),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/metrics/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMetric(t){return this.request(`/metrics/${t}`)}async getMetricDirections(){return this.request("/metrics/directions")}async submitPendingPaperEdit(t){return this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(t)})}async listPendingPaperEdits(t){const n=new URLSearchParams;t!=null&&t.status&&n.append("status",t.status),t!=null&&t.edit_type&&n.append("edit_type",t.edit_type),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString());const r=`/admin/paper-edits${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getPendingPaperEdit(t){return this.request(`/admin/paper-edits/${t}`)}async approvePendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/approve`,{method:"POST",body:JSON.stringify(n??{})})}async rejectPendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/reject`,{method:"POST",body:JSON.stringify(n??{})})}async getMyBookmarkIds(){return this.request("/me/bookmarks/ids")}async getMyBookmarks(){return this.request("/me/bookmarks")}async addBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"POST"})}async removeBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"DELETE"})}async getMyPreferences(){return this.request("/me/preferences")}async updateMyPreferences(t){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(t)})}async getCronStatus(){return this.request("/cron/status",{cache:"no-store"})}async getResearchTrends(){return this.request("/stats/trends")}}const P=new ZR;P.getPapers.bind(P);const ZN=P.getPaper.bind(P);P.getPaperByArxivId.bind(P);const eM=P.indexPaperFromArxiv.bind(P),tM=P.submitPaper.bind(P),nM=P.updatePaperTasks.bind(P),rM=P.updatePaperMethods.bind(P),oM=P.updatePaperRepositories.bind(P),iM=P.updatePaperProjectPages.bind(P),sM=P.updatePaperSourceUrl.bind(P);P.updatePaperHfArtifacts.bind(P);P.getTrendingPapers.bind(P);P.getRepositoriesForPaper.bind(P);P.getRepositories.bind(P);P.getProjectPagesForPaper.bind(P);P.getProjectPages.bind(P);P.getAuthors.bind(P);P.getAuthor.bind(P);P.getAreas.bind(P);P.getArea.bind(P);P.getAreasWithTasks.bind(P);P.getConferences.bind(P);P.getConferenceDeadlines.bind(P);P.getConference.bind(P);P.getConferenceAreasWithTasks.bind(P);P.getConferencePapers.bind(P);P.getOrganizations.bind(P);P.getOrganization.bind(P);P.getOrganizationAreasWithTasks.bind(P);P.getOrganizationPapers.bind(P);P.getAreaTasks.bind(P);const lM=P.getTasks.bind(P),aM=P.getTask.bind(P);P.getTopTasks.bind(P);P.getTrendingTasks.bind(P);P.getTaskChildren.bind(P);P.getTaskParents.bind(P);P.getTaskPage.bind(P);P.getTaskPapers.bind(P);const uM=P.getMethods.bind(P),cM=P.getMethod.bind(P);P.getMethodPapers.bind(P);const dM=P.getDatasets.bind(P),fM=P.getDataset.bind(P);P.getDatasetBySlug.bind(P);P.getDatasetTasks.bind(P);const pM=P.getLeaderboardMetrics.bind(P);P.getEvaluations.bind(P);P.getEvaluation.bind(P);const hM=P.getEvaluationsByPaper.bind(P);P.getEvaluationsByDataset.bind(P);const gM=P.createEvaluation.bind(P),mM=P.updateEvaluation.bind(P),vM=P.deleteEvaluation.bind(P);P.generateThumbnail.bind(P);P.getThumbnailStatus.bind(P);P.getMetrics.bind(P);P.getMetric.bind(P);P.getMetricDirections.bind(P);P.getResearchTrends.bind(P);P.healthCheck.bind(P);P.getMyBookmarkIds.bind(P);P.getMyBookmarks.bind(P);P.addBookmark.bind(P);P.getMyPreferences.bind(P);P.updateMyPreferences.bind(P);const yM=P.submitPendingPaperEdit.bind(P),wM=P.listPendingPaperEdits.bind(P);P.getPendingPaperEdit.bind(P);const xM=P.approvePendingPaperEdit.bind(P),SM=P.rejectPendingPaperEdit.bind(P);P.removeBookmark.bind(P);const iu={hide_closed_source_evals:!1},a0=R.createContext(null),eN=({children:e})=>{const{user:t}=Gd(),[n,r]=R.useState(iu),[o,i]=R.useState(!1);R.useEffect(()=>{let a=!1;if(!t){r(iu);return}return i(!0),P.getMyPreferences().then(u=>{a||r(u)}).catch(()=>{a||r(iu)}).finally(()=>{a||i(!1)}),()=>{a=!0}},[t]);const s=R.useCallback(async a=>{const u={...n,hide_closed_source_evals:a};if(r(u),!!t)try{const d=await P.updateMyPreferences(u);r(d)}catch{r(n)}},[n,t]),l=R.useMemo(()=>({preferences:n,canPersist:!!t,isLoading:o,setHideClosedSourceEvals:s}),[n,t,o,s]);return m.jsx(a0.Provider,{value:l,children:e})};function EM(){const e=R.useContext(a0);if(!e)throw new Error("usePreferences must be used inside a ");return e}const u0=$E(),tN=u0?rE:nE;if(!u0&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const nN=R.lazy(()=>se(()=>import("./FeedView-CN0Q9tkf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),rN=R.lazy(()=>se(()=>import("./ChatView-CZcqmRIk.js"),__vite__mapDeps([14,6,3,4,15,16,8,17]))),oN=R.lazy(()=>se(()=>import("./PapersListView-BWkrERaM.js"),__vite__mapDeps([18,1,2,3,4,5,7,8,9,19,11,10,12,13]))),iN=R.lazy(()=>se(()=>import("./PaperDetailView-xIdW2JSy.js"),__vite__mapDeps([20,8,1,2,3,4,5,21,17,22,7,9,12,13,23,24,25,26,27,28,29,30,31,16]))),sN=R.lazy(()=>se(()=>import("./TagsIndexView-SPf3jDGK.js"),__vite__mapDeps([32,8,5,12,13,33,28,23,25,26,27,29]))),lN=R.lazy(()=>se(()=>import("./TagBrowseView-BX-GwgjY.js"),__vite__mapDeps([34,8,1,2,3,4,5,35,36,15,16,17,7,9,10,12,13,37,31]))),aN=R.lazy(()=>se(()=>import("./MethodsIndexView-DrXSSTgg.js"),__vite__mapDeps([38,8,12,13,33,28,23,25,26,27,29]))),uN=R.lazy(()=>se(()=>import("./FrameworksIndexView-BohW9nNa.js"),__vite__mapDeps([39,1,2,3,4,5]))),cN=R.lazy(()=>se(()=>import("./TrendsView-DU4iFMLV.js"),__vite__mapDeps([40,8,13,12]))),dN=R.lazy(()=>se(()=>import("./ConferencesIndexView-CAuDOq-J.js"),__vite__mapDeps([41,8,12,13,33,28,23,25,26,27,29]))),fN=R.lazy(()=>se(()=>import("./AiDeadlinesView-D2u6GuEG.js"),__vite__mapDeps([42,8,43,24,12,13,26]))),pN=R.lazy(()=>se(()=>import("./ConferenceDetailView-BUTsuBU8.js"),__vite__mapDeps([44,8,36,3,4,15,16,17,5,12,13]))),hN=R.lazy(()=>se(()=>import("./ConferenceTaskView-BOaZO01e.js"),__vite__mapDeps([45,8,1,2,3,4,5,36,15,16,17,7,9,10,12,13]))),gN=R.lazy(()=>se(()=>import("./OrganizationsIndexView-BVmFsOq_.js"),__vite__mapDeps([46,8,12,13]))),mN=R.lazy(()=>se(()=>import("./OrganizationDetailView-B9UCvr8P.js"),__vite__mapDeps([47,8,36,3,4,15,16,17,5,12,13,48]))),vN=R.lazy(()=>se(()=>import("./OrganizationTaskView-VN_RdDoW.js"),__vite__mapDeps([49,8,1,2,3,4,5,7,9,10,12,13,48]))),yN=R.lazy(()=>se(()=>import("./AuthorDetailView-biYTIR2y.js"),__vite__mapDeps([50,8,12,48]))),wN=R.lazy(()=>se(()=>import("./MethodDetailView-ClFfXzVB.js"),__vite__mapDeps([51,8,9,1,2,3,4,5,36,15,16,17,10,12,13]))),xN=R.lazy(()=>se(()=>import("./BenchmarkDetailView-DXXwkMF6.js"),__vite__mapDeps([52,8,12,43,24,13,2,3,4,1,5,21,17,35]))),SN=R.lazy(()=>se(()=>import("./SavedPapersView-DN1bdjfb.js"),__vite__mapDeps([53,8,1,2,3,4,5,12,13]))),EN=R.lazy(()=>se(()=>import("./SettingsView-CxN_MMdg.js"),__vite__mapDeps([54,43,24,22]))),CN=R.lazy(()=>se(()=>import("./SubmitView-CZpScvZm.js"),__vite__mapDeps([55,27,13,23,25]))),bN=R.lazy(()=>se(()=>import("./CronDashboard-BHCv8xsU.js"),__vite__mapDeps([56,8,30,23,37,57,29,58]))),_N=R.lazy(()=>se(()=>import("./SubmissionsDashboard-DRjK6x_I.js"),__vite__mapDeps([59,8,27,57,29]))),PN=R.lazy(()=>se(()=>import("./NotFound-BOZqMg2G.js"),[])),kN=R.lazy(()=>se(()=>import("./SearchOverlay-BfdeDJKQ.js"),__vite__mapDeps([60,8,2,3,4,19,5]))),TN=()=>m.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),m.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),m.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),RN=new IE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),NN=()=>{const{arxivId:e}=Ed();return m.jsx(Gn,{to:e?`/paper/${e}`:"/papers",replace:!0})},MN=()=>{const{taskSlug:e}=Ed();return m.jsx(Gn,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},xh=()=>{const{orgSlug:e,taskSlug:t}=Ed();return e?m.jsx(Gn,{to:t?`/${e}/${t}`:`/${e}`,replace:!0}):m.jsx(Gn,{to:"/organizations",replace:!0})},Sh=({element:e})=>Hi()?m.jsx(Gn,{to:"/",replace:!0}):m.jsx(m.Fragment,{children:e}),ON=({element:e})=>{const{user:t,isLoading:n}=Gd();return Hi()?m.jsx(Gn,{to:"/",replace:!0}):n?m.jsx("div",{className:"page",children:m.jsx("div",{className:"submission-loading",children:m.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?m.jsx(m.Fragment,{children:e}):m.jsx("div",{className:"page",children:m.jsxs("div",{className:"submission-empty submission-empty-warn",children:[m.jsx("h1",{children:"Admin access required"}),m.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):m.jsx("div",{className:"page",children:m.jsxs("div",{className:"submission-empty submission-empty-warn",children:[m.jsx("h1",{children:"Sign in required"}),m.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),m.jsx(yv,{returnTo:"/admin-dashboard"})]})})},AN=()=>{const[e,t]=R.useState(!1);return QR(),R.useLayoutEffect(()=>{var n;(n=document.getElementById("initial-discovery-footer"))==null||n.remove()},[]),R.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),m.jsxs(m.Fragment,{children:[m.jsx(ST,{onOpenSearch:()=>t(!0)}),m.jsx("main",{children:m.jsx(R.Suspense,{fallback:m.jsx(TN,{}),children:m.jsxs(q1,{children:[m.jsx(ne,{path:"/",element:m.jsx(nN,{})}),m.jsx(ne,{path:"/chat/:sessionId?",element:vv()?m.jsx(rN,{}):m.jsx(Gn,{to:"/",replace:!0})}),m.jsx(ne,{path:"/papers",element:m.jsx(oN,{})}),m.jsx(ne,{path:"/papers/:arxivId",element:m.jsx(NN,{})}),m.jsx(ne,{path:"/paper/:arxivId",element:m.jsx(iN,{})}),m.jsx(ne,{path:"/tasks",element:m.jsx(sN,{})}),m.jsx(ne,{path:"/tasks/:taskSlug",element:m.jsx(lN,{})}),m.jsx(ne,{path:"/task/:taskSlug",element:m.jsx(MN,{})}),m.jsx(ne,{path:"/methods",element:m.jsx(aN,{})}),m.jsx(ne,{path:"/methods/:methodSlug",element:m.jsx(wN,{})}),m.jsx(ne,{path:"/frameworks",element:m.jsx(uN,{})}),m.jsx(ne,{path:"/trends",element:m.jsx(cN,{})}),m.jsx(ne,{path:"/conferences",element:m.jsx(dN,{})}),m.jsx(ne,{path:"/ai-deadlines",element:m.jsx(fN,{})}),m.jsx(ne,{path:"/conferences/:confSlug",element:m.jsx(pN,{})}),m.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:m.jsx(hN,{})}),m.jsx(ne,{path:"/organizations",element:m.jsx(gN,{})}),m.jsx(ne,{path:"/organizations/:orgSlug",element:m.jsx(xh,{})}),m.jsx(ne,{path:"/organizations/:orgSlug/:taskSlug",element:m.jsx(xh,{})}),m.jsx(ne,{path:"/authors/:authorId",element:m.jsx(yN,{})}),m.jsx(ne,{path:"/benchmark/:datasetSlug",element:m.jsx(xN,{})}),m.jsx(ne,{path:"/submit",element:m.jsx(CN,{})}),m.jsx(ne,{path:"/saved",element:m.jsx(Sh,{element:m.jsx(SN,{})})}),m.jsx(ne,{path:"/settings",element:m.jsx(EN,{})}),m.jsx(ne,{path:"/admin-dashboard",element:m.jsx(ON,{element:m.jsx(bN,{})})}),m.jsx(ne,{path:"/cron-dashboard",element:m.jsx(Gn,{to:"/admin-dashboard",replace:!0})}),m.jsx(ne,{path:"/submissions",element:m.jsx(Sh,{element:m.jsx(_N,{})})}),m.jsx(ne,{path:"/:orgSlug",element:m.jsx(mN,{})}),m.jsx(ne,{path:"/:orgSlug/:taskSlug",element:m.jsx(vN,{})}),m.jsx(ne,{path:"*",element:m.jsx(PN,{})})]})})}),e&&m.jsx(R.Suspense,{fallback:null,children:m.jsx(kN,{open:e,onClose:()=>t(!1)})})]})},jN=()=>m.jsx(DE,{client:RN,children:m.jsx(yT,{children:m.jsx(eN,{children:m.jsxs(qR,{children:[m.jsx(tN,{children:m.jsx(AN,{})}),m.jsx(ZT,{}),m.jsx(kR,{}),!1]})})})});r1();const LN=Hm(document.getElementById("root"));LN.render(m.jsx(R.StrictMode,{children:m.jsx(YS,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:m.jsx(t1,{children:m.jsx(jN,{})})})}));export{EM as $,iM as A,sM as B,iT as C,_r as D,uc as E,gy as F,Zl as G,zd as H,cP as I,Oy as J,gb as K,zr as L,Kv as M,Gl as N,my as O,kr as P,vy as Q,$_ as R,dM as S,vM as T,gM as U,mM as V,pM as W,aT as X,R as Y,Hi as Z,qN as _,Sd as a,uT as a0,cT as a1,kw as a2,Cn as a3,HN as a4,GN as a5,eM as a6,vt as a7,Md as a8,Bv as a9,Uv as aA,xM as aB,SM as aC,wM as aD,Mi as aE,AE as aF,UN as aG,dn as aH,bE as aI,vE as aJ,rc as aK,uv as aL,gE as aM,mE as aN,nc as aO,sv as aP,ME as aQ,xE as aR,xv as aa,QT as ab,yv as ac,QN as ad,zN as ae,ZN as af,DN as ag,Mh as ah,VN as ai,BN as aj,QS as ak,tM as al,Z_ as am,eP as an,wy as ao,KN as ap,ql as aq,Ue as ar,FN as as,lv as at,bt as au,aM as av,cM as aw,fM as ax,Fv as ay,zv as az,P as b,io as c,Ed as d,Gd as e,oa as f,hM as g,ve as h,vv as i,m as j,Rd as k,Re as l,V as m,M_ as n,Pr as o,Ne as p,WN as q,f as r,kT as s,yM as t,$N as u,nM as v,lM as w,rM as x,uM as y,oM as z}; diff --git a/assets/index-B-skc6rz.js b/assets/index-CVIt_dyy.js similarity index 99% rename from assets/index-B-skc6rz.js rename to assets/index-CVIt_dyy.js index 536f12c6736c22139a7eab7450d9214d5c195d23..4a58445f0e083fe7b648ef5393f3ed6255a83ecb 100644 --- a/assets/index-B-skc6rz.js +++ b/assets/index-CVIt_dyy.js @@ -1,4 +1,4 @@ -import{ag as nn,ah as or,j as pn}from"./index-BOKpx1zD.js";function pf(){}function mf(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function wi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei={};function ft(e,t){return(Ei.jsx?Ci:Si).test(e)}const Ii=/[ \t\n\f\r]/g;function Ai(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ii,"")===""}class qe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new qe(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Ti=0;const D=Ie(),W=Ie(),zn=Ie(),S=Ie(),V=Ie(),De=Ie(),te=Ie();function Ie(){return 2**++Ti}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:De,number:S,overloadedBoolean:zn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Li.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,_i);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Di,Ri);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function Ri(e){return"-"+e.toLowerCase()}function _i(e){return e.charAt(1).toUpperCase()}const Oi=ar([ur,Pi,fr,hr,pr],"html"),Un=ar([ur,vi,fr,hr,pr],"svg");function gf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mi(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ni=/\n/g,Bi=/^\s*/,ji=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hi=/^:\s*/,Ui=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Vi=/^[;\s]*/,$i=/^\s+|\s+$/g,qi=` +import{ag as nn,ah as or,j as pn}from"./index-CSNOTM3s.js";function pf(){}function mf(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function wi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei={};function ft(e,t){return(Ei.jsx?Ci:Si).test(e)}const Ii=/[ \t\n\f\r]/g;function Ai(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ii,"")===""}class qe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new qe(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Ti=0;const D=Ie(),W=Ie(),zn=Ie(),S=Ie(),V=Ie(),De=Ie(),te=Ie();function Ie(){return 2**++Ti}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:De,number:S,overloadedBoolean:zn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Li.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,_i);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Di,Ri);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function Ri(e){return"-"+e.toLowerCase()}function _i(e){return e.charAt(1).toUpperCase()}const Oi=ar([ur,Pi,fr,hr,pr],"html"),Un=ar([ur,vi,fr,hr,pr],"svg");function gf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mi(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ni=/\n/g,Bi=/^\s*/,ji=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hi=/^:\s*/,Ui=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Vi=/^[;\s]*/,$i=/^\s+|\s+$/g,qi=` `,dt="/",yt="*",Ce="",Wi="comment",Yi="declaration";function Xi(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(d){var x=d.match(Ni);x&&(n+=x.length);var C=d.lastIndexOf(qi);r=~C?d.length-C:r+d.length}function o(){var d={line:n,column:r};return function(x){return x.position=new l(d),s(),x}}function l(d){this.start=d,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(d){var x=new Error(t.source+":"+n+":"+r+": "+d);if(x.reason=d,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(d){var x=d.exec(e);if(x){var C=x[0];return i(C),e=e.slice(C.length),x}}function s(){u(Bi)}function f(d){var x;for(d=d||[];x=c();)x!==!1&&d.push(x);return d}function c(){var d=o();if(!(dt!=e.charAt(0)||yt!=e.charAt(1))){for(var x=2;Ce!=e.charAt(x)&&(yt!=e.charAt(x)||dt!=e.charAt(x+1));)++x;if(x+=2,Ce===e.charAt(x-1))return a("End of comment missing");var C=e.slice(2,x-2);return r+=2,i(C),e=e.slice(x),r+=2,d({type:Wi,comment:C})}}function p(){var d=o(),x=u(ji);if(x){if(c(),!u(Hi))return a("property missing ':'");var C=u(Ui),y=d({type:Yi,property:kt(x[0].replace(gt,Ce)),value:C?kt(C[0].replace(gt,Ce)):Ce});return u(Vi),y}}function h(){var d=[];f(d);for(var x;x=p();)x!==!1&&(d.push(x),f(d));return d}return s(),h()}function kt(e){return e?e.replace($i,Ce):Ce}var Qi=Xi,Gi=nn&&nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=Ji;const Ki=Gi(Qi);function Ji(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ki.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var an={};Object.defineProperty(an,"__esModule",{value:!0});an.camelCase=void 0;var Zi=/^--[a-zA-Z0-9_-]+$/,el=/-([a-z])/g,nl=/^[^-]+$/,tl=/^-(webkit|moz|ms|o|khtml)-/,rl=/^-(ms)-/,il=function(e){return!e||nl.test(e)||Zi.test(e)},ll=function(e,t){return t.toUpperCase()},xt=function(e,t){return"".concat(t,"-")},ol=function(e,t){return t===void 0&&(t={}),il(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(rl,xt):e=e.replace(tl,xt),e.replace(el,ll))};an.camelCase=ol;var al=nn&&nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ul=al(Vn),sl=an;function Ln(e,t){var n={};return!e||typeof e!="string"||(0,ul.default)(e,function(r,i){r&&i&&(n[(0,sl.camelCase)(r,t)]=i)}),n}Ln.default=Ln;var cl=Ln;const fl=or(cl),mr=gr("end"),$n=gr("start");function gr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function hl(e){const t=$n(e),n=mr(e);if(t&&n)return{start:t,end:n}}function je(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bt(e.position):"start"in e||"end"in e?bt(e):"line"in e||"column"in e?Fn(e):""}function Fn(e){return wt(e&&e.line)+":"+wt(e&&e.column)}function bt(e){return Fn(e&&e.start)+"-"+Fn(e&&e.end)}function wt(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=je(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const qn={}.hasOwnProperty,pl=new Map,ml=/[A-Z]/g,gl=new Set(["table","tbody","thead","tfoot","tr"]),dl=new Set(["td","th"]),dr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Il(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=El(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Un:Oi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function yr(e,t,n){if(t.type==="element")return kl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wl(e,t,n);if(t.type==="mdxjsEsm")return bl(e,t);if(t.type==="root")return Sl(e,t,n);if(t.type==="text")return Cl(e,t)}function kl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=xr(e,t.tagName,!1),l=Al(e,t);let a=Yn(e,t);return gl.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Ai(u):!0})),kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function xl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ve(e,t.position)}function bl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ve(e,t.position)}function wl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:xr(e,t.name,!0),l=Tl(e,t),a=Yn(e,t);return kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Sl(e,t,n){const r={};return Wn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function Cl(e,t){return t.value}function kr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function El(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function Il(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=$n(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Al(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qn.call(t.properties,i)){const o=Pl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&dl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Tl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ve(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ve(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Yn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:pl;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o0?(re(e,e.length,0,t),e):t}const Et={}.hasOwnProperty;function wr(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=xe(/[A-Za-z]/),G=xe(/[\dA-Za-z]/),Ml=xe(/[#-'*+\--9=?A-Z^-~]/);function tn(e){return e!==null&&(e<32||e===127)}const Rn=xe(/\d/),Nl=xe(/[\dA-Fa-f]/),Bl=xe(/[!-/:-@[-`{-~]/);function v(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const un=xe(new RegExp("\\p{P}|\\p{S}","u")),Ee=xe(/\s/);function xe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Re(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function O(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return R(u)?(e.enter(n),a(u)):t(u)}function a(u){return R(u)&&o++l))return;const M=t.events.length;let $=M,B,k;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){k=t.events[$][1].end;break}B=!0}for(y(r),w=M;wE;){const F=n[L];t.containerState=F[1],F[0].exit.call(t,e)}n.length=E}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $l(e,t,n){return O(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Le(e){if(e===null||U(e)||Ee(e))return 1;if(un(e))return 2}function sn(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};At(c,-u),At(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=ie(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=ie(s,sn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=ie(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=ie(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,re(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n0&&R(w)?O(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||v(w)?e.check(Tt,x,L)(w):(e.enter("codeFlowValue"),E(w))}function E(w){return w===null||v(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),E)}function L(w){return e.exit("codeFenced"),t(w)}function F(w,M,$){let B=0;return k;function k(N){return w.enter("lineEnding"),w.consume(N),w.exit("lineEnding"),T}function T(N){return w.enter("codeFencedFence"),R(N)?O(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):P(N)}function P(N){return N===a?(w.enter("codeFencedFenceSequence"),j(N)):$(N)}function j(N){return N===a?(B++,w.consume(N),j):B>=l?(w.exit("codeFencedFenceSequence"),R(N)?O(w,q,"whitespace")(N):q(N)):$(N)}function q(N){return N===null||v(N)?(w.exit("codeFencedFence"),M(N)):$(N)}}}function to(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const dn={name:"codeIndented",tokenize:io},ro={partial:!0,tokenize:lo};function io(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),O(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):v(s)?e.attempt(ro,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||v(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function lo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):O(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):v(l)?i(l):n(l)}}const oo={name:"codeText",previous:uo,resolve:ao,tokenize:so};function ao(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ne(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ne(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ne(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Tr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||tn(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||v(y)?n(y):(e.consume(y),y===92?d:h)}function d(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!f&&(y===null||y===41||U(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):v(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||v(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!R(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function vr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):v(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),O(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||v(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function He(e,t){let n;return r;function r(i){return v(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):R(i)?O(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ko={name:"definition",tokenize:bo},xo={partial:!0,tokenize:wo};function bo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Pr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return U(h)?He(e,s)(h):s(h)}function s(h){return Tr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(xo,c,c)(h)}function c(h){return R(h)?O(e,p,"whitespace")(h):p(h)}function p(h){return h===null||v(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function wo(e,t,n){return r;function r(a){return U(a)?He(e,i)(a):n(a)}function i(a){return vr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return R(a)?O(e,l,"whitespace")(a):l(a)}function l(a){return a===null||v(a)?t(a):n(a)}}const So={name:"hardBreakEscape",tokenize:Co};function Co(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return v(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Eo={name:"headingAtx",resolve:Io,tokenize:Ao};function Io(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},re(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Ao(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||U(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||v(f)?(e.exit("atxHeading"),t(f)):R(f)?O(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||U(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const To=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vt=["pre","script","style","textarea"],Po={concrete:!0,name:"htmlFlow",resolveTo:Do,tokenize:Lo},vo={partial:!0,tokenize:Ro},zo={partial:!0,tokenize:Fo};function Do(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lo(e,t,n){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:m):J(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):J(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const ae="CDATA[";return g===ae.charCodeAt(a++)?(e.consume(g),a===ae.length?r.interrupt?t:P:d):n(g)}function x(g){return J(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function C(g){if(g===null||g===47||g===62||U(g)){const ae=g===47,be=l.toLowerCase();return!ae&&!o&&vt.includes(be)?(i=1,r.interrupt?t(g):P(g)):To.includes(l.toLowerCase())?(i=6,ae?(e.consume(g),y):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):E(g))}return g===45||G(g)?(e.consume(g),l+=String.fromCharCode(g),C):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function A(g){return R(g)?(e.consume(g),A):k(g)}function E(g){return g===47?(e.consume(g),k):g===58||g===95||J(g)?(e.consume(g),L):R(g)?(e.consume(g),E):k(g)}function L(g){return g===45||g===46||g===58||g===95||G(g)?(e.consume(g),L):F(g)}function F(g){return g===61?(e.consume(g),w):R(g)?(e.consume(g),F):E(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,M):R(g)?(e.consume(g),w):$(g)}function M(g){return g===u?(e.consume(g),u=null,B):g===null||v(g)?n(g):(e.consume(g),M)}function $(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||U(g)?F(g):(e.consume(g),$)}function B(g){return g===47||g===62||R(g)?E(g):n(g)}function k(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||v(g)?P(g):R(g)?(e.consume(g),T):n(g)}function P(g){return g===45&&i===2?(e.consume(g),Q):g===60&&i===1?(e.consume(g),Y):g===62&&i===4?(e.consume(g),oe):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),he):v(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vo,pe,j)(g)):g===null||v(g)?(e.exit("htmlFlowData"),j(g)):(e.consume(g),P)}function j(g){return e.check(zo,q,pe)(g)}function q(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||v(g)?j(g):(e.enter("htmlFlowData"),P(g))}function Q(g){return g===45?(e.consume(g),m):P(g)}function Y(g){return g===47?(e.consume(g),l="",le):P(g)}function le(g){if(g===62){const ae=l.toLowerCase();return vt.includes(ae)?(e.consume(g),oe):P(g)}return J(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),le):P(g)}function he(g){return g===93?(e.consume(g),m):P(g)}function m(g){return g===62?(e.consume(g),oe):g===45&&i===2?(e.consume(g),m):P(g)}function oe(g){return g===null||v(g)?(e.exit("htmlFlowData"),pe(g)):(e.consume(g),oe)}function pe(g){return e.exit("htmlFlow"),t(g)}}function Fo(e,t,n){const r=this;return i;function i(l){return v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ro(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(We,t,n)}}const _o={name:"htmlText",tokenize:Oo};function Oo(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),F):m===63?(e.consume(m),E):J(m)?(e.consume(m),$):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):J(m)?(e.consume(m),A):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):v(m)?(l=c,Y(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?Q(m):m===45?p(m):c(m)}function d(m){const oe="CDATA[";return m===oe.charCodeAt(o++)?(e.consume(m),o===oe.length?x:d):n(m)}function x(m){return m===null?n(m):m===93?(e.consume(m),C):v(m)?(l=x,Y(m)):(e.consume(m),x)}function C(m){return m===93?(e.consume(m),y):x(m)}function y(m){return m===62?Q(m):m===93?(e.consume(m),y):x(m)}function A(m){return m===null||m===62?Q(m):v(m)?(l=A,Y(m)):(e.consume(m),A)}function E(m){return m===null?n(m):m===63?(e.consume(m),L):v(m)?(l=E,Y(m)):(e.consume(m),E)}function L(m){return m===62?Q(m):E(m)}function F(m){return J(m)?(e.consume(m),w):n(m)}function w(m){return m===45||G(m)?(e.consume(m),w):M(m)}function M(m){return v(m)?(l=M,Y(m)):R(m)?(e.consume(m),M):Q(m)}function $(m){return m===45||G(m)?(e.consume(m),$):m===47||m===62||U(m)?B(m):n(m)}function B(m){return m===47?(e.consume(m),Q):m===58||m===95||J(m)?(e.consume(m),k):v(m)?(l=B,Y(m)):R(m)?(e.consume(m),B):Q(m)}function k(m){return m===45||m===46||m===58||m===95||G(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),P):v(m)?(l=T,Y(m)):R(m)?(e.consume(m),T):B(m)}function P(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,j):v(m)?(l=P,Y(m)):R(m)?(e.consume(m),P):(e.consume(m),q)}function j(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):v(m)?(l=j,Y(m)):(e.consume(m),j)}function q(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||U(m)?B(m):(e.consume(m),q)}function N(m){return m===47||m===62||U(m)?B(m):n(m)}function Q(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return R(m)?O(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):he(m)}function he(m){return e.enter("htmlTextData"),l(m)}}const Gn={name:"labelEnd",resolveAll:jo,resolveTo:Ho,tokenize:Uo},Mo={tokenize:Vo},No={tokenize:$o},Bo={tokenize:qo};function jo(e){let t=-1;const n=[];for(;++t=3&&(s===null||v(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),R(s)?O(e,a,"whitespace")(s):a(s))}}const Z={continuation:{tokenize:na},exit:ra,name:"list",tokenize:ea},Jo={partial:!0,tokenize:ia},Zo={partial:!0,tokenize:ta};function ea(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ze,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Rn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(We,r.interrupt?n:f,e.attempt(Jo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return R(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function na(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(We,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,O(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!R(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,O(e,e.attempt(Z,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ta(e,t,n){const r=this;return O(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ra(e){e.exit(this.containerState.type)}function ia(e,t,n){const r=this;return O(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!R(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zt={name:"setextUnderline",resolveTo:la,tokenize:oa};function la(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function oa(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),R(s)?O(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||v(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const aa={tokenize:ua};function ua(e){const t=this,n=e.attempt(We,r,e.attempt(this.parser.constructs.flowInitial,i,O(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ho,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sa={resolveAll:Dr()},ca=zr("string"),fa=zr("text");function zr(e){return{resolveAll:Dr(e==="text"?ha:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ia(e,t){let n=-1;const r=[];let i;for(;++n0){const ue=z.tokenStack[z.tokenStack.length-1];(ue[1]||Lt).call(z,void 0,ue[0])}for(I.position={start:ke(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:ke(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:l="on",onCheckedChange:v,form:i,...w}=t,[u,p]=o.useState(null),k=C(s,h=>p(h)),S=o.useRef(!1),g=u?i||!!u.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:l,...w,ref:k,onClick:M(t.onClick,h=>{B(T=>!T),g&&(S.current=h.isPropagationStopped(),S.current||h.stopPropagation())})}),g&&a.jsx(N,{control:u,bubbles:!S.current,name:n,value:l,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=o.forwardRef((t,s)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:s})});R.displayName=E;var O="SwitchBubbleInput",N=o.forwardRef(({__scopeSwitch:t,control:s,checked:e,bubbles:n=!0,...r},m)=>{const d=o.useRef(null),c=C(d,m),l=U(e),v=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(l!==e&&p){const k=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(k)}},[l,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=o.forwardRef(({className:t,...s},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...s,ref:e,children:a.jsx(D,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; +import{r as o,l as C,k as I,j as a,h as y,m as M,n as H,o as A,p as x}from"./index-CSNOTM3s.js";import{u as U}from"./index-CAtHIP-4.js";var b="Switch",[q]=A(b),[z,L]=q(b),P=o.forwardRef((t,s)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:l="on",onCheckedChange:v,form:i,...w}=t,[u,p]=o.useState(null),k=C(s,h=>p(h)),S=o.useRef(!1),g=u?i||!!u.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:l,...w,ref:k,onClick:M(t.onClick,h=>{B(T=>!T),g&&(S.current=h.isPropagationStopped(),S.current||h.stopPropagation())})}),g&&a.jsx(N,{control:u,bubbles:!S.current,name:n,value:l,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=o.forwardRef((t,s)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:s})});R.displayName=E;var O="SwitchBubbleInput",N=o.forwardRef(({__scopeSwitch:t,control:s,checked:e,bubbles:n=!0,...r},m)=>{const d=o.useRef(null),c=C(d,m),l=U(e),v=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(l!==e&&p){const k=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(k)}},[l,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=o.forwardRef(({className:t,...s},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...s,ref:e,children:a.jsx(D,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; diff --git a/assets/textarea-BKXasfzv.js b/assets/textarea-BajbF2-p.js similarity index 93% rename from assets/textarea-BKXasfzv.js rename to assets/textarea-BajbF2-p.js index 26ad3a7c10361063978a63fed5d6375712342c52..6621d9c021ff96cb7e0e9f320faecc3ac311470f 100644 --- a/assets/textarea-BKXasfzv.js +++ b/assets/textarea-BajbF2-p.js @@ -1 +1 @@ -import{r as s,j as i,p as t}from"./index-BOKpx1zD.js";const a=s.forwardRef(({className:e,type:r,...o},n)=>i.jsx("input",{type:r,className:t("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...o}));a.displayName="Input";const d=s.forwardRef(({className:e,...r},o)=>i.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));d.displayName="Textarea";export{a as I,d as T}; +import{r as s,j as i,p as t}from"./index-CSNOTM3s.js";const a=s.forwardRef(({className:e,type:r,...o},n)=>i.jsx("input",{type:r,className:t("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...o}));a.displayName="Input";const d=s.forwardRef(({className:e,...r},o)=>i.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));d.displayName="Textarea";export{a as I,d as T}; diff --git a/assets/transform-DLPfRTia.js b/assets/transform-BGwKHn4w.js similarity index 99% rename from assets/transform-DLPfRTia.js rename to assets/transform-BGwKHn4w.js index cdf63316962e40aa21fc5ffc635dc1a5f05b934c..2fa01d8c72f83251c8b54e8d6c039b92b7a6d2df 100644 --- a/assets/transform-DLPfRTia.js +++ b/assets/transform-BGwKHn4w.js @@ -1 +1 @@ -import{a4 as $}from"./index-BOKpx1zD.js";function pe(t){let e=2166136261;const n=t||"";for(let r=0;r=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function _(t){const e=w(t);return e.setHours(0,0,0,0),e}function F(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=_(t),r=_(e),a=+n-F(n),i=+r-F(r);return Math.round((a-i)/z)}function K(t){const e=A(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function Z(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!Z(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:Y({formats:at,defaultWidth:"full"}),time:Y({formats:it,defaultWidth:"full"}),dateTime:Y({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function k(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:k({values:dt,defaultWidth:"wide"}),quarter:k({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:k({values:ft,defaultWidth:"wide"}),day:k({values:ht,defaultWidth:"wide"}),dayPeriod:k({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,kt=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:Ot,parsePattern:kt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+T(e)-+K(e);return Math.round(n/H)+1}function j(t,e){var f,g,l,O;const n=w(t),r=n.getFullYear(),a=S(),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??((O=(l=a.locale)==null?void 0:l.options)==null?void 0:O.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=x(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=x(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Lt(t,e){var s,u,d,f;const n=S(),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=j(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),x(i,e)}function Ut(t,e){const n=w(t),r=+x(n,e)-+Lt(n,e);return Math.round(r/H)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},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 y.y(t,e)},Y:function(t,e,n,r){const a=j(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 y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Ut(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function 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):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const 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"})}},Q=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return 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}}",Q(a,e))},It={p:Q,P:Ht},Rt=/^D+$/,At=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return Rt.test(t)}function Xt(t){return At.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Kt=/[a-zA-Z]/;function Zt(t,e,n){var f,g,l,O;const r=S(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((O=(l=r.locale)==null?void 0:l.options)==null?void 0:O.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const W=It[h];return W(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(E[h])return{isToken:!0,value:m};if(h.match(Kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const W=E[h[0]];return W(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function X(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const v={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(v.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],v.timeZoneDelimiter.test(e.date)&&(e.date=t.split(v.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=v.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function B(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(B(t)?29:28))}function fe(t,e){return e>=1&&e<=(B(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?X(t):t;return Zt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return X(t).getFullYear()}catch{return null}}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=(t.leaderboard_ranks||[]).filter(l=>l.best_rank>=1&&l.best_rank<=3).map(l=>({name:l.dataset_name,slug:l.dataset_slug||null,rank:l.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:s,methods:u,citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:$(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=G.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"]),G=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function Te(t,e){const n=t||Oe(e||""),r=G.get((e==null?void 0:e.toLowerCase())||ke(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 ke(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{w as a,x as b,be as c,Te as d,xe as e,Oe as f,pe as h,_ as s,ve as t}; +import{a4 as $}from"./index-CSNOTM3s.js";function pe(t){let e=2166136261;const n=t||"";for(let r=0;r=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function _(t){const e=w(t);return e.setHours(0,0,0,0),e}function F(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=_(t),r=_(e),a=+n-F(n),i=+r-F(r);return Math.round((a-i)/z)}function K(t){const e=A(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function Z(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!Z(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:Y({formats:at,defaultWidth:"full"}),time:Y({formats:it,defaultWidth:"full"}),dateTime:Y({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function k(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:k({values:dt,defaultWidth:"wide"}),quarter:k({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:k({values:ft,defaultWidth:"wide"}),day:k({values:ht,defaultWidth:"wide"}),dayPeriod:k({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,kt=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:Ot,parsePattern:kt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+T(e)-+K(e);return Math.round(n/H)+1}function j(t,e){var f,g,l,O;const n=w(t),r=n.getFullYear(),a=S(),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??((O=(l=a.locale)==null?void 0:l.options)==null?void 0:O.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=x(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=x(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Lt(t,e){var s,u,d,f;const n=S(),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=j(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),x(i,e)}function Ut(t,e){const n=w(t),r=+x(n,e)-+Lt(n,e);return Math.round(r/H)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},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 y.y(t,e)},Y:function(t,e,n,r){const a=j(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 y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Ut(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function 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):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const 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"})}},Q=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return 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}}",Q(a,e))},It={p:Q,P:Ht},Rt=/^D+$/,At=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return Rt.test(t)}function Xt(t){return At.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Kt=/[a-zA-Z]/;function Zt(t,e,n){var f,g,l,O;const r=S(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((O=(l=r.locale)==null?void 0:l.options)==null?void 0:O.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const W=It[h];return W(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(E[h])return{isToken:!0,value:m};if(h.match(Kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const W=E[h[0]];return W(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function X(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const v={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(v.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],v.timeZoneDelimiter.test(e.date)&&(e.date=t.split(v.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=v.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function B(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(B(t)?29:28))}function fe(t,e){return e>=1&&e<=(B(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?X(t):t;return Zt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return X(t).getFullYear()}catch{return null}}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=(t.leaderboard_ranks||[]).filter(l=>l.best_rank>=1&&l.best_rank<=3).map(l=>({name:l.dataset_name,slug:l.dataset_slug||null,rank:l.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:s,methods:u,citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:$(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=G.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"]),G=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function Te(t,e){const n=t||Oe(e||""),r=G.get((e==null?void 0:e.toLowerCase())||ke(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 ke(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{w as a,x as b,be as c,Te as d,xe as e,Oe as f,pe as h,_ as s,ve as t}; diff --git a/assets/useDebounce-CKxXZkmt.js b/assets/useDebounce-D60wCwma.js similarity index 66% rename from assets/useDebounce-CKxXZkmt.js rename to assets/useDebounce-D60wCwma.js index 5accf5afa470c2779cb25a562a67899f50530e0d..abbd7955aa6d17d54a2ecba48cc32543832f8f9b 100644 --- a/assets/useDebounce-CKxXZkmt.js +++ b/assets/useDebounce-D60wCwma.js @@ -1 +1 @@ -import{r as o}from"./index-BOKpx1zD.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; +import{r as o}from"./index-CSNOTM3s.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; diff --git a/assets/useInfiniteQuery-B9BAVqQL.js b/assets/useInfiniteQuery-_jD1bF9N.js similarity index 89% rename from assets/useInfiniteQuery-B9BAVqQL.js rename to assets/useInfiniteQuery-_jD1bF9N.js index 573235e0018765ada81d7f80f1c8135255518cf9..0a4ccfd1d90cd5f18593782ff562d244f848f3f5 100644 --- a/assets/useInfiniteQuery-B9BAVqQL.js +++ b/assets/useInfiniteQuery-_jD1bF9N.js @@ -1 +1 @@ -import{Q as v,a as p}from"./useQuery-Cj0zK8BW.js";import{ai as x,aj as b}from"./index-BOKpx1zD.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 w(e,t){return p(e,l)}export{w as u}; +import{Q as v,a as p}from"./useQuery-DCf2mroJ.js";import{ai as x,aj as b}from"./index-CSNOTM3s.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 w(e,t){return p(e,l)}export{w as u}; diff --git a/assets/useIntersectionObserver-DVOSMcnN.js b/assets/useIntersectionObserver-CUA0CMpl.js similarity index 86% rename from assets/useIntersectionObserver-DVOSMcnN.js rename to assets/useIntersectionObserver-CUA0CMpl.js index aaa1193f9d184d8c28e85aad843a3fa32dc1d3d9..d8c5d55b36246246e4eac40b83b14ab3032d852d 100644 --- a/assets/useIntersectionObserver-DVOSMcnN.js +++ b/assets/useIntersectionObserver-CUA0CMpl.js @@ -1 +1 @@ -import{r}from"./index-BOKpx1zD.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; +import{r}from"./index-CSNOTM3s.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; diff --git a/assets/useMutation-1Slfgn9F.js b/assets/useMutation-D90cYkan.js similarity index 97% rename from assets/useMutation-1Slfgn9F.js rename to assets/useMutation-D90cYkan.js index 60246e7a7ef5380b1183c85039509b4c8128d84b..edb8b32bee0150538fb21d4d57e849e5e9fdb81d 100644 --- a/assets/useMutation-1Slfgn9F.js +++ b/assets/useMutation-D90cYkan.js @@ -1 +1 @@ -var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aq as q,as as U,aE as j,aF as k,ar as P,q as L,r as v,au as A,aG as D}from"./index-BOKpx1zD.js";var a,c,o,h,n,C,S,w,F=(w=class extends q{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??k();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function Q(i,t){const s=L(),[r]=v.useState(()=>new F(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{Q as u}; +var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aq as q,as as U,aE as j,aF as k,ar as P,q as L,r as v,au as A,aG as D}from"./index-CSNOTM3s.js";var a,c,o,h,n,C,S,w,F=(w=class extends q{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??k();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function Q(i,t){const s=L(),[r]=v.useState(()=>new F(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{Q as u}; diff --git a/assets/usePapers-B51Q6z7s.js b/assets/usePapers-CFugWskp.js similarity index 92% rename from assets/usePapers-B51Q6z7s.js rename to assets/usePapers-CFugWskp.js index f4d21b286899d5c5de9a3b494f1b564c1e009952..6c28de3db4ae80aaa0e0cc342d32d8a00c233980 100644 --- a/assets/usePapers-B51Q6z7s.js +++ b/assets/usePapers-CFugWskp.js @@ -1 +1 @@ -import{b as d,ae as c}from"./index-BOKpx1zD.js";import{u as P}from"./useQuery-Cj0zK8BW.js";import{u as g}from"./useInfiniteQuery-B9BAVqQL.js";function h(a,e=!0){return P({queryKey:["paper",a],queryFn:()=>d.getPaper(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function q(a={}){const{page_size:e=20,search:r,order_by:t="date_published",order_dir:n="desc",time:s,published_after:i,published_before:o,conference:u,latest_only:l=!0,include_resources:p=!1,enabled:_=!0}=a;return g({queryKey:["papers-infinite",{page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}],queryFn:({pageParam:f=1})=>d.getPapers({page:f,page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:_,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function F(a){const{taskId:e,page_size:r=20,order_by:t="date_published",order_dir:n="desc",latest_only:s=!0,include_resources:i=!0,enabled:o=!0}=a;return g({queryKey:["task-papers-infinite",e,{page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}],queryFn:({pageParam:u=1})=>d.getTaskPapers(e,{page:u,page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}),getNextPageParam:u=>u.next_page,initialPageParam:1,enabled:o&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function k(a){const{conferenceSlug:e,taskSlug:r,presentation:t,page_size:n=20,order_by:s="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:u=!0,enabled:l=!0}=a;return g({queryKey:["conference-papers-infinite",e,r,t,{page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}],queryFn:({pageParam:p=1})=>d.getConferencePapers(e,{task:r,presentation:t,page:p,page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:l&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function x(a){const{organizationSlug:e,taskSlug:r,page_size:t=20,order_by:n="date_published",order_dir:s="desc",latest_only:i=!0,include_resources:o=!0,enabled:u=!0}=a;return g({queryKey:["organization-papers-infinite",e,r,{page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}],queryFn:({pageParam:l=1})=>d.getOrganizationPapers(e,{task:r,page:l,page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}),getNextPageParam:l=>l.next_page,initialPageParam:1,enabled:u&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}export{h as a,F as b,k as c,x as d,q as u}; +import{b as d,ae as c}from"./index-CSNOTM3s.js";import{u as P}from"./useQuery-DCf2mroJ.js";import{u as g}from"./useInfiniteQuery-_jD1bF9N.js";function h(a,e=!0){return P({queryKey:["paper",a],queryFn:()=>d.getPaper(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function q(a={}){const{page_size:e=20,search:r,order_by:t="date_published",order_dir:n="desc",time:s,published_after:i,published_before:o,conference:u,latest_only:l=!0,include_resources:p=!1,enabled:_=!0}=a;return g({queryKey:["papers-infinite",{page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}],queryFn:({pageParam:f=1})=>d.getPapers({page:f,page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:_,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function F(a){const{taskId:e,page_size:r=20,order_by:t="date_published",order_dir:n="desc",latest_only:s=!0,include_resources:i=!0,enabled:o=!0}=a;return g({queryKey:["task-papers-infinite",e,{page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}],queryFn:({pageParam:u=1})=>d.getTaskPapers(e,{page:u,page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}),getNextPageParam:u=>u.next_page,initialPageParam:1,enabled:o&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function k(a){const{conferenceSlug:e,taskSlug:r,presentation:t,page_size:n=20,order_by:s="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:u=!0,enabled:l=!0}=a;return g({queryKey:["conference-papers-infinite",e,r,t,{page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}],queryFn:({pageParam:p=1})=>d.getConferencePapers(e,{task:r,presentation:t,page:p,page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:l&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function x(a){const{organizationSlug:e,taskSlug:r,page_size:t=20,order_by:n="date_published",order_dir:s="desc",latest_only:i=!0,include_resources:o=!0,enabled:u=!0}=a;return g({queryKey:["organization-papers-infinite",e,r,{page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}],queryFn:({pageParam:l=1})=>d.getOrganizationPapers(e,{task:r,page:l,page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}),getNextPageParam:l=>l.next_page,initialPageParam:1,enabled:u&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}export{h as a,F as b,k as c,x as d,q as u}; diff --git a/assets/usePeriodFilter-CfD2sXw8.js b/assets/usePeriodFilter-CWtHCaJm.js similarity index 74% rename from assets/usePeriodFilter-CfD2sXw8.js rename to assets/usePeriodFilter-CWtHCaJm.js index 9c90e1bfb7f5043dbb1caf739338004d167e28c7..ae1b20cde8cc3f1ee73bb16d64dd9993574d6298 100644 --- a/assets/usePeriodFilter-CfD2sXw8.js +++ b/assets/usePeriodFilter-CWtHCaJm.js @@ -1 +1 @@ -import{r}from"./index-BOKpx1zD.js";import{a as n,s as f,b as u}from"./transform-DLPfRTia.js";function l(s){const t=n(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,a]=r.useState(s),i=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:a,publishedAfter:i}}export{h as P,T as u}; +import{r}from"./index-CSNOTM3s.js";import{a as n,s as f,b as u}from"./transform-BGwKHn4w.js";function l(s){const t=n(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,a]=r.useState(s),i=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:a,publishedAfter:i}}export{h as P,T as u}; diff --git a/assets/useQuery-Cj0zK8BW.js b/assets/useQuery-DCf2mroJ.js similarity index 99% rename from assets/useQuery-Cj0zK8BW.js rename to assets/useQuery-DCf2mroJ.js index 8ed3783e1d6c377d9f1a79ac4ad15e6c588d02fd..82568ac31ff433f830865cf0e142fa7b4afbaee2 100644 --- a/assets/useQuery-Cj0zK8BW.js +++ b/assets/useQuery-DCf2mroJ.js @@ -1 +1 @@ -var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aq as Mt,aI as gt,aJ as S,as as q,aK as j,au as tt,aL as et,aM as vt,aN as Qt,aO as J,aP as Tt,aQ as xt,aR as Rt,ar as Ct,r as O,aG as Ot,q as _t}from"./index-BOKpx1zD.js";var v,a,H,g,x,U,C,w,W,D,L,_,F,M,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Mt{constructor(t,e){super();p(this,n);p(this,v);p(this,a);p(this,H);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,W);p(this,D);p(this,L);p(this,_);p(this,F);p(this,M);p(this,N,new Set);this.options=e,u(this,v,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),mt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,v).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,v).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||j(this.options.staleTime,i(this,a))!==j(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,M))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,v).getQueryCache().build(i(this,v),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="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,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,v).defaultQueryOptions(t),r=i(this,v).getQueryCache().build(i(this,v),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,H),{state:E}=t;let d={...E},Q=!1,f;if(e._optimisticResults){const m=this.hasListeners(),k=!m&&mt(t,e),V=m&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:T,errorUpdatedAt:B,status:R}=d;f=d.data;let z=!1;if(e.placeholderData!==void 0&&f===void 0&&R==="pending"){let m;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(m=o.data,z=!0):m=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,m!==void 0&&(R="success",f=Rt(o==null?void 0:o.data,m,e),Q=!0)}if(e.select&&f!==void 0&&!z)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,W))f=i(this,D);else try{u(this,W,e.select),f=e.select(f),f=Rt(o==null?void 0:o.data,f,e),u(this,D,f),u(this,w,null)}catch(m){u(this,w,m)}i(this,w)&&(T=i(this,w),f=i(this,D),B=Date.now(),R="error");const X=d.fetchStatus==="fetching",Y=R==="pending",Z=R==="error",lt=Y&&X,dt=f!==void 0,I={status:R,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:R==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:T,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const m=I.data!==void 0,k=I.status==="error"&&!m,V=G=>{k?G.reject(I.error):m&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const P=y;return i(this,g)[P]!==t[P]&&c.has(P)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},v=new WeakMap,a=new WeakMap,H=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,W=new WeakMap,D=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,M=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=j(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!vt(t))return;const r=Qt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,M,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!vt(i(this,M))||i(this,M)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Tt.isFocused())&&l(this,n,A).call(this)},i(this,M)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,v).getQueryCache().build(i(this,v),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,H,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,v).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Pt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function mt(s,t){return Pt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&j(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(j(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Dt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},jt=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),Ht=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},Wt=(s,t)=>s.isLoading&&s.isFetching&&!t,zt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var Q,f,T,B;const r=Dt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_beforeQuery)==null||f.call(Q,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",Ht(c),kt(c,h,y),At(h);const P=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(R=>{const z=d?b.subscribe(Ct.batchCalls(R)):tt;return b.updateResult(),z},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),zt(c,E))throw yt(c,b,h);if(jt({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(T=o.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||B.call(T,c,E),c.experimental_prefetchInRender&&!et.isServer()&&Wt(E,r)){const R=P?yt(c,b,h):y==null?void 0:y.promise;R==null||R.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Dt as b,Bt as c,kt as d,Ht as e,At as f,yt as g,jt as h,zt as s,Xt as u}; +var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aq as Mt,aI as gt,aJ as S,as as q,aK as j,au as tt,aL as et,aM as vt,aN as Qt,aO as J,aP as Tt,aQ as xt,aR as Rt,ar as Ct,r as O,aG as Ot,q as _t}from"./index-CSNOTM3s.js";var v,a,H,g,x,U,C,w,W,D,L,_,F,M,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Mt{constructor(t,e){super();p(this,n);p(this,v);p(this,a);p(this,H);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,W);p(this,D);p(this,L);p(this,_);p(this,F);p(this,M);p(this,N,new Set);this.options=e,u(this,v,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),mt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,v).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,v).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||j(this.options.staleTime,i(this,a))!==j(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,M))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,v).getQueryCache().build(i(this,v),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="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,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,v).defaultQueryOptions(t),r=i(this,v).getQueryCache().build(i(this,v),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,H),{state:E}=t;let d={...E},Q=!1,f;if(e._optimisticResults){const m=this.hasListeners(),k=!m&&mt(t,e),V=m&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:T,errorUpdatedAt:B,status:R}=d;f=d.data;let z=!1;if(e.placeholderData!==void 0&&f===void 0&&R==="pending"){let m;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(m=o.data,z=!0):m=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,m!==void 0&&(R="success",f=Rt(o==null?void 0:o.data,m,e),Q=!0)}if(e.select&&f!==void 0&&!z)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,W))f=i(this,D);else try{u(this,W,e.select),f=e.select(f),f=Rt(o==null?void 0:o.data,f,e),u(this,D,f),u(this,w,null)}catch(m){u(this,w,m)}i(this,w)&&(T=i(this,w),f=i(this,D),B=Date.now(),R="error");const X=d.fetchStatus==="fetching",Y=R==="pending",Z=R==="error",lt=Y&&X,dt=f!==void 0,I={status:R,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:R==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:T,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const m=I.data!==void 0,k=I.status==="error"&&!m,V=G=>{k?G.reject(I.error):m&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const P=y;return i(this,g)[P]!==t[P]&&c.has(P)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},v=new WeakMap,a=new WeakMap,H=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,W=new WeakMap,D=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,M=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=j(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!vt(t))return;const r=Qt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,M,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!vt(i(this,M))||i(this,M)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Tt.isFocused())&&l(this,n,A).call(this)},i(this,M)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,v).getQueryCache().build(i(this,v),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,H,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,v).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Pt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function mt(s,t){return Pt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&j(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(j(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Dt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},jt=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),Ht=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},Wt=(s,t)=>s.isLoading&&s.isFetching&&!t,zt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var Q,f,T,B;const r=Dt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_beforeQuery)==null||f.call(Q,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",Ht(c),kt(c,h,y),At(h);const P=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(R=>{const z=d?b.subscribe(Ct.batchCalls(R)):tt;return b.updateResult(),z},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),zt(c,E))throw yt(c,b,h);if(jt({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(T=o.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||B.call(T,c,E),c.experimental_prefetchInRender&&!et.isServer()&&Wt(E,r)){const R=P?yt(c,b,h):y==null?void 0:y.promise;R==null||R.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Dt as b,Bt as c,kt as d,Ht as e,At as f,yt as g,jt as h,zt as s,Xt as u}; diff --git a/index.html b/index.html index 318f5c6d96149f5aa84ae5a7a819940811dcb7e5..c88227b3622289e43a1a9aa20075e0f8184aefc3 100644 --- a/index.html +++ b/index.html @@ -39,8 +39,14 @@ .initial-paper-authors summary { cursor: pointer; color: #4b5563; } .initial-paper ul { margin-top: .25rem; padding-left: 1.25rem; } .initial-paper-links { display: inline-block; min-width: 14rem; margin-right: 2rem; vertical-align: top; } + [data-pwc-initial-document="discovery"] { max-width: 1040px; margin: 0 auto; padding: 32px 24px; color: #202124; font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; } + [data-pwc-initial-document="discovery"] > nav { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; } + [data-pwc-initial-document="discovery"] h1 { margin: .25rem 0 .75rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; } + [data-pwc-initial-document="discovery"] h2 { margin-top: 2rem; } + [data-pwc-initial-document="discovery"] li { margin: .7rem 0; } + [data-pwc-initial-document="discovery"] a { color: #2563eb; } .initial-discovery-footer { max-width: 960px; margin: 2rem auto; padding: 0 24px 24px; display: flex; gap: .65rem; font: 14px/1.5 system-ui, sans-serif; } - @media (prefers-color-scheme: dark) { .initial-paper { color: #e5e7eb; } .initial-paper-kicker, .initial-paper .citation_author { color: #9ca3af; } .initial-paper a { color: #93c5fd; } } + @media (prefers-color-scheme: dark) { .initial-paper, [data-pwc-initial-document="discovery"] { color: #e5e7eb; } .initial-paper-kicker, .initial-paper .citation_author { color: #9ca3af; } .initial-paper a, [data-pwc-initial-document="discovery"] a { color: #93c5fd; } } @@ -65,12 +71,12 @@ plausible.init(); })(); - +
-