decocms 4.321.0 → 4.321.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/dist/client/assets/{AlertCircle-XwHoogbQ.js → AlertCircle-mzPvygUw.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CZF4ny2k.js → AreaChart-DpI9x93q.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CywqmCNu.js → ArrowLeft-Bp9N4N0-.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BMgP0No9.js → ArrowUp-Yj21fZGL.js} +1 -1
  5. package/dist/client/assets/{Check-C4UJfE-5.js → Check-DFpZ57WE.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-1uYJvE9R.js → CheckCircle-BL9fUGh0.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-j3-DQlb0.js → ChevronRight-B0k8i06h.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-BnbOCSAX.js → ChevronSelectorVertical-C36SdIlf.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CntIa4Yf.js → ChevronUp-DoFbOo5V.js} +1 -1
  10. package/dist/client/assets/{Copy01-Dg5SICyn.js → Copy01-DQrZ6li-.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CHaZ2sMI.js → CreditCard01-BwmXIXJx.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-8OtA5I8O.js → DotsVertical-DJWfzfak.js} +1 -1
  13. package/dist/client/assets/{Download01-CAoDeKDd.js → Download01-DsQzO8cd.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-D9inYmGI.js → ErrorBarContext-CJd0p0QO.js} +1 -1
  15. package/dist/client/assets/{Eye-B4X68jRO.js → Eye-BC_4l4lG.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-jt6WHdd3.js → GitBranch01-C4EIccIA.js} +1 -1
  17. package/dist/client/assets/{Globe01-kcWHNDyS.js → Globe01-DHMT8bp9.js} +1 -1
  18. package/dist/client/assets/{HardDrive-CGTEVnyE.js → HardDrive-DO3IjmaH.js} +1 -1
  19. package/dist/client/assets/{Image01--hANRVOq.js → Image01-C4TVJnST.js} +1 -1
  20. package/dist/client/assets/{Key01-BwZSXIY4.js → Key01-a9vi-Tku.js} +1 -1
  21. package/dist/client/assets/{Link01-CcXI2IvB.js → Link01-BWge3x25.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-nUldOumU.js → LinkExternal01-qomjjlr4.js} +1 -1
  23. package/dist/client/assets/{LockUnlocked01-Y44cJZ0e.js → LockUnlocked01-BD5ISYeA.js} +1 -1
  24. package/dist/client/assets/{Monitor01-EpUmYxRg.js → Monitor01-BB9oelwa.js} +1 -1
  25. package/dist/client/assets/{Package-B3Y15mXD.js → Package-DRO-nel6.js} +1 -1
  26. package/dist/client/assets/{Palette-D62R9ejX.js → Palette-CzJtqmLV.js} +1 -1
  27. package/dist/client/assets/{Play-bSVevPXQ.js → Play-BOlL7p4H.js} +1 -1
  28. package/dist/client/assets/{Plus-CudxeIvX.js → Plus-B4HOF1E1.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Dzr_CKGG.js → SearchMd-BL3yOzl8.js} +1 -1
  30. package/dist/client/assets/{Sector-ChzV8E1o.js → Sector-B66RdjM2.js} +1 -1
  31. package/dist/client/assets/{Settings02-Csm5-X4i.js → Settings02-Bj1lDwij.js} +1 -1
  32. package/dist/client/assets/{Share07-CyOQ8OqI.js → Share07-K9acKdZ2.js} +1 -1
  33. package/dist/client/assets/{Shield01-CR2c-0aZ.js → Shield01-B2le5qB9.js} +1 -1
  34. package/dist/client/assets/{Stars01-D8TiZoSU.js → Stars01-DBkTEhiq.js} +1 -1
  35. package/dist/client/assets/{Sun-DG6PIqDR.js → Sun-v51TgHoC.js} +1 -1
  36. package/dist/client/assets/{ThumbsUp-DlB_NWZ_.js → ThumbsUp-DZtUuNqz.js} +1 -1
  37. package/dist/client/assets/{Tool01-Bh8f6_Lr.js → Tool01-3TSBet75.js} +1 -1
  38. package/dist/client/assets/{Tool02-DslfH0Sk.js → Tool02-CUjmmZmP.js} +1 -1
  39. package/dist/client/assets/{Trash01-Af2cYCSZ.js → Trash01-RcSuYrVJ.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-ynlv1gpu.js → TrendUp01-B1pPYfuK.js} +1 -1
  41. package/dist/client/assets/{Upload01-BaHT1_2n.js → Upload01-lXk5j7xP.js} +1 -1
  42. package/dist/client/assets/{User01-Bjxghj8p.js → User01-AECGy6qL.js} +1 -1
  43. package/dist/client/assets/{UserSquare-DT8w5Z-P.js → UserSquare-DAvB_kFJ.js} +1 -1
  44. package/dist/client/assets/{Users01-B_U1BEfS.js → Users01-BgVgHDh8.js} +1 -1
  45. package/dist/client/assets/{Users03-HvW7gxZG.js → Users03-B7rH-Prq.js} +1 -1
  46. package/dist/client/assets/{XCircle-BWlR7HX0.js → XCircle-BcRsQfbp.js} +1 -1
  47. package/dist/client/assets/{XClose-Bx5KD8jT.js → XClose-CfMSoySe.js} +1 -1
  48. package/dist/client/assets/{Zap-l104pDRq.js → Zap-B1-2Q3w4.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-sEpSue33.js → ZoomOut-CN3_bE81.js} +1 -1
  50. package/dist/client/assets/{access-gate-CNmQ7He5.js → access-gate-Bqb_IoZo.js} +1 -1
  51. package/dist/client/assets/{agent-icon-BJ71xWZj.js → agent-icon-9NxB5SOp.js} +1 -1
  52. package/dist/client/assets/{agents-list-NGWgY9iU.js → agents-list-C76JNu3A.js} +1 -1
  53. package/dist/client/assets/{ai-providers-D0W9n0YM.js → ai-providers-BaeUPfRB.js} +1 -1
  54. package/dist/client/assets/{alert-BxlPy-5K.js → alert-4OAU_nBA.js} +1 -1
  55. package/dist/client/assets/{alert-dialog-B0dP5uSI.js → alert-dialog-CcHS-XLY.js} +1 -1
  56. package/dist/client/assets/{analytics-tab-D4SLalux.js → analytics-tab-BCxp8jRR.js} +1 -1
  57. package/dist/client/assets/api-keys-B1rGBGLW.js +1 -0
  58. package/dist/client/assets/{api-keys-DrhmL2jm.js → api-keys-gIqXyv9f.js} +1 -1
  59. package/dist/client/assets/app-editor-CO_1PqE8.js +1 -0
  60. package/dist/client/assets/{auth-RtuDiJ_1.js → auth-7gOJrCJs.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-CoAgBTaT.js → auth-catchall-DUFwyN0I.js} +1 -1
  62. package/dist/client/assets/{auth-entry-B1JH7Spd.js → auth-entry-CmvczzF5.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-CcVNWwwP.js → auth-split-layout-CdiwAUW1.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-wB3C4Cdo.js → authenticate-and-persist-oauth-BSmdaYES.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-CYrtb0ve.js → automation-list-row-vaYTAqBr.js} +1 -1
  66. package/dist/client/assets/{automation-runs-DN3OZnAt.js → automation-runs-CH0DGbop.js} +1 -1
  67. package/dist/client/assets/{automations-NzCVYtKI.js → automations-DS-29qSN.js} +1 -1
  68. package/dist/client/assets/{avatar-3m9tis9C.js → avatar-gFJWL-Vg.js} +1 -1
  69. package/dist/client/assets/{badge-CfuwGD09.js → badge-DU8Pt1Ge.js} +1 -1
  70. package/dist/client/assets/{block-document-Bh-Gn2cm.js → block-document-B-APilfu.js} +1 -1
  71. package/dist/client/assets/{breadcrumb-BrD5S0WH.js → breadcrumb-TNKPI3dS.js} +1 -1
  72. package/dist/client/assets/{buckets-DQotAz66.js → buckets-rWwZp5wi.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-BMtEGDmG.js → bulk-category-panel-Dmla31YZ.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-B00k8PKs.js → capability-load-error-BsnWRA5W.js} +1 -1
  75. package/dist/client/assets/{cards-De-4Ydhd.js → cards-GrxitjN9.js} +1 -1
  76. package/dist/client/assets/{category-editor-CDMUoIwm.js → category-editor-CJqNv7_k.js} +1 -1
  77. package/dist/client/assets/{cdn-tab-DEPZn1AG.js → cdn-tab-CGwd_rBy.js} +1 -1
  78. package/dist/client/assets/{chart-dWOZ1MrB.js → chart-Ctqg6c-J.js} +1 -1
  79. package/dist/client/assets/{chat-context-BxZkc36W.js → chat-context-E6CzjtFL.js} +6 -6
  80. package/dist/client/assets/{checkbox-Dlflbzrz.js → checkbox-DoENx1Tp.js} +1 -1
  81. package/dist/client/assets/{choose-editor-CYeupefj.js → choose-editor-6iE-NUNZ.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-CxgAulY-.js → cli-auth-success-wrrg72SU.js} +1 -1
  83. package/dist/client/assets/{client-icons-BgHiE1WD.js → client-icons-DZ-wX-6W.js} +1 -1
  84. package/dist/client/assets/{collection-detail-DolGhvz-.js → collection-detail-BaCsEwRG.js} +1 -1
  85. package/dist/client/assets/{collection-display-button-BKH19E82.js → collection-display-button-DakfldYj.js} +1 -1
  86. package/dist/client/assets/{collection-search-Nkidsmst.js → collection-search-Bfeg8_4N.js} +1 -1
  87. package/dist/client/assets/{collection-table-wrapper-51utTmd2.js → collection-table-wrapper-BtrS3OmC.js} +1 -1
  88. package/dist/client/assets/{collection-tabs-D_cOEVA1.js → collection-tabs-CtU4r8Hy.js} +1 -1
  89. package/dist/client/assets/{command-M53B5oOY.js → command-C_Uammpe.js} +1 -1
  90. package/dist/client/assets/{commerce-onboarding-CIfMdXcE.js → commerce-onboarding-D5Q-YKhe.js} +1 -1
  91. package/dist/client/assets/{config-DoFw0-Ar.js → config-BGIQidIa.js} +1 -1
  92. package/dist/client/assets/{connect-DDohon94.js → connect-0x4VThqB.js} +2 -2
  93. package/dist/client/assets/{connect-layout-QiQQQGum.js → connect-layout-CN6ikwT9.js} +1 -1
  94. package/dist/client/assets/{connection-BkAIyVKV.js → connection-CZKw5XC0.js} +1 -1
  95. package/dist/client/assets/{connection-card-BeyD4YAF.js → connection-card-C8JTppjB.js} +1 -1
  96. package/dist/client/assets/{connection-detail-4QleP9zx.js → connection-detail-Ber683jR.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-Dk5MKdZL.js → connection-form-helpers-C8Ib0fh-.js} +1 -1
  98. package/dist/client/assets/{connections-BC-OGm8Q.js → connections-CnGMoGPi.js} +1 -1
  99. package/dist/client/assets/{create-organization-dialog-BK9RaRcK.js → create-organization-dialog-DmjxuakX.js} +1 -1
  100. package/dist/client/assets/{decopilot-sse-pool-2cJBJIX8.js → decopilot-sse-pool-CGjOzfxR.js} +1 -1
  101. package/dist/client/assets/{dialog-BfK9Q3g-.js → dialog-oJmEQ7fd.js} +1 -1
  102. package/dist/client/assets/{domain-settings-9KefY-Jr.js → domain-settings-CArlyMNt.js} +1 -1
  103. package/dist/client/assets/{drawer-Ae4H_Cre.js → drawer-Bw9gslIb.js} +1 -1
  104. package/dist/client/assets/{dropdown-menu-Dec6DJmV.js → dropdown-menu-DwjXZoet.js} +1 -1
  105. package/dist/client/assets/{e2e-tab-BQ9T8TL1.js → e2e-tab-Co0R0nLL.js} +1 -1
  106. package/dist/client/assets/{editor-xJGw1ShI.js → editor-BX-SJ89b.js} +1 -1
  107. package/dist/client/assets/{empty-state-D_rD6sUS.js → empty-state-CRx1rEIR.js} +1 -1
  108. package/dist/client/assets/{empty-state-CGmLq-Pt.js → empty-state-DJ43bnFn.js} +1 -1
  109. package/dist/client/assets/{extract-connection-data-3yzf0pk7.js → extract-connection-data-MINwSTDT.js} +1 -1
  110. package/dist/client/assets/{file-explorer-2cYnSDhu.js → file-explorer-DpEq8ubB.js} +1 -1
  111. package/dist/client/assets/{file-type-icon-D6hBi9DJ.js → file-type-icon-D_Zgk3qT.js} +1 -1
  112. package/dist/client/assets/{folder-icon-Db-e7p9Z.js → folder-icon-Bp7D1Lcv.js} +1 -1
  113. package/dist/client/assets/{form-CRmR_lLm.js → form-KNJGif8F.js} +1 -1
  114. package/dist/client/assets/{general-AgZoeoUI.js → general-BMvfpBmx.js} +1 -1
  115. package/dist/client/assets/{github-repo-picker-dKrv6LjS.js → github-repo-picker-XPNUm2jV.js} +1 -1
  116. package/dist/client/assets/{hooks-Yos0TGyS.js → hooks-WsI05bHe.js} +1 -1
  117. package/dist/client/assets/{hosting-tab-D0W3x-u4.js → hosting-tab-DAwmuGFe.js} +1 -1
  118. package/dist/client/assets/{index-Dm5103lQ.js → index-6Ycnwbva.js} +1 -1
  119. package/dist/client/assets/{index-D04jsXE4.js → index-B0bzsRbf.js} +1 -1
  120. package/dist/client/assets/{index-dRXf6XAN.js → index-BbTCpGvf.js} +1 -1
  121. package/dist/client/assets/{index-w5CD1ujM.js → index-CHXtyL0r.js} +1 -1
  122. package/dist/client/assets/{index-CCFdAEzc.js → index-CvdDBP2H.js} +1 -1
  123. package/dist/client/assets/{index-Cv280xm5.js → index-CwsK8XI2.js} +46 -46
  124. package/dist/client/assets/{index-CejTGoMJ.js → index-Da2hHsRU.js} +1 -1
  125. package/dist/client/assets/{index--Yue-AUv.js → index-KlN2gCIz.js} +3 -3
  126. package/dist/client/assets/{index-8syfCkKK.js → index-Uk_mCif6.js} +1 -1
  127. package/dist/client/assets/{index-Dj3FHlFk.js → index-a87BkhVH.js} +1 -1
  128. package/dist/client/assets/{index-redirect-B8yF4RsR.js → index-redirect-DleK1Yt6.js} +1 -1
  129. package/dist/client/assets/{infra-billing-CZ46Wj1T.js → infra-billing-Gef8-Dhn.js} +1 -1
  130. package/dist/client/assets/{input-BFAX_ahy.js → input-HEtJVl9i.js} +1 -1
  131. package/dist/client/assets/{integration-icon-BJE1IZ2g.js → integration-icon-BgsghQ7E.js} +1 -1
  132. package/dist/client/assets/{invite-member-dialog-CQOFlal_.js → invite-member-dialog-DGzj_Tvq.js} +1 -1
  133. package/dist/client/assets/{label-DsmAdJ5N.js → label-C0PesxR-.js} +1 -1
  134. package/dist/client/assets/{layout-Dlgtepnr.js → layout-D6_KfOu0.js} +1 -1
  135. package/dist/client/assets/{login-m7Z8a3wN.js → login-Otop9Ck2.js} +1 -1
  136. package/dist/client/assets/{markdown-Bq3RK4K8.js → markdown-eRJzb9Cb.js} +1 -1
  137. package/dist/client/assets/{mcp-oauth-DHC7RlhS.js → mcp-oauth-B78QmrXr.js} +1 -1
  138. package/dist/client/assets/{members-BuRO3MEw.js → members-cV_AP40t.js} +1 -1
  139. package/dist/client/assets/{monaco-editor-BloSWiyb.js → monaco-editor-u3OHcMfo.js} +1 -1
  140. package/dist/client/assets/{monitoring-stats-row-BRynmgcB.js → monitoring-stats-row-DvisuCi9.js} +1 -1
  141. package/dist/client/assets/{multi-select-D2w_3e_Q.js → multi-select-kuRZRD8_.js} +1 -1
  142. package/dist/client/assets/{oauth-callback-BDwxrVDi.js → oauth-callback-CFiWX7_u.js} +1 -1
  143. package/dist/client/assets/{oauth-callback-ai-provider-YigEQyfr.js → oauth-callback-ai-provider-BXFT1DOb.js} +1 -1
  144. package/dist/client/assets/{onboarding-BhJXej87.js → onboarding-i3HWUuTF.js} +1 -1
  145. package/dist/client/assets/org-layout-CDZCpF2V.js +1 -0
  146. package/dist/client/assets/{organization-choice-BW5L4ONd.js → organization-choice-DjXSPcsB.js} +1 -1
  147. package/dist/client/assets/{orgs-DzO6UK3R.js → orgs-DzhQ4XlA.js} +1 -1
  148. package/dist/client/assets/{page-seo-form-Df7sJlat.js → page-seo-form-CCYA0iJF.js} +1 -1
  149. package/dist/client/assets/{popover-DtJRAYPm.js → popover-DMAen6H4.js} +1 -1
  150. package/dist/client/assets/{post-calendar-D-b3C8XK.js → post-calendar-DFTSle3P.js} +1 -1
  151. package/dist/client/assets/{post-editor-DD5MkY64.js → post-editor-lUsz95wa.js} +1 -1
  152. package/dist/client/assets/{primitives-CcsdwZ7b.js → primitives-B-Wm41ZY.js} +1 -1
  153. package/dist/client/assets/{profile-BOHxA3cb.js → profile-BmPUiRfA.js} +1 -1
  154. package/dist/client/assets/{project-app-view-By6DzK36.js → project-app-view-CA9ASpQB.js} +1 -1
  155. package/dist/client/assets/{prompts-BL8NQQtu.js → prompts-B9q2oJHk.js} +1 -1
  156. package/dist/client/assets/record-editor-BCumq3mK.js +1 -0
  157. package/dist/client/assets/redirect-editor-CAyDfHTn.js +1 -0
  158. package/dist/client/assets/registry-DZUz6BnD.js +2 -0
  159. package/dist/client/assets/{registry-layout-CcLjNAYi.js → registry-layout-Bq-4xMFT.js} +1 -1
  160. package/dist/client/assets/{reports-BAVtBNt1.js → reports-B6dBYVE9.js} +1 -1
  161. package/dist/client/assets/{require-capability-CB1cDqUK.js → require-capability-BcT35GEL.js} +1 -1
  162. package/dist/client/assets/{required-auth-layout-BoRA3keT.js → required-auth-layout-ByszmYIS.js} +1 -1
  163. package/dist/client/assets/{reset-password-Da-E093r.js → reset-password-C-j76GLY.js} +1 -1
  164. package/dist/client/assets/{review-settings-ByEzmyRn.js → review-settings-DOzVKzXE.js} +1 -1
  165. package/dist/client/assets/{roles-D0Rf35ZL.js → roles-VMVSF7hO.js} +1 -1
  166. package/dist/client/assets/{schema-6-YeQLtv.js → schema-84vLWA89.js} +1 -1
  167. package/dist/client/assets/{scroll-area-C2bLIPVg.js → scroll-area-BC0xk88l.js} +1 -1
  168. package/dist/client/assets/{search-input-D-mMLqGj.js → search-input-BE0KVAOM.js} +1 -1
  169. package/dist/client/assets/{secrets-DUdS7pVG.js → secrets-8as8OGs2.js} +1 -1
  170. package/dist/client/assets/{sections-editor-D40vqVWN.js → sections-editor-DT_YOSrM.js} +1 -1
  171. package/dist/client/assets/{select-BenTNMk9.js → select-BqDsJm6t.js} +1 -1
  172. package/dist/client/assets/{select-model-CYD5eGCt.js → select-model-BluwSVID.js} +1 -1
  173. package/dist/client/assets/{self-tool-result-uGrWv2RA.js → self-tool-result-Crp_HAZ-.js} +1 -1
  174. package/dist/client/assets/{seo-editor-CHEiH7bX.js → seo-editor-Dx0IkBh5.js} +1 -1
  175. package/dist/client/assets/settings-layout-CbCqYC0T.js +1 -0
  176. package/dist/client/assets/settings-sidebar-HbW6Jgug.js +1 -0
  177. package/dist/client/assets/{shell-controls-HZflDxbz.js → shell-controls-YRTZQ5Ef.js} +1 -1
  178. package/dist/client/assets/{shell-layout-C2jaXt-w.js → shell-layout-CvYCmCNz.js} +1 -1
  179. package/dist/client/assets/{skill-preview-03bFSzLg.js → skill-preview-JuBBgBRK.js} +1 -1
  180. package/dist/client/assets/{skills-CcIWxvD9.js → skills-CZPxgiPp.js} +1 -1
  181. package/dist/client/assets/{sso-CVCG1aXx.js → sso-BZACPXqJ.js} +1 -1
  182. package/dist/client/assets/{store-vQIHsEBX.js → store-cJ0amgmM.js} +1 -1
  183. package/dist/client/assets/store-registry-ByK7cRvk.js +2 -0
  184. package/dist/client/assets/{switch-B1eNabRz.js → switch-D_k4Qu1u.js} +1 -1
  185. package/dist/client/assets/{synced-repos-AzfXcpld.js → synced-repos-uwlv0Pey.js} +1 -1
  186. package/dist/client/assets/{table-DamFI6PY.js → table-Dap-hV0L.js} +1 -1
  187. package/dist/client/assets/{tabs-CftkCfn2.js → tabs-COqGDJL6.js} +1 -1
  188. package/dist/client/assets/{task-board-BYn5YrBH.js → task-board-B75_z9Rj.js} +1 -1
  189. package/dist/client/assets/{task-route-DN7FIBNa.js → task-route-DbcCoz7p.js} +1 -1
  190. package/dist/client/assets/{tasks-DR78i-xR.js → tasks-BhNpm5RX.js} +1 -1
  191. package/dist/client/assets/{textarea-DPWpBeUd.js → textarea-BvwRrfOE.js} +1 -1
  192. package/dist/client/assets/{thread-intent-DHbODRw0.js → thread-intent-aJd8je2A.js} +1 -1
  193. package/dist/client/assets/{thread-route-BHfAbZVP.js → thread-route-nSN2wMws.js} +1 -1
  194. package/dist/client/assets/{toggle-group-CEQfZJ_s.js → toggle-group-5clbhSyw.js} +1 -1
  195. package/dist/client/assets/{toolbar-3NZ4B_sZ.js → toolbar-6ATG38pw.js} +1 -1
  196. package/dist/client/assets/{toolbar-icon-button-qlIJaGwy.js → toolbar-icon-button-D78WqDTu.js} +1 -1
  197. package/dist/client/assets/{track-DmA6YrxI.js → track-D1An3sTA.js} +1 -1
  198. package/dist/client/assets/{types-KhwrLlvQ.js → types-D6oSpRz1.js} +1 -1
  199. package/dist/client/assets/{use-ai-providers-y2mE4YVx.js → use-ai-providers-D3ICNjqW.js} +1 -1
  200. package/dist/client/assets/{use-automations-BGmEtBcD.js → use-automations-BRtBR0Tx.js} +1 -1
  201. package/dist/client/assets/{use-autosave-DfacmNaj.js → use-autosave-Cuy0PbSg.js} +1 -1
  202. package/dist/client/assets/use-connection-C_L1iNkQ.js +1 -0
  203. package/dist/client/assets/{use-copy-CaXpH1Ji.js → use-copy-cKoPwH5D.js} +1 -1
  204. package/dist/client/assets/{use-create-virtual-mcp-BrXsmpvu.js → use-create-virtual-mcp-BaW9xhHR.js} +1 -1
  205. package/dist/client/assets/{use-debounced-autosave-sblE5oFk.js → use-debounced-autosave-BufHbfWF.js} +1 -1
  206. package/dist/client/assets/{use-debounced-value-CHsHq1kp.js → use-debounced-value-B4gfPGsg.js} +1 -1
  207. package/dist/client/assets/{use-decopilot-events-CwR7vIYI.js → use-decopilot-events-CjxND1rZ.js} +1 -1
  208. package/dist/client/assets/{use-delete-connection-BYId9-ME.js → use-delete-connection-DpF13y-G.js} +1 -1
  209. package/dist/client/assets/{use-deployment-admin-CIYINRaR.js → use-deployment-admin-D6YGJgYx.js} +1 -1
  210. package/dist/client/assets/{use-destination-route-DUBDYWYC.js → use-destination-route-C-c7cE6M.js} +1 -1
  211. package/dist/client/assets/{use-file-configs-DJmD737L.js → use-file-configs-BTZYprex.js} +1 -1
  212. package/dist/client/assets/{use-infinite-scroll-BYJaZPiO.js → use-infinite-scroll-Ce21aioX.js} +1 -1
  213. package/dist/client/assets/{use-join-requests-CRUMpBVS.js → use-join-requests-DpubSuKS.js} +1 -1
  214. package/dist/client/assets/{use-mcp-auth-status-COQLH73A.js → use-mcp-auth-status-DIwhYzpu.js} +1 -1
  215. package/dist/client/assets/{use-mcp-client-AO8IHYzf.js → use-mcp-client-DaJV2zKk.js} +1 -1
  216. package/dist/client/assets/{use-mcp-prompts-H93Da983.js → use-mcp-prompts-9qMQ8HS9.js} +1 -1
  217. package/dist/client/assets/{use-mcp-tools-DGidE2IG.js → use-mcp-tools-DS4bYai0.js} +1 -1
  218. package/dist/client/assets/{use-members-PEKPL4Lo.js → use-members-CNWUo54i.js} +1 -1
  219. package/dist/client/assets/{use-navigate-to-agent-BUQYsqNn.js → use-navigate-to-agent-DsYRGB5d.js} +1 -1
  220. package/dist/client/assets/{use-org-auth-client-onFTrETO.js → use-org-auth-client-BDB3wxk-.js} +1 -1
  221. package/dist/client/assets/{use-org-repo-syncs-DvDzbaLd.js → use-org-repo-syncs-sXrl_DWw.js} +1 -1
  222. package/dist/client/assets/{use-org-sso-Z6AeT-8g.js → use-org-sso-BhjEyf4c.js} +1 -1
  223. package/dist/client/assets/{use-organization-roles-BihFkmMF.js → use-organization-roles-G6p07kEe.js} +1 -1
  224. package/dist/client/assets/{use-organization-settings-DjSFwIYT.js → use-organization-settings-Bm9CU7A0.js} +1 -1
  225. package/dist/client/assets/{use-panel-navigate-OMxj4-qW.js → use-panel-navigate-B_jYd-oO.js} +1 -1
  226. package/dist/client/assets/{use-project-scope-08e0hkP_.js → use-project-scope-M7A4kaM_.js} +1 -1
  227. package/dist/client/assets/{use-registry-connections-BmwEds4b.js → use-registry-connections-BPblfAxm.js} +1 -1
  228. package/dist/client/assets/{use-secrets-DKnchTNN.js → use-secrets-ASFtQe9O.js} +1 -1
  229. package/dist/client/assets/{use-section-preview-base-DnVCpH7L.js → use-section-preview-base-DEmQvfgW.js} +1 -1
  230. package/dist/client/assets/{use-status-sounds-DENCAzO6.js → use-status-sounds-C5nQIKjo.js} +1 -1
  231. package/dist/client/assets/{use-tags-Dgf-5GPg.js → use-tags-BAdNUKqb.js} +1 -1
  232. package/dist/client/assets/{use-view-mode-DMh8GfFv.js → use-view-mode-DixmuAd0.js} +1 -1
  233. package/dist/client/assets/{use-virtual-mcp-CJ-13-b1.js → use-virtual-mcp-D1i-P-jz.js} +1 -1
  234. package/dist/client/assets/useInfiniteQuery-CEWWIp6Z.js +1 -0
  235. package/dist/client/assets/useSuspenseInfiniteQuery-Bv4wKU6R.js +1 -0
  236. package/dist/client/assets/{users-BECW4382.js → users-D8OY72ZK.js} +1 -1
  237. package/dist/client/assets/{variant-calendar-qE3WQBxi.js → variant-calendar-BH49MFNR.js} +1 -1
  238. package/dist/client/assets/{view-mode-toggle-DzNGlJws.js → view-mode-toggle-BxwtIeBE.js} +1 -1
  239. package/dist/client/index.html +1 -1
  240. package/dist/server/cli.js +1 -1
  241. package/dist/server/server.js +1 -1
  242. package/package.json +1 -1
  243. package/dist/client/assets/api-keys-ByoE2GeI.js +0 -1
  244. package/dist/client/assets/app-editor-ZYm55_i0.js +0 -1
  245. package/dist/client/assets/org-layout-8hLlkmj1.js +0 -1
  246. package/dist/client/assets/record-editor-Dm1e7_CX.js +0 -1
  247. package/dist/client/assets/redirect-editor-C1BlX8Iw.js +0 -1
  248. package/dist/client/assets/registry-DOGHvy3D.js +0 -2
  249. package/dist/client/assets/settings-layout-BoFNl5QO.js +0 -1
  250. package/dist/client/assets/settings-sidebar-BZsTIJQN.js +0 -1
  251. package/dist/client/assets/store-registry-DnI8TDmG.js +0 -2
  252. package/dist/client/assets/use-connection-CPKpqSb3.js +0 -1
  253. package/dist/client/assets/useInfiniteQuery-BOPIKMH5.js +0 -1
  254. package/dist/client/assets/useSuspenseInfiniteQuery-CU4Csd7O.js +0 -1
@@ -1 +1 @@
1
- import{c as L,j as t,B as K,h as X,ae as Ye,ag as ie,b as W,E as De,r as D,W as xe,c8 as Ge,c9 as Ee,ar as Xe,u as Ze,L as te,a3 as et,a4 as Se,a1 as ye,a2 as we,t as tt,f as fe,ca as Oe}from"./index--Yue-AUv.js";import{E as Re}from"./empty-state-D_rD6sUS.js";import{u as he}from"./use-mcp-client-AO8IHYzf.js";import{d as re,F as st,a as ae,b as ce}from"./form-CRmR_lLm.js";import{I as ue}from"./input-BFAX_ahy.js";import{T as pe}from"./textarea-DPWpBeUd.js";import{a as ot,b as nt,V as ge,O as lt,M as it}from"./index-Dm5103lQ.js";import{aN as rt,R as at,aO as ct,ax as dt,aj as mt,ak as ut,aP as pt,r as Ce}from"./agent-icon-BJ71xWZj.js";import{g as xt,M as ft,a as Ie}from"./types-KhwrLlvQ.js";import{A as ht,a as gt,b as jt}from"./alert-BxlPy-5K.js";import{S as Te,a as $e,b as Pe,c as ke,d as de}from"./select-BenTNMk9.js";import{B as Fe,a as Me,b as Y,c as se,d as oe,e as ze}from"./breadcrumb-BrD5S0WH.js";import{i as bt}from"./AlertCircle-XwHoogbQ.js";import{a as Nt}from"./Copy01-Dg5SICyn.js";import{i as vt}from"./Play-bSVevPXQ.js";import{g as St}from"./connection-slug-CITJ0kGN.js";import{u as yt,T as wt}from"./use-mcp-auth-status-COQLH73A.js";import{a as Be,u as Le}from"./use-connection-CPKpqSb3.js";import{a as Ct}from"./use-mcp-tools-DGidE2IG.js";import{M as It,c as Tt}from"./monaco-editor-BloSWiyb.js";import{I as Ae}from"./integration-icon-BJE1IZ2g.js";import{k as $t,q as Pt}from"./chat-context-BxZkc36W.js";import{u as kt}from"./shell-layout-C2jaXt-w.js";import{E as At}from"./empty-state-CGmLq-Pt.js";import{n as Dt}from"./Tool02-DslfH0Sk.js";import"./constants-DNuUCxmW.js";import"./auth-RtuDiJ_1.js";import"./label-DsmAdJ5N.js";import"./Key01-BwZSXIY4.js";import"./extract-connection-data-3yzf0pk7.js";import"./metadata-dUsYcpuu.js";import"./connection-BkAIyVKV.js";import"./use-registry-connections-BmwEds4b.js";import"./use-organization-settings-DjSFwIYT.js";import"./schema-6-YeQLtv.js";import"./task-board-BYn5YrBH.js";import"./Plus-CudxeIvX.js";import"./index-CejTGoMJ.js";import"./index-D04jsXE4.js";import"./index-dRXf6XAN.js";import"./popover-DtJRAYPm.js";import"./use-virtual-mcp-CJ-13-b1.js";import"./Check-C4UJfE-5.js";import"./SearchMd-Dzr_CKGG.js";import"./Users03-HvW7gxZG.js";import"./use-create-virtual-mcp-BrXsmpvu.js";import"./use-navigate-to-agent-BUQYsqNn.js";import"./use-destination-route-DUBDYWYC.js";import"./hooks-Yos0TGyS.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-2cJBJIX8.js";import"./thread-intent-DHbODRw0.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./ThumbsUp-DlB_NWZ_.js";import"./Tool01-Bh8f6_Lr.js";import"./ArrowUp-BMgP0No9.js";import"./ArrowLeft-CywqmCNu.js";import"./XCircle-BWlR7HX0.js";import"./TrendUp01-ynlv1gpu.js";import"./ZoomOut-sEpSue33.js";import"./CheckCircle-1uYJvE9R.js";import"./ChevronUp-CntIa4Yf.js";import"./ChevronRight-j3-DQlb0.js";import"./ChevronSelectorVertical-BnbOCSAX.js";import"./DotsVertical-8OtA5I8O.js";import"./UserSquare-DT8w5Z-P.js";import"./CreditCard01-CHaZ2sMI.js";import"./Download01-CAoDeKDd.js";import"./Settings02-Csm5-X4i.js";import"./Eye-B4X68jRO.js";import"./Share07-CyOQ8OqI.js";import"./GitBranch01-jt6WHdd3.js";import"./Globe01-kcWHNDyS.js";import"./XClose-Bx5KD8jT.js";import"./HardDrive-CGTEVnyE.js";import"./Image01--hANRVOq.js";import"./Link01-CcXI2IvB.js";import"./LinkExternal01-nUldOumU.js";import"./LockUnlocked01-Y44cJZ0e.js";import"./Monitor01-EpUmYxRg.js";import"./Sun-DG6PIqDR.js";import"./Package-B3Y15mXD.js";import"./Palette-D62R9ejX.js";import"./Shield01-CR2c-0aZ.js";import"./Stars01-D8TiZoSU.js";import"./Trash01-Af2cYCSZ.js";import"./Upload01-BaHT1_2n.js";import"./User01-Bjxghj8p.js";import"./Users01-B_U1BEfS.js";import"./Zap-l104pDRq.js";import"./badge-CfuwGD09.js";import"./mcp-oauth-DHC7RlhS.js";import"./editor-xJGw1ShI.js";import"./use-panel-navigate-OMxj4-qW.js";import"./thread-route-BHfAbZVP.js";import"./dialog-BfK9Q3g-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-y2mE4YVx.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CwR7vIYI.js";import"./avatar-3m9tis9C.js";import"./use-project-scope-08e0hkP_.js";import"./command-M53B5oOY.js";import"./required-auth-layout-BoRA3keT.js";import"./use-org-sso-Z6AeT-8g.js";function Et(s){const e=L.c(15),{onSave:r,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:u}=s,c=a===void 0?"Save":a,n=u===void 0?"Undo":u;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let g;e[1]!==i||e[2]!==o||e[3]!==n?(g=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":n,children:[x,n]}),e[1]=i,e[2]=o,e[3]=n,e[4]=g):g=e[4];let m;e[5]!==i?(m=i?t.jsx(X,{className:"size-3.5"}):t.jsx(at,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==r||e[9]!==c||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:r,disabled:i,"aria-label":c,children:[m,c]}),e[7]=i,e[8]=r,e[9]=c,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ye({title:ie().min(1),description:ie().nullable(),body:ie()});function me(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ot(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),r=e>=0?s[e+1]:void 0;return r?decodeURIComponent(r):void 0}function Rt(s){const e=L.c(43),{form:r}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(ce,{children:t.jsx(ue,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let u;e[6]!==r.control||e[7]!==a?(u=t.jsx(re,{control:r.control,name:"title",render:a}),e[6]=r.control,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==o?(c=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(ce,{children:t.jsx(ue,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=c):c=e[10];let n;e[11]!==r.control||e[12]!==c?(n=t.jsx(re,{control:r.control,name:"description",render:c}),e[11]=r.control,e[12]=c,e[13]=n):n=e[13];let x;e[14]!==u||e[15]!==n?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u,n]}),e[14]=u,e[15]=n,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=g):g=e[19];let m;e[20]!==o?(m=o("details.prompt.message"),e[20]=o,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]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ae,{children:t.jsx(ce,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("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]=o,e[29]=N):N=e[29];let S;e[30]!==r.control||e[31]!==N?(S=t.jsx(re,{control:r.control,name:"body",render:N}),e[30]=r.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(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:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==r||e[41]!==y?(P=t.jsx(st,{...r,children:y}),e[40]=r,e[41]=y,e[42]=P):P=e[42],P}function Ft(s){const e=L.c(42),{providerId:r,promptId:o}=s,l=W(),{org:i}=xe(),a=r||null;let u;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(u={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=u):u=e[3];const c=he(u),n=Ge(r,"PROMPT",o,c),x=Ee(r,"PROMPT",c),g=x.update.isPending;let m;e[4]!==n?(m=n?{title:n.title,description:n.description??null,body:me(n)}:void 0,e[4]=n,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=Xe(f);let j;e[8]!==p||e[9]!==n?(j=()=>{n&&p.reset({title:n.title,description:n.description??null,body:me(n)})},e[8]=p,e[9]=n,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,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:me(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!n){let C;e[15]!==l?(C=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=C):C=e[16];let I;e[17]!==l?(I=l("details.prompt.notFoundDescription"),e[17]=l,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(Re,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==n.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[22]=n.title,e[23]=y):y=e[23];let P;e[24]!==n.description?(P=n.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:n.description})]}):null,e[24]=n.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 b;e[29]!==$?(b=()=>{$()},e[29]=$,e[30]=b):b=e[30];let k;e[31]!==p.formState.isDirty||e[32]!==g||e[33]!==N||e[34]!==b?(k=t.jsx(ot,{children:t.jsx(Et,{onSave:b,onUndo:N,isDirty:p.formState.isDirty,isSaving:g})}),e[31]=p.formState.isDirty,e[32]=g,e[33]=N,e[34]=b,e[35]=k):k=e[35];let A;e[36]!==p?(A=t.jsx("div",{className:"h-full",children:t.jsx(Rt,{form:p})}),e[36]=p,e[37]=A):A=e[37];let E;return e[38]!==k||e[39]!==A||e[40]!==w?(E=t.jsxs(ge,{children:[w,k,A]}),e[38]=k,e[39]=A,e[40]=w,e[41]=E):E=e[41],E}function Mt(s){const e=L.c(10),{itemId:r}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ot(),e[0]=l):l=e[0];const i=l;if(!i){let u;e[1]!==o?(u=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=u):u=e[2];let c;e[3]!==o?(c=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=c):c=e[4];let n;return e[5]!==u||e[6]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Re,{title:u,description:c})}),e[5]=u,e[6]=c,e[7]=n):n=e[7],n}let a;return e[8]!==r?(a=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:null,children:t.jsx(Ft,{providerId:i,promptId:r})})}),e[8]=r,e[9]=a):a=e[9],a}const zt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Bt(s){const e=L.c(12),{toolName:r,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,u=W();let c;e[0]!==o?(c={connectionId:o},e[0]=o,e[1]=c):c=e[1];const n=yt(c);if(!n.isAuthenticated){let m;return e[2]!==n.supportsOAuth||e[3]!==a||e[4]!==u?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:n.supportsOAuth?t.jsx(lt,{onAuthenticate:()=>a(),buttonText:u("details.tool.goBackToAuthenticate")}):t.jsx(it,{hasReadme:!1})}),e[2]=n.supportsOAuth,e[3]=a,e[4]=u,e[5]=m):m=e[5],m}const x=`${o}:${r}`;let g;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==r?(g=t.jsx(Lt,{toolName:r,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=r,e[11]=g):g=e[11],g}function Lt({toolName:s,connectionId:e,siblings:r,onSelectInstance:o}){const l=W(),{replayId:i}=Ze({strict:!1}),a=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),u=(()=>{if(!a)return null;const d={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?d[h]=JSON.stringify(T,null,2):d[h]=T;return d})(),[c,n]=D.useState(u??{}),[x,g]=D.useState(a?JSON.stringify(a,null,2):"{}"),[m,f]=D.useState(null),[p,j]=D.useState(null),[N,S]=D.useState(null),[$,y]=D.useState(null),[P,w]=D.useState(!1),[b,k]=D.useState(null),{org:A}=xe(),E=Be(e),C=$t(),I=Pt(),{openSidePanel:O}=kt(),U=`${e}:${s}`,F=he({connectionId:e,orgId:A.id,orgSlug:A.slug}),V=Ct({client:F}),v=V.data?.tools?.find(d=>d.name===s),R=xt(v?._meta),J=d=>{if(!C)return;const h=Tt(d.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[M,z]=D.useState("json"),[q,Q]=D.useState(!1);R&&!q&&(z("ui"),Q(!0));const _=v?.inputSchema?.properties,je=_?Object.keys(_):[],G=je.length>0,Z={};if(G&&v?.inputSchema?.properties)for(const d of je)Z[d]=v.inputSchema.required?.includes(d)?"":void 0;const ne=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const d=performance.now();try{if(!F)throw new Error("MCP client is not available");const h=G?{...Z,...c}:(()=>{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.")})();G&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[B]=="string")try{h[B]=JSON.parse(h[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[B]=="string"&&h[B]!==""){const ve=Number(h[B]);Number.isNaN(ve)||(h[B]=ve)}});const T=await F.callTool({name:s,arguments:h}),ee=T.structuredContent??T,Ke=performance.now(),We=Math.round(Ke-d);f(ee),j(T),S(h);const Qe=JSON.stringify(ee),Ne=new TextEncoder().encode(Qe).length;k({duration:`${We}ms`,bytes:`${Ne} bytes`,tokens:`~${Math.ceil(Ne/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const ee=performance.now();k({duration:`${Math.round(ee-d)}ms`})}finally{w(!1)}},le=(d,h)=>{n(T=>({...T,[d]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},_e=v?.name??zt(s),Je=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:A.slug},children:l("details.tool.connections")})})}),t.jsx(oe,{}),E&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:A.slug,appSlug:St(E)},search:{tab:"tools"},children:E.title})})}),t.jsx(oe,{})]}),t.jsx(Y,{children:t.jsx(ze,{children:_e})})]})}),be=r.length>1&&t.jsxs(Te,{value:e,onValueChange:o,children:[t.jsx($e,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Pe,{})}),t.jsx(ke,{children:r.map(d=>t.jsx(de,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),qe=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:l("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:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:G&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([d,h])=>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:[d,v.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(pe,{className:"font-mono text-xs",value:ne(d)?c[d]??"":Z[d]??"",onChange:T=>le(d,T.target.value),placeholder:l("details.tool.enterAsJson",{key:d}),rows:3}):h.type==="boolean"?t.jsxs(Te,{value:ne(d)?String(c[d]??""):"",onValueChange:T=>le(d,T==="true"),children:[t.jsx($e,{children:t.jsx(Pe,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs(ke,{children:[t.jsx(de,{value:"true",children:"true"}),t.jsx(de,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ne(d)?c[d]??"":Z[d]??"",onChange:T=>le(d,T.target.value),placeholder:l("details.tool.enter",{key:d})})]},d)):v?.inputSchema&&!G?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(pe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>g(d.target.value),placeholder:l("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:l("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:Ve,children:[t.jsx(ct,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),He=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:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.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:b.tokens})]}),b.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:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),R&&t.jsx(et,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>z("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(we,{children:l("details.tool.interactiveView")})]}),t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>z("json"),children:t.jsx(Ce,{size:14})})}),t.jsx(we,{children:l("details.tool.jsonView")})]})]})})]})]}),$&&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(bt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:R&&M==="ui"&&F?t.jsx(D.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(X,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:R,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:Ie.view.minHeight,maxHeight:Ie.view.maxHeight,client:F,onMessage:J,onUpdateModelContext:d=>I?.setAppContext(U,d),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(It,{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)),tt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(Nt,{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(Ce,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(ge,{breadcrumb:Je,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(Ae,{icon:E?.icon||null,name:E?.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(X,{className:"size-[10px] 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(wt,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:be})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),r.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:l("details.tool.instance")}),be]}),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:qe}),He]})})]})})}function Ut(s){const e=L.c(20),{itemId:r,siblings:o,onBack:l}=s,i=W(),[a,u]=D.useState(o[0]?.id??"");let c;e[0]!==a||e[1]!==o?(c=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=c):c=e[2];const n=c;if(!Be(n||void 0)||!n){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 j;e[7]!==i?(j=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(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,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let m;return e[15]!==n||e[16]!==l||e[17]!==o||e[18]!==r?(m=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Bt,{toolName:r,connectionId:n,siblings:o,onSelectInstance:u,onBack:l})}),e[15]=n,e[16]=l,e[17]=o,e[18]=r,e[19]=m):m=e[19],m}const Vt={prompt:Mt};function _t(){const s=L.c(9),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Le(i);let u;s[3]!==e.history?(u=()=>{e.history.back()},s[3]=e.history,s[4]=u):u=s[4];const c=u,n=Jt;let x;return s[5]!==c||s[6]!==l||s[7]!==a?(x=t.jsx(Ut,{itemId:l,siblings:a,onBack:c,onUpdate:n}),s[5]=c,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Jt(s){return Promise.resolve()}function qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Ht(){const s=L.c(52),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const c=u,{org:n}=xe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const m=Le(x)[0]??null,f=m?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==n.id||s[6]!==n.slug||s[7]!==j?(N={connectionId:j,orgId:n.id,orgSlug:n.slug},s[5]=n.id,s[6]=n.slug,s[7]=j,s[8]=N):N=s[8];const S=he(N),$=Ee(p,i,S);let y;s[9]!==$||s[10]!==a?(y=async _=>{a&&await $.update.mutateAsync({id:a,data:_})},s[9]=$,s[10]=a,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 b=w,k=b&&Vt[b];let A;s[14]!==i?(A=qt(i),s[14]=i,s[15]=A):A=s[15];const E=A;let C;s[16]!==n.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:n.slug},children:"Connections"})})}),s[16]=n.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(oe,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==m||s[21]!==n.slug||s[22]!==o.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:n.slug,appSlug:o.appSlug},search:{tab:i},children:m.title})})}),t.jsx(oe,{})]}),s[19]=i,s[20]=m,s[21]=n.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==E?(U=t.jsx(Y,{children:t.jsx(ze,{children:E})}),s[24]=E,s[25]=U):U=s[25];let F;s[26]!==O||s[27]!==U||s[28]!==C?(F=t.jsx(Fe,{children:t.jsxs(Me,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=F):F=s[29];const V=F;if(k){let _;return s[30]!==k||s[31]!==c||s[32]!==P||s[33]!==a?(_=t.jsx(k,{itemId:a,onBack:c,onUpdate:P}),s[30]=k,s[31]=c,s[32]=P,s[33]=a,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Dt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let R;s[36]!==l?(R=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=R):R=s[37];let J;s[38]!==l?(J=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=J):J=s[39];let M;s[40]!==l?(M=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=M):M=s[41];let z;s[42]!==c||s[43]!==M?(z={onClick:c,children:M},s[42]=c,s[43]=M,s[44]=z):z=s[44];let q;s[45]!==R||s[46]!==J||s[47]!==z?(q=t.jsx(At,{icon:v,title:R,description:J,buttonProps:z}),s[45]=R,s[46]=J,s[47]=z,s[48]=q):q=s[48];let Q;return s[49]!==V||s[50]!==q?(Q=t.jsx(ge,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=Q):Q=s[51],Q}function Kt(){const s=L.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 r=fe(e);if(decodeURIComponent(r.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_t,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ht,{}),s[2]=i):i=s[2],i}function Wo(){const s=L.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Kt,{})})}),s[0]=e):e=s[0],e}export{Wo as default};
1
+ import{c as L,j as t,B as K,h as X,ae as Ye,ag as ie,b as W,E as De,r as D,W as xe,c7 as Ge,c8 as Ee,ar as Xe,u as Ze,L as te,a3 as et,a4 as Se,a1 as ye,a2 as we,t as tt,f as fe,c9 as Oe}from"./index-KlN2gCIz.js";import{E as Re}from"./empty-state-CRx1rEIR.js";import{u as he}from"./use-mcp-client-DaJV2zKk.js";import{d as re,F as st,a as ae,b as ce}from"./form-KNJGif8F.js";import{I as ue}from"./input-HEtJVl9i.js";import{T as pe}from"./textarea-BvwRrfOE.js";import{a as ot,b as nt,V as ge,O as lt,M as it}from"./index-6Ycnwbva.js";import{aN as rt,R as at,aO as ct,ax as dt,aj as mt,ak as ut,aP as pt,r as Ce}from"./agent-icon-9NxB5SOp.js";import{g as xt,M as ft,a as Ie}from"./types-D6oSpRz1.js";import{A as ht,a as gt,b as jt}from"./alert-4OAU_nBA.js";import{S as Te,a as $e,b as Pe,c as ke,d as de}from"./select-BqDsJm6t.js";import{B as Fe,a as Me,b as Y,c as se,d as oe,e as ze}from"./breadcrumb-TNKPI3dS.js";import{i as bt}from"./AlertCircle-mzPvygUw.js";import{a as Nt}from"./Copy01-DQrZ6li-.js";import{i as vt}from"./Play-BOlL7p4H.js";import{g as St}from"./connection-slug-CITJ0kGN.js";import{u as yt,T as wt}from"./use-mcp-auth-status-DIwhYzpu.js";import{a as Be,u as Le}from"./use-connection-C_L1iNkQ.js";import{a as Ct}from"./use-mcp-tools-DS4bYai0.js";import{M as It,c as Tt}from"./monaco-editor-u3OHcMfo.js";import{I as Ae}from"./integration-icon-BgsghQ7E.js";import{k as $t,q as Pt}from"./chat-context-E6CzjtFL.js";import{u as kt}from"./shell-layout-CvYCmCNz.js";import{E as At}from"./empty-state-DJ43bnFn.js";import{n as Dt}from"./Tool02-CUjmmZmP.js";import"./constants-DNuUCxmW.js";import"./auth-7gOJrCJs.js";import"./label-C0PesxR-.js";import"./Key01-a9vi-Tku.js";import"./extract-connection-data-MINwSTDT.js";import"./metadata-dUsYcpuu.js";import"./connection-CZKw5XC0.js";import"./use-registry-connections-BPblfAxm.js";import"./use-organization-settings-Bm9CU7A0.js";import"./schema-84vLWA89.js";import"./task-board-B75_z9Rj.js";import"./Plus-B4HOF1E1.js";import"./index-Da2hHsRU.js";import"./index-B0bzsRbf.js";import"./index-BbTCpGvf.js";import"./popover-DMAen6H4.js";import"./use-virtual-mcp-D1i-P-jz.js";import"./Check-DFpZ57WE.js";import"./SearchMd-BL3yOzl8.js";import"./Users03-B7rH-Prq.js";import"./use-create-virtual-mcp-BaW9xhHR.js";import"./use-navigate-to-agent-DsYRGB5d.js";import"./use-destination-route-C-c7cE6M.js";import"./hooks-WsI05bHe.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CGjOzfxR.js";import"./thread-intent-aJd8je2A.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./ThumbsUp-DZtUuNqz.js";import"./Tool01-3TSBet75.js";import"./ArrowUp-Yj21fZGL.js";import"./ArrowLeft-Bp9N4N0-.js";import"./XCircle-BcRsQfbp.js";import"./TrendUp01-B1pPYfuK.js";import"./ZoomOut-CN3_bE81.js";import"./CheckCircle-BL9fUGh0.js";import"./ChevronUp-DoFbOo5V.js";import"./ChevronRight-B0k8i06h.js";import"./ChevronSelectorVertical-C36SdIlf.js";import"./DotsVertical-DJWfzfak.js";import"./UserSquare-DAvB_kFJ.js";import"./CreditCard01-BwmXIXJx.js";import"./Download01-DsQzO8cd.js";import"./Settings02-Bj1lDwij.js";import"./Eye-BC_4l4lG.js";import"./Share07-K9acKdZ2.js";import"./GitBranch01-C4EIccIA.js";import"./Globe01-DHMT8bp9.js";import"./XClose-CfMSoySe.js";import"./HardDrive-DO3IjmaH.js";import"./Image01-C4TVJnST.js";import"./Link01-BWge3x25.js";import"./LinkExternal01-qomjjlr4.js";import"./LockUnlocked01-BD5ISYeA.js";import"./Monitor01-BB9oelwa.js";import"./Sun-v51TgHoC.js";import"./Package-DRO-nel6.js";import"./Palette-CzJtqmLV.js";import"./Shield01-B2le5qB9.js";import"./Stars01-DBkTEhiq.js";import"./Trash01-RcSuYrVJ.js";import"./Upload01-lXk5j7xP.js";import"./User01-AECGy6qL.js";import"./Users01-BgVgHDh8.js";import"./Zap-B1-2Q3w4.js";import"./badge-DU8Pt1Ge.js";import"./mcp-oauth-B78QmrXr.js";import"./editor-BX-SJ89b.js";import"./use-panel-navigate-B_jYd-oO.js";import"./thread-route-nSN2wMws.js";import"./dialog-oJmEQ7fd.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D3ICNjqW.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CjxND1rZ.js";import"./avatar-gFJWL-Vg.js";import"./use-project-scope-M7A4kaM_.js";import"./command-C_Uammpe.js";import"./required-auth-layout-ByszmYIS.js";import"./use-org-sso-BhjEyf4c.js";function Et(s){const e=L.c(15),{onSave:r,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:u}=s,c=a===void 0?"Save":a,n=u===void 0?"Undo":u;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let g;e[1]!==i||e[2]!==o||e[3]!==n?(g=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":n,children:[x,n]}),e[1]=i,e[2]=o,e[3]=n,e[4]=g):g=e[4];let m;e[5]!==i?(m=i?t.jsx(X,{className:"size-3.5"}):t.jsx(at,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==r||e[9]!==c||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:r,disabled:i,"aria-label":c,children:[m,c]}),e[7]=i,e[8]=r,e[9]=c,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ye({title:ie().min(1),description:ie().nullable(),body:ie()});function me(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ot(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),r=e>=0?s[e+1]:void 0;return r?decodeURIComponent(r):void 0}function Rt(s){const e=L.c(43),{form:r}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(ce,{children:t.jsx(ue,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let u;e[6]!==r.control||e[7]!==a?(u=t.jsx(re,{control:r.control,name:"title",render:a}),e[6]=r.control,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==o?(c=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(ce,{children:t.jsx(ue,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=c):c=e[10];let n;e[11]!==r.control||e[12]!==c?(n=t.jsx(re,{control:r.control,name:"description",render:c}),e[11]=r.control,e[12]=c,e[13]=n):n=e[13];let x;e[14]!==u||e[15]!==n?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u,n]}),e[14]=u,e[15]=n,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=g):g=e[19];let m;e[20]!==o?(m=o("details.prompt.message"),e[20]=o,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]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ae,{children:t.jsx(ce,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("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]=o,e[29]=N):N=e[29];let S;e[30]!==r.control||e[31]!==N?(S=t.jsx(re,{control:r.control,name:"body",render:N}),e[30]=r.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(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:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==r||e[41]!==y?(P=t.jsx(st,{...r,children:y}),e[40]=r,e[41]=y,e[42]=P):P=e[42],P}function Ft(s){const e=L.c(42),{providerId:r,promptId:o}=s,l=W(),{org:i}=xe(),a=r||null;let u;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(u={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=u):u=e[3];const c=he(u),n=Ge(r,"PROMPT",o,c),x=Ee(r,"PROMPT",c),g=x.update.isPending;let m;e[4]!==n?(m=n?{title:n.title,description:n.description??null,body:me(n)}:void 0,e[4]=n,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=Xe(f);let j;e[8]!==p||e[9]!==n?(j=()=>{n&&p.reset({title:n.title,description:n.description??null,body:me(n)})},e[8]=p,e[9]=n,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,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:me(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!n){let C;e[15]!==l?(C=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=C):C=e[16];let I;e[17]!==l?(I=l("details.prompt.notFoundDescription"),e[17]=l,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(Re,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==n.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[22]=n.title,e[23]=y):y=e[23];let P;e[24]!==n.description?(P=n.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:n.description})]}):null,e[24]=n.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 b;e[29]!==$?(b=()=>{$()},e[29]=$,e[30]=b):b=e[30];let k;e[31]!==p.formState.isDirty||e[32]!==g||e[33]!==N||e[34]!==b?(k=t.jsx(ot,{children:t.jsx(Et,{onSave:b,onUndo:N,isDirty:p.formState.isDirty,isSaving:g})}),e[31]=p.formState.isDirty,e[32]=g,e[33]=N,e[34]=b,e[35]=k):k=e[35];let A;e[36]!==p?(A=t.jsx("div",{className:"h-full",children:t.jsx(Rt,{form:p})}),e[36]=p,e[37]=A):A=e[37];let E;return e[38]!==k||e[39]!==A||e[40]!==w?(E=t.jsxs(ge,{children:[w,k,A]}),e[38]=k,e[39]=A,e[40]=w,e[41]=E):E=e[41],E}function Mt(s){const e=L.c(10),{itemId:r}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ot(),e[0]=l):l=e[0];const i=l;if(!i){let u;e[1]!==o?(u=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=u):u=e[2];let c;e[3]!==o?(c=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=c):c=e[4];let n;return e[5]!==u||e[6]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Re,{title:u,description:c})}),e[5]=u,e[6]=c,e[7]=n):n=e[7],n}let a;return e[8]!==r?(a=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:null,children:t.jsx(Ft,{providerId:i,promptId:r})})}),e[8]=r,e[9]=a):a=e[9],a}const zt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Bt(s){const e=L.c(12),{toolName:r,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,u=W();let c;e[0]!==o?(c={connectionId:o},e[0]=o,e[1]=c):c=e[1];const n=yt(c);if(!n.isAuthenticated){let m;return e[2]!==n.supportsOAuth||e[3]!==a||e[4]!==u?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:n.supportsOAuth?t.jsx(lt,{onAuthenticate:()=>a(),buttonText:u("details.tool.goBackToAuthenticate")}):t.jsx(it,{hasReadme:!1})}),e[2]=n.supportsOAuth,e[3]=a,e[4]=u,e[5]=m):m=e[5],m}const x=`${o}:${r}`;let g;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==r?(g=t.jsx(Lt,{toolName:r,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=r,e[11]=g):g=e[11],g}function Lt({toolName:s,connectionId:e,siblings:r,onSelectInstance:o}){const l=W(),{replayId:i}=Ze({strict:!1}),a=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),u=(()=>{if(!a)return null;const d={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?d[h]=JSON.stringify(T,null,2):d[h]=T;return d})(),[c,n]=D.useState(u??{}),[x,g]=D.useState(a?JSON.stringify(a,null,2):"{}"),[m,f]=D.useState(null),[p,j]=D.useState(null),[N,S]=D.useState(null),[$,y]=D.useState(null),[P,w]=D.useState(!1),[b,k]=D.useState(null),{org:A}=xe(),E=Be(e),C=$t(),I=Pt(),{openSidePanel:O}=kt(),U=`${e}:${s}`,F=he({connectionId:e,orgId:A.id,orgSlug:A.slug}),V=Ct({client:F}),v=V.data?.tools?.find(d=>d.name===s),R=xt(v?._meta),J=d=>{if(!C)return;const h=Tt(d.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[M,z]=D.useState("json"),[q,Q]=D.useState(!1);R&&!q&&(z("ui"),Q(!0));const _=v?.inputSchema?.properties,je=_?Object.keys(_):[],G=je.length>0,Z={};if(G&&v?.inputSchema?.properties)for(const d of je)Z[d]=v.inputSchema.required?.includes(d)?"":void 0;const ne=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const d=performance.now();try{if(!F)throw new Error("MCP client is not available");const h=G?{...Z,...c}:(()=>{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.")})();G&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[B]=="string")try{h[B]=JSON.parse(h[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[B]=="string"&&h[B]!==""){const ve=Number(h[B]);Number.isNaN(ve)||(h[B]=ve)}});const T=await F.callTool({name:s,arguments:h}),ee=T.structuredContent??T,Ke=performance.now(),We=Math.round(Ke-d);f(ee),j(T),S(h);const Qe=JSON.stringify(ee),Ne=new TextEncoder().encode(Qe).length;k({duration:`${We}ms`,bytes:`${Ne} bytes`,tokens:`~${Math.ceil(Ne/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const ee=performance.now();k({duration:`${Math.round(ee-d)}ms`})}finally{w(!1)}},le=(d,h)=>{n(T=>({...T,[d]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},_e=v?.name??zt(s),Je=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:A.slug},children:l("details.tool.connections")})})}),t.jsx(oe,{}),E&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:A.slug,appSlug:St(E)},search:{tab:"tools"},children:E.title})})}),t.jsx(oe,{})]}),t.jsx(Y,{children:t.jsx(ze,{children:_e})})]})}),be=r.length>1&&t.jsxs(Te,{value:e,onValueChange:o,children:[t.jsx($e,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Pe,{})}),t.jsx(ke,{children:r.map(d=>t.jsx(de,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),qe=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:l("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:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:G&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([d,h])=>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:[d,v.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(pe,{className:"font-mono text-xs",value:ne(d)?c[d]??"":Z[d]??"",onChange:T=>le(d,T.target.value),placeholder:l("details.tool.enterAsJson",{key:d}),rows:3}):h.type==="boolean"?t.jsxs(Te,{value:ne(d)?String(c[d]??""):"",onValueChange:T=>le(d,T==="true"),children:[t.jsx($e,{children:t.jsx(Pe,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs(ke,{children:[t.jsx(de,{value:"true",children:"true"}),t.jsx(de,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ne(d)?c[d]??"":Z[d]??"",onChange:T=>le(d,T.target.value),placeholder:l("details.tool.enter",{key:d})})]},d)):v?.inputSchema&&!G?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(pe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>g(d.target.value),placeholder:l("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:l("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:Ve,children:[t.jsx(ct,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),He=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:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.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:b.tokens})]}),b.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:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),R&&t.jsx(et,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>z("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(we,{children:l("details.tool.interactiveView")})]}),t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>z("json"),children:t.jsx(Ce,{size:14})})}),t.jsx(we,{children:l("details.tool.jsonView")})]})]})})]})]}),$&&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(bt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:R&&M==="ui"&&F?t.jsx(D.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(X,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:R,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:Ie.view.minHeight,maxHeight:Ie.view.maxHeight,client:F,onMessage:J,onUpdateModelContext:d=>I?.setAppContext(U,d),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(It,{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)),tt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(Nt,{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(Ce,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(ge,{breadcrumb:Je,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(Ae,{icon:E?.icon||null,name:E?.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(X,{className:"size-[10px] 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(wt,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:be})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),r.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:l("details.tool.instance")}),be]}),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:qe}),He]})})]})})}function Ut(s){const e=L.c(20),{itemId:r,siblings:o,onBack:l}=s,i=W(),[a,u]=D.useState(o[0]?.id??"");let c;e[0]!==a||e[1]!==o?(c=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=c):c=e[2];const n=c;if(!Be(n||void 0)||!n){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 j;e[7]!==i?(j=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(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,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let m;return e[15]!==n||e[16]!==l||e[17]!==o||e[18]!==r?(m=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Bt,{toolName:r,connectionId:n,siblings:o,onSelectInstance:u,onBack:l})}),e[15]=n,e[16]=l,e[17]=o,e[18]=r,e[19]=m):m=e[19],m}const Vt={prompt:Mt};function _t(){const s=L.c(9),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Le(i);let u;s[3]!==e.history?(u=()=>{e.history.back()},s[3]=e.history,s[4]=u):u=s[4];const c=u,n=Jt;let x;return s[5]!==c||s[6]!==l||s[7]!==a?(x=t.jsx(Ut,{itemId:l,siblings:a,onBack:c,onUpdate:n}),s[5]=c,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Jt(s){return Promise.resolve()}function qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Ht(){const s=L.c(52),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const c=u,{org:n}=xe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const m=Le(x)[0]??null,f=m?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==n.id||s[6]!==n.slug||s[7]!==j?(N={connectionId:j,orgId:n.id,orgSlug:n.slug},s[5]=n.id,s[6]=n.slug,s[7]=j,s[8]=N):N=s[8];const S=he(N),$=Ee(p,i,S);let y;s[9]!==$||s[10]!==a?(y=async _=>{a&&await $.update.mutateAsync({id:a,data:_})},s[9]=$,s[10]=a,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 b=w,k=b&&Vt[b];let A;s[14]!==i?(A=qt(i),s[14]=i,s[15]=A):A=s[15];const E=A;let C;s[16]!==n.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:n.slug},children:"Connections"})})}),s[16]=n.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(oe,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==m||s[21]!==n.slug||s[22]!==o.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:n.slug,appSlug:o.appSlug},search:{tab:i},children:m.title})})}),t.jsx(oe,{})]}),s[19]=i,s[20]=m,s[21]=n.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==E?(U=t.jsx(Y,{children:t.jsx(ze,{children:E})}),s[24]=E,s[25]=U):U=s[25];let F;s[26]!==O||s[27]!==U||s[28]!==C?(F=t.jsx(Fe,{children:t.jsxs(Me,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=F):F=s[29];const V=F;if(k){let _;return s[30]!==k||s[31]!==c||s[32]!==P||s[33]!==a?(_=t.jsx(k,{itemId:a,onBack:c,onUpdate:P}),s[30]=k,s[31]=c,s[32]=P,s[33]=a,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Dt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let R;s[36]!==l?(R=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=R):R=s[37];let J;s[38]!==l?(J=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=J):J=s[39];let M;s[40]!==l?(M=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=M):M=s[41];let z;s[42]!==c||s[43]!==M?(z={onClick:c,children:M},s[42]=c,s[43]=M,s[44]=z):z=s[44];let q;s[45]!==R||s[46]!==J||s[47]!==z?(q=t.jsx(At,{icon:v,title:R,description:J,buttonProps:z}),s[45]=R,s[46]=J,s[47]=z,s[48]=q):q=s[48];let Q;return s[49]!==V||s[50]!==q?(Q=t.jsx(ge,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=Q):Q=s[51],Q}function Kt(){const s=L.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 r=fe(e);if(decodeURIComponent(r.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_t,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ht,{}),s[2]=i):i=s[2],i}function Wo(){const s=L.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Kt,{})})}),s[0]=e):e=s[0],e}export{Wo as default};
@@ -1 +1 @@
1
- import{c as $,b as A,j as s,l as z,a1 as E,B as F,a2 as L,a3 as O,a4 as R}from"./index--Yue-AUv.js";import{a as S,D as _,b as I,c as K}from"./dropdown-menu-Dec6DJmV.js";import{i as P,n as W}from"./ArrowUp-BMgP0No9.js";import{i as V}from"./Check-C4UJfE-5.js";import{a as q,i as G,c as H}from"./XClose-Bx5KD8jT.js";import{V as J}from"./view-mode-toggle-DzNGlJws.js";import{B as Q}from"./badge-CfuwGD09.js";function ie(t){const e=$.c(36),{viewMode:l,onViewModeChange:f,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(q,{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(E,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(F,{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(L,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(O,{children:s.jsxs(R,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==f||e[19]!==l?(x=f&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:f,fullWidth:!0,options:[{value:"table",icon:s.jsx(G,{})},{value:"cards",icon:s.jsx(H,{})}]})}),e[18]=f,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(B=>{const T=M===B.id;return s.jsx(S,{onClick:()=>g(B.id),className:z("h-8 px-2 py-0 cursor-pointer",T&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[T&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!T&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:B.label}),T&&h&&(h==="asc"?s.jsx(P,{size:16,className:"text-foreground shrink-0"}):s.jsx(W,{size:16,className:"text-foreground shrink-0"}))]})},B.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 u;e[29]!==x||e[30]!==m||e[31]!==p?(u=s.jsxs(I,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=u):u=e[32];let D;return e[33]!==d||e[34]!==u?(D=s.jsxs(K,{children:[d,u]}),e[33]=d,e[34]=u,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{ie as C};
1
+ import{c as $,b as A,j as s,l as z,a1 as E,B as F,a2 as L,a3 as O,a4 as R}from"./index-KlN2gCIz.js";import{a as S,D as _,b as I,c as K}from"./dropdown-menu-DwjXZoet.js";import{i as P,n as W}from"./ArrowUp-Yj21fZGL.js";import{i as V}from"./Check-DFpZ57WE.js";import{a as q,i as G,c as H}from"./XClose-CfMSoySe.js";import{V as J}from"./view-mode-toggle-BxwtIeBE.js";import{B as Q}from"./badge-DU8Pt1Ge.js";function ie(t){const e=$.c(36),{viewMode:l,onViewModeChange:f,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(q,{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(E,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(F,{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(L,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(O,{children:s.jsxs(R,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==f||e[19]!==l?(x=f&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:f,fullWidth:!0,options:[{value:"table",icon:s.jsx(G,{})},{value:"cards",icon:s.jsx(H,{})}]})}),e[18]=f,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(B=>{const T=M===B.id;return s.jsx(S,{onClick:()=>g(B.id),className:z("h-8 px-2 py-0 cursor-pointer",T&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[T&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!T&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:B.label}),T&&h&&(h==="asc"?s.jsx(P,{size:16,className:"text-foreground shrink-0"}):s.jsx(W,{size:16,className:"text-foreground shrink-0"}))]})},B.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 u;e[29]!==x||e[30]!==m||e[31]!==p?(u=s.jsxs(I,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=u):u=e[32];let D;return e[33]!==d||e[34]!==u?(D=s.jsxs(K,{children:[d,u]}),e[33]=d,e[34]=u,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{ie as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,h as w}from"./index--Yue-AUv.js";import{i as C}from"./SearchMd-Dzr_CKGG.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=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 p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,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]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
1
+ import{c as v,l as b,j as a,h as w}from"./index-KlN2gCIz.js";import{i as C}from"./SearchMd-BL3yOzl8.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=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 p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,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]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
@@ -1 +1 @@
1
- import{c as k,j as r,l as C,b as S}from"./index--Yue-AUv.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-DamFI6PY.js";import{i as D,n as E}from"./ArrowUp-BMgP0No9.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,l as C,b as S}from"./index-KlN2gCIz.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-Dap-hV0L.js";import{i as D,n as E}from"./ArrowUp-Yj21fZGL.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,l as u,j as m}from"./index--Yue-AUv.js";import{B as g}from"./badge-CfuwGD09.js";function h(x){const e=f.c(12),{tabs:c,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]!==c){let l;e[6]!==n||e[7]!==s?(l=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]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,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,l as u,j as m}from"./index-KlN2gCIz.js";import{B as g}from"./badge-DU8Pt1Ge.js";function h(x){const e=f.c(12),{tabs:c,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]!==c){let l;e[6]!==n||e[7]!==s?(l=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]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,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,l as i,j as n}from"./index--Yue-AUv.js";import{_ as m}from"./index-dRXf6XAN.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-BfK9Q3g-.js";import{i as D}from"./SearchMd-Dzr_CKGG.js";function $(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 G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,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[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(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(D,{className:"size-4 shrink-0 text-muted-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 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("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 B(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:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(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 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("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 P(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-pointer 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{$ as C,L as a,R as b,B as c,P as d,F as e,G as f,H as g};
1
+ import{c as d,l as i,j as n}from"./index-KlN2gCIz.js";import{_ as m}from"./index-BbTCpGvf.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-oJmEQ7fd.js";import{i as D}from"./SearchMd-BL3yOzl8.js";function $(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 G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,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[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(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(D,{className:"size-4 shrink-0 text-muted-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 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("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 B(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:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(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 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("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 P(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-pointer 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{$ as C,L as a,R as b,B as c,P as d,F as e,G as f,H as g};
@@ -1 +1 @@
1
- import{c as N,b as Q,j as r,l as Me,o as ue,p as st,B as Ne,u as Xe,r as Y,a as De,q as nt,d as lt,s as at,e as Ze,v as Ee,w as Se,Q as ct,E as mt,K as Be,x as He,N as dt}from"./index--Yue-AUv.js";import{L as ut,s as Te,S as We,i as gt,n as Re,C as et,p as Le}from"./self-tool-result-uGrWv2RA.js";import{a as ft}from"./auth-entry-B1JH7Spd.js";import{A as pt}from"./auth-split-layout-CcVNWwwP.js";import{O as qe}from"./organization-choice-BW5L4ONd.js";import{C as Ve}from"./create-organization-dialog-BK9RaRcK.js";import{r as ht}from"./track-DmA6YrxI.js";import{I as bt}from"./input-BFAX_ahy.js";import{D as xt,a as Ke,b as yt,c as Ct}from"./dropdown-menu-Dec6DJmV.js";import{u as jt}from"./use-mcp-client-AO8IHYzf.js";import{S as Ot,W as vt,g as St,a as _t}from"./constants-DNuUCxmW.js";import{i as wt}from"./XCircle-BWlR7HX0.js";import{t as Qe}from"./site-error--i37Vnuw.js";import"./integration-icon-BJE1IZ2g.js";import"./Tool02-DslfH0Sk.js";import"./agent-icon-BJ71xWZj.js";import"./AlertCircle-XwHoogbQ.js";import"./ThumbsUp-DlB_NWZ_.js";import"./Tool01-Bh8f6_Lr.js";import"./ArrowUp-BMgP0No9.js";import"./ArrowLeft-CywqmCNu.js";import"./TrendUp01-ynlv1gpu.js";import"./ZoomOut-sEpSue33.js";import"./Users03-HvW7gxZG.js";import"./CheckCircle-1uYJvE9R.js";import"./Check-C4UJfE-5.js";import"./ChevronUp-CntIa4Yf.js";import"./ChevronRight-j3-DQlb0.js";import"./ChevronSelectorVertical-BnbOCSAX.js";import"./DotsVertical-8OtA5I8O.js";import"./UserSquare-DT8w5Z-P.js";import"./Copy01-Dg5SICyn.js";import"./CreditCard01-CHaZ2sMI.js";import"./Download01-CAoDeKDd.js";import"./Settings02-Csm5-X4i.js";import"./Eye-B4X68jRO.js";import"./Share07-CyOQ8OqI.js";import"./GitBranch01-jt6WHdd3.js";import"./Globe01-kcWHNDyS.js";import"./XClose-Bx5KD8jT.js";import"./HardDrive-CGTEVnyE.js";import"./Image01--hANRVOq.js";import"./Key01-BwZSXIY4.js";import"./Link01-CcXI2IvB.js";import"./LinkExternal01-nUldOumU.js";import"./LockUnlocked01-Y44cJZ0e.js";import"./Monitor01-EpUmYxRg.js";import"./Sun-DG6PIqDR.js";import"./Package-B3Y15mXD.js";import"./Palette-D62R9ejX.js";import"./Play-bSVevPXQ.js";import"./Plus-CudxeIvX.js";import"./SearchMd-Dzr_CKGG.js";import"./Shield01-CR2c-0aZ.js";import"./Stars01-D8TiZoSU.js";import"./Trash01-Af2cYCSZ.js";import"./Upload01-BaHT1_2n.js";import"./User01-Bjxghj8p.js";import"./Users01-B_U1BEfS.js";import"./Zap-l104pDRq.js";import"./dialog-BfK9Q3g-.js";import"./extract-connection-data-3yzf0pk7.js";import"./metadata-dUsYcpuu.js";import"./connection-BkAIyVKV.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-CRmR_lLm.js";import"./label-DsmAdJ5N.js";import"./use-debounced-value-CHsHq1kp.js";import"./authenticate-and-persist-oauth-wB3C4Cdo.js";import"./mcp-oauth-DHC7RlhS.js";import"./auth-RtuDiJ_1.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-3m9tis9C.js";import"./alert-dialog-B0dP5uSI.js";const Ge={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ye=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function Ae({siteUrl:t,email:e,locale:s}){const i=(s&&Ge[s])??Ge["pt-BR"]??"https://decocms.com/agendar",o=new URL(i);return t&&o.searchParams.set("siteUrl",t),e&&o.searchParams.set("email",e),o.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:o,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==o?(c=Me("w-full",o),e[0]=o,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(st,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=r.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=r.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,o=Q();let l;e[0]!==o?(l=o("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=o,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ye.map((f,p)=>r.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ye.length-p},children:[r.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:r.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&r.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),r.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=r.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,o=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"-mt-9 mb-4",children:r.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==o?(n=o("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=o,e[3]=n):n=e[3];let c;e[4]!==n?(c=r.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==o?(m=o("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=o,e[7]=m):m=e[7];let d;e[8]!==m?(d=r.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=r.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=r.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=r.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:r.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,r.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let o,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=r.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=l,e[2]=a):(o=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=r.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:r.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=r.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=r.jsxs("div",{className:"flex items-center gap-3",children:[o,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let o;e[0]!==i||e[1]!==s?(o=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=o):o=e[2];const l=o;let a;return e[3]!==l?(a=r.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:r.jsx(ut,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function ur(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(Lt,{}),t[0]=e):e=t[0],e}const ot=Y.createContext(null),rt=()=>Y.useContext(ot);function It(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let o;t[0]!==i?(o=r.jsx(xt,{asChild:!0,children:r.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=o):o=t[1];let l;t[2]!==s?(l=()=>{s(zt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Me(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=r.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(Pt)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Me(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=r.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=r.jsxs(yt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==o||t[20]!==p?(O=r.jsxs(Ct,{children:[o,p]}),t[19]=o,t[20]=p,t[21]=O):O=t[21],O}function Pt(t){return{...t,language:"pt-BR"}}function zt(t){return{...t,language:"en"}}function H(t){const e=N.c(17);let s,i,o;e[0]!==t?({visual:o,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=De.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=Ae({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==o?(f=o??r.jsx(Fe,{href:u}),e[9]=u,e[10]=o,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsxs("div",{className:"flex justify-between items-start mb-8",children:[r.jsx("div",{}),r.jsx(It,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=r.jsxs(pt,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function Rt(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")}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Te(s);if(!Je&&nt()){Je=!0;const o=ht(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...o,...i?{$set:{last_scanned_domain:i}}:{}})}return r.jsx(ot.Provider,{value:i,children:r.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),{data:l,isPending:a}=De.useSession(),n=rt();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(H,{children:r.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==o?(d=o("routes.commerceOnboarding.unlockDiagnostic"),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?r.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==o?(f=Rt(o),e[5]=o,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=r.jsx(H,{children:r.jsx(ft,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=r.jsx(Mt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Mt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),l=lt(),a=at(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(Dt)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Tt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(H,{children:r.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==o?(g=o("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=o,e[3]=g):g=e[3];let h;e[4]!==o?(h=o("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=o,e[5]=h):h=e[5];let x;e[6]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=r.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==o?(g=o("routes.commerceOnboarding.orgNotFound"),e[18]=o,e[19]=g):g=e[19];let h;e[20]!==o?(h=o("routes.commerceOnboarding.couldNotFindOrg"),e[20]=o,e[21]=h):h=e[21];let x;e[22]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[22]=o,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=r.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=r.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[37]=o,e[38]=g):g=e[38];let h;e[39]!==o?(h=o("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=o,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=r.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==o?(b=o("routes.commerceOnboarding.authCopy.continue"),e[44]=o,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let M;e[49]===Symbol.for("react.memo_cache_sentinel")?(M=()=>f(!0),e[49]=M):M=e[49];let R;e[50]!==o?(R=o("routes.commerceOnboarding.createNewOrg"),e[50]=o,e[51]=R):R=e[51];let z;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==R?(z=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(qe,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:M,createNewLabel:R})}),e[52]=p,e[53]=b,e[54]=_,e[55]=R,e[56]=z):z=e[56];let U;e[57]!==x||e[58]!==z?(U=r.jsxs("div",{className:"grid gap-10",children:[x,z]}),e[57]=x,e[58]=z,e[59]=U):U=e[59];let T;e[60]!==l||e[61]!==i?(T=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=T):T=e[62];let I;e[63]!==u||e[64]!==T?(I=r.jsx(Ve,{open:u,onOpenChange:f,onCreated:T}),e[63]=u,e[64]=T,e[65]=I):I=e[65];let L;return e[66]!==U||e[67]!==I?(L=r.jsxs(H,{children:[U,I]}),e[66]=U,e[67]=I,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=r.jsx(At,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=r.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[77]=o,e[78]=g):g=e[78];let h;e[79]!==o?(h=o("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=o,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=r.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let M;e[84]!==l||e[85]!==i?(M=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=M):M=e[86];let R;e[87]===Symbol.for("react.memo_cache_sentinel")?(R=()=>f(!0),e[87]=R):R=e[87];let z;e[88]!==o?(z=o("routes.commerceOnboarding.createNewOrg"),e[88]=o,e[89]=z):z=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==M||e[93]!==z?(U=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(qe,{organizations:b,domain:_,onJoined:M,onCreateNew:R,createNewLabel:z})}),e[90]=C.organizations,e[91]=_,e[92]=M,e[93]=z,e[94]=U):U=e[94];let T;e[95]!==U||e[96]!==x?(T=r.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=T):T=e[97];let I;e[98]!==l||e[99]!==i?(I=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=I):I=e[100];let L;e[101]!==u||e[102]!==I?(L=r.jsx(Ve,{open:u,onOpenChange:f,onCreated:I}),e[101]=u,e[102]=I,e[103]=L):L=e[103];let j;return e[104]!==T||e[105]!==L?(j=r.jsxs(H,{children:[T,L]}),e[104]=T,e[105]=L,e[106]=j):j=e[106],j}let P;e[107]!==o?(P=o("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=o,e[108]=P):P=e[108];let E;e[109]!==C?.error||e[110]!==o?(E=C?.error??o("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=o,e[111]=E):E=e[111];let D;e[112]!==o?(D=o("routes.commerceOnboarding.retryAgain"),e[112]=o,e[113]=D):D=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==P||e[117]!==E||e[118]!==D||e[119]!==W?(q=r.jsx(_e,{title:P,description:E,actionLabel:D,onRetry:W}),e[116]=P,e[117]=E,e[118]=D,e[119]=W,e[120]=q):q=e[120],q}async function Tt(){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&&Se(),e}function Dt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function At(t){const e=N.c(16),{mutation:s,onRetry:i}=t,o=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==o?(d=o("routes.commerceOnboarding.onboardingUnavailable"),e[2]=o,e[3]=d):d=e[3];let u;e[4]!==o?(u=o("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=o,e[5]=u):u=e[5];let f;e[6]!==o?(f=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=r.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=r.jsx(H,{children:r.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,o=rt();let l;e[0]!==o?(l=o?r.jsx(tt,{host:o}):r.jsxs("div",{children:[r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&r.jsxs("div",{className:"space-y-2",children:[s&&r.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&r.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=r.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:o,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=r.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==o||e[4]!==l?(n=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:o}),e[3]=o,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=r.jsx(H,{children:r.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,o=Q(),{data:l}=De.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=Ae({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=r.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==o?(f=r.jsx(ct,{children:p=>{const{reset:O}=p;return r.jsx(mt,{fallback:v=>{const{error:w,resetError:C}=v;return r.jsx(H,{visual:u,children:r.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:o("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:r.jsx(Y.Suspense,{fallback:r.jsx(it,{visual:u}),children:r.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=o,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[r.jsx(J,{}),r.jsx(et,{})]}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=r.jsx(H,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=o):o=e[2],o}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:o}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=r.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=r.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==o||e[13]!==d?(u=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:o,children:d}),e[12]=o,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=r.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:o}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ot,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=vt.COMMERCE_DISCOVERY(s.id),p=St(s.id),O=Be.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=He(w),P=Be.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let D;e[12]!==P||e[13]!==E?(D={queryKey:P,queryFn:E,retry:!1},e[12]=P,e[13]=E,e[14]=D):D=e[14];const W=He(D);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Te(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Te(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,M=C.data.item,R=typeof M?.metadata?.siteUrl=="string"?M.metadata.siteUrl:void 0,z=i||n||"";let U;e[27]!==R||e[28]!==z?(U=gt(z,R),e[27]=R,e[28]=z,e[29]=U):U=e[29];const I=_&&U,L=i||n||R||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==o?(Z=Ae({siteUrl:L,email:o,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=o,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=r.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Qe(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const B=fe;let pe;e[40]!==b?(pe=y=>{const S=Re(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==I?(he=y=>{!y||u.current||I||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=I,e[45]=he):he=e[45];const Ie=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=Re(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(I){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let A;e[53]!==s.id?(A=_t(s.id),e[53]=s.id,e[54]=A):A=e[54];const G=L||void 0;let F;e[55]!==A.id||e[56]!==G?(F={virtualmcpid:A.id,connect:"1",siteUrl:G},e[55]=A.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=r.jsx(dt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=r.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,A,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==B||e[71]!==Ie){ne=Symbol.for("react.early_return_sentinel");e:{const Pe=Re(i);if(!Pe.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=r.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==B?(je=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=B,e[92]=je):je=e[92];const ze=r.jsxs("div",{className:"grid gap-10",children:[Ce,r.jsx(we,{message:Qe(j,Pe.error)}),je]});let Oe;e[93]!==$||e[94]!==ze?(Oe=r.jsx(H,{visual:$,children:ze}),e[93]=$,e[94]=ze,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=H,K=$,G=Ie,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],A=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Pe.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=B,e[71]=Ie,e[72]=y,e[73]=S,e[74]=k,e[75]=A,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],A=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==A?(le=r.jsx(y,{title:k,description:A}),e[98]=y,e[99]=k,e[100]=A,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==B?(ae=B?r.jsxs(r.Fragment,{children:[r.jsx(we,{message:B}),r.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):r.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=B,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=r.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=r.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let oe;e[118]!==s.name||e[119]!==j?(oe=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=oe):oe=e[120];let re;e[121]!==te||e[122]!==oe?(re=r.jsx(J,{title:te,description:oe}),e[121]=te,e[122]=oe,e[123]=re):re=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==B?(ie=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=B,e[128]=ie):ie=e[128];let se;e[129]!==re||e[130]!==ie?(se=r.jsxs("div",{className:"grid gap-10",children:[re,ie]}),e[129]=re,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=r.jsx(H,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:o,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=r.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=D=>l(D.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==o||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=r.jsx(bt,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:o}),e[8]=o,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?r.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=r.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(wt,{size:16}),e[22]=C):C=e[22];let P;e[23]!==o||e[24]!==w?(P=r.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:o,children:[w,C]}),e[23]=o,e[24]=w,e[25]=P):P=e[25];let E;return e[26]!==a||e[27]!==P||e[28]!==v?(E=r.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,P]}),e[26]=a,e[27]=P,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=r.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{ur as default};
1
+ import{c as N,b as Q,j as r,l as Me,o as ue,p as st,B as Ne,u as Xe,r as Y,a as De,q as nt,d as lt,s as at,e as Ze,v as Ee,w as Se,Q as ct,E as mt,K as Be,x as He,N as dt}from"./index-KlN2gCIz.js";import{L as ut,s as Te,S as We,i as gt,n as Re,C as et,p as Le}from"./self-tool-result-Crp_HAZ-.js";import{a as ft}from"./auth-entry-CmvczzF5.js";import{A as pt}from"./auth-split-layout-CdiwAUW1.js";import{O as qe}from"./organization-choice-DjXSPcsB.js";import{C as Ve}from"./create-organization-dialog-DmjxuakX.js";import{r as ht}from"./track-D1An3sTA.js";import{I as bt}from"./input-HEtJVl9i.js";import{D as xt,a as Ke,b as yt,c as Ct}from"./dropdown-menu-DwjXZoet.js";import{u as jt}from"./use-mcp-client-DaJV2zKk.js";import{S as Ot,W as vt,g as St,a as _t}from"./constants-DNuUCxmW.js";import{i as wt}from"./XCircle-BcRsQfbp.js";import{t as Qe}from"./site-error--i37Vnuw.js";import"./integration-icon-BgsghQ7E.js";import"./Tool02-CUjmmZmP.js";import"./agent-icon-9NxB5SOp.js";import"./AlertCircle-mzPvygUw.js";import"./ThumbsUp-DZtUuNqz.js";import"./Tool01-3TSBet75.js";import"./ArrowUp-Yj21fZGL.js";import"./ArrowLeft-Bp9N4N0-.js";import"./TrendUp01-B1pPYfuK.js";import"./ZoomOut-CN3_bE81.js";import"./Users03-B7rH-Prq.js";import"./CheckCircle-BL9fUGh0.js";import"./Check-DFpZ57WE.js";import"./ChevronUp-DoFbOo5V.js";import"./ChevronRight-B0k8i06h.js";import"./ChevronSelectorVertical-C36SdIlf.js";import"./DotsVertical-DJWfzfak.js";import"./UserSquare-DAvB_kFJ.js";import"./Copy01-DQrZ6li-.js";import"./CreditCard01-BwmXIXJx.js";import"./Download01-DsQzO8cd.js";import"./Settings02-Bj1lDwij.js";import"./Eye-BC_4l4lG.js";import"./Share07-K9acKdZ2.js";import"./GitBranch01-C4EIccIA.js";import"./Globe01-DHMT8bp9.js";import"./XClose-CfMSoySe.js";import"./HardDrive-DO3IjmaH.js";import"./Image01-C4TVJnST.js";import"./Key01-a9vi-Tku.js";import"./Link01-BWge3x25.js";import"./LinkExternal01-qomjjlr4.js";import"./LockUnlocked01-BD5ISYeA.js";import"./Monitor01-BB9oelwa.js";import"./Sun-v51TgHoC.js";import"./Package-DRO-nel6.js";import"./Palette-CzJtqmLV.js";import"./Play-BOlL7p4H.js";import"./Plus-B4HOF1E1.js";import"./SearchMd-BL3yOzl8.js";import"./Shield01-B2le5qB9.js";import"./Stars01-DBkTEhiq.js";import"./Trash01-RcSuYrVJ.js";import"./Upload01-lXk5j7xP.js";import"./User01-AECGy6qL.js";import"./Users01-BgVgHDh8.js";import"./Zap-B1-2Q3w4.js";import"./dialog-oJmEQ7fd.js";import"./extract-connection-data-MINwSTDT.js";import"./metadata-dUsYcpuu.js";import"./connection-CZKw5XC0.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-KNJGif8F.js";import"./label-C0PesxR-.js";import"./use-debounced-value-B4gfPGsg.js";import"./authenticate-and-persist-oauth-BSmdaYES.js";import"./mcp-oauth-B78QmrXr.js";import"./auth-7gOJrCJs.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-gFJWL-Vg.js";import"./alert-dialog-CcHS-XLY.js";const Ge={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ye=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function Ae({siteUrl:t,email:e,locale:s}){const i=(s&&Ge[s])??Ge["pt-BR"]??"https://decocms.com/agendar",o=new URL(i);return t&&o.searchParams.set("siteUrl",t),e&&o.searchParams.set("email",e),o.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:o,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==o?(c=Me("w-full",o),e[0]=o,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(st,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=r.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=r.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,o=Q();let l;e[0]!==o?(l=o("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=o,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ye.map((f,p)=>r.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ye.length-p},children:[r.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:r.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&r.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),r.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=r.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,o=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"-mt-9 mb-4",children:r.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==o?(n=o("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=o,e[3]=n):n=e[3];let c;e[4]!==n?(c=r.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==o?(m=o("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=o,e[7]=m):m=e[7];let d;e[8]!==m?(d=r.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=r.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=r.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=r.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:r.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,r.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let o,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=r.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=l,e[2]=a):(o=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=r.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:r.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=r.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=r.jsxs("div",{className:"flex items-center gap-3",children:[o,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let o;e[0]!==i||e[1]!==s?(o=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=o):o=e[2];const l=o;let a;return e[3]!==l?(a=r.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:r.jsx(ut,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function ur(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(Lt,{}),t[0]=e):e=t[0],e}const ot=Y.createContext(null),rt=()=>Y.useContext(ot);function It(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let o;t[0]!==i?(o=r.jsx(xt,{asChild:!0,children:r.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=o):o=t[1];let l;t[2]!==s?(l=()=>{s(zt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Me(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=r.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(Pt)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Me(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=r.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=r.jsxs(yt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==o||t[20]!==p?(O=r.jsxs(Ct,{children:[o,p]}),t[19]=o,t[20]=p,t[21]=O):O=t[21],O}function Pt(t){return{...t,language:"pt-BR"}}function zt(t){return{...t,language:"en"}}function H(t){const e=N.c(17);let s,i,o;e[0]!==t?({visual:o,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=De.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=Ae({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==o?(f=o??r.jsx(Fe,{href:u}),e[9]=u,e[10]=o,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsxs("div",{className:"flex justify-between items-start mb-8",children:[r.jsx("div",{}),r.jsx(It,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=r.jsxs(pt,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function Rt(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")}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Te(s);if(!Je&&nt()){Je=!0;const o=ht(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...o,...i?{$set:{last_scanned_domain:i}}:{}})}return r.jsx(ot.Provider,{value:i,children:r.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),{data:l,isPending:a}=De.useSession(),n=rt();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(H,{children:r.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==o?(d=o("routes.commerceOnboarding.unlockDiagnostic"),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?r.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==o?(f=Rt(o),e[5]=o,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=r.jsx(H,{children:r.jsx(ft,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=r.jsx(Mt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Mt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),l=lt(),a=at(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(Dt)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Tt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(H,{children:r.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==o?(g=o("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=o,e[3]=g):g=e[3];let h;e[4]!==o?(h=o("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=o,e[5]=h):h=e[5];let x;e[6]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=r.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==o?(g=o("routes.commerceOnboarding.orgNotFound"),e[18]=o,e[19]=g):g=e[19];let h;e[20]!==o?(h=o("routes.commerceOnboarding.couldNotFindOrg"),e[20]=o,e[21]=h):h=e[21];let x;e[22]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[22]=o,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=r.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=r.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[37]=o,e[38]=g):g=e[38];let h;e[39]!==o?(h=o("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=o,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=r.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==o?(b=o("routes.commerceOnboarding.authCopy.continue"),e[44]=o,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let M;e[49]===Symbol.for("react.memo_cache_sentinel")?(M=()=>f(!0),e[49]=M):M=e[49];let R;e[50]!==o?(R=o("routes.commerceOnboarding.createNewOrg"),e[50]=o,e[51]=R):R=e[51];let z;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==R?(z=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(qe,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:M,createNewLabel:R})}),e[52]=p,e[53]=b,e[54]=_,e[55]=R,e[56]=z):z=e[56];let U;e[57]!==x||e[58]!==z?(U=r.jsxs("div",{className:"grid gap-10",children:[x,z]}),e[57]=x,e[58]=z,e[59]=U):U=e[59];let T;e[60]!==l||e[61]!==i?(T=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=T):T=e[62];let I;e[63]!==u||e[64]!==T?(I=r.jsx(Ve,{open:u,onOpenChange:f,onCreated:T}),e[63]=u,e[64]=T,e[65]=I):I=e[65];let L;return e[66]!==U||e[67]!==I?(L=r.jsxs(H,{children:[U,I]}),e[66]=U,e[67]=I,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=r.jsx(At,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=r.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[77]=o,e[78]=g):g=e[78];let h;e[79]!==o?(h=o("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=o,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=r.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let M;e[84]!==l||e[85]!==i?(M=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=M):M=e[86];let R;e[87]===Symbol.for("react.memo_cache_sentinel")?(R=()=>f(!0),e[87]=R):R=e[87];let z;e[88]!==o?(z=o("routes.commerceOnboarding.createNewOrg"),e[88]=o,e[89]=z):z=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==M||e[93]!==z?(U=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(qe,{organizations:b,domain:_,onJoined:M,onCreateNew:R,createNewLabel:z})}),e[90]=C.organizations,e[91]=_,e[92]=M,e[93]=z,e[94]=U):U=e[94];let T;e[95]!==U||e[96]!==x?(T=r.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=T):T=e[97];let I;e[98]!==l||e[99]!==i?(I=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=I):I=e[100];let L;e[101]!==u||e[102]!==I?(L=r.jsx(Ve,{open:u,onOpenChange:f,onCreated:I}),e[101]=u,e[102]=I,e[103]=L):L=e[103];let j;return e[104]!==T||e[105]!==L?(j=r.jsxs(H,{children:[T,L]}),e[104]=T,e[105]=L,e[106]=j):j=e[106],j}let P;e[107]!==o?(P=o("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=o,e[108]=P):P=e[108];let E;e[109]!==C?.error||e[110]!==o?(E=C?.error??o("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=o,e[111]=E):E=e[111];let D;e[112]!==o?(D=o("routes.commerceOnboarding.retryAgain"),e[112]=o,e[113]=D):D=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==P||e[117]!==E||e[118]!==D||e[119]!==W?(q=r.jsx(_e,{title:P,description:E,actionLabel:D,onRetry:W}),e[116]=P,e[117]=E,e[118]=D,e[119]=W,e[120]=q):q=e[120],q}async function Tt(){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&&Se(),e}function Dt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function At(t){const e=N.c(16),{mutation:s,onRetry:i}=t,o=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==o?(d=o("routes.commerceOnboarding.onboardingUnavailable"),e[2]=o,e[3]=d):d=e[3];let u;e[4]!==o?(u=o("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=o,e[5]=u):u=e[5];let f;e[6]!==o?(f=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=r.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=r.jsx(H,{children:r.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,o=rt();let l;e[0]!==o?(l=o?r.jsx(tt,{host:o}):r.jsxs("div",{children:[r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&r.jsxs("div",{className:"space-y-2",children:[s&&r.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&r.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=r.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:o,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=r.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==o||e[4]!==l?(n=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:o}),e[3]=o,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=r.jsx(H,{children:r.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,o=Q(),{data:l}=De.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=Ae({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=r.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==o?(f=r.jsx(ct,{children:p=>{const{reset:O}=p;return r.jsx(mt,{fallback:v=>{const{error:w,resetError:C}=v;return r.jsx(H,{visual:u,children:r.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:o("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:r.jsx(Y.Suspense,{fallback:r.jsx(it,{visual:u}),children:r.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=o,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[r.jsx(J,{}),r.jsx(et,{})]}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=r.jsx(H,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=o):o=e[2],o}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:o}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=r.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=r.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==o||e[13]!==d?(u=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:o,children:d}),e[12]=o,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=r.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:o}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ot,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=vt.COMMERCE_DISCOVERY(s.id),p=St(s.id),O=Be.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=He(w),P=Be.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let D;e[12]!==P||e[13]!==E?(D={queryKey:P,queryFn:E,retry:!1},e[12]=P,e[13]=E,e[14]=D):D=e[14];const W=He(D);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Te(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Te(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,M=C.data.item,R=typeof M?.metadata?.siteUrl=="string"?M.metadata.siteUrl:void 0,z=i||n||"";let U;e[27]!==R||e[28]!==z?(U=gt(z,R),e[27]=R,e[28]=z,e[29]=U):U=e[29];const I=_&&U,L=i||n||R||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==o?(Z=Ae({siteUrl:L,email:o,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=o,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=r.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Qe(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const B=fe;let pe;e[40]!==b?(pe=y=>{const S=Re(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==I?(he=y=>{!y||u.current||I||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=I,e[45]=he):he=e[45];const Ie=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=Re(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(I){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let A;e[53]!==s.id?(A=_t(s.id),e[53]=s.id,e[54]=A):A=e[54];const G=L||void 0;let F;e[55]!==A.id||e[56]!==G?(F={virtualmcpid:A.id,connect:"1",siteUrl:G},e[55]=A.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=r.jsx(dt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=r.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,A,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==B||e[71]!==Ie){ne=Symbol.for("react.early_return_sentinel");e:{const Pe=Re(i);if(!Pe.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=r.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==B?(je=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=B,e[92]=je):je=e[92];const ze=r.jsxs("div",{className:"grid gap-10",children:[Ce,r.jsx(we,{message:Qe(j,Pe.error)}),je]});let Oe;e[93]!==$||e[94]!==ze?(Oe=r.jsx(H,{visual:$,children:ze}),e[93]=$,e[94]=ze,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=H,K=$,G=Ie,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],A=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Pe.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=B,e[71]=Ie,e[72]=y,e[73]=S,e[74]=k,e[75]=A,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],A=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==A?(le=r.jsx(y,{title:k,description:A}),e[98]=y,e[99]=k,e[100]=A,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==B?(ae=B?r.jsxs(r.Fragment,{children:[r.jsx(we,{message:B}),r.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):r.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=B,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=r.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=r.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let oe;e[118]!==s.name||e[119]!==j?(oe=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=oe):oe=e[120];let re;e[121]!==te||e[122]!==oe?(re=r.jsx(J,{title:te,description:oe}),e[121]=te,e[122]=oe,e[123]=re):re=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==B?(ie=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=B,e[128]=ie):ie=e[128];let se;e[129]!==re||e[130]!==ie?(se=r.jsxs("div",{className:"grid gap-10",children:[re,ie]}),e[129]=re,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=r.jsx(H,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:o,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=r.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=D=>l(D.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==o||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=r.jsx(bt,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:o}),e[8]=o,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?r.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=r.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(wt,{size:16}),e[22]=C):C=e[22];let P;e[23]!==o||e[24]!==w?(P=r.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:o,children:[w,C]}),e[23]=o,e[24]=w,e[25]=P):P=e[25];let E;return e[26]!==a||e[27]!==P||e[28]!==v?(E=r.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,P]}),e[26]=a,e[27]=P,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=r.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{ur as default};
@@ -1 +1 @@
1
- import{fd as re,r as E,c as x,W as v,a7 as q,m as z,n as Z,K as T,b as oe,e as R,o as ie,t as Y,bm as le}from"./index--Yue-AUv.js";import{c as ce,d as ue,e as de}from"./task-board-BYn5YrBH.js";import{t as fe}from"./decopilot-sse-pool-2cJBJIX8.js";import{u as me}from"./use-decopilot-events-CwR7vIYI.js";import{i as ye}from"./AlertCircle-XwHoogbQ.js";import{c as ge,b as pe,d as G,n as ke,t as _e,f as Se,i as Be,e as Te,a as Ee,s as Ne}from"./ThumbsUp-DlB_NWZ_.js";import{i as he}from"./CheckCircle-1uYJvE9R.js";import{a as ee}from"./DotsVertical-8OtA5I8O.js";import{s as be}from"./Eye-B4X68jRO.js";import{e as Ae}from"./UserSquare-DT8w5Z-P.js";import{i as De}from"./Shield01-CR2c-0aZ.js";const Ie=re("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),J=()=>0;function Ce(e){const{orgSlug:n,enabled:a=!0,onUpdate:t,onDelete:s,onResync:o}=e,l=E.useRef(t);l.current=t;const i=E.useRef(s);i.current=s;const c=E.useRef(o);c.current=o;const r=E.useRef(null),u=E.useRef(a),_=E.useRef(n);(!r.current||u.current!==a||_.current!==n)&&(u.current=a,_.current=n,r.current=f=>{if(!a||!n)return()=>{};const m=k=>{let y;try{y=JSON.parse(k.data)}catch{return}y.data&&(k.type===ce?i.current?.(y.data.id):l.current(y.data)),f()};return fe.subscribe(n,m,()=>c.current?.())}),E.useSyncExternalStore(r.current,J,J)}function Xe(){const e=x.c(9),{locator:n}=v(),a=q();let t;e[0]!==n?(t=T.taskBoardItems(n),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==a?(s=async()=>{const{items:c,sprints:r,columns:u}=await a.call("TASK_BOARD_ITEM_LIST",{});return{items:c,sprints:r,columns:u}},e[2]=a,e[3]=s):s=e[3];let o;e[4]!==t||e[5]!==s?(o={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=o):o=e[6];const{data:l}=z(o);let i;return e[7]!==l?.sprints?(i=new Map((l?.sprints??[]).map(Ke)),e[7]=l?.sprints,e[8]=i):i=e[8],i}function Ke(e){return[e.id,e]}function Ze(){const e=x.c(9),{locator:n}=v(),a=q();let t;e[0]!==n?(t=T.taskBoardItems(n),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==a?(s=async()=>{const{items:c,sprints:r,columns:u}=await a.call("TASK_BOARD_ITEM_LIST",{});return{items:c,sprints:r,columns:u}},e[2]=a,e[3]=s):s=e[3];let o;e[4]!==t||e[5]!==s?(o={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=o):o=e[6];const{data:l}=z(o);let i;return e[7]!==l?.columns?(i=l?.columns??[],e[7]=l?.columns,e[8]=i):i=e[8],i}function Re(e,n){return{queryKey:T.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:a,sprints:t,columns:s}=await n.call("TASK_BOARD_ITEM_LIST",{});return{items:a,sprints:t,columns:s}}}}function xe(){const e=x.c(21),{org:n,locator:a}=v(),t=Z();let s;e[0]!==a?(s=T.taskBoardItems(a),e[0]=a,e[1]=s):s=e[1];const o=s;let l;e[2]!==a||e[3]!==t||e[4]!==o?(l=p=>{t.cancelQueries({queryKey:o}),t.setQueryData(o,f=>f&&{...f,items:f.items.some(m=>m.id===p.id)?f.items.map(m=>m.id===p.id?p:m):[p,...f.items]}),t.invalidateQueries({queryKey:T.taskBoardActivity(a,p.id)})},e[2]=a,e[3]=t,e[4]=o,e[5]=l):l=e[5];let i,c;e[6]!==t||e[7]!==o?(i=()=>{t.invalidateQueries({queryKey:o})},c=p=>{t.cancelQueries({queryKey:o}),t.setQueryData(o,f=>f&&{...f,items:f.items.filter(m=>m.id!==p)})},e[6]=t,e[7]=o,e[8]=i,e[9]=c):(i=e[8],c=e[9]);let r;e[10]!==n.slug||e[11]!==l||e[12]!==i||e[13]!==c?(r={orgSlug:n.slug,onUpdate:l,onResync:i,onDelete:c},e[10]=n.slug,e[11]=l,e[12]=i,e[13]=c,e[14]=r):r=e[14],Ce(r);let u;e[15]!==t||e[16]!==o?(u=p=>{const f=p.subject,m=p.data.status;t.cancelQueries({queryKey:o}),t.setQueryData(o,k=>k&&{...k,items:k.items.map(y=>y.threads.some(S=>S.threadId===f)?{...y,threads:y.threads.map(S=>S.threadId===f?{...S,status:m}:S)}:y)})},e[15]=t,e[16]=o,e[17]=u):u=e[17];let _;e[18]!==n.slug||e[19]!==u?(_={orgSlug:n.slug,onTaskStatus:u},e[18]=n.slug,e[19]=u,e[20]=_):_=e[20],me(_)}function et(){const e=x.c(15),{locator:n}=v(),a=q();let t;e[0]!==n||e[1]!==a?(t=Re(n,a),e[0]=n,e[1]=a,e[2]=t):t=e[2];const s=z(t);xe();let o;e[3]!==s.data?.items?(o=s.data?.items??[],e[3]=s.data?.items,e[4]=o):o=e[4];let l;e[5]!==s.data?.sprints?(l=s.data?.sprints??[],e[5]=s.data?.sprints,e[6]=l):l=e[6];let i;e[7]!==s.data?.columns?(i=s.data?.columns??[],e[7]=s.data?.columns,e[8]=i):i=e[8];let c;return e[9]!==s.error||e[10]!==s.isLoading||e[11]!==o||e[12]!==l||e[13]!==i?(c={items:o,sprints:l,columns:i,isLoading:s.isLoading,error:s.error},e[9]=s.error,e[10]=s.isLoading,e[11]=o,e[12]=l,e[13]=i,e[14]=c):c=e[14],c}function tt(){const e=x.c(70),{org:n,locator:a}=v(),t=q(),s=Z(),o=oe();let l;e[0]!==a?(l=T.taskBoardItems(a),e[0]=a,e[1]=l):l=e[1];const i=l;let c;e[2]!==s||e[3]!==i?(c=()=>s.invalidateQueries({queryKey:i}),e[2]=s,e[3]=i,e[4]=c):c=e[4];const r=c;let u;e[5]!==t?(u=d=>t.call("TASK_BOARD_ITEM_CREATE",d),e[5]=t,e[6]=u):u=e[6];let _;e[7]!==r||e[8]!==u?(_={mutationFn:u,onSuccess:r},e[7]=r,e[8]=u,e[9]=_):_=e[9];const p=R(_);let f;e[10]!==t?(f=d=>t.call("TASK_BOARD_ITEM_UPDATE",d),e[10]=t,e[11]=f):f=e[11];let m;e[12]!==s||e[13]!==i?(m=async d=>{await s.cancelQueries({queryKey:i});const B=s.getQueryData(i);return s.setQueryData(i,g=>g&&{...g,items:g.items.map(j=>j.id===d.id?{...j,...d}:j)}),{previous:B}},e[12]=s,e[13]=i,e[14]=m):m=e[14];let k;e[15]!==n?(k=(d,B)=>{B.status==="done"&&ie("task_marked_done",{organization_id:n.id,task_board_item_id:B.id})},e[15]=n,e[16]=k):k=e[16];let y;e[17]!==s||e[18]!==i?(y=(d,B,g)=>{g?.previous&&s.setQueryData(i,g.previous)},e[17]=s,e[18]=i,e[19]=y):y=e[19];let S;e[20]!==r||e[21]!==a||e[22]!==s?(S=(d,B,g)=>{r(),s.invalidateQueries({queryKey:T.taskBoardActivity(a,g.id)})},e[20]=r,e[21]=a,e[22]=s,e[23]=S):S=e[23];let w;e[24]!==f||e[25]!==m||e[26]!==k||e[27]!==y||e[28]!==S?(w={mutationFn:f,onMutate:m,onSuccess:k,onError:y,onSettled:S},e[24]=f,e[25]=m,e[26]=k,e[27]=y,e[28]=S,e[29]=w):w=e[29];const Q=R(w);let N;e[30]!==t?(N=d=>t.call("TASK_BOARD_ITEM_DELETE",{id:d}),e[30]=t,e[31]=N):N=e[31];let h;e[32]!==r||e[33]!==o?(h=d=>{Y.error(d instanceof Error&&d.message?d.message:o("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=o,e[34]=h):h=e[34];let O;e[35]!==r||e[36]!==N||e[37]!==h?(O={mutationFn:N,onSuccess:r,onError:h},e[35]=r,e[36]=N,e[37]=h,e[38]=O):O=e[38];const U=R(O);let b;e[39]!==t?(b=async d=>{const B=await Promise.allSettled(d.map(g=>t.call("TASK_BOARD_ITEM_DELETE",{id:g})));return{total:d.length,failed:B.filter(ve).length}},e[39]=t,e[40]=b):b=e[40];let A,D;e[41]!==o?(A=d=>{const{total:B,failed:g}=d;g!==0&&Y.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(g),total:String(B)}))},D=()=>Y.error(o("taskBoard.taskBoard.deleteError")),e[41]=o,e[42]=A,e[43]=D):(A=e[42],D=e[43]);let L;e[44]!==r||e[45]!==b||e[46]!==A||e[47]!==D?(L={mutationFn:b,onSuccess:A,onError:D,onSettled:r},e[44]=r,e[45]=b,e[46]=A,e[47]=D,e[48]=L):L=e[48];const P=R(L);let I;e[49]!==t?(I=d=>t.call("TASK_BOARD_ITEM_UPDATE",d),e[49]=t,e[50]=I):I=e[50];let M;e[51]!==r||e[52]!==I?(M={mutationFn:I,onSuccess:r},e[51]=r,e[52]=I,e[53]=M):M=e[53];const V=R(M);let C;e[54]!==t?(C=d=>t.call("TASK_BOARD_ITEM_RERUN",d),e[54]=t,e[55]=C):C=e[55];let K;e[56]!==r||e[57]!==a||e[58]!==s?(K=(d,B,g)=>{r(),s.invalidateQueries({queryKey:T.taskBoardActivity(a,g.id)})},e[56]=r,e[57]=a,e[58]=s,e[59]=K):K=e[59];let F;e[60]!==C||e[61]!==K?(F={mutationFn:C,onSettled:K},e[60]=C,e[61]=K,e[62]=F):F=e[62];const H=R(F);let $;return e[63]!==p||e[64]!==V||e[65]!==U||e[66]!==P||e[67]!==H||e[68]!==Q?($={create:p,update:Q,remove:U,removeMany:P,link:V,rerun:H},e[63]=p,e[64]=V,e[65]=U,e[66]=P,e[67]=H,e[68]=Q,e[69]=$):$=e[69],$}function ve(e){return e.status==="rejected"}const we=["ended_after_delivery","superseded"];function Oe(e){return!!e&&we.includes(e)}function st(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function at(e){return e.failureKind!=="superseded"}const Le=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});function nt(e){const n=s=>{if(!s)return null;const o=Date.parse(s);return Number.isNaN(o)?null:Le.format(new Date(o))},a=n(e.startsAt),t=n(e.endsAt);return!a&&!t?null:a&&t?`${a} – ${t}`:a??t}function te(e){return e.threads.some(n=>n.status==="requires_action")}function rt(e){return e.status==="in_review"&&!e.assigneeId}function ot(e){return te(e)}function it(e){return e.status==="in_progress"&&te(e)?"text-warning animate-pulse":ne(e.status).iconClassName}function lt(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!Oe(a.failureKind))?"failed":null}function ct(e,n,a){const t=e.findIndex(u=>u.id===a),s=n===a?e[t+1]?.id??null:n,o=e.filter(u=>u.id!==a),l=s?o.findIndex(u=>u.id===s):-1,i=l===-1?o.length:l,c=o[i-1],r=o[i];return c&&r?(c.sortOrder+r.sortOrder)/2:c?c.sortOrder+1:r?r.sortOrder-1:0}function ut(e,n){return Array.from({length:n},(a,t)=>e-(n-1-t)*1e-4)}const Me=["archived"],se={triage:{labelKey:"taskBoard.config.statusBacklog",icon:ye,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:ee,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Be,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:be,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:Se,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Ae,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:_e,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:he,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:le,iconClassName:"text-muted-foreground"}},ae={icon:ee,iconClassName:"text-muted-foreground"},Fe=se;function ne(e){return Fe[e]??ae}function $e(e,n,a){const t=se[e];return t?n(t.labelKey):a}function dt(e,n,a){const t=a.find(s=>s.key===e);return t?{label:$e(e,n,t.title),visual:ne(e),offBoard:!1}:{label:e,visual:ae,offBoard:!0}}const ft=["bug","feature","chore","spike","security"],mt={bug:{labelKey:"taskBoard.config.typeBug",icon:Ie,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Ne,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:Ee,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:Te,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:De,iconClassName:"text-purple-500"}};function W(e){return de.includes(e)}function yt(e,n){return e.map(a=>a.key).filter(a=>n||!W(a))}function gt({columns:e,deliveryEnabled:n,shownLanes:a,occupied:t}){const s=e.map(r=>r.key).filter(r=>n||!W(r)||t.includes(r)),o=s.filter(r=>Me.includes(r)||!n&&W(r)),l=o.filter(r=>!a.includes(r)),i=new Set(s),c=[...new Set(t)].filter(r=>!i.has(r)).sort();return{lanes:[...s.filter(r=>!l.includes(r)),...c],hidden:l,hideable:o,unplaced:c}}const X="lane:";function pt({overId:e,columnKeys:n,statusOf:a}){if(e===void 0)return null;const t=String(e),s=t.startsWith(X)?t.slice(X.length):a(t);return s!==void 0&&n.has(s)?s:null}const kt=["none","low","medium","high","urgent"],_t={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:G,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ke,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:G,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:pe,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:ge,iconClassName:"text-destructive"}};function St(e,n=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<n?"overdue":a-n<=qe*864e5?"soon":null}const qe=3;function Bt(e){return`color-mix(in oklab, ${e??ue} var(--user-color-strength), transparent)`}export{W as A,Me as H,X as L,_t as P,se as S,mt as T,rt as a,Ze as b,tt as c,kt as d,ft as e,Bt as f,Xe as g,ne as h,te as i,nt as j,st as k,dt as l,yt as m,at as n,Oe as o,et as p,gt as q,ut as r,it as s,Re as t,xe as u,lt as v,ot as w,ct as x,pt as y,St as z};
1
+ import{fc as re,r as E,c as x,W as v,a7 as q,m as z,n as Z,K as T,b as oe,e as R,o as ie,t as Y,bm as le}from"./index-KlN2gCIz.js";import{c as ce,d as ue,e as de}from"./task-board-B75_z9Rj.js";import{t as fe}from"./decopilot-sse-pool-CGjOzfxR.js";import{u as me}from"./use-decopilot-events-CjxND1rZ.js";import{i as ye}from"./AlertCircle-mzPvygUw.js";import{c as ge,b as pe,d as G,n as ke,t as _e,f as Se,i as Be,e as Te,a as Ee,s as Ne}from"./ThumbsUp-DZtUuNqz.js";import{i as he}from"./CheckCircle-BL9fUGh0.js";import{a as ee}from"./DotsVertical-DJWfzfak.js";import{s as be}from"./Eye-BC_4l4lG.js";import{e as Ae}from"./UserSquare-DAvB_kFJ.js";import{i as De}from"./Shield01-B2le5qB9.js";const Ie=re("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),J=()=>0;function Ce(e){const{orgSlug:n,enabled:a=!0,onUpdate:t,onDelete:s,onResync:o}=e,l=E.useRef(t);l.current=t;const i=E.useRef(s);i.current=s;const c=E.useRef(o);c.current=o;const r=E.useRef(null),u=E.useRef(a),_=E.useRef(n);(!r.current||u.current!==a||_.current!==n)&&(u.current=a,_.current=n,r.current=f=>{if(!a||!n)return()=>{};const m=k=>{let y;try{y=JSON.parse(k.data)}catch{return}y.data&&(k.type===ce?i.current?.(y.data.id):l.current(y.data)),f()};return fe.subscribe(n,m,()=>c.current?.())}),E.useSyncExternalStore(r.current,J,J)}function Xe(){const e=x.c(9),{locator:n}=v(),a=q();let t;e[0]!==n?(t=T.taskBoardItems(n),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==a?(s=async()=>{const{items:c,sprints:r,columns:u}=await a.call("TASK_BOARD_ITEM_LIST",{});return{items:c,sprints:r,columns:u}},e[2]=a,e[3]=s):s=e[3];let o;e[4]!==t||e[5]!==s?(o={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=o):o=e[6];const{data:l}=z(o);let i;return e[7]!==l?.sprints?(i=new Map((l?.sprints??[]).map(Ke)),e[7]=l?.sprints,e[8]=i):i=e[8],i}function Ke(e){return[e.id,e]}function Ze(){const e=x.c(9),{locator:n}=v(),a=q();let t;e[0]!==n?(t=T.taskBoardItems(n),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==a?(s=async()=>{const{items:c,sprints:r,columns:u}=await a.call("TASK_BOARD_ITEM_LIST",{});return{items:c,sprints:r,columns:u}},e[2]=a,e[3]=s):s=e[3];let o;e[4]!==t||e[5]!==s?(o={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=o):o=e[6];const{data:l}=z(o);let i;return e[7]!==l?.columns?(i=l?.columns??[],e[7]=l?.columns,e[8]=i):i=e[8],i}function Re(e,n){return{queryKey:T.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:a,sprints:t,columns:s}=await n.call("TASK_BOARD_ITEM_LIST",{});return{items:a,sprints:t,columns:s}}}}function xe(){const e=x.c(21),{org:n,locator:a}=v(),t=Z();let s;e[0]!==a?(s=T.taskBoardItems(a),e[0]=a,e[1]=s):s=e[1];const o=s;let l;e[2]!==a||e[3]!==t||e[4]!==o?(l=p=>{t.cancelQueries({queryKey:o}),t.setQueryData(o,f=>f&&{...f,items:f.items.some(m=>m.id===p.id)?f.items.map(m=>m.id===p.id?p:m):[p,...f.items]}),t.invalidateQueries({queryKey:T.taskBoardActivity(a,p.id)})},e[2]=a,e[3]=t,e[4]=o,e[5]=l):l=e[5];let i,c;e[6]!==t||e[7]!==o?(i=()=>{t.invalidateQueries({queryKey:o})},c=p=>{t.cancelQueries({queryKey:o}),t.setQueryData(o,f=>f&&{...f,items:f.items.filter(m=>m.id!==p)})},e[6]=t,e[7]=o,e[8]=i,e[9]=c):(i=e[8],c=e[9]);let r;e[10]!==n.slug||e[11]!==l||e[12]!==i||e[13]!==c?(r={orgSlug:n.slug,onUpdate:l,onResync:i,onDelete:c},e[10]=n.slug,e[11]=l,e[12]=i,e[13]=c,e[14]=r):r=e[14],Ce(r);let u;e[15]!==t||e[16]!==o?(u=p=>{const f=p.subject,m=p.data.status;t.cancelQueries({queryKey:o}),t.setQueryData(o,k=>k&&{...k,items:k.items.map(y=>y.threads.some(S=>S.threadId===f)?{...y,threads:y.threads.map(S=>S.threadId===f?{...S,status:m}:S)}:y)})},e[15]=t,e[16]=o,e[17]=u):u=e[17];let _;e[18]!==n.slug||e[19]!==u?(_={orgSlug:n.slug,onTaskStatus:u},e[18]=n.slug,e[19]=u,e[20]=_):_=e[20],me(_)}function et(){const e=x.c(15),{locator:n}=v(),a=q();let t;e[0]!==n||e[1]!==a?(t=Re(n,a),e[0]=n,e[1]=a,e[2]=t):t=e[2];const s=z(t);xe();let o;e[3]!==s.data?.items?(o=s.data?.items??[],e[3]=s.data?.items,e[4]=o):o=e[4];let l;e[5]!==s.data?.sprints?(l=s.data?.sprints??[],e[5]=s.data?.sprints,e[6]=l):l=e[6];let i;e[7]!==s.data?.columns?(i=s.data?.columns??[],e[7]=s.data?.columns,e[8]=i):i=e[8];let c;return e[9]!==s.error||e[10]!==s.isLoading||e[11]!==o||e[12]!==l||e[13]!==i?(c={items:o,sprints:l,columns:i,isLoading:s.isLoading,error:s.error},e[9]=s.error,e[10]=s.isLoading,e[11]=o,e[12]=l,e[13]=i,e[14]=c):c=e[14],c}function tt(){const e=x.c(70),{org:n,locator:a}=v(),t=q(),s=Z(),o=oe();let l;e[0]!==a?(l=T.taskBoardItems(a),e[0]=a,e[1]=l):l=e[1];const i=l;let c;e[2]!==s||e[3]!==i?(c=()=>s.invalidateQueries({queryKey:i}),e[2]=s,e[3]=i,e[4]=c):c=e[4];const r=c;let u;e[5]!==t?(u=d=>t.call("TASK_BOARD_ITEM_CREATE",d),e[5]=t,e[6]=u):u=e[6];let _;e[7]!==r||e[8]!==u?(_={mutationFn:u,onSuccess:r},e[7]=r,e[8]=u,e[9]=_):_=e[9];const p=R(_);let f;e[10]!==t?(f=d=>t.call("TASK_BOARD_ITEM_UPDATE",d),e[10]=t,e[11]=f):f=e[11];let m;e[12]!==s||e[13]!==i?(m=async d=>{await s.cancelQueries({queryKey:i});const B=s.getQueryData(i);return s.setQueryData(i,g=>g&&{...g,items:g.items.map(j=>j.id===d.id?{...j,...d}:j)}),{previous:B}},e[12]=s,e[13]=i,e[14]=m):m=e[14];let k;e[15]!==n?(k=(d,B)=>{B.status==="done"&&ie("task_marked_done",{organization_id:n.id,task_board_item_id:B.id})},e[15]=n,e[16]=k):k=e[16];let y;e[17]!==s||e[18]!==i?(y=(d,B,g)=>{g?.previous&&s.setQueryData(i,g.previous)},e[17]=s,e[18]=i,e[19]=y):y=e[19];let S;e[20]!==r||e[21]!==a||e[22]!==s?(S=(d,B,g)=>{r(),s.invalidateQueries({queryKey:T.taskBoardActivity(a,g.id)})},e[20]=r,e[21]=a,e[22]=s,e[23]=S):S=e[23];let w;e[24]!==f||e[25]!==m||e[26]!==k||e[27]!==y||e[28]!==S?(w={mutationFn:f,onMutate:m,onSuccess:k,onError:y,onSettled:S},e[24]=f,e[25]=m,e[26]=k,e[27]=y,e[28]=S,e[29]=w):w=e[29];const Q=R(w);let N;e[30]!==t?(N=d=>t.call("TASK_BOARD_ITEM_DELETE",{id:d}),e[30]=t,e[31]=N):N=e[31];let h;e[32]!==r||e[33]!==o?(h=d=>{Y.error(d instanceof Error&&d.message?d.message:o("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=o,e[34]=h):h=e[34];let O;e[35]!==r||e[36]!==N||e[37]!==h?(O={mutationFn:N,onSuccess:r,onError:h},e[35]=r,e[36]=N,e[37]=h,e[38]=O):O=e[38];const U=R(O);let b;e[39]!==t?(b=async d=>{const B=await Promise.allSettled(d.map(g=>t.call("TASK_BOARD_ITEM_DELETE",{id:g})));return{total:d.length,failed:B.filter(ve).length}},e[39]=t,e[40]=b):b=e[40];let A,D;e[41]!==o?(A=d=>{const{total:B,failed:g}=d;g!==0&&Y.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(g),total:String(B)}))},D=()=>Y.error(o("taskBoard.taskBoard.deleteError")),e[41]=o,e[42]=A,e[43]=D):(A=e[42],D=e[43]);let L;e[44]!==r||e[45]!==b||e[46]!==A||e[47]!==D?(L={mutationFn:b,onSuccess:A,onError:D,onSettled:r},e[44]=r,e[45]=b,e[46]=A,e[47]=D,e[48]=L):L=e[48];const P=R(L);let I;e[49]!==t?(I=d=>t.call("TASK_BOARD_ITEM_UPDATE",d),e[49]=t,e[50]=I):I=e[50];let M;e[51]!==r||e[52]!==I?(M={mutationFn:I,onSuccess:r},e[51]=r,e[52]=I,e[53]=M):M=e[53];const V=R(M);let C;e[54]!==t?(C=d=>t.call("TASK_BOARD_ITEM_RERUN",d),e[54]=t,e[55]=C):C=e[55];let K;e[56]!==r||e[57]!==a||e[58]!==s?(K=(d,B,g)=>{r(),s.invalidateQueries({queryKey:T.taskBoardActivity(a,g.id)})},e[56]=r,e[57]=a,e[58]=s,e[59]=K):K=e[59];let F;e[60]!==C||e[61]!==K?(F={mutationFn:C,onSettled:K},e[60]=C,e[61]=K,e[62]=F):F=e[62];const H=R(F);let $;return e[63]!==p||e[64]!==V||e[65]!==U||e[66]!==P||e[67]!==H||e[68]!==Q?($={create:p,update:Q,remove:U,removeMany:P,link:V,rerun:H},e[63]=p,e[64]=V,e[65]=U,e[66]=P,e[67]=H,e[68]=Q,e[69]=$):$=e[69],$}function ve(e){return e.status==="rejected"}const we=["ended_after_delivery","superseded"];function Oe(e){return!!e&&we.includes(e)}function st(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function at(e){return e.failureKind!=="superseded"}const Le=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});function nt(e){const n=s=>{if(!s)return null;const o=Date.parse(s);return Number.isNaN(o)?null:Le.format(new Date(o))},a=n(e.startsAt),t=n(e.endsAt);return!a&&!t?null:a&&t?`${a} – ${t}`:a??t}function te(e){return e.threads.some(n=>n.status==="requires_action")}function rt(e){return e.status==="in_review"&&!e.assigneeId}function ot(e){return te(e)}function it(e){return e.status==="in_progress"&&te(e)?"text-warning animate-pulse":ne(e.status).iconClassName}function lt(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!Oe(a.failureKind))?"failed":null}function ct(e,n,a){const t=e.findIndex(u=>u.id===a),s=n===a?e[t+1]?.id??null:n,o=e.filter(u=>u.id!==a),l=s?o.findIndex(u=>u.id===s):-1,i=l===-1?o.length:l,c=o[i-1],r=o[i];return c&&r?(c.sortOrder+r.sortOrder)/2:c?c.sortOrder+1:r?r.sortOrder-1:0}function ut(e,n){return Array.from({length:n},(a,t)=>e-(n-1-t)*1e-4)}const Me=["archived"],se={triage:{labelKey:"taskBoard.config.statusBacklog",icon:ye,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:ee,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Be,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:be,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:Se,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Ae,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:_e,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:he,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:le,iconClassName:"text-muted-foreground"}},ae={icon:ee,iconClassName:"text-muted-foreground"},Fe=se;function ne(e){return Fe[e]??ae}function $e(e,n,a){const t=se[e];return t?n(t.labelKey):a}function dt(e,n,a){const t=a.find(s=>s.key===e);return t?{label:$e(e,n,t.title),visual:ne(e),offBoard:!1}:{label:e,visual:ae,offBoard:!0}}const ft=["bug","feature","chore","spike","security"],mt={bug:{labelKey:"taskBoard.config.typeBug",icon:Ie,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Ne,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:Ee,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:Te,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:De,iconClassName:"text-purple-500"}};function W(e){return de.includes(e)}function yt(e,n){return e.map(a=>a.key).filter(a=>n||!W(a))}function gt({columns:e,deliveryEnabled:n,shownLanes:a,occupied:t}){const s=e.map(r=>r.key).filter(r=>n||!W(r)||t.includes(r)),o=s.filter(r=>Me.includes(r)||!n&&W(r)),l=o.filter(r=>!a.includes(r)),i=new Set(s),c=[...new Set(t)].filter(r=>!i.has(r)).sort();return{lanes:[...s.filter(r=>!l.includes(r)),...c],hidden:l,hideable:o,unplaced:c}}const X="lane:";function pt({overId:e,columnKeys:n,statusOf:a}){if(e===void 0)return null;const t=String(e),s=t.startsWith(X)?t.slice(X.length):a(t);return s!==void 0&&n.has(s)?s:null}const kt=["none","low","medium","high","urgent"],_t={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:G,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ke,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:G,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:pe,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:ge,iconClassName:"text-destructive"}};function St(e,n=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<n?"overdue":a-n<=qe*864e5?"soon":null}const qe=3;function Bt(e){return`color-mix(in oklab, ${e??ue} var(--user-color-strength), transparent)`}export{W as A,Me as H,X as L,_t as P,se as S,mt as T,rt as a,Ze as b,tt as c,kt as d,ft as e,Bt as f,Xe as g,ne as h,te as i,nt as j,st as k,dt as l,yt as m,at as n,Oe as o,et as p,gt as q,ut as r,it as s,Re as t,xe as u,lt as v,ot as w,ct as x,pt as y,St as z};
@@ -1,8 +1,8 @@
1
- import{c as _,b as D,r as G,l as ee,j as s,du as te,W as se,ba as ne,C as ie,B as F,t as J,b4 as oe,dq as le}from"./index--Yue-AUv.js";import{A as ae,b as re}from"./alert-BxlPy-5K.js";import{b as ce,a as de,d as V,c as ue,S as me}from"./select-BenTNMk9.js";import{b as fe,T as pe,c as xe,a as ge}from"./tabs-CftkCfn2.js";import{u as X}from"./use-copy-CaXpH1Ji.js";import{i as Y}from"./Check-C4UJfE-5.js";import{i as he}from"./ChevronRight-j3-DQlb0.js";import{a as Q}from"./Copy01-Dg5SICyn.js";import{i as ye}from"./Key01-BwZSXIY4.js";import{i as Ce}from"./Link01-CcXI2IvB.js";import{C as be,a as je,b as ve}from"./client-icons-BgHiE1WD.js";import{u as we,a as Ne,A as $e}from"./api-keys-DrhmL2jm.js";import{R as ke}from"./require-capability-CB1cDqUK.js";import"./ChevronUp-CntIa4Yf.js";import"./AlertCircle-XwHoogbQ.js";import"./Plus-CudxeIvX.js";import"./Trash01-Af2cYCSZ.js";import"./alert-dialog-B0dP5uSI.js";import"./dialog-BfK9Q3g-.js";import"./input-BFAX_ahy.js";import"./label-DsmAdJ5N.js";import"./use-mcp-client-AO8IHYzf.js";import"./constants-DNuUCxmW.js";import"./auth-RtuDiJ_1.js";import"./access-gate-CNmQ7He5.js";import"./capability-load-error-B00k8PKs.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
1
+ import{c as _,b as D,r as G,l as ee,j as s,dt as te,W as se,ba as ne,C as ie,B as F,t as J,b4 as oe,dp as le}from"./index-KlN2gCIz.js";import{A as ae,b as re}from"./alert-4OAU_nBA.js";import{b as ce,a as de,d as V,c as ue,S as me}from"./select-BqDsJm6t.js";import{b as pe,T as fe,c as xe,a as ge}from"./tabs-COqGDJL6.js";import{u as X}from"./use-copy-cKoPwH5D.js";import{i as Y}from"./Check-DFpZ57WE.js";import{i as he}from"./ChevronRight-B0k8i06h.js";import{a as Q}from"./Copy01-DQrZ6li-.js";import{i as ye}from"./Key01-a9vi-Tku.js";import{i as Ce}from"./Link01-BWge3x25.js";import{C as be,a as je,b as ve}from"./client-icons-DZ-wX-6W.js";import{u as we,a as Ne,A as $e}from"./api-keys-gIqXyv9f.js";import{R as ke}from"./require-capability-BcT35GEL.js";import"./ChevronUp-DoFbOo5V.js";import"./AlertCircle-mzPvygUw.js";import"./Plus-B4HOF1E1.js";import"./Trash01-RcSuYrVJ.js";import"./alert-dialog-CcHS-XLY.js";import"./dialog-oJmEQ7fd.js";import"./input-HEtJVl9i.js";import"./label-C0PesxR-.js";import"./use-mcp-client-DaJV2zKk.js";import"./constants-DNuUCxmW.js";import"./auth-7gOJrCJs.js";import"./access-gate-Bqb_IoZo.js";import"./capability-load-error-BsnWRA5W.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
2
2
  --header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}return e==="oauth"?{language:"text",code:`${r}
4
4
 
5
5
  # OAuth: clients that support MCP OAuth 2.1 will discover
6
6
  # the auth flow via the WWW-Authenticate header on 401.`}:{language:"text",code:`${r}
7
7
 
8
- Authorization: Bearer ${i}`}}function ze(t){const e=_.c(32),{client:r,mode:c,url:i,apiKey:a}=t,n=D();let d;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==i?(d=_e({client:r,mode:c,url:i,apiKey:a}),e[0]=a,e[1]=r,e[2]=c,e[3]=i,e[4]=d):d=e[4];const o=d,{handleCopy:u,copied:l}=X(),m=G.useId(),f=G.useId();let p;e[5]!==u||e[6]!==o.code?(p=()=>u(o.code),e[5]=u,e[6]=o.code,e[7]=p):p=e[7];const C=`${m} ${f}`;let x;e[8]!==n?(x=n("settings.connectClients.copy"),e[8]=n,e[9]=x):x=e[9];let h;e[10]!==m||e[11]!==x?(h=s.jsx("span",{id:m,className:"sr-only",children:x}),e[10]=m,e[11]=x,e[12]=h):h=e[12];const y=o.pathHint??o.language;let b;e[13]!==y?(b=s.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] leading-none text-muted-foreground",children:y}),e[13]=y,e[14]=b):b=e[14];const S=l?"text-success":"group-hover:border-foreground/30 group-hover:text-foreground";let K;e[15]!==S?(K=ee("flex size-6 shrink-0 items-center justify-center self-start rounded-md border border-border text-muted-foreground transition-colors",S),e[15]=S,e[16]=K):K=e[16];let v;e[17]!==l?(v=l?s.jsx(Y,{size:13}):s.jsx(Q,{size:13}),e[17]=l,e[18]=v):v=e[18];let N;e[19]!==v||e[20]!==K?(N=s.jsx("span",{"aria-hidden":"true",className:K,children:v}),e[19]=v,e[20]=K,e[21]=N):N=e[21];let j;e[22]!==f||e[23]!==o.code?(j=s.jsx("pre",{className:"overflow-x-auto pt-2 font-mono text-xs leading-relaxed",children:s.jsx("code",{id:f,children:o.code})}),e[22]=f,e[23]=o.code,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j||e[27]!==p||e[28]!==C||e[29]!==h||e[30]!==b?(w=s.jsxs("button",{type:"button",onClick:p,"aria-labelledby":C,className:"group relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3 rounded-md p-3 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[h,b,N,j]}),e[25]=N,e[26]=j,e[27]=p,e[28]=C,e[29]=h,e[30]=b,e[31]=w):w=e[31],w}const q="Connect: ",U=[{id:"claude-code",label:"Claude",Icon:be},{id:"cursor",label:"Cursor",Icon:je},{id:"codex",label:"Codex",Icon:ve},{id:"raw",label:"Other client",labelKey:"settings.connectClients.otherClient",Icon:Ce}];function Z(t){return U.find(e=>e.id===t)?.label??t}function Ae(){return typeof window>"u"?"unknown":window.location.hostname}function Ie(t){const e=_.c(11),{text:r}=t,c=D(),{handleCopy:i,copied:a}=X();let n;e[0]!==i||e[1]!==r?(n=()=>i(r),e[0]=i,e[1]=r,e[2]=n):n=e[2];let d;e[3]!==c?(d=c("settings.connectClients.copy"),e[3]=c,e[4]=d):d=e[4];let o;e[5]!==a?(o=a?s.jsx(Y,{size:14}):s.jsx(Q,{size:14}),e[5]=a,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==d||e[9]!==o?(u=s.jsx(F,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:n,"aria-label":d,children:o}),e[7]=n,e[8]=d,e[9]=o,e[10]=u):u=e[10],u}function Oe(t){const e=_.c(17),{url:r}=t,c=D(),i=`${r}/.well-known/oauth-protected-resource`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(he,{size:12,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=a):a=e[0];let n;e[1]!==c?(n=c("settings.connectClients.oauthDiscoveryDetails"),e[1]=c,e[2]=n):n=e[2];let d;e[3]!==n?(d=s.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[a,n]}),e[3]=n,e[4]=d):d=e[4];let o;e[5]!==c?(o=c("settings.connectClients.oauthMetadataHint"),e[5]=c,e[6]=o):o=e[6];let u;e[7]!==o?(u=s.jsx("p",{children:o}),e[7]=o,e[8]=u):u=e[8];let l;e[9]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5",children:[s.jsx("code",{className:"flex-1 truncate font-mono text-[11px]",children:i}),s.jsx(Ie,{text:i})]}),e[9]=i,e[10]=l):l=e[10];let m;e[11]!==u||e[12]!==l?(m=s.jsxs("div",{className:"mt-2 space-y-1 pl-[18px]",children:[u,l]}),e[11]=u,e[12]=l,e[13]=m):m=e[13];let f;return e[14]!==d||e[15]!==m?(f=s.jsxs("details",{className:"group text-xs text-muted-foreground",children:[d,m]}),e[14]=d,e[15]=m,e[16]=f):f=e[16],f}function Me(t){const e=_.c(23),{mode:r,onModeChange:c}=t,i=D();let a;e[0]!==c?(a=x=>{(x==="oauth"||x==="api-key")&&c(x)},e[0]=c,e[1]=a):a=e[1];let n;e[2]!==i?(n=i("settings.connectClients.installMethod"),e[2]=i,e[3]=n):n=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{}),e[4]=d):d=e[4];let o;e[5]!==n?(o=s.jsx(de,{size:"sm",className:"text-xs","aria-label":n,children:d}),e[5]=n,e[6]=o):o=e[6];let u;e[7]!==i?(u=i("settings.connectClients.oauthOption"),e[7]=i,e[8]=u):u=e[8];let l;e[9]!==u?(l=s.jsx(V,{value:"oauth",className:"text-xs",children:u}),e[9]=u,e[10]=l):l=e[10];let m;e[11]!==i?(m=i("settings.connectClients.apiKeyOption"),e[11]=i,e[12]=m):m=e[12];let f;e[13]!==m?(f=s.jsx(V,{value:"api-key",className:"text-xs",children:m}),e[13]=m,e[14]=f):f=e[14];let p;e[15]!==l||e[16]!==f?(p=s.jsxs(ue,{children:[l,f]}),e[15]=l,e[16]=f,e[17]=p):p=e[17];let C;return e[18]!==r||e[19]!==a||e[20]!==o||e[21]!==p?(C=s.jsxs(me,{value:r,onValueChange:a,children:[o,p]}),e[18]=r,e[19]=a,e[20]=o,e[21]=p,e[22]=C):C=e[22],C}function Te(t){const e=_.c(26),{client:r,url:c,mode:i,newKey:a,canManageKeys:n,onGenerate:d,isGenerating:o,onClearNewKey:u}=t,l=D(),m=i==="api-key"&&a!==null,f=r==="raw";let p;e[0]!==m||e[1]!==l?(p=m&&s.jsxs(ae,{variant:"warning",className:"text-xs",children:[s.jsx(ie,{}),s.jsx(re,{children:l("settings.connectClients.snippetOneTimeWarning")})]}),e[0]=m,e[1]=l,e[2]=p):p=e[2];const C=m&&a?a:void 0;let x;e[3]!==r||e[4]!==i||e[5]!==C||e[6]!==c?(x=s.jsx(ze,{client:r,mode:i,url:c,apiKey:C}),e[3]=r,e[4]=i,e[5]=C,e[6]=c,e[7]=x):x=e[7];let h;e[8]!==f||e[9]!==c?(h=f&&s.jsx(Oe,{url:c}),e[8]=f,e[9]=c,e[10]=h):h=e[10];let y;e[11]!==n||e[12]!==r||e[13]!==o||e[14]!==f||e[15]!==i||e[16]!==u||e[17]!==d||e[18]!==m||e[19]!==l?(y=i==="api-key"&&n&&s.jsx("div",{children:m?s.jsx(F,{variant:"ghost",size:"sm",onClick:u,className:"text-xs",children:l("settings.connectClients.doneHideKey")}):s.jsxs(F,{size:"sm",onClick:d,disabled:o,className:"gap-1.5",children:[s.jsx(ye,{size:14}),o?l("settings.connectClients.generatingKey"):f?l("settings.connectClients.generateKey"):l("settings.connectClients.generateKeyFor",{client:Z(r)})]})}),e[11]=n,e[12]=r,e[13]=o,e[14]=f,e[15]=i,e[16]=u,e[17]=d,e[18]=m,e[19]=l,e[20]=y):y=e[20];let b;return e[21]!==p||e[22]!==x||e[23]!==h||e[24]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-3",children:[p,x,h,y]}),e[21]=p,e[22]=x,e[23]=h,e[24]=y,e[25]=b):b=e[25],b}function Ee(){const t=_.c(51),e=D(),{org:r}=se();let c;t[0]!==r.slug?(c=Ke(r.slug),t[0]=r.slug,t[1]=c):c=t[1];const i=c,a=we(),{granted:n}=ne("api-keys:manage");let d;t[2]!==n?(d={enabled:n},t[2]=n,t[3]=d):d=t[3];const{data:o,dataUpdatedAt:u}=Ne(d),[l,m]=G.useState("oauth");let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f={},t[4]=f):f=t[4];const[p,C]=G.useState(f);let x;t[5]!==u||t[6]!==p||t[7]!==o?(x=$=>{const g=p[$];return g&&(!o||u<g.at||o.some(k=>k.id===g.id))?g.key:null},t[5]=u,t[6]=p,t[7]=o,t[8]=x):x=t[8];const h=x,[y,b]=G.useState("claude-code");let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=$=>{const g=U.find(k=>k.id===$);g&&b(g.id)},t[9]=S):S=t[9];const K=S;let v;t[10]!==a||t[11]!==e?(v=$=>{const g=`${q}${Z($)} on ${Ae()}`;a.mutate({name:g,permissions:{"*":["*"]}},{onSuccess:k=>{C(B=>({...B,[$]:{id:k.id,key:k.key,at:Date.now()}})),J.success(e("settings.connectClients.keyCreated"))},onError:He})},t[10]=a,t[11]=e,t[12]=v):v=t[12];const N=v;let j;t[13]!==e?(j=e("settings.connectClients.connectAClient"),t[13]=e,t[14]=j):j=t[14];let w;t[15]!==e?(w=U.map($=>{const{id:g,label:k,labelKey:B,Icon:W}=$;return s.jsxs(fe,{value:g,variant:"underline",className:"gap-2",children:[s.jsx(W,{size:16}),B?e(B):k]},g)}),t[15]=e,t[16]=w):w=t[16];let z;t[17]!==w?(z=s.jsx(xe,{variant:"underline",className:"h-10 min-w-0 flex-1 gap-1 overflow-x-auto border-b-0",children:w}),t[17]=w,t[18]=z):z=t[18];let A;t[19]!==l?(A=s.jsx(Me,{mode:l,onModeChange:m}),t[19]=l,t[20]=A):A=t[20];let I;t[21]!==z||t[22]!==A?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1",children:[z,A]}),t[21]=z,t[22]=A,t[23]=I):I=t[23];let O;t[24]!==n||t[25]!==a||t[26]!==N||t[27]!==h||t[28]!==l||t[29]!==i?(O=U.map($=>{const{id:g,label:k}=$;return s.jsx(pe,{value:g,className:"p-2",children:s.jsx(Te,{client:g,url:i,mode:l,newKey:h(g),canManageKeys:n,onGenerate:()=>N(g),isGenerating:a.isPending&&a.variables?.name?.startsWith(`${q}${k}`)===!0,onClearNewKey:()=>C(B=>{const W={...B};return delete W[g],W})})},g)}),t[24]=n,t[25]=a,t[26]=N,t[27]=h,t[28]=l,t[29]=i,t[30]=O):O=t[30];let M;t[31]!==y||t[32]!==I||t[33]!==O?(M=s.jsx(oe,{className:"gap-0 overflow-hidden p-0",children:s.jsxs(ge,{value:y,onValueChange:K,variant:"underline",className:"gap-0",children:[I,O]})}),t[31]=y,t[32]=I,t[33]=O,t[34]=M):M=t[34];let T;t[35]!==l||t[36]!==e?(T=e(l==="oauth"?"settings.connectClients.oauthKeyHint":"settings.connectClients.headlessKeyHint"),t[35]=l,t[36]=e,t[37]=T):T=t[37];let E;t[38]!==T?(E=s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:T}),t[38]=T,t[39]=E):E=t[39];let H;t[40]!==y||t[41]!==e?(H=y==="raw"&&s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:e("settings.connectClients.anyOtherClientDescription")}),t[40]=y,t[41]=e,t[42]=H):H=t[42];let P;t[43]!==M||t[44]!==E||t[45]!==H||t[46]!==j?(P=s.jsxs(le,{headerClassName:"px-0",title:j,children:[M,E,H]}),t[43]=M,t[44]=E,t[45]=H,t[46]=j,t[47]=P):P=t[47];let L;t[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ke,{capability:"api-keys:manage",area:"api-keys",children:s.jsx($e,{})}),t[48]=L):L=t[48];let R;return t[49]!==P?(R=s.jsxs(s.Fragment,{children:[P,L]}),t[49]=P,t[50]=R):R=t[50],R}function He(t){return J.error(t.message)}function Pe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{group:"connect",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function ut(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pe,{}),t[0]=e):e=t[0],e}export{ut as default};
8
+ Authorization: Bearer ${i}`}}function ze(t){const e=_.c(32),{client:r,mode:c,url:i,apiKey:a}=t,n=D();let d;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==i?(d=_e({client:r,mode:c,url:i,apiKey:a}),e[0]=a,e[1]=r,e[2]=c,e[3]=i,e[4]=d):d=e[4];const o=d,{handleCopy:u,copied:l}=X(),m=G.useId(),p=G.useId();let f;e[5]!==u||e[6]!==o.code?(f=()=>u(o.code),e[5]=u,e[6]=o.code,e[7]=f):f=e[7];const C=`${m} ${p}`;let x;e[8]!==n?(x=n("settings.connectClients.copy"),e[8]=n,e[9]=x):x=e[9];let h;e[10]!==m||e[11]!==x?(h=s.jsx("span",{id:m,className:"sr-only",children:x}),e[10]=m,e[11]=x,e[12]=h):h=e[12];const y=o.pathHint??o.language;let b;e[13]!==y?(b=s.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] leading-none text-muted-foreground",children:y}),e[13]=y,e[14]=b):b=e[14];const S=l?"text-success":"group-hover:border-foreground/30 group-hover:text-foreground";let K;e[15]!==S?(K=ee("flex size-6 shrink-0 items-center justify-center self-start rounded-md border border-border text-muted-foreground transition-colors",S),e[15]=S,e[16]=K):K=e[16];let v;e[17]!==l?(v=l?s.jsx(Y,{size:13}):s.jsx(Q,{size:13}),e[17]=l,e[18]=v):v=e[18];let N;e[19]!==v||e[20]!==K?(N=s.jsx("span",{"aria-hidden":"true",className:K,children:v}),e[19]=v,e[20]=K,e[21]=N):N=e[21];let j;e[22]!==p||e[23]!==o.code?(j=s.jsx("pre",{className:"overflow-x-auto pt-2 font-mono text-xs leading-relaxed",children:s.jsx("code",{id:p,children:o.code})}),e[22]=p,e[23]=o.code,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j||e[27]!==f||e[28]!==C||e[29]!==h||e[30]!==b?(w=s.jsxs("button",{type:"button",onClick:f,"aria-labelledby":C,className:"group relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3 rounded-md p-3 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[h,b,N,j]}),e[25]=N,e[26]=j,e[27]=f,e[28]=C,e[29]=h,e[30]=b,e[31]=w):w=e[31],w}const q="Connect: ",U=[{id:"claude-code",label:"Claude",Icon:be},{id:"cursor",label:"Cursor",Icon:je},{id:"codex",label:"Codex",Icon:ve},{id:"raw",label:"Other client",labelKey:"settings.connectClients.otherClient",Icon:Ce}];function Z(t){return U.find(e=>e.id===t)?.label??t}function Ae(){return typeof window>"u"?"unknown":window.location.hostname}function Ie(t){const e=_.c(11),{text:r}=t,c=D(),{handleCopy:i,copied:a}=X();let n;e[0]!==i||e[1]!==r?(n=()=>i(r),e[0]=i,e[1]=r,e[2]=n):n=e[2];let d;e[3]!==c?(d=c("settings.connectClients.copy"),e[3]=c,e[4]=d):d=e[4];let o;e[5]!==a?(o=a?s.jsx(Y,{size:14}):s.jsx(Q,{size:14}),e[5]=a,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==d||e[9]!==o?(u=s.jsx(F,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:n,"aria-label":d,children:o}),e[7]=n,e[8]=d,e[9]=o,e[10]=u):u=e[10],u}function Oe(t){const e=_.c(17),{url:r}=t,c=D(),i=`${r}/.well-known/oauth-protected-resource`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(he,{size:12,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=a):a=e[0];let n;e[1]!==c?(n=c("settings.connectClients.oauthDiscoveryDetails"),e[1]=c,e[2]=n):n=e[2];let d;e[3]!==n?(d=s.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[a,n]}),e[3]=n,e[4]=d):d=e[4];let o;e[5]!==c?(o=c("settings.connectClients.oauthMetadataHint"),e[5]=c,e[6]=o):o=e[6];let u;e[7]!==o?(u=s.jsx("p",{children:o}),e[7]=o,e[8]=u):u=e[8];let l;e[9]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5",children:[s.jsx("code",{className:"flex-1 truncate font-mono text-[11px]",children:i}),s.jsx(Ie,{text:i})]}),e[9]=i,e[10]=l):l=e[10];let m;e[11]!==u||e[12]!==l?(m=s.jsxs("div",{className:"mt-2 space-y-1 pl-[18px]",children:[u,l]}),e[11]=u,e[12]=l,e[13]=m):m=e[13];let p;return e[14]!==d||e[15]!==m?(p=s.jsxs("details",{className:"group text-xs text-muted-foreground",children:[d,m]}),e[14]=d,e[15]=m,e[16]=p):p=e[16],p}function Me(t){const e=_.c(23),{mode:r,onModeChange:c}=t,i=D();let a;e[0]!==c?(a=x=>{(x==="oauth"||x==="api-key")&&c(x)},e[0]=c,e[1]=a):a=e[1];let n;e[2]!==i?(n=i("settings.connectClients.installMethod"),e[2]=i,e[3]=n):n=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{}),e[4]=d):d=e[4];let o;e[5]!==n?(o=s.jsx(de,{size:"sm",className:"text-xs","aria-label":n,children:d}),e[5]=n,e[6]=o):o=e[6];let u;e[7]!==i?(u=i("settings.connectClients.oauthOption"),e[7]=i,e[8]=u):u=e[8];let l;e[9]!==u?(l=s.jsx(V,{value:"oauth",className:"text-xs",children:u}),e[9]=u,e[10]=l):l=e[10];let m;e[11]!==i?(m=i("settings.connectClients.apiKeyOption"),e[11]=i,e[12]=m):m=e[12];let p;e[13]!==m?(p=s.jsx(V,{value:"api-key",className:"text-xs",children:m}),e[13]=m,e[14]=p):p=e[14];let f;e[15]!==l||e[16]!==p?(f=s.jsxs(ue,{children:[l,p]}),e[15]=l,e[16]=p,e[17]=f):f=e[17];let C;return e[18]!==r||e[19]!==a||e[20]!==o||e[21]!==f?(C=s.jsxs(me,{value:r,onValueChange:a,children:[o,f]}),e[18]=r,e[19]=a,e[20]=o,e[21]=f,e[22]=C):C=e[22],C}function Te(t){const e=_.c(26),{client:r,url:c,mode:i,newKey:a,canManageKeys:n,onGenerate:d,isGenerating:o,onClearNewKey:u}=t,l=D(),m=i==="api-key"&&a!==null,p=r==="raw";let f;e[0]!==m||e[1]!==l?(f=m&&s.jsxs(ae,{variant:"warning",className:"text-xs",children:[s.jsx(ie,{}),s.jsx(re,{children:l("settings.connectClients.snippetOneTimeWarning")})]}),e[0]=m,e[1]=l,e[2]=f):f=e[2];const C=m&&a?a:void 0;let x;e[3]!==r||e[4]!==i||e[5]!==C||e[6]!==c?(x=s.jsx(ze,{client:r,mode:i,url:c,apiKey:C}),e[3]=r,e[4]=i,e[5]=C,e[6]=c,e[7]=x):x=e[7];let h;e[8]!==p||e[9]!==c?(h=p&&s.jsx(Oe,{url:c}),e[8]=p,e[9]=c,e[10]=h):h=e[10];let y;e[11]!==n||e[12]!==r||e[13]!==o||e[14]!==p||e[15]!==i||e[16]!==u||e[17]!==d||e[18]!==m||e[19]!==l?(y=i==="api-key"&&n&&s.jsx("div",{children:m?s.jsx(F,{variant:"ghost",size:"sm",onClick:u,className:"text-xs",children:l("settings.connectClients.doneHideKey")}):s.jsxs(F,{size:"sm",onClick:d,disabled:o,className:"gap-1.5",children:[s.jsx(ye,{size:14}),o?l("settings.connectClients.generatingKey"):p?l("settings.connectClients.generateKey"):l("settings.connectClients.generateKeyFor",{client:Z(r)})]})}),e[11]=n,e[12]=r,e[13]=o,e[14]=p,e[15]=i,e[16]=u,e[17]=d,e[18]=m,e[19]=l,e[20]=y):y=e[20];let b;return e[21]!==f||e[22]!==x||e[23]!==h||e[24]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-3",children:[f,x,h,y]}),e[21]=f,e[22]=x,e[23]=h,e[24]=y,e[25]=b):b=e[25],b}function Ee(){const t=_.c(51),e=D(),{org:r}=se();let c;t[0]!==r.slug?(c=Ke(r.slug),t[0]=r.slug,t[1]=c):c=t[1];const i=c,a=we(),{granted:n}=ne("api-keys:manage");let d;t[2]!==n?(d={enabled:n},t[2]=n,t[3]=d):d=t[3];const{data:o,dataUpdatedAt:u}=Ne(d),[l,m]=G.useState("oauth");let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p={},t[4]=p):p=t[4];const[f,C]=G.useState(p);let x;t[5]!==u||t[6]!==f||t[7]!==o?(x=$=>{const g=f[$];return g&&(!o||u<g.at||o.some(k=>k.id===g.id))?g.key:null},t[5]=u,t[6]=f,t[7]=o,t[8]=x):x=t[8];const h=x,[y,b]=G.useState("claude-code");let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=$=>{const g=U.find(k=>k.id===$);g&&b(g.id)},t[9]=S):S=t[9];const K=S;let v;t[10]!==a||t[11]!==e?(v=$=>{const g=`${q}${Z($)} on ${Ae()}`;a.mutate({name:g,permissions:{"*":["*"]}},{onSuccess:k=>{C(B=>({...B,[$]:{id:k.id,key:k.key,at:Date.now()}})),J.success(e("settings.connectClients.keyCreated"))},onError:He})},t[10]=a,t[11]=e,t[12]=v):v=t[12];const N=v;let j;t[13]!==e?(j=e("settings.connectClients.connectAClient"),t[13]=e,t[14]=j):j=t[14];let w;t[15]!==e?(w=U.map($=>{const{id:g,label:k,labelKey:B,Icon:W}=$;return s.jsxs(pe,{value:g,variant:"underline",className:"gap-2",children:[s.jsx(W,{size:16}),B?e(B):k]},g)}),t[15]=e,t[16]=w):w=t[16];let z;t[17]!==w?(z=s.jsx(xe,{variant:"underline",className:"h-10 min-w-0 flex-1 gap-1 overflow-x-auto border-b-0",children:w}),t[17]=w,t[18]=z):z=t[18];let A;t[19]!==l?(A=s.jsx(Me,{mode:l,onModeChange:m}),t[19]=l,t[20]=A):A=t[20];let I;t[21]!==z||t[22]!==A?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1",children:[z,A]}),t[21]=z,t[22]=A,t[23]=I):I=t[23];let O;t[24]!==n||t[25]!==a||t[26]!==N||t[27]!==h||t[28]!==l||t[29]!==i?(O=U.map($=>{const{id:g,label:k}=$;return s.jsx(fe,{value:g,className:"p-2",children:s.jsx(Te,{client:g,url:i,mode:l,newKey:h(g),canManageKeys:n,onGenerate:()=>N(g),isGenerating:a.isPending&&a.variables?.name?.startsWith(`${q}${k}`)===!0,onClearNewKey:()=>C(B=>{const W={...B};return delete W[g],W})})},g)}),t[24]=n,t[25]=a,t[26]=N,t[27]=h,t[28]=l,t[29]=i,t[30]=O):O=t[30];let M;t[31]!==y||t[32]!==I||t[33]!==O?(M=s.jsx(oe,{className:"gap-0 overflow-hidden p-0",children:s.jsxs(ge,{value:y,onValueChange:K,variant:"underline",className:"gap-0",children:[I,O]})}),t[31]=y,t[32]=I,t[33]=O,t[34]=M):M=t[34];let T;t[35]!==l||t[36]!==e?(T=e(l==="oauth"?"settings.connectClients.oauthKeyHint":"settings.connectClients.headlessKeyHint"),t[35]=l,t[36]=e,t[37]=T):T=t[37];let E;t[38]!==T?(E=s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:T}),t[38]=T,t[39]=E):E=t[39];let H;t[40]!==y||t[41]!==e?(H=y==="raw"&&s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:e("settings.connectClients.anyOtherClientDescription")}),t[40]=y,t[41]=e,t[42]=H):H=t[42];let P;t[43]!==M||t[44]!==E||t[45]!==H||t[46]!==j?(P=s.jsxs(le,{headerClassName:"px-0",title:j,children:[M,E,H]}),t[43]=M,t[44]=E,t[45]=H,t[46]=j,t[47]=P):P=t[47];let L;t[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ke,{capability:"api-keys:manage",area:"api-keys",children:s.jsx($e,{})}),t[48]=L):L=t[48];let R;return t[49]!==P?(R=s.jsxs(s.Fragment,{children:[P,L]}),t[49]=P,t[50]=R):R=t[50],R}function He(t){return J.error(t.message)}function Pe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{group:"connect",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function ut(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pe,{}),t[0]=e):e=t[0],e}export{ut as default};