decocms 4.309.4 → 4.309.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/dist/client/assets/{AlertCircle-DnGP1acy.js → AlertCircle-CDf-1fgB.js} +1 -1
  2. package/dist/client/assets/{AreaChart-15uYP_LS.js → AreaChart-TLg-i3WX.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B3Nz-tod.js → ArrowLeft-D4-rSSOO.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BqJQxKKw.js → ArrowUp-CQCcsSr2.js} +1 -1
  5. package/dist/client/assets/{Check-DkdMxHYV.js → Check-7ocjoIXN.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-MqYMdPWy.js → CheckCircle-DphAGsbS.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CDUD8hUj.js → ChevronDown-BR9TODzF.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Bf3nu_D0.js → ChevronRight-9VLaoIJr.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-Bn86C9pd.js → ChevronSelectorVertical-Bn9j0Ema.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DYpkdqYK.js → ChevronUp-C3SQKJxr.js} +1 -1
  11. package/dist/client/assets/{Copy01-BjPFTJNN.js → Copy01-CA6VVU-a.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-CVjC8Fw2.js → CreditCard01-CPKDwF7m.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-D_9wi2eI.js → DotsVertical-OqyOwIiN.js} +1 -1
  14. package/dist/client/assets/{Download01-BBCsiYjT.js → Download01-B_J9t-g9.js} +1 -1
  15. package/dist/client/assets/{Eye-ZMcw8H3v.js → Eye-Be1AmDrH.js} +1 -1
  16. package/dist/client/assets/{FilterLines-cAXfDS_M.js → FilterLines-Co9RKuys.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-BIUoiEY3.js → GitBranch01-DQ70huzz.js} +1 -1
  18. package/dist/client/assets/{Globe01-znZZYX0k.js → Globe01-DHImgLhK.js} +1 -1
  19. package/dist/client/assets/{Globe04-DzRBqxff.js → Globe04-Cw5MzUDE.js} +1 -1
  20. package/dist/client/assets/{HardDrive-BcvqlaPw.js → HardDrive-d5KIOGxl.js} +1 -1
  21. package/dist/client/assets/{Image01-CfH0_A0-.js → Image01-DoxqZuao.js} +1 -1
  22. package/dist/client/assets/{Key01-C2uHKRAw.js → Key01-CC4iAOyg.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-D3L0xAFp.js → LinkExternal01-DBRDc7ru.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-DwYnHh0z.js → LockUnlocked01-Y8Ajlv9q.js} +1 -1
  25. package/dist/client/assets/{LogOut01-CViUeqTF.js → LogOut01-BU2nkldQ.js} +1 -1
  26. package/dist/client/assets/{Monitor01-Co-e7ZC9.js → Monitor01-DVDq_AN5.js} +1 -1
  27. package/dist/client/assets/{Package-C-kLjQDy.js → Package-DFkIznzL.js} +1 -1
  28. package/dist/client/assets/{Palette-3ja1vnUk.js → Palette-Cs8ejiSg.js} +1 -1
  29. package/dist/client/assets/{Play-BQ4lZY5R.js → Play-CNiUPYEL.js} +1 -1
  30. package/dist/client/assets/{Plus-DKNGwR_3.js → Plus-DTvlgSaM.js} +1 -1
  31. package/dist/client/assets/{SearchLg-CA7feztA.js → SearchLg-COOYlmn-.js} +1 -1
  32. package/dist/client/assets/{SearchMd-ggO_8Cxj.js → SearchMd-BATwmNWi.js} +1 -1
  33. package/dist/client/assets/{Settings02-CidkcfX9.js → Settings02-B7XpEMT7.js} +1 -1
  34. package/dist/client/assets/{Share07-BGhsLx6I.js → Share07-C3HLtC_Q.js} +1 -1
  35. package/dist/client/assets/{Shield01-CO2IlC2b.js → Shield01-D69Bdv4o.js} +1 -1
  36. package/dist/client/assets/{Stars01-kAUJgs3A.js → Stars01-DYFaDQqN.js} +1 -1
  37. package/dist/client/assets/{Stars02-CnOB7nrq.js → Stars02-vre0PXyQ.js} +1 -1
  38. package/dist/client/assets/{Sun-BOqzIXEM.js → Sun-uoz2pAN5.js} +1 -1
  39. package/dist/client/assets/{SwitchHorizontal01-Ckl8YCex.js → SwitchHorizontal01-P_l789rh.js} +1 -1
  40. package/dist/client/assets/{Tool01-Ojn0KnQn.js → Tool01-NuHET0TB.js} +1 -1
  41. package/dist/client/assets/{Tool02-C_x2TO6u.js → Tool02-BxEFJxsp.js} +1 -1
  42. package/dist/client/assets/{Trash01-n9YGRMMc.js → Trash01-D1rpDCu6.js} +1 -1
  43. package/dist/client/assets/{TrendUp01-CbOoOs92.js → TrendUp01-CgzeEf72.js} +1 -1
  44. package/dist/client/assets/{Upload01-DdfdP09e.js → Upload01-Dmez9BI0.js} +1 -1
  45. package/dist/client/assets/{User01-DvE2di5p.js → User01-B0HqnS6D.js} +1 -1
  46. package/dist/client/assets/{UserSquare-D0Z8ssNc.js → UserSquare-DZILSTAV.js} +1 -1
  47. package/dist/client/assets/{Users01-KEPLZ7-5.js → Users01-CxE4vnGm.js} +1 -1
  48. package/dist/client/assets/{Users03-4npEzFmG.js → Users03-BBaGsBw5.js} +1 -1
  49. package/dist/client/assets/{XCircle-BTU9BO4w.js → XCircle-Dmf1pYcj.js} +1 -1
  50. package/dist/client/assets/{XClose-CLCIZKgQ.js → XClose-wKxrNwWi.js} +1 -1
  51. package/dist/client/assets/{YAxis-CZARx22A.js → YAxis-DPJItDgf.js} +1 -1
  52. package/dist/client/assets/{Zap-C847fP_t.js → Zap-abXMz_mv.js} +1 -1
  53. package/dist/client/assets/{ZapSquare-BtxJ7J2v.js → ZapSquare-C2dmow5g.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-C1kkPZ0u.js → ZoomOut-D7VGlEjF.js} +1 -1
  55. package/dist/client/assets/{access-gate-BdULYvct.js → access-gate-D2S9OM3c.js} +1 -1
  56. package/dist/client/assets/{agent-icon-C5JTHiRw.js → agent-icon-CC9Z06rN.js} +1 -1
  57. package/dist/client/assets/{agents-list-ooZTs2Lg.js → agents-list-BVZvc8FM.js} +1 -1
  58. package/dist/client/assets/{ai-providers-Bsi2H_y6.js → ai-providers-C9-km9J6.js} +1 -1
  59. package/dist/client/assets/{alert-BW_EWWhZ.js → alert-Cst6ezjG.js} +1 -1
  60. package/dist/client/assets/{alert-dialog-3-OTkFY1.js → alert-dialog-LpLRVXym.js} +1 -1
  61. package/dist/client/assets/{api-keys-Cf0dk4BP.js → api-keys-D317UlzY.js} +1 -1
  62. package/dist/client/assets/{app-editor-D3cF6h1N.js → app-editor-nSzUySwl.js} +1 -1
  63. package/dist/client/assets/{auth-BPX5s0Vm.js → auth-CQnVkfUx.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-DJNG7aK4.js → auth-catchall-D0yT-lCy.js} +1 -1
  65. package/dist/client/assets/{auth-entry-DnU_o5sz.js → auth-entry-DWTITcmy.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-Dre7LsNl.js → auth-split-layout-CZ0FSJXF.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-AXCC5dl_.js → authenticate-and-persist-oauth-o-iFa_kH.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-BzsJTK3j.js → automation-list-row-D2XiQ0CR.js} +1 -1
  69. package/dist/client/assets/{automation-runs-DmFqw7Sv.js → automation-runs-BMT6RTQr.js} +1 -1
  70. package/dist/client/assets/{automations-kKnx-skl.js → automations-CUKppFZR.js} +1 -1
  71. package/dist/client/assets/{avatar-CRiT8NC1.js → avatar-7UTfZX29.js} +1 -1
  72. package/dist/client/assets/{badge-CsPeVHFj.js → badge-CZwiP8Mh.js} +1 -1
  73. package/dist/client/assets/{block-document-CNvmC2Kq.js → block-document-DbHkM1TB.js} +1 -1
  74. package/dist/client/assets/{breadcrumb-DdEhVw_Z.js → breadcrumb-DzAjweTo.js} +1 -1
  75. package/dist/client/assets/{buckets-BwTpWGRr.js → buckets-DCtCUV8P.js} +1 -1
  76. package/dist/client/assets/{bulk-category-panel-Z6X_Bd29.js → bulk-category-panel-CYWkK3zY.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-CS6Yxq4y.js → capability-load-error-CGXxiRab.js} +1 -1
  78. package/dist/client/assets/{cards-C9rwE7Ej.js → cards-DZBwSuFg.js} +1 -1
  79. package/dist/client/assets/{category-editor-CknOLF7F.js → category-editor-DM8JlMMU.js} +1 -1
  80. package/dist/client/assets/{chart-Ce7jjKDM.js → chart-CX1a6FwH.js} +1 -1
  81. package/dist/client/assets/{chat-context-Dbh-bruV.js → chat-context-BNgPtjiy.js} +1 -1
  82. package/dist/client/assets/{checkbox-B7A0aDr6.js → checkbox-DHNi9TwB.js} +1 -1
  83. package/dist/client/assets/{choose-editor-BhIaiZp5.js → choose-editor-CsPYTJY7.js} +1 -1
  84. package/dist/client/assets/{cli-auth-success-DHYPrL-g.js → cli-auth-success-4MfPwO1L.js} +1 -1
  85. package/dist/client/assets/{collection-detail-BLqNA0X6.js → collection-detail-BGI4M6nw.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-CgLLXZoH.js → collection-display-button-BPmR2kYW.js} +1 -1
  87. package/dist/client/assets/{collection-search-Dnv5fYeT.js → collection-search-Cui6cogE.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-Cqvhe3JL.js → collection-table-wrapper--On0bVKc.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-Bth1M6NQ.js → collection-tabs-BdjT08Pp.js} +1 -1
  90. package/dist/client/assets/{command-CzF_J8Ag.js → command-BBzO5i9f.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-C-LXlPZt.js → commerce-onboarding-DKkk70Td.js} +1 -1
  92. package/dist/client/assets/{config-Dz5IpSX3.js → config-CcCsXfrl.js} +1 -1
  93. package/dist/client/assets/{connect-Bw4NcOKt.js → connect-Bt2TdBpw.js} +1 -1
  94. package/dist/client/assets/{connection-B9WbCgEY.js → connection-BoyFskWZ.js} +1 -1
  95. package/dist/client/assets/{connection-card-BxXOuFzF.js → connection-card-CmNObnd0.js} +1 -1
  96. package/dist/client/assets/{connection-detail-YnUPVtF8.js → connection-detail-BpXyrTuw.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-MmYfhH8e.js → connection-form-helpers-DdL2pxwl.js} +1 -1
  98. package/dist/client/assets/{connections-D7_NYkhy.js → connections-4uQoXIUc.js} +1 -1
  99. package/dist/client/assets/{decopilot-sse-pool-DKI6s28K.js → decopilot-sse-pool-CMzBQzG6.js} +1 -1
  100. package/dist/client/assets/{dialog-By1OMlLd.js → dialog-T-Mu83_j.js} +1 -1
  101. package/dist/client/assets/{domain-settings-BsHAV2x3.js → domain-settings-CCeUDvbv.js} +1 -1
  102. package/dist/client/assets/{drawer-BICrQyRI.js → drawer-CC9EmOKr.js} +1 -1
  103. package/dist/client/assets/{dropdown-menu-BsBai0T2.js → dropdown-menu-CzEOfCNw.js} +1 -1
  104. package/dist/client/assets/{editor-CgfBegYV.js → editor-C5VF4tAp.js} +1 -1
  105. package/dist/client/assets/{empty-state-DBOGSoIs.js → empty-state-B5FRHhEP.js} +1 -1
  106. package/dist/client/assets/{extract-connection-data-DYAFh7pP.js → extract-connection-data-CEOmOrIN.js} +1 -1
  107. package/dist/client/assets/{file-explorer-Dn3NG38p.js → file-explorer-Ca958Jp4.js} +1 -1
  108. package/dist/client/assets/{file-type-icon-Co9X71By.js → file-type-icon-DkwHQ_Eh.js} +1 -1
  109. package/dist/client/assets/{folder-icon-DDUlYUiT.js → folder-icon-4LVZL-xj.js} +1 -1
  110. package/dist/client/assets/{form-Ju_Q-XDV.js → form-CKHTMWs_.js} +1 -1
  111. package/dist/client/assets/{general-CDu5UGDq.js → general-VPSFci2V.js} +1 -1
  112. package/dist/client/assets/{github-repo-picker-w0Oci-z0.js → github-repo-picker-CxxRKD0_.js} +1 -1
  113. package/dist/client/assets/{hooks-Nz8YT62S.js → hooks-8AhZo6f9.js} +1 -1
  114. package/dist/client/assets/{index-Buui6vNp.js → index-BK2IH5lq.js} +1 -1
  115. package/dist/client/assets/{index-HtQt8YS_.js → index-BN_X2A_d.js} +1 -1
  116. package/dist/client/assets/{index-C6CbElGZ.js → index-CJfEPO6H.js} +1 -1
  117. package/dist/client/assets/{index-qLUrHFgD.js → index-CQc-SVqm.js} +1 -1
  118. package/dist/client/assets/{index-Dc2E5Xa_.js → index-Cb_yn1Od.js} +1 -1
  119. package/dist/client/assets/{index-k0q2LbOE.js → index-Csu7Z8VS.js} +1 -1
  120. package/dist/client/assets/{index-CKJBHQsC.js → index-DDLPdXPD.js} +1 -1
  121. package/dist/client/assets/{index-9yj-_efP.js → index-DciLlmwa.js} +4 -4
  122. package/dist/client/assets/{index-xcJoz4lD.js → index-Dj-X1D5T.js} +6 -6
  123. package/dist/client/assets/{index-redirect-BIkhM6uX.js → index-redirect-Dy2vR4mC.js} +1 -1
  124. package/dist/client/assets/{infra-billing-Dq3JgTHM.js → infra-billing-BSx4IY_h.js} +1 -1
  125. package/dist/client/assets/{input-BYiGjA16.js → input-DWRx0ZaP.js} +1 -1
  126. package/dist/client/assets/{integration-icon-DY7voJ3z.js → integration-icon-N_ohk-RU.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-BzSwLpJV.js → invite-member-dialog-G71lcmzr.js} +1 -1
  128. package/dist/client/assets/{label-qJzO-3NZ.js → label-BtZvKfUj.js} +1 -1
  129. package/dist/client/assets/{layout-DFIRz4CV.js → layout-Sxsn1C8F.js} +1 -1
  130. package/dist/client/assets/{login-Fg8u_B9v.js → login-DbxvOAjl.js} +1 -1
  131. package/dist/client/assets/{markdown-Cu1RqicG.js → markdown-C51ISfH6.js} +1 -1
  132. package/dist/client/assets/{mcp-oauth-BG0MSbOj.js → mcp-oauth-COIn0o4T.js} +1 -1
  133. package/dist/client/assets/{members-CpTvpVn0.js → members-Bd6RgNpp.js} +1 -1
  134. package/dist/client/assets/{monaco-editor-fwNDZQ7Q.js → monaco-editor-BqC_sy_Z.js} +1 -1
  135. package/dist/client/assets/{monitoring-stats-row-XeBeWt80.js → monitoring-stats-row-Dtw8IQ5i.js} +1 -1
  136. package/dist/client/assets/{multi-select-CM_mnFaD.js → multi-select-C3-ssJvE.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-C7OkTcOx.js → oauth-callback-CpS4Je5K.js} +1 -1
  138. package/dist/client/assets/{oauth-callback-ai-provider-CzXh_BMt.js → oauth-callback-ai-provider-B4kIYL7H.js} +1 -1
  139. package/dist/client/assets/{onboarding-Bq-Y-Rai.js → onboarding-DzETgzsC.js} +1 -1
  140. package/dist/client/assets/{org-layout-DmDoqf2b.js → org-layout-D3Rt7saK.js} +1 -1
  141. package/dist/client/assets/{organization-choice-C75Ebeam.js → organization-choice-Ha4u5ACR.js} +1 -1
  142. package/dist/client/assets/{orgs-qNwJaPip.js → orgs-CMt9i0c1.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-KQUACHYm.js → page-seo-form-DIT5E8vQ.js} +1 -1
  144. package/dist/client/assets/{popover-D12Q3hsw.js → popover-CQgQYm0L.js} +1 -1
  145. package/dist/client/assets/{post-calendar-ChXstb99.js → post-calendar-o91J2Hmz.js} +1 -1
  146. package/dist/client/assets/{post-editor-BJTTp1Sq.js → post-editor-jq6Tcart.js} +1 -1
  147. package/dist/client/assets/{primitives-D4lQjvOm.js → primitives-BiY1_lwr.js} +1 -1
  148. package/dist/client/assets/{profile-Dg6Wc8WU.js → profile-6rw3Ne8p.js} +1 -1
  149. package/dist/client/assets/{project-app-view-B2sTzm44.js → project-app-view-BSY9zNCK.js} +1 -1
  150. package/dist/client/assets/{prompts-BZaCElXx.js → prompts-D5rjNNd8.js} +1 -1
  151. package/dist/client/assets/record-editor-B9kvY5dL.js +1 -0
  152. package/dist/client/assets/redirect-editor-CuYOlyKf.js +1 -0
  153. package/dist/client/assets/registry-BNbCmsdk.js +2 -0
  154. package/dist/client/assets/{registry-layout-CDe_aU90.js → registry-layout-DaufUNP_.js} +1 -1
  155. package/dist/client/assets/{reports-BFGwcbqV.js → reports-BxLLra3c.js} +1 -1
  156. package/dist/client/assets/{require-capability-B8_4GJ6i.js → require-capability-CxO_iVfG.js} +1 -1
  157. package/dist/client/assets/{required-auth-layout-WVN_c_WI.js → required-auth-layout-Dn7mOGYZ.js} +1 -1
  158. package/dist/client/assets/{reset-password-DC-dZCyT.js → reset-password-Cc2bAv7r.js} +1 -1
  159. package/dist/client/assets/{review-settings-P5fEohob.js → review-settings-C2T9zrlI.js} +1 -1
  160. package/dist/client/assets/{roles-CZioiUJo.js → roles-8ZdDEjWD.js} +1 -1
  161. package/dist/client/assets/{scroll-area-DgUosnbo.js → scroll-area-BRzQDw0p.js} +1 -1
  162. package/dist/client/assets/{search-input-6TolHw-_.js → search-input-BRS1SeNv.js} +1 -1
  163. package/dist/client/assets/{secrets-BqUCMbLR.js → secrets-D_gmyKgL.js} +1 -1
  164. package/dist/client/assets/{sections-editor-FNUQWMbn.js → sections-editor-CNNy6khS.js} +1 -1
  165. package/dist/client/assets/{select-D8MMIYvw.js → select-C7dHMUjj.js} +1 -1
  166. package/dist/client/assets/{select-model-BzSvaXGn.js → select-model-L569zV83.js} +1 -1
  167. package/dist/client/assets/{self-tool-result-BUwViT7f.js → self-tool-result-Dh4Aev6w.js} +1 -1
  168. package/dist/client/assets/{seo-editor-COsAk5Ll.js → seo-editor-DaKxazUy.js} +1 -1
  169. package/dist/client/assets/{settings-layout-D53auSi4.js → settings-layout-DbZ2h9rb.js} +1 -1
  170. package/dist/client/assets/{shell-controls-DRiAWf2Y.js → shell-controls-BhFJeYI6.js} +1 -1
  171. package/dist/client/assets/{shell-layout-BDURY_tQ.js → shell-layout-DpdIn9G6.js} +1 -1
  172. package/dist/client/assets/{skill-preview-BI6Vn63W.js → skill-preview-CjbqeA4b.js} +1 -1
  173. package/dist/client/assets/{skills-Bhc8ToyS.js → skills-6KAA7zbt.js} +1 -1
  174. package/dist/client/assets/{spinner-DJZIHGAB.js → spinner-BVVWNq8r.js} +1 -1
  175. package/dist/client/assets/{sso-DE2NWpic.js → sso-Bs4zi20p.js} +1 -1
  176. package/dist/client/assets/{store-CUPkXXJc.js → store-CvjfcyIM.js} +1 -1
  177. package/dist/client/assets/store-registry-BOWcAY3c.js +2 -0
  178. package/dist/client/assets/{super-agent-icon-BHAtqtgH.js → super-agent-icon-BpRzhjH8.js} +1 -1
  179. package/dist/client/assets/{switch-7aQCSPqb.js → switch-DhSIdR_i.js} +1 -1
  180. package/dist/client/assets/{synced-repos-CBPp_FLj.js → synced-repos-Dcb1zpSm.js} +1 -1
  181. package/dist/client/assets/{table-DdAxUuls.js → table-3BAP3nRu.js} +1 -1
  182. package/dist/client/assets/{tabs-eQBH7J4O.js → tabs-CZYV0g18.js} +1 -1
  183. package/dist/client/assets/{task-board-B1tDZ6Y6.js → task-board-BofYkJKh.js} +1 -1
  184. package/dist/client/assets/tasks-BQOxriYC.js +1 -0
  185. package/dist/client/assets/{textarea-CA1EjcBY.js → textarea-Bfs9jOFb.js} +1 -1
  186. package/dist/client/assets/{thread-route-FlzDmsns.js → thread-route-CwzU1Ead.js} +1 -1
  187. package/dist/client/assets/{toggle-group-DdjpkSVY.js → toggle-group-nCsZAWah.js} +1 -1
  188. package/dist/client/assets/{toolbar-DbjdGv64.js → toolbar-B0u9fQTi.js} +1 -1
  189. package/dist/client/assets/{track-CmVLDygP.js → track-BcC0Br5S.js} +1 -1
  190. package/dist/client/assets/{types-C9YWd0t7.js → types-t_EGCMnY.js} +1 -1
  191. package/dist/client/assets/{use-ai-providers-DWD8WkHZ.js → use-ai-providers-B2TnNV5-.js} +1 -1
  192. package/dist/client/assets/{use-api-keys-BwbLqvMc.js → use-api-keys-DD_1cDqz.js} +1 -1
  193. package/dist/client/assets/{use-automations-BK3m2dx1.js → use-automations-CKQ6EyU4.js} +1 -1
  194. package/dist/client/assets/{use-autosave-D9fV3_La.js → use-autosave-CbkxSqfz.js} +1 -1
  195. package/dist/client/assets/{use-connection-CYA3vKPi.js → use-connection-C4Qtd4a2.js} +1 -1
  196. package/dist/client/assets/{use-copy-CfrKZ8FQ.js → use-copy-DSV6b9Nj.js} +1 -1
  197. package/dist/client/assets/{use-create-virtual-mcp-C0L2_2aI.js → use-create-virtual-mcp-DQx4xhi0.js} +1 -1
  198. package/dist/client/assets/{use-debounced-autosave-BFRM8rxv.js → use-debounced-autosave-B_d0dA1g.js} +1 -1
  199. package/dist/client/assets/{use-debounced-value-Y6N7frqu.js → use-debounced-value-B_xEv_PQ.js} +1 -1
  200. package/dist/client/assets/{use-decopilot-events-BG59Z_06.js → use-decopilot-events-CbnRp_ep.js} +1 -1
  201. package/dist/client/assets/{use-delete-connection-ccfZ7JiB.js → use-delete-connection-D3ED6Sbo.js} +1 -1
  202. package/dist/client/assets/{use-deployment-admin-BQaw_Su2.js → use-deployment-admin-DePF1KY6.js} +1 -1
  203. package/dist/client/assets/{use-destination-route-C4B3rB7P.js → use-destination-route-D-qOMxxB.js} +1 -1
  204. package/dist/client/assets/{use-file-configs-BcVtGK8u.js → use-file-configs-nRprTGn8.js} +1 -1
  205. package/dist/client/assets/{use-infinite-scroll-B0JkAD22.js → use-infinite-scroll-5WfwCRZM.js} +1 -1
  206. package/dist/client/assets/{use-join-requests-BwJae0B_.js → use-join-requests-DwXfUzba.js} +1 -1
  207. package/dist/client/assets/{use-mcp-auth-status-CVOAe2_w.js → use-mcp-auth-status-DVpW-QTl.js} +1 -1
  208. package/dist/client/assets/{use-mcp-client-Dymb_X2k.js → use-mcp-client-vvCs8A5I.js} +1 -1
  209. package/dist/client/assets/{use-mcp-tools-DM5N7tXk.js → use-mcp-tools-CRhMhE6W.js} +1 -1
  210. package/dist/client/assets/{use-members-BhZaBhgR.js → use-members-BDggsWhk.js} +1 -1
  211. package/dist/client/assets/{use-navigate-to-agent-md_uuWq9.js → use-navigate-to-agent-CSTEre4d.js} +1 -1
  212. package/dist/client/assets/{use-org-auth-client-Due-ica8.js → use-org-auth-client-B3V2sdnG.js} +1 -1
  213. package/dist/client/assets/{use-org-repo-syncs-DCqmpAs8.js → use-org-repo-syncs-C85L1-LH.js} +1 -1
  214. package/dist/client/assets/{use-org-sso-C40P8X47.js → use-org-sso-C9f69J_l.js} +1 -1
  215. package/dist/client/assets/{use-organization-roles-CS7KpGhK.js → use-organization-roles-BY_-7R4Z.js} +1 -1
  216. package/dist/client/assets/{use-organization-settings-CaWJdZiM.js → use-organization-settings-14ZS51R4.js} +1 -1
  217. package/dist/client/assets/{use-panel-navigate-D9TaUFpw.js → use-panel-navigate-Dg50gg4z.js} +1 -1
  218. package/dist/client/assets/{use-registry-connections-O51l0Ceg.js → use-registry-connections-CE2qAPU4.js} +1 -1
  219. package/dist/client/assets/{use-secrets-BKU7R_ak.js → use-secrets-DJ7LOxFA.js} +1 -1
  220. package/dist/client/assets/{use-section-preview-base-C2v1TOXC.js → use-section-preview-base-BKLlkepe.js} +1 -1
  221. package/dist/client/assets/{use-status-sounds-Bio2Kb5H.js → use-status-sounds-D4apeuQF.js} +1 -1
  222. package/dist/client/assets/{use-tags-DuriMJYt.js → use-tags-CZFhmeee.js} +1 -1
  223. package/dist/client/assets/{use-view-mode-CzU-Btbw.js → use-view-mode-s4yxu7Me.js} +1 -1
  224. package/dist/client/assets/{use-virtual-mcp-B4IBLcu-.js → use-virtual-mcp-J8dDcIjt.js} +1 -1
  225. package/dist/client/assets/useInfiniteQuery-C3K_2WOD.js +1 -0
  226. package/dist/client/assets/useSuspenseInfiniteQuery-B7N9im0E.js +1 -0
  227. package/dist/client/assets/{users-BaRu5QbM.js → users-VP31pQeM.js} +1 -1
  228. package/dist/client/assets/{variant-calendar-Bd5vr6qm.js → variant-calendar-BByPJakV.js} +1 -1
  229. package/dist/client/assets/{view-mode-toggle-DQr1tlxF.js → view-mode-toggle-TOrAfdxo.js} +1 -1
  230. package/dist/client/index.html +1 -1
  231. package/dist/server/cli.js +601 -601
  232. package/dist/server/server.js +430 -430
  233. package/package.json +1 -1
  234. package/dist/client/assets/record-editor-J1oL-Eyt.js +0 -1
  235. package/dist/client/assets/redirect-editor-C3Kjxesf.js +0 -1
  236. package/dist/client/assets/registry-DQ-lHxoa.js +0 -2
  237. package/dist/client/assets/store-registry-D0kW4xMr.js +0 -2
  238. package/dist/client/assets/tasks-B_DULIhB.js +0 -1
  239. package/dist/client/assets/useInfiniteQuery-DonsTFzn.js +0 -1
  240. package/dist/client/assets/useSuspenseInfiniteQuery-CbAWucZ8.js +0 -1
@@ -1 +1 @@
1
- import{c as O,H as oe,o as ke,K as Ae,b as F,j as t,C as Gt,av as Xt,B as te,r as R,bO as Qt,d as ot,w as Wt,n as H,a as re,t as K,y as Yt,k as Ie,a5 as gt,M as ht,q as B,_ as pt,Z as xt,Y as Zt,a8 as Ce,a9 as ye,ab as Ne,L as Jt,G as en,aw as tn,ax as nn,R as sn,I as on,p as an,ac as ln}from"./index-9yj-_efP.js";import{m as ct,u as cn}from"./use-mcp-client-Dymb_X2k.js";import{C as jt,g as rn,W as dn,S as vt,a as bt,i as un,d as mn,f as fn}from"./constants-dLUUoWH7.js";import{D as gn}from"./use-destination-route-C4B3rB7P.js";import{d as rt,C as hn}from"./self-tool-result-BUwViT7f.js";import{i as pn}from"./ChevronRight-Bf3nu_D0.js";import{aG as xn,M as jn,A as Ct,H as vn,s as Je}from"./agent-icon-C5JTHiRw.js";import{b as yt,d as bn,e as Nt}from"./thread-route-FlzDmsns.js";import{t as wt}from"./ChevronDown-CDUD8hUj.js";import{u as _t,a as Cn}from"./use-virtual-mcp-B4IBLcu-.js";import{a as Re,b as St,P as Dt}from"./popover-D12Q3hsw.js";import{i as Ve}from"./Check-DkdMxHYV.js";import{s as we}from"./Plus-DKNGwR_3.js";import{i as kt}from"./SearchMd-ggO_8Cxj.js";import{s as It}from"./XClose-CLCIZKgQ.js";import{T as At}from"./toolbar-DbjdGv64.js";import{D as Tt,a as Pt,b as Ot,c as yn,g as Nn,e as wn,f as _n}from"./drawer-BICrQyRI.js";import{a as Sn,G as Dn}from"./github-repo-picker-w0Oci-z0.js";import{g as kn,a as In,b as zt}from"./hooks-Nz8YT62S.js";import{u as An,g as Tn,a as Pn,b as On,f as zn}from"./use-navigate-to-agent-md_uuWq9.js";import{g as Mn,a as Mt}from"./agent-capabilities-B52k7xCe.js";import{u as $t}from"./shell-layout-BDURY_tQ.js";import{d as $n}from"./session-runtime-C-KTDVeQ.js";import{C as Fn}from"./collection-search-Dnv5fYeT.js";import{g as Ln,a as En,b as Bn,e as Rn}from"./extract-connection-data-DYAFh7pP.js";import{u as Ft,a as Lt,g as Vn,C as et}from"./connection-card-BxXOuFzF.js";import{e as Et,d as Bt,a as Rt,b as Vt,h as Kn,c as Hn}from"./dialog-By1OMlLd.js";import{d as W,a as Y,e as Z,b as J,c as ee,F as dt}from"./form-Ju_Q-XDV.js";import{I as ce}from"./input-BYiGjA16.js";import{S as Un,a as qn,b as Gn,c as Xn,d as De}from"./select-D8MMIYvw.js";import{T as Qn}from"./textarea-CA1EjcBY.js";import{b as Kt}from"./use-connection-CYA3vKPi.js";import{n as Be,i as tt}from"./Tool02-C_x2TO6u.js";import{e as Wn}from"./UserSquare-D0Z8ssNc.js";import{c as Yn,i as Le,a as ut,E as Zn,p as Jn,b as es,d as ts}from"./connection-form-helpers-MmYfhH8e.js";import{a as nt}from"./authenticate-and-persist-oauth-AXCC5dl_.js";import{g as ns}from"./connection-slug-CITJ0kGN.js";import{C as ss}from"./collection-tabs-Bth1M6NQ.js";import{u as mt}from"./use-infinite-scroll-B0JkAD22.js";import{B as Ee}from"./badge-CsPeVHFj.js";import{u as os}from"./useSuspenseInfiniteQuery-CbAWucZ8.js";import{g as Ke}from"./metadata-dUsYcpuu.js";import{u as is}from"./use-ai-providers-DWD8WkHZ.js";function as(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const ls=2e4;function cs(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Go(){const n=O.c(19),{org:e}=oe(),s=dn.COMMERCE_DISCOVERY(e.id);let o;n[0]!==e.id||n[1]!==e.slug?(o=ct({connectionId:vt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=o):o=n[2];const{data:a}=ke(o),i=ke({queryKey:Ae.commerceDiscoveryConnection(e.id,s),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const S=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return rt(S)}}),l=i.data?.item??null,{data:c}=ke({...ct({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!l}),r=Ae.commerceDiscoveryDiagnostic(e.id,s),u=!!c;let m;n[3]!==c?(m=async()=>{if(!c)throw new Error("cdClient not ready");const S=await c.callTool({name:jt,arguments:{}});return rt(S).diagnostic??null},n[3]=c,n[4]=m):m=n[4];let f;n[5]!==r||n[6]!==u||n[7]!==m?(f={queryKey:r,enabled:u,retry:1,refetchInterval:rs,queryFn:m},n[5]=r,n[6]=u,n[7]=m,n[8]=f):f=n[8];const d=ke(f),g=l?.metadata?.siteUrl,b=d.data??null,h=d.isSuccess,p=i.isPending||!!l&&d.isPending,j=typeof g=="string"&&g?g:null;let v;n[9]!==g?(v=cs(g),n[9]=g,n[10]=v):v=n[10];const C=c??null;let _;return n[11]!==s||n[12]!==d.isSuccess||n[13]!==C||n[14]!==b||n[15]!==p||n[16]!==j||n[17]!==v?(_={diagnostic:b,isSuccess:h,isLoading:p,siteUrl:j,host:v,connectionId:s,cdClient:C},n[11]=s,n[12]=d.isSuccess,n[13]=C,n[14]=b,n[15]=p,n[16]=j,n[17]=v,n[18]=_):_=n[18],_}function rs(n){return n.state.status!=="error"&&as(n.state.data)==="generating"?ls:!1}function Xo(n,e){return{to:gn.agents,params:{org:n.slug,project:rn(n.id),panel:"app"},search:{connection:e,tool:jt}}}const ds="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function us(){const n=O.c(13),e=F();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:ds,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let l;n[6]!==e?(l=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=l):l=n[7];let c;n[8]!==l?(c=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:l})]}),n[8]=l,n[9]=c):c=n[9];let r;return n[10]!==a||n[11]!==c?(r=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,c]}),n[10]=a,n[11]=c,n[12]=r):r=n[12],r}function ms(){const n=O.c(19),e=F();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:xn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Gt,label:a},n[6]=a,n[7]=i):i=n[7];let l;n[8]!==e?(l=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=l):l=n[9];let c;n[10]!==l?(c={Icon:jn,label:l},n[10]=l,n[11]=c):c=n[11];let r;n[12]!==o||n[13]!==i||n[14]!==c?(r=[o,i,c],n[12]=o,n[13]=i,n[14]=c,n[15]=r):r=n[15];const u=r;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(fs)})]}),n[17]=u,n[18]=f):f=n[18],f}function fs(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function Qo(n){const e=O.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,l=F(),c=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let r;e[0]!==a||e[1]!==l?(r=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":l("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Xt,{size:18})}),e[0]=a,e[1]=l,e[2]=r):r=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==c||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(pn,{size:16,className:"shrink-0 text-foreground/25"}),c&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:c,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=c,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let g;e[10]!==o?(g=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=g):g=e[11];let b;e[12]!==i||e[13]!==d||e[14]!==g?(b=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,g]}),e[12]=i,e[13]=d,e[14]=g,e[15]=b):b=e[15];let h,p;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),p=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=h,e[17]=p):(h=e[16],p=e[17]);let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[h,p,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(us,{}),t.jsx("div",{className:"flex-1"}),t.jsx(ms,{})]})]}),e[18]=j):j=e[18];let v;return e[19]!==r||e[20]!==b?(v=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[r,b,j]}),e[19]=r,e[20]=b,e[21]=v):v=e[21],v}function Wo(n){const e=O.c(5),{ready:s,pending:o,label:a,onClick:i,children:l}=n,c=o||!s,r=s&&!o?l:null;let u;return e[0]!==a||e[1]!==i||e[2]!==c||e[3]!==r?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:c,children:[a,r]}),e[0]=a,e[1]=i,e[2]=c,e[3]=r,e[4]=u):u=e[4],u}function Ht(){const n=R.useContext(Qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function gs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function it(n){const e=O.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",l=a==="xs"?"text-[9px]":"text-xs";let c;e[0]!==i?(c=H(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=c):c=e[1];let r;e[2]!==s.logo||e[3]!==s.name?(r=s.logo?void 0:gs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=r):r=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:H("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let m;return e[9]!==c||e[10]!==r||e[11]!==u?(m=t.jsx("div",{className:c,style:r,children:u}),e[9]=c,e[10]=r,e[11]=u,e[12]=m):m=e[12],m}function hs({invitation:n,onChanged:e}){const s=F(),[o,a]=R.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),l=async()=>{a(!0);try{const u=await re.organization.acceptInvitation({invitationId:n.id});if(u.error){K.error(u.error.message),a(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}K.success(s("header.orgSwitcher.joined",{name:i})),Yt();let r;try{r=(await re.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=r?`/${r}`:"/"},c=async()=>{a(!0);try{const r=await re.organization.rejectInvitation({invitationId:n.id});if(r.error){K.error(r.error.message),a(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{K.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(it,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:l,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:c,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(It,{size:14})})]})]})}function ps(n){const e=O.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=F(),{data:l}=Wt(),{invitations:c,refetch:r}=Ht();let u;e[0]!==s?(u=(k,A)=>k.slug===s?-1:A.slug===s?1:k.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...l??[]].sort(u),[f,d]=R.useState(""),g=f.toLowerCase(),b=g?m.filter(k=>k.name.toLowerCase().includes(g)||k.slug.toLowerCase().includes(g)):m;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(kt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=h):h=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=k=>d(k.target.value),e[3]=p):p=e[3];let j;e[4]!==f?(j=k=>k.key==="Escape"&&f&&d(""),e[4]=f,e[5]=j):j=e[5];let v;e[6]!==i?(v=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=v):v=e[7];let C;e[8]!==f||e[9]!==j||e[10]!==v?(C=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:p,onKeyDown:j,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=j,e[10]=v,e[11]=C):C=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(we,{size:16}),e[12]=_):_=e[12];let S;e[13]!==a?(S=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:_}),e[13]=a,e[14]=S):S=e[14];let I;e[15]!==C||e[16]!==S?(I=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[h,C,S]}),e[15]=C,e[16]=S,e[17]=I):I=e[17];const L="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let x;e[18]!==c||e[19]!==f||e[20]!==r?(x=!f&&c.map(k=>t.jsx(hs,{invitation:k,onChanged:r},k.id)),e[18]=c,e[19]=f,e[20]=r,e[21]=x):x=e[21];const D=b.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let P;e[22]!==o||e[23]!==s?(P=k=>t.jsxs("button",{type:"button",onClick:()=>o(k.slug),className:H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(it,{org:k,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===s&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=o,e[23]=s,e[24]=P):P=e[24];const N=b.map(P);let y;e[25]!==x||e[26]!==D||e[27]!==N?(y=t.jsxs("div",{className:L,children:[x,D,N]}),e[25]=x,e[26]=D,e[27]=N,e[28]=y):y=e[28];let T;return e[29]!==y||e[30]!==I?(T=t.jsxs(t.Fragment,{children:[I,y]}),e[29]=y,e[30]=I,e[31]=T):T=e[31],T}function xs(n){const e=O.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,l=a===void 0?"start":a,c=i===void 0?"bottom":i,r=ot(),[u,m]=R.useState(!1),[f,d]=R.useState(!1);let g;e[0]!==s?(g=t.jsx(Re,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const b=String(u);let h;e[2]!==r?(h=I=>{m(!1),r({to:"/$org",params:{org:I}})},e[2]=r,e[3]=h):h=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{m(!1),d(!0)},e[4]=p):p=e[4];let j;e[5]!==o||e[6]!==b||e[7]!==h?(j=t.jsx(ps,{orgParam:o,onSelectOrg:h,onCreateOrg:p},b),e[5]=o,e[6]=b,e[7]=h,e[8]=j):j=e[8];let v;e[9]!==l||e[10]!==c||e[11]!==j?(v=t.jsx(St,{side:c,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:vs,onCloseAutoFocus:js,children:j}),e[9]=l,e[10]=c,e[11]=j,e[12]=v):v=e[12];let C;e[13]!==u||e[14]!==g||e[15]!==v?(C=t.jsxs(Dt,{open:u,onOpenChange:m,children:[g,v]}),e[13]=u,e[14]=g,e[15]=v,e[16]=C):C=e[16];let _;e[17]!==f?(_=t.jsx(hn,{open:f,onOpenChange:d}),e[17]=f,e[18]=_):_=e[18];let S;return e[19]!==_||e[20]!==C?(S=t.jsxs(t.Fragment,{children:[C,_]}),e[19]=_,e[20]=C,e[21]=S):S=e[21],S}function js(n){return n.preventDefault()}function vs(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function bs(n){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:c,disabled:r}=n,u=a===void 0?"Search...":a;let m;e[0]!==l?(m=H("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=m):m=e[1];const f=r?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=H("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let g;e[4]!==c?(g=c?t.jsx(Ie,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=g):g=e[5];let b;e[6]!==o?(b=v=>o(v.target.value),e[6]=o,e[7]=b):b=e[7];let h;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==b||e[12]!==s?(h=t.jsx("input",{type:"text",value:s,onChange:b,onKeyDown:i,placeholder:u,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=r,e[9]=i,e[10]=u,e[11]=b,e[12]=s,e[13]=h):h=e[13];let p;e[14]!==d||e[15]!==g||e[16]!==h?(p=t.jsxs("label",{className:d,children:[g,h]}),e[14]=d,e[15]=g,e[16]=h,e[17]=p):p=e[17];let j;return e[18]!==m||e[19]!==p?(j=t.jsx("div",{className:m,children:p}),e[18]=m,e[19]=p,e[20]=j):j=e[20],j}function Cs(n,e,s){if(!s)return null;const o=kn(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function ys(n){const e=O.c(6),{value:s,onChange:o}=n,a=F();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(bs,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function Ns(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function ws(n){const e=O.c(10),{org:s,onClose:o}=n,a=F();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let r;return e[6]!==i||e[7]!==l||e[8]!==c?(r=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Jt,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=i,e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function _s(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ut,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ss(n){const e=O.c(11),{onImportFromGithub:s}=n,o=F();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Dn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let r;return e[8]!==l||e[9]!==c?(r=t.jsx(Ut,{action:l,children:c}),e[8]=l,e[9]=c,e[10]=r):r=e[10],r}function Ds(n){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=n,a=F();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H(o),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==s?(c=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{className:"size-4"}),e[6]=r):r=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==c?(u=t.jsx(At,{"aria-label":i,className:l,onClick:c,children:r}),e[7]=i,e[8]=l,e[9]=c,e[10]=u):u=e[10],u}function ks(n){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=F();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=H(a),e[3]=a,e[4]=c):c=e[4];let r;e[5]!==s?(r=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=r):r=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==f?(d=t.jsx(pt,{children:t.jsxs(xt,{tooltip:l,className:c,onClick:r,children:[u,f]})}),e[12]=l,e[13]=c,e[14]=r,e[15]=f,e[16]=d):d=e[16],d}function Is(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ot,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function As(n){const e=O.c(8),{emptyCtaClass:s}=n,o=F();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=H(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==i?(c=t.jsx(At,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Ts(n){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=F();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=H(a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{}),e[5]=r):r=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==l||e[11]!==c||e[12]!==m?(f=t.jsx(Re,{asChild:!0,children:t.jsxs(xt,{tooltip:l,className:c,children:[r,m]})}),e[10]=l,e[11]=c,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let g;return e[17]!==d?(g=t.jsx(pt,{children:d}),e[17]=d,e[18]=g):g=e[18],g}function Ps(n){const e=O.c(9),{children:s}=n,o=F();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==a||e[7]!==l?(c=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=c):c=e[8],c}function Os(n){const e=ot(),{create:s}=In(),{locator:o}=oe(),a=yt(),i=bn();return async l=>{const c=crypto.randomUUID(),r=l===i?Cs(n,o,a??""):null;try{await s({id:c,virtual_mcp_id:l,...r?{branch:r}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:c},search:{virtualmcpid:l}})}}function st(n){const e=O.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(Ct,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let r;e[5]!==s.title?(r=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=r):r=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==r||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,u]}),e[9]=r,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:l,children:[c,m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function Ut(n){const e=O.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function zs(n){const e=O.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,c]=R.useState(""),r=_t(),u=r??[],{org:m}=oe(),{data:f}=re.useSession(),d=f?.user?.id??"anon",g=Tn(r),b=Pn(),h=Os(m.slug),p=Mn(r),j=l.toLowerCase(),v=u.filter(Ls).filter($=>!p.has($.id)).filter(Fs).filter($=>!l||$.title.toLowerCase().includes(j)),C=v.filter($s),_=v.filter(Ms),S=bt(m.id),I=!l||S.title.toLowerCase().includes(j),L=!!(o&&I);let x;e[0]!==s||e[1]!==o?(x=()=>{o?.(null),s(),c("")},e[0]=s,e[1]=o,e[2]=x):x=e[2];const D=x,P=$=>{if(o){o($.id),s(),c("");return}On({orgId:m.id,userId:d},$.id,g),b(),s(),c(""),h($.id)},N="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==l?(y=t.jsx(ys,{value:l,onChange:c}),e[3]=l,e[4]=y):y=e[4];const T="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",k=o&&I&&S&&t.jsx(st,{agent:S,selected:!a||a===S.id,onClick:D}),A=(C.length>0||!l)&&t.jsx(Ss,{onImportFromGithub:i}),z=C.map($=>t.jsx(st,{agent:$,selected:o?a===$.id:void 0,onClick:()=>P($)},$.id)),V=_.length>0&&t.jsx(_s,{}),X=_.map($=>t.jsx(st,{agent:$,selected:o?a===$.id:void 0,onClick:()=>P($)},$.id));let E;e[5]!==L||e[6]!==l||e[7]!==v.length?(E=v.length===0&&!L&&l&&t.jsx(Ns,{}),e[5]=L,e[6]=l,e[7]=v.length,e[8]=E):E=e[8];let ne;e[9]!==E||e[10]!==k||e[11]!==A||e[12]!==z||e[13]!==V||e[14]!==X?(ne=t.jsxs("div",{className:T,children:[k,A,z,V,X,E]}),e[9]=E,e[10]=k,e[11]=A,e[12]=z,e[13]=V,e[14]=X,e[15]=ne):ne=e[15];let q;e[16]!==s||e[17]!==m?(q=t.jsx(ws,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=q):q=e[18];let de;return e[19]!==ne||e[20]!==q||e[21]!==y?(de=t.jsxs("div",{className:N,children:[y,ne,q]}),e[19]=ne,e[20]=q,e[21]=y,e[22]=de):de=e[22],de}function Ms(n){return!Mt(n.metadata)}function $s(n){return Mt(n.metadata)}function Fs(n){return!mn(n.id)}function Ls(n){return!un(n.id)}function Es(n){const e=O.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:l,side:c,align:r}=s,u=o===void 0?!1:o,m=c===void 0?"right":c,f=r===void 0?"start":r,[d,g]=R.useState(!1),[b,h]=R.useState(!1),p=gt(),{setOpenMobile:j}=ht(),v=An(),C=v?"border border-border":void 0;let _;e[2]!==v?(_=A=>v?t.jsx(Ps,{children:A}):A,e[2]=v,e[3]=_):_=e[3];const S=_;let I;e[4]!==p||e[5]!==j?(I=()=>{g(!1),p&&j(!1)},e[4]=p,e[5]=j,e[6]=I):I=e[6];const L=I;let x;e[7]!==L?(x=()=>{L(),h(!0)},e[7]=L,e[8]=x):x=e[8];const D=x;let P;e[9]!==L||e[10]!==D||e[11]!==i||e[12]!==d||e[13]!==l?(P=d&&t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Zt,{className:"h-4 w-24"})}),children:t.jsx(zs,{onClose:L,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:D})}),e[9]=L,e[10]=D,e[11]=i,e[12]=d,e[13]=l,e[14]=P):P=e[14];const N=P;let y;e[15]!==f||e[16]!==u||e[17]!==C||e[18]!==v||e[19]!==p||e[20]!==d||e[21]!==N||e[22]!==m||e[23]!==a||e[24]!==S?(y=p?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:a}):u?S(t.jsx(Ds,{setOpen:g,emptyCtaClass:C})):t.jsx(ks,{setOpen:g,highlightEmpty:v,emptyCtaClass:C}),t.jsx(Tt,{open:d,onOpenChange:g,direction:"bottom",children:t.jsxs(Pt,{className:"max-h-[85dvh] p-0",children:[t.jsx(Is,{}),N]})})]}):t.jsxs(Dt,{open:d,onOpenChange:A=>{A&&!d&&B("agent_browser_opened",{surface:"desktop_popover"}),g(A)},children:[a?t.jsx(Re,{asChild:!0,children:a}):u?S(t.jsx(Re,{asChild:!0,children:t.jsx(As,{emptyCtaClass:C})})):t.jsx(Ts,{wrapEmptyHint:S,highlightEmpty:v,emptyCtaClass:C}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:N})]}),e[15]=f,e[16]=u,e[17]=C,e[18]=v,e[19]=p,e[20]=d,e[21]=N,e[22]=m,e[23]=a,e[24]=S,e[25]=y):y=e[25];let T;e[26]!==b?(T=t.jsx(Sn,{open:b,onOpenChange:h,mode:"agent"}),e[26]=b,e[27]=T):T=e[27];let k;return e[28]!==T||e[29]!==y?(k=t.jsxs(t.Fragment,{children:[y,T]}),e[28]=T,e[29]=y,e[30]=k):k=e[30],k}function Bs(){const n=O.c(2),e=_t()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?$n(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Rs="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Vs(n){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=F(),c=Cn(s)??o??null;let r,u,m,f,d;e[0]!==c?.title||e[1]!==a||e[2]!==l?(d=c?.title??l("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",r="button",u=a,m=l("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=l,e[3]=r,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(r=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const g=c?.icon??null;let b;e[8]!==g||e[9]!==d?(b=t.jsx(Ct,{icon:g,name:d,size:"xs"}),e[8]=g,e[9]=d,e[10]=b):b=e[10];let h;e[11]!==r||e[12]!==u||e[13]!==m||e[14]!==b?(h=t.jsx("button",{type:r,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:b}),e[11]=r,e[12]=u,e[13]=m,e[14]=b,e[15]=h):h=e[15];let p;e[16]!==d?(p=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=p):p=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(wt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let v;e[19]!==p?(v=t.jsxs("button",{type:"button",className:Rs,children:[p,j]}),e[19]=p,e[20]=v):v=e[20];let C;e[21]!==s||e[22]!==i||e[23]!==v?(C=t.jsx(Es,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:v}),e[21]=s,e[22]=i,e[23]=v,e[24]=C):C=e[24];let _;return e[25]!==C||e[26]!==f||e[27]!==h?(_=t.jsxs("div",{className:f,children:[h,C]}),e[25]=C,e[26]=f,e[27]=h,e[28]=_):_=e[28],_}function Yo(n){const e=O.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=F(),{org:i}=oe(),{state:l,isMobile:c}=ht(),r=Ht().invitations.length>0,u=l==="collapsed"||c;let m;e[2]!==r||e[3]!==i.name||e[4]!==a?(m=r?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=r,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(it,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==r||e[9]!==u?(d=r&&t.jsx("span",{className:H("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=r,e[9]=u,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==d?(g=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=g):g=e[13];let b;e[14]!==i.name||e[15]!==o?(b=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=b):b=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(wt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=h):h=e[17];let p;e[18]!==m||e[19]!==g||e[20]!==b?(p=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,b,h]})}),e[18]=m,e[19]=g,e[20]=b,e[21]=p):p=e[21];let j;e[22]!==i.slug||e[23]!==p?(j=t.jsx(xs,{orgParam:i.slug,trigger:p}),e[22]=i.slug,e[23]=p,e[24]=j):j=e[24];let v;e[25]!==i.name?(v=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=v):v=e[26];let C;return e[27]!==v||e[28]!==j?(C=t.jsxs(Ne,{children:[j,v]}),e[27]=v,e[28]=j,e[29]=C):C=e[29],C}function Zo(n){const e=O.c(21);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=oe(),{threads:i}=zt(),{data:l}=re.useSession(),{setTaskId:c,createNewTask:r}=$t(),u=Bs();let m;e[2]!==a.id?(m=bt(a.id),e[2]=a.id,e[3]=m):m=e[3];const f=m,d=f.id,g=Nt();let b;e[4]!==r||e[5]!==d||e[6]!==o||e[7]!==u||e[8]!==l?.user?.id||e[9]!==c||e[10]!==i?(b=_=>{const S=_??d,I=zn(i,S,l?.user?.id,u(S));I?c(I.id,S):r(S),o?.()},e[4]=r,e[5]=d,e[6]=o,e[7]=u,e[8]=l?.user?.id,e[9]=c,e[10]=i,e[11]=b):b=e[11];const h=b;let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[12]=p):p=e[12];const j=g===d?f:void 0;let v;e[13]!==g||e[14]!==h?(v=()=>h(g),e[13]=g,e[14]=h,e[15]=v):v=e[15];let C;return e[16]!==g||e[17]!==h||e[18]!==j||e[19]!==v?(C=t.jsx(R.Suspense,{fallback:p,children:t.jsx(Vs,{agentId:g,fallback:j,onOpenHome:v,onPick:h})}),e[16]=g,e[17]=h,e[18]=j,e[19]=v,e[20]=C):C=e[20],C}function Jo(){const n=O.c(20),e=F(),{threads:s}=zt(),{createNewTask:o}=$t(),a=Nt(),i=yt();let l;n[0]!==i||n[1]!==s?(l=s.find(p=>p.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const c=l;let r;n[3]!==a||n[4]!==o||n[5]!==c?(r=()=>{o(a,c)},n[3]=a,n[4]=o,n[5]=c,n[6]=r):r=n[6];const u=r;let m;n[7]!==e?(m=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=m):m=n[8];let f;n[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(vn,{size:16}),n[9]=f):f=n[9];let d;n[10]!==u||n[11]!==m?(d=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:u,"aria-label":m,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),n[10]=u,n[11]=m,n[12]=d):d=n[12];let g;n[13]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=g):g=n[14];let b;n[15]!==g?(b=t.jsx(ye,{side:"bottom",children:g}),n[15]=g,n[16]=b):b=n[16];let h;return n[17]!==d||n[18]!==b?(h=t.jsxs(Ne,{children:[d,b]}),n[17]=d,n[18]=b,n[19]=h):h=n[19],h}function Ks({open:n,onOpenChange:e,onCreated:s}){const o=F(),{org:a}=oe(),{data:i}=re.useSession(),{stdioEnabled:l}=en(),c=gt(),r=Kt(),u=Ft(),f=Lt(u,"").items,d=tn({resolver:nn(Yn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),b=d.watch("connection_url"),h=d.watch("npx_package"),p=Le({uiType:g,connectionUrl:b??"",npxPackage:h??""})??ut({uiType:g,connectionUrl:b??"",registryItems:f}),j=x=>{const D=x.trim();if(!D)return;const P=!!d.formState.dirtyFields.title,N=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,T=A=>{if(A&&(!P&&!d.getValues("title").trim()&&A.title&&d.setValue("title",A.title,{shouldDirty:!1}),!N&&!(d.getValues("description")??"").trim()&&A.description&&d.setValue("description",A.description,{shouldDirty:!1}),!y&&A.envVarKeys?.length)){const z=d.getValues("env_vars")??[],V=new Set(z.map(E=>E.key)),X=A.envVarKeys.filter(E=>!V.has(E));X.length>0&&d.setValue("env_vars",[...z,...X.map(E=>({key:E,value:""}))],{shouldDirty:!0})}},k=Jn(D);if(k&&l){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),T(Le({uiType:"NPX",npxPackage:k.packageName}));return}if(D.startsWith("http://")||D.startsWith("https://")){const A=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",A,{shouldDirty:!0}),d.setValue("connection_url",D,{shouldDirty:!0}),T(Le({uiType:A,connectionUrl:D})??ut({uiType:A,connectionUrl:D,registryItems:f}));return}g==="NPX"&&T(Le({uiType:"NPX",npxPackage:D}))},v=x=>{x||d.reset(),e(x)},C=async x=>{let D,P=null,N=null,y=null;x.ui_type==="NPX"?(D="STDIO",P="",y=es(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(D="STDIO",P="",y=ts(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(D=x.ui_type,P=x.connection_url||"",N=x.connection_token||null);const T=Ln("conn");try{await r.create.mutateAsync({id:T,title:x.title,description:x.description||null,connection_type:D,connection_url:P,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(T)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},_=o("connections.createConnectionDialog.title"),S=o("connections.createConnectionDialog.description"),I=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),L=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(W,{control:d.control,name:"ui_type",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(Un,{value:x.value,onValueChange:x.onChange,children:[t.jsx(J,{children:t.jsx(qn,{children:t.jsx(Gn,{})})}),t.jsxs(Xn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Wn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(W,{control:d.control,name:"npx_package",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...x,value:x.value??"",onPaste:D=>{const P=D.clipboardData.getData("text");P&&(D.preventDefault(),d.setValue("npx_package",P.trim(),{shouldDirty:!0}),j(P))},onBlur:D=>{j(D.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(W,{control:d.control,name:"stdio_command",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"stdio_args",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...x,value:x.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(W,{control:d.control,name:"env_vars",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(J,{children:t.jsx(Zn,{value:x.value??[],onChange:x.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(W,{control:d.control,name:"connection_url",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...x,value:x.value??"",onPaste:D=>{const P=D.clipboardData.getData("text");P&&(D.preventDefault(),d.setValue("connection_url",P.trim(),{shouldDirty:!0}),j(P))},onBlur:D=>{j(D.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"connection_token",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:p?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(J,{children:t.jsx(ce,{type:"password",placeholder:p?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...x,value:x.value??""})}),p?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[p.token.helperText,p.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"title",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...x})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"description",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(J,{children:t.jsx(Qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...x,value:x.value??""})}),t.jsx(ee,{})]})})]});return c?t.jsx(Tt,{open:n,onOpenChange:v,children:t.jsxs(Pt,{className:"max-h-[90vh]",children:[t.jsx(yn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ot,{children:_}),t.jsx(Nn,{className:"mt-1",children:S})]}),t.jsx(wn,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(It,{size:16})})})]})}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:L}),t.jsx(_n,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:I})})]})})]})}):t.jsx(Et,{open:n,onOpenChange:v,children:t.jsxs(Bt,{className:"sm:max-w-[525px]",children:[t.jsxs(Rt,{children:[t.jsx(Vt,{children:_}),t.jsx(Kn,{children:S})]}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"py-4",children:L}),t.jsxs(Hn,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:I})]})]})})]})})}function Hs(n){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:c,connectingItemId:r,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,g=s===void 0?"add":s,b=d===void 0?"connected":d,h=F(),{org:p}=oe(),j=R.useDeferredValue(u),v=u!==j;let C;e[0]!==j?(C=j.trim().toLowerCase(),e[0]=j,e[1]=C):C=e[1];const _=C;let S;e[2]!==b?(S=w=>w??b,e[2]=b,e[3]=S):S=e[3];const[I,L]=sn(on.connectionsTab(p.slug)+(b==="all"?":home-modal":":agent-modal"),S);let x;e[4]!==I||e[5]!==L?(x=w=>{w!==I&&B("connections_dialog_tab_changed",{to_tab:w}),L(w)},e[4]=I,e[5]=L,e[6]=x):x=e[6];const D=x;let P;e[7]!==p.id||e[8]!==p.slug?(P={connectionId:vt,orgId:p.id,orgSlug:p.slug},e[7]=p.id,e[8]=p.slug,e[9]=P):P=e[9];const N=cn(P),y=j?.trim().split(/\s+/).filter(Boolean)??[],T=y.length>0?{operator:"or",conditions:y.flatMap(Zs)}:void 0,k={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(k),{data:z,fetchNextPage:V,hasNextPage:X,isFetchingNextPage:E}=os({queryKey:Ae.collectionListInfinite(N,p.id,"","CONNECTIONS",A),queryFn:async w=>{const{pageParam:M}=w,se=M===void 0?0:M;return(await N.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Ws,staleTime:3e4}),ne=z?.pages.flatMap(Qs)??[],q=Vn(ne),de=new Set(ne.filter(Xs).map(Gs)),$=Ft(),ie=Lt($,j),He=mt(ie.loadMore,ie.hasMore,ie.isLoadingMore),Ue=mt(V,X??!1,E),G=I==="all"||!!_,at=G?ie.items.filter(w=>{const M=En(w);if(M&&de.has(M))return!1;if(!_)return!0;const se=Ke(w._meta),ae=[w.title,w.description,w.name,w.server?.title,w.server?.description,w.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(Q=>ae.includes(Q.toLowerCase()))}):[],_e=at.filter(qs),Se=at.filter(Us);let Te;e[10]!==a?(Te=w=>w.some(M=>a.has(M.id)),e[10]=a,e[11]=Te):Te=e[11];const qe=Te;let Pe;e[12]!==a||e[13]!==o||e[14]!==r||e[15]!==qe||e[16]!==g||e[17]!==i||e[18]!==f||e[19]!==l||e[20]!==h?(Pe=(w,M,se,ae,Q)=>{const Fe=qe(Q),be=Q.find(le=>!a.has(le.id)),U=Q[0];if(g==="browse"){const le=ns(U);return t.jsx(et,{connection:{title:M,icon:se,description:Q.length>1?`${Q.length} instances`:ae??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{B("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:Q.length}),f?.(le)}},w)}return t.jsx(et,{connection:{title:M,icon:se,description:ae},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Fe&&t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:r!==null,onClick:le=>{le.stopPropagation(),be?(B("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&B("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(B("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),l(U))},children:h("virtualMcp.connectionDialogContent.add")})]})},w)},e[12]=a,e[13]=o,e[14]=r,e[15]=qe,e[16]=g,e[17]=i,e[18]=f,e[19]=l,e[20]=h,e[21]=Pe):Pe=e[21];const Oe=Pe;let ze;e[22]!==r||e[23]!==g||e[24]!==c||e[25]!==h?(ze=w=>{const M=Ke(w._meta),se=M?.friendlyName||M?.friendly_name||w.server?.title||w.title||w.server?.name||w.name||w.id||"",ae=w.server?.description||w.description||null,Q=w.server?.icons?.[0]?.src||Bn(w.server?.repository)||null,Fe=M?.official===!0,be=M?.verified===!0,U=M?.owner==="deco";return t.jsx(et,{connection:{title:se,description:ae,icon:Q},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Fe&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Fe&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:r!==null,onClick:le=>{le.stopPropagation(),B("connection_add_clicked",{action:"connect_new",registry_item_id:w.id,app_name:M?.friendlyName||w.server?.name||w.name||null}),c(w)},children:r===w.id?t.jsx(Ie,{size:14,className:"animate-spin"}):h(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${w.id}`)},e[22]=r,e[23]=g,e[24]=c,e[25]=h,e[26]=ze):ze=e[26];const lt=ze;let ue;e[27]!==I||e[28]!==D||e[29]!==m||e[30]!==_||e[31]!==h?(ue=!_&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(ss,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:I,onTabChange:w=>D(w)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{B("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=I,e[28]=D,e[29]=m,e[30]=_,e[31]=h,e[32]=ue):ue=e[32];const Ge=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ge?(me=H("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[33]=Ge,e[34]=me):me=e[34];const qt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Me;e[35]!==Oe?(Me=w=>{if(w.type==="group")return Oe(w.key,w.title,w.icon,null,w.connections);const M=w.connection;return Oe(M.id,M.title,M.icon,M.description??null,[M])},e[35]=Oe,e[36]=Me):Me=e[36];const Xe=q.map(Me);let fe;e[37]!==Ue?(fe=t.jsx("div",{ref:Ue,className:"col-span-full h-1"}),e[37]=Ue,e[38]=fe):fe=e[38];let ge;e[39]!==E?(ge=E&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=E,e[40]=ge):ge=e[40];const Qe=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(tt,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=G&&_e.map(lt),Ye=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ze=G&&Se.map(lt);let he;e[41]!==He||e[42]!==$||e[43]!==G?(he=G&&$.length>0&&t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[41]=He,e[42]=$,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==Xe||e[49]!==fe||e[50]!==ge||e[51]!==Qe||e[52]!==We||e[53]!==Ye||e[54]!==Ze||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:qt,children:[Xe,fe,ge,Qe,We,Ye,Ze,he,pe]}),e[48]=Xe,e[49]=fe,e[50]=ge,e[51]=Qe,e[52]=We,e[53]=Ye,e[54]=Ze,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==I||e[59]!==q.length||e[60]!==Se||e[61]!==u||e[62]!==h||e[63]!==_e?(je=q.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):h(I==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=I,e[59]=q.length,e[60]=Se,e[61]=u,e[62]=h,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let $e;return e[69]!==ue||e[70]!==ve?($e=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=$e):$e=e[71],$e}function Us(n){return!n.verified&&!Ke(n._meta)?.verified&&!n.meta?.verified}function qs(n){return n.verified||Ke(n._meta)?.verified||n.meta?.verified}function Gs(n){return n.app_name}function Xs(n){return n.app_name}function Qs(n){return n?.items??[]}function Ws(n,e){if(n?.hasMore)return e.reduce(Ys,0)}function Ys(n,e){return n+(e?.items?.length??0)}function Zs(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function ei({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=F(),l=a.mode??"add",c="agentId"in a?a.agentId:void 0,r="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:N=>{},m=(N,y,T)=>{c&&B("agent_connection_attached",{agent_id:c,connection_id:N,app_name:y,mode:T})},[f,d]=R.useState(null),[g,b]=R.useState(o),[h,p]=R.useState(!1),{org:j}=oe(),{data:v}=re.useSession(),C=Kt(),_=an(),S=ot(),I=N=>{e(!1),S({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:N}})},L=()=>{_.invalidateQueries({predicate:N=>{const y=N.queryKey;return y[1]===j.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},x=async(N,y)=>{B("connection_oauth_succeeded",{connection_id:N,flow:y});const T=new URL(`/api/${j.slug}/mcp/${N}`,window.location.origin);await _.invalidateQueries({queryKey:Ae.isMCPAuthenticated(T.href,null)}),L()},D=async N=>{d(N.app_name??N.id);try{const T=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await C.create.mutateAsync({title:T,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,z=await nt({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:V=>C.update.mutateAsync({id:A,data:{connection_token:V}}).then(()=>{})});if(z.ran&&!z.ok){B("connection_oauth_failed",{connection_id:A,flow:"clone",error:z.error??"no_token"}),K.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:z.error??"no token received"})),await C.delete.mutateAsync(A);return}z.ran&&await x(A,"clone"),m(A,N.app_name??null,"clone"),u(A)}catch(y){console.error("Failed to add connection:",y),K.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async N=>{if(!(!j||!v?.user?.id)){d(N.id);try{const y=Rn(N,j.id,v.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",k=!!y.connection_url,A=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!k&&!A){K.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:z}=await C.create.mutateAsync(y),V=await nt({connectionId:z,orgId:j.id,orgSlug:j.slug,persistFallback:X=>C.update.mutateAsync({id:z,data:{connection_token:X}}).then(()=>{})});if(V.ran&&!V.ok){B("connection_oauth_failed",{connection_id:z,flow:"connect_new",error:V.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:V.error??"no token received"})}),m(z,y.app_name??null,"new"),u(z);return}V.ran?(await x(z,"connect_new"),K.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(i("virtualMcp.addConnectionDialog.connected")),m(z,y.app_name??null,"new"),u(z)}catch(y){console.error("Failed to connect:",y),K.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(Et,{open:n,onOpenChange:e,children:[t.jsxs(Bt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Rt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Vt,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Fn,{value:g,onChange:b,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Hs,{mode:l,agentId:c,addedConnectionIds:r,onAdd:u,onCloneAndAdd:D,onConnectAndAdd:P,connectingItemId:f,search:g,onCreateConnection:()=>p(!0),onBrowseNavigate:I,defaultTab:s})})]}),t.jsx(Ks,{open:h,onOpenChange:p,onCreated:async N=>{p(!1);const y=await nt({connectionId:N,orgId:j.id,orgSlug:j.slug,persistFallback:T=>C.update.mutateAsync({id:N,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){B("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:y.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(N,null,"custom"),u(N),e(!1);return}y.ran&&await x(N,"custom_create"),m(N,null,"custom"),u(N),e(!1)}})]})}const ft=new Map;function ti(){const{org:n}=oe(),e=ln(),s=is(),o=s.find(p=>p.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:c}=ke({queryKey:Ae.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),r=a?.balanceCents??null,u=r!=null?r/100:null,m=R.useRef(new Map);if(r!=null){const p=ft.get(n.id);m.current.get(n.id)&&p!=null&&r>p&&B("credits_topped_up_detected",{organization_id:n.id,delta_cents:r-p,previous_balance_cents:p,new_balance_cents:r}),ft.set(n.id,r),m.current.set(n.id,!0)}const f=!!o,d=r!=null&&r>0,g=r!=null&&r===0,b=r!=null&&r===200,h=s.length>0&&s.every(p=>p.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:r,balanceDollars:u,hasCredits:d,isZeroBalance:g,isInitialFreeCredit:b,hasOnlyDecoProvider:h,isLoading:i,isFetching:c,refetch:l}}const Js=4,eo="TASK";function to(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,Js)||eo}function ni(n,e,s){const o=s?.trim();return o||(e==null?null:`${to(n)}-${String(e).padStart(2,"0")}`)}const no=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function si(n){const e=no.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function oi(n){const e=O.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let c;return e[4]!==a||e[5]!==i||e[6]!==l?(c=t.jsx("img",{src:fn,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=c):c=e[7],c}export{Zo as A,Qo as C,Jo as N,Yo as O,oi as S,Wo as a,ei as b,Xo as c,xs as d,it as e,Go as f,as as g,Bs as h,si as p,ni as t,ti as u};
1
+ import{c as O,H as oe,o as ke,K as Ae,b as F,j as t,C as Gt,av as Xt,B as te,r as R,bO as Qt,d as ot,w as Wt,n as H,a as re,t as K,y as Yt,k as Ie,a5 as gt,M as ht,q as B,_ as pt,Z as xt,Y as Zt,a8 as Ce,a9 as ye,ab as Ne,L as Jt,G as en,aw as tn,ax as nn,R as sn,I as on,p as an,ac as ln}from"./index-DciLlmwa.js";import{m as ct,u as cn}from"./use-mcp-client-vvCs8A5I.js";import{C as jt,g as rn,W as dn,S as vt,a as bt,i as un,d as mn,f as fn}from"./constants-dLUUoWH7.js";import{D as gn}from"./use-destination-route-D-qOMxxB.js";import{d as rt,C as hn}from"./self-tool-result-Dh4Aev6w.js";import{i as pn}from"./ChevronRight-9VLaoIJr.js";import{aG as xn,M as jn,A as Ct,H as vn,s as Je}from"./agent-icon-CC9Z06rN.js";import{b as yt,d as bn,e as Nt}from"./thread-route-CwzU1Ead.js";import{t as wt}from"./ChevronDown-BR9TODzF.js";import{u as _t,a as Cn}from"./use-virtual-mcp-J8dDcIjt.js";import{a as Re,b as St,P as Dt}from"./popover-CQgQYm0L.js";import{i as Ve}from"./Check-7ocjoIXN.js";import{s as we}from"./Plus-DTvlgSaM.js";import{i as kt}from"./SearchMd-BATwmNWi.js";import{s as It}from"./XClose-wKxrNwWi.js";import{T as At}from"./toolbar-B0u9fQTi.js";import{D as Tt,a as Pt,b as Ot,c as yn,g as Nn,e as wn,f as _n}from"./drawer-CC9EmOKr.js";import{a as Sn,G as Dn}from"./github-repo-picker-CxxRKD0_.js";import{g as kn,a as In,b as zt}from"./hooks-8AhZo6f9.js";import{u as An,g as Tn,a as Pn,b as On,f as zn}from"./use-navigate-to-agent-CSTEre4d.js";import{g as Mn,a as Mt}from"./agent-capabilities-B52k7xCe.js";import{u as $t}from"./shell-layout-DpdIn9G6.js";import{d as $n}from"./session-runtime-C-KTDVeQ.js";import{C as Fn}from"./collection-search-Cui6cogE.js";import{g as Ln,a as En,b as Bn,e as Rn}from"./extract-connection-data-CEOmOrIN.js";import{u as Ft,a as Lt,g as Vn,C as et}from"./connection-card-CmNObnd0.js";import{e as Et,d as Bt,a as Rt,b as Vt,h as Kn,c as Hn}from"./dialog-T-Mu83_j.js";import{d as W,a as Y,e as Z,b as J,c as ee,F as dt}from"./form-CKHTMWs_.js";import{I as ce}from"./input-DWRx0ZaP.js";import{S as Un,a as qn,b as Gn,c as Xn,d as De}from"./select-C7dHMUjj.js";import{T as Qn}from"./textarea-Bfs9jOFb.js";import{b as Kt}from"./use-connection-C4Qtd4a2.js";import{n as Be,i as tt}from"./Tool02-BxEFJxsp.js";import{e as Wn}from"./UserSquare-DZILSTAV.js";import{c as Yn,i as Le,a as ut,E as Zn,p as Jn,b as es,d as ts}from"./connection-form-helpers-DdL2pxwl.js";import{a as nt}from"./authenticate-and-persist-oauth-o-iFa_kH.js";import{g as ns}from"./connection-slug-CITJ0kGN.js";import{C as ss}from"./collection-tabs-BdjT08Pp.js";import{u as mt}from"./use-infinite-scroll-5WfwCRZM.js";import{B as Ee}from"./badge-CZwiP8Mh.js";import{u as os}from"./useSuspenseInfiniteQuery-B7N9im0E.js";import{g as Ke}from"./metadata-dUsYcpuu.js";import{u as is}from"./use-ai-providers-B2TnNV5-.js";function as(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const ls=2e4;function cs(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Go(){const n=O.c(19),{org:e}=oe(),s=dn.COMMERCE_DISCOVERY(e.id);let o;n[0]!==e.id||n[1]!==e.slug?(o=ct({connectionId:vt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=o):o=n[2];const{data:a}=ke(o),i=ke({queryKey:Ae.commerceDiscoveryConnection(e.id,s),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const S=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return rt(S)}}),l=i.data?.item??null,{data:c}=ke({...ct({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!l}),r=Ae.commerceDiscoveryDiagnostic(e.id,s),u=!!c;let m;n[3]!==c?(m=async()=>{if(!c)throw new Error("cdClient not ready");const S=await c.callTool({name:jt,arguments:{}});return rt(S).diagnostic??null},n[3]=c,n[4]=m):m=n[4];let f;n[5]!==r||n[6]!==u||n[7]!==m?(f={queryKey:r,enabled:u,retry:1,refetchInterval:rs,queryFn:m},n[5]=r,n[6]=u,n[7]=m,n[8]=f):f=n[8];const d=ke(f),g=l?.metadata?.siteUrl,b=d.data??null,h=d.isSuccess,p=i.isPending||!!l&&d.isPending,j=typeof g=="string"&&g?g:null;let v;n[9]!==g?(v=cs(g),n[9]=g,n[10]=v):v=n[10];const C=c??null;let _;return n[11]!==s||n[12]!==d.isSuccess||n[13]!==C||n[14]!==b||n[15]!==p||n[16]!==j||n[17]!==v?(_={diagnostic:b,isSuccess:h,isLoading:p,siteUrl:j,host:v,connectionId:s,cdClient:C},n[11]=s,n[12]=d.isSuccess,n[13]=C,n[14]=b,n[15]=p,n[16]=j,n[17]=v,n[18]=_):_=n[18],_}function rs(n){return n.state.status!=="error"&&as(n.state.data)==="generating"?ls:!1}function Xo(n,e){return{to:gn.agents,params:{org:n.slug,project:rn(n.id),panel:"app"},search:{connection:e,tool:jt}}}const ds="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function us(){const n=O.c(13),e=F();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:ds,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let l;n[6]!==e?(l=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=l):l=n[7];let c;n[8]!==l?(c=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:l})]}),n[8]=l,n[9]=c):c=n[9];let r;return n[10]!==a||n[11]!==c?(r=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,c]}),n[10]=a,n[11]=c,n[12]=r):r=n[12],r}function ms(){const n=O.c(19),e=F();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:xn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Gt,label:a},n[6]=a,n[7]=i):i=n[7];let l;n[8]!==e?(l=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=l):l=n[9];let c;n[10]!==l?(c={Icon:jn,label:l},n[10]=l,n[11]=c):c=n[11];let r;n[12]!==o||n[13]!==i||n[14]!==c?(r=[o,i,c],n[12]=o,n[13]=i,n[14]=c,n[15]=r):r=n[15];const u=r;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(fs)})]}),n[17]=u,n[18]=f):f=n[18],f}function fs(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function Qo(n){const e=O.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,l=F(),c=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let r;e[0]!==a||e[1]!==l?(r=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":l("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Xt,{size:18})}),e[0]=a,e[1]=l,e[2]=r):r=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==c||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(pn,{size:16,className:"shrink-0 text-foreground/25"}),c&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:c,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=c,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let g;e[10]!==o?(g=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=g):g=e[11];let b;e[12]!==i||e[13]!==d||e[14]!==g?(b=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,g]}),e[12]=i,e[13]=d,e[14]=g,e[15]=b):b=e[15];let h,p;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),p=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=h,e[17]=p):(h=e[16],p=e[17]);let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[h,p,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(us,{}),t.jsx("div",{className:"flex-1"}),t.jsx(ms,{})]})]}),e[18]=j):j=e[18];let v;return e[19]!==r||e[20]!==b?(v=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[r,b,j]}),e[19]=r,e[20]=b,e[21]=v):v=e[21],v}function Wo(n){const e=O.c(5),{ready:s,pending:o,label:a,onClick:i,children:l}=n,c=o||!s,r=s&&!o?l:null;let u;return e[0]!==a||e[1]!==i||e[2]!==c||e[3]!==r?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:c,children:[a,r]}),e[0]=a,e[1]=i,e[2]=c,e[3]=r,e[4]=u):u=e[4],u}function Ht(){const n=R.useContext(Qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function gs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function it(n){const e=O.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",l=a==="xs"?"text-[9px]":"text-xs";let c;e[0]!==i?(c=H(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=c):c=e[1];let r;e[2]!==s.logo||e[3]!==s.name?(r=s.logo?void 0:gs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=r):r=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:H("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let m;return e[9]!==c||e[10]!==r||e[11]!==u?(m=t.jsx("div",{className:c,style:r,children:u}),e[9]=c,e[10]=r,e[11]=u,e[12]=m):m=e[12],m}function hs({invitation:n,onChanged:e}){const s=F(),[o,a]=R.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),l=async()=>{a(!0);try{const u=await re.organization.acceptInvitation({invitationId:n.id});if(u.error){K.error(u.error.message),a(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}K.success(s("header.orgSwitcher.joined",{name:i})),Yt();let r;try{r=(await re.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=r?`/${r}`:"/"},c=async()=>{a(!0);try{const r=await re.organization.rejectInvitation({invitationId:n.id});if(r.error){K.error(r.error.message),a(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{K.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(it,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:l,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:c,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(It,{size:14})})]})]})}function ps(n){const e=O.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=F(),{data:l}=Wt(),{invitations:c,refetch:r}=Ht();let u;e[0]!==s?(u=(k,A)=>k.slug===s?-1:A.slug===s?1:k.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...l??[]].sort(u),[f,d]=R.useState(""),g=f.toLowerCase(),b=g?m.filter(k=>k.name.toLowerCase().includes(g)||k.slug.toLowerCase().includes(g)):m;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(kt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=h):h=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=k=>d(k.target.value),e[3]=p):p=e[3];let j;e[4]!==f?(j=k=>k.key==="Escape"&&f&&d(""),e[4]=f,e[5]=j):j=e[5];let v;e[6]!==i?(v=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=v):v=e[7];let C;e[8]!==f||e[9]!==j||e[10]!==v?(C=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:p,onKeyDown:j,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=j,e[10]=v,e[11]=C):C=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(we,{size:16}),e[12]=_):_=e[12];let S;e[13]!==a?(S=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:_}),e[13]=a,e[14]=S):S=e[14];let I;e[15]!==C||e[16]!==S?(I=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[h,C,S]}),e[15]=C,e[16]=S,e[17]=I):I=e[17];const L="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let x;e[18]!==c||e[19]!==f||e[20]!==r?(x=!f&&c.map(k=>t.jsx(hs,{invitation:k,onChanged:r},k.id)),e[18]=c,e[19]=f,e[20]=r,e[21]=x):x=e[21];const D=b.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let P;e[22]!==o||e[23]!==s?(P=k=>t.jsxs("button",{type:"button",onClick:()=>o(k.slug),className:H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(it,{org:k,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===s&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=o,e[23]=s,e[24]=P):P=e[24];const N=b.map(P);let y;e[25]!==x||e[26]!==D||e[27]!==N?(y=t.jsxs("div",{className:L,children:[x,D,N]}),e[25]=x,e[26]=D,e[27]=N,e[28]=y):y=e[28];let T;return e[29]!==y||e[30]!==I?(T=t.jsxs(t.Fragment,{children:[I,y]}),e[29]=y,e[30]=I,e[31]=T):T=e[31],T}function xs(n){const e=O.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,l=a===void 0?"start":a,c=i===void 0?"bottom":i,r=ot(),[u,m]=R.useState(!1),[f,d]=R.useState(!1);let g;e[0]!==s?(g=t.jsx(Re,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const b=String(u);let h;e[2]!==r?(h=I=>{m(!1),r({to:"/$org",params:{org:I}})},e[2]=r,e[3]=h):h=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{m(!1),d(!0)},e[4]=p):p=e[4];let j;e[5]!==o||e[6]!==b||e[7]!==h?(j=t.jsx(ps,{orgParam:o,onSelectOrg:h,onCreateOrg:p},b),e[5]=o,e[6]=b,e[7]=h,e[8]=j):j=e[8];let v;e[9]!==l||e[10]!==c||e[11]!==j?(v=t.jsx(St,{side:c,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:vs,onCloseAutoFocus:js,children:j}),e[9]=l,e[10]=c,e[11]=j,e[12]=v):v=e[12];let C;e[13]!==u||e[14]!==g||e[15]!==v?(C=t.jsxs(Dt,{open:u,onOpenChange:m,children:[g,v]}),e[13]=u,e[14]=g,e[15]=v,e[16]=C):C=e[16];let _;e[17]!==f?(_=t.jsx(hn,{open:f,onOpenChange:d}),e[17]=f,e[18]=_):_=e[18];let S;return e[19]!==_||e[20]!==C?(S=t.jsxs(t.Fragment,{children:[C,_]}),e[19]=_,e[20]=C,e[21]=S):S=e[21],S}function js(n){return n.preventDefault()}function vs(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function bs(n){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:c,disabled:r}=n,u=a===void 0?"Search...":a;let m;e[0]!==l?(m=H("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=m):m=e[1];const f=r?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=H("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let g;e[4]!==c?(g=c?t.jsx(Ie,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=g):g=e[5];let b;e[6]!==o?(b=v=>o(v.target.value),e[6]=o,e[7]=b):b=e[7];let h;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==b||e[12]!==s?(h=t.jsx("input",{type:"text",value:s,onChange:b,onKeyDown:i,placeholder:u,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=r,e[9]=i,e[10]=u,e[11]=b,e[12]=s,e[13]=h):h=e[13];let p;e[14]!==d||e[15]!==g||e[16]!==h?(p=t.jsxs("label",{className:d,children:[g,h]}),e[14]=d,e[15]=g,e[16]=h,e[17]=p):p=e[17];let j;return e[18]!==m||e[19]!==p?(j=t.jsx("div",{className:m,children:p}),e[18]=m,e[19]=p,e[20]=j):j=e[20],j}function Cs(n,e,s){if(!s)return null;const o=kn(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function ys(n){const e=O.c(6),{value:s,onChange:o}=n,a=F();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(bs,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function Ns(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function ws(n){const e=O.c(10),{org:s,onClose:o}=n,a=F();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let r;return e[6]!==i||e[7]!==l||e[8]!==c?(r=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Jt,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=i,e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function _s(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ut,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ss(n){const e=O.c(11),{onImportFromGithub:s}=n,o=F();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Dn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let r;return e[8]!==l||e[9]!==c?(r=t.jsx(Ut,{action:l,children:c}),e[8]=l,e[9]=c,e[10]=r):r=e[10],r}function Ds(n){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=n,a=F();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H(o),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==s?(c=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{className:"size-4"}),e[6]=r):r=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==c?(u=t.jsx(At,{"aria-label":i,className:l,onClick:c,children:r}),e[7]=i,e[8]=l,e[9]=c,e[10]=u):u=e[10],u}function ks(n){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=F();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=H(a),e[3]=a,e[4]=c):c=e[4];let r;e[5]!==s?(r=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=r):r=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==f?(d=t.jsx(pt,{children:t.jsxs(xt,{tooltip:l,className:c,onClick:r,children:[u,f]})}),e[12]=l,e[13]=c,e[14]=r,e[15]=f,e[16]=d):d=e[16],d}function Is(){const n=O.c(4),e=F();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ot,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function As(n){const e=O.c(8),{emptyCtaClass:s}=n,o=F();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=H(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==i?(c=t.jsx(At,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Ts(n){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=F();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=H(a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{}),e[5]=r):r=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==l||e[11]!==c||e[12]!==m?(f=t.jsx(Re,{asChild:!0,children:t.jsxs(xt,{tooltip:l,className:c,children:[r,m]})}),e[10]=l,e[11]=c,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let g;return e[17]!==d?(g=t.jsx(pt,{children:d}),e[17]=d,e[18]=g):g=e[18],g}function Ps(n){const e=O.c(9),{children:s}=n,o=F();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==a||e[7]!==l?(c=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=c):c=e[8],c}function Os(n){const e=ot(),{create:s}=In(),{locator:o}=oe(),a=yt(),i=bn();return async l=>{const c=crypto.randomUUID(),r=l===i?Cs(n,o,a??""):null;try{await s({id:c,virtual_mcp_id:l,...r?{branch:r}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:c},search:{virtualmcpid:l}})}}function st(n){const e=O.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(Ct,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let r;e[5]!==s.title?(r=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=r):r=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==r||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,u]}),e[9]=r,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:l,children:[c,m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function Ut(n){const e=O.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function zs(n){const e=O.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,c]=R.useState(""),r=_t(),u=r??[],{org:m}=oe(),{data:f}=re.useSession(),d=f?.user?.id??"anon",g=Tn(r),b=Pn(),h=Os(m.slug),p=Mn(r),j=l.toLowerCase(),v=u.filter(Ls).filter($=>!p.has($.id)).filter(Fs).filter($=>!l||$.title.toLowerCase().includes(j)),C=v.filter($s),_=v.filter(Ms),S=bt(m.id),I=!l||S.title.toLowerCase().includes(j),L=!!(o&&I);let x;e[0]!==s||e[1]!==o?(x=()=>{o?.(null),s(),c("")},e[0]=s,e[1]=o,e[2]=x):x=e[2];const D=x,P=$=>{if(o){o($.id),s(),c("");return}On({orgId:m.id,userId:d},$.id,g),b(),s(),c(""),h($.id)},N="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==l?(y=t.jsx(ys,{value:l,onChange:c}),e[3]=l,e[4]=y):y=e[4];const T="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",k=o&&I&&S&&t.jsx(st,{agent:S,selected:!a||a===S.id,onClick:D}),A=(C.length>0||!l)&&t.jsx(Ss,{onImportFromGithub:i}),z=C.map($=>t.jsx(st,{agent:$,selected:o?a===$.id:void 0,onClick:()=>P($)},$.id)),V=_.length>0&&t.jsx(_s,{}),X=_.map($=>t.jsx(st,{agent:$,selected:o?a===$.id:void 0,onClick:()=>P($)},$.id));let E;e[5]!==L||e[6]!==l||e[7]!==v.length?(E=v.length===0&&!L&&l&&t.jsx(Ns,{}),e[5]=L,e[6]=l,e[7]=v.length,e[8]=E):E=e[8];let ne;e[9]!==E||e[10]!==k||e[11]!==A||e[12]!==z||e[13]!==V||e[14]!==X?(ne=t.jsxs("div",{className:T,children:[k,A,z,V,X,E]}),e[9]=E,e[10]=k,e[11]=A,e[12]=z,e[13]=V,e[14]=X,e[15]=ne):ne=e[15];let q;e[16]!==s||e[17]!==m?(q=t.jsx(ws,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=q):q=e[18];let de;return e[19]!==ne||e[20]!==q||e[21]!==y?(de=t.jsxs("div",{className:N,children:[y,ne,q]}),e[19]=ne,e[20]=q,e[21]=y,e[22]=de):de=e[22],de}function Ms(n){return!Mt(n.metadata)}function $s(n){return Mt(n.metadata)}function Fs(n){return!mn(n.id)}function Ls(n){return!un(n.id)}function Es(n){const e=O.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:l,side:c,align:r}=s,u=o===void 0?!1:o,m=c===void 0?"right":c,f=r===void 0?"start":r,[d,g]=R.useState(!1),[b,h]=R.useState(!1),p=gt(),{setOpenMobile:j}=ht(),v=An(),C=v?"border border-border":void 0;let _;e[2]!==v?(_=A=>v?t.jsx(Ps,{children:A}):A,e[2]=v,e[3]=_):_=e[3];const S=_;let I;e[4]!==p||e[5]!==j?(I=()=>{g(!1),p&&j(!1)},e[4]=p,e[5]=j,e[6]=I):I=e[6];const L=I;let x;e[7]!==L?(x=()=>{L(),h(!0)},e[7]=L,e[8]=x):x=e[8];const D=x;let P;e[9]!==L||e[10]!==D||e[11]!==i||e[12]!==d||e[13]!==l?(P=d&&t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Zt,{className:"h-4 w-24"})}),children:t.jsx(zs,{onClose:L,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:D})}),e[9]=L,e[10]=D,e[11]=i,e[12]=d,e[13]=l,e[14]=P):P=e[14];const N=P;let y;e[15]!==f||e[16]!==u||e[17]!==C||e[18]!==v||e[19]!==p||e[20]!==d||e[21]!==N||e[22]!==m||e[23]!==a||e[24]!==S?(y=p?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:a}):u?S(t.jsx(Ds,{setOpen:g,emptyCtaClass:C})):t.jsx(ks,{setOpen:g,highlightEmpty:v,emptyCtaClass:C}),t.jsx(Tt,{open:d,onOpenChange:g,direction:"bottom",children:t.jsxs(Pt,{className:"max-h-[85dvh] p-0",children:[t.jsx(Is,{}),N]})})]}):t.jsxs(Dt,{open:d,onOpenChange:A=>{A&&!d&&B("agent_browser_opened",{surface:"desktop_popover"}),g(A)},children:[a?t.jsx(Re,{asChild:!0,children:a}):u?S(t.jsx(Re,{asChild:!0,children:t.jsx(As,{emptyCtaClass:C})})):t.jsx(Ts,{wrapEmptyHint:S,highlightEmpty:v,emptyCtaClass:C}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:N})]}),e[15]=f,e[16]=u,e[17]=C,e[18]=v,e[19]=p,e[20]=d,e[21]=N,e[22]=m,e[23]=a,e[24]=S,e[25]=y):y=e[25];let T;e[26]!==b?(T=t.jsx(Sn,{open:b,onOpenChange:h,mode:"agent"}),e[26]=b,e[27]=T):T=e[27];let k;return e[28]!==T||e[29]!==y?(k=t.jsxs(t.Fragment,{children:[y,T]}),e[28]=T,e[29]=y,e[30]=k):k=e[30],k}function Bs(){const n=O.c(2),e=_t()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?$n(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Rs="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Vs(n){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=F(),c=Cn(s)??o??null;let r,u,m,f,d;e[0]!==c?.title||e[1]!==a||e[2]!==l?(d=c?.title??l("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",r="button",u=a,m=l("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=l,e[3]=r,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(r=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const g=c?.icon??null;let b;e[8]!==g||e[9]!==d?(b=t.jsx(Ct,{icon:g,name:d,size:"xs"}),e[8]=g,e[9]=d,e[10]=b):b=e[10];let h;e[11]!==r||e[12]!==u||e[13]!==m||e[14]!==b?(h=t.jsx("button",{type:r,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:b}),e[11]=r,e[12]=u,e[13]=m,e[14]=b,e[15]=h):h=e[15];let p;e[16]!==d?(p=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=p):p=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(wt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let v;e[19]!==p?(v=t.jsxs("button",{type:"button",className:Rs,children:[p,j]}),e[19]=p,e[20]=v):v=e[20];let C;e[21]!==s||e[22]!==i||e[23]!==v?(C=t.jsx(Es,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:v}),e[21]=s,e[22]=i,e[23]=v,e[24]=C):C=e[24];let _;return e[25]!==C||e[26]!==f||e[27]!==h?(_=t.jsxs("div",{className:f,children:[h,C]}),e[25]=C,e[26]=f,e[27]=h,e[28]=_):_=e[28],_}function Yo(n){const e=O.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=F(),{org:i}=oe(),{state:l,isMobile:c}=ht(),r=Ht().invitations.length>0,u=l==="collapsed"||c;let m;e[2]!==r||e[3]!==i.name||e[4]!==a?(m=r?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=r,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(it,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==r||e[9]!==u?(d=r&&t.jsx("span",{className:H("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=r,e[9]=u,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==d?(g=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=g):g=e[13];let b;e[14]!==i.name||e[15]!==o?(b=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=b):b=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(wt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=h):h=e[17];let p;e[18]!==m||e[19]!==g||e[20]!==b?(p=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,b,h]})}),e[18]=m,e[19]=g,e[20]=b,e[21]=p):p=e[21];let j;e[22]!==i.slug||e[23]!==p?(j=t.jsx(xs,{orgParam:i.slug,trigger:p}),e[22]=i.slug,e[23]=p,e[24]=j):j=e[24];let v;e[25]!==i.name?(v=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=v):v=e[26];let C;return e[27]!==v||e[28]!==j?(C=t.jsxs(Ne,{children:[j,v]}),e[27]=v,e[28]=j,e[29]=C):C=e[29],C}function Zo(n){const e=O.c(21);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=oe(),{threads:i}=zt(),{data:l}=re.useSession(),{setTaskId:c,createNewTask:r}=$t(),u=Bs();let m;e[2]!==a.id?(m=bt(a.id),e[2]=a.id,e[3]=m):m=e[3];const f=m,d=f.id,g=Nt();let b;e[4]!==r||e[5]!==d||e[6]!==o||e[7]!==u||e[8]!==l?.user?.id||e[9]!==c||e[10]!==i?(b=_=>{const S=_??d,I=zn(i,S,l?.user?.id,u(S));I?c(I.id,S):r(S),o?.()},e[4]=r,e[5]=d,e[6]=o,e[7]=u,e[8]=l?.user?.id,e[9]=c,e[10]=i,e[11]=b):b=e[11];const h=b;let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[12]=p):p=e[12];const j=g===d?f:void 0;let v;e[13]!==g||e[14]!==h?(v=()=>h(g),e[13]=g,e[14]=h,e[15]=v):v=e[15];let C;return e[16]!==g||e[17]!==h||e[18]!==j||e[19]!==v?(C=t.jsx(R.Suspense,{fallback:p,children:t.jsx(Vs,{agentId:g,fallback:j,onOpenHome:v,onPick:h})}),e[16]=g,e[17]=h,e[18]=j,e[19]=v,e[20]=C):C=e[20],C}function Jo(){const n=O.c(20),e=F(),{threads:s}=zt(),{createNewTask:o}=$t(),a=Nt(),i=yt();let l;n[0]!==i||n[1]!==s?(l=s.find(p=>p.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const c=l;let r;n[3]!==a||n[4]!==o||n[5]!==c?(r=()=>{o(a,c)},n[3]=a,n[4]=o,n[5]=c,n[6]=r):r=n[6];const u=r;let m;n[7]!==e?(m=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=m):m=n[8];let f;n[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(vn,{size:16}),n[9]=f):f=n[9];let d;n[10]!==u||n[11]!==m?(d=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:u,"aria-label":m,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),n[10]=u,n[11]=m,n[12]=d):d=n[12];let g;n[13]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=g):g=n[14];let b;n[15]!==g?(b=t.jsx(ye,{side:"bottom",children:g}),n[15]=g,n[16]=b):b=n[16];let h;return n[17]!==d||n[18]!==b?(h=t.jsxs(Ne,{children:[d,b]}),n[17]=d,n[18]=b,n[19]=h):h=n[19],h}function Ks({open:n,onOpenChange:e,onCreated:s}){const o=F(),{org:a}=oe(),{data:i}=re.useSession(),{stdioEnabled:l}=en(),c=gt(),r=Kt(),u=Ft(),f=Lt(u,"").items,d=tn({resolver:nn(Yn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),b=d.watch("connection_url"),h=d.watch("npx_package"),p=Le({uiType:g,connectionUrl:b??"",npxPackage:h??""})??ut({uiType:g,connectionUrl:b??"",registryItems:f}),j=x=>{const D=x.trim();if(!D)return;const P=!!d.formState.dirtyFields.title,N=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,T=A=>{if(A&&(!P&&!d.getValues("title").trim()&&A.title&&d.setValue("title",A.title,{shouldDirty:!1}),!N&&!(d.getValues("description")??"").trim()&&A.description&&d.setValue("description",A.description,{shouldDirty:!1}),!y&&A.envVarKeys?.length)){const z=d.getValues("env_vars")??[],V=new Set(z.map(E=>E.key)),X=A.envVarKeys.filter(E=>!V.has(E));X.length>0&&d.setValue("env_vars",[...z,...X.map(E=>({key:E,value:""}))],{shouldDirty:!0})}},k=Jn(D);if(k&&l){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),T(Le({uiType:"NPX",npxPackage:k.packageName}));return}if(D.startsWith("http://")||D.startsWith("https://")){const A=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",A,{shouldDirty:!0}),d.setValue("connection_url",D,{shouldDirty:!0}),T(Le({uiType:A,connectionUrl:D})??ut({uiType:A,connectionUrl:D,registryItems:f}));return}g==="NPX"&&T(Le({uiType:"NPX",npxPackage:D}))},v=x=>{x||d.reset(),e(x)},C=async x=>{let D,P=null,N=null,y=null;x.ui_type==="NPX"?(D="STDIO",P="",y=es(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(D="STDIO",P="",y=ts(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(D=x.ui_type,P=x.connection_url||"",N=x.connection_token||null);const T=Ln("conn");try{await r.create.mutateAsync({id:T,title:x.title,description:x.description||null,connection_type:D,connection_url:P,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(T)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},_=o("connections.createConnectionDialog.title"),S=o("connections.createConnectionDialog.description"),I=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),L=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(W,{control:d.control,name:"ui_type",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(Un,{value:x.value,onValueChange:x.onChange,children:[t.jsx(J,{children:t.jsx(qn,{children:t.jsx(Gn,{})})}),t.jsxs(Xn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Wn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(W,{control:d.control,name:"npx_package",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...x,value:x.value??"",onPaste:D=>{const P=D.clipboardData.getData("text");P&&(D.preventDefault(),d.setValue("npx_package",P.trim(),{shouldDirty:!0}),j(P))},onBlur:D=>{j(D.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(W,{control:d.control,name:"stdio_command",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"stdio_args",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...x,value:x.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(W,{control:d.control,name:"env_vars",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(J,{children:t.jsx(Zn,{value:x.value??[],onChange:x.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(W,{control:d.control,name:"connection_url",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...x,value:x.value??"",onPaste:D=>{const P=D.clipboardData.getData("text");P&&(D.preventDefault(),d.setValue("connection_url",P.trim(),{shouldDirty:!0}),j(P))},onBlur:D=>{j(D.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"connection_token",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:p?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(J,{children:t.jsx(ce,{type:"password",placeholder:p?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...x,value:x.value??""})}),p?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[p.token.helperText,p.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"title",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(J,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...x})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"description",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(J,{children:t.jsx(Qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...x,value:x.value??""})}),t.jsx(ee,{})]})})]});return c?t.jsx(Tt,{open:n,onOpenChange:v,children:t.jsxs(Pt,{className:"max-h-[90vh]",children:[t.jsx(yn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ot,{children:_}),t.jsx(Nn,{className:"mt-1",children:S})]}),t.jsx(wn,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(It,{size:16})})})]})}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:L}),t.jsx(_n,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:I})})]})})]})}):t.jsx(Et,{open:n,onOpenChange:v,children:t.jsxs(Bt,{className:"sm:max-w-[525px]",children:[t.jsxs(Rt,{children:[t.jsx(Vt,{children:_}),t.jsx(Kn,{children:S})]}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"py-4",children:L}),t.jsxs(Hn,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:I})]})]})})]})})}function Hs(n){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:c,connectingItemId:r,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,g=s===void 0?"add":s,b=d===void 0?"connected":d,h=F(),{org:p}=oe(),j=R.useDeferredValue(u),v=u!==j;let C;e[0]!==j?(C=j.trim().toLowerCase(),e[0]=j,e[1]=C):C=e[1];const _=C;let S;e[2]!==b?(S=w=>w??b,e[2]=b,e[3]=S):S=e[3];const[I,L]=sn(on.connectionsTab(p.slug)+(b==="all"?":home-modal":":agent-modal"),S);let x;e[4]!==I||e[5]!==L?(x=w=>{w!==I&&B("connections_dialog_tab_changed",{to_tab:w}),L(w)},e[4]=I,e[5]=L,e[6]=x):x=e[6];const D=x;let P;e[7]!==p.id||e[8]!==p.slug?(P={connectionId:vt,orgId:p.id,orgSlug:p.slug},e[7]=p.id,e[8]=p.slug,e[9]=P):P=e[9];const N=cn(P),y=j?.trim().split(/\s+/).filter(Boolean)??[],T=y.length>0?{operator:"or",conditions:y.flatMap(Zs)}:void 0,k={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(k),{data:z,fetchNextPage:V,hasNextPage:X,isFetchingNextPage:E}=os({queryKey:Ae.collectionListInfinite(N,p.id,"","CONNECTIONS",A),queryFn:async w=>{const{pageParam:M}=w,se=M===void 0?0:M;return(await N.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Ws,staleTime:3e4}),ne=z?.pages.flatMap(Qs)??[],q=Vn(ne),de=new Set(ne.filter(Xs).map(Gs)),$=Ft(),ie=Lt($,j),He=mt(ie.loadMore,ie.hasMore,ie.isLoadingMore),Ue=mt(V,X??!1,E),G=I==="all"||!!_,at=G?ie.items.filter(w=>{const M=En(w);if(M&&de.has(M))return!1;if(!_)return!0;const se=Ke(w._meta),ae=[w.title,w.description,w.name,w.server?.title,w.server?.description,w.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(Q=>ae.includes(Q.toLowerCase()))}):[],_e=at.filter(qs),Se=at.filter(Us);let Te;e[10]!==a?(Te=w=>w.some(M=>a.has(M.id)),e[10]=a,e[11]=Te):Te=e[11];const qe=Te;let Pe;e[12]!==a||e[13]!==o||e[14]!==r||e[15]!==qe||e[16]!==g||e[17]!==i||e[18]!==f||e[19]!==l||e[20]!==h?(Pe=(w,M,se,ae,Q)=>{const Fe=qe(Q),be=Q.find(le=>!a.has(le.id)),U=Q[0];if(g==="browse"){const le=ns(U);return t.jsx(et,{connection:{title:M,icon:se,description:Q.length>1?`${Q.length} instances`:ae??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{B("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:Q.length}),f?.(le)}},w)}return t.jsx(et,{connection:{title:M,icon:se,description:ae},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Fe&&t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:r!==null,onClick:le=>{le.stopPropagation(),be?(B("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&B("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(B("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),l(U))},children:h("virtualMcp.connectionDialogContent.add")})]})},w)},e[12]=a,e[13]=o,e[14]=r,e[15]=qe,e[16]=g,e[17]=i,e[18]=f,e[19]=l,e[20]=h,e[21]=Pe):Pe=e[21];const Oe=Pe;let ze;e[22]!==r||e[23]!==g||e[24]!==c||e[25]!==h?(ze=w=>{const M=Ke(w._meta),se=M?.friendlyName||M?.friendly_name||w.server?.title||w.title||w.server?.name||w.name||w.id||"",ae=w.server?.description||w.description||null,Q=w.server?.icons?.[0]?.src||Bn(w.server?.repository)||null,Fe=M?.official===!0,be=M?.verified===!0,U=M?.owner==="deco";return t.jsx(et,{connection:{title:se,description:ae,icon:Q},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Fe&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Fe&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:r!==null,onClick:le=>{le.stopPropagation(),B("connection_add_clicked",{action:"connect_new",registry_item_id:w.id,app_name:M?.friendlyName||w.server?.name||w.name||null}),c(w)},children:r===w.id?t.jsx(Ie,{size:14,className:"animate-spin"}):h(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${w.id}`)},e[22]=r,e[23]=g,e[24]=c,e[25]=h,e[26]=ze):ze=e[26];const lt=ze;let ue;e[27]!==I||e[28]!==D||e[29]!==m||e[30]!==_||e[31]!==h?(ue=!_&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(ss,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:I,onTabChange:w=>D(w)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{B("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=I,e[28]=D,e[29]=m,e[30]=_,e[31]=h,e[32]=ue):ue=e[32];const Ge=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ge?(me=H("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[33]=Ge,e[34]=me):me=e[34];const qt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Me;e[35]!==Oe?(Me=w=>{if(w.type==="group")return Oe(w.key,w.title,w.icon,null,w.connections);const M=w.connection;return Oe(M.id,M.title,M.icon,M.description??null,[M])},e[35]=Oe,e[36]=Me):Me=e[36];const Xe=q.map(Me);let fe;e[37]!==Ue?(fe=t.jsx("div",{ref:Ue,className:"col-span-full h-1"}),e[37]=Ue,e[38]=fe):fe=e[38];let ge;e[39]!==E?(ge=E&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=E,e[40]=ge):ge=e[40];const Qe=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(tt,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=G&&_e.map(lt),Ye=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ze=G&&Se.map(lt);let he;e[41]!==He||e[42]!==$||e[43]!==G?(he=G&&$.length>0&&t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[41]=He,e[42]=$,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==Xe||e[49]!==fe||e[50]!==ge||e[51]!==Qe||e[52]!==We||e[53]!==Ye||e[54]!==Ze||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:qt,children:[Xe,fe,ge,Qe,We,Ye,Ze,he,pe]}),e[48]=Xe,e[49]=fe,e[50]=ge,e[51]=Qe,e[52]=We,e[53]=Ye,e[54]=Ze,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==I||e[59]!==q.length||e[60]!==Se||e[61]!==u||e[62]!==h||e[63]!==_e?(je=q.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):h(I==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=I,e[59]=q.length,e[60]=Se,e[61]=u,e[62]=h,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let $e;return e[69]!==ue||e[70]!==ve?($e=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=$e):$e=e[71],$e}function Us(n){return!n.verified&&!Ke(n._meta)?.verified&&!n.meta?.verified}function qs(n){return n.verified||Ke(n._meta)?.verified||n.meta?.verified}function Gs(n){return n.app_name}function Xs(n){return n.app_name}function Qs(n){return n?.items??[]}function Ws(n,e){if(n?.hasMore)return e.reduce(Ys,0)}function Ys(n,e){return n+(e?.items?.length??0)}function Zs(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function ei({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=F(),l=a.mode??"add",c="agentId"in a?a.agentId:void 0,r="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:N=>{},m=(N,y,T)=>{c&&B("agent_connection_attached",{agent_id:c,connection_id:N,app_name:y,mode:T})},[f,d]=R.useState(null),[g,b]=R.useState(o),[h,p]=R.useState(!1),{org:j}=oe(),{data:v}=re.useSession(),C=Kt(),_=an(),S=ot(),I=N=>{e(!1),S({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:N}})},L=()=>{_.invalidateQueries({predicate:N=>{const y=N.queryKey;return y[1]===j.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},x=async(N,y)=>{B("connection_oauth_succeeded",{connection_id:N,flow:y});const T=new URL(`/api/${j.slug}/mcp/${N}`,window.location.origin);await _.invalidateQueries({queryKey:Ae.isMCPAuthenticated(T.href,null)}),L()},D=async N=>{d(N.app_name??N.id);try{const T=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await C.create.mutateAsync({title:T,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,z=await nt({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:V=>C.update.mutateAsync({id:A,data:{connection_token:V}}).then(()=>{})});if(z.ran&&!z.ok){B("connection_oauth_failed",{connection_id:A,flow:"clone",error:z.error??"no_token"}),K.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:z.error??"no token received"})),await C.delete.mutateAsync(A);return}z.ran&&await x(A,"clone"),m(A,N.app_name??null,"clone"),u(A)}catch(y){console.error("Failed to add connection:",y),K.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async N=>{if(!(!j||!v?.user?.id)){d(N.id);try{const y=Rn(N,j.id,v.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",k=!!y.connection_url,A=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!k&&!A){K.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:z}=await C.create.mutateAsync(y),V=await nt({connectionId:z,orgId:j.id,orgSlug:j.slug,persistFallback:X=>C.update.mutateAsync({id:z,data:{connection_token:X}}).then(()=>{})});if(V.ran&&!V.ok){B("connection_oauth_failed",{connection_id:z,flow:"connect_new",error:V.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:V.error??"no token received"})}),m(z,y.app_name??null,"new"),u(z);return}V.ran?(await x(z,"connect_new"),K.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(i("virtualMcp.addConnectionDialog.connected")),m(z,y.app_name??null,"new"),u(z)}catch(y){console.error("Failed to connect:",y),K.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(Et,{open:n,onOpenChange:e,children:[t.jsxs(Bt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Rt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Vt,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Fn,{value:g,onChange:b,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Hs,{mode:l,agentId:c,addedConnectionIds:r,onAdd:u,onCloneAndAdd:D,onConnectAndAdd:P,connectingItemId:f,search:g,onCreateConnection:()=>p(!0),onBrowseNavigate:I,defaultTab:s})})]}),t.jsx(Ks,{open:h,onOpenChange:p,onCreated:async N=>{p(!1);const y=await nt({connectionId:N,orgId:j.id,orgSlug:j.slug,persistFallback:T=>C.update.mutateAsync({id:N,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){B("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:y.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(N,null,"custom"),u(N),e(!1);return}y.ran&&await x(N,"custom_create"),m(N,null,"custom"),u(N),e(!1)}})]})}const ft=new Map;function ti(){const{org:n}=oe(),e=ln(),s=is(),o=s.find(p=>p.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:c}=ke({queryKey:Ae.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),r=a?.balanceCents??null,u=r!=null?r/100:null,m=R.useRef(new Map);if(r!=null){const p=ft.get(n.id);m.current.get(n.id)&&p!=null&&r>p&&B("credits_topped_up_detected",{organization_id:n.id,delta_cents:r-p,previous_balance_cents:p,new_balance_cents:r}),ft.set(n.id,r),m.current.set(n.id,!0)}const f=!!o,d=r!=null&&r>0,g=r!=null&&r===0,b=r!=null&&r===200,h=s.length>0&&s.every(p=>p.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:r,balanceDollars:u,hasCredits:d,isZeroBalance:g,isInitialFreeCredit:b,hasOnlyDecoProvider:h,isLoading:i,isFetching:c,refetch:l}}const Js=4,eo="TASK";function to(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,Js)||eo}function ni(n,e,s){const o=s?.trim();return o||(e==null?null:`${to(n)}-${String(e).padStart(2,"0")}`)}const no=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function si(n){const e=no.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function oi(n){const e=O.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let c;return e[4]!==a||e[5]!==i||e[6]!==l?(c=t.jsx("img",{src:fn,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=c):c=e[7],c}export{Zo as A,Qo as C,Jo as N,Yo as O,oi as S,Wo as a,ei as b,Xo as c,xs as d,it as e,Go as f,as as g,Bs as h,si as p,ni as t,ti as u};
@@ -1 +1 @@
1
- import{r as c,j as i,br as C,bv as y,bu as T,bx as I,cG as M,cF as H,bt as z,c as A,n as g}from"./index-9yj-_efP.js";var m="Switch",[U]=z(m),[q,F]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...v}=a,[p,h]=c.useState(null),w=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...v,ref:w,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const v=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==t&&h){const w=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(w)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function G(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
1
+ import{r as c,j as i,br as C,bv as y,bu as T,bx as I,cG as M,cF as H,bt as z,c as A,n as g}from"./index-DciLlmwa.js";var m="Switch",[U]=z(m),[q,F]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...v}=a,[p,h]=c.useState(null),w=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...v,ref:w,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const v=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==t&&h){const w=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(w)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function G(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
@@ -1 +1 @@
1
- import{c as te,j as s,dy as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-9yj-_efP.js";import{s as ge}from"./Plus-DKNGwR_3.js";import{c as Re,d as ve,b as Se,f as Ne,g as De,e as _e,a as Ce,A as Pe}from"./alert-dialog-3-OTkFY1.js";import{b as Ae,h as ke,a as we,c as Oe,d as ze,e as Ee}from"./dialog-By1OMlLd.js";import{I as Ie}from"./input-BYiGjA16.js";import{G as xe,a as $e}from"./github-repo-picker-w0Oci-z0.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-DCqmpAs8.js";import{t as He}from"./cards-C9rwE7Ej.js";import{R as Be}from"./require-capability-B8_4GJ6i.js";import"./collection-search-Dnv5fYeT.js";import"./SearchMd-ggO_8Cxj.js";import"./use-debounced-value-Y6N7frqu.js";import"./use-connection-CYA3vKPi.js";import"./use-mcp-client-Dymb_X2k.js";import"./constants-dLUUoWH7.js";import"./auth-BPX5s0Vm.js";import"./authenticate-and-persist-oauth-AXCC5dl_.js";import"./mcp-oauth-BG0MSbOj.js";import"./ArrowLeft-B3Nz-tod.js";import"./LinkExternal01-D3L0xAFp.js";import"./LockUnlocked01-DwYnHh0z.js";import"./use-mcp-tools-DM5N7tXk.js";import"./extract-connection-data-DYAFh7pP.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-md_uuWq9.js";import"./use-destination-route-C4B3rB7P.js";import"./use-virtual-mcp-B4IBLcu-.js";import"./hooks-Nz8YT62S.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DKI6s28K.js";import"./task-board-B1tDZ6Y6.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./folder-icon-DDUlYUiT.js";import"./Eye-ZMcw8H3v.js";import"./DotsVertical-D_9wi2eI.js";import"./Download01-BBCsiYjT.js";import"./Share07-BGhsLx6I.js";import"./Globe01-znZZYX0k.js";import"./Key01-C2uHKRAw.js";import"./Palette-3ja1vnUk.js";import"./Trash01-n9YGRMMc.js";import"./Zap-C847fP_t.js";import"./dropdown-menu-BsBai0T2.js";import"./Check-DkdMxHYV.js";import"./ChevronRight-Bf3nu_D0.js";import"./file-type-icon-Co9X71By.js";import"./access-gate-BdULYvct.js";import"./capability-load-error-CS6Yxq4y.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let N;e[16]!==b||e[17]!==t?(N=b.length===0?s.jsx(Ye,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=N):N=e[18];let D;e[19]!==t?(D=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=D):D=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==D?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:D,onImportComplete:se}),e[22]=u,e[23]=D,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(Ne,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(De,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==pe||e[99]!==X?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:X}),e[98]=pe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==N||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,N,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=N,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function Yt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Yt as default};
1
+ import{c as te,j as s,dy as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-DciLlmwa.js";import{s as ge}from"./Plus-DTvlgSaM.js";import{c as Re,d as ve,b as Se,f as Ne,g as De,e as _e,a as Ce,A as Pe}from"./alert-dialog-LpLRVXym.js";import{b as Ae,h as ke,a as we,c as Oe,d as ze,e as Ee}from"./dialog-T-Mu83_j.js";import{I as Ie}from"./input-DWRx0ZaP.js";import{G as xe,a as $e}from"./github-repo-picker-CxxRKD0_.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-C85L1-LH.js";import{t as He}from"./cards-DZBwSuFg.js";import{R as Be}from"./require-capability-CxO_iVfG.js";import"./collection-search-Cui6cogE.js";import"./SearchMd-BATwmNWi.js";import"./use-debounced-value-B_xEv_PQ.js";import"./use-connection-C4Qtd4a2.js";import"./use-mcp-client-vvCs8A5I.js";import"./constants-dLUUoWH7.js";import"./auth-CQnVkfUx.js";import"./authenticate-and-persist-oauth-o-iFa_kH.js";import"./mcp-oauth-COIn0o4T.js";import"./ArrowLeft-D4-rSSOO.js";import"./LinkExternal01-DBRDc7ru.js";import"./LockUnlocked01-Y8Ajlv9q.js";import"./use-mcp-tools-CRhMhE6W.js";import"./extract-connection-data-CEOmOrIN.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-CSTEre4d.js";import"./use-destination-route-D-qOMxxB.js";import"./use-virtual-mcp-J8dDcIjt.js";import"./hooks-8AhZo6f9.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CMzBQzG6.js";import"./task-board-BofYkJKh.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./folder-icon-4LVZL-xj.js";import"./Eye-Be1AmDrH.js";import"./DotsVertical-OqyOwIiN.js";import"./Download01-B_J9t-g9.js";import"./Share07-C3HLtC_Q.js";import"./Globe01-DHImgLhK.js";import"./Key01-CC4iAOyg.js";import"./Palette-Cs8ejiSg.js";import"./Trash01-D1rpDCu6.js";import"./Zap-abXMz_mv.js";import"./dropdown-menu-CzEOfCNw.js";import"./Check-7ocjoIXN.js";import"./ChevronRight-9VLaoIJr.js";import"./file-type-icon-DkwHQ_Eh.js";import"./access-gate-D2S9OM3c.js";import"./capability-load-error-CGXxiRab.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let N;e[16]!==b||e[17]!==t?(N=b.length===0?s.jsx(Ye,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=N):N=e[18];let D;e[19]!==t?(D=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=D):D=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==D?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:D,onImportComplete:se}),e[22]=u,e[23]=D,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(Ne,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(De,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==pe||e[99]!==X?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:X}),e[98]=pe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==N||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,N,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=N,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function Yt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Yt as default};
@@ -1 +1 @@
1
- import{c,n as i,j as r}from"./index-9yj-_efP.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,m as d,f as e};
1
+ import{c,n as i,j as r}from"./index-DciLlmwa.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,m as d,f as e};
@@ -1 +1 @@
1
- import{r as v,j as d,dz as k,br as p,bx as T,dA as y,bt as M,bw as P,bu as S,by as F,dB as V,cK as D,c as x,n as g}from"./index-9yj-_efP.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,O as a,Q as b,J as c};
1
+ import{r as v,j as d,dz as k,br as p,bx as T,dA as y,bt as M,bw as P,bu as S,by as F,dB as V,cK as D,c as x,n as g}from"./index-DciLlmwa.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,O as a,Q as b,J as c};
@@ -1 +1 @@
1
- import{ak as n,an as e,al as h,ap as d,am as a,ao as b,au as p}from"./index-9yj-_efP.js";n({title:e(),url:e(),icon:e()});n({registries:d(e(),n({enabled:a()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:h(e()).describe("List of MCP app_name or app_id values to hide from the store.")});const s=n({keyId:e(),modelId:e(),title:e().optional()}).nullable();b(["fast","smart","thinking","image","web_search","deep_research"]);b(["fast","smart","thinking"]);const A=n({tiers:n({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});n({tiers:n({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});n({ids:h(e()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});n({demo_mode:a().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:a().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),org_board_columns:a().optional().describe("The task board's columns are this org's own, mirrored from its tracker, rather than the set Studio ships. Off means the canonical lanes, which is the only board most orgs want."),reviewer_enabled:a().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:a().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:a().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:a().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:a().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:a().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:a().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:a().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:a().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),delivery_lanes_enabled:a().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:a().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")});const f=new Set(["reviewer_enabled","cheap_reviewer_model"]);function m(t,o){const r=t?.[o];return f.has(o)?r!==!1:r===!0}function R(t){const o=t?.auto_resolve_conflicts;return typeof o=="boolean"?o:t?.auto_merge===!0}n({id:e().describe("Brand context ID"),name:e().describe("Company name"),domain:e().describe("Company domain (e.g. example.com)"),overview:e().describe("Company overview / description"),logo:e().nullable().optional().describe("Logo URL"),favicon:e().nullable().optional().describe("Favicon URL"),ogImage:e().nullable().optional().describe("OG image URL"),fonts:n({heading:e().optional().describe("Font family for headings"),body:e().optional().describe("Font family for body text"),code:e().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().optional().describe("Primary brand color (hex)"),secondary:e().optional().describe("Secondary brand color (hex)"),accent:e().optional().describe("Accent / highlight color (hex)"),background:e().optional().describe("Background color (hex)"),foreground:e().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:h(d(e(),p())).nullable().optional().describe("Brand images"),metadata:d(e(),p()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:a().optional().describe("Whether this is the default brand for the organization")});const k="super-agent",l=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],g=l[0];function S(t){return l[t%l.length]??g}function T(t){return t.createdBy==="system"}const D="chore",x=["reviewer"],_={reviewer:"Reviewer"},v=["QA Agent","Code Reviewer"];function C(t){return t?.reviewer_enabled===void 0&&t?.qa_agent_enabled===!1&&t?.code_reviewer_enabled===!1?!1:m(t,"reviewer_enabled")}const L=["approved","merged","post_deploy_validation"];function I(t,o){return t?[_[o],...v].some(r=>t.startsWith(`${r}:`)):!1}function w(t,o){if(o)return new Date(o).getTime();let r=0;for(const i of t)i.action==="status_changed"&&i.data?.to==="in_review"&&(r=Math.max(r,new Date(i.occurredAt).getTime()));return r}function y(t,o){const r=w(t,o.cycleStartedAt),i=new Map;for(const c of t){if(c.action!=="review_approved"&&c.action!=="review_changes_requested"||new Date(c.occurredAt).getTime()<r)continue;const u=c.data??{};if(u.reviewer==="reviewer")if(c.action==="review_approved"){if(o?.verifiedOnly&&u.verified!==!0)continue;i.set("reviewer","approved")}else i.set("reviewer","changes_requested")}return i}function O(t,o,r){if(o.length===0)return!1;const i=y(t,r);return o.every(c=>i.get(c)==="approved")}const M="task-board.item.updated",F="task-board.item.deleted";export{D,x as R,k as S,M as T,O as a,I as b,A as c,f as d,R as e,F as f,L as g,g as h,T as i,S as n,m as o,C as r};
1
+ import{ak as n,an as e,al as h,ap as d,am as a,ao as b,au as p}from"./index-DciLlmwa.js";n({title:e(),url:e(),icon:e()});n({registries:d(e(),n({enabled:a()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:h(e()).describe("List of MCP app_name or app_id values to hide from the store.")});const s=n({keyId:e(),modelId:e(),title:e().optional()}).nullable();b(["fast","smart","thinking","image","web_search","deep_research"]);b(["fast","smart","thinking"]);const A=n({tiers:n({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});n({tiers:n({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});n({ids:h(e()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});n({demo_mode:a().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:a().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),org_board_columns:a().optional().describe("The task board's columns are this org's own, mirrored from its tracker, rather than the set Studio ships. Off means the canonical lanes, which is the only board most orgs want."),reviewer_enabled:a().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:a().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:a().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:a().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:a().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:a().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:a().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:a().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:a().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),delivery_lanes_enabled:a().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:a().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")});const f=new Set(["reviewer_enabled","cheap_reviewer_model"]);function m(t,o){const r=t?.[o];return f.has(o)?r!==!1:r===!0}function R(t){const o=t?.auto_resolve_conflicts;return typeof o=="boolean"?o:t?.auto_merge===!0}n({id:e().describe("Brand context ID"),name:e().describe("Company name"),domain:e().describe("Company domain (e.g. example.com)"),overview:e().describe("Company overview / description"),logo:e().nullable().optional().describe("Logo URL"),favicon:e().nullable().optional().describe("Favicon URL"),ogImage:e().nullable().optional().describe("OG image URL"),fonts:n({heading:e().optional().describe("Font family for headings"),body:e().optional().describe("Font family for body text"),code:e().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().optional().describe("Primary brand color (hex)"),secondary:e().optional().describe("Secondary brand color (hex)"),accent:e().optional().describe("Accent / highlight color (hex)"),background:e().optional().describe("Background color (hex)"),foreground:e().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:h(d(e(),p())).nullable().optional().describe("Brand images"),metadata:d(e(),p()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:a().optional().describe("Whether this is the default brand for the organization")});const k="super-agent",l=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],g=l[0];function S(t){return l[t%l.length]??g}function T(t){return t.createdBy==="system"}const D="chore",x=["reviewer"],_={reviewer:"Reviewer"},v=["QA Agent","Code Reviewer"];function C(t){return t?.reviewer_enabled===void 0&&t?.qa_agent_enabled===!1&&t?.code_reviewer_enabled===!1?!1:m(t,"reviewer_enabled")}const L=["approved","merged","post_deploy_validation"];function I(t,o){return t?[_[o],...v].some(r=>t.startsWith(`${r}:`)):!1}function w(t,o){if(o)return new Date(o).getTime();let r=0;for(const i of t)i.action==="status_changed"&&i.data?.to==="in_review"&&(r=Math.max(r,new Date(i.occurredAt).getTime()));return r}function y(t,o){const r=w(t,o.cycleStartedAt),i=new Map;for(const c of t){if(c.action!=="review_approved"&&c.action!=="review_changes_requested"||new Date(c.occurredAt).getTime()<r)continue;const u=c.data??{};if(u.reviewer==="reviewer")if(c.action==="review_approved"){if(o?.verifiedOnly&&u.verified!==!0)continue;i.set("reviewer","approved")}else i.set("reviewer","changes_requested")}return i}function O(t,o,r){if(o.length===0)return!1;const i=y(t,r);return o.every(c=>i.get(c)==="approved")}const M="task-board.item.updated",F="task-board.item.deleted";export{D,x as R,k as S,M as T,O as a,I as b,A as c,f as d,R as e,F as f,L as g,g as h,T as i,S as n,m as o,C as r};
@@ -0,0 +1 @@
1
+ import{c as R,r as U,j as r,n as W,B as G,H as z,ac as Q,K as V,o as oe,p as X,e as Z,b as q,P as te,dx as Te,du as Re,dw as H,dv as le,Y as ce,s as Ae,t as L}from"./index-DciLlmwa.js";import{h as Ie,y as Pe}from"./config-CcCsXfrl.js";import{I as ie}from"./input-DWRx0ZaP.js";import{i as me}from"./Check-7ocjoIXN.js";import{i as ue}from"./ChevronSelectorVertical-Bn9j0Ema.js";import{C as Ee,a as Oe,b as Be,c as De,d as Ke,e as Fe}from"./command-BBzO5i9f.js";import{a as $e,P as Me,b as Le}from"./popover-CQgQYm0L.js";import{S as qe}from"./switch-DhSIdR_i.js";import{c as ge,d as pe,b as je,f as xe,g as he,e as ye,a as be,A as ve}from"./alert-dialog-LpLRVXym.js";import{S as Se,a as Ne,b as Ce,c as we,d as Y}from"./select-C7dHMUjj.js";import{R as Je,A as Ue}from"./review-settings-C2T9zrlI.js";import{t as ze}from"./cards-DZBwSuFg.js";import{u as _e}from"./use-organization-settings-14ZS51R4.js";import{R as Qe}from"./require-capability-CxO_iVfG.js";import"./task-board-BofYkJKh.js";import"./decopilot-sse-pool-CMzBQzG6.js";import"./backoff-CrEUbyZT.js";import"./use-decopilot-events-CbnRp_ep.js";import"./AlertCircle-CDf-1fgB.js";import"./UserSquare-DZILSTAV.js";import"./CheckCircle-DphAGsbS.js";import"./DotsVertical-OqyOwIiN.js";import"./Eye-Be1AmDrH.js";import"./Shield01-D69Bdv4o.js";import"./index-CQc-SVqm.js";import"./dialog-T-Mu83_j.js";import"./SearchMd-BATwmNWi.js";import"./ChevronDown-BR9TODzF.js";import"./ChevronUp-C3SQKJxr.js";import"./GitBranch01-DQ70huzz.js";import"./folder-icon-4LVZL-xj.js";import"./Download01-B_J9t-g9.js";import"./Share07-C3HLtC_Q.js";import"./Globe01-DHImgLhK.js";import"./Key01-CC4iAOyg.js";import"./Palette-Cs8ejiSg.js";import"./Trash01-D1rpDCu6.js";import"./Zap-abXMz_mv.js";import"./dropdown-menu-CzEOfCNw.js";import"./ChevronRight-9VLaoIJr.js";import"./file-type-icon-DkwHQ_Eh.js";import"./constants-dLUUoWH7.js";import"./access-gate-D2S9OM3c.js";import"./capability-load-error-CGXxiRab.js";function Ve(t){const e=R.c(41),{options:n,value:s,onChange:l,placeholder:i,triggerClassName:a,contentClassName:o,width:d,renderTrigger:g,renderItem:c,emptyMessage:m,searchPlaceholder:p,filter:j}=t,x=i===void 0?"Select...":i,b=d===void 0?"w-[200px]":d,y=m===void 0?"No results found.":m,v=p===void 0?"Search...":p;let f;e[0]!==s?(f=M=>M.value===s,e[0]=s,e[1]=f):f=e[1];const u=n.find(f),[h,S]=U.useState(!1),C=Me,N=$e,_=!0,k=g?r.jsx("div",{className:W("cursor-pointer",a),children:g(u)}):r.jsxs(G,{variant:"outline",role:"combobox",className:W("justify-between",b,a),children:[u?u.label:x,r.jsx(ue,{className:"opacity-50"})]});let T;e[2]!==N||e[3]!==k?(T=r.jsx(N,{asChild:_,children:k}),e[2]=N,e[3]=k,e[4]=T):T=e[4];let A;e[5]!==o?(A=W("p-0",o),e[5]=o,e[6]=A):A=e[6];let B;e[7]===Symbol.for("react.memo_cache_sentinel")?(B={width:"var(--radix-popover-trigger-width)"},e[7]=B):B=e[7];let D;e[8]!==v?(D=r.jsx(Ee,{placeholder:v,className:"h-9"}),e[8]=v,e[9]=D):D=e[9];let F;e[10]!==y?(F=r.jsx(Oe,{children:y}),e[10]=y,e[11]=F):F=e[11];let I;if(e[12]!==l||e[13]!==n||e[14]!==c||e[15]!==S||e[16]!==s){let M;e[18]!==l||e[19]!==c||e[20]!==S||e[21]!==s?(M=w=>{const ee=s===w.value;return r.jsx(Be,{value:w.label,onSelect:()=>{l(w.value===s?"":w.value),S(!1)},children:c?c(w,ee):r.jsxs(r.Fragment,{children:[w.label,r.jsx(me,{className:W("ml-auto",ee?"opacity-100":"opacity-0")})]})},w.value)},e[18]=l,e[19]=c,e[20]=S,e[21]=s,e[22]=M):M=e[22],I=n.map(M),e[12]=l,e[13]=n,e[14]=c,e[15]=S,e[16]=s,e[17]=I}else I=e[17];let P;e[23]!==I?(P=r.jsx(De,{children:I}),e[23]=I,e[24]=P):P=e[24];let $;e[25]!==F||e[26]!==P?($=r.jsxs(Ke,{children:[F,P]}),e[25]=F,e[26]=P,e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==D||e[30]!==$?(E=r.jsxs(Fe,{filter:j,children:[D,$]}),e[28]=j,e[29]=D,e[30]=$,e[31]=E):E=e[31];let O;e[32]!==E||e[33]!==A?(O=r.jsx(Le,{className:A,style:B,children:E}),e[32]=E,e[33]=A,e[34]=O):O=e[34];let K;return e[35]!==C||e[36]!==h||e[37]!==S||e[38]!==O||e[39]!==T?(K=r.jsxs(C,{open:h,onOpenChange:S,children:[T,O]}),e[35]=C,e[36]=h,e[37]=S,e[38]=O,e[39]=T,e[40]=K):K=e[40],K}function Ye(t){const e=R.c(4),{size:n,className:s}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=l):l=e[0];let i;return e[1]!==s||e[2]!==n?(i=r.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:s,children:l}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function ke(t){const e=t.projectName?.replace(/\s+/g," ").trim(),n=t.name.trim();return e?{primary:e,secondary:[n,t.projectKey].filter(Boolean).join(" · ")}:{primary:n,secondary:t.projectKey??""}}function Ge(t){const{primary:e,secondary:n}=ke(t);return[e,n,`#${t.id}`].filter(Boolean).join(" ")}function de(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}function He(t,e){const n=de(e).trim();if(!n)return 1;const s=de(t);return n.split(/\s+/).every(l=>s.includes(l))?1:0}function We(){const t=R.c(7),{org:e}=z(),n=Q();let s;t[0]!==e.id?(s=V.jiraIntegration(e.id),t[0]=e.id,t[1]=s):s=t[1];let l;t[2]!==n?(l=async()=>(await n.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=n,t[3]=l):l=t[3];let i;return t[4]!==s||t[5]!==l?(i={queryKey:s,queryFn:l},t[4]=s,t[5]=l,t[6]=i):i=t[6],oe(i)}function ne(){const t=R.c(8),{org:e}=z(),n=Q(),s=X();let l;t[0]!==n?(l=async o=>(await n.call("JIRA_INTEGRATION_UPSERT",o)).integration,t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:V.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let a;return t[5]!==l||t[6]!==i?(a={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=a):a=t[7],Z(a)}function Xe(){const t=R.c(8),{org:e}=z(),n=Q(),s=X();let l;t[0]!==n?(l=()=>n.call("JIRA_INTEGRATION_DELETE",{}),t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:V.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let a;return t[5]!==l||t[6]!==i?(a={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=a):a=t[7],Z(a)}function Ze(t){const e=R.c(8),{org:n}=z(),s=Q();let l;e[0]!==n.id?(l=V.jiraBoards(n.id),e[0]=n.id,e[1]=l):l=e[1];let i;e[2]!==s?(i=async()=>(await s.call("JIRA_BOARDS_LIST",{})).boards,e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==t||e[5]!==l||e[6]!==i?(a={queryKey:l,enabled:t,staleTime:6e4,queryFn:i},e[4]=t,e[5]=l,e[6]=i,e[7]=a):a=e[7],oe(a)}function et(t){const e=R.c(10),{org:n}=z(),s=Q();let l;e[0]!==t||e[1]!==n.id?(l=V.jiraBoardColumns(n.id,t??""),e[0]=t,e[1]=n.id,e[2]=l):l=e[2];const i=t!==null;let a;e[3]!==t||e[4]!==s?(a=async()=>(await s.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=s,e[5]=a):a=e[5];let o;return e[6]!==l||e[7]!==i||e[8]!==a?(o={queryKey:l,enabled:i,staleTime:6e4,queryFn:a},e[6]=l,e[7]=i,e[8]=a,e[9]=o):o=e[9],oe(o)}function tt(){const t=R.c(8),{org:e}=z(),n=Q(),s=X();let l;t[0]!==n?(l=async()=>(await n.call("JIRA_SYNC_RUN",{})).result,t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:V.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let a;return t[5]!==l||t[6]!==i?(a={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=a):a=t[7],Z(a)}function st(){const t=R.c(8),{org:e}=z(),n=Q(),s=X();let l;t[0]!==n?(l=async()=>await n.call("JIRA_RESYNC_REQUEST",{}),t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:V.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let a;return t[5]!==l||t[6]!==i?(a={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=a):a=t[7],Z(a)}function it(){const t=R.c(8),{locator:e}=z(),n=Q(),s=X();let l;t[0]!==n?(l=async o=>await n.call("TASK_BOARD_COLUMN_ROLE_SET",{columnKey:o.columnKey,role:o.role}),t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:V.taskBoardItems(e)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let a;return t[5]!==l||t[6]!==i?(a={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=a):a=t[7],Z(a)}function se(t,e){const n=e.statuses[0];if(n)return Object.entries(t).find(([,s])=>s.includes(n))?.[0]}const fe=[{value:"triage",labelKey:"taskBoard.config.statusBacklog"},{value:"todo",labelKey:"taskBoard.config.statusTodo"},{value:"in_progress",labelKey:"taskBoard.config.statusInProgress"},{value:"in_review",labelKey:"taskBoard.config.statusInReview"},{value:"approved",labelKey:"taskBoard.config.statusApproved"},{value:"merged",labelKey:"taskBoard.config.statusMerged"},{value:"post_deploy_validation",labelKey:"taskBoard.config.statusPostDeployValidation"},{value:"done",labelKey:"taskBoard.config.statusDone"},{value:"archived",labelKey:"taskBoard.config.statusArchived"}];function nt(t,e){return t?fe:fe.filter(n=>!Pe(n.value)||n.value===e)}const re="__dont_sync__";function J(t,e){return t instanceof Error?t.message:e}const lt="https://id.atlassian.com/manage-profile/security/api-tokens";function rt(t){const e=R.c(7),{stepKeys:n}=t,s=q();let l;if(e[0]!==n||e[1]!==s){let a;e[3]!==s?(a=o=>r.jsx("li",{children:s(o)},o),e[3]=s,e[4]=a):a=e[4],l=n.map(a),e[0]=n,e[1]=s,e[2]=l}else l=e[2];let i;return e[5]!==l?(i=r.jsx("ol",{className:"list-decimal pl-5 flex flex-col gap-1 text-xs text-muted-foreground",children:l}),e[5]=l,e[6]=i):i=e[6],i}function at(){const t=R.c(69),e=q(),n=ne(),[s,l]=U.useState(""),[i,a]=U.useState(""),[o,d]=U.useState("");let g;t[0]!==o||t[1]!==i||t[2]!==s?(g=s.trim()!==""&&i.trim()!==""&&o.trim()!=="",t[0]=o,t[1]=i,t[2]=s,t[3]=g):g=t[3];const c=g;let m;t[4]!==e?(m=e("settings.jira.siteLabel"),t[4]=e,t[5]=m):m=t[5];let p;t[6]!==m?(p=r.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:m}),t[6]=m,t[7]=p):p=t[7];let j;t[8]===Symbol.for("react.memo_cache_sentinel")?(j=w=>l(w.target.value),t[8]=j):j=t[8];let x;t[9]!==e?(x=e("settings.jira.sitePlaceholder"),t[9]=e,t[10]=x):x=t[10];let b;t[11]!==s||t[12]!==x?(b=r.jsx(ie,{value:s,onChange:j,placeholder:x,autoComplete:"off"}),t[11]=s,t[12]=x,t[13]=b):b=t[13];let y;t[14]!==p||t[15]!==b?(y=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[p,b]}),t[14]=p,t[15]=b,t[16]=y):y=t[16];let v;t[17]!==e?(v=e("settings.jira.emailLabel"),t[17]=e,t[18]=v):v=t[18];let f;t[19]!==v?(f=r.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:v}),t[19]=v,t[20]=f):f=t[20];let u;t[21]===Symbol.for("react.memo_cache_sentinel")?(u=w=>a(w.target.value),t[21]=u):u=t[21];let h;t[22]!==e?(h=e("settings.jira.emailPlaceholder"),t[22]=e,t[23]=h):h=t[23];let S;t[24]!==i||t[25]!==h?(S=r.jsx(ie,{value:i,onChange:u,placeholder:h,autoComplete:"off"}),t[24]=i,t[25]=h,t[26]=S):S=t[26];let C;t[27]!==S||t[28]!==f?(C=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[f,S]}),t[27]=S,t[28]=f,t[29]=C):C=t[29];let N;t[30]!==e?(N=e("settings.jira.tokenLabel"),t[30]=e,t[31]=N):N=t[31];let _;t[32]!==N?(_=r.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:N}),t[32]=N,t[33]=_):_=t[33];let k;t[34]!==e?(k=e("settings.jira.createTokenLink"),t[34]=e,t[35]=k):k=t[35];let T;t[36]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsx(Ae,{size:12}),t[36]=T):T=t[36];let A;t[37]!==k?(A=r.jsxs("a",{href:lt,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-xs text-foreground hover:underline",children:[k,T]}),t[37]=k,t[38]=A):A=t[38];let B;t[39]!==_||t[40]!==A?(B=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[_,A]}),t[39]=_,t[40]=A,t[41]=B):B=t[41];let D;t[42]===Symbol.for("react.memo_cache_sentinel")?(D=w=>d(w.target.value),t[42]=D):D=t[42];let F;t[43]!==e?(F=e("settings.jira.tokenPlaceholder"),t[43]=e,t[44]=F):F=t[44];let I;t[45]!==o||t[46]!==F?(I=r.jsx(ie,{type:"password",value:o,onChange:D,placeholder:F,autoComplete:"off"}),t[45]=o,t[46]=F,t[47]=I):I=t[47];let P;t[48]!==B||t[49]!==I?(P=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[B,I]}),t[48]=B,t[49]=I,t[50]=P):P=t[50];const $=!c||n.isPending;let E;t[51]!==o||t[52]!==i||t[53]!==s||t[54]!==e||t[55]!==n?(E=()=>n.mutate({siteUrl:s.trim(),email:i.trim(),apiToken:o.trim()},{onSuccess:()=>L.success(e("settings.jira.connected")),onError:w=>L.error(J(w,e("settings.jira.connectFailed")))}),t[51]=o,t[52]=i,t[53]=s,t[54]=e,t[55]=n,t[56]=E):E=t[56];let O;t[57]!==e||t[58]!==n.isPending?(O=n.isPending?e("settings.jira.connecting"):e("settings.jira.connect"),t[57]=e,t[58]=n.isPending,t[59]=O):O=t[59];let K;t[60]!==$||t[61]!==E||t[62]!==O?(K=r.jsx(G,{size:"sm",className:"w-fit",disabled:$,onClick:E,children:O}),t[60]=$,t[61]=E,t[62]=O,t[63]=K):K=t[63];let M;return t[64]!==C||t[65]!==P||t[66]!==K||t[67]!==y?(M=r.jsxs("div",{className:"flex flex-col gap-4 mt-3 max-w-md",children:[y,C,P,K]}),t[64]=C,t[65]=P,t[66]=K,t[67]=y,t[68]=M):M=t[68],M}function ot(t){const e=R.c(7),{integration:n}=t,s=q();if(n.lastSyncError){let a;return e[0]!==n.lastSyncError?(a=r.jsx("p",{className:"text-xs text-destructive truncate",children:n.lastSyncError}),e[0]=n.lastSyncError,e[1]=a):a=e[1],a}let l;e[2]!==n.lastSyncedAt||e[3]!==s?(l=n.lastSyncedAt?s("settings.jira.lastSynced",{ago:ze(n.lastSyncedAt)}):s("settings.jira.waitingFirstSync"),e[2]=n.lastSyncedAt,e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==l?(i=r.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[5]=l,e[6]=i):i=e[6],i}const ae="__none__";function ct(){const t=R.c(14),e=q(),{columns:n,isLoading:s}=Ie(),l=it();if(s){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ce,{className:"h-24 w-full mt-3"}),t[0]=o):o=t[0],o}if(n.length===0){let o;t[1]!==e?(o=e("settings.jira.noColumnsYet"),t[1]=e,t[2]=o):o=t[2];let d;return t[3]!==o?(d=r.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:o}),t[3]=o,t[4]=d):d=t[4],d}let i;if(t[5]!==n||t[6]!==l||t[7]!==e){let o;t[9]!==l||t[10]!==e?(o=d=>r.jsxs("div",{className:"flex items-center justify-between gap-4 py-2.5 border-b border-border/60 last:border-b-0",children:[r.jsx("span",{className:"min-w-0 truncate text-sm",children:d.title}),r.jsxs(Se,{value:d.role??ae,onValueChange:g=>l.mutate({columnKey:d.key,role:g===ae?null:g},{onError:c=>L.error(J(c,e("settings.jira.saveFailed")))}),children:[r.jsx(Ne,{className:"w-44 shrink-0",children:r.jsx(Ce,{})}),r.jsxs(we,{children:[r.jsx(Y,{value:ae,children:e("settings.jira.roleNone")}),r.jsx(Y,{value:"todo",children:e("settings.jira.roleQueued")}),r.jsx(Y,{value:"in_progress",children:e("settings.jira.roleInProgress")}),r.jsx(Y,{value:"in_review",children:e("settings.jira.roleInReview")}),r.jsx(Y,{value:"archived",children:e("settings.jira.roleArchived")})]})]})]},d.key),t[9]=l,t[10]=e,t[11]=o):o=t[11],i=n.map(o),t[5]=n,t[6]=l,t[7]=e,t[8]=i}else i=t[8];let a;return t[12]!==i?(a=r.jsx("div",{className:"flex flex-col mt-3",children:i}),t[12]=i,t[13]=a):a=t[13],a}function dt(t){const e=R.c(35),{integration:n}=t,s=q(),l=ne(),i=et(n.boardId),a=_e("delivery_lanes_enabled"),[o,d]=U.useState(n.statusMapping),[g,c]=U.useState(n);if(g!==n&&(c(n),d(n.statusMapping)),i.isPending){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(ce,{className:"h-24 w-full mt-3"}),e[0]=f):f=e[0],f}if(i.isError){let f;e[1]!==i.error||e[2]!==s?(f=J(i.error,s("settings.jira.columnsFailed")),e[1]=i.error,e[2]=s,e[3]=f):f=e[3];let u;return e[4]!==f?(u=r.jsx("p",{className:"text-xs text-destructive mt-3",children:f}),e[4]=f,e[5]=u):u=e[5],u}let m;e[6]!==i.data||e[7]!==o||e[8]!==s||e[9]!==l?(m=function(u,h){const S=o,C={};for(const N of i.data??[]){const _=N.name===u.name?h===re?void 0:h:se(o,N);_&&(C[_]=[...C[_]??[],...N.statuses])}d(C),l.mutate({statusMapping:C},{onError:N=>{d(S),L.error(J(N,s("settings.jira.saveFailed")))}})},e[6]=i.data,e[7]=o,e[8]=s,e[9]=l,e[10]=m):m=e[10];const p=m;let j,x;if(e[11]!==i.data||e[12]!==o||e[13]!==s){let f;e[16]!==o?(f=h=>!se(o,h),e[16]=o,e[17]=f):f=e[17];const u=(i.data??[]).filter(f);j="flex flex-col mt-3",x=u.length>0&&r.jsx("p",{className:"mb-2 rounded-md bg-warning/10 px-3 py-2 text-xs text-warning",children:s("settings.jira.unmappedWarning",{columns:u.map(ft).join(", ")})}),e[11]=i.data,e[12]=o,e[13]=s,e[14]=j,e[15]=x}else j=e[14],x=e[15];let b;e[18]!==i.data?(b=i.data??[],e[18]=i.data,e[19]=b):b=e[19];let y;if(e[20]!==a||e[21]!==o||e[22]!==p||e[23]!==s||e[24]!==b){let f;e[26]!==a||e[27]!==o||e[28]!==p||e[29]!==s?(f=u=>r.jsxs("div",{className:"flex items-center justify-between gap-4 py-2.5 border-b border-border/60 last:border-b-0",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("span",{className:"text-sm truncate",children:u.name}),(u.statuses.length>1||u.statuses[0]!==u.name)&&r.jsx("p",{className:"text-xs text-muted-foreground truncate",children:u.statuses.join(", ")})]}),r.jsxs(Se,{value:se(o,u)??re,onValueChange:h=>p(u,h),children:[r.jsx(Ne,{className:"w-44 shrink-0",children:r.jsx(Ce,{})}),r.jsxs(we,{children:[r.jsx(Y,{value:re,children:s("settings.jira.dontSync")}),nt(a,se(o,u)).map(h=>r.jsx(Y,{value:h.value,children:s(h.labelKey)},h.value))]})]})]},u.name),e[26]=a,e[27]=o,e[28]=p,e[29]=s,e[30]=f):f=e[30],y=b.map(f),e[20]=a,e[21]=o,e[22]=p,e[23]=s,e[24]=b,e[25]=y}else y=e[25];let v;return e[31]!==j||e[32]!==x||e[33]!==y?(v=r.jsxs("div",{className:j,children:[x,y]}),e[31]=j,e[32]=x,e[33]=y,e[34]=v):v=e[34],v}function ft(t){return t.name}function mt(t){const e=R.c(44),{integration:n}=t,s=q(),l=Xe(),[i,a]=U.useState(!1),o=n.siteUrl,d=n.email;let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>a(!0),e[0]=g):g=e[0];let c;e[1]!==s?(c=s("settings.jira.disconnect"),e[1]=s,e[2]=c):c=e[2];let m;e[3]!==c?(m=r.jsx(G,{variant:"outline",size:"sm",onClick:g,children:c}),e[3]=c,e[4]=m):m=e[4];let p;e[5]!==n.email||e[6]!==n.siteUrl||e[7]!==m?(p=r.jsx(H,{title:o,description:d,action:m}),e[5]=n.email,e[6]=n.siteUrl,e[7]=m,e[8]=p):p=e[8];let j;e[9]!==s?(j=s("settings.jira.disconnectTitle"),e[9]=s,e[10]=j):j=e[10];let x;e[11]!==j?(x=r.jsx(ge,{children:j}),e[11]=j,e[12]=x):x=e[12];let b;e[13]!==s?(b=s("settings.jira.disconnectDescription"),e[13]=s,e[14]=b):b=e[14];let y;e[15]!==b?(y=r.jsx(pe,{children:b}),e[15]=b,e[16]=y):y=e[16];let v;e[17]!==y||e[18]!==x?(v=r.jsxs(je,{children:[x,y]}),e[17]=y,e[18]=x,e[19]=v):v=e[19];let f;e[20]!==s?(f=s("settings.jira.cancel"),e[20]=s,e[21]=f):f=e[21];let u;e[22]!==f?(u=r.jsx(xe,{children:f}),e[22]=f,e[23]=u):u=e[23];let h;e[24]!==l||e[25]!==s?(h=()=>l.mutate(void 0,{onSuccess:()=>L.success(s("settings.jira.disconnected")),onError:A=>L.error(J(A,s("settings.jira.saveFailed")))}),e[24]=l,e[25]=s,e[26]=h):h=e[26];let S;e[27]!==s?(S=s("settings.jira.disconnect"),e[27]=s,e[28]=S):S=e[28];let C;e[29]!==h||e[30]!==S?(C=r.jsx(he,{onClick:h,children:S}),e[29]=h,e[30]=S,e[31]=C):C=e[31];let N;e[32]!==u||e[33]!==C?(N=r.jsxs(ye,{children:[u,C]}),e[32]=u,e[33]=C,e[34]=N):N=e[34];let _;e[35]!==v||e[36]!==N?(_=r.jsxs(be,{children:[v,N]}),e[35]=v,e[36]=N,e[37]=_):_=e[37];let k;e[38]!==i||e[39]!==_?(k=r.jsx(ve,{open:i,onOpenChange:a,children:_}),e[38]=i,e[39]=_,e[40]=k):k=e[40];let T;return e[41]!==k||e[42]!==p?(T=r.jsxs(r.Fragment,{children:[p,k]}),e[41]=k,e[42]=p,e[43]=T):T=e[43],T}function ut(t){const e=R.c(36),{integration:n}=t,s=q(),l=ne(),i=Ze(!0);let a,o;e[0]!==i.data||e[1]!==n.boardId||e[2]!==n.boardName?(a=(i.data??[]).map(pt),o=n.boardId?a.find(u=>u.value===n.boardId)?.primary??n.boardName??n.boardId:null,e[0]=i.data,e[1]=n.boardId,e[2]=n.boardName,e[3]=a,e[4]=o):(a=e[3],o=e[4]);const d=o;let g;e[5]!==s?(g=s("settings.jira.boardLabel"),e[5]=s,e[6]=g):g=e[6];let c;e[7]!==s?(c=s("settings.jira.boardDescription"),e[7]=s,e[8]=c):c=e[8];const m=n.boardId??"";let p;e[9]!==s?(p=s("settings.jira.boardPlaceholder"),e[9]=s,e[10]=p):p=e[10];let j;e[11]!==s?(j=s("settings.jira.boardSearchPlaceholder"),e[11]=s,e[12]=j):j=e[12];let x;e[13]!==i.isPending||e[14]!==s?(x=i.isPending?s("settings.jira.loadingBoards"):s("settings.jira.noBoardsMatch"),e[13]=i.isPending,e[14]=s,e[15]=x):x=e[15];let b;e[16]!==d||e[17]!==s?(b=()=>r.jsxs(G,{variant:"outline",role:"combobox",className:"w-72 justify-between font-normal",children:[r.jsx("span",{className:"truncate",children:d??s("settings.jira.boardPlaceholder")}),r.jsx(ue,{className:"opacity-50 shrink-0"})]}),e[16]=d,e[17]=s,e[18]=b):b=e[18];let y;e[19]!==a||e[20]!==n.boardId||e[21]!==s||e[22]!==l?(y=u=>{!u||u===n.boardId||l.mutate({boardId:u,boardName:a.find(h=>h.value===u)?.primary??null,statusMapping:{},enabled:!1},{onError:h=>L.error(J(h,s("settings.jira.saveFailed")))})},e[19]=a,e[20]=n.boardId,e[21]=s,e[22]=l,e[23]=y):y=e[23];let v;e[24]!==a||e[25]!==m||e[26]!==p||e[27]!==j||e[28]!==x||e[29]!==b||e[30]!==y?(v=r.jsx(Ve,{options:a,value:m,width:"w-72",triggerClassName:"shrink-0",placeholder:p,searchPlaceholder:j,filter:He,emptyMessage:x,renderTrigger:b,renderItem:gt,onChange:y}),e[24]=a,e[25]=m,e[26]=p,e[27]=j,e[28]=x,e[29]=b,e[30]=y,e[31]=v):v=e[31];let f;return e[32]!==v||e[33]!==g||e[34]!==c?(f=r.jsx(H,{title:g,description:c,action:v}),e[32]=v,e[33]=g,e[34]=c,e[35]=f):f=e[35],f}function gt(t,e){return r.jsxs("div",{className:"flex items-start gap-2 min-w-0 w-full",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"truncate",children:t.primary}),r.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.secondary})]}),r.jsx(me,{className:W("mt-0.5 shrink-0",e?"opacity-100":"opacity-0")})]})}function pt(t){const{primary:e,secondary:n}=ke(t);return{value:String(t.id),label:Ge(t),primary:e,secondary:n}}function jt(t){const e=R.c(13),{integration:n}=t,s=q(),l=_e("org_board_columns");let i;e[0]!==l||e[1]!==s?(i=s(l?"settings.jira.rolesLabel":"settings.jira.mappingLabel"),e[0]=l,e[1]=s,e[2]=i):i=e[2];let a;e[3]!==l||e[4]!==s?(a=s(l?"settings.jira.rolesDescription":"settings.jira.mappingDescription"),e[3]=l,e[4]=s,e[5]=a):a=e[5];let o;e[6]!==n||e[7]!==l?(o=l?r.jsx(ct,{}):r.jsx(dt,{integration:n}),e[6]=n,e[7]=l,e[8]=o):o=e[8];let d;return e[9]!==i||e[10]!==a||e[11]!==o?(d=r.jsx(H,{title:i,description:a,children:o}),e[9]=i,e[10]=a,e[11]=o,e[12]=d):d=e[12],d}function xt(t){const e=R.c(72),{integration:n}=t,s=q(),l=ne(),i=tt(),a=st(),[o,d]=U.useState(!1);let g;e[0]!==n.statusMapping?(g=Object.keys(n.statusMapping),e[0]=n.statusMapping,e[1]=g):g=e[1];const c=g.length>0;let m;e[2]!==s?(m=s("settings.jira.enableLabel"),e[2]=s,e[3]=m):m=e[3];let p;e[4]!==n?(p=r.jsx(ot,{integration:n}),e[4]=n,e[5]=p):p=e[5];const j=!n.enabled||i.isPending||a.isPending;let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=()=>d(!0),e[6]=x):x=e[6];let b;e[7]!==s?(b=s("settings.jira.resyncAll"),e[7]=s,e[8]=b):b=e[8];let y;e[9]!==j||e[10]!==b?(y=r.jsx(G,{variant:"outline",size:"sm",disabled:j,onClick:x,children:b}),e[9]=j,e[10]=b,e[11]=y):y=e[11];let v;e[12]!==s?(v=s("settings.jira.resyncAllTitle"),e[12]=s,e[13]=v):v=e[13];let f;e[14]!==v?(f=r.jsx(ge,{children:v}),e[14]=v,e[15]=f):f=e[15];let u;e[16]!==s?(u=s("settings.jira.resyncAllDescription"),e[16]=s,e[17]=u):u=e[17];let h;e[18]!==u?(h=r.jsx(pe,{children:u}),e[18]=u,e[19]=h):h=e[19];let S;e[20]!==h||e[21]!==f?(S=r.jsxs(je,{children:[f,h]}),e[20]=h,e[21]=f,e[22]=S):S=e[22];let C;e[23]!==s?(C=s("settings.jira.cancel"),e[23]=s,e[24]=C):C=e[24];let N;e[25]!==C?(N=r.jsx(xe,{children:C}),e[25]=C,e[26]=N):N=e[26];let _;e[27]!==a||e[28]!==s?(_=()=>a.mutate(void 0,{onSuccess:()=>L.success(s("settings.jira.resyncAllQueued")),onError:w=>L.error(J(w,s("settings.jira.syncFailed")))}),e[27]=a,e[28]=s,e[29]=_):_=e[29];let k;e[30]!==s?(k=s("settings.jira.resyncAll"),e[30]=s,e[31]=k):k=e[31];let T;e[32]!==_||e[33]!==k?(T=r.jsx(he,{onClick:_,children:k}),e[32]=_,e[33]=k,e[34]=T):T=e[34];let A;e[35]!==N||e[36]!==T?(A=r.jsxs(ye,{children:[N,T]}),e[35]=N,e[36]=T,e[37]=A):A=e[37];let B;e[38]!==S||e[39]!==A?(B=r.jsxs(be,{children:[S,A]}),e[38]=S,e[39]=A,e[40]=B):B=e[40];let D;e[41]!==o||e[42]!==B||e[43]!==y?(D=r.jsxs(ve,{open:o,onOpenChange:d,children:[y,B]}),e[41]=o,e[42]=B,e[43]=y,e[44]=D):D=e[44];const F=!n.enabled||i.isPending;let I;e[45]!==i||e[46]!==s?(I=()=>i.mutate(void 0,{onSuccess:w=>{"error"in w?L.error(w.error):L.success(s("settings.jira.syncDone",{created:String(w.created),updated:String(w.updated),archived:String(w.archived)}))},onError:w=>L.error(J(w,s("settings.jira.syncFailed")))}),e[45]=i,e[46]=s,e[47]=I):I=e[47];let P;e[48]!==i.isPending||e[49]!==s?(P=i.isPending?s("settings.jira.syncing"):s("settings.jira.syncNow"),e[48]=i.isPending,e[49]=s,e[50]=P):P=e[50];let $;e[51]!==F||e[52]!==I||e[53]!==P?($=r.jsx(G,{variant:"outline",size:"sm",disabled:F,onClick:I,children:P}),e[51]=F,e[52]=I,e[53]=P,e[54]=$):$=e[54];let E;e[55]!==c||e[56]!==n.boardId||e[57]!==s||e[58]!==l?(E=w=>{if(w&&(!n.boardId||!c)){L.error(s("settings.jira.enableRequirements"));return}l.mutate({enabled:w},{onError:ee=>L.error(J(ee,s("settings.jira.saveFailed")))})},e[55]=c,e[56]=n.boardId,e[57]=s,e[58]=l,e[59]=E):E=e[59];let O;e[60]!==n.enabled||e[61]!==E||e[62]!==l.isPending?(O=r.jsx(qe,{checked:n.enabled,disabled:l.isPending,onCheckedChange:E}),e[60]=n.enabled,e[61]=E,e[62]=l.isPending,e[63]=O):O=e[63];let K;e[64]!==D||e[65]!==$||e[66]!==O?(K=r.jsxs("div",{className:"flex items-center gap-3",children:[D,$,O]}),e[64]=D,e[65]=$,e[66]=O,e[67]=K):K=e[67];let M;return e[68]!==m||e[69]!==K||e[70]!==p?(M=r.jsx(H,{title:m,description:p,action:K}),e[68]=m,e[69]=K,e[70]=p,e[71]=M):M=e[71],M}function ht(t){const e=R.c(24),{integration:n}=t,s=q(),l=`${window.location.origin}/api/_jira/webhook/${n.webhookSecret}`;let i;e[0]!==s?(i=s("settings.jira.webhookTitle"),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==s?(a=s("settings.jira.webhookDescription"),e[2]=s,e[3]=a):a=e[3];let o;e[4]!==l?(o=r.jsx(ie,{readOnly:!0,value:l,className:"font-mono text-xs"}),e[4]=l,e[5]=o):o=e[5];let d;e[6]!==s||e[7]!==l?(d=()=>{navigator.clipboard.writeText(l),L.success(s("settings.jira.webhookCopied"))},e[6]=s,e[7]=l,e[8]=d):d=e[8];let g;e[9]!==s?(g=s("settings.jira.webhookCopy"),e[9]=s,e[10]=g):g=e[10];let c;e[11]!==d||e[12]!==g?(c=r.jsx(G,{variant:"outline",size:"sm",className:"shrink-0",onClick:d,children:g}),e[11]=d,e[12]=g,e[13]=c):c=e[13];let m;e[14]!==o||e[15]!==c?(m=r.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=m):m=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(rt,{stepKeys:["settings.jira.webhookStep1","settings.jira.webhookStep2","settings.jira.webhookStep3","settings.jira.webhookStep4","settings.jira.webhookStep5"]}),e[17]=p):p=e[17];let j;e[18]!==m?(j=r.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[m,p]}),e[18]=m,e[19]=j):j=e[19];let x;return e[20]!==i||e[21]!==a||e[22]!==j?(x=r.jsx(H,{title:i,description:a,children:j}),e[20]=i,e[21]=a,e[22]=j,e[23]=x):x=e[23],x}function yt(){const t=R.c(22),e=q(),n=We();if(n.isPending){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(le,{children:r.jsx("div",{className:"p-4",children:r.jsx(ce,{className:"h-40 w-full"})})}),t[0]=c):c=t[0],c}if(!n.data){let c;t[1]!==e?(c=e("settings.jira.connectTitle"),t[1]=e,t[2]=c):c=t[2];let m;t[3]!==e?(m=e("settings.jira.connectDescription"),t[3]=e,t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(at,{}),t[5]=p):p=t[5];let j;return t[6]!==c||t[7]!==m?(j=r.jsx(le,{children:r.jsx(H,{title:c,description:m,children:p})}),t[6]=c,t[7]=m,t[8]=j):j=t[8],j}const s=n.data;let l,i,a;t[9]!==s?(l=r.jsx(mt,{integration:s}),i=r.jsx(ut,{integration:s}),a=s.boardId&&r.jsx(jt,{integration:s}),t[9]=s,t[10]=l,t[11]=i,t[12]=a):(l=t[10],i=t[11],a=t[12]);let o,d;t[13]!==s?(o=r.jsx(xt,{integration:s}),d=r.jsx(ht,{integration:s}),t[13]=s,t[14]=o,t[15]=d):(o=t[14],d=t[15]);let g;return t[16]!==l||t[17]!==i||t[18]!==a||t[19]!==o||t[20]!==d?(g=r.jsxs(le,{children:[l,i,a,o,d]}),t[16]=l,t[17]=i,t[18]=a,t[19]=o,t[20]=d,t[21]=g):g=t[21],g}function bt(){const t=R.c(17),e=q();let n;t[0]!==e?(n=e("settings.nav.tasks"),t[0]=e,t[1]=n):n=t[1];let s;t[2]!==n?(s=r.jsx(te.Title,{children:n}),t[2]=n,t[3]=s):s=t[3];let l,i;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(Je,{}),i=r.jsx(Ue,{}),t[4]=l,t[5]=i):(l=t[4],i=t[5]);let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx(Ye,{size:18}),t[6]=a):a=t[6];let o;t[7]!==e?(o=e("settings.jira.sectionTitle"),t[7]=e,t[8]=o):o=t[8];let d;t[9]!==o?(d=r.jsxs("span",{className:"flex items-center gap-2",children:[a,o]}),t[9]=o,t[10]=d):d=t[10];let g;t[11]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(yt,{}),t[11]=g):g=t[11];let c;t[12]!==d?(c=r.jsx(Re,{title:d,children:g}),t[12]=d,t[13]=c):c=t[13];let m;return t[14]!==s||t[15]!==c?(m=r.jsx(te,{children:r.jsx(te.Content,{children:r.jsx(te.Body,{children:r.jsxs(Te,{children:[s,l,i,c]})})})}),t[14]=s,t[15]=c,t[16]=m):m=t[16],m}function fs(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(Qe,{capability:"org:manage",area:"settings",children:r.jsx(bt,{})}),t[0]=e):e=t[0],e}export{fs as default};
@@ -1 +1 @@
1
- import{c as o,n,j as l}from"./index-9yj-_efP.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=n("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=l.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
1
+ import{c as o,n,j as l}from"./index-DciLlmwa.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=n("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=l.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};