decocms 4.497.1 → 4.498.0
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.
- package/dist/client/assets/{ActiveShapeUtils-CyYu6nD0.js → ActiveShapeUtils-h37U-AjP.js} +1 -1
- package/dist/client/assets/{AlertCircle-CHrjAIcc.js → AlertCircle-D6PAHKjV.js} +1 -1
- package/dist/client/assets/{AreaChart-CwoOvJ2_.js → AreaChart-BARo54FY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CDSbOlKg.js → ArrowLeft-CG9rYORx.js} +1 -1
- package/dist/client/assets/{ArrowUp-DVmGL0QN.js → ArrowUp-t0hf8rM7.js} +1 -1
- package/dist/client/assets/{BarChart-pYmYrRAw.js → BarChart-B21k04bX.js} +1 -1
- package/dist/client/assets/{Building02-Cjmi-E_Q.js → Building02-fUucitQx.js} +1 -1
- package/dist/client/assets/{CategoricalChart-J69_dr0s.js → CategoricalChart-VabRcjcu.js} +1 -1
- package/dist/client/assets/{CheckCircle-DH3xbIup.js → CheckCircle-of-fJlvu.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-D3--DzuF.js → ChevronSelectorVertical-lAvz2cuG.js} +1 -1
- package/dist/client/assets/{ChevronUp-fo2ERVlh.js → ChevronUp-IQvZuGmJ.js} +1 -1
- package/dist/client/assets/{Copy01-C7JKQ2yo.js → Copy01-D6HfKiqy.js} +1 -1
- package/dist/client/assets/{CreditCard01-DuhJeWgL.js → CreditCard01-D5Mtkf7j.js} +1 -1
- package/dist/client/assets/{DotsVertical-CdIsXudQ.js → DotsVertical-LyDkiB3Q.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-PRGTHaZ1.js → ErrorBarContext-BbITcgQP.js} +1 -1
- package/dist/client/assets/{Globe04-CMhAsYW7.js → Globe04-LlNkyupL.js} +1 -1
- package/dist/client/assets/{Image01-DQr5z6Eu.js → Image01-Ch6fYTX9.js} +1 -1
- package/dist/client/assets/{Key01-DkQjjPwv.js → Key01-CzAYk09-.js} +1 -1
- package/dist/client/assets/{Link01-CBvOTEVq.js → Link01-yIpHC1tA.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CWg3Xs9J.js → LinkBroken01-4mWpjTP6.js} +1 -1
- package/dist/client/assets/{Monitor01-CawnpOBp.js → Monitor01-Ou5m5HXM.js} +1 -1
- package/dist/client/assets/{Play-CHfHT47l.js → Play-BeSRLN2O.js} +1 -1
- package/dist/client/assets/{Plus-Ch1sG4T5.js → Plus-CBwPsBC8.js} +1 -1
- package/dist/client/assets/{SearchMd-D7CH4cEW.js → SearchMd-DFKnlLzg.js} +1 -1
- package/dist/client/assets/{Sector-BdZY69jR.js → Sector-BE7eLjHh.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CFzAExOe.js → ShoppingBag01-DMrkFjeJ.js} +1 -1
- package/dist/client/assets/{Sun-AXWLcql2.js → Sun-Bx7SBlM-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-ZzQSxDu-.js → SwitchHorizontal01-JU6fMv1N.js} +1 -1
- package/dist/client/assets/{Tool01-D47UxjHr.js → Tool01-Dx9izhNQ.js} +1 -1
- package/dist/client/assets/{Trash01-DjbVg-Gr.js → Trash01-BTFm5tCg.js} +1 -1
- package/dist/client/assets/{Upload01-CongSYMk.js → Upload01-Bh-Emxn2.js} +1 -1
- package/dist/client/assets/{User01-C0eJYwru.js → User01-CQJ9yvoz.js} +1 -1
- package/dist/client/assets/{UserSquare-D5hRO90M.js → UserSquare-BAt_wzJ-.js} +1 -1
- package/dist/client/assets/{Users01-C3nUQ4J2.js → Users01-D5wZqDor.js} +1 -1
- package/dist/client/assets/{XAxis-CHmQK-au.js → XAxis-BZWDI5GS.js} +1 -1
- package/dist/client/assets/{XClose-CEtKIB7q.js → XClose-DbfrVehX.js} +1 -1
- package/dist/client/assets/{ZoomOut-CrQxrOGW.js → ZoomOut-CnrqTNds.js} +1 -1
- package/dist/client/assets/{access-gate-rafBainF.js → access-gate-Du7U7Rzo.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CvB_KcBa.js → add-connection-dialog-oB2v8vkB.js} +1 -1
- package/dist/client/assets/{agent-analytics-BVxR4_Uj.js → agent-analytics-DoqorIVJ.js} +1 -1
- package/dist/client/assets/agent-app-CCz5q2dj.js +1 -0
- package/dist/client/assets/{agent-assets-B1OqFMpj.js → agent-assets-udkmrdmj.js} +1 -1
- package/dist/client/assets/{agent-automation-ClFLOq4I.js → agent-automation-YdAcul3v.js} +3 -3
- package/dist/client/assets/{agent-automations-BFYTbfc-.js → agent-automations-B5oxB7jR.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BRvuYQWx.js → agent-connect-sources-BjkrraY5.js} +1 -1
- package/dist/client/assets/agent-deck-CsNgUsES.js +1 -0
- package/dist/client/assets/{agent-e2e-B9CH2Mo6.js → agent-e2e-B5oARVfC.js} +1 -1
- package/dist/client/assets/{agent-experiments-DlztOCrU.js → agent-experiments-DfpT1sD2.js} +1 -1
- package/dist/client/assets/{agent-file-CsIS9_4j.js → agent-file-BDStqhoT.js} +1 -1
- package/dist/client/assets/{agent-hosting-Bknl93TE.js → agent-hosting-prc-duXm.js} +1 -1
- package/dist/client/assets/{agent-icon-D25DK5wS.js → agent-icon-BZX5a0rN.js} +1 -1
- package/dist/client/assets/agent-library-BqNk_ysL.js +1 -0
- package/dist/client/assets/agent-library-file-BMyjR4a-.js +1 -0
- package/dist/client/assets/{agent-monitor-DyT5ig13.js → agent-monitor-CtMBSYOs.js} +1 -1
- package/dist/client/assets/{agent-overview-ButxU5iy.js → agent-overview-B23wW22S.js} +1 -1
- package/dist/client/assets/agent-settings-QtGp3bU0.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dl99KrED.js → agent-site-editor-Dtpy7m_F.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C29bJKGS.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-Df_6cDHk.js → agent-site-editor-content-PQwLsy2Z.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-CltuQS-a.js → agent-site-editor-preview-DfEJR2-i.js} +3 -3
- package/dist/client/assets/agent-view-D-eSYJoz.js +1 -0
- package/dist/client/assets/{agent-view-guard-CVsz0TkU.js → agent-view-guard-BhsT9KMv.js} +1 -1
- package/dist/client/assets/{agents-list-CeTR5ulR.js → agents-list-BEnHZ3f8.js} +1 -1
- package/dist/client/assets/{ai-providers-BZ2_pdED.js → ai-providers-DaLz3LDZ.js} +1 -1
- package/dist/client/assets/{alert-BK3mvJgc.js → alert-DZ-Sik7-.js} +1 -1
- package/dist/client/assets/{alert-dialog-CmV9dy9T.js → alert-dialog-DFCHlrdG.js} +1 -1
- package/dist/client/assets/{analytics-sections-BrCaGlQS.js → analytics-sections-BpmplX7W.js} +1 -1
- package/dist/client/assets/api-keys-Cs5VWUE9.js +1 -0
- package/dist/client/assets/{api-keys-BjhtfTv5.js → api-keys-D6bA8zbA.js} +1 -1
- package/dist/client/assets/app-editor-CpUCMZta.js +1 -0
- package/dist/client/assets/{asset-utils-CM76tGw5.js → asset-utils-DSAV30pE.js} +1 -1
- package/dist/client/assets/{auth-mnJ9PW01.js → auth-CKRkGXX0.js} +1 -1
- package/dist/client/assets/{auth-catchall-BHpuDx65.js → auth-catchall-A973ZSm_.js} +1 -1
- package/dist/client/assets/{auth-entry-DTqozZzK.js → auth-entry-B6EUZx-E.js} +1 -1
- package/dist/client/assets/{auth-split-layout-nnK4QA-M.js → auth-split-layout-ppDoBfGB.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bpiv3RO5.js → authenticate-and-persist-oauth-hMQu3mut.js} +1 -1
- package/dist/client/assets/{automation-list-row-YpYqBxpc.js → automation-list-row-CIgywn5_.js} +1 -1
- package/dist/client/assets/{automation-runs-Cjsz3sNl.js → automation-runs-C6KynleS.js} +1 -1
- package/dist/client/assets/{automations-K16w9IfU.js → automations-BTR4ZUpt.js} +1 -1
- package/dist/client/assets/{autosend-BaSnPt7x.js → autosend-CfJ-txst.js} +1 -1
- package/dist/client/assets/{avatar-Co-052cR.js → avatar-D0TV3cL_.js} +1 -1
- package/dist/client/assets/{badge-CSXpEa55.js → badge-Djw87oeQ.js} +1 -1
- package/dist/client/assets/{block-document-Dwi86oHf.js → block-document-e1vZMHc5.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BOZf-loo.js → blocks-preview-workspace-context-D3H9wyCz.js} +1 -1
- package/dist/client/assets/{blog-schema-D-OKi5uD.js → blog-schema-Dk8m1thm.js} +1 -1
- package/dist/client/assets/{board-analytics-Dtj7gftE.js → board-analytics-DcHI9tGL.js} +1 -1
- package/dist/client/assets/{buckets-Tw-Ph4JX.js → buckets-DtxAkodo.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DSsqKodq.js → build-improve-prompt-doc-C53Lrdih.js} +1 -1
- package/dist/client/assets/{calendar-DCoBKIit.js → calendar-Cm_oXX6s.js} +1 -1
- package/dist/client/assets/{capability-load-error-D4Y-1y8Z.js → capability-load-error-CTNI2hrf.js} +1 -1
- package/dist/client/assets/{category-editor-15WhKdzJ.js → category-editor-Bua_fHQ9.js} +1 -1
- package/dist/client/assets/{chart-D8S5B3Fk.js → chart-u_PCedAi.js} +1 -1
- package/dist/client/assets/{chat-context-BvnYD9Wb.js → chat-context-CBev6aq3.js} +1 -1
- package/dist/client/assets/{chat-draft-BUwzbZEb.js → chat-draft-C2IQcwKW.js} +1 -1
- package/dist/client/assets/{checkbox-CVokasRh.js → checkbox-C6RcKsRC.js} +1 -1
- package/dist/client/assets/{choose-editor-B_kWfVxF.js → choose-editor-4RqxQ2Kh.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-D7K6r9pB.js → claim-phase-copy-azjvrOLz.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BjJ_-CPN.js → cli-auth-success-CSxmM9Mc.js} +1 -1
- package/dist/client/assets/{client-icons-R8IUwnS4.js → client-icons-DafWzw5-.js} +1 -1
- package/dist/client/assets/{collapsible-BpQWnMqu.js → collapsible-Bwspbfl2.js} +1 -1
- package/dist/client/assets/{collection-detail-BTjqy1Rt.js → collection-detail-CZGVnn_N.js} +1 -1
- package/dist/client/assets/{collection-display-button-CwZjncaa.js → collection-display-button-D2vvIKbf.js} +1 -1
- package/dist/client/assets/{collection-search-CFCYIYsp.js → collection-search-DaDlBD_E.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-9DXb8a6f.js → collection-table-wrapper-jG2oYxE8.js} +1 -1
- package/dist/client/assets/{collection-tabs-D1MI1rbf.js → collection-tabs-CqZ0YLaH.js} +1 -1
- package/dist/client/assets/{column-rules-CKqZ2w7B.js → column-rules-P9xAwA0r.js} +1 -1
- package/dist/client/assets/{combobox-8uTSWM7x.js → combobox-BsiHAQYf.js} +1 -1
- package/dist/client/assets/{command-zNxZAzCt.js → command-BWDE-FNh.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Dn6CWwBU.js → companion-mcps-section-C3mRXa0s.js} +1 -1
- package/dist/client/assets/{config-zAMyoP2u.js → config-C--9g5dZ.js} +1 -1
- package/dist/client/assets/{connect-B0eXPnXO.js → connect-DJluRO9r.js} +1 -1
- package/dist/client/assets/{connect-layout-DiQFJtzW.js → connect-layout-CTtD_uUg.js} +1 -1
- package/dist/client/assets/{connection-1bY4JOT7.js → connection-BKH2vnra.js} +1 -1
- package/dist/client/assets/{connection-card-BPhgcvjc.js → connection-card-BqF_7Vxz.js} +1 -1
- package/dist/client/assets/{connection-detail-Bb0U2uNL.js → connection-detail-gLie6k82.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BHdjytOT.js → connection-form-helpers-C6ev_pGu.js} +1 -1
- package/dist/client/assets/{connections-C9nogFwq.js → connections-C4cDvjtx.js} +1 -1
- package/dist/client/assets/{context-l2XAj4L-.js → context-C-Rr1spp.js} +1 -1
- package/dist/client/assets/{context-menu-BJ4Hqd4H.js → context-menu-CYtUPpu0.js} +1 -1
- package/dist/client/assets/{core.esm-l5VXFwhd.js → core.esm-BqWXbE7p.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BDaja_nV.js → create-organization-dialog-Ci8n8-Qw.js} +1 -1
- package/dist/client/assets/{daily-pulse-DOsYKARy.js → daily-pulse-0HhsWI2C.js} +1 -1
- package/dist/client/assets/{device-hint-PXv02Ucu.js → device-hint-C8SeBwQ9.js} +1 -1
- package/dist/client/assets/{discover-BiY2-MAZ.js → discover-CRupEDof.js} +1 -1
- package/dist/client/assets/{domain-settings-B2qAb04P.js → domain-settings-9i4lE6z4.js} +1 -1
- package/dist/client/assets/{drawer-DL5bFgNR.js → drawer-DmaKd3D8.js} +1 -1
- package/dist/client/assets/{editor-EMcWHln-.js → editor-Clsq2fLP.js} +1 -1
- package/dist/client/assets/{empty-state-Bk1ubmvv.js → empty-state-CYf1fvjk.js} +1 -1
- package/dist/client/assets/{empty-state-Dl0uE1qg.js → empty-state-ervoES7F.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DIxd-Pe9.js → extract-connection-data-C5DfHTe9.js} +1 -1
- package/dist/client/assets/{feature-gate-D_5Zcern.js → feature-gate-DyJpZ6nd.js} +1 -1
- package/dist/client/assets/{feature-paywall-uSo5NgIk.js → feature-paywall-CeiXnB_u.js} +1 -1
- package/dist/client/assets/{file-explorer-BLs0vfRV.js → file-explorer-_3Yay2x8.js} +1 -1
- package/dist/client/assets/{file-preview-C_zyLNU0.js → file-preview-CHpcXovu.js} +1 -1
- package/dist/client/assets/{file-share-button-DVm15sOV.js → file-share-button-CXVf0V10.js} +1 -1
- package/dist/client/assets/{file-type-icon-BFUya14p.js → file-type-icon-poPLKUlK.js} +1 -1
- package/dist/client/assets/flat-project-BXwoPNzs.js +1 -0
- package/dist/client/assets/{folder-icon-aFp6Qaf_.js → folder-icon-B1u0MiCk.js} +1 -1
- package/dist/client/assets/{form-D_HjHR78.js → form-Dg_6Hf9j.js} +1 -1
- package/dist/client/assets/{general-DWYlQqAU.js → general-B4ZNIMkv.js} +1 -1
- package/dist/client/assets/{home-C39XJuuC.js → home-ELjwftjN.js} +1 -1
- package/dist/client/assets/{icon-button-CWnlJ_oZ.js → icon-button-CH2OxNKZ.js} +1 -1
- package/dist/client/assets/{index-DXJRwxmV.js → index-BK3UZ3iw.js} +1 -1
- package/dist/client/assets/{index-B5s2AYv_.js → index-BTY2QFMJ.js} +1 -1
- package/dist/client/assets/{index-Dbiuixsg.js → index-CFz3Hn6w.js} +1 -1
- package/dist/client/assets/{index-Cxl4iIy5.js → index-CN-5kkc7.js} +1 -1
- package/dist/client/assets/{index-8oPwgK8U.js → index-CPYLUZ6w.js} +1 -1
- package/dist/client/assets/{index-BGn4_CUT.js → index-CQZm7V7F.js} +1 -1
- package/dist/client/assets/{index-Ah1SD4qu.js → index-CuZxCor5.js} +1 -1
- package/dist/client/assets/{index-BBBK2Mw-.js → index-DEwWVQT2.js} +1 -1
- package/dist/client/assets/{index-C8H_whn6.js → index-DoXTlFZn.js} +3 -3
- package/dist/client/assets/{index-DqBs1i86.js → index-GzUyiAtq.js} +1 -1
- package/dist/client/assets/{index-TStkGKDV.js → index-XXahSrQ2.js} +1 -1
- package/dist/client/assets/{index-redirect-qy-HGqdF.js → index-redirect-BJu2viW0.js} +1 -1
- package/dist/client/assets/{index-zFizTRgJ.js → index-xs_k6Ktz.js} +4 -4
- package/dist/client/assets/{index-DwYK88xA.js → index-zt_Z_Heg.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DR5G3_XI.js → infiniteQueryObserver-7uXBxwIZ.js} +1 -1
- package/dist/client/assets/{infra-billing-DZ12o-of.js → infra-billing-DaXwvysV.js} +1 -1
- package/dist/client/assets/{input-LrUKUue2.js → input-BndsYgrN.js} +1 -1
- package/dist/client/assets/{input-DrtuDHta.js → input-DsuaqMOh.js} +3 -3
- package/dist/client/assets/{integration-icon-Bdyedi1P.js → integration-icon-Cx3J1TrD.js} +1 -1
- package/dist/client/assets/{jira-icon-C5IDdjgJ.js → jira-icon-CIrGorhP.js} +1 -1
- package/dist/client/assets/{label-CGeSw_vU.js → label-BHQ7fAmu.js} +1 -1
- package/dist/client/assets/{layout-D3tajt2K.js → layout-DJrVrTHk.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CfrBn8K6.js → legacy-agents-deep-rCcS2UBo.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BKFq0f1c.js → legacy-main-redirect-DMe57jXo.js} +1 -1
- package/dist/client/assets/library-CbX8eoDf.js +1 -0
- package/dist/client/assets/{library-tab-CedtT6BF.js → library-tab-DpE23FB4.js} +1 -1
- package/dist/client/assets/{login-Dxq0oJju.js → login-BRxzp--X.js} +1 -1
- package/dist/client/assets/{markdown-Wp7WM_6R.js → markdown-BQE0Sc_A.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-D4yJqapi.js → mcp-app-renderer-Bl0xOGsc.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BvraKhnX.js → mcp-oauth-DOxWKmTF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BWnNfhKY.js → mcp-oauth-xPr142sb.js} +1 -1
- package/dist/client/assets/{members-NoAgJggW.js → members-BJNHqWz2.js} +1 -1
- package/dist/client/assets/{memory-DPCydpI9.js → memory-CGilhYH2.js} +1 -1
- package/dist/client/assets/{mini-report-page-CKiZSO3Y.js → mini-report-page-BbCM6VM6.js} +1 -1
- package/dist/client/assets/{mock-board-ldzlXXTT.js → mock-board-CSphyYm-.js} +1 -1
- package/dist/client/assets/{monaco-editor-Cw6bHZ9D.js → monaco-editor-C2uEeF5_.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DUI3089C.js → monitoring-stats-row-4mryZRhX.js} +1 -1
- package/dist/client/assets/{multi-select-C64565zf.js → multi-select-CcwfeB_X.js} +1 -1
- package/dist/client/assets/{mustache-jBGE1x8P.js → mustache-Bpchj0JB.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B0XejRtR.js → new-project-dialog-nyD817-y.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Az104D_B.js → oauth-callback-ai-provider-BpVSOAoL.js} +1 -1
- package/dist/client/assets/{oauth-callback-K1LG85n6.js → oauth-callback-gTMv-zQg.js} +1 -1
- package/dist/client/assets/{onboarding-BStXwTJO.js → onboarding-CMWpJjZw.js} +1 -1
- package/dist/client/assets/{openai-conversation-63MRsej5.js → openai-conversation-CeefM3R3.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BPQEjG_5.js → optimistic-project-sidebar-views-v1rJRps1.js} +1 -1
- package/dist/client/assets/{organization-choice-CWJmmXl2.js → organization-choice-VbmGVdvE.js} +1 -1
- package/dist/client/assets/{orgs-RqN1nvSn.js → orgs-Cri0Ia7k.js} +1 -1
- package/dist/client/assets/{page-seo-form-Dqs31MJ3.js → page-seo-form-DY79__rL.js} +1 -1
- package/dist/client/assets/{pair-BArWn6jb.js → pair-DwD5SdrN.js} +1 -1
- package/dist/client/assets/{plan-ladder-CFynazEn.js → plan-ladder-Cec8Hw6v.js} +1 -1
- package/dist/client/assets/{popover-DTEHxwlD.js → popover-CUbGh9FO.js} +1 -1
- package/dist/client/assets/{post-calendar-BoU1ZOL5.js → post-calendar-BQ6RASS0.js} +1 -1
- package/dist/client/assets/{post-editor-DijifWaY.js → post-editor-BlxejBOv.js} +1 -1
- package/dist/client/assets/{preview-content-4n74nMkm.js → preview-content-BNo5Q8c2.js} +1 -1
- package/dist/client/assets/{preview-dialog-BfJBjitf.js → preview-dialog-CUTnny3X.js} +1 -1
- package/dist/client/assets/{preview-panel-Ckv4GBo6.js → preview-panel-CbuRn5QK.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-DegN_8hj.js → product-picker-dialog-DWydhMcM.js} +1 -1
- package/dist/client/assets/{profile-BNI-FeGN.js → profile-Wgp3fAd7.js} +1 -1
- package/dist/client/assets/{project-app-view-BJKmTYP6.js → project-app-view-BY4Z9zY6.js} +1 -1
- package/dist/client/assets/{project-feed-CthJ5cL5.js → project-feed-LzJO1RwA.js} +1 -1
- package/dist/client/assets/{project-icon-CLft8LNy.js → project-icon-D9ZMEkrO.js} +1 -1
- package/dist/client/assets/project-reports-DHKecVyf.js +1 -0
- package/dist/client/assets/project-tasks-D-gNfCJd.js +1 -0
- package/dist/client/assets/{projects-CmeO8oT0.js → projects-D9E0KMO5.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cu-dnKwc.js → projects-empty-state-CVyY4QD-.js} +1 -1
- package/dist/client/assets/{prompts-DpC1en1o.js → prompts-BGmz7B8b.js} +1 -1
- package/dist/client/assets/record-editor-DeAErR2x.js +1 -0
- package/dist/client/assets/redirect-editor-B-TForOi.js +1 -0
- package/dist/client/assets/reports-5CTNIsDn.js +1 -0
- package/dist/client/assets/{reports-ikhGH7I0.js → reports-CwAchcdk.js} +1 -1
- package/dist/client/assets/{reports-onboarding-cozwetlX.js → reports-onboarding-4tevrhgv.js} +1 -1
- package/dist/client/assets/{reports-tab-B2H0nIWm.js → reports-tab-BWxj7M8g.js} +2 -2
- package/dist/client/assets/{repositories-6dyicYgL.js → repositories-BPCvyVf9.js} +1 -1
- package/dist/client/assets/{repository-binding-D4HjFqUu.js → repository-binding-DmdeiZmO.js} +1 -1
- package/dist/client/assets/{repository-import-picker-D32RWglo.js → repository-import-picker-CQI4CdeM.js} +1 -1
- package/dist/client/assets/{repository-picker-BS8S1A4D.js → repository-picker-BsT7lJxX.js} +1 -1
- package/dist/client/assets/{require-capability-QNDooqDp.js → require-capability-DDfk0Kb5.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DV0YP59y.js → required-auth-layout-BBSjYqsc.js} +1 -1
- package/dist/client/assets/{reset-password-Bq3L1AQn.js → reset-password-BWTQRa6I.js} +1 -1
- package/dist/client/assets/{resizable-aYdS6ucz.js → resizable-DUdjqiGj.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-wP6kmFpV.js → resolve-tab-icon-JA5rc6Tv.js} +1 -1
- package/dist/client/assets/{review-settings-VHbdYUwC.js → review-settings-z03jMXZX.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-ZhLX7YkH.js → rich-text-link-control-Cx8fBuQI.js} +1 -1
- package/dist/client/assets/{roles-DydRZQvS.js → roles-DucC2Xmn.js} +1 -1
- package/dist/client/assets/{route-Dp89Dh0m.js → route-DlzJTX4w.js} +1 -1
- package/dist/client/assets/route-DtPgqOWq.js +1 -0
- package/dist/client/assets/{route-C0Fgh6Gu.js → route-T44vpxHb.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-C8XWqppj.js → runnable-block-editor-DEHfe8Jn.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DXFQTTJR.js → sandbox-lifecycle-context-DwGA5vHg.js} +1 -1
- package/dist/client/assets/{schema-6H-MEggI.js → schema-BgIvb0Gx.js} +1 -1
- package/dist/client/assets/{scroll-area-DsRpgTQ9.js → scroll-area-D4DX2ZIG.js} +1 -1
- package/dist/client/assets/{search-input-BHgo2lGV.js → search-input-JdMKjHSx.js} +1 -1
- package/dist/client/assets/{search-toggle-Dd-dflFz.js → search-toggle-pL0dggP1.js} +1 -1
- package/dist/client/assets/{secret-picker-A2PMU4gO.js → secret-picker-BQp7jdXk.js} +1 -1
- package/dist/client/assets/{secrets-D9v5ukDd.js → secrets-oDHSjIYO.js} +1 -1
- package/dist/client/assets/{sections-editor-DWV3GkFv.js → sections-editor-atX3TwPF.js} +1 -1
- package/dist/client/assets/{select-PUQ7cwv_.js → select-DnxgNE4v.js} +1 -1
- package/dist/client/assets/{select-model-Benrx5ds.js → select-model-DXVspEVT.js} +1 -1
- package/dist/client/assets/{seo-editor-DR6dMEeh.js → seo-editor-DNDnxeNs.js} +1 -1
- package/dist/client/assets/{separator-XSPXTmbD.js → separator-2C8rNgYN.js} +1 -1
- package/dist/client/assets/{settings-tab-C9b_gZUS.js → settings-tab-Mf3STlzh.js} +1 -1
- package/dist/client/assets/{sheet-CJnM8ySE.js → sheet-COKPXrMt.js} +1 -1
- package/dist/client/assets/{shell-layout-Dai0p-76.js → shell-layout-BJ2bouq5.js} +1 -1
- package/dist/client/assets/{skills-CpJ2yl_V.js → skills-DO3tbITh.js} +1 -1
- package/dist/client/assets/{slider-DOtGgAh5.js → slider-BrBnaDSJ.js} +1 -1
- package/dist/client/assets/{sortable.esm-igu-P_53.js → sortable.esm-ldWM5mlg.js} +1 -1
- package/dist/client/assets/{sso-CpAigUKO.js → sso-tkyC_08g.js} +1 -1
- package/dist/client/assets/{suggestion-kKk_djZn.js → suggestion-BZNfKCnl.js} +1 -1
- package/dist/client/assets/{switch-C4raYBaD.js → switch-DDSkOeLA.js} +1 -1
- package/dist/client/assets/{symbol-DSyQEkVd.js → symbol-DzwMqsxT.js} +1 -1
- package/dist/client/assets/{synced-repos-DhkSYvjz.js → synced-repos-BkSO5Q1Y.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DbT7H6I0.js → tab-icon-glyph-BuzlFWHk.js} +1 -1
- package/dist/client/assets/{table-ZhEY60SW.js → table-CMK8QC8D.js} +1 -1
- package/dist/client/assets/{tabs-sH7FADTj.js → tabs-B9VR2rbK.js} +1 -1
- package/dist/client/assets/{task-board-Cz8RAkVC.js → task-board--9goOhkE.js} +1 -1
- package/dist/client/assets/{task-route-dAZzlYHx.js → task-route-0VBQiuCM.js} +1 -1
- package/dist/client/assets/{task-status-jzoHxLXE.js → task-status-CNJzd27h.js} +1 -1
- package/dist/client/assets/taskboard-analytics-CM-a1hkv.js +1 -0
- package/dist/client/assets/tasks-F-hM9qNc.js +1 -0
- package/dist/client/assets/{tasks-spnz6wGT.js → tasks-jC2y5QyA.js} +1 -1
- package/dist/client/assets/{textarea-Dh1uG6Oe.js → textarea-V-Ewr6Em.js} +1 -1
- package/dist/client/assets/{thread-analytics-D7o3M7SE.js → thread-analytics-LPGZ7GJl.js} +1 -1
- package/dist/client/assets/{thread-button-CVcG35Zp.js → thread-button-CgW1daN2.js} +1 -1
- package/dist/client/assets/{thread-intent-DHio6v3T.js → thread-intent-BzcsRkEY.js} +1 -1
- package/dist/client/assets/{thread-route-JC5U7UAP.js → thread-route-C6etrVa0.js} +1 -1
- package/dist/client/assets/{thread-route-P2oNmklm.js → thread-route-Dcfq6vF9.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Cb8plLTN.js → thread-sheet-body-BAcB1e7q.js} +1 -1
- package/dist/client/assets/{time-range-picker-BXMVgeAS.js → time-range-picker-DF3Ygb5C.js} +1 -1
- package/dist/client/assets/{toggle-group-BbN_e8eb.js → toggle-group-a4ytF4Oj.js} +1 -1
- package/dist/client/assets/{tool-namespace-CTfr8zMP.js → tool-namespace-DgKSlqBK.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-NKHQPydk.js → toolbar-icon-button-DYnkRqZ7.js} +1 -1
- package/dist/client/assets/{tooltip-Ckfi6awk.js → tooltip-BwqXknMj.js} +1 -1
- package/dist/client/assets/{tooltipContext-DNPFPGFA.js → tooltipContext-BpwAgADs.js} +1 -1
- package/dist/client/assets/{track-CteSCTlH.js → track-8eJZpOmx.js} +1 -1
- package/dist/client/assets/{types-BwEFq7Yg.js → types-uLyd8Klr.js} +1 -1
- package/dist/client/assets/{url-slug-xcarTcti.js → url-slug-DQb0tXSj.js} +1 -1
- package/dist/client/assets/{usage-stats-Dpg2tIh9.js → usage-stats-5hdJRwfv.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BdUdNx5z.js → use-ai-providers-BW9u4951.js} +1 -1
- package/dist/client/assets/{use-automations-J4kPNxTM.js → use-automations-DhHqb9o9.js} +1 -1
- package/dist/client/assets/{use-autosave-vvOEWidH.js → use-autosave-DBs1Dhkn.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-ooCEsZNA.js → use-chat-layout-state-DMre3rzo.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Cs9RLkky.js → use-chat-navigation-OgErkHag.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CXFIi4J4.js → use-clock-tick-BzZc0p17.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DyLCP6sw.js → use-connect-companion-DFtJCq_R.js} +1 -1
- package/dist/client/assets/{use-connection-BWEGKt3t.js → use-connection-DmWKxQIp.js} +1 -1
- package/dist/client/assets/{use-copy-B3Z2bU9n.js → use-copy-yOqXjxUA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CeEgD0KJ.js → use-create-virtual-mcp-DyD0K90B.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BwHZTp1d.js → use-date-fns-locale-CD7FGq8S.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B-RYAOgV.js → use-debounced-autosave-DHlAwbI3.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BPpgN-4m.js → use-debounced-value-DuWNcnXn.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DO7YD9IY.js → use-deco-credits-Bea6ChUy.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DRwe4roK.js → use-decopilot-events-ClCuNwhP.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CP3eQN94.js → use-delete-connection-BHdzlaZN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-xj8zFarX.js → use-deployment-admin-9qJi8NmW.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-_cAiUEgx.js → use-ensure-project-folder-Pz6kG32X.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B4iSUSL0.js → use-fast-preview-draft-url-BcFHzHFy.js} +1 -1
- package/dist/client/assets/{use-file-configs-CayvqTYD.js → use-file-configs-Cnc56owU.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bs5bj_x4.js → use-infinite-scroll-CqsPoGk1.js} +1 -1
- package/dist/client/assets/{use-join-requests-D0a7nWGC.js → use-join-requests-B8p2Zeas.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BV3U-pk7.js → use-main-panel-tabs-C0Ktj2i7.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CGqJtK6Y.js → use-mcp-auth-status-BY6UXdeD.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BpCQxGRA.js → use-mcp-client-DTwq_7MH.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B6BIbud4.js → use-mcp-prompts-CE81wOkK.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BBrUvrr2.js → use-mcp-tools-BDslTiVH.js} +1 -1
- package/dist/client/assets/{use-members-BXZtT1Ge.js → use-members-CmWLwd2e.js} +1 -1
- package/dist/client/assets/{use-mobile-cnelp-tf.js → use-mobile-BD5GPe5Y.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Yt28jbt_.js → use-navigate-to-agent-CiQs8YZp.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-Bi1eoiEH.js +1 -0
- package/dist/client/assets/{use-open-billing-url-Ch7hXR43.js → use-open-billing-url-DVE0afgz.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DQ_TpKIV.js → use-org-auth-client-D907jz51.js} +1 -1
- package/dist/client/assets/{use-org-fs-Dd1pklx8.js → use-org-fs-DC-NuNXo.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-a3Bo4Nwx.js → use-org-repo-syncs-CFHiMPUk.js} +1 -1
- package/dist/client/assets/{use-org-sso-AbZWzz8J.js → use-org-sso-CJ9T2BXL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BbdurYTP.js → use-organization-roles-CRyk_oUV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C9ru61wI.js → use-organization-settings-QfwaDuvt.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DlGjk1uT.js → use-panel-navigate-BQzwPyBR.js} +1 -1
- package/dist/client/assets/{use-project-scope-mUU3XQll.js → use-project-scope-0K714duc.js} +1 -1
- package/dist/client/assets/{use-releases-Rs4UUF42.js → use-releases-DZTFt5jN.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CmuuQULK.js → use-reports-diagnostic-DpILmwBe.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-B_Tbe66F.js → use-sandbox-events-v_kGJN2U.js} +1 -1
- package/dist/client/assets/{use-secrets-zTdjn1K_.js → use-secrets-C-9G8ydk.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CxaSIwgr.js → use-section-preview-base-CmZa6K6g.js} +1 -1
- package/dist/client/assets/{use-tags-DcdzwPHe.js → use-tags-BJbdefCg.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Cq5LBBkL.js → use-task-board-analytics-CILYZiLT.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DV0GzDSl.js → use-task-board-events-CjirQYQ9.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DWyfXvRg.js → use-task-board-item-prs-BIQrUm4A.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D-sN0nLG.js → use-task-board-items-CGAY-jQW.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DH7eHsp7.js → use-task-metadata-DPgHRFmq.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BcaFH3FR.js → use-thread-analytics-xBLnk1IS.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BVWpj6Pt.js → use-thread-outputs-DfvzI16S.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-y40gwZ85.js +1 -0
- package/dist/client/assets/{useQueries-DAsYe7-V.js → useQueries-J6gaISLv.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CQ4v8A2V.js +1 -0
- package/dist/client/assets/{users-BDKuEOgV.js → users-yYj2VUTN.js} +1 -1
- package/dist/client/assets/{utils-B26RJwPU.js → utils-CeckZkhk.js} +1 -1
- package/dist/client/assets/{variant-calendar-B5hD6nTB.js → variant-calendar-kyOtq8lu.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CQDkjZB9.js → variant-matcher-override-5Sa4pTWa.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DgaXBu8I.js → view-mode-toggle-BNtxS74L.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CPDSnrGy.js → virtual-mcp-Baro2XYn.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BFcKHKod.js → watch-sse-pool-LLzHE8XH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/migrate.js +237 -230
- package/dist/server/server.js +585 -585
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D15rL7SC.js +0 -1
- package/dist/client/assets/agent-deck-YSht4fJH.js +0 -1
- package/dist/client/assets/agent-library-De8yrcgK.js +0 -1
- package/dist/client/assets/agent-library-file-DSYip22s.js +0 -1
- package/dist/client/assets/agent-settings-DYAVsnNu.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CPqEQaz5.js +0 -2
- package/dist/client/assets/agent-view-6MnvsGap.js +0 -1
- package/dist/client/assets/api-keys-CIOehITH.js +0 -1
- package/dist/client/assets/app-editor-jDyn4P31.js +0 -1
- package/dist/client/assets/flat-project-CcomIoqo.js +0 -1
- package/dist/client/assets/library-DoTX8yJa.js +0 -1
- package/dist/client/assets/project-reports-BPIYWSN5.js +0 -1
- package/dist/client/assets/project-tasks-D89Pcpsx.js +0 -1
- package/dist/client/assets/record-editor-rZo87T7s.js +0 -1
- package/dist/client/assets/redirect-editor-BebKUMtd.js +0 -1
- package/dist/client/assets/reports-DbXtySYc.js +0 -1
- package/dist/client/assets/route-B-Xt506d.js +0 -1
- package/dist/client/assets/taskboard-analytics-D4etS4F2.js +0 -1
- package/dist/client/assets/tasks-cUD-vzLP.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DleK5Imc.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DTGbHHjG.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CGs3Z4Zs.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-zFizTRgJ.js";import{C as us}from"./index-DqBs1i86.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-D25DK5wS.js";import{n as jt}from"./ShoppingBag01-CFzAExOe.js";import{t as rt}from"./ChevronUp-fo2ERVlh.js";import{e as ys}from"./UserSquare-D5hRO90M.js";import{e as lt,b as Et,t as Ot}from"./Tool01-D47UxjHr.js";import{a as bs}from"./Image01-DQr5z6Eu.js";import{i as vs}from"./SearchMd-D7CH4cEW.js";import{B as Kt}from"./badge-CSXpEa55.js";import{C as Ft}from"./checkbox-CVokasRh.js";import{S as ct}from"./switch-C4raYBaD.js";import{a as Mt,b as Rt,P as Lt}from"./popover-DTEHxwlD.js";import{a as Cs,e as yt,b as Ns,f as Ss,C as ks,c as Ts}from"./command-zNxZAzCt.js";import{g as ws,s as Ds}from"./tool-namespace-CTfr8zMP.js";import{u as dt}from"./use-connection-BWEGKt3t.js";import{u as _s}from"./use-mcp-client-BpCQxGRA.js";import{u as Is}from"./use-mcp-tools-BBrUvrr2.js";import{I as As}from"./integration-icon-Bdyedi1P.js";import{M as Ps}from"./select-model-Benrx5ds.js";import{u as $s}from"./use-ai-providers-BdUdNx5z.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-DSsqKodq.js";import{a as ve,c as Os,d as Ks}from"./use-automations-J4kPNxTM.js";import{b as Fs,a as Ms,g as Rs,t as Ls}from"./chat-context-BvnYD9Wb.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-BpQWnMqu.js";import{b as Bs,T as Gs,a as Hs}from"./tooltip-Ckfi6awk.js";import{a as Js}from"./shell-layout-Dai0p-76.js";import{i as Ut}from"./ArrowLeft-CDSbOlKg.js";import{i as Xs}from"./ArrowUp-DVmGL0QN.js";import{s as qs}from"./Trash01-DjbVg-Gr.js";import{s as mt}from"./XClose-CEtKIB7q.js";import{u as bt}from"./use-debounced-autosave-B-RYAOgV.js";import{T as Ys,a as Qs}from"./input-LrUKUue2.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-C5IDdjgJ.js";import{s as to}from"./Plus-Ch1sG4T5.js";import{i as ut}from"./ZoomOut-CrQxrOGW.js";import{l as Be,H as so}from"./config-zAMyoP2u.js";import{C as oo}from"./task-board-Cz8RAkVC.js";import{M as Wt}from"./multi-select-C64565zf.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-PUQ7cwv_.js";import{b as ao,a as no,T as vt}from"./tabs-sH7FADTj.js";import{a as qe}from"./Copy01-C7JKQ2yo.js";import{M as io}from"./monaco-editor-Cw6bHZ9D.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-CmV9dy9T.js";import{A as ro}from"./automation-runs-Cjsz3sNl.js";import{C as lo}from"./collection-tabs-D1MI1rbf.js";import{a as co}from"./use-panel-navigate-DlGjk1uT.js";import"./use-mobile-cnelp-tf.js";import"./thread-button-CVcG35Zp.js";import"./use-chat-layout-state-ooCEsZNA.js";import"./use-file-configs-CayvqTYD.js";import"./use-organization-settings-C9ru61wI.js";import"./schema-6H-MEggI.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-D4HjFqUu.js";import"./thread-route-P2oNmklm.js";import"./thread-intent-DHio6v3T.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BFcKHKod.js";import"./slugify-CEUa2lfQ.js";import"./sheet-CJnM8ySE.js";import"./toolbar-icon-button-NKHQPydk.js";import"./resizable-aYdS6ucz.js";import"./icon-button-CWnlJ_oZ.js";import"./use-project-scope-mUU3XQll.js";import"./AlertCircle-CHrjAIcc.js";import"./LinkBroken01-CWg3Xs9J.js";import"./Building02-Cjmi-E_Q.js";import"./CheckCircle-DH3xbIup.js";import"./ChevronSelectorVertical-D3--DzuF.js";import"./CreditCard01-DuhJeWgL.js";import"./DotsVertical-CdIsXudQ.js";import"./Globe04-CMhAsYW7.js";import"./SwitchHorizontal01-ZzQSxDu-.js";import"./Key01-DkQjjPwv.js";import"./Link01-CBvOTEVq.js";import"./Monitor01-CawnpOBp.js";import"./Sun-AXWLcql2.js";import"./Play-CHfHT47l.js";import"./Upload01-CongSYMk.js";import"./User01-C0eJYwru.js";import"./Users01-C3nUQ4J2.js";import"./index-BGn4_CUT.js";import"./auth-mnJ9PW01.js";import"./drawer-DL5bFgNR.js";import"./index-DXJRwxmV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Co-052cR.js";import"./autosend-BaSnPt7x.js";import"./use-decopilot-events-DRwe4roK.js";import"./use-chat-navigation-Cs9RLkky.js";import"./location-BjlyegC2.js";import"./index-Cxl4iIy5.js";import"./use-clock-tick-CXFIi4J4.js";import"./project-icon-CLft8LNy.js";import"./new-project-dialog-B0XejRtR.js";import"./label-CGeSw_vU.js";import"./repository-import-picker-D32RWglo.js";import"./use-navigate-to-agent-Yt28jbt_.js";import"./repository-picker-BS8S1A4D.js";import"./useInfiniteQuery-DTGbHHjG.js";import"./infiniteQueryObserver-DR5G3_XI.js";import"./collection-search-CFCYIYsp.js";import"./use-debounced-value-BPpgN-4m.js";import"./required-auth-layout-DV0YP59y.js";import"./use-org-sso-AbZWzz8J.js";import"./suggestion-kKk_djZn.js";import"./usage-stats-Dpg2tIh9.js";import"./form-D_HjHR78.js";import"./utils-CVEq3hMx.js";import"./markdown-Wp7WM_6R.js";import"./use-copy-B3Z2bU9n.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-B6BIbud4.js";import"./use-org-fs-Dd1pklx8.js";import"./core.esm-l5VXFwhd.js";import"./index-BdQq_4o_.js";import"./editor-EMcWHln-.js";import"./table-ZhEY60SW.js";import"./empty-state-Dl0uE1qg.js";import"./use-infinite-scroll-Bs5bj_x4.js";import"./use-members-BXZtT1Ge.js";import"./use-org-auth-client-DQ_TpKIV.js";import"./task-status-jzoHxLXE.js";import"./thread-sheet-body-Cb8plLTN.js";import"./useSuspenseInfiniteQuery-CGs3Z4Zs.js";import"./pair-BArWn6jb.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-D4yJqapi.js";import"./types-BwEFq7Yg.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-BVWpj6Pt.js";import"./file-type-icon-BFUya14p.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-xs_k6Ktz.js";import{C as us}from"./index-GzUyiAtq.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-BZX5a0rN.js";import{n as jt}from"./ShoppingBag01-DMrkFjeJ.js";import{t as rt}from"./ChevronUp-IQvZuGmJ.js";import{e as ys}from"./UserSquare-BAt_wzJ-.js";import{e as lt,b as Et,t as Ot}from"./Tool01-Dx9izhNQ.js";import{a as bs}from"./Image01-Ch6fYTX9.js";import{i as vs}from"./SearchMd-DFKnlLzg.js";import{B as Kt}from"./badge-Djw87oeQ.js";import{C as Ft}from"./checkbox-C6RcKsRC.js";import{S as ct}from"./switch-DDSkOeLA.js";import{a as Mt,b as Rt,P as Lt}from"./popover-CUbGh9FO.js";import{a as Cs,e as yt,b as Ns,f as Ss,C as ks,c as Ts}from"./command-BWDE-FNh.js";import{g as ws,s as Ds}from"./tool-namespace-DgKSlqBK.js";import{u as dt}from"./use-connection-DmWKxQIp.js";import{u as _s}from"./use-mcp-client-DTwq_7MH.js";import{u as Is}from"./use-mcp-tools-BDslTiVH.js";import{I as As}from"./integration-icon-Cx3J1TrD.js";import{M as Ps}from"./select-model-DXVspEVT.js";import{u as $s}from"./use-ai-providers-BW9u4951.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-C53Lrdih.js";import{a as ve,c as Os,d as Ks}from"./use-automations-DhHqb9o9.js";import{b as Fs,a as Ms,g as Rs,t as Ls}from"./chat-context-CBev6aq3.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-Bwspbfl2.js";import{b as Bs,T as Gs,a as Hs}from"./tooltip-BwqXknMj.js";import{a as Js}from"./shell-layout-BJ2bouq5.js";import{i as Ut}from"./ArrowLeft-CG9rYORx.js";import{i as Xs}from"./ArrowUp-t0hf8rM7.js";import{s as qs}from"./Trash01-BTFm5tCg.js";import{s as mt}from"./XClose-DbfrVehX.js";import{u as bt}from"./use-debounced-autosave-DHlAwbI3.js";import{T as Ys,a as Qs}from"./input-BndsYgrN.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-CIrGorhP.js";import{s as to}from"./Plus-CBwPsBC8.js";import{i as ut}from"./ZoomOut-CnrqTNds.js";import{l as Be,H as so}from"./config-C--9g5dZ.js";import{C as oo}from"./task-board--9goOhkE.js";import{M as Wt}from"./multi-select-CcwfeB_X.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-DnxgNE4v.js";import{b as ao,a as no,T as vt}from"./tabs-B9VR2rbK.js";import{a as qe}from"./Copy01-D6HfKiqy.js";import{M as io}from"./monaco-editor-C2uEeF5_.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-DFCHlrdG.js";import{A as ro}from"./automation-runs-C6KynleS.js";import{C as lo}from"./collection-tabs-CqZ0YLaH.js";import{a as co}from"./use-panel-navigate-BQzwPyBR.js";import"./use-mobile-BD5GPe5Y.js";import"./thread-button-CgW1daN2.js";import"./use-chat-layout-state-DMre3rzo.js";import"./use-file-configs-Cnc56owU.js";import"./use-organization-settings-QfwaDuvt.js";import"./schema-BgIvb0Gx.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-DmdeiZmO.js";import"./thread-route-Dcfq6vF9.js";import"./thread-intent-BzcsRkEY.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-LLzHE8XH.js";import"./slugify-CEUa2lfQ.js";import"./sheet-COKPXrMt.js";import"./toolbar-icon-button-DYnkRqZ7.js";import"./resizable-DUdjqiGj.js";import"./icon-button-CH2OxNKZ.js";import"./use-project-scope-0K714duc.js";import"./AlertCircle-D6PAHKjV.js";import"./LinkBroken01-4mWpjTP6.js";import"./Building02-fUucitQx.js";import"./CheckCircle-of-fJlvu.js";import"./ChevronSelectorVertical-lAvz2cuG.js";import"./CreditCard01-D5Mtkf7j.js";import"./DotsVertical-LyDkiB3Q.js";import"./Globe04-LlNkyupL.js";import"./SwitchHorizontal01-JU6fMv1N.js";import"./Key01-CzAYk09-.js";import"./Link01-yIpHC1tA.js";import"./Monitor01-Ou5m5HXM.js";import"./Sun-Bx7SBlM-.js";import"./Play-BeSRLN2O.js";import"./Upload01-Bh-Emxn2.js";import"./User01-CQJ9yvoz.js";import"./Users01-D5wZqDor.js";import"./index-CQZm7V7F.js";import"./auth-CKRkGXX0.js";import"./drawer-DmaKd3D8.js";import"./index-BK3UZ3iw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-D0TV3cL_.js";import"./autosend-CfJ-txst.js";import"./use-decopilot-events-ClCuNwhP.js";import"./use-chat-navigation-OgErkHag.js";import"./location-BjlyegC2.js";import"./index-CN-5kkc7.js";import"./use-clock-tick-BzZc0p17.js";import"./project-icon-D9ZMEkrO.js";import"./new-project-dialog-nyD817-y.js";import"./label-BHQ7fAmu.js";import"./repository-import-picker-CQI4CdeM.js";import"./use-navigate-to-agent-CiQs8YZp.js";import"./repository-picker-BsT7lJxX.js";import"./useInfiniteQuery-y40gwZ85.js";import"./infiniteQueryObserver-7uXBxwIZ.js";import"./collection-search-DaDlBD_E.js";import"./use-debounced-value-DuWNcnXn.js";import"./required-auth-layout-BBSjYqsc.js";import"./use-org-sso-CJ9T2BXL.js";import"./suggestion-BZNfKCnl.js";import"./usage-stats-5hdJRwfv.js";import"./form-Dg_6Hf9j.js";import"./utils-CVEq3hMx.js";import"./markdown-BQE0Sc_A.js";import"./use-copy-yOqXjxUA.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-CE81wOkK.js";import"./use-org-fs-DC-NuNXo.js";import"./core.esm-BqWXbE7p.js";import"./index-BdQq_4o_.js";import"./editor-Clsq2fLP.js";import"./table-CMK8QC8D.js";import"./empty-state-ervoES7F.js";import"./use-infinite-scroll-CqsPoGk1.js";import"./use-members-CmWLwd2e.js";import"./use-org-auth-client-D907jz51.js";import"./task-status-CNJzd27h.js";import"./thread-sheet-body-BAcB1e7q.js";import"./useSuspenseInfiniteQuery-CQ4v8A2V.js";import"./pair-DwD5SdrN.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bl0xOGsc.js";import"./types-uLyd8Klr.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DfvzI16S.js";import"./file-type-icon-poPLKUlK.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"):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(`
|
|
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"):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};
|
|
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(`
|
|
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-
|
|
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-xs_k6Ktz.js";import{C as U}from"./index-GzUyiAtq.js";import{s as W}from"./Plus-CBwPsBC8.js";import{t as X}from"./agent-icon-BZX5a0rN.js";import{i as Y}from"./ZoomOut-CnrqTNds.js";import{S as Z}from"./search-input-JdMKjHSx.js";import{E as $}from"./empty-state-ervoES7F.js";import{u as tt,a as et,b as it}from"./use-automations-DhHqb9o9.js";import{a as ot}from"./use-panel-navigate-BQzwPyBR.js";import{A as st}from"./automation-list-row-CIgywn5_.js";import{b as rt}from"./thread-route-Dcfq6vF9.js";import"./use-mobile-BD5GPe5Y.js";import"./thread-button-CgW1daN2.js";import"./UserSquare-BAt_wzJ-.js";import"./Image01-Ch6fYTX9.js";import"./use-chat-layout-state-DMre3rzo.js";import"./use-file-configs-Cnc56owU.js";import"./use-organization-settings-QfwaDuvt.js";import"./schema-BgIvb0Gx.js";import"./task-board--9goOhkE.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-DmdeiZmO.js";import"./use-mcp-client-DTwq_7MH.js";import"./auth-CKRkGXX0.js";import"./thread-intent-BzcsRkEY.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-LLzHE8XH.js";import"./slugify-CEUa2lfQ.js";import"./sheet-COKPXrMt.js";import"./tooltip-BwqXknMj.js";import"./index-CN-5kkc7.js";import"./toolbar-icon-button-DYnkRqZ7.js";import"./shell-layout-BJ2bouq5.js";import"./avatar-D0TV3cL_.js";import"./User01-CQJ9yvoz.js";import"./Building02-fUucitQx.js";import"./XClose-DbfrVehX.js";import"./use-project-scope-0K714duc.js";import"./CheckCircle-of-fJlvu.js";import"./Monitor01-Ou5m5HXM.js";import"./use-clock-tick-BzZc0p17.js";import"./Tool01-Dx9izhNQ.js";import"./command-BWDE-FNh.js";import"./index-CQZm7V7F.js";import"./SearchMd-DFKnlLzg.js";import"./integration-icon-Cx3J1TrD.js";import"./LinkBroken01-4mWpjTP6.js";import"./project-icon-D9ZMEkrO.js";import"./new-project-dialog-nyD817-y.js";import"./ArrowLeft-CG9rYORx.js";import"./label-BHQ7fAmu.js";import"./repository-import-picker-CQI4CdeM.js";import"./use-navigate-to-agent-CiQs8YZp.js";import"./repository-picker-BsT7lJxX.js";import"./useInfiniteQuery-y40gwZ85.js";import"./infiniteQueryObserver-7uXBxwIZ.js";import"./collection-search-DaDlBD_E.js";import"./ShoppingBag01-DMrkFjeJ.js";import"./use-debounced-value-DuWNcnXn.js";import"./required-auth-layout-BBSjYqsc.js";import"./autosend-CfJ-txst.js";import"./use-org-sso-CJ9T2BXL.js";import"./resizable-DUdjqiGj.js";import"./icon-button-CH2OxNKZ.js";import"./AlertCircle-D6PAHKjV.js";import"./ArrowUp-t0hf8rM7.js";import"./ChevronUp-IQvZuGmJ.js";import"./ChevronSelectorVertical-lAvz2cuG.js";import"./Copy01-D6HfKiqy.js";import"./CreditCard01-D5Mtkf7j.js";import"./DotsVertical-LyDkiB3Q.js";import"./Globe04-LlNkyupL.js";import"./SwitchHorizontal01-JU6fMv1N.js";import"./Key01-CzAYk09-.js";import"./Link01-yIpHC1tA.js";import"./Sun-Bx7SBlM-.js";import"./Play-BeSRLN2O.js";import"./Trash01-BTFm5tCg.js";import"./Upload01-Bh-Emxn2.js";import"./Users01-D5wZqDor.js";import"./badge-Djw87oeQ.js";import"./alert-dialog-DFCHlrdG.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};
|
package/dist/client/assets/{agent-connect-sources-BRvuYQWx.js → agent-connect-sources-BjkrraY5.js}
RENAMED
|
@@ -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-
|
|
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-xs_k6Ktz.js";import{C as D}from"./index-GzUyiAtq.js";import{u as B}from"./use-mcp-client-DTwq_7MH.js";import{C as H,a as J}from"./companion-mcps-section-C3mRXa0s.js";import{c as K}from"./use-connect-companion-DFtJCq_R.js";import{C as v,a as q}from"./connect-layout-CTtD_uUg.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-BQzwPyBR.js";import"./use-mobile-BD5GPe5Y.js";import"./thread-button-CgW1daN2.js";import"./agent-icon-BZX5a0rN.js";import"./AlertCircle-D6PAHKjV.js";import"./Tool01-Dx9izhNQ.js";import"./ArrowUp-t0hf8rM7.js";import"./ArrowLeft-CG9rYORx.js";import"./LinkBroken01-4mWpjTP6.js";import"./ShoppingBag01-DMrkFjeJ.js";import"./ZoomOut-CnrqTNds.js";import"./Building02-fUucitQx.js";import"./CheckCircle-of-fJlvu.js";import"./ChevronUp-IQvZuGmJ.js";import"./ChevronSelectorVertical-lAvz2cuG.js";import"./UserSquare-BAt_wzJ-.js";import"./Copy01-D6HfKiqy.js";import"./CreditCard01-D5Mtkf7j.js";import"./DotsVertical-LyDkiB3Q.js";import"./Image01-Ch6fYTX9.js";import"./Globe04-LlNkyupL.js";import"./SwitchHorizontal01-JU6fMv1N.js";import"./Key01-CzAYk09-.js";import"./Link01-yIpHC1tA.js";import"./Monitor01-Ou5m5HXM.js";import"./Sun-Bx7SBlM-.js";import"./Play-BeSRLN2O.js";import"./Plus-CBwPsBC8.js";import"./SearchMd-DFKnlLzg.js";import"./Trash01-BTFm5tCg.js";import"./Upload01-Bh-Emxn2.js";import"./User01-CQJ9yvoz.js";import"./Users01-D5wZqDor.js";import"./XClose-DbfrVehX.js";import"./use-chat-layout-state-DMre3rzo.js";import"./use-file-configs-Cnc56owU.js";import"./use-organization-settings-QfwaDuvt.js";import"./schema-BgIvb0Gx.js";import"./task-board--9goOhkE.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-DmdeiZmO.js";import"./thread-route-Dcfq6vF9.js";import"./thread-intent-BzcsRkEY.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-LLzHE8XH.js";import"./slugify-CEUa2lfQ.js";import"./sheet-COKPXrMt.js";import"./tooltip-BwqXknMj.js";import"./index-CN-5kkc7.js";import"./toolbar-icon-button-DYnkRqZ7.js";import"./shell-layout-BJ2bouq5.js";import"./avatar-D0TV3cL_.js";import"./use-project-scope-0K714duc.js";import"./use-clock-tick-BzZc0p17.js";import"./command-BWDE-FNh.js";import"./index-CQZm7V7F.js";import"./integration-icon-Cx3J1TrD.js";import"./project-icon-D9ZMEkrO.js";import"./new-project-dialog-nyD817-y.js";import"./label-BHQ7fAmu.js";import"./repository-import-picker-CQI4CdeM.js";import"./use-navigate-to-agent-CiQs8YZp.js";import"./repository-picker-BsT7lJxX.js";import"./useInfiniteQuery-y40gwZ85.js";import"./infiniteQueryObserver-7uXBxwIZ.js";import"./collection-search-DaDlBD_E.js";import"./use-debounced-value-DuWNcnXn.js";import"./required-auth-layout-BBSjYqsc.js";import"./autosend-CfJ-txst.js";import"./use-org-sso-CJ9T2BXL.js";import"./resizable-DUdjqiGj.js";import"./icon-button-CH2OxNKZ.js";import"./auth-CKRkGXX0.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-Dg_6Hf9j.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-J6gaISLv.js";import"./authenticate-and-persist-oauth-hMQu3mut.js";import"./mcp-oauth-DOxWKmTF.js";import"./mcp-oauth-xPr142sb.js";import"./track-8eJZpOmx.js";import"./extract-connection-data-C5DfHTe9.js";import"./connection-BKH2vnra.js";import"./url-slug-DQb0tXSj.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-xs_k6Ktz.js";import{C as j}from"./index-GzUyiAtq.js";import{F as v,H as S}from"./file-share-button-CXVf0V10.js";import{u as k,b as y,e as _}from"./use-org-fs-DC-NuNXo.js";import{S as w}from"./settings-tab-Mf3STlzh.js";import{b as M}from"./thread-route-Dcfq6vF9.js";import"./use-mobile-BD5GPe5Y.js";import"./thread-button-CgW1daN2.js";import"./agent-icon-BZX5a0rN.js";import"./AlertCircle-D6PAHKjV.js";import"./Tool01-Dx9izhNQ.js";import"./ArrowUp-t0hf8rM7.js";import"./ArrowLeft-CG9rYORx.js";import"./LinkBroken01-4mWpjTP6.js";import"./ShoppingBag01-DMrkFjeJ.js";import"./ZoomOut-CnrqTNds.js";import"./Building02-fUucitQx.js";import"./CheckCircle-of-fJlvu.js";import"./ChevronUp-IQvZuGmJ.js";import"./ChevronSelectorVertical-lAvz2cuG.js";import"./UserSquare-BAt_wzJ-.js";import"./Copy01-D6HfKiqy.js";import"./CreditCard01-D5Mtkf7j.js";import"./DotsVertical-LyDkiB3Q.js";import"./Image01-Ch6fYTX9.js";import"./Globe04-LlNkyupL.js";import"./SwitchHorizontal01-JU6fMv1N.js";import"./Key01-CzAYk09-.js";import"./Link01-yIpHC1tA.js";import"./Monitor01-Ou5m5HXM.js";import"./Sun-Bx7SBlM-.js";import"./Play-BeSRLN2O.js";import"./Plus-CBwPsBC8.js";import"./SearchMd-DFKnlLzg.js";import"./Trash01-BTFm5tCg.js";import"./Upload01-Bh-Emxn2.js";import"./User01-CQJ9yvoz.js";import"./Users01-D5wZqDor.js";import"./XClose-DbfrVehX.js";import"./use-chat-layout-state-DMre3rzo.js";import"./use-file-configs-Cnc56owU.js";import"./use-organization-settings-QfwaDuvt.js";import"./schema-BgIvb0Gx.js";import"./task-board--9goOhkE.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-DmdeiZmO.js";import"./use-mcp-client-DTwq_7MH.js";import"./auth-CKRkGXX0.js";import"./use-panel-navigate-BQzwPyBR.js";import"./use-project-scope-0K714duc.js";import"./thread-intent-BzcsRkEY.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-LLzHE8XH.js";import"./slugify-CEUa2lfQ.js";import"./sheet-COKPXrMt.js";import"./tooltip-BwqXknMj.js";import"./index-CN-5kkc7.js";import"./toolbar-icon-button-DYnkRqZ7.js";import"./shell-layout-BJ2bouq5.js";import"./avatar-D0TV3cL_.js";import"./use-clock-tick-BzZc0p17.js";import"./command-BWDE-FNh.js";import"./index-CQZm7V7F.js";import"./integration-icon-Cx3J1TrD.js";import"./project-icon-D9ZMEkrO.js";import"./new-project-dialog-nyD817-y.js";import"./label-BHQ7fAmu.js";import"./repository-import-picker-CQI4CdeM.js";import"./use-navigate-to-agent-CiQs8YZp.js";import"./repository-picker-BsT7lJxX.js";import"./useInfiniteQuery-y40gwZ85.js";import"./infiniteQueryObserver-7uXBxwIZ.js";import"./collection-search-DaDlBD_E.js";import"./use-debounced-value-DuWNcnXn.js";import"./required-auth-layout-BBSjYqsc.js";import"./autosend-CfJ-txst.js";import"./use-org-sso-CJ9T2BXL.js";import"./resizable-DUdjqiGj.js";import"./icon-button-CH2OxNKZ.js";import"./popover-CUbGh9FO.js";import"./extract-connection-data-C5DfHTe9.js";import"./metadata-D72DunRR.js";import"./connection-BKH2vnra.js";import"./url-slug-DQb0tXSj.js";import"./chat-context-CBev6aq3.js";import"./use-decopilot-events-ClCuNwhP.js";import"./use-ai-providers-BW9u4951.js";import"./use-chat-navigation-OgErkHag.js";import"./location-BjlyegC2.js";import"./build-improve-prompt-doc-C53Lrdih.js";import"./empty-state-ervoES7F.js";import"./use-date-fns-locale-CD7FGq8S.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-DOxWKmTF.js";import"./mcp-oauth-xPr142sb.js";import"./alert-dialog-DFCHlrdG.js";import"./textarea-V-Ewr6Em.js";import"./use-connection-DmWKxQIp.js";import"./use-debounced-autosave-DHlAwbI3.js";import"./add-connection-dialog-oB2v8vkB.js";import"./connection-card-BqF_7Vxz.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-DmaKd3D8.js";import"./form-Dg_6Hf9j.js";import"./select-DnxgNE4v.js";import"./index-BdQq_4o_.js";import"./connection-form-helpers-C6ev_pGu.js";import"./authenticate-and-persist-oauth-hMQu3mut.js";import"./collection-tabs-CqZ0YLaH.js";import"./badge-Djw87oeQ.js";import"./use-infinite-scroll-CqsPoGk1.js";import"./useSuspenseInfiniteQuery-CQ4v8A2V.js";import"./file-type-icon-poPLKUlK.js";import"./checkbox-C6RcKsRC.js";import"./search-input-JdMKjHSx.js";import"./use-mcp-auth-status-BY6UXdeD.js";import"./types-uLyd8Klr.js";import"./use-mcp-tools-BDslTiVH.js";import"./use-mcp-prompts-CE81wOkK.js";import"./utils-CVEq3hMx.js";import"./switch-DDSkOeLA.js";import"./scroll-area-D4DX2ZIG.js";import"./optimistic-project-sidebar-views-v1rJRps1.js";import"./virtual-mcp-Baro2XYn.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-BQp7jdXk.js";import"./use-secrets-C-9G8ydk.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};
|