@straiffi/archon 1.0.12 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/TestsDialog-CXwEw4cO.js +5 -0
- package/dist/client/assets/badge-DBRMkzQk.js +41 -0
- package/dist/client/assets/index-BRYAyBgT.js +142 -0
- package/dist/client/assets/index-CSG_tXky.css +2 -0
- package/dist/client/assets/rolldown-runtime-BYbx6iT9.js +1 -0
- package/dist/client/index.html +4 -2
- package/dist/server/db.js +2 -0
- package/dist/server/db.js.map +1 -1
- package/dist/server/index.js +285 -10
- package/dist/server/index.js.map +1 -1
- package/dist/server/lib/agent.js +30 -1
- package/dist/server/lib/agent.js.map +1 -1
- package/dist/server/lib/chats.js +7 -1
- package/dist/server/lib/chats.js.map +1 -1
- package/dist/server/lib/projectAutoConfig.js +98 -4
- package/dist/server/lib/projectAutoConfig.js.map +1 -1
- package/dist/server/lib/projects.js +78 -0
- package/dist/server/lib/projects.js.map +1 -1
- package/dist/server/lib/testCommandRunner.js +155 -0
- package/dist/server/lib/testCommandRunner.js.map +1 -0
- package/dist/server/lib/testSessions.js +494 -0
- package/dist/server/lib/testSessions.js.map +1 -0
- package/dist/server/workers/chat.js +1 -1
- package/dist/server/workers/chat.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-BhQzJS4j.css +0 -2
- package/dist/client/assets/index-vramqRal.js +0 -176
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BYbx6iT9.js";import{At as t,H as n,It as r,Nt as i,Pt as a,a as o,d as s,f as c,gt as l,i as u,kt as d,o as f,s as p,t as m}from"./badge-DBRMkzQk.js";import{_ as h,a as g,c as _,d as ee,f as te,g as ne,h as v,i as y,l as b,m as x,n as S,o as C,p as w,r as T,s as E,t as D,u as re,v as ie,y as ae}from"./index-BRYAyBgT.js";var O=e(r(),1),oe=(e,n)=>a(t(`/projects/${e}/test-sessions`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to open the test runner right now.`}),se=(e,n)=>a(t(`/tickets/${e}/test-sessions${n?`?project_id=${encodeURIComponent(n)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),ce=(e,n={})=>a(t(`/test-sessions/${e}/discovery${n.commandId?`?command_id=${encodeURIComponent(n.commandId)}`:``}`),{signal:n.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),le=(e,n)=>a(t(`/test-sessions/${e}/run`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to start the selected tests right now.`}),ue=e=>a(t(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),k=e=>i(t(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),A=n(),j=256*1024,M=24,N=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),de=(e,t)=>{let n=`${e}${t}`;return n.length<=j?n:n.slice(-j)},P=e=>e.replace(N,``),fe=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=M,pe=e=>{e.scrollTop=e.scrollHeight},me=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e;if(typeof t.id!=`string`||typeof t.name!=`string`||typeof t.command!=`string`)return[];let n=t.runner===`vitest`||t.runner===`jest`||t.runner===`unknown`?t.runner:`auto`;return[{id:t.id,name:t.name,command:t.command,runner:n,...typeof t.cwd==`string`&&t.cwd.trim()!==``?{cwd:t.cwd}:{}}]}):[]}catch{return[]}},F=e=>e===`running`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e===`passed`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e===`failed`||e===`error`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e===`stopped`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`,I=e=>e==null?null:e<1e3?`${e} ms`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`,L=e=>{let t=e.split(`/`);return t[t.length-1]||e},R=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),z=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),B=(e,t)=>{let n=R(t);return n.length===0?e:e.flatMap(e=>{let t=L(e.path);if(z(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>z(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},V=e=>e===`passed`?`Passed`:e===`failed`?`Failed`:e===`running`?`Running`:e===`error`?`Error`:e===`stopped`?`Stopped`:`Idle`,he=e=>e?.selection?e.selection.kind===`all`?`All tests`:e.selection.kind===`case`?e.selection.name:L(e.selection.path):`No test run yet`,H=e=>/(^|\s)(?:FAIL|✗)(\s|$)|\b(?:failed|error|stderr|Expected:|Received:)\b/i.test(e)?`failure`:/(^|\s)(?:PASS|✓)(\s|$)|\bpassed\b/i.test(e)?`success`:/\b(?:WARN|warning|skipped|todo|pending)\b/i.test(e)?`warning`:`default`,U=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,ge=(e,t)=>e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.name===r.name&&e.command===r.command&&e.cwd===r.cwd&&e.runner===r.runner}):!1,W=({line:e,tone:t})=>(0,A.jsx)(`div`,{"data-tone":t,className:c(`whitespace-pre-wrap break-words`,U(t)),children:e===``?` `:e}),G=(0,O.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,A.jsxs)(`button`,{type:`button`,"aria-label":`Run ${r}`,title:r,className:c(`flex w-full min-w-0 items-center gap-2.5 rounded-xl px-2.5 py-1.5 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,e?`cursor-pointer hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,n&&`bg-sky-500/10`),disabled:!e,onClick:()=>{i(t,r)},children:[(0,A.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,A.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));G.displayName=`TestCaseRow`;var K=(0,O.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:o,onRunFile:l,onToggleFile:u})=>{let d=e===`file`&&n===i.path,p=e===`case`&&n===i.path;return(0,A.jsx)(C,{open:a,onOpenChange:e=>{u(i.path,e)},children:(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(_,{asChild:!0,children:(0,A.jsx)(s,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`${a?`Collapse`:`Expand`} ${i.path}`,className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,A.jsx)(f,{className:c(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,A.jsx)(`button`,{type:`button`,"aria-label":`Run ${i.path}`,className:c(`min-w-0 flex-1 rounded-xl border border-border/60 bg-background/20 px-2.5 py-2 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,r?`cursor-pointer hover:border-sky-400/35 hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,(d||p)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{l(i.path)},children:(0,A.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,A.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border border-border/70 bg-background/60 text-sky-200`,children:(0,A.jsx)(b,{className:`h-3.5 w-3.5`})}),(0,A.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,A.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:L(i.path)}),(0,A.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,A.jsxs)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:[i.cases.length,` test`,i.cases.length===1?``:`s`]})]})]})})]}),(0,A.jsx)(E,{children:(0,A.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,A.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:`No named tests were detected in this file.`}):(0,A.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let s=e===`case`&&n===i.path&&t===a.name;return(0,A.jsx)(G,{canRunGranular:r,filePath:i.path,isActive:s,name:a.name,onRunCase:o},a.id)})})})})]})})});K.displayName=`DiscoveryFileRow`;var _e=(0,O.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,availableCommands:r,canRunGranular:i,discovery:a,expandedFiles:l,isLoading:d,selectedCommandId:m,selectedCommandName:h,sessionError:_,sessionStatus:ee,shouldShowCommandSelector:te,onRunCase:ne,onRunFile:v,onSelectCommand:b,onToggleFile:x})=>{let[C,w]=(0,O.useState)(``),E=(0,O.useMemo)(()=>B(a,C),[a,C]),D=(0,O.useMemo)(()=>E.reduce((e,t)=>e+t.cases.length,0),[E]),re=R(C).length>0;return(0,A.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,A.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[te&&(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:`Test scope`}),(0,A.jsxs)(S,{children:[(0,A.jsx)(g,{asChild:!0,children:(0,A.jsxs)(s,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":`Selected test command`,disabled:r.length===0||ee===`running`,children:[(0,A.jsx)(`span`,{className:`truncate`,children:h??`Select test scope`}),(0,A.jsx)(f,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,A.jsx)(T,{align:`start`,className:`w-72`,children:r.map(e=>(0,A.jsx)(y,{className:c(m===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{b(e.id)},children:(0,A.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),(a.length>0||C.length>0)&&(0,A.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,A.jsx)(p,{type:`search`,value:C,onChange:e=>{w(e.target.value)},placeholder:`Filter`,"aria-label":`Filter test cases`,className:`pr-10`}),C.length>0&&(0,A.jsx)(s,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Clear test case filter`,className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{w(``)},children:(0,A.jsx)(u,{className:`size-4`})})]}),!r.length&&(0,A.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:`No test commands are configured for this target yet.`}),_&&(0,A.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:_}),(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-hidden rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,A.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,A.jsx)(`div`,{className:`min-w-0`,children:(0,A.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[E.length,` file`,E.length===1?``:`s`,`, `,D,` test case`,D===1?``:`s`]})}),d&&(0,A.jsx)(o,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:a.length===0&&!d?(0,A.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:`No JS or TS test files were detected for this target yet.`}):E.length===0?(0,A.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:`No test cases match this filter.`}):E.map(r=>(0,A.jsx)(K,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:i,file:r,isExpanded:re||(l[r.path]??!1),onRunCase:ne,onRunFile:v,onToggleFile:x},r.path))})]})]})})});_e.displayName=`DiscoveryPane`;var ve=(0,O.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:s})=>{let l=(0,O.useMemo)(()=>t?P(t).replaceAll(`\r
|
|
2
|
+
`,`
|
|
3
|
+
`).replaceAll(`\r`,`
|
|
4
|
+
`).split(`
|
|
5
|
+
`).map(e=>({line:e,tone:H(e)})):[],[t]);return(0,A.jsx)(`section`,{className:`min-h-0 px-4 py-4`,children:(0,A.jsxs)(`div`,{className:`flex h-full flex-col gap-3`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,A.jsx)(`span`,{className:`font-medium text-foreground`,children:r}),i&&(0,A.jsx)(m,{variant:`outline`,className:c(`px-3 py-1 text-xs uppercase tracking-[0.2em]`,F(i)),children:V(i)}),a&&(0,A.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-xs font-medium uppercase tracking-[0.18em]`,children:[(0,A.jsxs)(`span`,{className:`text-rose-200`,children:[a.failed,` failed`]}),(0,A.jsxs)(`span`,{className:`text-emerald-200`,children:[a.passed,` passed`]})]}),e!=null&&(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:I(e)}),n&&(0,A.jsx)(m,{variant:`outline`,className:`border-amber-400/30 bg-amber-500/10 text-amber-200`,children:`Output trimmed to recent logs`})]}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-2xl border border-border/70 bg-[#0d1017]`,children:(0,A.jsx)(`div`,{ref:o,"aria-label":`Test output`,className:`h-full overflow-auto px-4 py-4`,onScroll:s,children:(0,A.jsx)(`div`,{className:`font-mono text-xs leading-5`,children:l.length>0?l.map((e,t)=>(0,A.jsx)(W,{line:e.line,tone:e.tone},`${t}:${e.line}`)):(0,A.jsx)(`div`,{className:`text-slate-200`,children:`No test output yet.`})})})})]})})});ve.displayName=`OutputPane`;var q=({testCommands:e,onClose:t,...n})=>{let r=n.scope,i=n.projectId,a=n.scope===`ticket`?n.ticketId:null,c=n.scope===`project`?n.targetKind:null,f=n.scope===`project`?n.targetBundleId:null,[p,m]=(0,O.useState)(e),[g,_]=(0,O.useState)(null),[y,b]=(0,O.useState)([]),[S,C]=(0,O.useState)(``),[T,E]=(0,O.useState)({}),[j,M]=(0,O.useState)(!0),[N,P]=(0,O.useState)(!1),[F,I]=(0,O.useState)(!1),[L,R]=(0,O.useState)(null),[z,B]=(0,O.useState)(!1),[V,H]=(0,O.useState)(!1),U=(0,O.useRef)(null),W=(0,O.useRef)(!1),G=(0,O.useRef)(null),K=(0,O.useRef)(!0),q=(0,O.useRef)(null),J=(0,O.useRef)(null),ye=g?.selection?.kind??null,be=g?.selection?.kind===`all`?null:g?.selection?.path??null,xe=g?.selection?.kind===`case`?g.selection.name:null,Y=g?.id??null,X=g?.status??null,Z=(0,O.useMemo)(()=>p.find(e=>e.id===S)??null,[p,S]),Se=(0,O.useMemo)(()=>g?.summary?.failed_count==null&&g?.summary?.passed_count==null?null:{failed:g?.summary?.failed_count??0,passed:g?.summary?.passed_count??0},[g?.summary?.failed_count,g?.summary?.passed_count]),Ce=!!(Z&&g?.status!==`running`&&!N&&!F),we=Ce,Te=Ce&&V,Ee=p.length>1;(0,O.useEffect)(()=>{S||p.length===0||C(p[0]?.id??``)},[p,S]),(0,O.useEffect)(()=>{e.length>0&&m(t=>ge(t,e)?t:e)},[e]),(0,O.useEffect)(()=>{if(p.length>0||!i)return;let e=new AbortController;return l(e.signal).then(e=>{let t=e.find(e=>e.id===i);t&&m(e=>{let n=me(t.test_commands);return ge(e,n)?e:n})}).catch(()=>{}),()=>{e.abort()}},[p.length,i]),(0,O.useEffect)(()=>{let e=e=>{!e||e.id!==U.current||_(e)},t=e=>{!e||e.session_id!==U.current||_(t=>!t||t.id!==e.session_id?t:{...t,output:de(t.output,e.chunk),output_truncated:e.output_truncated})};return D.on(`test-session:updated`,e),D.on(`test-session:output`,t),()=>{D.off(`test-session:updated`,e),D.off(`test-session:output`,t)}},[]),(0,O.useEffect)(()=>{let e=G.current;if(!e){q.current=g?.output??null,J.current=g?.status??null;return}let t=q.current!==(g?.output??null),n=J.current!==`running`&&g?.status===`running`;if(n&&(K.current=!0),n||t&&g?.status===`running`&&K.current){pe(e);let t=window.requestAnimationFrame(()=>{pe(e)});return q.current=g?.output??null,J.current=g?.status??null,()=>{window.cancelAnimationFrame(t)}}q.current=g?.output??null,J.current=g?.status??null},[g?.output,g?.status]),(0,O.useEffect)(()=>{let e=!1;return(async()=>{try{let t=r===`project`?await oe(i,{target_kind:c??`repo_root`,target_bundle_id:f??null}):await se(a??``,i);if(e)return;U.current=t.id,_(t)}catch(t){e||R(t instanceof d?t.message:`Unable to load the test runner right now.`)}finally{!e&&U.current==null&&M(!1)}})(),()=>{e=!0}},[i,r,f,c,a]),(0,O.useEffect)(()=>{if(!g?.id){H(!1);return}if(p.length>0&&!S){H(!1);return}let e=new AbortController,t=!1;return M(!0),H(!1),ce(g.id,{commandId:S||null,signal:e.signal}).then(e=>{t||(b(e.files),H(e.supports_granular_selection))}).catch(n=>{t||e.signal.aborted||R(n instanceof d?n.message:`Unable to discover tests right now.`)}).finally(()=>{t||M(!1)}),()=>{t=!0,e.abort()}},[p.length,S,g?.id]),(0,O.useEffect)(()=>()=>{let e=U.current;!e||W.current||(W.current=!0,k(e).catch(()=>{}))},[]);let Q=(0,O.useCallback)(async e=>{if(!(!Y||X===`running`||!Z||N||F)){R(null),P(!0);try{_(await le(Y,{command_id:Z.id,selection:e}))}catch(e){R(e instanceof d?e.message:`Unable to start the selected tests right now.`)}finally{P(!1)}}},[N,F,Z,Y,X]),De=(0,O.useCallback)(async()=>{if(!(!Y||X!==`running`||F)){R(null),I(!0);try{_(await ue(Y))}catch(e){R(e instanceof d?e.message:`Unable to stop the test run right now.`)}finally{I(!1)}}},[F,Y,X]),$=(0,O.useCallback)(()=>{let e=U.current;if(!e||W.current){t();return}W.current=!0,t(),k(e).catch(()=>{})},[t]),Oe=(0,O.useCallback)(()=>{if(X===`running`){B(!0);return}$()},[$,X]),ke=(0,O.useCallback)(()=>{let e=G.current;e&&(K.current=fe(e))},[]),Ae=(0,O.useCallback)(e=>{C(e)},[]),je=(0,O.useCallback)((e,t)=>{E(n=>(n[e]??!1)===t?n:{...n,[e]:t})},[]),Me=(0,O.useCallback)(e=>{Q({kind:`file`,path:e})},[Q]),Ne=(0,O.useCallback)((e,t)=>{Q({kind:`case`,path:e,name:t})},[Q]);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(x,{open:!0,onOpenChange:e=>{e||Oe()},children:(0,A.jsxs)(ne,{showCloseButton:!1,overlayClassName:`bg-black/70`,className:`flex h-[calc(100vh-2rem)] max-h-[58rem] w-full max-w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden rounded-3xl border border-[#2a2a38] bg-[#16161f] p-0 shadow-2xl sm:max-w-7xl`,children:[(0,A.jsx)(ae,{className:`sr-only`,children:`Tests`}),(0,A.jsx)(h,{className:`sr-only`,children:`Run configured tests for the selected project target and discard the session when this dialog closes.`}),(0,A.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border px-6 py-4`,children:[(0,A.jsx)(`div`,{className:`min-w-0`,children:(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-2xl border border-border/70 bg-background/60 text-sky-200`,children:(0,A.jsx)(w,{className:`h-5 w-5`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h2`,{className:`text-2xl font-semibold text-foreground`,children:`Tests`}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:g?.target_label??`Preparing target...`})]})]})}),(0,A.jsx)(v,{asChild:!0,children:(0,A.jsx)(s,{type:`button`,"aria-label":`Close modal`,variant:`ghost`,size:`icon-sm`,className:`cursor-pointer text-muted-foreground hover:text-foreground`,children:(0,A.jsx)(u,{className:`h-4 w-4`})})})]}),(0,A.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-0 lg:grid-cols-[22rem_minmax(0,1fr)]`,children:[(0,A.jsx)(_e,{activeSelectionKind:ye,activeSelectionName:xe,activeSelectionPath:be,availableCommands:p,canRunGranular:Te,discovery:y,expandedFiles:T,isLoading:j,selectedCommandId:S,selectedCommandName:Z?.name??null,sessionError:L,sessionStatus:X,shouldShowCommandSelector:Ee,onRunCase:Ne,onRunFile:Me,onSelectCommand:Ae,onToggleFile:je}),(0,A.jsx)(ve,{durationMs:g?.duration_ms??null,output:g?.output??``,outputTruncated:g?.output_truncated??!1,selectionLabel:he(g),status:X,summaryCounts:Se,viewportRef:G,onScroll:ke})]}),(0,A.jsx)(ie,{className:`border-t border-border/70 px-6 py-4 sm:flex-row sm:items-center sm:justify-end`,children:(0,A.jsx)(`div`,{className:`flex items-center justify-end gap-2`,children:g?.status===`running`?(0,A.jsxs)(s,{type:`button`,variant:`destructive`,onClick:()=>{De()},disabled:F,children:[F?(0,A.jsx)(o,{className:`h-4 w-4 animate-spin`}):(0,A.jsx)(ee,{className:`h-4 w-4`}),(0,A.jsx)(`span`,{children:F?`Stopping...`:`Stop`})]}):(0,A.jsxs)(s,{type:`button`,variant:`success`,disabled:!we,onClick:()=>{Q({kind:`all`})},children:[N?(0,A.jsx)(o,{className:`h-4 w-4 animate-spin`}):(0,A.jsx)(te,{className:`h-4 w-4`}),(0,A.jsx)(`span`,{children:N?`Running...`:`Run`})]})})})]})}),z&&(0,A.jsx)(re,{title:`Stop test run and close?`,description:`Closing the Tests dialog discards the current session and its output. Stop the active test run first?`,confirmLabel:`Stop and close`,cancelLabel:`Keep running`,confirmVariant:`destructive`,onConfirm:()=>{B(!1),$()},onCancel:()=>B(!1)})]})};export{q as TestsDialog};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-BYbx6iT9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),a=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=(void 0)?.trim()||(typeof window<`u`&&/^https?:\/\//.test(window.location.origin)?window.location.origin:`http://localhost:3001`),s=class extends Error{status;constructor(e,t=0){super(e),this.name=`ApiError`,this.status=t}},c=e=>`${o}${e}`,l=(e,t)=>{let n=new URL(c(e));return t&&n.searchParams.set(`project_id`,t),n.toString()},u=e=>e instanceof DOMException&&e.name===`AbortError`,d=async(e,t)=>{try{let t=await e.json();if(t.error)return t.error}catch{}return t},f=async(e,t={})=>{let{body:n,headers:r,fallbackErrorMessage:i=`Request failed.`,...a}=t,o=new Headers(r),c=Array.from(o.keys()).length>0;n!==void 0&&o.set(`Content-Type`,`application/json`);let l=await fetch(e,{...a,...n===void 0?{}:{body:JSON.stringify(n)},...c||n!==void 0?{headers:o}:{}});if(!l.ok)throw new s(await d(l,i),l.status);return l},p=async(e,t={})=>await(await f(e,t)).json(),m=e=>e&&e.match(/filename="?([^";]+)"?/i)?.[1]?.trim()||`project-archon-memory-v3.json`,h=e=>p(c(`/projects`),{signal:e}),g=e=>p(c(`/projects`),{method:`POST`,body:e,fallbackErrorMessage:`Unable to create the project right now.`}),_=(e,t)=>p(c(`/projects/${e}`),{method:`PATCH`,body:t,fallbackErrorMessage:`Unable to update the project right now.`}),v=e=>f(c(`/projects/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to delete the project right now.`}),y=e=>f(c(`/projects/${e}/open-ide`),{method:`POST`,fallbackErrorMessage:`Unable to open the project IDE right now.`}),b=(e,t)=>p(c(`/projects/${e}/branches`),{signal:t,fallbackErrorMessage:`Unable to load project branches right now.`}),x=(e,t)=>p(c(`/projects/${e}/target`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to update the project target right now.`}),S=e=>p(c(`/projects/auto-config`),{method:`POST`,body:e,fallbackErrorMessage:`Unable to infer project settings right now.`}),C=()=>p(c(`/projects/browse-repo-path`),{method:`POST`,fallbackErrorMessage:`Unable to open the folder picker right now.`}),w=e=>p(c(`/projects/validate-repo-path`),{method:`POST`,body:e,fallbackErrorMessage:`Unable to validate the repository path right now.`}),T=(e,t,n={})=>{let r=new URL(c(`/projects/${e}/file-suggestions`));return r.searchParams.set(`q`,t),n.ticketId&&r.searchParams.set(`ticket_id`,n.ticketId),p(r.toString(),{signal:n.signal,fallbackErrorMessage:`Unable to load project file suggestions right now.`})},E=(e,t,n={})=>p(c(`/projects/${e}/branch${n.refreshRemote?`?refresh_remote=true`:``}`),{signal:t,fallbackErrorMessage:`Unable to load the current branch right now.`}),D=e=>p(c(`/projects/${e}/git-pull`),{method:`POST`,fallbackErrorMessage:`Unable to sync the current branch right now.`}),O=e=>p(c(`/projects/${e}/diff`),{fallbackErrorMessage:`Unable to load the diff right now.`}),k=(e,t)=>p(c(`/projects/${e}/memories`),{signal:t,fallbackErrorMessage:`Unable to load project memories right now.`}),A=(e,t={})=>{let n=new URL(c(`/projects/${e}/git-status`));return t.refreshRemote&&n.searchParams.set(`refresh_remote`,`true`),p(n.toString(),{signal:t.signal,fallbackErrorMessage:`Unable to load git status right now.`})},j=e=>p(c(`/projects/${e}/git-commits`),{fallbackErrorMessage:`Unable to load local commits right now.`}),M=(e,t)=>p(c(`/projects/${e}/git-commit`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to create the commit right now.`}),N=(e,t)=>p(c(`/projects/${e}/git-commit-message`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to generate a commit message right now.`}),P=e=>p(c(`/projects/${e}/git-push`),{method:`POST`,fallbackErrorMessage:`Unable to push the branch right now.`}),ee=e=>p(c(`/projects/${e}/git-undo-latest`),{method:`POST`,fallbackErrorMessage:`Unable to undo the latest local commit right now.`}),F=(e,t)=>p(c(`/projects/${e}/memories`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to create the project memory right now.`}),te=(e,t,n)=>p(c(`/projects/${e}/memories/${t}`),{method:`PATCH`,body:n,fallbackErrorMessage:`Unable to update the project memory right now.`}),ne=(e,t)=>p(c(`/projects/${e}/memories/${t}/archive`),{method:`POST`,fallbackErrorMessage:`Unable to archive the project memory right now.`}),re=(e,t)=>p(c(`/projects/${e}/memories/${t}/restore`),{method:`POST`,fallbackErrorMessage:`Unable to restore the project memory right now.`}),ie=(e,t)=>p(c(`/projects/${e}/memories/${t}/supersede`),{method:`POST`,fallbackErrorMessage:`Unable to supersede the project memory right now.`}),I=(e,t)=>p(c(`/projects/${e}/context`),{signal:t,fallbackErrorMessage:`Unable to load project context right now.`}),L=e=>p(c(`/projects/${e}/context/scan`),{method:`POST`,fallbackErrorMessage:`Unable to start the project context scan right now.`}),ae=(e,t)=>p(c(`/projects/${e}/context/artifacts`),{signal:t,fallbackErrorMessage:`Unable to load project context artifacts right now.`}),oe=(e,t,n)=>p(c(`/projects/${e}/memory/relevant?ticket_id=${encodeURIComponent(t)}`),{signal:n,fallbackErrorMessage:`Unable to load relevant project memory right now.`}),R=(e,t,n,r)=>p(c(t?`/projects/${e}/memory/suggestions?ticket_id=${encodeURIComponent(t)}`:r?`/projects/${e}/memory/suggestions?chat_session_id=${encodeURIComponent(r)}`:`/projects/${e}/memory/suggestions`),{signal:n,fallbackErrorMessage:`Unable to load project memory suggestions right now.`}),se=(e,t,n)=>p(c(`/projects/${e}/memories/${t}/accept`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to accept the project memory right now.`}),ce=(e,t)=>p(c(`/projects/${e}/memories/${t}/dismiss`),{method:`POST`,fallbackErrorMessage:`Unable to dismiss the project memory right now.`}),le=(e,t,n,r)=>p(c(`/projects/${e}/memories/${t}/apply-to-existing`),{method:`POST`,body:{memory_id:n,...r},fallbackErrorMessage:`Unable to apply the project memory right now.`}),ue=async e=>{let t=await f(c(`/projects/${e}/memory/export`),{fallbackErrorMessage:`Unable to export project memory right now.`});return{filename:m(t.headers.get(`Content-Disposition`)),archive:await t.json()}},de=(e,t)=>p(c(`/projects/${e}/memory/import`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to import project memory right now.`}),z=e(r(),1),fe=e(a(),1);function pe(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pe(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function me(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pe(e))&&(r&&(r+=` `),r+=t);return r}var he=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ge=me,_e=(e,t)=>n=>{if(t?.variants==null)return ge(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=he(t)||he(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return ge(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ye(...e){return t=>{let n=!1,r=e.map(e=>{let r=ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ve(e[t],null)}}}}function B(...e){return z.useCallback(ye(...e),e)}var be=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),xe=t(((e,t)=>{t.exports=be()})),V=xe();function Se(e){let t=we(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e,a=z.Children.toArray(r),o=a.find(De);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return(0,V.jsx)(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return(0,V.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Ce=Se(`Slot`);function we(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(z.isValidElement(n)){let e=ke(n),i=Oe(r,n.props);return n.type!==z.Fragment&&(i.ref=t?ye(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Te=Symbol(`radix.slottable`);function Ee(e){let t=({children:e})=>(0,V.jsx)(V.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Te,t}function De(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Te}function Oe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ke(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var H=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Se(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,V.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ae(e,t){e&&fe.flushSync(()=>e.dispatchEvent(t))}function je(e,t){let n=z.createContext(t),r=e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return(0,V.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=z.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Me(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,V.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ne(i,...t)]}function Ne(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Pe(e){let t=e+`CollectionProvider`,[n,r]=Me(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return(0,V.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Se(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,V.jsx)(c,{ref:B(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Se(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=B(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,V.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Fe=globalThis?.document?z.useLayoutEffect:()=>{},Ie=z.useInsertionEffect||Fe;function Le({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Re({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=ze(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Re({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Ie(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ze(e){return typeof e==`function`}function Be(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var Ve=e=>{let{present:t,children:n}=e,r=He(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=B(r.ref,We(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};Ve.displayName=`Presence`;function He(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=Be(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=Ue(r.current);a.current=o===`mounted`?e:`none`},[o]),Fe(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ue(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Fe(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ue(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ue(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ue(e){return e?.animationName||`none`}function We(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ge=z.useId||(()=>void 0),Ke=0;function qe(e){let[t,n]=z.useState(Ge());return Fe(()=>{e||n(e=>e??String(Ke++))},[e]),e||(t?`radix-${t}`:``)}var Je=z.createContext(void 0);function Ye(e){let t=z.useContext(Je);return e||t||`ltr`}function Xe(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ze(e,t=globalThis?.document){let n=Xe(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Qe=`DismissableLayer`,$e=`dismissableLayer.update`,et=`dismissableLayer.pointerDownOutside`,tt=`dismissableLayer.focusOutside`,nt,rt=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),it=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(rt),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=B(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=st(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=ct(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ze(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nt)}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lt())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener($e,e),()=>document.removeEventListener($e,e)},[]),(0,V.jsx)(H.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,x.onPointerDownCapture)})});it.displayName=Qe;var at=`DismissableLayerBranch`,ot=z.forwardRef((e,t)=>{let n=z.useContext(rt),r=z.useRef(null),i=B(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,V.jsx)(H.div,{...e,ref:i})});ot.displayName=at;function st(e,t=globalThis?.document){let n=Xe(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ut(et,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ct(e,t=globalThis?.document){let n=Xe(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&ut(tt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lt(){let e=new CustomEvent($e);document.dispatchEvent(e)}function ut(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ae(i,a):i.dispatchEvent(a)}var dt=`focusScope.autoFocusOnMount`,ft=`focusScope.autoFocusOnUnmount`,pt={bubbles:!1,cancelable:!0},mt=`FocusScope`,ht=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=Xe(i),u=Xe(a),d=z.useRef(null),f=B(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:St(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||St(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&St(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){Ct.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dt,pt);s.addEventListener(dt,l),s.dispatchEvent(t),t.defaultPrevented||(gt(Et(vt(s)),{select:!0}),document.activeElement===e&&St(s))}return()=>{s.removeEventListener(dt,l),setTimeout(()=>{let t=new CustomEvent(ft,pt);s.addEventListener(ft,u),s.dispatchEvent(t),t.defaultPrevented||St(e??document.body,{select:!0}),s.removeEventListener(ft,u),Ct.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_t(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&St(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&St(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,V.jsx)(H.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});ht.displayName=mt;function gt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(St(r,{select:t}),document.activeElement!==n)return}function _t(e){let t=vt(e);return[yt(t,e),yt(t.reverse(),e)]}function vt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yt(e,t){for(let n of e)if(!bt(n,{upTo:t}))return n}function bt(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 xt(e){return e instanceof HTMLInputElement&&`select`in e}function St(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xt(e)&&t&&e.select()}}var Ct=wt();function wt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Tt(e,t),e.unshift(t)},remove(t){e=Tt(e,t),e[0]?.resume()}}}function Tt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Et(e){return e.filter(e=>e.tagName!==`A`)}var Dt=`Portal`,Ot=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);Fe(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?fe.createPortal((0,V.jsx)(H.div,{...r,ref:t}),o):null});Ot.displayName=Dt;var kt=0;function At(){z.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jt()),document.body.insertAdjacentElement(`beforeend`,e[1]??jt()),kt++,()=>{kt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kt--}},[])}function jt(){let 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 W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)};function Mt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Nt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Pt=`right-scroll-bar-position`,Ft=`width-before-scroll-bar`,It=`with-scroll-bars-hidden`,Lt=`--removed-body-scroll-bar-size`;function Rt(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function zt(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Bt=typeof window<`u`?z.useLayoutEffect:z.useEffect,Vt=new WeakMap;function Ht(e,t){var n=zt(t||null,function(t){return e.forEach(function(e){return Rt(e,t)})});return Bt(function(){var t=Vt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Rt(e,null)}),i.forEach(function(e){r.has(e)||Rt(e,a)})}Vt.set(n,e)},[e]),n}function Ut(e){return e}function Wt(e,t){t===void 0&&(t=Ut);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Gt(e){e===void 0&&(e={});var t=Wt(null);return t.options=W({async:!0,ssr:!1},e),t}var Kt=function(e){var t=e.sideCar,n=Mt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,W({},n))};Kt.isSideCarExport=!0;function qt(e,t){return e.useMedium(t),Kt}var Jt=Gt(),Yt=function(){},Xt=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:Yt,onWheelCapture:Yt,onTouchMoveCapture:Yt}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Mt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Ht([n,t]),C=W(W({},b),i);return z.createElement(z.Fragment,null,u&&z.createElement(x,{sideCar:Jt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),W(W({},C),{ref:S})):z.createElement(v,W({},C,{className:c,ref:S}),s))});Xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xt.classNames={fullWidth:Ft,zeroRight:Pt};var Zt,Qt=function(){if(Zt)return Zt;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function $t(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Qt();return t&&e.setAttribute(`nonce`,t),e}function en(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tn(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var nn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$t())&&(en(t,n),tn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rn=function(){var e=nn();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},an=function(){var e=rn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},on={left:0,top:0,right:0,gap:0},sn=function(e){return parseInt(e||``,10)||0},cn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[sn(n),sn(r),sn(i)]},ln=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return on;var t=cn(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])}},un=an(),dn=`data-scroll-locked`,fn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${It} {
|
|
3
|
+
overflow: hidden ${r};
|
|
4
|
+
padding-right: ${s}px ${r};
|
|
5
|
+
}
|
|
6
|
+
body[${dn}] {
|
|
7
|
+
overflow: hidden ${r};
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
+
padding-left: ${i}px;
|
|
11
|
+
padding-top: ${a}px;
|
|
12
|
+
padding-right: ${o}px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: ${s}px ${r};
|
|
16
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.${Pt} {
|
|
20
|
+
right: ${s}px ${r};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.${Ft} {
|
|
24
|
+
margin-right: ${s}px ${r};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${Pt} .${Pt} {
|
|
28
|
+
right: 0 ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${Ft} .${Ft} {
|
|
32
|
+
margin-right: 0 ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[${dn}] {
|
|
36
|
+
${Lt}: ${s}px;
|
|
37
|
+
}
|
|
38
|
+
`},pn=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mn=function(){z.useEffect(function(){return document.body.setAttribute(dn,(pn()+1).toString()),function(){var e=pn()-1;e<=0?document.body.removeAttribute(dn):document.body.setAttribute(dn,e.toString())}},[])},hn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mn();var a=z.useMemo(function(){return ln(i)},[i]);return z.createElement(un,{styles:fn(a,!t,i,n?``:`!important`)})},gn=!1;if(typeof window<`u`)try{var _n=Object.defineProperty({},`passive`,{get:function(){return gn=!0,!0}});window.addEventListener(`test`,_n,_n),window.removeEventListener(`test`,_n,_n)}catch{gn=!1}var vn=gn?{passive:!1}:!1,yn=function(e){return e.tagName===`TEXTAREA`},bn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yn(e)&&n[t]===`visible`)},xn=function(e){return bn(e,`overflowY`)},Sn=function(e){return bn(e,`overflowX`)},Cn=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),En(e,r)){var i=Dn(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wn=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Tn=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},En=function(e,t){return e===`v`?xn(t):Sn(t)},Dn=function(e,t){return e===`v`?wn(t):Tn(t)},On=function(e,t){return e===`h`&&t===`rtl`?-1:1},kn=function(e,t,n,r,i){var a=On(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Dn(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&En(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},An=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jn=function(e){return[e.deltaX,e.deltaY]},Mn=function(e){return e&&`current`in e?e.current:e},Nn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pn=function(e){return`
|
|
39
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
+
`},Fn=0,In=[];function Ln(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(Fn++)[0],a=z.useState(an)[0],o=z.useRef(e);z.useEffect(function(){o.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Nt([e.lockRef.current],(e.shards||[]).map(Mn),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=An(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Cn(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Cn(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return kn(h,t,e,h===`h`?s:c,!0)},[]),c=z.useCallback(function(e){var n=e;if(!(!In.length||In[In.length-1]!==a)){var r=`deltaY`in n?jn(n):An(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Nn(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mn).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=z.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Rn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=z.useCallback(function(e){n.current=An(e),r.current=void 0},[]),d=z.useCallback(function(t){l(t.type,jn(t),t.target,s(t,e.lockRef.current))},[]),f=z.useCallback(function(t){l(t.type,An(t),t.target,s(t,e.lockRef.current))},[]);z.useEffect(function(){return In.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vn),document.addEventListener(`touchmove`,c,vn),document.addEventListener(`touchstart`,u,vn),function(){In=In.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vn),document.removeEventListener(`touchmove`,c,vn),document.removeEventListener(`touchstart`,u,vn)}},[]);var p=e.removeScrollBar,m=e.inert;return z.createElement(z.Fragment,null,m?z.createElement(a,{styles:Pn(i)}):null,p?z.createElement(hn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zn=qt(Jt,Ln),Bn=z.forwardRef(function(e,t){return z.createElement(Xt,W({},e,{ref:t,sideCar:zn}))});Bn.classNames=Xt.classNames;var Vn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hn=new WeakMap,Un=new WeakMap,Wn={},Gn=0,Kn=function(e){return e&&(e.host||Kn(e.parentNode))},qn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Kn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Jn=function(e,t,n,r){var i=qn(t,Array.isArray(e)?e:[e]);Wn[n]||(Wn[n]=new WeakMap);var a=Wn[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Hn.get(e)||0)+1,l=(a.get(e)||0)+1;Hn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Un.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Gn++,function(){o.forEach(function(e){var t=Hn.get(e)-1,i=a.get(e)-1;Hn.set(e,t),a.set(e,i),t||(Un.has(e)||e.removeAttribute(r),Un.delete(e)),i||e.removeAttribute(n)}),Gn--,Gn||(Hn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn={})}},Yn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Jn(r,i,n,`aria-hidden`)):function(){return null}};function Xn(e){let[t,n]=z.useState(void 0);return Fe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Zn=[`top`,`right`,`bottom`,`left`],Qn=Math.min,G=Math.max,$n=Math.round,er=Math.floor,K=e=>({x:e,y:e}),tr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function nr(e,t,n){return G(e,Qn(t,n))}function rr(e,t){return typeof e==`function`?e(t):e}function ir(e){return e.split(`-`)[0]}function ar(e){return e.split(`-`)[1]}function or(e){return e===`x`?`y`:`x`}function sr(e){return e===`y`?`height`:`width`}function cr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function lr(e){return or(cr(e))}function ur(e,t,n){n===void 0&&(n=!1);let r=ar(e),i=lr(e),a=sr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yr(o)),[o,yr(o)]}function dr(e){let t=yr(e);return[fr(e),t,fr(t)]}function fr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pr=[`left`,`right`],mr=[`right`,`left`],hr=[`top`,`bottom`],gr=[`bottom`,`top`];function _r(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mr:pr:t?pr:mr;case`left`:case`right`:return t?hr:gr;default:return[]}}function vr(e,t,n,r){let i=ar(e),a=_r(ir(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(fr)))),a}function yr(e){let t=ir(e);return tr[t]+e.slice(t.length)}function br(e){return{top:0,right:0,bottom:0,left:0,...e}}function xr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:br(e)}function Sr(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cr(e,t,n){let{reference:r,floating:i}=e,a=cr(t),o=lr(t),s=sr(o),c=ir(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ar(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function wr(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=rr(t,e),p=xr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sr(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Tr=50,Er=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cr(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Tr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Dr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=rr(e,t)||{};if(l==null)return{};let d=xr(u),f={x:n,y:r},p=lr(i),m=sr(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Qn(d[_],T),D=Qn(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=nr(O,A,k),M=!c.arrow&&ar(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Or=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=rr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ir(r),_=cr(o),v=ir(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yr(o)]:dr(o)),x=p!==`none`;!d&&x&&b.push(...vr(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ur(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cr(t))||T.every(e=>cr(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cr(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function kr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ar(e){return Zn.some(t=>e[t]>=0)}var jr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=rr(e,t);switch(i){case`referenceHidden`:{let e=kr(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ar(e)}}}case`escaped`:{let e=kr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ar(e)}}}default:return{}}}}},Mr=new Set([`left`,`top`]);async function Nr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ir(n),s=ar(n),c=cr(n)===`y`,l=Mr.has(o)?-1:1,u=a&&c?-1:1,d=rr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Pr=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Nr(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fr=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=rr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cr(ir(i)),p=or(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=nr(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=nr(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ir=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=rr(e,t),u={x:n,y:r},d=cr(i),f=or(d),p=u[f],m=u[d],h=rr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Mr.has(ir(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Lr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=rr(e,t),u=await o.detectOverflow(t,l),d=ir(i),f=ar(i),p=cr(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Qn(h-u[g],v),x=Qn(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=G(u.left,0),t=G(u.right,0),n=G(u.top,0),r=G(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:G(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:G(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Rr(){return typeof window<`u`}function zr(e){return Vr(e)?(e.nodeName||``).toLowerCase():`#document`}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){return((Vr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Vr(e){return Rr()?e instanceof Node||e instanceof q(e).Node:!1}function J(e){return Rr()?e instanceof Element||e instanceof q(e).Element:!1}function Hr(e){return Rr()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Ur(e){return!Rr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Wr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gr(e){return/^(table|td|th)$/.test(zr(e))}function Kr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qr=/transform|translate|scale|rotate|perspective|filter/,Jr=/paint|layout|strict|content/,Yr=e=>!!e&&e!==`none`,Xr;function Zr(e){let t=J(e)?Y(e):e;return Yr(t.transform)||Yr(t.translate)||Yr(t.scale)||Yr(t.rotate)||Yr(t.perspective)||!$r()&&(Yr(t.backdropFilter)||Yr(t.filter))||qr.test(t.willChange||``)||Jr.test(t.contain||``)}function Qr(e){let t=ni(e);for(;Hr(t)&&!ei(t);){if(Zr(t))return t;if(Kr(t))return null;t=ni(t)}return null}function $r(){return Xr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Xr}function ei(e){return/^(html|body|#document)$/.test(zr(e))}function Y(e){return q(e).getComputedStyle(e)}function ti(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(zr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ur(e)&&e.host||Br(e);return Ur(t)?t.host:t}function ri(e){let t=ni(e);return ei(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Wr(t)?t:ri(t)}function ii(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ri(e),i=r===e.ownerDocument?.body,a=q(r);if(i){let e=ai(a);return t.concat(a,a.visualViewport||[],Wr(r)?r:[],e&&n?ii(e):[])}else return t.concat(r,ii(r,[],n))}function ai(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oi(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Hr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=$n(n)!==a||$n(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function si(e){return J(e)?e:e.contextElement}function ci(e){let t=si(e);if(!Hr(t))return K(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=oi(t),o=(a?$n(n.width):n.width)/r,s=(a?$n(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var li=K(0);function ui(e){let t=q(e);return!$r()||!t.visualViewport?li:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function di(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=si(e),o=K(1);t&&(r?J(r)&&(o=ci(r)):o=ci(e));let s=di(a,n,r)?ui(a):K(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=q(a),t=r&&J(r)?q(r):r,n=e,i=ai(n);for(;i&&r&&t!==n;){let e=ci(i),t=i.getBoundingClientRect(),r=Y(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=q(i),i=ai(n)}}return Sr({width:u,height:d,x:c,y:l})}function pi(e,t){let n=ti(e).scrollLeft;return t?t.left+n:fi(Br(e)).left+n}function mi(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-pi(e,n),y:n.top+t.scrollTop}}function hi(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Br(r),s=t?Kr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=K(1),u=K(0),d=Hr(r);if((d||!d&&!a)&&((zr(r)!==`body`||Wr(o))&&(c=ti(r)),d)){let e=fi(r);l=ci(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mi(o,c):K(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function gi(e){return Array.from(e.getClientRects())}function _i(e){let t=Br(e),n=ti(e),r=e.ownerDocument.body,i=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+pi(e),s=-n.scrollTop;return Y(r).direction===`rtl`&&(o+=G(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var vi=25;function yi(e,t){let n=q(e),r=Br(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=$r();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=pi(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=vi&&(a-=o)}else l<=vi&&(a+=l);return{width:a,height:o,x:s,y:c}}function bi(e,t){let n=fi(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Hr(e)?ci(e):K(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function xi(e,t,n){let r;if(t===`viewport`)r=yi(e,n);else if(t===`document`)r=_i(Br(e));else if(J(t))r=bi(t,n);else{let n=ui(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sr(r)}function Si(e,t){let n=ni(e);return n===t||!J(n)||ei(n)?!1:Y(n).position===`fixed`||Si(n,t)}function Ci(e,t){let n=t.get(e);if(n)return n;let r=ii(e,[],!1).filter(e=>J(e)&&zr(e)!==`body`),i=null,a=Y(e).position===`fixed`,o=a?ni(e):e;for(;J(o)&&!ei(o);){let t=Y(o),n=Zr(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Wr(o)&&!n&&Si(e,o))?r=r.filter(e=>e!==o):i=t,o=ni(o)}return t.set(e,r),r}function wi(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Kr(t)?[]:Ci(t,this._c):[].concat(n),r],o=xi(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=xi(t,a[e],i);s=G(n.top,s),c=Qn(n.right,c),l=Qn(n.bottom,l),u=G(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ti(e){let{width:t,height:n}=oi(e);return{width:t,height:n}}function Ei(e,t,n){let r=Hr(t),i=Br(t),a=n===`fixed`,o=fi(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=K(0);function l(){c.x=pi(i)}if(r||!r&&!a)if((zr(t)!==`body`||Wr(i))&&(s=ti(t)),r){let e=fi(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?mi(i,s):K(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Di(e){return Y(e).position===`static`}function Oi(e,t){if(!Hr(e)||Y(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Br(e)===n&&(n=n.ownerDocument.body),n}function ki(e,t){let n=q(e);if(Kr(e))return n;if(!Hr(e)){let t=ni(e);for(;t&&!ei(t);){if(J(t)&&!Di(t))return t;t=ni(t)}return n}let r=Oi(e,t);for(;r&&Gr(r)&&Di(r);)r=Oi(r,t);return r&&ei(r)&&Di(r)&&!Zr(r)?n:r||Qr(e)||n}var Ai=async function(e){let t=this.getOffsetParent||ki,n=this.getDimensions,r=await n(e.floating);return{reference:Ei(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ji(e){return Y(e).direction===`rtl`}var Mi={convertOffsetParentRelativeRectToViewportRelativeRect:hi,getDocumentElement:Br,getClippingRect:wi,getOffsetParent:ki,getElementRects:Ai,getClientRects:gi,getDimensions:Ti,getScale:ci,isElement:J,isRTL:ji};function Ni(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pi(e,t){let n=null,r,i=Br(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=er(d),h=er(i.clientWidth-(u+f)),g=er(i.clientHeight-(d+p)),_=er(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:G(0,Qn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ni(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Fi(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=si(e),u=i||a?[...l?ii(l):[],...t?ii(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Pi(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?fi(e):null;c&&g();function g(){let t=fi(e);h&&!Ni(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ii=Pr,Li=Fr,Ri=Or,zi=Lr,Bi=jr,Vi=Dr,Hi=Ir,Ui=(e,t,n)=>{let r=new Map,i={platform:Mi,...n},a={...i.platform,_c:r};return Er(e,t,{...i,platform:a})},Wi=typeof document<`u`?z.useLayoutEffect:function(){};function Gi(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,i;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(!Gi(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Gi(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ki(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qi(e,t){let n=Ki(e);return Math.round(t*n)/n}function Ji(e){let t=z.useRef(e);return Wi(()=>{t.current=e}),t}function Yi(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);Gi(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),T=c!=null,E=Ji(c),D=Ji(i),O=Ji(l),k=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Ui(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Gi(w.current,t)&&(w.current=t,fe.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Wi(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=z.useRef(!1);Wi(()=>(A.current=!0,()=>{A.current=!1}),[]),Wi(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=z.useMemo(()=>({reference:b,floating:x}),[b,x]),N=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=qi(M.floating,u.x),r=qi(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ki(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Xi=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Vi({element:r.current,padding:i}).fn(n):r?Vi({element:r,padding:i}).fn(n):{}}}},Zi=(e,t)=>{let n=Ii(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qi=(e,t)=>{let n=Li(e);return{name:n.name,fn:n.fn,options:[e,t]}},$i=(e,t)=>({fn:Hi(e).fn,options:[e,t]}),ea=(e,t)=>{let n=Ri(e);return{name:n.name,fn:n.fn,options:[e,t]}},ta=(e,t)=>{let n=zi(e);return{name:n.name,fn:n.fn,options:[e,t]}},na=(e,t)=>{let n=Bi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ra=(e,t)=>{let n=Xi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ia=`Arrow`,aa=z.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,V.jsx)(H.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,V.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});aa.displayName=ia;var oa=aa,sa=`Popper`,[ca,la]=Me(sa),[ua,da]=ca(sa),fa=e=>{let{__scopePopper:t,children:n}=e,[r,i]=z.useState(null);return(0,V.jsx)(ua,{scope:t,anchor:r,onAnchorChange:i,children:n})};fa.displayName=sa;var pa=`PopperAnchor`,ma=z.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=da(pa,n),o=z.useRef(null),s=B(t,o),c=z.useRef(null);return z.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,V.jsx)(H.div,{...i,ref:s})});ma.displayName=pa;var ha=`PopperContent`,[ga,_a]=ca(ha),va=z.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=da(ha,n),[_,v]=z.useState(null),y=B(t,e=>v(e)),[b,x]=z.useState(null),S=Xn(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Sa),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=Yi({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Fi(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Zi({mainAxis:i+w,alignmentAxis:o}),c&&Qi({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?$i():void 0,...k}),c&&ea({...k}),ta({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&ra({element:b,padding:s}),Ca({arrowWidth:C,arrowHeight:w}),f&&na({strategy:`referenceHidden`,...k})]}),[ee,F]=wa(M),te=Xe(m);Fe(()=>{N&&te?.()},[N,te]);let ne=P.arrow?.x,re=P.arrow?.y,ie=P.arrow?.centerOffset!==0,[I,L]=z.useState();return Fe(()=>{_&&L(window.getComputedStyle(_).zIndex)},[_]),(0,V.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:I,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,V.jsx)(ga,{scope:n,placedSide:ee,onArrowChange:x,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,V.jsx)(H.div,{"data-side":ee,"data-align":F,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});va.displayName=ha;var ya=`PopperArrow`,ba={top:`bottom`,right:`left`,bottom:`top`,left:`right`},xa=z.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=_a(ya,n),a=ba[i.placedSide];return(0,V.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]: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:(0,V.jsx)(oa,{...r,ref:t,style:{...r.style,display:`block`}})})});xa.displayName=ya;function Sa(e){return e!==null}var Ca=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=wa(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function wa(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ta=fa,Ea=ma,Da=va,Oa=xa,ka=`rovingFocusGroup.onEntryFocus`,Aa={bubbles:!1,cancelable:!0},ja=`RovingFocusGroup`,[Ma,Na,Pa]=Pe(ja),[Fa,Ia]=Me(ja,[Pa]),[La,Ra]=Fa(ja),za=z.forwardRef((e,t)=>(0,V.jsx)(Ma.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)(Ma.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)(Ba,{...e,ref:t})})}));za.displayName=ja;var Ba=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=z.useRef(null),p=B(t,f),m=Ye(a),[h,g]=Le({prop:o,defaultProp:s??null,onChange:c,caller:ja}),[_,v]=z.useState(!1),y=Xe(l),b=Na(n),x=z.useRef(!1),[S,C]=z.useState(0);return z.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(ka,y),()=>e.removeEventListener(ka,y)},[y]),(0,V.jsx)(La,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:z.useCallback(e=>g(e),[g]),onItemShiftTab:z.useCallback(()=>v(!0),[]),onFocusableItemAdd:z.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:z.useCallback(()=>C(e=>e-1),[]),children:(0,V.jsx)(H.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:U(e.onMouseDown,()=>{x.current=!0}),onFocus:U(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(ka,Aa);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);Ka([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:U(e.onBlur,()=>v(!1))})})}),Va=`RovingFocusGroupItem`,Ha=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=qe(),l=a||c,u=Ra(Va,n),d=u.currentTabStopId===l,f=Na(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return z.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,V.jsx)(Ma.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,V.jsx)(H.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:U(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ga(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?qa(n,r+1):n.slice(r+1)}setTimeout(()=>Ka(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Ha.displayName=Va;var Ua={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Wa(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ga(e,t,n){let r=Wa(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ua[r]}function Ka(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function qa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ja=za,Ya=Ha,Xa=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Za=(e,t)=>({classGroupId:e,validator:t}),Qa=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$a=`-`,eo=[],to=`arbitrary..`,no=e=>{let t=ao(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return io(e);let n=e.split($a);return ro(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Xa(i,t):t:i||eo}return n[e]||eo}}},ro=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ro(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join($a):e.slice(t).join($a),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},io=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?to+r:void 0})(),ao=e=>{let{theme:t,classGroups:n}=e;return oo(n,t)},oo=(e,t)=>{let n=Qa();for(let r in e){let i=e[r];so(i,n,r,t)}return n},so=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];co(i,t,n,r)}},co=(e,t,n,r)=>{if(typeof e==`string`){lo(e,t,n);return}if(typeof e==`function`){uo(e,t,n,r);return}fo(e,t,n,r)},lo=(e,t,n)=>{let r=e===``?t:po(t,e);r.classGroupId=n},uo=(e,t,n,r)=>{if(mo(e)){so(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Za(n,e))},fo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];so(o,po(t,a),n,r)}},po=(e,t)=>{let n=e,r=t.split($a),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Qa(),n.nextPart.set(t,i)),n=i}return n},mo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ho=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},go=`!`,_o=`:`,vo=[],yo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),bo=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===_o){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(go)?(c=s.slice(0,-1),l=!0):s.startsWith(go)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return yo(t,l,c,u)};if(t){let e=t+_o,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):yo(vo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},xo=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},So=e=>({cache:ho(e.cacheSize),parseClassName:bo(e),sortModifiers:xo(e),...no(e)}),Co=/\s+/,wo=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Co),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+go:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},To=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Eo(n))&&(i&&(i+=` `),i+=r);return i},Eo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Eo(e[r]))&&(n&&(n+=` `),n+=t);return n},Do=(e,...t)=>{let n,r,i,a,o=o=>(n=So(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=wo(e,n);return i(e,a),a};return a=o,(...e)=>a(To(...e))},Oo=[],X=e=>{let t=t=>t[e]||Oo;return t.isThemeGetter=!0,t},ko=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ao=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Mo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,No=/\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$/,Po=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Io=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>jo.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Ro=e=>!!e&&Number.isInteger(Number(e)),zo=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Bo=e=>Mo.test(e),Vo=()=>!0,Ho=e=>No.test(e)&&!Po.test(e),Uo=()=>!1,Wo=e=>Fo.test(e),Go=e=>Io.test(e),Ko=e=>!Q(e)&&!$(e),qo=e=>cs(e,fs,Uo),Q=e=>ko.test(e),Jo=e=>cs(e,ps,Ho),Yo=e=>cs(e,ms,Z),Xo=e=>cs(e,gs,Vo),Zo=e=>cs(e,hs,Uo),Qo=e=>cs(e,us,Uo),$o=e=>cs(e,ds,Go),es=e=>cs(e,_s,Wo),$=e=>Ao.test(e),ts=e=>ls(e,ps),ns=e=>ls(e,hs),rs=e=>ls(e,us),is=e=>ls(e,fs),as=e=>ls(e,ds),os=e=>ls(e,_s,!0),ss=e=>ls(e,gs,!0),cs=(e,t,n)=>{let r=ko.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ls=(e,t,n=!1)=>{let r=Ao.exec(e);return r?r[1]?t(r[1]):n:!1},us=e=>e===`position`||e===`percentage`,ds=e=>e===`image`||e===`url`,fs=e=>e===`length`||e===`size`||e===`bg-size`,ps=e=>e===`length`,ms=e=>e===`number`,hs=e=>e===`family-name`,gs=e=>e===`number`||e===`weight`,_s=e=>e===`shadow`,vs=Do(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[Lo,`full`,`auto`,...w()],E=()=>[Ro,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,Ro,$,Q]},Ro,$,Q],O=()=>[Ro,`auto`,$,Q],k=()=>[`auto`,`min`,`max`,`fr`,$,Q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Lo,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Lo,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[Lo,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,$,Q],te=()=>[...b(),rs,Qo,{position:[$,Q]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,is,qo,{size:[$,Q]}],ie=()=>[zo,ts,Jo],I=()=>[``,`none`,`full`,l,$,Q],L=()=>[``,Z,ts,Jo],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[Z,zo,rs,Qo],se=()=>[``,`none`,m,$,Q],ce=()=>[`none`,Z,$,Q],le=()=>[`none`,Z,$,Q],ue=()=>[Z,$,Q],de=()=>[Lo,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Bo],breakpoint:[Bo],color:[Vo],container:[Bo],"drop-shadow":[Bo],ease:[`in`,`out`,`in-out`],font:[Ko],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Bo],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Bo],shadow:[Bo],spacing:[`px`,Z],text:[Bo],"text-shadow":[Bo],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Lo,Q,$,g]}],container:[`container`],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ro,`auto`,$,Q]}],basis:[{basis:[Lo,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,Lo,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Ro,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,ts,Jo]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ss,Xo]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,zo,Q]}],"font-family":[{font:[ns,Zo,t]}],"font-features":[{"font-features":[Q]}],"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:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Yo]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Jo]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"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`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ro,$,Q],radial:[``,$,Q],conic:[Ro,$,Q]},as,$o]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],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-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":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()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,ts,Jo]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,os,es]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,os,es]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Z,Jo]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,os,es]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:se()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,os,es]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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:[`none`,...F()]}],"stroke-w":[{stroke:[Z,ts,Jo,Yo]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`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-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`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`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),ys=(...e)=>vs(me(e)),bs=_e(`inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-xl border text-sm font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`border-primary/60 bg-primary text-primary-foreground shadow-[0_8px_24px_rgba(108,63,217,0.28)] hover:bg-primary/92 hover:border-primary/70`,outline:`border-border bg-card/80 text-foreground hover:bg-accent hover:text-accent-foreground`,secondary:`border-border bg-secondary text-secondary-foreground hover:bg-secondary/85`,ghost:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,destructive:`border-red-500/30 bg-destructive/15 text-red-200 hover:bg-destructive/25`,success:`border-emerald-300/80 bg-emerald-400 text-[#07130d] shadow-[0_10px_30px_rgba(16,185,129,0.28)] hover:border-emerald-200 hover:bg-emerald-300`,warning:`border-amber-500/30 bg-amber-500/12 text-amber-200 hover:bg-amber-500/20`,link:`border-transparent px-0 text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4`,xs:`h-7 px-2.5 text-xs`,sm:`h-8 px-3 text-sm`,lg:`h-11 px-5 text-sm`,icon:`size-10`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-11`}},defaultVariants:{variant:`default`,size:`default`}}),xs=({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i})=>(0,V.jsx)(r?Ce:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:ys(bs({variant:t,size:n,className:e})),...i}),Ss=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Cs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ws=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ts=e=>{let t=ws(e);return t.charAt(0).toUpperCase()+t.slice(1)},Es={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ds=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Os=(0,z.createContext)({}),ks=()=>(0,z.useContext)(Os),As=(0,z.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ks()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,z.createElement)(`svg`,{ref:c,...Es,width:t??l??Es.width,height:t??l??Es.height,stroke:e??f,strokeWidth:m,className:Ss(`lucide`,p,i),...!a&&!Ds(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,z.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),js=(e,t)=>{let n=(0,z.forwardRef)(({className:n,...r},i)=>(0,z.createElement)(As,{ref:i,iconNode:t,className:Ss(`lucide-${Cs(Ts(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ts(e),n},Ms=js(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ns=js(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ps=js(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Fs=(0,z.forwardRef)(({className:e,type:t,...n},r)=>(0,V.jsx)(`input`,{ref:r,type:t,"data-slot":`input`,className:ys(`h-10 w-full min-w-0 rounded-xl border border-input bg-input/40 px-3 py-2 text-sm text-foreground transition-[border-color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20`,e),...n})),Is=({className:e})=>(0,V.jsx)(Ms,{"aria-hidden":`true`,className:e}),Ls=({className:e})=>(0,V.jsx)(Ns,{"aria-hidden":`true`,className:e}),Rs=({className:e})=>(0,V.jsx)(Ps,{"aria-hidden":`true`,className:e}),zs=[],Bs=!1,Vs=()=>{if(!(typeof window>`u`)){if(zs.length===0){Bs&&=(window.removeEventListener(`keydown`,Hs),!1);return}Bs||=(window.addEventListener(`keydown`,Hs),!0)}},Hs=e=>{if(e.key!==`Escape`)return;let t=zs[zs.length-1];t&&t.onClose()},Us=(e,t={})=>{let{disabled:n=!1}=t,r=(0,z.useRef)(e);(0,z.useEffect)(()=>{r.current=e},[e]),(0,z.useEffect)(()=>{if(n)return;let e={id:Symbol(`escape-close`),onClose:()=>r.current()};return zs.push(e),Vs(),()=>{let t=zs.findIndex(t=>t.id===e.id);t!==-1&&zs.splice(t,1),Vs()}},[n])},Ws=(...e)=>e.filter(Boolean).join(` `),Gs=({children:e,onClose:t,overlayClassName:n,panelClassName:r,closeButtonClassName:i,closeButtonLabel:a=`Close modal`,renderContent:o})=>{Us(t);let s=(0,V.jsx)(xs,{type:`button`,"aria-label":a,variant:`ghost`,size:`icon-sm`,onClick:t,className:Ws(`cursor-pointer text-muted-foreground hover:text-foreground`,i),children:(0,V.jsx)(Rs,{className:`h-4 w-4`})});return(0,V.jsx)(`div`,{className:Ws(`fixed inset-0 z-50 flex items-center justify-center`,n),children:(0,V.jsx)(`div`,{className:Ws(`relative flex flex-col`,r),role:`dialog`,"aria-modal":`true`,onClick:e=>e.stopPropagation(),children:o?o({closeButton:s}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute top-4 right-4 z-10`,children:s}),e]})})})},Ks=_e(`inline-flex w-fit shrink-0 items-center justify-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium whitespace-nowrap transition-colors [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`border-primary/30 bg-primary/15 text-primary-foreground`,secondary:`border-border bg-secondary text-secondary-foreground`,destructive:`border-red-500/25 bg-destructive/15 text-red-200`,success:`border-emerald-500/25 bg-emerald-500/12 text-emerald-200`,warning:`border-amber-500/25 bg-amber-500/12 text-amber-200`,info:`border-sky-500/25 bg-sky-500/12 text-sky-200`,outline:`border-border bg-card text-muted-foreground`,ghost:`border-transparent bg-transparent text-muted-foreground`,hotkeyDark:`border-black/25 bg-transparent text-[#07130d]/75`,link:`border-transparent px-0 text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}}),qs=({className:e,variant:t=`default`,asChild:n=!1,...r})=>(0,V.jsx)(n?Ce:`span`,{"data-slot":`badge`,"data-variant":t,className:ys(Ks({variant:t}),e),...r});export{F as $,qe as A,c as At,Se as B,Bn as C,ee as Ct,it as D,w as Dt,ht as E,x as Et,Pe as F,a as Ft,_e as G,xe as H,je as I,r as It,ne as J,se as K,Me as L,Le as M,l as Mt,Fe as N,f as Nt,Xe as O,o as Ot,U as P,p as Pt,g as Q,H as R,Yn as S,L as St,Ot as T,te as Tt,ye as U,Ee as V,B as W,C as X,S as Y,M as Z,Oa as _,y as _t,Ls as a,I as at,la as b,re as bt,Ps as c,A as ct,xs as d,b as dt,v as et,ys as f,ae as ft,Ea as g,h as gt,Ia as h,R as ht,Rs as i,E as it,Ve as j,u as jt,Ye as k,s as kt,Ms as l,oe as lt,Ja as m,k as mt,Gs as n,ue as nt,Is as o,O as ot,Ya as p,T as pt,le as q,Us as r,N as rt,Fs as s,j as st,qs as t,ce as tt,js as u,de as ut,Da as v,D as vt,At as w,_ as wt,Xn as x,ie as xt,Ta as y,P as yt,Ae as z};
|