decocms 4.99.7 → 4.99.8

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 (236) hide show
  1. package/dist/client/assets/{AlertCircle-DHJMAy0z.js → AlertCircle-CE7GxjMO.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BP3LRAVY.js → AreaChart-Czn9zcW2.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-ZH8AfOrt.js → ArrowRight-AiWOWM1Z.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BEvOvB39.js → ArrowUp-BsjWGQQe.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-CB2lmsga.js → ArrowUpRight-B2LSEvMX.js} +1 -1
  6. package/dist/client/assets/{Check-8S_h-pNf.js → Check-BWvX1ZXX.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-8lNaIJZX.js → CheckCircle-Cf21Bb8a.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-D19e4E2W.js → ChevronDown-CjhsyPt5.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DMiFqEFB.js → ChevronRight-C0U1fSzL.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CDr-5amA.js → ChevronUp-CJR37gbq.js} +1 -1
  11. package/dist/client/assets/{Copy01-CVgcePVg.js → Copy01-B8tpQC9Q.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Ddcp5zYy.js → DotsVertical-DXSJrP0z.js} +1 -1
  13. package/dist/client/assets/{Eye-DjxTeGvc.js → Eye-CximEfBL.js} +1 -1
  14. package/dist/client/assets/{FilterLines-sMM8U03Q.js → FilterLines-CQAFehUr.js} +1 -1
  15. package/dist/client/assets/{Globe01-ByEypwqT.js → Globe01-BHWZq2K5.js} +1 -1
  16. package/dist/client/assets/{Globe04-CLktRX73.js → Globe04-Dw5Bsm8V.js} +1 -1
  17. package/dist/client/assets/{HardDrive-LZLUcrQT.js → HardDrive-CwNWMpvl.js} +1 -1
  18. package/dist/client/assets/{Image01-BC4H1plu.js → Image01-BorH67fS.js} +1 -1
  19. package/dist/client/assets/{Key01-BJ5pxmk5.js → Key01-Bjj-aLS5.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-BY0vokwF.js → LayoutLeft-CxMDbMdN.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BE6iPh6Z.js → LinkExternal01-DzfAn4aY.js} +1 -1
  22. package/dist/client/assets/{Monitor01-D5bQ7ld2.js → Monitor01-B11z__w7.js} +1 -1
  23. package/dist/client/assets/{Package-Dgaviqf5.js → Package-BkoPZ3tG.js} +1 -1
  24. package/dist/client/assets/{Palette-BLetgCYz.js → Palette-RNOi-9O1.js} +1 -1
  25. package/dist/client/assets/{Play-D4uEf4_3.js → Play-CL_a6mE6.js} +1 -1
  26. package/dist/client/assets/{Plus-B99BOqFt.js → Plus-BiNu4BNf.js} +1 -1
  27. package/dist/client/assets/{SearchLg-0vJ_NGT1.js → SearchLg-D8wz7WQH.js} +1 -1
  28. package/dist/client/assets/{SearchMd--QTHPVfW.js → SearchMd-JyzroHdN.js} +1 -1
  29. package/dist/client/assets/{Settings02-Dg48gy-m.js → Settings02-htWR982a.js} +1 -1
  30. package/dist/client/assets/{Shield01-XjAbmrcl.js → Shield01-BVyqSeQM.js} +1 -1
  31. package/dist/client/assets/{Star01-DBzet7vh.js → Star01-Dh17NHJI.js} +1 -1
  32. package/dist/client/assets/{Stars01-DBeF8eO9.js → Stars01-BMXw5BeL.js} +1 -1
  33. package/dist/client/assets/{Stars02-DF0mhAvh.js → Stars02-CxJPie3_.js} +1 -1
  34. package/dist/client/assets/{Sun-DWQi7hi9.js → Sun-DaIRBGtL.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-g8c5_DAA.js → SwitchHorizontal01-BwNckjDk.js} +1 -1
  36. package/dist/client/assets/{Tool01-BsH7bOGE.js → Tool01-D_3zbU3k.js} +1 -1
  37. package/dist/client/assets/{Tool02-CpEmuwVJ.js → Tool02-DiUu9qs_.js} +1 -1
  38. package/dist/client/assets/{Trash01-sz1B1ubO.js → Trash01-WLvc7qEr.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-DFaJzXrF.js → TrendUp01-DPzDlutQ.js} +1 -1
  40. package/dist/client/assets/{Upload01-DZkj6_Us.js → Upload01-Bx5CpiF6.js} +1 -1
  41. package/dist/client/assets/{User01-Cy4n4fwd.js → User01-CWpJwa6r.js} +1 -1
  42. package/dist/client/assets/{Users01-CiJE_Dg-.js → Users01-ChKK2Tx6.js} +1 -1
  43. package/dist/client/assets/{Users03-Dqh1PO2N.js → Users03-BWpBf_La.js} +1 -1
  44. package/dist/client/assets/{X-BFNxuShY.js → X-CfAlZN0E.js} +1 -1
  45. package/dist/client/assets/{XCircle-Cv1eNWoM.js → XCircle-D6dsYD0i.js} +1 -1
  46. package/dist/client/assets/{XClose-Ckol2oql.js → XClose-EYXyD43I.js} +1 -1
  47. package/dist/client/assets/{Zap-DTU6QUr-.js → Zap-CieQ7Tpq.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-CdnVBk-J.js → ZapSquare-z-XJEPEB.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-IrGAWsFW.js → ZoomOut-_xCY1UeS.js} +1 -1
  50. package/dist/client/assets/{access-gate-DAiHI_Ya.js → access-gate-Cv1dfvoj.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-PTtjM0qv.js → add-section-modal-CZdPL24J.js} +1 -1
  52. package/dist/client/assets/{agent-icon-DJ-fLRqx.js → agent-icon-DclSthKR.js} +1 -1
  53. package/dist/client/assets/{agents-list-Ddn36hvr.js → agents-list-DBnt6dLl.js} +1 -1
  54. package/dist/client/assets/{ai-providers-4RQyfXJ9.js → ai-providers-DzcfIs3g.js} +1 -1
  55. package/dist/client/assets/{alert-D564TwSW.js → alert-BPcaPAJj.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-S-vKrHdP.js → alert-dialog-C9TCdYEA.js} +1 -1
  57. package/dist/client/assets/{app-editor-BnYQVlSC.js → app-editor-DdcFzHO2.js} +1 -1
  58. package/dist/client/assets/{auth-LsRMSxpZ.js → auth-D0JrqMBg.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-CdzEQEu6.js → auth-catchall-E5XvJd8y.js} +1 -1
  60. package/dist/client/assets/{auth-entry-DcFUSq-U.js → auth-entry-D9yXCnjT.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-CTdOwwE2.js → auth-split-layout-AjVuDFuV.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-ccpCvQUL.js → authenticate-and-persist-oauth-DxQCI97g.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-B36cFYnc.js → automation-list-row-BRNOh7Fh.js} +1 -1
  64. package/dist/client/assets/{automation-runs-C5OD2vNu.js → automation-runs-DYLrph2F.js} +1 -1
  65. package/dist/client/assets/{automations-_IDwlRt9.js → automations-nNRSctV2.js} +1 -1
  66. package/dist/client/assets/{autosend-DwCcNXOp.js → autosend-CdL93bdf.js} +1 -1
  67. package/dist/client/assets/{avatar-CDCXeyeq.js → avatar-STUuRBeL.js} +1 -1
  68. package/dist/client/assets/{badge-CLbg8brP.js → badge-BHUFjOp2.js} +1 -1
  69. package/dist/client/assets/block-document-CVBR247r.js +3 -0
  70. package/dist/client/assets/{brand-context-CLwWQD4a.js → brand-context-CSCxzNyY.js} +1 -1
  71. package/dist/client/assets/{buckets-C6jFjZP6.js → buckets-pkSe0l2x.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BJgqFyPw.js → bulk-category-panel-Dc2Scx8I.js} +1 -1
  73. package/dist/client/assets/{calendar-CIg2EEBJ.js → calendar-BitQQvMp.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-Dx6CWw4N.js → capability-load-error-B3GGAYV9.js} +1 -1
  75. package/dist/client/assets/{card-CGoHKQKX.js → card-eu6g3Ufc.js} +1 -1
  76. package/dist/client/assets/{category-editor-CxVEA7RL.js → category-editor-x8totkcH.js} +1 -1
  77. package/dist/client/assets/{chat-context-BpdINg7c.js → chat-context-DseDiNEh.js} +1 -1
  78. package/dist/client/assets/{checkbox-DiEGmfR1.js → checkbox-BhnQvAdW.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-BGVZ5nYN.js → cli-auth-success-D-YHRBZl.js} +1 -1
  80. package/dist/client/assets/collection-detail-CkwYR8Wb.js +1 -0
  81. package/dist/client/assets/{collection-display-button-Dn4BN1AT.js → collection-display-button-BiPabE6D.js} +1 -1
  82. package/dist/client/assets/{collection-search-DT4BSCdW.js → collection-search-BfgDlrmR.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-CXhf1hUH.js → collection-table-wrapper-BEMGyRyQ.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-CG0FZsKM.js → collection-tabs-CC2gd3e0.js} +1 -1
  85. package/dist/client/assets/{command-KNTOL3kj.js → command-q6wXbz-P.js} +1 -1
  86. package/dist/client/assets/commerce-onboarding-2US92_s_.js +1 -0
  87. package/dist/client/assets/{companions-core-FTf4qGMY.js → companions-core-COK3zE1T.js} +1 -1
  88. package/dist/client/assets/{connect-BE9doFql.js → connect-C_2JUaG9.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-BoS5Hu9R.js → connect-desktop-dialog-DhAWxkv7.js} +1 -1
  90. package/dist/client/assets/{connection-card-Dbj_E-0a.js → connection-card-3KsArvFb.js} +1 -1
  91. package/dist/client/assets/{connection-detail-V6mFx9e6.js → connection-detail-DnlGu2cE.js} +1 -1
  92. package/dist/client/assets/{connection-form-helpers-D0VhJo5T.js → connection-form-helpers-CkWktsxW.js} +1 -1
  93. package/dist/client/assets/{connections-fj3C3XzM.js → connections-CEGqW20q.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-DlsoDrW9.js → decopilot-sse-pool-CHSNG2R3.js} +1 -1
  95. package/dist/client/assets/{dialog-CwEHiSMU.js → dialog-DflEsAVp.js} +1 -1
  96. package/dist/client/assets/{domain-settings-lLJfdhn2.js → domain-settings-CmBXs5S4.js} +1 -1
  97. package/dist/client/assets/{drawer-NqC3cUty.js → drawer-g5OBTlHu.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-Dui6084c.js → dropdown-menu-Bn43QpEP.js} +1 -1
  99. package/dist/client/assets/{empty-state--30EXuZG.js → empty-state-DWA8aJpv.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-5mcb4Mog.js → extract-connection-data-BADrHucW.js} +1 -1
  101. package/dist/client/assets/{file-explorer-CgOnjl_S.js → file-explorer-D_NLzAhM.js} +1 -1
  102. package/dist/client/assets/{file-type-icon-P_pN9_xH.js → file-type-icon-CcQDNpN1.js} +8 -8
  103. package/dist/client/assets/{files-BLAFPbYz.js → files-BXFQeaBN.js} +1 -1
  104. package/dist/client/assets/{form-5ox058mH.js → form-C6P3tBSr.js} +1 -1
  105. package/dist/client/assets/{general-6JhynIjZ.js → general-DA8dkTDQ.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-BqET8_zQ.js → github-repo-picker-BamRwZo6.js} +1 -1
  107. package/dist/client/assets/{hooks-Dcj3etNr.js → hooks-D2X3VJWD.js} +1 -1
  108. package/dist/client/assets/{index-C6ytuOGZ.js → index-BxyxSts9.js} +1 -1
  109. package/dist/client/assets/{index-C5X0kiyr.js → index-C1uYRrdq.js} +1 -1
  110. package/dist/client/assets/{index-CyNeJz90.js → index-C5XDTn-4.js} +1 -1
  111. package/dist/client/assets/{index-C9qzt0Jn.js → index-C7FdAm9g.js} +3 -3
  112. package/dist/client/assets/{index-Cr82fBda.js → index-CIUn1nKq.js} +1 -1
  113. package/dist/client/assets/{index-BELfS11E.js → index-CQUm4N48.js} +1 -1
  114. package/dist/client/assets/{index-qob9QDNh.js → index-CWHoQpVq.js} +1 -1
  115. package/dist/client/assets/{index-DZ0C-1Pb.js → index-C_hhWkSy.js} +1 -1
  116. package/dist/client/assets/{index-BGTjziYz.js → index-CjUOg-D4.js} +1 -1
  117. package/dist/client/assets/{index-BaeEjqV7.js → index-CpcKMJHf.js} +6 -6
  118. package/dist/client/assets/{index-BbdMwuvN.js → index-Crv29523.js} +1 -1
  119. package/dist/client/assets/{index-BhPaswkE.js → index-DA0GYA6l.js} +23 -23
  120. package/dist/client/assets/{index-BNV2EeGI.js → index-DqnBl-rD.js} +1 -1
  121. package/dist/client/assets/{index-CRmtvsLd.js → index-ZXqsiuwe.js} +1 -1
  122. package/dist/client/assets/{index-redirect-sMiFiL_K.js → index-redirect-DHk4L7GR.js} +1 -1
  123. package/dist/client/assets/{input-PlhR5OQl.js → input-CfMu9dzk.js} +1 -1
  124. package/dist/client/assets/{integration-icon-DmDjDu1T.js → integration-icon-C4RBZhRU.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-D79xzFG6.js → invite-member-dialog-CrOemxN3.js} +1 -1
  126. package/dist/client/assets/{label-Dgx54R9B.js → label-CrpJWAf1.js} +1 -1
  127. package/dist/client/assets/{layout-kKX1t2sP.js → layout-Duo3u3mT.js} +1 -1
  128. package/dist/client/assets/{login-wAm8iucL.js → login-D91aPwsO.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-uiWOIXGl.js → mcp-oauth-CklKADlW.js} +1 -1
  130. package/dist/client/assets/{members-Df7bjsef.js → members-Dog4a2Mg.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-BkhNLbLQ.js → monaco-editor-B4H9BgjG.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-C_chKCRP.js → monitoring-stats-row-CUhp2cAb.js} +1 -1
  133. package/dist/client/assets/{multi-select-Ds_o80Ow.js → multi-select-CveplexG.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-DDD-Q2b4.js → oauth-callback-DVLa8LUd.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-B5_IzB1y.js → oauth-callback-ai-provider-BqwL9u1C.js} +1 -1
  136. package/dist/client/assets/{onboarding-B1v12Kxf.js → onboarding-L9R9v_1w.js} +1 -1
  137. package/dist/client/assets/{org-install-ix32v6HG.js → org-install-DKPiUyNe.js} +1 -1
  138. package/dist/client/assets/{org-layout-D3jsdku6.js → org-layout-DKf6bmhG.js} +1 -1
  139. package/dist/client/assets/{organization-choice-DG8veEJJ.js → organization-choice-BppWpWvM.js} +1 -1
  140. package/dist/client/assets/{orgs-DwwYSo1F.js → orgs-C1piZc3b.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-B6-Tjapj.js → page-seo-form-BJXEusVN.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-qJlKNSEX.js +1 -0
  143. package/dist/client/assets/{popover-Cc-bUxo9.js → popover-CrleXxNp.js} +1 -1
  144. package/dist/client/assets/{post-editor-C4wur674.js → post-editor-BT8GSLUo.js} +1 -1
  145. package/dist/client/assets/{primitives-DzhLuT4o.js → primitives-2H2Ul_eR.js} +1 -1
  146. package/dist/client/assets/{profile-MRaW8Iku.js → profile-BSzkb3dI.js} +1 -1
  147. package/dist/client/assets/project-app-view-BDYuE_G5.js +1 -0
  148. package/dist/client/assets/record-editor-BBeFwRxk.js +1 -0
  149. package/dist/client/assets/{redirect-editor-LLRc4D2K.js → redirect-editor-SSQ67xNP.js} +1 -1
  150. package/dist/client/assets/registry-DoJG5JcB.js +2 -0
  151. package/dist/client/assets/{registry-layout-DkldcL5a.js → registry-layout-BEG9DDsM.js} +1 -1
  152. package/dist/client/assets/{reports-B-PUwpKU.js → reports-CCU-aTs3.js} +1 -1
  153. package/dist/client/assets/{require-capability-DLiPnWvZ.js → require-capability-DWm6CNy-.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-BZ6DGJsb.js → required-auth-layout-sdkajhxL.js} +1 -1
  155. package/dist/client/assets/{reset-password-C9volMkn.js → reset-password-C3tyeh9A.js} +1 -1
  156. package/dist/client/assets/roles-OHoOXwCk.js +1 -0
  157. package/dist/client/assets/{search-input-CXhpX-Xz.js → search-input-DVmbIwSm.js} +1 -1
  158. package/dist/client/assets/{secrets-C5-PbNw_.js → secrets-BpxYvB8T.js} +1 -1
  159. package/dist/client/assets/{sections-editor-BYYH09fn.js → sections-editor-zn9qN-zI.js} +1 -1
  160. package/dist/client/assets/{select-BHlpCdw9.js → select-Du6tz3kh.js} +1 -1
  161. package/dist/client/assets/{select-model-DiTMTOsS.js → select-model-CQmu7p41.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-BYT5inCm.js → self-tool-result-ytgEtrIl.js} +1 -1
  163. package/dist/client/assets/{seo-editor-BMESJKUG.js → seo-editor-Bje7uBK2.js} +1 -1
  164. package/dist/client/assets/{settings-layout-BEVTWuIu.js → settings-layout-fbqX-MG3.js} +1 -1
  165. package/dist/client/assets/{settings-section-DYCGsxoQ.js → settings-section-CJRUKep2.js} +1 -1
  166. package/dist/client/assets/{shell-controls-CyEjGQVX.js → shell-controls-KusyRLWm.js} +1 -1
  167. package/dist/client/assets/{shell-layout-DlEDxOSH.js → shell-layout-CKYTXHCu.js} +1 -1
  168. package/dist/client/assets/{sidebar-BT5oq5Py.js → sidebar-BmhMU5lV.js} +1 -1
  169. package/dist/client/assets/{skeleton-DR0dV7Rx.js → skeleton-DTqxvLBu.js} +1 -1
  170. package/dist/client/assets/{sso-CSnQvRdb.js → sso-B1JjQ4Kh.js} +1 -1
  171. package/dist/client/assets/{store-DCbdRWaM.js → store-BDHKoNfM.js} +1 -1
  172. package/dist/client/assets/store-registry-DZaeK6xH.js +2 -0
  173. package/dist/client/assets/{studio-tools-BSpHTnkI.js → studio-tools-D5s2iCWq.js} +1 -1
  174. package/dist/client/assets/{switch-DNcfs8uV.js → switch-CdtDoLmP.js} +1 -1
  175. package/dist/client/assets/{table-BO7AXCJj.js → table-D6cnU27A.js} +1 -1
  176. package/dist/client/assets/{tabs-BOn-uUO8.js → tabs-DPZhfEpX.js} +1 -1
  177. package/dist/client/assets/{textarea-2FS82hTt.js → textarea-Xd9JewQa.js} +1 -1
  178. package/dist/client/assets/{toggle-group-Bp5y9M5o.js → toggle-group-C4W2MbVL.js} +1 -1
  179. package/dist/client/assets/{toolbar-lB-S2vpV.js → toolbar-CihMw0LK.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-BX6tvqZL.js → toolbar-icon-button-C5qmOl3U.js} +1 -1
  181. package/dist/client/assets/{tooltip-D9NGFdPV.js → tooltip-D8I4xgP8.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-BQWD6Fbv.js → use-ai-providers-Cmmx4PkW.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-B9APB1Uz.js → use-api-keys-XSVvKZHS.js} +1 -1
  184. package/dist/client/assets/{use-automations-Vb2lhz9-.js → use-automations-DacHE3Xy.js} +1 -1
  185. package/dist/client/assets/{use-autosave-0f1y6oqV.js → use-autosave-CAKCkNau.js} +1 -1
  186. package/dist/client/assets/{use-capability-COYHR3-p.js → use-capability-CPTz8Ujk.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BRgf5NQf.js → use-clock-tick-155i4HwF.js} +1 -1
  188. package/dist/client/assets/{use-connection-DpuO4fNw.js → use-connection-DbaNggp4.js} +1 -1
  189. package/dist/client/assets/{use-copy-BeT4l9EL.js → use-copy-BqB7SD7Y.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-41F9ENXu.js → use-create-virtual-mcp-Btn3qRQf.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-CRjEG81o.js → use-debounced-autosave-BZRkS_eh.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-NzmZPT1j.js → use-debounced-value-8smeSlAm.js} +1 -1
  193. package/dist/client/assets/{use-deco-credits-BICXIEvI.js → use-deco-credits-CWim1XTX.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-B2udrR1E.js → use-decopilot-events-CA5qoH7E.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-I4CFeUrd.js → use-delete-connection-C9fvQqfZ.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-D5UxXiFy.js → use-deployment-admin-Boe_Ihmh.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-BxxfQuJb.js → use-file-configs-Y1J31dyQ.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-Czt7JOf8.js → use-infinite-scroll-vHSG7AxL.js} +1 -1
  199. package/dist/client/assets/{use-join-requests-BAcrUcz7.js → use-join-requests-D9SB3yeo.js} +1 -1
  200. package/dist/client/assets/{use-mcp-auth-status-CnFSrLEj.js → use-mcp-auth-status-BqXsT5WV.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-tcmKmN21.js → use-mcp-client-DDmvok5R.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-DIqHvolA.js → use-mcp-tools-B71sSTr4.js} +1 -1
  203. package/dist/client/assets/{use-members-atWSP-WF.js → use-members-WvOf4_vR.js} +1 -1
  204. package/dist/client/assets/{use-mobile-2yLfYt8o.js → use-mobile-BlZOnSdH.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-BAhIUAJc.js → use-navigate-to-agent-BJfnV5Hb.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-CF9Xv674.js → use-org-auth-client-DOe1-YEw.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-D55i4f0_.js → use-org-sso-CLusgGXY.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-CTaZXibc.js → use-organization-roles-BQ1sH-WS.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-Coxn0MdD.js → use-organization-settings-C2Rlhb_g.js} +1 -1
  210. package/dist/client/assets/{use-registry-app-hSt4mgU8.js → use-registry-app-BkNbCzQ_.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-Mt2VCkjn.js → use-registry-connections-1FFiww3l.js} +1 -1
  212. package/dist/client/assets/{use-secrets-CgXohDMi.js → use-secrets-B8shAzNP.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-BADjzMyd.js → use-status-sounds-BSx0lVm6.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-h6gpir15.js → use-view-mode-DYRrwd_4.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-MeqW96-1.js → use-virtual-mcp-D4AVSx6g.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-DTsg_ujq.js +1 -0
  217. package/dist/client/assets/{useRouterState-N0q5mOQR.js → useRouterState-BY0JMcAQ.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-BBxTPEk3.js +1 -0
  219. package/dist/client/assets/{users-CJv38_2t.js → users-CllKdANz.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-erhHGjtK.js → variant-calendar-CouSe9-U.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-Wr5FnjMg.js → view-mode-toggle-DI97LcTH.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +2 -2
  224. package/dist/server/server.js +2 -2
  225. package/package.json +1 -1
  226. package/dist/client/assets/block-document-pbbZw2CP.js +0 -3
  227. package/dist/client/assets/collection-detail-DZbpwovT.js +0 -1
  228. package/dist/client/assets/commerce-onboarding-BMEY1DKe.js +0 -1
  229. package/dist/client/assets/page-seo-sheet-CPcGy_lc.js +0 -1
  230. package/dist/client/assets/project-app-view-Dp8aqKn9.js +0 -1
  231. package/dist/client/assets/record-editor-DNp_YJwU.js +0 -1
  232. package/dist/client/assets/registry-bT72xUUs.js +0 -2
  233. package/dist/client/assets/roles-CiGDH8Hn.js +0 -1
  234. package/dist/client/assets/store-registry-C2gPY7Xh.js +0 -2
  235. package/dist/client/assets/useInfiniteQuery-C6O0Jfl2.js +0 -1
  236. package/dist/client/assets/useSuspenseInfiniteQuery-DrfctcYn.js +0 -1
@@ -1 +1 @@
1
- import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-BaeEjqV7.js";import{i as Z}from"./ArrowRight-ZH8AfOrt.js";import{c as U}from"./ZoomOut-IrGAWsFW.js";import{n as _}from"./LinkExternal01-BE6iPh6Z.js";import{aO as K}from"./agent-icon-DJ-fLRqx.js";import{f as tt,e as ot,b as et,A as rt,a as it,d as st,c as at,g as nt}from"./alert-dialog-S-vKrHdP.js";import{I as W}from"./input-PlhR5OQl.js";import{L as q}from"./label-Dgx54R9B.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-BhPaswkE.js";import{c as ft,B as ht,a as yt}from"./block-document-pbbZw2CP.js";import{u as bt}from"./use-autosave-0f1y6oqV.js";import{t as jt}from"./ChevronDown-D19e4E2W.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-C5OD2vNu.js";import{s as b,E as Nt}from"./primitives-DzhLuT4o.js";import"./AlertCircle-DHJMAy0z.js";import"./Tool01-BsH7bOGE.js";import"./ArrowUp-BEvOvB39.js";import"./Settings02-Dg48gy-m.js";import"./Tool02-CpEmuwVJ.js";import"./ArrowUpRight-CB2lmsga.js";import"./TrendUp01-DFaJzXrF.js";import"./ZapSquare-CdnVBk-J.js";import"./Users03-Dqh1PO2N.js";import"./CheckCircle-8lNaIJZX.js";import"./Check-8S_h-pNf.js";import"./ChevronRight-DMiFqEFB.js";import"./ChevronUp-CDr-5amA.js";import"./DotsVertical-Ddcp5zYy.js";import"./Stars02-DF0mhAvh.js";import"./Copy01-CVgcePVg.js";import"./Globe01-ByEypwqT.js";import"./Eye-DjxTeGvc.js";import"./FilterLines-sMM8U03Q.js";import"./Star01-DBzet7vh.js";import"./Globe04-CLktRX73.js";import"./SwitchHorizontal01-g8c5_DAA.js";import"./HardDrive-LZLUcrQT.js";import"./Image01-BC4H1plu.js";import"./Key01-BJ5pxmk5.js";import"./LayoutLeft-BY0vokwF.js";import"./XCircle-Cv1eNWoM.js";import"./Monitor01-D5bQ7ld2.js";import"./Sun-DWQi7hi9.js";import"./Package-Dgaviqf5.js";import"./Palette-BLetgCYz.js";import"./Play-D4uEf4_3.js";import"./Plus-B99BOqFt.js";import"./SearchLg-0vJ_NGT1.js";import"./SearchMd--QTHPVfW.js";import"./Shield01-XjAbmrcl.js";import"./Stars01-DBeF8eO9.js";import"./Trash01-sz1B1ubO.js";import"./Upload01-DZkj6_Us.js";import"./User01-Cy4n4fwd.js";import"./Users01-CiJE_Dg-.js";import"./XClose-Ckol2oql.js";import"./X-BFNxuShY.js";import"./Zap-DTU6QUr-.js";import"./chat-context-BpdINg7c.js";import"./autosend-DwCcNXOp.js";import"./hooks-Dcj3etNr.js";import"./use-mcp-client-tcmKmN21.js";import"./auth-LsRMSxpZ.js";import"./decopilot-sse-pool-DlsoDrW9.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BSpHTnkI.js";import"./use-virtual-mcp-MeqW96-1.js";import"./use-ai-providers-BQWD6Fbv.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-B2udrR1E.js";import"./use-organization-settings-Coxn0MdD.js";import"./tooltip-D9NGFdPV.js";import"./dialog-CwEHiSMU.js";import"./drawer-NqC3cUty.js";import"./collection-search-DT4BSCdW.js";import"./use-mobile-2yLfYt8o.js";import"./AreaChart-BP3LRAVY.js";import"./index-BELfS11E.js";import"./calendar-CIg2EEBJ.js";import"./shell-layout-DlEDxOSH.js";import"./avatar-CDCXeyeq.js";import"./required-auth-layout-BZ6DGJsb.js";import"./use-org-sso-D55i4f0_.js";import"./index-C9qzt0Jn.js";import"./get-initials-D-f_fDFw.js";import"./popover-Cc-bUxo9.js";import"./use-registry-app-hSt4mgU8.js";import"./use-mcp-tools-DIqHvolA.js";import"./use-connection-DpuO4fNw.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ccpCvQUL.js";import"./mcp-oauth-uiWOIXGl.js";import"./extract-connection-data-5mcb4Mog.js";import"./use-members-atWSP-WF.js";import"./use-org-auth-client-CF9Xv674.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-Dui6084c.js";import"./use-copy-BeT4l9EL.js";import"./command-KNTOL3kj.js";import"./index-Cr82fBda.js";import"./companions-core-FTf4qGMY.js";import"./form-5ox058mH.js";import"./select-BHlpCdw9.js";import"./tabs-BOn-uUO8.js";import"./toggle-group-Bp5y9M5o.js";import"./use-deco-credits-BICXIEvI.js";import"./connection-card-Dbj_E-0a.js";import"./use-registry-connections-Mt2VCkjn.js";import"./useInfiniteQuery-C6O0Jfl2.js";import"./use-infinite-scroll-Czt7JOf8.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CGoHKQKX.js";import"./integration-icon-DmDjDu1T.js";import"./textarea-2FS82hTt.js";import"./connection-form-helpers-D0VhJo5T.js";import"./collection-tabs-CG0FZsKM.js";import"./badge-CLbg8brP.js";import"./useSuspenseInfiniteQuery-DrfctcYn.js";import"./connect-desktop-dialog-BoS5Hu9R.js";import"./select-model-DiTMTOsS.js";import"./checkbox-DiEGmfR1.js";import"./skeleton-DR0dV7Rx.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DYCGsxoQ.js";import"./index-BGTjziYz.js";import"./file-type-icon-P_pN9_xH.js";import"./toolbar-lB-S2vpV.js";import"./use-debounced-value-NzmZPT1j.js";import"./index-CyNeJz90.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BADjzMyd.js";import"./empty-state--30EXuZG.js";import"./use-capability-COYHR3-p.js";import"./toolbar-icon-button-BX6tvqZL.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-CRjEG81o.js";import"./index-C6ytuOGZ.js";import"./sidebar-BT5oq5Py.js";import"./search-input-CXhpX-Xz.js";import"./use-mcp-auth-status-CnFSrLEj.js";import"./switch-DNcfs8uV.js";import"./github-repo-picker-BqET8_zQ.js";import"./use-navigate-to-agent-BAhIUAJc.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CgXohDMi.js";import"./monaco-editor-BkhNLbLQ.js";import"./use-file-configs-BxxfQuJb.js";import"./use-automations-Vb2lhz9-.js";import"./automation-list-row-B36cFYnc.js";import"./table-BO7AXCJj.js";import"./use-clock-tick-BRgf5NQf.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function vr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:J,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{vr as CategoryEditor};
1
+ import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-CpcKMJHf.js";import{i as Z}from"./ArrowRight-AiWOWM1Z.js";import{c as U}from"./ZoomOut-_xCY1UeS.js";import{n as _}from"./LinkExternal01-DzfAn4aY.js";import{aO as K}from"./agent-icon-DclSthKR.js";import{f as tt,e as ot,b as et,A as rt,a as it,d as st,c as at,g as nt}from"./alert-dialog-C9TCdYEA.js";import{I as W}from"./input-CfMu9dzk.js";import{L as q}from"./label-CrpJWAf1.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-DA0GYA6l.js";import{c as ft,B as ht,a as yt}from"./block-document-CVBR247r.js";import{u as bt}from"./use-autosave-CAKCkNau.js";import{t as jt}from"./ChevronDown-CjhsyPt5.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-DYLrph2F.js";import{s as b,E as Nt}from"./primitives-2H2Ul_eR.js";import"./AlertCircle-CE7GxjMO.js";import"./Tool01-D_3zbU3k.js";import"./ArrowUp-BsjWGQQe.js";import"./Settings02-htWR982a.js";import"./Tool02-DiUu9qs_.js";import"./ArrowUpRight-B2LSEvMX.js";import"./TrendUp01-DPzDlutQ.js";import"./ZapSquare-z-XJEPEB.js";import"./Users03-BWpBf_La.js";import"./CheckCircle-Cf21Bb8a.js";import"./Check-BWvX1ZXX.js";import"./ChevronRight-C0U1fSzL.js";import"./ChevronUp-CJR37gbq.js";import"./DotsVertical-DXSJrP0z.js";import"./Stars02-CxJPie3_.js";import"./Copy01-B8tpQC9Q.js";import"./Globe01-BHWZq2K5.js";import"./Eye-CximEfBL.js";import"./FilterLines-CQAFehUr.js";import"./Star01-Dh17NHJI.js";import"./Globe04-Dw5Bsm8V.js";import"./SwitchHorizontal01-BwNckjDk.js";import"./HardDrive-CwNWMpvl.js";import"./Image01-BorH67fS.js";import"./Key01-Bjj-aLS5.js";import"./LayoutLeft-CxMDbMdN.js";import"./XCircle-D6dsYD0i.js";import"./Monitor01-B11z__w7.js";import"./Sun-DaIRBGtL.js";import"./Package-BkoPZ3tG.js";import"./Palette-RNOi-9O1.js";import"./Play-CL_a6mE6.js";import"./Plus-BiNu4BNf.js";import"./SearchLg-D8wz7WQH.js";import"./SearchMd-JyzroHdN.js";import"./Shield01-BVyqSeQM.js";import"./Stars01-BMXw5BeL.js";import"./Trash01-WLvc7qEr.js";import"./Upload01-Bx5CpiF6.js";import"./User01-CWpJwa6r.js";import"./Users01-ChKK2Tx6.js";import"./XClose-EYXyD43I.js";import"./X-CfAlZN0E.js";import"./Zap-CieQ7Tpq.js";import"./chat-context-DseDiNEh.js";import"./autosend-CdL93bdf.js";import"./hooks-D2X3VJWD.js";import"./use-mcp-client-DDmvok5R.js";import"./auth-D0JrqMBg.js";import"./decopilot-sse-pool-CHSNG2R3.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-D5s2iCWq.js";import"./use-virtual-mcp-D4AVSx6g.js";import"./use-ai-providers-Cmmx4PkW.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CA5qoH7E.js";import"./use-organization-settings-C2Rlhb_g.js";import"./tooltip-D8I4xgP8.js";import"./dialog-DflEsAVp.js";import"./drawer-g5OBTlHu.js";import"./collection-search-BfgDlrmR.js";import"./use-mobile-BlZOnSdH.js";import"./AreaChart-Czn9zcW2.js";import"./index-CQUm4N48.js";import"./calendar-BitQQvMp.js";import"./shell-layout-CKYTXHCu.js";import"./avatar-STUuRBeL.js";import"./required-auth-layout-sdkajhxL.js";import"./use-org-sso-CLusgGXY.js";import"./index-C7FdAm9g.js";import"./get-initials-D-f_fDFw.js";import"./popover-CrleXxNp.js";import"./use-registry-app-BkNbCzQ_.js";import"./use-mcp-tools-B71sSTr4.js";import"./use-connection-DbaNggp4.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-DxQCI97g.js";import"./mcp-oauth-CklKADlW.js";import"./extract-connection-data-BADrHucW.js";import"./use-members-WvOf4_vR.js";import"./use-org-auth-client-DOe1-YEw.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-Bn43QpEP.js";import"./use-copy-BqB7SD7Y.js";import"./command-q6wXbz-P.js";import"./index-CIUn1nKq.js";import"./companions-core-COK3zE1T.js";import"./form-C6P3tBSr.js";import"./select-Du6tz3kh.js";import"./tabs-DPZhfEpX.js";import"./toggle-group-C4W2MbVL.js";import"./use-deco-credits-CWim1XTX.js";import"./connection-card-3KsArvFb.js";import"./use-registry-connections-1FFiww3l.js";import"./useInfiniteQuery-DTsg_ujq.js";import"./use-infinite-scroll-vHSG7AxL.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-eu6g3Ufc.js";import"./integration-icon-C4RBZhRU.js";import"./textarea-Xd9JewQa.js";import"./connection-form-helpers-CkWktsxW.js";import"./collection-tabs-CC2gd3e0.js";import"./badge-BHUFjOp2.js";import"./useSuspenseInfiniteQuery-BBxTPEk3.js";import"./connect-desktop-dialog-DhAWxkv7.js";import"./select-model-CQmu7p41.js";import"./checkbox-BhnQvAdW.js";import"./skeleton-DTqxvLBu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CJRUKep2.js";import"./index-CjUOg-D4.js";import"./file-type-icon-CcQDNpN1.js";import"./toolbar-CihMw0LK.js";import"./use-debounced-value-8smeSlAm.js";import"./index-C5XDTn-4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BSx0lVm6.js";import"./empty-state-DWA8aJpv.js";import"./use-capability-CPTz8Ujk.js";import"./toolbar-icon-button-C5qmOl3U.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BZRkS_eh.js";import"./index-BxyxSts9.js";import"./sidebar-BmhMU5lV.js";import"./search-input-DVmbIwSm.js";import"./use-mcp-auth-status-BqXsT5WV.js";import"./switch-CdtDoLmP.js";import"./github-repo-picker-BamRwZo6.js";import"./use-navigate-to-agent-BJfnV5Hb.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-B8shAzNP.js";import"./monaco-editor-B4H9BgjG.js";import"./use-file-configs-Y1J31dyQ.js";import"./use-automations-DacHE3Xy.js";import"./automation-list-row-BRNOh7Fh.js";import"./table-D6cnU27A.js";import"./use-clock-tick-155i4HwF.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function vr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:J,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{vr as CategoryEditor};
@@ -1,4 +1,4 @@
1
- import{c as oe,m as Ye,bA as Je,j as B,F as Y,K as fe,n as et,cv as tt,V as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,d as Qe,f as nt,r as x,b as Me,q as st,a as at,v as ot,al as rt}from"./index-BaeEjqV7.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-DwCcNXOp.js";import{S as dt,b as ut,e as pt,u as ft}from"./hooks-Dcj3etNr.js";import{u as ht}from"./studio-tools-BSpHTnkI.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-tcmKmN21.js";import{a as xt}from"./use-virtual-mcp-MeqW96-1.js";import{u as St,a as me}from"./use-ai-providers-BQWD6Fbv.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-B2udrR1E.js";import{e as Tt}from"./use-organization-settings-Coxn0MdD.js";const wt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Et={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},At={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},_t={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Rt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},$t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Ve(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Be(t){return t.asyncResearch!==!0&&Ve(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Ve(t.modelId)}function le(t,e,n,a){for(const s of n){const o=t.find(r=>r.modelId===s);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const s of n){const o=t.find(r=>r.modelId.includes(s));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(a){const s=t.find(a);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const a of t){const s=e[a.id]??[],o=a.providerId;n.chat.fast||(n.chat.fast=le(s,a.id,wt[o]??[])),n.chat.smart||(n.chat.smart=le(s,a.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=le(s,a.id,At[o]??[])),n.image||(n.image=le(s,a.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=le(s,a.id,Rt[o]??[],Be)),n.deepResearch||(n.deepResearch=le(s,a.id,$t[o]??[],He))}return n}const Lt=Je("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=oe.c(10),{variant:n,size:a}=t;let s;e[0]!==a||e[1]!==n?(s=Ye(Lt({variant:n,size:a})),e[0]=a,e[1]=n,e[2]=s):s=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=B.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=B.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==s?(i=B.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=s,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=B.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=B.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=oe.c(9),{org:n}=Y(),a=ht(),s=t?.fast??!1;let o;e[0]!==n.id?(o=fe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==a?(r=async()=>{const v=await a.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=a,e[3]=r):r=e[3];const i=s?1e3:1e4,u=s?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function qt(t,e=[]){return t==="stop"?e.filter(s=>s.type==="text"&&s.text).map(s=>s.text).join(`
1
+ import{c as oe,m as Ye,bA as Je,j as B,F as Y,K as fe,n as et,cv as tt,V as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,d as Qe,f as nt,r as x,b as Me,q as st,a as at,v as ot,al as rt}from"./index-CpcKMJHf.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-CdL93bdf.js";import{S as dt,b as ut,e as pt,u as ft}from"./hooks-D2X3VJWD.js";import{u as ht}from"./studio-tools-D5s2iCWq.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-DDmvok5R.js";import{a as xt}from"./use-virtual-mcp-D4AVSx6g.js";import{u as St,a as me}from"./use-ai-providers-Cmmx4PkW.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-CA5qoH7E.js";import{e as Tt}from"./use-organization-settings-C2Rlhb_g.js";const wt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Et={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},At={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},_t={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Rt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},$t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Ve(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Be(t){return t.asyncResearch!==!0&&Ve(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Ve(t.modelId)}function le(t,e,n,a){for(const s of n){const o=t.find(r=>r.modelId===s);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const s of n){const o=t.find(r=>r.modelId.includes(s));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(a){const s=t.find(a);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const a of t){const s=e[a.id]??[],o=a.providerId;n.chat.fast||(n.chat.fast=le(s,a.id,wt[o]??[])),n.chat.smart||(n.chat.smart=le(s,a.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=le(s,a.id,At[o]??[])),n.image||(n.image=le(s,a.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=le(s,a.id,Rt[o]??[],Be)),n.deepResearch||(n.deepResearch=le(s,a.id,$t[o]??[],He))}return n}const Lt=Je("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=oe.c(10),{variant:n,size:a}=t;let s;e[0]!==a||e[1]!==n?(s=Ye(Lt({variant:n,size:a})),e[0]=a,e[1]=n,e[2]=s):s=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=B.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=B.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==s?(i=B.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=s,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=B.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=B.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=oe.c(9),{org:n}=Y(),a=ht(),s=t?.fast??!1;let o;e[0]!==n.id?(o=fe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==a?(r=async()=>{const v=await a.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=a,e[3]=r):r=e[3];const i=s?1e3:1e4,u=s?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function qt(t,e=[]){return t==="stop"?e.filter(s=>s.type==="text"&&s.text).map(s=>s.text).join(`
2
2
  `).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(a=>a.type==="tool-user_ask"&&a.state==="input-available"||a.state==="approval-requested")?"requires_action":"completed":"failed"}const Ce={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Ft(t,e){if(!t)return null;const n=e?tt(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[a,s]of Object.entries(Ce))if(s.harness===t&&s.sandbox===n)return a;return null}function wn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function jt(t,e){return e&&t&&Ce[t].sandbox==="user-desktop"?"decopilot":t}function Ut(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Qt(t){const e=oe.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const a=je(n);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const o=Ae(s);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?It(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const i=r;let u;if(e[7]!==a?.params.appSlug||e[8]!==a?.params.collectionName||e[9]!==a?.params.itemId||e[10]!==i||e[11]!==t){if(u=[],t&&u.push(`### Selected Agent
3
3
  - ID: ${t}`),i){let y;e[13]!==i?(y=bt(i),e[13]=i,e[14]=y):y=e[14];const v=y;let w;e[15]!==i?(w=vt(i),e[15]=i,e[16]=w):w=e[16],u.push(`### Currently Open File
4
4
  The user has this file open in the Library and is most likely referring to it:
@@ -1 +1 @@
1
- import{c as n,m as d,j as c,bC as l,bD as m}from"./index-BaeEjqV7.js";import{i as b}from"./Check-8S_h-pNf.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{c as n,m as d,j as c,bC as l,bD as m}from"./index-CpcKMJHf.js";import{i as b}from"./Check-BWvX1ZXX.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
@@ -1 +1 @@
1
- import{c as a,a as c,r as m,j as o}from"./index-BaeEjqV7.js";import{A as u}from"./auth-split-layout-CTdOwwE2.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
1
+ import{c as a,a as c,r as m,j as o}from"./index-CpcKMJHf.js";import{A as u}from"./auth-split-layout-AjVuDFuV.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
@@ -0,0 +1 @@
1
+ import{c as k,j as t,B as K,k as oe,J as Ge,M as re,b as Q,E as Ee,r as E,F as fe,ba as Xe,bb as Re,R as Ze,m as W,bc as et,u as tt,L as te,t as st,f as he,a_ as Oe}from"./index-CpcKMJHf.js";import{E as Fe}from"./empty-state-DWA8aJpv.js";import{u as ge}from"./use-mcp-client-DDmvok5R.js";import{F as ae,a as lt,b as ce,d as de}from"./form-C6P3tBSr.js";import{I as pe}from"./input-CfMu9dzk.js";import{T as xe}from"./textarea-Xd9JewQa.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-C_hhWkSy.js";import{aA as at,T as ct,ar as dt,$ as mt,a9 as ut,aB as pt,a7 as ye}from"./agent-icon-DclSthKR.js";import{g as xt,M as ft,a as we}from"./index-CQUm4N48.js";import{A as ht,a as gt,b as jt}from"./alert-BPcaPAJj.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-Du6tz3kh.js";import{c as bt,b as Pe,T as ke,a as Ae}from"./tooltip-D8I4xgP8.js";import{i as Nt}from"./AlertCircle-CE7GxjMO.js";import{s as vt}from"./Stars02-CxJPie3_.js";import{a as St}from"./Copy01-B8tpQC9Q.js";import{i as yt}from"./Play-CL_a6mE6.js";import{i as wt}from"./ChevronRight-C0U1fSzL.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-BqXsT5WV.js";import{a as Me,u as ze}from"./use-connection-DbaNggp4.js";import{a as Tt}from"./use-mcp-tools-B71sSTr4.js";import{M as Pt,c as kt}from"./monaco-editor-B4H9BgjG.js";import{I as De}from"./integration-icon-C4RBZhRU.js";import{h as At,m as Dt}from"./chat-context-DseDiNEh.js";import{u as Et}from"./shell-layout-CKYTXHCu.js";import{n as Rt}from"./Tool02-DiUu9qs_.js";import"./auth-D0JrqMBg.js";import"./label-CrpJWAf1.js";import"./index-BxyxSts9.js";import"./sidebar-BmhMU5lV.js";import"./LayoutLeft-CxMDbMdN.js";import"./use-mobile-BlZOnSdH.js";import"./X-CfAlZN0E.js";import"./ZoomOut-_xCY1UeS.js";import"./Key01-Bjj-aLS5.js";import"./extract-connection-data-BADrHucW.js";import"./use-registry-connections-1FFiww3l.js";import"./use-organization-settings-C2Rlhb_g.js";import"./studio-tools-D5s2iCWq.js";import"./Plus-BiNu4BNf.js";import"./index-CWHoQpVq.js";import"./index-CIUn1nKq.js";import"./popover-CrleXxNp.js";import"./use-virtual-mcp-D4AVSx6g.js";import"./Check-BWvX1ZXX.js";import"./SearchMd-JyzroHdN.js";import"./Users03-BWpBf_La.js";import"./use-create-virtual-mcp-Btn3qRQf.js";import"./use-navigate-to-agent-BJfnV5Hb.js";import"./hooks-D2X3VJWD.js";import"./decopilot-sse-pool-CHSNG2R3.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-D_3zbU3k.js";import"./ArrowUp-BsjWGQQe.js";import"./Settings02-htWR982a.js";import"./ArrowRight-AiWOWM1Z.js";import"./ArrowUpRight-B2LSEvMX.js";import"./TrendUp01-DPzDlutQ.js";import"./ZapSquare-z-XJEPEB.js";import"./CheckCircle-Cf21Bb8a.js";import"./ChevronDown-CjhsyPt5.js";import"./ChevronUp-CJR37gbq.js";import"./DotsVertical-DXSJrP0z.js";import"./Globe01-BHWZq2K5.js";import"./Eye-CximEfBL.js";import"./FilterLines-CQAFehUr.js";import"./Star01-Dh17NHJI.js";import"./Globe04-Dw5Bsm8V.js";import"./SwitchHorizontal01-BwNckjDk.js";import"./HardDrive-CwNWMpvl.js";import"./Image01-BorH67fS.js";import"./XCircle-D6dsYD0i.js";import"./LinkExternal01-DzfAn4aY.js";import"./Monitor01-B11z__w7.js";import"./Sun-DaIRBGtL.js";import"./Package-BkoPZ3tG.js";import"./Palette-RNOi-9O1.js";import"./SearchLg-D8wz7WQH.js";import"./Shield01-BVyqSeQM.js";import"./Stars01-BMXw5BeL.js";import"./Trash01-WLvc7qEr.js";import"./Upload01-Bx5CpiF6.js";import"./User01-CWpJwa6r.js";import"./Users01-ChKK2Tx6.js";import"./XClose-EYXyD43I.js";import"./Zap-CieQ7Tpq.js";import"./badge-BHUFjOp2.js";import"./mcp-oauth-CklKADlW.js";import"./index-C5XDTn-4.js";import"./autosend-CdL93bdf.js";import"./use-ai-providers-Cmmx4PkW.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CA5qoH7E.js";import"./avatar-STUuRBeL.js";import"./dialog-DflEsAVp.js";import"./required-auth-layout-sdkajhxL.js";import"./use-org-sso-CLusgGXY.js";function Ot(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ge({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function zt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Xe(n,"PROMPT",l,d),x=Re(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ze(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Ot,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let R;return e[38]!==A||e[39]!==D||e[40]!==w?(R=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=R):R=e[41],R}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function G(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),R=Me(e),C=At(),I=Dt(),{openSidePanel:O}=Et(),U=`${e}:${s}`,M=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:M}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(O("chat"),C.sendMessage({tiptapDoc:j}))},[z,L]=E.useState("json"),[q,Y]=E.useState(!1);F&&!q&&(L("ui"),Y(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],X=be.length>0,Z={};if(X&&v?.inputSchema?.properties)for(const u of be)Z[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!M)throw new Error("MCP client is not available");const j=X?{...Z,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();X&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await M.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Ye=JSON.stringify(ee),ve=new TextEncoder().encode(Ye).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(G,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(G,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(G,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:X&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":Z[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":Z[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!X?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&z==="ui"&&M?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:M,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!Me(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=ze(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=ze(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Re(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==a.slug?(C=t.jsx(G,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(G,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(G,{children:t.jsx(Ue,{children:R})}),s[24]=R,s[25]=U):U=s[25];let M;s[26]!==O||s[27]!==U||s[28]!==C?(M=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=M):M=s[29];const V=M;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let z;s[40]!==o?(z=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=z):z=s[41];let L;s[42]!==d||s[43]!==z?(L={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let Y;return s[49]!==V||s[50]!==q?(Y=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=Y):Y=s[51],Y}function Yt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Yt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
@@ -1 +1 @@
1
- import{c as $,b as A,j as s,m as z,B as E}from"./index-BaeEjqV7.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-Dui6084c.js";import{i as R,n as _}from"./ArrowUp-BEvOvB39.js";import{i as V}from"./Check-8S_h-pNf.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-g8c5_DAA.js";import{T as W,a as q,c as G,b as H}from"./tooltip-D9NGFdPV.js";import{V as J}from"./view-mode-toggle-Wr5FnjMg.js";import{B as Q}from"./badge-CLbg8brP.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
1
+ import{c as $,b as A,j as s,m as z,B as E}from"./index-CpcKMJHf.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-Bn43QpEP.js";import{i as R,n as _}from"./ArrowUp-BsjWGQQe.js";import{i as V}from"./Check-BWvX1ZXX.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-BwNckjDk.js";import{T as W,a as q,c as G,b as H}from"./tooltip-D8I4xgP8.js";import{V as J}from"./view-mode-toggle-DI97LcTH.js";import{B as Q}from"./badge-BHUFjOp2.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
@@ -1 +1 @@
1
- import{c as k,m as b,j as n,k as v}from"./index-BaeEjqV7.js";import{i as w}from"./SearchMd--QTHPVfW.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as k,m as b,j as n,k as v}from"./index-CpcKMJHf.js";import{i as w}from"./SearchMd-JyzroHdN.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as k,j as r,m as C,b as S}from"./index-BaeEjqV7.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-BO7AXCJj.js";import{i as D,n as E}from"./ArrowUp-BEvOvB39.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,m as C,b as S}from"./index-CpcKMJHf.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-D6cnU27A.js";import{i as D,n as E}from"./ArrowUp-BsjWGQQe.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,m as u,j as m}from"./index-BaeEjqV7.js";import{B as g}from"./badge-CLbg8brP.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,m as u,j as m}from"./index-CpcKMJHf.js";import{B as g}from"./badge-BHUFjOp2.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,m as i,j as n}from"./index-BaeEjqV7.js";import{_ as m}from"./index-Cr82fBda.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-CwEHiSMU.js";import{i as y}from"./SearchMd--QTHPVfW.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
1
+ import{c as d,m as i,j as n}from"./index-CpcKMJHf.js";import{_ as m}from"./index-CIUn1nKq.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-DflEsAVp.js";import{i as y}from"./SearchMd-JyzroHdN.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
@@ -0,0 +1 @@
1
+ import{c as I,b as q,j as o,u as Ke,p as tt,q as Ce,r as H,a as Te,d as rt,s as it,e as Qe,v as Se,w as Ye,Q as ot,E as nt,K as De,x as Ae,B as ze,N as st,m as $e}from"./index-CpcKMJHf.js";import{L as at,s as Le,S as Ge,a as He,b as ke,c as Me,i as lt,n as Pe,C as Je,p as Ie}from"./self-tool-result-ytgEtrIl.js";import{A as ct}from"./auth-entry-D9yXCnjT.js";import{A as mt}from"./auth-split-layout-AjVuDFuV.js";import{O as We}from"./organization-choice-BppWpWvM.js";import{I as ut}from"./input-CfMu9dzk.js";import{D as dt,a as qe,b as gt,c as ft}from"./dropdown-menu-Bn43QpEP.js";import{S as pt,u as ht,W as bt,g as xt,a as yt}from"./use-mcp-client-DDmvok5R.js";import{i as Ct}from"./ArrowRight-AiWOWM1Z.js";import"./integration-icon-C4RBZhRU.js";import"./Tool02-DiUu9qs_.js";import"./agent-icon-DclSthKR.js";import"./AlertCircle-CE7GxjMO.js";import"./Tool01-D_3zbU3k.js";import"./ArrowUp-BsjWGQQe.js";import"./Settings02-htWR982a.js";import"./ArrowUpRight-B2LSEvMX.js";import"./TrendUp01-DPzDlutQ.js";import"./ZapSquare-z-XJEPEB.js";import"./ZoomOut-_xCY1UeS.js";import"./Users03-BWpBf_La.js";import"./CheckCircle-Cf21Bb8a.js";import"./Check-BWvX1ZXX.js";import"./ChevronDown-CjhsyPt5.js";import"./ChevronRight-C0U1fSzL.js";import"./ChevronUp-CJR37gbq.js";import"./DotsVertical-DXSJrP0z.js";import"./Stars02-CxJPie3_.js";import"./Copy01-B8tpQC9Q.js";import"./Globe01-BHWZq2K5.js";import"./Eye-CximEfBL.js";import"./FilterLines-CQAFehUr.js";import"./Star01-Dh17NHJI.js";import"./Globe04-Dw5Bsm8V.js";import"./SwitchHorizontal01-BwNckjDk.js";import"./HardDrive-CwNWMpvl.js";import"./Image01-BorH67fS.js";import"./Key01-Bjj-aLS5.js";import"./LayoutLeft-CxMDbMdN.js";import"./XCircle-D6dsYD0i.js";import"./LinkExternal01-DzfAn4aY.js";import"./Monitor01-B11z__w7.js";import"./Sun-DaIRBGtL.js";import"./Package-BkoPZ3tG.js";import"./Palette-RNOi-9O1.js";import"./Play-CL_a6mE6.js";import"./Plus-BiNu4BNf.js";import"./SearchLg-D8wz7WQH.js";import"./SearchMd-JyzroHdN.js";import"./Shield01-BVyqSeQM.js";import"./Stars01-BMXw5BeL.js";import"./Trash01-WLvc7qEr.js";import"./Upload01-Bx5CpiF6.js";import"./User01-CWpJwa6r.js";import"./Users01-ChKK2Tx6.js";import"./XClose-EYXyD43I.js";import"./X-CfAlZN0E.js";import"./Zap-CieQ7Tpq.js";import"./dialog-DflEsAVp.js";import"./tooltip-D8I4xgP8.js";import"./companions-core-COK3zE1T.js";import"./extract-connection-data-BADrHucW.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-C6P3tBSr.js";import"./label-CrpJWAf1.js";import"./use-debounced-value-8smeSlAm.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./authenticate-and-persist-oauth-DxQCI97g.js";import"./mcp-oauth-CklKADlW.js";import"./auth-D0JrqMBg.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-STUuRBeL.js";function Fe(t){const e=I.c(5),{variant:i}=t,n=q();let r;e[0]!==n||e[1]!==i?(r=n(i==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=n,e[1]=i,e[2]=r):r=e[2];const c=r;let a;return e[3]!==c?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(at,{label:c,className:"text-muted-foreground"})}),e[3]=c,e[4]=a):a=e[4],a}function ei(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(_t,{}),t[0]=e):e=t[0],e}const Xe=H.createContext(null),Ze=()=>H.useContext(Xe);function Ot(){const t=I.c(22),[e,i]=Se(),n=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==n?(r=o.jsx(dt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:n})}),t[0]=n,t[1]=r):r=t[1];let c;t[2]!==i?(c=()=>{i(St)},t[2]=i,t[3]=c):c=t[3];const a=e.language==="en"&&"bg-accent";let s;t[4]!==a?(s=$e(a),t[4]=a,t[5]=s):s=t[5];let g;t[6]!==c||t[7]!==s?(g=o.jsx(qe,{onClick:c,className:s,children:"English"}),t[6]=c,t[7]=s,t[8]=g):g=t[8];let f;t[9]!==i?(f=()=>{i(jt)},t[9]=i,t[10]=f):f=t[10];const u=e.language==="pt-BR"&&"bg-accent";let m;t[11]!==u?(m=$e(u),t[11]=u,t[12]=m):m=t[12];let d;t[13]!==f||t[14]!==m?(d=o.jsx(qe,{onClick:f,className:m,children:"Português (Brasil)"}),t[13]=f,t[14]=m,t[15]=d):d=t[15];let p;t[16]!==g||t[17]!==d?(p=o.jsxs(gt,{align:"end",children:[g,d]}),t[16]=g,t[17]=d,t[18]=p):p=t[18];let S;return t[19]!==r||t[20]!==p?(S=o.jsxs(ft,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=S):S=t[21],S}function jt(t){return{...t,language:"pt-BR"}}function St(t){return{...t,language:"en"}}function k(t){const e=I.c(17);let i,n,r;e[0]!==t?({visual:r,children:i,...n}=t,e[0]=t,e[1]=i,e[2]=n,e[3]=r):(i=e[1],n=e[2],r=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/commerce-onboarding"},e[4]=c):c=e[4];const a=Ke(c),{data:s}=Te.useSession(),[g]=Se(),f=s?.user?.email;let u;e[5]!==g.language||e[6]!==a.siteUrl||e[7]!==f?(u=ke({siteUrl:a.siteUrl,email:f,locale:g.language}),e[5]=g.language,e[6]=a.siteUrl,e[7]=f,e[8]=u):u=e[8];const m=u;let d;e[9]!==m||e[10]!==r?(d=r??o.jsx(Me,{href:m}),e[9]=m,e[10]=r,e[11]=d):d=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Ot,{})]}),e[12]=p):p=e[12];let S;return e[13]!==i||e[14]!==n||e[15]!==d?(S=o.jsxs(mt,{...n,visual:d,children:[p,i]}),e[13]=i,e[14]=n,e[15]=d,e[16]=S):S=e[16],S}function vt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Be(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Ve=!1;function _t(){const t=Ke({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=t,n=Le(i);return!Ve&&tt()&&(Ve=!0,Ce("commerce_onboarding_viewed",{site_url:i,domain:n??void 0,...n?{$set:{last_scanned_domain:n}}:{}})),o.jsx(Xe.Provider,{value:n,children:o.jsx(Et,{requestedOrgSlug:e,siteUrl:i})})}function Et(t){const e=I.c(14),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),{data:c,isPending:a}=Te.useSession(),s=Ze();if(a){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(k,{children:o.jsx(Fe,{variant:"generic"})}),e[0]=f):f=e[0],f}if(!c){const f=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let m;e[3]!==s?(m=s?o.jsx(Ge,{host:s}):void 0,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r?(d=vt(r),e[5]=r,e[6]=d):d=e[6];let p;return e[7]!==u||e[8]!==m||e[9]!==d?(p=o.jsx(k,{children:o.jsx(ct,{callbackUrl:f,allowAutoLogin:!1,title:u,subtitle:null,brand:m,copy:d})}),e[7]=u,e[8]=m,e[9]=d,e[10]=p):p=e[10],p}let g;return e[11]!==i||e[12]!==n?(g=o.jsx(Ut,{requestedOrgSlug:i,siteUrl:n}),e[11]=i,e[12]=n,e[13]=g):g=e[13],g}function Ut(t){const e=I.c(95),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),c=rt(),a=it(),[s,g]=H.useState(null),[f,u]=H.useState(null),m=a.data?.map(Nt)??[];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={mutationFn:wt,retry:!1,onSuccess:l=>{u(l)}},e[0]=d):d=e[0];const p=Qe(d);if(a.isPending){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(k,{children:o.jsx(Fe,{variant:"workspace"})}),e[1]=l):l=e[1],l}if(a.error){let l;e[2]!==r?(l=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=l):l=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let C;e[8]!==a?(C=()=>a.refetch(),e[8]=a,e[9]=C):C=e[9];let j;return e[10]!==l||e[11]!==h||e[12]!==x||e[13]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[10]=l,e[11]=h,e[12]=x,e[13]=C,e[14]=j):j=e[14],j}const S=i?m.find(l=>l.slug===i):null;if(S){let l;return e[15]!==S||e[16]!==n?(l=o.jsx(ye,{org:S,initialSiteUrl:n}),e[15]=S,e[16]=n,e[17]=l):l=e[17],l}if(i){let l;e[18]!==r?(l=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=l):l=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let C;e[24]!==a?(C=()=>a.refetch(),e[24]=a,e[25]=C):C=e[25];let j;return e[26]!==l||e[27]!==h||e[28]!==x||e[29]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[26]=l,e[27]=h,e[28]=x,e[29]=C,e[30]=j):j=e[30],j}if(s){let l;return e[31]!==s||e[32]!==n?(l=o.jsx(ye,{org:s,initialSiteUrl:n}),e[31]=s,e[32]=n,e[33]=l):l=e[33],l}if(m.length===1&&m[0]){let l;return e[34]!==m[0]||e[35]!==n?(l=o.jsx(ye,{org:m[0],initialSiteUrl:n}),e[34]=m[0],e[35]=n,e[36]=l):l=e[36],l}if(m.length>1){let l;e[37]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=l):l=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==l||e[42]!==h?(x=o.jsx(W,{title:l,description:h}),e[41]=l,e[42]=h,e[43]=x):x=e[43];let C;e[44]!==r?(C=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=C):C=e[45];let j;e[46]!==c||e[47]!==n?(j=V=>c({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:n}}),e[46]=c,e[47]=n,e[48]=j):j=e[48];let O;e[49]!==m||e[50]!==C||e[51]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:m,selectLabel:C,onSelected:j})}),e[49]=m,e[50]=C,e[51]=j,e[52]=O):O=e[52];let F;return e[53]!==x||e[54]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[53]=x,e[54]=O,e[55]=F):F=e[55],F}if(!f){let l;e[56]!==p?(l=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=l):l=e[57];let h;return e[58]!==p||e[59]!==l?(h=o.jsx(Pt,{mutation:p,onRetry:l}),e[58]=p,e[59]=l,e[60]=h):h=e[60],h}const b=f;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let l;return e[61]!==b.organization||e[62]!==n?(l=o.jsx(ye,{org:b.organization,initialSiteUrl:n}),e[61]=b.organization,e[62]=n,e[63]=l):l=e[63],l}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let l;e[64]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=l):l=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==l||e[69]!==h?(x=o.jsx(W,{title:l,description:h}),e[68]=l,e[69]=h,e[70]=x):x=e[70];const C=b.domain??void 0;let j;e[71]!==c||e[72]!==n?(j=(V,B)=>{Ye(),g({...V,slug:B}),c({to:"/commerce-onboarding",search:{org:B,siteUrl:n}})},e[71]=c,e[72]=n,e[73]=j):j=e[73];let O;e[74]!==b.organizations||e[75]!==C||e[76]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:b.organizations,domain:C,onJoined:j})}),e[74]=b.organizations,e[75]=C,e[76]=j,e[77]=O):O=e[77];let F;return e[78]!==x||e[79]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[78]=x,e[79]=O,e[80]=F):F=e[80],F}let E;e[81]!==r?(E=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=E):E=e[82];let U;e[83]!==b?.error||e[84]!==r?(U=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=U):U=e[85];let N;e[86]!==r?(N=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=N):N=e[87];let w;e[88]!==p?(w=()=>{u(null),p.reset()},e[88]=p,e[89]=w):w=e[89];let M;return e[90]!==E||e[91]!==U||e[92]!==N||e[93]!==w?(M=o.jsx(Oe,{title:E,description:U,actionLabel:N,onRetry:w}),e[90]=E,e[91]=U,e[92]=N,e[93]=w,e[94]=M):M=e[94],M}async function wt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Ye(),e}function Nt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Pt(t){const e=I.c(16),{mutation:i,onRetry:n}=t,r=q(),c=H.useRef(!1);let a;e[0]!==i?(a=u=>{!u||c.current||(c.current=!0,i.mutate())},e[0]=i,e[1]=a):a=e[1];const s=a;if(i.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let m;e[4]!==r?(m=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=m):m=e[5];let d;e[6]!==r?(d=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==u||e[10]!==m||e[11]!==d?(p=o.jsx(Oe,{title:u,description:m,actionLabel:d,onRetry:n}),e[8]=n,e[9]=u,e[10]=m,e[11]=d,e[12]=p):p=e[12],p}let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Fe,{variant:"generic"}),e[13]=g):g=e[13];let f;return e[14]!==s?(f=o.jsx(k,{children:o.jsx("div",{ref:s,children:g})}),e[14]=s,e[15]=f):f=e[15],f}function W(t){const e=I.c(8),{title:i,description:n}=t,r=Ze();let c;e[0]!==r?(c=r?o.jsx(Ge,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==n||e[3]!==i?(a=(i||n)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),n&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=i,e[4]=a):a=e[4];let s;return e[5]!==c||e[6]!==a?(s=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=s):s=e[7],s}function Oe(t){const e=I.c(9),{title:i,description:n,actionLabel:r,onRetry:c}=t;let a;e[0]!==n||e[1]!==i?(a=o.jsx(W,{title:i,description:n}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let s;e[3]!==r||e[4]!==c?(s=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:c,children:r}),e[3]=r,e[4]=c,e[5]=s):s=e[5];let g;return e[6]!==a||e[7]!==s?(g=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[a,s]})}),e[6]=a,e[7]=s,e[8]=g):g=e[8],g}function ye(t){const e=I.c(13),{org:i,initialSiteUrl:n}=t,r=q(),{data:c}=Te.useSession(),[a]=Se(),s=c?.user?.email;let g;e[0]!==n||e[1]!==a.language||e[2]!==s?(g=ke({siteUrl:n,email:s,locale:a.language}),e[0]=n,e[1]=a.language,e[2]=s,e[3]=g):g=e[3];const f=g;let u;e[4]!==f||e[5]!==i.id?(u=o.jsx(Me,{href:f,orgId:i.id}),e[4]=f,e[5]=i.id,e[6]=u):u=e[6];const m=u;let d;return e[7]!==n||e[8]!==m||e[9]!==i||e[10]!==c?.user?.email||e[11]!==r?(d=o.jsx(ot,{children:p=>{const{reset:S}=p;return o.jsx(nt,{fallback:b=>{const{error:E,resetError:U}=b;return o.jsx(k,{visual:m,children:o.jsx(It,{orgName:i.name,message:E instanceof Error?E.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{S(),U()}})})},children:o.jsx(H.Suspense,{fallback:o.jsx(et,{visual:m}),children:o.jsx(Rt,{org:i,initialSiteUrl:n,sessionEmail:c?.user?.email},`${i.id}:${n??""}`)})})}}),e[7]=n,e[8]=m,e[9]=i,e[10]=c?.user?.email,e[11]=r,e[12]=d):d=e[12],d}function et(t){const e=I.c(3),{visual:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(W,{}),o.jsx(Je,{})]}),e[0]=n):n=e[0];let r;return e[1]!==i?(r=o.jsx(k,{align:"fill",visual:i,children:n}),e[1]=i,e[2]=r):r=e[2],r}function It(t){const e=I.c(19),{orgName:i,message:n,onRetry:r}=t,c=q();let a;e[0]!==c?(a=c("routes.commerceOnboarding.commerceDiagnostic"),e[0]=c,e[1]=a):a=e[1];let s;e[2]!==i||e[3]!==c?(s=c("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i}),e[2]=i,e[3]=c,e[4]=s):s=e[4];let g;e[5]!==a||e[6]!==s?(g=o.jsx(W,{title:a,description:s}),e[5]=a,e[6]=s,e[7]=g):g=e[7];let f;e[8]!==n?(f=o.jsx(je,{message:n}),e[8]=n,e[9]=f):f=e[9];let u;e[10]!==c?(u=c("routes.commerceOnboarding.retryAgain"),e[10]=c,e[11]=u):u=e[11];let m;e[12]!==r||e[13]!==u?(m=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=m):m=e[14];let d;return e[15]!==g||e[16]!==f||e[17]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[g,f,m]}),e[15]=g,e[16]=f,e[17]=m,e[18]=d):d=e[18],d}function Rt(t){const e=I.c(135),{org:i,initialSiteUrl:n,sessionEmail:r}=t;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:pt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=ht(c),[s,g]=H.useState(n??""),[f,u]=H.useState(null),m=H.useRef(!1),d=bt.COMMERCE_DISCOVERY(i.id),p=xt(i.id),S=De.commerceDiscoveryConnection(i.id,d);let b;e[3]!==d||e[4]!==a?(b=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return Ie(y)},e[3]=d,e[4]=a,e[5]=b):b=e[5];let E;e[6]!==S||e[7]!==b?(E={queryKey:S,queryFn:b,retry:!1},e[6]=S,e[7]=b,e[8]=E):E=e[8];const U=Ae(E),N=De.commerceDiscoveryVirtualMcp(i.id,p);let w;e[9]!==a||e[10]!==p?(w=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Ie(y)},e[9]=a,e[10]=p,e[11]=w):w=e[11];let M;e[12]!==N||e[13]!==w?(M={queryKey:N,queryFn:w,retry:!1},e[12]=N,e[13]=w,e[14]=M):M=e[14];const l=Ae(M);let h;e[15]!==a?(h=async y=>{const v=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Ie(v)},e[15]=a,e[16]=h):h=e[16];let x;e[17]!==U||e[18]!==i.id||e[19]!==l?(x=(y,v)=>{Ce("commerce_onboarding_setup_succeeded",{domain:Le(v)??void 0,organization_id:i.id}),u(null),U.refetch(),l.refetch()},e[17]=U,e[18]=i.id,e[19]=l,e[20]=x):x=e[20];let C;e[21]!==i.id?(C=(y,v)=>{Ce("commerce_onboarding_setup_failed",{domain:Le(v)??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=i.id,e[22]=C):C=e[22];let j;e[23]!==C||e[24]!==h||e[25]!==x?(j={mutationFn:h,retry:!1,onSuccess:x,onError:C},e[23]=C,e[24]=h,e[25]=x,e[26]=j):j=e[26];const O=Qe(j),F=!!U.data.item&&!!l.data.item,V=U.data.item,B=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,ve=n||s||"";let ne;e[27]!==B||e[28]!==ve?(ne=lt(ve,B),e[27]=B,e[28]=ve,e[29]=ne):ne=e[29];const se=F&&ne,ae=n||s||B||"",_=q(),[_e]=Se();let le;e[30]!==ae||e[31]!==_e.language||e[32]!==r?(le=ke({siteUrl:ae,email:r,locale:_e.language}),e[30]=ae,e[31]=_e.language,e[32]=r,e[33]=le):le=e[33];const Ee=le;let ce;e[34]!==Ee||e[35]!==i.id?(ce=o.jsx(Me,{href:Ee,orgId:i.id}),e[34]=Ee,e[35]=i.id,e[36]=ce):ce=e[36];const T=ce;let me;e[37]!==f||e[38]!==_?(me=f?Be(_,f):null,e[37]=f,e[38]=_,e[39]=me):me=e[39];const z=me;let ue;e[40]!==O?(ue=y=>{const v=Pe(y);if(!v.ok){u(v.error);return}u(null),O.mutate(v.value)},e[40]=O,e[41]=ue):ue=e[41];const K=ue;let de;e[42]!==n||e[43]!==K||e[44]!==se?(de=y=>{!y||m.current||se||!n||(m.current=!0,K(n))},e[42]=n,e[43]=K,e[44]=se,e[45]=de):de=e[45];const Ue=de;let ge;e[46]!==i.id||e[47]!==K||e[48]!==s?(ge=y=>{y.preventDefault();const v=Pe(s);v.ok&&Ce("commerce_onboarding_site_url_submitted",{domain:new URL(v.value).hostname,organization_id:i.id}),K(s)},e[46]=i.id,e[47]=K,e[48]=s,e[49]=ge):ge=e[49];const D=ge;if(se){const y=i.slug;let v;e[50]===Symbol.for("react.memo_cache_sentinel")?(v=crypto.randomUUID(),e[50]=v):v=e[50];let P;e[51]!==i.slug?(P={org:y,taskId:v},e[51]=i.slug,e[52]=P):P=e[52];let R;e[53]!==i.id?(R=yt(i.id),e[53]=i.id,e[54]=R):R=e[54];const $=ae||void 0;let L;e[55]!==R.id||e[56]!==$?(L={virtualmcpid:R.id,connect:"1",siteUrl:$},e[55]=R.id,e[56]=$,e[57]=L):L=e[57];let A;return e[58]!==P||e[59]!==L?(A=o.jsx(st,{to:"/$org/$taskId",params:P,search:L,replace:!0}),e[58]=P,e[59]=L,e[60]=A):A=e[60],A}if(O.isPending){let y;return e[61]!==T?(y=o.jsx(et,{visual:T}),e[61]=T,e[62]=y):y=e[62],y}if(n){let y,v,P,R,$,L,A,Z;if(e[63]!==T||e[64]!==D||e[65]!==n||e[66]!==i.name||e[67]!==O.isPending||e[68]!==s||e[69]!==_||e[70]!==z||e[71]!==Ue){Z=Symbol.for("react.early_return_sentinel");e:{const we=Pe(n);if(!we.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==i.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[82]=i.name,e[83]=_,e[84]=oe):oe=e[84];let he;e[85]!==ie||e[86]!==oe?(he=o.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=he):he=e[87];let be;e[88]!==D||e[89]!==O.isPending||e[90]!==s||e[91]!==z?(be=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[88]=D,e[89]=O.isPending,e[90]=s,e[91]=z,e[92]=be):be=e[92];const Ne=o.jsxs("div",{className:"grid gap-10",children:[he,o.jsx(je,{message:Be(_,we.error)}),be]});let xe;e[93]!==T||e[94]!==Ne?(xe=o.jsx(k,{visual:T,children:Ne}),e[93]=T,e[94]=Ne,e[95]=xe):xe=e[95],Z=xe;break e}v=k,A=T,$=Ue,L="grid gap-10",y=W,e[96]!==_?(P=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=P):P=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:we.value})}e[63]=T,e[64]=D,e[65]=n,e[66]=i.name,e[67]=O.isPending,e[68]=s,e[69]=_,e[70]=z,e[71]=Ue,e[72]=y,e[73]=v,e[74]=P,e[75]=R,e[76]=$,e[77]=L,e[78]=A,e[79]=Z}else y=e[72],v=e[73],P=e[74],R=e[75],$=e[76],L=e[77],A=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==P||e[100]!==R?(ee=o.jsx(y,{title:P,description:R}),e[98]=y,e[99]=P,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==D||e[103]!==O.isPending||e[104]!==s||e[105]!==z?(te=z?o.jsxs(o.Fragment,{children:[o.jsx(je,{message:z}),o.jsx(Re,{siteUrl:s,error:null,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D})]}):o.jsx(Je,{}),e[102]=D,e[103]=O.isPending,e[104]=s,e[105]=z,e[106]=te):te=e[106];let re;e[107]!==$||e[108]!==L||e[109]!==ee||e[110]!==te?(re=o.jsxs("div",{ref:$,className:L,children:[ee,te]}),e[107]=$,e[108]=L,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let pe;return e[112]!==v||e[113]!==A||e[114]!==re?(pe=o.jsx(v,{visual:A,children:re}),e[112]=v,e[113]=A,e[114]=re,e[115]=pe):pe=e[115],pe}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let Y;e[118]!==i.name||e[119]!==_?(Y=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[118]=i.name,e[119]=_,e[120]=Y):Y=e[120];let G;e[121]!==Q||e[122]!==Y?(G=o.jsx(W,{title:Q,description:Y}),e[121]=Q,e[122]=Y,e[123]=G):G=e[123];let J;e[124]!==D||e[125]!==O.isPending||e[126]!==s||e[127]!==z?(J=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[124]=D,e[125]=O.isPending,e[126]=s,e[127]=z,e[128]=J):J=e[128];let X;e[129]!==G||e[130]!==J?(X=o.jsxs("div",{className:"grid gap-10",children:[G,J]}),e[129]=G,e[130]=J,e[131]=X):X=e[131];let fe;return e[132]!==T||e[133]!==X?(fe=o.jsx(k,{visual:T,children:X}),e[132]=T,e[133]=X,e[134]=fe):fe=e[134],fe}function Re(t){const e=I.c(30),{siteUrl:i,error:n,isSubmitting:r,onSiteUrlChange:c,onSubmit:a}=t,s=q();let g;e[0]!==s?(g=s("routes.commerceOnboarding.siteUrlLabel"),e[0]=s,e[1]=g):g=e[1];let f;e[2]!==g?(f=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:g}),e[2]=g,e[3]=f):f=e[3];let u;e[4]!==c?(u=M=>c(M.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==s?(m=s("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=s,e[7]=m):m=e[7];const d=!!n;let p;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==m||e[12]!==d?(p=o.jsx(ut,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:u,placeholder:m,"aria-invalid":d,disabled:r}),e[8]=r,e[9]=i,e[10]=u,e[11]=m,e[12]=d,e[13]=p):p=e[13];let S;e[14]!==n?(S=n?o.jsx(je,{message:n}):null,e[14]=n,e[15]=S):S=e[15];let b;e[16]!==f||e[17]!==p||e[18]!==S?(b=o.jsxs("div",{className:"grid gap-2",children:[f,p,S]}),e[16]=f,e[17]=p,e[18]=S,e[19]=b):b=e[19];let E;e[20]!==s?(E=s("routes.commerceOnboarding.authCopy.continue"),e[20]=s,e[21]=E):E=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx(Ct,{size:16}),e[22]=U):U=e[22];let N;e[23]!==r||e[24]!==E?(N=o.jsxs(ze,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[E,U]}),e[23]=r,e[24]=E,e[25]=N):N=e[25];let w;return e[26]!==a||e[27]!==N||e[28]!==b?(w=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[b,N]}),e[26]=a,e[27]=N,e[28]=b,e[29]=w):w=e[29],w}function je(t){const e=I.c(2),{message:i}=t;let n;return e[0]!==i?(n=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=n):n=e[1],n}export{ei as default};
@@ -1 +1 @@
1
- import{b as m}from"./extract-connection-data-5mcb4Mog.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
1
+ import{b as m}from"./extract-connection-data-BADrHucW.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
@@ -1,4 +1,4 @@
1
- import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-BaeEjqV7.js";import{A as J,b as V}from"./alert-D564TwSW.js";import{C as X}from"./card-CGoHKQKX.js";import{b as T,T as L,c as B,a as D}from"./tabs-BOn-uUO8.js";import{u as O}from"./use-copy-BeT4l9EL.js";import{i as F}from"./Check-8S_h-pNf.js";import{a as I}from"./Copy01-CVgcePVg.js";import{i as q}from"./Key01-BJ5pxmk5.js";import{n as Q}from"./LinkExternal01-BE6iPh6Z.js";import{s as Z}from"./Trash01-sz1B1ubO.js";import{P as z}from"./index-C6ytuOGZ.js";import{c as ee}from"./settings-section-DYCGsxoQ.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-B9APB1Uz.js";import"./sidebar-BT5oq5Py.js";import"./LayoutLeft-BY0vokwF.js";import"./use-mobile-2yLfYt8o.js";import"./X-BFNxuShY.js";import"./tooltip-D9NGFdPV.js";import"./ArrowUpRight-CB2lmsga.js";import"./use-mcp-client-tcmKmN21.js";import"./auth-LsRMSxpZ.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
1
+ import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-CpcKMJHf.js";import{A as J,b as V}from"./alert-BPcaPAJj.js";import{C as X}from"./card-eu6g3Ufc.js";import{b as T,T as L,c as B,a as D}from"./tabs-DPZhfEpX.js";import{u as O}from"./use-copy-BqB7SD7Y.js";import{i as F}from"./Check-BWvX1ZXX.js";import{a as I}from"./Copy01-B8tpQC9Q.js";import{i as q}from"./Key01-Bjj-aLS5.js";import{n as Q}from"./LinkExternal01-DzfAn4aY.js";import{s as Z}from"./Trash01-WLvc7qEr.js";import{P as z}from"./index-BxyxSts9.js";import{c as ee}from"./settings-section-CJRUKep2.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-XSVvKZHS.js";import"./sidebar-BmhMU5lV.js";import"./LayoutLeft-CxMDbMdN.js";import"./use-mobile-BlZOnSdH.js";import"./X-CfAlZN0E.js";import"./tooltip-D8I4xgP8.js";import"./ArrowUpRight-B2LSEvMX.js";import"./use-mcp-client-DDmvok5R.js";import"./auth-D0JrqMBg.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
2
2
  --header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${l}]`,`url = "${i}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}if(e==="claude-desktop"){const n={type:"http",url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${i}
4
4
 
@@ -1 +1 @@
1
- import{c as z,j as t,b as A,r as _,B,m as w}from"./index-BaeEjqV7.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-CwEHiSMU.js";import{u as P,S as F}from"./chat-context-BpdINg7c.js";import{i as G}from"./Check-8S_h-pNf.js";import{a as W}from"./Copy01-CVgcePVg.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,o=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const n=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==n.hostname||e[3]!==n.machineId||e[4]!==n.online||e[5]!==l||e[6]!==s||e[7]!==o){const c=n.hostname??n.machineId??o("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=n.online?o("chat.connectDesktopDialog.connectedTo",{desktopName:c}):o("chat.connectDesktopDialog.connectYourDesktop"),e[2]=n.hostname,e[3]=n.machineId,e[4]=n.online,e[5]=l,e[6]=s,e[7]=o,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==n.online||e[20]!==o?(D=n.online?o("chat.connectDesktopDialog.machineAgentsDescription"):o("chat.connectDesktopDialog.runCommandDescription"),e[19]=n.online,e[20]=o,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==n.online?(k=!n.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T),M(!0),setTimeout(()=>M(!1),1500)},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=n.online,e[30]=k):k=e[30];let C;e[31]!==n.capabilities||e[32]!==n.online||e[33]!==o?(C=n.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=n.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:o(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),o("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=n.capabilities,e[32]=n.online,e[33]=o,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
1
+ import{c as z,j as t,b as A,r as _,B,m as w}from"./index-CpcKMJHf.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-DflEsAVp.js";import{u as P,S as F}from"./chat-context-DseDiNEh.js";import{i as G}from"./Check-BWvX1ZXX.js";import{a as W}from"./Copy01-B8tpQC9Q.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,o=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const n=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==n.hostname||e[3]!==n.machineId||e[4]!==n.online||e[5]!==l||e[6]!==s||e[7]!==o){const c=n.hostname??n.machineId??o("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=n.online?o("chat.connectDesktopDialog.connectedTo",{desktopName:c}):o("chat.connectDesktopDialog.connectYourDesktop"),e[2]=n.hostname,e[3]=n.machineId,e[4]=n.online,e[5]=l,e[6]=s,e[7]=o,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==n.online||e[20]!==o?(D=n.online?o("chat.connectDesktopDialog.machineAgentsDescription"):o("chat.connectDesktopDialog.runCommandDescription"),e[19]=n.online,e[20]=o,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==n.online?(k=!n.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T),M(!0),setTimeout(()=>M(!1),1500)},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=n.online,e[30]=k):k=e[30];let C;e[31]!==n.capabilities||e[32]!==n.online||e[33]!==o?(C=n.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=n.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:o(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),o("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=n.capabilities,e[32]=n.online,e[33]=o,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
@@ -1 +1 @@
1
- import{c as M,F as $,aZ as L,K as k,m as w,j as I}from"./index-BaeEjqV7.js";import{u as D}from"./use-registry-connections-Mt2VCkjn.js";import{c as K}from"./use-organization-settings-Coxn0MdD.js";import{S as E,j as F}from"./use-mcp-client-tcmKmN21.js";import{u as Q}from"./useInfiniteQuery-C6O0Jfl2.js";import{i as H,f as q}from"./extract-connection-data-5mcb4Mog.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-CGoHKQKX.js";import{I as X}from"./integration-icon-DmDjDu1T.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const Z=24,_=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=z(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:Z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(B),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function B(s){return A(s)}function W(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
1
+ import{c as M,F as $,aZ as L,K as k,m as w,j as I}from"./index-CpcKMJHf.js";import{u as D}from"./use-registry-connections-1FFiww3l.js";import{c as K}from"./use-organization-settings-C2Rlhb_g.js";import{S as E,j as F}from"./use-mcp-client-DDmvok5R.js";import{u as Q}from"./useInfiniteQuery-DTsg_ujq.js";import{i as H,f as q}from"./extract-connection-data-BADrHucW.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-eu6g3Ufc.js";import{I as X}from"./integration-icon-C4RBZhRU.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const Z=24,_=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=z(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:Z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(B),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function B(s){return A(s)}function W(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};