@decocms/mesh 2.72.0 → 2.72.1

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.
Files changed (150) hide show
  1. package/dist/client/assets/{AlertCircle-CHm1uTvc.js → AlertCircle-BOIQEKjW.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-CsvTcSKO.js → ArrowUp-BRclUYsx.js} +1 -1
  3. package/dist/client/assets/{Calendar-RaRlGUMn.js → Calendar-DydX5uRn.js} +1 -1
  4. package/dist/client/assets/{Check-CTaDpFbx.js → Check-Bkb61eVw.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-BUL08lD-.js → CheckCircle-ZkjIkaWv.js} +1 -1
  6. package/dist/client/assets/{CheckDone01-C9iBTpWu.js → CheckDone01-BusS8ANA.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BmbIYWgz.js → ChevronDown-DqJTvBdv.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C7PRdwhN.js → ChevronRight-BBcOJkyP.js} +1 -1
  9. package/dist/client/assets/{Code01-BHb1dfFm.js → Code01-DEMYMNLO.js} +1 -1
  10. package/dist/client/assets/{Copy01-BHrubS15.js → Copy01-BvgMlJ5t.js} +1 -1
  11. package/dist/client/assets/{DotsHorizontal-BKEGXeRq.js → DotsHorizontal-C3Pu-YCA.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-6bV4Jb02.js → DotsVertical-DMOP2SMU.js} +1 -1
  13. package/dist/client/assets/{Download01-DCCcXkST.js → Download01-VwSgop8U.js} +1 -1
  14. package/dist/client/assets/{Edit01-Ck6L4sn5.js → Edit01-ByF-cYbh.js} +1 -1
  15. package/dist/client/assets/{File02-Bdk2SiT1.js → File02-D6OcKUS4.js} +1 -1
  16. package/dist/client/assets/{File06-g3-IRgq5.js → File06-CkTcogsG.js} +1 -1
  17. package/dist/client/assets/{FilterLines-CZJIfYWV.js → FilterLines-BL17m8OO.js} +1 -1
  18. package/dist/client/assets/{Globe02-nY9R9qg_.js → Globe02-CwdZK2H5.js} +1 -1
  19. package/dist/client/assets/{Grid01-CzUkHZSJ.js → Grid01-zbmmdox0.js} +1 -1
  20. package/dist/client/assets/{Home02-D9mVq7KP.js → Home02-DPzckV1r.js} +1 -1
  21. package/dist/client/assets/{Image01-C213KIPf.js → Image01-BuXlAy8i.js} +1 -1
  22. package/dist/client/assets/{Inbox01-CXr_wpYC.js → Inbox01-Czow08Bp.js} +1 -1
  23. package/dist/client/assets/{InfoCircle-DEUMb_Ke.js → InfoCircle-C8GtqndP.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-CmQ2HPM6.js → LinkExternal01-DJasjN8P.js} +1 -1
  25. package/dist/client/assets/{List-hntTIiNx.js → List-BvAv-Mbv.js} +1 -1
  26. package/dist/client/assets/{Loading01-B78uc8_j.js → Loading01-DOPFYU4m.js} +1 -1
  27. package/dist/client/assets/{Lock01-rY0GklCm.js → Lock01-BALKEl0l.js} +1 -1
  28. package/dist/client/assets/{Pin01-B6bFgA7L.js → Pin01-Dk_x7uai.js} +1 -1
  29. package/dist/client/assets/{Play-CMxteKat.js → Play-CjfPPVn_.js} +1 -1
  30. package/dist/client/assets/{Plus-B1DSIk_Y.js → Plus-WaQ7hmj5.js} +1 -1
  31. package/dist/client/assets/{SearchMd-rxhL9uWW.js → SearchMd-Ds-ERWzq.js} +1 -1
  32. package/dist/client/assets/{Settings01-BBpmfPia.js → Settings01-CMNXJNnf.js} +1 -1
  33. package/dist/client/assets/{Share07-DNr4Gv0F.js → Share07-w2-wABEW.js} +1 -1
  34. package/dist/client/assets/{Terminal-CvqFIFfF.js → Terminal-CrrxpXUI.js} +1 -1
  35. package/dist/client/assets/{Tool01-BWEJZQCA.js → Tool01-Cn8FHCpZ.js} +1 -1
  36. package/dist/client/assets/{Trash01-CNJdNb2Z.js → Trash01-C-euKa34.js} +1 -1
  37. package/dist/client/assets/{Upload01-CtypJgSZ.js → Upload01-Dc0hOrKX.js} +1 -1
  38. package/dist/client/assets/{Users03-B_SbeQBk.js → Users03-zsvZ9QWQ.js} +1 -1
  39. package/dist/client/assets/{X-mZzFkOTX.js → X-DUGfq2_H.js} +1 -1
  40. package/dist/client/assets/{XClose-BwAC8sFB.js → XClose-Cv_qbaYN.js} +1 -1
  41. package/dist/client/assets/{agent-connections-preview-DieWCUjN.js → agent-connections-preview-C15fpCN8.js} +1 -1
  42. package/dist/client/assets/{agent-detail-CViIjBwu.js → agent-detail-BQXrWX9M.js} +1 -1
  43. package/dist/client/assets/{agents-CyHP3pcb.js → agents-NgYS-NWl.js} +1 -1
  44. package/dist/client/assets/{alert-dialog-BN06wH-l.js → alert-dialog-B4H6MrIT.js} +1 -1
  45. package/dist/client/assets/{auth-catchall-DXrXBOXl.js → auth-catchall-GUc2KujY.js} +1 -1
  46. package/dist/client/assets/{avatar-2G5ouaDu.js → avatar-B-AS-16N.js} +1 -1
  47. package/dist/client/assets/{badge-tOUVTd9z.js → badge-BFm6jM0d.js} +1 -1
  48. package/dist/client/assets/{binder-CbgCr5Rm.js → binder-C4CQlgMb.js} +1 -1
  49. package/dist/client/assets/{breadcrumb-JfdGMaRd.js → breadcrumb-Cvo4WJJ5.js} +1 -1
  50. package/dist/client/assets/{button-BKtq_PYU.js → button-Cl3WMTWk.js} +1 -1
  51. package/dist/client/assets/{card-C0u1Pmkw.js → card-B-73zAje.js} +1 -1
  52. package/dist/client/assets/{checkbox-DmCTNQLX.js → checkbox-kN_xGJfO.js} +1 -1
  53. package/dist/client/assets/{circle-alert-BNmG-8Wh.js → circle-alert-BEtzK3t3.js} +1 -1
  54. package/dist/client/assets/{collection-detail-CGH1Knd0.js → collection-detail-C9AV2Fn9.js} +1 -1
  55. package/dist/client/assets/{collection-search-MQc1JOFA.js → collection-search-Aeh0FXZR.js} +1 -1
  56. package/dist/client/assets/{collection-tab-qHWWI3bH.js → collection-tab-CgMRLj1Y.js} +1 -1
  57. package/dist/client/assets/{collection-table-wrapper-L4Z0dyO1.js → collection-table-wrapper-CmBNNf0K.js} +1 -1
  58. package/dist/client/assets/{collection-tabs-CyRXUdkR.js → collection-tabs-2AUf3kZ2.js} +1 -1
  59. package/dist/client/assets/{command-Bqwb_7NQ.js → command-DICG2vo0.js} +1 -1
  60. package/dist/client/assets/{connect-D30M34Bx.js → connect-DoxLTvbh.js} +1 -1
  61. package/dist/client/assets/{connection-card-CMQL70VR.js → connection-card-ChzuU2dT.js} +1 -1
  62. package/dist/client/assets/connection-detail-CVNpoyUm.js +1 -0
  63. package/dist/client/assets/{connections-B7K4OdQw.js → connections-BHOwcUB0.js} +1 -1
  64. package/dist/client/assets/{constants-PBHJ4h9F.js → constants-1q3hobyw.js} +1 -1
  65. package/dist/client/assets/constants-DzWq-50V.js +1 -0
  66. package/dist/client/assets/{create-organization-dialog-BOgbyqMq.js → create-organization-dialog-DWV2eGAF.js} +1 -1
  67. package/dist/client/assets/{create-project-dialog-BxxiVX3V.js → create-project-dialog-49RtElmv.js} +1 -1
  68. package/dist/client/assets/{dialog-B8Jtq_Yp.js → dialog-BmGDp4UV.js} +1 -1
  69. package/dist/client/assets/{dropdown-menu-C6Z4raJE.js → dropdown-menu-6IaHSzwJ.js} +1 -1
  70. package/dist/client/assets/{dynamic-plugin-layout-CDgkhjuC.js → dynamic-plugin-layout-C_HHJRk0.js} +1 -1
  71. package/dist/client/assets/{empty-state-BXisfxVt.js → empty-state-DFIrBrC-.js} +1 -1
  72. package/dist/client/assets/{empty-state-B8XrD0Ub.js → empty-state-oU8PNga_.js} +1 -1
  73. package/dist/client/assets/{env-vars-editor-8a4L674b.js → env-vars-editor-Bmnp2cvo.js} +1 -1
  74. package/dist/client/assets/{error-boundary-D9qG4zZt.js → error-boundary-D7C5xzme.js} +1 -1
  75. package/dist/client/assets/{extract-connection-data-CCyj_Y1X.js → extract-connection-data-CQQ4ZZEG.js} +1 -1
  76. package/dist/client/assets/{file-browser-DInIgvl2.js → file-browser-CHtfSNHu.js} +2 -2
  77. package/dist/client/assets/{form-DQap4sDh.js → form-qYB4UriD.js} +1 -1
  78. package/dist/client/assets/{grid-view-BKnSWUuB.js → grid-view-B4Eut3Xi.js} +1 -1
  79. package/dist/client/assets/{home-DvvANWHB.js → home-BYm3DFU4.js} +1 -1
  80. package/dist/client/assets/index--g69ISoA.css +1 -0
  81. package/dist/client/assets/{index-sFvIWgLs.js → index-5T3tdhiA.js} +1 -1
  82. package/dist/client/assets/{index-D5w8F0R7.js → index-9vOB29ZB.js} +1 -1
  83. package/dist/client/assets/{index-UwBLOz8J.js → index-BA6gcyzW.js} +1 -1
  84. package/dist/client/assets/{index-CCcWAtA_.js → index-BV-rIyOx.js} +2 -2
  85. package/dist/client/assets/{index-BMXxQz0A.js → index-BYzsWn1B.js} +1 -1
  86. package/dist/client/assets/{index-D12lWWsR.js → index-CxyQJKsK.js} +1 -1
  87. package/dist/client/assets/{index--tmJoUux.js → index-Dolyg0HI.js} +1 -1
  88. package/dist/client/assets/{index-C76QOf8q.js → index-Vp0uDDij.js} +1 -1
  89. package/dist/client/assets/{index-DFZdUy6e.js → index-fCCl5Un_.js} +1 -1
  90. package/dist/client/assets/{infiniteQueryObserver-BdhSYRBe.js → infiniteQueryObserver-CrYps4St.js} +1 -1
  91. package/dist/client/assets/{input-Dh6Cjukb.js → input-Dv5qvD5N.js} +1 -1
  92. package/dist/client/assets/{integration-icon-Biu6JpM0.js → integration-icon-DKM9NBX1.js} +1 -1
  93. package/dist/client/assets/{layout-DWXfRazY.js → layout-B7afTuaN.js} +1 -1
  94. package/dist/client/assets/{localstorage-keys-BWsOCDUX.js → localstorage-keys-Ds2uOTRP.js} +1 -1
  95. package/dist/client/assets/{login-DoPkmmdP.js → login-BpnfmGBt.js} +1 -1
  96. package/dist/client/assets/{mcp-oauth-BQMyy4a5.js → mcp-oauth-C_XpjqFg.js} +1 -1
  97. package/dist/client/assets/{mcp-server-card-DxnHyWDy.js → mcp-server-card-CiGvO9aP.js} +1 -1
  98. package/dist/client/assets/{mcp-server-detail-BzBDrjZ5.js → mcp-server-detail-SQfpDpYc.js} +2 -2
  99. package/dist/client/assets/{members-pjR_l8r-.js → members-CQSBREQS.js} +1 -1
  100. package/dist/client/assets/{monaco-editor-XyXN2SEV.js → monaco-editor-q53ZLBJ5.js} +1 -1
  101. package/dist/client/assets/{monitoring-BiXkhP0l.js → monitoring-CK4xcQzM.js} +1 -1
  102. package/dist/client/assets/{oauth-callback-COK_3Woz.js → oauth-callback-CeLfnx5m.js} +1 -1
  103. package/dist/client/assets/{page-zhioOXqc.js → page-CrfNBuC7.js} +1 -1
  104. package/dist/client/assets/{page-Ca4TsO7U.js → page-jzi-88Nr.js} +1 -1
  105. package/dist/client/assets/{plugin-empty-state-BWDzgwMT.js → plugin-empty-state-Bnssy2Oj.js} +1 -1
  106. package/dist/client/assets/{plugin-header-Dm-T5OvY.js → plugin-header-DoQQAOys.js} +1 -1
  107. package/dist/client/assets/{popover-Bn1QrYWJ.js → popover-DuZ2ZN5J.js} +1 -1
  108. package/dist/client/assets/{project-layout-DQQxPJ7M.js → project-layout-CH4wXxX2.js} +1 -1
  109. package/dist/client/assets/{project-settings-Bq572DKS.js → project-settings-CKgnjrBp.js} +1 -1
  110. package/dist/client/assets/{projects-list-D2y67tOl.js → projects-list-D0sSao6e.js} +1 -1
  111. package/dist/client/assets/{registry-utils-eTnhYK1Z.js → registry-utils-CqOx6XXE.js} +1 -1
  112. package/dist/client/assets/{resizable-Cth4qfOJ.js → resizable-CZuYHBhW.js} +1 -1
  113. package/dist/client/assets/{select-CJ01X7RE.js → select-ODRW9YrY.js} +1 -1
  114. package/dist/client/assets/{shell-layout-Dmklwlc_.js → shell-layout-BxNK1bDI.js} +1 -1
  115. package/dist/client/assets/{spinner-CoIaSc2j.js → spinner-BPZfVVyD.js} +1 -1
  116. package/dist/client/assets/{store-invite-CM-bUgIj.js → store-invite-ICTVmn8_.js} +1 -1
  117. package/dist/client/assets/{switch-TZYuSAHJ.js → switch-B-1QAIh-.js} +1 -1
  118. package/dist/client/assets/{table-B7Ue2bk2.js → table-BBnlXDKe.js} +1 -1
  119. package/dist/client/assets/{tasks-DvdoE4Ok.js → tasks-CpdqRpYU.js} +1 -1
  120. package/dist/client/assets/{textarea-D6y1LKj_.js → textarea-DK_SwVx9.js} +1 -1
  121. package/dist/client/assets/{tools-list-fxJEZlSp.js → tools-list-B5iaOgKy.js} +1 -1
  122. package/dist/client/assets/{typewriter-title-DR6tdNBL.js → typewriter-title-C_OsyMAQ.js} +1 -1
  123. package/dist/client/assets/{use-binding-ucSDtQ56.js → use-binding-BVOuBiur.js} +1 -1
  124. package/dist/client/assets/{use-connection-BCPygOxC.js → use-connection-B8DnjeO8.js} +1 -1
  125. package/dist/client/assets/{use-create-virtual-mcp-u-AAtHmy.js → use-create-virtual-mcp-7fubOknm.js} +1 -1
  126. package/dist/client/assets/use-deco-chat-open-cMRvRYVG.js +23 -0
  127. package/dist/client/assets/{use-install-from-registry-f8JxKFFW.js → use-install-from-registry-ClVbT6BY.js} +1 -1
  128. package/dist/client/assets/{use-list-state-oNgAMbdK.js → use-list-state-DjV5kR97.js} +1 -1
  129. package/dist/client/assets/{use-llm-Lxpo1ior.js → use-llm-H-K3anTg.js} +1 -1
  130. package/dist/client/assets/{use-mcp-prompts-WwyO9-Nk.js → use-mcp-prompts-Chz_2-6S.js} +1 -1
  131. package/dist/client/assets/{use-mcp-tools-eSLltC3i.js → use-mcp-tools-CXMetymP.js} +1 -1
  132. package/dist/client/assets/{use-mobile-BUK8Wer1.js → use-mobile-B2CDnK8i.js} +1 -1
  133. package/dist/client/assets/{use-organization-settings-BR3GSp3x.js → use-organization-settings-Bu92wRjl.js} +1 -1
  134. package/dist/client/assets/{use-project-DLsFLh3O.js → use-project-CzroiUzj.js} +1 -1
  135. package/dist/client/assets/{use-virtual-mcp-ByfXJ3SB.js → use-virtual-mcp-ayu_K6US.js} +1 -1
  136. package/dist/client/assets/useInfiniteQuery-TqDHdib1.js +1 -0
  137. package/dist/client/assets/{useMutation-Cn2d2ilG.js → useMutation-BOrtlNTb.js} +1 -1
  138. package/dist/client/assets/useQuery-DDYln2BW.js +1 -0
  139. package/dist/client/assets/utils-CfR4kXxZ.js +1 -0
  140. package/dist/client/assets/{view-mode-toggle-BJkt6e92.js → view-mode-toggle-CHHKGadJ.js} +1 -1
  141. package/dist/client/assets/{workflow-BP45xRRH.js → workflow-BBKpGvON.js} +1 -1
  142. package/dist/client/index.html +2 -2
  143. package/package.json +1 -1
  144. package/dist/client/assets/connection-detail-CQNN_rRv.js +0 -1
  145. package/dist/client/assets/constants-DIAAKB_c.js +0 -1
  146. package/dist/client/assets/index-CP_rYaE5.css +0 -1
  147. package/dist/client/assets/use-deco-chat-open-DsNk3kZu.js +0 -23
  148. package/dist/client/assets/useInfiniteQuery-BcqgMbS1.js +0 -1
  149. package/dist/client/assets/useQuery-Dp4Sp9Q1.js +0 -1
  150. package/dist/client/assets/utils-CnoQZeDK.js +0 -1
@@ -1 +1 @@
1
- import{r as c,a$ as rt,am as Ne,j as d,as as st,at as be,al as k,au as lt,_ as j,an as P,b0 as $,aw as at,Z as _e,ax as Ee,b1 as it,ao as ct,b2 as dt,ay as ut,aB as pt,az as ft,aC as mt,aD as ht,aq as vt,aA as gt,aE as xt,aF as St,c as ee}from"./index-CCcWAtA_.js";import{V as wt}from"./index-BMXxQz0A.js";import{i as Ct}from"./Check-CTaDpFbx.js";import{t as Re}from"./ChevronDown-BmbIYWgz.js";import{c as oe}from"./utils-CnoQZeDK.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=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:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=Ne({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:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{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:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,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,b,w]=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),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{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:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(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:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.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 _t="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=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{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?_e.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=gt("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:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),_=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 ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.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=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.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),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,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(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{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:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(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 y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=y.indexOf(I);y=y.slice(N+1)}setTimeout(()=>E(y)),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,_=>h(_)),b=ue(t),w=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 _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,Z=_.left-N,X=_.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,Z=window.innerWidth-_.right-N,X=_.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=b(),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=_.top+_.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 N=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ie,se+(I?he:0)+N+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(()=>w.current=!0)}},[b,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(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,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:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>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+w,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=be();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??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),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":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.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=Pt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{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:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.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 Ce="SelectScrollUpButton",Ze=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.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=Ce;var ye="SelectScrollDownButton",Xe=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.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=ye;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:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(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 Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(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=dt(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 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(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(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 fo(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 mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="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 h;e[6]!==o||e[7]!==u?(h=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",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Xt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(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(Ct,{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{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e,nt as n};
1
+ import{r as c,a$ as rt,am as Ne,j as d,as as st,at as be,al as k,au as lt,_ as j,an as P,b0 as $,aw as at,Z as _e,ax as Ee,b1 as it,ao as ct,b2 as dt,ay as ut,aB as pt,az as ft,aC as mt,aD as ht,aq as vt,aA as gt,aE as xt,aF as St,c as ee}from"./index-BV-rIyOx.js";import{V as wt}from"./index-BYzsWn1B.js";import{i as Ct}from"./Check-Bkb61eVw.js";import{t as Re}from"./ChevronDown-DqJTvBdv.js";import{c as oe}from"./utils-CfR4kXxZ.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=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:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=Ne({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:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{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:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,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,b,w]=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),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{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:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(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:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.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 _t="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=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{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?_e.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=gt("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:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),_=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 ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.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=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.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),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,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(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{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:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(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 y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=y.indexOf(I);y=y.slice(N+1)}setTimeout(()=>E(y)),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,_=>h(_)),b=ue(t),w=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 _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,Z=_.left-N,X=_.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,Z=window.innerWidth-_.right-N,X=_.width+Z,ve=Math.max(X,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=X+"px",l.style.right=xe+"px"}const L=b(),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=_.top+_.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 N=u.clientHeight-p.offsetTop-p.offsetHeight,Z=Math.max(ie,se+(I?he:0)+N+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(()=>w.current=!0)}},[b,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(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,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:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>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+w,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=be();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??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),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":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.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=Pt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{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:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.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 Ce="SelectScrollUpButton",Ze=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.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=Ce;var ye="SelectScrollDownButton",Xe=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.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=ye;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:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(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 Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(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=dt(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 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(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(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 fo(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 mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="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 h;e[6]!==o||e[7]!==u?(h=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",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Xt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Zt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(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(Ct,{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{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e,nt as n};
@@ -1,4 +1,4 @@
1
- import{r as N,c as w,j as n,u as ae,m as ke,bt as Re,L as Ce,bp as Jt,bC as Xt,O as ne,$ as Qt,E as es,n as ts,g as re,t as ie,a_ as ss,bD as ot,a as qe,bE as ns,b2 as at,bF as _e,b as rs,S as ct,d as is,e as ls,N as os,q as as,K as cs,l as dt,P as ds}from"./index-CCcWAtA_.js";import{C as te,i as ms,u as fs}from"./index-UwBLOz8J.js";import{I as us,n as ps,a as Ee,c as mt,T as Me,b as Ae}from"./integration-icon-Biu6JpM0.js";import{P as Se}from"./index-D5w8F0R7.js";import{b as He,u as hs,S as de,d as ft}from"./use-deco-chat-open-DsNk3kZu.js";import{c as _}from"./utils-CnoQZeDK.js";import{d as xs}from"./constants-PBHJ4h9F.js";import{T as gs,i as bs,b as js,S as vs,c as ws,d as Ns,e as Ss,f as Cs,t as ut}from"./typewriter-title-DR6tdNBL.js";import{s as pt}from"./Plus-B1DSIk_Y.js";import{t as ht}from"./Users03-B_SbeQBk.js";import{i as Le}from"./X-mZzFkOTX.js";import{E as xt}from"./error-boundary-D9qG4zZt.js";import{C as ys}from"./create-project-dialog-BxxiVX3V.js";import{n as ks}from"./CheckDone01-C9iBTpWu.js";import{a as _s}from"./Home02-D9mVq7KP.js";import{u as zs}from"./use-project-DLsFLh3O.js";import{u as $e}from"./use-mobile-BUK8Wer1.js";import{t as gt}from"./ChevronDown-BmbIYWgz.js";import{B as X}from"./button-BKtq_PYU.js";import{A as oe}from"./avatar-2G5ouaDu.js";import{b as Je,P as Xe,a as Qe}from"./popover-Bn1QrYWJ.js";import{n as tt}from"./Inbox01-CXr_wpYC.js";import{B as st}from"./badge-tOUVTd9z.js";import{i as De}from"./Check-CTaDpFbx.js";import{s as nt}from"./XClose-BwAC8sFB.js";import{i as $s}from"./ChevronRight-C7PRdwhN.js";import{C as bt}from"./create-organization-dialog-BOgbyqMq.js";import{c as Is,b as Os,g as Ts,a as Ps,D as Es}from"./dialog-B8Jtq_Yp.js";import{L as Ms}from"./form-DQap4sDh.js";import{S as As}from"./switch-TZYuSAHJ.js";import{i as Ls}from"./Code01-BHb1dfFm.js";import{a as jt}from"./Copy01-BHrubS15.js";import{u as vt,a as Ds}from"./use-organization-settings-BR3GSp3x.js";import{i as Rs}from"./File06-g3-IRgq5.js";import{I as Hs}from"./input-Dh6Cjukb.js";import{c as Bs}from"./Grid01-CzUkHZSJ.js";import{a as Us,b as Ws,D as Fs,c as Vs,g as rt}from"./dropdown-menu-C6Z4raJE.js";import{n as it}from"./LinkExternal01-CmQ2HPM6.js";import{t as Gs}from"./Settings01-BBpmfPia.js";import{u as wt,L as Nt}from"./localstorage-keys-BWsOCDUX.js";import{R as Zs,a as St,b as Ks}from"./resizable-Cth4qfOJ.js";import"./spinner-CoIaSc2j.js";import"./use-mcp-prompts-WwyO9-Nk.js";import"./useQuery-Dp4Sp9Q1.js";import"./AlertCircle-CHm1uTvc.js";import"./ArrowUp-CsvTcSKO.js";import"./Edit01-Ck6L4sn5.js";import"./Terminal-CvqFIFfF.js";import"./monaco-editor-XyXN2SEV.js";import"./empty-state-B8XrD0Ub.js";import"./use-connection-BCPygOxC.js";import"./useMutation-Cn2d2ilG.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-rxhL9uWW.js";import"./Trash01-CNJdNb2Z.js";import"./use-virtual-mcp-ByfXJ3SB.js";import"./use-create-virtual-mcp-u-AAtHmy.js";import"./index-BMXxQz0A.js";import"./use-llm-Lxpo1ior.js";import"./use-binding-ucSDtQ56.js";import"./binder-CbgCr5Rm.js";import"./select-CJ01X7RE.js";import"./Image01-C213KIPf.js";import"./textarea-D6y1LKj_.js";import"./alert-dialog-BN06wH-l.js";import"./infiniteQueryObserver-BdhSYRBe.js";const Ge=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Ge.displayName="ArrowUpRight";const Ct=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ct.displayName="BarChart10";const yt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));yt.displayName="BookOpen01";const kt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));kt.displayName="Building02";const _t=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));_t.displayName="ChevronLeftDouble";const zt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));zt.displayName="ChevronRightDouble";const Ze=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Ze.displayName="Dataflow03";const $t=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));$t.displayName="FaceSmile";const It=({size:t=24,color:e="currentColor",...s})=>N.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},N.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 Ot=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ot.displayName="LayoutRight";const Tt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Tt.displayName="LogOut01";const Pt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Pt.displayName="LogOut02";const Et=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Et.displayName="Mail01";const et=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));et.displayName="Settings02";const Mt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Mt.displayName="Settings04";function Ys(){const t=w.c(65),{org:e}=ae(),[,s]=He(),{selectedVirtualMcp:r,modelsConnections:i,isChatEmpty:l,activeThreadId:o,createThread:c,switchToThread:a,threads:d}=hs();let m;if(t[0]!==o||t[1]!==d){let F;t[3]!==o?(F=I=>I.id===o,t[3]=o,t[4]=F):F=t[4],m=d.find(F),t[0]=o,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=N.useState(!1),[x,h]=N.useTransition();let b;t[5]!==e.id?(b=xs(e.id),t[5]=e.id,t[6]=b):b=t[6];const j=r??b;let v;t[7]!==c?(v=()=>{h(()=>{c()})},t[7]=c,t[8]=v):v=t[8];const S=v;if(i.length===0){let F;t[9]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Se.Header.Left,{className:"gap-2"}),t[9]=F):F=t[9];let I;t[10]!==s?(I=()=>s(!1),t[10]=s,t[11]=I):I=t[11];let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=D):D=t[12];let G;t[13]!==I?(G=n.jsxs(Se.Header,{className:"flex-none",children:[F,n.jsx(Se.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:D})})]}),t[13]=I,t[14]=G):G=t[14];let Y;t[15]!==e?(Y=n.jsx(te.Main,{className:"flex flex-col items-center",children:n.jsx(te.EmptyState,{children:n.jsx(te.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=Y):Y=t[16];let J;return t[17]!==G||t[18]!==Y?(J=n.jsxs(te,{children:[G,Y]}),t[17]=G,t[18]=Y,t[19]=J):J=t[19],J}const y=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let C;t[20]!==y?(C=_("absolute inset-0 flex flex-col transition-all ease-in-out",y),t[20]=y,t[21]=C):C=t[21];let z;t[22]!==f||t[23]!==l?(z=!l&&f?.title&&n.jsx(gs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=l,t[24]=z):z=t[24];let O;t[25]!==z?(O=n.jsx(Se.Header.Left,{className:"gap-2",children:z}),t[25]=z,t[26]=O):O=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(pt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=$):$=t[27];let k;t[28]!==S||t[29]!==x?(k=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:$}),t[28]=S,t[29]=x,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=()=>p(!0),t[31]=T):T=t[31];let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(bs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=P):P=t[32];let E;t[33]!==s?(E=()=>s(!1),t[33]=s,t[34]=E):E=t[34];let L;t[35]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=L):L=t[35];let A;t[36]!==E?(A=n.jsx("button",{type:"button",onClick:E,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:L}),t[36]=E,t[37]=A):A=t[37];let M;t[38]!==A||t[39]!==k?(M=n.jsxs(Se.Header.Right,{className:"gap-1",children:[k,P,A]}),t[38]=A,t[39]=k,t[40]=M):M=t[40];let B;t[41]!==M||t[42]!==O?(B=n.jsxs(Se.Header,{className:"flex-none",children:[O,M]}),t[41]=M,t[42]=O,t[43]=B):B=t[43];let Z;t[44]!==j||t[45]!==l?(Z=n.jsx(te.Main,{children:l?n.jsx(te.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(us,{icon:j.icon,name:j.title,size:"lg",fallbackIcon:n.jsx(ht,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:j.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:j.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(te.IceBreakers,{})]})}):n.jsx(te.Messages,{})}),t[44]=j,t[45]=l,t[46]=Z):Z=t[46];let U;t[47]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(te.Footer,{children:n.jsx(te.Input,{})}),t[47]=U):U=t[47];let R;t[48]!==B||t[49]!==Z||t[50]!==C?(R=n.jsxs("div",{className:C,children:[B,Z,U]}),t[48]=B,t[49]=Z,t[50]=C,t[51]=R):R=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=_("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let K;t[55]!==o||t[56]!==a||t[57]!==d?(K=n.jsx(js,{threads:d,activeThreadId:o,onThreadSelect:a,onClose:V}),t[55]=o,t[56]=a,t[57]=d,t[58]=K):K=t[58];let se;t[59]!==W||t[60]!==K?(se=n.jsx("div",{className:W,children:K}),t[59]=W,t[60]=K,t[61]=se):se=t[61];let q;return t[62]!==R||t[63]!==se?(q=n.jsxs(te,{className:"relative overflow-hidden",children:[R,se]}),t[62]=R,t[63]=se,t[64]=q):q=t[64],q}function qs(){const t=w.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(te.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xt,{fallback:e,children:n.jsx(N.Suspense,{fallback:n.jsx(te.Skeleton,{}),children:n.jsx(Ys,{})})}),t[1]=s):s=t[1],s}const Js=!1;function Xs(){const t=w.c(33),{locator:e,org:s}=ae(),r=ke(),i=Re(),{org:l,project:o}=Ce.parse(e),c=Ce.isOrgAdminProject(e),{data:a}=zs(s.id,o);let d;t[0]!==a?.enabledPlugins?(d=a?.enabledPlugins??[],t[0]=a?.enabledPlugins,t[1]=d):d=t[1];const m=d;let f;t[2]!==m?(f=I=>m.includes(I.pluginId),t[2]=m,t[3]=f):f=t[3];const u=Jt.filter(f),p=i.location.pathname===`/${l}/${o}`||i.location.pathname===`/${l}/${o}/`;let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_s,{}),t[4]=x):x=t[4];const h={key:"home",label:"Home",icon:x,onClick:()=>{p?window.dispatchEvent(new CustomEvent("reset-home-view")):r({to:"/$org/$project",params:{org:l,project:o}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ks,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:ne}})};let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ps,{}),t[6]=j):j=t[6];const v={key:"mcps",label:"Connections",icon:j,onClick:()=>r({to:"/$org/$project/mcps",params:{org:l,project:ne}})};let S;t[7]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Qt,{}),t[7]=S):S=t[7];let y;t[8]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(kt,{}),t[8]=y):y=t[8];const C={key:"store",label:"Store",icon:y,onClick:()=>r({to:"/$org/$project/store",params:{org:l,project:ne}})};let z;t[9]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(ht,{}),t[9]=z):z=t[9];const O={key:"agents",label:"Agents",icon:z,onClick:()=>r({to:"/$org/$project/agents",params:{org:l,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(Ct,{}),t[10]=$):$=t[10];const k={key:"monitoring",label:"Monitor",icon:$,onClick:()=>r({to:"/$org/$project/monitoring",params:{org:l,project:ne}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Ze,{}),t[11]=T):T=t[11];const P={key:"workflows",label:"Workflows",icon:T,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:ne}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx($t,{}),t[12]=E):E=t[12];const A=[g,v,P,C,O,k,{key:"members",label:"Members",icon:E,onClick:()=>r({to:"/$org/$project/members",params:{org:l,project:ne}})}],M=u.map(I=>({key:I.pluginId,label:I.label,icon:I.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})}));let B;t[13]!==m?(B=I=>m.includes(I.pluginId),t[13]=m,t[14]=B):B=t[14];const U=Xt.filter(B).map(I=>({type:"group",group:{id:`${I.pluginId}-${I.id}`,label:I.label,items:I.items.map((D,G)=>({key:`${I.pluginId}-${I.id}-${G}`,label:D.label,icon:D.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})})),defaultExpanded:I.defaultExpanded??!0}}));if(c){const I=[{type:"items",items:[h,...A]}];if(M.length>0){let D;t[15]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[15]=D):D=t[15],I.push(D);let G;t[16]!==M?(G={type:"items",items:M},t[16]=M,t[17]=G):G=t[17],I.push(G)}if(U.length>0){if(M.length===0){let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[18]=D):D=t[18],I.push(D)}I.push(...U)}return I}let R;t[19]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(ms,{}),t[19]=R):R=t[19];let H;t[20]!==r||t[21]!==l||t[22]!==o?(H={key:"tasks",label:"Tasks",icon:R,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:o}})},t[20]=r,t[21]=l,t[22]=o,t[23]=H):H=t[23];const W=H;let V;t[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Ze,{}),t[24]=V):V=t[24];let K;t[25]!==r||t[26]!==l||t[27]!==o?(K={key:"workflows",label:"Workflows",icon:V,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:o}})},t[25]=r,t[26]=l,t[27]=o,t[28]=K):K=t[28];const F=[{type:"items",items:[h,W,K]}];if(M.length>0){let I;t[29]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[29]=I):I=t[29],F.push(I);let D;t[30]!==M?(D={type:"items",items:M},t[30]=M,t[31]=D):D=t[31],F.push(D)}if(U.length>0){if(M.length===0){let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[32]=I):I=t[32],F.push(I)}F.push(...U)}return F}const Qs="sidebar_state",en=3600*24*7,tn="16rem",sn="18rem",nn="3rem",rn="b",At=N.createContext(null);function Be(){const t=N.useContext(At);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function ln(t){const e=w.c(21),{defaultOpen:s,open:r,onOpenChange:i,children:l}=t,o=s===void 0?!0:s,c=$e(),[a,d]=N.useState(!1),[m,f]=N.useState(o),u=r??m;let p;e[0]!==u||e[1]!==i?(p=O=>{const $=typeof O=="function"?O(u):O;i?i($):f($),document.cookie=`${Qs}=${$}; path=/; max-age=${en}`},e[0]=u,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==c||e[4]!==x?(h=()=>c?d(an):x(on),e[3]=c,e[4]=x,e[5]=h):h=e[5];const b=h;let g,j;e[6]!==b?(g=()=>{const O=$=>{if($.key===rn&&($.metaKey||$.ctrlKey)){const k=$.target;if(k.tagName==="INPUT"||k.tagName==="TEXTAREA"||k.isContentEditable)return;$.preventDefault(),b()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},j=[b],e[6]=b,e[7]=g,e[8]=j):(g=e[7],j=e[8]),N.useEffect(g,j);const v=u?"expanded":"collapsed";let S;e[9]!==c||e[10]!==u||e[11]!==a||e[12]!==x||e[13]!==v||e[14]!==b?(S={state:v,open:u,setOpen:x,isMobile:c,openMobile:a,setOpenMobile:d,toggleSidebar:b},e[9]=c,e[10]=u,e[11]=a,e[12]=x,e[13]=v,e[14]=b,e[15]=S):S=e[15];const y=S;let C;e[16]!==l?(C=n.jsx(mt,{delayDuration:0,children:l}),e[16]=l,e[17]=C):C=e[17];let z;return e[18]!==y||e[19]!==C?(z=n.jsx(At.Provider,{value:y,children:C}),e[18]=y,e[19]=C,e[20]=z):z=e[20],z}function on(t){return!t}function an(t){return!t}function cn(t){const e=w.c(14);let s,r,i,l;e[0]!==t?({className:r,style:l,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l):(s=e[1],r=e[2],i=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":tn,"--sidebar-width-icon":nn,...l},e[5]=l,e[6]=o):o=e[6];const c=o;let a;e[7]!==r?(a=_("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=a):a=e[8];let d;return e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==a?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:a,...i,children:s}),e[9]=s,e[10]=i,e[11]=c,e[12]=a,e[13]=d):d=e[13],d}function dn(t){const e=w.c(46);let s,r,i,l,o,c;e[0]!==t?({side:l,variant:o,collapsible:c,className:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6]);const a=l===void 0?"left":l,d=o===void 0?"sidebar":o,m=c===void 0?"offcanvas":c,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Be();if(m==="none"){let $;e[7]!==r?($=_("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=$):$=e[8];let k;return e[9]!==s||e[10]!==i||e[11]!==$?(k=n.jsx("div",{"data-slot":"sidebar",className:$,...i,children:s}),e[9]=s,e[10]=i,e[11]=$,e[12]=k):k=e[12],k}if(f){let $;e[13]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":sn},e[13]=$):$=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(ws,{className:"sr-only",children:[n.jsx(Ns,{children:"Sidebar"}),n.jsx(Ss,{children:"Displays the mobile sidebar."})]}),e[14]=k):k=e[14];let T;e[15]!==s?(T=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let P;e[17]!==a||e[18]!==T?(P=n.jsxs(Cs,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:$,side:a,children:[k,T]}),e[17]=a,e[18]=T,e[19]=P):P=e[19];let E;return e[20]!==p||e[21]!==i||e[22]!==x||e[23]!==P?(E=n.jsx(vs,{open:p,onOpenChange:x,...i,children:P}),e[20]=p,e[21]=i,e[22]=x,e[23]=P,e[24]=E):E=e[24],E}const h=u==="collapsed"?m:"",b=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let g;e[25]!==b?(g=_("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=g):g=e[26];let j;e[27]!==g?(j=n.jsx("div",{"data-slot":"sidebar-gap",className:g}),e[27]=g,e[28]=j):j=e[28];const v=a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[29]!==r||e[30]!==v||e[31]!==S?(y=_("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=y):y=e[32];let C;e[33]!==s?(C=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=C):C=e[34];let z;e[35]!==i||e[36]!==y||e[37]!==C?(z=n.jsx("div",{"data-slot":"sidebar-container",className:y,...i,children:C}),e[35]=i,e[36]=y,e[37]=C,e[38]=z):z=e[38];let O;return e[39]!==a||e[40]!==u||e[41]!==z||e[42]!==h||e[43]!==j||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":a,"data-slot":"sidebar",children:[j,z]}),e[39]=a,e[40]=u,e[41]=z,e[42]=h,e[43]=j,e[44]=d,e[45]=O):O=e[45],O}function mn(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Lt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function fn(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Dt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("h-4 m-0! w-full",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-sidebar":"separator",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function un(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Rt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Ht(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("w-full text-sm",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function ye(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function me(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("group/menu-item relative",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}const pn=ts("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ue(t){const e=w.c(28);let s,r,i,l,o,c,a;e[0]!==t?({asChild:i,isActive:l,variant:o,size:c,tooltip:a,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c,e[7]=a):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6],a=e[7]);const d=i===void 0?!1:i,m=l===void 0?!1:l,f=o===void 0?"default":o,u=c===void 0?"default":c,p=d?es:"button",{isMobile:x,state:h}=Be();let b;e[8]!==s||e[9]!==u||e[10]!==f?(b=_(pn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=b):b=e[11];let g;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==b?(g=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:b,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=b,e[17]=g):g=e[17];const j=g;if(!a)return j;if(typeof a=="string"){let z;e[18]!==a?(z={children:a},e[18]=a,e[19]=z):z=e[19],a=z}let v;e[20]!==j?(v=n.jsx(Me,{asChild:!0,children:j}),e[20]=j,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let y;e[22]!==S||e[23]!==a?(y=n.jsx(Ee,{side:"right",align:"center",hidden:S,...a}),e[22]=S,e[23]=a,e[24]=y):y=e[24];let C;return e[25]!==v||e[26]!==y?(C=n.jsxs(Ae,{children:[v,y]}),e[25]=v,e[26]=y,e[27]=C):C=e[27],C}function hn(t){const e=w.c(18),{label:s,children:r,defaultExpanded:i}=t,l=i===void 0?!0:i,[o,c]=N.useState(l);let a;e[0]!==o?(a=()=>c(!o),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!o&&"-rotate-90";let f;e[4]!==m?(f=_("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(gt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==a||e[9]!==d||e[10]!==u?(p=n.jsx(ye,{children:n.jsx(me,{children:n.jsxs(Ue,{className:"h-6 cursor-pointer select-none",onClick:a,children:[d,u]})})}),e[8]=a,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==o?(x=o&&n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=o,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Rt,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Bt(t){const e=w.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let i;e[2]!==s.label?(i=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=i):i=e[3];let l;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==i?(l=n.jsxs(Ue,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,i]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=i,e[9]=l):l=e[9];let o;return e[10]!==s.key||e[11]!==l?(o=n.jsx(me,{children:l},s.key),e[10]=s.key,e[11]=l,e[12]=o):o=e[12],o}function xn(t){const e=w.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Dt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,i=s.group.defaultExpanded;let l;e[2]!==s.group.items?(l=s.group.items.map(bn),e[2]=s.group.items,e[3]=l):l=e[3];let o;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==l?(o=n.jsx(hn,{label:r,defaultExpanded:i,children:l}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=l,e[7]=o):o=e[7],o}case"items":{let r;e[8]!==s.items?(r=s.items.map(gn),e[8]=s.items,e[9]=r):r=e[9];let i;return e[10]!==r?(i=n.jsx(Rt,{className:"py-0",children:n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=i):i=e[11],i}}}function gn(t){return n.jsx(Bt,{item:t},t.key)}function bn(t){return n.jsx(Bt,{item:t},t.key)}function Ut(t){const e=w.c(14),{sections:s,header:r,footer:i,additionalContent:l,variant:o,collapsible:c,contentClassName:a}=t,d=o===void 0?"sidebar":o,m=c===void 0?"icon":c;let f;e[0]!==a?(f=_("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",a),e[0]=a,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(jn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==l||e[5]!==f||e[6]!==u?(p=n.jsxs(un,{className:f,children:[u,l]}),e[4]=l,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==i||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(dn,{variant:d,collapsible:m,children:[r,p,i]}),e[8]=m,e[9]=i,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function jn(t,e){return n.jsx(xn,{section:t},e)}Ut.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(de,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const vn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function ze(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_(vn,s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(X,{variant:"ghost",size:"sm",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function wn({invitation:t,onStatusChange:e}){const[s,r]=N.useState(!1),[i,l]=N.useState(!1),o=ke(),c=async()=>{r(!0);try{const p=await re.organization.acceptInvitation({invitationId:t.id});if(p.error)ie.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await re.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ie.success("Invitation accepted!"),o({to:"/$org",params:{org:x.data.slug}})):(ie.success("Invitation accepted! Redirecting..."),o({to:"/"}))}}catch{ie.error("Failed to accept invitation"),r(!1)}},a=async()=>{l(!0);try{const p=await re.organization.rejectInvitation({invitationId:t.id});p.error?(ie.error(p.error.message),l(!1)):(ie.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{ie.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:_("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(X,{variant:"ghost",size:"icon",onClick:a,disabled:s||i,className:"h-8 w-8",children:n.jsx(nt,{size:14})}),n.jsx(X,{variant:"outline",size:"icon",onClick:c,disabled:s||i,className:"h-8 w-8",children:n.jsx(De,{size:14})})]}):f?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(De,{size:12}),"Accepted"]}):u?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(nt,{size:12}),"Declined"]}):null})]})}function Nn(){const[t,e]=N.useState(!1),s=N.useContext(ss),{data:r}=s.hooks.useListUserInvitations(),{data:i}=re.useListOrganizations(),[l,o]=N.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const b=(i??[]).find(g=>g.id===h.organizationId);return{...h,organizationSlug:b?.slug||h.organizationSlug,organizationName:b?.name||h.organizationName}}).map(h=>({...h,status:l[h.id]||h.status})),f=[...m].sort((h,b)=>{const g={pending:0,accepted:1,rejected:2};return(g[h.status]??999)-(g[b.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,b)=>{o(g=>({...g,[h]:b}))};return n.jsxs(Je,{open:t,onOpenChange:e,children:[n.jsx(Xe,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(tt,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(Qe,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(wn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(tt,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function Sn(t){const e=w.c(28),{user:s,userImage:r,onOpenSettings:i}=t;let l;e[0]!==s?(l=async()=>{if(!s)return;const C=`ID: ${s.id}
1
+ import{r as N,c as w,j as n,u as ae,m as ke,bt as Re,L as Ce,bp as Jt,bC as Xt,O as ne,$ as Qt,E as es,n as ts,g as re,t as ie,a_ as ss,bD as ot,a as qe,bE as ns,b2 as at,bF as _e,b as rs,S as ct,d as is,e as ls,N as os,q as as,K as cs,l as dt,P as ds}from"./index-BV-rIyOx.js";import{C as te,i as ms,u as fs}from"./index-BA6gcyzW.js";import{I as us,n as ps,a as Ee,c as mt,T as Me,b as Ae}from"./integration-icon-DKM9NBX1.js";import{P as Se}from"./index-9vOB29ZB.js";import{b as He,u as hs,S as de,d as ft}from"./use-deco-chat-open-cMRvRYVG.js";import{c as _}from"./utils-CfR4kXxZ.js";import{d as xs}from"./constants-1q3hobyw.js";import{T as gs,i as bs,b as js,S as vs,c as ws,d as Ns,e as Ss,f as Cs,t as ut}from"./typewriter-title-C_OsyMAQ.js";import{s as pt}from"./Plus-WaQ7hmj5.js";import{t as ht}from"./Users03-zsvZ9QWQ.js";import{i as Le}from"./X-DUGfq2_H.js";import{E as xt}from"./error-boundary-D7C5xzme.js";import{C as ys}from"./create-project-dialog-49RtElmv.js";import{n as ks}from"./CheckDone01-BusS8ANA.js";import{a as _s}from"./Home02-DPzckV1r.js";import{u as zs}from"./use-project-CzroiUzj.js";import{u as $e}from"./use-mobile-B2CDnK8i.js";import{t as gt}from"./ChevronDown-DqJTvBdv.js";import{B as X}from"./button-Cl3WMTWk.js";import{A as oe}from"./avatar-B-AS-16N.js";import{b as Je,P as Xe,a as Qe}from"./popover-DuZ2ZN5J.js";import{n as tt}from"./Inbox01-Czow08Bp.js";import{B as st}from"./badge-BFm6jM0d.js";import{i as De}from"./Check-Bkb61eVw.js";import{s as nt}from"./XClose-Cv_qbaYN.js";import{i as $s}from"./ChevronRight-BBcOJkyP.js";import{C as bt}from"./create-organization-dialog-DWV2eGAF.js";import{c as Is,b as Os,g as Ts,a as Ps,D as Es}from"./dialog-BmGDp4UV.js";import{L as Ms}from"./form-qYB4UriD.js";import{S as As}from"./switch-B-1QAIh-.js";import{i as Ls}from"./Code01-DEMYMNLO.js";import{a as jt}from"./Copy01-BvgMlJ5t.js";import{u as vt,a as Ds}from"./use-organization-settings-Bu92wRjl.js";import{i as Rs}from"./File06-CkTcogsG.js";import{I as Hs}from"./input-Dv5qvD5N.js";import{c as Bs}from"./Grid01-zbmmdox0.js";import{a as Us,b as Ws,D as Fs,c as Vs,g as rt}from"./dropdown-menu-6IaHSzwJ.js";import{n as it}from"./LinkExternal01-DJasjN8P.js";import{t as Gs}from"./Settings01-CMNXJNnf.js";import{u as wt,L as Nt}from"./localstorage-keys-Ds2uOTRP.js";import{R as Zs,a as St,b as Ks}from"./resizable-CZuYHBhW.js";import"./spinner-BPZfVVyD.js";import"./use-mcp-prompts-Chz_2-6S.js";import"./useQuery-DDYln2BW.js";import"./AlertCircle-BOIQEKjW.js";import"./ArrowUp-BRclUYsx.js";import"./Edit01-ByF-cYbh.js";import"./Terminal-CrrxpXUI.js";import"./monaco-editor-q53ZLBJ5.js";import"./empty-state-oU8PNga_.js";import"./use-connection-B8DnjeO8.js";import"./useMutation-BOrtlNTb.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-Ds-ERWzq.js";import"./Trash01-C-euKa34.js";import"./use-virtual-mcp-ayu_K6US.js";import"./use-create-virtual-mcp-7fubOknm.js";import"./index-BYzsWn1B.js";import"./use-llm-H-K3anTg.js";import"./use-binding-BVOuBiur.js";import"./binder-C4CQlgMb.js";import"./select-ODRW9YrY.js";import"./Image01-BuXlAy8i.js";import"./textarea-DK_SwVx9.js";import"./alert-dialog-B4H6MrIT.js";import"./infiniteQueryObserver-CrYps4St.js";const Ge=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Ge.displayName="ArrowUpRight";const Ct=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ct.displayName="BarChart10";const yt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));yt.displayName="BookOpen01";const kt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));kt.displayName="Building02";const _t=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));_t.displayName="ChevronLeftDouble";const zt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));zt.displayName="ChevronRightDouble";const Ze=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Ze.displayName="Dataflow03";const $t=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));$t.displayName="FaceSmile";const It=({size:t=24,color:e="currentColor",...s})=>N.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},N.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 Ot=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ot.displayName="LayoutRight";const Tt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Tt.displayName="LogOut01";const Pt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Pt.displayName="LogOut02";const Et=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Et.displayName="Mail01";const et=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));et.displayName="Settings02";const Mt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Mt.displayName="Settings04";function Ys(){const t=w.c(65),{org:e}=ae(),[,s]=He(),{selectedVirtualMcp:r,modelsConnections:i,isChatEmpty:l,activeThreadId:o,createThread:c,switchToThread:a,threads:d}=hs();let m;if(t[0]!==o||t[1]!==d){let F;t[3]!==o?(F=I=>I.id===o,t[3]=o,t[4]=F):F=t[4],m=d.find(F),t[0]=o,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=N.useState(!1),[x,h]=N.useTransition();let b;t[5]!==e.id?(b=xs(e.id),t[5]=e.id,t[6]=b):b=t[6];const j=r??b;let v;t[7]!==c?(v=()=>{h(()=>{c()})},t[7]=c,t[8]=v):v=t[8];const S=v;if(i.length===0){let F;t[9]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Se.Header.Left,{className:"gap-2"}),t[9]=F):F=t[9];let I;t[10]!==s?(I=()=>s(!1),t[10]=s,t[11]=I):I=t[11];let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=D):D=t[12];let G;t[13]!==I?(G=n.jsxs(Se.Header,{className:"flex-none",children:[F,n.jsx(Se.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:D})})]}),t[13]=I,t[14]=G):G=t[14];let Y;t[15]!==e?(Y=n.jsx(te.Main,{className:"flex flex-col items-center",children:n.jsx(te.EmptyState,{children:n.jsx(te.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=Y):Y=t[16];let J;return t[17]!==G||t[18]!==Y?(J=n.jsxs(te,{children:[G,Y]}),t[17]=G,t[18]=Y,t[19]=J):J=t[19],J}const y=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let C;t[20]!==y?(C=_("absolute inset-0 flex flex-col transition-all ease-in-out",y),t[20]=y,t[21]=C):C=t[21];let z;t[22]!==f||t[23]!==l?(z=!l&&f?.title&&n.jsx(gs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=l,t[24]=z):z=t[24];let O;t[25]!==z?(O=n.jsx(Se.Header.Left,{className:"gap-2",children:z}),t[25]=z,t[26]=O):O=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(pt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=$):$=t[27];let k;t[28]!==S||t[29]!==x?(k=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:$}),t[28]=S,t[29]=x,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=()=>p(!0),t[31]=T):T=t[31];let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(bs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=P):P=t[32];let E;t[33]!==s?(E=()=>s(!1),t[33]=s,t[34]=E):E=t[34];let L;t[35]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=L):L=t[35];let A;t[36]!==E?(A=n.jsx("button",{type:"button",onClick:E,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:L}),t[36]=E,t[37]=A):A=t[37];let M;t[38]!==A||t[39]!==k?(M=n.jsxs(Se.Header.Right,{className:"gap-1",children:[k,P,A]}),t[38]=A,t[39]=k,t[40]=M):M=t[40];let B;t[41]!==M||t[42]!==O?(B=n.jsxs(Se.Header,{className:"flex-none",children:[O,M]}),t[41]=M,t[42]=O,t[43]=B):B=t[43];let Z;t[44]!==j||t[45]!==l?(Z=n.jsx(te.Main,{children:l?n.jsx(te.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(us,{icon:j.icon,name:j.title,size:"lg",fallbackIcon:n.jsx(ht,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:j.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:j.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(te.IceBreakers,{})]})}):n.jsx(te.Messages,{})}),t[44]=j,t[45]=l,t[46]=Z):Z=t[46];let U;t[47]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(te.Footer,{children:n.jsx(te.Input,{})}),t[47]=U):U=t[47];let R;t[48]!==B||t[49]!==Z||t[50]!==C?(R=n.jsxs("div",{className:C,children:[B,Z,U]}),t[48]=B,t[49]=Z,t[50]=C,t[51]=R):R=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=_("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let K;t[55]!==o||t[56]!==a||t[57]!==d?(K=n.jsx(js,{threads:d,activeThreadId:o,onThreadSelect:a,onClose:V}),t[55]=o,t[56]=a,t[57]=d,t[58]=K):K=t[58];let se;t[59]!==W||t[60]!==K?(se=n.jsx("div",{className:W,children:K}),t[59]=W,t[60]=K,t[61]=se):se=t[61];let q;return t[62]!==R||t[63]!==se?(q=n.jsxs(te,{className:"relative overflow-hidden",children:[R,se]}),t[62]=R,t[63]=se,t[64]=q):q=t[64],q}function qs(){const t=w.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(te.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xt,{fallback:e,children:n.jsx(N.Suspense,{fallback:n.jsx(te.Skeleton,{}),children:n.jsx(Ys,{})})}),t[1]=s):s=t[1],s}const Js=!1;function Xs(){const t=w.c(33),{locator:e,org:s}=ae(),r=ke(),i=Re(),{org:l,project:o}=Ce.parse(e),c=Ce.isOrgAdminProject(e),{data:a}=zs(s.id,o);let d;t[0]!==a?.enabledPlugins?(d=a?.enabledPlugins??[],t[0]=a?.enabledPlugins,t[1]=d):d=t[1];const m=d;let f;t[2]!==m?(f=I=>m.includes(I.pluginId),t[2]=m,t[3]=f):f=t[3];const u=Jt.filter(f),p=i.location.pathname===`/${l}/${o}`||i.location.pathname===`/${l}/${o}/`;let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_s,{}),t[4]=x):x=t[4];const h={key:"home",label:"Home",icon:x,onClick:()=>{p?window.dispatchEvent(new CustomEvent("reset-home-view")):r({to:"/$org/$project",params:{org:l,project:o}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ks,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:ne}})};let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ps,{}),t[6]=j):j=t[6];const v={key:"mcps",label:"Connections",icon:j,onClick:()=>r({to:"/$org/$project/mcps",params:{org:l,project:ne}})};let S;t[7]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Qt,{}),t[7]=S):S=t[7];let y;t[8]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(kt,{}),t[8]=y):y=t[8];const C={key:"store",label:"Store",icon:y,onClick:()=>r({to:"/$org/$project/store",params:{org:l,project:ne}})};let z;t[9]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(ht,{}),t[9]=z):z=t[9];const O={key:"agents",label:"Agents",icon:z,onClick:()=>r({to:"/$org/$project/agents",params:{org:l,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(Ct,{}),t[10]=$):$=t[10];const k={key:"monitoring",label:"Monitor",icon:$,onClick:()=>r({to:"/$org/$project/monitoring",params:{org:l,project:ne}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Ze,{}),t[11]=T):T=t[11];const P={key:"workflows",label:"Workflows",icon:T,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:ne}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx($t,{}),t[12]=E):E=t[12];const A=[g,v,P,C,O,k,{key:"members",label:"Members",icon:E,onClick:()=>r({to:"/$org/$project/members",params:{org:l,project:ne}})}],M=u.map(I=>({key:I.pluginId,label:I.label,icon:I.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})}));let B;t[13]!==m?(B=I=>m.includes(I.pluginId),t[13]=m,t[14]=B):B=t[14];const U=Xt.filter(B).map(I=>({type:"group",group:{id:`${I.pluginId}-${I.id}`,label:I.label,items:I.items.map((D,G)=>({key:`${I.pluginId}-${I.id}-${G}`,label:D.label,icon:D.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})})),defaultExpanded:I.defaultExpanded??!0}}));if(c){const I=[{type:"items",items:[h,...A]}];if(M.length>0){let D;t[15]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[15]=D):D=t[15],I.push(D);let G;t[16]!==M?(G={type:"items",items:M},t[16]=M,t[17]=G):G=t[17],I.push(G)}if(U.length>0){if(M.length===0){let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[18]=D):D=t[18],I.push(D)}I.push(...U)}return I}let R;t[19]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(ms,{}),t[19]=R):R=t[19];let H;t[20]!==r||t[21]!==l||t[22]!==o?(H={key:"tasks",label:"Tasks",icon:R,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:o}})},t[20]=r,t[21]=l,t[22]=o,t[23]=H):H=t[23];const W=H;let V;t[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Ze,{}),t[24]=V):V=t[24];let K;t[25]!==r||t[26]!==l||t[27]!==o?(K={key:"workflows",label:"Workflows",icon:V,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:o}})},t[25]=r,t[26]=l,t[27]=o,t[28]=K):K=t[28];const F=[{type:"items",items:[h,W,K]}];if(M.length>0){let I;t[29]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[29]=I):I=t[29],F.push(I);let D;t[30]!==M?(D={type:"items",items:M},t[30]=M,t[31]=D):D=t[31],F.push(D)}if(U.length>0){if(M.length===0){let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[32]=I):I=t[32],F.push(I)}F.push(...U)}return F}const Qs="sidebar_state",en=3600*24*7,tn="16rem",sn="18rem",nn="3rem",rn="b",At=N.createContext(null);function Be(){const t=N.useContext(At);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function ln(t){const e=w.c(21),{defaultOpen:s,open:r,onOpenChange:i,children:l}=t,o=s===void 0?!0:s,c=$e(),[a,d]=N.useState(!1),[m,f]=N.useState(o),u=r??m;let p;e[0]!==u||e[1]!==i?(p=O=>{const $=typeof O=="function"?O(u):O;i?i($):f($),document.cookie=`${Qs}=${$}; path=/; max-age=${en}`},e[0]=u,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==c||e[4]!==x?(h=()=>c?d(an):x(on),e[3]=c,e[4]=x,e[5]=h):h=e[5];const b=h;let g,j;e[6]!==b?(g=()=>{const O=$=>{if($.key===rn&&($.metaKey||$.ctrlKey)){const k=$.target;if(k.tagName==="INPUT"||k.tagName==="TEXTAREA"||k.isContentEditable)return;$.preventDefault(),b()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},j=[b],e[6]=b,e[7]=g,e[8]=j):(g=e[7],j=e[8]),N.useEffect(g,j);const v=u?"expanded":"collapsed";let S;e[9]!==c||e[10]!==u||e[11]!==a||e[12]!==x||e[13]!==v||e[14]!==b?(S={state:v,open:u,setOpen:x,isMobile:c,openMobile:a,setOpenMobile:d,toggleSidebar:b},e[9]=c,e[10]=u,e[11]=a,e[12]=x,e[13]=v,e[14]=b,e[15]=S):S=e[15];const y=S;let C;e[16]!==l?(C=n.jsx(mt,{delayDuration:0,children:l}),e[16]=l,e[17]=C):C=e[17];let z;return e[18]!==y||e[19]!==C?(z=n.jsx(At.Provider,{value:y,children:C}),e[18]=y,e[19]=C,e[20]=z):z=e[20],z}function on(t){return!t}function an(t){return!t}function cn(t){const e=w.c(14);let s,r,i,l;e[0]!==t?({className:r,style:l,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l):(s=e[1],r=e[2],i=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":tn,"--sidebar-width-icon":nn,...l},e[5]=l,e[6]=o):o=e[6];const c=o;let a;e[7]!==r?(a=_("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=a):a=e[8];let d;return e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==a?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:a,...i,children:s}),e[9]=s,e[10]=i,e[11]=c,e[12]=a,e[13]=d):d=e[13],d}function dn(t){const e=w.c(46);let s,r,i,l,o,c;e[0]!==t?({side:l,variant:o,collapsible:c,className:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6]);const a=l===void 0?"left":l,d=o===void 0?"sidebar":o,m=c===void 0?"offcanvas":c,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Be();if(m==="none"){let $;e[7]!==r?($=_("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=$):$=e[8];let k;return e[9]!==s||e[10]!==i||e[11]!==$?(k=n.jsx("div",{"data-slot":"sidebar",className:$,...i,children:s}),e[9]=s,e[10]=i,e[11]=$,e[12]=k):k=e[12],k}if(f){let $;e[13]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":sn},e[13]=$):$=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(ws,{className:"sr-only",children:[n.jsx(Ns,{children:"Sidebar"}),n.jsx(Ss,{children:"Displays the mobile sidebar."})]}),e[14]=k):k=e[14];let T;e[15]!==s?(T=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let P;e[17]!==a||e[18]!==T?(P=n.jsxs(Cs,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:$,side:a,children:[k,T]}),e[17]=a,e[18]=T,e[19]=P):P=e[19];let E;return e[20]!==p||e[21]!==i||e[22]!==x||e[23]!==P?(E=n.jsx(vs,{open:p,onOpenChange:x,...i,children:P}),e[20]=p,e[21]=i,e[22]=x,e[23]=P,e[24]=E):E=e[24],E}const h=u==="collapsed"?m:"",b=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let g;e[25]!==b?(g=_("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=g):g=e[26];let j;e[27]!==g?(j=n.jsx("div",{"data-slot":"sidebar-gap",className:g}),e[27]=g,e[28]=j):j=e[28];const v=a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[29]!==r||e[30]!==v||e[31]!==S?(y=_("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=y):y=e[32];let C;e[33]!==s?(C=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=C):C=e[34];let z;e[35]!==i||e[36]!==y||e[37]!==C?(z=n.jsx("div",{"data-slot":"sidebar-container",className:y,...i,children:C}),e[35]=i,e[36]=y,e[37]=C,e[38]=z):z=e[38];let O;return e[39]!==a||e[40]!==u||e[41]!==z||e[42]!==h||e[43]!==j||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":a,"data-slot":"sidebar",children:[j,z]}),e[39]=a,e[40]=u,e[41]=z,e[42]=h,e[43]=j,e[44]=d,e[45]=O):O=e[45],O}function mn(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Lt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function fn(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Dt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("h-4 m-0! w-full",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-sidebar":"separator",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function un(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Rt(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Ht(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("w-full text-sm",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function ye(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function me(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("group/menu-item relative",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}const pn=ts("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ue(t){const e=w.c(28);let s,r,i,l,o,c,a;e[0]!==t?({asChild:i,isActive:l,variant:o,size:c,tooltip:a,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c,e[7]=a):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6],a=e[7]);const d=i===void 0?!1:i,m=l===void 0?!1:l,f=o===void 0?"default":o,u=c===void 0?"default":c,p=d?es:"button",{isMobile:x,state:h}=Be();let b;e[8]!==s||e[9]!==u||e[10]!==f?(b=_(pn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=b):b=e[11];let g;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==b?(g=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:b,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=b,e[17]=g):g=e[17];const j=g;if(!a)return j;if(typeof a=="string"){let z;e[18]!==a?(z={children:a},e[18]=a,e[19]=z):z=e[19],a=z}let v;e[20]!==j?(v=n.jsx(Me,{asChild:!0,children:j}),e[20]=j,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let y;e[22]!==S||e[23]!==a?(y=n.jsx(Ee,{side:"right",align:"center",hidden:S,...a}),e[22]=S,e[23]=a,e[24]=y):y=e[24];let C;return e[25]!==v||e[26]!==y?(C=n.jsxs(Ae,{children:[v,y]}),e[25]=v,e[26]=y,e[27]=C):C=e[27],C}function hn(t){const e=w.c(18),{label:s,children:r,defaultExpanded:i}=t,l=i===void 0?!0:i,[o,c]=N.useState(l);let a;e[0]!==o?(a=()=>c(!o),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!o&&"-rotate-90";let f;e[4]!==m?(f=_("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(gt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==a||e[9]!==d||e[10]!==u?(p=n.jsx(ye,{children:n.jsx(me,{children:n.jsxs(Ue,{className:"h-6 cursor-pointer select-none",onClick:a,children:[d,u]})})}),e[8]=a,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==o?(x=o&&n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=o,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Rt,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Bt(t){const e=w.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let i;e[2]!==s.label?(i=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=i):i=e[3];let l;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==i?(l=n.jsxs(Ue,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,i]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=i,e[9]=l):l=e[9];let o;return e[10]!==s.key||e[11]!==l?(o=n.jsx(me,{children:l},s.key),e[10]=s.key,e[11]=l,e[12]=o):o=e[12],o}function xn(t){const e=w.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Dt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,i=s.group.defaultExpanded;let l;e[2]!==s.group.items?(l=s.group.items.map(bn),e[2]=s.group.items,e[3]=l):l=e[3];let o;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==l?(o=n.jsx(hn,{label:r,defaultExpanded:i,children:l}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=l,e[7]=o):o=e[7],o}case"items":{let r;e[8]!==s.items?(r=s.items.map(gn),e[8]=s.items,e[9]=r):r=e[9];let i;return e[10]!==r?(i=n.jsx(Rt,{className:"py-0",children:n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=i):i=e[11],i}}}function gn(t){return n.jsx(Bt,{item:t},t.key)}function bn(t){return n.jsx(Bt,{item:t},t.key)}function Ut(t){const e=w.c(14),{sections:s,header:r,footer:i,additionalContent:l,variant:o,collapsible:c,contentClassName:a}=t,d=o===void 0?"sidebar":o,m=c===void 0?"icon":c;let f;e[0]!==a?(f=_("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",a),e[0]=a,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(jn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==l||e[5]!==f||e[6]!==u?(p=n.jsxs(un,{className:f,children:[u,l]}),e[4]=l,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==i||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(dn,{variant:d,collapsible:m,children:[r,p,i]}),e[8]=m,e[9]=i,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function jn(t,e){return n.jsx(xn,{section:t},e)}Ut.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(de,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const vn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function ze(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_(vn,s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(X,{variant:"ghost",size:"sm",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function wn({invitation:t,onStatusChange:e}){const[s,r]=N.useState(!1),[i,l]=N.useState(!1),o=ke(),c=async()=>{r(!0);try{const p=await re.organization.acceptInvitation({invitationId:t.id});if(p.error)ie.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await re.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ie.success("Invitation accepted!"),o({to:"/$org",params:{org:x.data.slug}})):(ie.success("Invitation accepted! Redirecting..."),o({to:"/"}))}}catch{ie.error("Failed to accept invitation"),r(!1)}},a=async()=>{l(!0);try{const p=await re.organization.rejectInvitation({invitationId:t.id});p.error?(ie.error(p.error.message),l(!1)):(ie.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{ie.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:_("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(X,{variant:"ghost",size:"icon",onClick:a,disabled:s||i,className:"h-8 w-8",children:n.jsx(nt,{size:14})}),n.jsx(X,{variant:"outline",size:"icon",onClick:c,disabled:s||i,className:"h-8 w-8",children:n.jsx(De,{size:14})})]}):f?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(De,{size:12}),"Accepted"]}):u?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(nt,{size:12}),"Declined"]}):null})]})}function Nn(){const[t,e]=N.useState(!1),s=N.useContext(ss),{data:r}=s.hooks.useListUserInvitations(),{data:i}=re.useListOrganizations(),[l,o]=N.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const b=(i??[]).find(g=>g.id===h.organizationId);return{...h,organizationSlug:b?.slug||h.organizationSlug,organizationName:b?.name||h.organizationName}}).map(h=>({...h,status:l[h.id]||h.status})),f=[...m].sort((h,b)=>{const g={pending:0,accepted:1,rejected:2};return(g[h.status]??999)-(g[b.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,b)=>{o(g=>({...g,[h]:b}))};return n.jsxs(Je,{open:t,onOpenChange:e,children:[n.jsx(Xe,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(tt,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(Qe,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(wn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(tt,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function Sn(t){const e=w.c(28),{user:s,userImage:r,onOpenSettings:i}=t;let l;e[0]!==s?(l=async()=>{if(!s)return;const C=`ID: ${s.id}
2
2
  Name: ${s.name||"N/A"}
3
3
  Email: ${s.email}`;try{await navigator.clipboard.writeText(C),ie.success("User info copied to clipboard")}catch{ie.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=l):l=e[1];const o=l,c=s.name||s.email||"U";let a;e[2]!==c||e[3]!==r?(a=n.jsx(oe,{url:r,fallback:c,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=c,e[3]=r,e[4]=a):a=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==o||e[13]!==a||e[14]!==u?(p=n.jsxs(X,{variant:"ghost",onClick:o,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[a,u]}),e[12]=o,e[13]=a,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Nn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Mt,{size:18}),e[17]=h):h=e[17];let b;e[18]!==i?(b=n.jsxs(ze,{onClick:i,children:[h,"Preferences"]}),e[18]=i,e[19]=b):b=e[19];let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(yt,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Ge,{size:14})]})}),e[20]=g):g=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ot,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Ge,{size:14})]})}),e[21]=j):j=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(ze,{onClick:Cn,children:[n.jsx(Pt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==b?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,b,g,j,v]}),e[23]=b,e[24]=S):S=e[24];let y;return e[25]!==S||e[26]!==p?(y=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S]})}),e[25]=S,e[26]=p,e[27]=y):y=e[27],y}function Cn(){return re.signOut()}function yn(t){const e=w.c(26),{org:s,isActive:r,isHovered:i,onClick:l,onSettings:o,onHover:c}=t,a=r,d=i&&!r,m=i&&"bg-accent/50",f=r&&!i&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=_("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==l?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[3]=l,e[4]=p):p=e[4];let x;e[5]!==c||e[6]!==s.id?(x=()=>c?.(s.id),e[5]=c,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let b;e[8]!==s.name||e[9]!==h?(b=n.jsx(oe,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=b):b=e[10];let g;e[11]!==s.name?(g=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=g):g=e[12];let j;e[13]!==o||e[14]!==s.name||e[15]!==d||e[16]!==a?(j=o&&a?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(et,{size:16,className:"text-muted-foreground"})}):d?n.jsx($s,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=o,e[14]=s.name,e[15]=d,e[16]=a,e[17]=j):j=e[17];let v;return e[18]!==l||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==b||e[23]!==g||e[24]!==j?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:l,onKeyDown:p,onMouseEnter:x,children:[b,g,j]}),e[18]=l,e[19]=u,e[20]=p,e[21]=x,e[22]=b,e[23]=g,e[24]=j,e[25]=v):v=e[25],v}function kn(t){const e=w.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:i,onOrgSettings:l,onPopoverClose:o,onCreateOrganization:c,onOrgHover:a}=t,{data:d}=re.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==c||e[3]!==a||e[4]!==i||e[5]!==l||e[6]!==o||e[7]!==d){let b;e[12]!==s?(b=(C,z)=>C.slug===s?-1:z.slug===s?1:C.name.localeCompare(z.name),e[12]=s,e[13]=b):b=e[13];const g=[...d??[]].sort(b);u="flex flex-col min-w-[240px] border-l border-border";let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=j):j=e[14];let v;e[15]!==c||e[16]!==o?(v=()=>{o(),c()},e[15]=c,e[16]=o,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(pt,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[j,n.jsx(X,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let y;e[21]!==s||e[22]!==r||e[23]!==a||e[24]!==i||e[25]!==l?(y=C=>n.jsx(yn,{org:C,isActive:C.slug===s,isHovered:C.id===r,onClick:()=>i(C.slug),onSettings:()=>l(C.slug),onHover:a},C.slug),e[21]=s,e[22]=r,e[23]=a,e[24]=i,e[25]=l,e[26]=y):y=e[26],f=g.map(y),e[0]=s,e[1]=r,e[2]=c,e[3]=a,e[4]=i,e[5]=l,e[6]=o,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Wt(t){const e=w.c(48),{open:s,onOpenChange:r,user:i,userImage:l}=t,[o,c]=fs(),[a,d]=N.useState(!1);let m;e[0]!==i.id?(m=()=>{navigator.clipboard.writeText(i.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=i.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Is,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Os,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ts,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Le,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=i.name||"U";let h;e[4]!==x||e[5]!==l?(h=n.jsx(oe,{url:l,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=l,e[6]=h):h=e[6];const b=i.name||"User";let g;e[7]!==b?(g=n.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[7]=b,e[8]=g):g=e[8];let j;e[9]!==i.email?(j=n.jsx("span",{className:"text-sm text-muted-foreground",children:i.email}),e[9]=i.email,e[10]=j):j=e[10];let v;e[11]!==g||e[12]!==j?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[g,j]}),e[11]=g,e[12]=j,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let y;e[17]!==o||e[18]!==c?(y=()=>c(!o),e[17]=o,e[18]=c,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(Ms,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Ls,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=C):C=e[20];let z;e[21]!==o||e[22]!==c?(z=n.jsx("div",{onClick:_n,children:n.jsx(As,{checked:o,onCheckedChange:c})}),e[21]=o,e[22]=c,e[23]=z):z=e[23];let O;e[24]!==y||e[25]!==z?(O=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[C,z]}),e[24]=y,e[25]=z,e[26]=O):O=e[26];let $;e[27]!==S||e[28]!==O?($=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,O]}),e[27]=S,e[28]=O,e[29]=$):$=e[29];let k;e[30]!==i.id?(k=n.jsx("span",{className:"font-mono text-xs",children:i.id}),e[30]=i.id,e[31]=k):k=e[31];let T;e[32]!==a?(T=a?n.jsx(De,{size:14,className:"text-green-600"}):n.jsx(jt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=a,e[33]=T):T=e[33];let P;e[34]!==f||e[35]!==k||e[36]!==T?(P=n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[k,T]})}),e[34]=f,e[35]=k,e[36]=T,e[37]=P):P=e[37];let E;e[38]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ee,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=E):E=e[38];let L;e[39]!==P?(L=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(mt,{children:n.jsxs(Ae,{children:[P,E]})})}),e[39]=P,e[40]=L):L=e[40];let A;e[41]!==$||e[42]!==L?(A=n.jsxs(Ps,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[$,L]})]}),e[41]=$,e[42]=L,e[43]=A):A=e[43];let M;return e[44]!==r||e[45]!==s||e[46]!==A?(M=n.jsx(Es,{open:s,onOpenChange:r,children:A}),e[44]=r,e[45]=s,e[46]=A,e[47]=M):M=e[47],M}function _n(t){return t.stopPropagation()}function Ft(t){const e=w.c(76),{isCollapsed:s,variant:r,onCreateProject:i}=t,l=s===void 0?!1:s,o=r===void 0?"light":r;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:a,project:d}=qe(c),{data:m}=re.useListOrganizations(),{data:f}=re.useSession(),u=ke(),p=o==="dark",h=ae()?.project;let b;e[1]!==a||e[2]!==m?(b=m?.find(Q=>Q.slug===a),e[1]=a,e[2]=m,e[3]=b):b=e[3];const g=b,[j,v]=N.useState(!1),[S,y]=N.useState(!1),[C,z]=N.useState(!1),[O,$]=N.useState(null),k=f?.user,T=k?.image;let P;e[4]!==g||e[5]!==O||e[6]!==m?(P=O?m?.find(Q=>Q.id===O):g,e[4]=g,e[5]=O,e[6]=m,e[7]=P):P=e[7];const E=P;let L;e[8]!==u?(L=Q=>{v(!1),u({to:"/$org/$project/settings",params:{org:Q,project:ne}})},e[8]=u,e[9]=L):L=e[9];const A=L;let M;e[10]!==u?(M=Q=>{v(!1),u({to:"/$org/$project",params:{org:Q,project:ne}})},e[10]=u,e[11]=M):M=e[11];const B=M;let Z;e[12]!==u?(Z=(Q,Ve)=>{v(!1),u({to:"/$org/$project",params:{org:Q,project:Ve}})},e[12]=u,e[13]=Z):Z=e[13];const U=Z;let R;e[14]!==u?(R=(Q,Ve)=>{v(!1),u({to:"/$org/$project/settings",params:{org:Q,project:Ve}})},e[14]=u,e[15]=R):R=e[15];const H=R;let W;e[16]!==i?(W=i?()=>{v(!1),i()}:void 0,e[16]=i,e[17]=W):W=e[17];const V=W;let K;e[18]===Symbol.for("react.memo_cache_sentinel")?(K=Q=>{v(Q),Q||$(null)},e[18]=K):K=e[18];const se=K;let q;e[19]!==g?(q=()=>{g&&$(g.id)},e[19]=g,e[20]=q):q=e[20];const F=q,I=p?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",D=l?"justify-center":"justify-start",G=l?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==I||e[22]!==D||e[23]!==G?(Y=_("h-7 min-w-0 max-w-full",I,D,G),e[21]=I,e[22]=D,e[23]=G,e[24]=Y):Y=e[24];const J=g?.logo??"",ce=g?.name??"",Fe=p&&"border-none";let fe;e[25]!==Fe?(fe=_("shrink-0 rounded-[5px]",Fe),e[25]=Fe,e[26]=fe):fe=e[26];let ue;e[27]!==J||e[28]!==ce||e[29]!==fe?(ue=n.jsx(oe,{url:J,fallback:ce,size:"xs",className:fe,objectFit:"cover"}),e[27]=J,e[28]=ce,e[29]=fe,e[30]=ue):ue=e[30];let pe;e[31]!==g?.name||e[32]!==h||e[33]!==l||e[34]!==p?(pe=!l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_("min-w-0 text-left",p&&"flex-1"),children:p&&h?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:h.name??h.slug})]}):n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),p?n.jsx(ft,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(gt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=h,e[33]=l,e[34]=p,e[35]=pe):pe=e[35];let he;e[36]!==F||e[37]!==Y||e[38]!==ue||e[39]!==pe?(he=n.jsx(Xe,{asChild:!0,children:n.jsxs(X,{variant:"ghost",size:"sm",onClick:F,className:Y,children:[ue,pe]})}),e[36]=F,e[37]=Y,e[38]=ue,e[39]=pe,e[40]=he):he=e[40];let xe;e[41]!==k||e[42]!==T?(xe=k&&n.jsx(Sn,{user:k,userImage:T,onOpenSettings:()=>{y(!0),v(!1)}}),e[41]=k,e[42]=T,e[43]=xe):xe=e[43];let Ie,Oe;e[44]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>v(!1),Oe=()=>z(!0),e[44]=Ie,e[45]=Oe):(Ie=e[44],Oe=e[45]);let ge;e[46]!==A||e[47]!==B||e[48]!==O||e[49]!==a?(ge=n.jsx(kn,{currentOrgSlug:a,hoveredOrgId:O,onOrgSelect:B,onOrgSettings:A,onPopoverClose:Ie,onCreateOrganization:Oe,onOrgHover:$}),e[46]=A,e[47]=B,e[48]=O,e[49]=a,e[50]=ge):ge=e[50];let be;e[51]!==V||e[52]!==H||e[53]!==U||e[54]!==E||e[55]!==a||e[56]!==d?(be=Js,e[51]=V,e[52]=H,e[53]=U,e[54]=E,e[55]=a,e[56]=d,e[57]=be):be=e[57];let je;e[58]!==xe||e[59]!==ge||e[60]!==be?(je=n.jsxs(Qe,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[xe,ge,be]}),e[58]=xe,e[59]=ge,e[60]=be,e[61]=je):je=e[61];let ve;e[62]!==j||e[63]!==he||e[64]!==je?(ve=n.jsxs(Je,{open:j,onOpenChange:se,children:[he,je]}),e[62]=j,e[63]=he,e[64]=je,e[65]=ve):ve=e[65];let we;e[66]!==S||e[67]!==k||e[68]!==T?(we=k&&S&&k.email&&n.jsx(Wt,{open:S,onOpenChange:y,user:{...k,name:k.name??void 0,email:k.email},userImage:T}),e[66]=S,e[67]=k,e[68]=T,e[69]=we):we=e[69];let Ne;e[70]!==C?(Ne=n.jsx(bt,{open:C,onOpenChange:z}),e[70]=C,e[71]=Ne):Ne=e[71];let Te;return e[72]!==ve||e[73]!==we||e[74]!==Ne?(Te=n.jsxs(n.Fragment,{children:[ve,we,Ne]}),e[72]=ve,e[73]=we,e[74]=Ne,e[75]=Te):Te=e[75],Te}Ft.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:_("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(de,{className:_("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(de,{className:_("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Ke(t){const e=w.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:i}=Be(),l=r==="collapsed",[o,c]=He(),{locator:a}=ae();let d;e[0]!==a?(d=Ce.isOrgAdminProject(a),e[0]=a,e[1]=d):d=e[1];const f=!d;let u;e[2]!==c?(u=()=>{c(zn)},e[2]=c,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=_("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const b=l&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let g;e[6]!==b?(g=_("w-full min-w-0 transition-opacity",b),e[6]=b,e[7]=g):g=e[7];const j=f?"dark":"light";let v;e[8]!==l||e[9]!==s||e[10]!==j?(v=n.jsx(Ft,{isCollapsed:l,variant:j,onCreateProject:s}),e[8]=l,e[9]=s,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==g||e[13]!==v?(S=n.jsx("div",{className:g,children:v}),e[12]=g,e[13]=v,e[14]=S):S=e[14];const y=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",C=l?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let z;e[15]!==y||e[16]!==C?(z=_("absolute inset-0 m-auto size-7 transition-opacity",y,C),e[15]=y,e[16]=C,e[17]=z):z=e[17];const O=!l,$=f?"text-zinc-400":"text-muted-foreground";let k;e[18]!==$?(k=_("size-4 shrink-0",$),e[18]=$,e[19]=k):k=e[19];let T;e[20]!==k?(T=n.jsx(zt,{className:k}),e[20]=k,e[21]=T):T=e[21];let P;e[22]!==z||e[23]!==O||e[24]!==T||e[25]!==i?(P=n.jsx(X,{variant:"ghost",size:"icon",className:z,onClick:i,"aria-label":"Expand sidebar",disabled:O,children:T}),e[22]=z,e[23]=O,e[24]=T,e[25]=i,e[26]=P):P=e[26];let E;e[27]!==P||e[28]!==S?(E=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,P]}),e[27]=P,e[28]=S,e[29]=E):E=e[29];const L=l&&"hidden";let A;e[30]!==L?(A=_("flex items-center gap-0.5 shrink-0",L),e[30]=L,e[31]=A):A=e[31];const M=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let B;e[32]!==M?(B=_("size-7",M),e[32]=M,e[33]=B):B=e[33];const Z=f?"text-zinc-400":"text-muted-foreground";let U;e[34]!==Z?(U=_("size-4",Z),e[34]=Z,e[35]=U):U=e[35];let R;e[36]!==U?(R=n.jsx(_t,{className:U}),e[36]=U,e[37]=R):R=e[37];let H;e[38]!==l||e[39]!==B||e[40]!==R||e[41]!==i?(H=n.jsx(Me,{asChild:!0,children:n.jsx(X,{variant:"ghost",size:"icon",className:B,onClick:i,"aria-label":"Collapse sidebar",disabled:l,children:R})}),e[38]=l,e[39]=B,e[40]=R,e[41]=i,e[42]=H):H=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ee,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==H?(V=n.jsxs(Ae,{children:[H,W]}),e[44]=H,e[45]=V):V=e[45];let K;e[46]!==o||e[47]!==f?(K=_("size-7",f?_("hover:bg-zinc-800 text-zinc-400 hover:text-white",o&&"bg-zinc-800 text-white"):_("hover:bg-sidebar-accent",o&&"bg-sidebar-accent")),e[46]=o,e[47]=f,e[48]=K):K=e[48];const se=f?"text-inherit":"text-muted-foreground";let q;e[49]!==se?(q=_(se),e[49]=se,e[50]=q):q=e[50];let F;e[51]!==q?(F=n.jsx(ut,{size:11,className:q}),e[51]=q,e[52]=F):F=e[52];let I;e[53]!==l||e[54]!==K||e[55]!==F||e[56]!==p?(I=n.jsx(Me,{asChild:!0,children:n.jsx(X,{variant:"ghost",size:"icon",className:K,onClick:p,"aria-label":"Toggle Decopilot",disabled:l,children:F})}),e[53]=l,e[54]=K,e[55]=F,e[56]=p,e[57]=I):I=e[57];let D;e[58]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Ee,{side:"bottom",children:"Toggle Decopilot"}),e[58]=D):D=e[58];let G;e[59]!==I?(G=n.jsxs(Ae,{children:[I,D]}),e[59]=I,e[60]=G):G=e[60];let Y;e[61]!==A||e[62]!==V||e[63]!==G?(Y=n.jsxs("div",{className:A,children:[V,G]}),e[61]=A,e[62]=V,e[63]=G,e[64]=Y):Y=e[64];let J;e[65]!==E||e[66]!==Y?(J=n.jsx(ye,{children:n.jsx(me,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[E,Y]})})}),e[65]=E,e[66]=Y,e[67]=J):J=e[67];let ce;return e[68]!==J||e[69]!==h?(ce=n.jsx(Lt,{className:h,children:J}),e[68]=J,e[69]=h,e[70]=ce):ce=e[70],ce}function zn(t){return!t}Ke.Skeleton=function({isDark:e=!1}){return n.jsx(Lt,{className:_("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(ye,{children:n.jsx(me,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(de,{className:_("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(de,{className:_("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(de,{className:_("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(de,{className:_("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function $n(){const t=w.c(10),{locator:e}=ae(),s=ke(),i=Re().location.pathname;let l;t[0]!==i?(l=i.includes("/settings"),t[0]=i,t[1]=l):l=t[1];const o=l;let c;t[2]!==e||t[3]!==s?(c=()=>{s({to:"/$org/$project/settings",params:Ce.parse(e)})},t[2]=e,t[3]=s,t[4]=c):c=t[4];const a=c;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(et,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==a||t[8]!==o?(f=n.jsx(fn,{className:"py-2 border-r",children:n.jsx(ye,{children:n.jsx(me,{children:n.jsxs(Ue,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:a,isActive:o,tooltip:"Settings",children:[d,m]})})})}),t[7]=a,t[8]=o,t[9]=f):f=t[9],f}function Vt(t){const e=w.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Dt,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(me,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=i):i=e[1];let l;return e[2]!==s?(l=n.jsxs(n.Fragment,{children:[r,i,s]}),e[2]=s,e[3]=l):l=e[3],l}function In(t){const e=w.c(26),{item:s}=t,r=ke(),{org:i}=ae(),l=vt(i.id),o=Ds(i.id);let c;e[0]!==o.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(c=async()=>{const S=(l?.sidebar_items||[]).filter(y=>y.url!==s.url);await o.update.mutateAsync({sidebar_items:S})},e[0]=o.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=c):c=e[3];const a=c;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Rs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let b;e[16]!==h?(b=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=b):b=e[17];let g;e[18]!==a?(g=n.jsx(Le,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),a()}}),e[18]=a,e[19]=g):g=e[19];let j;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==b||e[24]!==g?(j=n.jsx(me,{children:n.jsxs(Ue,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,b,g]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=b,e[24]=g,e[25]=j):j=e[25],j}function lt(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(me,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(de,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function On(){const t=w.c(4),{org:e}=ae(),r=vt(e.id)?.sidebar_items;if(!r?.length)return null;let i;t[0]!==r?(i=r.map(Tn),t[0]=r,t[1]=i):i=t[1];let l;return t[2]!==i?(l=n.jsx(Vt,{children:i}),t[2]=i,t[3]=l):l=t[3],l}function Tn(t){return n.jsx(In,{item:t},t.url)}function Pn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(N.Suspense,{fallback:n.jsxs(Vt,{children:[n.jsx(lt,{}),n.jsx(lt,{})]}),children:n.jsx(On,{})}),t[0]=e):e=t[0],e}function En(t){const e=w.c(15),{onCreateProject:s}=t,r=Xs(),{locator:i}=ae();let l;e[0]!==i?(l=Ce.isOrgAdminProject(i),e[0]=i,e[1]=l):l=e[1];const o=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ke.Skeleton,{}),e[2]=c):c=e[2];let a;e[3]!==s?(a=n.jsx(N.Suspense,{fallback:c,children:n.jsx(Ke,{onCreateProject:s})}),e[3]=s,e[4]=a):a=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx($n,{}),e[5]=d):d=e[5];let m;e[6]!==o?(m=o?null:n.jsx(Pn,{}),e[6]=o,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx(xt,{children:n.jsx(N.Suspense,{fallback:null,children:m})}),e[8]=m,e[9]=f):f=e[9];const u=o?void 0:"pt-3";let p;return e[10]!==r||e[11]!==a||e[12]!==f||e[13]!==u?(p=n.jsx(Ut,{sections:r,header:a,footer:d,additionalContent:f,contentClassName:u}),e[10]=r,e[11]=a,e[12]=f,e[13]=u,e[14]=p):p=e[14],p}function Mn(t){const e=w.c(12);let s,r,i,l;e[0]!==t?({className:s,orientation:i,decorative:l,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l):(s=e[1],r=e[2],i=e[3],l=e[4]);const o=i===void 0?"horizontal":i,c=l===void 0?!0:l;let a;e[5]!==s?(a=_("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=a):a=e[6];let d;return e[7]!==c||e[8]!==o||e[9]!==r||e[10]!==a?(d=n.jsx(ns,{"data-slot":"separator-root",decorative:c,orientation:o,className:a,...r}),e[7]=c,e[8]=o,e[9]=r,e[10]=a,e[11]=d):d=e[11],d}const Gt=N.createContext(null);function An(){const t=N.useContext(Gt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Ln(t){const e=w.c(10),{children:s,onItemHover:r}=t,[i,l]=N.useState(null);let o;e[0]!==r?(o=f=>{l(f),r?.(f)},e[0]=r,e[1]=o):o=e[1];const c=o;let a;e[2]!==i||e[3]!==c?(a={hoveredItem:i,setHoveredItem:c},e[2]=i,e[3]=c,e[4]=a):a=e[4];let d;e[5]!==s?(d=n.jsx(Je,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==a||e[8]!==d?(m=n.jsx(Gt.Provider,{value:a,children:d}),e[7]=a,e[8]=d,e[9]=m):m=e[9],m}function Dn(t){const e=w.c(6),{children:s,onClick:r}=t;let i;e[0]!==s||e[1]!==r?(i=n.jsx(X,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Xe,{asChild:!0,children:n.jsx(X,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(ft,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let o;return e[4]!==i?(o=n.jsxs("div",{className:"flex items-center gap-1",children:[i,l]}),e[4]=i,e[5]=o):o=e[5],o}function Rn(t){const e=w.c(8),{item:s,fallback:r}=t,i=r===void 0?"":r,l=s?.avatarUrl??"",o=s?.name??i;let c;e[0]!==l||e[1]!==o?(c=n.jsx(oe,{url:l,fallback:o,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=o,e[2]=c):c=e[2];const a=s?.name??i;let d;e[3]!==a?(d=n.jsx("span",{children:a}),e[3]=a,e[4]=d):d=e[4];let m;return e[5]!==c||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[c,d]}),e[5]=c,e[6]=d,e[7]=m):m=e[7],m}function Hn(t){const e=w.c(6),{children:s,align:r}=t,i=r===void 0?"start":r,o=N.Children.toArray(s).filter(Bn).length===1?"280px":"480px";let c;e[0]!==o?(c={width:o},e[0]=o,e[1]=c):c=e[1];let a;return e[2]!==i||e[3]!==s||e[4]!==c?(a=n.jsx(Qe,{align:i,className:"p-0 flex items-start",style:c,children:s}),e[2]=i,e[3]=s,e[4]=c,e[5]=a):a=e[5],a}function Bn(t){return N.isValidElement(t)&&(t.type===Kt||t.type===Zt)}function Zt(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}const Kt=Zt;function Un(t){const e=w.c(6),{placeholder:s,value:r,onChange:i}=t,l=s===void 0?"Search...":s;let o;e[0]!==i?(o=a=>i(a.target.value),e[0]=i,e[1]=o):o=e[1];let c;return e[2]!==l||e[3]!==o||e[4]!==r?(c=n.jsx(Hs,{placeholder:l,value:r,onChange:o,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=o,e[4]=r,e[5]=c):c=e[5],c}function Wn(t){const e=w.c(6),{children:s,emptyMessage:r}=t,i=r===void 0?"No items found.":r,l=N.Children.count(s)>0;let o;e[0]!==i||e[1]!==l?(o=!l&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:i}),e[0]=i,e[1]=l,e[2]=o):o=e[2];let c;return e[3]!==s||e[4]!==o?(c=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[o,s]}),e[3]=s,e[4]=o,e[5]=c):c=e[5],c}function Fn(t){const e=w.c(15),{item:s,onClick:r,onHover:i,children:l}=t,o=An();let c;e[0]!==o||e[1]!==s||e[2]!==i?(c=()=>{o.setHoveredItem(s.slug),i?.(s)},e[0]=o,e[1]=s,e[2]=i,e[3]=c):c=e[3];const a=c;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||n.jsxs(n.Fragment,{children:[n.jsx(oe,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==a||e[12]!==d||e[13]!==m?(f=n.jsx(X,{onClick:d,onMouseEnter:a,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=a,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function Vn(t){const e=w.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function Gn(t){const e=w.c(11),{onClick:s,icon:r,children:i,variant:l}=t,c=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let a;e[0]!==c?(a=_("w-full justify-start font-normal",c),e[0]=c,e[1]=a):a=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==i?(m=n.jsx("span",{children:i}),e[4]=i,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==a||e[8]!==d||e[9]!==m?(f=n.jsxs(X,{variant:"ghost",size:"sm",className:a,onClick:s,children:[d,m]}),e[6]=s,e[7]=a,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Zn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Mn,{}),t[0]=e):e=t[0],e}function Kn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ee=Object.assign(Ln,{Trigger:Dn,CurrentItem:Rn,Content:Hn,Panel:Kt,Search:Un,Items:Wn,Item:Fn,Actions:Vn,Action:Gn,Separator:Zn,Skeleton:Kn});function Ye(){const t=w.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=qe(e),{data:r}=re.useListOrganizations(),i=ke();let l;t[1]!==s||t[2]!==r?(l=r?.find(L=>L.slug===s),t[1]=s,t[2]=r,t[3]=l):l=t[3];const o=l,[c,a]=N.useState(""),[d,m]=N.useState(!1);let f,u,p,x,h,b,g,j;if(t[4]!==o||t[5]!==i||t[6]!==s||t[7]!==c||t[8]!==r){const A=(r?(()=>{const H=r.filter(W=>W.name.toLowerCase().includes(c.toLowerCase()));if(s){const W=H.findIndex(V=>V.slug===s);if(W>0){const V=H[W];V&&(H.splice(W,1),H.unshift(V))}}return H})():[]).map(Yn);let M;t[17]!==o?(M=o?{slug:o.slug,name:o.name,avatarUrl:o.logo}:void 0,t[17]=o,t[18]=M):M=t[18];const B=M;x=ee;let Z;t[19]!==i||t[20]!==s?(Z=()=>i({to:"/$org",params:{org:s??""}}),t[19]=i,t[20]=s,t[21]=Z):Z=t[21];let U;t[22]!==B?(U=n.jsx(ee.CurrentItem,{item:B}),t[22]=B,t[23]=U):U=t[23],t[24]!==Z||t[25]!==U?(j=n.jsx(ee.Trigger,{onClick:Z,children:U}),t[24]=Z,t[25]=U,t[26]=j):j=t[26],p=ee.Content,u=ee.Panel,t[27]!==c?(g=n.jsx(ee.Search,{placeholder:"Search organizations...",value:c,onChange:a}),t[27]=c,t[28]=g):g=t[28],f=ee.Items,h="No organizations found.";let R;t[29]!==i?(R=H=>n.jsx(ee.Item,{item:H,onClick:W=>i({to:"/$org",params:{org:W.slug}})},H.slug),t[29]=i,t[30]=R):R=t[30],b=A.map(R),t[4]=o,t[5]=i,t[6]=s,t[7]=c,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=b,t[15]=g,t[16]=j}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],b=t[14],g=t[15],j=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==b?(v=n.jsx(f,{emptyMessage:h,children:b}),t[31]=f,t[32]=h,t[33]=b,t[34]=v):v=t[34];let S,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ee.Actions,{children:n.jsx(ee.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(ee.Separator,{}),t[35]=S,t[36]=y):(S=t[35],y=t[36]);let C;t[37]!==i?(C=()=>i({to:"/"}),t[37]=i,t[38]=C):C=t[38];let z;t[39]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(Bs,{}),t[39]=z):z=t[39];let O;t[40]!==C?(O=n.jsx(ee.Actions,{children:n.jsx(ee.Action,{onClick:C,icon:z,children:"See all organizations"})}),t[40]=C,t[41]=O):O=t[41];let $;t[42]!==u||t[43]!==O||t[44]!==g||t[45]!==v?($=n.jsxs(u,{children:[g,v,S,y,O]}),t[42]=u,t[43]=O,t[44]=g,t[45]=v,t[46]=$):$=t[46];let k;t[47]!==p||t[48]!==$?(k=n.jsx(p,{children:$}),t[47]=p,t[48]=$,t[49]=k):k=t[49];let T;t[50]!==x||t[51]!==k||t[52]!==j?(T=n.jsxs(x,{children:[j,k]}),t[50]=x,t[51]=k,t[52]=j,t[53]=T):T=t[53];let P;t[54]!==d?(P=n.jsx(bt,{open:d,onOpenChange:m}),t[54]=d,t[55]=P):P=t[55];let E;return t[56]!==T||t[57]!==P?(E=n.jsxs(n.Fragment,{children:[T,P]}),t[56]=T,t[57]=P,t[58]=E):E=t[58],E}function Yn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Ye.Skeleton=ee.Skeleton;function We(t){const e=w.c(10),{left:s,center:r,right:i}=t,{locator:l}=ae();if(Ce.isOrgAdminProject(l))return null;let c;e[0]!==s?(c=n.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==r?(a=r&&n.jsx("div",{className:"flex flex-1 h-full items-center justify-center px-4 min-w-0",children:r}),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==i?(d=i&&n.jsx("div",{className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0",children:i}),e[4]=i,e[5]=d):d=e[5];let m;return e[6]!==c||e[7]!==a||e[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[c,a,d]})}),e[6]=c,e[7]=a,e[8]=d,e[9]=m):m=e[9],m}We.Left=function({children:e}){return n.jsx("div",{className:"flex items-center gap-2",children:e})};We.Center=function({children:e}){return n.jsx("div",{className:"flex-1 flex justify-center",children:e})};We.Right=function({children:e}){return n.jsx("div",{className:"flex items-center gap-2",children:e})};function qn({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,i]=Jn({defaultProp:e,onChange:s}),l=t!==void 0,o=l?t:r,c=at(s),a=N.useCallback(d=>{if(l){const f=typeof d=="function"?d(t):d;f!==t&&c(f)}else i(d)},[l,t,i,c]);return[o,a]}function Jn({defaultProp:t,onChange:e}){const s=N.useState(t),[r]=s,i=N.useRef(r),l=at(e);return N.useEffect(()=>{i.current!==r&&(l(r),i.current=r)},[r,i,l]),s}function Xn(t){const e=w.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function Qn(t){const e=w.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function er(t){const e=w.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function tr(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("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",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(_e.Overlay,{"data-slot":"drawer-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function sr(t){const e=w.c(12);let s,r,i;e[0]!==t?({className:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i):(s=e[1],r=e[2],i=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(tr,{}),e[4]=l):l=e[4];let o;e[5]!==r?(o=_("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",r),e[5]=r,e[6]=o):o=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.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]=c):c=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=n.jsxs(er,{"data-slot":"drawer-portal",children:[l,n.jsxs(_e.Content,{"data-slot":"drawer-content",className:o,...i,children:[c,s]})]}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function nr(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"drawer-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function rr(t){const e=w.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let i;e[3]!==s?(i=_("text-foreground font-semibold",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(_e.Title,{"data-slot":"drawer-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}const Yt=N.createContext({setOpen:()=>{}}),ir=()=>N.useContext(Yt),lr=t=>{const e=w.c(25);let s,r,i,l,o;e[0]!==t?({children:s,defaultOpen:r,open:l,onOpenChange:i,...o}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5]);const c=r??!1;let a;e[6]!==i||e[7]!==l||e[8]!==c?(a={prop:l,defaultProp:c,onChange:i},e[6]=i,e[7]=l,e[8]=c,e[9]=a):a=e[9];const[d,m]=qn(a);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==o||e[15]!==m?(u=n.jsx(Xn,{open:d,onOpenChange:m,...o,children:s}),e[12]=s,e[13]=d,e[14]=o,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==o||e[19]!==m||e[20]!==u?(p=n.jsx(Fs,{open:d,onOpenChange:m,...o,children:u}),e[17]=d,e[18]=o,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(Yt.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},or=t=>{const{children:e,title:s,...r}=t,i=$e(),{className:l,...o}=r;return i?n.jsxs(sr,{...o,children:[n.jsx(nr,{className:"hidden",children:n.jsx(rr,{children:s})}),n.jsx("div",{className:_("flex flex-col gap-2 p-2 py-4",l),children:e})]}):n.jsx(Ws,{...r,children:e})},ar=t=>{const{children:e,...s}=t,{setOpen:r}=ir(),i=$e(),{className:l,...o}=s;return i?n.jsx("div",{...o,onClick:c=>{r(!1);const{onClick:a}=o;a?.(c)},className:_("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):n.jsx(Vs,{...s,children:e})},cr=t=>{const e=w.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const i=$e();let l;return e[3]!==s||e[4]!==i||e[5]!==r?(l=i?n.jsx(Qn,{asChild:!0,children:s}):n.jsx(Us,{...r,children:s}),e[3]=s,e[4]=i,e[5]=r,e[6]=l):l=e[6],l},dr=t=>{const e=w.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const i=$e();let l;return e[3]!==s||e[4]!==i||e[5]!==r?(l=i?n.jsx(rt,{className:_(s),...r}):n.jsx(rt,{className:_(s),...r}),e[3]=s,e[4]=i,e[5]=r,e[6]=l):l=e[6],l};function mr(t){const e=w.c(11),{user:s,trigger:r,align:i,children:l}=t,o=i===void 0?"start":i;let c;e[0]!==r||e[1]!==s?(c=r(s),e[0]=r,e[1]=s,e[2]=c):c=e[2];let a;e[3]!==c?(a=n.jsx(cr,{asChild:!0,children:n.jsx("div",{children:c})}),e[3]=c,e[4]=a):a=e[4];let d;e[5]!==o||e[6]!==l?(d=n.jsx(or,{side:"top",align:o,className:"md:w-[240px]",children:l}),e[5]=o,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==a||e[9]!==d?(m=n.jsxs(lr,{children:[a,d]}),e[8]=a,e[9]=d,e[10]=m):m=e[10],m}function fr(t){const e=w.c(8),{children:s,onClick:r,className:i,asChild:l}=t;let o;e[0]!==l||e[1]!==s||e[2]!==r?(o=l?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=l,e[1]=s,e[2]=r,e[3]=o):o=e[3];let c;return e[4]!==l||e[5]!==i||e[6]!==o?(c=n.jsx(ar,{asChild:l,className:i,children:o}),e[4]=l,e[5]=i,e[6]=o,e[7]=c):c=e[7],c}function ur(t){const e=w.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(dr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function pr(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const le=Object.assign(mr,{Item:fr,Separator:ur,Skeleton:pr});function hr(t){const e=w.c(47),{user:s,userImage:r}=t,[i,l]=N.useState(!1),[o,c]=N.useState(!1);let a;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(a=()=>{const M=`ID: ${s.id}
4
4
  Name: ${s.name||"N/A"}
@@ -1 +1 @@
1
- import{c as C,n as d,j as a}from"./index-CCcWAtA_.js";import{c as m}from"./utils-CnoQZeDK.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};
1
+ import{c as C,n as d,j as a}from"./index-BV-rIyOx.js";import{c as m}from"./utils-CfR4kXxZ.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};
@@ -1 +1 @@
1
- import{c as h,a as S,j as o,b as x,S as g,d as j,e as b,f as d,g as y,O as N,N as p}from"./index-CCcWAtA_.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=d(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=d(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
1
+ import{c as h,a as S,j as o,b as x,S as g,d as j,e as b,f as d,g as y,O as N,N as p}from"./index-BV-rIyOx.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=d(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=d(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
@@ -1 +1 @@
1
- import{r as c,j as i,_ as C,al as y,am as T,an as I,ao as M,ap as H,aq as q,c as z}from"./index-CCcWAtA_.js";import{c as g}from"./utils-CnoQZeDK.js";var b="Switch",[A]=q(b),[U,L]=A(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",_=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});_.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=_;function X(s){const e=z.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
1
+ import{r as c,j as i,_ as C,al as y,am as T,an as I,ao as M,ap as H,aq as q,c as z}from"./index-BV-rIyOx.js";import{c as g}from"./utils-CfR4kXxZ.js";var b="Switch",[A]=q(b),[U,L]=A(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",_=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});_.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=_;function X(s){const e=z.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
@@ -1 +1 @@
1
- import{c as r,j as c}from"./index-CCcWAtA_.js";import{c as i}from"./utils-CnoQZeDK.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
1
+ import{c as r,j as c}from"./index-BV-rIyOx.js";import{c as i}from"./utils-CfR4kXxZ.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
@@ -1 +1 @@
1
- import{c as o,j as e}from"./index-CCcWAtA_.js";import{E as m}from"./empty-state-B8XrD0Ub.js";import{P as a}from"./index-D5w8F0R7.js";import{B as i,a as c,b as n,c as l}from"./breadcrumb-JfdGMaRd.js";import{n as d}from"./CheckDone01-C9iBTpWu.js";import"./utils-CnoQZeDK.js";import"./ChevronRight-C7PRdwhN.js";function b(){const s=o.c(2);let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(a.Header,{children:e.jsx(a.Header.Left,{children:e.jsx(i,{children:e.jsx(c,{children:e.jsx(n,{children:e.jsx(l,{children:"Tasks"})})})})})}),s[0]=r):r=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs(a,{children:[r,e.jsx(a.Content,{className:"flex",children:e.jsx(m,{image:e.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:e.jsx(d,{size:32,className:"text-muted-foreground"})}),title:"Tasks",description:"Manage agent tasks and track progress on project goals. Coming soon."})})]}),s[1]=t):t=s[1],t}export{b as default};
1
+ import{c as o,j as e}from"./index-BV-rIyOx.js";import{E as m}from"./empty-state-oU8PNga_.js";import{P as a}from"./index-9vOB29ZB.js";import{B as i,a as c,b as n,c as l}from"./breadcrumb-Cvo4WJJ5.js";import{n as d}from"./CheckDone01-BusS8ANA.js";import"./utils-CfR4kXxZ.js";import"./ChevronRight-BBcOJkyP.js";function b(){const s=o.c(2);let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(a.Header,{children:e.jsx(a.Header.Left,{children:e.jsx(i,{children:e.jsx(c,{children:e.jsx(n,{children:e.jsx(l,{children:"Tasks"})})})})})}),s[0]=r):r=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs(a,{children:[r,e.jsx(a.Content,{className:"flex",children:e.jsx(m,{image:e.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:e.jsx(d,{size:32,className:"text-muted-foreground"})}),title:"Tasks",description:"Manage agent tasks and track progress on project goals. Coming soon."})})]}),s[1]=t):t=s[1],t}export{b as default};
@@ -1 +1 @@
1
- import{c as o,j as n}from"./index-CCcWAtA_.js";import{c as l}from"./utils-CnoQZeDK.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder: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 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
1
+ import{c as o,j as n}from"./index-BV-rIyOx.js";import{c as l}from"./utils-CfR4kXxZ.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder: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 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
@@ -1 +1 @@
1
- import{c as O,K as J,j as t,m as P,r as K,O as Q}from"./index-CCcWAtA_.js";import{u as W}from"./useQuery-Dp4Sp9Q1.js";import{i as Y}from"./File06-g3-IRgq5.js";import{i as X}from"./Loading01-B78uc8_j.js";import{e as Z}from"./github-icon-Dp3wHhYE.js";import{a as ee,C as te}from"./collection-table-wrapper-L4Z0dyO1.js";import{C as oe}from"./collection-search-MQc1JOFA.js";import{E as z}from"./empty-state-B8XrD0Ub.js";import{I as se}from"./integration-icon-Biu6JpM0.js";import{C as re}from"./card-C0u1Pmkw.js";import{V as ne}from"./layout-DWXfRazY.js";function ie(o){return o.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function le(o){return o.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,s)=>{let r=e;return s.includes("target=")?r=r.replace(/target="[^"]*"/gi,'target="_blank"'):r=r.replace(/>/,' target="_blank">'),s.includes("rel=")?r=r.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):r=r.replace(/>/,' rel="noopener noreferrer">'),r})}function ae(o){let e=ie(o);return e=le(e),e}async function ce(o,e){try{const s=await fetch(`https://api.github.com/repos/${o}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const r=await s.text();return ae(r)}catch(s){return console.error("Error fetching README:",s),null}}function Ee(o){const e=O.c(18),{repository:s,html:r,isLoading:b,queryKey:p}=o;let a,u,f,h;e[0]!==r||e[1]!==p||e[2]!==s?(a=s?Z(s):null,u=!!a&&r===void 0,h=W,f=p??J.githubReadme(a?.owner,a?.repo),e[0]=r,e[1]=p,e[2]=s,e[3]=a,e[4]=u,e[5]=f,e[6]=h):(a=e[3],u=e[4],f=e[5],h=e[6]);let d;e[7]!==a?(d=async()=>a?ce(a.owner,a.repo):null,e[7]=a,e[8]=d):d=e[8];let g;e[9]!==u||e[10]!==f||e[11]!==d?(g={queryKey:f,queryFn:d,enabled:u,staleTime:36e5,gcTime:864e5},e[9]=u,e[10]=f,e[11]=d,e[12]=g):g=e[12];const{data:E,isLoading:l}=h(g),x=r??E;if(b??(u&&l)){let m;return e[13]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=m):m=e[13],m}if(!x){let m;return e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(Y,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=m):m=e[14],m}let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"transparent"},e[15]=j):j=e[15];let n;return e[16]!==x?(n=t.jsx("div",{className:"p-5 markdown-body",style:j,dangerouslySetInnerHTML:{__html:x}}),e[16]=x,e[17]=n):n=e[17],n}function Te(o){const e=O.c(40),{tools:s,connectionId:r,org:b,onToolClick:p,showToolbar:a,emptyMessage:u,isLoading:f}=o,h=a===void 0?!0:a,d=u===void 0?"This connection doesn't have any tools yet.":u,g=f===void 0?!1:f,E=P(),[l,x]=K.useState(""),[y,j]=K.useState("table"),[n,m]=K.useState("name"),[c,V]=K.useState("asc");let R;e[0]!==c||e[1]!==n?(R=i=>{n===i?(V(pe),c==="desc"&&m(void 0)):(m(i),V("asc"))},e[0]=c,e[1]=n,e[2]=R):R=e[2];const N=R;let L;e[3]!==r||e[4]!==E||e[5]!==p||e[6]!==b?(L=i=>{p?p(i):r&&b&&E({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:b,project:Q,connectionId:r,collectionName:"tools",itemId:encodeURIComponent(i.name)}})},e[3]=r,e[4]=E,e[5]=p,e[6]=b,e[7]=L):L=e[7];const I=L;let k;if(e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==s){const i=!s||s.length===0?[]:l.trim()?(()=>{const H=l.toLowerCase();return s.filter(_=>_.name.toLowerCase().includes(H)||_.description&&_.description.toLowerCase().includes(H))})():s;k=!n||!c?i:[...i].sort((H,_)=>{const U=H[n]||"",B=_[n]||"",G=String(U).localeCompare(String(B));return c==="asc"?G:-G}),e[8]=l,e[9]=c,e[10]=n,e[11]=s,e[12]=k}else k=e[12];const T=k;let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=[{id:"name",header:"Name",render:fe,sortable:!0},{id:"description",header:"Description",render:ue,cellClassName:"flex-1",sortable:!0}],e[13]=M):M=e[13];const F=M;let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=F.filter(de).map(me),e[14]=$):$=e[14];const q=$;let v;e[15]!==N||e[16]!==h||e[17]!==c||e[18]!==n||e[19]!==y?(v=h&&t.jsx(ne,{children:t.jsx(te,{viewMode:y,onViewModeChange:j,sortKey:n,sortDirection:c,onSort:N,sortOptions:q})}),e[15]=N,e[16]=h,e[17]=c,e[18]=n,e[19]=y,e[20]=v):v=e[20];let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=i=>{i.key==="Escape"&&(x(""),i.target.blur())},e[21]=D):D=e[21];let S;e[22]!==l?(S=t.jsx(oe,{value:l,onChange:x,placeholder:"Search tools...",onKeyDown:D}),e[22]=l,e[23]=S):S=e[23];let w;e[24]!==d||e[25]!==N||e[26]!==I||e[27]!==g||e[28]!==l||e[29]!==c||e[30]!==n||e[31]!==T||e[32]!==y?(w=y==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:T.length===0?t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:T.map(i=>t.jsx(re,{className:"cursor-pointer transition-colors",onClick:()=>I(i),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(se,{icon:null,name:i.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:i.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:i.description||"No description"})]})]})},i.name))})}):t.jsx(ee,{columns:F,data:T,isLoading:g,sortKey:n,sortDirection:c,onSort:N,onRowClick:i=>I(i),emptyState:t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d})}),e[24]=d,e[25]=N,e[26]=I,e[27]=g,e[28]=l,e[29]=c,e[30]=n,e[31]=T,e[32]=y,e[33]=w):w=e[33];let C;e[34]!==S||e[35]!==w?(C=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,w]}),e[34]=S,e[35]=w,e[36]=C):C=e[36];let A;return e[37]!==C||e[38]!==v?(A=t.jsxs(t.Fragment,{children:[v,C]}),e[37]=C,e[38]=v,e[39]=A):A=e[39],A}function me(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function de(o){return o.sortable}function ue(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function fe(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function pe(o){return o==="asc"?"desc":o==="desc"?null:"asc"}export{Ee as R,Te as T};
1
+ import{c as O,K as J,j as t,m as P,r as K,O as Q}from"./index-BV-rIyOx.js";import{u as W}from"./useQuery-DDYln2BW.js";import{i as Y}from"./File06-CkTcogsG.js";import{i as X}from"./Loading01-DOPFYU4m.js";import{e as Z}from"./github-icon-Dp3wHhYE.js";import{a as ee,C as te}from"./collection-table-wrapper-CmBNNf0K.js";import{C as oe}from"./collection-search-Aeh0FXZR.js";import{E as z}from"./empty-state-oU8PNga_.js";import{I as se}from"./integration-icon-DKM9NBX1.js";import{C as re}from"./card-B-73zAje.js";import{V as ne}from"./layout-B7afTuaN.js";function ie(o){return o.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function le(o){return o.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,s)=>{let r=e;return s.includes("target=")?r=r.replace(/target="[^"]*"/gi,'target="_blank"'):r=r.replace(/>/,' target="_blank">'),s.includes("rel=")?r=r.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):r=r.replace(/>/,' rel="noopener noreferrer">'),r})}function ae(o){let e=ie(o);return e=le(e),e}async function ce(o,e){try{const s=await fetch(`https://api.github.com/repos/${o}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const r=await s.text();return ae(r)}catch(s){return console.error("Error fetching README:",s),null}}function Ee(o){const e=O.c(18),{repository:s,html:r,isLoading:b,queryKey:p}=o;let a,u,f,h;e[0]!==r||e[1]!==p||e[2]!==s?(a=s?Z(s):null,u=!!a&&r===void 0,h=W,f=p??J.githubReadme(a?.owner,a?.repo),e[0]=r,e[1]=p,e[2]=s,e[3]=a,e[4]=u,e[5]=f,e[6]=h):(a=e[3],u=e[4],f=e[5],h=e[6]);let d;e[7]!==a?(d=async()=>a?ce(a.owner,a.repo):null,e[7]=a,e[8]=d):d=e[8];let g;e[9]!==u||e[10]!==f||e[11]!==d?(g={queryKey:f,queryFn:d,enabled:u,staleTime:36e5,gcTime:864e5},e[9]=u,e[10]=f,e[11]=d,e[12]=g):g=e[12];const{data:E,isLoading:l}=h(g),x=r??E;if(b??(u&&l)){let m;return e[13]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=m):m=e[13],m}if(!x){let m;return e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(Y,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=m):m=e[14],m}let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"transparent"},e[15]=j):j=e[15];let n;return e[16]!==x?(n=t.jsx("div",{className:"p-5 markdown-body",style:j,dangerouslySetInnerHTML:{__html:x}}),e[16]=x,e[17]=n):n=e[17],n}function Te(o){const e=O.c(40),{tools:s,connectionId:r,org:b,onToolClick:p,showToolbar:a,emptyMessage:u,isLoading:f}=o,h=a===void 0?!0:a,d=u===void 0?"This connection doesn't have any tools yet.":u,g=f===void 0?!1:f,E=P(),[l,x]=K.useState(""),[y,j]=K.useState("table"),[n,m]=K.useState("name"),[c,V]=K.useState("asc");let R;e[0]!==c||e[1]!==n?(R=i=>{n===i?(V(pe),c==="desc"&&m(void 0)):(m(i),V("asc"))},e[0]=c,e[1]=n,e[2]=R):R=e[2];const N=R;let L;e[3]!==r||e[4]!==E||e[5]!==p||e[6]!==b?(L=i=>{p?p(i):r&&b&&E({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:b,project:Q,connectionId:r,collectionName:"tools",itemId:encodeURIComponent(i.name)}})},e[3]=r,e[4]=E,e[5]=p,e[6]=b,e[7]=L):L=e[7];const I=L;let k;if(e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==s){const i=!s||s.length===0?[]:l.trim()?(()=>{const H=l.toLowerCase();return s.filter(_=>_.name.toLowerCase().includes(H)||_.description&&_.description.toLowerCase().includes(H))})():s;k=!n||!c?i:[...i].sort((H,_)=>{const U=H[n]||"",B=_[n]||"",G=String(U).localeCompare(String(B));return c==="asc"?G:-G}),e[8]=l,e[9]=c,e[10]=n,e[11]=s,e[12]=k}else k=e[12];const T=k;let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=[{id:"name",header:"Name",render:fe,sortable:!0},{id:"description",header:"Description",render:ue,cellClassName:"flex-1",sortable:!0}],e[13]=M):M=e[13];const F=M;let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=F.filter(de).map(me),e[14]=$):$=e[14];const q=$;let v;e[15]!==N||e[16]!==h||e[17]!==c||e[18]!==n||e[19]!==y?(v=h&&t.jsx(ne,{children:t.jsx(te,{viewMode:y,onViewModeChange:j,sortKey:n,sortDirection:c,onSort:N,sortOptions:q})}),e[15]=N,e[16]=h,e[17]=c,e[18]=n,e[19]=y,e[20]=v):v=e[20];let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=i=>{i.key==="Escape"&&(x(""),i.target.blur())},e[21]=D):D=e[21];let S;e[22]!==l?(S=t.jsx(oe,{value:l,onChange:x,placeholder:"Search tools...",onKeyDown:D}),e[22]=l,e[23]=S):S=e[23];let w;e[24]!==d||e[25]!==N||e[26]!==I||e[27]!==g||e[28]!==l||e[29]!==c||e[30]!==n||e[31]!==T||e[32]!==y?(w=y==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:T.length===0?t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:T.map(i=>t.jsx(re,{className:"cursor-pointer transition-colors",onClick:()=>I(i),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(se,{icon:null,name:i.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:i.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:i.description||"No description"})]})]})},i.name))})}):t.jsx(ee,{columns:F,data:T,isLoading:g,sortKey:n,sortDirection:c,onSort:N,onRowClick:i=>I(i),emptyState:t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d})}),e[24]=d,e[25]=N,e[26]=I,e[27]=g,e[28]=l,e[29]=c,e[30]=n,e[31]=T,e[32]=y,e[33]=w):w=e[33];let C;e[34]!==S||e[35]!==w?(C=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,w]}),e[34]=S,e[35]=w,e[36]=C):C=e[36];let A;return e[37]!==C||e[38]!==v?(A=t.jsxs(t.Fragment,{children:[v,C]}),e[37]=C,e[38]=v,e[39]=A):A=e[39],A}function me(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function de(o){return o.sortable}function ue(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function fe(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function pe(o){return o==="asc"?"desc":o==="desc"?null:"asc"}export{Ee as R,Te as T};