decocms 3.26.3 → 3.27.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 (238) hide show
  1. package/dist/client/assets/{AlertCircle-DTxB9pUH.js → AlertCircle-CVfKrYvR.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-zXKZw2Xb.js → ArrowUpRight-CZJ1_8ff.js} +1 -1
  3. package/dist/client/assets/{Check-CTLrORIv.js → Check-4eIqLz1o.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BUQijftD.js → CheckCircle-C6azXF6K.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CE2QQfze.js → ChevronDown-CNQyx7xp.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-Cu7s4gqK.js → ChevronLeft-BiFGS012.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-VGojeAFz.js → ChevronRight-_JUGNZYN.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-4IXM99ti.js → ChevronUp-MJGa44ay.js} +1 -1
  9. package/dist/client/assets/{Container-BoFlhIZL.js → Container-DljtwK8x.js} +1 -1
  10. package/dist/client/assets/{DotsVertical--R-pmXe3.js → DotsVertical-2Z1C6jvt.js} +1 -1
  11. package/dist/client/assets/{Eye-pMhw6sUG.js → Eye-BZTA9B_k.js} +1 -1
  12. package/dist/client/assets/{FilterLines-Bz8yyibx.js → FilterLines-BIc99EZW.js} +1 -1
  13. package/dist/client/assets/{Globe01-Cp3X_WfB.js → Globe01-XqX0cF4u.js} +1 -1
  14. package/dist/client/assets/{HardDrive-BH54c3De.js → HardDrive-CW-vNyxs.js} +1 -1
  15. package/dist/client/assets/{Key01-CfBifHqv.js → Key01-BPeDVar3.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-DhbihSgJ.js → LayoutLeft-CRWhJz8B.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-BGLjTHSM.js → LinkExternal01-C7wWl-UH.js} +1 -1
  18. package/dist/client/assets/{Monitor01-Djh_XBKr.js → Monitor01-CNSOfium.js} +1 -1
  19. package/dist/client/assets/{Palette-PH8MXuP9.js → Palette-DpkfLWBZ.js} +1 -1
  20. package/dist/client/assets/{Play-C4oLlMWL.js → Play-Da5sMtTS.js} +1 -1
  21. package/dist/client/assets/{Plus-BX4ueqQS.js → Plus-DKKhAsjU.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-Duj7NlwB.js → RefreshCcw01--I2EXN3r.js} +1 -1
  23. package/dist/client/assets/{SearchMd-CL91MHi_.js → SearchMd-DuoZUs1O.js} +1 -1
  24. package/dist/client/assets/{Settings02-DWXKmfg4.js → Settings02-BWmIO2S8.js} +1 -1
  25. package/dist/client/assets/{Shield01-5PYVS020.js → Shield01-tcvJIq4r.js} +1 -1
  26. package/dist/client/assets/{Star01-E49TkgRa.js → Star01-D71oJ2C0.js} +1 -1
  27. package/dist/client/assets/{Stars01-NNVgYP83.js → Stars01-C8Z61ENf.js} +1 -1
  28. package/dist/client/assets/{Stars02-BVMEIcco.js → Stars02-Dlfu9WL9.js} +1 -1
  29. package/dist/client/assets/{Sun-CC_Mb8Zc.js → Sun-u569y38Z.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-Fq29tGDx.js → SwitchHorizontal01-D4Pq3_cg.js} +1 -1
  31. package/dist/client/assets/{Tool01-B2YQjPAa.js → Tool01-DLVD3sFG.js} +1 -1
  32. package/dist/client/assets/{Trash01-XqCtMZQT.js → Trash01-4XBt_tI7.js} +1 -1
  33. package/dist/client/assets/{Upload01-CTIKtpO3.js → Upload01-DzLJ3gpY.js} +1 -1
  34. package/dist/client/assets/{User01-Cz-IdAgQ.js → User01-CYChyPXV.js} +1 -1
  35. package/dist/client/assets/{Users01-D7P0o8Z_.js → Users01-_lrrXmCB.js} +1 -1
  36. package/dist/client/assets/{Users03-DUZwXij4.js → Users03-oCa8QaJT.js} +1 -1
  37. package/dist/client/assets/{X-8xcHoVBj.js → X-ROAwrDEL.js} +1 -1
  38. package/dist/client/assets/{XCircle-CGgdji5f.js → XCircle-qIalM-tE.js} +1 -1
  39. package/dist/client/assets/{XClose-CxCjUb2p.js → XClose-lB-KoyXA.js} +1 -1
  40. package/dist/client/assets/{Zap-DLFeSSQ0.js → Zap-DeqhXyEZ.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-C2mTTgos.js → ZapSquare-NjYLgWlz.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-CR6ja8eb.js → ZoomOut-BrHpnwt5.js} +1 -1
  43. package/dist/client/assets/{access-gate-3WvSXWjg.js → access-gate-D3KhFKSJ.js} +1 -1
  44. package/dist/client/assets/{accordion-DBEoJ6NR.js → accordion-C0246qCp.js} +1 -1
  45. package/dist/client/assets/add-section-modal-TDL4U-Qb.js +1 -0
  46. package/dist/client/assets/{agent-capabilities-CeRZY0ao.js → agent-capabilities-CMLwBy-2.js} +1 -1
  47. package/dist/client/assets/{agent-icon-DyzI2_Id.js → agent-icon-CpGp3Z_j.js} +1 -1
  48. package/dist/client/assets/{agent-icons-CkjHTgLo.js → agent-icons-DpGrMPQz.js} +1 -1
  49. package/dist/client/assets/{agents-list-DNeWvyP9.js → agents-list-BY5K8FU6.js} +1 -1
  50. package/dist/client/assets/{ai-providers-DAK2efaH.js → ai-providers-CSpjaISF.js} +1 -1
  51. package/dist/client/assets/{alert-BHgS7nAN.js → alert-d5fC3CNK.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-tg3D4mnu.js → alert-dialog-Ctl3oPPD.js} +1 -1
  53. package/dist/client/assets/app-editor-G1KMmKo5.js +1 -0
  54. package/dist/client/assets/{auth-catchall-BOC0nYtA.js → auth-catchall-MFn-cdCM.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-VA3PSXMI.js → auth-split-layout-BbYNWNHU.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-SEcTO2sW.js → automation-list-row-B0Cz_xkI.js} +1 -1
  57. package/dist/client/assets/{automation-runs-S95csAA4.js → automation-runs-B3gWiy9c.js} +1 -1
  58. package/dist/client/assets/{automations-Ce44y56V.js → automations-BIzauln3.js} +1 -1
  59. package/dist/client/assets/{avatar-DK3a4hPp.js → avatar-DxUqupGC.js} +1 -1
  60. package/dist/client/assets/{badge-SRsZ13Ha.js → badge-CF8Qbgnm.js} +1 -1
  61. package/dist/client/assets/{brand-context-CHR40nnF.js → brand-context-D2E1R7Zx.js} +1 -1
  62. package/dist/client/assets/{buckets-7WU_Biyf.js → buckets-D2iS6C-Y.js} +1 -1
  63. package/dist/client/assets/{calendar-CC1tf37S.js → calendar-Bj6ggato.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-C5tUHDdB.js → capability-load-error-Bc9I7o1Z.js} +1 -1
  65. package/dist/client/assets/{card-BU_YNBo4.js → card-DfWQEGhA.js} +1 -1
  66. package/dist/client/assets/{chat-context-Moe82J6D.js → chat-context-ChsEaJrL.js} +1 -1
  67. package/dist/client/assets/{checkbox-CGo4P_LC.js → checkbox-BmkvyW16.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-D15RP8BC.js → cli-auth-success-B0imteeI.js} +1 -1
  69. package/dist/client/assets/{collection-detail-CiMl4FG7.js → collection-detail-Brrg3KY1.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-M_1xgyCf.js → collection-display-button-CEYkvIo0.js} +1 -1
  71. package/dist/client/assets/{collection-search-CfzW8Ljz.js → collection-search-udFdxyyt.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-B4EgEmky.js → collection-table-wrapper-DkzHT7J9.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-BxpcEAFc.js → collection-tabs-DyeSBoHz.js} +1 -1
  74. package/dist/client/assets/{collections-BthqN0MR.js → collections-xMkSecim.js} +1 -1
  75. package/dist/client/assets/{command-D_uV9Uyw.js → command-DrkUYhCh.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-BSZmVMpV.js → connect-desktop-dialog-W-0xLr_n.js} +1 -1
  77. package/dist/client/assets/{connection-card-CMo6aDgc.js → connection-card-0dTT6S9Q.js} +1 -1
  78. package/dist/client/assets/{connection-detail-Mimew6o2.js → connection-detail-BRt-T7IO.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-D7eAIFli.js → connection-form-helpers-Baz6qZA0.js} +1 -1
  80. package/dist/client/assets/{connections-C3EDxDCA.js → connections-DSoPZ6UN.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-8oQl4q0c.js → decopilot-sse-pool-BFIK6-UW.js} +1 -1
  82. package/dist/client/assets/{dialog-DSHkVmzb.js → dialog-CakVcHgK.js} +1 -1
  83. package/dist/client/assets/{domain-settings-BOHvvqIE.js → domain-settings-DYYhnzsU.js} +1 -1
  84. package/dist/client/assets/{drawer-BCmqLnLy.js → drawer-CcoGGoOo.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-DFCaJxA8.js → dropdown-menu-CWTLq4L0.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-D3tgFtHQ.js → dynamic-plugin-layout-BjBWJTPp.js} +1 -1
  87. package/dist/client/assets/{empty-state-DqgO6Psg.js → empty-state-DKVcL6PS.js} +1 -1
  88. package/dist/client/assets/{empty-state-CVOhfUW7.js → empty-state-vubSirat.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-B52LuKdR.js → extract-connection-data-CDsxXNql.js} +1 -1
  90. package/dist/client/assets/{features-Dsrgvggp.js → features-0NverHtl.js} +1 -1
  91. package/dist/client/assets/{file-explorer-CAiKkVp8.js → file-explorer-BeUbwSBm.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-ThJaLePn.js → file-type-icon-Dj5RIFdH.js} +1 -1
  93. package/dist/client/assets/{files-BwgPol6-.js → files-CoJ9Pb-J.js} +1 -1
  94. package/dist/client/assets/{form-DngzP8fb.js → form-Dsw-Z6di.js} +1 -1
  95. package/dist/client/assets/{general-D61AQybp.js → general-C4neQf1R.js} +1 -1
  96. package/dist/client/assets/{generate-id-CDzcbt9l.js → generate-id-DqiWwIQ9.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-Dy1vUJSU.js → github-repo-picker-CjED-Ho0.js} +1 -1
  98. package/dist/client/assets/header-tab-button-C3HrUSxA.js +5 -0
  99. package/dist/client/assets/{hover-card-CK_HvQcf.js → hover-card-MHetYMuh.js} +1 -1
  100. package/dist/client/assets/{image-field-pfu57PP0.js → image-field-DC1TUphH.js} +1 -1
  101. package/dist/client/assets/index-BYiNf1AT.js +310 -0
  102. package/dist/client/assets/{index-Df6ljz6n.js → index-BgEqHutz.js} +1 -1
  103. package/dist/client/assets/{index-DLy_MgNO.js → index-BpHKT80f.js} +26 -26
  104. package/dist/client/assets/{index-LDNFPs7X.js → index-CIRA-XrS.js} +3 -3
  105. package/dist/client/assets/{index-DdnG6T0z.js → index-CNsOv2lg.js} +1 -1
  106. package/dist/client/assets/{index-G1Ev5Inf.js → index-CXykQoXr.js} +1 -1
  107. package/dist/client/assets/{index-Dj1voR4t.js → index-Cy4lDztF.js} +1 -1
  108. package/dist/client/assets/{index-hwXZ3lhJ.js → index-DJTRgajF.js} +1 -1
  109. package/dist/client/assets/index-DMSpCZuP.js +1 -0
  110. package/dist/client/assets/{index-BepaMXhR.js → index-DP2quHw4.js} +1 -1
  111. package/dist/client/assets/{index-5lPKE0PI.js → index-DWx6bHXh.js} +1 -1
  112. package/dist/client/assets/{index-CZJ35dl3.css → index-DfYyH4IW.css} +1 -1
  113. package/dist/client/assets/{index-2EH0OR7k.js → index-QaJF0cy4.js} +1 -1
  114. package/dist/client/assets/{index-D7h1Qkk4.js → index-SCafxgF4.js} +1 -1
  115. package/dist/client/assets/{index-DqC0vS4o.js → index-W5kyiqww.js} +1 -1
  116. package/dist/client/assets/{index-hMTvGWUn.js → index-jNBbW2Ko.js} +1 -1
  117. package/dist/client/assets/{index-redirect-BkbiWtap.js → index-redirect-Chn_J6r0.js} +1 -1
  118. package/dist/client/assets/{infiniteQueryObserver-CJIUgHAf.js → infiniteQueryObserver-D63prNq4.js} +1 -1
  119. package/dist/client/assets/{input-CTpSARTD.js → input-CrSCUdkK.js} +1 -1
  120. package/dist/client/assets/{integration-icon-BpF3qWll.js → integration-icon-Jr_UF6S2.js} +1 -1
  121. package/dist/client/assets/{label-Dh8yif55.js → label-DVsZqCyz.js} +1 -1
  122. package/dist/client/assets/{layout-D7xM_FMD.js → layout-BWE4r12s.js} +1 -1
  123. package/dist/client/assets/{login-BsYL8EoQ.js → login-C4SQ_CfJ.js} +1 -1
  124. package/dist/client/assets/{members-D3KerYs6.js → members-CxCiHf1l.js} +1 -1
  125. package/dist/client/assets/{monaco-editor-47G-YgBx.js → monaco-editor-ps7H50eS.js} +1 -1
  126. package/dist/client/assets/{monitoring-stats-row-DLPVsavd.js → monitoring-stats-row-DTWV8uJr.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-DPmGsVIH.js → oauth-callback-RgRogp_l.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-B2SdgtVf.js → oauth-callback-ai-provider-BfGfjBqL.js} +1 -1
  129. package/dist/client/assets/{onboarding-CUnTn08b.js → onboarding-B8eFVg-n.js} +1 -1
  130. package/dist/client/assets/{org-install-D55Hf-Ci.js → org-install-oevPeVZY.js} +1 -1
  131. package/dist/client/assets/{org-layout-D1CUrdu0.js → org-layout-BZUraXql.js} +1 -1
  132. package/dist/client/assets/{org-plugin-layout-C_lutJvY.js → org-plugin-layout-D2XXmsCd.js} +1 -1
  133. package/dist/client/assets/{page-seo-form-CDMGSBfI.js → page-seo-form-C8q6S3Ix.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-DCfDUVar.js +1 -0
  135. package/dist/client/assets/{pair-C8e4qd_P.js → pair-CHlUpVVn.js} +5 -5
  136. package/dist/client/assets/{plugin-empty-state-DOz60yXL.js → plugin-empty-state-D9GXWduc.js} +1 -1
  137. package/dist/client/assets/{plugin-header-dSexLn5d.js → plugin-header-Beeob5-q.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-DeJC8Je1.js → plugin-layout-k15rvBW4.js} +1 -1
  139. package/dist/client/assets/{popover-BTf4Nz5d.js → popover-BWqC53zq.js} +1 -1
  140. package/dist/client/assets/{post-editor-DqMVZSkF.js → post-editor-ZY2dMuGW.js} +3 -3
  141. package/dist/client/assets/{primitives-C5R0vRG0.js → primitives-DjKXnVwl.js} +1 -1
  142. package/dist/client/assets/{profile-D24Mm1Bo.js → profile-D8GPYI9z.js} +1 -1
  143. package/dist/client/assets/project-app-view-CeTOGt0s.js +1 -0
  144. package/dist/client/assets/record-editor-DyRjlkvh.js +1 -0
  145. package/dist/client/assets/registry-PDIuepoN.js +2 -0
  146. package/dist/client/assets/{registry-layout-BTGZh3rH.js → registry-layout-DdpPnEaJ.js} +1 -1
  147. package/dist/client/assets/{require-capability-VkdqqQVh.js → require-capability-B9yAp304.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-B_Qr5rQD.js → required-auth-layout-DH07bG2g.js} +1 -1
  149. package/dist/client/assets/{reset-password-EasI5IT7.js → reset-password-urnXjryV.js} +1 -1
  150. package/dist/client/assets/{resizable-psD7TWaW.js → resizable-CA1KkrSC.js} +1 -1
  151. package/dist/client/assets/{roles-DcdBU5wW.js → roles-CuKgR2SA.js} +1 -1
  152. package/dist/client/assets/save-referenced-block-9hc6e2Ip.js +1 -0
  153. package/dist/client/assets/{save-status-BBtiR3n4.js → save-status-B1NlnVv7.js} +1 -1
  154. package/dist/client/assets/{schema-form-CQrr8C2Q.js → schema-form-BJb6ByJZ.js} +1 -1
  155. package/dist/client/assets/{scroll-area-EinmnR6o.js → scroll-area-BdT6MEhB.js} +1 -1
  156. package/dist/client/assets/{search-input-IQT_u5qN.js → search-input-C47MRZ3T.js} +1 -1
  157. package/dist/client/assets/{secrets-CvkPaEJL.js → secrets-FQwpAvNo.js} +1 -1
  158. package/dist/client/assets/{sections-editor-4lprX9C-.js → sections-editor-Cl8FoxMJ.js} +2 -2
  159. package/dist/client/assets/{select-Dz1PdScB.js → select-BlwN9Vej.js} +1 -1
  160. package/dist/client/assets/{select-model-azh5-bst.js → select-model-CmdnuON7.js} +1 -1
  161. package/dist/client/assets/{seo-editor-Bhb2HHgZ.js → seo-editor-DI55ZCuw.js} +1 -1
  162. package/dist/client/assets/{settings-layout-DXfn8mRu.js → settings-layout-CQtAYaM4.js} +1 -1
  163. package/dist/client/assets/{settings-section-DqhmLe6Q.js → settings-section-yQou3UeY.js} +1 -1
  164. package/dist/client/assets/{sheet-CtgWE_6O.js → sheet-C9OeYoob.js} +1 -1
  165. package/dist/client/assets/{shell-controls-D5kseyts.js → shell-controls-Yj9zkwJT.js} +1 -1
  166. package/dist/client/assets/{shell-layout-CWL5imKS.js → shell-layout-CBnbPDoL.js} +1 -1
  167. package/dist/client/assets/{shell-route-loading-Co6LGu_q.js → shell-route-loading-BIZ6nC8J.js} +1 -1
  168. package/dist/client/assets/{sidebar-DRcLUASh.js → sidebar-ClntAuIc.js} +1 -1
  169. package/dist/client/assets/{skeleton-BH3hvPuC.js → skeleton-CwBsvOfD.js} +1 -1
  170. package/dist/client/assets/{sortable.esm-Bv55LbH0.js → sortable.esm-De-54tZ3.js} +1 -1
  171. package/dist/client/assets/{spinner-B_3Siejz.js → spinner-iV1Pb5yc.js} +1 -1
  172. package/dist/client/assets/{sso-0oMpJ4kh.js → sso-aLCmlzL4.js} +1 -1
  173. package/dist/client/assets/{store-BVB26WGO.js → store-Dt0yo82v.js} +1 -1
  174. package/dist/client/assets/store-registry-BItjuByE.js +2 -0
  175. package/dist/client/assets/{studio-tools-BxKekKsO.js → studio-tools-DEQRneUy.js} +1 -1
  176. package/dist/client/assets/{switch-DH2AgpKj.js → switch-DtUTxnab.js} +1 -1
  177. package/dist/client/assets/{tab-id-xylxHxk-.js → tab-id-3QcIfNPm.js} +1 -1
  178. package/dist/client/assets/{table-BF0TGzWk.js → table-B0xOHukK.js} +1 -1
  179. package/dist/client/assets/{tabs-zn3_c2X4.js → tabs-Bf13m2Ie.js} +1 -1
  180. package/dist/client/assets/{task-status-CcBiqoc9.js → task-status-DY7Jd7M1.js} +1 -1
  181. package/dist/client/assets/{textarea--0YfTbVD.js → textarea-8pboLFLk.js} +1 -1
  182. package/dist/client/assets/{toggle-group-CzCtoT44.js → toggle-group-CytFiMoT.js} +1 -1
  183. package/dist/client/assets/{toolbar-GqBUNMmA.js → toolbar-sicu1cLe.js} +1 -1
  184. package/dist/client/assets/{tools-list-6mOdBofe.js → tools-list-HKpgFTbq.js} +1 -1
  185. package/dist/client/assets/{tooltip-DUvSyhJC.js → tooltip-Bzg3apEG.js} +1 -1
  186. package/dist/client/assets/{types-DA4RGvyb.js → types-8hWDUU7E.js} +1 -1
  187. package/dist/client/assets/{use-ai-providers-D2lIJSNP.js → use-ai-providers-zQf8BGqD.js} +1 -1
  188. package/dist/client/assets/{use-automations-DBfmwk1I.js → use-automations-EKP98ANa.js} +1 -1
  189. package/dist/client/assets/{use-capability-B4Fg7dX0.js → use-capability-Bvy73ewa.js} +1 -1
  190. package/dist/client/assets/{use-collections-CmHxKkjG.js → use-collections-ZBVaGDFA.js} +1 -1
  191. package/dist/client/assets/{use-connection-DBknh1_S.js → use-connection-Dk0TNOQ6.js} +1 -1
  192. package/dist/client/assets/{use-copy-Cwl7g8AE.js → use-copy-B0pfAKm1.js} +1 -1
  193. package/dist/client/assets/{use-create-virtual-mcp-C1TsXsHi.js → use-create-virtual-mcp-LZBczPxY.js} +1 -1
  194. package/dist/client/assets/{use-debounced-autosave-Bxr0aFzV.js → use-debounced-autosave-DdtLlSWF.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-R6nqWnGZ.js → use-delete-connection-CrGpJ3CK.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-DWXPP8uC.js → use-file-configs-blLNO8ef.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-SoMG-nf0.js → use-infinite-scroll-crZE7yIL.js} +1 -1
  198. package/dist/client/assets/{use-list-state-RN4viRCb.js → use-list-state-DULVAZWB.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-FbAC4-Un.js → use-mcp-client-u_MHI8VY.js} +1 -1
  200. package/dist/client/assets/{use-mcp-prompts-yCzBJuZf.js → use-mcp-prompts-Cc6LCfnI.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-CxFt6L0J.js → use-mcp-tools-Co2Su_jT.js} +1 -1
  202. package/dist/client/assets/{use-members-B2ko1Eht.js → use-members-D0q4Za9C.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-Bg4INoCb.js → use-navigate-to-agent-V0Re0kfV.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-D0Et-q9V.js → use-org-auth-client-_tKKyZeP.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-Ba3MjbPK.js → use-org-sso-BFKiHzWZ.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-jFwocdK5.js → use-organization-roles-BfPxhjla.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-Bdk0M31t.js → use-organization-settings-BwO5SItR.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-DkTd3pip.js → use-registry-connections-Dt-dLPgn.js} +1 -1
  209. package/dist/client/assets/{use-secrets-B3XtAhqh.js → use-secrets-D9iUDVyd.js} +1 -1
  210. package/dist/client/assets/{use-status-sounds-Bi-eGoxq.js → use-status-sounds-WJOrPbCW.js} +1 -1
  211. package/dist/client/assets/{use-view-mode-CVu0jG_s.js → use-view-mode-Cb9Ug3Fo.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-CL360k9_.js → use-virtual-mcp-CC-vnpyx.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-CTHnpbKA.js +1 -0
  214. package/dist/client/assets/{useRouterState-CBsQY2cY.js → useRouterState-B9EuTqlu.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-DyRicwLF.js +1 -0
  216. package/dist/client/assets/{user-ce-n8AzQ.js → user-Be430j_2.js} +1 -1
  217. package/dist/client/assets/{view-mode-toggle-DPvhvCSl.js → view-mode-toggle-DaQDP0Hg.js} +1 -1
  218. package/dist/client/assets/{workflow-DEw4Tgx1.js → workflow-CwBfmaZN.js} +1 -1
  219. package/dist/client/assets/workflow-detail-CRk5OVYF.js +1 -0
  220. package/dist/client/index.html +2 -2
  221. package/dist/server/cli.js +439 -419
  222. package/dist/server/migrate.js +95 -95
  223. package/dist/server/server.js +287 -282
  224. package/package.json +1 -1
  225. package/dist/client/assets/add-section-modal-B-90MHzy.js +0 -1
  226. package/dist/client/assets/app-editor-WcogQO88.js +0 -1
  227. package/dist/client/assets/header-tab-button-YP4v_sFN.js +0 -5
  228. package/dist/client/assets/index-CIBQMZc3.js +0 -310
  229. package/dist/client/assets/index-Dy_atLRy.js +0 -1
  230. package/dist/client/assets/page-seo-sheet-D9mMBTfk.js +0 -1
  231. package/dist/client/assets/project-app-view-Bww_ZnyA.js +0 -1
  232. package/dist/client/assets/record-editor-dyb9Ijad.js +0 -1
  233. package/dist/client/assets/registry-BnciKKiV.js +0 -2
  234. package/dist/client/assets/save-referenced-block-H29Sz2fU.js +0 -1
  235. package/dist/client/assets/store-registry-CO_g7WZl.js +0 -2
  236. package/dist/client/assets/useInfiniteQuery-68Zg22Ld.js +0 -1
  237. package/dist/client/assets/useSuspenseInfiniteQuery-C32oPBV5.js +0 -1
  238. package/dist/client/assets/workflow-detail-DPYK3MGg.js +0 -1
@@ -1,4 +1,4 @@
1
- import{e5 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e6 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e7 as Nt,e8 as es,o as Ys,v as Zs,e9 as en,ea as tn}from"./index-DLy_MgNO.js";import{D as sn,F as nn,B as on}from"./index-G1Ev5Inf.js";import{h as De,i as rn,u as ae}from"./use-mcp-client-FbAC4-Un.js";import{a as ts}from"./use-virtual-mcp-CL360k9_.js";import{M as Oe}from"./monaco-editor-47G-YgBx.js";import{b as ln,R as zt,a as cn}from"./resizable-psD7TWaW.js";import{B as le}from"./badge-SRsZ13Ha.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-Dz1PdScB.js";import{S as et}from"./spinner-B_3Siejz.js";import{V as an}from"./view-mode-toggle-DPvhvCSl.js";import{ai as un,o as dn,i as fn,z as ss,aj as mn,a3 as pn,u as xn,ak as ns,a9 as hn,N as os,al as gn,am as bn,a5 as ft,an as jn}from"./agent-icon-DyzI2_Id.js";import{i as rs}from"./Play-C4oLlMWL.js";import{b as Sn,a as yn,V as Ge}from"./layout-D7xM_FMD.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-DUvSyhJC.js";import{u as wn,a as vn}from"./use-connection-DBknh1_S.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-CxFt6L0J.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-DSHkVmzb.js";import"./index-DqC0vS4o.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-EinmnR6o.js";import{S as Fn}from"./index-DdnG6T0z.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-CK_HvQcf.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-DFCaJxA8.js";import{s as Un}from"./Plus-BX4ueqQS.js";import{b as ps}from"./Tool01-B2YQjPAa.js";import{i as Fe}from"./Check-CTLrORIv.js";import{s as _t}from"./XClose-CxCjUb2p.js";import{I as Ct}from"./integration-icon-BpF3qWll.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-DBEoJ6NR.js";import"./index-5lPKE0PI.js";import{i as xs}from"./X-8xcHoVBj.js";import{u as hs,a as Gn}from"./use-collections-CmHxKkjG.js";import{E as gs}from"./empty-state-DqgO6Psg.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-CTpSARTD.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{e5 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e6 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e7 as Nt,e8 as es,o as Ys,v as Zs,e9 as en,ea as tn}from"./index-BpHKT80f.js";import{D as sn,F as nn,B as on}from"./index-CXykQoXr.js";import{h as De,i as rn,u as ae}from"./use-mcp-client-u_MHI8VY.js";import{a as ts}from"./use-virtual-mcp-CC-vnpyx.js";import{M as Oe}from"./monaco-editor-ps7H50eS.js";import{b as ln,R as zt,a as cn}from"./resizable-CA1KkrSC.js";import{B as le}from"./badge-CF8Qbgnm.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-BlwN9Vej.js";import{S as et}from"./spinner-iV1Pb5yc.js";import{V as an}from"./view-mode-toggle-DaQDP0Hg.js";import{aj as un,q as dn,i as fn,B as ss,ak as mn,a4 as pn,v as xn,al as ns,aa as hn,O as os,am as gn,an as bn,a6 as ft,ao as jn}from"./agent-icon-CpGp3Z_j.js";import{i as rs}from"./Play-Da5sMtTS.js";import{b as Sn,a as yn,V as Ge}from"./layout-BWE4r12s.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-Bzg3apEG.js";import{u as wn,a as vn}from"./use-connection-Dk0TNOQ6.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-Co2Su_jT.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-CakVcHgK.js";import"./index-W5kyiqww.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-BdT6MEhB.js";import{S as Fn}from"./index-CNsOv2lg.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-MHetYMuh.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-CWTLq4L0.js";import{s as Un}from"./Plus-DKKhAsjU.js";import{b as ps}from"./Tool01-DLVD3sFG.js";import{i as Fe}from"./Check-4eIqLz1o.js";import{s as _t}from"./XClose-lB-KoyXA.js";import{I as Ct}from"./integration-icon-Jr_UF6S2.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-C0246qCp.js";import"./index-DWx6bHXh.js";import{i as xs}from"./X-ROAwrDEL.js";import{u as hs,a as Gn}from"./use-collections-ZBVaGDFA.js";import{E as gs}from"./empty-state-DKVcL6PS.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-CrSCUdkK.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -1,4 +1,4 @@
1
- import{r as a,b5 as R}from"./index-DLy_MgNO.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,b5 as R}from"./index-BpHKT80f.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -0,0 +1 @@
1
+ import{ar as Ze,as as de,at as Ye,au as et,av as $e,G as he,aw as tt,ax as st,r as A,ay as it,az as nt,aA as rt,aB as ot,aC as ve,aD as lt,aE as at,aF as ct,e as T,j as i,q as J,c as q,l as Ie,aG as pe,o as W,K as ne,n as re,a as dt,v as mt,E as ut,b as ft,B as je}from"./index-BpHKT80f.js";import{u as xe}from"./tooltip-Bzg3apEG.js";import{i as ht,u as oe,g as pt,a as xt}from"./use-mcp-client-u_MHI8VY.js";import{a as gt,b as bt,v as yt,u as vt}from"./use-virtual-mcp-CC-vnpyx.js";import{i as jt}from"./Check-4eIqLz1o.js";import{_ as wt,A as Y,a0 as Nt,v as St,c as _t}from"./agent-icon-CpGp3Z_j.js";import{s as ge}from"./Plus-DKKhAsjU.js";import{i as Te}from"./X-ROAwrDEL.js";import{u as Ct,b as kt,h as Et,C as se}from"./agent-capabilities-CMLwBy-2.js";import{u as $t,c as It}from"./chat-context-ChsEaJrL.js";import{N as Tt}from"./agent-icons-DpGrMPQz.js";import{u as Ae,a as ie,K as Me,P as Oe,D as Re,c as At,S as Mt,v as Ot,b as Rt,C as zt,s as Pt,d as Dt,e as Ht,f as Lt}from"./sortable.esm-De-54tZ3.js";import{u as ze,a as Pe,o as Ut}from"./use-organization-settings-BwO5SItR.js";import{c as be,u as Bt,h as Ft}from"./shell-layout-CBnbPDoL.js";import{I as Qt}from"./input-CrSCUdkK.js";import{S as Wt}from"./scroll-area-BdT6MEhB.js";import{S as qt,c as Kt,d as Gt,a as Vt,b as Jt}from"./sheet-C9OeYoob.js";import{S as H}from"./skeleton-CwBsvOfD.js";import{t as De}from"./ChevronDown-CNQyx7xp.js";import{d as He}from"./ZoomOut-BrHpnwt5.js";import{g as Xt,M as Zt}from"./types-8hWDUU7E.js";import{I as Yt}from"./integration-icon-Jr_UF6S2.js";import{u as es}from"./studio-tools-DEQRneUy.js";import{t as Le,P as ts,e as ss,s as is,g as ns}from"./pair-CHlUpVVn.js";import{a as rs}from"./XCircle-qIalM-tE.js";import{g as os}from"./use-mcp-prompts-Cc6LCfnI.js";import{u as ls,w as as}from"./tab-id-3QcIfNPm.js";import{a as cs,g as ds,c as ms,b as us,D as fs}from"./dropdown-menu-CWTLq4L0.js";import{s as hs}from"./Trash01-4XBt_tI7.js";import{a as ps,u as xs}from"./use-ai-providers-zQf8BGqD.js";import{a as gs}from"./toolbar-sicu1cLe.js";import"./use-collections-ZBVaGDFA.js";import"./AlertCircle-CVfKrYvR.js";import"./Tool01-DLVD3sFG.js";import"./SwitchHorizontal01-D4Pq3_cg.js";import"./RefreshCcw01--I2EXN3r.js";import"./ArrowUpRight-CZJ1_8ff.js";import"./ZapSquare-NjYLgWlz.js";import"./Users03-oCa8QaJT.js";import"./CheckCircle-C6azXF6K.js";import"./ChevronLeft-BiFGS012.js";import"./ChevronRight-_JUGNZYN.js";import"./ChevronUp-MJGa44ay.js";import"./DotsVertical-2Z1C6jvt.js";import"./Container-DljtwK8x.js";import"./Eye-BZTA9B_k.js";import"./Globe01-XqX0cF4u.js";import"./FilterLines-BIc99EZW.js";import"./Star01-D71oJ2C0.js";import"./Palette-DpkfLWBZ.js";import"./HardDrive-CW-vNyxs.js";import"./Stars02-Dlfu9WL9.js";import"./Key01-BPeDVar3.js";import"./LayoutLeft-CRWhJz8B.js";import"./LinkExternal01-C7wWl-UH.js";import"./Monitor01-CNSOfium.js";import"./Sun-u569y38Z.js";import"./Play-Da5sMtTS.js";import"./SearchMd-DuoZUs1O.js";import"./Settings02-BWmIO2S8.js";import"./Shield01-tcvJIq4r.js";import"./Stars01-C8Z61ENf.js";import"./Upload01-DzLJ3gpY.js";import"./User01-CYChyPXV.js";import"./Users01-_lrrXmCB.js";import"./XClose-lB-KoyXA.js";import"./Zap-DeqhXyEZ.js";import"./spinner-iV1Pb5yc.js";import"./dialog-CakVcHgK.js";import"./drawer-CcoGGoOo.js";import"./collection-search-udFdxyyt.js";import"./form-Dsw-Z6di.js";import"./label-DVsZqCyz.js";import"./select-BlwN9Vej.js";import"./tabs-Bf13m2Ie.js";import"./toggle-group-CytFiMoT.js";import"./connect-desktop-dialog-W-0xLr_n.js";import"./popover-BWqC53zq.js";import"./command-DrkUYhCh.js";import"./index-DP2quHw4.js";import"./useInfiniteQuery-CTHnpbKA.js";import"./infiniteQueryObserver-D63prNq4.js";import"./index-CNsOv2lg.js";import"./question-004-sINsf4GQ.js";import"./checkbox-BmkvyW16.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DxUqupGC.js";import"./settings-section-yQou3UeY.js";import"./card-DfWQEGhA.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-0dTT6S9Q.js";import"./use-registry-connections-Dt-dLPgn.js";import"./use-connection-Dk0TNOQ6.js";import"./extract-connection-data-CDsxXNql.js";import"./generate-id-DqiWwIQ9.js";import"./collections-xMkSecim.js";import"./collection-tabs-DyeSBoHz.js";import"./badge-CF8Qbgnm.js";import"./textarea-8pboLFLk.js";import"./connection-form-helpers-Baz6qZA0.js";import"./use-infinite-scroll-crZE7yIL.js";import"./useSuspenseInfiniteQuery-DyRicwLF.js";import"./required-auth-layout-DH07bG2g.js";import"./useRouterState-B9EuTqlu.js";import"./use-org-sso-BFKiHzWZ.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B0pfAKm1.js";import"./file-type-icon-Dj5RIFdH.js";import"./content-blocks-o63cs2vh.js";import"./use-navigate-to-agent-V0Re0kfV.js";import"./decopilot-sse-pool-BFIK6-UW.js";import"./create-sse-subscription-BS5983N4.js";function we(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function bs(t,e,s){const r=t.slice(0);return r[e]=s,r}var ys=class extends Ze{#n;#e;#r;#i;#t;#s;#o;#l;#a;#c=[];constructor(t,e,s){super(),this.#n=t,this.#i=s,this.#r=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(t=>{t.destroy()})}setQueries(t,e){this.#r=t,this.#i=e,de.batch(()=>{const s=this.#t,r=this.#u(this.#r);r.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const n=r.map(m=>m.observer),a=n.map(m=>m.getCurrentResult()),l=s.length!==n.length,c=n.some((m,u)=>m!==s[u]),o=l||c,d=o?!0:a.some((m,u)=>{const f=this.#e[u];return!f||!Ye(m,f)});!o&&!d||(o&&(this.#c=r,this.#t=n),this.#e=a,this.hasListeners()&&(o&&(we(s,n).forEach(m=>{m.destroy()}),we(n,s).forEach(m=>{m.subscribe(u=>{this.#f(m,u)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(t=>t.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(t,e){const s=this.#u(t),r=s.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),n=s.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>this.#m(a??r,e,n),()=>this.#d(r,s)]}#d(t,e){return e.map((s,r)=>{const n=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,a=>{e.forEach(l=>{l.observer.trackProp(a)})})})}#m(t,e,s){if(e){const r=this.#a,n=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((a,l)=>a!==r[l]));return(!this.#s||this.#e!==this.#l||n||e!==this.#o)&&(this.#o=e,this.#l=this.#e,s!==void 0&&(this.#a=s),this.#s=et(this.#s,e(t))),this.#s}return t}#p(){return this.#i?.combine!==void 0&&this.#t.some((t,e)=>t.options.suspense&&this.#e[e]?.data===void 0)}#u(t){const e=new Map;this.#t.forEach(r=>{const n=r.options.queryHash;if(!n)return;const a=e.get(n);a?a.push(r):e.set(n,[r])});const s=[];return t.forEach(r=>{const n=this.#n.defaultQueryOptions(r),l=e.get(n.queryHash)?.shift()??new $e(this.#n,n);s.push({defaultedQueryOptions:n,observer:l})}),s}#f(t,e){const s=this.#t.indexOf(t);s!==-1&&(this.#e=bs(this.#e,s,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#d(this.#e,this.#c),e=this.#p(),s=this.#s,r=e?s:this.#m(t,this.#i?.combine);(e||s!==r)&&de.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}};function vs({queries:t,...e},s){const r=he(s),n=tt(),a=st(),l=A.useMemo(()=>t.map(h=>{const p=r.defaultQueryOptions(h);return p._optimisticResults=n?"isRestoring":"optimistic",p}),[t,r,n]);l.forEach(h=>{it(h);const p=r.getQueryCache().get(h.queryHash);nt(h,a,p)}),rt(a);const[c]=A.useState(()=>new ys(r,l,e)),[o,d,m]=c.getOptimisticResult(l,e.combine),u=!n&&e.subscribed!==!1;A.useSyncExternalStore(A.useCallback(h=>u?c.subscribe(de.batchCalls(h)):ot,[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setQueries(l,e)},[l,e,c]);const x=o.some((h,p)=>ve(l[p],h))?o.flatMap((h,p)=>{const b=l[p];if(b&&ve(b,h)){const v=new $e(r,b);return lt(b,v,a)}return[]}):[];if(x.length>0)throw Promise.all(x);const g=o.find((h,p)=>{const b=l[p];return b&&at({result:h,errorResetBoundary:a,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(g?.error)throw g.error;return d(m())}function js(t,e){return vs({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:ct,enabled:!0,placeholderData:void 0}))},e)}const ee=8;function ws(t){const e=T.c(16),{open:s,onOpenChange:r}=t,[n,a]=A.useState("");let l,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(qt,{children:"Manage home"}),c=i.jsx(Kt,{children:"Add agents to the home board and pin their interactive UIs or prompts."}),e[0]=l,e[1]=c):(l=e[0],c=e[1]);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(wt,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none","aria-hidden":!0}),e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=h=>a(h.target.value),e[3]=d):d=e[3];let m;e[4]!==n?(m=i.jsxs(Gt,{className:"px-5 py-4 border-b border-border",children:[l,c,i.jsxs("div",{className:"relative mt-3",children:[o,i.jsx(Qt,{value:n,onChange:d,placeholder:"Search agents…",className:"pl-8 h-8 text-sm"})]})]}),e[4]=n,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Js,{}),e[6]=u):u=e[6];let f;e[7]!==n?(f=i.jsx(Wt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3 flex flex-col gap-4",children:i.jsx(A.Suspense,{fallback:u,children:i.jsx(Ss,{search:n})})})}),e[7]=n,e[8]=f):f=e[8];let x;e[9]!==m||e[10]!==f?(x=i.jsxs(Vt,{side:"right",className:"w-full sm:max-w-md p-0 flex flex-col",children:[m,f]}),e[9]=m,e[10]=f,e[11]=x):x=e[11];let g;return e[12]!==r||e[13]!==s||e[14]!==x?(g=i.jsx(Jt,{open:s,onOpenChange:r,children:x}),e[12]=r,e[13]=s,e[14]=x,e[15]=g):g=e[15],g}function Ns(t){const e=T.c(32),{org:s}=J(),r=ze();let n;e[0]!==r?.ids?(n=r?.ids??[],e[0]=r?.ids,e[1]=n):n=e[1];const a=n,l=Pe(),c=bt(),o=he();let d;e[2]!==s||e[3]!==o?(d=()=>o.refetchQueries({queryKey:ne.homeNextActions(s.slug),type:"active"}),e[2]=s,e[3]=o,e[4]=d):d=e[4];const m=d;let u;e[5]!==a?(u=C=>a.includes(C),e[5]=a,e[6]=u):u=e[6];const f=u;let x;e[7]!==a||e[8]!==t?(x=t?a.filter(C=>t.has(C)).length:a.length,e[7]=a,e[8]=t,e[9]=x):x=e[9];const h=x>=ee;let p;e[10]!==h||e[11]!==f||e[12]!==l?(p=C=>f(C)||h?Promise.resolve():l.apply($=>$.includes(C)?null:[...$,C]),e[10]=h,e[11]=f,e[12]=l,e[13]=p):p=e[13];const b=p;let v;e[14]!==l?(v=C=>l.apply($=>$.filter(E=>E!==C)),e[14]=l,e[15]=v):v=e[15];const w=v;let y;e[16]!==l?(y=C=>l.apply(()=>C),e[16]=l,e[17]=y):y=e[17];const j=y;let N;e[18]!==c||e[19]!==h||e[20]!==f||e[21]!==m||e[22]!==l?(N=async(C,$)=>{await c.update.mutateAsync({id:C.id,data:{metadata:$}}),!f(C.id)&&!h&&await l.apply(E=>E.includes(C.id)?null:[...E,C.id]),await m()},e[18]=c,e[19]=h,e[20]=f,e[21]=m,e[22]=l,e[23]=N):N=e[23];const S=N;let k;return e[24]!==b||e[25]!==h||e[26]!==a||e[27]!==f||e[28]!==w||e[29]!==j||e[30]!==S?(k={homeIds:a,isOnHome:f,atLimit:h,addAgent:b,removeAgent:w,reorder:j,saveAgentMetadata:S},e[24]=b,e[25]=h,e[26]=a,e[27]=f,e[28]=w,e[29]=j,e[30]=S,e[31]=k):k=e[31],k}function Ss(t){const e=T.c(21),{search:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={pageSize:1e3},e[0]=r):r=e[0];const n=gt(r);let a;e[1]!==n?(a=new Set(n.map($s)),e[1]=n,e[2]=a):a=e[2];const l=Ns(a);let c,o,d;if(e[3]!==n||e[4]!==l||e[5]!==s){const h=new Map(n.map(Es));c=s.trim().toLowerCase();const p=v=>!c||v.title?.toLowerCase().includes(c);o=l.homeIds.map(v=>h.get(v)).filter(ks).filter(p);let b;e[9]!==l?(b=v=>!l.isOnHome(v.id),e[9]=l,e[10]=b):b=e[10],d=n.filter(Cs).filter(b).filter(p).sort(_s),e[3]=n,e[4]=l,e[5]=s,e[6]=c,e[7]=o,e[8]=d}else c=e[6],o=e[7],d=e[8];const m=d;let u;e[11]!==l||e[12]!==o?(u=i.jsx(Is,{home:l,agents:o}),e[11]=l,e[12]=o,e[13]=u):u=e[13];const f=!!c;let x;e[14]!==m||e[15]!==l||e[16]!==f?(x=i.jsx(Ms,{home:l,agents:m,hasSearch:f}),e[14]=m,e[15]=l,e[16]=f,e[17]=x):x=e[17];let g;return e[18]!==u||e[19]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=g):g=e[20],g}function _s(t,e){return(t.title??"").localeCompare(e.title??"")}function Cs(t){return t.id&&!ht(t.id)}function ks(t){return!!t}function Es(t){return[t.id,t]}function $s(t){return t.id}function Ue(t){const e=T.c(7),{title:s,hint:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==r?(a=r&&i.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3];let l;return e[4]!==n||e[5]!==a?(l=i.jsxs("div",{className:"flex items-center justify-between px-1",children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function Is(t){const e=T.c(14),{home:s,agents:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={activationConstraint:{distance:5}},e[0]=n):n=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:Pt},e[1]=a):a=e[1];const l=Ae(ie(Oe,n),ie(Me,a));let c;e[2]!==s?(c=x=>{const{active:g,over:h}=x;if(!h||g.id===h.id)return;const p=s.homeIds,b=p.indexOf(g.id),v=p.indexOf(h.id);b===-1||v===-1||s.reorder(Dt([...p],b,v)).catch(As)},e[2]=s,e[3]=c):c=e[3];const o=c,d=`${s.homeIds.length}/${ee}`;let m;e[4]!==d?(m=i.jsx(Ue,{title:"On home",hint:d}),e[4]=d,e[5]=m):m=e[5];let u;e[6]!==r||e[7]!==o||e[8]!==s||e[9]!==l?(u=r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No agents on the home yet."}):i.jsx(Re,{sensors:l,collisionDetection:At,onDragEnd:o,children:i.jsx(Mt,{items:r.map(Ts),strategy:Ot,children:i.jsx("div",{className:"flex flex-col gap-1",children:r.map(x=>i.jsx(Rs,{agent:x,home:s},x.id))})})}),e[6]=r,e[7]=o,e[8]=s,e[9]=l,e[10]=u):u=e[10];let f;return e[11]!==m||e[12]!==u?(f=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,u]}),e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function Ts(t){return t.id}function As(){return W.error("Couldn't reorder home — please try again.")}function Ms(t){const e=T.c(6),{home:s,agents:r,hasSearch:n}=t,[a,l]=A.useState(20);let c;if(e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==a){const o=r.slice(0,a);let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Ue,{title:"Add to home"}),e[5]=d):d=e[5],c=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:n?"No agents match.":"Every agent is on the home."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex flex-col gap-1",children:o.map(m=>i.jsx(Ds,{agent:m,home:s},m.id))}),r.length>a&&i.jsxs("button",{type:"button",onClick:()=>l(Os),className:"mt-1 self-center rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",children:["Load more (",r.length-a,")"]})]})]}),e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=c}else c=e[4];return c}function Os(t){return t+20}function Be(t){const e=pe(t.metadata?.ui).filter(a=>!!a.resourceUri).length,s=t.metadata?.ui?.homePrompts,r=Array.isArray(s)?s.length:null,n=[];return e>0&&n.push(`${e} tile${e===1?"":"s"}`),r!==null&&r>0&&n.push(`${r} prompt${r===1?"":"s"}`),r===0&&n.push("prompts off"),n.join(" · ")}function Rs(t){const e=T.c(57),{agent:s,home:r}=t,[n,a]=A.useState(!1);let l;e[0]!==s.id?(l={id:s.id},e[0]=s.id,e[1]=l):l=e[1];const{attributes:c,listeners:o,setNodeRef:d,transform:m,transition:u,isDragging:f}=Rt(l),x=Be(s)||"Quick access";let g;e[2]!==m?(g=zt.Transform.toString(m),e[2]=m,e[3]=g):g=e[3];const h=f?.5:void 0,p=f?100:void 0;let b;e[4]!==g||e[5]!==h||e[6]!==p||e[7]!==u?(b={transform:g,transition:u,opacity:h,zIndex:p},e[4]=g,e[5]=h,e[6]=p,e[7]=u,e[8]=b):b=e[8];const v=b,w=f&&"shadow-lg";let y;e[9]!==w?(y=q("rounded-lg border border-border bg-card",w),e[9]=w,e[10]=y):y=e[10];const j=`Drag to reorder ${s.title??s.id}`;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(He,{size:14}),e[11]=N):N=e[11];let S;e[12]!==c||e[13]!==o||e[14]!==j?(S=i.jsx("button",{type:"button",...c,...o,className:"shrink-0 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","aria-label":j,children:N}),e[12]=c,e[13]=o,e[14]=j,e[15]=S):S=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a(Ps),e[16]=k):k=e[16];const C=s.title??s.id;let $;e[17]!==s.icon||e[18]!==C?($=i.jsx(Y,{icon:s.icon,name:C,size:"sm"}),e[17]=s.icon,e[18]=C,e[19]=$):$=e[19];const E=s.title??s.id;let _;e[20]!==E?(_=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:E}),e[20]=E,e[21]=_):_=e[21];let I;e[22]!==x?(I=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:x}),e[22]=x,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=i.jsxs("div",{className:"min-w-0 flex-1",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const B=n&&"rotate-180";let z;e[27]!==B?(z=q("shrink-0 text-muted-foreground transition-transform",B),e[27]=B,e[28]=z):z=e[28];let P;e[29]!==z?(P=i.jsx(De,{size:16,className:z}),e[29]=z,e[30]=P):P=e[30];let Q;e[31]!==n||e[32]!==$||e[33]!==O||e[34]!==P?(Q=i.jsxs("button",{type:"button",onClick:k,className:"flex min-w-0 flex-1 items-center gap-2.5 text-left outline-none","aria-expanded":n,children:[$,O,P]}),e[31]=n,e[32]=$,e[33]=O,e[34]=P,e[35]=Q):Q=e[35];let M;e[36]!==s.id||e[37]!==r?(M=()=>r.removeAgent(s.id).catch(zs),e[36]=s.id,e[37]=r,e[38]=M):M=e[38];const F=`Remove ${s.title??s.id} from home`;let D;e[39]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx(Te,{size:14}),e[39]=D):D=e[39];let R;e[40]!==M||e[41]!==F?(R=i.jsx("button",{type:"button",onClick:M,"aria-label":F,title:"Remove from home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:D}),e[40]=M,e[41]=F,e[42]=R):R=e[42];let L;e[43]!==S||e[44]!==Q||e[45]!==R?(L=i.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-2.5",children:[S,Q,R]}),e[43]=S,e[44]=Q,e[45]=R,e[46]=L):L=e[46];let U;e[47]!==s||e[48]!==n||e[49]!==r?(U=n&&i.jsx(Fe,{agent:s,home:r}),e[47]=s,e[48]=n,e[49]=r,e[50]=U):U=e[50];let G;return e[51]!==d||e[52]!==v||e[53]!==L||e[54]!==U||e[55]!==y?(G=i.jsxs("div",{ref:d,style:v,className:y,children:[L,U]}),e[51]=d,e[52]=v,e[53]=L,e[54]=U,e[55]=y,e[56]=G):G=e[56],G}function zs(){return W.error("Couldn't remove from home — please try again.")}function Ps(t){return!t}function Ds({agent:t,home:e}){const[s,r]=A.useState(!1),[n,a]=A.useState(!1),l=Be(t),c=async()=>{if(!e.atLimit){a(!0);try{await e.addAgent(t.id)}catch{W.error("Couldn't add to home — please try again.")}finally{a(!1)}}};return i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[i.jsxs("button",{type:"button",onClick:()=>r(o=>!o),className:"flex min-w-0 flex-1 items-center gap-3 text-left outline-none","aria-expanded":s,children:[i.jsx(Y,{icon:t.icon,name:t.title??t.id,size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:t.title??t.id}),l&&i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l})]}),i.jsx(De,{size:16,className:q("shrink-0 text-muted-foreground transition-transform",s&&"rotate-180")})]}),i.jsx("button",{type:"button",onClick:c,disabled:n||e.atLimit,"aria-label":"Add to home",title:e.atLimit?`Home is full (${ee}) — remove an agent first`:"Add to home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md bg-foreground text-background text-xs hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:n?i.jsx(Ie,{size:12,className:"animate-spin"}):i.jsx(ge,{size:14})})]}),s&&i.jsx(Fe,{agent:t,home:e})]})}function Fe(t){const e=T.c(26),{agent:s,home:r}=t;let n,a,l,c,o,d,m;if(e[0]!==s||e[1]!==r){const p=pe(s.metadata?.ui);let b;e[9]!==s.connections?(b=(s.connections??[]).map(Ls).sort(),e[9]=s.connections,e[10]=b):b=e[10];const v=b;a=s.metadata?.ui?.homePrompts,m="border-t border-border px-3 py-2 flex flex-col gap-3",n=Bs,l=s,c=r,o=v,d=new Set(p.map(Hs)),e[0]=s,e[1]=r,e[2]=n,e[3]=a,e[4]=l,e[5]=c,e[6]=o,e[7]=d,e[8]=m}else n=e[2],a=e[3],l=e[4],c=e[5],o=e[6],d=e[7],m=e[8];let u;e[11]!==n||e[12]!==l||e[13]!==c||e[14]!==o||e[15]!==d?(u=i.jsx(n,{agent:l,home:c,connectionIds:o,pinnedResourceUris:d}),e[11]=n,e[12]=l,e[13]=c,e[14]=o,e[15]=d,e[16]=u):u=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Us,{}),e[17]=f):f=e[17];const x=a??null;let g;e[18]!==s||e[19]!==r||e[20]!==x?(g=i.jsx(A.Suspense,{fallback:f,children:i.jsx(Qs,{agent:s,home:r,curated:x})}),e[18]=s,e[19]=r,e[20]=x,e[21]=g):g=e[21];let h;return e[22]!==m||e[23]!==u||e[24]!==g?(h=i.jsxs("div",{className:m,children:[u,g]}),e[22]=m,e[23]=u,e[24]=g,e[25]=h):h=e[25],h}function Hs(t){return t.resourceUri}function Ls(t){return t.connection_id}function Us(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex flex-col gap-2 py-1",children:[i.jsx(H,{className:"h-8 w-full"}),i.jsx(H,{className:"h-8 w-2/3"})]}),t[0]=e):e=t[0],e}function Bs({agent:t,home:e,connectionIds:s,pinnedResourceUris:r}){const n=es(),{data:a,isLoading:l}=re({queryKey:ne.projectConnectionDetails(t.id,s),enabled:s.length>0,queryFn:async()=>(await Promise.all(s.map(async o=>{try{const{item:d}=await n.call("COLLECTION_CONNECTIONS_GET",{id:o}),m=(d?.tools??[]).flatMap(u=>{const f=Xt(u._meta);return f?[{name:u.name,description:u.description,resourceUri:f}]:[]});return{id:o,title:d?.title??o,icon:d?.icon??null,uiTools:m}}catch{return{id:o,title:o,icon:null,uiTools:[]}}}))).filter(o=>o.uiTools.length>0)});return s.length===0?null:l?i.jsxs("div",{className:"flex flex-col gap-1 py-0.5",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}):!a||a.length===0?null:i.jsx("div",{className:"flex flex-col gap-0.5",children:a.map(c=>c.uiTools.map(o=>i.jsx(Fs,{agent:t,home:e,connection:c,tool:o,isPinned:r.has(o.resourceUri)},`${c.id}:${o.name}`)))})}function Fs({agent:t,home:e,connection:s,tool:r,isPinned:n}){const[a,l]=A.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${ee}) — remove an agent first`);return}l(!0);try{const o=pe(t.metadata?.ui),d=n?o.filter(u=>u.resourceUri!==r.resourceUri):[...o,{connectionId:s.id,resourceUri:r.resourceUri}],m={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:d}};await e.saveAgentMetadata(t,m)}catch(o){console.error("[home-tiles] failed to toggle tile",o),W.error("Couldn't update home — please try again.")}finally{l(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx(Yt,{icon:s.icon,name:s.title,size:"xs"}),i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:Le(r.name)}),i.jsx(Qe,{isPinned:n,submitting:a,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Qe(t){const e=T.c(11),{isPinned:s,submitting:r,onClick:n,label:a}=t,l=s?"text-muted-foreground hover:bg-destructive/10 hover:text-destructive":"bg-foreground text-background hover:opacity-90";let c;e[0]!==l?(c=q("inline-flex size-7 shrink-0 items-center justify-center rounded-md text-xs transition-colors disabled:opacity-50 disabled:cursor-progress",l),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==s||e[3]!==r?(o=r?i.jsx(Ie,{size:12,className:"animate-spin"}):s?i.jsx(Nt,{size:14}):i.jsx(ge,{size:14}),e[2]=s,e[3]=r,e[4]=o):o=e[4];let d;return e[5]!==a||e[6]!==n||e[7]!==r||e[8]!==c||e[9]!==o?(d=i.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":a,title:a,className:c,children:o}),e[5]=a,e[6]=n,e[7]=r,e[8]=c,e[9]=o,e[10]=d):d=e[10],d}function Qs(t){const e=T.c(32),{agent:s,home:r,curated:n}=t,{org:a}=J();let l;e[0]!==s.id||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:s.id,orgId:a.id,orgSlug:a.slug},e[0]=s.id,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const c=oe(l);let o;e[4]!==s.id||e[5]!==a.id?(o=ne.agentPrompts(a.id,s.id),e[4]=s.id,e[5]=a.id,e[6]=o):o=e[6];let d;e[7]!==c?(d=async()=>{const{prompts:j}=await c.listPrompts();return j.map(Gs)},e[7]=c,e[8]=d):d=e[8];let m;e[9]!==o||e[10]!==d?(m={queryKey:o,queryFn:d,staleTime:3e4,retry:!1},e[9]=o,e[10]=d,e[11]=m):m=e[11];const{data:u,isLoading:f,error:x}=re(m),g=be(a.slug);let h,p;if(e[12]!==s.id||e[13]!==u||e[14]!==g.prompts){let j;e[17]!==s.id?(j=S=>S.agentId===s.id&&S.promptName,e[17]=s.id,e[18]=j):j=e[18],h=g.prompts.filter(j).map(Ks);let N;e[19]!==u?(N=u??[],e[19]=u,e[20]=N):N=e[20],p=[...N];for(const S of h)p.some(k=>k.name===S.name)||p.push(S);e[12]=s.id,e[13]=u,e[14]=g.prompts,e[15]=h,e[16]=p}else h=e[15],p=e[16];if(f&&h.length===0){let j;return e[21]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}),e[21]=j):j=e[21],j}if(x&&h.length===0)return console.error("[home-tiles] listPrompts failed for agent",s.id,x),null;if(p.length===0)return null;let b;e[22]!==n||e[23]!==p?(b=n??p.map(qs),e[22]=n,e[23]=p,e[24]=b):b=e[24];let v;e[25]!==b?(v=new Set(b),e[25]=b,e[26]=v):v=e[26];const w=v;let y;return e[27]!==s||e[28]!==r||e[29]!==p||e[30]!==w?(y=i.jsx("div",{className:"flex flex-col gap-0.5",children:p.map(j=>i.jsx(Vs,{agent:s,home:r,prompt:j,allPromptNames:p.map(Ws),isPinned:w.has(j.name)},j.name))}),e[27]=s,e[28]=r,e[29]=p,e[30]=w,e[31]=y):y=e[31],y}function Ws(t){return t.name}function qs(t){return t.name}function Ks(t){return{name:t.promptName,title:t.title,description:t.description}}function Gs(t){return{name:t.name,title:t.title,description:t.description}}function Vs({agent:t,home:e,prompt:s,allPromptNames:r,isPinned:n}){const[a,l]=A.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${ee}) — remove an agent first`);return}l(!0);try{const o=t.metadata?.ui?.homePrompts;let d;Array.isArray(o)?d=n?o.filter(u=>u!==s.name):[...o,s.name]:d=n?r.filter(u=>u!==s.name):r;const m={...t.metadata??{},ui:{...t.metadata?.ui??{},homePrompts:d}};await e.saveAgentMetadata(t,m)}catch(o){console.error("[home-tiles] failed to toggle prompt",o),W.error("Couldn't update home — please try again.")}finally{l(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:s.title??Le(s.name)}),i.jsx(Qe,{isPinned:n,submitting:a,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Js(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex flex-col gap-2 p-2",children:Array.from({length:4},Xs)}),t[0]=e):e=t[0],e}function Xs(t,e){return i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border p-2.5",children:[i.jsx(H,{className:"size-8 rounded-md"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},e)}const Z=1,We=`home-board.layout.v${Z}`;function qe(t){return`home-board.layout.v${Z}.${t}`}const Ke={version:Z,tiles:{},hidden:[]};function me(t){return!t||t.version!==Z?Ke:{version:Z,tiles:t.tiles??{},hidden:Array.isArray(t.hidden)?t.hidden:[]}}function Zs(t){return Object.keys(t.tiles).length>0||t.hidden.length>0}function Ys(t){try{const e=localStorage.getItem(qe(t));return e?me(JSON.parse(e)):void 0}catch{return}}function Ne(t,e){try{localStorage.setItem(qe(t),JSON.stringify(e))}catch{}}async function Se(t,e){if(!(await fetch(`/api/${t}/kv/${We}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save board layout")}function ei(t){const e=T.c(24),s=he();let r;e[0]!==t?(r=ne.boardLayout(t),e[0]=t,e[1]=r):r=e[1];const n=r;let a;e[2]!==t?(a=Ys(t),e[2]=t,e[3]=a):a=e[3];const l=a;let c;e[4]!==l||e[5]!==t?(c=async()=>{const b=await fetch(`/api/${t}/kv/${We}`);if(b.status===404)return l&&Zs(l)?(await Se(t,l),l):Ke;if(!b.ok)throw new Error("Failed to load board layout");const v=await b.json(),w=me(v.value);return Ne(t,w),w},e[4]=l,e[5]=t,e[6]=c):c=e[6];let o;e[7]!==l||e[8]!==n||e[9]!==c?(o={queryKey:n,queryFn:c,initialData:l,staleTime:0,refetchOnWindowFocus:!1},e[7]=l,e[8]=n,e[9]=c,e[10]=o):o=e[10];const{data:d,isLoading:m}=re(o);let u;e[11]!==t?(u={mutationFn:b=>Se(t,b)},e[11]=t,e[12]=u):u=e[12];const f=dt(u);let x;e[13]!==f||e[14]!==t||e[15]!==s||e[16]!==n?(x=b=>{Ne(t,b),s.setQueryData(n,b),f.mutate(b)},e[13]=f,e[14]=t,e[15]=s,e[16]=n,e[17]=x):x=e[17];const g=x;let h;e[18]!==d?(h=me(d),e[18]=d,e[19]=h):h=e[19];let p;return e[20]!==m||e[21]!==g||e[22]!==h?(p={layout:h,isLoading:m,save:g},e[20]=m,e[21]=g,e[22]=h,e[23]=p):p=e[23],p}const Ge=A.createContext(null);function ti(t){const e=T.c(24),{children:s}=t,{org:r}=J(),n=ei(r.slug),[a,l]=A.useState(!1),[c,o]=A.useState(null);let d;e[0]!==n.layout?(d=()=>{o(n.layout),l(!0)},e[0]=n.layout,e[1]=d):d=e[1];const m=d;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{o(null),l(!1)},e[2]=u):u=e[2];const f=u;let x;e[3]!==c||e[4]!==n?(x=()=>{c&&n.save(c),o(null),l(!1)},e[3]=c,e[4]=n,e[5]=x):x=e[5];const g=x,h=a&&c!==null,p=h?c:n.layout;let b;e[6]!==c||e[7]!==h||e[8]!==n.layout?(b=h?JSON.stringify(c)!==JSON.stringify(n.layout):!1,e[6]=c,e[7]=h,e[8]=n.layout,e[9]=b):b=e[9];const v=b;let w;e[10]!==a||e[11]!==n?(w=S=>{a?o(S):n.save(S)},e[10]=a,e[11]=n,e[12]=w):w=e[12];const y=w;let j;e[13]!==y||e[14]!==m||e[15]!==v||e[16]!==a||e[17]!==p||e[18]!==g||e[19]!==n.isLoading?(j={isEditMode:a,enter:m,cancel:f,save:g,hasChanges:v,layout:p,isLayoutLoading:n.isLoading,commitLayout:y},e[13]=y,e[14]=m,e[15]=v,e[16]=a,e[17]=p,e[18]=g,e[19]=n.isLoading,e[20]=j):j=e[20];let N;return e[21]!==s||e[22]!==j?(N=i.jsx(Ge.Provider,{value:j,children:s}),e[21]=s,e[22]=j,e[23]=N):N=e[23],N}function Ve(){const t=A.useContext(Ge);if(!t)throw new Error("useHomeEdit must be used within a HomeEditProvider");return t}function si({agentId:t}){const{org:e,locator:s}=J(),r=oe({connectionId:t,orgId:e.id,orgSlug:e.slug}),{create:n}=ls(),{setTaskId:a}=Bt(),[l,c]=A.useState(null),[o,d]=A.useState(!1),m=A.useRef(!1),u=async(p,b)=>{if(!r){W.error("MCP client not available");return}if(!m.current){m.current=!0,d(!0);try{const v=await os(r,p.name,b),w={type:"doc",content:[{type:"paragraph",content:[ss({id:p.name,name:is(p.name,ns(p._meta)),metadata:v.messages,char:"/",kind:"prompt",args:b}),{type:"text",text:" "}]}]},y=crypto.randomUUID();as(sessionStorage,s,y,{tiptapDoc:w}),await n({id:y,virtual_mcp_id:t}),a(y,t,{autosend:!0})}catch(v){console.error("[start-thread-from-prompt] failed",v),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},f=async p=>{if(!m.current){if(p.arguments&&p.arguments.length>0){c(p);return}await u(p)}},x=async p=>{if(!l)return;const b=l;c(null),await u(b,p)};return{start:f,startBlank:async()=>{if(!m.current){m.current=!0,d(!0);try{const p=crypto.randomUUID();await n({id:p,virtual_mcp_id:t}),a(p,t)}catch(p){console.error("[start-thread-from-prompt] startBlank failed",p),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},dialog:i.jsx(ts,{prompt:l,setPrompt:p=>c(p),onSubmit:x}),dialogPrompt:l,starting:o}}const K=4,V=100,_e=12,ii=5,ni={w:2,h:2};class ue extends A.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,message:e instanceof Error?e.message:"Unknown error"}}componentDidCatch(e,s){console.error("[home-tiles] tile crashed:",e,s.componentStack)}render(){return this.state.hasError?i.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-4 text-center",children:[i.jsx("span",{className:"flex size-8 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:i.jsx(mt,{size:16})}),i.jsx("p",{className:"text-sm font-medium text-foreground",children:"This tile crashed"}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:this.state.message??"Something went wrong rendering this tile."})]}):this.props.children}}function ri(t){const e=T.c(72),{tiles:s,isEditMode:r,renderTile:n,onMove:a,onResize:l,onRemove:c}=t,o=xe(),d=A.useRef(null),[m,u]=A.useState(null),[f,x]=A.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={activationConstraint:{distance:4}},e[0]=g):g=e[0];const h=Ae(ie(Oe,g),ie(Me)),p=s.reduce(oi,0),b=r?Math.max(p+2,4):Math.max(p,1);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const M=d.current?.getBoundingClientRect();return M?{cellWidth:M.width/K,cellHeight:V}:null},e[1]=v):v=e[1];const w=v;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=M=>{u(String(M.active.id)),x(w())},e[2]=y):y=e[2];const j=y;let N;e[3]!==f||e[4]!==a||e[5]!==s?(N=M=>{const F=String(M.active.id),D=f??w();if(u(null),x(null),!D||D.cellWidth<=0)return;const R=s.find(G=>G.id===F);if(!R)return;const L=Math.round(M.delta.x/D.cellWidth),U=Math.round(M.delta.y/D.cellHeight);L===0&&U===0||a(F,{x:R.x+L,y:R.y+U})},e[3]=f,e[4]=a,e[5]=s,e[6]=N):N=e[6];const S=N;if(o){let M;if(e[7]!==n||e[8]!==s){let D;e[10]!==n?(D=R=>i.jsx("div",{className:"bg-card card-shadow rounded-2xl overflow-hidden",style:{minHeight:V},children:i.jsx(ue,{children:n(R)})},R.id),e[10]=n,e[11]=D):D=e[11],M=s.map(D),e[7]=n,e[8]=s,e[9]=M}else M=e[9];let F;return e[12]!==M?(F=i.jsx("div",{className:"flex flex-col gap-3 px-4 pb-8",children:M}),e[12]=M,e[13]=F):F=e[13],F}let k,C,$,E,_,I,O,B,z;if(e[14]!==m||e[15]!==f||e[16]!==r||e[17]!==S||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==h||e[22]!==s||e[23]!==b){const M=m?s.find(X=>X.id===m):null;C=Re,B=h,z=j,$=S;const F=b*V,D=r?V*4:V;let R;e[33]!==F||e[34]!==D?(R={height:F,minHeight:D},e[33]=F,e[34]=D,e[35]=R):R=e[35];let L;e[36]!==r||e[37]!==s||e[38]!==b?(L=r&&i.jsx(li,{rows:b,tiles:s}),e[36]=r,e[37]=s,e[38]=b,e[39]=L):L=e[39];let U;if(e[40]!==m||e[41]!==r||e[42]!==c||e[43]!==l||e[44]!==n||e[45]!==s){let X;e[47]!==m||e[48]!==r||e[49]!==c||e[50]!==l||e[51]!==n?(X=te=>i.jsx(ci,{tile:te,isEditMode:r,isDragging:m===te.id,onResize:l,onRemove:c,children:n(te)},te.id),e[47]=m,e[48]=r,e[49]=c,e[50]=l,e[51]=n,e[52]=X):X=e[52],U=s.map(X),e[40]=m,e[41]=r,e[42]=c,e[43]=l,e[44]=n,e[45]=s,e[46]=U}else U=e[46];e[53]!==R||e[54]!==L||e[55]!==U?(E=i.jsxs("div",{ref:d,className:"relative w-full",style:R,children:[L,U]}),e[53]=R,e[54]=L,e[55]=U,e[56]=E):E=e[56],k=Ht,_=null;const G=M&&f?M.w*f.cellWidth-_e:void 0,le=M&&f?M.h*f.cellHeight-_e:void 0;e[57]!==G||e[58]!==le?(I={width:G,height:le},e[57]=G,e[58]=le,e[59]=I):I=e[59],O=M&&i.jsx("div",{className:"bg-card card-shadow rounded-2xl shadow-2xl ring-2 ring-primary/40 h-full overflow-hidden opacity-95",children:i.jsx(ue,{children:n(M)})}),e[14]=m,e[15]=f,e[16]=r,e[17]=S,e[18]=c,e[19]=l,e[20]=n,e[21]=h,e[22]=s,e[23]=b,e[24]=k,e[25]=C,e[26]=$,e[27]=E,e[28]=_,e[29]=I,e[30]=O,e[31]=B,e[32]=z}else k=e[24],C=e[25],$=e[26],E=e[27],_=e[28],I=e[29],O=e[30],B=e[31],z=e[32];let P;e[60]!==k||e[61]!==_||e[62]!==I||e[63]!==O?(P=i.jsx(k,{dropAnimation:_,style:I,children:O}),e[60]=k,e[61]=_,e[62]=I,e[63]=O,e[64]=P):P=e[64];let Q;return e[65]!==C||e[66]!==$||e[67]!==E||e[68]!==P||e[69]!==B||e[70]!==z?(Q=i.jsxs(C,{sensors:B,onDragStart:z,onDragEnd:$,children:[E,P]}),e[65]=C,e[66]=$,e[67]=E,e[68]=P,e[69]=B,e[70]=z,e[71]=Q):Q=e[71],Q}function oi(t,e){return Math.max(t,e.y+e.h)}function li(t){const e=T.c(7),{rows:s,tiles:r}=t;let n;e[0]!==r?(n=(o,d)=>r.some(m=>o>=m.x&&o<m.x+m.w&&d>=m.y&&d<m.y+m.h),e[0]=r,e[1]=n):n=e[1];const a=n;let l;if(e[2]!==a||e[3]!==s){l=[];for(let o=0;o<s;o++)for(let d=0;d<K;d++)a(d,o)||l.push({x:d,y:o});e[2]=a,e[3]=s,e[4]=l}else l=e[4];let c;return e[5]!==l?(c=i.jsx("div",{className:"absolute inset-0 pointer-events-none",children:l.map(ai)}),e[5]=l,e[6]=c):c=e[6],c}function ai(t){return i.jsx("div",{className:"absolute p-1",style:{left:`${t.x/K*100}%`,top:t.y*V,width:`${1/K*100}%`,height:V},children:i.jsx("div",{className:"h-full w-full rounded-2xl border border-dashed border-border/60"})},`${t.x}-${t.y}`)}function ci(t){const e=T.c(31),{tile:s,isEditMode:r,isDragging:n,onResize:a,onRemove:l,children:c}=t,o=!r;let d;e[0]!==o||e[1]!==s.id?(d={id:s.id,disabled:o},e[0]=o,e[1]=s.id,e[2]=d):d=e[2];const{setNodeRef:m,attributes:u,listeners:f,isDragging:x}=Lt(d),g=`${s.x/K*100}%`,h=`${s.w/K*100}%`,p=s.y*V,b=s.h*V,v=x||n,w=!v&&"transition-[left,top,width,height,opacity] duration-200 ease-out",y=v&&"opacity-30";let j;e[3]!==w||e[4]!==y?(j=q("absolute p-1 will-change-[left,top,width,height,opacity]",w,y),e[3]=w,e[4]=y,e[5]=j):j=e[5];let N;e[6]!==b||e[7]!==g||e[8]!==p||e[9]!==h?(N={left:g,top:p,width:h,height:b},e[6]=b,e[7]=g,e[8]=p,e[9]=h,e[10]=N):N=e[10];const S=r&&"outline outline-1 outline-transparent hover:outline-primary/40";let k;e[11]!==S?(k=q("relative h-full bg-card card-shadow rounded-2xl overflow-hidden",S),e[11]=S,e[12]=k):k=e[12];let C;e[13]!==u||e[14]!==r||e[15]!==f||e[16]!==l||e[17]!==a||e[18]!==s?(C=r&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",...u,...f,className:"absolute top-2 left-2 z-10 flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted cursor-grab active:cursor-grabbing","aria-label":"Drag tile",children:i.jsx(He,{size:16})}),i.jsx("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1",children:i.jsx(di,{tile:s,onResize:a,onRemove:l})})]}),e[13]=u,e[14]=r,e[15]=f,e[16]=l,e[17]=a,e[18]=s,e[19]=C):C=e[19];let $;e[20]!==c?($=i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(ue,{children:c})}),e[20]=c,e[21]=$):$=e[21];let E;e[22]!==$||e[23]!==k||e[24]!==C?(E=i.jsxs("div",{className:k,children:[C,$]}),e[22]=$,e[23]=k,e[24]=C,e[25]=E):E=e[25];let _;return e[26]!==m||e[27]!==E||e[28]!==j||e[29]!==N?(_=i.jsx("div",{ref:m,className:j,style:N,children:E}),e[26]=m,e[27]=E,e[28]=j,e[29]=N,e[30]=_):_=e[30],_}function di(t){const e=T.c(20),{tile:s,onResize:r,onRemove:n}=t,[a,l]=A.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(cs,{asChild:!0,children:i.jsx("button",{type:"button",className:"flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Tile options",children:i.jsx(St,{size:16})})}),e[0]=c):c=e[0];let o;e[1]!==r||e[2]!==s.id?(o=p=>{r(s.id,p),l(!1)},e[1]=r,e[2]=s.id,e[3]=o):o=e[3];let d;e[4]!==o||e[5]!==s?(d=i.jsx(mi,{tile:s,onPick:o}),e[4]=o,e[5]=s,e[6]=d):d=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ds,{}),e[7]=m):m=e[7];let u;e[8]!==n||e[9]!==s.id?(u=()=>n(s.id),e[8]=n,e[9]=s.id,e[10]=u):u=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(hs,{size:14,className:"mr-2"}),e[11]=f):f=e[11];let x;e[12]!==u?(x=i.jsxs(ms,{onSelect:u,className:"text-destructive focus:text-destructive",children:[f,"Remove tile"]}),e[12]=u,e[13]=x):x=e[13];let g;e[14]!==d||e[15]!==x?(g=i.jsxs(us,{align:"end",className:"w-auto",children:[d,m,x]}),e[14]=d,e[15]=x,e[16]=g):g=e[16];let h;return e[17]!==a||e[18]!==g?(h=i.jsxs(fs,{open:a,onOpenChange:l,children:[c,g]}),e[17]=a,e[18]=g,e[19]=h):h=e[19],h}function mi(t){const e=T.c(19),{tile:s,onPick:r}=t,n=s.minW??1,a=s.minH??1,[l,c]=A.useState(null);let o;e[0]!==l||e[1]!==s.h||e[2]!==s.w?(o=l??{w:s.w,h:s.h},e[0]=l,e[1]=s.h,e[2]=s.w,e[3]=o):o=e[3];const d=o;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("span",{className:"text-xs text-muted-foreground",children:"Size"}),e[4]=m):m=e[4];let u;e[5]!==d.h||e[6]!==d.w?(u=i.jsxs("div",{className:"mb-2 flex items-center justify-between gap-4",children:[m,i.jsxs("span",{className:"text-xs font-medium tabular-nums",children:[d.w," × ",d.h]})]}),e[5]=d.h,e[6]=d.w,e[7]=u):u=e[7];let f,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={gridTemplateColumns:`repeat(${K}, 1.25rem)`},x=()=>c(null),e[8]=f,e[9]=x):(f=e[8],x=e[9]);let g;e[10]!==d.h||e[11]!==d.w||e[12]!==a||e[13]!==n||e[14]!==r?(g=i.jsx("div",{className:"grid w-max gap-1",style:f,onPointerLeave:x,children:Array.from({length:ii},(p,b)=>Array.from({length:K},(v,w)=>{const y=w+1,j=b+1,N=y<n||j<a,S=y<=d.w&&j<=d.h;return i.jsx("button",{type:"button",disabled:N,"aria-label":`${y} by ${j}`,onPointerEnter:()=>c({w:y,h:j}),onClick:()=>r({w:y,h:j}),className:q("size-5 rounded-sm border transition-colors",S?"border-primary bg-primary/30":"border-border bg-muted",N?"cursor-not-allowed opacity-40":"cursor-pointer hover:border-primary/60")},`${y}x${j}`)}))}),e[10]=d.h,e[11]=d.w,e[12]=a,e[13]=n,e[14]=r,e[15]=g):g=e[15];let h;return e[16]!==u||e[17]!==g?(h=i.jsxs("div",{className:"px-2 py-1.5",children:[u,g]}),e[16]=u,e[17]=g,e[18]=h):h=e[18],h}function ui(t,e,s){return t.some(r=>e>=r.x&&e<r.x+r.w&&s>=r.y&&s<r.y+r.h)}function fe(t,e,s){for(let r=0;r<100;r++)for(let n=0;n<=K-e;n++){let a=!0;for(let l=0;l<s&&a;l++)for(let c=0;c<e&&a;c++)ui(t,n+c,r+l)&&(a=!1);if(a)return{x:n,y:r}}return{x:0,y:0}}function ae(t,e,s={w:1,h:1}){const r=Math.max(s.w,Math.min(K,t)),n=Math.max(s.h,Math.min(6,e));return{w:r,h:n}}function ce(t,e,s){const r=Math.max(0,Math.min(K-s,t)),n=Math.max(0,e);return{x:r,y:n}}function fi(t,e,s){const r=t.find(o=>o.id===e);if(!r)return t;const n=t.filter(o=>o.id!==e),a=n.find(o=>s.x>=o.x&&s.x<o.x+o.w&&s.y>=o.y&&s.y<o.y+o.h);if(a&&a.w===r.w&&a.h===r.h)return t.map(o=>o.id===e?{...o,x:a.x,y:a.y}:o.id===a.id?{...o,x:r.x,y:r.y}:o);const c=[{...r,x:s.x,y:s.y}];for(const o of n){const d=fe(c,o.w,o.h);c.push({...o,x:d.x,y:d.y})}return c}function hi(t){const e=T.c(35),{layout:s,isLayoutLoading:r,commitLayout:n}=Ve();let a;e[0]!==s.hidden?(a=new Set(s.hidden),e[0]=s.hidden,e[1]=a):a=e[1];const l=a;let c,o;if(e[2]!==t||e[3]!==l||e[4]!==s.tiles){o=[];let v;e[7]!==l?(v=y=>y.pinned||!l.has(y.id),e[7]=l,e[8]=v):v=e[8];const w=t.filter(v);c=new Map;for(const y of t)y.minSize&&c.set(y.id,y.minSize);for(const y of w){const j=s.tiles[y.id];if(!j)continue;const N=c.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),{x:C,y:$}=ce(j.x,j.y,S);o.push({id:y.id,x:C,y:$,w:S,h:k,minW:N?.w,minH:N?.h})}for(const y of w){if(o.some($=>$.id===y.id))continue;const j=y.defaultSize??ni,N=c.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),C=fe(o,S,k);o.push({id:y.id,x:C.x,y:C.y,w:S,h:k,minW:N?.w,minH:N?.h})}e[2]=t,e[3]=l,e[4]=s.tiles,e[5]=c,e[6]=o}else c=e[5],o=e[6];let d;e[9]!==t?(d=new Set(t.map(pi)),e[9]=t,e[10]=d):d=e[10];const m=d;let u;e[11]!==m||e[12]!==n?(u=(v,w)=>{const y={};for(const j of v)y[j.id]={x:j.x,y:j.y,w:j.w,h:j.h};n({version:Z,tiles:y,hidden:w.filter(j=>m.has(j))})},e[11]=m,e[12]=n,e[13]=u):u=e[13];const f=u;let x;e[14]!==o?(x={visible:o},e[14]=o,e[15]=x):x=e[15];let g;e[16]!==f||e[17]!==s||e[18]!==o?(g=(v,w)=>{const y=o.find(S=>S.id===v);if(!y)return;const j=ce(w.x,w.y,y.w);if(j.x===y.x&&j.y===y.y)return;const N=fi(o,v,j);f(N,s.hidden)},e[16]=f,e[17]=s,e[18]=o,e[19]=g):g=e[19];let h;e[20]!==f||e[21]!==s||e[22]!==c||e[23]!==o?(h=(v,w)=>{const y=o.find(E=>E.id===v);if(!y)return;const j=c.get(v),{w:N,h:S}=ae(w.w,w.h,j);if(N===y.w&&S===y.h)return;const k={...y,w:N,h:S,x:ce(y.x,y.y,N).x},C=o.filter(E=>E.id!==v),$=[k];for(const E of C){const _=fe($,E.w,E.h);$.push({...E,x:_.x,y:_.y})}f($,s.hidden)},e[20]=f,e[21]=s,e[22]=c,e[23]=o,e[24]=h):h=e[24];let p;e[25]!==f||e[26]!==s||e[27]!==o?(p=v=>{const w=o.filter(y=>y.id!==v);f(w,Array.from(new Set([...s.hidden,v])))},e[25]=f,e[26]=s,e[27]=o,e[28]=p):p=e[28];let b;return e[29]!==r||e[30]!==x||e[31]!==g||e[32]!==h||e[33]!==p?(b={snapshot:x,isLoading:r,moveTile:g,resizeTile:h,hideTile:p},e[29]=r,e[30]=x,e[31]=g,e[32]=h,e[33]=p,e[34]=b):b=e[34],b}function pi(t){return t.id}const xi={w:2,h:4},gi={w:1,h:2},bi={w:1,h:1};function yi(t){return`prompt:${t.agentId}:${t.promptName||"blank"}`}function vi(t){return`tile:${t.agentId}:${t.resourceUri}`}function ji(t){return t.promptName?t.agentName:t.description}function wi(t){return{name:t.promptName,title:t.title,description:t.description,arguments:t.arguments,_meta:t._meta}}function ye(t){const e=T.c(10);let s;e[0]!==t?(s={agentId:t},e[0]=t,e[1]=s):s=e[1];const{start:r,startBlank:n,dialog:a,starting:l}=si(s);let c;e[2]!==r||e[3]!==n?(c=m=>{if(!m.promptName){n();return}r(wi(m))},e[2]=r,e[3]=n,e[4]=c):c=e[4];const o=c;let d;return e[5]!==a||e[6]!==o||e[7]!==n||e[8]!==l?(d={open:o,startBlank:n,dialog:a,starting:l},e[5]=a,e[6]=o,e[7]=n,e[8]=l,e[9]=d):d=e[9],d}function Ni(t){const e=T.c(32),{entry:s,isEditMode:r}=t,{open:n,dialog:a,starting:l}=ye(s.agentId);let c;e[0]!==s||e[1]!==n?(c=()=>n(s),e[0]=s,e[1]=n,e[2]=c):c=e[2];const o=l||r,d=!r&&"cursor-pointer transition-colors hover:bg-accent/40",m=r&&"cursor-default pl-12",u=l&&"opacity-60";let f;e[3]!==d||e[4]!==m||e[5]!==u?(f=q("group/tile relative flex h-full w-full items-center gap-3 px-4 py-3 text-left bg-card",d,m,u),e[3]=d,e[4]=m,e[5]=u,e[6]=f):f=e[6];let x;e[7]!==s.agentIcon||e[8]!==s.agentName?(x=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[7]=s.agentIcon,e[8]=s.agentName,e[9]=x):x=e[9];let g;e[10]!==s.title?(g=i.jsx("div",{className:"line-clamp-2 text-sm font-medium text-foreground leading-snug",children:s.title}),e[10]=s.title,e[11]=g):g=e[11];let h;e[12]!==s?(h=ji(s),e[12]=s,e[13]=h):h=e[13];let p;e[14]!==h?(p=i.jsx("div",{className:"truncate text-xs text-muted-foreground mt-0.5",children:h}),e[14]=h,e[15]=p):p=e[15];let b;e[16]!==p||e[17]!==g?(b=i.jsxs("div",{className:"min-w-0 flex-1",children:[g,p]}),e[16]=p,e[17]=g,e[18]=b):b=e[18];let v;e[19]!==r?(v=!r&&i.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground opacity-0 -translate-x-1 transition-all duration-200 group-hover/tile:opacity-100 group-hover/tile:translate-x-0","aria-hidden":!0}),e[19]=r,e[20]=v):v=e[20];let w;e[21]!==l||e[22]!==c||e[23]!==b||e[24]!==v||e[25]!==o||e[26]!==f||e[27]!==x?(w=i.jsxs("button",{type:"button",onClick:c,disabled:o,"aria-busy":l,className:f,children:[x,b,v]}),e[21]=l,e[22]=c,e[23]=b,e[24]=v,e[25]=o,e[26]=f,e[27]=x,e[28]=w):w=e[28];let y;return e[29]!==a||e[30]!==w?(y=i.jsxs(i.Fragment,{children:[w,a]}),e[29]=a,e[30]=w,e[31]=y):y=e[31],y}function Si(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"mt-4 grid w-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:3},_i)}),t[0]=e):e=t[0],e}function _i(t,e){return i.jsxs("div",{className:"flex w-full items-center gap-3 rounded-2xl bg-card card-shadow px-3 py-2.5",children:[i.jsx(H,{className:"size-10 rounded-xl"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},`chip-skeleton-${e}`)}function Ci(t){const e=T.c(49),{tile:s,prompts:r,isEditMode:n,tileWidth:a}=t,{org:l}=J(),{open:c,startBlank:o,dialog:d,starting:m}=ye(s.agentId);let u,f,x,g,h;if(e[0]!==n||e[1]!==c||e[2]!==l.id||e[3]!==l.slug||e[4]!==r||e[5]!==o||e[6]!==m||e[7]!==s||e[8]!==a){const v=r.filter(ki);g="flex h-full w-full flex-col gap-3 p-3";let w;e[14]!==o?(w=()=>{o()},e[14]=o,e[15]=w):w=e[15];const y=m||n,j=n&&"pl-10 pr-10";let N;e[16]!==j?(N=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",j),e[16]=j,e[17]=N):N=e[17];let S;e[18]!==s.agentIcon||e[19]!==s.agentName?(S=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[18]=s.agentIcon,e[19]=s.agentName,e[20]=S):S=e[20];let k;e[21]!==s.agentName?(k=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[21]=s.agentName,e[22]=k):k=e[22];const C=n?"Drag to rearrange":"Open chat";let $;e[23]!==C?($=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:C}),e[23]=C,e[24]=$):$=e[24];let E;e[25]!==k||e[26]!==$?(E=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[k,$]}),e[25]=k,e[26]=$,e[27]=E):E=e[27],e[28]!==m||e[29]!==S||e[30]!==E||e[31]!==w||e[32]!==y||e[33]!==N?(h=i.jsxs("button",{type:"button",onClick:w,disabled:y,"aria-busy":m,className:N,children:[S,E]}),e[28]=m,e[29]=S,e[30]=E,e[31]=w,e[32]=y,e[33]=N,e[34]=h):h=e[34],u="flex min-h-0 flex-1 gap-3 overflow-hidden";let _;e[35]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx($i,{}),e[35]=_):_=e[35],e[36]!==l.id||e[37]!==l.slug||e[38]!==s?(f=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden rounded-lg border border-border",children:i.jsx(A.Suspense,{fallback:_,children:i.jsx(Ei,{tile:s,orgId:l.id,orgSlug:l.slug})})}),e[36]=l.id,e[37]=l.slug,e[38]=s,e[39]=f):f=e[39],x=v.length>0&&!n&&a>=2&&i.jsx("div",{className:"flex w-44 shrink-0 flex-col gap-2 overflow-hidden",children:v.map(I=>i.jsx("button",{type:"button",onClick:()=>c(I),disabled:m,className:"shrink-0 rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:I.title})},I.promptName))}),e[0]=n,e[1]=c,e[2]=l.id,e[3]=l.slug,e[4]=r,e[5]=o,e[6]=m,e[7]=s,e[8]=a,e[9]=u,e[10]=f,e[11]=x,e[12]=g,e[13]=h}else u=e[9],f=e[10],x=e[11],g=e[12],h=e[13];let p;e[40]!==u||e[41]!==f||e[42]!==x?(p=i.jsxs("div",{className:u,children:[f,x]}),e[40]=u,e[41]=f,e[42]=x,e[43]=p):p=e[43];let b;return e[44]!==d||e[45]!==g||e[46]!==h||e[47]!==p?(b=i.jsxs("div",{className:g,children:[h,p,d]}),e[44]=d,e[45]=g,e[46]=h,e[47]=p,e[48]=b):b=e[48],b}function ki(t){return!!t.promptName}function Ei(t){const e=T.c(12),{tile:s,orgId:r,orgSlug:n}=t;let a;e[0]!==r||e[1]!==n||e[2]!==s.connectionId?(a={connectionId:s.connectionId,orgId:r,orgSlug:n},e[0]=r,e[1]=n,e[2]=s.connectionId,e[3]=a):a=e[3];const l=oe(a),c=s.minHeight??200,o=s.maxHeight??4e3;let d;return e[4]!==l||e[5]!==r||e[6]!==n||e[7]!==c||e[8]!==o||e[9]!==s.connectionId||e[10]!==s.resourceUri?(d=i.jsx(Zt,{resourceURI:s.resourceUri,orgId:r,orgSlug:n,connectionId:s.connectionId,client:l,displayMode:"fullscreen",minHeight:c,maxHeight:o,className:"h-full"}),e[4]=l,e[5]=r,e[6]=n,e[7]=c,e[8]=o,e[9]=s.connectionId,e[10]=s.resourceUri,e[11]=d):d=e[11],d}function $i(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex h-full w-full flex-col gap-2 p-4",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"mt-1 h-full w-full rounded-md"})]}),t[0]=e):e=t[0],e}function Ii(t){const e=T.c(14),{icon:s,name:r}=t;let n;e[0]!==s||e[1]!==r?(n=i.jsx(Y,{icon:s,name:r,size:"sm+"}),e[0]=s,e[1]=r,e[2]=n):n=e[2];let a;e[3]!==r?(a=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:r}),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Loading tile…"}),e[5]=l):l=e[5];let c;e[6]!==a?(c=i.jsxs("div",{className:"min-w-0 flex-1",children:[a,l]}),e[6]=a,e[7]=c):c=e[7];let o;e[8]!==n||e[9]!==c?(o=i.jsxs("div",{className:"flex items-center gap-2.5",children:[n,c]}),e[8]=n,e[9]=c,e[10]=o):o=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsxs("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[i.jsx(H,{className:"h-3 w-3/4"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-3 w-2/3"})]}),e[11]=d):d=e[11];let m;return e[12]!==o?(m=i.jsxs("div",{className:"flex h-full w-full flex-col gap-3 p-5 opacity-60",children:[o,d]}),e[12]=o,e[13]=m):m=e[13],m}function Ti(t){const e=T.c(33),{tile:s,prompts:r,isEditMode:n}=t,{open:a,startBlank:l,dialog:c,starting:o}=ye(s.agentId);let d,m,u;if(e[0]!==n||e[1]!==a||e[2]!==r||e[3]!==l||e[4]!==o||e[5]!==s.agentIcon||e[6]!==s.agentName){const x=r.filter(Ai);d="flex h-full w-full flex-col gap-3 p-4";let g;e[10]!==l?(g=()=>{l()},e[10]=l,e[11]=g):g=e[11];const h=o||n,p=n&&"pl-10 pr-10";let b;e[12]!==p?(b=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",p),e[12]=p,e[13]=b):b=e[13];let v;e[14]!==s.agentIcon||e[15]!==s.agentName?(v=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[14]=s.agentIcon,e[15]=s.agentName,e[16]=v):v=e[16];let w;e[17]!==s.agentName?(w=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[17]=s.agentName,e[18]=w):w=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"UI unavailable — open chat"}),e[19]=y):y=e[19];let j;e[20]!==w?(j=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w,y]}),e[20]=w,e[21]=j):j=e[21],e[22]!==j||e[23]!==g||e[24]!==h||e[25]!==b||e[26]!==v?(m=i.jsxs("button",{type:"button",onClick:g,disabled:h,className:b,children:[v,j]}),e[22]=j,e[23]=g,e[24]=h,e[25]=b,e[26]=v,e[27]=m):m=e[27],u=x.length>0&&!n&&i.jsx("div",{className:"grid grid-cols-1 gap-2 overflow-hidden sm:grid-cols-2",children:x.map(N=>i.jsx("button",{type:"button",onClick:()=>!n&&a(N),disabled:o,className:"rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:N.title})},N.promptName))}),e[0]=n,e[1]=a,e[2]=r,e[3]=l,e[4]=o,e[5]=s.agentIcon,e[6]=s.agentName,e[7]=d,e[8]=m,e[9]=u}else d=e[7],m=e[8],u=e[9];let f;return e[28]!==c||e[29]!==d||e[30]!==m||e[31]!==u?(f=i.jsxs("div",{className:d,children:[m,u,c]}),e[28]=c,e[29]=d,e[30]=m,e[31]=u,e[32]=f):f=e[32],f}function Ai(t){return!!t.promptName}function Je(t){const e=T.c(36),{isEditMode:s}=t,{org:r}=J(),{isLoading:n,prompts:a,tiles:l}=be(r.slug),c=ze()?.ids??[];let o;e[0]!==c?(o=new Set(c),e[0]=c,e[1]=o):o=e[1];const d=o,m=Pe();let u;e[2]!==l?(u=new Set(l.map(Pi)),e[2]=l,e[3]=u):u=e[3];const f=u;let x;if(e[4]!==a){x=new Map;for(const _ of a){const I=x.get(_.agentId);I?I.push(_):x.set(_.agentId,[_])}e[4]=a,e[5]=x}else x=e[5];let g;if(e[6]!==a||e[7]!==f||e[8]!==l){let _;e[10]!==f?(_=O=>!f.has(O.agentId),e[10]=f,e[11]=_):_=e[11];const I=a.filter(_);g=[...l.map(zi),...I.map(Ri)],e[6]=a,e[7]=f,e[8]=l,e[9]=g}else g=e[9];const h=g;let p;e[12]!==h?(p=new Map(h.map(Oi)),e[12]=h,e[13]=p):p=e[13];const b=p;let v;e[14]!==h||e[15]!==d?(v=h.map(_=>({id:_.id,defaultSize:_.kind==="tile"?xi:bi,minSize:_.kind==="tile"?gi:void 0,pinned:d.has(_.data.agentId)})),e[14]=h,e[15]=d,e[16]=v):v=e[16];const w=hi(v);let y;e[17]!==m?(y=_=>{m.apply(I=>I.filter(O=>O!==_)).catch(Mi)},e[17]=m,e[18]=y):y=e[18];const j=y;let N;e[19]!==b||e[20]!==w||e[21]!==d||e[22]!==j?(N=_=>{const I=b.get(_);I&&d.has(I.data.agentId)?j(I.data.agentId):w.hideTile(_)},e[19]=b,e[20]=w,e[21]=d,e[22]=j,e[23]=N):N=e[23];const S=N;let k;e[24]!==b||e[25]!==s||e[26]!==x?(k=_=>{const I=b.get(_.id);if(!I)return null;if(I.kind==="tile"){const O=x.get(I.data.agentId)??[];return i.jsx(ut,{fallback:i.jsx(Ti,{tile:I.data,prompts:O,isEditMode:s}),children:i.jsx(A.Suspense,{fallback:i.jsx(Ii,{icon:I.data.agentIcon,name:I.data.agentName}),children:i.jsx(Ci,{tile:I.data,prompts:O,isEditMode:s,tileWidth:_.w})})})}return i.jsx(Ni,{entry:I.data,isEditMode:s})},e[24]=b,e[25]=s,e[26]=x,e[27]=k):k=e[27];const C=k;if(n||w.isLoading){let _;return e[28]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Si,{}),e[28]=_):_=e[28],_}if(w.snapshot.visible.length===0&&!s)return null;let E;return e[29]!==s||e[30]!==w.moveTile||e[31]!==w.resizeTile||e[32]!==w.snapshot.visible||e[33]!==S||e[34]!==C?(E=i.jsx("div",{className:"mt-4 flex w-full max-w-7xl flex-col gap-4",children:i.jsx(ri,{tiles:w.snapshot.visible,isEditMode:s,renderTile:C,onMove:w.moveTile,onResize:w.resizeTile,onRemove:S})}),e[29]=s,e[30]=w.moveTile,e[31]=w.resizeTile,e[32]=w.snapshot.visible,e[33]=S,e[34]=C,e[35]=E):E=e[35],E}function Mi(){return W.error("Couldn't remove from home — please try again.")}function Oi(t){return[t.id,t]}function Ri(t){return{kind:"prompt",id:yi(t),data:t}}function zi(t){return{kind:"tile",id:vi(t),data:t}}function Pi(t){return t.agentId}function Di(t){const e=T.c(2),{prompts:s,tiles:r}=be(t),n=r.length>0||s.length>0;let a;return e[0]!==n?(a={hasVisibleTiles:n},e[0]=n,e[1]=a):a=e[1],a}const Ce=420,ke=305;function Xe(){const t=T.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/bg-top-left.svg",alt:"",className:"absolute top-0 left-0 h-auto select-none opacity-80 dark:hidden",style:{width:Ce}}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("img",{src:"/home/bg-top-left-dark.svg",alt:"",className:"absolute top-0 left-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Ce}}),t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("img",{src:"/home/bg-bottom-right.svg",alt:"",className:"absolute bottom-0 right-0 h-auto select-none opacity-80 dark:hidden",style:{width:ke}}),t[2]=r):r=t[2];let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e,s,r,i.jsx("img",{src:"/home/bg-bottom-right-dark.svg",alt:"",className:"absolute bottom-0 right-0 hidden h-auto select-none opacity-80 dark:block",style:{width:ke}})]}),t[3]=n):n=t[3],n}function Ee(){const t=T.c(33),{data:e}=ft.useSession(),{org:s}=J(),r=xe(),n=$t(),{selectedVirtualMcp:a}=It();let l;t[0]!==s.id?(l=pt(s.id),t[0]=s.id,t[1]=l):l=t[1];const o=a??l;let d;t[2]!==s.slug?(d=Ft(s.slug),t[2]=s.slug,t[3]=d):d=t[3],re(d);let m;t[4]!==s.id||t[5]!==s.slug?(m={connectionId:xt,orgId:s.id,orgSlug:s.slug},t[4]=s.id,t[5]=s.slug,t[6]=m):m=t[6];const u=oe(m);let f;t[7]!==s.id||t[8]!==u?(f=ps(u,s.id),t[7]=s.id,t[8]=u,t[9]=f):f=t[9];let x;t[10]!==s.id||t[11]!==u?(x=Ut(u,s.id),t[10]=s.id,t[11]=u,t[12]=x):x=t[12];let g;t[13]!==o.id||t[14]!==s.id||t[15]!==u?(g=yt(s.id,o.id,u),t[13]=o.id,t[14]=s.id,t[15]=u,t[16]=g):g=t[16];let h;t[17]!==f||t[18]!==x||t[19]!==g?(h={queries:[f,x,g]},t[17]=f,t[18]=x,t[19]=g,t[20]=h):h=t[20],js(h);const p=xs(),b=vt(o.id),{hasDecoKey:v,isZeroBalance:w,isInitialFreeCredit:y,balanceDollars:j,hasOnlyDecoProvider:N}=Ct(),{hasVisibleTiles:S}=Di(s.slug),k=kt(b?.metadata);if(p.length===0&&!(k&&Et(n))){let P;return t[21]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"min-h-full flex items-center justify-center px-4 py-10",children:i.jsx(Tt,{})})}),t[21]=P):P=t[21],P}let $;t[22]!==e?.user?.name?($=e?.user?.name?.split(" ")[0]||"there",t[22]=e?.user?.name,t[23]=$):$=t[23];const E=$,_=v&&y&&j!=null,I=v&&w&&N;let O;t[24]!==j||t[25]!==_||t[26]!==I?(O=_?i.jsx(se.CreditsEyebrow,{balanceDollars:j}):I?i.jsx(se.NoCreditsEyebrow,{}):null,t[24]=j,t[25]=_,t[26]=I,t[27]=O):O=t[27];const B=O;let z;return t[28]!==B||t[29]!==S||t[30]!==r||t[31]!==E?(z=i.jsx(ti,{children:r?i.jsx(Hi,{eyebrow:B,userName:E}):i.jsx(Li,{eyebrow:B,userName:E,hasVisibleTiles:S})}),t[28]=B,t[29]=S,t[30]=r,t[31]=E,t[32]=z):z=t[32],z}function Hi(t){const e=T.c(12),{eyebrow:s,userName:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Xe,{}),e[0]=n):n=e[0];let a;e[1]!==s?(a=s&&i.jsx("div",{className:"mb-4",children:s}),e[1]=s,e[2]=a):a=e[2];let l;e[3]!==r?(l=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",r,"?"]}),e[3]=r,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=i.jsxs("div",{className:"relative flex flex-col items-center justify-center w-full pt-28 pb-8 px-4",children:[a,l]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let o;e[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"relative w-full flex flex-col gap-4 pb-8 px-4",children:i.jsx(se.Input,{showConnectionsBanner:!0})}),e[8]=o):o=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("div",{className:"relative w-full px-4 pb-8",children:i.jsx(Je,{isEditMode:!1})}),e[9]=d):d=e[9];let m;return e[10]!==c?(m=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center overflow-y-auto",children:[n,c,o,d]}),e[10]=c,e[11]=m):m=e[11],m}function Li(t){const e=T.c(32),{eyebrow:s,userName:r,hasVisibleTiles:n}=t,{isEditMode:a,enter:l,save:c,cancel:o,hasChanges:d}=Ve(),[m,u]=A.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[0]=f):f=e[0];let x;e[1]!==o||e[2]!==l||e[3]!==d||e[4]!==a||e[5]!==c?(x=i.jsx(gs.Right,{children:i.jsx(Ui,{isEditMode:a,hasChanges:d,onEnter:l,onSave:c,onCancel:o,onAddTile:f})}),e[1]=o,e[2]=l,e[3]=d,e[4]=a,e[5]=c,e[6]=x):x=e[6];let g;e[7]!==m?(g=i.jsx(ws,{open:m,onOpenChange:u}),e[7]=m,e[8]=g):g=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(Xe,{}),e[9]=h):h=e[9];const p=n||a?"pt-32":"flex-1 justify-center";let b;e[10]!==p?(b=q("relative flex flex-col items-center px-10 pb-4",p),e[10]=p,e[11]=b):b=e[11];let v;e[12]!==s?(v=s&&i.jsx("div",{className:"mb-4",children:s}),e[12]=s,e[13]=v):v=e[13];let w;e[14]!==r?(w=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",r,"?"]}),e[14]=r,e[15]=w):w=e[15];let y;e[16]!==v||e[17]!==w?(y=i.jsxs("div",{className:"text-center mb-10",children:[v,w]}),e[16]=v,e[17]=w,e[18]=y):y=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"relative w-full",children:[i.jsx(Bi,{}),i.jsx(se.Input,{showConnectionsBanner:!0})]}),e[19]=j):j=e[19];let N;e[20]!==y?(N=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[y,j]}),e[20]=y,e[21]=N):N=e[21];let S;e[22]!==a?(S=i.jsx("div",{className:"relative w-full mt-10 mx-auto max-w-[1280px] px-2 pb-16",children:i.jsx(Je,{isEditMode:a})}),e[22]=a,e[23]=S):S=e[23];let k;e[24]!==N||e[25]!==S||e[26]!==b?(k=i.jsxs("div",{className:"flex-1 relative flex flex-col min-h-0",children:[h,i.jsx("div",{className:"flex-1 relative flex flex-col overflow-y-auto",children:i.jsxs("div",{className:b,children:[N,S]})})]}),e[24]=N,e[25]=S,e[26]=b,e[27]=k):k=e[27];let C;return e[28]!==k||e[29]!==x||e[30]!==g?(C=i.jsxs(i.Fragment,{children:[x,g,k]}),e[28]=k,e[29]=x,e[30]=g,e[31]=C):C=e[31],C}function Ui(t){const e=T.c(17),{isEditMode:s,hasChanges:r,onEnter:n,onSave:a,onCancel:l,onAddTile:c}=t;if(s){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ge,{size:14}),e[0]=m):m=e[0];let u;e[1]!==c?(u=i.jsxs("button",{type:"button",onClick:c,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Add a tile from any agent",children:[m,"Add tile"]}),e[1]=c,e[2]=u):u=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Te,{size:14}),e[3]=f):f=e[3];let x;e[4]!==l?(x=i.jsxs(je,{size:"sm",variant:"ghost",onClick:l,className:"gap-1.5 h-7 text-xs",children:[f,"Cancel"]}),e[4]=l,e[5]=x):x=e[5];const g=!r;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(jt,{size:14}),e[6]=h):h=e[6];let p;e[7]!==a||e[8]!==g?(p=i.jsxs(je,{size:"sm",onClick:a,disabled:g,className:"gap-1.5 h-7 text-xs",children:[h,"Save"]}),e[7]=a,e[8]=g,e[9]=p):p=e[9];let b;return e[10]!==u||e[11]!==x||e[12]!==p?(b=i.jsxs(i.Fragment,{children:[u,x,p]}),e[10]=u,e[11]=x,e[12]=p,e[13]=b):b=e[13],b}let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(_t,{size:14}),e[14]=o):o=e[14];let d;return e[15]!==n?(d=i.jsxs("button",{type:"button",onClick:n,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Customize your home",children:[o,"Customize"]}),e[15]=n,e[16]=d):d=e[16],d}function Bi(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/capybara.png",alt:"","aria-hidden":!0,className:"pointer-events-none absolute -top-16 right-6 z-20 h-20 w-auto select-none"}),t[0]=e):e=t[0],e}function Vr(){const t=T.c(2);if(xe()){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx(Ee,{})}),t[0]=r):r=t[0],r}let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 pb-1 pr-1 pl-0 pt-0",children:i.jsx("div",{className:"h-full p-0.5 pt-0.25",children:i.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(Ee,{})})})}),t[1]=s):s=t[1],s}export{Vr as default};
@@ -1 +1 @@
1
- import{r as n,bi as q,cy as R,cz as Ee,cA as ke,cB as Se,bE as xe,cC as j}from"./index-DLy_MgNO.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,bi as q,cy as R,cz as Ee,cA as ke,cB as Se,bE as xe,cC as j}from"./index-BpHKT80f.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
@@ -1 +1 @@
1
- import{r as h}from"./index-DLy_MgNO.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-BpHKT80f.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});