decocms 2.184.0 → 2.184.2

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 (248) hide show
  1. package/dist/client/assets/{AlertCircle-DfkFFYqP.js → AlertCircle-DMV-rZ7e.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DileW_A_.js → ArrowLeft-GATQHvMN.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-B5tgTd4G.js → ArrowUp-BfMoxxyJ.js} +1 -1
  4. package/dist/client/assets/{Check-Dz8BREkM.js → Check-Bma5KFCn.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-Bc-hvBsT.js → ChevronDown-aN42FLyq.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-CEdEYMkr.js → ChevronRight-C2FVB4C3.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-C5Nt2Gpw.js → ChevronUp-BbircQRT.js} +1 -1
  8. package/dist/client/assets/{Container-BJQA0W3I.js → Container-HyFkyfBi.js} +1 -1
  9. package/dist/client/assets/{Dataflow03-DGKpbmxk.js → Dataflow03-B0pnz-uB.js} +1 -1
  10. package/dist/client/assets/{Download01-D2a2kEd2.js → Download01-vFqP5N3M.js} +1 -1
  11. package/dist/client/assets/{FolderClosed-BRqcluft.js → FolderClosed-C9Qktm7G.js} +1 -1
  12. package/dist/client/assets/{Grid01-Dup19Gky.js → Grid01-DAUX1pwR.js} +1 -1
  13. package/dist/client/assets/{List-CIVgrsQE.js → List-DyQi4WIa.js} +1 -1
  14. package/dist/client/assets/{Loading01-CUf91EYy.js → Loading01-DzzF1Xn7.js} +1 -1
  15. package/dist/client/assets/{Play-B4xMPlIu.js → Play-LM-itN1a.js} +1 -1
  16. package/dist/client/assets/{Plus-Djoj9rVk.js → Plus-B1MCV6m5.js} +1 -1
  17. package/dist/client/assets/{RefreshCcw01-5hC9d6CT.js → RefreshCcw01-CxbGujDv.js} +1 -1
  18. package/dist/client/assets/{SearchMd-CDQ6AGxD.js → SearchMd-CQS6PDrb.js} +1 -1
  19. package/dist/client/assets/{Settings01-DCXT2JFw.js → Settings01-_rJgA268.js} +1 -1
  20. package/dist/client/assets/{Trash01-B4Huc5Zf.js → Trash01-5_SyecjT.js} +1 -1
  21. package/dist/client/assets/{Type01-CTx0gUPJ.js → Type01-CEUNNrON.js} +1 -1
  22. package/dist/client/assets/{Upload01-Dyt5Jyuh.js → Upload01-CqeU4e-W.js} +1 -1
  23. package/dist/client/assets/{User01-ddyN4FyR.js → User01-BsPm7RVz.js} +1 -1
  24. package/dist/client/assets/{VideoRecorder-DYWKiTPw.js → VideoRecorder-B3WVSf7U.js} +1 -1
  25. package/dist/client/assets/{X-iShYas12.js → X-C5GtvldQ.js} +1 -1
  26. package/dist/client/assets/{XCircle-MXxaApa0.js → XCircle-BWumx2Gc.js} +1 -1
  27. package/dist/client/assets/{XClose-DSR4PIAc.js → XClose-m99dDV1c.js} +1 -1
  28. package/dist/client/assets/{Zap-CJ1e2k9C.js → Zap-khXF6TnI.js} +1 -1
  29. package/dist/client/assets/{agent-connections-preview-BUgUIlQA.js → agent-connections-preview-DsOyODhY.js} +1 -1
  30. package/dist/client/assets/{agent-detail-C71qFVI6.js → agent-detail-aljC1GdY.js} +1 -1
  31. package/dist/client/assets/{agents-BJZ4FxX5.js → agents-BTLIOBH4.js} +1 -1
  32. package/dist/client/assets/{ai-providers-logos-dMnvTwLA.js → ai-providers-logos-bTbrc5Ff.js} +1 -1
  33. package/dist/client/assets/{alert-dialog-C5M3jUGr.js → alert-dialog-DZzr7w4N.js} +1 -1
  34. package/dist/client/assets/{auth-catchall-Ckn9O2wV.js → auth-catchall-4prTcwJz.js} +1 -1
  35. package/dist/client/assets/{automation-detail-WBCXHf4U.js → automation-detail-DwSOZqSU.js} +1 -1
  36. package/dist/client/assets/{automations-CytUchQy.js → automations-C2VgJRMK.js} +1 -1
  37. package/dist/client/assets/{avatar-DusWq9Iv.js → avatar-9rgMXUO3.js} +1 -1
  38. package/dist/client/assets/{badge-ChpXYBi7.js → badge-CmRHjnH-.js} +1 -1
  39. package/dist/client/assets/{binder-qwsdgkR1.js → binder-HzAEyJNS.js} +1 -1
  40. package/dist/client/assets/{breadcrumb-5YAcRzVA.js → breadcrumb-Uk80Af5O.js} +1 -1
  41. package/dist/client/assets/{card-BgI4BXSU.js → card-Lf6x72jH.js} +1 -1
  42. package/dist/client/assets/{checkbox-DCsLtkG5.js → checkbox-hgQTbYiQ.js} +1 -1
  43. package/dist/client/assets/{collapsible-Bz9oU5jE.js → collapsible-BZesHCHB.js} +1 -1
  44. package/dist/client/assets/{collection-detail-mnpxYNbK.js → collection-detail-ZynBGDPv.js} +5 -5
  45. package/dist/client/assets/{collection-display-button-C16p0CHk.js → collection-display-button-iL5pze0r.js} +1 -1
  46. package/dist/client/assets/{collection-search-CStVSgIt.js → collection-search-cNt60-AL.js} +1 -1
  47. package/dist/client/assets/{collection-table-wrapper-Bkkildwe.js → collection-table-wrapper-BBd2b6uM.js} +1 -1
  48. package/dist/client/assets/{collection-tabs-nwZEGGdV.js → collection-tabs-Weu__lg8.js} +1 -1
  49. package/dist/client/assets/{command-CFWw2Pp0.js → command-CN_wtXeP.js} +1 -1
  50. package/dist/client/assets/{connection-card-Dm5Sf-Nq.js → connection-card-BLKs5mD3.js} +1 -1
  51. package/dist/client/assets/{connection-detail-C52QXcdb.js → connection-detail-DzcB7EJV.js} +1 -1
  52. package/dist/client/assets/{connections-BUIt9Va0.js → connections-BxIRzYdx.js} +1 -1
  53. package/dist/client/assets/{constants-CcsM4iWp.js → constants-BoofM__A.js} +1 -1
  54. package/dist/client/assets/constants-CvvTl35D.js +1 -0
  55. package/dist/client/assets/{context-Bbpd0eXo.js → context-DWuz1QPT.js} +1 -1
  56. package/dist/client/assets/{create-organization-dialog-C2CV8COn.js → create-organization-dialog-BnEBc5at.js} +1 -1
  57. package/dist/client/assets/{create-project-dialog-C6Adqctr.js → create-project-dialog-_5aAp1I-.js} +1 -1
  58. package/dist/client/assets/{danger-BXDv1g46.js → danger-H4wRP4Ra.js} +1 -1
  59. package/dist/client/assets/{danger-zone-BBtijGkO.js → danger-zone-BYJ00Zjx.js} +1 -1
  60. package/dist/client/assets/{dependencies-sTdvcbti.js → dependencies-M0MQuJGS.js} +1 -1
  61. package/dist/client/assets/{dialog-Bzf-VK1K.js → dialog-1XQgKf8N.js} +1 -1
  62. package/dist/client/assets/{drawer-D6PrIYCh.js → drawer-kTkYDBR8.js} +1 -1
  63. package/dist/client/assets/{dropdown-menu-BA4Oj_Sc.js → dropdown-menu-DHi2wczE.js} +1 -1
  64. package/dist/client/assets/{dynamic-plugin-layout-DmvzQk53.js → dynamic-plugin-layout-CXEGP1Cj.js} +1 -1
  65. package/dist/client/assets/{editable-task-title-BdDZj_OQ.js → editable-task-title-D_ziJBro.js} +1 -1
  66. package/dist/client/assets/{empty-state-BnVX9dmg.js → empty-state-BAZkyFkJ.js} +1 -1
  67. package/dist/client/assets/{empty-state-C7JjGncC.js → empty-state-Cd_1RV6A.js} +1 -1
  68. package/dist/client/assets/{env-vars-editor-ByZUgHK-.js → env-vars-editor-DLxrW5bI.js} +1 -1
  69. package/dist/client/assets/{extract-connection-data-DRh33m0W.js → extract-connection-data-DtlPi0e-.js} +1 -1
  70. package/dist/client/assets/{file-browser-BYF5otfe.js → file-browser-CK9OSNR-.js} +2 -2
  71. package/dist/client/assets/{form-BUAj2Hj8.js → form-t62EdxrT.js} +1 -1
  72. package/dist/client/assets/{general-g0kq_-2c.js → general-DnqHksbF.js} +1 -1
  73. package/dist/client/assets/{grid-view-BmL--mhA.js → grid-view-Bw9t-J_z.js} +1 -1
  74. package/dist/client/assets/{home-Bjjl27bZ.js → home-Di6UBYTk.js} +1 -1
  75. package/dist/client/assets/{index-B4Jr1mSz.js → index-B7lieztO.js} +1 -1
  76. package/dist/client/assets/{index-LgjOqTLE.js → index-BC02vDrU.js} +1 -1
  77. package/dist/client/assets/{index-DUX42n8S.js → index-BSJhN1RG.js} +3 -3
  78. package/dist/client/assets/{index-BK_Tzu_-.js → index-B_edy8DH.js} +1 -1
  79. package/dist/client/assets/{index-6n_OVsr9.js → index-C9MCcKQV.js} +1 -1
  80. package/dist/client/assets/{index-BXeIB2Tb.js → index-CCPa_bdf.js} +1 -1
  81. package/dist/client/assets/{index-61iUtQHj.js → index-CzVXH2ez.js} +1 -1
  82. package/dist/client/assets/{index-Cl3BpGhn.js → index-DMTUegke.js} +1 -1
  83. package/dist/client/assets/{index-um5Sfc-H.js → index-DaqvX_2k.js} +1 -1
  84. package/dist/client/assets/{index-DqDg9fof.js → index-DwelOe0Q.js} +1 -1
  85. package/dist/client/assets/{index-ByXewYOk.js → index-G9dSbuV_.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-ClCkbIYa.js → infiniteQueryObserver-hAAtfcB8.js} +1 -1
  87. package/dist/client/assets/{input-XHq6wqHR.js → input-CCTJ9v7L.js} +1 -1
  88. package/dist/client/assets/{integration-icon-CK1PotZC.js → integration-icon-BN98cm9W.js} +1 -1
  89. package/dist/client/assets/{label-BJGhONv8.js → label-DeuWE9eY.js} +1 -1
  90. package/dist/client/assets/{layout-B82tDeI6.js → layout-BHyPHA6y.js} +1 -1
  91. package/dist/client/assets/{layout-DfqMrbgu.js → layout-ChW-YfXS.js} +1 -1
  92. package/dist/client/assets/{login-Bw0Xithq.js → login-B_Wj9fur.js} +1 -1
  93. package/dist/client/assets/{logo-upload-DcI1fDOo.js → logo-upload-T92lTK1Q.js} +1 -1
  94. package/dist/client/assets/{mcp-app-renderer-lZz-ne_1.js → mcp-app-renderer-DHbjaKS6.js} +1 -1
  95. package/dist/client/assets/{mcp-server-card-Dasz02z8.js → mcp-server-card-CS95MXfM.js} +1 -1
  96. package/dist/client/assets/{mcp-server-detail-DPBJnU98.js → mcp-server-detail-BYJPfLy5.js} +2 -2
  97. package/dist/client/assets/{members-DkWgkxlk.js → members-Crlx6q1Z.js} +1 -1
  98. package/dist/client/assets/{monaco-editor-BRwzt71-.js → monaco-editor-DckKJQsF.js} +1 -1
  99. package/dist/client/assets/{monitoring-CdZgmkGA.js → monitoring-DWb_hR_s.js} +1 -1
  100. package/dist/client/assets/{monitoring-dashboard-edit-aTNulbwk.js → monitoring-dashboard-edit-DW6NKJ6T.js} +1 -1
  101. package/dist/client/assets/{monitoring-dashboard-view-DNY4gqn2.js → monitoring-dashboard-view-BoI9HI8A.js} +1 -1
  102. package/dist/client/assets/{monitoring-stats-row-BSdG5D1C.js → monitoring-stats-row-D5S0CSdH.js} +1 -1
  103. package/dist/client/assets/{oauth-callback-C01fqOeg.js → oauth-callback-YMkCxgWC.js} +1 -1
  104. package/dist/client/assets/{oauth-callback-ai-provider-rVoNToUr.js → oauth-callback-ai-provider-BDxeYCqf.js} +1 -1
  105. package/dist/client/assets/{org-ai-providers-Bd76PLGE.js → org-ai-providers-DxV1GVfK.js} +1 -1
  106. package/dist/client/assets/{page-C70liUar.js → page-B4oqzriM.js} +1 -1
  107. package/dist/client/assets/{page-AVcZB2xU.js → page-DlWjJ967.js} +1 -1
  108. package/dist/client/assets/{plugin-empty-state-BY3_fgfo.js → plugin-empty-state-BtR0LFRo.js} +1 -1
  109. package/dist/client/assets/{plugin-empty-state-CLxuWvKN.js → plugin-empty-state-yAs3zaRu.js} +1 -1
  110. package/dist/client/assets/{plugin-header-ZC2CBUSo.js → plugin-header-CwABFKzm.js} +1 -1
  111. package/dist/client/assets/{plugin-header-DASYKll8.js → plugin-header-D8F39aT1.js} +1 -1
  112. package/dist/client/assets/plugins-DjvTH-IA.js +1 -0
  113. package/dist/client/assets/{popover-DTEk3vKM.js → popover-D4IjUZyn.js} +1 -1
  114. package/dist/client/assets/{project-app-view-Ce8857ET.js → project-app-view-shiH6DKH.js} +1 -1
  115. package/dist/client/assets/{project-layout-nXQP4ref.js → project-layout-l_J_YIG0.js} +1 -1
  116. package/dist/client/assets/{project-plugins-B-pYQw6T.js → project-plugins-2btoU0bF.js} +1 -1
  117. package/dist/client/assets/{projects-list-DT16GjQg.js → projects-list-BubEDVBP.js} +1 -1
  118. package/dist/client/assets/{registry-layout-DCC5B3mj.js → registry-layout-B390oDVH.js} +1 -1
  119. package/dist/client/assets/{registry-utils-BiDzvs9Q.js → registry-utils-C6T_5hu0.js} +1 -1
  120. package/dist/client/assets/{reset-password-C5XrjB6I.js → reset-password-Brs-UteC.js} +1 -1
  121. package/dist/client/assets/{resizable-CXOYYv6O.js → resizable-oQJPEcsU.js} +1 -1
  122. package/dist/client/assets/{save-actions-DdXkD4w0.js → save-actions-BUFEFORl.js} +1 -1
  123. package/dist/client/assets/{scroll-area-uf_F9gDE.js → scroll-area-Bpk9YwA7.js} +1 -1
  124. package/dist/client/assets/{select-CwAs6Kzm.js → select-DT-iervo.js} +1 -1
  125. package/dist/client/assets/{select-virtual-mcp-DuFoRUc2.js → select-virtual-mcp-CWjdI1yN.js} +1 -1
  126. package/dist/client/assets/{shell-layout-BmydY22m.js → shell-layout-DgW8ODZH.js} +2 -2
  127. package/dist/client/assets/{sidebar-settings-CaouGLvu.js → sidebar-settings-BKq2f7xU.js} +1 -1
  128. package/dist/client/assets/{skeleton-CCKDUrsc.js → skeleton-BKlnApyk.js} +1 -1
  129. package/dist/client/assets/{spinner-C5kCA3D4.js → spinner-CmdUvk0v.js} +1 -1
  130. package/dist/client/assets/{store-invite-RWL5fJ-G.js → store-invite-Ce-9FE-b.js} +1 -1
  131. package/dist/client/assets/{switch-DTK1XKz7.js → switch-goMnPZtb.js} +1 -1
  132. package/dist/client/assets/{table-B24btLbb.js → table-5ZO5b8Po.js} +1 -1
  133. package/dist/client/assets/{tabs-C1ebNG2b.js → tabs-C3-SBSfv.js} +1 -1
  134. package/dist/client/assets/{task-status-BKl6HVDT.js → task-status-WGhIXJJC.js} +1 -1
  135. package/dist/client/assets/tasks-D9gK_O1m.js +1 -0
  136. package/dist/client/assets/{tasks-panel-BY1SCj3X.js → tasks-panel-CKIjqvKh.js} +1 -1
  137. package/dist/client/assets/{textarea-Byxd6OOy.js → textarea-BbtSbUAG.js} +1 -1
  138. package/dist/client/assets/{time-range-picker-B0B9fAxU.js → time-range-picker-DP25Q2Zk.js} +1 -1
  139. package/dist/client/assets/{toggle-group-CgS7CSZY.js → toggle-group-CaVCHD4D.js} +1 -1
  140. package/dist/client/assets/{tools-list-BCa2CHT8.js → tools-list-D6iQTZ1v.js} +1 -1
  141. package/dist/client/assets/{tooltip-BHHjnUV1.js → tooltip-Czc-dfus.js} +1 -1
  142. package/dist/client/assets/{topbar-portal-CyrfOtgF.js → topbar-portal-C2eZmuuv.js} +1 -1
  143. package/dist/client/assets/{types-BAYV7nyc.js → types-BH6fpPqs.js} +1 -1
  144. package/dist/client/assets/{use-automations-Bu-ab1mP.js → use-automations-CnOmv87d.js} +1 -1
  145. package/dist/client/assets/{use-collections-K8Aul2pf.js → use-collections-Bv7ORhQ3.js} +1 -1
  146. package/dist/client/assets/{use-connection-Civ5yXiP.js → use-connection-C_ZeRH1v.js} +1 -1
  147. package/dist/client/assets/{use-copy-CK-Ajh-j.js → use-copy-DbDDzd7N.js} +1 -1
  148. package/dist/client/assets/{use-create-virtual-mcp-Cpjlu2kb.js → use-create-virtual-mcp-UuZPWAj2.js} +1 -1
  149. package/dist/client/assets/{use-infinite-scroll-Bxj3e4-1.js → use-infinite-scroll-kmJGtrCa.js} +1 -1
  150. package/dist/client/assets/{use-install-from-registry-CG-kaFkd.js → use-install-from-registry-BtGom7sq.js} +1 -1
  151. package/dist/client/assets/{use-list-state-B9f-Ca9P.js → use-list-state-BRDiV7d7.js} +1 -1
  152. package/dist/client/assets/{use-mcp-prompts-DwPdHg6G.js → use-mcp-prompts-dq5_OWT9.js} +1 -1
  153. package/dist/client/assets/{use-mcp-resources-DiSYb2_Q.js → use-mcp-resources-sGDI0dq5.js} +1 -1
  154. package/dist/client/assets/{use-mcp-tools-D9d7B2WH.js → use-mcp-tools-Uj7pAtM3.js} +1 -1
  155. package/dist/client/assets/{use-members-D2qiU5rW.js → use-members-C0FwQv_A.js} +1 -1
  156. package/dist/client/assets/{use-project-Tt_Z_fXv.js → use-project-eCnKEq9P.js} +1 -1
  157. package/dist/client/assets/{use-store-discovery-n-a_3WBn.js → use-store-discovery-Waic87H7.js} +1 -1
  158. package/dist/client/assets/{use-view-mode-f8YUpwHi.js → use-view-mode-BAmicVzY.js} +1 -1
  159. package/dist/client/assets/{use-virtual-mcp-kJ8a01sk.js → use-virtual-mcp-Ot6iDc6P.js} +1 -1
  160. package/dist/client/assets/useInfiniteQuery-D8nCVkhA.js +1 -0
  161. package/dist/client/assets/{useMutation-2VTSs-2P.js → useMutation-DD64AYhD.js} +1 -1
  162. package/dist/client/assets/useQuery-CyMlQzLm.js +1 -0
  163. package/dist/client/assets/useSuspenseInfiniteQuery-Df-iXD3q.js +1 -0
  164. package/dist/client/assets/{user-C7EsgQ4L.js → user-CJJOlR6d.js} +1 -1
  165. package/dist/client/assets/{workflow-BDtGLEmQ.js → workflow-C_MiLNeC.js} +1 -1
  166. package/dist/client/index.html +1 -1
  167. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  168. package/dist/server/node_modules/pg-int8/README.md +16 -0
  169. package/dist/server/node_modules/pg-int8/index.js +100 -0
  170. package/dist/server/node_modules/pg-int8/package.json +24 -0
  171. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  172. package/dist/server/node_modules/postgres-array/index.js +97 -0
  173. package/dist/server/node_modules/{pg-connection-string/LICENSE → postgres-array/license} +5 -5
  174. package/dist/server/node_modules/postgres-array/package.json +35 -0
  175. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  176. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  177. package/dist/server/node_modules/{pg/LICENSE → postgres-bytea/license} +6 -6
  178. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  179. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  180. package/dist/server/node_modules/postgres-date/index.js +116 -0
  181. package/dist/server/node_modules/{pg-pool/LICENSE → postgres-date/license} +6 -6
  182. package/dist/server/node_modules/postgres-date/package.json +33 -0
  183. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  184. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  185. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  186. package/dist/server/node_modules/postgres-interval/license +21 -0
  187. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  188. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  189. package/dist/server/node_modules/split2/LICENSE +13 -0
  190. package/dist/server/node_modules/split2/README.md +85 -0
  191. package/dist/server/node_modules/split2/bench.js +27 -0
  192. package/dist/server/node_modules/split2/index.js +141 -0
  193. package/dist/server/node_modules/split2/package.json +39 -0
  194. package/dist/server/node_modules/split2/test.js +409 -0
  195. package/package.json +1 -1
  196. package/dist/client/assets/constants-BoHeSnZm.js +0 -1
  197. package/dist/client/assets/plugins-DflzCr28.js +0 -1
  198. package/dist/client/assets/tasks-CsKi-Trq.js +0 -1
  199. package/dist/client/assets/useInfiniteQuery-DXdWIUaP.js +0 -1
  200. package/dist/client/assets/useQuery-CpuRtrH-.js +0 -1
  201. package/dist/client/assets/useSuspenseInfiniteQuery-DnaL6JxY.js +0 -1
  202. package/dist/server/node_modules/pg/README.md +0 -95
  203. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  204. package/dist/server/node_modules/pg/lib/client.js +0 -743
  205. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  206. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  207. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  208. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  209. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  210. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  211. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  212. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  213. package/dist/server/node_modules/pg/lib/index.js +0 -73
  214. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  215. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  216. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  217. package/dist/server/node_modules/pg/lib/query.js +0 -252
  218. package/dist/server/node_modules/pg/lib/result.js +0 -109
  219. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  220. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  221. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  222. package/dist/server/node_modules/pg/package.json +0 -76
  223. package/dist/server/node_modules/pg-connection-string/README.md +0 -105
  224. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +0 -8
  225. package/dist/server/node_modules/pg-connection-string/index.d.ts +0 -36
  226. package/dist/server/node_modules/pg-connection-string/index.js +0 -231
  227. package/dist/server/node_modules/pg-connection-string/package.json +0 -52
  228. package/dist/server/node_modules/pg-pool/README.md +0 -357
  229. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  230. package/dist/server/node_modules/pg-pool/index.js +0 -517
  231. package/dist/server/node_modules/pg-pool/package.json +0 -51
  232. package/dist/server/node_modules/pg-types/.travis.yml +0 -7
  233. package/dist/server/node_modules/pg-types/Makefile +0 -14
  234. package/dist/server/node_modules/pg-types/README.md +0 -75
  235. package/dist/server/node_modules/pg-types/index.d.ts +0 -137
  236. package/dist/server/node_modules/pg-types/index.js +0 -47
  237. package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
  238. package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
  239. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
  240. package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
  241. package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
  242. package/dist/server/node_modules/pg-types/package.json +0 -42
  243. package/dist/server/node_modules/pg-types/test/index.js +0 -24
  244. package/dist/server/node_modules/pg-types/test/types.js +0 -597
  245. package/dist/server/node_modules/pgpass/README.md +0 -74
  246. package/dist/server/node_modules/pgpass/lib/helper.js +0 -233
  247. package/dist/server/node_modules/pgpass/lib/index.js +0 -23
  248. package/dist/server/node_modules/pgpass/package.json +0 -41
@@ -1 +1 @@
1
- import{c as Y,r as D,j as s,D as ce,B as te,e as ue,u as me,a7 as xe,F as pe,O as ge,f as Re,aN as Te,bV as oe,K as Pe,z as ze,E as $e,aO as ke}from"./index-DUX42n8S.js";import{u as Le,P as se}from"./index-BXeIB2Tb.js";import{B as Oe,a as Ee,b as Fe,c as Ke}from"./breadcrumb-5YAcRzVA.js";import{a as he}from"./Play-B4xMPlIu.js";import{q as je}from"./integration-icon-CK1PotZC.js";import{i as le}from"./Loading01-CUf91EYy.js";import{i as ye}from"./SearchMd-CDQ6AGxD.js";import{u as Ae}from"./use-store-discovery-n-a_3WBn.js";import{u as _e,a as ve,b as Be}from"./use-connection-Civ5yXiP.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ve,u as Ge}from"./registry-utils-BiDzvs9Q.js";import{C as We}from"./collection-search-CStVSgIt.js";import{M as ae}from"./mcp-server-card-Dasz02z8.js";import{I as Ue}from"./input-XHq6wqHR.js";import{P as be,a as Ne,b as Ce}from"./popover-DTEk3vKM.js";import{i as Se}from"./Check-Dz8BREkM.js";import{t as we}from"./ChevronDown-Bc-hvBsT.js";import{s as re}from"./XClose-DSR4PIAc.js";import{s as He}from"./Plus-Djoj9rVk.js";import{E as qe}from"./empty-state-BnVX9dmg.js";import{u as Je}from"./useQuery-CpuRtrH-.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-CcsM4iWp.js";import"./useMutation-2VTSs-2P.js";import"./tooltip-BHHjnUV1.js";import"./index-B4Jr1mSz.js";import"./X-iShYas12.js";import"./ChevronRight-CEdEYMkr.js";import"./Container-BJQA0W3I.js";import"./AlertCircle-DfkFFYqP.js";import"./ArrowUp-B5tgTd4G.js";import"./ArrowLeft-DileW_A_.js";import"./XCircle-MXxaApa0.js";import"./Type01-CTx0gUPJ.js";import"./ChevronUp-C5Nt2Gpw.js";import"./RefreshCcw01-5hC9d6CT.js";import"./Dataflow03-DGKpbmxk.js";import"./Download01-D2a2kEd2.js";import"./List-CIVgrsQE.js";import"./VideoRecorder-DYWKiTPw.js";import"./FolderClosed-BRqcluft.js";import"./Grid01-Dup19Gky.js";import"./Settings01-DCXT2JFw.js";import"./Trash01-B4Huc5Zf.js";import"./Upload01-Dyt5Jyuh.js";import"./User01-ddyN4FyR.js";import"./Zap-CJ1e2k9C.js";import"./useInfiniteQuery-DXdWIUaP.js";import"./infiniteQueryObserver-ClCkbIYa.js";import"./use-collections-K8Aul2pf.js";import"./binder-qwsdgkR1.js";import"./card-BgI4BXSU.js";function tt(t,e){const r=Y.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Y.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Y.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(F=>F.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=O):O=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=F=>f(F.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==E?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[O,s.jsx(Ue,{type:"text",placeholder:E,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=E,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(F=>{const H=d.includes(F.value);return s.jsxs("button",{onClick:()=>o(F.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let O;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(O=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=O):O=e[34],e[35]!==O||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,O]}),e[35]=O,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=E=>{const A=o.includes(E.value);return s.jsxs("div",{onClick:()=>i(E.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:E.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:O=>{O.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Y.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let O;e[8]!==h||e[9]!==o?(O=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=O):O=e[10];const I=O,E=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const F=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const W=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const U=J;let _;e[27]!==E||e[28]!==n?(_=s.jsx(We,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let V;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==E||e[45]!==F||e[46]!==n||e[47]!==W||e[48]!==I.length?(V=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!E?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[E&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),W.length>0&&s.jsx(ae,{items:W,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||W.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=E,e[45]=F,e[46]=n,e[47]=W,e[48]=I.length,e[49]=V):V=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==V?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:V}),e[50]=U,e[51]=m,e[52]=V,e[53]=M):M=e[53];let G;return e[54]!==B||e[55]!==M||e[56]!==_?(G=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=G):G=e[57],G}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ve(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function gs(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ge(l);let f;t[0]!==e.id?(f=Ye.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Qe,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",O=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=[et()],t[24]=F):F=t[24];const H=F;let W;t[25]!==d.create||t[26]!==P?(W=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=W):W=t[27];const Q=W,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Oe,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let V;t[41]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=V):V=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==O?(M=s.jsx(D.Suspense,{fallback:V,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:O}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=O,t[46]=M):M=t[46];let G;t[47]!==B||t[48]!==M?(G=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=G):G=t[49];let K;return t[50]!==_||t[51]!==G?(K=s.jsxs(se,{children:[_,G]}),t[50]=_,t[51]=G,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{gs as default};
1
+ import{c as Y,r as D,j as s,D as ce,B as te,e as ue,u as me,a7 as xe,F as pe,O as ge,f as Re,aN as Te,bV as oe,K as Pe,z as ze,E as $e,aO as ke}from"./index-BSJhN1RG.js";import{u as Le,P as se}from"./index-CCPa_bdf.js";import{B as Oe,a as Ee,b as Fe,c as Ke}from"./breadcrumb-Uk80Af5O.js";import{a as he}from"./Play-LM-itN1a.js";import{q as je}from"./integration-icon-BN98cm9W.js";import{i as le}from"./Loading01-DzzF1Xn7.js";import{i as ye}from"./SearchMd-CQS6PDrb.js";import{u as Ae}from"./use-store-discovery-Waic87H7.js";import{u as _e,a as ve,b as Be}from"./use-connection-C_ZeRH1v.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ve,u as Ge}from"./registry-utils-C6T_5hu0.js";import{C as We}from"./collection-search-cNt60-AL.js";import{M as ae}from"./mcp-server-card-CS95MXfM.js";import{I as Ue}from"./input-CCTJ9v7L.js";import{P as be,a as Ne,b as Ce}from"./popover-D4IjUZyn.js";import{i as Se}from"./Check-Bma5KFCn.js";import{t as we}from"./ChevronDown-aN42FLyq.js";import{s as re}from"./XClose-m99dDV1c.js";import{s as He}from"./Plus-B1MCV6m5.js";import{E as qe}from"./empty-state-BAZkyFkJ.js";import{u as Je}from"./useQuery-CyMlQzLm.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-BoofM__A.js";import"./useMutation-DD64AYhD.js";import"./tooltip-Czc-dfus.js";import"./index-B7lieztO.js";import"./X-C5GtvldQ.js";import"./ChevronRight-C2FVB4C3.js";import"./Container-HyFkyfBi.js";import"./AlertCircle-DMV-rZ7e.js";import"./ArrowUp-BfMoxxyJ.js";import"./ArrowLeft-GATQHvMN.js";import"./XCircle-BWumx2Gc.js";import"./Type01-CEUNNrON.js";import"./ChevronUp-BbircQRT.js";import"./RefreshCcw01-CxbGujDv.js";import"./Dataflow03-B0pnz-uB.js";import"./Download01-vFqP5N3M.js";import"./List-DyQi4WIa.js";import"./VideoRecorder-B3WVSf7U.js";import"./FolderClosed-C9Qktm7G.js";import"./Grid01-DAUX1pwR.js";import"./Settings01-_rJgA268.js";import"./Trash01-5_SyecjT.js";import"./Upload01-CqeU4e-W.js";import"./User01-BsPm7RVz.js";import"./Zap-khXF6TnI.js";import"./useInfiniteQuery-D8nCVkhA.js";import"./infiniteQueryObserver-hAAtfcB8.js";import"./use-collections-Bv7ORhQ3.js";import"./binder-HzAEyJNS.js";import"./card-Lf6x72jH.js";function tt(t,e){const r=Y.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Y.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Y.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(F=>F.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=O):O=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=F=>f(F.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==E?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[O,s.jsx(Ue,{type:"text",placeholder:E,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=E,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(F=>{const H=d.includes(F.value);return s.jsxs("button",{onClick:()=>o(F.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let O;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(O=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=O):O=e[34],e[35]!==O||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,O]}),e[35]=O,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=E=>{const A=o.includes(E.value);return s.jsxs("div",{onClick:()=>i(E.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:E.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:O=>{O.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Y.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let O;e[8]!==h||e[9]!==o?(O=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=O):O=e[10];const I=O,E=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const F=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const W=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const U=J;let _;e[27]!==E||e[28]!==n?(_=s.jsx(We,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let V;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==E||e[45]!==F||e[46]!==n||e[47]!==W||e[48]!==I.length?(V=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!E?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[E&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),W.length>0&&s.jsx(ae,{items:W,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||W.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=E,e[45]=F,e[46]=n,e[47]=W,e[48]=I.length,e[49]=V):V=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==V?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:V}),e[50]=U,e[51]=m,e[52]=V,e[53]=M):M=e[53];let G;return e[54]!==B||e[55]!==M||e[56]!==_?(G=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=G):G=e[57],G}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ve(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function gs(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ge(l);let f;t[0]!==e.id?(f=Ye.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Qe,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",O=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=[et()],t[24]=F):F=t[24];const H=F;let W;t[25]!==d.create||t[26]!==P?(W=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=W):W=t[27];const Q=W,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Oe,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let V;t[41]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=V):V=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==O?(M=s.jsx(D.Suspense,{fallback:V,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:O}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=O,t[46]=M):M=t[46];let G;t[47]!==B||t[48]!==M?(G=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=G):G=t[49];let K;return t[50]!==_||t[51]!==G?(K=s.jsxs(se,{children:[_,G]}),t[50]=_,t[51]=G,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{gs as default};
@@ -1 +1 @@
1
- import{c as a,j as t,aM as n}from"./index-DUX42n8S.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
1
+ import{c as a,j as t,aM as n}from"./index-BSJhN1RG.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
@@ -1 +1 @@
1
- import{c as s,j as t}from"./index-DUX42n8S.js";import{e as r}from"./Dataflow03-DGKpbmxk.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
1
+ import{c as s,j as t}from"./index-BSJhN1RG.js";import{e as r}from"./Dataflow03-B0pnz-uB.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
@@ -1 +1 @@
1
- import{c as w,j as s,r as S,aM as y}from"./index-DUX42n8S.js";import{i as _}from"./Check-Dz8BREkM.js";import{t as k}from"./ChevronDown-Bc-hvBsT.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
1
+ import{c as w,j as s,r as S,aM as y}from"./index-BSJhN1RG.js";import{i as _}from"./Check-Bma5KFCn.js";import{t as k}from"./ChevronDown-aN42FLyq.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
@@ -1 +1 @@
1
- import{c as S,j as s,r as w}from"./index-DUX42n8S.js";import{i as R}from"./Check-Dz8BREkM.js";import{t as _}from"./ChevronDown-Bc-hvBsT.js";import{e as y}from"./Dataflow03-DGKpbmxk.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
1
+ import{c as S,j as s,r as w}from"./index-BSJhN1RG.js";import{i as R}from"./Check-Bma5KFCn.js";import{t as _}from"./ChevronDown-aN42FLyq.js";import{e as y}from"./Dataflow03-B0pnz-uB.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
@@ -0,0 +1 @@
1
+ import{c as r,j as i}from"./index-BSJhN1RG.js";import{P as m}from"./project-plugins-2btoU0bF.js";import"./useQuery-CyMlQzLm.js";import"./useMutation-DD64AYhD.js";import"./constants-BoofM__A.js";import"./switch-goMnPZtb.js";import"./label-DeuWE9eY.js";import"./Container-HyFkyfBi.js";import"./use-connection-C_ZeRH1v.js";import"./use-collections-Bv7ORhQ3.js";import"./registry-utils-C6T_5hu0.js";import"./binder-HzAEyJNS.js";import"./use-install-from-registry-BtGom7sq.js";import"./extract-connection-data-DtlPi0e-.js";import"./constants-CvvTl35D.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-DzzF1Xn7.js";import"./Plus-B1MCV6m5.js";import"./select-DT-iervo.js";import"./index-BdQq_4o_.js";import"./index-B7lieztO.js";import"./Check-Bma5KFCn.js";import"./ChevronDown-aN42FLyq.js";import"./ChevronUp-BbircQRT.js";function v(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{v as default};
@@ -1 +1 @@
1
- import{r as i,Y as $,j as c,b2 as L,a9 as z,$ as O,_ as A,a1 as g,b3 as _,a3 as j,b4 as G,b5 as w,b6 as H,b7 as K,a4 as U,b8 as V,b9 as W,ba as Y,bb as Z,bc as q,bd as B,c as R,D as J}from"./index-DUX42n8S.js";var C="Popover",[E]=U(C,[w]),P=w(),[Q,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(Q,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});X.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});y.displayName=S;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Y,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(B,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=J("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
1
+ import{r as i,Y as $,j as c,b2 as L,a9 as z,$ as O,_ as A,a1 as g,b3 as _,a3 as j,b4 as G,b5 as w,b6 as H,b7 as K,a4 as U,b8 as V,b9 as W,ba as Y,bb as Z,bc as q,bd as B,c as R,D as J}from"./index-BSJhN1RG.js";var C="Popover",[E]=U(C,[w]),P=w(),[Q,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(Q,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});X.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});y.displayName=S;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Y,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(B,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=J("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
@@ -1 +1 @@
1
- import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-DUX42n8S.js";import{u as S}from"./use-connection-Civ5yXiP.js";import{u as U}from"./constants-CcsM4iWp.js";import{u as v}from"./use-mcp-tools-D9d7B2WH.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-lZz-ne_1.js";import{g as O,M as $}from"./types-BAYV7nyc.js";import{u as D}from"./context-Bbpd0eXo.js";import{P as _,a as k}from"./index-BXeIB2Tb.js";import"./use-collections-K8Aul2pf.js";import"./useMutation-2VTSs-2P.js";import"./useQuery-CpuRtrH-.js";import"./use-mcp-resources-DiSYb2_Q.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Cl3BpGhn.js";import"./tooltip-BHHjnUV1.js";import"./index-B4Jr1mSz.js";import"./X-iShYas12.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const d=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!d){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,e[15]=l,e[16]=u):u=e[16],u}function le(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const f=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
1
+ import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-BSJhN1RG.js";import{u as S}from"./use-connection-C_ZeRH1v.js";import{u as U}from"./constants-BoofM__A.js";import{u as v}from"./use-mcp-tools-Uj7pAtM3.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-DHbjaKS6.js";import{g as O,M as $}from"./types-BH6fpPqs.js";import{u as D}from"./context-DWuz1QPT.js";import{P as _,a as k}from"./index-CCPa_bdf.js";import"./use-collections-Bv7ORhQ3.js";import"./useMutation-DD64AYhD.js";import"./useQuery-CyMlQzLm.js";import"./use-mcp-resources-sGDI0dq5.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DMTUegke.js";import"./tooltip-Czc-dfus.js";import"./index-B7lieztO.js";import"./X-C5GtvldQ.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const d=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!d){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,e[15]=l,e[16]=u):u=e[16],u}function le(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const f=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
@@ -1 +1 @@
1
- import{c as w,f as ne,j as s,D as V,r as I,v as oe,o as he,n as W,e as ie,u as re,w as ge,t as je,q as be,K as ae,B as Q,O as D,P as fe,S as le,g as ye,aO as ve}from"./index-DUX42n8S.js";import{u as ue}from"./use-project-Tt_Z_fXv.js";import{c as Se,a as Ne,D as _e}from"./dialog-Bzf-VK1K.js";import{i as ke}from"./ArrowLeft-DileW_A_.js";import{i as ce}from"./X-iShYas12.js";import{S as G}from"./skeleton-CCKDUrsc.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-Bd76PLGE.js";import{A as pe}from"./avatar-DusWq9Iv.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-CK1PotZC.js";import{t as Me}from"./Settings01-DCXT2JFw.js";import{i as Le}from"./Zap-CJ1e2k9C.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-BHHjnUV1.js";import{i as Ue}from"./Check-Dz8BREkM.js";import{c as qe}from"./Play-B4xMPlIu.js";import{S as Y}from"./switch-DTK1XKz7.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-CwAs6Kzm.js";import{i as Ke}from"./Type01-CTx0gUPJ.js";import{a as Ve}from"./RefreshCcw01-5hC9d6CT.js";import"./index-Cl3BpGhn.js";import{u as Qe}from"./useMutation-2VTSs-2P.js";import{a as Je,F as X,b as Z,c as ee,d as te,f as se,e as We}from"./form-BUAj2Hj8.js";import{I as me}from"./input-XHq6wqHR.js";import{L as Ye}from"./logo-upload-DcI1fDOo.js";import{P as He}from"./project-plugins-B-pYQw6T.js";import Xe from"./members-DkWgkxlk.js";import"./useQuery-CpuRtrH-.js";import"./constants-CcsM4iWp.js";import"./index-BXeIB2Tb.js";import"./AlertCircle-DfkFFYqP.js";import"./XCircle-MXxaApa0.js";import"./Trash01-B4Huc5Zf.js";import"./card-BgI4BXSU.js";import"./toggle-group-CgS7CSZY.js";import"./popover-DTEk3vKM.js";import"./ai-providers-logos-dMnvTwLA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-ddyN4FyR.js";import"./Container-BJQA0W3I.js";import"./ArrowUp-B5tgTd4G.js";import"./ChevronDown-Bc-hvBsT.js";import"./ChevronRight-CEdEYMkr.js";import"./ChevronUp-C5Nt2Gpw.js";import"./Dataflow03-DGKpbmxk.js";import"./Download01-D2a2kEd2.js";import"./List-CIVgrsQE.js";import"./VideoRecorder-DYWKiTPw.js";import"./FolderClosed-BRqcluft.js";import"./Grid01-Dup19Gky.js";import"./Loading01-CUf91EYy.js";import"./Plus-Djoj9rVk.js";import"./SearchMd-CDQ6AGxD.js";import"./Upload01-Dyt5Jyuh.js";import"./XClose-DSR4PIAc.js";import"./index-B4Jr1mSz.js";import"./index-BdQq_4o_.js";import"./label-BJGhONv8.js";import"./use-connection-Civ5yXiP.js";import"./use-collections-K8Aul2pf.js";import"./registry-utils-BiDzvs9Q.js";import"./binder-qwsdgkR1.js";import"./use-install-from-registry-CG-kaFkd.js";import"./extract-connection-data-DRh33m0W.js";import"./constants-BoHeSnZm.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-C16p0CHk.js";import"./dropdown-menu-BA4Oj_Sc.js";import"./badge-ChpXYBi7.js";import"./collection-search-CStVSgIt.js";import"./breadcrumb-5YAcRzVA.js";import"./collection-table-wrapper-Bkkildwe.js";import"./table-B24btLbb.js";import"./checkbox-DCsLtkG5.js";import"./use-members-D2qiU5rW.js";import"./alert-dialog-C5M3jUGr.js";import"./empty-state-BnVX9dmg.js";import"./textarea-Byxd6OOy.js";import"./command-CFWw2Pp0.js";import"./index-um5Sfc-H.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Le,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=g,t[15]=n,t[16]=o,t[17]=y):y=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.184.0"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Fe,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(H,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let L;e[32]!==M?(L=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[U,q]}),e[32]=M,e[33]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(i={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function qs(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{qs as default};
1
+ import{c as w,f as ne,j as s,D as V,r as I,v as oe,o as he,n as W,e as ie,u as re,w as ge,t as je,q as be,K as ae,B as Q,O as D,P as fe,S as le,g as ye,aO as ve}from"./index-BSJhN1RG.js";import{u as ue}from"./use-project-eCnKEq9P.js";import{c as Se,a as Ne,D as _e}from"./dialog-1XQgKf8N.js";import{i as ke}from"./ArrowLeft-GATQHvMN.js";import{i as ce}from"./X-C5GtvldQ.js";import{S as G}from"./skeleton-BKlnApyk.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-DxV1GVfK.js";import{A as pe}from"./avatar-9rgMXUO3.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-BN98cm9W.js";import{t as Me}from"./Settings01-_rJgA268.js";import{i as Le}from"./Zap-khXF6TnI.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-Czc-dfus.js";import{i as Ue}from"./Check-Bma5KFCn.js";import{c as qe}from"./Play-LM-itN1a.js";import{S as Y}from"./switch-goMnPZtb.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-DT-iervo.js";import{i as Ke}from"./Type01-CEUNNrON.js";import{a as Ve}from"./RefreshCcw01-CxbGujDv.js";import"./index-DMTUegke.js";import{u as Qe}from"./useMutation-DD64AYhD.js";import{a as Je,F as X,b as Z,c as ee,d as te,f as se,e as We}from"./form-t62EdxrT.js";import{I as me}from"./input-CCTJ9v7L.js";import{L as Ye}from"./logo-upload-T92lTK1Q.js";import{P as He}from"./project-plugins-2btoU0bF.js";import Xe from"./members-Crlx6q1Z.js";import"./useQuery-CyMlQzLm.js";import"./constants-BoofM__A.js";import"./index-CCPa_bdf.js";import"./AlertCircle-DMV-rZ7e.js";import"./XCircle-BWumx2Gc.js";import"./Trash01-5_SyecjT.js";import"./card-Lf6x72jH.js";import"./toggle-group-CaVCHD4D.js";import"./popover-D4IjUZyn.js";import"./ai-providers-logos-bTbrc5Ff.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-BsPm7RVz.js";import"./Container-HyFkyfBi.js";import"./ArrowUp-BfMoxxyJ.js";import"./ChevronDown-aN42FLyq.js";import"./ChevronRight-C2FVB4C3.js";import"./ChevronUp-BbircQRT.js";import"./Dataflow03-B0pnz-uB.js";import"./Download01-vFqP5N3M.js";import"./List-DyQi4WIa.js";import"./VideoRecorder-B3WVSf7U.js";import"./FolderClosed-C9Qktm7G.js";import"./Grid01-DAUX1pwR.js";import"./Loading01-DzzF1Xn7.js";import"./Plus-B1MCV6m5.js";import"./SearchMd-CQS6PDrb.js";import"./Upload01-CqeU4e-W.js";import"./XClose-m99dDV1c.js";import"./index-B7lieztO.js";import"./index-BdQq_4o_.js";import"./label-DeuWE9eY.js";import"./use-connection-C_ZeRH1v.js";import"./use-collections-Bv7ORhQ3.js";import"./registry-utils-C6T_5hu0.js";import"./binder-HzAEyJNS.js";import"./use-install-from-registry-BtGom7sq.js";import"./extract-connection-data-DtlPi0e-.js";import"./constants-CvvTl35D.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-iL5pze0r.js";import"./dropdown-menu-DHi2wczE.js";import"./badge-CmRHjnH-.js";import"./collection-search-cNt60-AL.js";import"./breadcrumb-Uk80Af5O.js";import"./collection-table-wrapper-BBd2b6uM.js";import"./table-5ZO5b8Po.js";import"./checkbox-hgQTbYiQ.js";import"./use-members-C0FwQv_A.js";import"./alert-dialog-DZzr7w4N.js";import"./empty-state-BAZkyFkJ.js";import"./textarea-BbtSbUAG.js";import"./command-CN_wtXeP.js";import"./index-DaqvX_2k.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Le,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=g,t[15]=n,t[16]=o,t[17]=y):y=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.184.2"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Fe,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(H,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let L;e[32]!==M?(L=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[U,q]}),e[32]=M,e[33]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(i={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function qs(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{qs as default};
@@ -1 +1 @@
1
- import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bj as D,bl as $,c as Q}from"./index-DUX42n8S.js";import{u as Y}from"./useQuery-CpuRtrH-.js";import{u as H}from"./useMutation-2VTSs-2P.js";import{u as X,a as Z}from"./constants-CcsM4iWp.js";import{S as ee}from"./switch-DTK1XKz7.js";import{L as te}from"./label-BJGhONv8.js";import{n as ne}from"./Container-BJQA0W3I.js";import{b as se}from"./use-connection-Civ5yXiP.js";import{d as ie,h as re}from"./registry-utils-BiDzvs9Q.js";import{u as oe}from"./use-install-from-registry-CG-kaFkd.js";import{i as le}from"./Loading01-CUf91EYy.js";import{s as ae}from"./Plus-Djoj9rVk.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-CwAs6Kzm.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
1
+ import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bj as D,bl as $,c as Q}from"./index-BSJhN1RG.js";import{u as Y}from"./useQuery-CyMlQzLm.js";import{u as H}from"./useMutation-DD64AYhD.js";import{u as X,a as Z}from"./constants-BoofM__A.js";import{S as ee}from"./switch-goMnPZtb.js";import{L as te}from"./label-DeuWE9eY.js";import{n as ne}from"./Container-HyFkyfBi.js";import{b as se}from"./use-connection-C_ZeRH1v.js";import{d as ie,h as re}from"./registry-utils-C6T_5hu0.js";import{u as oe}from"./use-install-from-registry-BtGom7sq.js";import{i as le}from"./Loading01-DzzF1Xn7.js";import{s as ae}from"./Plus-B1MCV6m5.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-DT-iervo.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
@@ -1 +1 @@
1
- import{bk as pe,c as V,u as le,D as ae,j as s,G as he,e as ce,w as de,f as je,r as Q,B as G,K as me,v as ue,O as be}from"./index-DUX42n8S.js";import{a as Ce}from"./use-project-Tt_Z_fXv.js";import{P as H}from"./index-BXeIB2Tb.js";import{C as Ne}from"./collection-search-CStVSgIt.js";import{A as ye}from"./avatar-DusWq9Iv.js";import{f as ve}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Se}from"./empty-state-BnVX9dmg.js";import{g as we,C as ke}from"./create-project-dialog-C6Adqctr.js";import{u as _e}from"./useQuery-CpuRtrH-.js";import{u as Ie}from"./useMutation-2VTSs-2P.js";import{a as Pe,u as De}from"./constants-CcsM4iWp.js";import{a as Ee,D as $e,c as ze,b as Le,d as Te,e as Oe}from"./dialog-Bzf-VK1K.js";import{I as Ae}from"./input-XHq6wqHR.js";import{g as Fe}from"./generate-id-Dyweu44Y.js";import{B as Re,a as Be,b as Me,c as qe}from"./breadcrumb-5YAcRzVA.js";import{s as Je}from"./FolderClosed-BRqcluft.js";import{s as ie}from"./Plus-Djoj9rVk.js";import"./tooltip-BHHjnUV1.js";import"./index-B4Jr1mSz.js";import"./X-iShYas12.js";import"./Loading01-CUf91EYy.js";import"./SearchMd-CDQ6AGxD.js";import"./User01-ddyN4FyR.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./form-BUAj2Hj8.js";import"./label-BJGhONv8.js";import"./textarea-Byxd6OOy.js";import"./Check-Dz8BREkM.js";import"./ChevronRight-CEdEYMkr.js";const Ke=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function Ue(t){const e=V.c(58),{project:o,onSettingsClick:i}=t,{org:n}=le(),l=o.ui?.themeColor??"#60a5fa",k=o.ui?.bannerColor??l,h=o.ui?.banner?`url(${o.ui.banner})`:void 0;let c;e[0]!==k||e[1]!==h?(c={backgroundColor:k,backgroundImage:h,backgroundSize:"cover",backgroundPosition:"center"},e[0]=k,e[1]=h,e[2]=c):c=e[2];const E=c;let d;e[3]!==n.slug||e[4]!==o.slug?(d={org:n.slug,project:o.slug},e[3]=n.slug,e[4]=o.slug,e[5]=d):d=e[5];let N;e[6]!==i?(N=O=>{O.preventDefault(),O.stopPropagation(),i?.(O)},e[6]=i,e[7]=N):N=e[7];let y,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=ae("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),x=s.jsx(Ke,{className:"size-3.5 text-white"}),e[8]=y,e[9]=x):(y=e[8],x=e[9]);let C;e[10]!==N?(C=s.jsx("button",{type:"button",onClick:N,className:y,children:x}),e[10]=N,e[11]=C):C=e[11];let m;e[12]!==E||e[13]!==C?(m=s.jsx("div",{className:"h-20 relative",style:E,children:C}),e[12]=E,e[13]=C,e[14]=m):m=e[14];let p;e[15]!==o.name||e[16]!==o.ui||e[17]!==l?(p=o.ui?.icon?s.jsx("img",{src:o.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:s.jsx("span",{className:"text-sm font-medium text-white",children:o.name.charAt(0).toUpperCase()})}),e[15]=o.name,e[16]=o.ui,e[17]=l,e[18]=p):p=e[18];let u;e[19]!==o.name?(u=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:o.name}),e[19]=o.name,e[20]=u):u=e[20];let _;e[21]!==o.updatedAt?(_=ve(new Date(o.updatedAt),{addSuffix:!0}),e[21]=o.updatedAt,e[22]=_):_=e[22];let f;e[23]!==_?(f=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",_]}),e[23]=_,e[24]=f):f=e[24];let P;e[25]!==u||e[26]!==f?(P=s.jsxs("div",{className:"flex flex-col",children:[u,f]}),e[25]=u,e[26]=f,e[27]=P):P=e[27];let I;e[28]!==p||e[29]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,P]}),e[28]=p,e[29]=P,e[30]=I):I=e[30];let v;e[31]!==o.boundConnections?(v=o.boundConnections.slice(0,4).map(Ve),e[31]=o.boundConnections,e[32]=v):v=e[32];let j;e[33]!==o.boundConnections.length?(j=o.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",o.boundConnections.length-4]})}),e[33]=o.boundConnections.length,e[34]=j):j=e[34];let S;e[35]!==v||e[36]!==j?(S=s.jsxs("div",{className:"flex pr-2",children:[v,j]}),e[35]=v,e[36]=j,e[37]=S):S=e[37];const $=n.logo??void 0;let D;e[38]!==n.name||e[39]!==$?(D=s.jsx(ye,{url:$,fallback:n.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=n.name,e[39]=$,e[40]=D):D=e[40];let g;e[41]!==n.name?(g=s.jsx("span",{className:"truncate max-w-20",children:n.name}),e[41]=n.name,e[42]=g):g=e[42];let b;e[43]!==D||e[44]!==g?(b=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[D,g]}),e[43]=D,e[44]=g,e[45]=b):b=e[45];let w;e[46]!==S||e[47]!==b?(w=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[S,b]}),e[46]=S,e[47]=b,e[48]=w):w=e[48];let r;e[49]!==I||e[50]!==w?(r=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[I,w]}),e[49]=I,e[50]=w,e[51]=r):r=e[51];let z;e[52]!==r||e[53]!==m?(z=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[m,r]}),e[52]=r,e[53]=m,e[54]=z):z=e[54];let T;return e[55]!==z||e[56]!==d?(T=s.jsx(he,{to:"/$org/$project",params:d,className:"block group",children:z}),e[55]=z,e[56]=d,e[57]=T):T=e[57],T}function Ve(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(He,{connection:t})},t.id)}function He(t){const e=V.c(13),{connection:o}=t;if(o.icon){let h;e[0]!==o.icon||e[1]!==o.title?(h=s.jsx("img",{src:o.icon,alt:o.title,className:"size-4 object-cover"}),e[0]=o.icon,e[1]=o.title,e[2]=h):h=e[2];let c;return e[3]!==o.title||e[4]!==h?(c=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:o.title,children:h}),e[3]=o.title,e[4]=h,e[5]=c):c=e[5],c}const i=o.title;let n;e[6]!==o.title?(n=o.title.charAt(0).toUpperCase(),e[6]=o.title,e[7]=n):n=e[7];let l;e[8]!==n?(l=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:n}),e[8]=n,e[9]=l):l=e[9];let k;return e[10]!==o.title||e[11]!==l?(k=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:i,children:l}),e[10]=o.title,e[11]=l,e[12]=k):k=e[12],k}async function Qe(){const t=await fetch("/api/deco-sites");if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${t.status})`)}return t.json()}function Ge(t){const e=V.c(57),{open:o,onOpenChange:i}=t,{org:n}=le(),l=ce(),k=de(),{data:h}=je.useSession(),[c,E]=Q.useState(null),[d,N]=Q.useState("");let y;e[0]!==n.id?(y={connectionId:Pe,orgId:n.id},e[0]=n.id,e[1]=y):y=e[1];const x=De(y),C=h?.user?.email;let m;e[2]!==C?(m=["deco-sites",C],e[2]=C,e[3]=m):m=e[3];const p=o&&!!h?.user?.email;let u;e[4]!==m||e[5]!==p?(u={queryKey:m,queryFn:Qe,enabled:p,staleTime:6e4,retry:!1},e[4]=m,e[5]=p,e[6]=u):u=e[6];const{data:_,isLoading:f,error:P}=_e(u),I=_?.sites??[];let v;e[7]!==i?(v=a=>{a||(E(null),N("")),i(a)},e[7]=i,e[8]=v):v=e[8];const j=v;let S;e[9]!==d?(S=a=>a.name.toLowerCase().includes(d.toLowerCase())||a.domains?.[0]?.domain.toLowerCase().includes(d.toLowerCase()),e[9]=d,e[10]=S):S=e[10];const $=I.filter(S),D=!c||$.some(a=>a.name===c);let g;e[11]!==x||e[12]!==n.id?(g=async a=>{const L=Fe("conn"),oe=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:a,connId:L,orgId:n.id})});if(!oe.ok){const xe=await oe.json().catch(Ye);throw new Error(xe.error??`Failed to create connection (${oe.status})`)}const re=await x.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:we(a),name:a,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ne=(re.structuredContent??re).project;return await x.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ne.id,connectionId:L}}),await x.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ne.id,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ne,connId:L}},e[11]=x,e[12]=n.id,e[13]=g):g=e[13];let b;e[14]!==j||e[15]!==l||e[16]!==n.id||e[17]!==n.slug||e[18]!==k?(b=a=>{const{project:L}=a;k.invalidateQueries({queryKey:me.projects(n.id)}),ue.success(`Imported ${L.slug} from deco.cx`),j(!1),l({to:"/$org/$project",params:{org:n.slug,project:L.slug}})},e[14]=j,e[15]=l,e[16]=n.id,e[17]=n.slug,e[18]=k,e[19]=b):b=e[19];let w;e[20]!==g||e[21]!==b?(w={mutationFn:g,onSuccess:b,onError:We},e[20]=g,e[21]=b,e[22]=w):w=e[22];const r=Ie(w),z=h?.user?.email??"",T=$e,O=Ee,fe="max-w-md";let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(ze,{children:"Import from deco.cx"}),e[23]=W):W=e[23];const X=z?`Sites available for ${z}`:"Select the site you want to import.";let A;e[24]!==X?(A=s.jsxs(Le,{children:[W,s.jsx(Te,{children:X})]}),e[24]=X,e[25]=A):A=e[25];const ge="min-h-24";let F;e[26]!==f?(F=f&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"Loading sites..."}),e[26]=f,e[27]=F):F=e[27];const Z=!f&&!P&&I.length===0&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"No sites found for this account."}),ee=!f&&I.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ae,{placeholder:"Search sites...",value:d,onChange:a=>N(a.target.value),autoFocus:!0}),s.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto pr-1",children:[$.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground text-center py-4",children:["No sites match “",d,"”"]}),$.map(a=>s.jsxs("button",{type:"button",onClick:()=>E(a.name),className:ae("flex flex-col w-full text-left rounded-lg border px-4 py-3 transition-colors",c===a.name?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/50"),children:[s.jsx("span",{className:"text-sm font-medium",children:a.name}),a.domains?.[0]&&s.jsx("span",{className:"text-xs text-muted-foreground",children:a.domains[0].domain})]},a.name))]})]});let R;e[28]!==F||e[29]!==Z||e[30]!==ee?(R=s.jsxs("div",{className:ge,children:[F,Z,ee]}),e[28]=F,e[29]=Z,e[30]=ee,e[31]=R):R=e[31];let B;e[32]!==j?(B=()=>j(!1),e[32]=j,e[33]=B):B=e[33];let M;e[34]!==r.isPending||e[35]!==B?(M=s.jsx(G,{variant:"outline",onClick:B,disabled:r.isPending,children:"Cancel"}),e[34]=r.isPending,e[35]=B,e[36]=M):M=e[36];const te=!c||!D||r.isPending||f;let q;e[37]!==r||e[38]!==c?(q=()=>c&&r.mutate(c),e[37]=r,e[38]=c,e[39]=q):q=e[39];const se=r.isPending?"Importing...":"Import";let J;e[40]!==te||e[41]!==q||e[42]!==se?(J=s.jsx(G,{disabled:te,onClick:q,children:se}),e[40]=te,e[41]=q,e[42]=se,e[43]=J):J=e[43];let K;e[44]!==M||e[45]!==J?(K=s.jsxs(Oe,{children:[M,J]}),e[44]=M,e[45]=J,e[46]=K):K=e[46];let U;e[47]!==O||e[48]!==A||e[49]!==R||e[50]!==K?(U=s.jsxs(O,{className:fe,children:[A,R,K]}),e[47]=O,e[48]=A,e[49]=R,e[50]=K,e[51]=U):U=e[51];let Y;return e[52]!==T||e[53]!==j||e[54]!==o||e[55]!==U?(Y=s.jsx(T,{open:o,onOpenChange:j,children:U}),e[52]=T,e[53]=j,e[54]=o,e[55]=U,e[56]=Y):Y=e[56],Y}function We(t){ue.error("Import failed: "+(t instanceof Error?t.message:"Unknown error"))}function Ye(){return{}}function Xe(){const t=V.c(2),e=de();let o;return t[0]!==e?(o=e.getQueryData(me.publicConfig())??{},t[0]=e,t[1]=o):o=t[1],o}function Ze(){const t=V.c(3),[e,o]=Q.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(G,{variant:"outline",onClick:()=>o(!0),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Import from deco.cx"}),t[0]=i):i=t[0];let n;return t[1]!==e?(n=s.jsxs(s.Fragment,{children:[i,s.jsx(Ge,{open:e,onOpenChange:o})]}),t[1]=e,t[2]=n):n=t[2],n}function $t(){const t=V.c(43),{org:e}=le(),{data:o,isLoading:i}=Ce(e.id),{enableDecoImport:n}=Xe(),[l,k]=Q.useState(""),[h,c]=Q.useState(!1),E=ce();let d,N,y,x,C,m,p,u;if(t[0]!==n||t[1]!==i||t[2]!==E||t[3]!==e.slug||t[4]!==o||t[5]!==l){const I=o?.filter(tt)?.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())||r.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[14]!==E||t[15]!==e.slug?(v=r=>{E({to:"/$org/$project/settings/general",params:{org:e.slug,project:r}})},t[14]=E,t[15]=e.slug,t[16]=v):v=t[16];const j=v;let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{c(!0)},t[17]=S):S=t[17];const $=S;N=H;let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(H.Header.Left,{children:s.jsx(Re,{children:s.jsx(Be,{children:s.jsx(Me,{children:s.jsx(qe,{children:"Projects"})})})})}),t[18]=D):D=t[18];let g;t[19]!==n?(g=n&&s.jsx(Ze,{}),t[19]=n,t[20]=g):g=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(G,{onClick:$,size:"sm",children:[s.jsx(ie,{size:14}),"Create Project"]}),t[21]=b):b=t[21],t[22]!==g?(p=s.jsxs(H.Header,{children:[D,s.jsxs(H.Header.Right,{children:[g,b]})]}),t[22]=g,t[23]=p):p=t[23];let w;t[24]===Symbol.for("react.memo_cache_sentinel")?(w=r=>{r.key==="Escape"&&(k(""),r.target.blur())},t[24]=w):w=t[24],t[25]!==l?(u=s.jsx(Ne,{value:l,onChange:k,placeholder:"Search for a project...",onKeyDown:w}),t[25]=l,t[26]=u):u=t[26],d=H.Content,y="@container",t[27]!==i?(x=i&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(et)})}),t[27]=i,t[28]=x):x=t[28],C=!i&&I.length===0&&s.jsx("div",{className:"flex items-center h-full",children:s.jsx(Se,{image:s.jsx(Je,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&s.jsxs(G,{size:"sm",onClick:$,children:[s.jsx(ie,{size:14}),"Create Project"]})})}),m=!i&&I.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:I.map(r=>s.jsx(Ue,{project:r,onSettingsClick:()=>j(r.slug)},r.id))})}),t[0]=n,t[1]=i,t[2]=E,t[3]=e.slug,t[4]=o,t[5]=l,t[6]=d,t[7]=N,t[8]=y,t[9]=x,t[10]=C,t[11]=m,t[12]=p,t[13]=u}else d=t[6],N=t[7],y=t[8],x=t[9],C=t[10],m=t[11],p=t[12],u=t[13];let _;t[29]!==d||t[30]!==y||t[31]!==x||t[32]!==C||t[33]!==m?(_=s.jsxs(d,{className:y,children:[x,C,m]}),t[29]=d,t[30]=y,t[31]=x,t[32]=C,t[33]=m,t[34]=_):_=t[34];let f;t[35]!==h?(f=s.jsx(ke,{open:h,onOpenChange:c}),t[35]=h,t[36]=f):f=t[36];let P;return t[37]!==N||t[38]!==p||t[39]!==u||t[40]!==_||t[41]!==f?(P=s.jsxs(N,{children:[p,u,_,f]}),t[37]=N,t[38]=p,t[39]=u,t[40]=_,t[41]=f,t[42]=P):P=t[42],P}function et(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function tt(t){return t.slug!==be}export{$t as default};
1
+ import{bk as pe,c as V,u as le,D as ae,j as s,G as he,e as ce,w as de,f as je,r as Q,B as G,K as me,v as ue,O as be}from"./index-BSJhN1RG.js";import{a as Ce}from"./use-project-eCnKEq9P.js";import{P as H}from"./index-CCPa_bdf.js";import{C as Ne}from"./collection-search-cNt60-AL.js";import{A as ye}from"./avatar-9rgMXUO3.js";import{f as ve}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Se}from"./empty-state-BAZkyFkJ.js";import{g as we,C as ke}from"./create-project-dialog-_5aAp1I-.js";import{u as _e}from"./useQuery-CyMlQzLm.js";import{u as Ie}from"./useMutation-DD64AYhD.js";import{a as Pe,u as De}from"./constants-BoofM__A.js";import{a as Ee,D as $e,c as ze,b as Le,d as Te,e as Oe}from"./dialog-1XQgKf8N.js";import{I as Ae}from"./input-CCTJ9v7L.js";import{g as Fe}from"./generate-id-Dyweu44Y.js";import{B as Re,a as Be,b as Me,c as qe}from"./breadcrumb-Uk80Af5O.js";import{s as Je}from"./FolderClosed-C9Qktm7G.js";import{s as ie}from"./Plus-B1MCV6m5.js";import"./tooltip-Czc-dfus.js";import"./index-B7lieztO.js";import"./X-C5GtvldQ.js";import"./Loading01-DzzF1Xn7.js";import"./SearchMd-CQS6PDrb.js";import"./User01-BsPm7RVz.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./form-t62EdxrT.js";import"./label-DeuWE9eY.js";import"./textarea-BbtSbUAG.js";import"./Check-Bma5KFCn.js";import"./ChevronRight-C2FVB4C3.js";const Ke=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function Ue(t){const e=V.c(58),{project:o,onSettingsClick:i}=t,{org:n}=le(),l=o.ui?.themeColor??"#60a5fa",k=o.ui?.bannerColor??l,h=o.ui?.banner?`url(${o.ui.banner})`:void 0;let c;e[0]!==k||e[1]!==h?(c={backgroundColor:k,backgroundImage:h,backgroundSize:"cover",backgroundPosition:"center"},e[0]=k,e[1]=h,e[2]=c):c=e[2];const E=c;let d;e[3]!==n.slug||e[4]!==o.slug?(d={org:n.slug,project:o.slug},e[3]=n.slug,e[4]=o.slug,e[5]=d):d=e[5];let N;e[6]!==i?(N=O=>{O.preventDefault(),O.stopPropagation(),i?.(O)},e[6]=i,e[7]=N):N=e[7];let y,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=ae("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),x=s.jsx(Ke,{className:"size-3.5 text-white"}),e[8]=y,e[9]=x):(y=e[8],x=e[9]);let C;e[10]!==N?(C=s.jsx("button",{type:"button",onClick:N,className:y,children:x}),e[10]=N,e[11]=C):C=e[11];let m;e[12]!==E||e[13]!==C?(m=s.jsx("div",{className:"h-20 relative",style:E,children:C}),e[12]=E,e[13]=C,e[14]=m):m=e[14];let p;e[15]!==o.name||e[16]!==o.ui||e[17]!==l?(p=o.ui?.icon?s.jsx("img",{src:o.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:s.jsx("span",{className:"text-sm font-medium text-white",children:o.name.charAt(0).toUpperCase()})}),e[15]=o.name,e[16]=o.ui,e[17]=l,e[18]=p):p=e[18];let u;e[19]!==o.name?(u=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:o.name}),e[19]=o.name,e[20]=u):u=e[20];let _;e[21]!==o.updatedAt?(_=ve(new Date(o.updatedAt),{addSuffix:!0}),e[21]=o.updatedAt,e[22]=_):_=e[22];let f;e[23]!==_?(f=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",_]}),e[23]=_,e[24]=f):f=e[24];let P;e[25]!==u||e[26]!==f?(P=s.jsxs("div",{className:"flex flex-col",children:[u,f]}),e[25]=u,e[26]=f,e[27]=P):P=e[27];let I;e[28]!==p||e[29]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,P]}),e[28]=p,e[29]=P,e[30]=I):I=e[30];let v;e[31]!==o.boundConnections?(v=o.boundConnections.slice(0,4).map(Ve),e[31]=o.boundConnections,e[32]=v):v=e[32];let j;e[33]!==o.boundConnections.length?(j=o.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",o.boundConnections.length-4]})}),e[33]=o.boundConnections.length,e[34]=j):j=e[34];let S;e[35]!==v||e[36]!==j?(S=s.jsxs("div",{className:"flex pr-2",children:[v,j]}),e[35]=v,e[36]=j,e[37]=S):S=e[37];const $=n.logo??void 0;let D;e[38]!==n.name||e[39]!==$?(D=s.jsx(ye,{url:$,fallback:n.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=n.name,e[39]=$,e[40]=D):D=e[40];let g;e[41]!==n.name?(g=s.jsx("span",{className:"truncate max-w-20",children:n.name}),e[41]=n.name,e[42]=g):g=e[42];let b;e[43]!==D||e[44]!==g?(b=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[D,g]}),e[43]=D,e[44]=g,e[45]=b):b=e[45];let w;e[46]!==S||e[47]!==b?(w=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[S,b]}),e[46]=S,e[47]=b,e[48]=w):w=e[48];let r;e[49]!==I||e[50]!==w?(r=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[I,w]}),e[49]=I,e[50]=w,e[51]=r):r=e[51];let z;e[52]!==r||e[53]!==m?(z=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[m,r]}),e[52]=r,e[53]=m,e[54]=z):z=e[54];let T;return e[55]!==z||e[56]!==d?(T=s.jsx(he,{to:"/$org/$project",params:d,className:"block group",children:z}),e[55]=z,e[56]=d,e[57]=T):T=e[57],T}function Ve(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(He,{connection:t})},t.id)}function He(t){const e=V.c(13),{connection:o}=t;if(o.icon){let h;e[0]!==o.icon||e[1]!==o.title?(h=s.jsx("img",{src:o.icon,alt:o.title,className:"size-4 object-cover"}),e[0]=o.icon,e[1]=o.title,e[2]=h):h=e[2];let c;return e[3]!==o.title||e[4]!==h?(c=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:o.title,children:h}),e[3]=o.title,e[4]=h,e[5]=c):c=e[5],c}const i=o.title;let n;e[6]!==o.title?(n=o.title.charAt(0).toUpperCase(),e[6]=o.title,e[7]=n):n=e[7];let l;e[8]!==n?(l=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:n}),e[8]=n,e[9]=l):l=e[9];let k;return e[10]!==o.title||e[11]!==l?(k=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:i,children:l}),e[10]=o.title,e[11]=l,e[12]=k):k=e[12],k}async function Qe(){const t=await fetch("/api/deco-sites");if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${t.status})`)}return t.json()}function Ge(t){const e=V.c(57),{open:o,onOpenChange:i}=t,{org:n}=le(),l=ce(),k=de(),{data:h}=je.useSession(),[c,E]=Q.useState(null),[d,N]=Q.useState("");let y;e[0]!==n.id?(y={connectionId:Pe,orgId:n.id},e[0]=n.id,e[1]=y):y=e[1];const x=De(y),C=h?.user?.email;let m;e[2]!==C?(m=["deco-sites",C],e[2]=C,e[3]=m):m=e[3];const p=o&&!!h?.user?.email;let u;e[4]!==m||e[5]!==p?(u={queryKey:m,queryFn:Qe,enabled:p,staleTime:6e4,retry:!1},e[4]=m,e[5]=p,e[6]=u):u=e[6];const{data:_,isLoading:f,error:P}=_e(u),I=_?.sites??[];let v;e[7]!==i?(v=a=>{a||(E(null),N("")),i(a)},e[7]=i,e[8]=v):v=e[8];const j=v;let S;e[9]!==d?(S=a=>a.name.toLowerCase().includes(d.toLowerCase())||a.domains?.[0]?.domain.toLowerCase().includes(d.toLowerCase()),e[9]=d,e[10]=S):S=e[10];const $=I.filter(S),D=!c||$.some(a=>a.name===c);let g;e[11]!==x||e[12]!==n.id?(g=async a=>{const L=Fe("conn"),oe=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:a,connId:L,orgId:n.id})});if(!oe.ok){const xe=await oe.json().catch(Ye);throw new Error(xe.error??`Failed to create connection (${oe.status})`)}const re=await x.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:we(a),name:a,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ne=(re.structuredContent??re).project;return await x.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ne.id,connectionId:L}}),await x.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ne.id,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ne,connId:L}},e[11]=x,e[12]=n.id,e[13]=g):g=e[13];let b;e[14]!==j||e[15]!==l||e[16]!==n.id||e[17]!==n.slug||e[18]!==k?(b=a=>{const{project:L}=a;k.invalidateQueries({queryKey:me.projects(n.id)}),ue.success(`Imported ${L.slug} from deco.cx`),j(!1),l({to:"/$org/$project",params:{org:n.slug,project:L.slug}})},e[14]=j,e[15]=l,e[16]=n.id,e[17]=n.slug,e[18]=k,e[19]=b):b=e[19];let w;e[20]!==g||e[21]!==b?(w={mutationFn:g,onSuccess:b,onError:We},e[20]=g,e[21]=b,e[22]=w):w=e[22];const r=Ie(w),z=h?.user?.email??"",T=$e,O=Ee,fe="max-w-md";let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(ze,{children:"Import from deco.cx"}),e[23]=W):W=e[23];const X=z?`Sites available for ${z}`:"Select the site you want to import.";let A;e[24]!==X?(A=s.jsxs(Le,{children:[W,s.jsx(Te,{children:X})]}),e[24]=X,e[25]=A):A=e[25];const ge="min-h-24";let F;e[26]!==f?(F=f&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"Loading sites..."}),e[26]=f,e[27]=F):F=e[27];const Z=!f&&!P&&I.length===0&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"No sites found for this account."}),ee=!f&&I.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ae,{placeholder:"Search sites...",value:d,onChange:a=>N(a.target.value),autoFocus:!0}),s.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto pr-1",children:[$.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground text-center py-4",children:["No sites match “",d,"”"]}),$.map(a=>s.jsxs("button",{type:"button",onClick:()=>E(a.name),className:ae("flex flex-col w-full text-left rounded-lg border px-4 py-3 transition-colors",c===a.name?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/50"),children:[s.jsx("span",{className:"text-sm font-medium",children:a.name}),a.domains?.[0]&&s.jsx("span",{className:"text-xs text-muted-foreground",children:a.domains[0].domain})]},a.name))]})]});let R;e[28]!==F||e[29]!==Z||e[30]!==ee?(R=s.jsxs("div",{className:ge,children:[F,Z,ee]}),e[28]=F,e[29]=Z,e[30]=ee,e[31]=R):R=e[31];let B;e[32]!==j?(B=()=>j(!1),e[32]=j,e[33]=B):B=e[33];let M;e[34]!==r.isPending||e[35]!==B?(M=s.jsx(G,{variant:"outline",onClick:B,disabled:r.isPending,children:"Cancel"}),e[34]=r.isPending,e[35]=B,e[36]=M):M=e[36];const te=!c||!D||r.isPending||f;let q;e[37]!==r||e[38]!==c?(q=()=>c&&r.mutate(c),e[37]=r,e[38]=c,e[39]=q):q=e[39];const se=r.isPending?"Importing...":"Import";let J;e[40]!==te||e[41]!==q||e[42]!==se?(J=s.jsx(G,{disabled:te,onClick:q,children:se}),e[40]=te,e[41]=q,e[42]=se,e[43]=J):J=e[43];let K;e[44]!==M||e[45]!==J?(K=s.jsxs(Oe,{children:[M,J]}),e[44]=M,e[45]=J,e[46]=K):K=e[46];let U;e[47]!==O||e[48]!==A||e[49]!==R||e[50]!==K?(U=s.jsxs(O,{className:fe,children:[A,R,K]}),e[47]=O,e[48]=A,e[49]=R,e[50]=K,e[51]=U):U=e[51];let Y;return e[52]!==T||e[53]!==j||e[54]!==o||e[55]!==U?(Y=s.jsx(T,{open:o,onOpenChange:j,children:U}),e[52]=T,e[53]=j,e[54]=o,e[55]=U,e[56]=Y):Y=e[56],Y}function We(t){ue.error("Import failed: "+(t instanceof Error?t.message:"Unknown error"))}function Ye(){return{}}function Xe(){const t=V.c(2),e=de();let o;return t[0]!==e?(o=e.getQueryData(me.publicConfig())??{},t[0]=e,t[1]=o):o=t[1],o}function Ze(){const t=V.c(3),[e,o]=Q.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(G,{variant:"outline",onClick:()=>o(!0),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Import from deco.cx"}),t[0]=i):i=t[0];let n;return t[1]!==e?(n=s.jsxs(s.Fragment,{children:[i,s.jsx(Ge,{open:e,onOpenChange:o})]}),t[1]=e,t[2]=n):n=t[2],n}function $t(){const t=V.c(43),{org:e}=le(),{data:o,isLoading:i}=Ce(e.id),{enableDecoImport:n}=Xe(),[l,k]=Q.useState(""),[h,c]=Q.useState(!1),E=ce();let d,N,y,x,C,m,p,u;if(t[0]!==n||t[1]!==i||t[2]!==E||t[3]!==e.slug||t[4]!==o||t[5]!==l){const I=o?.filter(tt)?.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())||r.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[14]!==E||t[15]!==e.slug?(v=r=>{E({to:"/$org/$project/settings/general",params:{org:e.slug,project:r}})},t[14]=E,t[15]=e.slug,t[16]=v):v=t[16];const j=v;let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{c(!0)},t[17]=S):S=t[17];const $=S;N=H;let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(H.Header.Left,{children:s.jsx(Re,{children:s.jsx(Be,{children:s.jsx(Me,{children:s.jsx(qe,{children:"Projects"})})})})}),t[18]=D):D=t[18];let g;t[19]!==n?(g=n&&s.jsx(Ze,{}),t[19]=n,t[20]=g):g=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(G,{onClick:$,size:"sm",children:[s.jsx(ie,{size:14}),"Create Project"]}),t[21]=b):b=t[21],t[22]!==g?(p=s.jsxs(H.Header,{children:[D,s.jsxs(H.Header.Right,{children:[g,b]})]}),t[22]=g,t[23]=p):p=t[23];let w;t[24]===Symbol.for("react.memo_cache_sentinel")?(w=r=>{r.key==="Escape"&&(k(""),r.target.blur())},t[24]=w):w=t[24],t[25]!==l?(u=s.jsx(Ne,{value:l,onChange:k,placeholder:"Search for a project...",onKeyDown:w}),t[25]=l,t[26]=u):u=t[26],d=H.Content,y="@container",t[27]!==i?(x=i&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(et)})}),t[27]=i,t[28]=x):x=t[28],C=!i&&I.length===0&&s.jsx("div",{className:"flex items-center h-full",children:s.jsx(Se,{image:s.jsx(Je,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&s.jsxs(G,{size:"sm",onClick:$,children:[s.jsx(ie,{size:14}),"Create Project"]})})}),m=!i&&I.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:I.map(r=>s.jsx(Ue,{project:r,onSettingsClick:()=>j(r.slug)},r.id))})}),t[0]=n,t[1]=i,t[2]=E,t[3]=e.slug,t[4]=o,t[5]=l,t[6]=d,t[7]=N,t[8]=y,t[9]=x,t[10]=C,t[11]=m,t[12]=p,t[13]=u}else d=t[6],N=t[7],y=t[8],x=t[9],C=t[10],m=t[11],p=t[12],u=t[13];let _;t[29]!==d||t[30]!==y||t[31]!==x||t[32]!==C||t[33]!==m?(_=s.jsxs(d,{className:y,children:[x,C,m]}),t[29]=d,t[30]=y,t[31]=x,t[32]=C,t[33]=m,t[34]=_):_=t[34];let f;t[35]!==h?(f=s.jsx(ke,{open:h,onOpenChange:c}),t[35]=h,t[36]=f):f=t[36];let P;return t[37]!==N||t[38]!==p||t[39]!==u||t[40]!==_||t[41]!==f?(P=s.jsxs(N,{children:[p,u,_,f]}),t[37]=N,t[38]=p,t[39]=u,t[40]=_,t[41]=f,t[42]=P):P=t[42],P}function et(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function tt(t){return t.slug!==be}export{$t as default};