@decocms/mesh 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CoA9j9_b.js → AlertCircle-DxJIdkjA.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Bu1JR7vY.js → ArrowLeft-CrgZDDUZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-BmUd-Gap.js → ChevronDown-B2VaHCqC.js} +1 -1
- package/dist/client/assets/{Clock-BGOqsAv_.js → Clock-CafJ8d76.js} +1 -1
- package/dist/client/assets/{Code01-C4I9q0rm.js → Code01-BHMAmoGH.js} +1 -1
- package/dist/client/assets/{Copy01-D_YhbDiF.js → Copy01-DfnjsOeR.js} +1 -1
- package/dist/client/assets/{CpuChip02-BkDt7iNK.js → CpuChip02-qVpLCR0_.js} +1 -1
- package/dist/client/assets/{DotsVertical-CxdZClGh.js → DotsVertical-DIWcHGKr.js} +1 -1
- package/dist/client/assets/{File06-BdMasDPT.js → File06-DSeIH9xM.js} +1 -1
- package/dist/client/assets/{FlipBackward-B34yEzR2.js → FlipBackward-s0RSv_vj.js} +1 -1
- package/dist/client/assets/{GitBranch01-D2Rua42v.js → GitBranch01-CeFBxnqq.js} +1 -1
- package/dist/client/assets/{Grid01-Bom2qqwm.js → Grid01-Ch9rI6P9.js} +1 -1
- package/dist/client/assets/{Inbox01-Arx8J2Oq.js → Inbox01-7z9hTUsw.js} +1 -1
- package/dist/client/assets/{InfoCircle-BYXT4R1l.js → InfoCircle-DQaxWpv9.js} +1 -1
- package/dist/client/assets/{Key01-D0WGLaST.js → Key01-CH9qCC00.js} +1 -1
- package/dist/client/assets/{LinkExternal01-LVkx-wZF.js → LinkExternal01-DZDUBWQO.js} +1 -1
- package/dist/client/assets/{Loading01-Dw6V1r3u.js → Loading01-B0dLQInZ.js} +1 -1
- package/dist/client/assets/{Lock01-Dw2P1WZh.js → Lock01-wpG8qO-9.js} +1 -1
- package/dist/client/assets/{Play-BRRssd_q.js → Play-DSXQEflq.js} +1 -1
- package/dist/client/assets/{Plus-CQSfshmp.js → Plus-D_XbrIfI.js} +1 -1
- package/dist/client/assets/{SearchMd-CGUWNVUr.js → SearchMd-BJbLhbUT.js} +1 -1
- package/dist/client/assets/{Terminal-CIo_ltVk.js → Terminal-BSL9-A7C.js} +1 -1
- package/dist/client/assets/{Trash01-BgGiU9JZ.js → Trash01-aTCf1hVv.js} +1 -1
- package/dist/client/assets/{X-CsW5kmRT.js → X-BgwVwwIy.js} +1 -1
- package/dist/client/assets/{XClose-D2IdV8gs.js → XClose-sskkBH5X.js} +1 -1
- package/dist/client/assets/{alert-dialog-rSIOP2OM.js → alert-dialog-DIexFXOj.js} +1 -1
- package/dist/client/assets/{auth-D6vm_lfk.js → auth-BnF0Tfz9.js} +1 -1
- package/dist/client/assets/{auth-catchall-lDj0BXu4.js → auth-catchall-Cp5vKmTi.js} +1 -1
- package/dist/client/assets/{avatar-C45Lgbwv.js → avatar-Bf0qQU4w.js} +1 -1
- package/dist/client/assets/{badge-Z-ujar-h.js → badge-CgEtLuTw.js} +1 -1
- package/dist/client/assets/{button-DMnSM5FV.js → button-O0CudEuW.js} +1 -1
- package/dist/client/assets/{card-DL_e-uTF.js → card-ciO_SNWh.js} +1 -1
- package/dist/client/assets/{checkbox-SCLb_n1h.js → checkbox-DUc30Qpz.js} +1 -1
- package/dist/client/assets/collection-detail-msiVYwQa.js +165 -0
- package/dist/client/assets/{collection-display-button-BbSV76WH.js → collection-display-button-BVgPIpv0.js} +1 -1
- package/dist/client/assets/{collection-header-CqO1LmKH.js → collection-header-BkZGWAxm.js} +1 -1
- package/dist/client/assets/{collection-page-DDVR6yeu.js → collection-page-CREYFoHa.js} +1 -1
- package/dist/client/assets/{collection-search-BOBOP2ro.js → collection-search-s9G5Psps.js} +1 -1
- package/dist/client/assets/{collection-tab-CNlP707v.js → collection-tab-T_hhyR7G.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-ByX0J-nn.js → collection-table-wrapper-Dnmr37nE.js} +1 -1
- package/dist/client/assets/{connection-card-CZFyOgeO.js → connection-card-Dcrw1pJ1.js} +1 -1
- package/dist/client/assets/{connection-detail-oL5IGO2h.js → connection-detail-ByP6chqW.js} +1 -1
- package/dist/client/assets/{connections-BKlzJU2y.js → connections-DYOzkJYx.js} +1 -1
- package/dist/client/assets/constants-BG4081pg.js +1 -0
- package/dist/client/assets/{create-organization-dialog-lmQ3mepV.js → create-organization-dialog-CYQoklT3.js} +1 -1
- package/dist/client/assets/{dialog-B1fXXmBI.js → dialog-D4dy2US8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-gRHakuHp.js → dropdown-menu-DjELCVXr.js} +1 -1
- package/dist/client/assets/{empty-state-BiqF__Lu.js → empty-state-CA7indKP.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Br0Q2jee.js → env-vars-editor-CFmirc3J.js} +1 -1
- package/dist/client/assets/{error-boundary-CUq8HVcH.js → error-boundary-Ba_T3BIS.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DsJuSGHU.js → extract-connection-data-Bm1qZWCV.js} +1 -1
- package/dist/client/assets/{form-BbwJs-Od.js → form-rbCVC2Lc.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-jHI_IOun.js → formatDistanceToNow-Bsssu-td.js} +1 -1
- package/dist/client/assets/gateway-detail-JYrV5S3_.js +1 -0
- package/dist/client/assets/{gateways-BfCNNBIO.js → gateways--haP9jLk.js} +1 -1
- package/dist/client/assets/{home-oGaB9rtf.js → home-0xYKq0nN.js} +1 -1
- package/dist/client/assets/index-B9fZ40p9.js +155 -0
- package/dist/client/assets/{index-BMIizA12.js → index-BGmLHZvN.js} +1 -1
- package/dist/client/assets/{index-BbK2Byrj.js → index-BNguAQBW.js} +1 -1
- package/dist/client/assets/{index-B1eBXzBF.js → index-C9WZdaPe.js} +1 -1
- package/dist/client/assets/index-CmUsR6rx.css +1 -0
- package/dist/client/assets/{input-C6vwKKeq.js → input-C3lfdgit.js} +1 -1
- package/dist/client/assets/{layout-m8iq6RWE.js → layout-BgUF9JkX.js} +1 -1
- package/dist/client/assets/lazy-highlighter-Buv6v3mS.js +9 -0
- package/dist/client/assets/{localstorage-keys-BB9xpX5T.js → localstorage-keys-BGRuWcRT.js} +1 -1
- package/dist/client/assets/{login-CevUioqo.js → login-fFNSXfGP.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CE6Gg3ul.js → mcp-oauth-DacADfyW.js} +1 -1
- package/dist/client/assets/{members-CAJLI1Ui.js → members-CAufZALX.js} +1 -1
- package/dist/client/assets/monaco-editor-uZe9l_bJ.js +19 -0
- package/dist/client/assets/monitoring-DTJtueom.js +4 -0
- package/dist/client/assets/{oauth-callback-DnSysdpG.js → oauth-callback-zUOuo71p.js} +1 -1
- package/dist/client/assets/{page-jzi_ERcf.js → page-BP6lcPxY.js} +2 -2
- package/dist/client/assets/{pin-to-sidebar-button-DonhySMf.js → pin-to-sidebar-button-DcWM6FTO.js} +1 -1
- package/dist/client/assets/{popover-BO5GT9tA.js → popover-BRnyFKtN.js} +1 -1
- package/dist/client/assets/{resizable-DpISfhV6.js → resizable-Bcc9SJfZ.js} +1 -1
- package/dist/client/assets/{resource-tabs-JMDBPJhv.js → resource-tabs-ltvgVmlK.js} +1 -1
- package/dist/client/assets/{responsive-select-BZGantuu.js → responsive-select-BbaQnOfE.js} +1 -1
- package/dist/client/assets/{select-mD7lFwRj.js → select-Dsuiuagq.js} +1 -1
- package/dist/client/assets/{settings-iXHGs-4V.js → settings-Br4mx_yy.js} +1 -1
- package/dist/client/assets/{shell-layout-C1VOF_px.js → shell-layout-CM_S8ji4.js} +1 -1
- package/dist/client/assets/{spinner-D7to-RHc.js → spinner-CDnZnQfr.js} +1 -1
- package/dist/client/assets/{store-C7bepdKu.js → store-CJqU95FV.js} +1 -1
- package/dist/client/assets/{store-app-detail-dqrfmC2K.js → store-app-detail-Bb4mx26e.js} +1 -1
- package/dist/client/assets/{switch-CpJO-7Kf.js → switch-DhyQ2_hE.js} +1 -1
- package/dist/client/assets/{textarea-Dma5FaAA.js → textarea-CvmD-TCl.js} +1 -1
- package/dist/client/assets/{thread-history-popover-DTmh-wTW.js → thread-history-popover-BQKKEP-v.js} +14 -14
- package/dist/client/assets/{tools-list-DJTZFgWM.js → tools-list-zpc-T8zT.js} +1 -1
- package/dist/client/assets/{tooltip-DiQ9SlNX.js → tooltip-DaImUyOX.js} +1 -1
- package/dist/client/assets/{types-Bq0bBlbx.js → types-BDHiECry.js} +2 -2
- package/dist/client/assets/{use-binding-DQTEUjPl.js → use-binding-BWHEOuVA.js} +8 -8
- package/dist/client/assets/{use-connection-DUMeVexv.js → use-connection-9XNP6qUi.js} +1 -1
- package/dist/client/assets/{use-connection-resources-GqC2zg91.js → use-connection-resources-DbXXhKLF.js} +1 -1
- package/dist/client/assets/{use-gateway-pQG4iSzq.js → use-gateway-BU92tNo7.js} +1 -1
- package/dist/client/assets/{use-list-state-DKjekACN.js → use-list-state-vrSW0egR.js} +1 -1
- package/dist/client/assets/{use-mcp-CaAgRxkf.js → use-mcp-BXJqKT0W.js} +1 -1
- package/dist/client/assets/{use-members-Cxbw-nUt.js → use-members-eTAFi1HF.js} +1 -1
- package/dist/client/assets/{use-mobile-C2teUdDI.js → use-mobile-CG0P5-tt.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B-bw0Nsb.js → use-organization-settings-jxyxG3Do.js} +1 -1
- package/dist/client/assets/{use-tool-call-BwHyofVZ.js → use-tool-call-vWU--CYB.js} +1 -1
- package/dist/client/assets/useQuery-nlt5lRkW.js +1 -0
- package/dist/client/assets/{useSuspenseInfiniteQuery-WWHYgeeq.js → useSuspenseInfiniteQuery-o35GYPjZ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DCDdw_zu.js → view-mode-toggle-CTKggGXJ.js} +1 -1
- package/dist/client/assets/{workflow-nViVDMOR.js → workflow-DTYA39cO.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -3
- package/dist/client/assets/collection-detail-DZRR92ph.js +0 -183
- package/dist/client/assets/constants-C4MXZrmv.js +0 -1
- package/dist/client/assets/core-D9xILP6l.js +0 -6
- package/dist/client/assets/gateway-detail-CvVf3uBW.js +0 -1
- package/dist/client/assets/index-B3GsxHkT.css +0 -1
- package/dist/client/assets/index-BVHhSH8M.js +0 -155
- package/dist/client/assets/json-BESjz4hO.js +0 -1
- package/dist/client/assets/json-GXJs871j.js +0 -1
- package/dist/client/assets/json-syntax-highlighter-C3W2DACo.js +0 -2
- package/dist/client/assets/lazy-highlighter-C7qLCeM-.js +0 -4
- package/dist/client/assets/monitoring-_9gwma-O.js +0 -4
- package/dist/client/assets/prism-light-WCI-7yyK.js +0 -1
- package/dist/client/assets/useQuery-C3iXPPho.js +0 -1
package/dist/client/assets/{pin-to-sidebar-button-DonhySMf.js → pin-to-sidebar-button-DcWM6FTO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,c as v,j as n}from"./index-
|
|
1
|
+
import{r as _,c as v,j as n}from"./index-B9fZ40p9.js";import{B as z}from"./button-O0CudEuW.js";import{u as k,b as y,T as E,a as B,c as S}from"./tooltip-DaImUyOX.js";import{u as w,a as A}from"./use-organization-settings-jxyxG3Do.js";const C=({size:c=24,color:e="currentColor",...r})=>_.createElement("svg",{viewBox:"0 0 24 24",width:c,height:c,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},_.createElement("path",{d:"M12 15v7M8 7.308v2.13c0 .209 0 .313-.02.412a1.001 1.001 0 0 1-.09.254c-.045.09-.11.172-.24.334L6.08 12.4c-.666.833-.999 1.249-.999 1.599a1 1 0 0 0 .376.782C5.731 15 6.264 15 7.33 15h9.342c1.066 0 1.599 0 1.873-.219A1 1 0 0 0 18.92 14c0-.35-.333-.766-1-1.599l-1.569-1.962c-.13-.162-.195-.243-.241-.334a1.004 1.004 0 0 1-.09-.254C16 9.75 16 9.647 16 9.44V7.31c0-.116 0-.174.007-.23.006-.05.015-.1.029-.15a2.02 2.02 0 0 1 .079-.215l1.008-2.52c.294-.735.44-1.102.38-1.397a1 1 0 0 0-.427-.63C16.825 2 16.429 2 15.637 2H8.364c-.792 0-1.188 0-1.44.167a1 1 0 0 0-.426.63c-.06.295.086.662.38 1.397l1.008 2.52c.043.107.064.16.08.215a1 1 0 0 1 .028.15c.006.056.006.114.006.23Z"}));C.displayName="Pin01";function O(c){const e=v.c(19),{title:r,url:t,icon:f}=c,{org:P}=k(),i=w(P.id),h=A(P.id);let l;e[0]!==i?.sidebar_items||e[1]!==t?(l=i?.sidebar_items?.some(p=>p.url===t),e[0]=i?.sidebar_items,e[1]=t,e[2]=l):l=e[2];const a=!!l;let d;e[3]!==h.update||e[4]!==f||e[5]!==a||e[6]!==i?.sidebar_items||e[7]!==r||e[8]!==t?(d=async()=>{const p=i?.sidebar_items||[];let j;a?j=p.filter(T=>T.url!==t):j=[...p,{title:r,url:t,icon:f}],await h.update.mutateAsync({sidebar_items:j})},e[3]=h.update,e[4]=f,e[5]=a,e[6]=i?.sidebar_items,e[7]=r,e[8]=t,e[9]=d):d=e[9];const b=d,x=a?"secondary":"outline";let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(C,{size:16}),e[10]=m):m=e[10];let s;e[11]!==b||e[12]!==x?(s=n.jsx(y,{asChild:!0,children:n.jsx(z,{onClick:b,size:"icon",variant:x,className:"size-7 border border-input",children:m})}),e[11]=b,e[12]=x,e[13]=s):s=e[13];const g=a?"Pinned":"Pin to sidebar";let o;e[14]!==g?(o=n.jsx(E,{children:g}),e[14]=g,e[15]=o):o=e[15];let u;return e[16]!==s||e[17]!==o?(u=n.jsx(B,{children:n.jsxs(S,{children:[s,o]})}),e[16]=s,e[17]=o,e[18]=u):u=e[18],u}export{O as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,am as A,z as $,j as c,ap as z,H,av as L,Z as _,B as b,E as g,an as E,$ as j,ao as G,b3 as K,b4 as Z,b5 as q,b6 as B,b7 as U,aq as V,ar as W,as as J,c as R}from"./index-B9fZ40p9.js";import{c as Q}from"./button-O0CudEuW.js";var x="Popover",[w]=H(x,[A]),P=A(),[X,d]=w(x),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[m,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:x});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:L(),triggerRef:l,open:m,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=x;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(E,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),s=P(o),a=_(e,n.triggerRef),p=c.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(E,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=w(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=q("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=_(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(Z,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...m}=t,f=d(v,o),C=P(o);return B(),c.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(V,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(W,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...m,ref:e,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(k,o);return c.jsx(b.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,ue=M;function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{ve as P,ge as a,Pe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,c as oe,j as E,a6 as Pt}from"./index-BVHhSH8M.js";import{i as Ct}from"./tooltip-DiQ9SlNX.js";import{i as je}from"./CpuChip02-BkDt7iNK.js";import{i as It}from"./SearchMd-CGUWNVUr.js";import{I as Qe}from"./use-connection-DUMeVexv.js";import{R as Et,e as Rt,f as kt,g as Nt}from"./responsive-select-BZGantuu.js";import{c as Ie}from"./button-DMnSM5FV.js";import{u as Lt}from"./use-gateway-pQG4iSzq.js";const et=({size:t=24,color:e="currentColor",...n})=>d.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},d.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));et.displayName="DotsGrid";function At(){const t=oe.c(4),e=Lt();let n;t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=n.map($t),t[2]=n,t[3]=r):r=t[3],r}function $t(t){return{id:t.id,title:t.title,description:t.description??null,icon:t.icon??null,fallbackIcon:E.jsx(je,{})}}function Dt(t){const e=oe.c(24),{gateway:n,isSelected:r}=t,i=r&&"bg-accent";let o;e[0]!==i?(o=Ie("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",i),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n.fallbackIcon?(l=n.fallbackIcon??E.jsx(je,{}),e[2]=n.fallbackIcon,e[3]=l):l=e[3];let s;e[4]!==n.icon||e[5]!==n.title||e[6]!==l?(s=E.jsx(Qe,{icon:n.icon,name:n.title,size:"sm",fallbackIcon:l,className:"size-10"}),e[4]=n.icon,e[5]=n.title,e[6]=l,e[7]=s):s=e[7];let a;e[8]!==n.title?(a=E.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=a):a=e[9];let m;e[10]!==r?(m=r&&E.jsx(Ct,{size:16,className:"text-foreground shrink-0"}),e[10]=r,e[11]=m):m=e[11];let v;e[12]!==a||e[13]!==m?(v=E.jsxs("div",{className:"flex items-center justify-between",children:[a,m]}),e[12]=a,e[13]=m,e[14]=v):v=e[14];let u;e[15]!==n.description?(u=n.description&&E.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[15]=n.description,e[16]=u):u=e[16];let c;e[17]!==v||e[18]!==u?(c=E.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[v,u]}),e[17]=v,e[18]=u,e[19]=c):c=e[19];let g;return e[20]!==o||e[21]!==s||e[22]!==c?(g=E.jsxs("div",{className:o,children:[s,c]}),e[20]=o,e[21]=s,e[22]=c,e[23]=g):g=e[23],g}function Ht(t){const e=oe.c(12),{gateway:n}=t;if(!n){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=E.jsx("span",{className:"text-sm text-muted-foreground",children:"Select gateway"}),e[0]=s):s=e[0],s}let r;e[1]!==n.fallbackIcon?(r=n.fallbackIcon??E.jsx(je,{}),e[1]=n.fallbackIcon,e[2]=r):r=e[2];let i;e[3]!==n.icon||e[4]!==n.title||e[5]!==r?(i=E.jsx(Qe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=n.icon,e[4]=n.title,e[5]=r,e[6]=i):i=e[6];let o;e[7]!==n.title?(o=E.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.title}),e[7]=n.title,e[8]=o):o=e[8];let l;return e[9]!==i||e[10]!==o?(l=E.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[i,o]}),e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function yn(t){const e=oe.c(37),{selectedGatewayId:n,onGatewayChange:r,variant:i,className:o,placeholder:l}=t,s=i===void 0?"bordered":i,a=l===void 0?"Select Hub":l,[m,v]=d.useState(!1),u=At();let c;if(e[0]!==u||e[1]!==n){let A;e[3]!==n?(A=N=>N.id===n,e[3]=n,e[4]=A):A=e[4],c=u.find(A),e[0]=u,e[1]=n,e[2]=c}else c=e[2];const g=c;let x;e[5]!==r?(x=A=>{r(A),v(!1)},e[5]=r,e[6]=x):x=e[6];const C=x,I=n||"",b=s==="borderless"&&"border-0 md:border-none";let R;e[7]!==o||e[8]!==b?(R=Ie("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",b,o),e[7]=o,e[8]=b,e[9]=R):R=e[9];let L;e[10]!==g?(L=E.jsx(Ht,{gateway:g}),e[10]=g,e[11]=L):L=e[11];let D;e[12]!==a||e[13]!==L?(D=E.jsx(Et,{placeholder:a,className:"min-w-0 max-w-full",children:L}),e[12]=a,e[13]=L,e[14]=D):D=e[14];let T;e[15]!==R||e[16]!==D?(T=E.jsx(Rt,{size:"sm",className:R,children:D}),e[15]=R,e[16]=D,e[17]=T):T=e[17];let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=E.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:E.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[E.jsx(It,{size:16}),E.jsx("span",{className:"text-sm",children:"Search for a gateway..."})]})}),e[18]=k):k=e[18];let y;if(e[19]!==u||e[20]!==C||e[21]!==n){let A;e[23]!==C||e[24]!==n?(A=N=>E.jsx("div",{onClick:()=>C(N.id),className:"outline-none",children:E.jsx(Dt,{gateway:N,isSelected:N.id===n})},N.id),e[23]=C,e[24]=n,e[25]=A):A=e[25],y=u.map(A),e[19]=u,e[20]=C,e[21]=n,e[22]=y}else y=e[22];let j;e[26]!==y?(j=E.jsxs("div",{className:"flex flex-col max-h-[400px]",children:[k,E.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:y})]}),e[26]=y,e[27]=j):j=e[27];let V;e[28]!==a||e[29]!==j?(V=E.jsx(kt,{title:a,className:"w-full md:w-[400px] p-0",children:j}),e[28]=a,e[29]=j,e[30]=V):V=e[30];let G;return e[31]!==C||e[32]!==m||e[33]!==T||e[34]!==V||e[35]!==I?(G=E.jsxs(Nt,{open:m,onOpenChange:v,value:I,onValueChange:C,children:[T,V]}),e[31]=C,e[32]=m,e[33]=T,e[34]=V,e[35]=I,e[36]=G):G=e[36],G}const Ee=d.createContext(null);Ee.displayName="PanelGroupContext";const M={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ge=10,ne=d.useLayoutEffect,Ke=Pt.useId,Mt=typeof Ke=="function"?Ke:()=>null;let _t=0;function Be(t=null){const e=Mt(),n=d.useRef(t||e||null);return n.current===null&&(n.current=""+_t++),t??n.current}function tt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:s,minSize:a,onCollapse:m,onExpand:v,onResize:u,order:c,style:g,tagName:x="div",...C}){const I=d.useContext(Ee);if(I===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:R,getPanelSize:L,getPanelStyle:D,groupId:T,isPanelCollapsed:k,reevaluatePanelConstraints:y,registerPanel:j,resizePanel:V,unregisterPanel:G}=I,A=Be(l),N=d.useRef({callbacks:{onCollapse:m,onExpand:v,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:a},id:A,idIsFromProps:l!==void 0,order:c});d.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:W,constraints:B}=N.current,F={...B};N.current.id=A,N.current.idIsFromProps=l!==void 0,N.current.order=c,W.onCollapse=m,W.onExpand=v,W.onResize=u,B.collapsedSize=n,B.collapsible=r,B.defaultSize=i,B.maxSize=s,B.minSize=a,(F.collapsedSize!==B.collapsedSize||F.collapsible!==B.collapsible||F.maxSize!==B.maxSize||F.minSize!==B.minSize)&&y(N.current,F)}),ne(()=>{const W=N.current;return j(W),()=>{G(W)}},[c,A,j,G]),d.useImperativeHandle(o,()=>({collapse:()=>{b(N.current)},expand:W=>{R(N.current,W)},getId(){return A},getSize(){return L(N.current)},isCollapsed(){return k(N.current)},isExpanded(){return!k(N.current)},resize:W=>{V(N.current,W)}}),[b,R,L,k,A,V]);const Q=D(N.current,i);return d.createElement(x,{...C,children:t,className:e,id:A,style:{...Q,...g},[M.groupId]:T,[M.panel]:"",[M.panelCollapsible]:r||void 0,[M.panelId]:A,[M.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const nt=d.forwardRef((t,e)=>d.createElement(tt,{...t,forwardedRef:e}));tt.displayName="Panel";nt.displayName="forwardRef(Panel)";let _e=null,we=-1,Y=null;function jt(t,e){if(e){const n=(e&st)!==0,r=(e&at)!==0,i=(e&ct)!==0,o=(e&ut)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Gt(){Y!==null&&(document.head.removeChild(Y),_e=null,Y=null,we=-1)}function Ae(t,e){var n,r;const i=jt(t,e);if(_e!==i){if(_e=i,Y===null&&(Y=document.createElement("style"),document.head.appendChild(Y)),we>=0){var o;(o=Y.sheet)===null||o===void 0||o.removeRule(we)}we=(n=(r=Y.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function rt(t){return t.type==="keydown"}function ot(t){return t.type.startsWith("pointer")}function it(t){return t.type.startsWith("mouse")}function Re(t){if(ot(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(it(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Bt(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Tt(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Vt(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ze(t),b:Ze(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;w(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Oe(Ue(n.a)),b:Oe(Ue(n.b))};if(i.a===i.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const a=o[s];if(a===l.a)return 1;if(a===l.b)return-1}}return Math.sign(i.a-i.b)}const Wt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ft(t){var e;const n=getComputedStyle((e=lt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kt(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ft(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Wt.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ue(t){let e=t.length;for(;e--;){const n=t[e];if(w(n,"Missing node"),Kt(n))return n}return null}function Oe(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ze(t){const e=[];for(;t;)e.push(t),t=lt(t);return e}function lt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const st=1,at=2,ct=4,ut=8,Ut=Bt()==="coarse";let Z=[],ce=!1,te=new Map,ke=new Map;const ye=new Set;function Ot(t,e,n,r,i){var o;const{ownerDocument:l}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},a=(o=te.get(l))!==null&&o!==void 0?o:0;return te.set(l,a+1),ye.add(s),Pe(),function(){var v;ke.delete(t),ye.delete(s);const u=(v=te.get(l))!==null&&v!==void 0?v:1;if(te.set(l,u-1),Pe(),u===1&&te.delete(l),Z.includes(s)){const c=Z.indexOf(s);c>=0&&Z.splice(c,1),Ve(),i("up",!0,null)}}}function Zt(t){const{target:e}=t,{x:n,y:r}=Re(t);ce=!0,Te({target:e,x:n,y:r}),Pe(),Z.length>0&&(Ce("down",t),t.preventDefault(),ft(e)||t.stopImmediatePropagation())}function $e(t){const{x:e,y:n}=Re(t);if(ce&&t.buttons===0&&(ce=!1,Ce("up",t)),!ce){const{target:r}=t;Te({target:r,x:e,y:n})}Ce("move",t),Ve(),Z.length>0&&t.preventDefault()}function De(t){const{target:e}=t,{x:n,y:r}=Re(t);ke.clear(),ce=!1,Z.length>0&&(t.preventDefault(),ft(e)||t.stopImmediatePropagation()),Ce("up",t),Te({target:e,x:n,y:r}),Ve(),Pe()}function ft(t){let e=t;for(;e;){if(e.hasAttribute(M.resizeHandle))return!0;e=e.parentElement}return!1}function Te({target:t,x:e,y:n}){Z.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),ye.forEach(i=>{const{element:o,hitAreaMargins:l}=i,s=o.getBoundingClientRect(),{bottom:a,left:m,right:v,top:u}=s,c=Ut?l.coarse:l.fine;if(e>=m-c&&e<=v+c&&n>=u-c&&n<=a+c){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Vt(r,o)>0){let x=r,C=!1;for(;x&&!x.contains(o);){if(Tt(x.getBoundingClientRect(),s)){C=!0;break}x=x.parentElement}if(C)return}Z.push(i)}})}function He(t,e){ke.set(t,e)}function Ve(){let t=!1,e=!1;Z.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;ke.forEach(r=>{n|=r}),t&&e?Ae("intersection",n):t?Ae("horizontal",n):e?Ae("vertical",n):Gt()}let Me=new AbortController;function Pe(){Me.abort(),Me=new AbortController;const t={capture:!0,signal:Me.signal};ye.size&&(ce?(Z.length>0&&te.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",De,t),r.addEventListener("pointerleave",$e,t),r.addEventListener("pointermove",$e,t))}),window.addEventListener("pointerup",De,t),window.addEventListener("pointercancel",De,t)):te.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Zt,t),r.addEventListener("pointermove",$e,t))}))}function Ce(t,e){ye.forEach(n=>{const{setResizeHandlerState:r}=n,i=Z.includes(n);r(t,i,e)})}function qt(){const[t,e]=d.useState(0);return d.useCallback(()=>e(n=>n+1),[])}function w(t,e){if(!t)throw console.error(e),Error(e)}function re(t,e,n=Ge){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function J(t,e,n=Ge){return re(t,e,n)===0}function U(t,e,n){return re(t,e,n)===0}function Xt(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!U(i,o,n))return!1}return!0}function ae({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];w(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:s=0}=r;if(re(n,s)<0)if(o){const a=(i+s)/2;re(n,a)<0?n=i:n=s}else n=s;return n=Math.min(l,n),n=parseFloat(n.toFixed(Ge)),n}function xe({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(U(t,0))return e;const l=[...e],[s,a]=r;w(s!=null,"Invalid first pivot index"),w(a!=null,"Invalid second pivot index");let m=0;if(o==="keyboard"){{const u=t<0?a:s,c=n[u];w(c,`Panel constraints not found for index ${u}`);const{collapsedSize:g=0,collapsible:x,minSize:C=0}=c;if(x){const I=e[u];if(w(I!=null,`Previous layout not found for panel index ${u}`),U(I,g)){const b=C-I;re(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}{const u=t<0?s:a,c=n[u];w(c,`No panel constraints found for index ${u}`);const{collapsedSize:g=0,collapsible:x,minSize:C=0}=c;if(x){const I=e[u];if(w(I!=null,`Previous layout not found for panel index ${u}`),U(I,C)){const b=I-g;re(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}}{const u=t<0?1:-1;let c=t<0?a:s,g=0;for(;;){const C=e[c];w(C!=null,`Previous layout not found for panel index ${c}`);const b=ae({panelConstraints:n,panelIndex:c,size:100})-C;if(g+=b,c+=u,c<0||c>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-x:x}{let c=t<0?s:a;for(;c>=0&&c<n.length;){const g=Math.abs(t)-Math.abs(m),x=e[c];w(x!=null,`Previous layout not found for panel index ${c}`);const C=x-g,I=ae({panelConstraints:n,panelIndex:c,size:C});if(!U(x,I)&&(m+=x-I,l[c]=I,m.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?c--:c++}}if(Xt(i,l))return i;{const u=t<0?a:s,c=e[u];w(c!=null,`Previous layout not found for panel index ${u}`);const g=c+m,x=ae({panelConstraints:n,panelIndex:u,size:g});if(l[u]=x,!U(x,g)){let C=g-x,b=t<0?a:s;for(;b>=0&&b<n.length;){const R=l[b];w(R!=null,`Previous layout not found for panel index ${b}`);const L=R+C,D=ae({panelConstraints:n,panelIndex:b,size:L});if(U(R,D)||(C-=D-R,l[b]=D),U(C,0))break;t>0?b--:b++}}}const v=l.reduce((u,c)=>c+u,0);return U(v,100)?l:i}function Jt({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,l=0;const s=n[0];w(s!=null,"No pivot index found"),e.forEach((u,c)=>{const{constraints:g}=u,{maxSize:x=100,minSize:C=0}=g;c===s?(r=C,i=x):(o+=C,l+=x)});const a=Math.min(i,100-o),m=Math.max(r,100-l),v=t[s];return{valueMax:a,valueMin:m,valueNow:v}}function ze(t,e=document){return Array.from(e.querySelectorAll(`[${M.resizeHandleId}][data-panel-group-id="${t}"]`))}function dt(t,e,n=document){const i=ze(t,n).findIndex(o=>o.getAttribute(M.resizeHandleId)===e);return i??null}function pt(t,e,n){const r=dt(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function mt(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Ne(t,e=document){const n=e.querySelector(`[${M.resizeHandleId}="${t}"]`);return n||null}function Yt(t,e,n,r=document){var i,o,l,s;const a=Ne(e,r),m=ze(t,r),v=a?m.indexOf(a):-1,u=(i=(o=n[v])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,c=(l=(s=n[v+1])===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:null;return[u,c]}function Qt({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){d.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const s=ze(n,o);for(let a=0;a<i.length-1;a++){const{valueMax:m,valueMin:v,valueNow:u}=Jt({layout:r,panelsArray:i,pivotIndices:[a,a+1]}),c=s[a];if(c!=null){const g=i[a];w(g,`No panel data found for index "${a}"`),c.setAttribute("aria-controls",g.id),c.setAttribute("aria-valuemax",""+Math.round(m)),c.setAttribute("aria-valuemin",""+Math.round(v)),c.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{s.forEach((a,m)=>{a.removeAttribute("aria-controls"),a.removeAttribute("aria-valuemax"),a.removeAttribute("aria-valuemin"),a.removeAttribute("aria-valuenow")})}},[n,r,i,o]),d.useEffect(()=>{if(!o)return;const s=e.current;w(s,"Eager values not found");const{panelDataArray:a}=s,m=mt(n,o);w(m!=null,`No group found for id "${n}"`);const v=ze(n,o);w(v,`No resize handles found for group id "${n}"`);const u=v.map(c=>{const g=c.getAttribute(M.resizeHandleId);w(g,"Resize handle element has no handle id attribute");const[x,C]=Yt(n,g,a,o);if(x==null||C==null)return()=>{};const I=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const R=a.findIndex(L=>L.id===x);if(R>=0){const L=a[R];w(L,`No panel data found for index ${R}`);const D=r[R],{collapsedSize:T=0,collapsible:k,minSize:y=0}=L.constraints;if(D!=null&&k){const j=xe({delta:U(D,T)?y-T:T-D,initialLayout:r,panelConstraints:a.map(V=>V.constraints),pivotIndices:pt(n,g,o),prevLayout:r,trigger:"keyboard"});r!==j&&l(j)}}break}}};return c.addEventListener("keydown",I),()=>{c.removeEventListener("keydown",I)}});return()=>{u.forEach(c=>c())}},[o,t,e,n,r,i,l])}function qe(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function gt(t,e){const n=t==="horizontal",{x:r,y:i}=Re(e);return n?r:i}function en(t,e,n,r,i){const o=n==="horizontal",l=Ne(e,i);w(l,`No resize handle element found for id "${e}"`);const s=l.getAttribute(M.groupId);w(s,"Resize handle element has no group id attribute");let{initialCursorPosition:a}=r;const m=gt(n,t),v=mt(s,i);w(v,`No group element found for id "${s}"`);const u=v.getBoundingClientRect(),c=o?u.width:u.height;return(m-a)/c*100}function tn(t,e,n,r,i,o){if(rt(t)){const l=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let a=0;switch(t.key){case"ArrowDown":a=l?0:s;break;case"ArrowLeft":a=l?-s:0;break;case"ArrowRight":a=l?s:0;break;case"ArrowUp":a=l?0:-s;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return r==null?0:en(t,e,n,r,o)}function nn({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const l=n[o];w(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const l=n[o];w(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;if(s!=null)continue;const a=t.length-r,m=i/a;r++,e[o]=m,i-=m}return e}function le(t,e,n){e.forEach((r,i)=>{const o=t[i];w(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:s,id:a}=o,{collapsedSize:m=0,collapsible:v}=s,u=n[a];if(u==null||r!==u){n[a]=r;const{onCollapse:c,onExpand:g,onResize:x}=l;x&&x(r,u),v&&(c||g)&&(g&&(u==null||J(u,m))&&!J(r,m)&&g(),c&&(u==null||!J(u,m))&&J(r,m)&&c())}})}function Se(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function rn({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const l=n[i];let s;return l==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=l.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function on(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Xe(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function xt(t){return`react-resizable-panels:${t}`}function ht(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function yt(t,e){try{const n=xt(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function ln(t,e,n){var r,i;const o=(r=yt(t,n))!==null&&r!==void 0?r:{},l=ht(e);return(i=o[l])!==null&&i!==void 0?i:null}function sn(t,e,n,r,i){var o;const l=xt(t),s=ht(e),a=(o=yt(t,i))!==null&&o!==void 0?o:{};a[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(l,JSON.stringify(a))}catch(m){console.error(m)}}function Je({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,l)=>o+l,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!U(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=100/r*l;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=ae({panelConstraints:e,panelIndex:o,size:l});l!=s&&(i+=l-s,n[o]=s)}if(!U(i,0))for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=l+i,a=ae({panelConstraints:e,panelIndex:o,size:s});if(l!==a&&(i-=a-l,n[o]=a,U(i,0)))break}return n}const an=100,he={getItem:t=>(Xe(he),he.getItem(t)),setItem:(t,e)=>{Xe(he),he.setItem(t,e)}},Ye={};function zt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:s=null,storage:a=he,style:m,tagName:v="div",...u}){const c=Be(o),g=d.useRef(null),[x,C]=d.useState(null),[I,b]=d.useState([]),R=qt(),L=d.useRef({}),D=d.useRef(new Map),T=d.useRef(0),k=d.useRef({autoSaveId:t,direction:r,dragState:x,id:c,keyboardResizeBy:s,onLayout:l,storage:a}),y=d.useRef({layout:I,panelDataArray:[],panelDataArrayChanged:!1});d.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),d.useImperativeHandle(i,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:f}=y.current;return f},setLayout:f=>{const{onLayout:z}=k.current,{layout:P,panelDataArray:h}=y.current,p=Je({layout:f,panelConstraints:h.map(S=>S.constraints)});qe(P,p)||(b(p),y.current.layout=p,z&&z(p),le(h,p,L.current))}}),[]),ne(()=>{k.current.autoSaveId=t,k.current.direction=r,k.current.dragState=x,k.current.id=c,k.current.onLayout=l,k.current.storage=a}),Qt({committedValuesRef:k,eagerValuesRef:y,groupId:c,layout:I,panelDataArray:y.current.panelDataArray,setLayout:b,panelGroupElement:g.current}),d.useEffect(()=>{const{panelDataArray:f}=y.current;if(t){if(I.length===0||I.length!==f.length)return;let z=Ye[t];z==null&&(z=on(sn,an),Ye[t]=z);const P=[...f],h=new Map(D.current);z(t,P,h,I,a)}},[t,I,a]),d.useEffect(()=>{});const j=d.useCallback(f=>{const{onLayout:z}=k.current,{layout:P,panelDataArray:h}=y.current;if(f.constraints.collapsible){const p=h.map(q=>q.constraints),{collapsedSize:S=0,panelSize:$,pivotIndices:_}=ee(h,f,P);if(w($!=null,`Panel size not found for panel "${f.id}"`),!J($,S)){D.current.set(f.id,$);const X=se(h,f)===h.length-1?$-S:S-$,H=xe({delta:X,initialLayout:P,panelConstraints:p,pivotIndices:_,prevLayout:P,trigger:"imperative-api"});Se(P,H)||(b(H),y.current.layout=H,z&&z(H),le(h,H,L.current))}}},[]),V=d.useCallback((f,z)=>{const{onLayout:P}=k.current,{layout:h,panelDataArray:p}=y.current;if(f.constraints.collapsible){const S=p.map(O=>O.constraints),{collapsedSize:$=0,panelSize:_=0,minSize:q=0,pivotIndices:X}=ee(p,f,h),H=z??q;if(J(_,$)){const O=D.current.get(f.id),me=O!=null&&O>=H?O:H,Le=se(p,f)===p.length-1?_-me:me-_,K=xe({delta:Le,initialLayout:h,panelConstraints:S,pivotIndices:X,prevLayout:h,trigger:"imperative-api"});Se(h,K)||(b(K),y.current.layout=K,P&&P(K),le(p,K,L.current))}}},[]),G=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{panelSize:h}=ee(P,f,z);return w(h!=null,`Panel size not found for panel "${f.id}"`),h},[]),A=d.useCallback((f,z)=>{const{panelDataArray:P}=y.current,h=se(P,f);return rn({defaultSize:z,dragState:x,layout:I,panelData:P,panelIndex:h})},[x,I]),N=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{collapsedSize:h=0,collapsible:p,panelSize:S}=ee(P,f,z);return w(S!=null,`Panel size not found for panel "${f.id}"`),p===!0&&J(S,h)},[]),Q=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{collapsedSize:h=0,collapsible:p,panelSize:S}=ee(P,f,z);return w(S!=null,`Panel size not found for panel "${f.id}"`),!p||re(S,h)>0},[]),W=d.useCallback(f=>{const{panelDataArray:z}=y.current;z.push(f),z.sort((P,h)=>{const p=P.order,S=h.order;return p==null&&S==null?0:p==null?-1:S==null?1:p-S}),y.current.panelDataArrayChanged=!0,R()},[R]);ne(()=>{if(y.current.panelDataArrayChanged){y.current.panelDataArrayChanged=!1;const{autoSaveId:f,onLayout:z,storage:P}=k.current,{layout:h,panelDataArray:p}=y.current;let S=null;if(f){const _=ln(f,p,P);_&&(D.current=new Map(Object.entries(_.expandToSizes)),S=_.layout)}S==null&&(S=nn({panelDataArray:p}));const $=Je({layout:S,panelConstraints:p.map(_=>_.constraints)});qe(h,$)||(b($),y.current.layout=$,z&&z($),le(p,$,L.current))}}),ne(()=>{const f=y.current;return()=>{f.layout=[]}},[]);const B=d.useCallback(f=>{let z=!1;const P=g.current;return P&&window.getComputedStyle(P,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(p){p.preventDefault();const S=g.current;if(!S)return()=>null;const{direction:$,dragState:_,id:q,keyboardResizeBy:X,onLayout:H}=k.current,{layout:O,panelDataArray:me}=y.current,{initialLayout:be}=_??{},Le=pt(q,f,S);let K=tn(p,f,$,_,X,S);const We=$==="horizontal";We&&z&&(K=-K);const St=me.map(wt=>wt.constraints),ge=xe({delta:K,initialLayout:be??O,panelConstraints:St,pivotIndices:Le,prevLayout:O,trigger:rt(p)?"keyboard":"mouse-or-touch"}),Fe=!Se(O,ge);(ot(p)||it(p))&&T.current!=K&&(T.current=K,!Fe&&K!==0?We?He(f,K<0?st:at):He(f,K<0?ct:ut):He(f,0)),Fe&&(b(ge),y.current.layout=ge,H&&H(ge),le(me,ge,L.current))}},[]),F=d.useCallback((f,z)=>{const{onLayout:P}=k.current,{layout:h,panelDataArray:p}=y.current,S=p.map(O=>O.constraints),{panelSize:$,pivotIndices:_}=ee(p,f,h);w($!=null,`Panel size not found for panel "${f.id}"`);const X=se(p,f)===p.length-1?$-z:z-$,H=xe({delta:X,initialLayout:h,panelConstraints:S,pivotIndices:_,prevLayout:h,trigger:"imperative-api"});Se(h,H)||(b(H),y.current.layout=H,P&&P(H),le(p,H,L.current))},[]),ue=d.useCallback((f,z)=>{const{layout:P,panelDataArray:h}=y.current,{collapsedSize:p=0,collapsible:S}=z,{collapsedSize:$=0,collapsible:_,maxSize:q=100,minSize:X=0}=f.constraints,{panelSize:H}=ee(h,f,P);H!=null&&(S&&_&&J(H,p)?J(p,$)||F(f,$):H<X?F(f,X):H>q&&F(f,q))},[F]),fe=d.useCallback((f,z)=>{const{direction:P}=k.current,{layout:h}=y.current;if(!g.current)return;const p=Ne(f,g.current);w(p,`Drag handle element not found for id "${f}"`);const S=gt(P,z);C({dragHandleId:f,dragHandleRect:p.getBoundingClientRect(),initialCursorPosition:S,initialLayout:h})},[]),de=d.useCallback(()=>{C(null)},[]),ve=d.useCallback(f=>{const{panelDataArray:z}=y.current,P=se(z,f);P>=0&&(z.splice(P,1),delete L.current[f.id],y.current.panelDataArrayChanged=!0,R())},[R]),ie=d.useMemo(()=>({collapsePanel:j,direction:r,dragState:x,expandPanel:V,getPanelSize:G,getPanelStyle:A,groupId:c,isPanelCollapsed:N,isPanelExpanded:Q,reevaluatePanelConstraints:ue,registerPanel:W,registerResizeHandle:B,resizePanel:F,startDragging:fe,stopDragging:de,unregisterPanel:ve,panelGroupElement:g.current}),[j,x,r,V,G,A,c,N,Q,ue,W,B,F,fe,de,ve]),pe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return d.createElement(Ee.Provider,{value:ie},d.createElement(v,{...u,children:e,className:n,id:o,ref:g,style:{...pe,...m},[M.group]:"",[M.groupDirection]:r,[M.groupId]:c}))}const vt=d.forwardRef((t,e)=>d.createElement(zt,{...t,forwardedRef:e}));zt.displayName="PanelGroup";vt.displayName="forwardRef(PanelGroup)";function se(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ee(t,e,n){const r=se(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],l=n[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function cn({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){d.useEffect(()=>{if(t||n==null||r==null)return;const i=Ne(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const s=i.getAttribute(M.groupId);w(s,`No group element found for id "${s}"`);const a=ze(s,r),m=dt(s,e,r);w(m!==null,`No resize element found for id "${e}"`);const v=l.shiftKey?m>0?m-1:a.length-1:m+1<a.length?m+1:0;a[v].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function bt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:s,onFocus:a,onPointerDown:m,onPointerUp:v,style:u={},tabIndex:c=0,tagName:g="div",...x}){var C,I;const b=d.useRef(null),R=d.useRef({onClick:l,onDragging:s,onPointerDown:m,onPointerUp:v});d.useEffect(()=>{R.current.onClick=l,R.current.onDragging=s,R.current.onPointerDown=m,R.current.onPointerUp=v});const L=d.useContext(Ee);if(L===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:T,registerResizeHandle:k,startDragging:y,stopDragging:j,panelGroupElement:V}=L,G=Be(i),[A,N]=d.useState("inactive"),[Q,W]=d.useState(!1),[B,F]=d.useState(null),ue=d.useRef({state:A});ne(()=>{ue.current.state=A}),d.useEffect(()=>{if(n)F(null);else{const ie=k(G);F(()=>ie)}},[n,G,k]);const fe=(C=r?.coarse)!==null&&C!==void 0?C:15,de=(I=r?.fine)!==null&&I!==void 0?I:5;d.useEffect(()=>{if(n||B==null)return;const ie=b.current;w(ie,"Element ref not attached");let pe=!1;return Ot(G,ie,D,{coarse:fe,fine:de},(z,P,h)=>{if(!P){N("inactive");return}switch(z){case"down":{N("drag"),pe=!1,w(h,'Expected event to be defined for "down" action'),y(G,h);const{onDragging:p,onPointerDown:S}=R.current;p?.(!0),S?.();break}case"move":{const{state:p}=ue.current;pe=!0,p!=="drag"&&N("hover"),w(h,'Expected event to be defined for "move" action'),B(h);break}case"up":{N("hover"),j();const{onClick:p,onDragging:S,onPointerUp:$}=R.current;S?.(!1),$?.(),pe||p?.();break}}})},[fe,D,n,de,k,G,B,y,j]),cn({disabled:n,handleId:G,resizeHandler:B,panelGroupElement:V});const ve={touchAction:"none",userSelect:"none"};return d.createElement(g,{...x,children:t,className:e,id:i,onBlur:()=>{W(!1),o?.()},onFocus:()=>{W(!0),a?.()},ref:b,role:"separator",style:{...ve,...u},tabIndex:c,[M.groupDirection]:D,[M.groupId]:T,[M.resizeHandle]:"",[M.resizeHandleActive]:A==="drag"?"pointer":Q?"keyboard":void 0,[M.resizeHandleEnabled]:!n,[M.resizeHandleId]:G,[M.resizeHandleState]:A})}bt.displayName="PanelResizeHandle";function zn(t){const e=oe.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=Ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=E.jsx(vt,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function vn(t){const e=oe.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(nt,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function bn(t){const e=oe.c(12);let n,r,i;e[0]!==t?({withHandle:i,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let o;e[4]!==n?(o=Ie("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&E.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:E.jsx(et,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let s;return e[8]!==r||e[9]!==o||e[10]!==l?(s=E.jsx(bt,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=s):s=e[11],s}export{yn as G,vn as R,bn as a,zn as b,At as u};
|
|
1
|
+
import{r as d,c as oe,j as E,a6 as Pt}from"./index-B9fZ40p9.js";import{i as Ct}from"./tooltip-DaImUyOX.js";import{i as je}from"./CpuChip02-qVpLCR0_.js";import{i as It}from"./SearchMd-BJbLhbUT.js";import{I as Qe}from"./use-connection-9XNP6qUi.js";import{R as Et,e as Rt,f as kt,g as Nt}from"./responsive-select-BbaQnOfE.js";import{c as Ie}from"./button-O0CudEuW.js";import{u as Lt}from"./use-gateway-BU92tNo7.js";const et=({size:t=24,color:e="currentColor",...n})=>d.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},d.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));et.displayName="DotsGrid";function At(){const t=oe.c(4),e=Lt();let n;t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=n.map($t),t[2]=n,t[3]=r):r=t[3],r}function $t(t){return{id:t.id,title:t.title,description:t.description??null,icon:t.icon??null,fallbackIcon:E.jsx(je,{})}}function Dt(t){const e=oe.c(24),{gateway:n,isSelected:r}=t,i=r&&"bg-accent";let o;e[0]!==i?(o=Ie("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",i),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n.fallbackIcon?(l=n.fallbackIcon??E.jsx(je,{}),e[2]=n.fallbackIcon,e[3]=l):l=e[3];let s;e[4]!==n.icon||e[5]!==n.title||e[6]!==l?(s=E.jsx(Qe,{icon:n.icon,name:n.title,size:"sm",fallbackIcon:l,className:"size-10"}),e[4]=n.icon,e[5]=n.title,e[6]=l,e[7]=s):s=e[7];let a;e[8]!==n.title?(a=E.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=a):a=e[9];let m;e[10]!==r?(m=r&&E.jsx(Ct,{size:16,className:"text-foreground shrink-0"}),e[10]=r,e[11]=m):m=e[11];let v;e[12]!==a||e[13]!==m?(v=E.jsxs("div",{className:"flex items-center justify-between",children:[a,m]}),e[12]=a,e[13]=m,e[14]=v):v=e[14];let u;e[15]!==n.description?(u=n.description&&E.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[15]=n.description,e[16]=u):u=e[16];let c;e[17]!==v||e[18]!==u?(c=E.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[v,u]}),e[17]=v,e[18]=u,e[19]=c):c=e[19];let g;return e[20]!==o||e[21]!==s||e[22]!==c?(g=E.jsxs("div",{className:o,children:[s,c]}),e[20]=o,e[21]=s,e[22]=c,e[23]=g):g=e[23],g}function Ht(t){const e=oe.c(12),{gateway:n}=t;if(!n){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=E.jsx("span",{className:"text-sm text-muted-foreground",children:"Select gateway"}),e[0]=s):s=e[0],s}let r;e[1]!==n.fallbackIcon?(r=n.fallbackIcon??E.jsx(je,{}),e[1]=n.fallbackIcon,e[2]=r):r=e[2];let i;e[3]!==n.icon||e[4]!==n.title||e[5]!==r?(i=E.jsx(Qe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=n.icon,e[4]=n.title,e[5]=r,e[6]=i):i=e[6];let o;e[7]!==n.title?(o=E.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.title}),e[7]=n.title,e[8]=o):o=e[8];let l;return e[9]!==i||e[10]!==o?(l=E.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[i,o]}),e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function yn(t){const e=oe.c(37),{selectedGatewayId:n,onGatewayChange:r,variant:i,className:o,placeholder:l}=t,s=i===void 0?"bordered":i,a=l===void 0?"Select Hub":l,[m,v]=d.useState(!1),u=At();let c;if(e[0]!==u||e[1]!==n){let A;e[3]!==n?(A=N=>N.id===n,e[3]=n,e[4]=A):A=e[4],c=u.find(A),e[0]=u,e[1]=n,e[2]=c}else c=e[2];const g=c;let x;e[5]!==r?(x=A=>{r(A),v(!1)},e[5]=r,e[6]=x):x=e[6];const C=x,I=n||"",b=s==="borderless"&&"border-0 md:border-none";let R;e[7]!==o||e[8]!==b?(R=Ie("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",b,o),e[7]=o,e[8]=b,e[9]=R):R=e[9];let L;e[10]!==g?(L=E.jsx(Ht,{gateway:g}),e[10]=g,e[11]=L):L=e[11];let D;e[12]!==a||e[13]!==L?(D=E.jsx(Et,{placeholder:a,className:"min-w-0 max-w-full",children:L}),e[12]=a,e[13]=L,e[14]=D):D=e[14];let T;e[15]!==R||e[16]!==D?(T=E.jsx(Rt,{size:"sm",className:R,children:D}),e[15]=R,e[16]=D,e[17]=T):T=e[17];let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=E.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:E.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[E.jsx(It,{size:16}),E.jsx("span",{className:"text-sm",children:"Search for a gateway..."})]})}),e[18]=k):k=e[18];let y;if(e[19]!==u||e[20]!==C||e[21]!==n){let A;e[23]!==C||e[24]!==n?(A=N=>E.jsx("div",{onClick:()=>C(N.id),className:"outline-none",children:E.jsx(Dt,{gateway:N,isSelected:N.id===n})},N.id),e[23]=C,e[24]=n,e[25]=A):A=e[25],y=u.map(A),e[19]=u,e[20]=C,e[21]=n,e[22]=y}else y=e[22];let j;e[26]!==y?(j=E.jsxs("div",{className:"flex flex-col max-h-[400px]",children:[k,E.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:y})]}),e[26]=y,e[27]=j):j=e[27];let V;e[28]!==a||e[29]!==j?(V=E.jsx(kt,{title:a,className:"w-full md:w-[400px] p-0",children:j}),e[28]=a,e[29]=j,e[30]=V):V=e[30];let G;return e[31]!==C||e[32]!==m||e[33]!==T||e[34]!==V||e[35]!==I?(G=E.jsxs(Nt,{open:m,onOpenChange:v,value:I,onValueChange:C,children:[T,V]}),e[31]=C,e[32]=m,e[33]=T,e[34]=V,e[35]=I,e[36]=G):G=e[36],G}const Ee=d.createContext(null);Ee.displayName="PanelGroupContext";const M={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ge=10,ne=d.useLayoutEffect,Ke=Pt.useId,Mt=typeof Ke=="function"?Ke:()=>null;let _t=0;function Be(t=null){const e=Mt(),n=d.useRef(t||e||null);return n.current===null&&(n.current=""+_t++),t??n.current}function tt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:s,minSize:a,onCollapse:m,onExpand:v,onResize:u,order:c,style:g,tagName:x="div",...C}){const I=d.useContext(Ee);if(I===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:R,getPanelSize:L,getPanelStyle:D,groupId:T,isPanelCollapsed:k,reevaluatePanelConstraints:y,registerPanel:j,resizePanel:V,unregisterPanel:G}=I,A=Be(l),N=d.useRef({callbacks:{onCollapse:m,onExpand:v,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:a},id:A,idIsFromProps:l!==void 0,order:c});d.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:W,constraints:B}=N.current,F={...B};N.current.id=A,N.current.idIsFromProps=l!==void 0,N.current.order=c,W.onCollapse=m,W.onExpand=v,W.onResize=u,B.collapsedSize=n,B.collapsible=r,B.defaultSize=i,B.maxSize=s,B.minSize=a,(F.collapsedSize!==B.collapsedSize||F.collapsible!==B.collapsible||F.maxSize!==B.maxSize||F.minSize!==B.minSize)&&y(N.current,F)}),ne(()=>{const W=N.current;return j(W),()=>{G(W)}},[c,A,j,G]),d.useImperativeHandle(o,()=>({collapse:()=>{b(N.current)},expand:W=>{R(N.current,W)},getId(){return A},getSize(){return L(N.current)},isCollapsed(){return k(N.current)},isExpanded(){return!k(N.current)},resize:W=>{V(N.current,W)}}),[b,R,L,k,A,V]);const Q=D(N.current,i);return d.createElement(x,{...C,children:t,className:e,id:A,style:{...Q,...g},[M.groupId]:T,[M.panel]:"",[M.panelCollapsible]:r||void 0,[M.panelId]:A,[M.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const nt=d.forwardRef((t,e)=>d.createElement(tt,{...t,forwardedRef:e}));tt.displayName="Panel";nt.displayName="forwardRef(Panel)";let _e=null,we=-1,Y=null;function jt(t,e){if(e){const n=(e&st)!==0,r=(e&at)!==0,i=(e&ct)!==0,o=(e&ut)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Gt(){Y!==null&&(document.head.removeChild(Y),_e=null,Y=null,we=-1)}function Ae(t,e){var n,r;const i=jt(t,e);if(_e!==i){if(_e=i,Y===null&&(Y=document.createElement("style"),document.head.appendChild(Y)),we>=0){var o;(o=Y.sheet)===null||o===void 0||o.removeRule(we)}we=(n=(r=Y.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function rt(t){return t.type==="keydown"}function ot(t){return t.type.startsWith("pointer")}function it(t){return t.type.startsWith("mouse")}function Re(t){if(ot(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(it(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Bt(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Tt(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Vt(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ze(t),b:Ze(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;w(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Oe(Ue(n.a)),b:Oe(Ue(n.b))};if(i.a===i.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const a=o[s];if(a===l.a)return 1;if(a===l.b)return-1}}return Math.sign(i.a-i.b)}const Wt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ft(t){var e;const n=getComputedStyle((e=lt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kt(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ft(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Wt.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ue(t){let e=t.length;for(;e--;){const n=t[e];if(w(n,"Missing node"),Kt(n))return n}return null}function Oe(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ze(t){const e=[];for(;t;)e.push(t),t=lt(t);return e}function lt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const st=1,at=2,ct=4,ut=8,Ut=Bt()==="coarse";let Z=[],ce=!1,te=new Map,ke=new Map;const ye=new Set;function Ot(t,e,n,r,i){var o;const{ownerDocument:l}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},a=(o=te.get(l))!==null&&o!==void 0?o:0;return te.set(l,a+1),ye.add(s),Pe(),function(){var v;ke.delete(t),ye.delete(s);const u=(v=te.get(l))!==null&&v!==void 0?v:1;if(te.set(l,u-1),Pe(),u===1&&te.delete(l),Z.includes(s)){const c=Z.indexOf(s);c>=0&&Z.splice(c,1),Ve(),i("up",!0,null)}}}function Zt(t){const{target:e}=t,{x:n,y:r}=Re(t);ce=!0,Te({target:e,x:n,y:r}),Pe(),Z.length>0&&(Ce("down",t),t.preventDefault(),ft(e)||t.stopImmediatePropagation())}function $e(t){const{x:e,y:n}=Re(t);if(ce&&t.buttons===0&&(ce=!1,Ce("up",t)),!ce){const{target:r}=t;Te({target:r,x:e,y:n})}Ce("move",t),Ve(),Z.length>0&&t.preventDefault()}function De(t){const{target:e}=t,{x:n,y:r}=Re(t);ke.clear(),ce=!1,Z.length>0&&(t.preventDefault(),ft(e)||t.stopImmediatePropagation()),Ce("up",t),Te({target:e,x:n,y:r}),Ve(),Pe()}function ft(t){let e=t;for(;e;){if(e.hasAttribute(M.resizeHandle))return!0;e=e.parentElement}return!1}function Te({target:t,x:e,y:n}){Z.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),ye.forEach(i=>{const{element:o,hitAreaMargins:l}=i,s=o.getBoundingClientRect(),{bottom:a,left:m,right:v,top:u}=s,c=Ut?l.coarse:l.fine;if(e>=m-c&&e<=v+c&&n>=u-c&&n<=a+c){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Vt(r,o)>0){let x=r,C=!1;for(;x&&!x.contains(o);){if(Tt(x.getBoundingClientRect(),s)){C=!0;break}x=x.parentElement}if(C)return}Z.push(i)}})}function He(t,e){ke.set(t,e)}function Ve(){let t=!1,e=!1;Z.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;ke.forEach(r=>{n|=r}),t&&e?Ae("intersection",n):t?Ae("horizontal",n):e?Ae("vertical",n):Gt()}let Me=new AbortController;function Pe(){Me.abort(),Me=new AbortController;const t={capture:!0,signal:Me.signal};ye.size&&(ce?(Z.length>0&&te.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",De,t),r.addEventListener("pointerleave",$e,t),r.addEventListener("pointermove",$e,t))}),window.addEventListener("pointerup",De,t),window.addEventListener("pointercancel",De,t)):te.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Zt,t),r.addEventListener("pointermove",$e,t))}))}function Ce(t,e){ye.forEach(n=>{const{setResizeHandlerState:r}=n,i=Z.includes(n);r(t,i,e)})}function qt(){const[t,e]=d.useState(0);return d.useCallback(()=>e(n=>n+1),[])}function w(t,e){if(!t)throw console.error(e),Error(e)}function re(t,e,n=Ge){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function J(t,e,n=Ge){return re(t,e,n)===0}function U(t,e,n){return re(t,e,n)===0}function Xt(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!U(i,o,n))return!1}return!0}function ae({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];w(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:s=0}=r;if(re(n,s)<0)if(o){const a=(i+s)/2;re(n,a)<0?n=i:n=s}else n=s;return n=Math.min(l,n),n=parseFloat(n.toFixed(Ge)),n}function xe({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(U(t,0))return e;const l=[...e],[s,a]=r;w(s!=null,"Invalid first pivot index"),w(a!=null,"Invalid second pivot index");let m=0;if(o==="keyboard"){{const u=t<0?a:s,c=n[u];w(c,`Panel constraints not found for index ${u}`);const{collapsedSize:g=0,collapsible:x,minSize:C=0}=c;if(x){const I=e[u];if(w(I!=null,`Previous layout not found for panel index ${u}`),U(I,g)){const b=C-I;re(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}{const u=t<0?s:a,c=n[u];w(c,`No panel constraints found for index ${u}`);const{collapsedSize:g=0,collapsible:x,minSize:C=0}=c;if(x){const I=e[u];if(w(I!=null,`Previous layout not found for panel index ${u}`),U(I,C)){const b=I-g;re(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}}{const u=t<0?1:-1;let c=t<0?a:s,g=0;for(;;){const C=e[c];w(C!=null,`Previous layout not found for panel index ${c}`);const b=ae({panelConstraints:n,panelIndex:c,size:100})-C;if(g+=b,c+=u,c<0||c>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-x:x}{let c=t<0?s:a;for(;c>=0&&c<n.length;){const g=Math.abs(t)-Math.abs(m),x=e[c];w(x!=null,`Previous layout not found for panel index ${c}`);const C=x-g,I=ae({panelConstraints:n,panelIndex:c,size:C});if(!U(x,I)&&(m+=x-I,l[c]=I,m.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?c--:c++}}if(Xt(i,l))return i;{const u=t<0?a:s,c=e[u];w(c!=null,`Previous layout not found for panel index ${u}`);const g=c+m,x=ae({panelConstraints:n,panelIndex:u,size:g});if(l[u]=x,!U(x,g)){let C=g-x,b=t<0?a:s;for(;b>=0&&b<n.length;){const R=l[b];w(R!=null,`Previous layout not found for panel index ${b}`);const L=R+C,D=ae({panelConstraints:n,panelIndex:b,size:L});if(U(R,D)||(C-=D-R,l[b]=D),U(C,0))break;t>0?b--:b++}}}const v=l.reduce((u,c)=>c+u,0);return U(v,100)?l:i}function Jt({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,l=0;const s=n[0];w(s!=null,"No pivot index found"),e.forEach((u,c)=>{const{constraints:g}=u,{maxSize:x=100,minSize:C=0}=g;c===s?(r=C,i=x):(o+=C,l+=x)});const a=Math.min(i,100-o),m=Math.max(r,100-l),v=t[s];return{valueMax:a,valueMin:m,valueNow:v}}function ze(t,e=document){return Array.from(e.querySelectorAll(`[${M.resizeHandleId}][data-panel-group-id="${t}"]`))}function dt(t,e,n=document){const i=ze(t,n).findIndex(o=>o.getAttribute(M.resizeHandleId)===e);return i??null}function pt(t,e,n){const r=dt(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function mt(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Ne(t,e=document){const n=e.querySelector(`[${M.resizeHandleId}="${t}"]`);return n||null}function Yt(t,e,n,r=document){var i,o,l,s;const a=Ne(e,r),m=ze(t,r),v=a?m.indexOf(a):-1,u=(i=(o=n[v])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,c=(l=(s=n[v+1])===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:null;return[u,c]}function Qt({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){d.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const s=ze(n,o);for(let a=0;a<i.length-1;a++){const{valueMax:m,valueMin:v,valueNow:u}=Jt({layout:r,panelsArray:i,pivotIndices:[a,a+1]}),c=s[a];if(c!=null){const g=i[a];w(g,`No panel data found for index "${a}"`),c.setAttribute("aria-controls",g.id),c.setAttribute("aria-valuemax",""+Math.round(m)),c.setAttribute("aria-valuemin",""+Math.round(v)),c.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{s.forEach((a,m)=>{a.removeAttribute("aria-controls"),a.removeAttribute("aria-valuemax"),a.removeAttribute("aria-valuemin"),a.removeAttribute("aria-valuenow")})}},[n,r,i,o]),d.useEffect(()=>{if(!o)return;const s=e.current;w(s,"Eager values not found");const{panelDataArray:a}=s,m=mt(n,o);w(m!=null,`No group found for id "${n}"`);const v=ze(n,o);w(v,`No resize handles found for group id "${n}"`);const u=v.map(c=>{const g=c.getAttribute(M.resizeHandleId);w(g,"Resize handle element has no handle id attribute");const[x,C]=Yt(n,g,a,o);if(x==null||C==null)return()=>{};const I=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const R=a.findIndex(L=>L.id===x);if(R>=0){const L=a[R];w(L,`No panel data found for index ${R}`);const D=r[R],{collapsedSize:T=0,collapsible:k,minSize:y=0}=L.constraints;if(D!=null&&k){const j=xe({delta:U(D,T)?y-T:T-D,initialLayout:r,panelConstraints:a.map(V=>V.constraints),pivotIndices:pt(n,g,o),prevLayout:r,trigger:"keyboard"});r!==j&&l(j)}}break}}};return c.addEventListener("keydown",I),()=>{c.removeEventListener("keydown",I)}});return()=>{u.forEach(c=>c())}},[o,t,e,n,r,i,l])}function qe(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function gt(t,e){const n=t==="horizontal",{x:r,y:i}=Re(e);return n?r:i}function en(t,e,n,r,i){const o=n==="horizontal",l=Ne(e,i);w(l,`No resize handle element found for id "${e}"`);const s=l.getAttribute(M.groupId);w(s,"Resize handle element has no group id attribute");let{initialCursorPosition:a}=r;const m=gt(n,t),v=mt(s,i);w(v,`No group element found for id "${s}"`);const u=v.getBoundingClientRect(),c=o?u.width:u.height;return(m-a)/c*100}function tn(t,e,n,r,i,o){if(rt(t)){const l=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let a=0;switch(t.key){case"ArrowDown":a=l?0:s;break;case"ArrowLeft":a=l?-s:0;break;case"ArrowRight":a=l?s:0;break;case"ArrowUp":a=l?0:-s;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return r==null?0:en(t,e,n,r,o)}function nn({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const l=n[o];w(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const l=n[o];w(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;if(s!=null)continue;const a=t.length-r,m=i/a;r++,e[o]=m,i-=m}return e}function le(t,e,n){e.forEach((r,i)=>{const o=t[i];w(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:s,id:a}=o,{collapsedSize:m=0,collapsible:v}=s,u=n[a];if(u==null||r!==u){n[a]=r;const{onCollapse:c,onExpand:g,onResize:x}=l;x&&x(r,u),v&&(c||g)&&(g&&(u==null||J(u,m))&&!J(r,m)&&g(),c&&(u==null||!J(u,m))&&J(r,m)&&c())}})}function Se(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function rn({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const l=n[i];let s;return l==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=l.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function on(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Xe(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function xt(t){return`react-resizable-panels:${t}`}function ht(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function yt(t,e){try{const n=xt(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function ln(t,e,n){var r,i;const o=(r=yt(t,n))!==null&&r!==void 0?r:{},l=ht(e);return(i=o[l])!==null&&i!==void 0?i:null}function sn(t,e,n,r,i){var o;const l=xt(t),s=ht(e),a=(o=yt(t,i))!==null&&o!==void 0?o:{};a[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(l,JSON.stringify(a))}catch(m){console.error(m)}}function Je({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,l)=>o+l,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!U(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=100/r*l;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=ae({panelConstraints:e,panelIndex:o,size:l});l!=s&&(i+=l-s,n[o]=s)}if(!U(i,0))for(let o=0;o<e.length;o++){const l=n[o];w(l!=null,`No layout data found for index ${o}`);const s=l+i,a=ae({panelConstraints:e,panelIndex:o,size:s});if(l!==a&&(i-=a-l,n[o]=a,U(i,0)))break}return n}const an=100,he={getItem:t=>(Xe(he),he.getItem(t)),setItem:(t,e)=>{Xe(he),he.setItem(t,e)}},Ye={};function zt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:s=null,storage:a=he,style:m,tagName:v="div",...u}){const c=Be(o),g=d.useRef(null),[x,C]=d.useState(null),[I,b]=d.useState([]),R=qt(),L=d.useRef({}),D=d.useRef(new Map),T=d.useRef(0),k=d.useRef({autoSaveId:t,direction:r,dragState:x,id:c,keyboardResizeBy:s,onLayout:l,storage:a}),y=d.useRef({layout:I,panelDataArray:[],panelDataArrayChanged:!1});d.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),d.useImperativeHandle(i,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:f}=y.current;return f},setLayout:f=>{const{onLayout:z}=k.current,{layout:P,panelDataArray:h}=y.current,p=Je({layout:f,panelConstraints:h.map(S=>S.constraints)});qe(P,p)||(b(p),y.current.layout=p,z&&z(p),le(h,p,L.current))}}),[]),ne(()=>{k.current.autoSaveId=t,k.current.direction=r,k.current.dragState=x,k.current.id=c,k.current.onLayout=l,k.current.storage=a}),Qt({committedValuesRef:k,eagerValuesRef:y,groupId:c,layout:I,panelDataArray:y.current.panelDataArray,setLayout:b,panelGroupElement:g.current}),d.useEffect(()=>{const{panelDataArray:f}=y.current;if(t){if(I.length===0||I.length!==f.length)return;let z=Ye[t];z==null&&(z=on(sn,an),Ye[t]=z);const P=[...f],h=new Map(D.current);z(t,P,h,I,a)}},[t,I,a]),d.useEffect(()=>{});const j=d.useCallback(f=>{const{onLayout:z}=k.current,{layout:P,panelDataArray:h}=y.current;if(f.constraints.collapsible){const p=h.map(q=>q.constraints),{collapsedSize:S=0,panelSize:$,pivotIndices:_}=ee(h,f,P);if(w($!=null,`Panel size not found for panel "${f.id}"`),!J($,S)){D.current.set(f.id,$);const X=se(h,f)===h.length-1?$-S:S-$,H=xe({delta:X,initialLayout:P,panelConstraints:p,pivotIndices:_,prevLayout:P,trigger:"imperative-api"});Se(P,H)||(b(H),y.current.layout=H,z&&z(H),le(h,H,L.current))}}},[]),V=d.useCallback((f,z)=>{const{onLayout:P}=k.current,{layout:h,panelDataArray:p}=y.current;if(f.constraints.collapsible){const S=p.map(O=>O.constraints),{collapsedSize:$=0,panelSize:_=0,minSize:q=0,pivotIndices:X}=ee(p,f,h),H=z??q;if(J(_,$)){const O=D.current.get(f.id),me=O!=null&&O>=H?O:H,Le=se(p,f)===p.length-1?_-me:me-_,K=xe({delta:Le,initialLayout:h,panelConstraints:S,pivotIndices:X,prevLayout:h,trigger:"imperative-api"});Se(h,K)||(b(K),y.current.layout=K,P&&P(K),le(p,K,L.current))}}},[]),G=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{panelSize:h}=ee(P,f,z);return w(h!=null,`Panel size not found for panel "${f.id}"`),h},[]),A=d.useCallback((f,z)=>{const{panelDataArray:P}=y.current,h=se(P,f);return rn({defaultSize:z,dragState:x,layout:I,panelData:P,panelIndex:h})},[x,I]),N=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{collapsedSize:h=0,collapsible:p,panelSize:S}=ee(P,f,z);return w(S!=null,`Panel size not found for panel "${f.id}"`),p===!0&&J(S,h)},[]),Q=d.useCallback(f=>{const{layout:z,panelDataArray:P}=y.current,{collapsedSize:h=0,collapsible:p,panelSize:S}=ee(P,f,z);return w(S!=null,`Panel size not found for panel "${f.id}"`),!p||re(S,h)>0},[]),W=d.useCallback(f=>{const{panelDataArray:z}=y.current;z.push(f),z.sort((P,h)=>{const p=P.order,S=h.order;return p==null&&S==null?0:p==null?-1:S==null?1:p-S}),y.current.panelDataArrayChanged=!0,R()},[R]);ne(()=>{if(y.current.panelDataArrayChanged){y.current.panelDataArrayChanged=!1;const{autoSaveId:f,onLayout:z,storage:P}=k.current,{layout:h,panelDataArray:p}=y.current;let S=null;if(f){const _=ln(f,p,P);_&&(D.current=new Map(Object.entries(_.expandToSizes)),S=_.layout)}S==null&&(S=nn({panelDataArray:p}));const $=Je({layout:S,panelConstraints:p.map(_=>_.constraints)});qe(h,$)||(b($),y.current.layout=$,z&&z($),le(p,$,L.current))}}),ne(()=>{const f=y.current;return()=>{f.layout=[]}},[]);const B=d.useCallback(f=>{let z=!1;const P=g.current;return P&&window.getComputedStyle(P,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(p){p.preventDefault();const S=g.current;if(!S)return()=>null;const{direction:$,dragState:_,id:q,keyboardResizeBy:X,onLayout:H}=k.current,{layout:O,panelDataArray:me}=y.current,{initialLayout:be}=_??{},Le=pt(q,f,S);let K=tn(p,f,$,_,X,S);const We=$==="horizontal";We&&z&&(K=-K);const St=me.map(wt=>wt.constraints),ge=xe({delta:K,initialLayout:be??O,panelConstraints:St,pivotIndices:Le,prevLayout:O,trigger:rt(p)?"keyboard":"mouse-or-touch"}),Fe=!Se(O,ge);(ot(p)||it(p))&&T.current!=K&&(T.current=K,!Fe&&K!==0?We?He(f,K<0?st:at):He(f,K<0?ct:ut):He(f,0)),Fe&&(b(ge),y.current.layout=ge,H&&H(ge),le(me,ge,L.current))}},[]),F=d.useCallback((f,z)=>{const{onLayout:P}=k.current,{layout:h,panelDataArray:p}=y.current,S=p.map(O=>O.constraints),{panelSize:$,pivotIndices:_}=ee(p,f,h);w($!=null,`Panel size not found for panel "${f.id}"`);const X=se(p,f)===p.length-1?$-z:z-$,H=xe({delta:X,initialLayout:h,panelConstraints:S,pivotIndices:_,prevLayout:h,trigger:"imperative-api"});Se(h,H)||(b(H),y.current.layout=H,P&&P(H),le(p,H,L.current))},[]),ue=d.useCallback((f,z)=>{const{layout:P,panelDataArray:h}=y.current,{collapsedSize:p=0,collapsible:S}=z,{collapsedSize:$=0,collapsible:_,maxSize:q=100,minSize:X=0}=f.constraints,{panelSize:H}=ee(h,f,P);H!=null&&(S&&_&&J(H,p)?J(p,$)||F(f,$):H<X?F(f,X):H>q&&F(f,q))},[F]),fe=d.useCallback((f,z)=>{const{direction:P}=k.current,{layout:h}=y.current;if(!g.current)return;const p=Ne(f,g.current);w(p,`Drag handle element not found for id "${f}"`);const S=gt(P,z);C({dragHandleId:f,dragHandleRect:p.getBoundingClientRect(),initialCursorPosition:S,initialLayout:h})},[]),de=d.useCallback(()=>{C(null)},[]),ve=d.useCallback(f=>{const{panelDataArray:z}=y.current,P=se(z,f);P>=0&&(z.splice(P,1),delete L.current[f.id],y.current.panelDataArrayChanged=!0,R())},[R]),ie=d.useMemo(()=>({collapsePanel:j,direction:r,dragState:x,expandPanel:V,getPanelSize:G,getPanelStyle:A,groupId:c,isPanelCollapsed:N,isPanelExpanded:Q,reevaluatePanelConstraints:ue,registerPanel:W,registerResizeHandle:B,resizePanel:F,startDragging:fe,stopDragging:de,unregisterPanel:ve,panelGroupElement:g.current}),[j,x,r,V,G,A,c,N,Q,ue,W,B,F,fe,de,ve]),pe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return d.createElement(Ee.Provider,{value:ie},d.createElement(v,{...u,children:e,className:n,id:o,ref:g,style:{...pe,...m},[M.group]:"",[M.groupDirection]:r,[M.groupId]:c}))}const vt=d.forwardRef((t,e)=>d.createElement(zt,{...t,forwardedRef:e}));zt.displayName="PanelGroup";vt.displayName="forwardRef(PanelGroup)";function se(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ee(t,e,n){const r=se(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],l=n[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function cn({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){d.useEffect(()=>{if(t||n==null||r==null)return;const i=Ne(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const s=i.getAttribute(M.groupId);w(s,`No group element found for id "${s}"`);const a=ze(s,r),m=dt(s,e,r);w(m!==null,`No resize element found for id "${e}"`);const v=l.shiftKey?m>0?m-1:a.length-1:m+1<a.length?m+1:0;a[v].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function bt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:s,onFocus:a,onPointerDown:m,onPointerUp:v,style:u={},tabIndex:c=0,tagName:g="div",...x}){var C,I;const b=d.useRef(null),R=d.useRef({onClick:l,onDragging:s,onPointerDown:m,onPointerUp:v});d.useEffect(()=>{R.current.onClick=l,R.current.onDragging=s,R.current.onPointerDown=m,R.current.onPointerUp=v});const L=d.useContext(Ee);if(L===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:T,registerResizeHandle:k,startDragging:y,stopDragging:j,panelGroupElement:V}=L,G=Be(i),[A,N]=d.useState("inactive"),[Q,W]=d.useState(!1),[B,F]=d.useState(null),ue=d.useRef({state:A});ne(()=>{ue.current.state=A}),d.useEffect(()=>{if(n)F(null);else{const ie=k(G);F(()=>ie)}},[n,G,k]);const fe=(C=r?.coarse)!==null&&C!==void 0?C:15,de=(I=r?.fine)!==null&&I!==void 0?I:5;d.useEffect(()=>{if(n||B==null)return;const ie=b.current;w(ie,"Element ref not attached");let pe=!1;return Ot(G,ie,D,{coarse:fe,fine:de},(z,P,h)=>{if(!P){N("inactive");return}switch(z){case"down":{N("drag"),pe=!1,w(h,'Expected event to be defined for "down" action'),y(G,h);const{onDragging:p,onPointerDown:S}=R.current;p?.(!0),S?.();break}case"move":{const{state:p}=ue.current;pe=!0,p!=="drag"&&N("hover"),w(h,'Expected event to be defined for "move" action'),B(h);break}case"up":{N("hover"),j();const{onClick:p,onDragging:S,onPointerUp:$}=R.current;S?.(!1),$?.(),pe||p?.();break}}})},[fe,D,n,de,k,G,B,y,j]),cn({disabled:n,handleId:G,resizeHandler:B,panelGroupElement:V});const ve={touchAction:"none",userSelect:"none"};return d.createElement(g,{...x,children:t,className:e,id:i,onBlur:()=>{W(!1),o?.()},onFocus:()=>{W(!0),a?.()},ref:b,role:"separator",style:{...ve,...u},tabIndex:c,[M.groupDirection]:D,[M.groupId]:T,[M.resizeHandle]:"",[M.resizeHandleActive]:A==="drag"?"pointer":Q?"keyboard":void 0,[M.resizeHandleEnabled]:!n,[M.resizeHandleId]:G,[M.resizeHandleState]:A})}bt.displayName="PanelResizeHandle";function zn(t){const e=oe.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=Ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=E.jsx(vt,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function vn(t){const e=oe.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(nt,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function bn(t){const e=oe.c(12);let n,r,i;e[0]!==t?({withHandle:i,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let o;e[4]!==n?(o=Ie("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&E.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:E.jsx(et,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let s;return e[8]!==r||e[9]!==o||e[10]!==l?(s=E.jsx(bt,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=s):s=e[11],s}export{yn as G,vn as R,bn as a,zn as b,At as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,j as u}from"./index-
|
|
1
|
+
import{c as x,j as u}from"./index-B9fZ40p9.js";import{c,B as p}from"./button-O0CudEuW.js";import{B as g}from"./badge-CgEtLuTw.js";function j(f){const e=x.c(12),{tabs:d,activeTab:n,onTabChange:s,className:l}=f;let t;e[0]!==l?(t=c("flex items-center gap-2 overflow-x-auto no-scrollbar",l),e[0]=l,e[1]=t):t=e[1];let o;if(e[2]!==n||e[3]!==s||e[4]!==d){let i;e[6]!==n||e[7]!==s?(i=r=>{const m=n===r.id;return u.jsxs(p,{variant:"outline",size:"sm",onClick:()=>s(r.id),className:c("h-8 rounded-lg border border-transparent bg-transparent px-3 py-1 hover:bg-muted",m&&"bg-muted border-input text-foreground font-medium",!m&&"text-muted-foreground font-normal"),children:[r.label,r.count!==void 0&&u.jsx(g,{variant:"secondary",className:c("ml-2 h-5 min-w-5 px-1 rounded-full text-[10px] font-mono",m?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:r.count})]},r.id)},e[6]=n,e[7]=s,e[8]=i):i=e[8],o=d.map(i),e[2]=n,e[3]=s,e[4]=d,e[5]=o}else o=e[5];let a;return e[9]!==t||e[10]!==o?(a=u.jsx("div",{className:t,children:o}),e[9]=t,e[10]=o,e[11]=a):a=e[11],a}export{j as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,c as u,j as o,
|
|
1
|
+
import{r as f,c as u,j as o,b8 as j,a0 as M}from"./index-B9fZ40p9.js";import{b as E,a as T,c as _,S as z}from"./select-Dsuiuagq.js";import{c as b,B}from"./button-O0CudEuW.js";import{u as H}from"./use-mobile-CG0P5-tt.js";const L=({size:r=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:r,height:r,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));L.displayName="Stop";function U(r){const e=u.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(j.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function A(r){const e=u.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(j.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function I(r){const e=u.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(j.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function W(r){const e=u.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=o.jsx(j.Overlay,{"data-slot":"drawer-overlay",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}function Z(r){const e=u.c(12);let t,a,l;e[0]!==r?({className:a,children:t,...l}=r,e[0]=r,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(W,{}),e[4]=s):s=e[4];let n;e[5]!==a?(n=b("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=i):i=e[7];let c;return e[8]!==t||e[9]!==l||e[10]!==n?(c=o.jsxs(I,{"data-slot":"drawer-portal",children:[s,o.jsxs(j.Content,{"data-slot":"drawer-content",className:n,...l,children:[i,t]})]}),e[8]=t,e[9]=l,e[10]=n,e[11]=c):c=e[11],c}function q(r){const e=u.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=b("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=o.jsx("div",{"data-slot":"drawer-header",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}function F(r){const e=u.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=b("text-foreground font-semibold",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=o.jsx(j.Title,{"data-slot":"drawer-title",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}function V({prop:r,defaultProp:e,onChange:t=()=>{}}){const[a,l]=G({defaultProp:e,onChange:t}),s=r!==void 0,n=s?r:a,i=M(t),c=f.useCallback(d=>{if(s){const p=typeof d=="function"?d(r):d;p!==r&&i(p)}else l(d)},[s,r,l,i]);return[n,c]}function G({defaultProp:r,onChange:e}){const t=f.useState(r),[a]=t,l=f.useRef(a),s=M(e);return f.useEffect(()=>{l.current!==a&&(s(a),l.current=a)},[a,l,s]),t}const O=f.createContext({isMobile:!1,setValue:()=>{}}),P=()=>f.useContext(O),Y=r=>{const e=u.c(37);let t,a,l,s,n,i,c,d;e[0]!==r?({children:t,defaultOpen:a,open:i,onOpenChange:s,defaultValue:l,value:d,onValueChange:n,...c}=r,e[0]=r,e[1]=t,e[2]=a,e[3]=l,e[4]=s,e[5]=n,e[6]=i,e[7]=c,e[8]=d):(t=e[1],a=e[2],l=e[3],s=e[4],n=e[5],i=e[6],c=e[7],d=e[8]);const C=H(),p=a??!1;let S;e[9]!==s||e[10]!==i||e[11]!==p?(S={prop:i,defaultProp:p,onChange:s},e[9]=s,e[10]=i,e[11]=p,e[12]=S):S=e[12];const[m,h]=V(S);let N;e[13]!==l||e[14]!==n||e[15]!==d?(N={prop:d,defaultProp:l,onChange:n},e[13]=l,e[14]=n,e[15]=d,e[16]=N):N=e[16];const[$,k]=V(N);let R;e[17]!==k?(R=D=>{D&&k(D)},e[17]=k,e[18]=R):R=e[18];const v=R;let w;e[19]!==C||e[20]!==v?(w={isMobile:C,setValue:v},e[19]=C,e[20]=v,e[21]=w):w=e[21];let x;e[22]!==t||e[23]!==m||e[24]!==c||e[25]!==h?(x=o.jsx(U,{open:m,onOpenChange:h,...c,children:t}),e[22]=t,e[23]=m,e[24]=c,e[25]=h,e[26]=x):x=e[26];let g;e[27]!==m||e[28]!==c||e[29]!==h||e[30]!==v||e[31]!==x||e[32]!==$?(g=o.jsx(z,{open:m,onOpenChange:h,value:$,onValueChange:v,...c,children:x}),e[27]=m,e[28]=c,e[29]=h,e[30]=v,e[31]=x,e[32]=$,e[33]=g):g=e[33];let y;return e[34]!==w||e[35]!==g?(y=o.jsx(O.Provider,{value:w,children:g}),e[34]=w,e[35]=g,e[36]=y):y=e[36],y},ee=r=>{const{children:e,title:t,headerActions:a,...l}=r,{isMobile:s}=P(),{className:n,...i}=l;return s?o.jsxs(Z,{...i,children:[o.jsxs(q,{className:b(a?"flex flex-row items-center justify-between":"hidden"),children:[o.jsx(F,{children:t}),a]}),o.jsx("div",{className:b("flex flex-col gap-2 p-2 py-4",n),children:e})]}):o.jsx(_,{...l,children:e})},te=r=>{const e=u.c(7);let t,a;e[0]!==r?({children:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);const{isMobile:l}=P();let s;return e[3]!==t||e[4]!==l||e[5]!==a?(s=l?o.jsx(A,{asChild:!0,children:o.jsx(B,{variant:"outline",...a,children:t})}):o.jsx(T,{...a,children:t}),e[3]=t,e[4]=l,e[5]=a,e[6]=s):s=e[6],s},ae=r=>{const e=u.c(7);let t,a;e[0]!==r?({children:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);const{isMobile:l}=P();let s;return e[3]!==t||e[4]!==l||e[5]!==a?(s=l?o.jsx("span",{...a,children:t}):o.jsx(E,{...a,children:t}),e[3]=t,e[4]=l,e[5]=a,e[6]=s):s=e[6],s};export{A as D,ae as R,Z as a,q as b,F as c,U as d,te as e,ee as f,Y as g,L as i,V as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,an as Pe,L as rt,z as _e,j as d,aq as st,H as lt,aw as Ie,ax as at,Z as k,ao as it,B as j,E as N,a1 as $,ap as ct,a5 as Ee,aH as dt,a0 as ut,b4 as pt,b7 as ft,b5 as mt,b6 as ht,b8 as vt,ar as gt,as as xt,at as St,c as ee}from"./index-BVHhSH8M.js";import{V as wt,i as yt}from"./tooltip-DiQ9SlNX.js";import{t as Re}from"./ChevronDown-BmUd-Gap.js";import{c as oe}from"./button-DMnSM5FV.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var Ct=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,It]=at(J),[ne]=lt(J,[It,Pe]),pe=Pe(),[Tt,G]=ne(J),[_t,Nt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:w,required:y,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[F,q]=_e({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:Ie(),value:F,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(_t,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:w,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,w,y]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),y()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(it,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Pt="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=Pt;var Et="SelectPortal",Le=n=>d.jsx(ct,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?Ee.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=ht("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),P=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return pt(x)},[x]),ft();const E=c.useCallback(f=>{const[T,...R]=B().map(_=>_.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const _ of f)if(_===I||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===b&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=ot(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&(F(f),b&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(mt,{as:jt,allowPinchZoom:!0,children:d.jsx(vt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,_=b.indexOf(I);b=b.slice(_+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,P=>h(P)),w=ue(t),y=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const P=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,_=F.left-I,Z=P.left-_,X=P.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,_=window.innerWidth-F.right-I,Z=window.innerWidth-P.right-_,X=P.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ie,se+(I?he:0)+_+D),X=T+Z;l.style.height=X+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const Z=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=Z+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(P=>{P&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,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)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=s;if(w?.current&&g){const y=Math.abs(a.current-h.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+y,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=Ie();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[w,y]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=Ie(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>y(!0)),onBlur:N(s.onBlur,()=>y(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),w=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),y=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:y},a.value),[a.disabled,a.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:w}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Xe.displayName=Ce;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ut=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ut.displayName=be;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=dt(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(n){return n===""||n===void 0}function tt(n){const e=ut(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Zt=Be,Xt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Ze,oo=Xe;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function co(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(n){const e=ee.c(20);let t,o,r,i;e[0]!==n?({className:o,children:t,position:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"popper":i,l=s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let a;e[5]!==o||e[6]!==l?(a=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",l,o),e[5]=o,e[6]=l,e[7]=a):a=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(no,{}),e[8]=u):u=e[8];const h=s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let g;e[9]!==h?(g=oe("p-1",h),e[9]=h,e[10]=g):g=e[10];let w;e[11]!==t||e[12]!==g?(w=d.jsx(Xt,{className:g,children:t}),e[11]=t,e[12]=g,e[13]=w):w=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(ro,{}),e[14]=y):y=e[14];let S;return e[15]!==s||e[16]!==r||e[17]!==a||e[18]!==w?(S=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",className:a,position:s,...r,children:[u,w,y]})}),e[15]=s,e[16]=r,e[17]=a,e[18]=w,e[19]=S):S=e[19],S}function mo(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(yt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{co as S,po as a,uo as b,fo as c,mo as d,Ne as e};
|
|
1
|
+
import{r as c,am as Pe,L as rt,z as _e,j as d,ap as st,H as lt,av as Ie,aw as at,Z as k,an as it,B as j,E as N,a1 as $,ao as ct,a5 as Ee,aF as dt,a0 as ut,b3 as pt,b6 as ft,b4 as mt,b5 as ht,b7 as vt,aq as gt,ar as xt,as as St,c as ee}from"./index-B9fZ40p9.js";import{V as wt,i as yt}from"./tooltip-DaImUyOX.js";import{t as Re}from"./ChevronDown-B2VaHCqC.js";import{c as oe}from"./button-O0CudEuW.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var Ct=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,It]=at(J),[ne]=lt(J,[It,Pe]),pe=Pe(),[Tt,G]=ne(J),[_t,Nt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:w,required:y,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=_e({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(_t,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,w,y]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),y()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(it,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Pt="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=Pt;var Et="SelectPortal",Le=n=>d.jsx(ct,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?Ee.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=ht("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),P=k(e,f=>F(f)),[O,U]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return pt(x)},[x]),ft();const E=c.useCallback(f=>{const[T,...R]=B().map(_=>_.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const _ of f)if(_===I||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===b&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=ot(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&(U(f),b&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(mt,{as:jt,allowPinchZoom:!0,children:d.jsx(vt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,_=b.indexOf(I);b=b.slice(_+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,P=>h(P)),w=ue(t),y=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const P=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,_=U.left-I,Z=P.left-_,X=P.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,_=window.innerWidth-U.right-I,Z=window.innerWidth-P.right-_,X=P.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ie,se+(I?he:0)+_+D),X=T+Z;l.style.height=X+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const Z=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=Z+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(P=>{P&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,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)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=s;if(w?.current&&g){const y=Math.abs(a.current-h.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+y,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=Ie();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[w,y]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=Ie(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>y(!0)),onBlur:N(s.onBlur,()=>y(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),w=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),y=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:y},a.value),[a.disabled,a.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:w}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Xe.displayName=Ce;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=be;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=dt(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(n){return n===""||n===void 0}function tt(n){const e=ut(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Zt=Be,Xt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Ze,oo=Xe;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function co(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(n){const e=ee.c(20);let t,o,r,i;e[0]!==n?({className:o,children:t,position:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"popper":i,l=s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let a;e[5]!==o||e[6]!==l?(a=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",l,o),e[5]=o,e[6]=l,e[7]=a):a=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(no,{}),e[8]=u):u=e[8];const h=s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let g;e[9]!==h?(g=oe("p-1",h),e[9]=h,e[10]=g):g=e[10];let w;e[11]!==t||e[12]!==g?(w=d.jsx(Xt,{className:g,children:t}),e[11]=t,e[12]=g,e[13]=w):w=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(ro,{}),e[14]=y):y=e[14];let S;return e[15]!==s||e[16]!==r||e[17]!==a||e[18]!==w?(S=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",className:a,position:s,...r,children:[u,w,y]})}),e[15]=s,e[16]=r,e[17]=a,e[18]=w,e[19]=S):S=e[19],S}function mo(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(yt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{co as S,po as a,uo as b,fo as c,mo as d,Ne as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,f as B,e as D,y as K,x as P,j as s,v as $,c as Q,t as N,K as U,a as H,w as R}from"./index-
|
|
1
|
+
import{r as C,f as B,e as D,y as K,x as P,j as s,v as $,c as Q,t as N,K as U,a as H,w as R}from"./index-B9fZ40p9.js";import{C as A}from"./collection-header-BkZGWAxm.js";import{C as V}from"./collection-page-CREYFoHa.js";import{u as W}from"./tooltip-DaImUyOX.js";import{u as Y,B as S}from"./button-O0CudEuW.js";import{a as G,F as k,b as L,c as O,d as E,f as M,e as J}from"./form-rbCVC2Lc.js";import{I}from"./input-C3lfdgit.js";import{i as T}from"./X-BgwVwwIy.js";import"./collection-display-button-BVgPIpv0.js";import"./dropdown-menu-DjELCVXr.js";import"./Grid01-Ch9rI6P9.js";import"./view-mode-toggle-CTKggGXJ.js";const q=({size:d=24,color:e="currentColor",...a})=>C.createElement("svg",{viewBox:"0 0 24 24",width:d,height:d,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},C.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));q.displayName="Upload01";const X=$({name:R().min(1,"Name is required").max(255,"Name is too long"),slug:R().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:R().optional()});function Z(d){const e=Q.c(24),{value:a,onChange:r,name:m}=d,o=C.useRef(null);let u;e[0]!==r?(u=z=>{const F=z.target.files?.[0];if(F){if(F.size>2097152){N.error("Image must be smaller than 2MB");return}const c=new FileReader;c.onerror=()=>{const y=c.error;console.error("FileReader error:",y),N.error(y?.message||"Failed to read image file. Please try again."),o.current&&(o.current.value="")},c.onloadend=()=>{if(c.readyState===FileReader.DONE&&c.result){const y=c.result;r(y)}},c.readAsDataURL(F)}},e[0]=r,e[1]=u):u=e[1];const j=u;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current?.click()},e[2]=i):i=e[2];const t=i;let l;e[3]!==r?(l=z=>{z.stopPropagation(),r("")},e[3]=r,e[4]=l):l=e[4];const n=l;let g;e[5]!==j?(g=s.jsx("input",{type:"file",ref:o,className:"hidden",accept:"image/*",onChange:j}),e[5]=j,e[6]=g):g=e[6];let h;e[7]!==n||e[8]!==m||e[9]!==a?(h=a?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:a,alt:m||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:n,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(T,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:t,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(q,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[7]=n,e[8]=m,e[9]=a,e[10]=h):h=e[10];const w=a?"Change Logo":"Upload Logo";let x;e[11]!==w?(x=s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:t,className:"mb-2",children:w}),e[11]=w,e[12]=x):x=e[12];let f;e[13]!==n||e[14]!==a?(f=a&&s.jsx(S,{type:"button",variant:"ghost",size:"sm",onClick:n,className:"ml-2",children:"Remove"}),e[13]=n,e[14]=a,e[15]=f):f=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[16]=v):v=e[16];let p;e[17]!==x||e[18]!==f?(p=s.jsxs("div",{className:"flex-1",children:[x,f,v]}),e[17]=x,e[18]=f,e[19]=p):p=e[19];let b;return e[20]!==p||e[21]!==g||e[22]!==h?(b=s.jsxs("div",{className:"flex items-start gap-4",children:[g,h,p]}),e[20]=p,e[21]=g,e[22]=h,e[23]=b):b=e[23],b}function me(){const d=B(),{org:e}=W(),a=D(),[r,m]=C.useState(!1),o=K({resolver:P(X),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),u=Y({mutationFn:async t=>{const l={name:t.name,slug:t.slug};t.logo&&(l.logo=t.logo);const n=await H.organization.update({organizationId:e.id,data:l});if(n?.error)throw new Error(n.error.message||"Failed to update organization");return n},onSuccess:t=>{a.invalidateQueries({queryKey:U.organizations()}),a.invalidateQueries({queryKey:U.activeOrganization(e.slug)}),N.success("Organization settings updated successfully"),t?.data?.slug&&t.data.slug!==e.slug&&d({to:"/$org/settings",params:{org:t.data.slug}})},onError:t=>{N.error(t instanceof Error?t.message:"Failed to update organization")},onSettled:()=>{m(!1)}}),j=t=>{m(!0),u.mutate(t)},i=o.formState.isDirty;return s.jsxs(V,{children:[s.jsx(A,{title:"Settings"}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(G,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(j),className:"space-y-6",children:[s.jsx(k,{control:o.control,name:"name",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Organization Name"}),s.jsx(E,{children:s.jsx(I,{placeholder:"My Organization",...t,disabled:r})}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"slug",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Organization Slug"}),s.jsx(E,{children:s.jsx(I,{placeholder:"my-organization",...t,disabled:r,onChange:l=>{const n=l.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");t.onChange(n)}})}),s.jsx(J,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"logo",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Logo"}),s.jsx(E,{children:s.jsx(Z,{value:t.value,onChange:t.onChange,name:o.watch("name")})}),s.jsx(M,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(S,{type:"submit",disabled:!i||r,className:"min-w-24",children:r?"Saving...":"Save Changes"}),i&&s.jsx(S,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:r,children:"Cancel"})]})]})})]})})})})})]})}export{me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as S,c as p,e as Kt,d as st,K as pt,t as Je,j as l,f as He,a as Ce,g as Zt,R as Yt,T as qt,D as Qt,C as Xt,P as Jt,h as es,O as ts,i as ss,k as ns,l as ls,m as as,G as os,U as is,n as rs,S as xt,o as cs,p as ds,N as ms,q as fs,s as gt}from"./index-BVHhSH8M.js";import{E as us}from"./SearchMd-CGUWNVUr.js";import{u as hs,I as it,n as ps}from"./use-connection-DUMeVexv.js";import{u as nt,L as Be}from"./localstorage-keys-BB9xpX5T.js";import{u as ye,T as xs,a as gs,b as bs,c as js,L as rt,i as vs,P as ws,O as Ss}from"./tooltip-DiQ9SlNX.js";import{B as Y,c as M}from"./button-DMnSM5FV.js";import{i as et}from"./CpuChip02-BkDt7iNK.js";import{i as Ns}from"./Loading01-Dw6V1r3u.js";import{s as Cs}from"./Plus-CQSfshmp.js";import{i as Re}from"./X-CsW5kmRT.js";import{u as ys}from"./use-binding-DQTEUjPl.js";import{C as E,u as ct,a as _s,b as ks,c as dt,d as Is,N as $s,G as Ms,U as zs,T as Ts,M as Os}from"./thread-history-popover-DTmh-wTW.js";import{E as lt}from"./error-boundary-CUq8HVcH.js";import{u as Es,G as As,R as bt,a as Ps,b as Ds}from"./resizable-DpISfhV6.js";import{i as Ls}from"./File06-BdMasDPT.js";import{u as _e}from"./use-mobile-C2teUdDI.js";import{u as jt,a as Rs}from"./use-organization-settings-B-bw0Nsb.js";import{C as Hs}from"./create-organization-dialog-lmQ3mepV.js";import{I as Bs}from"./input-C6vwKKeq.js";import{P as Us,a as Gs,b as Ws}from"./popover-BO5GT9tA.js";import{A as Ne}from"./avatar-C45Lgbwv.js";import{c as Vs}from"./Grid01-Bom2qqwm.js";import{D as Fs,a as Ks,b as Zs,c as Ys,u as qs,d as Qs}from"./responsive-select-BZGantuu.js";import{D as Xs,a as Js,b as en,c as tn,d as mt}from"./dropdown-menu-gRHakuHp.js";import{a as sn}from"./Copy01-D_YhbDiF.js";import{n as ft}from"./LinkExternal01-LVkx-wZF.js";import{D as vt,a as wt,b as St,c as Nt,d as Ct}from"./dialog-B1fXXmBI.js";import"./useQuery-C3iXPPho.js";import"./auth-D6vm_lfk.js";import"./AlertCircle-CoA9j9_b.js";import"./textarea-Dma5FaAA.js";import"./Terminal-CIo_ltVk.js";import"./json-syntax-highlighter-C3W2DACo.js";import"./alert-dialog-rSIOP2OM.js";import"./InfoCircle-BYXT4R1l.js";import"./well-known-mcp-VNRT0JrW.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BGOqsAv_.js";import"./Trash01-BgGiU9JZ.js";import"./use-gateway-pQG4iSzq.js";import"./form-BbwJs-Od.js";import"./spinner-D7to-RHc.js";import"./select-mD7lFwRj.js";import"./ChevronDown-BmUd-Gap.js";const yt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));yt.displayName="BarChart10";const _t=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));_t.displayName="Building02";const kt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));kt.displayName="ChevronSelectorVertical";const It=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));It.displayName="Globe01";const $t=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));$t.displayName="Home02";const Mt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Mt.displayName="LayoutRight";const zt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));zt.displayName="LogOut01";const Tt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Tt.displayName="Mail01";const Ot=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),S.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));Ot.displayName="Settings01";const Et=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Et.displayName="UserCircle";const At=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));At.displayName="Users01";const Pt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Pt.displayName="Zap";function at(){const t=p.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Be.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=nt(e,nn);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function nn(t){return!!(t??!1)}function ln(){const t=p.c(5),e=Kt(),{org:s}=ye();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=st(a);let o;return t[1]!==s||t[2]!==n||t[3]!==e?(o=i=>{const r=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!r||!r[1])return;const d=r[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:pt.collection(s.slug,m,d)});const f=d.toLowerCase().replace(/_/g," ");Je.success(`${f} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=o):o=t[4],o}const an="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function on(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function rn(t){const e=p.c(2),s=Zt();let a;e[0]!==s.location.pathname?(a=on(s.location.pathname),e[0]=s.location.pathname,e[1]=a):a=e[1];const{connectionId:n,collectionName:o,itemId:i}=a;return`You are an AI assistant running in an MCP Mesh environment.
|
|
1
|
+
import{r as S,c as p,e as Kt,d as st,K as pt,t as Je,j as l,f as He,a as Ce,g as Zt,R as Yt,T as qt,D as Qt,C as Xt,P as Jt,h as es,O as ts,i as ss,k as ns,l as ls,m as as,G as os,U as is,n as rs,S as xt,o as cs,p as ds,N as ms,q as fs,s as gt}from"./index-B9fZ40p9.js";import{E as us}from"./SearchMd-BJbLhbUT.js";import{u as hs,I as it,n as ps}from"./use-connection-9XNP6qUi.js";import{u as nt,L as Be}from"./localstorage-keys-BGRuWcRT.js";import{u as ye,T as xs,a as gs,b as bs,c as js,L as rt,i as vs,P as ws,O as Ss}from"./tooltip-DaImUyOX.js";import{B as Y,c as M}from"./button-O0CudEuW.js";import{i as et}from"./CpuChip02-qVpLCR0_.js";import{i as Ns}from"./Loading01-B0dLQInZ.js";import{s as Cs}from"./Plus-D_XbrIfI.js";import{i as Re}from"./X-BgwVwwIy.js";import{u as ys}from"./use-binding-BWHEOuVA.js";import{C as E,u as ct,a as _s,b as ks,c as dt,d as Is,N as $s,G as Ms,U as zs,T as Ts,M as Os}from"./thread-history-popover-BQKKEP-v.js";import{E as lt}from"./error-boundary-Ba_T3BIS.js";import{u as Es,G as As,R as bt,a as Ps,b as Ds}from"./resizable-Bcc9SJfZ.js";import{i as Ls}from"./File06-DSeIH9xM.js";import{u as _e}from"./use-mobile-CG0P5-tt.js";import{u as jt,a as Rs}from"./use-organization-settings-jxyxG3Do.js";import{C as Hs}from"./create-organization-dialog-CYQoklT3.js";import{I as Bs}from"./input-C3lfdgit.js";import{P as Us,a as Gs,b as Ws}from"./popover-BRnyFKtN.js";import{A as Ne}from"./avatar-Bf0qQU4w.js";import{c as Vs}from"./Grid01-Ch9rI6P9.js";import{D as Fs,a as Ks,b as Zs,c as Ys,u as qs,d as Qs}from"./responsive-select-BbaQnOfE.js";import{D as Xs,a as Js,b as en,c as tn,d as mt}from"./dropdown-menu-DjELCVXr.js";import{a as sn}from"./Copy01-DfnjsOeR.js";import{n as ft}from"./LinkExternal01-DZDUBWQO.js";import{D as vt,a as wt,b as St,c as Nt,d as Ct}from"./dialog-D4dy2US8.js";import"./useQuery-nlt5lRkW.js";import"./auth-BnF0Tfz9.js";import"./AlertCircle-DxJIdkjA.js";import"./textarea-CvmD-TCl.js";import"./Terminal-BSL9-A7C.js";import"./monaco-editor-uZe9l_bJ.js";import"./spinner-CDnZnQfr.js";import"./alert-dialog-DIexFXOj.js";import"./InfoCircle-DQaxWpv9.js";import"./well-known-mcp-VNRT0JrW.js";import"./generate-id-Dyweu44Y.js";import"./Clock-CafJ8d76.js";import"./Trash01-aTCf1hVv.js";import"./use-gateway-BU92tNo7.js";import"./form-rbCVC2Lc.js";import"./select-Dsuiuagq.js";import"./ChevronDown-B2VaHCqC.js";const yt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));yt.displayName="BarChart10";const _t=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));_t.displayName="Building02";const kt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));kt.displayName="ChevronSelectorVertical";const It=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));It.displayName="Globe01";const $t=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));$t.displayName="Home02";const Mt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Mt.displayName="LayoutRight";const zt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));zt.displayName="LogOut01";const Tt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Tt.displayName="Mail01";const Ot=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),S.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));Ot.displayName="Settings01";const Et=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Et.displayName="UserCircle";const At=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));At.displayName="Users01";const Pt=({size:t=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Pt.displayName="Zap";function at(){const t=p.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Be.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=nt(e,nn);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function nn(t){return!!(t??!1)}function ln(){const t=p.c(5),e=Kt(),{org:s}=ye();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=st(a);let o;return t[1]!==s||t[2]!==n||t[3]!==e?(o=i=>{const r=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!r||!r[1])return;const d=r[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:pt.collection(s.slug,m,d)});const f=d.toLowerCase().replace(/_/g," ");Je.success(`${f} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=o):o=t[4],o}const an="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function on(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function rn(t){const e=p.c(2),s=Zt();let a;e[0]!==s.location.pathname?(a=on(s.location.pathname),e[0]=s.location.pathname,e[1]=a):a=e[1];const{connectionId:n,collectionName:o,itemId:i}=a;return`You are an AI assistant running in an MCP Mesh environment.
|
|
2
2
|
|
|
3
3
|
## About MCP Mesh
|
|
4
4
|
The Model Context Protocol (MCP) Mesh allows users to connect external Connections and expose their capabilities through Hubs. Each Hub provides access to a curated set of tools from connected Connections.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,i as d,j as a}from"./index-
|
|
1
|
+
import{c as C,i as d,j as a}from"./index-B9fZ40p9.js";import{c as m}from"./button-O0CudEuW.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|