decocms 4.498.2 → 4.498.4

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 (367) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-CPrqBLS-.js → ActiveShapeUtils-DvDnt80D.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Bz95IA1L.js → AlertCircle-Dlc4TAni.js} +1 -1
  3. package/dist/client/assets/{AreaChart-Xme8QWLU.js → AreaChart-yw6N3660.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-B5K5-flN.js → ArrowLeft-CDvPBm7p.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-W9fOJYtW.js → ArrowUp-BwLxa8U7.js} +1 -1
  6. package/dist/client/assets/{BarChart-BPQlorah.js → BarChart-CPJ_N8zC.js} +1 -1
  7. package/dist/client/assets/{Building02-DH0ShiKs.js → Building02-CR5isnNx.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-Dy_bc6zw.js → CategoricalChart-C1cbAEIf.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CvrX7p0-.js → CheckCircle-C6r2HC-Z.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-DCbswHDn.js → ChevronSelectorVertical-Bp4xRFxb.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-BF5A1_bk.js → ChevronUp-D_THnL5s.js} +1 -1
  12. package/dist/client/assets/{Copy01-JxasDo0Y.js → Copy01-BgUme99A.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-zruO6RR6.js → CreditCard01-zjoJQKXP.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-IlcVf06d.js → DotsVertical-cl0_7TJQ.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-BHJpW1jD.js → ErrorBarContext-DX024i69.js} +1 -1
  16. package/dist/client/assets/{Globe04-DRKGVBCX.js → Globe04-CE10Q1IP.js} +1 -1
  17. package/dist/client/assets/{Image01-Bt6ZIkX1.js → Image01-CRdP4rtw.js} +1 -1
  18. package/dist/client/assets/{Key01-DBTFQIL_.js → Key01-DZe6ClyY.js} +1 -1
  19. package/dist/client/assets/{Link01-Da5EfBPU.js → Link01-OFk1WR7A.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-DeBiMAX8.js → LinkBroken01-QWocyozH.js} +1 -1
  21. package/dist/client/assets/{Monitor01-8fVRFSue.js → Monitor01-CbPw11a8.js} +1 -1
  22. package/dist/client/assets/{Play-auont4T3.js → Play-BCeqHm1l.js} +1 -1
  23. package/dist/client/assets/{Plus-B-IfeegN.js → Plus-C98eLxdY.js} +1 -1
  24. package/dist/client/assets/{SearchMd-BHEy3hgp.js → SearchMd-CxgIdVnP.js} +1 -1
  25. package/dist/client/assets/{Sector-8CKg69iF.js → Sector-BaMllyTT.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-DVzEvqIf.js → ShoppingBag01-BnVz66h8.js} +1 -1
  27. package/dist/client/assets/{Sun-BBJ4xAcN.js → Sun-CChCwIaO.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DWzDEU-3.js → SwitchHorizontal01-CzPKETS5.js} +1 -1
  29. package/dist/client/assets/{Tool01-G_7e_fu0.js → Tool01-wA46vRus.js} +1 -1
  30. package/dist/client/assets/{Trash01-DsUZfXDb.js → Trash01-B-NKlbYg.js} +1 -1
  31. package/dist/client/assets/{Upload01-CQ46KAYz.js → Upload01-5dq0ljk0.js} +1 -1
  32. package/dist/client/assets/{User01-P3sVVPbl.js → User01-CT29Ne_2.js} +1 -1
  33. package/dist/client/assets/{UserSquare-D3rxt1fW.js → UserSquare-DAAb_r4V.js} +1 -1
  34. package/dist/client/assets/{Users01-C3X5KgEC.js → Users01-BoSWrp-z.js} +1 -1
  35. package/dist/client/assets/{XAxis-ccboYQXo.js → XAxis-DVaBqwY8.js} +1 -1
  36. package/dist/client/assets/{XClose-wS5BxV-4.js → XClose-CzyFIqLD.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-RInN96sm.js → ZoomOut-DlauVCp0.js} +1 -1
  38. package/dist/client/assets/{access-gate-BfaxUmir.js → access-gate-9aQnA_7M.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-CuTrOuMt.js → add-connection-dialog-DrnMwSMI.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-QnKf3VXx.js → agent-analytics-DTv9cPLS.js} +1 -1
  41. package/dist/client/assets/agent-app-D30SjXpD.js +1 -0
  42. package/dist/client/assets/{agent-assets-CbOxvUVV.js → agent-assets-BoWeotpy.js} +1 -1
  43. package/dist/client/assets/{agent-automation-DTCmfA1N.js → agent-automation-BIj8BM6h.js} +2 -2
  44. package/dist/client/assets/{agent-automations-BmGXIPS7.js → agent-automations-CNagnuTO.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-_4X6sAcK.js → agent-connect-sources-Bqc5NgpS.js} +1 -1
  46. package/dist/client/assets/agent-deck-Dlq5Jn4J.js +1 -0
  47. package/dist/client/assets/{agent-e2e-yMfZw5Yr.js → agent-e2e-m91vdtPu.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-Hqcu4xN3.js → agent-experiments-BO7c0kwW.js} +1 -1
  49. package/dist/client/assets/{agent-file-CAK6n9Y3.js → agent-file-CBYoiEET.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-DzG38PAp.js → agent-hosting-BGu5l2Z2.js} +1 -1
  51. package/dist/client/assets/{agent-icon-DtuRgBXt.js → agent-icon-B4DYmgP1.js} +1 -1
  52. package/dist/client/assets/agent-library-BMuSAHXu.js +1 -0
  53. package/dist/client/assets/agent-library-file-m8UjchjM.js +1 -0
  54. package/dist/client/assets/{agent-monitor-BOoiOM64.js → agent-monitor-DDOhtTSs.js} +1 -1
  55. package/dist/client/assets/{agent-overview-BAiMf3nd.js → agent-overview-CPMlIf5b.js} +1 -1
  56. package/dist/client/assets/agent-settings-DGeNxG_1.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-D0WgiifS.js → agent-site-editor-BSwzRuum.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-jGD4n3i8.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-BgOJFG9c.js → agent-site-editor-content-BStGh_5Z.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-CUoQ3A2A.js → agent-site-editor-preview-CwJXL-58.js} +3 -3
  61. package/dist/client/assets/agent-view-BPQJx8r4.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-4ZKaGH4G.js → agent-view-guard-DCAabgSS.js} +1 -1
  63. package/dist/client/assets/{agents-list-D3gJ2RT9.js → agents-list-CNzlXvQq.js} +1 -1
  64. package/dist/client/assets/{ai-providers-EX3loIyU.js → ai-providers-BKh9tvrs.js} +1 -1
  65. package/dist/client/assets/{alert--bP6MJ-s.js → alert-DgCp5wQs.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-BXQXu_hy.js → alert-dialog-B9F5DKY-.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-CdYiQ-xy.js → analytics-sections-D51PIxSL.js} +1 -1
  68. package/dist/client/assets/{api-keys-BrjugwDb.js → api-keys-BbgspQ33.js} +1 -1
  69. package/dist/client/assets/api-keys-Cz5HjnGn.js +1 -0
  70. package/dist/client/assets/app-editor-CFMLwPGY.js +1 -0
  71. package/dist/client/assets/{asset-utils-D7XXIUcy.js → asset-utils-DJKtYT4e.js} +1 -1
  72. package/dist/client/assets/{auth-BE-jkdby.js → auth-B0nPj6bO.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-CjR3tChI.js → auth-catchall-DJoKPYHg.js} +1 -1
  74. package/dist/client/assets/{auth-entry-DDsI8LJz.js → auth-entry-BPoO9O8P.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-D6qqJdJA.js → auth-split-layout-xL5EbqOU.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-6gcBpEYE.js → authenticate-and-persist-oauth-CQlZ3eZb.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-CteUT-6p.js → automation-list-row-DQWwQNF7.js} +1 -1
  78. package/dist/client/assets/{automation-runs-CUtnmcVp.js → automation-runs-5zyjNSmx.js} +1 -1
  79. package/dist/client/assets/{automations-lYa6AiLA.js → automations-9aj7HpQB.js} +1 -1
  80. package/dist/client/assets/{autosend-DoPX3ID2.js → autosend-BbVWxP-H.js} +1 -1
  81. package/dist/client/assets/{avatar-Bq6TAAFW.js → avatar-DDLKm8YT.js} +1 -1
  82. package/dist/client/assets/{badge-DdyoasWI.js → badge-bIRC2OO-.js} +1 -1
  83. package/dist/client/assets/{block-document-DFUf28-k.js → block-document-DsUVeq1q.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-CcflmcEy.js → blocks-preview-workspace-context-KwxBfwR0.js} +1 -1
  85. package/dist/client/assets/{blog-schema-OMPmGRLW.js → blog-schema-DvJvepVI.js} +1 -1
  86. package/dist/client/assets/{board-analytics-BiNZrPNn.js → board-analytics-BcazWH83.js} +1 -1
  87. package/dist/client/assets/{buckets-CaFJvXOA.js → buckets-DvzdiLM3.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-vQTXQ0bc.js → build-improve-prompt-doc-JetGJgiY.js} +1 -1
  89. package/dist/client/assets/{calendar-CKjCUK4z.js → calendar-Ck-OGqZW.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-yY_zJ-Ao.js → capability-load-error-iZ0826fu.js} +1 -1
  91. package/dist/client/assets/{category-editor-k50OxEem.js → category-editor-B3M7cDqv.js} +1 -1
  92. package/dist/client/assets/{chart-DLnDEiU-.js → chart-BpaTxHcQ.js} +1 -1
  93. package/dist/client/assets/{chat-context-CrQzXlfA.js → chat-context-DC0y74SR.js} +1 -1
  94. package/dist/client/assets/{chat-draft-Dt0YxfIm.js → chat-draft-CYEKOHI4.js} +1 -1
  95. package/dist/client/assets/{checkbox-BDf-RH4K.js → checkbox-DQ6m3Oyh.js} +1 -1
  96. package/dist/client/assets/{choose-editor-DGzy5hBy.js → choose-editor-Coh9_-Eh.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-DzqqNAQK.js → claim-phase-copy-C7azKYkj.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-BxMYF6-F.js → cli-auth-success-CVVHoqwv.js} +1 -1
  99. package/dist/client/assets/{client-icons-Dg5TRoFi.js → client-icons-Br11ylAf.js} +1 -1
  100. package/dist/client/assets/{collapsible-BxK4deT6.js → collapsible-BPnQBVGa.js} +1 -1
  101. package/dist/client/assets/{collection-detail-CywnSV_7.js → collection-detail-BkVP0PSY.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-jNP5K1bz.js → collection-display-button-BxBBej77.js} +1 -1
  103. package/dist/client/assets/{collection-search-DPsn3CXI.js → collection-search-rIwiQou4.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-V4lSNzMe.js → collection-table-wrapper-BYfStt1n.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-yGaibPbt.js → collection-tabs-D8Yzl__1.js} +1 -1
  106. package/dist/client/assets/{column-rules-w5dI6MiR.js → column-rules-ByEHjgtF.js} +1 -1
  107. package/dist/client/assets/{combobox-BiNAlC0P.js → combobox-vVSkxC6C.js} +1 -1
  108. package/dist/client/assets/{command-BTi6xeFr.js → command-BxEu7pvj.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-CeXtyAjb.js → companion-mcps-section-BAoAXnfB.js} +1 -1
  110. package/dist/client/assets/{config-kzOWzcVE.js → config-DVayKjbP.js} +1 -1
  111. package/dist/client/assets/{connect-D9ikDmaj.js → connect-hhuaeBaR.js} +1 -1
  112. package/dist/client/assets/{connect-layout-CTahsp5z.js → connect-layout-CPGRhpnE.js} +1 -1
  113. package/dist/client/assets/{connection-D9I74S7M.js → connection-DY3hEgbh.js} +1 -1
  114. package/dist/client/assets/{connection-card-CJQIw_Nv.js → connection-card-B1xf0QXn.js} +1 -1
  115. package/dist/client/assets/{connection-detail-pgMuX5Oz.js → connection-detail-DwarFMD7.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-B-LWzl1k.js → connection-form-helpers-AZLHx77O.js} +1 -1
  117. package/dist/client/assets/{connections-DieTcSBX.js → connections-f-KjEAub.js} +1 -1
  118. package/dist/client/assets/{context-DFJUTjoL.js → context-B_buQAmU.js} +1 -1
  119. package/dist/client/assets/{context-menu-D1ZZXqJA.js → context-menu-BVP5fgz4.js} +1 -1
  120. package/dist/client/assets/{core.esm-Dv_8c6_R.js → core.esm-DVn3rbKw.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-Creof6Q6.js → create-organization-dialog-td5LVr0u.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-C1iRL0DP.js → daily-pulse-BdhiyT4g.js} +1 -1
  123. package/dist/client/assets/{device-hint-D6o0ZAXt.js → device-hint-DyVZjmEB.js} +1 -1
  124. package/dist/client/assets/{discover-CePAnyrm.js → discover-SM3gupQA.js} +1 -1
  125. package/dist/client/assets/{domain-settings-D6QuHIIo.js → domain-settings-D_DyUwza.js} +1 -1
  126. package/dist/client/assets/{drawer-BteL4_b8.js → drawer-Czv6sKYA.js} +1 -1
  127. package/dist/client/assets/{editor-DXs48n4m.js → editor-Bf6PL4ub.js} +1 -1
  128. package/dist/client/assets/{empty-state-nxvSNmCo.js → empty-state-DBUlDaU7.js} +1 -1
  129. package/dist/client/assets/{empty-state-DVOe8f0v.js → empty-state-l0-UYN2l.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-C4LE3XP1.js → extract-connection-data-fTgIRuWW.js} +1 -1
  131. package/dist/client/assets/{feature-gate-D5cs36pg.js → feature-gate-C2zVySnB.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-Bav9eu3-.js → feature-paywall-DbVAbAeS.js} +1 -1
  133. package/dist/client/assets/{file-explorer-BxD_Van3.js → file-explorer-C87QDA10.js} +1 -1
  134. package/dist/client/assets/{file-preview--UotbnAp.js → file-preview-BmxQ9ME-.js} +1 -1
  135. package/dist/client/assets/{file-share-button-DfSOzwKL.js → file-share-button-Dgb-l7Qf.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-BdgYZI0o.js → file-type-icon-C3tGnF-n.js} +1 -1
  137. package/dist/client/assets/flat-project-BMyo_C2o.js +1 -0
  138. package/dist/client/assets/{folder-icon-DPpHsFKf.js → folder-icon-Cca9MhDR.js} +1 -1
  139. package/dist/client/assets/{form-D1MBRr1a.js → form-DUIO9IEt.js} +1 -1
  140. package/dist/client/assets/{general-s5vFb1AW.js → general-DkopyRye.js} +1 -1
  141. package/dist/client/assets/{home-zkRu3m0Z.js → home-k_W6RDYZ.js} +1 -1
  142. package/dist/client/assets/{icon-button-Be2OFfn9.js → icon-button-BzP67FLk.js} +1 -1
  143. package/dist/client/assets/{index-DZ-4XlyB.js → index-2_2xm6as.js} +1 -1
  144. package/dist/client/assets/{index-CpwRaMGG.js → index-BLPk0slD.js} +1 -1
  145. package/dist/client/assets/{index-nGorqSn2.js → index-BypQd0-J.js} +1 -1
  146. package/dist/client/assets/{index-CYZBRz3B.js → index-C6rjX-UP.js} +1 -1
  147. package/dist/client/assets/{index-BWAlpkwu.js → index-CRxvFyky.js} +4 -4
  148. package/dist/client/assets/{index-DQfpFSGJ.js → index-Cjt1X9AF.js} +1 -1
  149. package/dist/client/assets/{index-Cu0cR7bc.js → index-CkINuNpG.js} +3 -3
  150. package/dist/client/assets/{index-DCl7JFhF.js → index-DgwVR51u.js} +1 -1
  151. package/dist/client/assets/{index-U_vV9Req.js → index-Djra7CLF.js} +1 -1
  152. package/dist/client/assets/{index-BarLJujz.js → index-LPmEp1x_.js} +1 -1
  153. package/dist/client/assets/{index-BZmo2tt3.js → index-T2H2w6n9.js} +1 -1
  154. package/dist/client/assets/{index-DphH3SH1.js → index-Ucsyl0WT.js} +1 -1
  155. package/dist/client/assets/{index-DaIZzrp6.js → index-oaLbB-Lw.js} +1 -1
  156. package/dist/client/assets/{index-redirect-BUhiGPCW.js → index-redirect-D5bqPyN4.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-MzzHKvZc.js → infiniteQueryObserver-DbF1ByiF.js} +1 -1
  158. package/dist/client/assets/{infra-billing-iMOaTHaE.js → infra-billing-CcIucqTz.js} +1 -1
  159. package/dist/client/assets/{input-Dxjz6HLl.js → input-B1upXVX9.js} +3 -3
  160. package/dist/client/assets/{input-B36YHfuk.js → input-_QjthN9W.js} +1 -1
  161. package/dist/client/assets/{integration-icon-COlVJ6Ap.js → integration-icon-BtvcZQwg.js} +1 -1
  162. package/dist/client/assets/{jira-icon-C99q-eqp.js → jira-icon-BUWT5EUx.js} +1 -1
  163. package/dist/client/assets/{label-DxzpCGxy.js → label-Mh3XNAnQ.js} +1 -1
  164. package/dist/client/assets/{layout-BPEjMWyv.js → layout-DC0tsxUd.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-D22i61GY.js → legacy-agents-deep-Cj3uH8m5.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-Bd1f4-s6.js → legacy-main-redirect-C_n-xqCE.js} +1 -1
  167. package/dist/client/assets/library-iHKSzBTO.js +1 -0
  168. package/dist/client/assets/{library-tab-BwMklNG7.js → library-tab-B8DYBVVC.js} +1 -1
  169. package/dist/client/assets/{login-Cg-H_746.js → login-DlpBdJV-.js} +1 -1
  170. package/dist/client/assets/{markdown-CIDKXAe3.js → markdown-CY21D23B.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-C_aV5_pO.js → mcp-app-renderer-BrkYMcu3.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-IMvvQmc3.js → mcp-oauth-DwTCbF8I.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-nWbzfbZw.js → mcp-oauth-DyEs_N4H.js} +1 -1
  174. package/dist/client/assets/{members-Z99D6BSC.js → members-BdrEciBo.js} +1 -1
  175. package/dist/client/assets/{memory-BzR5MfaH.js → memory-Zc2r9E1p.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-J0RaSepS.js → mini-report-page-BiwrFDOA.js} +1 -1
  177. package/dist/client/assets/{mock-board-CnMocWT0.js → mock-board-DCMpELEM.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-DKDSZsxq.js → monaco-editor-C2gO_CON.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-_d1_Xm5C.js → monitoring-stats-row-BblrlTY7.js} +1 -1
  180. package/dist/client/assets/{multi-select-C4Opj1Hx.js → multi-select-Ni9kskM1.js} +1 -1
  181. package/dist/client/assets/{mustache-DpS2EmOz.js → mustache-DdYDEiCN.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-Cqc94Xrg.js → new-project-dialog-qQiy9MD9.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-ai-provider-DoVXzlg4.js → oauth-callback-ai-provider-DrZsJmVA.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-BvnuYowV.js → oauth-callback-auT-cHM3.js} +1 -1
  185. package/dist/client/assets/{onboarding-BxKrIDfZ.js → onboarding-C-LACMZB.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-D_WargBp.js → openai-conversation-CDV6Hlpe.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-C72D-T6C.js → optimistic-project-sidebar-views-CdTnOiOg.js} +1 -1
  188. package/dist/client/assets/{organization-choice-CkZFZuI5.js → organization-choice-C8IZT-iN.js} +1 -1
  189. package/dist/client/assets/{orgs-BkyRjXec.js → orgs-B6DrkLsw.js} +1 -1
  190. package/dist/client/assets/{page-seo-form-V0XVwdbM.js → page-seo-form-CTfUpYQD.js} +1 -1
  191. package/dist/client/assets/{pair-DArsz9tT.js → pair-DEx1k_Wy.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-HvyjB5S9.js → plan-ladder-BMJb7bd1.js} +1 -1
  193. package/dist/client/assets/{popover-DiRh2ZE6.js → popover-mVKjwyVk.js} +1 -1
  194. package/dist/client/assets/{post-calendar-DZPRF1Fw.js → post-calendar-DW2QO-Ij.js} +1 -1
  195. package/dist/client/assets/{post-editor-Rq8bfJrk.js → post-editor-CiIvX-ng.js} +1 -1
  196. package/dist/client/assets/{preview-content-BBDqb8iV.js → preview-content-D-ruy_wj.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-B05ZYzPt.js → preview-dialog-D7XU_vea.js} +1 -1
  198. package/dist/client/assets/{preview-panel-C0Z5Xpkr.js → preview-panel-B5kp2dc2.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-B3zoX2p7.js → product-picker-dialog-MWBwIFZP.js} +1 -1
  200. package/dist/client/assets/{profile-D0KJYGbH.js → profile-7hhj1wz3.js} +1 -1
  201. package/dist/client/assets/{project-app-view-DnyrcgvT.js → project-app-view-BuYKX54V.js} +1 -1
  202. package/dist/client/assets/{project-feed-B1V1oVqF.js → project-feed-DeOeqQy3.js} +1 -1
  203. package/dist/client/assets/{project-icon-CERkoZt2.js → project-icon-n8KMRQ3Z.js} +1 -1
  204. package/dist/client/assets/project-reports-BjC6rSm2.js +1 -0
  205. package/dist/client/assets/project-tasks-BOe2SDZZ.js +1 -0
  206. package/dist/client/assets/{projects-BjpwoYcB.js → projects-D4OlAPFD.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-mw_x5s3z.js → projects-empty-state-vB9QFGre.js} +1 -1
  208. package/dist/client/assets/{prompts-ws24GjVu.js → prompts-SlMQf3O-.js} +1 -1
  209. package/dist/client/assets/record-editor-GgZyvS4U.js +1 -0
  210. package/dist/client/assets/redirect-editor-WCGajlSb.js +1 -0
  211. package/dist/client/assets/reports-D93fmeCk.js +1 -0
  212. package/dist/client/assets/{reports-9nAIioaC.js → reports-DY5ArZoE.js} +1 -1
  213. package/dist/client/assets/{reports-onboarding-CQX2_wNC.js → reports-onboarding-CTY0rP-e.js} +1 -1
  214. package/dist/client/assets/{reports-tab-CTElJmji.js → reports-tab-DI2eAic2.js} +2 -2
  215. package/dist/client/assets/{repositories-BNfy6lS5.js → repositories-B4j8_rgn.js} +1 -1
  216. package/dist/client/assets/{repository-binding-BkAj46q1.js → repository-binding-zQyfl2AT.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-D222lJkc.js → repository-import-picker-BjTbZx13.js} +1 -1
  218. package/dist/client/assets/{repository-picker-BgLHJAB7.js → repository-picker-BzWXVivD.js} +1 -1
  219. package/dist/client/assets/{require-capability-9g_2IlJC.js → require-capability-CIndqD2k.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-C2W0Hmb4.js → required-auth-layout-CncnEGXc.js} +1 -1
  221. package/dist/client/assets/{reset-password-Bl7GenBs.js → reset-password-GQx23DJ-.js} +1 -1
  222. package/dist/client/assets/{resizable-BeKhifo6.js → resizable-DwzY5Qay.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-sCKE8Gcb.js → resolve-tab-icon-X_We-OmQ.js} +1 -1
  224. package/dist/client/assets/{review-settings-CK8XpKJr.js → review-settings-CeUu7ddF.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-DFO6A-Xy.js → rich-text-link-control-CUMKm6c-.js} +1 -1
  226. package/dist/client/assets/{roles-BE5NOOrK.js → roles-CAFDvsK5.js} +1 -1
  227. package/dist/client/assets/{route-DP_WtFkJ.js → route-Bcim93Ah.js} +1 -1
  228. package/dist/client/assets/{route-g1ppf9aO.js → route-CA6rYJM9.js} +1 -1
  229. package/dist/client/assets/route-CHmv4ssy.js +1 -0
  230. package/dist/client/assets/{runnable-block-editor-D7D4bcP5.js → runnable-block-editor-DR0ICPR0.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-DwZumXpN.js → sandbox-lifecycle-context-CUg1NWpr.js} +1 -1
  232. package/dist/client/assets/{schema-SVXt4E6H.js → schema-ChrkqfAY.js} +1 -1
  233. package/dist/client/assets/{scroll-area-DC2prxTD.js → scroll-area-REb3aG6j.js} +1 -1
  234. package/dist/client/assets/{search-input-DpIQ019n.js → search-input-_o9KQd1n.js} +1 -1
  235. package/dist/client/assets/{search-toggle-DQlNqONe.js → search-toggle-DAMhNTvh.js} +1 -1
  236. package/dist/client/assets/{secret-picker-BVqoJ9wg.js → secret-picker-XRIL59wI.js} +1 -1
  237. package/dist/client/assets/{secrets-jX83QUBm.js → secrets-DFNKd4om.js} +1 -1
  238. package/dist/client/assets/{sections-editor-D06mA4CH.js → sections-editor-CBBPGQp1.js} +1 -1
  239. package/dist/client/assets/{select-5QkF-ydf.js → select-bn_n-Gzr.js} +1 -1
  240. package/dist/client/assets/{select-model-BPJLgnED.js → select-model-DVVnJpL9.js} +1 -1
  241. package/dist/client/assets/{seo-editor-BIs-FzOM.js → seo-editor-ClAvSbn1.js} +1 -1
  242. package/dist/client/assets/{separator-CwKe-sT_.js → separator-dxSA0jUo.js} +1 -1
  243. package/dist/client/assets/{settings-tab-BryWi3Fl.js → settings-tab-BZRmYB8j.js} +1 -1
  244. package/dist/client/assets/{sheet-Ccw9R6E9.js → sheet-FuQrUGRX.js} +1 -1
  245. package/dist/client/assets/{shell-layout-CmyoqizW.js → shell-layout-CeMKwojV.js} +1 -1
  246. package/dist/client/assets/{skills-DWOJiWbw.js → skills-BYw6wBZt.js} +1 -1
  247. package/dist/client/assets/{slider-BhZMOdIj.js → slider-BRB38sjE.js} +1 -1
  248. package/dist/client/assets/{sortable.esm-CTrrb9k2.js → sortable.esm-B2RbU5t5.js} +1 -1
  249. package/dist/client/assets/{sso-BbaZR3ST.js → sso-BGdnuhwb.js} +1 -1
  250. package/dist/client/assets/{suggestion-DN6ve0Z-.js → suggestion-DgKlvExo.js} +1 -1
  251. package/dist/client/assets/{switch-BcjqQ0Bd.js → switch-5Er3VYKS.js} +1 -1
  252. package/dist/client/assets/{symbol-Anjb0I8w.js → symbol-DT2WuZ3F.js} +1 -1
  253. package/dist/client/assets/{synced-repos-omp4l-Qh.js → synced-repos-B4pGx8rW.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-DJKeBMtp.js → tab-icon-glyph-BH2Hc6_z.js} +1 -1
  255. package/dist/client/assets/{table-zpHK9BMQ.js → table-ufn_70fj.js} +1 -1
  256. package/dist/client/assets/{tabs-BbVh-GPF.js → tabs-DCVl1Xp_.js} +1 -1
  257. package/dist/client/assets/{task-board-CuPrIMXJ.js → task-board-hSuUNaaL.js} +1 -1
  258. package/dist/client/assets/{task-route-Be5gAj81.js → task-route-BJzNrO-6.js} +1 -1
  259. package/dist/client/assets/{task-status-BF84kVgv.js → task-status-BPKMFkfO.js} +1 -1
  260. package/dist/client/assets/taskboard-analytics-C3u3eaKj.js +1 -0
  261. package/dist/client/assets/{tasks-Cg2ediCg.js → tasks-CDgCgwSB.js} +1 -1
  262. package/dist/client/assets/tasks-DxmDvDef.js +1 -0
  263. package/dist/client/assets/{textarea-CU3yT73Z.js → textarea-Bb-Hk_Kv.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-CL66KEgk.js → thread-analytics-CZPxO8Kc.js} +1 -1
  265. package/dist/client/assets/{thread-button-BicBi2YW.js → thread-button-DkQ8x3QA.js} +1 -1
  266. package/dist/client/assets/{thread-intent-qsgT0v7g.js → thread-intent-C0VUjVSW.js} +1 -1
  267. package/dist/client/assets/{thread-route-Bvc86kB8.js → thread-route-BLdRUQ6B.js} +1 -1
  268. package/dist/client/assets/{thread-route-VcdZ-yo1.js → thread-route-DFcB1-xE.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-CPBxYYyX.js → thread-sheet-body-DADTw5P3.js} +1 -1
  270. package/dist/client/assets/{time-range-picker-BiZZSuW7.js → time-range-picker-CNZYQxLD.js} +1 -1
  271. package/dist/client/assets/{toggle-group-mviOe0_V.js → toggle-group-j2gE6j2V.js} +1 -1
  272. package/dist/client/assets/{tool-namespace-Cm6DqXGb.js → tool-namespace-rmKZ6urT.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-CT832dEu.js → toolbar-icon-button-BXIVPBnN.js} +1 -1
  274. package/dist/client/assets/{tooltip-DgqSmkd3.js → tooltip-BkpS_52M.js} +1 -1
  275. package/dist/client/assets/{tooltipContext-CWoJ1tLJ.js → tooltipContext-DGkQsEw3.js} +1 -1
  276. package/dist/client/assets/{track-Bsbqp3Hn.js → track-J0HEXaC4.js} +1 -1
  277. package/dist/client/assets/{types-ZkHG882G.js → types-BdfekBKI.js} +1 -1
  278. package/dist/client/assets/{url-slug-Bn0tWo1u.js → url-slug-DoBmFZC1.js} +1 -1
  279. package/dist/client/assets/{usage-stats-CwHrFrwm.js → usage-stats-B9McGmou.js} +1 -1
  280. package/dist/client/assets/{use-ai-providers-Dw5yZbHU.js → use-ai-providers-CqTwdrfZ.js} +1 -1
  281. package/dist/client/assets/{use-automations-DGkz1D1I.js → use-automations-Bk3k2I5y.js} +1 -1
  282. package/dist/client/assets/{use-autosave-CRooFXam.js → use-autosave-DBEOiQzC.js} +1 -1
  283. package/dist/client/assets/{use-chat-layout-state-Aoi0ufu4.js → use-chat-layout-state-tSM0Jizm.js} +1 -1
  284. package/dist/client/assets/{use-chat-navigation-D7AQRSfw.js → use-chat-navigation-DRlGBXxg.js} +1 -1
  285. package/dist/client/assets/{use-clock-tick-DFaAt8jb.js → use-clock-tick-BBBJErXL.js} +1 -1
  286. package/dist/client/assets/{use-connect-companion-ZHdRjz9u.js → use-connect-companion-BEDfrnjG.js} +1 -1
  287. package/dist/client/assets/{use-connection-CEXahlIk.js → use-connection-Ce_qeKZH.js} +1 -1
  288. package/dist/client/assets/{use-copy-DapieTwf.js → use-copy-BpOtbx4U.js} +1 -1
  289. package/dist/client/assets/{use-create-virtual-mcp-CjHeuHjz.js → use-create-virtual-mcp-DeEzFaR6.js} +1 -1
  290. package/dist/client/assets/{use-date-fns-locale-BIu5umci.js → use-date-fns-locale-Cy-y_Q2o.js} +1 -1
  291. package/dist/client/assets/{use-debounced-autosave-uZ7zbYGC.js → use-debounced-autosave-C0ZrLAg3.js} +1 -1
  292. package/dist/client/assets/{use-debounced-value-D6NhrevJ.js → use-debounced-value-CqzArAe1.js} +1 -1
  293. package/dist/client/assets/{use-deco-credits-BZuYHeV1.js → use-deco-credits-XY0t0tfe.js} +1 -1
  294. package/dist/client/assets/{use-decopilot-events-Cq_vCUrM.js → use-decopilot-events-B8FghSGH.js} +1 -1
  295. package/dist/client/assets/{use-delete-connection-gUL1t4_0.js → use-delete-connection-DBLYuhO3.js} +1 -1
  296. package/dist/client/assets/{use-deployment-admin-BtZ93ofY.js → use-deployment-admin-KdgQNhqJ.js} +1 -1
  297. package/dist/client/assets/{use-ensure-project-folder-FLO8zvA3.js → use-ensure-project-folder-DmvG4e9-.js} +1 -1
  298. package/dist/client/assets/{use-fast-preview-draft-url-G0OtfyDx.js → use-fast-preview-draft-url-Bwl11KLM.js} +1 -1
  299. package/dist/client/assets/{use-file-configs-6DIvP8tn.js → use-file-configs-DgY4Z1tX.js} +1 -1
  300. package/dist/client/assets/{use-infinite-scroll-DeMwG1OG.js → use-infinite-scroll-BV3nru2V.js} +1 -1
  301. package/dist/client/assets/{use-join-requests-DmvTad5Q.js → use-join-requests-D9rhBfxf.js} +1 -1
  302. package/dist/client/assets/{use-main-panel-tabs-BtpwyvjF.js → use-main-panel-tabs-Dr7_GuMh.js} +1 -1
  303. package/dist/client/assets/{use-mcp-auth-status-CCBaD_t7.js → use-mcp-auth-status-C5aEbqHT.js} +1 -1
  304. package/dist/client/assets/{use-mcp-client-Qoi044ys.js → use-mcp-client-BGHP1VQF.js} +1 -1
  305. package/dist/client/assets/{use-mcp-prompts-BMgpvY14.js → use-mcp-prompts-ZKBtP7OQ.js} +1 -1
  306. package/dist/client/assets/{use-mcp-tools-BlaP_xtx.js → use-mcp-tools-CXQACEGE.js} +1 -1
  307. package/dist/client/assets/{use-members-ENr1twTa.js → use-members-BQX1TQ2_.js} +1 -1
  308. package/dist/client/assets/{use-mobile-CwSfPydP.js → use-mobile-90klfWtr.js} +1 -1
  309. package/dist/client/assets/{use-navigate-to-agent-D1F3bZCL.js → use-navigate-to-agent-B6pFs8ZG.js} +1 -1
  310. package/dist/client/assets/use-new-blocks-editor-DNTIQH01.js +1 -0
  311. package/dist/client/assets/{use-open-billing-url-BoRkSQlB.js → use-open-billing-url-BfO0orUG.js} +1 -1
  312. package/dist/client/assets/{use-org-auth-client-BsOQBY-k.js → use-org-auth-client-D-6ysaay.js} +1 -1
  313. package/dist/client/assets/{use-org-fs-CVJeIAyC.js → use-org-fs-B_rDABnu.js} +1 -1
  314. package/dist/client/assets/{use-org-repo-syncs-DxrCYoIn.js → use-org-repo-syncs-BTaJmODR.js} +1 -1
  315. package/dist/client/assets/{use-org-sso-Ddt7V8xj.js → use-org-sso-CtvQdcBM.js} +1 -1
  316. package/dist/client/assets/{use-organization-roles-D9xxQxFR.js → use-organization-roles-DMPYdlmm.js} +1 -1
  317. package/dist/client/assets/{use-organization-settings-BbR_CXXI.js → use-organization-settings-ZA_4CNmo.js} +1 -1
  318. package/dist/client/assets/{use-panel-navigate-DKoLfagd.js → use-panel-navigate-BGy1YPzc.js} +1 -1
  319. package/dist/client/assets/{use-project-scope-B9BJjHwp.js → use-project-scope-BWYheFWK.js} +1 -1
  320. package/dist/client/assets/{use-releases-JESV1CSi.js → use-releases-BdOFdk4y.js} +1 -1
  321. package/dist/client/assets/{use-reports-diagnostic-xu7ZUmZP.js → use-reports-diagnostic-D5EIRRJS.js} +1 -1
  322. package/dist/client/assets/{use-sandbox-events-CZCsW2q8.js → use-sandbox-events-DzbntDfn.js} +1 -1
  323. package/dist/client/assets/{use-secrets-Jwfb7jmE.js → use-secrets-Ck09wob8.js} +1 -1
  324. package/dist/client/assets/{use-section-preview-base-Dd1LZgFO.js → use-section-preview-base-BeM-C7Mk.js} +1 -1
  325. package/dist/client/assets/{use-tags-BaR2yuSY.js → use-tags-WYrHi_hP.js} +1 -1
  326. package/dist/client/assets/{use-task-board-analytics-JumBGEbJ.js → use-task-board-analytics-B8uAa8y3.js} +1 -1
  327. package/dist/client/assets/{use-task-board-events-DJcOVtd5.js → use-task-board-events-CO4A3H_z.js} +1 -1
  328. package/dist/client/assets/{use-task-board-item-prs-CRO34NDT.js → use-task-board-item-prs-CYS08wlR.js} +1 -1
  329. package/dist/client/assets/{use-task-board-items-CgMDPdKH.js → use-task-board-items-R6ZVfWty.js} +1 -1
  330. package/dist/client/assets/{use-task-metadata-CZKhUiWq.js → use-task-metadata-M0RHZMTW.js} +1 -1
  331. package/dist/client/assets/{use-thread-analytics-BwMzDnad.js → use-thread-analytics-DE43UBd9.js} +1 -1
  332. package/dist/client/assets/{use-thread-outputs-CINM0_Ec.js → use-thread-outputs-DMPWLzEw.js} +1 -1
  333. package/dist/client/assets/useInfiniteQuery-wHLzuDuh.js +1 -0
  334. package/dist/client/assets/{useQueries-B0oo9pOn.js → useQueries-Bq03BbUn.js} +1 -1
  335. package/dist/client/assets/useSuspenseInfiniteQuery-C_Rnzsp0.js +1 -0
  336. package/dist/client/assets/{users-bQzZTP34.js → users-BYjClQmT.js} +1 -1
  337. package/dist/client/assets/{utils-BQ82PIjq.js → utils-DwMy6n9X.js} +1 -1
  338. package/dist/client/assets/{variant-calendar-DeFFVX92.js → variant-calendar-BixklqPv.js} +1 -1
  339. package/dist/client/assets/{variant-matcher-override-DoZRlwTe.js → variant-matcher-override-CPTrH74t.js} +1 -1
  340. package/dist/client/assets/{view-mode-toggle-ClN4sSDy.js → view-mode-toggle-DHW7DJAq.js} +1 -1
  341. package/dist/client/assets/{virtual-mcp-Dx4LWaPY.js → virtual-mcp-gsHlBsGT.js} +1 -1
  342. package/dist/client/assets/{watch-sse-pool-jiotiysJ.js → watch-sse-pool-Cg-aHWP0.js} +1 -1
  343. package/dist/client/index.html +1 -1
  344. package/dist/server/server.js +25 -25
  345. package/package.json +1 -1
  346. package/dist/client/assets/agent-app-y713S8L2.js +0 -1
  347. package/dist/client/assets/agent-deck-Clw_PoDY.js +0 -1
  348. package/dist/client/assets/agent-library-CDbG2dvW.js +0 -1
  349. package/dist/client/assets/agent-library-file-D6nDt_06.js +0 -1
  350. package/dist/client/assets/agent-settings-DZqJ1Ao9.js +0 -1
  351. package/dist/client/assets/agent-site-editor-code-hMG7vrm0.js +0 -2
  352. package/dist/client/assets/agent-view-49jn3sef.js +0 -1
  353. package/dist/client/assets/api-keys-CJs0zhxS.js +0 -1
  354. package/dist/client/assets/app-editor-jFcBonBj.js +0 -1
  355. package/dist/client/assets/flat-project-DECVe2Af.js +0 -1
  356. package/dist/client/assets/library-BzWAyYdS.js +0 -1
  357. package/dist/client/assets/project-reports-ClPCzaR7.js +0 -1
  358. package/dist/client/assets/project-tasks-D6PlNqPf.js +0 -1
  359. package/dist/client/assets/record-editor-BM2bfocU.js +0 -1
  360. package/dist/client/assets/redirect-editor-8f6pOi1q.js +0 -1
  361. package/dist/client/assets/reports-efTLNI8J.js +0 -1
  362. package/dist/client/assets/route-ByrWDzCb.js +0 -1
  363. package/dist/client/assets/taskboard-analytics-BACyQaw4.js +0 -1
  364. package/dist/client/assets/tasks-DbSw5iLI.js +0 -1
  365. package/dist/client/assets/use-new-blocks-editor-D2VBaOY7.js +0 -1
  366. package/dist/client/assets/useInfiniteQuery-C1KwH6U-.js +0 -1
  367. package/dist/client/assets/useSuspenseInfiniteQuery-BhqW4802.js +0 -1
@@ -1,4 +1,4 @@
1
- import{ax as Qt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as Pt,a2 as $t,D as et,q as tt,s as st,v as ot,aK as at,w as nt,t as X,b2 as es,X as ts,T as ss,V as os,as,aq as ns,ar as is,U as Oe,aU as rs,h as Le,y as Ke,aC as ls,b7 as pt,I as xt,b8 as cs,al as ds,aY as Qe,n as Xe,f as ms}from"./index-BWAlpkwu.js";import{C as us}from"./index-DQfpFSGJ.js";import{d as it,N as fs,b as ps,a2 as xs,k as gt,as as gs,T as ht,at as hs,h as js,M as Me,au as zt}from"./agent-icon-DtuRgBXt.js";import{n as jt}from"./ShoppingBag01-DVzEvqIf.js";import{t as rt}from"./ChevronUp-BF5A1_bk.js";import{e as ys}from"./UserSquare-D3rxt1fW.js";import{e as lt,b as Et,t as Ot}from"./Tool01-G_7e_fu0.js";import{a as bs}from"./Image01-Bt6ZIkX1.js";import{i as vs}from"./SearchMd-BHEy3hgp.js";import{B as Kt}from"./badge-DdyoasWI.js";import{C as Ft}from"./checkbox-BDf-RH4K.js";import{S as ct}from"./switch-BcjqQ0Bd.js";import{a as Mt,b as Rt,P as Lt}from"./popover-DiRh2ZE6.js";import{a as Cs,e as yt,b as Ns,f as Ss,C as ks,c as Ts}from"./command-BTi6xeFr.js";import{g as ws,s as Ds}from"./tool-namespace-Cm6DqXGb.js";import{u as dt}from"./use-connection-CEXahlIk.js";import{u as _s}from"./use-mcp-client-Qoi044ys.js";import{u as Is}from"./use-mcp-tools-BlaP_xtx.js";import{I as As}from"./integration-icon-COlVJ6Ap.js";import{M as Ps}from"./select-model-BPJLgnED.js";import{u as $s}from"./use-ai-providers-Dw5yZbHU.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-vQTXQ0bc.js";import{a as ve,c as Os,d as Ks}from"./use-automations-DGkz1D1I.js";import{b as Fs,a as Ms,g as Rs,t as Ls}from"./chat-context-CrQzXlfA.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-BxK4deT6.js";import{b as Bs,T as Gs,a as Hs}from"./tooltip-DgqSmkd3.js";import{a as Js}from"./shell-layout-CmyoqizW.js";import{i as Ut}from"./ArrowLeft-B5K5-flN.js";import{i as Xs}from"./ArrowUp-W9fOJYtW.js";import{s as qs}from"./Trash01-DsUZfXDb.js";import{s as mt}from"./XClose-wS5BxV-4.js";import{u as bt}from"./use-debounced-autosave-uZ7zbYGC.js";import{T as Ys,a as Qs}from"./input-B36YHfuk.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-C99q-eqp.js";import{s as to}from"./Plus-B-IfeegN.js";import{i as ut}from"./ZoomOut-RInN96sm.js";import{l as Be,H as so}from"./config-kzOWzcVE.js";import{C as oo}from"./task-board-CuPrIMXJ.js";import{M as Wt}from"./multi-select-C4Opj1Hx.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-5QkF-ydf.js";import{b as ao,a as no,T as vt}from"./tabs-BbVh-GPF.js";import{a as qe}from"./Copy01-JxasDo0Y.js";import{M as io}from"./monaco-editor-DKDSZsxq.js";import{A as Ct,a as Nt,b as St,c as kt,g as Tt,d as wt,e as Dt,f as _t}from"./alert-dialog-BXQXu_hy.js";import{A as ro}from"./automation-runs-CUtnmcVp.js";import{C as lo}from"./collection-tabs-yGaibPbt.js";import{a as co}from"./use-panel-navigate-DKoLfagd.js";import"./use-mobile-CwSfPydP.js";import"./thread-button-BicBi2YW.js";import"./use-chat-layout-state-Aoi0ufu4.js";import"./use-file-configs-6DIvP8tn.js";import"./use-organization-settings-BbR_CXXI.js";import"./schema-SVXt4E6H.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-BkAj46q1.js";import"./thread-route-VcdZ-yo1.js";import"./thread-intent-qsgT0v7g.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-jiotiysJ.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Ccw9R6E9.js";import"./toolbar-icon-button-CT832dEu.js";import"./resizable-BeKhifo6.js";import"./icon-button-Be2OFfn9.js";import"./use-project-scope-B9BJjHwp.js";import"./AlertCircle-Bz95IA1L.js";import"./LinkBroken01-DeBiMAX8.js";import"./Building02-DH0ShiKs.js";import"./CheckCircle-CvrX7p0-.js";import"./ChevronSelectorVertical-DCbswHDn.js";import"./CreditCard01-zruO6RR6.js";import"./DotsVertical-IlcVf06d.js";import"./Globe04-DRKGVBCX.js";import"./SwitchHorizontal01-DWzDEU-3.js";import"./Key01-DBTFQIL_.js";import"./Link01-Da5EfBPU.js";import"./Monitor01-8fVRFSue.js";import"./Sun-BBJ4xAcN.js";import"./Play-auont4T3.js";import"./Upload01-CQ46KAYz.js";import"./User01-P3sVVPbl.js";import"./Users01-C3X5KgEC.js";import"./index-U_vV9Req.js";import"./auth-BE-jkdby.js";import"./drawer-BteL4_b8.js";import"./index-nGorqSn2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bq6TAAFW.js";import"./autosend-DoPX3ID2.js";import"./use-decopilot-events-Cq_vCUrM.js";import"./use-chat-navigation-D7AQRSfw.js";import"./location-BjlyegC2.js";import"./index-DphH3SH1.js";import"./use-clock-tick-DFaAt8jb.js";import"./project-icon-CERkoZt2.js";import"./new-project-dialog-Cqc94Xrg.js";import"./label-DxzpCGxy.js";import"./repository-import-picker-D222lJkc.js";import"./use-navigate-to-agent-D1F3bZCL.js";import"./repository-picker-BgLHJAB7.js";import"./useInfiniteQuery-C1KwH6U-.js";import"./infiniteQueryObserver-MzzHKvZc.js";import"./collection-search-DPsn3CXI.js";import"./use-debounced-value-D6NhrevJ.js";import"./required-auth-layout-C2W0Hmb4.js";import"./use-org-sso-Ddt7V8xj.js";import"./suggestion-DN6ve0Z-.js";import"./usage-stats-CwHrFrwm.js";import"./form-D1MBRr1a.js";import"./utils-CVEq3hMx.js";import"./markdown-CIDKXAe3.js";import"./use-copy-DapieTwf.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-BMgpvY14.js";import"./use-org-fs-CVJeIAyC.js";import"./core.esm-Dv_8c6_R.js";import"./index-BdQq_4o_.js";import"./editor-DXs48n4m.js";import"./table-zpHK9BMQ.js";import"./empty-state-DVOe8f0v.js";import"./use-infinite-scroll-DeMwG1OG.js";import"./use-members-ENr1twTa.js";import"./use-org-auth-client-BsOQBY-k.js";import"./task-status-BF84kVgv.js";import"./thread-sheet-body-CPBxYYyX.js";import"./useSuspenseInfiniteQuery-BhqW4802.js";import"./pair-DArsz9tT.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C_aV5_pO.js";import"./types-ZkHG882G.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-CINM0_Ec.js";import"./file-type-icon-BdgYZI0o.js";const Ye={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Ot},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,o=ee(),[i,c]=w.useState(!1),a=Ye[s].icon;let j;e[0]!==a?(j=t.jsx(a,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=j):j=e[1];const d=Ye[s];let m;e[2]!==o||e[3]!==d.labelKey?(m=o(d.labelKey),e[2]=o,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==o||e[11]!==s?(g=mo.map(p=>{const l=Ye[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-muted"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:o(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:o(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=o,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:o,onOverrideChange:i}=r,c=ee(),[a,j]=w.useState(o!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==s||e[9]!==a?(x=a?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:o,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=o,e[7]=c,e[8]=s,e[9]=a,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==a?(g=t.jsx(ct,{checked:a,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=a,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,o=ee(),i=$s(),c=i[0]?.id??null;let a;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(a=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=a):a=e[3];const[j,d]=w.useState(a);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==o?(l=o("automations.automationConfig.connectAiProviderHint"),e[11]=o,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==o?(u=o("automations.automationConfig.pickModelPlaceholder"),e[15]=o,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:gt,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Et},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:gt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:ht,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:ht},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:jt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:jt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:o}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let a;e[2]!==c?(a=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=a):a=e[3];let j;e[4]!==s||e[5]!==o||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:o})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=o,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==a||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[a,j]}),e[9]=a,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=Z.c(17),{value:s,checked:n,onToggle:o,title:i,description:c,leading:a}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==a?(d=a&&t.jsx("span",{className:"mt-px shrink-0",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==o||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:o,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=o,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=Z.c(27),{conn:s,label:n,icon:o,on:i,total:c,onToggle:a}=r,j=ee(),d=i===c;let m;e[0]!==o||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):o?t.jsx(o,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==a?(u=v=>{v.stopPropagation(),a()},e[12]=a,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-[11px] font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:o}=r,i=ee(),{org:c}=$t(),[a,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==o||e[10]!==a||e[11]!==i||e[12]!==n){const q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const E=ws(I._meta)??"__other__",Q=Ds(I.name,E==="__other__"?void 0:E),P=I.title,xe=P&&P!==I.name?P:go(Q);H.has(E)||H.set(E,{clientId:E,conn:q.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],U=n===null?new Set(J):new Set(n),V=J.every(I=>U.has(I)),z=I=>o(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(U);E.has(I)?E.delete(I):E.add(I),z(E)},ne=(I,E)=>{const Q=new Set(U);for(const P of I)E?Q.add(P):Q.delete(P);z(Q)};y=Lt,A=a,v=j;let Y;e[26]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Y):Y=e[26];let ie;e[27]!==V||e[28]!==i?(ie=i(V?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=V,e[28]=i,e[29]=ie):ie=e[29];const ue=!V&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 h-5 px-1.5 text-[11px] tabular-nums",children:[U.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Y,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=V?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:U.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==o?(re=()=>o(null),e[40]=o,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==V||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:V,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=V,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let O;e[49]!==o?(O=()=>o([]),e[49]=o,e[50]=O):O=e[50];const pe=U.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:O,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=O,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const E=I.tools.map(bo),Q=E.filter(P=>U.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:U.has(P.name),onToggle:()=>ae(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const E=I.tools.map(yo),Q=E.filter(P=>U.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:U.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=o,e[10]=a,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]??"1");return a%7===0?`Every ${a/7} weeks`:`Every ${a} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const a=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${a}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return o?{count:parseInt(o[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>Ze.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:o}=ve(),[i,c]=w.useState("in_progress"),[a,j]=w.useState("any"),[d,m]=w.useState([]),x=Ze.filter(l=>l!==i),f=d.filter(l=>l!==i),g=a!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await o.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:a==="statuses"?{kind:a,statuses:f}:{kind:a}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.map(l=>{const{label:y,visual:v}=Be(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:a,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),a==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:Be(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||o.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Po=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const o=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[a,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=a??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(o("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:o("automations.addStarterPopover.failedAddStarter"))}},N=b=>o(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:o("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:o("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:o("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:o("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:o("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:o,onWebhookCreated:i}){const c=ee(),{triggerAdd:a}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await a.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await a.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:a.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),o?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Vt,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{y()},disabled:a.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=Z.c(39),{open:s,onOpenChange:n,url:o,token:i,title:c,description:a}=r,j=c===void 0?"Webhook ready":c,d=a===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":a,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==o?(N=o&&i&&h==="url"?`${o.replace(/\/$/,"")}/${i}`:o??"",e[2]=h,e[3]=i,e[4]=o,e[5]=N):N=e[5];const S=N,b=o&&i?h==="header"?`curl -X POST "${S}" \\
1
+ import{ax as Qt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as Pt,a2 as $t,D as et,q as tt,s as st,v as ot,aK as at,w as nt,t as X,b2 as es,X as ts,T as ss,V as os,as,aq as ns,ar as is,U as Oe,aU as rs,h as Le,y as Ke,aC as ls,b7 as pt,I as xt,b8 as cs,al as ds,aY as Qe,n as Xe,f as ms}from"./index-CRxvFyky.js";import{C as us}from"./index-Cjt1X9AF.js";import{d as it,N as fs,b as ps,a2 as xs,k as gt,as as gs,T as ht,at as hs,h as js,M as Me,au as zt}from"./agent-icon-B4DYmgP1.js";import{n as jt}from"./ShoppingBag01-BnVz66h8.js";import{t as rt}from"./ChevronUp-D_THnL5s.js";import{e as ys}from"./UserSquare-DAAb_r4V.js";import{e as lt,b as Et,t as Ot}from"./Tool01-wA46vRus.js";import{a as bs}from"./Image01-CRdP4rtw.js";import{i as vs}from"./SearchMd-CxgIdVnP.js";import{B as Kt}from"./badge-bIRC2OO-.js";import{C as Ft}from"./checkbox-DQ6m3Oyh.js";import{S as ct}from"./switch-5Er3VYKS.js";import{a as Mt,b as Rt,P as Lt}from"./popover-mVKjwyVk.js";import{a as Cs,e as yt,b as Ns,f as Ss,C as ks,c as Ts}from"./command-BxEu7pvj.js";import{g as ws,s as Ds}from"./tool-namespace-rmKZ6urT.js";import{u as dt}from"./use-connection-Ce_qeKZH.js";import{u as _s}from"./use-mcp-client-BGHP1VQF.js";import{u as Is}from"./use-mcp-tools-CXQACEGE.js";import{I as As}from"./integration-icon-BtvcZQwg.js";import{M as Ps}from"./select-model-DVVnJpL9.js";import{u as $s}from"./use-ai-providers-CqTwdrfZ.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-JetGJgiY.js";import{a as ve,c as Os,d as Ks}from"./use-automations-Bk3k2I5y.js";import{b as Fs,a as Ms,g as Rs,t as Ls}from"./chat-context-DC0y74SR.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-BPnQBVGa.js";import{b as Bs,T as Gs,a as Hs}from"./tooltip-BkpS_52M.js";import{a as Js}from"./shell-layout-CeMKwojV.js";import{i as Ut}from"./ArrowLeft-CDvPBm7p.js";import{i as Xs}from"./ArrowUp-BwLxa8U7.js";import{s as qs}from"./Trash01-B-NKlbYg.js";import{s as mt}from"./XClose-CzyFIqLD.js";import{u as bt}from"./use-debounced-autosave-C0ZrLAg3.js";import{T as Ys,a as Qs}from"./input-_QjthN9W.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-BUWT5EUx.js";import{s as to}from"./Plus-C98eLxdY.js";import{i as ut}from"./ZoomOut-DlauVCp0.js";import{l as Be,H as so}from"./config-DVayKjbP.js";import{C as oo}from"./task-board-hSuUNaaL.js";import{M as Wt}from"./multi-select-Ni9kskM1.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-bn_n-Gzr.js";import{b as ao,a as no,T as vt}from"./tabs-DCVl1Xp_.js";import{a as qe}from"./Copy01-BgUme99A.js";import{M as io}from"./monaco-editor-C2gO_CON.js";import{A as Ct,a as Nt,b as St,c as kt,g as Tt,d as wt,e as Dt,f as _t}from"./alert-dialog-B9F5DKY-.js";import{A as ro}from"./automation-runs-5zyjNSmx.js";import{C as lo}from"./collection-tabs-D8Yzl__1.js";import{a as co}from"./use-panel-navigate-BGy1YPzc.js";import"./use-mobile-90klfWtr.js";import"./thread-button-DkQ8x3QA.js";import"./use-chat-layout-state-tSM0Jizm.js";import"./use-file-configs-DgY4Z1tX.js";import"./use-organization-settings-ZA_4CNmo.js";import"./schema-ChrkqfAY.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-zQyfl2AT.js";import"./thread-route-DFcB1-xE.js";import"./thread-intent-C0VUjVSW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg-aHWP0.js";import"./slugify-CEUa2lfQ.js";import"./sheet-FuQrUGRX.js";import"./toolbar-icon-button-BXIVPBnN.js";import"./resizable-DwzY5Qay.js";import"./icon-button-BzP67FLk.js";import"./use-project-scope-BWYheFWK.js";import"./AlertCircle-Dlc4TAni.js";import"./LinkBroken01-QWocyozH.js";import"./Building02-CR5isnNx.js";import"./CheckCircle-C6r2HC-Z.js";import"./ChevronSelectorVertical-Bp4xRFxb.js";import"./CreditCard01-zjoJQKXP.js";import"./DotsVertical-cl0_7TJQ.js";import"./Globe04-CE10Q1IP.js";import"./SwitchHorizontal01-CzPKETS5.js";import"./Key01-DZe6ClyY.js";import"./Link01-OFk1WR7A.js";import"./Monitor01-CbPw11a8.js";import"./Sun-CChCwIaO.js";import"./Play-BCeqHm1l.js";import"./Upload01-5dq0ljk0.js";import"./User01-CT29Ne_2.js";import"./Users01-BoSWrp-z.js";import"./index-Djra7CLF.js";import"./auth-B0nPj6bO.js";import"./drawer-Czv6sKYA.js";import"./index-BypQd0-J.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DDLKm8YT.js";import"./autosend-BbVWxP-H.js";import"./use-decopilot-events-B8FghSGH.js";import"./use-chat-navigation-DRlGBXxg.js";import"./location-BjlyegC2.js";import"./index-Ucsyl0WT.js";import"./use-clock-tick-BBBJErXL.js";import"./project-icon-n8KMRQ3Z.js";import"./new-project-dialog-qQiy9MD9.js";import"./label-Mh3XNAnQ.js";import"./repository-import-picker-BjTbZx13.js";import"./use-navigate-to-agent-B6pFs8ZG.js";import"./repository-picker-BzWXVivD.js";import"./useInfiniteQuery-wHLzuDuh.js";import"./infiniteQueryObserver-DbF1ByiF.js";import"./collection-search-rIwiQou4.js";import"./use-debounced-value-CqzArAe1.js";import"./required-auth-layout-CncnEGXc.js";import"./use-org-sso-CtvQdcBM.js";import"./suggestion-DgKlvExo.js";import"./usage-stats-B9McGmou.js";import"./form-DUIO9IEt.js";import"./utils-CVEq3hMx.js";import"./markdown-CY21D23B.js";import"./use-copy-BpOtbx4U.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-ZKBtP7OQ.js";import"./use-org-fs-B_rDABnu.js";import"./core.esm-DVn3rbKw.js";import"./index-BdQq_4o_.js";import"./editor-Bf6PL4ub.js";import"./table-ufn_70fj.js";import"./empty-state-l0-UYN2l.js";import"./use-infinite-scroll-BV3nru2V.js";import"./use-members-BQX1TQ2_.js";import"./use-org-auth-client-D-6ysaay.js";import"./task-status-BPKMFkfO.js";import"./thread-sheet-body-DADTw5P3.js";import"./useSuspenseInfiniteQuery-C_Rnzsp0.js";import"./pair-DEx1k_Wy.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BrkYMcu3.js";import"./types-BdfekBKI.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DMPWLzEw.js";import"./file-type-icon-C3tGnF-n.js";const Ye={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Ot},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,o=ee(),[i,c]=w.useState(!1),a=Ye[s].icon;let j;e[0]!==a?(j=t.jsx(a,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=j):j=e[1];const d=Ye[s];let m;e[2]!==o||e[3]!==d.labelKey?(m=o(d.labelKey),e[2]=o,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==o||e[11]!==s?(g=mo.map(p=>{const l=Ye[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-muted"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:o(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:o(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=o,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:o,onOverrideChange:i}=r,c=ee(),[a,j]=w.useState(o!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==s||e[9]!==a?(x=a?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:o,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=o,e[7]=c,e[8]=s,e[9]=a,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==a?(g=t.jsx(ct,{checked:a,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=a,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,o=ee(),i=$s(),c=i[0]?.id??null;let a;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(a=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=a):a=e[3];const[j,d]=w.useState(a);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==o?(l=o("automations.automationConfig.connectAiProviderHint"),e[11]=o,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==o?(u=o("automations.automationConfig.pickModelPlaceholder"),e[15]=o,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:gt,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Et},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:gt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:ht,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:ht},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:jt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:jt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:o}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let a;e[2]!==c?(a=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=a):a=e[3];let j;e[4]!==s||e[5]!==o||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:o})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=o,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==a||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[a,j]}),e[9]=a,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=Z.c(17),{value:s,checked:n,onToggle:o,title:i,description:c,leading:a}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==a?(d=a&&t.jsx("span",{className:"mt-px shrink-0",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==o||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:o,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=o,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=Z.c(27),{conn:s,label:n,icon:o,on:i,total:c,onToggle:a}=r,j=ee(),d=i===c;let m;e[0]!==o||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):o?t.jsx(o,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==a?(u=v=>{v.stopPropagation(),a()},e[12]=a,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-[11px] font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:o}=r,i=ee(),{org:c}=$t(),[a,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==o||e[10]!==a||e[11]!==i||e[12]!==n){const q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const E=ws(I._meta)??"__other__",Q=Ds(I.name,E==="__other__"?void 0:E),P=I.title,xe=P&&P!==I.name?P:go(Q);H.has(E)||H.set(E,{clientId:E,conn:q.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],U=n===null?new Set(J):new Set(n),V=J.every(I=>U.has(I)),z=I=>o(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(U);E.has(I)?E.delete(I):E.add(I),z(E)},ne=(I,E)=>{const Q=new Set(U);for(const P of I)E?Q.add(P):Q.delete(P);z(Q)};y=Lt,A=a,v=j;let Y;e[26]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Y):Y=e[26];let ie;e[27]!==V||e[28]!==i?(ie=i(V?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=V,e[28]=i,e[29]=ie):ie=e[29];const ue=!V&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 h-5 px-1.5 text-[11px] tabular-nums",children:[U.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Y,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=V?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:U.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==o?(re=()=>o(null),e[40]=o,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==V||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:V,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=V,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let O;e[49]!==o?(O=()=>o([]),e[49]=o,e[50]=O):O=e[50];const pe=U.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:O,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=O,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const E=I.tools.map(bo),Q=E.filter(P=>U.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:U.has(P.name),onToggle:()=>ae(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const E=I.tools.map(yo),Q=E.filter(P=>U.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:U.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=o,e[10]=a,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]??"1");return a%7===0?`Every ${a/7} weeks`:`Every ${a} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const a=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${a}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return o?{count:parseInt(o[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>Ze.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:o}=ve(),[i,c]=w.useState("in_progress"),[a,j]=w.useState("any"),[d,m]=w.useState([]),x=Ze.filter(l=>l!==i),f=d.filter(l=>l!==i),g=a!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await o.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:a==="statuses"?{kind:a,statuses:f}:{kind:a}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.map(l=>{const{label:y,visual:v}=Be(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:a,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),a==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:Be(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||o.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Po=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const o=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[a,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=a??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(o("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:o("automations.addStarterPopover.failedAddStarter"))}},N=b=>o(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:o("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:o("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:o("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:o("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:o("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:o,onWebhookCreated:i}){const c=ee(),{triggerAdd:a}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await a.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await a.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:a.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),o?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Vt,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{y()},disabled:a.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=Z.c(39),{open:s,onOpenChange:n,url:o,token:i,title:c,description:a}=r,j=c===void 0?"Webhook ready":c,d=a===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":a,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==o?(N=o&&i&&h==="url"?`${o.replace(/\/$/,"")}/${i}`:o??"",e[2]=h,e[3]=i,e[4]=o,e[5]=N):N=e[5];const S=N,b=o&&i?h==="header"?`curl -X POST "${S}" \\
2
2
  -H "Authorization: Bearer ${i}" \\
3
3
  -H "Content-Type: application/json" \\
4
4
  -d '{"hello":"world"}'`:`curl -X POST "${S}" \\
@@ -16,5 +16,5 @@ import{ax as Qt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as Pt,a2 as $t,D as et
16
16
  "Content-Type": "application/json",
17
17
  },
18
18
  body: JSON.stringify({ hello: "world" }),
19
- });`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let A;e[10]!==_||e[11]!==k?(A=t.jsxs(st,{children:[_,k]}),e[10]=_,e[11]=k,e[12]=A):A=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==o?($=o&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(qe,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(qe,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(vt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(vt,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(qe,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(io,{code:D,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=o,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let q;e[31]!==F||e[32]!==A||e[33]!==$?(q=t.jsxs(tt,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=q):q=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==q?(H=t.jsx(et,{open:s,onOpenChange:n,children:q}),e[35]=n,e[36]=s,e[37]=q,e[38]=H):H=e[38],H}function Xt(r){const e=Z.c(150),{trigger:s,automationId:n,connectionName:o,readOnly:i}=r,c=i===void 0?!1:i,a=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?To(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==a||e[3]!==s.type?(R=s.type==="board_pr_ready"?a("automations.triggerCard.prReady"):s.type==="linked_chat_run"?a("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?a("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?a("automations.triggerCard.chatPrOpened"):null,e[2]=a,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let q;e[5]!==n||e[6]!==d||e[7]!==a||e[8]!==s.id?(q=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(a("automations.triggerCard.starterRemoved"))}catch{X.error(a("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=a,e[8]=s.id,e[9]=q):q=e[9];const H=q;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=async L=>{await j.mutateAsync({automation_id:n,type:"cron",cron_expression:L}),await d.mutateAsync({trigger_id:s.id,automation_id:n})},e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==a||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=a,e[18]=s.cron_expression,e[19]=J):J=e[19];const U=J;let V;e[20]!==n||e[21]!==m||e[22]!==s.id?(V=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch(L){const We=L,Fe=We instanceof Error?We.message:"Failed to rotate token";X.error(Fe)}},e[20]=n,e[21]=m,e[22]=s.id,e[23]=V):V=e[23];const z=V;let ae;e[24]!==y||e[25]!==G||e[26]!==a||e[27]!==s.cron_expression?(ae=async L=>{if(!y)return;const We=y.unit==="minutes"?5:1,Fe=Math.max(We,L);Fe!==L&&N(Fe);const ft=ko(Fe,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[24]=y,e[25]=G,e[26]=a,e[27]=s.cron_expression,e[28]=ae):ae=e[28];const ne=ae;let Y;e[29]!==$||e[30]!==k||e[31]!==F||e[32]!==A||e[33]!==K?(Y=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Vt,{size:14,className:"shrink-0"}):$||K?t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}):A?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[29]=$,e[30]=k,e[31]=F,e[32]=A,e[33]=K,e[34]=Y):Y=e[34];let ie;e[35]!==o||e[36]!==v||e[37]!==T||e[38]!==ne||e[39]!==U||e[40]!==y||e[41]!==$||e[42]!==k||e[43]!==S||e[44]!==F||e[45]!==_||e[46]!==A||e[47]!==K||e[48]!==a||e[49]!==s.column_key||e[50]!==s.cron_expression||e[51]!==s.event_type||e[52]!==s.from||e[53]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:U,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?So(s.cron_expression??""):$?a("automations.triggerCard.cardEntersColumn",{lane:Be(s.column_key??"",a).label}):K||(F?a("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?a("automations.triggerCard.webhookPostToFire"):`${s.event_type}${o?` · ${o}`:""}`)}),$&&t.jsx(Oo,{from:s.from}),F&&t.jsx(Ko,{from:s.from}),!k&&!A&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Eo).join(", ")})]}),e[35]=o,e[36]=v,e[37]=T,e[38]=ne,e[39]=U,e[40]=y,e[41]=$,e[42]=k,e[43]=S,e[44]=F,e[45]=_,e[46]=A,e[47]=K,e[48]=a,e[49]=s.column_key,e[50]=s.cron_expression,e[51]=s.event_type,e[52]=s.from,e[53]=s.params,e[54]=ie):ie=e[54];let ue;e[55]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[55]=_,e[56]=ue):ue=e[56];let me;e[57]!==y||e[58]!==k||e[59]!==S||e[60]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(Et,{size:13,className:"text-muted-foreground"})}),e[57]=y,e[58]=k,e[59]=S,e[60]=s.cron_expression,e[61]=me):me=e[61];let te;e[62]!==A||e[63]!==a?(te=A&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:a("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[62]=A,e[63]=a,e[64]=te):te=e[64];let fe;e[65]!==c?(fe=!c&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[65]=c,e[66]=fe):fe=e[66];let se;e[67]!==ue||e[68]!==me||e[69]!==te||e[70]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[67]=ue,e[68]=me,e[69]=te,e[70]=fe,e[71]=se):se=e[71];let re;e[72]!==ie||e[73]!==se||e[74]!==Y?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[Y,ie,se]}),e[72]=ie,e[73]=se,e[74]=Y,e[75]=re):re=e[75];let le;e[76]!==a?(le=a("automations.triggerCard.removeStarter"),e[76]=a,e[77]=le):le=e[77];let C;e[78]!==le?(C=t.jsx(Ct,{children:le}),e[78]=le,e[79]=C):C=e[79];let M;e[80]!==a?(M=a("automations.triggerCard.confirmRemoveStarter"),e[80]=a,e[81]=M):M=e[81];let O;e[82]!==M?(O=t.jsx(Nt,{children:M}),e[82]=M,e[83]=O):O=e[83];let pe;e[84]!==C||e[85]!==O?(pe=t.jsxs(St,{children:[C,O]}),e[84]=C,e[85]=O,e[86]=pe):pe=e[86];let oe;e[87]!==a?(oe=a("automations.triggerCard.cancel"),e[87]=a,e[88]=oe):oe=e[88];let ce;e[89]!==oe?(ce=t.jsx(kt,{children:oe}),e[89]=oe,e[90]=ce):ce=e[90];let de;e[91]!==a?(de=a("automations.triggerCard.remove"),e[91]=a,e[92]=de):de=e[92];let I;e[93]!==H||e[94]!==de?(I=t.jsx(Tt,{onClick:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:de}),e[93]=H,e[94]=de,e[95]=I):I=e[95];let E;e[96]!==ce||e[97]!==I?(E=t.jsxs(wt,{children:[ce,I]}),e[96]=ce,e[97]=I,e[98]=E):E=e[98];let Q;e[99]!==pe||e[100]!==E?(Q=t.jsxs(Dt,{children:[pe,E]}),e[99]=pe,e[100]=E,e[101]=Q):Q=e[101];let P;e[102]!==x||e[103]!==Q?(P=t.jsx(_t,{open:x,onOpenChange:f,children:Q}),e[102]=x,e[103]=Q,e[104]=P):P=e[104];let xe;e[105]!==a?(xe=a("automations.triggerCard.rotateWebhookToken"),e[105]=a,e[106]=xe):xe=e[106];let Ce;e[107]!==xe?(Ce=t.jsx(Ct,{children:xe}),e[107]=xe,e[108]=Ce):Ce=e[108];let Ne;e[109]!==a?(Ne=a("automations.triggerCard.rotateWebhookTokenDescription"),e[109]=a,e[110]=Ne):Ne=e[110];let Se;e[111]!==Ne?(Se=t.jsx(Nt,{children:Ne}),e[111]=Ne,e[112]=Se):Se=e[112];let ke;e[113]!==Ce||e[114]!==Se?(ke=t.jsxs(St,{children:[Ce,Se]}),e[113]=Ce,e[114]=Se,e[115]=ke):ke=e[115];let Te;e[116]!==a?(Te=a("automations.triggerCard.cancel"),e[116]=a,e[117]=Te):Te=e[117];let we;e[118]!==Te?(we=t.jsx(kt,{children:Te}),e[118]=Te,e[119]=we):we=e[119];let De;e[120]!==a?(De=a("automations.triggerCard.rotate"),e[120]=a,e[121]=De):De=e[121];let _e;e[122]!==z||e[123]!==De?(_e=t.jsx(Tt,{onClick:z,children:De}),e[122]=z,e[123]=De,e[124]=_e):_e=e[124];let Ie;e[125]!==we||e[126]!==_e?(Ie=t.jsxs(wt,{children:[we,_e]}),e[125]=we,e[126]=_e,e[127]=Ie):Ie=e[127];let Ae;e[128]!==ke||e[129]!==Ie?(Ae=t.jsxs(Dt,{children:[ke,Ie]}),e[128]=ke,e[129]=Ie,e[130]=Ae):Ae=e[130];let Pe;e[131]!==g||e[132]!==Ae?(Pe=t.jsx(_t,{open:g,onOpenChange:u,children:Ae}),e[131]=g,e[132]=Ae,e[133]=Pe):Pe=e[133];const Ge=h!==null;let Ue;e[134]===Symbol.for("react.memo_cache_sentinel")?(Ue=L=>{L||p(null)},e[134]=Ue):Ue=e[134];const He=h?.url??null,Je=h?.token??null;let $e;e[135]!==a?($e=a("automations.triggerCard.newWebhookToken"),e[135]=a,e[136]=$e):$e=e[136];let ze;e[137]!==a?(ze=a("automations.triggerCard.newWebhookTokenDescription"),e[137]=a,e[138]=ze):ze=e[138];let Ee;e[139]!==Ge||e[140]!==He||e[141]!==Je||e[142]!==$e||e[143]!==ze?(Ee=t.jsx(Jt,{open:Ge,onOpenChange:Ue,url:He,token:Je,title:$e,description:ze}),e[139]=Ge,e[140]=He,e[141]=Je,e[142]=$e,e[143]=ze,e[144]=Ee):Ee=e[144];let Ve;return e[145]!==re||e[146]!==P||e[147]!==Pe||e[148]!==Ee?(Ve=t.jsxs(t.Fragment,{children:[re,P,Pe,Ee]}),e[145]=re,e[146]=P,e[147]=Pe,e[148]=Ee,e[149]=Ve):Ve=e[149],Ve}function Eo(r){const[e,s]=r;return`${e}: ${s}`}function Oo(r){const e=Z.c(10),{from:s}=r,n=ee();let o;e[0]!==s||e[1]!==n?(o=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>Be(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=o):o=e[2];const i=o;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==i||e[6]!==c?(a=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=a):a=e[7];const j=a.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Ko(r){const e=Z.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let o;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(o=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==o?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:o}),e[4]=o,e[5]=i):i=e[5],i}function Fo(r){const e=Z.c(70),{automationId:s,onDone:n}=r,o=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[a,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Os(a);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==a||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==o||e[10]!==c||e[11]!==h){const _=h?.find(V=>V.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==a||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==o?(k=async()=>{if(!(!a||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:a,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:a,event_type:d}),X.success(o("automations.eventTriggerForm.successAdded")),n()}catch{X.error(o("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=a,e[21]=d,e[22]=n,e[23]=f,e[24]=o,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 rounded-lg border border-border bg-background";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=A):A=e[26];let $;e[27]!==o?($=o("automations.eventTriggerForm.title"),e[27]=o,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[A,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const q=a??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=V=>{j(V),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==o?(W=o("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=o,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==o||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:o("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Lo),e[42]=o,e[43]=c,e[44]=J):J=e[44];let U;e[45]!==J?(U=t.jsx(ye,{children:J}),e[45]=J,e[46]=U):U=e[46],e[47]!==q||e[48]!==G||e[49]!==U?(N=t.jsxs(ge,{value:q,onValueChange:H,children:[G,U]}),e[47]=q,e[48]=G,e[49]=U,e[50]=N):N=e[50],e[51]!==a||e[52]!==d||e[53]!==p||e[54]!==o||e[55]!==h?(S=a&&t.jsxs(ge,{value:d??"",onValueChange:V=>{m(V),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),o("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??o("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Ro)})]}),e[51]=a,e[52]=d,e[53]=p,e[54]=o,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(V=>{const[z,ae]=V;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[z,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[z]??"",onValueChange:ne=>g(Y=>({...Y,[z]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectParamPlaceholder",{key:z})})}),t.jsx(ye,{children:ae.enum.map(Mo)})]}):t.jsx("input",{type:"text",value:f[z]??"",onChange:ne=>g(Y=>({...Y,[z]:ne.target.value})),placeholder:ae.description??z,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-ring"})]},z)})}),e[2]=u,e[3]=s,e[4]=a,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=o,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==a||e[59]!==d||e[60]!==l||e[61]!==o?(T=a&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):o("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=a,e[59]=d,e[60]=l,e[61]=o,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=D):D=e[69],D}function Mo(r){return t.jsx(be,{value:r,children:r},r)}function Ro(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function Lo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Vo(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const o of e.fields)n.add(o);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Wo({automationId:r,automation:e,onBack:s,onDelete:n}){const o=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:a,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[D,_]=w.useState(""),[k,A]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[q,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(O=>O.type==="text").map(O=>O.text).join(`
19
+ });`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let A;e[10]!==_||e[11]!==k?(A=t.jsxs(st,{children:[_,k]}),e[10]=_,e[11]=k,e[12]=A):A=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==o?($=o&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(qe,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(qe,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(vt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(vt,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(qe,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(io,{code:D,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=o,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let q;e[31]!==F||e[32]!==A||e[33]!==$?(q=t.jsxs(tt,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=q):q=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==q?(H=t.jsx(et,{open:s,onOpenChange:n,children:q}),e[35]=n,e[36]=s,e[37]=q,e[38]=H):H=e[38],H}function Xt(r){const e=Z.c(152),{trigger:s,automationId:n,connectionName:o,readOnly:i}=r,c=i===void 0?!1:i,a=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?To(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==a||e[3]!==s.type?(R=s.type==="board_pr_ready"?a("automations.triggerCard.prReady"):s.type==="linked_chat_run"?a("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?a("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?a("automations.triggerCard.chatPrOpened"):null,e[2]=a,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let q;e[5]!==n||e[6]!==d||e[7]!==a||e[8]!==s.id?(q=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(a("automations.triggerCard.starterRemoved"))}catch{X.error(a("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=a,e[8]=s.id,e[9]=q):q=e[9];const H=q;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=async L=>{await j.mutateAsync({automation_id:n,type:"cron",cron_expression:L}),await d.mutateAsync({trigger_id:s.id,automation_id:n})},e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==a||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=a,e[18]=s.cron_expression,e[19]=J):J=e[19];const U=J;let V;e[20]!==n||e[21]!==m||e[22]!==s.id?(V=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch(L){const We=L,Fe=We instanceof Error?We.message:"Failed to rotate token";X.error(Fe)}},e[20]=n,e[21]=m,e[22]=s.id,e[23]=V):V=e[23];const z=V;let ae;e[24]!==y||e[25]!==G||e[26]!==a||e[27]!==s.cron_expression?(ae=async L=>{if(!y)return;const We=y.unit==="minutes"?5:1,Fe=Math.max(We,L);Fe!==L&&N(Fe);const ft=ko(Fe,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[24]=y,e[25]=G,e[26]=a,e[27]=s.cron_expression,e[28]=ae):ae=e[28];const ne=ae;let Y;e[29]!==$||e[30]!==k||e[31]!==F||e[32]!==A||e[33]!==K?(Y=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Vt,{size:14,className:"shrink-0"}):$||K?t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}):A?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[29]=$,e[30]=k,e[31]=F,e[32]=A,e[33]=K,e[34]=Y):Y=e[34];let ie;e[35]!==o||e[36]!==v||e[37]!==T||e[38]!==ne||e[39]!==U||e[40]!==y||e[41]!==$||e[42]!==k||e[43]!==S||e[44]!==F||e[45]!==_||e[46]!==A||e[47]!==K||e[48]!==a||e[49]!==s.column_key||e[50]!==s.cron_expression||e[51]!==s.event_type||e[52]!==s.from||e[53]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:U,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?So(s.cron_expression??""):$?a("automations.triggerCard.cardEntersColumn",{lane:Be(s.column_key??"",a).label}):K||(F?a("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?a("automations.triggerCard.webhookPostToFire"):`${s.event_type}${o?` · ${o}`:""}`)}),$&&t.jsx(Oo,{from:s.from}),F&&t.jsx(Ko,{from:s.from}),!k&&!A&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Eo).join(", ")})]}),e[35]=o,e[36]=v,e[37]=T,e[38]=ne,e[39]=U,e[40]=y,e[41]=$,e[42]=k,e[43]=S,e[44]=F,e[45]=_,e[46]=A,e[47]=K,e[48]=a,e[49]=s.column_key,e[50]=s.cron_expression,e[51]=s.event_type,e[52]=s.from,e[53]=s.params,e[54]=ie):ie=e[54];let ue;e[55]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[55]=_,e[56]=ue):ue=e[56];let me;e[57]!==y||e[58]!==k||e[59]!==S||e[60]!==a||e[61]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.editSchedule"),onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(Et,{size:13,className:"text-muted-foreground"})}),e[57]=y,e[58]=k,e[59]=S,e[60]=a,e[61]=s.cron_expression,e[62]=me):me=e[62];let te;e[63]!==A||e[64]!==a?(te=A&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:a("automations.triggerCard.rotateToken"),"aria-label":a("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[63]=A,e[64]=a,e[65]=te):te=e[65];let fe;e[66]!==c||e[67]!==a?(fe=!c&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[66]=c,e[67]=a,e[68]=fe):fe=e[68];let se;e[69]!==ue||e[70]!==me||e[71]!==te||e[72]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[69]=ue,e[70]=me,e[71]=te,e[72]=fe,e[73]=se):se=e[73];let re;e[74]!==ie||e[75]!==se||e[76]!==Y?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[Y,ie,se]}),e[74]=ie,e[75]=se,e[76]=Y,e[77]=re):re=e[77];let le;e[78]!==a?(le=a("automations.triggerCard.removeStarter"),e[78]=a,e[79]=le):le=e[79];let C;e[80]!==le?(C=t.jsx(Ct,{children:le}),e[80]=le,e[81]=C):C=e[81];let M;e[82]!==a?(M=a("automations.triggerCard.confirmRemoveStarter"),e[82]=a,e[83]=M):M=e[83];let O;e[84]!==M?(O=t.jsx(Nt,{children:M}),e[84]=M,e[85]=O):O=e[85];let pe;e[86]!==C||e[87]!==O?(pe=t.jsxs(St,{children:[C,O]}),e[86]=C,e[87]=O,e[88]=pe):pe=e[88];let oe;e[89]!==a?(oe=a("automations.triggerCard.cancel"),e[89]=a,e[90]=oe):oe=e[90];let ce;e[91]!==oe?(ce=t.jsx(kt,{children:oe}),e[91]=oe,e[92]=ce):ce=e[92];let de;e[93]!==a?(de=a("automations.triggerCard.remove"),e[93]=a,e[94]=de):de=e[94];let I;e[95]!==H||e[96]!==de?(I=t.jsx(Tt,{onClick:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:de}),e[95]=H,e[96]=de,e[97]=I):I=e[97];let E;e[98]!==ce||e[99]!==I?(E=t.jsxs(wt,{children:[ce,I]}),e[98]=ce,e[99]=I,e[100]=E):E=e[100];let Q;e[101]!==pe||e[102]!==E?(Q=t.jsxs(Dt,{children:[pe,E]}),e[101]=pe,e[102]=E,e[103]=Q):Q=e[103];let P;e[104]!==x||e[105]!==Q?(P=t.jsx(_t,{open:x,onOpenChange:f,children:Q}),e[104]=x,e[105]=Q,e[106]=P):P=e[106];let xe;e[107]!==a?(xe=a("automations.triggerCard.rotateWebhookToken"),e[107]=a,e[108]=xe):xe=e[108];let Ce;e[109]!==xe?(Ce=t.jsx(Ct,{children:xe}),e[109]=xe,e[110]=Ce):Ce=e[110];let Ne;e[111]!==a?(Ne=a("automations.triggerCard.rotateWebhookTokenDescription"),e[111]=a,e[112]=Ne):Ne=e[112];let Se;e[113]!==Ne?(Se=t.jsx(Nt,{children:Ne}),e[113]=Ne,e[114]=Se):Se=e[114];let ke;e[115]!==Ce||e[116]!==Se?(ke=t.jsxs(St,{children:[Ce,Se]}),e[115]=Ce,e[116]=Se,e[117]=ke):ke=e[117];let Te;e[118]!==a?(Te=a("automations.triggerCard.cancel"),e[118]=a,e[119]=Te):Te=e[119];let we;e[120]!==Te?(we=t.jsx(kt,{children:Te}),e[120]=Te,e[121]=we):we=e[121];let De;e[122]!==a?(De=a("automations.triggerCard.rotate"),e[122]=a,e[123]=De):De=e[123];let _e;e[124]!==z||e[125]!==De?(_e=t.jsx(Tt,{onClick:z,children:De}),e[124]=z,e[125]=De,e[126]=_e):_e=e[126];let Ie;e[127]!==we||e[128]!==_e?(Ie=t.jsxs(wt,{children:[we,_e]}),e[127]=we,e[128]=_e,e[129]=Ie):Ie=e[129];let Ae;e[130]!==ke||e[131]!==Ie?(Ae=t.jsxs(Dt,{children:[ke,Ie]}),e[130]=ke,e[131]=Ie,e[132]=Ae):Ae=e[132];let Pe;e[133]!==g||e[134]!==Ae?(Pe=t.jsx(_t,{open:g,onOpenChange:u,children:Ae}),e[133]=g,e[134]=Ae,e[135]=Pe):Pe=e[135];const Ge=h!==null;let Ue;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ue=L=>{L||p(null)},e[136]=Ue):Ue=e[136];const He=h?.url??null,Je=h?.token??null;let $e;e[137]!==a?($e=a("automations.triggerCard.newWebhookToken"),e[137]=a,e[138]=$e):$e=e[138];let ze;e[139]!==a?(ze=a("automations.triggerCard.newWebhookTokenDescription"),e[139]=a,e[140]=ze):ze=e[140];let Ee;e[141]!==Ge||e[142]!==He||e[143]!==Je||e[144]!==$e||e[145]!==ze?(Ee=t.jsx(Jt,{open:Ge,onOpenChange:Ue,url:He,token:Je,title:$e,description:ze}),e[141]=Ge,e[142]=He,e[143]=Je,e[144]=$e,e[145]=ze,e[146]=Ee):Ee=e[146];let Ve;return e[147]!==re||e[148]!==P||e[149]!==Pe||e[150]!==Ee?(Ve=t.jsxs(t.Fragment,{children:[re,P,Pe,Ee]}),e[147]=re,e[148]=P,e[149]=Pe,e[150]=Ee,e[151]=Ve):Ve=e[151],Ve}function Eo(r){const[e,s]=r;return`${e}: ${s}`}function Oo(r){const e=Z.c(10),{from:s}=r,n=ee();let o;e[0]!==s||e[1]!==n?(o=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>Be(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=o):o=e[2];const i=o;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==i||e[6]!==c?(a=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=a):a=e[7];const j=a.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Ko(r){const e=Z.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let o;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(o=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==o?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:o}),e[4]=o,e[5]=i):i=e[5],i}function Fo(r){const e=Z.c(70),{automationId:s,onDone:n}=r,o=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[a,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Os(a);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==a||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==o||e[10]!==c||e[11]!==h){const _=h?.find(V=>V.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==a||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==o?(k=async()=>{if(!(!a||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:a,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:a,event_type:d}),X.success(o("automations.eventTriggerForm.successAdded")),n()}catch{X.error(o("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=a,e[21]=d,e[22]=n,e[23]=f,e[24]=o,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 rounded-lg border border-border bg-background";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=A):A=e[26];let $;e[27]!==o?($=o("automations.eventTriggerForm.title"),e[27]=o,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[A,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const q=a??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=V=>{j(V),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==o?(W=o("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=o,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==o||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:o("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Lo),e[42]=o,e[43]=c,e[44]=J):J=e[44];let U;e[45]!==J?(U=t.jsx(ye,{children:J}),e[45]=J,e[46]=U):U=e[46],e[47]!==q||e[48]!==G||e[49]!==U?(N=t.jsxs(ge,{value:q,onValueChange:H,children:[G,U]}),e[47]=q,e[48]=G,e[49]=U,e[50]=N):N=e[50],e[51]!==a||e[52]!==d||e[53]!==p||e[54]!==o||e[55]!==h?(S=a&&t.jsxs(ge,{value:d??"",onValueChange:V=>{m(V),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),o("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??o("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Ro)})]}),e[51]=a,e[52]=d,e[53]=p,e[54]=o,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(V=>{const[z,ae]=V;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[z,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[z]??"",onValueChange:ne=>g(Y=>({...Y,[z]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectParamPlaceholder",{key:z})})}),t.jsx(ye,{children:ae.enum.map(Mo)})]}):t.jsx("input",{type:"text",value:f[z]??"",onChange:ne=>g(Y=>({...Y,[z]:ne.target.value})),placeholder:ae.description??z,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-ring"})]},z)})}),e[2]=u,e[3]=s,e[4]=a,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=o,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==a||e[59]!==d||e[60]!==l||e[61]!==o?(T=a&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):o("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=a,e[59]=d,e[60]=l,e[61]=o,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=D):D=e[69],D}function Mo(r){return t.jsx(be,{value:r,children:r},r)}function Ro(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function Lo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Vo(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const o of e.fields)n.add(o);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Wo({automationId:r,automation:e,onBack:s,onDelete:n}){const o=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:a,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[D,_]=w.useState(""),[k,A]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[q,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(O=>O.type==="text").map(O=>O.text).join(`
20
20
  `);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:Es({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},U=e.models?.tier??"smart",V=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,z=ls({defaultValues:{name:e.name,active:e.active,tier:U,modelOverride:V,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=z.watch("active"),[ne,Y]=w.useReducer(Vo,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Y({type:"reset"}))},ue=async()=>{const C=z.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const O=z.getValues(),pe=z.control._defaultValues;z.reset(O,{keepValues:!0});const oe=W;G(!1);const ce={tier:O.tier,...O.modelOverride?{modelId:O.modelOverride.modelId,credentialId:O.modelOverride.credentialId,modelTitle:O.modelOverride.title}:{}},de={id:r,name:O.name,active:O.active,models:ce,tools:O.tools,maxAgentSteps:O.maxAgentSteps,messages:Ls(p),temperature:0};try{await a.mutateAsync(de)}catch{return z.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Y({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=bt({save:ue}),{schedule:fe,flush:se}=bt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=z.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!q){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(o("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Ut,{size:14}),o("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(pt,{control:z.control,name:"name",render:({field:C})=>t.jsx(xt,{...C,placeholder:o("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:n,children:t.jsx(qs,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pt,{control:z.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(zs,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.starter")}),t.jsx(zo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),A(!1),_("")},onEventSelect:()=>{A(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[o("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:o("automations.automationDetail.addStarter")})," ",o("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(o("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(o("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),_("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Fo,{automationId:r,onDone:()=>A(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 text-xs",disabled:K||!p,onClick:J,children:[t.jsx(Ot,{size:13}),o("automations.automationDetail.improve")]})]}),t.jsx(Ys,{tiptapDoc:p,setTiptapDoc:re,placeholder:o("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Qs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"h-8 gap-1.5 px-3 text-sm font-medium",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),o("automations.automationDetail.test")]})}),t.jsx(Hs,{children:o("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Us,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Vs,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(fo,{tier:z.watch("tier"),onTierChange:C=>z.setValue("tier",C,{shouldDirty:!0}),override:z.watch("modelOverride"),onOverrideChange:C=>z.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:z.watch("tools"),onChange:C=>z.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.maxSteps")}),t.jsx(xt,{type:"number",min:1,max:100,className:"w-40",placeholder:o("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:z.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),O=M===""?null:Number(M);z.setValue("maxAgentSteps",O===null||Number.isNaN(O)?null:O,{shouldDirty:!0})}})]})]})]})]})]})}function Bo(r){const e=Z.c(55),{automation:s}=r,n=ee(),{update:o}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let a;e[4]!==c?(a=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=a):a=e[5];let j;e[6]!==i||e[7]!==a?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,a]}),e[6]=i,e[7]=a,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==o?(d=_=>o.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=o,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==o.isPending?(m=t.jsx(ct,{checked:s.active,disabled:o.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=o.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const qt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Yt(r){const e=qt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Go(r){const e=Z.c(16),{automationId:s,triggerIds:n}=r,o=ee(),[i,c]=w.useState("30d"),[a,j]=w.useState(Ho);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Yt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==o?(x=qt.map(p=>t.jsx(be,{value:p.key,children:o(p.labelKey)},p.key)),e[2]=o,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==a||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:a}),e[9]=s,e[10]=a,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Ho(){return Yt("30d")}function Jo(r){const e=Z.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const o=n;if(!o)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qe,{}),e[2]=i):i=e[2];let c;return e[3]!==o.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Xo,{id:o.id})}),e[3]=o.id,e[4]=c):c=e[4],c}function Xo(r){const e=Z.c(41),{id:s}=r,n=ee(),{openPanel:o}=co(),{data:i,isLoading:c}=Ks(s),[a,j]=w.useState("settings");let d;e[0]!==o?(d=()=>o("automations"),e[0]=o,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Qe,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let A;return e[5]!==k?(A=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=A):A=e[6],A}let x;e[7]!==i.triggers?(x=i.triggers.map(qo),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ut,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==a?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:a,onTabChange:S}),e[27]=N,e[28]=a,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let D;e[33]!==i||e[34]!==s||e[35]!==a||e[36]!==f?(D=a==="settings"?i.system_key?t.jsx(Bo,{automation:i}):t.jsx(Wo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Qe,{}),children:t.jsx(Go,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=a,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function qo(r){return r.id}function Yo(){const r=Z.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Jo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function Ti(){const r=Z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Yo,{})}),r[0]=e):e=r[0],e}export{Ti as default};
@@ -1 +1 @@
1
- import{c as S,b as K,r as F,j as e,n as m,y as O,B as V,aY as Q}from"./index-BWAlpkwu.js";import{C as U}from"./index-DQfpFSGJ.js";import{s as W}from"./Plus-B-IfeegN.js";import{t as X}from"./agent-icon-DtuRgBXt.js";import{i as Y}from"./ZoomOut-RInN96sm.js";import{S as Z}from"./search-input-DpIQ019n.js";import{E as $}from"./empty-state-DVOe8f0v.js";import{u as tt,a as et,b as it}from"./use-automations-DGkz1D1I.js";import{a as ot}from"./use-panel-navigate-DKoLfagd.js";import{A as st}from"./automation-list-row-CteUT-6p.js";import{b as rt}from"./thread-route-VcdZ-yo1.js";import"./use-mobile-CwSfPydP.js";import"./thread-button-BicBi2YW.js";import"./UserSquare-D3rxt1fW.js";import"./Image01-Bt6ZIkX1.js";import"./use-chat-layout-state-Aoi0ufu4.js";import"./use-file-configs-6DIvP8tn.js";import"./use-organization-settings-BbR_CXXI.js";import"./schema-SVXt4E6H.js";import"./task-board-CuPrIMXJ.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-BkAj46q1.js";import"./use-mcp-client-Qoi044ys.js";import"./auth-BE-jkdby.js";import"./thread-intent-qsgT0v7g.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-jiotiysJ.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Ccw9R6E9.js";import"./tooltip-DgqSmkd3.js";import"./index-DphH3SH1.js";import"./toolbar-icon-button-CT832dEu.js";import"./shell-layout-CmyoqizW.js";import"./avatar-Bq6TAAFW.js";import"./User01-P3sVVPbl.js";import"./Building02-DH0ShiKs.js";import"./XClose-wS5BxV-4.js";import"./use-project-scope-B9BJjHwp.js";import"./CheckCircle-CvrX7p0-.js";import"./Monitor01-8fVRFSue.js";import"./use-clock-tick-DFaAt8jb.js";import"./Tool01-G_7e_fu0.js";import"./command-BTi6xeFr.js";import"./index-U_vV9Req.js";import"./SearchMd-BHEy3hgp.js";import"./integration-icon-COlVJ6Ap.js";import"./LinkBroken01-DeBiMAX8.js";import"./project-icon-CERkoZt2.js";import"./new-project-dialog-Cqc94Xrg.js";import"./ArrowLeft-B5K5-flN.js";import"./label-DxzpCGxy.js";import"./repository-import-picker-D222lJkc.js";import"./use-navigate-to-agent-D1F3bZCL.js";import"./repository-picker-BgLHJAB7.js";import"./useInfiniteQuery-C1KwH6U-.js";import"./infiniteQueryObserver-MzzHKvZc.js";import"./collection-search-DPsn3CXI.js";import"./ShoppingBag01-DVzEvqIf.js";import"./use-debounced-value-D6NhrevJ.js";import"./required-auth-layout-C2W0Hmb4.js";import"./autosend-DoPX3ID2.js";import"./use-org-sso-Ddt7V8xj.js";import"./resizable-BeKhifo6.js";import"./icon-button-Be2OFfn9.js";import"./AlertCircle-Bz95IA1L.js";import"./ArrowUp-W9fOJYtW.js";import"./ChevronUp-BF5A1_bk.js";import"./ChevronSelectorVertical-DCbswHDn.js";import"./Copy01-JxasDo0Y.js";import"./CreditCard01-zruO6RR6.js";import"./DotsVertical-IlcVf06d.js";import"./Globe04-DRKGVBCX.js";import"./SwitchHorizontal01-DWzDEU-3.js";import"./Key01-DBTFQIL_.js";import"./Link01-Da5EfBPU.js";import"./Sun-BBJ4xAcN.js";import"./Play-auont4T3.js";import"./Trash01-DsUZfXDb.js";import"./Upload01-CQ46KAYz.js";import"./Users01-C3X5KgEC.js";import"./badge-DdyoasWI.js";import"./alert-dialog-BXQXu_hy.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=K(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),b=D===void 0?[]:D,{create:y}=et(),[_,G]=F.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(X,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(V,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const H=_.toLowerCase(),q=b.filter(s=>s.name.toLowerCase().includes(H));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;O("automation_new_clicked",{virtual_mcp_id:r,existing_count:b.length});const s=await y.mutateAsync(it(r));B(s.id)},J=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(W,{size:14}),t[18]=A):A=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:J,children:[A,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=L):L=t[24];const P=L,T=m,E=m,k=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=b.length>0&&e.jsx(Z,{value:_,onChange:G,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==z?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:z}),t[30]=z,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const I=b.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Y,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Y,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==I||t[37]!==k.Container?(d=e.jsxs(k.Container,{children:[u,I]}),t[35]=u,t[36]=I,t[37]=k.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==E.Content?(f=e.jsx(E.Content,{children:d}),t[39]=d,t[40]=E.Content,t[41]=f):f=t[41];let v;return t[42]!==T||t[43]!==f?(v=e.jsx(T,{children:f}),t[42]=T,t[43]=f,t[44]=v):v=t[44],v}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(Q,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(F.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function qe(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(U.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{qe as default};
1
+ import{c as S,b as K,r as F,j as e,n as m,y as O,B as V,aY as Q}from"./index-CRxvFyky.js";import{C as U}from"./index-Cjt1X9AF.js";import{s as W}from"./Plus-C98eLxdY.js";import{t as X}from"./agent-icon-B4DYmgP1.js";import{i as Y}from"./ZoomOut-DlauVCp0.js";import{S as Z}from"./search-input-_o9KQd1n.js";import{E as $}from"./empty-state-l0-UYN2l.js";import{u as tt,a as et,b as it}from"./use-automations-Bk3k2I5y.js";import{a as ot}from"./use-panel-navigate-BGy1YPzc.js";import{A as st}from"./automation-list-row-DQWwQNF7.js";import{b as rt}from"./thread-route-DFcB1-xE.js";import"./use-mobile-90klfWtr.js";import"./thread-button-DkQ8x3QA.js";import"./UserSquare-DAAb_r4V.js";import"./Image01-CRdP4rtw.js";import"./use-chat-layout-state-tSM0Jizm.js";import"./use-file-configs-DgY4Z1tX.js";import"./use-organization-settings-ZA_4CNmo.js";import"./schema-ChrkqfAY.js";import"./task-board-hSuUNaaL.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-zQyfl2AT.js";import"./use-mcp-client-BGHP1VQF.js";import"./auth-B0nPj6bO.js";import"./thread-intent-C0VUjVSW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg-aHWP0.js";import"./slugify-CEUa2lfQ.js";import"./sheet-FuQrUGRX.js";import"./tooltip-BkpS_52M.js";import"./index-Ucsyl0WT.js";import"./toolbar-icon-button-BXIVPBnN.js";import"./shell-layout-CeMKwojV.js";import"./avatar-DDLKm8YT.js";import"./User01-CT29Ne_2.js";import"./Building02-CR5isnNx.js";import"./XClose-CzyFIqLD.js";import"./use-project-scope-BWYheFWK.js";import"./CheckCircle-C6r2HC-Z.js";import"./Monitor01-CbPw11a8.js";import"./use-clock-tick-BBBJErXL.js";import"./Tool01-wA46vRus.js";import"./command-BxEu7pvj.js";import"./index-Djra7CLF.js";import"./SearchMd-CxgIdVnP.js";import"./integration-icon-BtvcZQwg.js";import"./LinkBroken01-QWocyozH.js";import"./project-icon-n8KMRQ3Z.js";import"./new-project-dialog-qQiy9MD9.js";import"./ArrowLeft-CDvPBm7p.js";import"./label-Mh3XNAnQ.js";import"./repository-import-picker-BjTbZx13.js";import"./use-navigate-to-agent-B6pFs8ZG.js";import"./repository-picker-BzWXVivD.js";import"./useInfiniteQuery-wHLzuDuh.js";import"./infiniteQueryObserver-DbF1ByiF.js";import"./collection-search-rIwiQou4.js";import"./ShoppingBag01-BnVz66h8.js";import"./use-debounced-value-CqzArAe1.js";import"./required-auth-layout-CncnEGXc.js";import"./autosend-BbVWxP-H.js";import"./use-org-sso-CtvQdcBM.js";import"./resizable-DwzY5Qay.js";import"./icon-button-BzP67FLk.js";import"./AlertCircle-Dlc4TAni.js";import"./ArrowUp-BwLxa8U7.js";import"./ChevronUp-D_THnL5s.js";import"./ChevronSelectorVertical-Bp4xRFxb.js";import"./Copy01-BgUme99A.js";import"./CreditCard01-zjoJQKXP.js";import"./DotsVertical-cl0_7TJQ.js";import"./Globe04-CE10Q1IP.js";import"./SwitchHorizontal01-CzPKETS5.js";import"./Key01-DZe6ClyY.js";import"./Link01-OFk1WR7A.js";import"./Sun-CChCwIaO.js";import"./Play-BCeqHm1l.js";import"./Trash01-B-NKlbYg.js";import"./Upload01-5dq0ljk0.js";import"./Users01-BoSWrp-z.js";import"./badge-bIRC2OO-.js";import"./alert-dialog-B9F5DKY-.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=K(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),b=D===void 0?[]:D,{create:y}=et(),[_,G]=F.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(X,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(V,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const H=_.toLowerCase(),q=b.filter(s=>s.name.toLowerCase().includes(H));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;O("automation_new_clicked",{virtual_mcp_id:r,existing_count:b.length});const s=await y.mutateAsync(it(r));B(s.id)},J=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(W,{size:14}),t[18]=A):A=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:J,children:[A,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=L):L=t[24];const P=L,T=m,E=m,k=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=b.length>0&&e.jsx(Z,{value:_,onChange:G,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==z?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:z}),t[30]=z,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const I=b.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Y,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Y,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==I||t[37]!==k.Container?(d=e.jsxs(k.Container,{children:[u,I]}),t[35]=u,t[36]=I,t[37]=k.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==E.Content?(f=e.jsx(E.Content,{children:d}),t[39]=d,t[40]=E.Content,t[41]=f):f=t[41];let v;return t[42]!==T||t[43]!==f?(v=e.jsx(T,{children:f}),t[42]=T,t[43]=f,t[44]=v):v=t[44],v}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(Q,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(F.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function qe(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(U.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{qe as default};
@@ -1 +1 @@
1
- import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-BWAlpkwu.js";import{C as D}from"./index-DQfpFSGJ.js";import{u as B}from"./use-mcp-client-Qoi044ys.js";import{C as H,a as J}from"./companion-mcps-section-CeXtyAjb.js";import{c as K}from"./use-connect-companion-ZHdRjz9u.js";import{C as v,a as q}from"./connect-layout-CTahsp5z.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-DKoLfagd.js";import"./use-mobile-CwSfPydP.js";import"./thread-button-BicBi2YW.js";import"./agent-icon-DtuRgBXt.js";import"./AlertCircle-Bz95IA1L.js";import"./Tool01-G_7e_fu0.js";import"./ArrowUp-W9fOJYtW.js";import"./ArrowLeft-B5K5-flN.js";import"./LinkBroken01-DeBiMAX8.js";import"./ShoppingBag01-DVzEvqIf.js";import"./ZoomOut-RInN96sm.js";import"./Building02-DH0ShiKs.js";import"./CheckCircle-CvrX7p0-.js";import"./ChevronUp-BF5A1_bk.js";import"./ChevronSelectorVertical-DCbswHDn.js";import"./UserSquare-D3rxt1fW.js";import"./Copy01-JxasDo0Y.js";import"./CreditCard01-zruO6RR6.js";import"./DotsVertical-IlcVf06d.js";import"./Image01-Bt6ZIkX1.js";import"./Globe04-DRKGVBCX.js";import"./SwitchHorizontal01-DWzDEU-3.js";import"./Key01-DBTFQIL_.js";import"./Link01-Da5EfBPU.js";import"./Monitor01-8fVRFSue.js";import"./Sun-BBJ4xAcN.js";import"./Play-auont4T3.js";import"./Plus-B-IfeegN.js";import"./SearchMd-BHEy3hgp.js";import"./Trash01-DsUZfXDb.js";import"./Upload01-CQ46KAYz.js";import"./User01-P3sVVPbl.js";import"./Users01-C3X5KgEC.js";import"./XClose-wS5BxV-4.js";import"./use-chat-layout-state-Aoi0ufu4.js";import"./use-file-configs-6DIvP8tn.js";import"./use-organization-settings-BbR_CXXI.js";import"./schema-SVXt4E6H.js";import"./task-board-CuPrIMXJ.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-BkAj46q1.js";import"./thread-route-VcdZ-yo1.js";import"./thread-intent-qsgT0v7g.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-jiotiysJ.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Ccw9R6E9.js";import"./tooltip-DgqSmkd3.js";import"./index-DphH3SH1.js";import"./toolbar-icon-button-CT832dEu.js";import"./shell-layout-CmyoqizW.js";import"./avatar-Bq6TAAFW.js";import"./use-project-scope-B9BJjHwp.js";import"./use-clock-tick-DFaAt8jb.js";import"./command-BTi6xeFr.js";import"./index-U_vV9Req.js";import"./integration-icon-COlVJ6Ap.js";import"./project-icon-CERkoZt2.js";import"./new-project-dialog-Cqc94Xrg.js";import"./label-DxzpCGxy.js";import"./repository-import-picker-D222lJkc.js";import"./use-navigate-to-agent-D1F3bZCL.js";import"./repository-picker-BgLHJAB7.js";import"./useInfiniteQuery-C1KwH6U-.js";import"./infiniteQueryObserver-MzzHKvZc.js";import"./collection-search-DPsn3CXI.js";import"./use-debounced-value-D6NhrevJ.js";import"./required-auth-layout-C2W0Hmb4.js";import"./autosend-DoPX3ID2.js";import"./use-org-sso-Ddt7V8xj.js";import"./resizable-BeKhifo6.js";import"./icon-button-Be2OFfn9.js";import"./auth-BE-jkdby.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-D1MBRr1a.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-B0oo9pOn.js";import"./authenticate-and-persist-oauth-6gcBpEYE.js";import"./mcp-oauth-nWbzfbZw.js";import"./mcp-oauth-IMvvQmc3.js";import"./track-Bsbqp3Hn.js";import"./extract-connection-data-C4LE3XP1.js";import"./connection-D9I74S7M.js";import"./url-slug-Bn0tWo1u.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=G();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=K(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>z(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=E):E=t[15];const O=E;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(q,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==e||t[37]!==c?(S=i.jsx(J,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function $o(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{$o as default};
1
+ import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-CRxvFyky.js";import{C as D}from"./index-Cjt1X9AF.js";import{u as B}from"./use-mcp-client-BGHP1VQF.js";import{C as H,a as J}from"./companion-mcps-section-BAoAXnfB.js";import{c as K}from"./use-connect-companion-BEDfrnjG.js";import{C as v,a as q}from"./connect-layout-CPGRhpnE.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-BGy1YPzc.js";import"./use-mobile-90klfWtr.js";import"./thread-button-DkQ8x3QA.js";import"./agent-icon-B4DYmgP1.js";import"./AlertCircle-Dlc4TAni.js";import"./Tool01-wA46vRus.js";import"./ArrowUp-BwLxa8U7.js";import"./ArrowLeft-CDvPBm7p.js";import"./LinkBroken01-QWocyozH.js";import"./ShoppingBag01-BnVz66h8.js";import"./ZoomOut-DlauVCp0.js";import"./Building02-CR5isnNx.js";import"./CheckCircle-C6r2HC-Z.js";import"./ChevronUp-D_THnL5s.js";import"./ChevronSelectorVertical-Bp4xRFxb.js";import"./UserSquare-DAAb_r4V.js";import"./Copy01-BgUme99A.js";import"./CreditCard01-zjoJQKXP.js";import"./DotsVertical-cl0_7TJQ.js";import"./Image01-CRdP4rtw.js";import"./Globe04-CE10Q1IP.js";import"./SwitchHorizontal01-CzPKETS5.js";import"./Key01-DZe6ClyY.js";import"./Link01-OFk1WR7A.js";import"./Monitor01-CbPw11a8.js";import"./Sun-CChCwIaO.js";import"./Play-BCeqHm1l.js";import"./Plus-C98eLxdY.js";import"./SearchMd-CxgIdVnP.js";import"./Trash01-B-NKlbYg.js";import"./Upload01-5dq0ljk0.js";import"./User01-CT29Ne_2.js";import"./Users01-BoSWrp-z.js";import"./XClose-CzyFIqLD.js";import"./use-chat-layout-state-tSM0Jizm.js";import"./use-file-configs-DgY4Z1tX.js";import"./use-organization-settings-ZA_4CNmo.js";import"./schema-ChrkqfAY.js";import"./task-board-hSuUNaaL.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-zQyfl2AT.js";import"./thread-route-DFcB1-xE.js";import"./thread-intent-C0VUjVSW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg-aHWP0.js";import"./slugify-CEUa2lfQ.js";import"./sheet-FuQrUGRX.js";import"./tooltip-BkpS_52M.js";import"./index-Ucsyl0WT.js";import"./toolbar-icon-button-BXIVPBnN.js";import"./shell-layout-CeMKwojV.js";import"./avatar-DDLKm8YT.js";import"./use-project-scope-BWYheFWK.js";import"./use-clock-tick-BBBJErXL.js";import"./command-BxEu7pvj.js";import"./index-Djra7CLF.js";import"./integration-icon-BtvcZQwg.js";import"./project-icon-n8KMRQ3Z.js";import"./new-project-dialog-qQiy9MD9.js";import"./label-Mh3XNAnQ.js";import"./repository-import-picker-BjTbZx13.js";import"./use-navigate-to-agent-B6pFs8ZG.js";import"./repository-picker-BzWXVivD.js";import"./useInfiniteQuery-wHLzuDuh.js";import"./infiniteQueryObserver-DbF1ByiF.js";import"./collection-search-rIwiQou4.js";import"./use-debounced-value-CqzArAe1.js";import"./required-auth-layout-CncnEGXc.js";import"./autosend-BbVWxP-H.js";import"./use-org-sso-CtvQdcBM.js";import"./resizable-DwzY5Qay.js";import"./icon-button-BzP67FLk.js";import"./auth-B0nPj6bO.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-DUIO9IEt.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-Bq03BbUn.js";import"./authenticate-and-persist-oauth-CQlZ3eZb.js";import"./mcp-oauth-DyEs_N4H.js";import"./mcp-oauth-DwTCbF8I.js";import"./track-J0HEXaC4.js";import"./extract-connection-data-fTgIRuWW.js";import"./connection-DY3hEgbh.js";import"./url-slug-DoBmFZC1.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=G();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=K(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>z(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=E):E=t[15];const O=E;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(q,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==e||t[37]!==c?(S=i.jsx(J,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function $o(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{$o as default};
@@ -0,0 +1 @@
1
+ import{c,j as e,b2 as b,u as g}from"./index-CRxvFyky.js";import{C as j}from"./index-Cjt1X9AF.js";import{F as v,H as S}from"./file-share-button-Dgb-l7Qf.js";import{u as k,b as y,e as _}from"./use-org-fs-B_rDABnu.js";import{S as w}from"./settings-tab-BZRmYB8j.js";import{b as M}from"./thread-route-DFcB1-xE.js";import"./use-mobile-90klfWtr.js";import"./thread-button-DkQ8x3QA.js";import"./agent-icon-B4DYmgP1.js";import"./AlertCircle-Dlc4TAni.js";import"./Tool01-wA46vRus.js";import"./ArrowUp-BwLxa8U7.js";import"./ArrowLeft-CDvPBm7p.js";import"./LinkBroken01-QWocyozH.js";import"./ShoppingBag01-BnVz66h8.js";import"./ZoomOut-DlauVCp0.js";import"./Building02-CR5isnNx.js";import"./CheckCircle-C6r2HC-Z.js";import"./ChevronUp-D_THnL5s.js";import"./ChevronSelectorVertical-Bp4xRFxb.js";import"./UserSquare-DAAb_r4V.js";import"./Copy01-BgUme99A.js";import"./CreditCard01-zjoJQKXP.js";import"./DotsVertical-cl0_7TJQ.js";import"./Image01-CRdP4rtw.js";import"./Globe04-CE10Q1IP.js";import"./SwitchHorizontal01-CzPKETS5.js";import"./Key01-DZe6ClyY.js";import"./Link01-OFk1WR7A.js";import"./Monitor01-CbPw11a8.js";import"./Sun-CChCwIaO.js";import"./Play-BCeqHm1l.js";import"./Plus-C98eLxdY.js";import"./SearchMd-CxgIdVnP.js";import"./Trash01-B-NKlbYg.js";import"./Upload01-5dq0ljk0.js";import"./User01-CT29Ne_2.js";import"./Users01-BoSWrp-z.js";import"./XClose-CzyFIqLD.js";import"./use-chat-layout-state-tSM0Jizm.js";import"./use-file-configs-DgY4Z1tX.js";import"./use-organization-settings-ZA_4CNmo.js";import"./schema-ChrkqfAY.js";import"./task-board-hSuUNaaL.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-zQyfl2AT.js";import"./use-mcp-client-BGHP1VQF.js";import"./auth-B0nPj6bO.js";import"./use-panel-navigate-BGy1YPzc.js";import"./use-project-scope-BWYheFWK.js";import"./thread-intent-C0VUjVSW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg-aHWP0.js";import"./slugify-CEUa2lfQ.js";import"./sheet-FuQrUGRX.js";import"./tooltip-BkpS_52M.js";import"./index-Ucsyl0WT.js";import"./toolbar-icon-button-BXIVPBnN.js";import"./shell-layout-CeMKwojV.js";import"./avatar-DDLKm8YT.js";import"./use-clock-tick-BBBJErXL.js";import"./command-BxEu7pvj.js";import"./index-Djra7CLF.js";import"./integration-icon-BtvcZQwg.js";import"./project-icon-n8KMRQ3Z.js";import"./new-project-dialog-qQiy9MD9.js";import"./label-Mh3XNAnQ.js";import"./repository-import-picker-BjTbZx13.js";import"./use-navigate-to-agent-B6pFs8ZG.js";import"./repository-picker-BzWXVivD.js";import"./useInfiniteQuery-wHLzuDuh.js";import"./infiniteQueryObserver-DbF1ByiF.js";import"./collection-search-rIwiQou4.js";import"./use-debounced-value-CqzArAe1.js";import"./required-auth-layout-CncnEGXc.js";import"./autosend-BbVWxP-H.js";import"./use-org-sso-CtvQdcBM.js";import"./resizable-DwzY5Qay.js";import"./icon-button-BzP67FLk.js";import"./popover-mVKjwyVk.js";import"./extract-connection-data-fTgIRuWW.js";import"./metadata-D72DunRR.js";import"./connection-DY3hEgbh.js";import"./url-slug-DoBmFZC1.js";import"./chat-context-DC0y74SR.js";import"./use-decopilot-events-B8FghSGH.js";import"./use-ai-providers-CqTwdrfZ.js";import"./use-chat-navigation-DRlGBXxg.js";import"./location-BjlyegC2.js";import"./build-improve-prompt-doc-JetGJgiY.js";import"./empty-state-l0-UYN2l.js";import"./use-date-fns-locale-Cy-y_Q2o.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-DyEs_N4H.js";import"./mcp-oauth-DwTCbF8I.js";import"./alert-dialog-B9F5DKY-.js";import"./textarea-Bb-Hk_Kv.js";import"./use-connection-Ce_qeKZH.js";import"./use-debounced-autosave-C0ZrLAg3.js";import"./add-connection-dialog-DrnMwSMI.js";import"./connection-card-B1xf0QXn.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-Czv6sKYA.js";import"./form-DUIO9IEt.js";import"./select-bn_n-Gzr.js";import"./index-BdQq_4o_.js";import"./connection-form-helpers-AZLHx77O.js";import"./authenticate-and-persist-oauth-CQlZ3eZb.js";import"./collection-tabs-D8Yzl__1.js";import"./badge-bIRC2OO-.js";import"./use-infinite-scroll-BV3nru2V.js";import"./useSuspenseInfiniteQuery-C_Rnzsp0.js";import"./file-type-icon-C3tGnF-n.js";import"./checkbox-DQ6m3Oyh.js";import"./search-input-_o9KQd1n.js";import"./use-mcp-auth-status-C5aEbqHT.js";import"./types-BdfekBKI.js";import"./use-mcp-tools-CXQACEGE.js";import"./use-mcp-prompts-ZKBtP7OQ.js";import"./utils-CVEq3hMx.js";import"./switch-5Er3VYKS.js";import"./scroll-area-REb3aG6j.js";import"./optimistic-project-sidebar-views-CdTnOiOg.js";import"./virtual-mcp-gsHlBsGT.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-XRIL59wI.js";import"./use-secrets-Ck09wob8.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const x="home";function P(i){const t=c.c(5),{label:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=e.jsx(b,{className:"aspect-video w-2/3 max-w-xl"}),t[0]=p):p=t[0];let o;t[1]!==r?(o=r&&e.jsx("p",{className:"text-xs text-muted-foreground",children:r}),t[1]=r,t[2]=o):o=t[2];let m;return t[3]!==o?(m=e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-background",children:[p,o]}),t[3]=o,t[4]=m):m=t[4],m}function D(i){const t=c.c(15),{path:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={refetchIntervalWhenAbsent:2e3},t[0]=p):p=t[0];const o=k(x,r,p),m=y(x)(r);if(o.isPending||!o.data){const h=!o.isPending&&!o.data?"Waiting for the deck to sync…":void 0;let l;return t[1]!==h?(l=e.jsx(P,{label:h}),t[1]=h,t[2]=l):l=t[2],l}let s;t[3]!==o.data?(s=_(o.data),t[3]=o.data,t[4]=s):s=t[4];const f=o.data.shareMode??"private",u=o.data.effectivePublic??!1,d=window.location.origin+m;let a;t[5]!==r||t[6]!==f||t[7]!==u||t[8]!==d?(a=e.jsx(v,{volume:x,path:r,shareMode:f,effectivePublic:u,url:d}),t[5]=r,t[6]=f,t[7]=u,t[8]=d,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==m||t[12]!==s||t[13]!==a?(n=e.jsx(S,{readUrl:m,marker:s,title:r,savePath:r,trailing:a}),t[10]=r,t[11]=m,t[12]=s,t[13]=a,t[14]=n):n=t[14],n}function C(){const i=c.c(4);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=g(t),p=M(),o="path"in r&&typeof r.path=="string"?r.path:void 0;let m;return i[1]!==o||i[2]!==p?(m=o?e.jsx(D,{path:o},o):e.jsx(w,{virtualMcpId:p}),i[1]=o,i[2]=p,i[3]=m):m=i[3],m}function Zo(){const i=c.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(j.Content,{children:e.jsx(C,{})}),i[0]=t):t=i[0],t}export{Zo as default};