decocms 4.99.5 → 4.99.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/client/assets/{AlertCircle-J91Uub-h.js → AlertCircle-DHJMAy0z.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DGW_057K.js → AreaChart-BP3LRAVY.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-zq5HcvPy.js → ArrowRight-ZH8AfOrt.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CFRuLeGc.js → ArrowUp-BEvOvB39.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-DzIyesUw.js → ArrowUpRight-CB2lmsga.js} +1 -1
  6. package/dist/client/assets/{Check-DjOk0Rkq.js → Check-8S_h-pNf.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-MGAobGZ1.js → CheckCircle-8lNaIJZX.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-BjlTvh0G.js → ChevronDown-D19e4E2W.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-BlnNawqe.js → ChevronRight-DMiFqEFB.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CBeaIN1f.js → ChevronUp-CDr-5amA.js} +1 -1
  11. package/dist/client/assets/{Copy01-Bs6JU_rS.js → Copy01-CVgcePVg.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Bn-DgixF.js → DotsVertical-Ddcp5zYy.js} +1 -1
  13. package/dist/client/assets/{Eye-x9PmMwPD.js → Eye-DjxTeGvc.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DB1N8tt3.js → FilterLines-sMM8U03Q.js} +1 -1
  15. package/dist/client/assets/{Globe01-DwSYSUPv.js → Globe01-ByEypwqT.js} +1 -1
  16. package/dist/client/assets/{Globe04-D8q7ictx.js → Globe04-CLktRX73.js} +1 -1
  17. package/dist/client/assets/{HardDrive-BiWjqtYm.js → HardDrive-LZLUcrQT.js} +1 -1
  18. package/dist/client/assets/{Image01-D5Tiku0_.js → Image01-BC4H1plu.js} +1 -1
  19. package/dist/client/assets/{Key01-CPUmZmyM.js → Key01-BJ5pxmk5.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-41ARqh32.js → LayoutLeft-BY0vokwF.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-EQdea3eE.js → LinkExternal01-BE6iPh6Z.js} +1 -1
  22. package/dist/client/assets/{Monitor01-BRhDD-NM.js → Monitor01-D5bQ7ld2.js} +1 -1
  23. package/dist/client/assets/{Package-wPIBeGdH.js → Package-Dgaviqf5.js} +1 -1
  24. package/dist/client/assets/{Palette-g63KMu4R.js → Palette-BLetgCYz.js} +1 -1
  25. package/dist/client/assets/{Play-DhCU58Zq.js → Play-D4uEf4_3.js} +1 -1
  26. package/dist/client/assets/{Plus-D9_97xSP.js → Plus-B99BOqFt.js} +1 -1
  27. package/dist/client/assets/{SearchLg-B9lGHCRw.js → SearchLg-0vJ_NGT1.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DdLJZdaD.js → SearchMd--QTHPVfW.js} +1 -1
  29. package/dist/client/assets/{Settings02-Dscqhciu.js → Settings02-Dg48gy-m.js} +1 -1
  30. package/dist/client/assets/{Shield01-DKl0qTL-.js → Shield01-XjAbmrcl.js} +1 -1
  31. package/dist/client/assets/{Star01-B1FJC3Am.js → Star01-DBzet7vh.js} +1 -1
  32. package/dist/client/assets/{Stars01-RWgObMJM.js → Stars01-DBeF8eO9.js} +1 -1
  33. package/dist/client/assets/{Stars02-BsoNwBLM.js → Stars02-DF0mhAvh.js} +1 -1
  34. package/dist/client/assets/{Sun-C9YcQwfr.js → Sun-DWQi7hi9.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-DVNbwjti.js → SwitchHorizontal01-g8c5_DAA.js} +1 -1
  36. package/dist/client/assets/{Tool01-BAl3vunP.js → Tool01-BsH7bOGE.js} +1 -1
  37. package/dist/client/assets/{Tool02-DFxQ4jst.js → Tool02-CpEmuwVJ.js} +1 -1
  38. package/dist/client/assets/{Trash01-O50YwY-1.js → Trash01-sz1B1ubO.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-VNmE5Tgl.js → TrendUp01-DFaJzXrF.js} +1 -1
  40. package/dist/client/assets/{Upload01-CfQLoJy4.js → Upload01-DZkj6_Us.js} +1 -1
  41. package/dist/client/assets/{User01-Dg9bjRZN.js → User01-Cy4n4fwd.js} +1 -1
  42. package/dist/client/assets/{Users01-CYkL6UM4.js → Users01-CiJE_Dg-.js} +1 -1
  43. package/dist/client/assets/{Users03-B0NmsIht.js → Users03-Dqh1PO2N.js} +1 -1
  44. package/dist/client/assets/{X-CjNSNcc_.js → X-BFNxuShY.js} +1 -1
  45. package/dist/client/assets/{XCircle-7VCYmnt6.js → XCircle-Cv1eNWoM.js} +1 -1
  46. package/dist/client/assets/{XClose-dMfYUtdK.js → XClose-Ckol2oql.js} +1 -1
  47. package/dist/client/assets/{Zap-D62dIluk.js → Zap-DTU6QUr-.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-Drpj68fr.js → ZapSquare-CdnVBk-J.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-CGN0hYNp.js → ZoomOut-IrGAWsFW.js} +1 -1
  50. package/dist/client/assets/{access-gate-wAnqH70g.js → access-gate-DAiHI_Ya.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-BZEroarm.js → add-section-modal-PTtjM0qv.js} +1 -1
  52. package/dist/client/assets/{agent-icon-CtYPYl8e.js → agent-icon-DJ-fLRqx.js} +1 -1
  53. package/dist/client/assets/{agents-list-C-sMRTm0.js → agents-list-Ddn36hvr.js} +1 -1
  54. package/dist/client/assets/{ai-providers-Cp9N95wJ.js → ai-providers-4RQyfXJ9.js} +1 -1
  55. package/dist/client/assets/{alert-Dvg8aKcv.js → alert-D564TwSW.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CqJGfT9S.js → alert-dialog-S-vKrHdP.js} +1 -1
  57. package/dist/client/assets/{app-editor-DldMJ5vX.js → app-editor-BnYQVlSC.js} +1 -1
  58. package/dist/client/assets/{auth-8muKPtVE.js → auth-LsRMSxpZ.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-D-1RECn5.js → auth-catchall-CdzEQEu6.js} +1 -1
  60. package/dist/client/assets/{auth-entry-CY6lJZZo.js → auth-entry-DcFUSq-U.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-hf3Nbp6x.js → auth-split-layout-CTdOwwE2.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-BMiVZlf1.js → authenticate-and-persist-oauth-ccpCvQUL.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-BbxdWFMF.js → automation-list-row-B36cFYnc.js} +1 -1
  64. package/dist/client/assets/{automation-runs-BLbKrLbu.js → automation-runs-C5OD2vNu.js} +1 -1
  65. package/dist/client/assets/{automations-BbSreRZJ.js → automations-_IDwlRt9.js} +1 -1
  66. package/dist/client/assets/{autosend-BUd9WB8h.js → autosend-DwCcNXOp.js} +1 -1
  67. package/dist/client/assets/{avatar-CS23QZhy.js → avatar-CDCXeyeq.js} +1 -1
  68. package/dist/client/assets/{badge-T9uXWFRv.js → badge-CLbg8brP.js} +1 -1
  69. package/dist/client/assets/{block-document-BB_MEYxn.js → block-document-pbbZw2CP.js} +1 -1
  70. package/dist/client/assets/{brand-context-DBgo1tSF.js → brand-context-CLwWQD4a.js} +1 -1
  71. package/dist/client/assets/{buckets-aSaKX72w.js → buckets-C6jFjZP6.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BkJrSAoE.js → bulk-category-panel-BJgqFyPw.js} +1 -1
  73. package/dist/client/assets/{calendar-ks6BD9H-.js → calendar-CIg2EEBJ.js} +2 -2
  74. package/dist/client/assets/{capability-load-error-CZBjXSsy.js → capability-load-error-Dx6CWw4N.js} +1 -1
  75. package/dist/client/assets/{card-Bx6QHURH.js → card-CGoHKQKX.js} +1 -1
  76. package/dist/client/assets/{category-editor-4inNz6pa.js → category-editor-CxVEA7RL.js} +1 -1
  77. package/dist/client/assets/{chat-context-BXDTFRX2.js → chat-context-BpdINg7c.js} +1 -1
  78. package/dist/client/assets/{checkbox-CwZjKbuN.js → checkbox-DiEGmfR1.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-DjZJeUqq.js → cli-auth-success-BGVZ5nYN.js} +1 -1
  80. package/dist/client/assets/{collection-detail-CIcSoyso.js → collection-detail-DZbpwovT.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-Dw9HSlqD.js → collection-display-button-Dn4BN1AT.js} +1 -1
  82. package/dist/client/assets/{collection-search-yE9i1JpT.js → collection-search-DT4BSCdW.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-DYJ3BxFA.js → collection-table-wrapper-CXhf1hUH.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-lcAbgNE1.js → collection-tabs-CG0FZsKM.js} +1 -1
  85. package/dist/client/assets/{command-BQsf8lh7.js → command-KNTOL3kj.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-C1YGwd6f.js → commerce-onboarding-BMEY1DKe.js} +1 -1
  87. package/dist/client/assets/{companions-core-DJL49WEJ.js → companions-core-FTf4qGMY.js} +1 -1
  88. package/dist/client/assets/{connect-4EE7AjWu.js → connect-BE9doFql.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-Dgmm6p4t.js → connect-desktop-dialog-BoS5Hu9R.js} +1 -1
  90. package/dist/client/assets/{connection-card-BNONqDF0.js → connection-card-Dbj_E-0a.js} +1 -1
  91. package/dist/client/assets/connection-detail-V6mFx9e6.js +1 -0
  92. package/dist/client/assets/{connection-form-helpers-CziK-zQe.js → connection-form-helpers-D0VhJo5T.js} +1 -1
  93. package/dist/client/assets/{connections-BvKdHoZn.js → connections-fj3C3XzM.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-G44vPfdr.js → decopilot-sse-pool-DlsoDrW9.js} +1 -1
  95. package/dist/client/assets/{dialog-r8u0MUEv.js → dialog-CwEHiSMU.js} +1 -1
  96. package/dist/client/assets/{domain-settings-yE9n8NFS.js → domain-settings-lLJfdhn2.js} +1 -1
  97. package/dist/client/assets/{drawer-amjbQ1uR.js → drawer-NqC3cUty.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-Dei8Q_a1.js → dropdown-menu-Dui6084c.js} +1 -1
  99. package/dist/client/assets/{empty-state-C49ydxC4.js → empty-state--30EXuZG.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-mhnZKB4s.js → extract-connection-data-5mcb4Mog.js} +1 -1
  101. package/dist/client/assets/{file-explorer-Dqu_g-z2.js → file-explorer-CgOnjl_S.js} +1 -1
  102. package/dist/client/assets/{file-type-icon-s1AYVhlx.js → file-type-icon-P_pN9_xH.js} +1 -1
  103. package/dist/client/assets/{files-Di-EwWTF.js → files-BLAFPbYz.js} +1 -1
  104. package/dist/client/assets/{form-CN-qLPrG.js → form-5ox058mH.js} +1 -1
  105. package/dist/client/assets/{general-BFBUA-8Z.js → general-6JhynIjZ.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-zaOZVO9r.js → github-repo-picker-BqET8_zQ.js} +1 -1
  107. package/dist/client/assets/{hooks-nUkCrdoV.js → hooks-Dcj3etNr.js} +1 -1
  108. package/dist/client/assets/{index-Bno4yz27.js → index-BELfS11E.js} +1 -1
  109. package/dist/client/assets/{index-DQhABf9k.js → index-BGTjziYz.js} +1 -1
  110. package/dist/client/assets/{index-DlS-BCyi.js → index-BNV2EeGI.js} +1 -1
  111. package/dist/client/assets/{index-DkwplL3u.js → index-BaeEjqV7.js} +7 -7
  112. package/dist/client/assets/index-BbdMwuvN.js +5 -0
  113. package/dist/client/assets/{index-D2Mh9ro-.js → index-BhPaswkE.js} +26 -26
  114. package/dist/client/assets/{index-62Y3YKMH.js → index-C5X0kiyr.js} +1 -1
  115. package/dist/client/assets/{index-BkqJXOXg.js → index-C6ytuOGZ.js} +1 -1
  116. package/dist/client/assets/index-C9qzt0Jn.js +8 -0
  117. package/dist/client/assets/{index-O8TVt4ln.js → index-CRmtvsLd.js} +1 -1
  118. package/dist/client/assets/{index-B2Zh7GaR.js → index-Cr82fBda.js} +1 -1
  119. package/dist/client/assets/{index-D7q_jeuX.js → index-CyNeJz90.js} +1 -1
  120. package/dist/client/assets/{index-BxSMt2vi.js → index-DZ0C-1Pb.js} +1 -1
  121. package/dist/client/assets/{index-QsyWpWi_.js → index-qob9QDNh.js} +1 -1
  122. package/dist/client/assets/{index-redirect-CShRS7Nt.js → index-redirect-sMiFiL_K.js} +1 -1
  123. package/dist/client/assets/{input-Bs4Ffj-i.js → input-PlhR5OQl.js} +1 -1
  124. package/dist/client/assets/{integration-icon-CLaWof0d.js → integration-icon-DmDjDu1T.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-d_ifYDCC.js → invite-member-dialog-D79xzFG6.js} +1 -1
  126. package/dist/client/assets/{label-PLcboP7g.js → label-Dgx54R9B.js} +1 -1
  127. package/dist/client/assets/{layout-DuOkHyU1.js → layout-kKX1t2sP.js} +1 -1
  128. package/dist/client/assets/{login-DhUXtx91.js → login-wAm8iucL.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-fPq59FMN.js → mcp-oauth-uiWOIXGl.js} +1 -1
  130. package/dist/client/assets/{members-CRhEQ1if.js → members-Df7bjsef.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-DmZdPmcD.js → monaco-editor-BkhNLbLQ.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-D_IpCfog.js → monitoring-stats-row-C_chKCRP.js} +1 -1
  133. package/dist/client/assets/{multi-select-w-HSBG-3.js → multi-select-Ds_o80Ow.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-1Dt9dB0b.js → oauth-callback-DDD-Q2b4.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-BfALoi7e.js → oauth-callback-ai-provider-B5_IzB1y.js} +1 -1
  136. package/dist/client/assets/{onboarding-yxraLW_i.js → onboarding-B1v12Kxf.js} +1 -1
  137. package/dist/client/assets/{org-install-CtNuDgfM.js → org-install-ix32v6HG.js} +1 -1
  138. package/dist/client/assets/{org-layout-DW1ZCNfI.js → org-layout-D3jsdku6.js} +1 -1
  139. package/dist/client/assets/{organization-choice-DxwzTiu1.js → organization-choice-DG8veEJJ.js} +1 -1
  140. package/dist/client/assets/{orgs-B2myolWS.js → orgs-DwwYSo1F.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-BqUXt7Z6.js → page-seo-form-B6-Tjapj.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-CPcGy_lc.js +1 -0
  143. package/dist/client/assets/{popover-dJsEu16j.js → popover-Cc-bUxo9.js} +1 -1
  144. package/dist/client/assets/{post-editor-CC9AZZzw.js → post-editor-C4wur674.js} +1 -1
  145. package/dist/client/assets/{primitives-3QoIUjH8.js → primitives-DzhLuT4o.js} +1 -1
  146. package/dist/client/assets/{profile-Clqi3ySh.js → profile-MRaW8Iku.js} +1 -1
  147. package/dist/client/assets/project-app-view-Dp8aqKn9.js +1 -0
  148. package/dist/client/assets/record-editor-DNp_YJwU.js +1 -0
  149. package/dist/client/assets/{redirect-editor-DAN_MR8b.js → redirect-editor-LLRc4D2K.js} +1 -1
  150. package/dist/client/assets/registry-bT72xUUs.js +2 -0
  151. package/dist/client/assets/registry-layout-DkldcL5a.js +27 -0
  152. package/dist/client/assets/{reports-CvSn0zzp.js → reports-B-PUwpKU.js} +1 -1
  153. package/dist/client/assets/{require-capability-C-CrR8hY.js → require-capability-DLiPnWvZ.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-5DCNYuJP.js → required-auth-layout-BZ6DGJsb.js} +1 -1
  155. package/dist/client/assets/{reset-password-BKcGpfv2.js → reset-password-C9volMkn.js} +1 -1
  156. package/dist/client/assets/{roles-B3y8_zlh.js → roles-CiGDH8Hn.js} +1 -1
  157. package/dist/client/assets/{search-input-DN6JD2TK.js → search-input-CXhpX-Xz.js} +1 -1
  158. package/dist/client/assets/{secrets-BZ-aOIok.js → secrets-C5-PbNw_.js} +1 -1
  159. package/dist/client/assets/{sections-editor-BSc99DEX.js → sections-editor-BYYH09fn.js} +1 -1
  160. package/dist/client/assets/{select-DF9H4oT6.js → select-BHlpCdw9.js} +1 -1
  161. package/dist/client/assets/{select-model-CdLCtXSm.js → select-model-DiTMTOsS.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-BPwxO5jg.js → self-tool-result-BYT5inCm.js} +1 -1
  163. package/dist/client/assets/{seo-editor-CPM96FoU.js → seo-editor-BMESJKUG.js} +1 -1
  164. package/dist/client/assets/{settings-layout-Barhr06a.js → settings-layout-BEVTWuIu.js} +1 -1
  165. package/dist/client/assets/{settings-section-DDGk5ElL.js → settings-section-DYCGsxoQ.js} +1 -1
  166. package/dist/client/assets/{shell-controls-Ceefvwp_.js → shell-controls-CyEjGQVX.js} +1 -1
  167. package/dist/client/assets/{shell-layout-Bt6f2nRK.js → shell-layout-DlEDxOSH.js} +1 -1
  168. package/dist/client/assets/{sidebar-oM27377K.js → sidebar-BT5oq5Py.js} +1 -1
  169. package/dist/client/assets/{skeleton-MaaZV4Ig.js → skeleton-DR0dV7Rx.js} +1 -1
  170. package/dist/client/assets/{sso-GO2gGD4c.js → sso-CSnQvRdb.js} +1 -1
  171. package/dist/client/assets/{store-CSgdi-rs.js → store-DCbdRWaM.js} +1 -1
  172. package/dist/client/assets/store-registry-C2gPY7Xh.js +2 -0
  173. package/dist/client/assets/{studio-tools-CRofv6kx.js → studio-tools-BSpHTnkI.js} +1 -1
  174. package/dist/client/assets/{switch-CGJLGYj-.js → switch-DNcfs8uV.js} +1 -1
  175. package/dist/client/assets/{table-DAruPHNm.js → table-BO7AXCJj.js} +1 -1
  176. package/dist/client/assets/{tabs-CfOwWKj_.js → tabs-BOn-uUO8.js} +1 -1
  177. package/dist/client/assets/{textarea-EgMsnMGx.js → textarea-2FS82hTt.js} +1 -1
  178. package/dist/client/assets/{toggle-group-nEH6HUl5.js → toggle-group-Bp5y9M5o.js} +1 -1
  179. package/dist/client/assets/{toolbar-icon-button-BLNCzLRX.js → toolbar-icon-button-BX6tvqZL.js} +1 -1
  180. package/dist/client/assets/{toolbar-CSzeGnpN.js → toolbar-lB-S2vpV.js} +1 -1
  181. package/dist/client/assets/{tooltip-RwubIrk3.js → tooltip-D9NGFdPV.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-DFrHUIak.js → use-ai-providers-BQWD6Fbv.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-DhM_ltaH.js → use-api-keys-B9APB1Uz.js} +1 -1
  184. package/dist/client/assets/{use-automations-BawZrvuR.js → use-automations-Vb2lhz9-.js} +1 -1
  185. package/dist/client/assets/{use-autosave-CEjG1rfs.js → use-autosave-0f1y6oqV.js} +1 -1
  186. package/dist/client/assets/{use-capability-CnZkm8yn.js → use-capability-COYHR3-p.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BXZQ77A9.js → use-clock-tick-BRgf5NQf.js} +1 -1
  188. package/dist/client/assets/{use-connection-JJtv7wMS.js → use-connection-DpuO4fNw.js} +1 -1
  189. package/dist/client/assets/{use-copy-DL_GuuBr.js → use-copy-BeT4l9EL.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-BdlAg89u.js → use-create-virtual-mcp-41F9ENXu.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-CZ0cO5Jj.js → use-debounced-autosave-CRjEG81o.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-BhoMmzhz.js → use-debounced-value-NzmZPT1j.js} +1 -1
  193. package/dist/client/assets/{use-deco-credits-BGo8j1Yc.js → use-deco-credits-BICXIEvI.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-DfE0yMCX.js → use-decopilot-events-B2udrR1E.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-Ds4684TM.js → use-delete-connection-I4CFeUrd.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-uwffFpAT.js → use-deployment-admin-D5UxXiFy.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-DPt1ulPg.js → use-file-configs-BxxfQuJb.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-BGAnkyVV.js → use-infinite-scroll-Czt7JOf8.js} +1 -1
  199. package/dist/client/assets/{use-join-requests-BS6rJ47D.js → use-join-requests-BAcrUcz7.js} +1 -1
  200. package/dist/client/assets/{use-mcp-auth-status-DKRnh2ne.js → use-mcp-auth-status-CnFSrLEj.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-zgLHxopZ.js → use-mcp-client-tcmKmN21.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-Cna1RUcM.js → use-mcp-tools-DIqHvolA.js} +1 -1
  203. package/dist/client/assets/{use-members-D4Dxs4Z9.js → use-members-atWSP-WF.js} +1 -1
  204. package/dist/client/assets/{use-mobile-BZt0_HZC.js → use-mobile-2yLfYt8o.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-DXn0UYRZ.js → use-navigate-to-agent-BAhIUAJc.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-DjhZfc0h.js → use-org-auth-client-CF9Xv674.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-BIOecJHF.js → use-org-sso-D55i4f0_.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-Cs1xUzsm.js → use-organization-roles-CTaZXibc.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-bo82Mkc7.js → use-organization-settings-Coxn0MdD.js} +1 -1
  210. package/dist/client/assets/{use-registry-app-Bv1lWRnY.js → use-registry-app-hSt4mgU8.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-Bwkj2-ri.js → use-registry-connections-Mt2VCkjn.js} +1 -1
  212. package/dist/client/assets/{use-secrets-BnYUDcFo.js → use-secrets-CgXohDMi.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-De32pzYK.js → use-status-sounds-BADjzMyd.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-Rnz2KAlb.js → use-view-mode-h6gpir15.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-DTy2Jioe.js → use-virtual-mcp-MeqW96-1.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-C6O0Jfl2.js +1 -0
  217. package/dist/client/assets/{useRouterState-BmHr7Mxz.js → useRouterState-N0q5mOQR.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-DrfctcYn.js +1 -0
  219. package/dist/client/assets/{users-CWuh8uw1.js → users-CJv38_2t.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-B9EFnu4F.js → variant-calendar-erhHGjtK.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-Dmpuhz8L.js → view-mode-toggle-Wr5FnjMg.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/dist/server/server.js +1 -1
  225. package/package.json +1 -1
  226. package/dist/client/assets/connection-detail-DM2y__WQ.js +0 -1
  227. package/dist/client/assets/index-D6HjjW9T.js +0 -8
  228. package/dist/client/assets/index-_puxHiaG.js +0 -5
  229. package/dist/client/assets/page-seo-sheet-D30upM6c.js +0 -1
  230. package/dist/client/assets/project-app-view-ES4Fr-fj.js +0 -1
  231. package/dist/client/assets/record-editor-wkuaBZHh.js +0 -1
  232. package/dist/client/assets/registry-CYo4fah1.js +0 -2
  233. package/dist/client/assets/registry-layout-C5xC0Wus.js +0 -27
  234. package/dist/client/assets/store-registry-DdONRjVB.js +0 -2
  235. package/dist/client/assets/useInfiniteQuery-C0q03X4e.js +0 -1
  236. package/dist/client/assets/useSuspenseInfiniteQuery-CObvZUjI.js +0 -1
@@ -1 +0,0 @@
1
- import{J as be,ag as $e,b4 as De,M as me,ae as Oe,c as R,b as H,j as t,k as ve,B,r as Z,m as Ne,F as te,w as Me,K as ae,d as se,aJ as ue,D as ze,b5 as Ee,E as Ue,f as Re,b6 as Ve,o as Fe,R as Le,P as Be,t as Y,b7 as He}from"./index-DkwplL3u.js";import{g as qe}from"./extract-connection-data-mhnZKB4s.js";import{E as Se}from"./empty-state-C49ydxC4.js";import{E as Ge,c as Ke,r as Qe,b as Xe,d as We}from"./connection-form-helpers-CziK-zQe.js";import{c as Je,S as Ye,V as Ze}from"./index-BxSMt2vi.js";import{u as ye,T as et}from"./use-mcp-auth-status-DKRnh2ne.js";import{a as tt}from"./use-members-D4Dxs4Z9.js";import{A as st}from"./avatar-CS23QZhy.js";import{a as Ce,b as _e,u as nt}from"./use-connection-JJtv7wMS.js";import{u as we}from"./use-mcp-client-zgLHxopZ.js";import{a as it}from"./use-mcp-tools-Cna1RUcM.js";import{c as ot,C as at,a as rt,d as lt}from"./AreaChart-DGW_057K.js";import{i as ct,a as dt}from"./mcp-oauth-fPq59FMN.js";import{I as re}from"./integration-icon-CLaWof0d.js";import{s as mt}from"./Plus-D9_97xSP.js";import{R as ut,S as xt,az as pt,b as ft}from"./agent-icon-CtYPYl8e.js";import{a as ke,s as ht}from"./Settings02-Dscqhciu.js";import{s as ce}from"./Trash01-O50YwY-1.js";import{q as gt,p as jt,o as bt,m as vt,n as Nt}from"./sidebar-oM27377K.js";import{F as K,b as Q,c as X,d as L,f as W,e as St,a as yt}from"./form-CN-qLPrG.js";import{I as J}from"./input-Bs4Ffj-i.js";import{u as Ct,D as _t}from"./use-delete-connection-Ds4684TM.js";import{c as wt,B as kt,a as It,C as Tt}from"./monitoring-stats-row-D_IpCfog.js";import{u as At}from"./studio-tools-CRofv6kx.js";import{u as Pt}from"./use-virtual-mcp-DTy2Jioe.js";import{i as Ie}from"./ChevronRight-BlnNawqe.js";import{a as Te}from"./Users03-B0NmsIht.js";import{c as ne,b as $t,T as ie,a as Dt}from"./tabs-CfOwWKj_.js";import{g as Ae}from"./connection-slug-eyAPH6o3.js";import{n as Ot}from"./ZapSquare-Drpj68fr.js";import{c as Mt}from"./Tool01-BAl3vunP.js";import{g as de,M as zt}from"./index-Bno4yz27.js";import{C as Et}from"./collection-search-yE9i1JpT.js";import{C as Ut}from"./card-Bx6QHURH.js";import{B as Rt}from"./badge-T9uXWFRv.js";import{c as Vt,D as Ft,b as Lt,a as xe}from"./dropdown-menu-Dei8Q_a1.js";import{S as pe,a as fe,b as he,c as ge,d as G}from"./select-DF9H4oT6.js";import{i as Bt}from"./CheckCircle-MGAobGZ1.js";import{t as Ht}from"./ChevronDown-BjlTvh0G.js";import{n as qt}from"./Tool02-DFxQ4jst.js";import{s as oe}from"./Star01-B1FJC3Am.js";import{s as Gt}from"./XClose-dMfYUtdK.js";import"./index-BkqJXOXg.js";import"./ZoomOut-CGN0hYNp.js";import"./Key01-CPUmZmyM.js";import"./auth-8muKPtVE.js";import"./use-registry-connections-Bwkj2-ri.js";import"./use-organization-settings-bo82Mkc7.js";import"./index-QsyWpWi_.js";import"./index-B2Zh7GaR.js";import"./popover-dJsEu16j.js";import"./tooltip-RwubIrk3.js";import"./Check-DjOk0Rkq.js";import"./SearchMd-DdLJZdaD.js";import"./use-mobile-BZt0_HZC.js";import"./use-create-virtual-mcp-BdlAg89u.js";import"./use-navigate-to-agent-DXn0UYRZ.js";import"./hooks-nUkCrdoV.js";import"./decopilot-sse-pool-G44vPfdr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-x9PmMwPD.js";import"./use-org-auth-client-DjhZfc0h.js";import"./User01-Dg9bjRZN.js";import"./AlertCircle-J91Uub-h.js";import"./ArrowUp-CFRuLeGc.js";import"./ArrowRight-zq5HcvPy.js";import"./ArrowUpRight-DzIyesUw.js";import"./TrendUp01-VNmE5Tgl.js";import"./ChevronUp-CBeaIN1f.js";import"./DotsVertical-Bn-DgixF.js";import"./Stars02-BsoNwBLM.js";import"./Copy01-Bs6JU_rS.js";import"./Globe01-DwSYSUPv.js";import"./FilterLines-DB1N8tt3.js";import"./Globe04-D8q7ictx.js";import"./SwitchHorizontal01-DVNbwjti.js";import"./HardDrive-BiWjqtYm.js";import"./Image01-D5Tiku0_.js";import"./LayoutLeft-41ARqh32.js";import"./XCircle-7VCYmnt6.js";import"./LinkExternal01-EQdea3eE.js";import"./Monitor01-BRhDD-NM.js";import"./Sun-C9YcQwfr.js";import"./Package-wPIBeGdH.js";import"./Palette-g63KMu4R.js";import"./Play-DhCU58Zq.js";import"./SearchLg-B9lGHCRw.js";import"./Shield01-DKl0qTL-.js";import"./Stars01-RWgObMJM.js";import"./Upload01-CfQLoJy4.js";import"./Users01-CYkL6UM4.js";import"./X-CjNSNcc_.js";import"./Zap-D62dIluk.js";import"./label-PLcboP7g.js";import"./alert-dialog-CqJGfT9S.js";const Kt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Kt}];function Xt(s){const e=R.c(55),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=H();let l;e[0]!==n.id?(l={connectionId:n.id},e[0]=n.id,e[1]=l):l=e[1];const u=ye(l),d=!(n.connection_type==="VIRTUAL")&&u.supportsOAuth&&!u.isAuthenticated,h=n.status!=="active",m=d||h?"border-destructive/50 bg-destructive/5":"border-transparent";let f;e[2]!==m?(f=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let N;e[7]!==n.title?(N=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=N):N=e[8];let S;e[9]!==n.status||e[10]!==h||e[11]!==d||e[12]!==a?(S=d?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):h?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=h,e[11]=d,e[12]=a,e[13]=S):S=e[13];let b;e[14]!==N||e[15]!==S?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[N,S]}),e[14]=N,e[15]=S,e[16]=b):b=e[16];let y;e[17]!==n||e[18]!==d||e[19]!==o||e[20]!==a?(y=d&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=d,e[19]=o,e[20]=a,e[21]=y):y=e[21];let T;e[22]!==n||e[23]!==h||e[24]!==r||e[25]!==a?(T=h?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ut,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),children:t.jsx(xt,{size:13})}),e[22]=n,e[23]=h,e[24]=r,e[25]=a,e[26]=T):T=e[26];let A;e[27]!==n||e[28]!==c?(A=()=>c(n),e[27]=n,e[28]=c,e[29]=A):A=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ke,{size:13}),e[32]=M):M=e[32];let k;e[33]!==A||e[34]!==_?(k=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:A,title:_,children:M}),e[33]=A,e[34]=_,e[35]=k):k=e[35];let P;e[36]!==n||e[37]!==i?(P=()=>i(n),e[36]=n,e[37]=i,e[38]=P):P=e[38];let I;e[39]!==a?(I=a("details.connectionInstancesPanel.delete"),e[39]=a,e[40]=I):I=e[40];let v;e[41]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ce,{size:13}),e[41]=v):v=e[41];let j;e[42]!==P||e[43]!==I?(j=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:P,title:I,children:v}),e[42]=P,e[43]=I,e[44]=j):j=e[44];let D;e[45]!==k||e[46]!==j||e[47]!==y||e[48]!==T?(D=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,T,k,j]}),e[45]=k,e[46]=j,e[47]=y,e[48]=T,e[49]=D):D=e[49];let U;return e[50]!==D||e[51]!==f||e[52]!==g||e[53]!==b?(U=t.jsxs("div",{className:f,children:[g,b,D]}),e[50]=D,e[51]=f,e[52]=g,e[53]=b,e[54]=U):U=e[54],U}function Wt(s){const e=R.c(18),{instance:n,onConfigure:c}=s,o=H();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let l;e[8]!==o?(l=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ke,{size:13}),e[10]=u):u=e[10];let p;e[11]!==a||e[12]!==l?(p=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:l,children:u})}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let d;return e[14]!==i||e[15]!==r||e[16]!==p?(d=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,p]}),e[14]=i,e[15]=r,e[16]=p,e[17]=d):d=e[17],d}function Jt(s){const e=R.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:l}=s,u=H();if(n.length===0)return null;let p;e[0]!==n.length||e[1]!==u?(p=n.length===1?u("details.connectionInstancesPanel.instance"):u("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=u,e[2]=p):p=e[2];let d;e[3]!==p?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:p}),e[3]=p,e[4]=d):d=e[4];let h;e[5]!==l?(h=l?t.jsx(ve,{size:13,className:"animate-spin"}):t.jsx(mt,{size:13}),e[5]=l,e[6]=h):h=e[6];let m;e[7]!==u?(m=u("details.connectionInstancesPanel.addInstance"),e[7]=u,e[8]=m):m=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==h||e[12]!==m?(f=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:l,children:[h,m]}),e[9]=l,e[10]=a,e[11]=h,e[12]=m,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==f?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,f]}),e[14]=d,e[15]=f,e[16]=g):g=e[16];let N;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=T=>t.jsx(Z.Suspense,{fallback:t.jsx(Wt,{instance:T,onConfigure:c}),children:t.jsx(Xt,{instance:T,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},T.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],N=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=N}else N=e[22];let S;e[28]!==N?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:N}),e[28]=N,e[29]=S):S=e[29];let b;return e[30]!==g||e[31]!==S?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=b):b=e[32],b}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=R.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=H(),r=At(),a=es(o),{data:l}=Me({queryKey:ae.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),u=wt(l?.logs??[],a),p=u.data,d=u.totalCalls>0,h=Yt(l?.logs??[]),m=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let f;e[0]!==i?(f=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=f):f=e[1];let g;return e[2]!==f?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:f}),e[2]=f,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),g]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),d?t.jsxs("div",{children:[t.jsx(ot,{config:ts,className:"h-16 w-full",children:t.jsxs(kt,{data:p,barCategoryGap:"4%",children:[t.jsx(at,{content:t.jsx(rt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(It,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),h.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),m>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:m.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:h.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(Tt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function rs(s){const e=R.c(19),{connectionId:n}=s,c=H(),[o,i]=Z.useState("14d"),{org:r}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let l;e[2]!==a?(l=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=l):l=e[3];let u;e[4]!==o?(u=Zt.map(g=>t.jsx("button",{type:"button",onClick:()=>i(g.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===g.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:g.label},g.value)),e[4]=o,e[5]=u):u=e[5];let p;e[6]!==u?(p=t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[6]=u,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==p?(d=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[l,p]}),e[8]=l,e[9]=p,e[10]=d):d=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(as,{}),e[11]=h):h=e[11];let m;e[12]!==n||e[13]!==r.id||e[14]!==o?(m=t.jsx(Z.Suspense,{fallback:h,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[12]=n,e[13]=r.id,e[14]=o,e[15]=m):m=e[15];let f;return e[16]!==d||e[17]!==m?(f=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,m]}),e[16]=d,e[17]=m,e[18]=f):f=e[18],f}function ls(s){const e=R.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const d=crypto.randomUUID();o({to:"/$org/$taskId",params:{org:c,taskId:d},search:{virtualmcpid:n.id}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Te,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let p;return e[11]!==i||e[12]!==a||e[13]!==l?(p=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,l,u]}),e[11]=i,e[12]=a,e[13]=l,e[14]=p):p=e[14],p}function cs(s){const e=R.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=R.c(7),{connection:n}=s,{org:c}=te();let o;e[0]!==n.id?(o={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=o):o=e[1];const i=Pt(o);if(!(i.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=a):a=e[3];let l;return e[4]!==c.slug||e[5]!==i?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:i,org:c.slug})})]}),e[4]=c.slug,e[5]=i,e[6]=l):l=e[6],l}function ms(s){const e=R.c(35),{tools:n,connectionId:c,org:o}=s,i=H(),r=se(),{org:a}=te();let l;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const u=we(l),p=Ce(c);let d;e[4]!==p||e[5]!==c?(d=p?Ae(p):c,e[4]=p,e[5]=c,e[6]=d):d=e[6];const h=d,[m,f]=Z.useState("");let g,N,S,b;if(e[7]!==h||e[8]!==u||e[9]!==r||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const A=(n??[]).filter(us),_=m.toLowerCase().trim(),M=_?A.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):A;let k;e[18]!==h||e[19]!==r||e[20]!==o?(k=j=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:h,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=h,e[19]=r,e[20]=o,e[21]=k):k=e[21];const P=k;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Escape"&&(f(""),j.target.blur())},e[24]=v):v=e[24],e[25]!==m||e[26]!==I?(b=t.jsx(Et,{value:m,onChange:f,placeholder:I,onKeyDown:v}),e[25]=m,e[26]=I,e[27]=b):b=e[27],g="flex-1 overflow-auto p-5",N=M.length===0?t.jsx(Se,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(j=>{const D=de(j._meta);return t.jsxs(Ut,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(zt,{resourceURI:D,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:u})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.name}),t.jsx(et,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=h,e[8]=u,e[9]=r,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=N,e[16]=S,e[17]=b}else g=e[14],N=e[15],S=e[16],b=e[17];let y;e[28]!==g||e[29]!==N?(y=t.jsx("div",{className:g,children:N}),e[28]=g,e[29]=N,e[30]=y):y=e[30];let T;return e[31]!==S||e[32]!==b||e[33]!==y?(T=t.jsxs("div",{className:S,children:[b,y]}),e[31]=S,e[32]=b,e[33]=y,e[34]=T):T=e[34],T}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=R.c(5),{label:n}=s,c=H();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=R.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const l=a;let u;e[2]!==o?(u=o===void 0?[]:o,e[2]=o,e[3]=u):u=e[3];const p=u,d=H(),h=se(),m=Ce(i??"");let f;e[4]!==m||e[5]!==i?(f=m?Ae(m):i,e[4]=m,e[5]=i,e[6]=f):f=e[6];const g=f;let N;e[7]!==g||e[8]!==i||e[9]!==h||e[10]!==r?(N=function(V){!i||!r||h({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=h,e[10]=r,e[11]=N):N=e[11];const S=N;let b;e[12]!==i||e[13]!==r||e[14]!==n?(b=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=b):b=e[15];const y=b;if(n.length+l.length+p.length===0){let C;e[16]!==d?(C=d("details.connectionCapabilities.capabilities"),e[16]=d,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let q;e[20]!==d?(q=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=d,e[21]=q):q=e[21];let F;e[22]!==q?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:q}),e[22]=q,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let A;e[27]!==d||e[28]!==n.length?(A=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=d,e[28]=n.length,e[29]=A):A=e[29];let _;e[30]!==A?(_=t.jsx(ne,{value:"tools",variant:"underline",children:A}),e[30]=A,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==d?(M=y&&t.jsx(ne,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=d,e[34]=M):M=e[34];let k;e[35]!==d?(k=d("details.connectionCapabilities.promptsTab"),e[35]=d,e[36]=k):k=e[36];let P;e[37]!==k?(P=t.jsx(ne,{value:"prompts",variant:"underline",children:k}),e[37]=k,e[38]=P):P=e[38];let I;e[39]!==d?(I=d("details.connectionCapabilities.resourcesTab"),e[39]=d,e[40]=I):I=e[40];let v;e[41]!==I?(v=t.jsx(ne,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=v):v=e[42];let j;e[43]!==M||e[44]!==P||e[45]!==v||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs($t,{variant:"underline",className:"gap-1",children:[_,M,P,v]})}),e[43]=M,e[44]=P,e[45]=v,e[46]=_,e[47]=j):j=e[47];let D;e[48]!==S||e[49]!==n?(D=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=D):D=e[50];let U;e[51]!==D?(U=t.jsx(ie,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:D})}),e[51]=D,e[52]=U):U=e[52];let O;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(O=y&&t.jsx(ie,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=O):O=e[57];let z;e[58]!==l?(z=l.length>0?l.map(fs):t.jsx(le,{label:"prompts"}),e[58]=l,e[59]=z):z=e[59];let E;e[60]!==z?(E=t.jsx(ie,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[60]=z,e[61]=E):E=e[61];let x;e[62]!==p?(x=p.length>0?p.map(ps):t.jsx(le,{label:"resources"}),e[62]=p,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ie,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let $;return e[66]!==j||e[67]!==U||e[68]!==O||e[69]!==E||e[70]!==w?($=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Dt,{defaultValue:"tools",variant:"underline",children:[j,U,O,E,w]})}),e[66]=j,e[67]=U,e[68]=O,e[69]=E,e[70]=w,e[71]=$):$=e[71],$}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(pt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=R.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=l):l=e[9];let u;return e[10]!==i||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,l]}),e[10]=i,e[11]=l,e[12]=u):u=e[12],u}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=H(),r=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:l}=ze(),u=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),p=l||e.connection_type==="STDIO",d=e.connection_type==="VIRTUAL",h=d?Ee(e.connection_url):null;return d?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),h&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:h})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(oe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(G,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(G,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ft,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(W,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(W,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Ge,{value:m.value??[],onChange:m.onChange})}),t.jsx(W,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i(u?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Ft,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Rt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ht,{size:12})]})})}),t.jsxs(Lt,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ht,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&m.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Gt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(J,{type:"password",placeholder:i(u?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),u&&t.jsxs(St,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&He(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=We(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const l=H(),u=se({from:"/$org/settings/connections/$appSlug"}),p=Fe(),d=_e(),{org:h}=te(),m=Ct({onSuccess:()=>{a.length<=1&&u({to:"/$org/settings/connections",params:{org:n}})}}),[f,g]=Z.useState(null),[N,S]=Z.useState(!1),b=ye({connectionId:e}),{data:y}=tt(),T=y?.data?.members??[],A=f??s,_=T.find(x=>x.userId===A.created_by),k=s?.connection_type==="VIRTUAL"||b.isAuthenticated,P={...s,tools:o},I=Je(P,Qt),v=Le({resolver:Be(Ke),values:je(f??s)}),j=v.formState.isDirty,D=async()=>{if(!await v.trigger())return;const w=v.getValues(),$=Ss(w),C=f?.id??e;await d.update.mutateAsync({id:C,data:$}),v.reset(w)},U=()=>{v.reset(je(f??s))},O=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:$,tokenInfo:C,error:V}=await dt({connectionId:x,orgSlug:h.slug,...w?{scope:w}:{}});if(V||!$){Y.error(l("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${h.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await d.update.mutateAsync({id:x,data:{connection_token:$}});else try{await d.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await d.update.mutateAsync({id:x,data:{connection_token:$}})}else await d.update.mutateAsync({id:x,data:{connection_token:$}});const q=new URL(`/api/${h.slug}/mcp/${x}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(q.href,null)}),await p.invalidateQueries({queryKey:ae.mcpClientPrefix()}),Y.success(l("details.connection.authSuccess"))},z=()=>O(s.id),E=async()=>{try{const x=await fetch(`/api/${h.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const $=await x.text();Y.error(l("details.connection.failedRemoveOAuth",{error:$}));return}const w=new URL(`/api/${h.slug}/mcp/${s.id}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),Y.success(l("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),Y.error(l("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...m}),t.jsx(gt,{open:f!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(jt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(bt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:f?.title??s.title}),t.jsx(Nt,{className:"text-xs",children:l("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:l("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(yt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:v.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...x})}),t.jsx(W,{})]})}),t.jsx(K,{control:v.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...x,value:x.value||""})}),t.jsx(W,{})]})})]}),t.jsx(js,{form:v,connection:f??s,hasOAuthToken:b.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:E}),t.jsx(Ye,{connection:f??s,form:v,hasMcpBinding:I,isMCPAuthenticated:k,supportsOAuth:b.supportsOAuth,isServerError:b.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:D,disabled:!j||c,className:"flex-1",children:l(c?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(B,{variant:"outline",onClick:U,children:l("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=f??s;g(null),m.requestDelete(x)},children:[t.jsx(ce,{size:15}),l("details.connection.deleteButton")]})]})]},f?.id??s.id)]})}),t.jsx(Ze,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>O(x.id),onDelete:x=>m.requestDelete(x),onToggleStatus:async(x,w)=>{try{await d.update.mutateAsync({id:x.id,data:{status:w}}),Y.success(l(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(l("details.connection.failedUpdateConnection"))}},isAdding:N,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),$=a.length+1,C=`${w} (${$})`,V=qe("conn");await d.create.mutateAsync({id:V,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${h.slug}/mcp/${V}`,window.location.origin),F=await ct({url:q.href,token:null,orgId:h.id});F.supportsOAuth&&!F.isAuthenticated&&await O(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=R.c(52),e=H();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Re(o),{org:a}=te(),l=_e();let u;s[2]!==i?(u={slug:i},s[2]=i,s[3]=u):u=s[3];const p=nt(u),d=p[0]??null,h=d?.id??"",m=h||null;let f;s[4]!==a.id||s[5]!==a.slug||s[6]!==m?(f={connectionId:m,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=m,s[7]=f):f=s[7];const g=we(f);let N;s[8]!==g?(N={client:g},s[8]=g,s[9]=N):N=s[9];const{data:S}=it(N);let b;if(s[10]!==d?.tools||s[11]!==h||s[12]!==p||s[13]!==S){const O=S?S.tools.map(As):(d?.tools??[]).map(Ts);e:{if(p.length<=1){b=O;break e}const z=new Set,E=[],x=ks;for(const w of p){const $=w.id===h?O:x(w.tools);for(const C of $)z.has(C.name)||(z.add(C.name),E.push(C))}b=E.length>0?E:O}s[10]=d?.tools,s[11]=h,s[12]=p,s[13]=S,s[14]=b}else b=s[14];const y=b;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:A}=lt(T);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let k;s[19]!==A?.prompts?(k=A?.prompts??[],s[19]=A?.prompts,s[20]=k):k=s[20];let P;s[21]!==k?(P=k.map(ws),s[21]=k,s[22]=P):P=s[22];const I=P;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let j;s[25]!==v?(j=v.map(_s),s[25]=v,s[26]=j):j=s[26];const D=j;if(!d){let O;s[27]!==e?(O=e("details.connection.notFoundTitle"),s[27]=e,s[28]=O):O=s[28];let z;s[29]!==e?(z=e("details.connection.notFoundDescription"),s[29]=e,s[30]=z):z=s[30];let E;s[31]!==c||s[32]!==r?(E=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=E):E=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==E||s[37]!==x?(w=t.jsx(B,{variant:"outline",onClick:E,children:x}),s[36]=E,s[37]=x,s[38]=w):w=s[38];let $;return s[39]!==O||s[40]!==z||s[41]!==w?($=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:O,description:z,actions:w})}),s[39]=O,s[40]=z,s[41]=w,s[42]=$):$=s[42],$}let U;return s[43]!==l.update.isPending||s[44]!==y||s[45]!==d||s[46]!==h||s[47]!==r||s[48]!==I||s[49]!==D||s[50]!==p?(U=t.jsx(ys,{org:r,connection:d,connectionId:h,isUpdating:l.update.isPending,tools:y,prompts:I,resources:D,siblings:p}),s[43]=l.update.isPending,s[44]=y,s[45]=d,s[46]=h,s[47]=r,s[48]=I,s[49]=D,s[50]=p,s[51]=U):U=s[51],U}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Si(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{Si as default};
@@ -1,8 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D2Mh9ro-.js","assets/index-DkwplL3u.js","assets/index-CnexIaKK.css","assets/ArrowUp-CFRuLeGc.js","assets/chat-context-BXDTFRX2.js","assets/autosend-BUd9WB8h.js","assets/hooks-nUkCrdoV.js","assets/use-mcp-client-zgLHxopZ.js","assets/auth-8muKPtVE.js","assets/decopilot-sse-pool-G44vPfdr.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-CRofv6kx.js","assets/use-virtual-mcp-DTy2Jioe.js","assets/use-ai-providers-DFrHUIak.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-DfE0yMCX.js","assets/use-organization-settings-bo82Mkc7.js","assets/automation-runs-BLbKrLbu.js","assets/select-DF9H4oT6.js","assets/tooltip-RwubIrk3.js","assets/Check-DjOk0Rkq.js","assets/ChevronDown-BjlTvh0G.js","assets/ChevronUp-CBeaIN1f.js","assets/useInfiniteQuery-C0q03X4e.js","assets/use-infinite-scroll-BGAnkyVV.js","assets/use-connection-JJtv7wMS.js","assets/card-Bx6QHURH.js","assets/sidebar-oM27377K.js","assets/LayoutLeft-41ARqh32.js","assets/use-mobile-BZt0_HZC.js","assets/X-CjNSNcc_.js","assets/table-DAruPHNm.js","assets/empty-state-C49ydxC4.js","assets/use-members-D4Dxs4Z9.js","assets/use-org-auth-client-DjhZfc0h.js","assets/use-clock-tick-BXZQ77A9.js","assets/AlertCircle-J91Uub-h.js","assets/CheckCircle-MGAobGZ1.js","assets/DotsVertical-Bn-DgixF.js","assets/agent-icon-CtYPYl8e.js","assets/Tool01-BAl3vunP.js","assets/Settings02-Dscqhciu.js","assets/Tool02-DFxQ4jst.js","assets/ArrowRight-zq5HcvPy.js","assets/ArrowUpRight-DzIyesUw.js","assets/TrendUp01-VNmE5Tgl.js","assets/ZapSquare-Drpj68fr.js","assets/ZoomOut-CGN0hYNp.js","assets/Users03-B0NmsIht.js","assets/ChevronRight-BlnNawqe.js","assets/Stars02-BsoNwBLM.js","assets/Copy01-Bs6JU_rS.js","assets/Globe01-DwSYSUPv.js","assets/Eye-x9PmMwPD.js","assets/FilterLines-DB1N8tt3.js","assets/Star01-B1FJC3Am.js","assets/Globe04-D8q7ictx.js","assets/SwitchHorizontal01-DVNbwjti.js","assets/HardDrive-BiWjqtYm.js","assets/Image01-D5Tiku0_.js","assets/Key01-CPUmZmyM.js","assets/XCircle-7VCYmnt6.js","assets/LinkExternal01-EQdea3eE.js","assets/Monitor01-BRhDD-NM.js","assets/Sun-C9YcQwfr.js","assets/Package-wPIBeGdH.js","assets/Palette-g63KMu4R.js","assets/Play-DhCU58Zq.js","assets/Plus-D9_97xSP.js","assets/SearchLg-B9lGHCRw.js","assets/SearchMd-DdLJZdaD.js","assets/Shield01-DKl0qTL-.js","assets/Stars01-RWgObMJM.js","assets/Trash01-O50YwY-1.js","assets/Upload01-CfQLoJy4.js","assets/User01-Dg9bjRZN.js","assets/Users01-CYkL6UM4.js","assets/XClose-dMfYUtdK.js","assets/Zap-D62dIluk.js","assets/use-automations-BawZrvuR.js","assets/useSuspenseInfiniteQuery-CObvZUjI.js","assets/avatar-CS23QZhy.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DL_GuuBr.js","assets/file-type-icon-s1AYVhlx.js","assets/dialog-r8u0MUEv.js","assets/monaco-editor-DmZdPmcD.js","assets/index-D7q_jeuX.js","assets/index-Bno4yz27.js","assets/calendar-ks6BD9H-.js","assets/shell-layout-Bt6f2nRK.js","assets/required-auth-layout-5DCNYuJP.js","assets/use-org-sso-BIOecJHF.js","assets/integration-icon-CLaWof0d.js","assets/use-navigate-to-agent-DXn0UYRZ.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-DGW_057K.js","assets/form-CN-qLPrG.js","assets/label-PLcboP7g.js","assets/input-Bs4Ffj-i.js","assets/drawer-amjbQ1uR.js","assets/collection-search-yE9i1JpT.js","assets/tabs-CfOwWKj_.js","assets/toggle-group-nEH6HUl5.js","assets/use-deco-credits-BGo8j1Yc.js","assets/extract-connection-data-mhnZKB4s.js","assets/connection-card-BNONqDF0.js","assets/use-registry-connections-Bwkj2-ri.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-EgMsnMGx.js","assets/connection-form-helpers-CziK-zQe.js","assets/authenticate-and-persist-oauth-BMiVZlf1.js","assets/mcp-oauth-fPq59FMN.js","assets/collection-tabs-lcAbgNE1.js","assets/badge-T9uXWFRv.js","assets/connect-desktop-dialog-Dgmm6p4t.js","assets/select-model-CdLCtXSm.js","assets/checkbox-CwZjKbuN.js","assets/skeleton-MaaZV4Ig.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-DDGk5ElL.js","assets/get-initials-D-f_fDFw.js","assets/command-BQsf8lh7.js","assets/index-B2Zh7GaR.js","assets/popover-dJsEu16j.js","assets/use-mcp-tools-Cna1RUcM.js","assets/dropdown-menu-Dei8Q_a1.js","assets/index-DQhABf9k.js","assets/alert-dialog-CqJGfT9S.js","assets/toolbar-CSzeGnpN.js","assets/use-debounced-value-BhoMmzhz.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-De32pzYK.js","assets/use-capability-CnZkm8yn.js","assets/toolbar-icon-button-BLNCzLRX.js","assets/pt-BR-CLy76QW2.js","assets/use-debounced-autosave-CZ0cO5Jj.js","assets/index-BkqJXOXg.js","assets/search-input-DN6JD2TK.js","assets/use-mcp-auth-status-DKRnh2ne.js","assets/switch-CGJLGYj-.js","assets/use-registry-app-Bv1lWRnY.js","assets/github-repo-picker-zaOZVO9r.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/use-secrets-BnYUDcFo.js","assets/use-file-configs-DPt1ulPg.js","assets/automation-list-row-BbxdWFMF.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
2
- import{G as Ys,r as B,w as Vs,K as Nt,c as L,F as Ye,n as kt,a as Hs,o as Zt,t as St,ad as Ws,m as Y,j as s,e as Bt,b as se,B as Ne,E as Xs,d as js,q as ds,k as es,u as Js,aY as Zs}from"./index-DkwplL3u.js";import{g as ze}from"./get-initials-D-f_fDFw.js";import{A as Re}from"./avatar-CS23QZhy.js";import{au as ts,V as en,e as ks,av as tn,f as sn,ao as Ns,aw as nn,ax as an,n as Tt,Y as wt,q as vs,as as ln}from"./agent-icon-CtYPYl8e.js";import{i as rn}from"./SwitchHorizontal01-DVNbwjti.js";import{s as ss}from"./Plus-D9_97xSP.js";import{P as Et,b as At,a as $t}from"./popover-dJsEu16j.js";import{W as on,m as us,S as Ss,C as Ds,g as cn,u as dn,h as un,a as fn}from"./use-mcp-client-zgLHxopZ.js";import{u as mn,G as gn}from"./use-registry-app-Bv1lWRnY.js";import{d as ns,e as as,b as ls,h as xn,a as pn,c as hn}from"./dialog-r8u0MUEv.js";import{b as yn,u as bn}from"./use-connection-JJtv7wMS.js";import{g as jn}from"./github-repo-scope-DjMZbiKa.js";import{a as kn}from"./authenticate-and-persist-oauth-BMiVZlf1.js";import{e as Nn}from"./extract-connection-data-mhnZKB4s.js";import{a as ws}from"./use-members-D4Dxs4Z9.js";import{u as Lt}from"./studio-tools-CRofv6kx.js";import{t as vn,T as Sn,S as Qe}from"./decopilot-sse-pool-G44vPfdr.js";import{u as Dn}from"./use-decopilot-events-DfE0yMCX.js";import{a as wn}from"./format-time-BnbuEtat.js";import{i as Cs}from"./AlertCircle-J91Uub-h.js";import{i as rs}from"./CheckCircle-MGAobGZ1.js";import{a as Cn}from"./DotsVertical-Bn-DgixF.js";import{s as _n}from"./Eye-x9PmMwPD.js";import{a as vt,D as Ot,b as zt,c as Rt}from"./dropdown-menu-Dei8Q_a1.js";import{P as Vt,a as In,D as Bn,j as Tn,k as En,C as An,c as $n}from"./calendar-ks6BD9H-.js";import{u as On}from"./use-copy-DL_GuuBr.js";import{i as zn}from"./Check-DjOk0Rkq.js";import{i as Rn}from"./ChevronRight-BlnNawqe.js";import{a as Fn}from"./Copy01-Bs6JU_rS.js";import{n as Pn}from"./LinkExternal01-EQdea3eE.js";import{i as fs}from"./X-CjNSNcc_.js";import{b as _s,C as Is,a as Ge,e as Ft,d as Bs,c as Ts}from"./command-BQsf8lh7.js";import{s as Ht}from"./User01-Dg9bjRZN.js";import{g as Ln,b as qn,e as Mn,f as Kn,a as Un,D as Gn}from"./drawer-amjbQ1uR.js";import{t as os}from"./ChevronDown-BjlTvh0G.js";import{i as Es}from"./FilterLines-DB1N8tt3.js";import{s as Qn}from"./TrendUp01-VNmE5Tgl.js";import{u as Yn}from"./shell-layout-Bt6f2nRK.js";import{u as Vn}from"./hooks-nUkCrdoV.js";import{u as Hn}from"./use-organization-settings-bo82Mkc7.js";import{i as As}from"./ArrowRight-zq5HcvPy.js";import{f as Wn}from"./tab-id-BijBBRwE.js";import{u as Wt}from"./companions-core-DJL49WEJ.js";function Xn(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const Zl="__home__";function is(t,e){return Ys.chatDraft(t,e)}function Jn(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function Zn(t,e,n,o,a){const l=is(e,n);if(Xn(o)){t.removeItem(l);return}const r={tiptapDoc:o,updatedAt:Date.now()},c=JSON.stringify(r);try{t.setItem(l,c)}catch(d){if(ea(d)){const m=new TextEncoder().encode(c).byteLength;a?.onQuotaExceeded?.({docSizeBytes:m});return}throw d}}function er(t,e,n){const o=is(e,n),a=t.getItem(o),l=Jn(a);return a!==null&&l===null&&t.removeItem(o),l}function tr(t,e,n){t.removeItem(is(e,n))}function ea(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}function ta(t){var e;const{char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:c}=t,d=o&&!a,m=En(n),g=new RegExp(`\\s${m}$`),i=r?"^":"",f=a?"":m,u=d?new RegExp(`${i}${m}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${i}(?:^)?${m}[^\\s${f}]*`,"gm"),h=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!h)return null;const b=c.pos-h.length,x=Array.from(h.matchAll(u)).pop();if(!x||x.input===void 0||x.index===void 0)return null;const y=x.input.slice(Math.max(0,x.index-1),x.index),p=new RegExp(`^[${l?.join("")}\0]?$`).test(y);if(l!==null&&!p)return null;const k=b+x.index;let v=k+x[0].length;return d&&g.test(h.slice(v-1,v+1))&&(x[0]+=" ",v+=1),k<c.pos&&v>=c.pos?{range:{from:k,to:v},query:x[0].slice(n.length),text:x[0]}:null}var sa=new Vt("suggestion");function na({pluginKey:t=sa,editor:e,char:n="@",allowSpaces:o=!1,allowToIncludeChar:a=!1,allowedPrefixes:l=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:d="suggestion",decorationContent:m="",decorationEmptyClass:g="is-empty",command:i=()=>null,items:f=()=>[],render:u=()=>({}),allow:h=()=>!0,findSuggestionMatch:b=ta,shouldShow:x}){let y;const p=u?.(),k=()=>{const N=e.state.selection.$anchor.pos,D=e.view.coordsAtPos(N),{top:C,right:_,bottom:I,left:T}=D;try{return new DOMRect(T,C,_-T,I-C)}catch{return null}},v=(N,D)=>D?()=>{const C=t.getState(e.state),_=C?.decorationId,I=N.dom.querySelector(`[data-decoration-id="${_}"]`);return I?.getBoundingClientRect()||null}:k;function S(N,D){var C;try{const I=t.getState(N.state),T=I?.decorationId?N.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null,A={editor:e,range:I?.range||{from:0,to:0},query:I?.query||null,text:I?.text||null,items:[],command:K=>i({editor:e,range:I?.range||{from:0,to:0},props:K}),decorationNode:T,clientRect:v(N,T)};(C=p?.onExit)==null||C.call(p,A)}catch{}const _=N.state.tr.setMeta(D,{exit:!0});N.dispatch(_)}const j=new In({key:t,view(){return{update:async(N,D)=>{var C,_,I,T,A,K,U;const w=(C=this.key)==null?void 0:C.getState(D),E=(_=this.key)==null?void 0:_.getState(N.state),$=w.active&&E.active&&w.range.from!==E.range.from,V=!w.active&&E.active,W=w.active&&!E.active,R=!V&&!W&&w.query!==E.query,X=V||$&&R,J=R||$,F=W||$&&R;if(!X&&!J&&!F)return;const P=F&&!X?w:E,H=N.dom.querySelector(`[data-decoration-id="${P.decorationId}"]`);y={editor:e,range:P.range,query:P.query,text:P.text,items:[],command:G=>i({editor:e,range:P.range,props:G}),decorationNode:H,clientRect:v(N,H)},X&&((I=p?.onBeforeStart)==null||I.call(p,y)),J&&((T=p?.onBeforeUpdate)==null||T.call(p,y)),(J||X)&&(y.items=await f({editor:e,query:P.query})),F&&((A=p?.onExit)==null||A.call(p,y)),J&&((K=p?.onUpdate)==null||K.call(p,y)),X&&((U=p?.onStart)==null||U.call(p,y))},destroy:()=>{var N;y&&((N=p?.onExit)==null||N.call(p,y))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(N,D,C,_){const{isEditable:I}=e,{composing:T}=e.view,{selection:A}=N,{empty:K,from:U}=A,w={...D},E=N.getMeta(t);if(E&&E.exit)return w.active=!1,w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null,w;if(w.composing=T,I&&(K||e.view.composing)){(U<D.range.from||U>D.range.to)&&!T&&!D.composing&&(w.active=!1);const $=b({char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:A.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;$&&h({editor:e,state:_,range:$.range,isActive:D.active})&&(!x||x({editor:e,range:$.range,query:$.query,text:$.text,transaction:N}))?(w.active=!0,w.decorationId=D.decorationId?D.decorationId:V,w.range=$.range,w.query=$.query,w.text=$.text):w.active=!1}else w.active=!1;return w.active||(w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null),w}},props:{handleKeyDown(N,D){var C,_,I,T;const{active:A,range:K}=j.getState(N.state);if(!A)return!1;if(D.key==="Escape"||D.key==="Esc"){const w=j.getState(N.state),E=(C=y?.decorationNode)!=null?C:null,$=E??(w?.decorationId?N.dom.querySelector(`[data-decoration-id="${w.decorationId}"]`):null);if(((_=p?.onKeyDown)==null?void 0:_.call(p,{view:N,event:D,range:w.range}))||!1)return!0;const W={editor:e,range:w.range,query:w.query,text:w.text,items:[],command:R=>i({editor:e,range:w.range,props:R}),decorationNode:$,clientRect:$?()=>$.getBoundingClientRect()||null:null};return(I=p?.onExit)==null||I.call(p,W),S(N,t),!0}return((T=p?.onKeyDown)==null?void 0:T.call(p,{view:N,event:D,range:K}))||!1},decorations(N){const{active:D,range:C,decorationId:_,query:I}=j.getState(N);if(!D)return null;const T=!I?.length,A=[d];return T&&A.push(g),Bn.create(N.doc,[Tn.inline(C.from,C.to,{nodeName:c,class:A.join(" "),"data-decoration-id":_,"data-decoration-content":m})])}}});return j}function aa(t){const e=L.c(24),{editor:n,query:o,items:a,onSelect:l,onClose:r}=t,[c,d]=B.useState(0),m=B.useRef(a),g=B.useRef(c),i=B.useRef(l),f=B.useRef(r),u=B.useDeferredValue(o);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{d(0)},e[0]=h):h=e[0];let b;e[1]!==u?(b=[u],e[1]=u,e[2]=b):b=e[2],B.useEffect(h,b);let x,y;e[3]!==a.length||e[4]!==c?(x=()=>{c>=a.length&&a.length>0&&d(0)},y=[a.length,c],e[3]=a.length,e[4]=c,e[5]=x,e[6]=y):(x=e[5],y=e[6]),B.useEffect(x,y);let p,k;e[7]!==a?(p=()=>{m.current=a},k=[a],e[7]=a,e[8]=p,e[9]=k):(p=e[8],k=e[9]),B.useEffect(p,k);let v,S;e[10]!==c?(v=()=>{g.current=c},S=[c],e[10]=c,e[11]=v,e[12]=S):(v=e[11],S=e[12]),B.useEffect(v,S);let j,N;e[13]!==l?(N=()=>{i.current=l},j=[l],e[13]=l,e[14]=j,e[15]=N):(j=e[14],N=e[15]),B.useEffect(N,j);let D,C;e[16]!==r?(D=()=>{f.current=r},C=[r],e[16]=r,e[17]=D,e[18]=C):(D=e[17],C=e[18]),B.useEffect(D,C);let _,I;e[19]!==n?(_=()=>{if(n?.isDestroyed)return;let K;try{K=n.view.dom}catch{return}if(!K)return;const U=E=>{const $=m.current;if(!$.length)return!1;const V=()=>d(R=>(R+1)%$.length),W=()=>d(R=>(R-1+$.length)%$.length);switch(E.key){case"ArrowUp":return E.preventDefault(),W(),!0;case"ArrowDown":return E.preventDefault(),V(),!0;case"Tab":return E.preventDefault(),E.shiftKey?W():V(),!0;case"Home":return E.preventDefault(),d(0),!0;case"End":return E.preventDefault(),d($.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const R=g.current;return R!==-1&&$[R]&&i.current?.($[R],R),!0}case"Escape":return E.preventDefault(),f.current?.(),!0;default:return!1}},w=E=>{U(E)};return K.addEventListener("keydown",w,!0),()=>{K?.removeEventListener("keydown",w,!0)}},I=[n],e[19]=n,e[20]=_,e[21]=I):(_=e[20],I=e[21]),B.useEffect(_,I);const T=a.length?c:void 0;let A;return e[22]!==T?(A={selectedIndex:T,setSelectedIndex:d},e[22]=T,e[23]=A):A=e[23],A}function la(t,e){switch(e.type){case"SET_SELECTED_ITEM":return{...t,selectedItem:e.payload};case"ON_START":return{...t,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...t,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return t}}const ra=B.createContext(void 0);function oa(){const t=B.useContext(ra);if(!t)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return t}function sr({editor:t,char:e,pluginKey:n,allow:o,onOpenChange:a}){const[l,r]=B.useReducer(la,{open:!1,element:null,query:"",range:null,selectedItem:null}),c=B.useRef(a);return c.current=a,B.useEffect(()=>{if(t?.isDestroyed)return;const d=n instanceof Vt?n:new Vt(n);t.state.plugins.find(i=>i.spec.key===d)&&t.unregisterPlugin(d);const g=na({pluginKey:d,editor:t,char:e,allow(i){const f=t.state.doc.resolve(i.range.from);for(let u=f.depth;u>0;u--)if(f.node(u).type.name==="image")return!1;return!(o&&!o(i))},command(){},render:()=>({onStart:i=>{r({type:"ON_START",payload:{element:i.decorationNode??null,query:i.query,range:i.range}}),c.current?.(!0)},onUpdate:i=>{r({type:"ON_UPDATE",payload:{element:i.decorationNode??null,query:i.query,range:i.range}})},onKeyDown:i=>i.event.key==="Escape"?(r({type:"ON_EXIT"}),!0):!1,onExit:()=>{r({type:"ON_EXIT"}),c.current?.(!1)}}),items:()=>[]});return t.registerPlugin(g),()=>{t?.isDestroyed||t.unregisterPlugin(d)}},[t,n,e,r,o]),{state:l,dispatch:r}}function nr({editor:t,queryKey:e,queryFn:n,onSelect:o}){const{state:a,dispatch:l}=oa(),r=B.useDeferredValue(a.query),{data:c}=Vs({queryKey:Nt.suggestionItems(e,a.open,r),queryFn:()=>a.open?n({query:r}):[]}),d=()=>{l({type:"ON_EXIT"})},m=async(i,f)=>{if(!(a.selectedItem!==null||!a.range)){l({type:"SET_SELECTED_ITEM",payload:i});try{const{view:u}=t,b=u.state.selection.$to.nodeAfter?.text?.startsWith(" "),x=a.range?{...a.range}:{from:0,to:0};b&&a.range&&(x.to+=1),await o({range:x,item:i})===!1?l({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:g}=aa({editor:t,query:r,items:c,onSelect:m,onClose:d});return{selectedItem:a.selectedItem,items:c,selectedIndex:g,close:d,onSelect:m}}function ia(t){return t?t.run_in_progress?"generating":t.scanned_at?"ready":"none":"none"}const ca=2e4;function da(t){if(typeof t!="string"||!t)return null;try{return new URL(t).hostname||null}catch{return null}}function ua(){const t=L.c(17),{org:e}=Ye(),n=on.COMMERCE_DISCOVERY(e.id);let o;t[0]!==e.id||t[1]!==e.slug?(o=us({connectionId:Ss,orgId:e.id,orgSlug:e.slug}),t[0]=e.id,t[1]=e.slug,t[2]=o):o=t[2];const{data:a}=kt(o),r=kt({queryKey:Nt.commerceDiscoveryConnection(e.id,n),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const k=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Wt(k)}}).data?.item??null,{data:c}=kt({...us({connectionId:n,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),d=Nt.commerceDiscoveryDiagnostic(e.id,n),m=!!c;let g;t[3]!==c?(g=async()=>{if(!c)throw new Error("cdClient not ready");const k=await c.callTool({name:Ds,arguments:{}});return Wt(k).diagnostic??null},t[3]=c,t[4]=g):g=t[4];let i;t[5]!==d||t[6]!==m||t[7]!==g?(i={queryKey:d,enabled:m,retry:1,refetchInterval:fa,queryFn:g},t[5]=d,t[6]=m,t[7]=g,t[8]=i):i=t[8];const f=kt(i),u=f.data??null,h=f.isSuccess,b=r?.metadata?.siteUrl;let x;t[9]!==b?(x=da(b),t[9]=b,t[10]=x):x=t[10];const y=c??null;let p;return t[11]!==n||t[12]!==f.isSuccess||t[13]!==u||t[14]!==x||t[15]!==y?(p={diagnostic:u,isSuccess:h,host:x,connectionId:n,cdClient:y},t[11]=n,t[12]=f.isSuccess,t[13]=u,t[14]=x,t[15]=y,t[16]=p):p=t[16],p}function fa(t){return t.state.status!=="error"&&ia(t.state.data)==="generating"?ca:!1}function ma(t,e){return{to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:cn(t.id),main:Wn(e,Ds)}}}function ga(t){const{org:e}=Ye(),{data:n}=Hs.useSession(),o=yn(),a=Zt(),l=dn({connectionId:Ss,orgId:e.id,orgSlug:e.slug}),[r,c]=B.useState(!1),d=mn(t,{enabled:!1});return{connect:async()=>{if(!(r||!n?.user?.id||!e)){c(!0);try{const g=d.data??(await d.refetch()).data;if(!g){St.error("Could not find this integration in the registry");return}const i=Nn(g,e.id,n.user.id,{remoteIndex:0});if(!i.connection_url){St.error("This integration has no connection method available");return}const f=i.app_name?await xa(l,i.app_name):null,u=!f,h=f?.id??(await o.create.mutateAsync(i)).id,b=await kn({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:x=>o.update.mutateAsync({id:h,data:{connection_token:x}}).then(()=>{})});if(b.ran&&!b.ok){if(u)try{await o.delete.mutateAsync(h)}catch{}St.error(`Authentication failed: ${b.error??"no token"}`);return}Ws(a,e.id),St.success(u?"Connected successfully":"Already connected")}catch(g){St.error(`Failed to connect: ${g instanceof Error?g.message:String(g)}`)}finally{c(!1)}}},isConnecting:r}}async function xa(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Me(t){const e=L.c(8),{size:n,className:o}=t,a=n===void 0?16:n;let l;e[0]!==a?(l={width:a,height:a},e[0]=a,e[1]=l):l=e[1];let r;e[2]!==o?(r=Y("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=r):r=e[3];let c;return e[4]!==a||e[5]!==l||e[6]!==r?(c=s.jsx("img",{src:un,alt:"Super Agent",width:a,height:a,style:l,className:r}),e[4]=a,e[5]=l,e[6]=r,e[7]=c):c=e[7],c}const ms=()=>0;function pa(t){const{orgSlug:e,enabled:n=!0,onUpdate:o,onDelete:a}=t,l=B.useRef(o);l.current=o;const r=B.useRef(a);r.current=a;const c=B.useRef(null),d=B.useRef(n),m=B.useRef(e);(!c.current||d.current!==n||m.current!==e)&&(d.current=n,m.current=e,c.current=i=>{if(!n||!e)return()=>{};const f=u=>{let h;try{h=JSON.parse(u.data)}catch{return}h.data&&(u.type===Sn?r.current?.(h.data.id):l.current(h.data)),i()};return vn.subscribe(e,f)}),B.useSyncExternalStore(c.current,ms,ms)}function ha(){const t=L.c(27),{org:e,locator:n}=Ye(),o=Lt(),a=Zt();let l;t[0]!==n?(l=Nt.taskBoardItems(n),t[0]=n,t[1]=l):l=t[1];const r=l;let c;t[2]!==o?(c=async()=>(await o.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=o,t[3]=c):c=t[3];let d;t[4]!==r||t[5]!==c?(d={queryKey:r,queryFn:c},t[4]=r,t[5]=c,t[6]=d):d=t[6];const m=kt(d);let g,i;t[7]!==a||t[8]!==r?(g=y=>{a.setQueryData(r,p=>{const k=p??[],v=y;return k.some(S=>S.id===v.id)?k.map(S=>S.id===v.id?v:S):[v,...k]})},i=y=>{a.setQueryData(r,p=>p?.filter(k=>k.id!==y))},t[7]=a,t[8]=r,t[9]=g,t[10]=i):(g=t[9],i=t[10]);let f;t[11]!==e.slug||t[12]!==g||t[13]!==i?(f={orgSlug:e.slug,onUpdate:g,onDelete:i},t[11]=e.slug,t[12]=g,t[13]=i,t[14]=f):f=t[14],pa(f);let u;t[15]!==a||t[16]!==r?(u=y=>{const p=y.subject,k=y.data.status;a.setQueryData(r,v=>v?.map(S=>S.threads.some(j=>j.threadId===p)?{...S,threads:S.threads.map(j=>j.threadId===p?{...j,status:k}:j)}:S))},t[15]=a,t[16]=r,t[17]=u):u=t[17];let h;t[18]!==e.slug||t[19]!==u?(h={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=h):h=t[20],Dn(h);let b;t[21]!==m.data?(b=m.data??[],t[21]=m.data,t[22]=b):b=t[22];let x;return t[23]!==m.error||t[24]!==m.isLoading||t[25]!==b?(x={items:b,isLoading:m.isLoading,error:m.error},t[23]=m.error,t[24]=m.isLoading,t[25]=b,t[26]=x):x=t[26],x}function ya(){const t=L.c(36),{locator:e}=Ye(),n=Lt(),o=Zt();let a;t[0]!==e?(a=Nt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const l=a;let r;t[2]!==o||t[3]!==l?(r=()=>o.invalidateQueries({queryKey:l}),t[2]=o,t[3]=l,t[4]=r):r=t[4];const c=r;let d;t[5]!==n?(d=N=>n.call("TASK_BOARD_ITEM_CREATE",N),t[5]=n,t[6]=d):d=t[6];let m;t[7]!==c||t[8]!==d?(m={mutationFn:d,onSuccess:c},t[7]=c,t[8]=d,t[9]=m):m=t[9];const g=Bt(m);let i;t[10]!==n?(i=N=>n.call("TASK_BOARD_ITEM_UPDATE",N),t[10]=n,t[11]=i):i=t[11];let f,u;t[12]!==o||t[13]!==l?(f=async N=>{await o.cancelQueries({queryKey:l});const D=o.getQueryData(l);return o.setQueryData(l,C=>C?.map(_=>_.id===N.id?{..._,...N}:_)),{previous:D}},u=(N,D,C)=>{C?.previous&&o.setQueryData(l,C.previous)},t[12]=o,t[13]=l,t[14]=f,t[15]=u):(f=t[14],u=t[15]);let h;t[16]!==c||t[17]!==i||t[18]!==f||t[19]!==u?(h={mutationFn:i,onMutate:f,onError:u,onSettled:c},t[16]=c,t[17]=i,t[18]=f,t[19]=u,t[20]=h):h=t[20];const b=Bt(h);let x;t[21]!==n?(x=N=>n.call("TASK_BOARD_ITEM_DELETE",{id:N}),t[21]=n,t[22]=x):x=t[22];let y;t[23]!==c||t[24]!==x?(y={mutationFn:x,onSuccess:c},t[23]=c,t[24]=x,t[25]=y):y=t[25];const p=Bt(y);let k;t[26]!==n?(k=N=>n.call("TASK_BOARD_ITEM_UPDATE",N),t[26]=n,t[27]=k):k=t[27];let v;t[28]!==c||t[29]!==k?(v={mutationFn:k,onSuccess:c},t[28]=c,t[29]=k,t[30]=v):v=t[30];const S=Bt(v);let j;return t[31]!==g||t[32]!==S||t[33]!==p||t[34]!==b?(j={create:g,update:b,remove:p,link:S},t[31]=g,t[32]=S,t[33]=p,t[34]=b,t[35]=j):j=t[35],j}function Xt(t){return t.threads.some(e=>e.status==="requires_action")}function ba(t){return t.threads[0]}const $s=["triage","todo","in_progress","in_review","done"],$e={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Cs,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:Cn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:ts,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:_n,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:rs,iconClassName:"text-success"}},Os=["none","low","medium","high","urgent"],Oe={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function ja(t){const e=L.c(10),{locator:n}=Ye(),o=Lt();let a;e[0]!==t||e[1]!==n?(a=Nt.taskBoardItemPrs(n,t??""),e[0]=t,e[1]=n,e[2]=a):a=e[2];const l=!!t;let r;e[3]!==t||e[4]!==o?(r=async()=>(await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=o,e[5]=r):r=e[5];let c;return e[6]!==a||e[7]!==l||e[8]!==r?(c={queryKey:a,enabled:l,queryFn:r},e[6]=a,e[7]=l,e[8]=r,e[9]=c):c=e[9],kt(c)}function zs(t){const e=L.c(27),{members:n,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(_s,{placeholder:"Assign to…",className:"h-9"}),e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Is,{children:"No members found."}),e[1]=l):l=e[1];let r;e[2]!==o?(r=()=>o(Qe),e[2]=o,e[3]=r):r=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Me,{size:16}),d=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let m;e[6]!==r?(m=s.jsxs(Ge,{value:"Super Agent",onSelect:r,className:"gap-2",children:[c,d]}),e[6]=r,e[7]=m):m=e[7];let g;e[8]!==o?(g=()=>o(null),e[8]=o,e[9]=g):g=e[9];let i,f;e[10]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),f=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[10]=i,e[11]=f):(i=e[10],f=e[11]);let u;e[12]!==g?(u=s.jsxs(Ge,{value:"Unassigned",onSelect:g,className:"gap-2",children:[i,f]}),e[12]=g,e[13]=u):u=e[13];let h;e[14]!==u||e[15]!==m?(h=s.jsxs(Ft,{children:[m,u]}),e[14]=u,e[15]=m,e[16]=h):h=e[16];let b;if(e[17]!==n||e[18]!==o){let p;e[20]!==o?(p=k=>s.jsxs(Ge,{value:k.user?.name??k.userId,onSelect:()=>o(k.userId),className:"gap-2",children:[s.jsx(Re,{url:k.user?.image??void 0,fallback:ze(k.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:k.user?.name??k.userId})]},k.userId),e[20]=o,e[21]=p):p=e[21],b=n.map(p),e[17]=n,e[18]=o,e[19]=b}else b=e[19];let x;e[22]!==b?(x=s.jsx(Ft,{heading:"Members",children:b}),e[22]=b,e[23]=x):x=e[23];let y;return e[24]!==h||e[25]!==x?(y=s.jsxs(Bs,{children:[a,s.jsxs(Ts,{children:[l,h,x]})]}),e[24]=h,e[25]=x,e[26]=y):y=e[26],y}function ka(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function gs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Na=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Dt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent";function va(t){const e=L.c(199),{open:n,onClose:o,item:a,defaultStatus:l,onSubmit:r,onDelete:c,onOpenThread:d,onNewChat:m,isSaving:g}=t,i=se(),{data:f}=ws(),u=f?.data?.members??[],{handleCopy:h,copied:b}=On(),[x,y]=B.useState(a?.title??""),[p,k]=B.useState(a?.description??""),[v,S]=B.useState(a?.status??l??"triage"),[j,N]=B.useState(a?.priority??"medium"),[D,C]=B.useState(a?.assigneeId??null),_=a?.dueDate;let I;e[0]!==_?(I=gs(_),e[0]=_,e[1]=I):I=e[1];const[T,A]=B.useState(I),[K,U]=B.useState(!1),[w,E]=B.useState(!1);let $;e[2]!==l||e[3]!==a?.assigneeId||e[4]!==a?.description||e[5]!==a?.dueDate||e[6]!==a?.priority||e[7]!==a?.status||e[8]!==a?.title||e[9]!==C||e[10]!==A?($=()=>{y(a?.title??""),k(a?.description??""),S(a?.status??l??"triage"),N(a?.priority??"medium"),C(a?.assigneeId??null),A(gs(a?.dueDate))},e[2]=l,e[3]=a?.assigneeId,e[4]=a?.description,e[5]=a?.dueDate,e[6]=a?.priority,e[7]=a?.status,e[8]=a?.title,e[9]=C,e[10]=A,e[11]=$):$=e[11];const V=$;let W;e[12]!==o||e[13]!==V?(W=()=>{o(),V()},e[12]=o,e[13]=V,e[14]=W):W=e[14];const R=W;let X;e[15]!==D||e[16]!==p||e[17]!==T||e[18]!==r||e[19]!==j||e[20]!==v||e[21]!==x?(X=()=>{const O=x.trim();O&&r({title:O,description:p.trim()||null,status:v,priority:j,assigneeId:D,dueDate:T?ka(T):null})},e[15]=D,e[16]=p,e[17]=T,e[18]=r,e[19]=j,e[20]=v,e[21]=x,e[22]=X):X=e[22];const J=X,F=D===Qe;let P;e[23]!==D?(P=O=>O.userId===D,e[23]=D,e[24]=P):P=e[24];const H=u.find(P),G=a?.assignedBy?u.find(O=>O.userId===a.assignedBy):void 0,te=$e[v].icon,ne=as;let z;e[25]!==R?(z=O=>!O&&R(),e[25]=R,e[26]=z):z=e[26];const q=ns,je="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",ke="hidden";let ae;e[27]!==a||e[28]!==i?(ae=i(a?"taskBoard.taskDialog.editTaskTitle":"taskBoard.taskDialog.newTaskTitle"),e[27]=a,e[28]=i,e[29]=ae):ae=e[29];let Z;e[30]!==ae?(Z=s.jsx(ls,{className:"sr-only",children:ae}),e[30]=ae,e[31]=Z):Z=e[31];let ee;e[32]!==i?(ee=i("taskBoard.taskDialog.closeAriaLabel"),e[32]=i,e[33]=ee):ee=e[33];let re;e[34]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(fs,{size:16}),e[34]=re):re=e[34];let oe;e[35]!==R||e[36]!==ee?(oe=s.jsx("button",{type:"button","aria-label":ee,onClick:R,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:re}),e[35]=R,e[36]=ee,e[37]=oe):oe=e[37];const Fe="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ve;e[38]===Symbol.for("react.memo_cache_sentinel")?(ve=O=>{y(O.target.value),O.target.style.height="auto",O.target.style.height=`${O.target.scrollHeight}px`},e[38]=ve):ve=e[38];let Se;e[39]!==i?(Se=i("taskBoard.taskDialog.taskTitlePlaceholder"),e[39]=i,e[40]=Se):Se=e[40];let M;e[41]!==Se||e[42]!==x?(M=s.jsx("textarea",{ref:Da,value:x,onChange:ve,onKeyDown:Sa,placeholder:Se,autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=Se,e[42]=x,e[43]=M):M=e[43];let ie;e[44]===Symbol.for("react.memo_cache_sentinel")?(ie=O=>k(O.target.value),e[44]=ie):ie=e[44];let le;e[45]!==i?(le=i("taskBoard.taskDialog.descriptionPlaceholder"),e[45]=i,e[46]=le):le=e[46];let Ce;e[47]!==p||e[48]!==le?(Ce=s.jsx("textarea",{value:p,onChange:ie,placeholder:le,className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[47]=p,e[48]=le,e[49]=Ce):Ce=e[49];let ce;e[50]!==b||e[51]!==p||e[52]!==h||e[53]!==i?(ce=p&&s.jsx(Ne,{type:"button",variant:"ghost",size:"icon","aria-label":i("taskBoard.taskDialog.copyDescriptionAriaLabel"),className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>h(p),children:b?s.jsx(zn,{size:14}):s.jsx(Fn,{size:14})}),e[50]=b,e[51]=p,e[52]=h,e[53]=i,e[54]=ce):ce=e[54];let _e;e[55]!==Ce||e[56]!==ce?(_e=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[Ce,ce]}),e[55]=Ce,e[56]=ce,e[57]=_e):_e=e[57];const Pe=a&&a.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:a.threads.map(O=>s.jsx(wa,{thread:O,startedBy:G??H,onOpen:d},O.threadId))});let Ke;e[58]!==a?(Ke=a?.id&&s.jsx(Ia,{itemId:a.id}),e[58]=a,e[59]=Ke):Ke=e[59];let Ae;e[60]!==M||e[61]!==_e||e[62]!==Pe||e[63]!==Ke?(Ae=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[M,_e,Pe,Ke]}),e[60]=M,e[61]=_e,e[62]=Pe,e[63]=Ke,e[64]=Ae):Ae=e[64];const Ve="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let de;e[65]!==i?(de=i("taskBoard.taskDialog.propertiesLabel"),e[65]=i,e[66]=de):de=e[66];let ue;e[67]!==de?(ue=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:de}),e[67]=de,e[68]=ue):ue=e[68];const Le="flex flex-wrap gap-2 sm:flex-col",Ie=$e[v];let Be;e[69]!==te||e[70]!==Ie.iconClassName?(Be=s.jsx(te,{size:16,className:Ie.iconClassName}),e[69]=te,e[70]=Ie.iconClassName,e[71]=Be):Be=e[71];const qe=$e[v];let fe;e[72]!==i||e[73]!==qe.labelKey?(fe=i(qe.labelKey),e[72]=i,e[73]=qe.labelKey,e[74]=fe):fe=e[74];let me;e[75]!==Be||e[76]!==fe?(me=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:Dt,children:[Be,fe]})}),e[75]=Be,e[76]=fe,e[77]=me):me=e[77];let Te;e[78]!==i?(Te=$s.map(O=>{const Qs=$e[O].icon;return s.jsxs(vt,{onSelect:()=>S(O),className:"gap-2",children:[s.jsx(Qs,{size:16,className:$e[O].iconClassName}),i($e[O].labelKey)]},O)}),e[78]=i,e[79]=Te):Te=e[79];let De;e[80]!==Te?(De=s.jsx(zt,{align:"start",className:"w-44",children:Te}),e[80]=Te,e[81]=De):De=e[81];let ge;e[82]!==me||e[83]!==De?(ge=s.jsxs(Rt,{children:[me,De]}),e[82]=me,e[83]=De,e[84]=ge):ge=e[84];const Ee=j==="none"&&"text-muted-foreground";let xe;e[85]!==Ee?(xe=Y(Dt,Ee),e[85]=Ee,e[86]=xe):xe=e[86];let we;e[87]!==j||e[88]!==i?(we=j==="none"?s.jsxs(s.Fragment,{children:[s.jsx(en,{size:16}),i("taskBoard.taskDialog.setPriorityButton")]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[j].dotClassName)}),i(Oe[j].labelKey)]}),e[87]=j,e[88]=i,e[89]=we):we=e[89];let pe;e[90]!==xe||e[91]!==we?(pe=s.jsx(Ot,{asChild:!0,children:s.jsx("button",{type:"button",className:xe,children:we})}),e[90]=xe,e[91]=we,e[92]=pe):pe=e[92];let he;e[93]!==i?(he=Os.map(O=>s.jsxs(vt,{onSelect:()=>N(O),children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[O].dotClassName)}),i(Oe[O].labelKey)]},O)),e[93]=i,e[94]=he):he=e[94];let ye;e[95]!==he?(ye=s.jsx(zt,{align:"start",className:"w-40",children:he}),e[95]=he,e[96]=ye):ye=e[96];let be;e[97]!==pe||e[98]!==ye?(be=s.jsxs(Rt,{children:[pe,ye]}),e[97]=pe,e[98]=ye,e[99]=be):be=e[99];const Q="flex flex-col",Ue=At,Ks=!0,Mt=Et,Us=!0,Gs="button",Kt=!D&&"text-muted-foreground";let He;e[100]!==Kt?(He=Y(Dt,Kt),e[100]=Kt,e[101]=He):He=e[101];const Ut=F&&G?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(Re,{url:G.user?.image??void 0,fallback:ze(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??i("taskBoard.taskDialog.superAgentDefaultName")})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(Re,{url:G.user?.image??void 0,fallback:ze(G.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Me,{size:16,className:"ring-2 ring-background"})]}),i("taskBoard.taskDialog.superAgentLabel")]})]}):F?s.jsxs(s.Fragment,{children:[s.jsx(Me,{size:16}),i("taskBoard.taskDialog.superAgentLabel")]}):H?s.jsxs(s.Fragment,{children:[s.jsx(Re,{url:H.user?.image??void 0,fallback:ze(H.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:H.user?.name??i("taskBoard.taskDialog.unassignedLabel")})]}):s.jsxs(s.Fragment,{children:[s.jsx(ks,{size:16,className:"text-muted-foreground"}),i("taskBoard.taskDialog.assignButton")]});let We;e[102]!==He||e[103]!==Ut?(We=s.jsx("button",{type:Gs,className:He,children:Ut}),e[102]=He,e[103]=Ut,e[104]=We):We=e[104];let Xe;e[105]!==Mt||e[106]!==We?(Xe=s.jsx(Mt,{asChild:Us,children:We}),e[105]=Mt,e[106]=We,e[107]=Xe):Xe=e[107];let Je;e[108]!==C||e[109]!==E?(Je=O=>{C(O),E(!1)},e[108]=C,e[109]=E,e[110]=Je):Je=e[110];let Ze;e[111]!==u||e[112]!==Je?(Ze=s.jsx($t,{align:"start",className:"w-56 p-0",children:s.jsx(zs,{members:u,onSelect:Je})}),e[111]=u,e[112]=Je,e[113]=Ze):Ze=e[113];let et;e[114]!==Ue||e[115]!==w||e[116]!==E||e[117]!==Xe||e[118]!==Ze?(et=s.jsxs(Ue,{open:w,onOpenChange:E,modal:Ks,children:[Xe,Ze]}),e[114]=Ue,e[115]=w,e[116]=E,e[117]=Xe,e[118]=Ze,e[119]=et):et=e[119];let tt;e[120]!==G||e[121]!==F||e[122]!==i?(tt=F&&G&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:Y(Dt,"pointer-events-none"),children:[s.jsx(Me,{size:16}),i("taskBoard.taskDialog.superAgentLabel")]})]}),e[120]=G,e[121]=F,e[122]=i,e[123]=tt):tt=e[123];let st;e[124]!==et||e[125]!==tt?(st=s.jsxs("div",{className:Q,children:[et,tt]}),e[124]=et,e[125]=tt,e[126]=st):st=e[126];const Gt=!T&&"text-muted-foreground";let nt;e[127]!==Gt?(nt=Y(Dt,Gt),e[127]=Gt,e[128]=nt):nt=e[128];let Ct;e[129]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(wt,{size:16,className:"text-muted-foreground"}),e[129]=Ct):Ct=e[129];let at;e[130]!==T||e[131]!==i?(at=T?Na.format(T):i("taskBoard.taskDialog.dueDateLabel"),e[130]=T,e[131]=i,e[132]=at):at=e[132];let lt;e[133]!==T||e[134]!==A||e[135]!==i?(lt=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":i("taskBoard.taskDialog.clearDueDateAriaLabel"),className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:O=>{O.stopPropagation(),A(null)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),A(null))},children:s.jsx(fs,{size:12})}),e[133]=T,e[134]=A,e[135]=i,e[136]=lt):lt=e[136];let rt;e[137]!==nt||e[138]!==at||e[139]!==lt?(rt=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:nt,children:[Ct,at,lt]})}),e[137]=nt,e[138]=at,e[139]=lt,e[140]=rt):rt=e[140];const Qt=T??void 0;let ot;e[141]!==A||e[142]!==U?(ot=O=>{A(O??null),O&&U(!1)},e[141]=A,e[142]=U,e[143]=ot):ot=e[143];let it;e[144]!==Qt||e[145]!==ot?(it=s.jsx($t,{className:"w-auto p-0",align:"start",children:s.jsx(An,{mode:"single",selected:Qt,onSelect:ot,initialFocus:!0})}),e[144]=Qt,e[145]=ot,e[146]=it):it=e[146];let ct;e[147]!==K||e[148]!==U||e[149]!==rt||e[150]!==it?(ct=s.jsxs(At,{open:K,onOpenChange:U,children:[rt,it]}),e[147]=K,e[148]=U,e[149]=rt,e[150]=it,e[151]=ct):ct=e[151];let dt;e[152]!==ge||e[153]!==be||e[154]!==st||e[155]!==ct?(dt=s.jsxs("div",{className:Le,children:[ge,be,st,ct]}),e[152]=ge,e[153]=be,e[154]=st,e[155]=ct,e[156]=dt):dt=e[156];let ut;e[157]!==ue||e[158]!==dt?(ut=s.jsxs("div",{className:Ve,children:[ue,dt]}),e[157]=ue,e[158]=dt,e[159]=ut):ut=e[159];let ft;e[160]!==Ae||e[161]!==ut?(ft=s.jsxs("div",{className:Fe,children:[Ae,ut]}),e[160]=Ae,e[161]=ut,e[162]=ft):ft=e[162];let mt;e[163]!==a||e[164]!==c||e[165]!==i?(mt=a&&c?s.jsx(Ne,{variant:"ghost",size:"icon","aria-label":i("taskBoard.taskDialog.deleteTaskAriaLabel"),className:"size-10 text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(tn,{size:16})}):s.jsx("span",{}),e[163]=a,e[164]=c,e[165]=i,e[166]=mt):mt=e[166];let gt;e[167]!==a||e[168]!==m||e[169]!==i?(gt=a&&m&&s.jsxs(Ne,{variant:"outline",size:"sm",onClick:m,children:[s.jsx(sn,{size:16}),i("taskBoard.taskDialog.newChatButton")]}),e[167]=a,e[168]=m,e[169]=i,e[170]=gt):gt=e[170];let xt;e[171]!==g||e[172]!==x?(xt=!x.trim()||g,e[171]=g,e[172]=x,e[173]=xt):xt=e[173];let _t;e[174]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(ss,{size:16}),e[174]=_t):_t=e[174];let pt;e[175]!==a||e[176]!==i?(pt=i(a?"taskBoard.taskDialog.saveButton":"taskBoard.taskDialog.createTaskButton"),e[175]=a,e[176]=i,e[177]=pt):pt=e[177];let ht;e[178]!==J||e[179]!==xt||e[180]!==pt?(ht=s.jsxs(Ne,{size:"sm",disabled:xt,onClick:J,children:[_t,pt]}),e[178]=J,e[179]=xt,e[180]=pt,e[181]=ht):ht=e[181];let yt;e[182]!==gt||e[183]!==ht?(yt=s.jsxs("div",{className:"flex items-center gap-2",children:[gt,ht]}),e[182]=gt,e[183]=ht,e[184]=yt):yt=e[184];let bt;e[185]!==mt||e[186]!==yt?(bt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[mt,yt]}),e[185]=mt,e[186]=yt,e[187]=bt):bt=e[187];let jt;e[188]!==q||e[189]!==Z||e[190]!==oe||e[191]!==ft||e[192]!==bt?(jt=s.jsxs(q,{className:je,closeButtonClassName:ke,children:[Z,oe,ft,bt]}),e[188]=q,e[189]=Z,e[190]=oe,e[191]=ft,e[192]=bt,e[193]=jt):jt=e[193];let It;return e[194]!==ne||e[195]!==n||e[196]!==z||e[197]!==jt?(It=s.jsx(ne,{open:n,onOpenChange:z,children:jt}),e[194]=ne,e[195]=n,e[196]=z,e[197]=jt,e[198]=It):It=e[198],It}function Sa(t){t.key==="Enter"&&t.preventDefault()}function Da(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function wa(t){const e=L.c(17),{thread:n,startedBy:o,onOpen:a}=t,l=se();let r;if(e[0]!==a||e[1]!==o||e[2]!==l||e[3]!==n){const c={failed:{label:l("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:nn},requires_action:{label:l("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:Ns},in_progress:{label:l("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:ts,spin:!0},completed:{label:l("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:rs},expired:{label:l("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Cs}},d=n.status?c[n.status]:null,m=n.lastMessage;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Me,{size:16}),e[5]=g):g=e[5];let i;e[6]!==l||e[7]!==n.title?(i=n.title||l("taskBoard.taskDialog.superAgentDefaultName"),e[6]=l,e[7]=n.title,e[8]=i):i=e[8];let f;e[9]!==i?(f=s.jsx("span",{className:"truncate text-sm text-foreground",children:i}),e[9]=i,e[10]=f):f=e[10];let u;e[11]!==o||e[12]!==l?(u=o&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:l("taskBoard.taskDialog.startedByLabel")}),s.jsx(Re,{url:o.user?.image??void 0,fallback:ze(o.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:o.user?.name??l("taskBoard.taskDialog.someoneLabel")})]}),e[11]=o,e[12]=l,e[13]=u):u=e[13];let h;e[14]!==f||e[15]!==u?(h=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[g,f,u]}),e[14]=f,e[15]=u,e[16]=h):h=e[16],r=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[h,d&&s.jsxs("button",{type:"button",disabled:!a,onClick:()=>a?.(n),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:Y("flex items-center gap-1.5",d.className),children:[s.jsx(d.icon,{size:16,className:Y(d.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:d.label})]}),m&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:m}),a&&s.jsx(Rn,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]})]}),e[0]=a,e[1]=o,e[2]=l,e[3]=n,e[4]=r}else r=e[4];return r}function Ca(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:an}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Tt}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Tt}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Tt}}function _a(t){const e=L.c(39),{pr:n}=t,o=se();let a,l,r,c,d,m,g,i;if(e[0]!==n||e[1]!==o){l=Ca(n,o);let j;e[10]!==n.body?(j=n.body?.trim(),e[10]=n.body,e[11]=j):j=e[11],a=j,d=n.url,m="_blank",g="noreferrer",i="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",c="flex items-center gap-2",r=Y("flex items-center gap-1.5",l.className),e[0]=n,e[1]=o,e[2]=a,e[3]=l,e[4]=r,e[5]=c,e[6]=d,e[7]=m,e[8]=g,e[9]=i}else a=e[2],l=e[3],r=e[4],c=e[5],d=e[6],m=e[7],g=e[8],i=e[9];let f;e[12]!==l.icon?(f=s.jsx(l.icon,{size:16}),e[12]=l.icon,e[13]=f):f=e[13];let u;e[14]!==l.label?(u=s.jsx("span",{className:"text-sm",children:l.label}),e[14]=l.label,e[15]=u):u=e[15];let h;e[16]!==r||e[17]!==f||e[18]!==u?(h=s.jsxs("span",{className:r,children:[f,u]}),e[16]=r,e[17]=f,e[18]=u,e[19]=h):h=e[19];const b=n.title??`${n.repoOwner}/${n.repoName}`;let x;e[20]!==b?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[20]=b,e[21]=x):x=e[21];let y;e[22]!==n.number?(y=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",n.number]}),e[22]=n.number,e[23]=y):y=e[23];let p;e[24]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Pn,{size:16,className:"shrink-0 text-muted-foreground"}),e[24]=p):p=e[24];let k;e[25]!==x||e[26]!==y||e[27]!==c||e[28]!==h?(k=s.jsxs("span",{className:c,children:[h,x,y,p]}),e[25]=x,e[26]=y,e[27]=c,e[28]=h,e[29]=k):k=e[29];let v;e[30]!==a?(v=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[30]=a,e[31]=v):v=e[31];let S;return e[32]!==k||e[33]!==v||e[34]!==d||e[35]!==m||e[36]!==g||e[37]!==i?(S=s.jsxs("a",{href:d,target:m,rel:g,className:i,children:[k,v]}),e[32]=k,e[33]=v,e[34]=d,e[35]=m,e[36]=g,e[37]=i,e[38]=S):S=e[38],S}function Ia(t){const e=L.c(11),{itemId:n}=t,o=se(),{data:a,isLoading:l}=ja(n);if(!l&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Tt,{size:16,className:"text-muted-foreground"}),e[0]=r):r=e[0];let c;e[1]!==o?(c=o("taskBoard.taskDialog.pullRequestsLabel"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==c?(d=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[r,s.jsx("span",{className:"text-sm text-foreground",children:c})]}),e[3]=c,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==o?(m=a?a.map(Ba):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(ts,{size:16,className:"animate-spin"}),s.jsx("span",{children:o("taskBoard.taskDialog.loadingLabel")})]}),e[5]=a,e[6]=o,e[7]=m):m=e[7];let g;return e[8]!==d||e[9]!==m?(g=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[d,m]}),e[8]=d,e[9]=m,e[10]=g):g=e[10],g}function Ba(t){return s.jsx(_a,{pr:t},t.url)}function Ta(t,e=[]){const n=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
3
-
4
- `)];if(e.length>0){const o=e.map(a=>{const l=a.merged?"merged":a.state??(a.draft?"draft":"open"),r=a.title?.trim()||`${a.repoOwner}/${a.repoName}`;return`- #${a.number} ${r} [${l}] ${a.url}`});n.push(["## Linked pull requests",...o].join(`
5
- `))}if(t.threads.length>0){const o=t.threads.map(a=>{const l=a.title?.trim()||"Untitled chat";return a.status?`- ${l} [${a.status}]`:`- ${l}`});n.push(["## Other chats on this task",...o].join(`
6
- `))}return n.join(`
7
-
8
- `)}const Jt="__unassigned__",Pt={assignee:null,priority:null,due:null};function Ea(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Aa(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const $a=864e5;function Oa(t,e){const n=new Date(t),o=new Date(e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function za(t,e){if(e.assignee!==null){if(e.assignee===Jt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const n=new Date(t.dueDate).getTime(),o=Date.now();if(e.due==="overdue"&&n>=o||e.due==="today"&&!Oa(n,o)||e.due==="week"&&(n<o||n>o+7*$a))return!1}return!0}const xs={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function qt(t,e=!1){return Y("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ra(t){const e=L.c(95),{value:n,members:o,onChange:a,block:l}=t,r=se(),[c,d]=B.useState(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ht,{size:14,className:"shrink-0"}),e[0]=m):m=e[0];let g=m,i;e[1]!==r?(i=r("taskBoard.taskFilters.assigneeLabel"),e[1]=r,e[2]=i):i=e[2];let f=i;if(n===Jt){let z;e[3]!==r?(z=r("taskBoard.taskFilters.assigneeUnassigned"),e[3]=r,e[4]=z):z=e[4],f=z}else if(n===Qe){let z;e[5]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Me,{size:14}),e[5]=z):z=e[5],g=z;let q;e[6]!==r?(q=r("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=r,e[7]=q):q=e[7],f=q}else if(n){let z,q,je,ke;if(e[8]!==o||e[9]!==n){let ee;e[14]!==n?(ee=re=>re.userId===n,e[14]=n,e[15]=ee):ee=e[15],q=o.find(ee),z=Re,je=q?.user?.image??void 0,ke=ze(q?.user?.name),e[8]=o,e[9]=n,e[10]=z,e[11]=q,e[12]=je,e[13]=ke}else z=e[10],q=e[11],je=e[12],ke=e[13];let ae;e[16]!==z||e[17]!==je||e[18]!==ke?(ae=s.jsx(z,{url:je,fallback:ke,shape:"circle",size:"2xs"}),e[16]=z,e[17]=je,e[18]=ke,e[19]=ae):ae=e[19],g=ae;let Z;e[20]!==q?.user?.name||e[21]!==r?(Z=q?.user?.name??r("taskBoard.taskFilters.assigneeMember"),e[20]=q?.user?.name,e[21]=r,e[22]=Z):Z=e[22],f=Z}let u;e[23]!==a?(u=z=>{a(z),d(!1)},e[23]=a,e[24]=u):u=e[24];const h=u,b=n!==null;let x;e[25]!==l||e[26]!==b?(x=qt(b,l),e[25]=l,e[26]=b,e[27]=x):x=e[27];const y=x,p=l&&"ml-auto";let k;e[28]!==p?(k=Y("shrink-0 opacity-60",p),e[28]=p,e[29]=k):k=e[29];const v=k;let S;e[30]!==f?(S=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[30]=f,e[31]=S):S=e[31];let j;e[32]!==v?(j=s.jsx(os,{size:12,className:v}),e[32]=v,e[33]=j):j=e[33];let N;e[34]!==g||e[35]!==S||e[36]!==j||e[37]!==y?(N=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:y,children:[g,S,j]})}),e[34]=g,e[35]=S,e[36]=j,e[37]=y,e[38]=N):N=e[38];let D;e[39]!==r?(D=r("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=r,e[40]=D):D=e[40];let C;e[41]!==D?(C=s.jsx(_s,{placeholder:D,className:"h-9"}),e[41]=D,e[42]=C):C=e[42];let _;e[43]!==r?(_=r("taskBoard.taskFilters.assigneeNoMembersFound"),e[43]=r,e[44]=_):_=e[44];let I;e[45]!==_?(I=s.jsx(Is,{children:_}),e[45]=_,e[46]=I):I=e[46];let T;e[47]!==h?(T=()=>h(null),e[47]=h,e[48]=T):T=e[48];let A;e[49]!==r?(A=r("taskBoard.taskFilters.assigneeAnyone"),e[49]=r,e[50]=A):A=e[50];let K;e[51]!==T||e[52]!==A?(K=s.jsx(Ge,{value:"Anyone",onSelect:T,children:A}),e[51]=T,e[52]=A,e[53]=K):K=e[53];let U;e[54]!==h?(U=()=>h(Jt),e[54]=h,e[55]=U):U=e[55];let w;e[56]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),e[56]=w):w=e[56];let E;e[57]!==r?(E=r("taskBoard.taskFilters.assigneeUnassigned"),e[57]=r,e[58]=E):E=e[58];let $;e[59]!==U||e[60]!==E?($=s.jsxs(Ge,{value:"Unassigned",onSelect:U,className:"gap-2",children:[w,E]}),e[59]=U,e[60]=E,e[61]=$):$=e[61];let V;e[62]!==h?(V=()=>h(Qe),e[62]=h,e[63]=V):V=e[63];let W;e[64]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Me,{size:16}),e[64]=W):W=e[64];let R;e[65]!==r?(R=r("taskBoard.taskFilters.assigneeSuperAgent"),e[65]=r,e[66]=R):R=e[66];let X;e[67]!==V||e[68]!==R?(X=s.jsxs(Ge,{value:"Super Agent",onSelect:V,className:"gap-2",children:[W,R]}),e[67]=V,e[68]=R,e[69]=X):X=e[69];let J;e[70]!==K||e[71]!==$||e[72]!==X?(J=s.jsxs(Ft,{children:[K,$,X]}),e[70]=K,e[71]=$,e[72]=X,e[73]=J):J=e[73];let F;e[74]!==r?(F=r("taskBoard.taskFilters.assigneeGroupMembers"),e[74]=r,e[75]=F):F=e[75];let P;if(e[76]!==o||e[77]!==h){let z;e[79]!==h?(z=q=>s.jsxs(Ge,{value:q.user?.name??q.userId,onSelect:()=>h(q.userId),className:"gap-2",children:[s.jsx(Re,{url:q.user?.image??void 0,fallback:ze(q.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:q.user?.name??q.userId})]},q.userId),e[79]=h,e[80]=z):z=e[80],P=o.map(z),e[76]=o,e[77]=h,e[78]=P}else P=e[78];let H;e[81]!==F||e[82]!==P?(H=s.jsx(Ft,{heading:F,children:P}),e[81]=F,e[82]=P,e[83]=H):H=e[83];let G;e[84]!==I||e[85]!==J||e[86]!==H?(G=s.jsxs(Ts,{children:[I,J,H]}),e[84]=I,e[85]=J,e[86]=H,e[87]=G):G=e[87];let te;e[88]!==C||e[89]!==G?(te=s.jsx($t,{align:"start",className:"w-56 p-0",children:s.jsxs(Bs,{children:[C,G]})}),e[88]=C,e[89]=G,e[90]=te):te=e[90];let ne;return e[91]!==c||e[92]!==N||e[93]!==te?(ne=s.jsxs(At,{open:c,onOpenChange:d,children:[N,te]}),e[91]=c,e[92]=N,e[93]=te,e[94]=ne):ne=e[94],ne}function Fa(t){const e=L.c(33),{value:n,onChange:o,block:a}=t,l=se(),r=n!==null;let c;e[0]!==a||e[1]!==r?(c=qt(r,a),e[0]=a,e[1]=r,e[2]=c):c=e[2];const d=c,m=a&&"ml-auto";let g;e[3]!==m?(g=Y("shrink-0 opacity-60",m),e[3]=m,e[4]=g):g=e[4];const i=g;let f;e[5]!==n?(f=n?s.jsx("span",{className:Y("size-2 shrink-0 rounded-full",Oe[n].dotClassName)}):s.jsx(Qn,{size:14,className:"shrink-0"}),e[5]=n,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==n?(u=l(n?Oe[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=u):u=e[9];let h;e[10]!==i?(h=s.jsx(os,{size:12,className:i}),e[10]=i,e[11]=h):h=e[11];let b;e[12]!==f||e[13]!==u||e[14]!==h||e[15]!==d?(b=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,children:[f,u,h]})}),e[12]=f,e[13]=u,e[14]=h,e[15]=d,e[16]=b):b=e[16];let x;e[17]!==o?(x=()=>o(null),e[17]=o,e[18]=x):x=e[18];let y;e[19]!==l?(y=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=y):y=e[20];let p;e[21]!==y||e[22]!==x?(p=s.jsx(vt,{onSelect:x,children:y}),e[21]=y,e[22]=x,e[23]=p):p=e[23];let k;e[24]!==o||e[25]!==l?(k=Os.map(j=>s.jsxs(vt,{onSelect:()=>o(j),className:"gap-2",children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[j].dotClassName)}),l(Oe[j].labelKey)]},j)),e[24]=o,e[25]=l,e[26]=k):k=e[26];let v;e[27]!==p||e[28]!==k?(v=s.jsxs(zt,{align:"start",className:"w-40",children:[p,k]}),e[27]=p,e[28]=k,e[29]=v):v=e[29];let S;return e[30]!==v||e[31]!==b?(S=s.jsxs(Rt,{children:[b,v]}),e[30]=v,e[31]=b,e[32]=S):S=e[32],S}function Pa(t){const e=L.c(35),{value:n,onChange:o,block:a}=t,l=se();let r;e[0]!==l||e[1]!==n?(r=n?l(xs[n]):void 0,e[0]=l,e[1]=n,e[2]=r):r=e[2];const c=r,d=n!==null;let m;e[3]!==a||e[4]!==d?(m=qt(d,a),e[3]=a,e[4]=d,e[5]=m):m=e[5];const g=m,i=a&&"ml-auto";let f;e[6]!==i?(f=Y("shrink-0 opacity-60",i),e[6]=i,e[7]=f):f=e[7];const u=f;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(wt,{size:14,className:"shrink-0"}),e[8]=h):h=e[8];let b;e[9]!==c||e[10]!==l?(b=c??l("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=l,e[11]=b):b=e[11];let x;e[12]!==u?(x=s.jsx(os,{size:12,className:u}),e[12]=u,e[13]=x):x=e[13];let y;e[14]!==b||e[15]!==x||e[16]!==g?(y=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[h,b,x]})}),e[14]=b,e[15]=x,e[16]=g,e[17]=y):y=e[17];let p;e[18]!==o?(p=()=>o(null),e[18]=o,e[19]=p):p=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(wt,{size:16,className:"text-muted-foreground"}),e[20]=k):k=e[20];let v;e[21]!==l?(v=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=v):v=e[22];let S;e[23]!==p||e[24]!==v?(S=s.jsxs(vt,{onSelect:p,className:"gap-2",children:[k,v]}),e[23]=p,e[24]=v,e[25]=S):S=e[25];let j;e[26]!==o||e[27]!==l?(j=Object.entries(xs).map(C=>{const[_,I]=C,T=_==="overdue";return s.jsxs(vt,{onSelect:()=>o(_),className:Y("gap-2",T&&"text-destructive"),children:[s.jsx(wt,{size:16,className:Y("shrink-0",T?"text-destructive":"text-muted-foreground")}),l(I)]},_)}),e[26]=o,e[27]=l,e[28]=j):j=e[28];let N;e[29]!==S||e[30]!==j?(N=s.jsxs(zt,{align:"start",className:"w-44",children:[S,j]}),e[29]=S,e[30]=j,e[31]=N):N=e[31];let D;return e[32]!==N||e[33]!==y?(D=s.jsxs(Rt,{children:[y,N]}),e[32]=N,e[33]=y,e[34]=D):D=e[34],D}function Rs(t){const e=L.c(26),{filters:n,members:o,onChange:a,block:l}=t;let r;e[0]!==n||e[1]!==a?(r=u=>a({...n,assignee:u}),e[0]=n,e[1]=a,e[2]=r):r=e[2];let c;e[3]!==l||e[4]!==n.assignee||e[5]!==o||e[6]!==r?(c=s.jsx(Ra,{block:l,value:n.assignee,members:o,onChange:r}),e[3]=l,e[4]=n.assignee,e[5]=o,e[6]=r,e[7]=c):c=e[7];let d;e[8]!==n||e[9]!==a?(d=u=>a({...n,priority:u}),e[8]=n,e[9]=a,e[10]=d):d=e[10];let m;e[11]!==l||e[12]!==n.priority||e[13]!==d?(m=s.jsx(Fa,{block:l,value:n.priority,onChange:d}),e[11]=l,e[12]=n.priority,e[13]=d,e[14]=m):m=e[14];let g;e[15]!==n||e[16]!==a?(g=u=>a({...n,due:u}),e[15]=n,e[16]=a,e[17]=g):g=e[17];let i;e[18]!==l||e[19]!==n.due||e[20]!==g?(i=s.jsx(Pa,{block:l,value:n.due,onChange:g}),e[18]=l,e[19]=n.due,e[20]=g,e[21]=i):i=e[21];let f;return e[22]!==c||e[23]!==m||e[24]!==i?(f=s.jsxs(s.Fragment,{children:[c,m,i]}),e[22]=c,e[23]=m,e[24]=i,e[25]=f):f=e[25],f}function La(t){const e=L.c(12),{filters:n,members:o,onChange:a}=t,l=se();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Es,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let c;e[1]!==n||e[2]!==o||e[3]!==a?(c=s.jsx(Rs,{filters:n,members:o,onChange:a}),e[1]=n,e[2]=o,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==a||e[7]!==l?(d=Ea(n)&&s.jsx("button",{type:"button",onClick:()=>a(Pt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[5]=n,e[6]=a,e[7]=l,e[8]=d):d=e[8];let m;return e[9]!==c||e[10]!==d?(m=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,c,d]}),e[9]=c,e[10]=d,e[11]=m):m=e[11],m}function qa(t){const e=L.c(38),{filters:n,members:o,onChange:a}=t,l=se(),[r,c]=B.useState(!1),d=Aa(n),m=d>0;let g;e[0]!==m?(g=qt(m),e[0]=m,e[1]=g):g=e[1];const i=g;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Es,{size:14,className:"shrink-0"}),e[2]=f):f=e[2];let u;e[3]!==l?(u=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=u):u=e[4];let h;e[5]!==d?(h=d>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:d}),e[5]=d,e[6]=h):h=e[6];let b;e[7]!==u||e[8]!==h||e[9]!==i?(b=s.jsx(Ln,{asChild:!0,children:s.jsxs("button",{type:"button",className:i,children:[f,u,h]})}),e[7]=u,e[8]=h,e[9]=i,e[10]=b):b=e[10];let x;e[11]!==l?(x=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=x):x=e[12];let y;e[13]!==x?(y=s.jsx(qn,{className:"px-4 pt-4 text-base font-medium text-foreground",children:x}),e[13]=x,e[14]=y):y=e[14];let p;e[15]!==n||e[16]!==o||e[17]!==a?(p=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Rs,{block:!0,filters:n,members:o,onChange:a})}),e[15]=n,e[16]=o,e[17]=a,e[18]=p):p=e[18];let k;e[19]!==d||e[20]!==a||e[21]!==l?(k=d>0&&s.jsx(Ne,{variant:"outline",className:"flex-1",onClick:()=>a(Pt),children:l("taskBoard.taskFilters.clearAllButton")}),e[19]=d,e[20]=a,e[21]=l,e[22]=k):k=e[22];let v;e[23]!==l?(v=l("taskBoard.taskFilters.doneButton"),e[23]=l,e[24]=v):v=e[24];let S;e[25]!==v?(S=s.jsx(Mn,{asChild:!0,children:s.jsx(Ne,{className:"flex-1",children:v})}),e[25]=v,e[26]=S):S=e[26];let j;e[27]!==k||e[28]!==S?(j=s.jsxs(Kn,{className:"flex-row gap-2",children:[k,S]}),e[27]=k,e[28]=S,e[29]=j):j=e[29];let N;e[30]!==j||e[31]!==y||e[32]!==p?(N=s.jsxs(Un,{className:"p-0",children:[y,p,j]}),e[30]=j,e[31]=y,e[32]=p,e[33]=N):N=e[33];let D;return e[34]!==r||e[35]!==N||e[36]!==b?(D=s.jsxs(Gn,{open:r,onOpenChange:c,direction:"bottom",children:[b,N]}),e[34]=r,e[35]=N,e[36]=b,e[37]=D):D=e[37],D}const ps=380,Ma=90,hs=5,Ka="cubic-bezier(0.22, 0.61, 0.36, 1)",Ua=8;function Ga(t,e){const n=B.useRef(new Map);B.useLayoutEffect(()=>{const o=t.current;if(!o)return;const a=o.querySelectorAll("[data-flip-id]"),l=n.current,r=new Map,c=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const f of a){const u=f.dataset.flipId;if(!u)continue;const h=f.getBoundingClientRect();r.set(u,h);const b=l.get(u);if(!b)continue;const x=b.left-h.left,y=b.top-h.top;(x||y)&&d.push({el:f,dx:x,dy:y,lane:Math.abs(x)>Ua})}if(n.current=r,c||d.length===0)return;for(const f of d){const u=f.lane?` rotate(${f.dx>0?hs:-hs}deg)`:"";f.el.style.transition="none",f.el.style.transform=`translate(${f.dx}px, ${f.dy}px)${u}`,f.lane&&(f.el.style.zIndex="10")}let m=0;const g=[],i=requestAnimationFrame(()=>{for(const f of d){const u=f.lane?m++*Ma:0;f.el.style.transition=`transform ${ps}ms ${Ka} ${u}ms`,f.el.style.transform="",g.push(window.setTimeout(()=>{f.el.style.transition="",f.el.style.transform="",f.el.style.zIndex=""},ps+u+30))}});return()=>{cancelAnimationFrame(i);for(const f of g)clearTimeout(f)}},[e,t])}const Qa="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover",Ya=["Todas as tarefas do diagnóstico, priorizadas no seu quadro","Um relatório recorrente do seu site, sempre atualizado","O agente resolve cada tarefa e deixa pronta para a sua revisão"],ys={price:"R$ 99",anchor:"R$ 499"};function Va(t){const e=L.c(5),{onOpen:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-success/10",children:s.jsx(vs,{size:16,className:"text-success"})}),e[0]=o):o=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[o,s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Seu plano de ação está a um clique"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Desbloqueie o diagnóstico completo e as tarefas entram aqui, da maior prioridade para a menor."})]})]}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(As,{size:16}),e[2]=l):l=e[2];let r;return e[3]!==n?(r=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-card p-4 card-shadow sm:flex-row sm:items-center sm:gap-4",children:[a,s.jsxs(Ne,{size:"sm",onClick:n,className:"w-full gap-2 sm:w-auto sm:shrink-0",children:["Desbloquear diagnóstico",l]})]}),e[3]=n,e[4]=r):r=e[4],r}function Ha({open:t,onOpenChange:e,cdClient:n,onExpired:o}){const[a,l]=B.useState(!1),r=async()=>{if(!n){o();return}l(!0);try{const c=await n.callTool({name:"start_checkout",arguments:{}}),{url:d}=Wt(c);if(new URL(d).protocol!=="https:")throw new Error("unsafe checkout url");window.open(d,"_blank","noopener,noreferrer"),e(!1)}catch{o()}finally{l(!1)}};return s.jsx(as,{open:t,onOpenChange:e,children:s.jsxs(ns,{className:"gap-0 p-3 sm:max-w-[500px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[s.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:s.jsx("img",{src:Qa,alt:"Prévia do seu quadro de tarefas desbloqueado",className:"h-[208px] w-full object-cover object-left-top"})}),s.jsxs("div",{className:"flex flex-col gap-7 px-3 pb-3 pt-7",children:[s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ls,{className:"text-xl font-semibold text-foreground",children:"Desbloqueie seu plano de trabalho"}),s.jsx("ul",{className:"flex flex-col gap-3.5",children:Ya.map(c=>s.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[s.jsx(rs,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),s.jsx("span",{className:"leading-snug text-foreground",children:c})]},c))})]}),s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("span",{className:"text-2xl font-semibold text-foreground",children:ys.price}),s.jsx("span",{className:"text-sm text-muted-foreground line-through",children:ys.anchor})]}),s.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[s.jsx(Ne,{variant:"ghost",onClick:()=>e(!1),disabled:a,className:"order-2 w-full sm:order-none sm:w-auto",children:"Explorar"}),s.jsxs(Ne,{onClick:r,disabled:a,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[a?s.jsx(es,{size:16,className:"animate-spin"}):null,"Desbloquear diagnóstico",!a&&s.jsx(As,{size:16})]})]})]})]})]})})}function Yt(t){return`board-paywall-seen:${t}`}function Wa(){const t=L.c(26),{org:e}=Ye(),n=js(),{diagnostic:o,cdClient:a,connectionId:l}=ua();let r;t[0]!==e.id?(r=()=>({orgId:e.id,open:!sessionStorage.getItem(Yt(e.id))}),t[0]=e.id,t[1]=r):r=t[1];const[c,d]=B.useState(r);let m;t[2]!==c.open||t[3]!==c.orgId||t[4]!==e.id?(m=c.orgId===e.id?c.open:!sessionStorage.getItem(Yt(e.id)),t[2]=c.open,t[3]=c.orgId,t[4]=e.id,t[5]=m):m=t[5];const g=m;if(!o?.locked)return null;let i;t[6]!==e.id?(i=v=>d({orgId:e.id,open:v}),t[6]=e.id,t[7]=i):i=t[7];const f=i;let u;t[8]!==e.id||t[9]!==f?(u=v=>{f(v),v||sessionStorage.setItem(Yt(e.id),"1")},t[8]=e.id,t[9]=f,t[10]=u):u=t[10];const h=u;let b;t[11]!==l||t[12]!==n||t[13]!==e?(b=()=>{ds("board_paywall_report_opened",{organization_id:e.id}),n(ma(e,l))},t[11]=l,t[12]=n,t[13]=e,t[14]=b):b=t[14];const x=b;let y;t[15]!==e.id||t[16]!==f?(y=s.jsx(Va,{onOpen:()=>{ds("board_paywall_banner_clicked",{organization_id:e.id}),f(!0)}}),t[15]=e.id,t[16]=f,t[17]=y):y=t[17];let p;t[18]!==a||t[19]!==h||t[20]!==g||t[21]!==x?(p=s.jsx(Ha,{open:g,onOpenChange:h,cdClient:a,onExpired:x}),t[18]=a,t[19]=h,t[20]=g,t[21]=x,t[22]=p):p=t[22];let k;return t[23]!==y||t[24]!==p?(k=s.jsxs(s.Fragment,{children:[y,p]}),t[23]=y,t[24]=p,t[25]=k):k=t[25],k}function Xa(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Xs,{fallback:null,children:s.jsx(Wa,{})}),t[0]=e):e=t[0],e}Zs(()=>import("./index-D2Mh9ro-.js").then(t=>t.b2),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).catch(()=>{});function Ja(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Ms,{})})})}),t[0]=e):e=t[0],e}const Za=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function el(t){const e=new Date(t),n=e.getTime()<Date.now();return{label:Za.format(e),overdue:n}}const cs="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function Fs(){const t=L.c(9),e=se();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=Y(cs,"border-warning/30 text-warning"),t[0]=n):n=t[0];let o;t[1]!==e?(o=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=o):o=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ns,{size:14}),t[3]=a):a=t[3];let l;t[4]!==e?(l=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=l):l=t[5];let r;return t[6]!==o||t[7]!==l?(r=s.jsxs("span",{className:n,title:o,children:[a,l]}),t[6]=o,t[7]=l,t[8]=r):r=t[8],r}function Ps(t){const e=L.c(10),{priority:n}=t,o=se(),a=Oe[n];let l;e[0]!==a.dotClassName?(l=Y("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=l):l=e[1];let r;e[2]!==l?(r=s.jsx("span",{className:l}),e[2]=l,e[3]=r):r=e[3];let c;e[4]!==a.labelKey||e[5]!==o?(c=o(a.labelKey),e[4]=a.labelKey,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==c?(d=s.jsxs("span",{className:cs,children:[r,c]}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d}function Ls(t){const e=L.c(7),{iso:n}=t;let o,a;if(e[0]!==n){const{label:c,overdue:d}=el(n);o=c,a=Y(cs,d&&"border-destructive/30 text-destructive"),e[0]=n,e[1]=o,e[2]=a}else o=e[1],a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(wt,{size:14}),e[3]=l):l=e[3];let r;return e[4]!==o||e[5]!==a?(r=s.jsxs("span",{className:a,children:[l,o]}),e[4]=o,e[5]=a,e[6]=r):r=e[6],r}function qs(t){const e=L.c(24),{item:n,assignee:o,assignedBy:a,members:l,onAssign:r}=t,c=se(),[d,m]=B.useState(!1);if(n.assigneeId===Qe){let b;e[0]!==a||e[1]!==c?(b=a?.user?.name?c("taskBoard.taskBoard.assignedToSuperAgentBy",{name:a.user.name}):c("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=a,e[1]=c,e[2]=b):b=e[2];let x;e[3]!==a?(x=a&&s.jsx(Re,{url:a.user?.image??void 0,fallback:ze(a.user?.name),shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[3]=a,e[4]=x):x=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Me,{size:20,className:"ring-2 ring-background"}),e[5]=y):y=e[5];let p;return e[6]!==b||e[7]!==x?(p=s.jsxs("span",{className:"inline-flex items-center",title:b,children:[x,y]}),e[6]=b,e[7]=x,e[8]=p):p=e[8],p}if(o){const b=o.user?.image??void 0,x=o.user?.name;let y;e[9]!==x?(y=ze(x),e[9]=x,e[10]=y):y=e[10];let p;return e[11]!==b||e[12]!==y?(p=s.jsx(Re,{url:b,fallback:y,shape:"circle",size:"xs"}),e[11]=b,e[12]=y,e[13]=p):p=e[13],p}if(!r||!l?.length)return null;let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=b=>{b.stopPropagation(),m(!0)},e[14]=g):g=e[14];let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Et,{asChild:!0,children:s.jsx("button",{type:"button",title:"Assign",onClick:g,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:s.jsx(ks,{size:13})})}),e[15]=i):i=e[15];let f;e[16]!==r?(f=b=>{r(b),m(!1)},e[16]=r,e[17]=f):f=e[17];let u;e[18]!==l||e[19]!==f?(u=s.jsx($t,{className:"w-56 p-0",align:"end",side:"bottom",onClick:tl,children:s.jsx(zs,{members:l,onSelect:f})}),e[18]=l,e[19]=f,e[20]=u):u=e[20];let h;return e[21]!==d||e[22]!==u?(h=s.jsxs(At,{open:d,onOpenChange:m,children:[i,u]}),e[21]=d,e[22]=u,e[23]=h):h=e[23],h}function tl(t){return t.stopPropagation()}function Ms(){const t=L.c(124),e=se(),{items:n,isLoading:o}=ha(),a=ya(),l=Hn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const c=bn(r);let d;t[1]!==c?(d=jn(c),t[1]=c,t[2]=d):d=t[2];const m=d.length>0,[g,i]=B.useState(!1),{data:f}=ws();let u,h;t[3]!==f?.data?.members?(u=f?.data?.members??[],h=new Map(u.map(al)),t[3]=f?.data?.members,t[4]=u,t[5]=h):(u=t[4],h=t[5]);const b=h,[x,y]=B.useState("board"),[p,k]=B.useState(Pt),[v,S]=B.useState(!1),[j,N]=B.useState(null),[D,C]=B.useState(null),{setTaskId:_}=Yn(),{create:I}=Vn(),T=Lt(),{org:A,locator:K}=Ye(),U=js();let w;t[6]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},t[6]=w):w=t[6];const{task:E}=Js(w);let $;t[7]!==E||t[8]!==n?($=E?n.find(M=>M.id===E)??null:null,t[7]=E,t[8]=n,t[9]=$):$=t[9];const V=$;let W;t[10]!==E||t[11]!==U||t[12]!==A?(W=()=>{E&&U({to:"/$org/board",params:{org:A.slug},search:{},replace:!0})},t[10]=E,t[11]=U,t[12]=A,t[13]=W):W=t[13];const R=W;let X;t[14]!==a||t[15]!==I||t[16]!==K||t[17]!==A||t[18]!==_||t[19]!==T?(X=async M=>{const ie=crypto.randomUUID(),le=fn(A.id).id,Ce=await T.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:M.id}).then(nl).catch(sl),ce=Ta(M,Ce),_e={type:"doc",content:[{type:"paragraph",content:[$n({id:M.id,name:M.title,char:"@",kind:"task",metadata:{title:M.title,description:M.description,context:ce}}),{type:"text",text:" "}]}]};Zn(sessionStorage,K,ie,_e),S(!1);try{await I({id:ie,virtual_mcp_id:le}),await a.link.mutateAsync({id:M.id,linkThreadId:ie})}catch{}_(ie,le)},t[14]=a,t[15]=I,t[16]=K,t[17]=A,t[18]=_,t[19]=T,t[20]=X):X=t[20];const J=X;let F,P,H,G,te,ne,z;if(t[21]!==a||t[22]!==R||t[23]!==V||t[24]!==v||t[25]!==j||t[26]!==p||t[27]!==m||t[28]!==o||t[29]!==n||t[30]!==x||t[31]!==b||t[32]!==u||t[33]!==l||t[34]!==e){te=Symbol.for("react.early_return_sentinel");e:{let M;t[42]!==p?(M=Q=>za(Q,p),t[42]=p,t[43]=M):M=t[43];const ie=n.filter(M);let le;t[44]===Symbol.for("react.memo_cache_sentinel")?(le=()=>{N(null),C(null),S(!0)},t[44]=le):le=t[44];const Ce=le;let ce;t[45]===Symbol.for("react.memo_cache_sentinel")?(ce=Q=>{N(null),C(Q),S(!0)},t[45]=ce):ce=t[45];const _e=ce;let Pe;t[46]===Symbol.for("react.memo_cache_sentinel")?(Pe=Q=>{N(Q),S(!0)},t[46]=Pe):Pe=t[46];const Ae=Pe;F=j??V,H=v||!!V;let Ve;if(t[47]!==R?(Ve=()=>{S(!1),N(null),C(null),R()},t[47]=R,t[48]=Ve):Ve=t[48],P=Ve,o&&n.length===0){let Q;t[49]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(es,{size:20,className:"animate-spin text-muted-foreground"})}),t[49]=Q):Q=t[49],te=Q;break e}ne="flex min-h-0 flex-1 flex-col";let de;t[50]!==e?(de=e("taskBoard.taskBoard.tasksTitle"),t[50]=e,t[51]=de):de=t[51];let ue;t[52]!==de?(ue=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:de}),t[52]=de,t[53]=ue):ue=t[53];let Le;t[54]!==l?(Le=l&&s.jsx(Xa,{}),t[54]=l,t[55]=Le):Le=t[55];let Ie;t[56]!==p||t[57]!==n.length||t[58]!==u?(Ie=n.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(qa,{filters:p,members:u,onChange:k})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(La,{filters:p,members:u,onChange:k})})]}),t[56]=p,t[57]=n.length,t[58]=u,t[59]=Ie):Ie=t[59];const Be=x==="list";let qe;t[60]===Symbol.for("react.memo_cache_sentinel")?(qe=()=>y("list"),t[60]=qe):qe=t[60];let fe;t[61]!==e?(fe=e("common.taskBoard.listView"),t[61]=e,t[62]=fe):fe=t[62];let me;t[63]!==Be||t[64]!==fe?(me=s.jsx(bs,{active:Be,onClick:qe,icon:rn,label:fe}),t[63]=Be,t[64]=fe,t[65]=me):me=t[65];const Te=x==="board";let De;t[66]===Symbol.for("react.memo_cache_sentinel")?(De=()=>y("board"),t[66]=De):De=t[66];let ge;t[67]!==e?(ge=e("common.taskBoard.boardView"),t[67]=e,t[68]=ge):ge=t[68];let Ee;t[69]!==Te||t[70]!==ge?(Ee=s.jsx(bs,{active:Te,onClick:De,icon:ln,label:ge}),t[69]=Te,t[70]=ge,t[71]=Ee):Ee=t[71];let xe;t[72]!==me||t[73]!==Ee?(xe=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[me,Ee]}),t[72]=me,t[73]=Ee,t[74]=xe):xe=t[74];let we;t[75]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(ss,{size:16}),t[75]=we):we=t[75];let pe;t[76]!==e?(pe=e("taskBoard.taskBoard.newTask"),t[76]=e,t[77]=pe):pe=t[77];let he;t[78]!==pe?(he=s.jsxs(Ne,{size:"sm",onClick:Ce,children:[we,pe]}),t[78]=pe,t[79]=he):he=t[79];let ye;t[80]!==xe||t[81]!==he?(ye=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[xe,he]}),t[80]=xe,t[81]=he,t[82]=ye):ye=t[82];let be;t[83]!==Ie||t[84]!==ye?(be=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Ie,ye]}),t[83]=Ie,t[84]=ye,t[85]=be):be=t[85],t[86]!==ue||t[87]!==Le||t[88]!==be?(z=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[ue,Le,be]}),t[86]=ue,t[87]=Le,t[88]=be,t[89]=z):z=t[89],G=n.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:e("taskBoard.taskBoard.noTasksYet")})}):ie.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:[e("taskBoard.taskBoard.noTasksMatch"),s.jsx(Ne,{variant:"outline",size:"sm",onClick:()=>k(Pt),children:e("taskBoard.taskBoard.clearFilters")})]})}):x==="board"?s.jsx(rl,{items:ie,members:u,memberByUserId:b,onOpen:Ae,onCreate:_e,onMove:(Q,Ue)=>a.update.mutate({id:Q,status:Ue}),onAssign:(Q,Ue)=>a.update.mutate({id:Q,assigneeId:Ue??void 0}),onAutoFix:l?Q=>{if(!m){i(!0);return}a.update.mutate({id:Q.id,assigneeId:Qe})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:ie.map(Q=>s.jsx(cl,{item:Q,assignee:Q.assigneeId?b.get(Q.assigneeId):void 0,assignedBy:Q.assignedBy?b.get(Q.assignedBy):void 0,onOpen:()=>Ae(Q)},Q.id))})})}t[21]=a,t[22]=R,t[23]=V,t[24]=v,t[25]=j,t[26]=p,t[27]=m,t[28]=o,t[29]=n,t[30]=x,t[31]=b,t[32]=u,t[33]=l,t[34]=e,t[35]=F,t[36]=P,t[37]=H,t[38]=G,t[39]=te,t[40]=ne,t[41]=z}else F=t[35],P=t[36],H=t[37],G=t[38],te=t[39],ne=t[40],z=t[41];if(te!==Symbol.for("react.early_return_sentinel"))return te;const q=H?F?.id??`new-${D??"default"}`:"closed",je=F??void 0,ke=D??void 0,ae=a.create.isPending||a.update.isPending;let Z;t[90]!==a.create||t[91]!==a.update||t[92]!==F||t[93]!==P?(Z=M=>{F?a.update.mutate({id:F.id,...M}):a.create.mutate(M),P()},t[90]=a.create,t[91]=a.update,t[92]=F,t[93]=P,t[94]=Z):Z=t[94];let ee;t[95]!==a.remove||t[96]!==F||t[97]!==P?(ee=F?()=>{a.remove.mutate(F.id),P()}:void 0,t[95]=a.remove,t[96]=F,t[97]=P,t[98]=ee):ee=t[98];let re;t[99]!==F||t[100]!==J?(re=F?()=>{J(F)}:void 0,t[99]=F,t[100]=J,t[101]=re):re=t[101];let oe;t[102]!==P||t[103]!==_?(oe=M=>{M.virtualMcpId&&(P(),_(M.threadId,M.virtualMcpId,{main:M.hasPreview?"preview":"board"}))},t[102]=P,t[103]=_,t[104]=oe):oe=t[104];let Fe;t[105]!==P||t[106]!==H||t[107]!==q||t[108]!==je||t[109]!==ke||t[110]!==ae||t[111]!==Z||t[112]!==ee||t[113]!==re||t[114]!==oe?(Fe=s.jsx(va,{open:H,onClose:P,item:je,defaultStatus:ke,isSaving:ae,onSubmit:Z,onDelete:ee,onNewChat:re,onOpenThread:oe},q),t[105]=P,t[106]=H,t[107]=q,t[108]=je,t[109]=ke,t[110]=ae,t[111]=Z,t[112]=ee,t[113]=re,t[114]=oe,t[115]=Fe):Fe=t[115];let ve;t[116]!==g?(ve=s.jsx(ll,{open:g,onOpenChange:i}),t[116]=g,t[117]=ve):ve=t[117];let Se;return t[118]!==G||t[119]!==Fe||t[120]!==ve||t[121]!==ne||t[122]!==z?(Se=s.jsxs("div",{className:ne,children:[z,G,Fe,ve]}),t[118]=G,t[119]=Fe,t[120]=ve,t[121]=ne,t[122]=z,t[123]=Se):Se=t[123],Se}function sl(){return[]}function nl(t){return t.prs}function al(t){return[t.userId,t]}function ll(t){const e=L.c(30),{open:n,onOpenChange:o}=t,a=se(),{connect:l,isConnecting:r}=ga("deco/mcp-github");let c;e[0]!==a?(c=a("taskBoard.taskBoard.connectGithubTitle"),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==c?(d=s.jsx(ls,{children:c}),e[2]=c,e[3]=d):d=e[3];let m;e[4]!==a?(m=a("taskBoard.taskBoard.connectGithubDescription"),e[4]=a,e[5]=m):m=e[5];let g;e[6]!==m?(g=s.jsx(xn,{children:m}),e[6]=m,e[7]=g):g=e[7];let i;e[8]!==d||e[9]!==g?(i=s.jsxs(pn,{children:[d,g]}),e[8]=d,e[9]=g,e[10]=i):i=e[10];let f;e[11]!==l||e[12]!==o?(f=async()=>{await l(),o(!1)},e[11]=l,e[12]=o,e[13]=f):f=e[13];let u;e[14]!==r?(u=r?s.jsx(es,{size:16,className:"animate-spin"}):s.jsx(gn,{className:"size-4"}),e[14]=r,e[15]=u):u=e[15];let h;e[16]!==a?(h=a("taskBoard.taskBoard.connectGithubButton"),e[16]=a,e[17]=h):h=e[17];let b;e[18]!==r||e[19]!==f||e[20]!==u||e[21]!==h?(b=s.jsx(hn,{children:s.jsxs(Ne,{onClick:f,disabled:r,className:"gap-2",children:[u,h]})}),e[18]=r,e[19]=f,e[20]=u,e[21]=h,e[22]=b):b=e[22];let x;e[23]!==i||e[24]!==b?(x=s.jsxs(ns,{className:"sm:max-w-md",children:[i,b]}),e[23]=i,e[24]=b,e[25]=x):x=e[25];let y;return e[26]!==o||e[27]!==n||e[28]!==x?(y=s.jsx(as,{open:n,onOpenChange:o,children:x}),e[26]=o,e[27]=n,e[28]=x,e[29]=y):y=e[29],y}function bs(t){const e=L.c(14),{active:n,onClick:o,icon:a,label:l}=t,r=se();let c;e[0]!==l||e[1]!==r?(c=r("taskBoard.taskBoard.layoutViewAriaLabel",{label:l}),e[0]=l,e[1]=r,e[2]=c):c=e[2];const d=n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let m;e[3]!==d?(m=Y("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",d),e[3]=d,e[4]=m):m=e[4];let g;e[5]!==a?(g=s.jsx(a,{size:14}),e[5]=a,e[6]=g):g=e[6];let i;return e[7]!==n||e[8]!==l||e[9]!==o||e[10]!==c||e[11]!==m||e[12]!==g?(i=s.jsxs("button",{type:"button",onClick:o,"aria-label":c,"aria-pressed":n,className:m,children:[g,l]}),e[7]=n,e[8]=l,e[9]=o,e[10]=c,e[11]=m,e[12]=g,e[13]=i):i=e[13],i}function rl(t){const e=L.c(15),{items:n,members:o,memberByUserId:a,onOpen:l,onCreate:r,onMove:c,onAutoFix:d,onAssign:m}=t,g=se(),[i,f]=B.useState(null),u=B.useRef(null);let h;e[0]!==n?(h=n.map(ol).join(","),e[0]=n,e[1]=h):h=e[1],Ga(u,h);let x;e[2]!==n||e[3]!==a||e[4]!==o||e[5]!==m||e[6]!==d||e[7]!==r||e[8]!==c||e[9]!==l||e[10]!==i||e[11]!==g?(x=$s.map(p=>{const k=n.filter(j=>j.status===p),v=$e[p],S=v.icon;return s.jsxs("div",{onDragOver:j=>{j.preventDefault(),f(p)},onDragLeave:j=>{j.currentTarget.contains(j.relatedTarget)||f(null)},onDrop:j=>{j.preventDefault();const N=j.dataTransfer.getData("text/plain");N&&c(N,p),f(null)},className:Y("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",i===p&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(S,{size:15,className:Y("shrink-0",v.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:g(v.labelKey)}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:k.length}),s.jsx("button",{type:"button","aria-label":g("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:g(v.labelKey)}),title:g("taskBoard.taskBoard.newTaskInLaneTitle",{lane:g(v.labelKey)}),onClick:()=>r(p),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(ss,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:k.map(j=>s.jsx(il,{item:j,assignee:j.assigneeId?a.get(j.assigneeId):void 0,assignedBy:j.assignedBy?a.get(j.assignedBy):void 0,members:o,onOpen:()=>l(j),onAutoFix:d?()=>d(j):void 0,onAssign:m?N=>m(j.id,N):void 0},j.id))})]},p)}),e[2]=n,e[3]=a,e[4]=o,e[5]=m,e[6]=d,e[7]=r,e[8]=c,e[9]=l,e[10]=i,e[11]=g,e[12]=x):x=e[12];let y;return e[13]!==x?(y=s.jsx("div",{ref:u,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:x})}),e[13]=x,e[14]=y):y=e[14],y}function ol(t){return`${t.id}:${t.status}`}function il(t){const e=L.c(36),{item:n,assignee:o,assignedBy:a,members:l,onOpen:r,onAutoFix:c,onAssign:d}=t,m=se(),g=$e[n.status],i=g.icon,f=ba(n)?.lastMessage,u=c&&(n.status==="triage"||n.status==="todo")&&n.assigneeId!==Qe,h=n.id;let b;e[0]!==n.id?(b=_=>{_.dataTransfer.setData("text/plain",n.id),_.dataTransfer.effectAllowed="move"},e[0]=n.id,e[1]=b):b=e[1];const x=n.title;let y;e[2]!==g.iconClassName?(y=Y("mt-px shrink-0",g.iconClassName),e[2]=g.iconClassName,e[3]=y):y=e[3];let p;e[4]!==i||e[5]!==y?(p=s.jsx(i,{size:16,className:y}),e[4]=i,e[5]=y,e[6]=p):p=e[6];let k;e[7]!==n.title?(k=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:n.title}),e[7]=n.title,e[8]=k):k=e[8];let v;e[9]!==a||e[10]!==o||e[11]!==n||e[12]!==l||e[13]!==d?(v=s.jsx(qs,{item:n,assignee:o,assignedBy:a,members:l,onAssign:d}),e[9]=a,e[10]=o,e[11]=n,e[12]=l,e[13]=d,e[14]=v):v=e[14];let S;e[15]!==p||e[16]!==k||e[17]!==v?(S=s.jsxs("div",{className:"flex items-start gap-2",children:[p,k,v]}),e[15]=p,e[16]=k,e[17]=v,e[18]=S):S=e[18];let j;e[19]!==f?(j=f&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:f}),e[19]=f,e[20]=j):j=e[20];let N;e[21]!==n?(N=(Xt(n)||n.priority!=="none"||!!n.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Xt(n)&&s.jsx(Fs,{}),n.priority!=="none"&&s.jsx(Ps,{priority:n.priority}),n.dueDate&&s.jsx(Ls,{iso:n.dueDate})]}),e[21]=n,e[22]=N):N=e[22];let D;e[23]!==c||e[24]!==u||e[25]!==m?(D=u&&s.jsxs("button",{type:"button",onClick:_=>{_.stopPropagation(),c()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(vs,{size:12}),m("taskBoard.taskBoard.autoFix")]}),e[23]=c,e[24]=u,e[25]=m,e[26]=D):D=e[26];let C;return e[27]!==n.id||e[28]!==n.title||e[29]!==r||e[30]!==N||e[31]!==D||e[32]!==b||e[33]!==S||e[34]!==j?(C=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":h,onDragStart:b,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[S,j,N,D]}),e[27]=n.id,e[28]=n.title,e[29]=r,e[30]=N,e[31]=D,e[32]=b,e[33]=S,e[34]=j,e[35]=C):C=e[35],C}function cl(t){const e=L.c(30),{item:n,assignee:o,assignedBy:a,onOpen:l}=t,r=$e[n.status],c=r.icon;let d;e[0]!==r.iconClassName?(d=Y("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let m;e[2]!==c||e[3]!==d?(m=s.jsx(c,{size:16,className:d}),e[2]=c,e[3]=d,e[4]=m):m=e[4];let g;e[5]!==n.title?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:n.title}),e[5]=n.title,e[6]=g):g=e[6];let i;e[7]!==n?(i=Xt(n)&&s.jsx(Fs,{}),e[7]=n,e[8]=i):i=e[8];let f;e[9]!==n.priority?(f=n.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ps,{priority:n.priority})}),e[9]=n.priority,e[10]=f):f=e[10];let u;e[11]!==n.dueDate?(u=n.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ls,{iso:n.dueDate})}),e[11]=n.dueDate,e[12]=u):u=e[12];let h;e[13]!==a||e[14]!==o||e[15]!==n?(h=s.jsx(qs,{item:n,assignee:o,assignedBy:a}),e[13]=a,e[14]=o,e[15]=n,e[16]=h):h=e[16];let b;e[17]!==n.createdAt?(b=wn(new Date(n.createdAt)),e[17]=n.createdAt,e[18]=b):b=e[18];let x;e[19]!==b?(x=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:b}),e[19]=b,e[20]=x):x=e[20];let y;return e[21]!==l||e[22]!==m||e[23]!==g||e[24]!==i||e[25]!==f||e[26]!==u||e[27]!==h||e[28]!==x?(y=s.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[m,g,i,f,u,h,x]}),e[21]=l,e[22]=m,e[23]=g,e[24]=i,e[25]=f,e[26]=u,e[27]=h,e[28]=x,e[29]=y):y=e[29],y}const ar=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:Ms,default:Ja},Symbol.toStringTag,{value:"Module"}));export{Zl as H,Oe as P,ra as S,va as T,oa as a,nr as b,tr as c,ua as d,ia as e,ma as f,ga as g,ha as h,Xn as i,ya as j,$e as k,Me as l,Ms as m,ar as n,er as r,sr as u,Zn as w};