blade-code 0.10.6 → 0.10.8
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/blade.js +2 -2
- package/dist/chunk-1w6azndv.js +1 -0
- package/dist/chunk-2gwaqpge.js +1 -0
- package/dist/chunk-2pjd4cys.js +1 -0
- package/dist/{chunk-xsmtpkjm.js → chunk-2thg3fq1.js} +1 -1
- package/dist/chunk-2zn5en0w.js +1 -0
- package/dist/{chunk-vvbd9fb5.js → chunk-33ave20b.js} +1 -1
- package/dist/chunk-3w1z6fwm.js +1 -0
- package/dist/chunk-43x4qbvt.js +1 -0
- package/dist/{chunk-kcwq1e7h.js → chunk-4h9ff923.js} +1 -1
- package/dist/chunk-52csdk21.js +3 -0
- package/dist/{chunk-frcg8gea.js → chunk-66hb7kxm.js} +2 -2
- package/dist/chunk-6j8wgp2s.js +2 -0
- package/dist/chunk-6vsszvgg.js +2 -0
- package/dist/chunk-7evtr0yr.js +10 -0
- package/dist/{chunk-yt39kfc6.js → chunk-7hbw6q6d.js} +1 -1
- package/dist/chunk-7zsyejr1.js +22 -0
- package/dist/{chunk-r083b7vn.js → chunk-8gcg2z3y.js} +16 -16
- package/dist/{chunk-rag8zchg.js → chunk-8gcvpmwk.js} +1 -1
- package/dist/{chunk-6cv4gddv.js → chunk-8gnfj89a.js} +2 -2
- package/dist/{chunk-76d7p64v.js → chunk-8h0yxh6y.js} +2 -2
- package/dist/chunk-8sfycn3y.js +194 -0
- package/dist/{chunk-c2rhwxyn.js → chunk-954vmnrn.js} +1 -1
- package/dist/chunk-a8h3fymk.js +100 -0
- package/dist/chunk-b5szbtmp.js +5 -0
- package/dist/chunk-bxm2hq0m.js +1 -0
- package/dist/chunk-c8da4b3d.js +1 -0
- package/dist/{chunk-p4j4aawd.js → chunk-cbpqcdga.js} +1 -1
- package/dist/{chunk-m4htdpr9.js → chunk-cf8e7e92.js} +72 -17
- package/dist/chunk-d0g4t8fw.js +8 -0
- package/dist/{chunk-b4n34hrn.js → chunk-eq2qj9ja.js} +1 -1
- package/dist/{chunk-7xm3vjkz.js → chunk-fj8v7pep.js} +1 -1
- package/dist/{chunk-bn0ge244.js → chunk-fxpq9nh6.js} +1 -1
- package/dist/chunk-g00wj2we.js +4 -0
- package/dist/{chunk-bnrce0hg.js → chunk-h28ptrrt.js} +1 -1
- package/dist/{chunk-gb4n3hwj.js → chunk-h421wzbm.js} +2 -2
- package/dist/{chunk-dcvvxsa1.js → chunk-j4tttsaz.js} +2 -2
- package/dist/{chunk-k0p9ecgc.js → chunk-kagpk2x5.js} +6 -6
- package/dist/chunk-kvnwhwx3.js +1 -0
- package/dist/{chunk-p196e4rq.js → chunk-m2xrx1je.js} +1 -1
- package/dist/chunk-nhc49pan.js +160 -0
- package/dist/{chunk-sf9pe2n6.js → chunk-nymm525r.js} +1 -1
- package/dist/{chunk-9sfmrb1j.js → chunk-nz57y1ad.js} +3 -3
- package/dist/{chunk-45dcfkwe.js → chunk-p2m56new.js} +2 -2
- package/dist/{chunk-w154jyby.js → chunk-pv9sw79c.js} +1 -1
- package/dist/chunk-qgp08qmz.js +6 -0
- package/dist/{chunk-evaht3v4.js → chunk-r7tsa2zv.js} +1 -1
- package/dist/{chunk-rw6gv740.js → chunk-rkvfsx8e.js} +1 -1
- package/dist/{chunk-v1p80wvh.js → chunk-rxqft6td.js} +2 -2
- package/dist/{chunk-g9n211y4.js → chunk-s9aj3p11.js} +2 -2
- package/dist/chunk-senkwdh6.js +2 -0
- package/dist/chunk-v1c58sm6.js +1 -0
- package/dist/{chunk-n9khyme2.js → chunk-v8pq6qmv.js} +2 -2
- package/dist/{chunk-1cvr3qtd.js → chunk-van4ysq6.js} +289 -305
- package/dist/chunk-vgp8m9fg.js +2 -0
- package/dist/{chunk-4y28hykg.js → chunk-vsg8f0e6.js} +1 -1
- package/dist/{chunk-kcs3xa8f.js → chunk-w0nscjd2.js} +2 -2
- package/dist/chunk-w26jhcj9.js +1 -0
- package/dist/{chunk-hjsm6ejs.js → chunk-wmnszjmv.js} +2 -2
- package/dist/chunk-x6wgh726.js +1 -0
- package/dist/{chunk-thvwt4kc.js → chunk-xa05phpw.js} +3 -3
- package/dist/{chunk-g4q26d9a.js → chunk-xmcsn7y0.js} +2 -2
- package/dist/{chunk-c9tzf9r5.js → chunk-y4c3wwpa.js} +1 -1
- package/dist/{chunk-0rp2ck29.js → chunk-yfs9tq3y.js} +2 -2
- package/dist/chunk-ymzcxryf.js +1 -0
- package/dist/{chunk-xkp4ph6v.js → chunk-zknv3d6y.js} +1 -1
- package/dist/chunk-zp4x2mwj.js +1 -0
- package/dist/chunk-zvk3g177.js +9 -0
- package/dist/web/assets/ChatView-Fqy97qw9.js +7 -0
- package/dist/web/assets/{CodeBlockHighlighter-CFW6qjnA.js → CodeBlockHighlighter-EgdsVoMQ.js} +1 -1
- package/dist/web/assets/{FilePreview-CR_XetY0.js → FilePreview-xicd9-Sl.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-CVrxJswQ.js → MarkdownRenderer-DBSjC_z3.js} +18 -18
- package/dist/web/assets/SettingsModal-Bkh5rMAJ.js +5 -0
- package/dist/web/assets/TaskSwitcher-DXcj0iJ_.js +1 -0
- package/dist/web/assets/{TerminalPanel-DTqvx8yB.js → TerminalPanel-DWVY-Elm.js} +1 -1
- package/dist/web/assets/index-Bi5ijAQP.css +1 -0
- package/dist/web/assets/index-CxEh32hc.js +32 -0
- package/dist/web/assets/{vendor-icons-D_AkWmWB.js → vendor-icons-Cv18Q6rW.js} +72 -67
- package/dist/web/assets/{vendor-radix-DBy9B2DN.js → vendor-radix-DXRuAJHH.js} +1 -1
- package/dist/web/index.html +4 -4
- package/package.json +3 -1
- package/dist/chunk-10k6egwk.js +0 -1
- package/dist/chunk-17xtw88g.js +0 -1
- package/dist/chunk-1kg9r8xp.js +0 -2
- package/dist/chunk-383vbwmt.js +0 -4
- package/dist/chunk-3kk3bk11.js +0 -1
- package/dist/chunk-47dsd91k.js +0 -99
- package/dist/chunk-4kaygjqv.js +0 -10
- package/dist/chunk-50fq7r0h.js +0 -22
- package/dist/chunk-59eje513.js +0 -1
- package/dist/chunk-710bvht9.js +0 -160
- package/dist/chunk-a9pbpgkg.js +0 -9
- package/dist/chunk-c8rky275.js +0 -6
- package/dist/chunk-j1sd03h7.js +0 -1
- package/dist/chunk-jqyvnmfr.js +0 -187
- package/dist/chunk-jrh5tzc4.js +0 -1
- package/dist/chunk-kj1ah6kn.js +0 -1
- package/dist/chunk-n34z4c47.js +0 -1
- package/dist/chunk-n5m2p0bq.js +0 -2
- package/dist/chunk-nfmsn652.js +0 -2
- package/dist/chunk-qvabd0vg.js +0 -1
- package/dist/chunk-t75wspk3.js +0 -1
- package/dist/chunk-vddqv6fv.js +0 -1
- package/dist/chunk-w4zvftrw.js +0 -5
- package/dist/chunk-wa7v7akz.js +0 -3
- package/dist/chunk-wxwqz67n.js +0 -1
- package/dist/chunk-x9hm3p3a.js +0 -1
- package/dist/chunk-xd2g4zjx.js +0 -1
- package/dist/web/assets/ChatView-Y-6k-ayR.js +0 -7
- package/dist/web/assets/McpModal-BO-85gll.js +0 -5
- package/dist/web/assets/SettingsModal-CW87OnxI.js +0 -1
- package/dist/web/assets/SkillsModal-Q8ZFPhys.js +0 -1
- package/dist/web/assets/TaskSwitcher-BzH-0QXr.js +0 -1
- package/dist/web/assets/index-B7etZcne.css +0 -1
- package/dist/web/assets/index-ClOgGy-I.js +0 -32
- package/dist/web/assets/useRequest-BvqVDnKl.js +0 -1
|
@@ -42,4 +42,4 @@ import{r as a,R as Pt,j as m,a as Rn,b as uo}from"./vendor-react-DG5dkZ_t.js";fu
|
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ji="DialogDescriptionWarning",es=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tr(Ji).contentName}}.`;return a.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ra=Bn,Aa=Un,Ta=Yn,Oa=Xn,Da=Kn,_a=qn,Na=Jn,ts=a.createContext(void 0);function ns(e){const t=a.useContext(ts);return e||t||"ltr"}function rs(e,[t,n]){return Math.min(n,Math.max(t,e))}function os(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Lt="ScrollArea",[nr]=Ae(Lt),[is,z]=nr(Lt),rr=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[c,u]=a.useState(null),[l,f]=a.useState(null),[d,p]=a.useState(null),[h,g]=a.useState(null),[v,y]=a.useState(null),[w,b]=a.useState(0),[C,x]=a.useState(0),[S,P]=a.useState(!1),[E,O]=a.useState(!1),R=F(t,D=>u(D)),A=ns(o);return m.jsx(is,{scope:n,type:r,dir:A,scrollHideDelay:i,scrollArea:c,viewport:l,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:P,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:O,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(L.div,{dir:A,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});rr.displayName=Lt;var or="ScrollAreaViewport",ir=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=z(or,n),c=a.useRef(null),u=F(t,c,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(L.div,{"data-radix-scroll-area-viewport":"",...i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ir.displayName=or;var ee="ScrollAreaScrollbar",ss=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return a.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),o.type==="hover"?m.jsx(cs,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(as,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(sr,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(Mt,{...r,ref:t}):null});ss.displayName=ee;var cs=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),[i,s]=a.useState(!1);return a.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const l=()=>{window.clearTimeout(u),s(!0)},f=()=>{u=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",l),c.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",l),c.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(X,{present:n||i,children:m.jsx(sr,{"data-state":i?"visible":"hidden",...r,ref:t})})}),as=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Je(()=>u("SCROLL_END"),100),[c,u]=os("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(c==="idle"){const l=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[c,o.scrollHideDelay,u]),a.useEffect(()=>{const l=o.viewport,f=i?"scrollLeft":"scrollTop";if(l){let d=l[f];const p=()=>{const h=l[f];d!==h&&(u("SCROLL"),s()),d=h};return l.addEventListener("scroll",p),()=>l.removeEventListener("scroll",p)}},[o.viewport,i,u,s]),m.jsx(X,{present:n||c!=="hidden",children:m.jsx(Mt,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:_(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:_(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),sr=a.forwardRef((e,t)=>{const n=z(ee,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=a.useState(!1),c=e.orientation==="horizontal",u=Je(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?l:f)}},10);return me(n.viewport,u),me(n.content,u),m.jsx(X,{present:r||i,children:m.jsx(Mt,{"data-state":i?"visible":"hidden",...o,ref:t})})}),Mt=a.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=z(ee,e.__scopeScrollArea),i=a.useRef(null),s=a.useRef(0),[c,u]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=ur(c.viewport,c.content),f={...r,sizes:c,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function d(p,h){return vs(p,s.current,c,h)}return n==="horizontal"?m.jsx(ls,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=hn(p,c,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}}):n==="vertical"?m.jsx(us,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=hn(p,c);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}}):null}),ls=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ee,e.__scopeScrollArea),[s,c]=a.useState(),u=a.useRef(null),l=F(t,u,i.onScrollbarXChange);return a.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),m.jsx(ar,{"data-orientation":"horizontal",...o,ref:l,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qe(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),dr(p,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:ze(s.paddingLeft),paddingEnd:ze(s.paddingRight)}})}})}),us=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ee,e.__scopeScrollArea),[s,c]=a.useState(),u=a.useRef(null),l=F(t,u,i.onScrollbarYChange);return a.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),m.jsx(ar,{"data-orientation":"vertical",...o,ref:l,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qe(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),dr(p,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:ze(s.paddingTop),paddingEnd:ze(s.paddingBottom)}})}})}),[fs,cr]=nr(ee),ar=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:f,onResize:d,...p}=e,h=z(ee,n),[g,v]=a.useState(null),y=F(t,R=>v(R)),w=a.useRef(null),b=a.useRef(""),C=h.viewport,x=r.content-r.viewport,S=B(f),P=B(u),E=Je(d,10);function O(R){if(w.current){const A=R.clientX-w.current.left,D=R.clientY-w.current.top;l({x:A,y:D})}}return a.useEffect(()=>{const R=A=>{const D=A.target;(g==null?void 0:g.contains(D))&&S(A,x)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,g,x,S]),a.useEffect(P,[r,P]),me(g,E),me(h.content,E),m.jsx(fs,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:B(i),onThumbPointerUp:B(s),onThumbPositionChange:P,onThumbPointerDown:B(c),children:m.jsx(L.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:_(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),O(R))}),onPointerMove:_(e.onPointerMove,O),onPointerUp:_(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),w.current=null})})})}),Ve="ScrollAreaThumb",ds=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=cr(Ve,e.__scopeScrollArea);return m.jsx(X,{present:n||o.hasThumb,children:m.jsx(ps,{ref:t,...r})})}),ps=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=z(Ve,n),s=cr(Ve,n),{onThumbPositionChange:c}=s,u=F(t,d=>s.onThumbChange(d)),l=a.useRef(void 0),f=Je(()=>{l.current&&(l.current(),l.current=void 0)},100);return a.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!l.current){const h=ms(d,c);l.current=h,c()}};return c(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,c]),m.jsx(L.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;s.onThumbPointerDown({x:g,y:v})}),onPointerUp:_(e.onPointerUp,s.onThumbPointerUp)})});ds.displayName=Ve;var It="ScrollAreaCorner",lr=a.forwardRef((e,t)=>{const n=z(It,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(hs,{...e,ref:t}):null});lr.displayName=It;var hs=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=z(It,n),[i,s]=a.useState(0),[c,u]=a.useState(0),l=!!(i&&c);return me(o.scrollbarX,()=>{var d;const f=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(f),u(f)}),me(o.scrollbarY,()=>{var d;const f=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),l?m.jsx(L.div,{...r,ref:t,style:{width:i,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ze(e){return e?parseInt(e,10):0}function ur(e,t){const n=e/t;return isNaN(n)?0:n}function Qe(e){const t=ur(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function vs(e,t,n,r="ltr"){const o=Qe(n),i=o/2,s=t||i,c=o-s,u=n.scrollbar.paddingStart+s,l=n.scrollbar.size-n.scrollbar.paddingEnd-c,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return fr([u,l],d)(e)}function hn(e,t,n="ltr"){const r=Qe(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,c=i-r,u=n==="ltr"?[0,s]:[s*-1,0],l=rs(e,u);return fr([0,s],[0,c])(l)}function fr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dr(e,t){return e>0&&e<t}var ms=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,c=n.top!==i.top;(s||c)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Je(e,t){const n=B(e),r=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),a.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function me(e,t){const n=B(t);ne(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var La=rr,Ma=ir,Ia=lr;const gs=["top","right","bottom","left"],se=Math.min,H=Math.max,Ue=Math.round,ke=Math.floor,Q=e=>({x:e,y:e}),ys={left:"right",right:"left",bottom:"top",top:"bottom"},ws={start:"end",end:"start"};function bt(e,t,n){return H(e,se(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function jt(e){return e==="x"?"y":"x"}function kt(e){return e==="y"?"height":"width"}const bs=new Set(["top","bottom"]);function q(e){return bs.has(oe(e))?"y":"x"}function Ft(e){return jt(q(e))}function xs(e,t,n){n===void 0&&(n=!1);const r=be(e),o=Ft(e),i=kt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ye(s)),[s,Ye(s)]}function Cs(e){const t=Ye(e);return[xt(e),t,xt(t)]}function xt(e){return e.replace(/start|end/g,t=>ws[t])}const vn=["left","right"],mn=["right","left"],Ss=["top","bottom"],Es=["bottom","top"];function Ps(e,t,n){switch(e){case"top":case"bottom":return n?t?mn:vn:t?vn:mn;case"left":case"right":return t?Ss:Es;default:return[]}}function Rs(e,t,n,r){const o=be(e);let i=Ps(oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(xt)))),i}function Ye(e){return e.replace(/left|right|bottom|top/g,t=>ys[t])}function As(e){return{top:0,right:0,bottom:0,left:0,...e}}function pr(e){return typeof e!="number"?As(e):{top:e,right:e,bottom:e,left:e}}function Xe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gn(e,t,n){let{reference:r,floating:o}=e;const i=q(t),s=Ft(t),c=kt(s),u=oe(t),l=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let h;switch(u){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(be(t)){case"start":h[s]-=p*(n&&l?-1:1);break;case"end":h[s]+=p*(n&&l?-1:1);break}return h}async function Ts(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:c,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=re(t,e),g=pr(h),y=c[p?d==="floating"?"reference":"floating":d],w=Xe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:u})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),x=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},S=Xe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:C,strategy:u}):b);return{top:(w.top-S.top+g.top)/x.y,bottom:(S.bottom-w.bottom+g.bottom)/x.y,left:(w.left-S.left+g.left)/x.x,right:(S.right-w.right+g.right)/x.x}}const Os=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=gn(l,r,u),p=r,h={},g=0;for(let y=0;y<c.length;y++){var v;const{name:w,fn:b}=c[y],{x:C,y:x,data:S,reset:P}=await b({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:l,platform:{...s,detectOverflow:(v=s.detectOverflow)!=null?v:Ts},elements:{reference:e,floating:t}});f=C??f,d=x??d,h={...h,[w]:{...h[w],...S}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(l=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=gn(l,p,u)),y=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}},Ds=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:c,middlewareData:u}=t,{element:l,padding:f=0}=re(e,t)||{};if(l==null)return{};const d=pr(f),p={x:n,y:r},h=Ft(o),g=kt(h),v=await s.getDimensions(l),y=h==="y",w=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-p[h]-i.floating[g],S=p[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=P?P[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(P)))&&(E=c.floating[C]||i.floating[g]);const O=x/2-S/2,R=E/2-v[g]/2-1,A=se(d[w],R),D=se(d[b],R),M=A,I=E-v[g]-D,N=E/2-v[g]/2+O,$=bt(M,N,I),j=!u.arrow&&be(o)!=null&&N!==$&&i.reference[g]/2-(N<M?A:D)-v[g]/2<0,k=j?N<M?N-M:N-I:0;return{[h]:p[h]+k,data:{[h]:$,centerOffset:N-$-k,...j&&{alignmentOffset:k}},reset:j}}}),_s=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:c,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=oe(o),b=q(c),C=oe(c)===c,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=p||(C||!v?[Ye(c)]:Cs(c)),P=g!=="none";!p&&P&&S.push(...Rs(c,v,g,x));const E=[c,...S],O=await u.detectOverflow(t,y),R=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&R.push(O[w]),d){const N=xs(o,s,x);R.push(O[N[0]],O[N[1]])}if(A=[...A,{placement:o,overflows:R}],!R.every(N=>N<=0)){var D,M;const N=(((D=i.flip)==null?void 0:D.index)||0)+1,$=E[N];if($&&(!(d==="alignment"?b!==q($):!1)||A.every(T=>q(T.placement)===b?T.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:$}};let j=(M=A.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(h){case"bestFit":{var I;const k=(I=A.filter(T=>{if(P){const W=q(T.placement);return W===b||W==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(W=>W>0).reduce((W,K)=>W+K,0)]).sort((T,W)=>T[1]-W[1])[0])==null?void 0:I[0];k&&(j=k);break}case"initialPlacement":j=c;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function yn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wn(e){return gs.some(t=>e[t]>=0)}const Ns=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=re(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=yn(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:wn(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),c=yn(s,n.floating);return{data:{escapedOffsets:c,escaped:wn(c)}}}default:return{}}}}},hr=new Set(["left","top"]);async function Ls(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=oe(n),c=be(n),u=q(n)==="y",l=hr.has(s)?-1:1,f=i&&u?-1:1,d=re(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),u?{x:h*f,y:p*l}:{x:p*l,y:h*f}}const Ms=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:c}=t,u=await Ls(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},Is=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:b,y:C}=w;return{x:b,y:C}}},...l}=re(e,t),f={x:n,y:r},d=await i.detectOverflow(t,l),p=q(oe(o)),h=jt(p);let g=f[h],v=f[p];if(s){const w=h==="y"?"top":"left",b=h==="y"?"bottom":"right",C=g+d[w],x=g-d[b];g=bt(C,g,x)}if(c){const w=p==="y"?"top":"left",b=p==="y"?"bottom":"right",C=v+d[w],x=v-d[b];v=bt(C,v,x)}const y=u.fn({...t,[h]:g,[p]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:s,[p]:c}}}}}},js=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=re(e,t),f={x:n,y:r},d=q(o),p=jt(d);let h=f[p],g=f[d];const v=re(c,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const C=p==="y"?"height":"width",x=i.reference[p]-i.floating[C]+y.mainAxis,S=i.reference[p]+i.reference[C]-y.mainAxis;h<x?h=x:h>S&&(h=S)}if(l){var w,b;const C=p==="y"?"width":"height",x=hr.has(oe(o)),S=i.reference[d]-i.floating[C]+(x&&((w=s.offset)==null?void 0:w[d])||0)+(x?0:y.crossAxis),P=i.reference[d]+i.reference[C]+(x?0:((b=s.offset)==null?void 0:b[d])||0)-(x?y.crossAxis:0);g<S?g=S:g>P&&(g=P)}return{[p]:h,[d]:g}}}},ks=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:c}=t,{apply:u=()=>{},...l}=re(e,t),f=await s.detectOverflow(t,l),d=oe(o),p=be(o),h=q(o)==="y",{width:g,height:v}=i.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,y=p==="end"?"top":"bottom");const b=v-f.top-f.bottom,C=g-f.left-f.right,x=se(v-f[y],b),S=se(g-f[w],C),P=!t.middlewareData.shift;let E=x,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=b),P&&!p){const A=H(f.left,0),D=H(f.right,0),M=H(f.top,0),I=H(f.bottom,0);h?O=g-2*(A!==0||D!==0?A+D:H(f.left,f.right)):E=v-2*(M!==0||I!==0?M+I:H(f.top,f.bottom))}await u({...t,availableWidth:O,availableHeight:E});const R=await s.getDimensions(c.floating);return g!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function et(){return typeof window<"u"}function xe(e){return vr(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(vr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vr(e){return et()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return et()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return et()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function bn(e){return!et()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}const Fs=new Set(["inline","contents"]);function Te(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Fs.has(o)}const Ws=new Set(["table","td","th"]);function $s(e){return Ws.has(xe(e))}const Hs=[":popover-open",":modal"];function tt(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Bs=["transform","translate","scale","rotate","perspective"],Vs=["transform","translate","scale","rotate","perspective","filter"],zs=["paint","layout","strict","content"];function Wt(e){const t=$t(),n=U(e)?Y(e):e;return Bs.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Vs.some(r=>(n.willChange||"").includes(r))||zs.some(r=>(n.contain||"").includes(r))}function Us(e){let t=ce(e);for(;J(t)&&!ge(t);){if(Wt(t))return t;if(tt(t))return null;t=ce(t)}return null}function $t(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ys=new Set(["html","body","#document"]);function ge(e){return Ys.has(xe(e))}function Y(e){return V(e).getComputedStyle(e)}function nt(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(xe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bn(e)&&e.host||te(e);return bn(t)?t.host:t}function mr(e){const t=ce(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:mr(t)}function Ee(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=V(o);if(i){const c=Ct(s);return t.concat(s,s.visualViewport||[],Te(o)?o:[],c&&n?Ee(c):[])}return t.concat(o,Ee(o,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gr(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=J(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,c=Ue(n)!==i||Ue(r)!==s;return c&&(n=i,r=s),{width:n,height:r,$:c}}function Ht(e){return U(e)?e:e.contextElement}function ve(e){const t=Ht(e);if(!J(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gr(t);let s=(i?Ue(n.width):n.width)/r,c=(i?Ue(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Xs=Q(0);function yr(e){const t=V(e);return!$t()||!t.visualViewport?Xs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ue(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ht(e);let s=Q(1);t&&(r?U(r)&&(s=ve(r)):s=ve(e));const c=Gs(i,n,r)?yr(i):Q(0);let u=(o.left+c.x)/s.x,l=(o.top+c.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const p=V(i),h=r&&U(r)?V(r):r;let g=p,v=Ct(g);for(;v&&r&&h!==g;){const y=ve(v),w=v.getBoundingClientRect(),b=Y(v),C=w.left+(v.clientLeft+parseFloat(b.paddingLeft))*y.x,x=w.top+(v.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,l*=y.y,f*=y.x,d*=y.y,u+=C,l+=x,g=V(v),v=Ct(g)}}return Xe({width:f,height:d,x:u,y:l})}function rt(e,t){const n=nt(e).scrollLeft;return t?t.left+n:ue(te(e)).left+n}function wr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ks(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=te(r),c=t?tt(t.floating):!1;if(r===s||c&&i)return n;let u={scrollLeft:0,scrollTop:0},l=Q(1);const f=Q(0),d=J(r);if((d||!d&&!i)&&((xe(r)!=="body"||Te(s))&&(u=nt(r)),J(r))){const h=ue(r);l=ve(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=s&&!d&&!i?wr(s,u):Q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+p.x,y:n.y*l.y-u.scrollTop*l.y+f.y+p.y}}function Zs(e){return Array.from(e.getClientRects())}function qs(e){const t=te(e),n=nt(e),r=e.ownerDocument.body,o=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+rt(e);const c=-n.scrollTop;return Y(r).direction==="rtl"&&(s+=H(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:c}}const xn=25;function Qs(e,t){const n=V(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,c=0,u=0;if(o){i=o.width,s=o.height;const f=$t();(!f||f&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const l=rt(r);if(l<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=xn&&(i-=g)}else l<=xn&&(i+=l);return{width:i,height:s,x:c,y:u}}const Js=new Set(["absolute","fixed"]);function ec(e,t){const n=ue(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=J(e)?ve(e):Q(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:c,x:u,y:l}}function Cn(e,t,n){let r;if(t==="viewport")r=Qs(e,n);else if(t==="document")r=qs(te(e));else if(U(t))r=ec(t,n);else{const o=yr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Xe(r)}function br(e,t){const n=ce(e);return n===t||!U(n)||ge(n)?!1:Y(n).position==="fixed"||br(n,t)}function tc(e,t){const n=t.get(e);if(n)return n;let r=Ee(e,[],!1).filter(c=>U(c)&&xe(c)!=="body"),o=null;const i=Y(e).position==="fixed";let s=i?ce(e):e;for(;U(s)&&!ge(s);){const c=Y(s),u=Wt(s);!u&&c.position==="fixed"&&(o=null),(i?!u&&!o:!u&&c.position==="static"&&!!o&&Js.has(o.position)||Te(s)&&!u&&br(e,s))?r=r.filter(f=>f!==s):o=c,s=ce(s)}return t.set(e,r),r}function nc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?tt(t)?[]:tc(t,this._c):[].concat(n),r],c=s[0],u=s.reduce((l,f)=>{const d=Cn(t,f,o);return l.top=H(d.top,l.top),l.right=se(d.right,l.right),l.bottom=se(d.bottom,l.bottom),l.left=H(d.left,l.left),l},Cn(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function rc(e){const{width:t,height:n}=gr(e);return{width:t,height:n}}function oc(e,t,n){const r=J(t),o=te(t),i=n==="fixed",s=ue(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Q(0);function l(){u.x=rt(o)}if(r||!r&&!i)if((xe(t)!=="body"||Te(o))&&(c=nt(t)),r){const h=ue(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&l();i&&!r&&o&&l();const f=o&&!r&&!i?wr(o,c):Q(0),d=s.left+c.scrollLeft-u.x-f.x,p=s.top+c.scrollTop-u.y-f.y;return{x:d,y:p,width:s.width,height:s.height}}function mt(e){return Y(e).position==="static"}function Sn(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function xr(e,t){const n=V(e);if(tt(e))return n;if(!J(e)){let o=ce(e);for(;o&&!ge(o);){if(U(o)&&!mt(o))return o;o=ce(o)}return n}let r=Sn(e,t);for(;r&&$s(r)&&mt(r);)r=Sn(r,t);return r&&ge(r)&&mt(r)&&!Wt(r)?n:r||Us(e)||n}const ic=async function(e){const t=this.getOffsetParent||xr,n=this.getDimensions,r=await n(e.floating);return{reference:oc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sc(e){return Y(e).direction==="rtl"}const cc={convertOffsetParentRelativeRectToViewportRelativeRect:Ks,getDocumentElement:te,getClippingRect:nc,getOffsetParent:xr,getElementRects:ic,getClientRects:Zs,getDimensions:rc,getScale:ve,isElement:U,isRTL:sc};function Cr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ac(e,t){let n=null,r;const o=te(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=l;if(c||t(),!p||!h)return;const g=ke(d),v=ke(o.clientWidth-(f+p)),y=ke(o.clientHeight-(d+h)),w=ke(f),C={rootMargin:-g+"px "+-v+"px "+-y+"px "+-w+"px",threshold:H(0,se(1,u))||1};let x=!0;function S(P){const E=P[0].intersectionRatio;if(E!==u){if(!x)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Cr(l,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(S,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return s(!0),i}function lc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ht(e),f=o||i?[...l?Ee(l):[],...Ee(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=l&&c?ac(l,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let g,v=u?ue(e):null;u&&y();function y(){const w=ue(e);v&&!Cr(v,w)&&n(),v=w,g=requestAnimationFrame(y)}return n(),()=>{var w;f.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,u&&cancelAnimationFrame(g)}}const uc=Ms,fc=Is,dc=_s,pc=ks,hc=Ns,En=Ds,vc=js,mc=(e,t,n)=>{const r=new Map,o={platform:cc,...n},i={...o.platform,_c:r};return Os(e,t,{...o,platform:i})};var gc=typeof document<"u",yc=function(){},$e=gc?a.useLayoutEffect:yc;function Ge(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ge(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ge(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Sr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pn(e,t){const n=Sr(e);return Math.round(t*n)/n}function gt(e){const t=a.useRef(e);return $e(()=>{t.current=e}),t}function wc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:u,open:l}=e,[f,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=a.useState(r);Ge(p,r)||h(r);const[g,v]=a.useState(null),[y,w]=a.useState(null),b=a.useCallback(T=>{T!==P.current&&(P.current=T,v(T))},[]),C=a.useCallback(T=>{T!==E.current&&(E.current=T,w(T))},[]),x=i||g,S=s||y,P=a.useRef(null),E=a.useRef(null),O=a.useRef(f),R=u!=null,A=gt(u),D=gt(o),M=gt(l),I=a.useCallback(()=>{if(!P.current||!E.current)return;const T={placement:t,strategy:n,middleware:p};D.current&&(T.platform=D.current),mc(P.current,E.current,T).then(W=>{const K={...W,isPositioned:M.current!==!1};N.current&&!Ge(O.current,K)&&(O.current=K,Rn.flushSync(()=>{d(K)}))})},[p,t,n,D,M]);$e(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const N=a.useRef(!1);$e(()=>(N.current=!0,()=>{N.current=!1}),[]),$e(()=>{if(x&&(P.current=x),S&&(E.current=S),x&&S){if(A.current)return A.current(x,S,I);I()}},[x,S,I,A,R]);const $=a.useMemo(()=>({reference:P,floating:E,setReference:b,setFloating:C}),[b,C]),j=a.useMemo(()=>({reference:x,floating:S}),[x,S]),k=a.useMemo(()=>{const T={position:n,left:0,top:0};if(!j.floating)return T;const W=Pn(j.floating,f.x),K=Pn(j.floating,f.y);return c?{...T,transform:"translate("+W+"px, "+K+"px)",...Sr(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:K}},[n,c,j.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:I,refs:$,elements:j,floatingStyles:k}),[f,I,$,j,k])}const bc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?En({element:r.current,padding:o}).fn(n):{}:r?En({element:r,padding:o}).fn(n):{}}}},xc=(e,t)=>({...uc(e),options:[e,t]}),Cc=(e,t)=>({...fc(e),options:[e,t]}),Sc=(e,t)=>({...vc(e),options:[e,t]}),Ec=(e,t)=>({...dc(e),options:[e,t]}),Pc=(e,t)=>({...pc(e),options:[e,t]}),Rc=(e,t)=>({...hc(e),options:[e,t]}),Ac=(e,t)=>({...bc(e),options:[e,t]});var Tc="Arrow",Er=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(L.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Er.displayName=Tc;var Oc=Er;function Dc(e){const[t,n]=a.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,c;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,c=l.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Bt="Popper",[Pr,ot]=Ae(Bt),[_c,Rr]=Pr(Bt),Ar=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return m.jsx(_c,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ar.displayName=Bt;var Tr="PopperAnchor",Or=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Rr(Tr,n),s=a.useRef(null),c=F(t,s),u=a.useRef(null);return a.useEffect(()=>{const l=u.current;u.current=(r==null?void 0:r.current)||s.current,l!==u.current&&i.onAnchorChange(u.current)}),r?null:m.jsx(L.div,{...o,ref:c})});Or.displayName=Tr;var Vt="PopperContent",[Nc,Lc]=Pr(Vt),Dr=a.forwardRef((e,t)=>{var Xt,Gt,Kt,Zt,qt,Qt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,y=Rr(Vt,n),[w,b]=a.useState(null),C=F(t,Ce=>b(Ce)),[x,S]=a.useState(null),P=Dc(x),E=(P==null?void 0:P.width)??0,O=(P==null?void 0:P.height)??0,R=r+(i!=="center"?"-"+i:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(l)?l:[l],M=D.length>0,I={padding:A,boundary:D.filter(Ic),altBoundary:M},{refs:N,floatingStyles:$,placement:j,isPositioned:k,middlewareData:T}=wc({strategy:"fixed",placement:R,whileElementsMounted:(...Ce)=>lc(...Ce,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[xc({mainAxis:o+O,alignmentAxis:s}),u&&Cc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Sc():void 0,...I}),u&&Ec({...I}),Pc({...I,apply:({elements:Ce,rects:Jt,availableWidth:so,availableHeight:co})=>{const{width:ao,height:lo}=Jt.reference,_e=Ce.floating.style;_e.setProperty("--radix-popper-available-width",`${so}px`),_e.setProperty("--radix-popper-available-height",`${co}px`),_e.setProperty("--radix-popper-anchor-width",`${ao}px`),_e.setProperty("--radix-popper-anchor-height",`${lo}px`)}}),x&&Ac({element:x,padding:c}),jc({arrowWidth:E,arrowHeight:O}),p&&Rc({strategy:"referenceHidden",...I})]}),[W,K]=Lr(j),De=B(g);ne(()=>{k&&(De==null||De())},[k,De]);const to=(Xt=T.arrow)==null?void 0:Xt.x,no=(Gt=T.arrow)==null?void 0:Gt.y,ro=((Kt=T.arrow)==null?void 0:Kt.centerOffset)!==0,[oo,io]=a.useState();return ne(()=>{w&&io(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:k?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oo,"--radix-popper-transform-origin":[(Zt=T.transformOrigin)==null?void 0:Zt.x,(qt=T.transformOrigin)==null?void 0:qt.y].join(" "),...((Qt=T.hide)==null?void 0:Qt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Nc,{scope:n,placedSide:W,onArrowChange:S,arrowX:to,arrowY:no,shouldHideArrow:ro,children:m.jsx(L.div,{"data-side":W,"data-align":K,...v,ref:C,style:{...v.style,animation:k?void 0:"none"}})})})});Dr.displayName=Vt;var _r="PopperArrow",Mc={top:"bottom",right:"left",bottom:"top",left:"right"},Nr=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Lc(_r,r),s=Mc[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(Oc,{...o,ref:n,style:{...o.style,display:"block"}})})});Nr.displayName=_r;function Ic(e){return e!==null}var jc=e=>({name:"transformOrigin",options:e,fn(t){var y,w,b;const{placement:n,rects:r,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,c=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,f]=Lr(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+c/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let g="",v="";return l==="bottom"?(g=s?d:`${p}px`,v=`${-u}px`):l==="top"?(g=s?d:`${p}px`,v=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,v=s?d:`${h}px`):l==="left"&&(g=`${r.floating.width+u}px`,v=s?d:`${h}px`),{data:{x:g,y:v}}}});function Lr(e){const[t,n="center"]=e.split("-");return[t,n]}var Mr=Ar,zt=Or,Ir=Dr,jr=Nr;function kc(e){const t=Fc(e),n=a.forwardRef((r,o)=>{const{children:i,...s}=r,c=a.Children.toArray(i),u=c.find($c);if(u){const l=u.props.children,f=c.map(d=>d===u?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:d);return m.jsx(t,{...s,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Fc(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const s=Bc(o),c=Hc(i,o.props);return o.type!==a.Fragment&&(c.ref=r?Re(r,s):s),a.cloneElement(o,c)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wc=Symbol("radix.slottable");function $c(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wc}function Hc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Bc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var it="Popover",[kr]=Ae(it,[ot]),Oe=ot(),[Vc,ae]=kr(it),Fr=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,c=Oe(t),u=a.useRef(null),[l,f]=a.useState(!1),[d,p]=Rt({prop:r,defaultProp:o??!1,onChange:i,caller:it});return m.jsx(Mr,{...c,children:m.jsx(Vc,{scope:t,contentId:Se(),triggerRef:u,open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:l,onCustomAnchorAdd:a.useCallback(()=>f(!0),[]),onCustomAnchorRemove:a.useCallback(()=>f(!1),[]),modal:s,children:n})})};Fr.displayName=it;var Wr="PopoverAnchor",zc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(Wr,n),i=Oe(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=o;return a.useEffect(()=>(s(),()=>c()),[s,c]),m.jsx(zt,{...i,...r,ref:t})});zc.displayName=Wr;var $r="PopoverTrigger",Hr=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae($r,n),i=Oe(n),s=F(t,o.triggerRef),c=m.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yr(o.open),...r,ref:s,onClick:_(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:m.jsx(zt,{asChild:!0,...i,children:c})});Hr.displayName=$r;var Ut="PopoverPortal",[Uc,Yc]=kr(Ut,{forceMount:void 0}),Br=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ae(Ut,t);return m.jsx(Uc,{scope:t,forceMount:n,children:m.jsx(X,{present:n||i.open,children:m.jsx(Tt,{asChild:!0,container:o,children:r})})})};Br.displayName=Ut;var ye="PopoverContent",Vr=a.forwardRef((e,t)=>{const n=Yc(ye,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ae(ye,e.__scopePopover);return m.jsx(X,{present:r||i.open,children:i.modal?m.jsx(Gc,{...o,ref:t}):m.jsx(Kc,{...o,ref:t})})});Vr.displayName=ye;var Xc=kc("PopoverContent.RemoveScroll"),Gc=a.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=a.useRef(null),o=F(t,r),i=a.useRef(!1);return a.useEffect(()=>{const s=r.current;if(s)return $n(s)},[]),m.jsx(Ot,{as:Xc,allowPinchZoom:!0,children:m.jsx(zr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),i.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kc=a.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=a.useRef(!1),o=a.useRef(!1);return m.jsx(zr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),zr=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...d}=e,p=ae(ye,n),h=Oe(n);return _n(),m.jsx(At,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:m.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(Ir,{"data-state":Yr(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ur="PopoverClose",Zc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(Ur,n);return m.jsx(L.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});Zc.displayName=Ur;var qc="PopoverArrow",Qc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(n);return m.jsx(jr,{...o,...r,ref:t})});Qc.displayName=qc;function Yr(e){return e?"open":"closed"}var ja=Fr,ka=Hr,Fa=Br,Wa=Vr,Jc=Symbol("radix.slottable");function ea(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Jc,t}var ta=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),na="VisuallyHidden",Xr=a.forwardRef((e,t)=>m.jsx(L.span,{...e,ref:t,style:{...ta,...e.style}}));Xr.displayName=na;var ra=Xr,[st]=Ae("Tooltip",[ot]),ct=ot(),Gr="TooltipProvider",oa=700,St="tooltip.open",[ia,Yt]=st(Gr),Kr=e=>{const{__scopeTooltip:t,delayDuration:n=oa,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=a.useRef(!0),c=a.useRef(!1),u=a.useRef(0);return a.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),m.jsx(ia,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:i})};Kr.displayName=Gr;var Pe="Tooltip",[sa,at]=st(Pe),Zr=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,u=Yt(Pe,e.__scopeTooltip),l=ct(t),[f,d]=a.useState(null),p=Se(),h=a.useRef(0),g=s??u.disableHoverableContent,v=c??u.delayDuration,y=a.useRef(!1),[w,b]=Rt({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(St))):u.onClose(),i==null||i(E)},caller:Pe}),C=a.useMemo(()=>w?y.current?"delayed-open":"instant-open":"closed",[w]),x=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,b(!0)},[b]),S=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),P=a.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,b(!0),h.current=0},v)},[v,b]);return a.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(Mr,{...l,children:m.jsx(sa,{scope:t,contentId:p,open:w,stateAttribute:C,trigger:f,onTriggerChange:d,onTriggerEnter:a.useCallback(()=>{u.isOpenDelayedRef.current?P():x()},[u.isOpenDelayedRef,P,x]),onTriggerLeave:a.useCallback(()=>{g?S():(window.clearTimeout(h.current),h.current=0)},[S,g]),onOpen:x,onClose:S,disableHoverableContent:g,children:n})})};Zr.displayName=Pe;var Et="TooltipTrigger",qr=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=at(Et,n),i=Yt(Et,n),s=ct(n),c=a.useRef(null),u=F(t,c,o.onTriggerChange),l=a.useRef(!1),f=a.useRef(!1),d=a.useCallback(()=>l.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(zt,{asChild:!0,...s,children:m.jsx(L.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:_(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:_(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:_(e.onBlur,o.onClose),onClick:_(e.onClick,o.onClose)})})});qr.displayName=Et;var ca="TooltipPortal",[$a,aa]=st(ca,{forceMount:void 0}),we="TooltipContent",Qr=a.forwardRef((e,t)=>{const n=aa(we,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=at(we,e.__scopeTooltip);return m.jsx(X,{present:r||s.open,children:s.disableHoverableContent?m.jsx(Jr,{side:o,...i,ref:t}):m.jsx(la,{side:o,...i,ref:t})})}),la=a.forwardRef((e,t)=>{const n=at(we,e.__scopeTooltip),r=Yt(we,e.__scopeTooltip),o=a.useRef(null),i=F(t,o),[s,c]=a.useState(null),{trigger:u,onClose:l}=n,f=o.current,{onPointerInTransitChange:d}=r,p=a.useCallback(()=>{c(null),d(!1)},[d]),h=a.useCallback((g,v)=>{const y=g.currentTarget,w={x:g.clientX,y:g.clientY},b=ha(w,y.getBoundingClientRect()),C=va(w,b),x=ma(v.getBoundingClientRect()),S=ya([...C,...x]);c(S),d(!0)},[d]);return a.useEffect(()=>()=>p(),[p]),a.useEffect(()=>{if(u&&f){const g=y=>h(y,f),v=y=>h(y,u);return u.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[u,f,h,p]),a.useEffect(()=>{if(s){const g=v=>{const y=v.target,w={x:v.clientX,y:v.clientY},b=(u==null?void 0:u.contains(y))||(f==null?void 0:f.contains(y)),C=!ga(w,s);b?p():C&&(p(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,f,s,l,p]),m.jsx(Jr,{...e,ref:i})}),[ua,fa]=st(Pe,{isInside:!1}),da=ea("TooltipContent"),Jr=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,u=at(we,n),l=ct(n),{onClose:f}=u;return a.useEffect(()=>(document.addEventListener(St,f),()=>document.removeEventListener(St,f)),[f]),a.useEffect(()=>{if(u.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(u.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,f]),m.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:m.jsxs(Ir,{"data-state":u.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(da,{children:r}),m.jsx(ua,{scope:n,isInside:!0,children:m.jsx(ra,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Qr.displayName=we;var eo="TooltipArrow",pa=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ct(n);return fa(eo,n).isInside?null:m.jsx(jr,{...o,...r,ref:t})});pa.displayName=eo;function ha(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function va(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ma(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ga(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],u=t[s],l=c.x,f=c.y,d=u.x,p=u.y;f>r!=p>r&&n<(d-l)*(r-f)/(p-f)+l&&(o=!o)}return o}function ya(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),wa(t)}function wa(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ha=Kr,Ba=Zr,Va=qr,za=Qr;export{Oa as C,_a as D,Ta as O,Aa as P,Ra as R,xa as S,Da as T,Ma as V,ei as _,Na as a,La as b,Ia as c,ss as d,ds as e,Fa as f,Wa as g,ja as h,ka as i,Ha as j,Ba as k,Va as l,za as m,Ea as n,Ca as o,Sa as p,Z as q,Nn as r};
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ji="DialogDescriptionWarning",es=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tr(Ji).contentName}}.`;return a.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ra=Bn,Aa=Un,Ta=Yn,Oa=Xn,Da=Kn,_a=qn,Na=Jn,ts=a.createContext(void 0);function ns(e){const t=a.useContext(ts);return e||t||"ltr"}function rs(e,[t,n]){return Math.min(n,Math.max(t,e))}function os(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Lt="ScrollArea",[nr]=Ae(Lt),[is,z]=nr(Lt),rr=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[c,u]=a.useState(null),[l,f]=a.useState(null),[d,p]=a.useState(null),[h,g]=a.useState(null),[v,y]=a.useState(null),[w,b]=a.useState(0),[C,x]=a.useState(0),[S,P]=a.useState(!1),[E,O]=a.useState(!1),R=F(t,D=>u(D)),A=ns(o);return m.jsx(is,{scope:n,type:r,dir:A,scrollHideDelay:i,scrollArea:c,viewport:l,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:P,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:O,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(L.div,{dir:A,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});rr.displayName=Lt;var or="ScrollAreaViewport",ir=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=z(or,n),c=a.useRef(null),u=F(t,c,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(L.div,{"data-radix-scroll-area-viewport":"",...i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ir.displayName=or;var ee="ScrollAreaScrollbar",ss=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return a.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),o.type==="hover"?m.jsx(cs,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(as,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(sr,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(Mt,{...r,ref:t}):null});ss.displayName=ee;var cs=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),[i,s]=a.useState(!1);return a.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const l=()=>{window.clearTimeout(u),s(!0)},f=()=>{u=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",l),c.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",l),c.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(X,{present:n||i,children:m.jsx(sr,{"data-state":i?"visible":"hidden",...r,ref:t})})}),as=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ee,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Je(()=>u("SCROLL_END"),100),[c,u]=os("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(c==="idle"){const l=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[c,o.scrollHideDelay,u]),a.useEffect(()=>{const l=o.viewport,f=i?"scrollLeft":"scrollTop";if(l){let d=l[f];const p=()=>{const h=l[f];d!==h&&(u("SCROLL"),s()),d=h};return l.addEventListener("scroll",p),()=>l.removeEventListener("scroll",p)}},[o.viewport,i,u,s]),m.jsx(X,{present:n||c!=="hidden",children:m.jsx(Mt,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:_(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:_(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),sr=a.forwardRef((e,t)=>{const n=z(ee,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=a.useState(!1),c=e.orientation==="horizontal",u=Je(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?l:f)}},10);return me(n.viewport,u),me(n.content,u),m.jsx(X,{present:r||i,children:m.jsx(Mt,{"data-state":i?"visible":"hidden",...o,ref:t})})}),Mt=a.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=z(ee,e.__scopeScrollArea),i=a.useRef(null),s=a.useRef(0),[c,u]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=ur(c.viewport,c.content),f={...r,sizes:c,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function d(p,h){return vs(p,s.current,c,h)}return n==="horizontal"?m.jsx(ls,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=hn(p,c,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}}):n==="vertical"?m.jsx(us,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=hn(p,c);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}}):null}),ls=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ee,e.__scopeScrollArea),[s,c]=a.useState(),u=a.useRef(null),l=F(t,u,i.onScrollbarXChange);return a.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),m.jsx(ar,{"data-orientation":"horizontal",...o,ref:l,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qe(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),dr(p,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:ze(s.paddingLeft),paddingEnd:ze(s.paddingRight)}})}})}),us=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ee,e.__scopeScrollArea),[s,c]=a.useState(),u=a.useRef(null),l=F(t,u,i.onScrollbarYChange);return a.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),m.jsx(ar,{"data-orientation":"vertical",...o,ref:l,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qe(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),dr(p,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:ze(s.paddingTop),paddingEnd:ze(s.paddingBottom)}})}})}),[fs,cr]=nr(ee),ar=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:f,onResize:d,...p}=e,h=z(ee,n),[g,v]=a.useState(null),y=F(t,R=>v(R)),w=a.useRef(null),b=a.useRef(""),C=h.viewport,x=r.content-r.viewport,S=B(f),P=B(u),E=Je(d,10);function O(R){if(w.current){const A=R.clientX-w.current.left,D=R.clientY-w.current.top;l({x:A,y:D})}}return a.useEffect(()=>{const R=A=>{const D=A.target;(g==null?void 0:g.contains(D))&&S(A,x)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,g,x,S]),a.useEffect(P,[r,P]),me(g,E),me(h.content,E),m.jsx(fs,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:B(i),onThumbPointerUp:B(s),onThumbPositionChange:P,onThumbPointerDown:B(c),children:m.jsx(L.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:_(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),O(R))}),onPointerMove:_(e.onPointerMove,O),onPointerUp:_(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),w.current=null})})})}),Ve="ScrollAreaThumb",ds=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=cr(Ve,e.__scopeScrollArea);return m.jsx(X,{present:n||o.hasThumb,children:m.jsx(ps,{ref:t,...r})})}),ps=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=z(Ve,n),s=cr(Ve,n),{onThumbPositionChange:c}=s,u=F(t,d=>s.onThumbChange(d)),l=a.useRef(void 0),f=Je(()=>{l.current&&(l.current(),l.current=void 0)},100);return a.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!l.current){const h=ms(d,c);l.current=h,c()}};return c(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,c]),m.jsx(L.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;s.onThumbPointerDown({x:g,y:v})}),onPointerUp:_(e.onPointerUp,s.onThumbPointerUp)})});ds.displayName=Ve;var It="ScrollAreaCorner",lr=a.forwardRef((e,t)=>{const n=z(It,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(hs,{...e,ref:t}):null});lr.displayName=It;var hs=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=z(It,n),[i,s]=a.useState(0),[c,u]=a.useState(0),l=!!(i&&c);return me(o.scrollbarX,()=>{var d;const f=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(f),u(f)}),me(o.scrollbarY,()=>{var d;const f=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),l?m.jsx(L.div,{...r,ref:t,style:{width:i,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ze(e){return e?parseInt(e,10):0}function ur(e,t){const n=e/t;return isNaN(n)?0:n}function Qe(e){const t=ur(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function vs(e,t,n,r="ltr"){const o=Qe(n),i=o/2,s=t||i,c=o-s,u=n.scrollbar.paddingStart+s,l=n.scrollbar.size-n.scrollbar.paddingEnd-c,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return fr([u,l],d)(e)}function hn(e,t,n="ltr"){const r=Qe(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,c=i-r,u=n==="ltr"?[0,s]:[s*-1,0],l=rs(e,u);return fr([0,s],[0,c])(l)}function fr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dr(e,t){return e>0&&e<t}var ms=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,c=n.top!==i.top;(s||c)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Je(e,t){const n=B(e),r=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),a.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function me(e,t){const n=B(t);ne(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var La=rr,Ma=ir,Ia=lr;const gs=["top","right","bottom","left"],se=Math.min,H=Math.max,Ue=Math.round,ke=Math.floor,Q=e=>({x:e,y:e}),ys={left:"right",right:"left",bottom:"top",top:"bottom"},ws={start:"end",end:"start"};function bt(e,t,n){return H(e,se(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function jt(e){return e==="x"?"y":"x"}function kt(e){return e==="y"?"height":"width"}const bs=new Set(["top","bottom"]);function q(e){return bs.has(oe(e))?"y":"x"}function Ft(e){return jt(q(e))}function xs(e,t,n){n===void 0&&(n=!1);const r=be(e),o=Ft(e),i=kt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ye(s)),[s,Ye(s)]}function Cs(e){const t=Ye(e);return[xt(e),t,xt(t)]}function xt(e){return e.replace(/start|end/g,t=>ws[t])}const vn=["left","right"],mn=["right","left"],Ss=["top","bottom"],Es=["bottom","top"];function Ps(e,t,n){switch(e){case"top":case"bottom":return n?t?mn:vn:t?vn:mn;case"left":case"right":return t?Ss:Es;default:return[]}}function Rs(e,t,n,r){const o=be(e);let i=Ps(oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(xt)))),i}function Ye(e){return e.replace(/left|right|bottom|top/g,t=>ys[t])}function As(e){return{top:0,right:0,bottom:0,left:0,...e}}function pr(e){return typeof e!="number"?As(e):{top:e,right:e,bottom:e,left:e}}function Xe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gn(e,t,n){let{reference:r,floating:o}=e;const i=q(t),s=Ft(t),c=kt(s),u=oe(t),l=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let h;switch(u){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(be(t)){case"start":h[s]-=p*(n&&l?-1:1);break;case"end":h[s]+=p*(n&&l?-1:1);break}return h}async function Ts(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:c,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=re(t,e),g=pr(h),y=c[p?d==="floating"?"reference":"floating":d],w=Xe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:u})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),x=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},S=Xe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:C,strategy:u}):b);return{top:(w.top-S.top+g.top)/x.y,bottom:(S.bottom-w.bottom+g.bottom)/x.y,left:(w.left-S.left+g.left)/x.x,right:(S.right-w.right+g.right)/x.x}}const Os=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=gn(l,r,u),p=r,h={},g=0;for(let y=0;y<c.length;y++){var v;const{name:w,fn:b}=c[y],{x:C,y:x,data:S,reset:P}=await b({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:l,platform:{...s,detectOverflow:(v=s.detectOverflow)!=null?v:Ts},elements:{reference:e,floating:t}});f=C??f,d=x??d,h={...h,[w]:{...h[w],...S}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(l=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=gn(l,p,u)),y=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}},Ds=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:c,middlewareData:u}=t,{element:l,padding:f=0}=re(e,t)||{};if(l==null)return{};const d=pr(f),p={x:n,y:r},h=Ft(o),g=kt(h),v=await s.getDimensions(l),y=h==="y",w=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-p[h]-i.floating[g],S=p[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=P?P[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(P)))&&(E=c.floating[C]||i.floating[g]);const O=x/2-S/2,R=E/2-v[g]/2-1,A=se(d[w],R),D=se(d[b],R),M=A,I=E-v[g]-D,N=E/2-v[g]/2+O,$=bt(M,N,I),j=!u.arrow&&be(o)!=null&&N!==$&&i.reference[g]/2-(N<M?A:D)-v[g]/2<0,k=j?N<M?N-M:N-I:0;return{[h]:p[h]+k,data:{[h]:$,centerOffset:N-$-k,...j&&{alignmentOffset:k}},reset:j}}}),_s=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:c,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=oe(o),b=q(c),C=oe(c)===c,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=p||(C||!v?[Ye(c)]:Cs(c)),P=g!=="none";!p&&P&&S.push(...Rs(c,v,g,x));const E=[c,...S],O=await u.detectOverflow(t,y),R=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&R.push(O[w]),d){const N=xs(o,s,x);R.push(O[N[0]],O[N[1]])}if(A=[...A,{placement:o,overflows:R}],!R.every(N=>N<=0)){var D,M;const N=(((D=i.flip)==null?void 0:D.index)||0)+1,$=E[N];if($&&(!(d==="alignment"?b!==q($):!1)||A.every(T=>q(T.placement)===b?T.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:$}};let j=(M=A.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(h){case"bestFit":{var I;const k=(I=A.filter(T=>{if(P){const W=q(T.placement);return W===b||W==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(W=>W>0).reduce((W,K)=>W+K,0)]).sort((T,W)=>T[1]-W[1])[0])==null?void 0:I[0];k&&(j=k);break}case"initialPlacement":j=c;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function yn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wn(e){return gs.some(t=>e[t]>=0)}const Ns=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=re(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=yn(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:wn(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),c=yn(s,n.floating);return{data:{escapedOffsets:c,escaped:wn(c)}}}default:return{}}}}},hr=new Set(["left","top"]);async function Ls(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=oe(n),c=be(n),u=q(n)==="y",l=hr.has(s)?-1:1,f=i&&u?-1:1,d=re(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),u?{x:h*f,y:p*l}:{x:p*l,y:h*f}}const Ms=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:c}=t,u=await Ls(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},Is=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:b,y:C}=w;return{x:b,y:C}}},...l}=re(e,t),f={x:n,y:r},d=await i.detectOverflow(t,l),p=q(oe(o)),h=jt(p);let g=f[h],v=f[p];if(s){const w=h==="y"?"top":"left",b=h==="y"?"bottom":"right",C=g+d[w],x=g-d[b];g=bt(C,g,x)}if(c){const w=p==="y"?"top":"left",b=p==="y"?"bottom":"right",C=v+d[w],x=v-d[b];v=bt(C,v,x)}const y=u.fn({...t,[h]:g,[p]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:s,[p]:c}}}}}},js=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=re(e,t),f={x:n,y:r},d=q(o),p=jt(d);let h=f[p],g=f[d];const v=re(c,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const C=p==="y"?"height":"width",x=i.reference[p]-i.floating[C]+y.mainAxis,S=i.reference[p]+i.reference[C]-y.mainAxis;h<x?h=x:h>S&&(h=S)}if(l){var w,b;const C=p==="y"?"width":"height",x=hr.has(oe(o)),S=i.reference[d]-i.floating[C]+(x&&((w=s.offset)==null?void 0:w[d])||0)+(x?0:y.crossAxis),P=i.reference[d]+i.reference[C]+(x?0:((b=s.offset)==null?void 0:b[d])||0)-(x?y.crossAxis:0);g<S?g=S:g>P&&(g=P)}return{[p]:h,[d]:g}}}},ks=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:c}=t,{apply:u=()=>{},...l}=re(e,t),f=await s.detectOverflow(t,l),d=oe(o),p=be(o),h=q(o)==="y",{width:g,height:v}=i.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,y=p==="end"?"top":"bottom");const b=v-f.top-f.bottom,C=g-f.left-f.right,x=se(v-f[y],b),S=se(g-f[w],C),P=!t.middlewareData.shift;let E=x,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=b),P&&!p){const A=H(f.left,0),D=H(f.right,0),M=H(f.top,0),I=H(f.bottom,0);h?O=g-2*(A!==0||D!==0?A+D:H(f.left,f.right)):E=v-2*(M!==0||I!==0?M+I:H(f.top,f.bottom))}await u({...t,availableWidth:O,availableHeight:E});const R=await s.getDimensions(c.floating);return g!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function et(){return typeof window<"u"}function xe(e){return vr(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(vr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vr(e){return et()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return et()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return et()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function bn(e){return!et()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}const Fs=new Set(["inline","contents"]);function Te(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Fs.has(o)}const Ws=new Set(["table","td","th"]);function $s(e){return Ws.has(xe(e))}const Hs=[":popover-open",":modal"];function tt(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Bs=["transform","translate","scale","rotate","perspective"],Vs=["transform","translate","scale","rotate","perspective","filter"],zs=["paint","layout","strict","content"];function Wt(e){const t=$t(),n=U(e)?Y(e):e;return Bs.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Vs.some(r=>(n.willChange||"").includes(r))||zs.some(r=>(n.contain||"").includes(r))}function Us(e){let t=ce(e);for(;J(t)&&!ge(t);){if(Wt(t))return t;if(tt(t))return null;t=ce(t)}return null}function $t(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ys=new Set(["html","body","#document"]);function ge(e){return Ys.has(xe(e))}function Y(e){return V(e).getComputedStyle(e)}function nt(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(xe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bn(e)&&e.host||te(e);return bn(t)?t.host:t}function mr(e){const t=ce(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:mr(t)}function Ee(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=V(o);if(i){const c=Ct(s);return t.concat(s,s.visualViewport||[],Te(o)?o:[],c&&n?Ee(c):[])}return t.concat(o,Ee(o,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gr(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=J(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,c=Ue(n)!==i||Ue(r)!==s;return c&&(n=i,r=s),{width:n,height:r,$:c}}function Ht(e){return U(e)?e:e.contextElement}function ve(e){const t=Ht(e);if(!J(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gr(t);let s=(i?Ue(n.width):n.width)/r,c=(i?Ue(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Xs=Q(0);function yr(e){const t=V(e);return!$t()||!t.visualViewport?Xs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ue(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ht(e);let s=Q(1);t&&(r?U(r)&&(s=ve(r)):s=ve(e));const c=Gs(i,n,r)?yr(i):Q(0);let u=(o.left+c.x)/s.x,l=(o.top+c.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const p=V(i),h=r&&U(r)?V(r):r;let g=p,v=Ct(g);for(;v&&r&&h!==g;){const y=ve(v),w=v.getBoundingClientRect(),b=Y(v),C=w.left+(v.clientLeft+parseFloat(b.paddingLeft))*y.x,x=w.top+(v.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,l*=y.y,f*=y.x,d*=y.y,u+=C,l+=x,g=V(v),v=Ct(g)}}return Xe({width:f,height:d,x:u,y:l})}function rt(e,t){const n=nt(e).scrollLeft;return t?t.left+n:ue(te(e)).left+n}function wr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ks(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=te(r),c=t?tt(t.floating):!1;if(r===s||c&&i)return n;let u={scrollLeft:0,scrollTop:0},l=Q(1);const f=Q(0),d=J(r);if((d||!d&&!i)&&((xe(r)!=="body"||Te(s))&&(u=nt(r)),J(r))){const h=ue(r);l=ve(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=s&&!d&&!i?wr(s,u):Q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+p.x,y:n.y*l.y-u.scrollTop*l.y+f.y+p.y}}function Zs(e){return Array.from(e.getClientRects())}function qs(e){const t=te(e),n=nt(e),r=e.ownerDocument.body,o=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+rt(e);const c=-n.scrollTop;return Y(r).direction==="rtl"&&(s+=H(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:c}}const xn=25;function Qs(e,t){const n=V(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,c=0,u=0;if(o){i=o.width,s=o.height;const f=$t();(!f||f&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const l=rt(r);if(l<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=xn&&(i-=g)}else l<=xn&&(i+=l);return{width:i,height:s,x:c,y:u}}const Js=new Set(["absolute","fixed"]);function ec(e,t){const n=ue(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=J(e)?ve(e):Q(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:c,x:u,y:l}}function Cn(e,t,n){let r;if(t==="viewport")r=Qs(e,n);else if(t==="document")r=qs(te(e));else if(U(t))r=ec(t,n);else{const o=yr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Xe(r)}function br(e,t){const n=ce(e);return n===t||!U(n)||ge(n)?!1:Y(n).position==="fixed"||br(n,t)}function tc(e,t){const n=t.get(e);if(n)return n;let r=Ee(e,[],!1).filter(c=>U(c)&&xe(c)!=="body"),o=null;const i=Y(e).position==="fixed";let s=i?ce(e):e;for(;U(s)&&!ge(s);){const c=Y(s),u=Wt(s);!u&&c.position==="fixed"&&(o=null),(i?!u&&!o:!u&&c.position==="static"&&!!o&&Js.has(o.position)||Te(s)&&!u&&br(e,s))?r=r.filter(f=>f!==s):o=c,s=ce(s)}return t.set(e,r),r}function nc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?tt(t)?[]:tc(t,this._c):[].concat(n),r],c=s[0],u=s.reduce((l,f)=>{const d=Cn(t,f,o);return l.top=H(d.top,l.top),l.right=se(d.right,l.right),l.bottom=se(d.bottom,l.bottom),l.left=H(d.left,l.left),l},Cn(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function rc(e){const{width:t,height:n}=gr(e);return{width:t,height:n}}function oc(e,t,n){const r=J(t),o=te(t),i=n==="fixed",s=ue(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Q(0);function l(){u.x=rt(o)}if(r||!r&&!i)if((xe(t)!=="body"||Te(o))&&(c=nt(t)),r){const h=ue(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&l();i&&!r&&o&&l();const f=o&&!r&&!i?wr(o,c):Q(0),d=s.left+c.scrollLeft-u.x-f.x,p=s.top+c.scrollTop-u.y-f.y;return{x:d,y:p,width:s.width,height:s.height}}function mt(e){return Y(e).position==="static"}function Sn(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function xr(e,t){const n=V(e);if(tt(e))return n;if(!J(e)){let o=ce(e);for(;o&&!ge(o);){if(U(o)&&!mt(o))return o;o=ce(o)}return n}let r=Sn(e,t);for(;r&&$s(r)&&mt(r);)r=Sn(r,t);return r&&ge(r)&&mt(r)&&!Wt(r)?n:r||Us(e)||n}const ic=async function(e){const t=this.getOffsetParent||xr,n=this.getDimensions,r=await n(e.floating);return{reference:oc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sc(e){return Y(e).direction==="rtl"}const cc={convertOffsetParentRelativeRectToViewportRelativeRect:Ks,getDocumentElement:te,getClippingRect:nc,getOffsetParent:xr,getElementRects:ic,getClientRects:Zs,getDimensions:rc,getScale:ve,isElement:U,isRTL:sc};function Cr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ac(e,t){let n=null,r;const o=te(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=l;if(c||t(),!p||!h)return;const g=ke(d),v=ke(o.clientWidth-(f+p)),y=ke(o.clientHeight-(d+h)),w=ke(f),C={rootMargin:-g+"px "+-v+"px "+-y+"px "+-w+"px",threshold:H(0,se(1,u))||1};let x=!0;function S(P){const E=P[0].intersectionRatio;if(E!==u){if(!x)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Cr(l,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(S,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return s(!0),i}function lc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ht(e),f=o||i?[...l?Ee(l):[],...Ee(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=l&&c?ac(l,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let g,v=u?ue(e):null;u&&y();function y(){const w=ue(e);v&&!Cr(v,w)&&n(),v=w,g=requestAnimationFrame(y)}return n(),()=>{var w;f.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,u&&cancelAnimationFrame(g)}}const uc=Ms,fc=Is,dc=_s,pc=ks,hc=Ns,En=Ds,vc=js,mc=(e,t,n)=>{const r=new Map,o={platform:cc,...n},i={...o.platform,_c:r};return Os(e,t,{...o,platform:i})};var gc=typeof document<"u",yc=function(){},$e=gc?a.useLayoutEffect:yc;function Ge(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ge(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ge(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Sr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pn(e,t){const n=Sr(e);return Math.round(t*n)/n}function gt(e){const t=a.useRef(e);return $e(()=>{t.current=e}),t}function wc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:u,open:l}=e,[f,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=a.useState(r);Ge(p,r)||h(r);const[g,v]=a.useState(null),[y,w]=a.useState(null),b=a.useCallback(T=>{T!==P.current&&(P.current=T,v(T))},[]),C=a.useCallback(T=>{T!==E.current&&(E.current=T,w(T))},[]),x=i||g,S=s||y,P=a.useRef(null),E=a.useRef(null),O=a.useRef(f),R=u!=null,A=gt(u),D=gt(o),M=gt(l),I=a.useCallback(()=>{if(!P.current||!E.current)return;const T={placement:t,strategy:n,middleware:p};D.current&&(T.platform=D.current),mc(P.current,E.current,T).then(W=>{const K={...W,isPositioned:M.current!==!1};N.current&&!Ge(O.current,K)&&(O.current=K,Rn.flushSync(()=>{d(K)}))})},[p,t,n,D,M]);$e(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const N=a.useRef(!1);$e(()=>(N.current=!0,()=>{N.current=!1}),[]),$e(()=>{if(x&&(P.current=x),S&&(E.current=S),x&&S){if(A.current)return A.current(x,S,I);I()}},[x,S,I,A,R]);const $=a.useMemo(()=>({reference:P,floating:E,setReference:b,setFloating:C}),[b,C]),j=a.useMemo(()=>({reference:x,floating:S}),[x,S]),k=a.useMemo(()=>{const T={position:n,left:0,top:0};if(!j.floating)return T;const W=Pn(j.floating,f.x),K=Pn(j.floating,f.y);return c?{...T,transform:"translate("+W+"px, "+K+"px)",...Sr(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:K}},[n,c,j.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:I,refs:$,elements:j,floatingStyles:k}),[f,I,$,j,k])}const bc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?En({element:r.current,padding:o}).fn(n):{}:r?En({element:r,padding:o}).fn(n):{}}}},xc=(e,t)=>({...uc(e),options:[e,t]}),Cc=(e,t)=>({...fc(e),options:[e,t]}),Sc=(e,t)=>({...vc(e),options:[e,t]}),Ec=(e,t)=>({...dc(e),options:[e,t]}),Pc=(e,t)=>({...pc(e),options:[e,t]}),Rc=(e,t)=>({...hc(e),options:[e,t]}),Ac=(e,t)=>({...bc(e),options:[e,t]});var Tc="Arrow",Er=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(L.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Er.displayName=Tc;var Oc=Er;function Dc(e){const[t,n]=a.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,c;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,c=l.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Bt="Popper",[Pr,ot]=Ae(Bt),[_c,Rr]=Pr(Bt),Ar=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return m.jsx(_c,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ar.displayName=Bt;var Tr="PopperAnchor",Or=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Rr(Tr,n),s=a.useRef(null),c=F(t,s),u=a.useRef(null);return a.useEffect(()=>{const l=u.current;u.current=(r==null?void 0:r.current)||s.current,l!==u.current&&i.onAnchorChange(u.current)}),r?null:m.jsx(L.div,{...o,ref:c})});Or.displayName=Tr;var Vt="PopperContent",[Nc,Lc]=Pr(Vt),Dr=a.forwardRef((e,t)=>{var Xt,Gt,Kt,Zt,qt,Qt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,y=Rr(Vt,n),[w,b]=a.useState(null),C=F(t,Ce=>b(Ce)),[x,S]=a.useState(null),P=Dc(x),E=(P==null?void 0:P.width)??0,O=(P==null?void 0:P.height)??0,R=r+(i!=="center"?"-"+i:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(l)?l:[l],M=D.length>0,I={padding:A,boundary:D.filter(Ic),altBoundary:M},{refs:N,floatingStyles:$,placement:j,isPositioned:k,middlewareData:T}=wc({strategy:"fixed",placement:R,whileElementsMounted:(...Ce)=>lc(...Ce,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[xc({mainAxis:o+O,alignmentAxis:s}),u&&Cc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Sc():void 0,...I}),u&&Ec({...I}),Pc({...I,apply:({elements:Ce,rects:Jt,availableWidth:so,availableHeight:co})=>{const{width:ao,height:lo}=Jt.reference,_e=Ce.floating.style;_e.setProperty("--radix-popper-available-width",`${so}px`),_e.setProperty("--radix-popper-available-height",`${co}px`),_e.setProperty("--radix-popper-anchor-width",`${ao}px`),_e.setProperty("--radix-popper-anchor-height",`${lo}px`)}}),x&&Ac({element:x,padding:c}),jc({arrowWidth:E,arrowHeight:O}),p&&Rc({strategy:"referenceHidden",...I})]}),[W,K]=Lr(j),De=B(g);ne(()=>{k&&(De==null||De())},[k,De]);const to=(Xt=T.arrow)==null?void 0:Xt.x,no=(Gt=T.arrow)==null?void 0:Gt.y,ro=((Kt=T.arrow)==null?void 0:Kt.centerOffset)!==0,[oo,io]=a.useState();return ne(()=>{w&&io(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:k?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oo,"--radix-popper-transform-origin":[(Zt=T.transformOrigin)==null?void 0:Zt.x,(qt=T.transformOrigin)==null?void 0:qt.y].join(" "),...((Qt=T.hide)==null?void 0:Qt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Nc,{scope:n,placedSide:W,onArrowChange:S,arrowX:to,arrowY:no,shouldHideArrow:ro,children:m.jsx(L.div,{"data-side":W,"data-align":K,...v,ref:C,style:{...v.style,animation:k?void 0:"none"}})})})});Dr.displayName=Vt;var _r="PopperArrow",Mc={top:"bottom",right:"left",bottom:"top",left:"right"},Nr=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Lc(_r,r),s=Mc[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(Oc,{...o,ref:n,style:{...o.style,display:"block"}})})});Nr.displayName=_r;function Ic(e){return e!==null}var jc=e=>({name:"transformOrigin",options:e,fn(t){var y,w,b;const{placement:n,rects:r,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,c=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,f]=Lr(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+c/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let g="",v="";return l==="bottom"?(g=s?d:`${p}px`,v=`${-u}px`):l==="top"?(g=s?d:`${p}px`,v=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,v=s?d:`${h}px`):l==="left"&&(g=`${r.floating.width+u}px`,v=s?d:`${h}px`),{data:{x:g,y:v}}}});function Lr(e){const[t,n="center"]=e.split("-");return[t,n]}var Mr=Ar,zt=Or,Ir=Dr,jr=Nr;function kc(e){const t=Fc(e),n=a.forwardRef((r,o)=>{const{children:i,...s}=r,c=a.Children.toArray(i),u=c.find($c);if(u){const l=u.props.children,f=c.map(d=>d===u?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:d);return m.jsx(t,{...s,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Fc(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const s=Bc(o),c=Hc(i,o.props);return o.type!==a.Fragment&&(c.ref=r?Re(r,s):s),a.cloneElement(o,c)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wc=Symbol("radix.slottable");function $c(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wc}function Hc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Bc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var it="Popover",[kr]=Ae(it,[ot]),Oe=ot(),[Vc,ae]=kr(it),Fr=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,c=Oe(t),u=a.useRef(null),[l,f]=a.useState(!1),[d,p]=Rt({prop:r,defaultProp:o??!1,onChange:i,caller:it});return m.jsx(Mr,{...c,children:m.jsx(Vc,{scope:t,contentId:Se(),triggerRef:u,open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:l,onCustomAnchorAdd:a.useCallback(()=>f(!0),[]),onCustomAnchorRemove:a.useCallback(()=>f(!1),[]),modal:s,children:n})})};Fr.displayName=it;var Wr="PopoverAnchor",zc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(Wr,n),i=Oe(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=o;return a.useEffect(()=>(s(),()=>c()),[s,c]),m.jsx(zt,{...i,...r,ref:t})});zc.displayName=Wr;var $r="PopoverTrigger",Hr=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae($r,n),i=Oe(n),s=F(t,o.triggerRef),c=m.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yr(o.open),...r,ref:s,onClick:_(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:m.jsx(zt,{asChild:!0,...i,children:c})});Hr.displayName=$r;var Ut="PopoverPortal",[Uc,Yc]=kr(Ut,{forceMount:void 0}),Br=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ae(Ut,t);return m.jsx(Uc,{scope:t,forceMount:n,children:m.jsx(X,{present:n||i.open,children:m.jsx(Tt,{asChild:!0,container:o,children:r})})})};Br.displayName=Ut;var ye="PopoverContent",Vr=a.forwardRef((e,t)=>{const n=Yc(ye,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ae(ye,e.__scopePopover);return m.jsx(X,{present:r||i.open,children:i.modal?m.jsx(Gc,{...o,ref:t}):m.jsx(Kc,{...o,ref:t})})});Vr.displayName=ye;var Xc=kc("PopoverContent.RemoveScroll"),Gc=a.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=a.useRef(null),o=F(t,r),i=a.useRef(!1);return a.useEffect(()=>{const s=r.current;if(s)return $n(s)},[]),m.jsx(Ot,{as:Xc,allowPinchZoom:!0,children:m.jsx(zr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),i.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kc=a.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=a.useRef(!1),o=a.useRef(!1);return m.jsx(zr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),zr=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...d}=e,p=ae(ye,n),h=Oe(n);return _n(),m.jsx(At,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:m.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(Ir,{"data-state":Yr(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ur="PopoverClose",Zc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(Ur,n);return m.jsx(L.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});Zc.displayName=Ur;var qc="PopoverArrow",Qc=a.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(n);return m.jsx(jr,{...o,...r,ref:t})});Qc.displayName=qc;function Yr(e){return e?"open":"closed"}var ja=Fr,ka=Hr,Fa=Br,Wa=Vr,Jc=Symbol("radix.slottable");function ea(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Jc,t}var ta=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),na="VisuallyHidden",Xr=a.forwardRef((e,t)=>m.jsx(L.span,{...e,ref:t,style:{...ta,...e.style}}));Xr.displayName=na;var ra=Xr,[st]=Ae("Tooltip",[ot]),ct=ot(),Gr="TooltipProvider",oa=700,St="tooltip.open",[ia,Yt]=st(Gr),Kr=e=>{const{__scopeTooltip:t,delayDuration:n=oa,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=a.useRef(!0),c=a.useRef(!1),u=a.useRef(0);return a.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),m.jsx(ia,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:i})};Kr.displayName=Gr;var Pe="Tooltip",[sa,at]=st(Pe),Zr=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,u=Yt(Pe,e.__scopeTooltip),l=ct(t),[f,d]=a.useState(null),p=Se(),h=a.useRef(0),g=s??u.disableHoverableContent,v=c??u.delayDuration,y=a.useRef(!1),[w,b]=Rt({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(St))):u.onClose(),i==null||i(E)},caller:Pe}),C=a.useMemo(()=>w?y.current?"delayed-open":"instant-open":"closed",[w]),x=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,b(!0)},[b]),S=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),P=a.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,b(!0),h.current=0},v)},[v,b]);return a.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(Mr,{...l,children:m.jsx(sa,{scope:t,contentId:p,open:w,stateAttribute:C,trigger:f,onTriggerChange:d,onTriggerEnter:a.useCallback(()=>{u.isOpenDelayedRef.current?P():x()},[u.isOpenDelayedRef,P,x]),onTriggerLeave:a.useCallback(()=>{g?S():(window.clearTimeout(h.current),h.current=0)},[S,g]),onOpen:x,onClose:S,disableHoverableContent:g,children:n})})};Zr.displayName=Pe;var Et="TooltipTrigger",qr=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=at(Et,n),i=Yt(Et,n),s=ct(n),c=a.useRef(null),u=F(t,c,o.onTriggerChange),l=a.useRef(!1),f=a.useRef(!1),d=a.useCallback(()=>l.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(zt,{asChild:!0,...s,children:m.jsx(L.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:_(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:_(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:_(e.onBlur,o.onClose),onClick:_(e.onClick,o.onClose)})})});qr.displayName=Et;var ca="TooltipPortal",[$a,aa]=st(ca,{forceMount:void 0}),we="TooltipContent",Qr=a.forwardRef((e,t)=>{const n=aa(we,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=at(we,e.__scopeTooltip);return m.jsx(X,{present:r||s.open,children:s.disableHoverableContent?m.jsx(Jr,{side:o,...i,ref:t}):m.jsx(la,{side:o,...i,ref:t})})}),la=a.forwardRef((e,t)=>{const n=at(we,e.__scopeTooltip),r=Yt(we,e.__scopeTooltip),o=a.useRef(null),i=F(t,o),[s,c]=a.useState(null),{trigger:u,onClose:l}=n,f=o.current,{onPointerInTransitChange:d}=r,p=a.useCallback(()=>{c(null),d(!1)},[d]),h=a.useCallback((g,v)=>{const y=g.currentTarget,w={x:g.clientX,y:g.clientY},b=ha(w,y.getBoundingClientRect()),C=va(w,b),x=ma(v.getBoundingClientRect()),S=ya([...C,...x]);c(S),d(!0)},[d]);return a.useEffect(()=>()=>p(),[p]),a.useEffect(()=>{if(u&&f){const g=y=>h(y,f),v=y=>h(y,u);return u.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[u,f,h,p]),a.useEffect(()=>{if(s){const g=v=>{const y=v.target,w={x:v.clientX,y:v.clientY},b=(u==null?void 0:u.contains(y))||(f==null?void 0:f.contains(y)),C=!ga(w,s);b?p():C&&(p(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,f,s,l,p]),m.jsx(Jr,{...e,ref:i})}),[ua,fa]=st(Pe,{isInside:!1}),da=ea("TooltipContent"),Jr=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,u=at(we,n),l=ct(n),{onClose:f}=u;return a.useEffect(()=>(document.addEventListener(St,f),()=>document.removeEventListener(St,f)),[f]),a.useEffect(()=>{if(u.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(u.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,f]),m.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:m.jsxs(Ir,{"data-state":u.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(da,{children:r}),m.jsx(ua,{scope:n,isInside:!0,children:m.jsx(ra,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Qr.displayName=we;var eo="TooltipArrow",pa=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ct(n);return fa(eo,n).isInside?null:m.jsx(jr,{...o,...r,ref:t})});pa.displayName=eo;function ha(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function va(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ma(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ga(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],u=t[s],l=c.x,f=c.y,d=u.x,p=u.y;f>r!=p>r&&n<(d-l)*(r-f)/(p-f)+l&&(o=!o)}return o}function ya(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),wa(t)}function wa(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ha=Kr,Ba=Zr,Va=qr,za=Qr;export{Oa as C,_a as D,Ta as O,Aa as P,Ra as R,xa as S,Da as T,Ma as V,ei as _,Na as a,La as b,Ia as c,ss as d,ds as e,Fa as f,Wa as g,ja as h,ka as i,Ha as j,Ba as k,Va as l,za as m,Ea as n,Z as o,Ca as p,Sa as q,Nn as r};
|
package/dist/web/index.html
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>BladeCode</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CxEh32hc.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DG5dkZ_t.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-radix-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-radix-DXRuAJHH.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-Cv18Q6rW.js">
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bi5ijAQP.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blade-code",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "🗡️ Blade Code - 智能代码助手命令行工具",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"test:unit": "node scripts/test.js unit",
|
|
23
23
|
"test:integration": "node scripts/test.js integration",
|
|
24
24
|
"test:real-api": "node scripts/test.js realApi",
|
|
25
|
+
"test:real-api:qualification": "node scripts/test.js realApiQualification",
|
|
25
26
|
"test:cli": "node scripts/test.js cli",
|
|
26
27
|
"test:headless-core": "node scripts/test.js headlessCore",
|
|
27
28
|
"test:e2e": "node scripts/test.js e2e",
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
74
75
|
"ahooks": "^3.9.7",
|
|
75
76
|
"ansi-escapes": "^7.3.0",
|
|
77
|
+
"ajv": "^8.17.1",
|
|
76
78
|
"async-mutex": "^0.5.0",
|
|
77
79
|
"axios": "^1.19.0",
|
|
78
80
|
"chalk": "^5.4.1",
|
package/dist/chunk-10k6egwk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hc as a,Ic as b,Jc as c}from"./chunk-hjsm6ejs.js";import"./chunk-b4n34hrn.js";import"./chunk-n9khyme2.js";import"./chunk-7xm3vjkz.js";import"./chunk-frcg8gea.js";import"./chunk-c2rhwxyn.js";export{b as resolveModelConfig,c as getModelDisplayName,a as getModelApiKeyEnvironmentVariable};
|
package/dist/chunk-17xtw88g.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ob as a,Pb as b}from"./chunk-n5m2p0bq.js";import"./chunk-nfmsn652.js";import"./chunk-c2rhwxyn.js";export{a as globalOptions,b as cliConfig};
|
package/dist/chunk-1kg9r8xp.js
DELETED
package/dist/chunk-383vbwmt.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{W as H,Y as J}from"./chunk-1cvr3qtd.js";import{vb as D}from"./chunk-47dsd91k.js";import{cd as G}from"./chunk-m4htdpr9.js";import{we as B}from"./chunk-c9tzf9r5.js";async function U(){await G(B())}async function V(b){let f=b.message||b._?.[0];if(typeof f==="string"&&f.trim())return f;let q=b.stdin??process.stdin;if(!q.isTTY){let z=[];for await(let F of q)z.push(F);return Buffer.concat(z).toString("utf-8").trim()}if(b.defaultMessage!==void 0)return b.defaultMessage;throw Error("No input provided")}async function X(b){if(!H(b))return{mode:"agent",content:b};let f=await J(b,{cwd:B(),surface:"headless",workspaceRoot:B()});if(!f.success)return{mode:"output",content:`Error: ${f.error||"未知错误"}`,exitCode:1};let q=f.data;if(q?.action==="invoke_skill"){let{skillName:z,skillArgs:F}=q;return{mode:"agent",content:F?`Please use the "${z}" skill to help me with: ${F}`:`Please use the "${z}" skill.`}}if(q?.action==="invoke_custom_command"||q?.action==="invoke_plugin_command"){let z=q.processedContent;return{mode:"agent",content:`# Custom Command: /${q.commandName}
|
|
2
|
-
|
|
3
|
-
${z}`}}return{mode:"output",content:f.content||f.message||"",exitCode:0}}function K(b){if(!(b instanceof Error))return!1;return b.message.includes("未找到会话")||b.message.includes("ENOENT")||b.message.includes("no such file")}async function O(b){try{return await D.loadSession(b,B())}catch(f){if(K(f))return null;throw f}}async function $(b){if(b.resume===!0||b.resume==="true")throw Error("--resume without a session ID is only supported in interactive UI mode");if(typeof b.resume==="string"&&b.resume.length>0){if(b.forkSession){let z=B();return D.forkSession(b.resume,{newSessionId:b.sessionId,sourceProjectPath:z,targetProjectPath:z})}let[f,q]=await Promise.all([D.loadSession(b.resume),D.findSessionMetadata(b.resume)]);return{sessionId:b.resume,messages:f,metadata:q}}if(b.continue){let f=b.forkSession?await D.listSessions({cwd:B()}):await D.listSessions();if(f.length>0){let q=f[0].sessionId;if(b.forkSession){let z=B();return D.forkSession(q,{newSessionId:b.sessionId,sourceProjectPath:z,targetProjectPath:z})}return{sessionId:q,messages:await D.loadSession(q),metadata:f[0]}}if(b.forkSession)throw Error("Cannot fork: no sessions are available to continue")}if(b.sessionId){let f=await O(b.sessionId);return{sessionId:b.sessionId,messages:f??[],...f?{metadata:await D.findSessionMetadata(b.sessionId,B())}:{}}}return{sessionId:`${b.fallbackSessionPrefix}-${Date.now()}`,messages:[]}}
|
|
4
|
-
export{U as m,V as n,X as o,$ as p};
|
package/dist/chunk-3kk3bk11.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Mc as a,Nc as b,Oc as c}from"./chunk-v1p80wvh.js";import"./chunk-0rp2ck29.js";import"./chunk-xkp4ph6v.js";import"./chunk-1kg9r8xp.js";import"./chunk-c9tzf9r5.js";import"./chunk-n9khyme2.js";import"./chunk-7xm3vjkz.js";import"./chunk-nfmsn652.js";import"./chunk-kcs3xa8f.js";import"./chunk-vvbd9fb5.js";import"./chunk-frcg8gea.js";import"./chunk-c2rhwxyn.js";export{c as snapshotWorkspaceModelResources,b as resolveWorkspaceModelResources,a as cloneWorkspaceModelConfig};
|