sqlmesh 0.181.2.dev25__py3-none-any.whl → 0.181.2.dev26__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/RECORD +50 -50
- web/client/dist/assets/Audits-CQSghR1z.js +1 -0
- web/client/dist/assets/Banner-B0bpqtD_.js +1 -0
- web/client/dist/assets/{ChevronDownIcon-Clb0EegJ.js → ChevronDownIcon-BCSgClK9.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-dJMaxBt0.js → ChevronRightIcon-Bcz9goZS.js} +1 -1
- web/client/dist/assets/Content-BhpD1QIh.js +10 -0
- web/client/dist/assets/Content-DcS8joWy.js +1 -0
- web/client/dist/assets/Data-Cx_yMlp4.js +1 -0
- web/client/dist/assets/{DataCatalog-DOMFDv-k.js → DataCatalog-HXtPC12m.js} +1 -1
- web/client/dist/assets/{Editor-BcrLy189.js → Editor-DOjTVzHs.js} +1 -1
- web/client/dist/assets/Editor-DlcCcxAF.js +1 -0
- web/client/dist/assets/Errors-RKQ2D8gd.js +1 -0
- web/client/dist/assets/FileExplorer-CstWOCnn.js +2 -0
- web/client/dist/assets/{Footer-CrjZJkj4.js → Footer-CpMoFxgd.js} +1 -1
- web/client/dist/assets/{Header-DE3bKMcG.js → Header-mC2S0YQz.js} +1 -1
- web/client/dist/assets/Input-BmfZ-VnW.js +41 -0
- web/client/dist/assets/Lineage-VCDzvguV.js +1 -0
- web/client/dist/assets/ListboxShow-CVN-1wre.js +1 -0
- web/client/dist/assets/ModelLineage-DxdKn0Xe.js +1 -0
- web/client/dist/assets/Models-BMTG-GKX.js +1 -0
- web/client/dist/assets/{Page-KC6UG65M.js → Page-DrM7FMiZ.js} +1 -1
- web/client/dist/assets/{Plan-xbMFAnVh.js → Plan-Cwr9Ts3u.js} +1 -1
- web/client/dist/assets/PlusCircleIcon-DPJ5E9WX.js +1 -0
- web/client/dist/assets/ReportErrors-DXdPHMbP.js +1 -0
- web/client/dist/assets/Root-DyEjo8XJ.js +1 -0
- web/client/dist/assets/{SearchList-BShQn9jm.js → SearchList-CJR2axiJ.js} +1 -1
- web/client/dist/assets/SelectEnvironment-BhhJ4ZjZ.js +2 -0
- web/client/dist/assets/{SourceList-DQ72TcK1.js → SourceList-CXyYEJjr.js} +1 -1
- web/client/dist/assets/{SourceListItem-CncMnWed.js → SourceListItem-DVQwSGMy.js} +1 -1
- web/client/dist/assets/{SplitPane-BY85POxQ.js → SplitPane-B5WJSZPo.js} +1 -1
- web/client/dist/assets/Tests-BjGO6Jnt.js +1 -0
- web/client/dist/assets/{Welcome-Blok6Zy8.js → Welcome-DMIPcEFX.js} +1 -1
- web/client/dist/assets/{context-Dx2o1ZRq.js → context-DeHggMKx.js} +1 -1
- web/client/dist/assets/context-Dwh4I8fp.js +1 -0
- web/client/dist/assets/{editor-Dj_6cws7.js → editor-intN6ort.js} +1 -1
- web/client/dist/assets/file-ZamfLSgo.js +1 -0
- web/client/dist/assets/floating-ui.react-dom-dR28niet.js +1 -0
- web/client/dist/assets/{help-Bolb6haG.js → help-BzkjAMMJ.js} +1 -1
- web/client/dist/assets/{index-DQbKL5-Q.js → index-BObtdpsN.js} +1 -1
- web/client/dist/assets/{index-CkIQhGgw.js → index-EyUZDtV7.js} +1 -1
- web/client/dist/assets/plan-gWbTulhw.js +1 -0
- web/client/dist/assets/popover-CA0_-cE5.js +13 -0
- web/client/dist/assets/{project-XFpF0AcJ.js → project-BX-rNI7d.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Audits-9LEBiRIZ.js +0 -1
- web/client/dist/assets/Banner-Cd1C5Udq.js +0 -1
- web/client/dist/assets/Content-BR4S-QHM.js +0 -1
- web/client/dist/assets/Content-poZFtj-2.js +0 -10
- web/client/dist/assets/Data-DaQiUe8h.js +0 -1
- web/client/dist/assets/Editor-BmDyTaeT.js +0 -1
- web/client/dist/assets/Errors-Cjh1BMUt.js +0 -1
- web/client/dist/assets/FileExplorer-Cdh0DRgS.js +0 -2
- web/client/dist/assets/Input-BY5Rc3go.js +0 -41
- web/client/dist/assets/Lineage-CLoHrLAT.js +0 -1
- web/client/dist/assets/ListboxShow-TFvq9fMB.js +0 -1
- web/client/dist/assets/ModelLineage-CB8Rie_r.js +0 -1
- web/client/dist/assets/Models-DXUrmUm_.js +0 -1
- web/client/dist/assets/PlusCircleIcon-CoFMRFQI.js +0 -1
- web/client/dist/assets/ReportErrors-mVM8O5iE.js +0 -1
- web/client/dist/assets/Root-BuQJ2VAg.js +0 -1
- web/client/dist/assets/SelectEnvironment-8p6ZQ-QH.js +0 -2
- web/client/dist/assets/Tests-DeaITzzp.js +0 -1
- web/client/dist/assets/context-B3nwRpP1.js +0 -1
- web/client/dist/assets/file-Bs2Eq56_.js +0 -1
- web/client/dist/assets/index-COQuzlwN.js +0 -1
- web/client/dist/assets/plan-BZyi7OFv.js +0 -1
- web/client/dist/assets/transition-B5aHgz_j.js +0 -4
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/top_level.txt +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as c,j as a,a2 as Kn,c as P,W as _t,b as H,w as Vn,h as qn,a as Wn,A as Yn,L as Xn,S as zn,m as Zn,R as Qn}from"./index-CkIQhGgw.js";import{u as N,M as Ke}from"./project-XFpF0AcJ.js";import{u as te,a as mt,c as Qe,b as At,d as Jn,P as Z,e as T,f as jt,g as er,h as be,i as Ft,A as tr,j as nr,k as rr,R as or,l as sr,F as ir,D as ar,C as cr,m as ur,n as lr,o as dr,p as fr,q as gr}from"./Input-BY5Rc3go.js";import{M as hr}from"./file-Bs2Eq56_.js";import{useFileExplorer as Ie}from"./context-B3nwRpP1.js";import{u as Lt,S as pr}from"./SearchList-BShQn9jm.js";import{u as Fe}from"./editor-Dj_6cws7.js";import{F as mr}from"./ChevronDownIcon-Clb0EegJ.js";import{F as vr}from"./ChevronRightIcon-dJMaxBt0.js";import"./index-COQuzlwN.js";import"./help-6Q7f7fjd.js";import"./transition-B5aHgz_j.js";function xr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),c.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Dr=c.forwardRef(xr);function Cr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"}))}const Sr=c.forwardRef(Cr);function yr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const wr=c.forwardRef(yr);function Tr(t,e){return c.useReducer((n,r)=>e[n][r]??n,t)}var he=t=>{const{present:e,children:n}=t,r=br(e),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=te(r.ref,Ir(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};he.displayName="Presence";function br(t){const[e,n]=c.useState(),r=c.useRef(null),o=c.useRef(t),s=c.useRef("none"),i=t?"mounted":"unmounted",[u,d]=Tr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const h=xe(r.current);s.current=u==="mounted"?h:"none"},[u]),mt(()=>{const h=r.current,f=o.current;if(f!==t){const l=s.current,p=xe(h);t?d("MOUNT"):p==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(f&&l!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),mt(()=>{if(e){let h;const f=e.ownerDocument.defaultView??window,g=p=>{const S=xe(r.current).includes(p.animationName);if(p.target===e&&S&&(d("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",h=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},l=p=>{p.target===e&&(s.current=xe(r.current))};return e.addEventListener("animationstart",l),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{f.clearTimeout(h),e.removeEventListener("animationstart",l),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:c.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function xe(t){return(t==null?void 0:t.animationName)||"none"}function Ir(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Le="rovingFocusGroup.onEntryFocus",Or={bubbles:!1,cancelable:!0},pe="RovingFocusGroup",[Ve,kt,Er]=At(pe),[Mr,Ut]=Qe(pe,[Er]),[Rr,Pr]=Mr(pe),Ht=c.forwardRef((t,e)=>a.jsx(Ve.Provider,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Ve.Slot,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Nr,{...t,ref:e})})}));Ht.displayName=pe;var Nr=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:f=!1,...g}=t,l=c.useRef(null),p=te(e,l),D=jt(s),[S,x]=er({prop:i,defaultProp:u??null,onChange:d,caller:pe}),[w,I]=c.useState(!1),b=be(h),M=kt(n),K=c.useRef(!1),[V,A]=c.useState(0);return c.useEffect(()=>{const R=l.current;if(R)return R.addEventListener(Le,b),()=>R.removeEventListener(Le,b)},[b]),a.jsx(Rr,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:S,onItemFocus:c.useCallback(R=>x(R),[x]),onItemShiftTab:c.useCallback(()=>I(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:a.jsx(Z.div,{tabIndex:w||V===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...t.style},onMouseDown:T(t.onMouseDown,()=>{K.current=!0}),onFocus:T(t.onFocus,R=>{const j=!K.current;if(R.target===R.currentTarget&&j&&!w){const L=new CustomEvent(Le,Or);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const C=M().filter(q=>q.focusable),E=C.find(q=>q.active),X=C.find(q=>q.id===S),se=[E,X,...C].filter(Boolean).map(q=>q.ref.current);Bt(se,f)}}K.current=!1}),onBlur:T(t.onBlur,()=>I(!1))})})}),Gt="RovingFocusGroupItem",$t=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...u}=t,d=Jn(),h=s||d,f=Pr(Gt,n),g=f.currentTabStopId===h,l=kt(n),{onFocusableItemAdd:p,onFocusableItemRemove:D,currentTabStopId:S}=f;return c.useEffect(()=>{if(r)return p(),()=>D()},[r,p,D]),a.jsx(Ve.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:a.jsx(Z.span,{tabIndex:g?0:-1,"data-orientation":f.orientation,...u,ref:e,onMouseDown:T(t.onMouseDown,x=>{r?f.onItemFocus(h):x.preventDefault()}),onFocus:T(t.onFocus,()=>f.onItemFocus(h)),onKeyDown:T(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=jr(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const M=b.indexOf(x.currentTarget);b=f.loop?Fr(b,M+1):b.slice(M+1)}setTimeout(()=>Bt(b))}}),children:typeof i=="function"?i({isCurrentTabStop:g,hasTabStop:S!=null}):i})})});$t.displayName=Gt;var _r={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ar(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jr(t,e,n){const r=Ar(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _r[r]}function Bt(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Fr(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Lr=Ht,kr=$t,qe=["Enter"," "],Ur=["ArrowDown","PageUp","Home"],Kt=["ArrowUp","PageDown","End"],Hr=[...Ur,...Kt],Gr={ltr:[...qe,"ArrowRight"],rtl:[...qe,"ArrowLeft"]},$r={ltr:["ArrowLeft"],rtl:["ArrowRight"]},me="Menu",[de,Br,Kr]=At(me),[ne,Vt]=Qe(me,[Kr,Ft,Ut]),Oe=Ft(),qt=Ut(),[Vr,re]=ne(me),[qr,ve]=ne(me),Wt=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,u=Oe(e),[d,h]=c.useState(null),f=c.useRef(!1),g=be(s),l=jt(o);return c.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",D,{capture:!0,once:!0}),document.addEventListener("pointermove",D,{capture:!0,once:!0})},D=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",D,{capture:!0}),document.removeEventListener("pointermove",D,{capture:!0})}},[]),a.jsx(fr,{...u,children:a.jsx(Vr,{scope:e,open:n,onOpenChange:g,content:d,onContentChange:h,children:a.jsx(qr,{scope:e,onClose:c.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:f,dir:l,modal:i,children:r})})})};Wt.displayName=me;var Wr="MenuAnchor",Je=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(tr,{...o,...r,ref:e})});Je.displayName=Wr;var et="MenuPortal",[Yr,Yt]=ne(et,{forceMount:void 0}),Xt=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=re(et,e);return a.jsx(Yr,{scope:e,forceMount:n,children:a.jsx(he,{present:n||s.open,children:a.jsx(gr,{asChild:!0,container:o,children:r})})})};Xt.displayName=et;var B="MenuContent",[Xr,tt]=ne(B),zt=c.forwardRef((t,e)=>{const n=Yt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:i.modal?a.jsx(zr,{...o,ref:e}):a.jsx(Zr,{...o,ref:e})})})})}),zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu),r=c.useRef(null),o=te(e,r);return c.useEffect(()=>{const s=r.current;if(s)return nr(s)},[]),a.jsx(nt,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu);return a.jsx(nt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qr=sr("MenuContent.ScrollLock"),nt=c.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,disableOutsideScroll:D,...S}=t,x=re(B,n),w=ve(B,n),I=Oe(n),b=qt(n),M=Br(n),[K,V]=c.useState(null),A=c.useRef(null),R=te(e,A,x.onContentChange),j=c.useRef(0),L=c.useRef(""),C=c.useRef(0),E=c.useRef(null),X=c.useRef("right"),Q=c.useRef(0),se=D?or:c.Fragment,q=D?{as:Qr,allowPinchZoom:!0}:void 0,W=m=>{var ie,ht;const O=L.current+m,_=M().filter(z=>!z.disabled),U=document.activeElement,Ae=(ie=_.find(z=>z.ref.current===U))==null?void 0:ie.textValue,je=_.map(z=>z.textValue),gt=lo(je,O,Ae),ce=(ht=_.find(z=>z.textValue===gt))==null?void 0:ht.ref.current;(function z(pt){L.current=pt,window.clearTimeout(j.current),pt!==""&&(j.current=window.setTimeout(()=>z(""),1e3))})(O),ce&&setTimeout(()=>ce.focus())};c.useEffect(()=>()=>window.clearTimeout(j.current),[]),rr();const v=c.useCallback(m=>{var _,U;return X.current===((_=E.current)==null?void 0:_.side)&&go(m,(U=E.current)==null?void 0:U.area)},[]);return a.jsx(Xr,{scope:n,searchRef:L,onItemEnter:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),onItemLeave:c.useCallback(m=>{var O;v(m)||((O=A.current)==null||O.focus(),V(null))},[v]),onTriggerLeave:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),pointerGraceTimerRef:C,onPointerGraceIntentChange:c.useCallback(m=>{E.current=m},[]),children:a.jsx(se,{...q,children:a.jsx(ir,{asChild:!0,trapped:o,onMountAutoFocus:T(s,m=>{var O;m.preventDefault(),(O=A.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(ar,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,children:a.jsx(Lr,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:K,onCurrentTabStopIdChange:V,onEntryFocus:T(d,m=>{w.isUsingKeyboardRef.current||m.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(cr,{role:"menu","aria-orientation":"vertical","data-state":gn(x.open),"data-radix-menu-content":"",dir:w.dir,...I,...S,ref:R,style:{outline:"none",...S.style},onKeyDown:T(S.onKeyDown,m=>{const _=m.target.closest("[data-radix-menu-content]")===m.currentTarget,U=m.ctrlKey||m.altKey||m.metaKey,Ae=m.key.length===1;_&&(m.key==="Tab"&&m.preventDefault(),!U&&Ae&&W(m.key));const je=A.current;if(m.target!==je||!Hr.includes(m.key))return;m.preventDefault();const ce=M().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Kt.includes(m.key)&&ce.reverse(),co(ce)}),onBlur:T(t.onBlur,m=>{m.currentTarget.contains(m.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:T(t.onPointerMove,fe(m=>{const O=m.target,_=Q.current!==m.clientX;if(m.currentTarget.contains(O)&&_){const U=m.clientX>Q.current?"right":"left";X.current=U,Q.current=m.clientX}}))})})})})})})});zt.displayName=B;var Jr="MenuGroup",rt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"group",...r,ref:e})});rt.displayName=Jr;var eo="MenuLabel",Zt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{...r,ref:e})});Zt.displayName=eo;var we="MenuItem",vt="menu.itemSelect",Ee=c.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=c.useRef(null),i=ve(we,t.__scopeMenu),u=tt(we,t.__scopeMenu),d=te(e,s),h=c.useRef(!1),f=()=>{const g=s.current;if(!n&&g){const l=new CustomEvent(vt,{bubbles:!0,cancelable:!0});g.addEventListener(vt,p=>r==null?void 0:r(p),{once:!0}),dr(g,l),l.defaultPrevented?h.current=!1:i.onClose()}};return a.jsx(Qt,{...o,ref:d,disabled:n,onClick:T(t.onClick,f),onPointerDown:g=>{var l;(l=t.onPointerDown)==null||l.call(t,g),h.current=!0},onPointerUp:T(t.onPointerUp,g=>{var l;h.current||(l=g.currentTarget)==null||l.click()}),onKeyDown:T(t.onKeyDown,g=>{const l=u.searchRef.current!=="";n||l&&g.key===" "||qe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Ee.displayName=we;var Qt=c.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,i=tt(we,n),u=qt(n),d=c.useRef(null),h=te(e,d),[f,g]=c.useState(!1),[l,p]=c.useState("");return c.useEffect(()=>{const D=d.current;D&&p((D.textContent??"").trim())},[s.children]),a.jsx(de.ItemSlot,{scope:n,disabled:r,textValue:o??l,children:a.jsx(kr,{asChild:!0,...u,focusable:!r,children:a.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:h,onPointerMove:T(t.onPointerMove,fe(D=>{r?i.onItemLeave(D):(i.onItemEnter(D),D.defaultPrevented||D.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(t.onPointerLeave,fe(D=>i.onItemLeave(D))),onFocus:T(t.onFocus,()=>g(!0)),onBlur:T(t.onBlur,()=>g(!1))})})})}),to="MenuCheckboxItem",Jt=c.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return a.jsx(on,{scope:t.__scopeMenu,checked:n,children:a.jsx(Ee,{role:"menuitemcheckbox","aria-checked":Te(n)?"mixed":n,...o,ref:e,"data-state":st(n),onSelect:T(o.onSelect,()=>r==null?void 0:r(Te(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jt.displayName=to;var en="MenuRadioGroup",[no,ro]=ne(en,{value:void 0,onValueChange:()=>{}}),tn=c.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=be(r);return a.jsx(no,{scope:t.__scopeMenu,value:n,onValueChange:s,children:a.jsx(rt,{...o,ref:e})})});tn.displayName=en;var nn="MenuRadioItem",rn=c.forwardRef((t,e)=>{const{value:n,...r}=t,o=ro(nn,t.__scopeMenu),s=n===o.value;return a.jsx(on,{scope:t.__scopeMenu,checked:s,children:a.jsx(Ee,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":st(s),onSelect:T(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});rn.displayName=nn;var ot="MenuItemIndicator",[on,oo]=ne(ot,{checked:!1}),sn=c.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=oo(ot,n);return a.jsx(he,{present:r||Te(s.checked)||s.checked===!0,children:a.jsx(Z.span,{...o,ref:e,"data-state":st(s.checked)})})});sn.displayName=ot;var so="MenuSeparator",an=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});an.displayName=so;var io="MenuArrow",cn=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(ur,{...o,...r,ref:e})});cn.displayName=io;var ao="MenuSub",[Aa,un]=ne(ao),ue="MenuSubTrigger",ln=c.forwardRef((t,e)=>{const n=re(ue,t.__scopeMenu),r=ve(ue,t.__scopeMenu),o=un(ue,t.__scopeMenu),s=tt(ue,t.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=s,h={__scopeMenu:t.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),d(null)}},[u,d]),a.jsx(Je,{asChild:!0,...h,children:a.jsx(Qt,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gn(n.open),...t,ref:lr(e,o.onTriggerChange),onClick:g=>{var l;(l=t.onClick)==null||l.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(t.onPointerMove,fe(g=>{s.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:T(t.onPointerLeave,fe(g=>{var p,D;f();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const S=(D=n.content)==null?void 0:D.dataset.side,x=S==="right",w=x?-5:5,I=l[x?"left":"right"],b=l[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:g.clientX+w,y:g.clientY},{x:I,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x:I,y:l.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(g),g.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(t.onKeyDown,g=>{var p;const l=s.searchRef.current!=="";t.disabled||l&&g.key===" "||Gr[r.dir].includes(g.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),g.preventDefault())})})})});ln.displayName=ue;var dn="MenuSubContent",fn=c.forwardRef((t,e)=>{const n=Yt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu),u=un(dn,t.__scopeMenu),d=c.useRef(null),h=te(e,d);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:a.jsx(nt,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:h,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var g;i.isUsingKeyboardRef.current&&((g=d.current)==null||g.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:T(t.onFocusOutside,f=>{f.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(t.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:T(t.onKeyDown,f=>{var p;const g=f.currentTarget.contains(f.target),l=$r[i.dir].includes(f.key);g&&l&&(s.onOpenChange(!1),(p=u.trigger)==null||p.focus(),f.preventDefault())})})})})})});fn.displayName=dn;function gn(t){return t?"open":"closed"}function Te(t){return t==="indeterminate"}function st(t){return Te(t)?"indeterminate":t?"checked":"unchecked"}function co(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function uo(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function lo(t,e,n){const o=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=uo(t,Math.max(s,0));o.length===1&&(i=i.filter(h=>h!==n));const d=i.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function fo(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const u=e[s],d=e[i],h=u.x,f=u.y,g=d.x,l=d.y;f>r!=l>r&&n<(g-h)*(r-f)/(l-f)+h&&(o=!o)}return o}function go(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return fo(n,e)}function fe(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ho=Wt,po=Je,mo=Xt,vo=zt,xo=rt,Do=Zt,Co=Ee,So=Jt,yo=tn,wo=rn,To=sn,bo=an,Io=cn,Oo=ln,Eo=fn,it="ContextMenu",[Mo,ja]=Qe(it,[Vt]),F=Vt(),[Ro,hn]=Mo(it),pn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[i,u]=c.useState(!1),d=F(e),h=be(r),f=c.useCallback(g=>{u(g),h(g)},[h]);return a.jsx(Ro,{scope:e,open:i,onOpenChange:f,modal:s,children:a.jsx(ho,{...d,dir:o,open:i,onOpenChange:f,modal:s,children:n})})};pn.displayName=it;var mn="ContextMenuTrigger",vn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=hn(mn,n),i=F(n),u=c.useRef({x:0,y:0}),d=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),h=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(h.current),[]),g=l=>{u.current={x:l.clientX,y:l.clientY},s.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),a.jsxs(a.Fragment,{children:[a.jsx(po,{...i,virtualRef:d}),a.jsx(Z.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:T(t.onContextMenu,l=>{f(),g(l),l.preventDefault()}),onPointerDown:r?t.onPointerDown:T(t.onPointerDown,De(l=>{f(),h.current=window.setTimeout(()=>g(l),700)})),onPointerMove:r?t.onPointerMove:T(t.onPointerMove,De(f)),onPointerCancel:r?t.onPointerCancel:T(t.onPointerCancel,De(f)),onPointerUp:r?t.onPointerUp:T(t.onPointerUp,De(f))})]})});vn.displayName=mn;var Po="ContextMenuPortal",xn=t=>{const{__scopeContextMenu:e,...n}=t,r=F(e);return a.jsx(mo,{...r,...n})};xn.displayName=Po;var Dn="ContextMenuContent",Cn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=hn(Dn,n),s=F(n),i=c.useRef(!1);return a.jsx(vo,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var d;(d=t.onCloseAutoFocus)==null||d.call(t,u),!u.defaultPrevented&&i.current&&u.preventDefault(),i.current=!1},onInteractOutside:u=>{var d;(d=t.onInteractOutside)==null||d.call(t,u),!u.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cn.displayName=Dn;var No="ContextMenuGroup",_o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(xo,{...o,...r,ref:e})});_o.displayName=No;var Ao="ContextMenuLabel",jo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Do,{...o,...r,ref:e})});jo.displayName=Ao;var Fo="ContextMenuItem",Sn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Co,{...o,...r,ref:e})});Sn.displayName=Fo;var Lo="ContextMenuCheckboxItem",ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(So,{...o,...r,ref:e})});ko.displayName=Lo;var Uo="ContextMenuRadioGroup",Ho=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(yo,{...o,...r,ref:e})});Ho.displayName=Uo;var Go="ContextMenuRadioItem",$o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(wo,{...o,...r,ref:e})});$o.displayName=Go;var Bo="ContextMenuItemIndicator",Ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(To,{...o,...r,ref:e})});Ko.displayName=Bo;var Vo="ContextMenuSeparator",yn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(bo,{...o,...r,ref:e})});yn.displayName=Vo;var qo="ContextMenuArrow",Wo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Io,{...o,...r,ref:e})});Wo.displayName=qo;var Yo="ContextMenuSubTrigger",Xo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Oo,{...o,...r,ref:e})});Xo.displayName=Yo;var zo="ContextMenuSubContent",Zo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Eo,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=zo;function De(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Qo=pn,Jo=vn,es=xn,ts=Cn,Y=Sn,xt=yn;const wn=c.createContext({dragDropManager:void 0});function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},St={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct()};function ns(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Tn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(G(1));return n(Tn)(t,e)}if(typeof t!="function")throw new Error(G(2));var o=t,s=e,i=[],u=i,d=!1;function h(){u===i&&(u=i.slice())}function f(){if(d)throw new Error(G(3));return s}function g(S){if(typeof S!="function")throw new Error(G(4));if(d)throw new Error(G(5));var x=!0;return h(),u.push(S),function(){if(x){if(d)throw new Error(G(6));x=!1,h();var I=u.indexOf(S);u.splice(I,1),i=null}}}function l(S){if(!ns(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(d)throw new Error(G(9));try{d=!0,s=o(s,S)}finally{d=!1}for(var x=i=u,w=0;w<x.length;w++){var I=x[w];I()}return S}function p(S){if(typeof S!="function")throw new Error(G(10));o=S,l({type:St.REPLACE})}function D(){var S,x=g;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(G(11));function b(){I.next&&I.next(f())}b();var M=x(b);return{unsubscribe:M}}},S[Dt]=function(){return this},S}return l({type:St.INIT}),r={dispatch:l,subscribe:g,getState:f,replaceReducer:p},r[Dt]=D,r}function y(t,e,...n){if(rs()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return n[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function rs(){return typeof process<"u"&&!0}function os(t,e,n){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:n||null,t)}function ss(t,e){return t.filter(n=>n!==e)}function bn(t){return typeof t=="object"}function is(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const o=[];return n.forEach((s,i)=>{s===1&&o.push(i)}),o}function as(t,e){return t.filter(n=>e.indexOf(n)>-1)}const at="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",ct="dnd-core/PUBLISH_DRAG_SOURCE",Re="dnd-core/HOVER",Pe="dnd-core/DROP",Ne="dnd-core/END_DRAG";function yt(t,e){return{type:at,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const cs={type:at,payload:{clientOffset:null,sourceClientOffset:null}};function us(t){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:i}=r,u=t.getMonitor(),d=t.getRegistry();t.dispatch(yt(s)),ls(n,u,d);const h=gs(n,u);if(h==null){t.dispatch(cs);return}let f=null;if(s){if(!i)throw new Error("getSourceClientOffset must be defined");ds(i),f=i(h)}t.dispatch(yt(s,f));const l=d.getSource(h).beginDrag(u,h);if(l==null)return;fs(l),d.pinSource(h);const p=d.getSourceType(h);return{type:Me,payload:{itemType:p,item:l,sourceId:h,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function ls(t,e,n){y(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){y(n.getSource(r),"Expected sourceIds to be registered.")})}function ds(t){y(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function fs(t){y(bn(t),"Item must be an object.")}function gs(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function hs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ps(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){hs(t,o,n[o])})}return t}function ms(t){return function(n={}){const r=t.getMonitor(),o=t.getRegistry();vs(r),Cs(r).forEach((i,u)=>{const d=xs(i,u,o,r),h={type:Pe,payload:{dropResult:ps({},n,d)}};t.dispatch(h)})}}function vs(t){y(t.isDragging(),"Cannot call drop while not dragging."),y(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function xs(t,e,n,r){const o=n.getTarget(t);let s=o?o.drop(r,t):void 0;return Ds(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function Ds(t){y(typeof t>"u"||bn(t),"Drop result must either be an object or undefined.")}function Cs(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Ss(t){return function(){const n=t.getMonitor(),r=t.getRegistry();ys(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:Ne}}}function ys(t){y(t.isDragging(),"Cannot call endDrag while not dragging.")}function We(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function ws(t){return function(n,{clientOffset:r}={}){Ts(n);const o=n.slice(0),s=t.getMonitor(),i=t.getRegistry(),u=s.getItemType();return Is(o,i,u),bs(o,s,i),Os(o,s,i),{type:Re,payload:{targetIds:o,clientOffset:r||null}}}}function Ts(t){y(Array.isArray(t),"Expected targetIds to be an array.")}function bs(t,e,n){y(e.isDragging(),"Cannot call hover while not dragging."),y(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const o=t[r];y(t.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(o);y(s,"Expected targetIds to be registered.")}}function Is(t,e,n){for(let r=t.length-1;r>=0;r--){const o=t[r],s=e.getTargetType(o);We(s,n)||t.splice(r,1)}}function Os(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Es(t){return function(){if(t.getMonitor().isDragging())return{type:ct}}}function Ms(t){return{beginDrag:us(t),publishDragSource:Es(t),hover:ws(t),drop:ms(t),endDrag:Ss(t)}}class Rs{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...i)=>{const u=s.apply(e,i);typeof u<"u"&&n(u)}}const o=Ms(this);return Object.keys(o).reduce((s,i)=>{const u=o[i];return s[i]=r(u),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Ps(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ns(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Ps(e,r),n)}function _s(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const le=[],ut=[];le.__IS_NONE__=!0;ut.__IS_ALL__=!0;function As(t,e){return t===le?!1:t===ut||typeof e>"u"?!0:as(e,t).length>0}class js{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;y(typeof e=="function","listener must be a function."),y(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const i=this.store.getState(),u=i.stateId;try{u===o||u===o+1&&!As(i.dirtyHandlerIds,r)||e()}finally{o=u}};return this.store.subscribe(s)}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return y(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(y(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return We(r,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(y(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!We(o,s))return!1;const i=this.getTargetIds();if(!i.length)return!1;const u=i.indexOf(e);return r?u===i.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ns(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _s(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const wt=typeof global<"u"?global:self,On=wt.MutationObserver||wt.WebKitMutationObserver;function En(t){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),t()}}}function Fs(t){let e=1;const n=new On(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ls=typeof On=="function"?Fs:En;class ks{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ls(this.flush),this.requestErrorThrow=En(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Us{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Hs{create(e){const n=this.freeTasks,r=n.length?n.pop():new Us(this.onError,o=>n[n.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mn=new ks,Gs=new Hs(Mn.registerPendingError);function $s(t){Mn.enqueueTask(Gs.create(t))}const lt="dnd-core/ADD_SOURCE",dt="dnd-core/ADD_TARGET",ft="dnd-core/REMOVE_SOURCE",_e="dnd-core/REMOVE_TARGET";function Bs(t){return{type:lt,payload:{sourceId:t}}}function Ks(t){return{type:dt,payload:{targetId:t}}}function Vs(t){return{type:ft,payload:{sourceId:t}}}function qs(t){return{type:_e,payload:{targetId:t}}}function Ws(t){y(typeof t.canDrag=="function","Expected canDrag to be a function."),y(typeof t.beginDrag=="function","Expected beginDrag to be a function."),y(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Ys(t){y(typeof t.canDrop=="function","Expected canDrop to be a function."),y(typeof t.hover=="function","Expected hover to be a function."),y(typeof t.drop=="function","Expected beginDrag to be a function.")}function Ye(t,e){if(e&&Array.isArray(t)){t.forEach(n=>Ye(n,!1));return}y(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($||($={}));let Xs=0;function zs(){return Xs++}function Zs(t){const e=zs().toString();switch(t){case $.SOURCE:return`S${e}`;case $.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Tt(t){switch(t[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function bt(t,e){const n=t.entries();let r=!1;do{const{done:o,value:[,s]}=n.next();if(s===e)return!0;r=!!o}while(!r);return!1}class Qs{addSource(e,n){Ye(e),Ws(n);const r=this.addHandler($.SOURCE,e,n);return this.store.dispatch(Bs(r)),r}addTarget(e,n){Ye(e,!0),Ys(n);const r=this.addHandler($.TARGET,e,n);return this.store.dispatch(Ks(r)),r}containsHandler(e){return bt(this.dragSources,e)||bt(this.dropTargets,e)}getSource(e,n=!1){return y(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Tt(e)===$.SOURCE}isTargetId(e){return Tt(e)===$.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(Vs(e)),$s(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(qs(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);y(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const o=Zs(e);return this.types.set(o,n),e===$.SOURCE?this.dragSources.set(o,r):e===$.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Js=(t,e)=>t===e;function ei(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ti(t,e,n=Js){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function ni(t=le,e){switch(e.type){case Re:break;case lt:case dt:case _e:case ft:return le;case Me:case ct:case Ne:case Pe:default:return ut}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,o=is(n,r);if(!(o.length>0||!ti(n,r)))return le;const i=r[r.length-1],u=n[n.length-1];return i!==u&&(i&&o.push(i),u&&o.push(u)),o}function ri(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ri(t,o,n[o])})}return t}const It={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function si(t=It,e){const{payload:n}=e;switch(e.type){case at:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Re:return ei(t.clientOffset,n.clientOffset)?t:oi({},t,{clientOffset:n.clientOffset});case Ne:case Pe:return It;default:return t}}function ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ae(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ii(t,o,n[o])})}return t}const ai={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ci(t=ai,e){const{payload:n}=e;switch(e.type){case Me:return ae({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ct:return ae({},t,{isSourcePublic:!0});case Re:return ae({},t,{targetIds:n.targetIds});case _e:return t.targetIds.indexOf(n.targetId)===-1?t:ae({},t,{targetIds:ss(t.targetIds,n.targetId)});case Pe:return ae({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ne:return ae({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function ui(t=0,e){switch(e.type){case lt:case dt:return t+1;case ft:case _e:return t-1;default:return t}}function li(t=0){return t+1}function di(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){di(t,o,n[o])})}return t}function gi(t={},e){return{dirtyHandlerIds:ni(t.dirtyHandlerIds,{type:e.type,payload:fi({},e.payload,{prevTargetIds:os(t,"dragOperation.targetIds",[])})}),dragOffset:si(t.dragOffset,e),refCount:ui(t.refCount,e),dragOperation:ci(t.dragOperation,e),stateId:li(t.stateId)}}function hi(t,e=void 0,n={},r=!1){const o=pi(r),s=new js(o,new Qs(o)),i=new Rs(o,s),u=t(i,e,n);return i.receiveBackend(u),i}function pi(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tn(gi,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function mi(t,e){if(t==null)return{};var n=vi(t,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vi(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}let Ot=0;const ye=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xi=c.memo(function(e){var{children:n}=e,r=mi(e,["children"]);const[o,s]=Di(r);return c.useEffect(()=>{if(s){const i=Rn();return++Ot,()=>{--Ot===0&&(i[ye]=null)}}},[]),a.jsx(wn.Provider,{value:o,children:n})});function Di(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ci(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Ci(t,e=Rn(),n,r){const o=e;return o[ye]||(o[ye]={dragDropManager:hi(t,e,n,r)}),o[ye]}function Rn(){return typeof global<"u"?global:window}var ke,Et;function Si(){return Et||(Et=1,ke=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),ke}var yi=Si();const wi=Kn(yi),J=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Pn(t,e,n){const[r,o]=c.useState(()=>e(t)),s=c.useCallback(()=>{const i=e(t);wi(r,i)||(o(i),n&&n())},[r,t,n]);return J(s),[r,s]}function Ti(t,e,n){const[r,o]=Pn(t,e,n);return J(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(o,{handlerIds:[i]})},[t,o]),r}function Nn(t,e,n){return Ti(e,t||(()=>({})),()=>n.reconnect())}function _n(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),c.useMemo(()=>typeof t=="function"?t():t,n)}function bi(t){return c.useMemo(()=>t.hooks.dragSource(),[t])}function Ii(t){return c.useMemo(()=>t.hooks.dragPreview(),[t])}let Ue=!1,He=!1;class Oi{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Ue,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ue=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ue=!1}}isDragging(){if(!this.sourceId)return!1;y(!He,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return He=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{He=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ge=!1;class Ei{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;y(!Ge,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ge=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ge=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Mi(t,e,n){const r=n.getRegistry(),o=r.addTarget(t,e);return[o,()=>r.removeTarget(o)]}function Ri(t,e,n){const r=n.getRegistry(),o=r.addSource(t,e);return[o,()=>r.removeSource(o)]}function Xe(t,e,n,r){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;const u=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const h=s[d];if(!u(h))return!1;const f=t[h],g=e[h];if(o=void 0,o===!1||o===void 0&&f!==g)return!1}return!0}function ze(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Pi(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ni(t){return(e=null,n=null)=>{if(!c.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return Pi(r),_i(r,n?s=>t(s,n):t)}}function An(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Ni(r);e[n]=()=>o}}),e}function Mt(t,e){typeof t=="function"?t(e):t.current=e}function _i(t,e){const n=t.ref;return y(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?c.cloneElement(t,{ref:r=>{Mt(n,r),Mt(e,r)}}):c.cloneElement(t,{ref:e})}class Ai{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Xe(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Xe(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=An({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,ze(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,ze(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ji{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Xe(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=An({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,ze(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function oe(){const{dragDropManager:t}=c.useContext(wn);return y(t!=null,"Expected drag drop context"),t}function Fi(t,e){const n=oe(),r=c.useMemo(()=>new Ai(n.getBackend()),[n]);return J(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),J(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Li(){const t=oe();return c.useMemo(()=>new Oi(t),[t])}class ki{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:o}=e;o&&o(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Ui(t,e,n){const r=c.useMemo(()=>new ki(t,e,n),[e,n]);return c.useEffect(()=>{r.spec=t},[t]),r}function Hi(t){return c.useMemo(()=>{const e=t.type;return y(e!=null,"spec.type must be defined"),e},[t])}function Gi(t,e,n){const r=oe(),o=Ui(t,e,n),s=Hi(t);J(function(){if(s!=null){const[u,d]=Ri(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d}},[r,e,n,o,s])}function jn(t,e){const n=_n(t,e);y(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Li(),o=Fi(n.options,n.previewOptions);return Gi(n,r,o),[Nn(n.collect,r,o),bi(o),Ii(o)]}function $i(t){const n=oe().getMonitor(),[r,o]=Pn(n,t);return c.useEffect(()=>n.subscribeToOffsetChange(o)),c.useEffect(()=>n.subscribeToStateChange(o)),r}function Bi(t){return c.useMemo(()=>t.hooks.dropTarget(),[t])}function Ki(t){const e=oe(),n=c.useMemo(()=>new ji(e.getBackend()),[e]);return J(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Vi(){const t=oe();return c.useMemo(()=>new Ei(t),[t])}function qi(t){const{accept:e}=t;return c.useMemo(()=>(y(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Wi{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Yi(t,e){const n=c.useMemo(()=>new Wi(t,e),[e]);return c.useEffect(()=>{n.spec=t},[t]),n}function Xi(t,e,n){const r=oe(),o=Yi(t,e),s=qi(t);J(function(){const[u,d]=Mi(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d},[r,e,o,n,s.map(i=>i.toString()).join("|")])}function zi(t,e){const n=_n(t,e),r=Vi(),o=Ki(n.options);return Xi(n,r,o),[Nn(n.collect,r,o),Bi(o)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function Zi(t,e){return t.filter(n=>n!==e)}function Qi(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const o=[];return n.forEach(s=>o.push(s)),o}class Ji{enter(e){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=Qi(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Zi(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ea{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Ln="__NATIVE_FILE__",kn="__NATIVE_URL__",Un="__NATIVE_TEXT__",Hn="__NATIVE_HTML__",Rt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ln,HTML:Hn,TEXT:Un,URL:kn},Symbol.toStringTag,{value:"Module"}));function $e(t,e,n){const r=e.reduce((o,s)=>o||t.getData(s),"");return r??n}const Ze={[Ln]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Hn]:{exposeProperties:{html:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[kn]:{exposeProperties:{urls:(t,e)=>$e(t,e,"").split(`
|
|
2
|
-
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Un]:{exposeProperties:{text:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function ta(t,e){const n=Ze[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new ea(n);return r.loadDataTransfer(e),r}function Be(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ze).filter(n=>{const r=Ze[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const na=Fn(()=>/firefox/i.test(navigator.userAgent)),Gn=Fn(()=>!!window.safari);class Pt{interpolate(e){const{xs:n,ys:r,c1s:o,c2s:s,c3s:i}=this;let u=n.length-1;if(e===n[u])return r[u];let d=0,h=i.length-1,f;for(;d<=h;){f=Math.floor(.5*(d+h));const p=n[f];if(p<e)d=f+1;else if(p>e)h=f-1;else return r[f]}u=Math.max(0,h);const g=e-n[u],l=g*g;return r[u]+o[u]*g+s[u]*l+i[u]*g*l}constructor(e,n){const{length:r}=e,o=[];for(let p=0;p<r;p++)o.push(p);o.sort((p,D)=>e[p]<e[D]?-1:1);const s=[],i=[];let u,d;for(let p=0;p<r-1;p++)u=e[p+1]-e[p],d=n[p+1]-n[p],s.push(u),i.push(d/u);const h=[i[0]];for(let p=0;p<s.length-1;p++){const D=i[p],S=i[p+1];if(D*S<=0)h.push(0);else{u=s[p];const x=s[p+1],w=u+x;h.push(3*w/((w+x)/D+(w+u)/S))}}h.push(i[i.length-1]);const f=[],g=[];let l;for(let p=0;p<h.length-1;p++){l=i[p];const D=h[p],S=1/s[p],x=D+h[p+1]-l-l;f.push((l-D-x)*S),g.push(x*S*S)}this.xs=e,this.ys=n,this.c1s=h,this.c2s=f,this.c3s=g}}const ra=1;function $n(t){const e=t.nodeType===ra?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Ce(t){return{x:t.clientX,y:t.clientY}}function oa(t){var e;return t.nodeName==="IMG"&&(na()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function sa(t,e,n,r){let o=t?e.width:n,s=t?e.height:r;return Gn()&&t&&(s/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:s}}function ia(t,e,n,r,o){const s=oa(e),u=$n(s?t:e),d={x:n.x-u.x,y:n.y-u.y},{offsetWidth:h,offsetHeight:f}=t,{anchorX:g,anchorY:l}=r,{dragPreviewWidth:p,dragPreviewHeight:D}=sa(s,e,h,f),S=()=>{let V=new Pt([0,.5,1],[d.y,d.y/f*D,d.y+D-f]).interpolate(l);return Gn()&&s&&(V+=(window.devicePixelRatio-1)*D),V},x=()=>new Pt([0,.5,1],[d.x,d.x/h*p,d.x+p-h]).interpolate(g),{offsetX:w,offsetY:I}=o,b=w===0||w,M=I===0||I;return{x:b?w:x(),y:M?I:S()}}class aa{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ca(t,o,n[o])})}return t}class ua{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const o=i=>this.handleDragStart(i,e),s=i=>this.handleSelectStart(i);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=i=>this.handleDragEnter(i,e),o=i=>this.handleDragOver(i,e),s=i=>this.handleDrop(i,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Nt({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Nt({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Rt).some(n=>Rt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=ta(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&$n(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const i=Ce(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:u}=o,d=Be(u);if(this.monitor.isDragging()){if(u&&typeof u.setDragImage=="function"){const f=this.monitor.getSourceId(),g=this.sourceNodes.get(f),l=this.sourcePreviewNodes.get(f)||g;if(l){const{anchorX:p,anchorY:D,offsetX:S,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),b=ia(g,l,i,{anchorX:p,anchorY:D},{offsetX:S,offsetY:x});u.setDragImage(l,b.x,b.y)}}try{u==null||u.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:h}=this.getCurrentSourcePreviewNodeOptions();h?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(u&&!u.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:u}=o,d=Be(u);d&&this.beginDragNativeItem(d,u)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:Ce(o)}),s.some(u=>this.monitor.canDropOnTarget(u))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=Ce(o),this.scheduleHover(s),(s||[]).some(u=>this.monitor.canDropOnTarget(u))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else Be(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:Ce(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new aa(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Ji(this.isNodeInDocument)}}let Se;function Bn(){return Se||(Se=new Image,Se.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Se}const la=function(e,n,r){return new ua(e,n,r)};function ee({file:t,className:e,style:n}){const r=N(C=>C.selectedFile),o=N(C=>C.setSelectedFile),s=N(C=>C.activeRange),i=N(C=>C.setActiveRange),u=N(C=>C.inActiveRange),d=Fe(C=>C.addTab),h=Fe(C=>C.selectTab),f=Fe(C=>C.createTab),[g,l]=c.useState(!1),p=Lt(()=>l(!0),{threshold:50,onFinish(){l(!1)},onCancel(){l(!1)}}),{setArtifactRename:D,renameArtifact:S,artifactRename:x,selectArtifactsInRange:w,removeArtifactWithConfirmation:I}=Ie(),[b,M]=c.useState(!1),[{isDragging:K},V,A]=jn(()=>({type:"artifact",item:t,end(){l(!1)},canDrag(){return x!==t&&g},collect(C){return{isDragging:C.isDragging()}}}),[t,x,g]);c.useEffect(()=>{A(Bn(),{captureDraggingState:!0})},[A]);function R(C){C.stopPropagation(),C.shiftKey&&C.preventDefault();let E=s;C.metaKey?(u(t)?E=E.filter(X=>X!==t):E.push(t),i(E)):C.shiftKey&&E.length>0?w(t):(E.length>0&&(E=[]),E.push(t),i(E),o(t))}function j(){const C=f(t);d(C),h(C)}const L=s.length>1&&u(t);return a.jsx("div",{...p,ref:V,children:a.jsxs(k.Container,{artifact:t,isSelected:r===t,className:P(x===t&&"bg-primary-10",b&&"bg-primary-10",g&&"bg-primary-10 !cursor-grabbing outline-2 !outline-primary-500",K&&"opacity-50",e),style:n,onDoubleClick:C=>{C.stopPropagation(),j()},handleSelect:R,children:[a.jsx(ee.Icons,{}),x===t?a.jsx(k.Rename,{artifact:x,rename:S,close:()=>D(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(ee.Display,{file:t})}),onOpenChange:M,children:[r!==t&&a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),j()},children:["Open in New Tab",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),D(t)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(Y,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:C=>{C.stopPropagation(),I(t)},children:["Remove ",u(t)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})})}function da({file:t}){return a.jsx("span",{title:t.name,className:P("inline-block overflow-hidden overflow-ellipsis py-[0.125rem]"),children:_t(t.name,50,20)})}function fa(){return a.jsx("div",{className:"flex items-center",children:a.jsx(Dr,{className:"inline-block w-3 ml-1 mr-2"})})}ee.Display=da;ee.Icons=fa;const ge=function t({directory:e,className:n,style:r}){const o=N(v=>v.selectedFile),s=N(v=>v.activeRange),i=N(v=>v.setActiveRange),u=N(v=>v.inActiveRange),[d,h]=c.useState(e.isOpened),[f,g]=c.useState(!1),[l,p]=c.useState(!1),D=Lt(()=>p(!0),{threshold:50,onFinish(){p(!1)},onCancel(){p(!1)}}),{setArtifactRename:S,renameArtifact:x,artifactRename:w,createDirectory:I,createFile:b,moveArtifacts:M,removeArtifactWithConfirmation:K,selectArtifactsInRange:V}=Ie(),[{isOver:A},R]=zi(()=>({accept:"artifact",drop(v,m){if(H(m.canDrop()))return;const O=u(v)?s:[v];M(O,e),e.open()},canDrop(v,m){const O=u(v)?s:[v];return m.isOver({shallow:!0})&&qn(O)&&O.reduce((_,U)=>!(H(_)||U.parent===e||U===e||U instanceof Ke&&U.hasDirectory(e)),!0)},collect(v){return{isOver:v.isOver({shallow:!0})&&v.canDrop()}}}),[s]),[{isDragging:j},L,C]=jn(()=>({type:"artifact",item:e,end(){p(!1)},canDrag(){return w!==e&&l},collect(v){return{isDragging:v.isDragging()}}}),[e,w,l]),[E,X,Q,se]=c.useMemo(()=>{if(s.length<2)return[!1,!1,!1,!1];let v=!0,m=!0,O=!0;for(const _ of Array.from(s))_ instanceof Ke&&v?(m&&(m=_.isOpened),O&&(O=_.isClosed)):v=!1;return[v,m,O,H(m)&&H(O)]},[s]);c.useEffect(()=>{e.syncStateOpen=h},[e]),c.useEffect(()=>{C(Bn(),{captureDraggingState:!0})},[C]),c.useEffect(()=>{Vn(o)||d||e.hasFile(o)&&e.open()},[o]);function q(v){v.stopPropagation(),v.shiftKey||v.metaKey?v.preventDefault():e.toggle();let m=s;v.metaKey?(u(e)?m=m.filter(O=>O!==e):m.push(e),i(m)):v.shiftKey&&m.length>0?V(e):(m.length>0&&(m=[]),m.push(e),i(m))}const W=s.length>1&&u(e);return a.jsx("div",{className:P("h-full",j&&"opacity-50"),children:a.jsxs("div",{ref:R,className:P(A&&H(j)&&"bg-primary-5"),children:[e.withParent&&a.jsx("div",{...D,ref:e.withParent?L:void 0,children:a.jsxs(k.Container,{artifact:e,className:P(w===e&&"bg-primary-10",l&&"bg-primary-10 !cursor-grabbing",f&&"bg-primary-10",n),style:r,handleSelect:q,children:[a.jsx(t.Icons,{isOpen:d||A&&H(j)}),w===e?a.jsx(k.Rename,{artifact:w,rename:x,close:()=>S(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(t.Display,{directory:e})}),onOpenChange:g,children:[a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",W&&H(E)?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:W&&H(E),onSelect:v=>{v.stopPropagation(),s.length>1&&u(e)?s.forEach(m=>{X?m.collapse():Q?m.expand():se&&(m.isOpened?m.collapse():m.expand())}):e.isOpened?e.collapse():e.expand(),i([])},children:[E&&X&&"Collapse All",E&&Q&&"Expand All",E&&se&&"Toggle All",H(E)&&e.isOpened&&"Collapse",H(E)&&e.isClosed&&"Expand",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",W?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:W,onSelect:v=>{v.stopPropagation(),b(e)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",W?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:W,onSelect:v=>{v.stopPropagation(),I(e)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(Y,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",W?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:W,onClick:v=>{v.stopPropagation()},onSelect:v=>{v.stopPropagation(),S(e)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(Y,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:v=>{v.stopPropagation(),K(e)},children:["Remove ",u(e)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})}),(A&&H(j)||d||!e.withParent)&&e.withDirectories&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.directories.map(v=>a.jsx("li",{title:v.name,children:a.jsx(t,{directory:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))}),(A&&H(j)||d||!e.withParent)&&e.withFiles&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.files.map(v=>a.jsx("li",{title:v.name,children:a.jsx(ee,{file:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))})]})})};function ga({directory:t}){return a.jsxs("div",{className:"w-full flex justify-between items-center py-[0.125rem]",children:[a.jsx("span",{title:t.name,className:"overflow-hidden overflow-ellipsis whitespace-nowrap",children:_t(t.name,50,20)}),a.jsx("span",{className:"inline-block text-xs rounded-full px-2 bg-neutral-10 ml-2",children:t.directories.length+t.files.length})]})}function ha({hasChevron:t=!0,hasFolder:e=!0,isOpen:n=!1,className:r}){const o=n?mr:vr,s=n?Sr:wr;return a.jsxs("div",{className:P("flex items-center mr-2",r),children:[t&&a.jsx(o,{className:"inline-block w-5"}),e&&a.jsx(s,{className:"inline-block w-4 fill-primary-500"})]})}ge.Icons=ha;ge.Display=ga;const pa={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function ma(){const t=N(i=>i.activeRange),e=N(i=>i.inActiveRange),{isDragging:n,currentOffset:r,artifact:o}=$i(i=>({artifact:i.getItem(),isDragging:i.isDragging(),currentOffset:i.getSourceClientOffset()})),s=c.useMemo(()=>Array.from(e(o)?t:new Set([o])).filter(Boolean),[t,o]);return a.jsx(a.Fragment,{children:n&&a.jsx("div",{style:pa,children:a.jsx("div",{style:va(r),className:"!cursor-grabbing !rounded-lg overflow-hidden",children:s.map(i=>a.jsxs("span",{children:[i instanceof Ke&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ge.Icons,{hasChevron:!1}),a.jsx(ge.Display,{directory:i})]},i.path),i instanceof hr&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ee.Icons,{}),a.jsx(ee.Display,{file:i})]},i.path)]},i.id))})})})}function va(t){if(t==null)return{display:"none"};const{x:e,y:n}=t;return{display:"inline-block",transform:`translate(${e}px, ${n}px)`,filter:"drop-shadow(0 2px 12px rgba(0,0,0,0.45))"}}const k=function t({className:e}){const n=N(l=>l.project),r=N(l=>l.setSelectedFile),o=N(l=>l.activeRange),s=N(l=>l.setActiveRange),i=Wn(l=>l.addConfirmation),{isFetching:u}=Yn(),{removeArtifacts:d,createDirectory:h,createFile:f}=Ie();function g(l){l.key==="Escape"&&s([]),l.ctrlKey&&l.key==="Backspace"&&o.length>0&&i({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${o.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:Array.from(o).map(p=>p.path),action:()=>{d(o)}})}return a.jsx("div",{tabIndex:0,className:P("flex flex-col w-full h-full overflow-hidden text-sm text-neutral-500 dark:text-neutral-400 font-regular select-none",e),onKeyDown:g,children:u?a.jsx("div",{className:"flex justify-center items-center w-full h-full",children:a.jsxs(Xn,{className:"inline-block",children:[a.jsx(zn,{className:"w-3 h-3 border border-neutral-10 mr-2"}),a.jsx("h3",{className:"text-md",children:"Getting Project Files..."})]})}):a.jsxs(a.Fragment,{children:[a.jsx(pr,{list:n.allFiles,searchBy:"path",displayBy:"name",size:Zn.sm,onSelect:r,direction:"top",isFullWidth:!0}),a.jsxs(t.ContextMenu,{trigger:a.jsx(t.ContextMenuTrigger,{className:"h-full pb-1",children:a.jsx(xi,{backend:la,children:a.jsxs("div",{className:"w-full relative h-full px-1 overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:[a.jsx(ma,{}),a.jsx(ge,{className:"z-20 relative",directory:n},n.id)]})})}),children:[a.jsxs(Y,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),f(n)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(Y,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),h(n)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]})]},n.id)]})})};function xa({trigger:t,children:e,onOpenChange:n}){return a.jsxs(Qo,{onOpenChange:n,children:[t,a.jsx(es,{children:a.jsx(ts,{className:"bg-light rounded-md overflow-hidden shadow-lg py-2 px-1 z-50",onClick:r=>{r.stopPropagation()},children:e})})]})}function Da({children:t,className:e}){return a.jsx(Jo,{className:P("flex w-full overflow-hidden",e),onContextMenu:n=>{n.stopPropagation()},children:t})}function Ca({artifact:t,rename:e,close:n}){const r=Qn.useRef(null),[o,s]=c.useState("");return c.useEffect(()=>{s(t.name),setTimeout(()=>{var i;(i=r.current)==null||i.focus()},100)},[t]),a.jsx("div",{className:"w-full flex items-center py-[0.125rem] pr-2",children:a.jsx("input",{ref:r,type:"text",className:"w-full overflow-hidden overflow-ellipsis bg-primary-900 text-primary-100",value:o,onInput:i=>{i.stopPropagation(),s(i.target.value)},onBlur:i=>{i.stopPropagation(),n()},onKeyDown:i=>{i.key==="Enter"&&(i.stopPropagation(),o.trim()!==""&&o!==t.name&&e(t,o),n()),i.key==="Escape"&&(i.stopPropagation(),n())}})})}function Sa({artifact:t,children:e,isSelected:n=!1,className:r,style:o,handleSelect:s,onDoubleClick:i}){const{setArtifactRename:u,isBottomGroupInActiveRange:d,isTopGroupInActiveRange:h,isMiddleGroupInActiveRange:f}=Ie(),g=N(p=>p.activeRange),l=N(p=>p.inActiveRange);return a.jsx("span",{tabIndex:0,className:P("w-full flex items-center group/file px-2",r,h(t)?"rounded-t-md":d(t)?"rounded-b-md":f(t)?"":l(t)&&"rounded-md",l(t)&&g.length>1&&g.indexOf(t)<g.length-1?"border-b border-primary-400":"border-b border-transparent",l(t)?"bg-primary-10 dark:bg-primary-20":n&&"rounded-md bg-neutral-10 text-neutral-600 dark:bg-dark-lighter dark:text-primary-500"),style:o,onClick:s,onDoubleClick:i,onKeyDown:p=>{p.key==="Enter"&&(p.stopPropagation(),u(t),s==null||s(p)),p.key===" "&&(p.stopPropagation(),s==null||s(p))},children:e})}k.ContextMenu=xa;k.ContextMenuTrigger=Da;k.Rename=Ca;k.Container=Sa;export{k as default};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{r as a,R as ce,j as S,b as Tr,c as me,f as hn,au as pe,av as vn,aw as Or,m as Q,i as Ut}from"./index-CkIQhGgw.js";import{r as ot,R as Ir}from"./index-COQuzlwN.js";function Nr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const Mr=a.forwardRef(Nr);function Lr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Dr=a.forwardRef(Lr);function _r({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kr=a.forwardRef(_r);function jr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const Fr=a.forwardRef(jr),Br=ce.forwardRef(function({type:t="text",value:n,placeholder:r,className:o,disabled:i=!1,autoFocus:c=!1,onInput:s,onKeyDown:l},u){return n=n??"",S.jsx("input",{ref:u,className:me("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",o),type:t,value:n,placeholder:r,disabled:i,autoFocus:c,readOnly:Tr(!!s),onInput:s,onKeyDown:l})});function zt(e,[t,n]){return Math.min(n,Math.max(t,e))}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mt(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),l=n.length;n=[...n,c];const u=p=>{var w;const{scope:h,children:v,...x}=p,f=((w=h==null?void 0:h[e])==null?void 0:w[l])||s,m=a.useMemo(()=>x,Object.values(x));return S.jsx(f.Provider,{value:m,children:v})};u.displayName=i+"Provider";function d(p,h){var f;const v=((f=h==null?void 0:h[e])==null?void 0:f[l])||s,x=a.useContext(v);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const l=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Wr(o,...t)]}function Wr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(i)[`__scope${u}`];return{...s,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Kt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kt(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kt(e[o],null)}}}}function K(...e){return a.useCallback(Hr(...e),e)}function Qe(e){const t=Vr(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),l=s.find(Ur);if(l){const u=l.props.children,d=s.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return S.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return S.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Vr(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n,c=a.isValidElement(o)?Kr(o):void 0,s=K(c,r);if(a.isValidElement(o)){const l=zr(i,o.props);return o.type!==a.Fragment&&(l.ref=s),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $r=Symbol("radix.slottable");function Ur(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$r}function zr(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]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Kr(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yr(e){const t=e+"CollectionProvider",[n,r]=Mt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:m,children:w}=f,g=ce.useRef(null),y=ce.useRef(new Map).current;return S.jsx(o,{scope:m,itemMap:y,collectionRef:g,children:w})};c.displayName=t;const s=e+"CollectionSlot",l=Qe(s),u=ce.forwardRef((f,m)=>{const{scope:w,children:g}=f,y=i(s,w),b=K(m,y.collectionRef);return S.jsx(l,{ref:b,children:g})});u.displayName=s;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=Qe(d),v=ce.forwardRef((f,m)=>{const{scope:w,children:g,...y}=f,b=ce.useRef(null),C=K(m,b),R=i(d,w);return ce.useEffect(()=>(R.itemMap.set(b,{ref:b,...y}),()=>void R.itemMap.delete(b))),S.jsx(h,{[p]:"",ref:C,children:g})});v.displayName=d;function x(f){const m=i(e+"CollectionConsumer",f);return ce.useCallback(()=>{const g=m.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(m.itemMap.values()).sort((R,E)=>y.indexOf(R.ref.current)-y.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:c,Slot:u,ItemSlot:v},x,r]}var Xr=a.createContext(void 0);function Zr(e){const t=a.useContext(Xr);return e||t||"ltr"}var Gr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U=Gr.reduce((e,t)=>{const n=Qe(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qr(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function xe(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qr(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Jr="DismissableLayer",bt="dismissableLayer.update",eo="dismissableLayer.pointerDownOutside",to="dismissableLayer.focusOutside",Yt,gn=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wn=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...l}=e,u=a.useContext(gn),[d,p]=a.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=a.useState({}),x=K(t,E=>p(E)),f=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(m),g=d?f.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,b=g>=w,C=oo(E=>{const T=E.target,N=[...u.branches].some(I=>I.contains(T));!b||N||(o==null||o(E),c==null||c(E),E.defaultPrevented||s==null||s())},h),R=io(E=>{const T=E.target;[...u.branches].some(I=>I.contains(T))||(i==null||i(E),c==null||c(E),E.defaultPrevented||s==null||s())},h);return Qr(E=>{g===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yt)}},[d,h,n,u]),a.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xt())},[d,u]),a.useEffect(()=>{const E=()=>v({});return document.addEventListener(bt,E),()=>document.removeEventListener(bt,E)},[]),S.jsx(U.div,{...l,ref:x,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,R.onFocusCapture),onBlurCapture:z(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,C.onPointerDownCapture)})});wn.displayName=Jr;var no="DismissableLayerBranch",ro=a.forwardRef((e,t)=>{const n=a.useContext(gn),r=a.useRef(null),o=K(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),S.jsx(U.div,{...e,ref:o})});ro.displayName=no;function oo(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){yn(eo,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function io(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&yn(to,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xt(){const e=new CustomEvent(bt);document.dispatchEvent(e)}function yn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qr(o,i):o.dispatchEvent(i)}var pt=0;function so(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zt()),document.body.insertAdjacentElement("beforeend",e[1]??Zt()),pt++,()=>{pt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pt--}},[])}function Zt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mt="focusScope.autoFocusOnMount",ht="focusScope.autoFocusOnUnmount",Gt={bubbles:!1,cancelable:!0},co="FocusScope",xn=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,l]=a.useState(null),u=xe(o),d=xe(i),p=a.useRef(null),h=K(t,f=>l(f)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let f=function(y){if(v.paused||!s)return;const b=y.target;s.contains(b)?p.current=b:de(p.current,{select:!0})},m=function(y){if(v.paused||!s)return;const b=y.relatedTarget;b!==null&&(s.contains(b)||de(p.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const C of y)C.removedNodes.length>0&&de(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",m);const g=new MutationObserver(w);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",m),g.disconnect()}}},[r,s,v.paused]),a.useEffect(()=>{if(s){Qt.add(v);const f=document.activeElement;if(!s.contains(f)){const w=new CustomEvent(mt,Gt);s.addEventListener(mt,u),s.dispatchEvent(w),w.defaultPrevented||(ao(mo(Sn(s)),{select:!0}),document.activeElement===f&&de(s))}return()=>{s.removeEventListener(mt,u),setTimeout(()=>{const w=new CustomEvent(ht,Gt);s.addEventListener(ht,d),s.dispatchEvent(w),w.defaultPrevented||de(f??document.body,{select:!0}),s.removeEventListener(ht,d),Qt.remove(v)},0)}}},[s,u,d,v]);const x=a.useCallback(f=>{if(!n&&!r||v.paused)return;const m=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(m&&w){const g=f.currentTarget,[y,b]=lo(g);y&&b?!f.shiftKey&&w===b?(f.preventDefault(),n&&de(y,{select:!0})):f.shiftKey&&w===y&&(f.preventDefault(),n&&de(b,{select:!0})):w===g&&f.preventDefault()}},[n,r,v.paused]);return S.jsx(U.div,{tabIndex:-1,...c,ref:h,onKeyDown:x})});xn.displayName=co;function ao(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function lo(e){const t=Sn(e),n=qt(t,e),r=qt(t.reverse(),e);return[n,r]}function Sn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qt(e,t){for(const n of e)if(!uo(n,{upTo:t}))return n}function uo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fo(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fo(e)&&t&&e.select()}}var Qt=po();function po(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jt(e,t),e.unshift(t)},remove(t){var n;e=Jt(e,t),(n=e[0])==null||n.resume()}}}function Jt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mo(e){return e.filter(t=>t.tagName!=="A")}var X=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ho=hn[" useId ".trim().toString()]||(()=>{}),vo=0;function Lt(e){const[t,n]=a.useState(ho());return X(()=>{n(r=>r??String(vo++))},[e]),t?`radix-${t}`:""}const go=["top","right","bottom","left"],he=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,oe=e=>({x:e,y:e}),wo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function Ct(e,t,n){return G(e,he(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function Ne(e){return e.split("-")[1]}function Dt(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}function ae(e){return["top","bottom"].includes(ue(e))?"y":"x"}function kt(e){return Dt(ae(e))}function xo(e,t,n){n===void 0&&(n=!1);const r=Ne(e),o=kt(e),i=_t(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=et(c)),[c,et(c)]}function So(e){const t=et(e);return[Et(e),t,Et(t)]}function Et(e){return e.replace(/start|end/g,t=>yo[t])}function bo(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:c;default:return[]}}function Co(e,t,n,r){const o=Ne(e);let i=bo(ue(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(Et)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>wo[t])}function Eo(e){return{top:0,right:0,bottom:0,left:0,...e}}function bn(e){return typeof e!="number"?Eo(e):{top:e,right:e,bottom:e,left:e}}function tt(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 en(e,t,n){let{reference:r,floating:o}=e;const i=ae(t),c=kt(t),s=_t(c),l=ue(t),u=i==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let v;switch(l){case"top":v={x:d,y:r.y-o.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ne(t)){case"start":v[c]-=h*(n&&u?-1:1);break;case"end":v[c]+=h*(n&&u?-1:1);break}return v}const Ro=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,s=i.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=en(u,r,l),h=r,v={},x=0;for(let f=0;f<s.length;f++){const{name:m,fn:w}=s[f],{x:g,y,data:b,reset:C}=await w({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:u,platform:c,elements:{reference:e,floating:t}});d=g??d,p=y??p,v={...v,[m]:{...v[m],...b}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:p}=en(u,h,l)),f=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:v}};async function We(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=le(t,e),x=bn(v),m=s[h?p==="floating"?"reference":"floating":p],w=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),g=p==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},C=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(w.top-C.top+x.top)/b.y,bottom:(C.bottom-w.bottom+x.bottom)/b.y,left:(w.left-C.left+x.left)/b.x,right:(C.right-w.right+x.right)/b.x}}const Po=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=le(e,t)||{};if(u==null)return{};const p=bn(d),h={x:n,y:r},v=kt(o),x=_t(v),f=await c.getDimensions(u),m=v==="y",w=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=i.reference[x]+i.reference[v]-h[v]-i.floating[x],C=h[v]-i.reference[v],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let E=R?R[y]:0;(!E||!await(c.isElement==null?void 0:c.isElement(R)))&&(E=s.floating[y]||i.floating[x]);const T=b/2-C/2,N=E/2-f[x]/2-1,I=he(p[w],N),W=he(p[g],N),H=I,M=E-f[x]-W,F=E/2-f[x]/2+T,k=Ct(H,F,M),O=!l.arrow&&Ne(o)!=null&&F!==k&&i.reference[x]/2-(F<H?I:W)-f[x]/2<0,L=O?F<H?F-H:F-M:0;return{[v]:h[v]+L,data:{[v]:k,centerOffset:F-k-L,...O&&{alignmentOffset:L}},reset:O}}}),Ao=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:f=!0,...m}=le(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=ue(o),g=ae(s),y=ue(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=h||(y||!f?[et(s)]:So(s)),R=x!=="none";!h&&R&&C.push(...Co(s,f,x,b));const E=[s,...C],T=await We(t,m),N=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(T[w]),p){const k=xo(o,c,b);N.push(T[k[0]],T[k[1]])}if(I=[...I,{placement:o,overflows:N}],!N.every(k=>k<=0)){var W,H;const k=(((W=i.flip)==null?void 0:W.index)||0)+1,O=E[k];if(O){var M;const A=p==="alignment"?g!==ae(O):!1,j=((M=I[0])==null?void 0:M.overflows[0])>0;if(!A||j)return{data:{index:k,overflows:I},reset:{placement:O}}}let L=(H=I.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:H.placement;if(!L)switch(v){case"bestFit":{var F;const A=(F=I.filter(j=>{if(R){const $=ae(j.placement);return $===g||$==="y"}return!0}).map(j=>[j.placement,j.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((j,$)=>j[1]-$[1])[0])==null?void 0:F[0];A&&(L=A);break}case"initialPlacement":L=s;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nn(e){return go.some(t=>e[t]>=0)}const To=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=le(e,t);switch(r){case"referenceHidden":{const i=await We(t,{...o,elementContext:"reference"}),c=tn(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:nn(c)}}}case"escaped":{const i=await We(t,{...o,altBoundary:!0}),c=tn(i,n.floating);return{data:{escapedOffsets:c,escaped:nn(c)}}}default:return{}}}}};async function Oo(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=ue(n),s=Ne(n),l=ae(n)==="y",u=["left","top"].includes(c)?-1:1,d=i&&l?-1:1,p=le(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof x=="number"&&(v=s==="end"?x*-1:x),l?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Io=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:s}=t,l=await Oo(t,e);return c===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},No=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:s={fn:m=>{let{x:w,y:g}=m;return{x:w,y:g}}},...l}=le(e,t),u={x:n,y:r},d=await We(t,l),p=ae(ue(o)),h=Dt(p);let v=u[h],x=u[p];if(i){const m=h==="y"?"top":"left",w=h==="y"?"bottom":"right",g=v+d[m],y=v-d[w];v=Ct(g,v,y)}if(c){const m=p==="y"?"top":"left",w=p==="y"?"bottom":"right",g=x+d[m],y=x-d[w];x=Ct(g,x,y)}const f=s.fn({...t,[h]:v,[p]:x});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[h]:i,[p]:c}}}}}},Mo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=le(e,t),d={x:n,y:r},p=ae(o),h=Dt(p);let v=d[h],x=d[p];const f=le(s,t),m=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const y=h==="y"?"height":"width",b=i.reference[h]-i.floating[y]+m.mainAxis,C=i.reference[h]+i.reference[y]-m.mainAxis;v<b?v=b:v>C&&(v=C)}if(u){var w,g;const y=h==="y"?"width":"height",b=["top","left"].includes(ue(o)),C=i.reference[p]-i.floating[y]+(b&&((w=c.offset)==null?void 0:w[p])||0)+(b?0:m.crossAxis),R=i.reference[p]+i.reference[y]+(b?0:((g=c.offset)==null?void 0:g[p])||0)-(b?m.crossAxis:0);x<C?x=C:x>R&&(x=R)}return{[h]:v,[p]:x}}}},Lo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:s}=t,{apply:l=()=>{},...u}=le(e,t),d=await We(t,u),p=ue(o),h=Ne(o),v=ae(o)==="y",{width:x,height:f}=i.floating;let m,w;p==="top"||p==="bottom"?(m=p,w=h===(await(c.isRTL==null?void 0:c.isRTL(s.floating))?"start":"end")?"left":"right"):(w=p,m=h==="end"?"top":"bottom");const g=f-d.top-d.bottom,y=x-d.left-d.right,b=he(f-d[m],g),C=he(x-d[w],y),R=!t.middlewareData.shift;let E=b,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=g),R&&!h){const I=G(d.left,0),W=G(d.right,0),H=G(d.top,0),M=G(d.bottom,0);v?T=x-2*(I!==0||W!==0?I+W:G(d.left,d.right)):E=f-2*(H!==0||M!==0?H+M:G(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:E});const N=await c.getDimensions(s.floating);return x!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function it(){return typeof window<"u"}function Me(e){return Cn(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function se(e){var t;return(t=(Cn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cn(e){return it()?e instanceof Node||e instanceof q(e).Node:!1}function te(e){return it()?e instanceof Element||e instanceof q(e).Element:!1}function ie(e){return it()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function rn(e){return!it()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ne(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Do(e){return["table","td","th"].includes(Me(e))}function st(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jt(e){const t=Ft(),n=te(e)?ne(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function _o(e){let t=ve(e);for(;ie(t)&&!Ie(t);){if(jt(t))return t;if(st(t))return null;t=ve(t)}return null}function Ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ie(e){return["html","body","#document"].includes(Me(e))}function ne(e){return q(e).getComputedStyle(e)}function ct(e){return te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rn(e)&&e.host||se(e);return rn(t)?t.host:t}function En(e){const t=ve(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ve(t)?t:En(t)}function He(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=En(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=q(o);if(i){const s=Rt(c);return t.concat(c,c.visualViewport||[],Ve(o)?o:[],s&&n?He(s):[])}return t.concat(o,He(o,[],n))}function Rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rn(e){const t=ne(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ie(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,s=Je(n)!==i||Je(r)!==c;return s&&(n=i,r=c),{width:n,height:r,$:s}}function Bt(e){return te(e)?e:e.contextElement}function Te(e){const t=Bt(e);if(!ie(t))return oe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Rn(t);let c=(i?Je(n.width):n.width)/r,s=(i?Je(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!s||!Number.isFinite(s))&&(s=1),{x:c,y:s}}const ko=oe(0);function Pn(e){const t=q(e);return!Ft()||!t.visualViewport?ko:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Bt(e);let c=oe(1);t&&(r?te(r)&&(c=Te(r)):c=Te(e));const s=jo(i,n,r)?Pn(i):oe(0);let l=(o.left+s.x)/c.x,u=(o.top+s.y)/c.y,d=o.width/c.x,p=o.height/c.y;if(i){const h=q(i),v=r&&te(r)?q(r):r;let x=h,f=Rt(x);for(;f&&r&&v!==x;){const m=Te(f),w=f.getBoundingClientRect(),g=ne(f),y=w.left+(f.clientLeft+parseFloat(g.paddingLeft))*m.x,b=w.top+(f.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,u*=m.y,d*=m.x,p*=m.y,l+=y,u+=b,x=q(f),f=Rt(x)}}return tt({width:d,height:p,x:l,y:u})}function Wt(e,t){const n=ct(e).scrollLeft;return t?t.left+n:Se(se(e)).left+n}function An(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Wt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Fo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=se(r),s=t?st(t.floating):!1;if(r===c||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=oe(1);const d=oe(0),p=ie(r);if((p||!p&&!i)&&((Me(r)!=="body"||Ve(c))&&(l=ct(r)),ie(r))){const v=Se(r);u=Te(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}const h=c&&!p&&!i?An(c,l,!0):oe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Bo(e){return Array.from(e.getClientRects())}function Wo(e){const t=se(e),n=ct(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Wt(e);const s=-n.scrollTop;return ne(r).direction==="rtl"&&(c+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:s}}function Ho(e,t){const n=q(e),r=se(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,s=0,l=0;if(o){i=o.width,c=o.height;const u=Ft();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:c,x:s,y:l}}function Vo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ie(e)?Te(e):oe(1),c=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:c,height:s,x:l,y:u}}function on(e,t,n){let r;if(t==="viewport")r=Ho(e,n);else if(t==="document")r=Wo(se(e));else if(te(t))r=Vo(t,n);else{const o=Pn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return tt(r)}function Tn(e,t){const n=ve(e);return n===t||!te(n)||Ie(n)?!1:ne(n).position==="fixed"||Tn(n,t)}function $o(e,t){const n=t.get(e);if(n)return n;let r=He(e,[],!1).filter(s=>te(s)&&Me(s)!=="body"),o=null;const i=ne(e).position==="fixed";let c=i?ve(e):e;for(;te(c)&&!Ie(c);){const s=ne(c),l=jt(c);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ve(c)&&!l&&Tn(e,c))?r=r.filter(d=>d!==c):o=s,c=ve(c)}return t.set(e,r),r}function Uo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?st(t)?[]:$o(t,this._c):[].concat(n),r],s=c[0],l=c.reduce((u,d)=>{const p=on(t,d,o);return u.top=G(p.top,u.top),u.right=he(p.right,u.right),u.bottom=he(p.bottom,u.bottom),u.left=G(p.left,u.left),u},on(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zo(e){const{width:t,height:n}=Rn(e);return{width:t,height:n}}function Ko(e,t,n){const r=ie(t),o=se(t),i=n==="fixed",c=Se(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=oe(0);function u(){l.x=Wt(o)}if(r||!r&&!i)if((Me(t)!=="body"||Ve(o))&&(s=ct(t)),r){const v=Se(t,!0,i,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?An(o,s):oe(0),p=c.left+s.scrollLeft-l.x-d.x,h=c.top+s.scrollTop-l.y-d.y;return{x:p,y:h,width:c.width,height:c.height}}function vt(e){return ne(e).position==="static"}function sn(e,t){if(!ie(e)||ne(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return se(e)===n&&(n=n.ownerDocument.body),n}function On(e,t){const n=q(e);if(st(e))return n;if(!ie(e)){let o=ve(e);for(;o&&!Ie(o);){if(te(o)&&!vt(o))return o;o=ve(o)}return n}let r=sn(e,t);for(;r&&Do(r)&&vt(r);)r=sn(r,t);return r&&Ie(r)&&vt(r)&&!jt(r)?n:r||_o(e)||n}const Yo=async function(e){const t=this.getOffsetParent||On,n=this.getDimensions,r=await n(e.floating);return{reference:Ko(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xo(e){return ne(e).direction==="rtl"}const Zo={convertOffsetParentRelativeRectToViewportRelativeRect:Fo,getDocumentElement:se,getClippingRect:Uo,getOffsetParent:On,getElementRects:Yo,getClientRects:Bo,getDimensions:zo,getScale:Te,isElement:te,isRTL:Xo};function In(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Go(e,t){let n=null,r;const o=se(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function c(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:v}=u;if(s||t(),!h||!v)return;const x=Ue(p),f=Ue(o.clientWidth-(d+h)),m=Ue(o.clientHeight-(p+v)),w=Ue(d),y={rootMargin:-x+"px "+-f+"px "+-m+"px "+-w+"px",threshold:G(0,he(1,l))||1};let b=!0;function C(R){const E=R[0].intersectionRatio;if(E!==l){if(!b)return c();E?c(!1,E):r=setTimeout(()=>{c(!1,1e-7)},1e3)}E===1&&!In(u,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return c(!0),i}function qo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Bt(e),d=o||i?[...u?He(u):[],...He(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=u&&s?Go(u,n):null;let h=-1,v=null;c&&(v=new ResizeObserver(w=>{let[g]=w;g&&g.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let x,f=l?Se(e):null;l&&m();function m(){const w=Se(e);f&&!In(f,w)&&n(),f=w,x=requestAnimationFrame(m)}return n(),()=>{var w;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),p==null||p(),(w=v)==null||w.disconnect(),v=null,l&&cancelAnimationFrame(x)}}const Qo=Io,Jo=No,ei=Ao,ti=Lo,ni=To,cn=Po,ri=Mo,oi=(e,t,n)=>{const r=new Map,o={platform:Zo,...n},i={...o.platform,_c:r};return Ro(e,t,{...o,platform:i})};var Ze=typeof document<"u"?a.useLayoutEffect:a.useEffect;function nt(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(!nt(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)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function an(e,t){const n=Nn(e);return Math.round(t*n)/n}function gt(e){const t=a.useRef(e);return Ze(()=>{t.current=e}),t}function ii(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=a.useState(r);nt(h,r)||v(r);const[x,f]=a.useState(null),[m,w]=a.useState(null),g=a.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),y=a.useCallback(A=>{A!==E.current&&(E.current=A,w(A))},[]),b=i||x,C=c||m,R=a.useRef(null),E=a.useRef(null),T=a.useRef(d),N=l!=null,I=gt(l),W=gt(o),H=gt(u),M=a.useCallback(()=>{if(!R.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};W.current&&(A.platform=W.current),oi(R.current,E.current,A).then(j=>{const $={...j,isPositioned:H.current!==!1};F.current&&!nt(T.current,$)&&(T.current=$,ot.flushSync(()=>{p($)}))})},[h,t,n,W,H]);Ze(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(A=>({...A,isPositioned:!1})))},[u]);const F=a.useRef(!1);Ze(()=>(F.current=!0,()=>{F.current=!1}),[]),Ze(()=>{if(b&&(R.current=b),C&&(E.current=C),b&&C){if(I.current)return I.current(b,C,M);M()}},[b,C,M,I,N]);const k=a.useMemo(()=>({reference:R,floating:E,setReference:g,setFloating:y}),[g,y]),O=a.useMemo(()=>({reference:b,floating:C}),[b,C]),L=a.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const j=an(O.floating,d.x),$=an(O.floating,d.y);return s?{...A,transform:"translate("+j+"px, "+$+"px)",...Nn(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:$}},[n,s,O.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:M,refs:k,elements:O,floatingStyles:L}),[d,M,k,O,L])}const si=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?cn({element:r.current,padding:o}).fn(n):{}:r?cn({element:r,padding:o}).fn(n):{}}}},ci=(e,t)=>({...Qo(e),options:[e,t]}),ai=(e,t)=>({...Jo(e),options:[e,t]}),li=(e,t)=>({...ri(e),options:[e,t]}),ui=(e,t)=>({...ei(e),options:[e,t]}),fi=(e,t)=>({...ti(e),options:[e,t]}),di=(e,t)=>({...ni(e),options:[e,t]}),pi=(e,t)=>({...si(e),options:[e,t]});var mi="Arrow",Mn=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx(U.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mn.displayName=mi;var hi=Mn;function vi(e){const[t,n]=a.useState(void 0);return X(()=>{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 c,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,s=u.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ht="Popper",[Ln,Dn]=Mt(Ht),[gi,_n]=Ln(Ht),kn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return S.jsx(gi,{scope:t,anchor:r,onAnchorChange:o,children:n})};kn.displayName=Ht;var jn="PopperAnchor",Fn=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=_n(jn,n),c=a.useRef(null),s=K(t,c);return a.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||c.current)}),r?null:S.jsx(U.div,{...o,ref:s})});Fn.displayName=jn;var Vt="PopperContent",[wi,yi]=Ln(Vt),Bn=a.forwardRef((e,t)=>{var P,V,Y,B,D,_;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:x,...f}=e,m=_n(Vt,n),[w,g]=a.useState(null),y=K(t,Z=>g(Z)),[b,C]=a.useState(null),R=vi(b),E=(R==null?void 0:R.width)??0,T=(R==null?void 0:R.height)??0,N=r+(i!=="center"?"-"+i:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],H=W.length>0,M={padding:I,boundary:W.filter(Si),altBoundary:H},{refs:F,floatingStyles:k,placement:O,isPositioned:L,middlewareData:A}=ii({strategy:"fixed",placement:N,whileElementsMounted:(...Z)=>qo(...Z,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[ci({mainAxis:o+T,alignmentAxis:c}),l&&ai({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?li():void 0,...M}),l&&ui({...M}),fi({...M,apply:({elements:Z,rects:re,availableWidth:ke,availableHeight:je})=>{const{width:Fe,height:Ar}=re.reference,$e=Z.floating.style;$e.setProperty("--radix-popper-available-width",`${ke}px`),$e.setProperty("--radix-popper-available-height",`${je}px`),$e.setProperty("--radix-popper-anchor-width",`${Fe}px`),$e.setProperty("--radix-popper-anchor-height",`${Ar}px`)}}),b&&pi({element:b,padding:s}),bi({arrowWidth:E,arrowHeight:T}),h&&di({strategy:"referenceHidden",...M})]}),[j,$]=Vn(O),J=xe(x);X(()=>{L&&(J==null||J())},[L,J]);const De=(P=A.arrow)==null?void 0:P.x,_e=(V=A.arrow)==null?void 0:V.y,fe=((Y=A.arrow)==null?void 0:Y.centerOffset)!==0,[Ee,ye]=a.useState();return X(()=>{w&&ye(window.getComputedStyle(w).zIndex)},[w]),S.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:L?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[(B=A.transformOrigin)==null?void 0:B.x,(D=A.transformOrigin)==null?void 0:D.y].join(" "),...((_=A.hide)==null?void 0:_.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(wi,{scope:n,placedSide:j,onArrowChange:C,arrowX:De,arrowY:_e,shouldHideArrow:fe,children:S.jsx(U.div,{"data-side":j,"data-align":$,...f,ref:y,style:{...f.style,animation:L?void 0:"none"}})})})});Bn.displayName=Vt;var Wn="PopperArrow",xi={top:"bottom",right:"left",bottom:"top",left:"right"},Hn=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=yi(Wn,r),c=xi[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]: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:S.jsx(hi,{...o,ref:n,style:{...o.style,display:"block"}})})});Hn.displayName=Wn;function Si(e){return e!==null}var bi=e=>({name:"transformOrigin",options:e,fn(t){var m,w,g;const{placement:n,rects:r,middlewareData:o}=t,c=((m=o.arrow)==null?void 0:m.centerOffset)!==0,s=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[u,d]=Vn(n),p={start:"0%",center:"50%",end:"100%"}[d],h=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,v=(((g=o.arrow)==null?void 0:g.y)??0)+l/2;let x="",f="";return u==="bottom"?(x=c?p:`${h}px`,f=`${-l}px`):u==="top"?(x=c?p:`${h}px`,f=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,f=c?p:`${v}px`):u==="left"&&(x=`${r.floating.width+l}px`,f=c?p:`${v}px`),{data:{x,y:f}}}});function Vn(e){const[t,n="center"]=e.split("-");return[t,n]}var Ci=kn,Ei=Fn,Ri=Bn,Pi=Hn,Ai="Portal",$n=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);X(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Ir.createPortal(S.jsx(U.div,{...r,ref:t}),c):null});$n.displayName=Ai;var Ti=hn[" useInsertionEffect ".trim().toString()]||X;function ln({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Oi({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const d=a.useRef(e!==void 0);a.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,r])}const u=a.useCallback(d=>{var p;if(s){const h=Ii(d)?d(e):d;h!==e&&((p=c.current)==null||p.call(c,h))}else i(d)},[s,e,i,c]);return[l,u]}function Oi({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return Ti(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Ii(e){return typeof e=="function"}function Ni(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Un=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"}),Mi="VisuallyHidden",Li=a.forwardRef((e,t)=>S.jsx(U.span,{...e,ref:t,style:{...Un,...e.style}}));Li.displayName=Mi;var Di=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Re=new WeakMap,ze=new WeakMap,Ke={},wt=0,zn=function(e){return e&&(e.host||zn(e.parentNode))},_i=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=zn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ki=function(e,t,n,r){var o=_i(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],c=[],s=new Set,l=new Set(o),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};o.forEach(u);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(h){if(s.has(h))d(h);else try{var v=h.getAttribute(r),x=v!==null&&v!=="false",f=(Re.get(h)||0)+1,m=(i.get(h)||0)+1;Re.set(h,f),i.set(h,m),c.push(h),f===1&&x&&ze.set(h,!0),m===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return d(t),s.clear(),wt++,function(){c.forEach(function(p){var h=Re.get(p)-1,v=i.get(p)-1;Re.set(p,h),i.set(p,v),h||(ze.has(p)||p.removeAttribute(r),ze.delete(p)),v||p.removeAttribute(n)}),wt--,wt||(Re=new WeakMap,Re=new WeakMap,ze=new WeakMap,Ke={})}},ji=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Di(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ki(r,o,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",qe="width-before-scroll-bar",Fi="with-scroll-bars-hidden",Bi="--removed-body-scroll-bar-size";function yt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wi(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Hi=typeof window<"u"?a.useLayoutEffect:a.useEffect,un=new WeakMap;function Vi(e,t){var n=Wi(null,function(r){return e.forEach(function(o){return yt(o,r)})});return Hi(function(){var r=un.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(s){i.has(s)||yt(s,null)}),i.forEach(function(s){o.has(s)||yt(s,c)})}un.set(n,e)},[e]),n}function $i(e){return e}function Ui(e,t){t===void 0&&(t=$i);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var l=function(){var d=c;c=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){c.push(d),u()},filter:function(d){return c=c.filter(d),n}}}};return o}function zi(e){e===void 0&&(e={});var t=Ui(null);return t.options=pe({async:!0,ssr:!1},e),t}var Kn=function(e){var t=e.sideCar,n=vn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,pe({},n))};Kn.isSideCarExport=!0;function Ki(e,t){return e.useMedium(t),Kn}var Yn=zi(),xt=function(){},at=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,v=e.noIsolation,x=e.inert,f=e.allowPinchZoom,m=e.as,w=m===void 0?"div":m,g=e.gapMode,y=vn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,C=Vi([n,t]),R=pe(pe({},y),o);return a.createElement(a.Fragment,null,d&&a.createElement(b,{sideCar:Yn,removeScrollBar:u,shards:p,noIsolation:v,inert:x,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:g}),c?a.cloneElement(a.Children.only(s),pe(pe({},R),{ref:C})):a.createElement(w,pe({},R,{className:l,ref:C}),s))});at.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};at.classNames={fullWidth:qe,zeroRight:Ge};var Yi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yi();return t&&e.setAttribute("nonce",t),e}function Zi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xi())&&(Zi(t,n),Gi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qi=function(){var e=qi();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xn=function(){var e=Qi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ji={left:0,top:0,right:0,gap:0},St=function(e){return parseInt(e||"",10)||0},es=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[St(n),St(r),St(o)]},ts=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ji;var t=es(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ns=Xn(),Oe="data-scroll-locked",rs=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Fi,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(Oe,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(c,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Ge,` {
|
|
20
|
-
right: `).concat(s,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(qe,` {
|
|
24
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Ge," .").concat(Ge,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(qe," .").concat(qe,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(Oe,`] {
|
|
36
|
-
`).concat(Bi,": ").concat(s,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},fn=function(){var e=parseInt(document.body.getAttribute(Oe)||"0",10);return isFinite(e)?e:0},os=function(){a.useEffect(function(){return document.body.setAttribute(Oe,(fn()+1).toString()),function(){var e=fn()-1;e<=0?document.body.removeAttribute(Oe):document.body.setAttribute(Oe,e.toString())}},[])},is=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;os();var i=a.useMemo(function(){return ts(o)},[o]);return a.createElement(ns,{styles:rs(i,!t,o,n?"":"!important")})},Pt=!1;if(typeof window<"u")try{var Ye=Object.defineProperty({},"passive",{get:function(){return Pt=!0,!0}});window.addEventListener("test",Ye,Ye),window.removeEventListener("test",Ye,Ye)}catch{Pt=!1}var Pe=Pt?{passive:!1}:!1,ss=function(e){return e.tagName==="TEXTAREA"},Zn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ss(e)&&n[t]==="visible")},cs=function(e){return Zn(e,"overflowY")},as=function(e){return Zn(e,"overflowX")},dn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Gn(e,r);if(o){var i=qn(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ls=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},us=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Gn=function(e,t){return e==="v"?cs(t):as(t)},qn=function(e,t){return e==="v"?ls(t):us(t)},fs=function(e,t){return e==="h"&&t==="rtl"?-1:1},ds=function(e,t,n,r,o){var i=fs(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,l=t.contains(s),u=!1,d=c>0,p=0,h=0;do{var v=qn(e,s),x=v[0],f=v[1],m=v[2],w=f-m-i*x;(x||w)&&Gn(e,s)&&(p+=w,h+=x),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&Math.abs(p)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Xe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pn=function(e){return[e.deltaX,e.deltaY]},mn=function(e){return e&&"current"in e?e.current:e},ps=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ms=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},hs=0,Ae=[];function vs(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(hs++)[0],i=a.useState(Xn)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(mn),!0).filter(Boolean);return f.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(f,m){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!c.current.allowPinchZoom;var w=Xe(f),g=n.current,y="deltaX"in f?f.deltaX:g[0]-w[0],b="deltaY"in f?f.deltaY:g[1]-w[1],C,R=f.target,E=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in f&&E==="h"&&R.type==="range")return!1;var T=dn(E,R);if(!T)return!0;if(T?C=E:(C=E==="v"?"h":"v",T=dn(E,R)),!T)return!1;if(!r.current&&"changedTouches"in f&&(y||b)&&(r.current=C),!C)return!0;var N=r.current||C;return ds(N,m,f,N==="h"?y:b)},[]),l=a.useCallback(function(f){var m=f;if(!(!Ae.length||Ae[Ae.length-1]!==i)){var w="deltaY"in m?pn(m):Xe(m),g=t.current.filter(function(C){return C.name===m.type&&(C.target===m.target||m.target===C.shadowParent)&&ps(C.delta,w)})[0];if(g&&g.should){m.cancelable&&m.preventDefault();return}if(!g){var y=(c.current.shards||[]).map(mn).filter(Boolean).filter(function(C){return C.contains(m.target)}),b=y.length>0?s(m,y[0]):!c.current.noIsolation;b&&m.cancelable&&m.preventDefault()}}},[]),u=a.useCallback(function(f,m,w,g){var y={name:f,delta:m,target:w,should:g,shadowParent:gs(w)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),d=a.useCallback(function(f){n.current=Xe(f),r.current=void 0},[]),p=a.useCallback(function(f){u(f.type,pn(f),f.target,s(f,e.lockRef.current))},[]),h=a.useCallback(function(f){u(f.type,Xe(f),f.target,s(f,e.lockRef.current))},[]);a.useEffect(function(){return Ae.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Pe),document.addEventListener("touchmove",l,Pe),document.addEventListener("touchstart",d,Pe),function(){Ae=Ae.filter(function(f){return f!==i}),document.removeEventListener("wheel",l,Pe),document.removeEventListener("touchmove",l,Pe),document.removeEventListener("touchstart",d,Pe)}},[]);var v=e.removeScrollBar,x=e.inert;return a.createElement(a.Fragment,null,x?a.createElement(i,{styles:ms(o)}):null,v?a.createElement(is,{gapMode:e.gapMode}):null)}function gs(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ws=Ki(Yn,vs);var Qn=a.forwardRef(function(e,t){return a.createElement(at,pe({},e,{ref:t,sideCar:ws}))});Qn.classNames=at.classNames;var ys=[" ","Enter","ArrowUp","ArrowDown"],xs=[" ","Enter"],be="Select",[lt,ut,Ss]=Yr(be),[Le,oc]=Mt(be,[Ss,Dn]),ft=Dn(),[bs,ge]=Le(be),[Cs,Es]=Le(be),Jn=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:c,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:p,disabled:h,required:v,form:x}=e,f=ft(t),[m,w]=a.useState(null),[g,y]=a.useState(null),[b,C]=a.useState(!1),R=Zr(u),[E,T]=ln({prop:r,defaultProp:o??!1,onChange:i,caller:be}),[N,I]=ln({prop:c,defaultProp:s,onChange:l,caller:be}),W=a.useRef(null),H=m?x||!!m.closest("form"):!0,[M,F]=a.useState(new Set),k=Array.from(M).map(O=>O.props.value).join(";");return S.jsx(Ci,{...f,children:S.jsxs(bs,{required:v,scope:t,trigger:m,onTriggerChange:w,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:C,contentId:Lt(),value:N,onValueChange:I,open:E,onOpenChange:T,dir:R,triggerPointerDownPosRef:W,disabled:h,children:[S.jsx(lt.Provider,{scope:t,children:S.jsx(Cs,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(O=>{F(L=>new Set(L).add(O))},[]),onNativeOptionRemove:a.useCallback(O=>{F(L=>{const A=new Set(L);return A.delete(O),A})},[]),children:n})}),H?S.jsxs(Sr,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:p,value:N,onChange:O=>I(O.target.value),disabled:h,form:x,children:[N===void 0?S.jsx("option",{value:""}):null,Array.from(M)]},k):null]})})};Jn.displayName=be;var er="SelectTrigger",tr=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=ft(n),c=ge(er,n),s=c.disabled||r,l=K(t,c.onTriggerChange),u=ut(n),d=a.useRef("touch"),[p,h,v]=Cr(f=>{const m=u().filter(y=>!y.disabled),w=m.find(y=>y.value===c.value),g=Er(m,f,w);g!==void 0&&c.onValueChange(g.value)}),x=f=>{s||(c.onOpenChange(!0),v()),f&&(c.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return S.jsx(Ei,{asChild:!0,...i,children:S.jsx(U.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":br(c.value)?"":void 0,...o,ref:l,onClick:z(o.onClick,f=>{f.currentTarget.focus(),d.current!=="mouse"&&x(f)}),onPointerDown:z(o.onPointerDown,f=>{d.current=f.pointerType;const m=f.target;m.hasPointerCapture(f.pointerId)&&m.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(x(f),f.preventDefault())}),onKeyDown:z(o.onKeyDown,f=>{const m=p.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&h(f.key),!(m&&f.key===" ")&&ys.includes(f.key)&&(x(),f.preventDefault())})})})});tr.displayName=er;var nr="SelectValue",rr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:c="",...s}=e,l=ge(nr,n),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,p=K(t,l.onValueNodeChange);return X(()=>{u(d)},[u,d]),S.jsx(U.span,{...s,ref:p,style:{pointerEvents:"none"},children:br(l.value)?S.jsx(S.Fragment,{children:c}):i})});rr.displayName=nr;var Rs="SelectIcon",or=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return S.jsx(U.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});or.displayName=Rs;var Ps="SelectPortal",ir=e=>S.jsx($n,{asChild:!0,...e});ir.displayName=Ps;var Ce="SelectContent",sr=a.forwardRef((e,t)=>{const n=ge(Ce,e.__scopeSelect),[r,o]=a.useState();if(X(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?ot.createPortal(S.jsx(cr,{scope:e.__scopeSelect,children:S.jsx(lt.Slot,{scope:e.__scopeSelect,children:S.jsx("div",{children:e.children})})}),i):null}return S.jsx(ar,{...e,ref:t})});sr.displayName=Ce;var ee=10,[cr,we]=Le(Ce),As="SelectContentImpl",Ts=Qe("SelectContent.RemoveScroll"),ar=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:c,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:m,...w}=e,g=ge(Ce,n),[y,b]=a.useState(null),[C,R]=a.useState(null),E=K(t,P=>b(P)),[T,N]=a.useState(null),[I,W]=a.useState(null),H=ut(n),[M,F]=a.useState(!1),k=a.useRef(!1);a.useEffect(()=>{if(y)return ji(y)},[y]),so();const O=a.useCallback(P=>{const[V,...Y]=H().map(_=>_.ref.current),[B]=Y.slice(-1),D=document.activeElement;for(const _ of P)if(_===D||(_==null||_.scrollIntoView({block:"nearest"}),_===V&&C&&(C.scrollTop=0),_===B&&C&&(C.scrollTop=C.scrollHeight),_==null||_.focus(),document.activeElement!==D))return},[H,C]),L=a.useCallback(()=>O([T,y]),[O,T,y]);a.useEffect(()=>{M&&L()},[M,L]);const{onOpenChange:A,triggerPointerDownPosRef:j}=g;a.useEffect(()=>{if(y){let P={x:0,y:0};const V=B=>{var D,_;P={x:Math.abs(Math.round(B.pageX)-(((D=j.current)==null?void 0:D.x)??0)),y:Math.abs(Math.round(B.pageY)-(((_=j.current)==null?void 0:_.y)??0))}},Y=B=>{P.x<=10&&P.y<=10?B.preventDefault():y.contains(B.target)||A(!1),document.removeEventListener("pointermove",V),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Y,{capture:!0})}}},[y,A,j]),a.useEffect(()=>{const P=()=>A(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[A]);const[$,J]=Cr(P=>{const V=H().filter(D=>!D.disabled),Y=V.find(D=>D.ref.current===document.activeElement),B=Er(V,P,Y);B&&setTimeout(()=>B.ref.current.focus())}),De=a.useCallback((P,V,Y)=>{const B=!k.current&&!Y;(g.value!==void 0&&g.value===V||B)&&(N(P),B&&(k.current=!0))},[g.value]),_e=a.useCallback(()=>y==null?void 0:y.focus(),[y]),fe=a.useCallback((P,V,Y)=>{const B=!k.current&&!Y;(g.value!==void 0&&g.value===V||B)&&W(P)},[g.value]),Ee=r==="popper"?At:lr,ye=Ee===At?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:m}:{};return S.jsx(cr,{scope:n,content:y,viewport:C,onViewportChange:R,itemRefCallback:De,selectedItem:T,onItemLeave:_e,itemTextRefCallback:fe,focusSelectedItem:L,selectedItemText:I,position:r,isPositioned:M,searchRef:$,children:S.jsx(Qn,{as:Ts,allowPinchZoom:!0,children:S.jsx(xn,{asChild:!0,trapped:g.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:z(o,P=>{var V;(V=g.trigger)==null||V.focus({preventScroll:!0}),P.preventDefault()}),children:S.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:S.jsx(Ee,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:P=>P.preventDefault(),...w,...ye,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:z(w.onKeyDown,P=>{const V=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!V&&P.key.length===1&&J(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let B=H().filter(D=>!D.disabled).map(D=>D.ref.current);if(["ArrowUp","End"].includes(P.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const D=P.target,_=B.indexOf(D);B=B.slice(_+1)}setTimeout(()=>O(B)),P.preventDefault()}})})})})})})});ar.displayName=As;var Os="SelectItemAlignedPosition",lr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=ge(Ce,n),c=we(Ce,n),[s,l]=a.useState(null),[u,d]=a.useState(null),p=K(t,E=>d(E)),h=ut(n),v=a.useRef(!1),x=a.useRef(!0),{viewport:f,selectedItem:m,selectedItemText:w,focusSelectedItem:g}=c,y=a.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&f&&m&&w){const E=i.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),I=w.getBoundingClientRect();if(i.dir!=="rtl"){const D=I.left-T.left,_=N.left-D,Z=E.left-_,re=E.width+Z,ke=Math.max(re,T.width),je=window.innerWidth-ee,Fe=zt(_,[ee,Math.max(ee,je-ke)]);s.style.minWidth=re+"px",s.style.left=Fe+"px"}else{const D=T.right-I.right,_=window.innerWidth-N.right-D,Z=window.innerWidth-E.right-_,re=E.width+Z,ke=Math.max(re,T.width),je=window.innerWidth-ee,Fe=zt(_,[ee,Math.max(ee,je-ke)]);s.style.minWidth=re+"px",s.style.right=Fe+"px"}const W=h(),H=window.innerHeight-ee*2,M=f.scrollHeight,F=window.getComputedStyle(u),k=parseInt(F.borderTopWidth,10),O=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),A=parseInt(F.paddingBottom,10),j=k+O+M+A+L,$=Math.min(m.offsetHeight*5,j),J=window.getComputedStyle(f),De=parseInt(J.paddingTop,10),_e=parseInt(J.paddingBottom,10),fe=E.top+E.height/2-ee,Ee=H-fe,ye=m.offsetHeight/2,P=m.offsetTop+ye,V=k+O+P,Y=j-V;if(V<=fe){const D=W.length>0&&m===W[W.length-1].ref.current;s.style.bottom="0px";const _=u.clientHeight-f.offsetTop-f.offsetHeight,Z=Math.max(Ee,ye+(D?_e:0)+_+L),re=V+Z;s.style.height=re+"px"}else{const D=W.length>0&&m===W[0].ref.current;s.style.top="0px";const Z=Math.max(fe,k+f.offsetTop+(D?De:0)+ye)+Y;s.style.height=Z+"px",f.scrollTop=V-fe+f.offsetTop}s.style.margin=`${ee}px 0`,s.style.minHeight=$+"px",s.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[h,i.trigger,i.valueNode,s,u,f,m,w,i.dir,r]);X(()=>y(),[y]);const[b,C]=a.useState();X(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=a.useCallback(E=>{E&&x.current===!0&&(y(),g==null||g(),x.current=!1)},[y,g]);return S.jsx(Ns,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:S.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:S.jsx(U.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});lr.displayName=Os;var Is="SelectPopperPosition",At=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ee,...i}=e,c=ft(n);return S.jsx(Ri,{...c,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});At.displayName=Is;var[Ns,$t]=Le(Ce,{}),Tt="SelectViewport",ur=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=we(Tt,n),c=$t(Tt,n),s=K(t,i.onViewportChange),l=a.useRef(0);return S.jsxs(S.Fragment,{children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),S.jsx(lt.Slot,{scope:n,children:S.jsx(U.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:z(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=c;if(h!=null&&h.current&&p){const v=Math.abs(l.current-d.scrollTop);if(v>0){const x=window.innerHeight-ee*2,f=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),w=Math.max(f,m);if(w<x){const g=w+v,y=Math.min(x,g),b=g-y;p.style.height=y+"px",p.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});ur.displayName=Tt;var fr="SelectGroup",[Ms,Ls]=Le(fr),Ds=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lt();return S.jsx(Ms,{scope:n,id:o,children:S.jsx(U.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ds.displayName=fr;var dr="SelectLabel",_s=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ls(dr,n);return S.jsx(U.div,{id:o.id,...r,ref:t})});_s.displayName=dr;var rt="SelectItem",[ks,pr]=Le(rt),mr=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...c}=e,s=ge(rt,n),l=we(rt,n),u=s.value===r,[d,p]=a.useState(i??""),[h,v]=a.useState(!1),x=K(t,g=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,g,r,o)}),f=Lt(),m=a.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.jsx(ks,{scope:n,value:r,disabled:o,textId:f,isSelected:u,onItemTextChange:a.useCallback(g=>{p(y=>y||((g==null?void 0:g.textContent)??"").trim())},[]),children:S.jsx(lt.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:S.jsx(U.div,{role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:x,onFocus:z(c.onFocus,()=>v(!0)),onBlur:z(c.onBlur,()=>v(!1)),onClick:z(c.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:z(c.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:z(c.onPointerDown,g=>{m.current=g.pointerType}),onPointerMove:z(c.onPointerMove,g=>{var y;m.current=g.pointerType,o?(y=l.onItemLeave)==null||y.call(l):m.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(c.onPointerLeave,g=>{var y;g.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:z(c.onKeyDown,g=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(xs.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});mr.displayName=rt;var Be="SelectItemText",hr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,c=ge(Be,n),s=we(Be,n),l=pr(Be,n),u=Es(Be,n),[d,p]=a.useState(null),h=K(t,w=>p(w),l.onItemTextChange,w=>{var g;return(g=s.itemTextRefCallback)==null?void 0:g.call(s,w,l.value,l.disabled)}),v=d==null?void 0:d.textContent,x=a.useMemo(()=>S.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:f,onNativeOptionRemove:m}=u;return X(()=>(f(x),()=>m(x)),[f,m,x]),S.jsxs(S.Fragment,{children:[S.jsx(U.span,{id:l.textId,...i,ref:h}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?ot.createPortal(i.children,c.valueNode):null]})});hr.displayName=Be;var vr="SelectItemIndicator",gr=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return pr(vr,n).isSelected?S.jsx(U.span,{"aria-hidden":!0,...r,ref:t}):null});gr.displayName=vr;var Ot="SelectScrollUpButton",wr=a.forwardRef((e,t)=>{const n=we(Ot,e.__scopeSelect),r=$t(Ot,e.__scopeSelect),[o,i]=a.useState(!1),c=K(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?S.jsx(xr,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});wr.displayName=Ot;var It="SelectScrollDownButton",yr=a.forwardRef((e,t)=>{const n=we(It,e.__scopeSelect),r=$t(It,e.__scopeSelect),[o,i]=a.useState(!1),c=K(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?S.jsx(xr,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});yr.displayName=It;var xr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=we("SelectScrollButton",n),c=a.useRef(null),s=ut(n),l=a.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return a.useEffect(()=>()=>l(),[l]),X(()=>{var d;const u=s().find(p=>p.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),S.jsx(U.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:z(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:z(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:z(o.onPointerLeave,()=>{l()})})}),js="SelectSeparator",Fs=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return S.jsx(U.div,{"aria-hidden":!0,...r,ref:t})});Fs.displayName=js;var Nt="SelectArrow",Bs=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft(n),i=ge(Nt,n),c=we(Nt,n);return i.open&&c.position==="popper"?S.jsx(Pi,{...o,...r,ref:t}):null});Bs.displayName=Nt;var Ws="SelectBubbleInput",Sr=a.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=a.useRef(null),i=K(r,o),c=Ni(t);return a.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&d){const p=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(p)}},[c,t]),S.jsx(U.select,{...n,style:{...Un,...n.style},ref:i,defaultValue:t})});Sr.displayName=Ws;function br(e){return e===""||e===void 0}function Cr(e){const t=xe(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(c=>{const s=n.current+c;t(s),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Er(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Hs(e,Math.max(i,0));o.length===1&&(c=c.filter(u=>u!==n));const l=c.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Hs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vs=Jn,$s=tr,Us=rr,zs=or,Ks=ir,Ys=sr,Xs=ur,Zs=mr,Gs=hr,qs=gr,Qs=wr,Js=yr;const ec=ce.forwardRef(function({list:t=[],required:n=!1,disabled:r=!1,autoFocus:o=!1,size:i=Q.md,name:c,value:s="default",className:l,onChange:u},d){const p=t.find(h=>h.value===s)??t[0]??{value:s};return r=r||t.length<2,S.jsxs(Vs,{name:c,value:p.value,disabled:r,required:n,onValueChange:u,children:[S.jsxs($s,{ref:d,className:me(l,r&&"opacity-50 cursor-not-allowed"),autoFocus:o,children:[S.jsx(Us,{}),S.jsx(zs,{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:S.jsx(kr,{className:"w-4","aria-hidden":"true"})})]}),S.jsx(Ks,{children:S.jsxs(Ys,{className:me("overflow-auto rounded-md bg-theme p-1 shadow-2xl border-2 border-neutral-200 dark:border-neutral-700 ring-opacity-5 focus:outline-none",i===Q.sm&&"text-xs",i===Q.md&&"text-sm",i===Q.lg&&"text-sm"),children:[S.jsx(Qs,{className:"flex items-center justify-center h-3 cursor-default",children:S.jsx(Fr,{className:"w-4","aria-hidden":"true"})}),S.jsx(Xs,{className:"p-1",children:t.map(({text:h,value:v})=>S.jsx(tc,{value:v,children:h},v))}),S.jsx(Js,{className:"flex items-center justify-center h-3 cursor-default",children:S.jsx(Dr,{className:"w-4","aria-hidden":"true"})})]})})]})});function tc({disabled:e=!1,value:t,children:n,className:r}){return S.jsxs(Zs,{value:t,className:me("leading-none rounded-md flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none data-[highlighted]:bg-brand-500 data-[highlighted]:text-brand-100",e&&"opacity-50 cursor-not-allowed",r),children:[S.jsx(Gs,{children:n}),S.jsx(qs,{className:"absolute left-0 w-4 inline-flex items-center justify-center",children:S.jsx(Mr,{})})]})}function dt({label:e,info:t,size:n=Q.md,className:r,children:o,disabled:i=!1,required:c=!1,autoFocus:s=!1}){const l=me("text-left relative block bg-theme-lighter border-neutral-200 dark:border-neutral-700","focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",n===Q.sm&&"px-2 py-0.5 text-xs leading-4 border-2 focus:ring-2 rounded-[0.25rem] min-w-[7rem]",n===Q.md&&"px-3 py-2 text-sm leading-4 border-2 focus:ring-4 rounded-md min-w-[10rem]",n===Q.lg&&"px-3 py-2 text-sm leading-6 border-2 focus:ring-4 rounded-md min-w-[10rem]");return S.jsxs("div",{className:me("inline-block relative m-1 text-left",i&&"opacity-50 cursor-not-allowed",r),children:[Ut(e)&&S.jsx(Rr,{size:n,children:e}),typeof o=="function"?o({disabled:i,required:c,autoFocus:s,size:n,className:l}):o,Ut(t)&&S.jsx(Pr,{children:t})]})}function Rr({htmlFor:e,className:t,children:n,size:r=Q.md}){return S.jsx("label",{htmlFor:e,className:me("block mb-1 px-2 text-sm whitespace-nowrap",r===Q.sm&&"text-xs",r===Q.md&&"text-sm",r===Q.lg&&"text-md",t),children:n})}function Pr({className:e,children:t}){return S.jsx("small",{className:me("block text-xs mt-1 px-3 text-neutral-400 dark:text-neutral-600",e),children:t})}dt.Label=Rr;dt.Info=Pr;dt.Textfield=Br;dt.Selector=ec;export{Ei as A,Ri as C,wn as D,xn as F,dt as I,U as P,Qn as R,X as a,Yr as b,Mt as c,Lt as d,z as e,Zr as f,ln as g,xe as h,Dn as i,ji as j,so as k,Qe as l,Pi as m,Hr as n,qr as o,Ci as p,$n as q,kr as r,Fr as s,Dr as t,K as u,Mr as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as u,U as c,a as n,w as a,j as s,e as f}from"./index-CkIQhGgw.js";import{L as g}from"./context-Dx2o1ZRq.js";import x from"./ModelLineage-CB8Rie_r.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-COQuzlwN.js";import"./editor-Dj_6cws7.js";import"./file-Bs2Eq56_.js";import"./project-XFpF0AcJ.js";import"./help-6Q7f7fjd.js";import"./SourceList-DQ72TcK1.js";import"./Input-BY5Rc3go.js";import"./index-DQbKL5-Q.js";import"./transition-B5aHgz_j.js";import"./ListboxShow-TFvq9fMB.js";import"./SearchList-BShQn9jm.js";function S(){const l=u(),{modelName:t}=c(),i=n(e=>e.models),o=n(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const m=i.get(e);a(m)||l(f.LineageModels+"/"+m.name)}function p(e){console.log(e==null?void 0:e.message)}return s.jsx("div",{className:"flex overflow-hidden w-full h-full",children:s.jsx(g,{showColumns:!0,handleClickModel:d,handleError:p,children:s.jsx(x,{model:r})})})}export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-CkIQhGgw.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-B5aHgz_j.js";import{t as Ne,v as Ae}from"./Input-BY5Rc3go.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,R as r,j as s,c as _,B as Q,m as P,n as ee,aA as ie,h as le,w as H,b as F,i as W,W as ce,Z as de,aB as ue,v as me,L as te,S as se,F as q,I as fe}from"./index-CkIQhGgw.js";import{d as he,e as ne,f as B,P as ae,h as G,b as $,i as pe,E as V,R as ge,j as we,k as xe,l as ve,m as X,n as Y,o as J,p as ye,q as Ne,r as be,s as Ee}from"./context-Dx2o1ZRq.js";import{W as ke}from"./editor-Dj_6cws7.js";import{F as Ce,L as ze}from"./ListboxShow-TFvq9fMB.js";import{S as Me}from"./SearchList-BShQn9jm.js";import{t as Se}from"./Input-BY5Rc3go.js";import{B as T}from"./transition-B5aHgz_j.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-COQuzlwN.js";import"./file-Bs2Eq56_.js";import"./project-XFpF0AcJ.js";import"./help-6Q7f7fjd.js";import"./SourceList-DQ72TcK1.js";import"./index-DQbKL5-Q.js";function je({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Le=o.forwardRef(je);function Ie(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}function He(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Oe(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Re(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function _e(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:G(["react-flow__controls-button",t]),...n},e);D.displayName="ControlButton";const Fe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),re=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:a=!0,fitViewOptions:d,onZoomIn:i,onZoomOut:l,onFitView:f,onInteractiveChange:h,className:p,children:c,position:N="bottom-left"})=>{const g=he(),[z,k]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:u}=ne(Fe,Ie),{zoomIn:v,zoomOut:E,fitView:m}=B();if(o.useEffect(()=>{k(!0)},[]),!z)return null;const j=()=>{v(),i==null||i()},C=()=>{E(),l==null||l()},S=()=>{m(d),f==null||f()},y=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),h==null||h(!w)};return r.createElement(ae,{className:G(["react-flow__controls",p]),position:N,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(D,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:u},r.createElement(He,null)),r.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},r.createElement(Oe,null))),n&&r.createElement(D,{className:"react-flow__controls-fitview",onClick:S,title:"fit view","aria-label":"fit view"},r.createElement(Re,null)),a&&r.createElement(D,{className:"react-flow__controls-interactive",onClick:y,title:"toggle interactivity","aria-label":"toggle interactivity"},w?r.createElement(De,null):r.createElement(_e,null)),c)};re.displayName="Controls";var $e=o.memo(re);function We(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}var M;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(M||(M={}));function Ae({color:e,dimensions:t,lineWidth:n}){return r.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Ue({color:e,radius:t}){return r.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Ve={[M.Dots]:"#91919a",[M.Lines]:"#eee",[M.Cross]:"#e2e2e2"},Te={[M.Dots]:1,[M.Lines]:1,[M.Cross]:6},Pe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function oe({id:e,variant:t=M.Dots,gap:n=20,size:a,lineWidth:d=1,offset:i=2,color:l,style:f,className:h}){const p=o.useRef(null),{transform:c,patternId:N}=ne(Pe,We),g=l||Ve[t],z=a||Te[t],k=t===M.Dots,w=t===M.Cross,x=Array.isArray(n)?n:[n,n],u=[x[0]*c[2]||1,x[1]*c[2]||1],v=z*c[2],E=w?[v,v]:u,m=k?[v/i,v/i]:[E[0]/i,E[1]/i];return r.createElement("svg",{className:G(["react-flow__background",h]),style:{...f,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},r.createElement("pattern",{id:N+e,x:c[0]%u[0],y:c[1]%u[1],width:u[0],height:u[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},k?r.createElement(Ue,{color:g,radius:v/i}):r.createElement(Ae,{dimensions:E,color:g,lineWidth:d})),r.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+e})`}))}oe.displayName="Background";var Be=o.memo(oe);function Ge({handleSelect:e}){const{models:t,lineage:n,mainNode:a,connectedNodes:d}=$(),[i,l]=o.useState(!1),[f,h]=o.useState([]),[p,c]=o.useState(!1);o.useEffect(()=>{h([])},[a,t,n]);function N(){l(!0)}function g(){l(!1)}function z(k){k.length<1||le(f)||H(a)||H(n)||(c(!0),setTimeout(()=>{const w=Array.from(pe(n,a));h(Object.keys(n).map(x=>{var u;return{name:x,displayName:((u=t.get(x))==null?void 0:u.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${d.has(x)?"Directly":"Indirectly"} Connected`}})),c(!1)},300))}return s.jsxs("div",{className:_("w-full",i?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[s.jsx(Q,{shape:ie.Circle,className:_("flex @[40rem]:hidden !py-1 border-transparent",i?"hidden":"flex"),variant:ee.Alternative,size:P.sm,"aria-label":"Show search",onClick:N,children:s.jsx(Le,{className:"w-3 h-3 text-primary-500"})}),s.jsx(Me,{list:f,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:P.sm,onSelect:e,isLoading:p,className:_("w-full @sm:min-w-[12rem] @[40rem]:flex",i?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:z}),s.jsx("button",{className:_("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",i?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:s.jsx(Ce,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:e=[]}){const{setCenter:t}=B(),{activeNodes:n,models:a,mainNode:d,nodesMap:i,selectedNodes:l,setSelectedNodes:f,withImpacted:h,connectedNodes:p,lineageCache:c,setActiveEdges:N,setConnections:g,setLineage:z,setLineageCache:k}=$(),w=H(d)?void 0:a.get(d),x=n.size>0?n.size:p.size,u=l.size,v=p.size-1,E=e.filter(y=>y.hidden).length,m=e.filter(y=>F(y.hidden)&&(y.data.type===V.external||y.data.type===V.seed)).length,j=e.filter(y=>F(y.hidden)&&y.data.type===V.cte).length,C=x>0&&x!==v+1;function S(){if(H(d))return;const y=i[d];H(y)||setTimeout(()=>{t(y.position.x,y.position.y,{zoom:.5,duration:0})},200)}return s.jsxs(s.Fragment,{children:[W(w)&&s.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:S,children:ce(w.displayName,50,25)}),s.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"All:"})," ",e.length]}),E>0&&s.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[s.jsx("b",{children:"Hidden:"})," ",E]}),u>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Selected:"})," ",u]}),C&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Active:"})," ",x]}),(C||u>0||W(c))&&s.jsx(Q,{size:P.xs,variant:ee.Neutral,format:de.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),f(new Set),W(c)&&(z(c),k(void 0))},children:"Reset"})]}),m>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Sources"}),": ",m]}),F(C)&&h&&u===0&&v>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),j>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"CTEs:"})," ",j]})]})}const Ze=30;function dt({model:e,highlightedNodes:t}){const{setActiveNodes:n,setActiveEdges:a,setConnections:d,setLineage:i,handleError:l,setSelectedNodes:f,setMainNode:h,setWithColumns:p,setHighlightedNodes:c,setNodeConnections:N,setLineageCache:g,setUnknownModels:z,models:k,unknownModels:w}=$(),{refetch:x,isFetching:u,cancel:v}=ue(e.name),{isFetching:E}=me(),[m,j]=o.useState(!1),[C,S]=o.useState(void 0);o.useEffect(()=>{const b=ke();return b.addEventListener("message",y),x().then(({data:L})=>{S(L),!H(L)&&(j(!0),b.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:e.fqn}}))}).catch(L=>{l==null||l(L)}).finally(()=>{n(new Set),a(new Map),d(new Map),f(new Set),g(void 0),h(e.fqn)}),()=>{v==null||v(),b.removeEventListener("message",y),b.terminate(),i({}),N({}),h(void 0),c({})}},[e.name,e.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(b=>{b=encodeURI(b),F(k.has(b))&&F(w.has(b))&&w.add(b)}),z(new Set(w))},[C,k]),o.useEffect(()=>{c(t??{})},[t]);function y(b){var L;b.data.topic==="lineage"&&(j(!1),N(b.data.payload.nodesConnections),i(b.data.payload.lineage),Object.values(((L=b.data.payload)==null?void 0:L.lineage)??{}).length>Ze&&p(!1)),b.data.topic==="error"&&(l==null||l(b.data.error),j(!1))}const O=u||E||m;return s.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[O&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:O?"Loading Model's Lineage...":"Merging Model's..."})]})]}),s.jsx(ge,{children:s.jsx(qe,{})})]})}function qe(){const{withColumns:e,lineage:t,mainNode:n,selectedEdges:a,selectedNodes:d,withConnected:i,withImpacted:l,withSecondary:f,hasBackground:h,activeEdges:p,connectedNodes:c,connections:N,nodesMap:g,showControls:z,handleError:k,setActiveNodes:w}=$(),{setCenter:x}=B(),[u,v]=o.useState(!1),E=o.useMemo(()=>({model:we}),[]),m=o.useMemo(()=>xe(t),[t]),j=o.useMemo(()=>ve(t),[t]),[C,S]=o.useState([]),[y,O]=o.useState([]);o.useEffect(()=>{if(q(m)||H(n))return;v(!0);const I=X(m,p,a,g),A=Y(Object.values(g),I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f),Z=ye({nodesMap:g,nodes:A,edges:U});return Z.create().then(R=>{O(R.edges),S(R.nodes)}).catch(R=>{k==null||k(R),O([]),S([])}).finally(()=>{const R=H(n)?void 0:g[n];W(R)&&x(R.position.x,R.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),O([]),S([])}},[p,g,j]),o.useEffect(()=>{if(H(n)||q(C))return;const I=X(m,p,a,g),A=Y(C,I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f);O(U),S(A),w(I)},[N,g,m,p,d,a,c,i,l,f,e,n]);function b(I){S(Ee(I,C))}function L(I){O(be(I,y))}return s.jsxs(s.Fragment,{children:[u&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),s.jsxs(Ne,{nodes:C,edges:y,nodeTypes:E,onNodesChange:b,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[z&&s.jsxs(ae,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[s.jsx(Xe,{nodes:C}),s.jsx(fe,{})]}),s.jsx($e,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),s.jsx(Be,{variant:M.Cross,gap:32,size:4,className:_(h?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function Xe({nodes:e=[]}){const{withColumns:t,mainNode:n,selectedNodes:a,withConnected:d,withImpacted:i,withSecondary:l,hasBackground:f,activeNodes:h,highlightedNodes:p,setSelectedNodes:c,setWithColumns:N,setWithConnected:g,setWithImpacted:z,setWithSecondary:k,setHasBackground:w}=$(),x=o.useRef(null),u=o.useMemo(()=>Object.values(p??{}).flat(),[p]);function v(E){u.includes(E.name)||n===E.name||c(m=>(m.has(E.name)?m.delete(E.name):m.add(E.name),new Set(m)))}return s.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[s.jsxs("div",{className:"contents",children:[s.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[s.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",s.jsx(Se,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),s.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:s.jsx(K,{nodes:e})})]}),s.jsx("div",{className:"hidden @lg:contents w-full",children:s.jsx(K,{nodes:e})})]}),s.jsxs("div",{className:"flex w-full justify-end items-center",children:[s.jsx(Ge,{handleSelect:v}),s.jsx(ze,{options:{Background:w,Columns:h.size>0&&a.size===0?void 0:N,Connected:h.size>0?void 0:g,"Upstream/Downstream":h.size>0?void 0:z,All:h.size>0?void 0:k},value:[t&&"Columns",f&&"Background",d&&"Connected",i&&"Upstream/Downstream",l&&"All"].filter(Boolean)})]})]})}export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-CkIQhGgw.js";import{S as R,b as k,m as C,n as I,o as H,p as U,f as D,g as G}from"./SearchList-BShQn9jm.js";import{P as V}from"./Page-KC6UG65M.js";import{g as W}from"./context-Dx2o1ZRq.js";import{u as f}from"./project-XFpF0AcJ.js";import"./Input-BY5Rc3go.js";import"./index-COQuzlwN.js";import"./help-6Q7f7fjd.js";import"./transition-B5aHgz_j.js";import"./SplitPane-BY85POxQ.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-Dj_6cws7.js";import"./file-Bs2Eq56_.js";import"./SourceList-DQ72TcK1.js";import"./index-DQbKL5-Q.js";function le({route:g=L.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),l=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),n=h.useMemo(()=>Array.from(new Set(l.values())),[l]),{isFetching:c}=F(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:l.get(encodeURI(i));h.useEffect(()=>{if(m(a))return;const e=p.get(a.path);x(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const y=m(a)&&x(i)&&O(c);return s.jsx(V,{sidebar:A(n)?void 0:s.jsx(k,{"update-selector":"tbk-model-name",children:s.jsx(C,{selectable:!0,onChange:e=>u(e.detail.value),className:"pt-3 px-2",children:Object.entries(I.categorize(n)).map(([e,v])=>s.jsx(H,{headline:e,open:!0,children:v.map(o=>s.jsx(U,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(D,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(G,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(b.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(n)&&s.jsx(R,{list:n,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),y?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(w,{})]})})})}export{le as default};
|