decocms 4.514.5 → 4.514.6

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 (387) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-CDpScllU.js → ActiveShapeUtils-DV40gvcg.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-Ctbquk5a.js} +1 -1
  3. package/dist/client/assets/{AreaChart-Du66qHXY.js → AreaChart-C_4ebEom.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-DZ0mAFgb.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-bYg1aEOe.js} +1 -1
  6. package/dist/client/assets/{BarChart-BXz-bUtC.js → BarChart-DfTtCBDv.js} +1 -1
  7. package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BHIVlbfK.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-BZmgsxge.js → CartesianChart-uNdbRuTj.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CRSSpo7X.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-C2ndOEUO.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-DaUdbCWk.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-C8mqlnDX.js} +1 -1
  13. package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DC8f0fwU.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-P7j8oDkg.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-BvwGTDkC.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-KwnilJkg.js} +1 -1
  17. package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-D6C-ihBU.js} +1 -1
  18. package/dist/client/assets/{Image01-DowwsvYG.js → Image01-D7F4wuKx.js} +1 -1
  19. package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-u4HXXUPa.js} +1 -1
  20. package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-BoUupQbW.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-BJx0R97x.js} +1 -1
  22. package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-C1PMcNV0.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-D3VwU2ni.js} +1 -1
  24. package/dist/client/assets/{Play-c6bc1b3-.js → Play-DxsFk4r2.js} +1 -1
  25. package/dist/client/assets/{Plus-xabrshQG.js → Plus-BDveVGJf.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-BPq2MnBR.js → ReferenceLine-ILm1GG8J.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-Cuf45jFP.js} +1 -1
  28. package/dist/client/assets/{Sector-BraX9V6h.js → Sector-D2xOkxuc.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BMRnsG58.js} +1 -1
  30. package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-sKGpeIhM.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-CshMTQzi.js} +1 -1
  32. package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-BM29_KWq.js} +1 -1
  33. package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-D92WhXf2.js} +1 -1
  34. package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BSDy4f7m.js} +1 -1
  35. package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Cn3JqTjv.js} +1 -1
  36. package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-Drp4z0v0.js} +1 -1
  37. package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-Cxbx87gg.js} +1 -1
  38. package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-dOW_RI9u.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-BfQx-fBr.js} +1 -1
  40. package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-BjUA5Gw_.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-B0vtW1sl.js} +1 -1
  42. package/dist/client/assets/{agent-analytics-Biob4Jvo.js → agent-analytics-D74l8HWB.js} +1 -1
  43. package/dist/client/assets/agent-app-CEBVAZwO.js +1 -0
  44. package/dist/client/assets/{agent-assets-DpuZ7qUq.js → agent-assets-Bwo-LFkg.js} +1 -1
  45. package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-Cc45Az0m.js} +1 -1
  46. package/dist/client/assets/{agent-automations-CHJpber1.js → agent-automations-Du82D3qr.js} +1 -1
  47. package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-mK6fw0FS.js} +1 -1
  48. package/dist/client/assets/agent-deck-BZZHzjdZ.js +1 -0
  49. package/dist/client/assets/{agent-e2e-rlzvrptO.js → agent-e2e-D6ovLSkg.js} +1 -1
  50. package/dist/client/assets/{agent-experiments-BzSUejrS.js → agent-experiments-Bf1OqB1m.js} +1 -1
  51. package/dist/client/assets/agent-file-CzvpBEaK.js +1 -0
  52. package/dist/client/assets/{agent-hosting-CIblOaW0.js → agent-hosting-6te_9jdz.js} +1 -1
  53. package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-U4gZaLOQ.js} +1 -1
  54. package/dist/client/assets/agent-library-BOSIxUYz.js +1 -0
  55. package/dist/client/assets/agent-library-file-C0RqJ45T.js +1 -0
  56. package/dist/client/assets/{agent-monitor-CMU4bHqc.js → agent-monitor-C3Fta9kk.js} +1 -1
  57. package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-NPCMkyDB.js} +1 -1
  58. package/dist/client/assets/{agent-releases-CEAPMdCY.js → agent-releases-COSsnWfe.js} +1 -1
  59. package/dist/client/assets/agent-settings-DDIl5jyz.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-WHTbnkdB.js → agent-site-editor-DlN_1OE1.js} +1 -1
  61. package/dist/client/assets/agent-site-editor-code-ByOIwjcy.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-DSEuxkJh.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-pw2RBbYs.js +1 -0
  64. package/dist/client/assets/agent-view-IbmF6KBh.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-Bk4OTT2f.js} +1 -1
  66. package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-B_j46cpj.js} +1 -1
  67. package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-Cb4AWs2D.js} +1 -1
  68. package/dist/client/assets/{alert-J8Wo4iMe.js → alert-B29bfkXd.js} +1 -1
  69. package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-CKDHmJ-l.js} +1 -1
  70. package/dist/client/assets/{analytics-sections-Crtm-SOa.js → analytics-sections-wgH0NLyS.js} +1 -1
  71. package/dist/client/assets/api-keys-CiMyiLjo.js +1 -0
  72. package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Xjw7lgqR.js} +1 -1
  73. package/dist/client/assets/{app-editor-CWO6RLKf.js → app-editor-DgdEdwhZ.js} +1 -1
  74. package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-DrTFUoo_.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-CIV9IiTJ.js} +1 -1
  76. package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-ctrK7teX.js} +1 -1
  77. package/dist/client/assets/{auth-CJCUdDnK.js → auth-hgpoCSIS.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-DkyooQGo.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-jn1R1qId.js} +1 -1
  80. package/dist/client/assets/{automation-list-row-CO-7cr0O.js → automation-list-row-qFFhCtZo.js} +1 -1
  81. package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-C367-v6a.js} +1 -1
  82. package/dist/client/assets/{automations-DpOWGNx_.js → automations-8JKgpNEK.js} +1 -1
  83. package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-BZOm698U.js} +1 -1
  84. package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-RpIBVCkY.js} +1 -1
  85. package/dist/client/assets/{badge-ByzdbptS.js → badge-Cnnepvq1.js} +1 -1
  86. package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-baEM6UJG.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-Ca46yWEV.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-diUqUrAK.js → blocks-tab-states-jGeS9iVz.js} +3 -3
  89. package/dist/client/assets/{blog-schema-pXyj_uKN.js → blog-schema-CUOOV4a2.js} +1 -1
  90. package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-p2Fiyc0f.js} +1 -1
  91. package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-ClmcYJRa.js} +1 -1
  92. package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-DqVFnL9A.js} +1 -1
  93. package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-DdN4o47w.js} +1 -1
  94. package/dist/client/assets/{category-editor-16fFMZmU.js → category-editor-Gr46SDP4.js} +1 -1
  95. package/dist/client/assets/{chart-B6d33H1D.js → chart-B5vy2nis.js} +1 -1
  96. package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-_d3c57p1.js} +1 -1
  97. package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-CKcHhXuF.js} +1 -1
  98. package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-CUzk21sc.js} +1 -1
  99. package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-BFcNvSv4.js} +1 -1
  100. package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-BolfyrKO.js} +1 -1
  101. package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-50FpZDWK.js} +1 -1
  102. package/dist/client/assets/cms-settings-editor-CxJ3W3GB.js +1 -0
  103. package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-CeBZpglT.js} +1 -1
  104. package/dist/client/assets/{collection-detail-BVMX_w00.js → collection-detail-BXVqh2XU.js} +1 -1
  105. package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-El-xnsaW.js} +1 -1
  106. package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-gW4FCqmq.js} +1 -1
  107. package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-CB0t7kAl.js} +1 -1
  108. package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-DIFXv7hR.js} +1 -1
  109. package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-o-DlIK_-.js} +1 -1
  110. package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-DlpsfK7m.js} +1 -1
  111. package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-ZTZUbFgV.js} +1 -1
  112. package/dist/client/assets/{command-DQxPvzO0.js → command-C7n5qLsN.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-C2rDEgkL.js} +1 -1
  114. package/dist/client/assets/{config-0dQr8OOs.js → config-BCpfsSBB.js} +1 -1
  115. package/dist/client/assets/{connect-AQ7wxQDD.js → connect-Du_rXIM1.js} +1 -1
  116. package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DyGwITyt.js} +1 -1
  117. package/dist/client/assets/{connection-B5x-rxzp.js → connection-Dik4epzq.js} +1 -1
  118. package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DCnmTKpJ.js} +1 -1
  119. package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-CaTyUBlA.js} +1 -1
  120. package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-ta2yIvIb.js} +1 -1
  121. package/dist/client/assets/{connections-CrdtyJFL.js → connections-Dy2qa1bG.js} +1 -1
  122. package/dist/client/assets/{content-tab-CTbbT9Kp.js → content-tab-YH7YYY48.js} +3 -3
  123. package/dist/client/assets/{context-DwXA-O6V.js → context-3twD8BEv.js} +1 -1
  124. package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-BUZj1ZG7.js} +1 -1
  125. package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CWF9i3Vt.js} +3 -3
  126. package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-DNra8pgf.js} +1 -1
  127. package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-BkJvAp86.js} +1 -1
  128. package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DYjhyf3I.js} +1 -1
  129. package/dist/client/assets/{discover-JQgSyvWz.js → discover-nnC5Qnas.js} +1 -1
  130. package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-CpxFWOzU.js} +1 -1
  131. package/dist/client/assets/{drawer-CEiS53oX.js → drawer-ZlYTI3Z6.js} +1 -1
  132. package/dist/client/assets/{editor-DWhRi1_f.js → editor-BFHySd1K.js} +1 -1
  133. package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-DPi5BWR5.js} +1 -1
  134. package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-Bok1L2hc.js} +1 -1
  135. package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cu20Qj3-.js} +1 -1
  136. package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CNLani4P.js} +1 -1
  137. package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-dfnyrtcC.js} +1 -1
  138. package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-D-GfxA1X.js} +1 -1
  139. package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-DOlx1A5r.js} +1 -1
  140. package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-DSIiiWjA.js} +1 -1
  141. package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CB7fcIJI.js} +1 -1
  142. package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-DPqHd815.js} +1 -1
  143. package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-qexQSaYN.js} +1 -1
  144. package/dist/client/assets/{form-Bdh0vUeg.js → form-Dpwt-9St.js} +1 -1
  145. package/dist/client/assets/{general-Dvy5SU0P.js → general-DJuGMWNv.js} +1 -1
  146. package/dist/client/assets/{home-UtAOwZ_a.js → home-D9ErGwHG.js} +1 -1
  147. package/dist/client/assets/{hosted-publish-feedback-NabikYNC.js → hosted-publish-feedback-9IsLIhi6.js} +1 -1
  148. package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-CwrVRVUS.js} +1 -1
  149. package/dist/client/assets/{index-ILRCn1qM.js → index-2uBqLA9S.js} +1 -1
  150. package/dist/client/assets/{index-CxtzBp5_.js → index-BRzGXE32.js} +1 -1
  151. package/dist/client/assets/{index-DYLyKNcw.js → index-BWUABroT.js} +1 -1
  152. package/dist/client/assets/{index-De44zW_k.js → index-BpRXpcv4.js} +1 -1
  153. package/dist/client/assets/{index-WjQsIrkp.js → index-C9OgV5Vt.js} +1 -1
  154. package/dist/client/assets/{index-_y92DzgS.js → index-CJu3ft8V.js} +1 -1
  155. package/dist/client/assets/{index-DcU2uHG-.js → index-CaH7O3hJ.js} +2 -2
  156. package/dist/client/assets/{index-7svLQYvL.js → index-Cd_jqW-G.js} +1 -1
  157. package/dist/client/assets/{index-1XeDvVO_.js → index-DJM5MV7l.js} +1 -1
  158. package/dist/client/assets/{index-DxbCP5B6.js → index-DK4LlU65.js} +1 -1
  159. package/dist/client/assets/{index-CrgWXxvo.js → index-DLuP-oy3.js} +1 -1
  160. package/dist/client/assets/{index-DKOhwHAG.js → index-DPulqOQn.js} +1 -1
  161. package/dist/client/assets/{index-CXeJCI0G.js → index-DUXVtfV1.js} +1 -1
  162. package/dist/client/assets/{index-DincrG3Y.js → index-DzppA2EQ.js} +1 -1
  163. package/dist/client/assets/{index-6B342dVL.js → index-TNsA6rsO.js} +1 -1
  164. package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-CLzDU0fe.js} +1 -1
  165. package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-u-Zd7Oxq.js} +1 -1
  166. package/dist/client/assets/{infra-billing-kRHrP-RL.js → infra-billing-DkMlIjvS.js} +1 -1
  167. package/dist/client/assets/{input-pg_Munw1.js → input-D2sd1bar.js} +3 -3
  168. package/dist/client/assets/{input-HXHaYrka.js → input-DN6U5jAj.js} +1 -1
  169. package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-DCiBepJw.js} +1 -1
  170. package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-DoiJbCfx.js} +1 -1
  171. package/dist/client/assets/{label-DDPD5LQh.js → label-Cnc4HQwP.js} +1 -1
  172. package/dist/client/assets/{layout-DGYUOV2D.js → layout-BVW5q62A.js} +1 -1
  173. package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-DMfsC9-u.js} +1 -1
  174. package/dist/client/assets/{legacy-main-redirect-BdnJuiDi.js → legacy-main-redirect-mSx9JMxj.js} +1 -1
  175. package/dist/client/assets/library-BNARKbpY.js +1 -0
  176. package/dist/client/assets/{login-syjpZA32.js → login-CN9ueiIT.js} +1 -1
  177. package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-CA3yd3L6.js} +1 -1
  178. package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-Xaw0krD3.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-3Gakbc_U.js} +1 -1
  180. package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-CxgfM8zh.js} +1 -1
  181. package/dist/client/assets/{members-uR8n9Rms.js → members-54kLIghY.js} +1 -1
  182. package/dist/client/assets/{memory-BYqDBVHV.js → memory-CQX6dqQP.js} +1 -1
  183. package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-DCq4FNu-.js} +1 -1
  184. package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-CrlDKQvj.js} +3 -3
  185. package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-C7rmyhBT.js} +1 -1
  186. package/dist/client/assets/monitoring-DX0mWeP-.js +1 -0
  187. package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-Bhxzz0Gz.js} +1 -1
  188. package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-DtSzZ5RJ.js} +1 -1
  189. package/dist/client/assets/{mustache-Aw4qvxEW.js → mustache-BxPGtFxk.js} +1 -1
  190. package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-DpHJ0D5s.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-ChXsONZm.js} +1 -1
  192. package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-BnJfOlsF.js} +1 -1
  193. package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-CuSBfoiA.js} +1 -1
  194. package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-B0QRsRtq.js} +1 -1
  195. package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-Cgq6MsN2.js} +1 -1
  196. package/dist/client/assets/{order-monitor-day-CIHUt3pK.js → order-monitor-day-BHpHKh9K.js} +1 -1
  197. package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-hoXHHizl.js} +1 -1
  198. package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CsgsGgsX.js} +1 -1
  199. package/dist/client/assets/{page-seo-form-CnjlIIXj.js → page-seo-form-PX_1VQkb.js} +1 -1
  200. package/dist/client/assets/{pair-Cn70Tm81.js → pair-5gOZrfkD.js} +1 -1
  201. package/dist/client/assets/plan-BnqYpKp5.js +1 -0
  202. package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-BydnH1hR.js} +1 -1
  203. package/dist/client/assets/{popover-CVCbWisj.js → popover-DSRFfUdL.js} +1 -1
  204. package/dist/client/assets/{post-calendar-Dq_uFQwi.js → post-calendar-D_8Ms9Cq.js} +1 -1
  205. package/dist/client/assets/{post-editor-DPLEIDHY.js → post-editor-lU8h7ku9.js} +1 -1
  206. package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-hWNiqB3L.js} +1 -1
  207. package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-HJF1l34b.js} +1 -1
  208. package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-PigPEt4W.js} +1 -1
  209. package/dist/client/assets/{preview-tab-BHT_7Qja.js → preview-tab-B-uX9H3E.js} +3 -3
  210. package/dist/client/assets/{product-picker-dialog-p0Ic9l9I.js → product-picker-dialog-BUcziHgK.js} +1 -1
  211. package/dist/client/assets/{profile-BZA6I0p4.js → profile-D-LHzn9e.js} +1 -1
  212. package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-CGbP48WX.js} +1 -1
  213. package/dist/client/assets/{project-apps-v-sauknl.js → project-apps-CajNRGrz.js} +1 -1
  214. package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-uKBIzmIi.js} +1 -1
  215. package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-njec1yh1.js} +1 -1
  216. package/dist/client/assets/project-reports-BwZ6fxIs.js +1 -0
  217. package/dist/client/assets/project-tasks-zYigtiRn.js +1 -0
  218. package/dist/client/assets/{projects-6tFWscR3.js → projects-OJnagyMB.js} +1 -1
  219. package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-C9IhB7We.js} +1 -1
  220. package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-B590L6x_.js} +1 -1
  221. package/dist/client/assets/record-editor-BxllIkC_.js +1 -0
  222. package/dist/client/assets/{redirect-editor-DQhKbdsA.js → redirect-editor-CTLxiYxe.js} +1 -1
  223. package/dist/client/assets/reports-CJqSx9sD.js +1 -0
  224. package/dist/client/assets/{reports-DZf5GwgJ.js → reports-DBL7SnEu.js} +1 -1
  225. package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-Be9p494r.js} +1 -1
  226. package/dist/client/assets/{reports-tab-aEhqa7te.js → reports-tab-B0M7UKAQ.js} +2 -2
  227. package/dist/client/assets/{repositories-D_HBag21.js → repositories-BEFfDE3p.js} +1 -1
  228. package/dist/client/assets/repositories-DceuH_GA.js +1 -0
  229. package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-BLgLcT4o.js} +1 -1
  230. package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-lphgZTGu.js} +1 -1
  231. package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-Dadd-3sc.js} +1 -1
  232. package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-D4hkdMxt.js} +1 -1
  233. package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-e3_y0Tns.js} +1 -1
  234. package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-DPAO5WIu.js} +1 -1
  235. package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-D4wP3vt7.js} +1 -1
  236. package/dist/client/assets/{resolve-tab-icon-DtNff2Yq.js → resolve-tab-icon-CE5OwNrK.js} +1 -1
  237. package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BJK_0aY-.js} +1 -1
  238. package/dist/client/assets/{roles-CD7KBus5.js → roles-CJ569tPn.js} +1 -1
  239. package/dist/client/assets/{route-P4X0mipC.js → route-Bzf1UEGL.js} +1 -1
  240. package/dist/client/assets/route-CG_vDQP9.js +1 -0
  241. package/dist/client/assets/{route-D9eWdPea.js → route-Dfqmjwjm.js} +1 -1
  242. package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-v9W7lV1M.js} +1 -1
  243. package/dist/client/assets/{schema-DTqdooJM.js → schema-BdFq22Hl.js} +1 -1
  244. package/dist/client/assets/{schema-Jt-SHSRj.js → schema-Cx9ZLa-H.js} +1 -1
  245. package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-Bnrys5oj.js} +1 -1
  246. package/dist/client/assets/{search-input-C77c23a_.js → search-input-CXQLMhKZ.js} +1 -1
  247. package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-DxUZFRWy.js} +1 -1
  248. package/dist/client/assets/{secret-ciphertext-CI3Fu2ro.js → secret-ciphertext-DZr2qcb4.js} +1 -1
  249. package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-HHgZv9y6.js} +1 -1
  250. package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-Cm2ZaKef.js} +1 -1
  251. package/dist/client/assets/{sections-uFSvOb1s.js → sections-DT5ozPKC.js} +1 -1
  252. package/dist/client/assets/{sections-editor-BgMrH8fq.js → sections-editor-CkId24Js.js} +1 -1
  253. package/dist/client/assets/{select-B47VUguS.js → select-CSQbGY9x.js} +1 -1
  254. package/dist/client/assets/{select-model-B0eE99E3.js → select-model-NUb0C_oX.js} +1 -1
  255. package/dist/client/assets/{seo-editor-C-YMij5b.js → seo-editor-D886xssW.js} +1 -1
  256. package/dist/client/assets/{separator-tMi_6w_o.js → separator-CjiQChVR.js} +1 -1
  257. package/dist/client/assets/settings-tab-BmEKDSFe.js +1 -0
  258. package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-C-yunzji.js} +1 -1
  259. package/dist/client/assets/{shell-layout-DNfiem0_.js → shell-layout-vQvYndIW.js} +1 -1
  260. package/dist/client/assets/site-editor-1ZGqBXbh.js +1 -0
  261. package/dist/client/assets/{site-editor-toast-L4A-Cxh7.js → site-editor-toast-BtFL0E4q.js} +1 -1
  262. package/dist/client/assets/{skills-DTPuV4HK.js → skills-9HRxIPqn.js} +1 -1
  263. package/dist/client/assets/{slider-B9iKqweT.js → slider-DB0IY-tO.js} +1 -1
  264. package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-C1zl1f3P.js} +1 -1
  265. package/dist/client/assets/{sso-lvoln_ad.js → sso-PqsQn3xP.js} +1 -1
  266. package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-Wgq7DDQo.js} +1 -1
  267. package/dist/client/assets/{switch-BQFbXMA-.js → switch-DYA2xfHU.js} +1 -1
  268. package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-B8wQ7lKk.js} +1 -1
  269. package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-mXhCt1sQ.js} +1 -1
  270. package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-BpaLtZlY.js} +1 -1
  271. package/dist/client/assets/{table-DuCeyVXY.js → table-BQLxO2Sb.js} +1 -1
  272. package/dist/client/assets/{tabs-CJ70csAp.js → tabs-2NCCfhSA.js} +1 -1
  273. package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-FdiZZP36.js} +1 -1
  274. package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-DRNr9Dsj.js} +1 -1
  275. package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BaANwBST.js} +1 -1
  276. package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-VcYcBtq_.js} +1 -1
  277. package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-RJkelUr8.js} +1 -1
  278. package/dist/client/assets/{tasks-C3liOhO2.js → tasks-COZY0QCJ.js} +1 -1
  279. package/dist/client/assets/tasks-CYZeHeAX.js +1 -0
  280. package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CxhXyMKI.js} +1 -1
  281. package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-BGQNbVS2.js} +1 -1
  282. package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-DKuqiaG7.js} +1 -1
  283. package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-CQ0phZyI.js} +1 -1
  284. package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-jNELZX1N.js} +1 -1
  285. package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-Cdv_wHnA.js} +1 -1
  286. package/dist/client/assets/{time-range-picker-Dm5YljWh.js → time-range-picker-DEciYFPf.js} +1 -1
  287. package/dist/client/assets/{toggle-group-CtPF-F41.js → toggle-group-CtdhsZGp.js} +1 -1
  288. package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-DTl3so75.js} +1 -1
  289. package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BPY5dUh9.js} +1 -1
  290. package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-B5RmO6BW.js} +1 -1
  291. package/dist/client/assets/{tooltipContext-DFq6ns9J.js → tooltipContext-C93Q6WFf.js} +1 -1
  292. package/dist/client/assets/{track-vnmuUrPF.js → track-BBpplM-4.js} +1 -1
  293. package/dist/client/assets/{types-Cj3BjtjJ.js → types-Bt5yyj-z.js} +1 -1
  294. package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-B41xLFy_.js} +1 -1
  295. package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-BkcKNXzu.js} +1 -1
  296. package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D1TJRnIR.js} +1 -1
  297. package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-B9eI7BBQ.js} +1 -1
  298. package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-D3uy94Wi.js} +1 -1
  299. package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-BNudmQ0u.js} +1 -1
  300. package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-D3FoyBXt.js} +1 -1
  301. package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BLomLbPK.js} +1 -1
  302. package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-BwU_KLSF.js} +1 -1
  303. package/dist/client/assets/{use-content-sync-D4PHTEJr.js → use-content-sync-BgOMBs5q.js} +1 -1
  304. package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-d7X6hrKI.js} +1 -1
  305. package/dist/client/assets/{use-create-virtual-mcp-C4gtrY2f.js → use-create-virtual-mcp-OUIvni0u.js} +1 -1
  306. package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-BuGEMgXR.js} +1 -1
  307. package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-KHVF-MyQ.js} +1 -1
  308. package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DJkh4QSx.js} +1 -1
  309. package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dx8wT8P5.js} +1 -1
  310. package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-AlKmmETJ.js} +1 -1
  311. package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-BQjQHz64.js} +1 -1
  312. package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BIA7CHLS.js} +1 -1
  313. package/dist/client/assets/{use-fast-preview-draft-url-6p2QJIdt.js → use-fast-preview-draft-url-5oeXM-kY.js} +1 -1
  314. package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-tsH4be9V.js} +1 -1
  315. package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-bGge9UaE.js} +1 -1
  316. package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-BO0n6TVn.js} +1 -1
  317. package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-DqhkfI-R.js} +1 -1
  318. package/dist/client/assets/{use-main-panel-tabs-kHysLFoZ.js → use-main-panel-tabs-BrJK-bL3.js} +1 -1
  319. package/dist/client/assets/{use-main-schema-v8-Dcb6Yskn.js → use-main-schema-v8-CZLsOlEV.js} +1 -1
  320. package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-DmZSbEuf.js} +1 -1
  321. package/dist/client/assets/{use-mcp-client-ZokR8_74.js → use-mcp-client-MRThuZpK.js} +1 -1
  322. package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-DHm-ZTib.js} +1 -1
  323. package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-DiCKzhUm.js} +1 -1
  324. package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-h3MYd8gX.js} +1 -1
  325. package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-DCpa1RnA.js} +1 -1
  326. package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-Bt0oZ-ou.js} +1 -1
  327. package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-B2NuYLXS.js} +1 -1
  328. package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-CL0a2tPL.js} +1 -1
  329. package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-D_4Q985K.js} +1 -1
  330. package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-CC0BNhdO.js} +1 -1
  331. package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-LC63-uuA.js} +1 -1
  332. package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-D1Q7317o.js} +1 -1
  333. package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-DhvN44pQ.js} +1 -1
  334. package/dist/client/assets/{use-panel-navigate-K8ACrPML.js → use-panel-navigate-DoD4Atgz.js} +1 -1
  335. package/dist/client/assets/{use-project-native-view-presence-DJiBua9F.js → use-project-native-view-presence-DF_1PP5b.js} +1 -1
  336. package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-Cq4vb2Sy.js} +1 -1
  337. package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-CeIVmzp8.js} +1 -1
  338. package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-DQ--CsAF.js} +1 -1
  339. package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-CWir9L_Y.js} +1 -1
  340. package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-D6tUoaJC.js} +1 -1
  341. package/dist/client/assets/{use-section-preview-base-De54Y3vh.js → use-section-preview-base-Ca45yoz9.js} +1 -1
  342. package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-DPHQfMII.js} +1 -1
  343. package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-DE48pnzl.js} +1 -1
  344. package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-DlTk43Uu.js} +1 -1
  345. package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-CSRq29Tm.js} +1 -1
  346. package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-BsxjjcBf.js} +1 -1
  347. package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-ToXrxOCT.js} +1 -1
  348. package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-Bu_i1v9r.js} +1 -1
  349. package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-jyAHyZHI.js} +1 -1
  350. package/dist/client/assets/useInfiniteQuery-ZoWXsJcj.js +1 -0
  351. package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-CddGJ3VE.js} +1 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-D2W70ffp.js +1 -0
  353. package/dist/client/assets/{users-BIkPJzOg.js → users-2guAvf9G.js} +1 -1
  354. package/dist/client/assets/{utils-Bp3fKbm9.js → utils-DzhKsxx8.js} +1 -1
  355. package/dist/client/assets/{variant-calendar-BIblXEHb.js → variant-calendar-Bdj0O-mA.js} +1 -1
  356. package/dist/client/assets/{variant-draft-pointer-fs9iIwvq.js → variant-draft-pointer-_apEPqxm.js} +1 -1
  357. package/dist/client/assets/{virtual-mcp-CeCtCq_o.js → virtual-mcp-CMZ8dHEU.js} +1 -1
  358. package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-DwBbAQ97.js} +1 -1
  359. package/dist/client/index.html +1 -1
  360. package/dist/server/server.js +1 -1
  361. package/package.json +1 -1
  362. package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
  363. package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
  364. package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
  365. package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
  366. package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
  367. package/dist/client/assets/agent-settings-9voN143W.js +0 -1
  368. package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
  369. package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
  370. package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
  371. package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
  372. package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
  373. package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
  374. package/dist/client/assets/library-DYD_N6_K.js +0 -1
  375. package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
  376. package/dist/client/assets/plan-ByMMI8KU.js +0 -1
  377. package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
  378. package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
  379. package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
  380. package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
  381. package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
  382. package/dist/client/assets/route-Co7AkL50.js +0 -1
  383. package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
  384. package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
  385. package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
  386. package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
  387. package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
@@ -1,4 +1,4 @@
1
- import{az as Qt,c as Z,b as ee,r as w,j as t,B,af as Zt,l as Pt,a2 as $t,D as et,q as tt,s as st,v as ot,aM as at,w as nt,t as X,b2 as es,X as ts,T as ss,V as os,at as as,ar as ns,as as is,U as Oe,aX as rs,h as Le,y as Ke,aE as ls,ba as pt,I as xt,bb as cs,al as ds,a$ as Qe,n as Xe,f as ms}from"./index-DcU2uHG-.js";import{C as us}from"./index-CXeJCI0G.js";import{b as it,O as fs,a as ps,a8 as xs,k as gt,aA as gs,Y as ht,aB as hs,f as js,aC as Me,aD as zt}from"./agent-icon-c0hRUHIU.js";import{n as jt}from"./ShoppingBag01-DAjyOiiw.js";import{t as rt}from"./ChevronUp-CFN68hLk.js";import{f as ys}from"./UserSquare-DJngEPjS.js";import{d as lt,b as Et,t as Ot}from"./Tool01-BGL2Qt57.js";import{a as bs}from"./Image01-DowwsvYG.js";import{i as vs}from"./SearchMd-BODiv7c9.js";import{B as Kt}from"./badge-ByzdbptS.js";import{C as Ft}from"./checkbox-Dla8kRWj.js";import{S as ct}from"./switch-BQFbXMA-.js";import{a as Mt,b as Rt,P as Lt}from"./popover-CVCbWisj.js";import{C as Cs,a as yt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-DQxPvzO0.js";import{g as ws,s as Ds}from"./tool-namespace-FeAXQzXg.js";import{u as dt}from"./use-connection-Dj54skEw.js";import{u as _s}from"./use-mcp-client-ZokR8_74.js";import{u as Is}from"./use-mcp-tools-BwuN38Gh.js";import{I as As}from"./integration-icon-aeIvRSnw.js";import{M as Ps}from"./select-model-B0eE99E3.js";import{u as $s}from"./use-ai-providers-DugUJNG4.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-0HVt3TgE.js";import{a as ve,c as Os,d as Ks}from"./use-automations-Dhy5bAQi.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-BnuwMOfj.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-BWjY8cOG.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-BqHx2R4U.js";import{a as Js}from"./shell-layout-DNfiem0_.js";import{i as Vt}from"./ArrowLeft-BKYzlDQY.js";import{i as Xs}from"./ArrowUp-Cq3iZIwL.js";import{s as Ys}from"./Trash01-Cf6bGuCZ.js";import{s as mt}from"./XClose-CdzjyNb0.js";import{u as bt}from"./use-debounced-autosave-D0TGgFvB.js";import{T as qs,a as Qs}from"./input-HXHaYrka.js";import{u as Zs,a as eo,J as Ut}from"./jira-icon-CZLCmGol.js";import{s as to}from"./Plus-xabrshQG.js";import{i as ut}from"./ZoomOut-B55seUHX.js";import{l as We,H as so}from"./config-0dQr8OOs.js";import{C as oo}from"./task-board-CSpxMIw7.js";import{M as Wt}from"./multi-select-CmbGOwtN.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-B47VUguS.js";import{b as ao,a as no,T as vt}from"./tabs-CJ70csAp.js";import{a as Ye}from"./Copy01-C73PJJxr.js";import{MonacoCodeEditor as io}from"./monaco-editor-e80GuCNv.js";import{A as Ct,a as Nt,b as St,c as kt,g as Tt,d as wt,e as Dt,f as _t}from"./alert-dialog-M8Y0zqSA.js";import{A as ro}from"./automation-runs-7CDwsw1m.js";import{C as lo}from"./collection-tabs-DJst1PBn.js";import{a as co}from"./use-panel-navigate-K8ACrPML.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-route-DsRsjMOv.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./AlertCircle-xI8XX-bi.js";import"./LinkBroken01-ZRquEJUl.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./index-DxbCP5B6.js";import"./auth-CJCUdDnK.js";import"./drawer-CEiS53oX.js";import"./index-De44zW_k.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CVrfZDpI.js";import"./autosend-BiXCzDoT.js";import"./use-decopilot-events-TumByBkr.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DFkNTsS0.js";import"./schema-DTqdooJM.js";import"./index-WjQsIrkp.js";import"./use-clock-tick-CbuQEbGd.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./suggestion-D_Z3LuMt.js";import"./usage-stats-DcyLnEOC.js";import"./form-Bdh0vUeg.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-org-fs-D82Vx4hB.js";import"./core.esm-DOdwJCI5.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-DWhRi1_f.js";import"./table-DuCeyVXY.js";import"./empty-state-B1xpK558.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./task-status-CFz3dyVR.js";import"./thread-sheet-body-BW8H1wdb.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./pair-Cn70Tm81.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DLitie4Q.js";import"./file-type-icon-Ez8-DRHg.js";const qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Ot},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=qe[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:gt,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Et},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:gt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:ht,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:ht},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:jt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:jt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=Z.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=Z.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Y=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const E=ws(I._meta)??"__other__",Q=Ds(I.name,E==="__other__"?void 0:E),P=I.title,xe=P&&P!==I.name?P:go(Q);H.has(E)||H.set(E,{clientId:E,conn:Y.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),z=I=>a(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(V);E.has(I)?E.delete(I):E.add(I),z(E)},ne=(I,E)=>{const Q=new Set(V);for(const P of I)E?Q.add(P):Q.delete(P);z(Q)};y=Lt,A=o,v=j;let q;e[26]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=q):q=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let O;e[49]!==a?(O=()=>a([]),e[49]=a,e[50]=O):O=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:O,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=O,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const E=I.tools.map(bo),Q=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const E=I.tools.map(yo),Q=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>Ze.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=Ze.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Po=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=Z.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
1
+ import{az as Qt,c as Z,b as ee,r as w,j as t,B,af as Zt,l as Pt,a2 as $t,D as et,q as tt,s as st,v as ot,aM as at,w as nt,t as X,b2 as es,X as ts,T as ss,V as os,at as as,ar as ns,as as is,U as Oe,aX as rs,h as Le,y as Ke,aE as ls,ba as pt,I as xt,bb as cs,al as ds,a$ as Qe,n as Xe,f as ms}from"./index-CaH7O3hJ.js";import{C as us}from"./index-DUXVtfV1.js";import{b as it,O as fs,a as ps,a8 as xs,k as gt,aA as gs,Y as ht,aB as hs,f as js,aC as Me,aD as zt}from"./agent-icon-U4gZaLOQ.js";import{n as jt}from"./ShoppingBag01-BMRnsG58.js";import{t as rt}from"./ChevronUp-C8mqlnDX.js";import{f as ys}from"./UserSquare-Drp4z0v0.js";import{d as lt,b as Et,t as Ot}from"./Tool01-BM29_KWq.js";import{a as bs}from"./Image01-D7F4wuKx.js";import{i as vs}from"./SearchMd-Cuf45jFP.js";import{B as Kt}from"./badge-Cnnepvq1.js";import{C as Ft}from"./checkbox-CUzk21sc.js";import{S as ct}from"./switch-DYA2xfHU.js";import{a as Mt,b as Rt,P as Lt}from"./popover-DSRFfUdL.js";import{C as Cs,a as yt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-C7n5qLsN.js";import{g as ws,s as Ds}from"./tool-namespace-DTl3so75.js";import{u as dt}from"./use-connection-BwU_KLSF.js";import{u as _s}from"./use-mcp-client-MRThuZpK.js";import{u as Is}from"./use-mcp-tools-DiCKzhUm.js";import{I as As}from"./integration-icon-DCiBepJw.js";import{M as Ps}from"./select-model-NUb0C_oX.js";import{u as $s}from"./use-ai-providers-D1TJRnIR.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-ClmcYJRa.js";import{a as ve,c as Os,d as Ks}from"./use-automations-B9eI7BBQ.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-_d3c57p1.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-CeBZpglT.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-B5RmO6BW.js";import{a as Js}from"./shell-layout-vQvYndIW.js";import{i as Vt}from"./ArrowLeft-DZ0mAFgb.js";import{i as Xs}from"./ArrowUp-bYg1aEOe.js";import{s as Ys}from"./Trash01-D92WhXf2.js";import{s as mt}from"./XClose-dOW_RI9u.js";import{u as bt}from"./use-debounced-autosave-KHVF-MyQ.js";import{T as qs,a as Qs}from"./input-DN6U5jAj.js";import{u as Zs,a as eo,J as Ut}from"./jira-icon-DoiJbCfx.js";import{s as to}from"./Plus-BDveVGJf.js";import{i as ut}from"./ZoomOut-BfQx-fBr.js";import{l as We,H as so}from"./config-BCpfsSBB.js";import{C as oo}from"./task-board-DRNr9Dsj.js";import{M as Wt}from"./multi-select-DtSzZ5RJ.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-CSQbGY9x.js";import{b as ao,a as no,T as vt}from"./tabs-2NCCfhSA.js";import{a as Ye}from"./Copy01-DC8f0fwU.js";import{MonacoCodeEditor as io}from"./monaco-editor-C7rmyhBT.js";import{A as Ct,a as Nt,b as St,c as kt,g as Tt,d as wt,e as Dt,f as _t}from"./alert-dialog-CKDHmJ-l.js";import{A as ro}from"./automation-runs-C367-v6a.js";import{C as lo}from"./collection-tabs-DIFXv7hR.js";import{a as co}from"./use-panel-navigate-DoD4Atgz.js";import"./use-mobile-DCpa1RnA.js";import"./use-sidebar-collapsed-DPHQfMII.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./thread-route-CQ0phZyI.js";import"./thread-intent-DKuqiaG7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-BPY5dUh9.js";import"./sheet-C-yunzji.js";import"./resizable-D4wP3vt7.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./AlertCircle-Ctbquk5a.js";import"./LinkBroken01-BJx0R97x.js";import"./Building02-BHIVlbfK.js";import"./CheckCircle-C2ndOEUO.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Monitor01-D3VwU2ni.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Upload01-BSDy4f7m.js";import"./User01-Cn3JqTjv.js";import"./Users01-Cxbx87gg.js";import"./index-DK4LlU65.js";import"./auth-hgpoCSIS.js";import"./drawer-ZlYTI3Z6.js";import"./index-BpRXpcv4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-RpIBVCkY.js";import"./autosend-BZOm698U.js";import"./use-decopilot-events-AlKmmETJ.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DhvN44pQ.js";import"./schema-BdFq22Hl.js";import"./index-C9OgV5Vt.js";import"./use-clock-tick-D3FoyBXt.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./label-Cnc4HQwP.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./use-debounced-value-DJkh4QSx.js";import"./required-auth-layout-e3_y0Tns.js";import"./use-org-sso-LC63-uuA.js";import"./suggestion-Wgq7DDQo.js";import"./usage-stats-BkcKNXzu.js";import"./form-Dpwt-9St.js";import"./utils-CVEq3hMx.js";import"./markdown-CA3yd3L6.js";import"./use-copy-d7X6hrKI.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-DHm-ZTib.js";import"./use-org-fs-D_4Q985K.js";import"./core.esm-DNra8pgf.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-BFHySd1K.js";import"./table-BQLxO2Sb.js";import"./empty-state-Bok1L2hc.js";import"./use-infinite-scroll-BO0n6TVn.js";import"./use-members-h3MYd8gX.js";import"./use-org-auth-client-CL0a2tPL.js";import"./task-status-VcYcBtq_.js";import"./thread-sheet-body-Cdv_wHnA.js";import"./useSuspenseInfiniteQuery-D2W70ffp.js";import"./pair-5gOZrfkD.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Xaw0krD3.js";import"./types-Bt5yyj-z.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-jyAHyZHI.js";import"./file-type-icon-DPqHd815.js";const qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Ot},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=qe[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:gt,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Et},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:gt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:ht,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:ht},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:jt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:jt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=Z.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=Z.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Y=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const E=ws(I._meta)??"__other__",Q=Ds(I.name,E==="__other__"?void 0:E),P=I.title,xe=P&&P!==I.name?P:go(Q);H.has(E)||H.set(E,{clientId:E,conn:Y.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),z=I=>a(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(V);E.has(I)?E.delete(I):E.add(I),z(E)},ne=(I,E)=>{const Q=new Set(V);for(const P of I)E?Q.add(P):Q.delete(P);z(Q)};y=Lt,A=o,v=j;let q;e[26]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=q):q=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let O;e[49]!==a?(O=()=>a([]),e[49]=a,e[50]=O):O=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:O,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=O,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const E=I.tools.map(bo),Q=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const E=I.tools.map(yo),Q=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>Ze.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=Ze.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Po=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=Z.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
2
2
  -H "Authorization: Bearer ${i}" \\
3
3
  -H "Content-Type: application/json" \\
4
4
  -d '{"hello":"world"}'`:`curl -X POST "${S}" \\
@@ -1 +1 @@
1
- import{c as S,b as O,r as G,j as e,n as m,y as Q,B as V,a$ as U}from"./index-DcU2uHG-.js";import{C as W}from"./index-CXeJCI0G.js";import{s as X}from"./Plus-xabrshQG.js";import{E as Y}from"./agent-icon-c0hRUHIU.js";import{i as F}from"./ZoomOut-B55seUHX.js";import{S as Z}from"./search-input-C77c23a_.js";import{E as I}from"./empty-state-B1xpK558.js";import{u as tt,a as et,b as it}from"./use-automations-Dhy5bAQi.js";import{a as ot}from"./use-panel-navigate-K8ACrPML.js";import{A as st}from"./automation-list-row-CO-7cr0O.js";import{b as rt}from"./thread-route-DsRsjMOv.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-intent-DlbBEzNn.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./User01-Cfg0yVvz.js";import"./Building02-C9KWPxlH.js";import"./UserSquare-DJngEPjS.js";import"./XClose-CdzjyNb0.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./CheckCircle-D30wPP6A.js";import"./Monitor01-DMME8GIo.js";import"./use-clock-tick-CbuQEbGd.js";import"./Tool01-BGL2Qt57.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./SearchMd-BODiv7c9.js";import"./integration-icon-aeIvRSnw.js";import"./LinkBroken01-ZRquEJUl.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./ArrowLeft-BKYzlDQY.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./ShoppingBag01-DAjyOiiw.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-organization-settings-DFkNTsS0.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./AlertCircle-xI8XX-bi.js";import"./ArrowUp-Cq3iZIwL.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./Users01-vn3EOu8A.js";import"./badge-ByzdbptS.js";import"./alert-dialog-M8Y0zqSA.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=O(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),v=D===void 0?[]:D,{create:y}=et(),[_,H]=G.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Y,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(V,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const J=_.toLowerCase(),q=v.filter(s=>s.name.toLowerCase().includes(J));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:r,existing_count:v.length});const s=await y.mutateAsync(it(r));B(s.id)},K=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(X,{size:14}),t[18]=A):A=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:K,children:[A,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=L):L=t[24];const P=L,E=m,T=m,$=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const k=v.length>0&&e.jsx(Z,{value:_,onChange:H,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==k?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:k}),t[30]=k,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const z=v.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==z||t[37]!==$.Container?(d=e.jsxs($.Container,{children:[u,z]}),t[35]=u,t[36]=z,t[37]=$.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==T.Content?(f=e.jsx(T.Content,{children:d}),t[39]=d,t[40]=T.Content,t[41]=f):f=t[41];let b;return t[42]!==E||t[43]!==f?(b=e.jsx(E,{children:f}),t[42]=E,t[43]=f,t[44]=b):b=t[44],b}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(G.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function De(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(W.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{De as default};
1
+ import{c as S,b as O,r as G,j as e,n as m,y as Q,B as V,a$ as U}from"./index-CaH7O3hJ.js";import{C as W}from"./index-DUXVtfV1.js";import{s as X}from"./Plus-BDveVGJf.js";import{E as Y}from"./agent-icon-U4gZaLOQ.js";import{i as F}from"./ZoomOut-BfQx-fBr.js";import{S as Z}from"./search-input-CXQLMhKZ.js";import{E as I}from"./empty-state-Bok1L2hc.js";import{u as tt,a as et,b as it}from"./use-automations-B9eI7BBQ.js";import{a as ot}from"./use-panel-navigate-DoD4Atgz.js";import{A as st}from"./automation-list-row-qFFhCtZo.js";import{b as rt}from"./thread-route-CQ0phZyI.js";import"./use-mobile-DCpa1RnA.js";import"./use-sidebar-collapsed-DPHQfMII.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./thread-intent-DKuqiaG7.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./toolbar-icon-button-BPY5dUh9.js";import"./shell-layout-vQvYndIW.js";import"./avatar-RpIBVCkY.js";import"./User01-Cn3JqTjv.js";import"./Building02-BHIVlbfK.js";import"./UserSquare-Drp4z0v0.js";import"./XClose-dOW_RI9u.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./CheckCircle-C2ndOEUO.js";import"./Monitor01-D3VwU2ni.js";import"./use-clock-tick-D3FoyBXt.js";import"./Tool01-BM29_KWq.js";import"./command-C7n5qLsN.js";import"./index-DK4LlU65.js";import"./SearchMd-Cuf45jFP.js";import"./integration-icon-DCiBepJw.js";import"./LinkBroken01-BJx0R97x.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./ArrowLeft-DZ0mAFgb.js";import"./label-Cnc4HQwP.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./ShoppingBag01-BMRnsG58.js";import"./use-debounced-value-DJkh4QSx.js";import"./use-organization-settings-DhvN44pQ.js";import"./required-auth-layout-e3_y0Tns.js";import"./autosend-BZOm698U.js";import"./use-org-sso-LC63-uuA.js";import"./sheet-C-yunzji.js";import"./resizable-D4wP3vt7.js";import"./AlertCircle-Ctbquk5a.js";import"./ArrowUp-bYg1aEOe.js";import"./ChevronUp-C8mqlnDX.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Trash01-D92WhXf2.js";import"./Upload01-BSDy4f7m.js";import"./Users01-Cxbx87gg.js";import"./badge-Cnnepvq1.js";import"./alert-dialog-CKDHmJ-l.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=O(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),v=D===void 0?[]:D,{create:y}=et(),[_,H]=G.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Y,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(V,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const J=_.toLowerCase(),q=v.filter(s=>s.name.toLowerCase().includes(J));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:r,existing_count:v.length});const s=await y.mutateAsync(it(r));B(s.id)},K=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(X,{size:14}),t[18]=A):A=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:K,children:[A,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=L):L=t[24];const P=L,E=m,T=m,$=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const k=v.length>0&&e.jsx(Z,{value:_,onChange:H,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==k?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:k}),t[30]=k,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const z=v.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(I,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==z||t[37]!==$.Container?(d=e.jsxs($.Container,{children:[u,z]}),t[35]=u,t[36]=z,t[37]=$.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==T.Content?(f=e.jsx(T.Content,{children:d}),t[39]=d,t[40]=T.Content,t[41]=f):f=t[41];let b;return t[42]!==E||t[43]!==f?(b=e.jsx(E,{children:f}),t[42]=E,t[43]=f,t[44]=b):b=t[44],b}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(G.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function De(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(W.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{De as default};
@@ -1 +1 @@
1
- import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-DcU2uHG-.js";import{C as D}from"./index-CXeJCI0G.js";import{u as B}from"./use-mcp-client-ZokR8_74.js";import{C as H,a as J}from"./companion-mcps-section-BaIOrb8k.js";import{c as K}from"./use-connect-companion-BBUs22Yl.js";import{C as v,a as q}from"./connect-layout-CsBnyYo4.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-K8ACrPML.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-route-DsRsjMOv.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-c0hRUHIU.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-organization-settings-DFkNTsS0.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./auth-CJCUdDnK.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-Bdh0vUeg.js";import"./icon-button-Dg2jSe-y.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-BfkCTicr.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./track-vnmuUrPF.js";import"./extract-connection-data-CUvLfXNU.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=G();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=K(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>z(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=E):E=t[15];const O=E;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(q,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==e||t[37]!==c?(S=i.jsx(J,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function Wo(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{Wo as default};
1
+ import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-CaH7O3hJ.js";import{C as D}from"./index-DUXVtfV1.js";import{u as B}from"./use-mcp-client-MRThuZpK.js";import{C as H,a as J}from"./companion-mcps-section-C2rDEgkL.js";import{c as K}from"./use-connect-companion-BLomLbPK.js";import{C as v,a as q}from"./connect-layout-DyGwITyt.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-DoD4Atgz.js";import"./use-mobile-DCpa1RnA.js";import"./use-sidebar-collapsed-DPHQfMII.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./thread-route-CQ0phZyI.js";import"./thread-intent-DKuqiaG7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-U4gZaLOQ.js";import"./AlertCircle-Ctbquk5a.js";import"./Tool01-BM29_KWq.js";import"./ArrowUp-bYg1aEOe.js";import"./ArrowLeft-DZ0mAFgb.js";import"./LinkBroken01-BJx0R97x.js";import"./ShoppingBag01-BMRnsG58.js";import"./ZoomOut-BfQx-fBr.js";import"./Building02-BHIVlbfK.js";import"./CheckCircle-C2ndOEUO.js";import"./ChevronUp-C8mqlnDX.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./UserSquare-Drp4z0v0.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Monitor01-D3VwU2ni.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Plus-BDveVGJf.js";import"./SearchMd-Cuf45jFP.js";import"./Trash01-D92WhXf2.js";import"./Upload01-BSDy4f7m.js";import"./User01-Cn3JqTjv.js";import"./Users01-Cxbx87gg.js";import"./XClose-dOW_RI9u.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./toolbar-icon-button-BPY5dUh9.js";import"./shell-layout-vQvYndIW.js";import"./avatar-RpIBVCkY.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./use-clock-tick-D3FoyBXt.js";import"./command-C7n5qLsN.js";import"./index-DK4LlU65.js";import"./integration-icon-DCiBepJw.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./label-Cnc4HQwP.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./use-debounced-value-DJkh4QSx.js";import"./use-organization-settings-DhvN44pQ.js";import"./required-auth-layout-e3_y0Tns.js";import"./autosend-BZOm698U.js";import"./use-org-sso-LC63-uuA.js";import"./sheet-C-yunzji.js";import"./resizable-D4wP3vt7.js";import"./auth-hgpoCSIS.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-Dpwt-9St.js";import"./icon-button-CwrVRVUS.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-CddGJ3VE.js";import"./authenticate-and-persist-oauth-jn1R1qId.js";import"./mcp-oauth-3Gakbc_U.js";import"./mcp-oauth-CxgfM8zh.js";import"./track-BBpplM-4.js";import"./extract-connection-data-CNLani4P.js";import"./connection-Dik4epzq.js";import"./url-slug-B41xLFy_.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=G();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=K(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>z(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=E):E=t[15];const O=E;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(q,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==e||t[37]!==c?(S=i.jsx(J,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function Wo(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{Wo as default};
@@ -0,0 +1 @@
1
+ import{c,j as e,b2 as b,u as g}from"./index-CaH7O3hJ.js";import{C as j}from"./index-DUXVtfV1.js";import{F as v,H as S}from"./file-share-button-CB7fcIJI.js";import{u as k,b as y,e as _}from"./use-org-fs-D_4Q985K.js";import{S as w}from"./settings-tab-BmEKDSFe.js";import{b as M}from"./thread-route-CQ0phZyI.js";import"./use-mobile-DCpa1RnA.js";import"./use-sidebar-collapsed-DPHQfMII.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./use-panel-navigate-DoD4Atgz.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./thread-intent-DKuqiaG7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-U4gZaLOQ.js";import"./AlertCircle-Ctbquk5a.js";import"./Tool01-BM29_KWq.js";import"./ArrowUp-bYg1aEOe.js";import"./ArrowLeft-DZ0mAFgb.js";import"./LinkBroken01-BJx0R97x.js";import"./ShoppingBag01-BMRnsG58.js";import"./ZoomOut-BfQx-fBr.js";import"./Building02-BHIVlbfK.js";import"./CheckCircle-C2ndOEUO.js";import"./ChevronUp-C8mqlnDX.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./UserSquare-Drp4z0v0.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Monitor01-D3VwU2ni.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Plus-BDveVGJf.js";import"./SearchMd-Cuf45jFP.js";import"./Trash01-D92WhXf2.js";import"./Upload01-BSDy4f7m.js";import"./User01-Cn3JqTjv.js";import"./Users01-Cxbx87gg.js";import"./XClose-dOW_RI9u.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./toolbar-icon-button-BPY5dUh9.js";import"./shell-layout-vQvYndIW.js";import"./avatar-RpIBVCkY.js";import"./use-clock-tick-D3FoyBXt.js";import"./command-C7n5qLsN.js";import"./index-DK4LlU65.js";import"./integration-icon-DCiBepJw.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./label-Cnc4HQwP.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./use-debounced-value-DJkh4QSx.js";import"./use-organization-settings-DhvN44pQ.js";import"./required-auth-layout-e3_y0Tns.js";import"./autosend-BZOm698U.js";import"./use-org-sso-LC63-uuA.js";import"./sheet-C-yunzji.js";import"./resizable-D4wP3vt7.js";import"./popover-DSRFfUdL.js";import"./index-BRzGXE32.js";import"./extract-connection-data-CNLani4P.js";import"./metadata-D72DunRR.js";import"./connection-Dik4epzq.js";import"./url-slug-B41xLFy_.js";import"./chat-context-_d3c57p1.js";import"./use-decopilot-events-AlKmmETJ.js";import"./use-ai-providers-D1TJRnIR.js";import"./location-V0VwTJTt.js";import"./build-improve-prompt-doc-ClmcYJRa.js";import"./empty-state-Bok1L2hc.js";import"./use-date-fns-locale-BuGEMgXR.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-3Gakbc_U.js";import"./mcp-oauth-CxgfM8zh.js";import"./alert-dialog-CKDHmJ-l.js";import"./textarea-CxhXyMKI.js";import"./use-connection-BwU_KLSF.js";import"./use-debounced-autosave-KHVF-MyQ.js";import"./add-connection-dialog-B0vtW1sl.js";import"./connection-card-DCnmTKpJ.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-ZlYTI3Z6.js";import"./form-Dpwt-9St.js";import"./select-CSQbGY9x.js";import"./index-BdQq_4o_.js";import"./schema-Cx9ZLa-H.js";import"./connection-form-helpers-ta2yIvIb.js";import"./authenticate-and-persist-oauth-jn1R1qId.js";import"./collection-tabs-DIFXv7hR.js";import"./badge-Cnnepvq1.js";import"./use-infinite-scroll-BO0n6TVn.js";import"./useSuspenseInfiniteQuery-D2W70ffp.js";import"./file-type-icon-DPqHd815.js";import"./checkbox-CUzk21sc.js";import"./search-input-CXQLMhKZ.js";import"./use-mcp-auth-status-DmZSbEuf.js";import"./types-Bt5yyj-z.js";import"./use-mcp-tools-DiCKzhUm.js";import"./use-mcp-prompts-DHm-ZTib.js";import"./utils-CVEq3hMx.js";import"./switch-DYA2xfHU.js";import"./scroll-area-Bnrys5oj.js";import"./use-main-schema-v8-CZLsOlEV.js";import"./use-project-native-view-presence-DF_1PP5b.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-tsH4be9V.js";import"./site-slug-DebpOoQq.js";import"./optimistic-project-sidebar-views-Cgq6MsN2.js";import"./sections-DT5ozPKC.js";import"./format-time-Cq80KKvY.js";import"./use-copy-d7X6hrKI.js";import"./virtual-mcp-CMZ8dHEU.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-HHgZv9y6.js";import"./use-secrets-D6tUoaJC.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const x="home";function P(i){const t=c.c(5),{label:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=e.jsx(b,{className:"aspect-video w-2/3 max-w-xl"}),t[0]=p):p=t[0];let o;t[1]!==r?(o=r&&e.jsx("p",{className:"text-xs text-muted-foreground",children:r}),t[1]=r,t[2]=o):o=t[2];let m;return t[3]!==o?(m=e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-background",children:[p,o]}),t[3]=o,t[4]=m):m=t[4],m}function D(i){const t=c.c(15),{path:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={refetchIntervalWhenAbsent:2e3},t[0]=p):p=t[0];const o=k(x,r,p),m=y(x)(r);if(o.isPending||!o.data){const h=!o.isPending&&!o.data?"Waiting for the deck to sync…":void 0;let l;return t[1]!==h?(l=e.jsx(P,{label:h}),t[1]=h,t[2]=l):l=t[2],l}let s;t[3]!==o.data?(s=_(o.data),t[3]=o.data,t[4]=s):s=t[4];const f=o.data.shareMode??"private",u=o.data.effectivePublic??!1,d=window.location.origin+m;let a;t[5]!==r||t[6]!==f||t[7]!==u||t[8]!==d?(a=e.jsx(v,{volume:x,path:r,shareMode:f,effectivePublic:u,url:d}),t[5]=r,t[6]=f,t[7]=u,t[8]=d,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==m||t[12]!==s||t[13]!==a?(n=e.jsx(S,{readUrl:m,marker:s,title:r,savePath:r,trailing:a}),t[10]=r,t[11]=m,t[12]=s,t[13]=a,t[14]=n):n=t[14],n}function C(){const i=c.c(4);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=g(t),p=M(),o="path"in r&&typeof r.path=="string"?r.path:void 0;let m;return i[1]!==o||i[2]!==p?(m=o?e.jsx(D,{path:o},o):e.jsx(w,{virtualMcpId:p}),i[1]=o,i[2]=p,i[3]=m):m=i[3],m}function er(){const i=c.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(j.Content,{children:e.jsx(C,{})}),i[0]=t):t=i[0],t}export{er as default};
@@ -1 +1 @@
1
- import{c as L,b as Ee,m as _e,j as t,b2 as $e,a5 as ot,l as Ve,K as xe,B as ge,r as pe,a3 as _t,dd as zt,av as ct,a2 as Et,o as He,e as Ue,t as be,I as Rt,q as Lt,D as At,s as Ft,v as Mt,w as Ut}from"./index-DcU2uHG-.js";import{C as It}from"./index-CXeJCI0G.js";import{aC as Je,F as We,bB as qt,bC as Vt,bD as Ot,v as ke,bE as mt,O as Kt}from"./agent-icon-c0hRUHIU.js";import{t as dt}from"./ChevronUp-CFN68hLk.js";import{s as ut}from"./Trash01-Cf6bGuCZ.js";import{B as te}from"./badge-ByzdbptS.js";import{L as Be}from"./label-DDPD5LQh.js";import{A as ft,a as xt,b as pt,c as ht,g as bt,d as gt,e as jt,f as Tt}from"./alert-dialog-M8Y0zqSA.js";import{S as nt,b as at,a as rt,d as it,c as vt}from"./select-B47VUguS.js";import{e as Ye,a as Ge,b as we,T as W,d as Xe,c as Y}from"./table-DuCeyVXY.js";import{E as De}from"./empty-state-BoFIIv2e.js";import{a as Bt}from"./repository-binding-B-JblZ3B.js";import{r as Qt}from"./site-slug-DebpOoQq.js";import{i as Re}from"./CheckCircle-D30wPP6A.js";import{i as Ht}from"./Monitor01-DMME8GIo.js";import{d as Jt}from"./UserSquare-DJngEPjS.js";import{C as Wt,a as Yt,b as Gt}from"./collapsible-BWjY8cOG.js";import{T as Xt,a as Zt,c as es,b as ts}from"./tabs-CJ70csAp.js";import{S as ss,d as ls,c as ns,a as as,b as rs}from"./sheet-R9Pr50Sb.js";import{S as is}from"./settings-tab-Cp5pryb2.js";import{e as os}from"./use-organization-settings-DFkNTsS0.js";import{b as cs}from"./thread-route-DsRsjMOv.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./use-panel-navigate-K8ACrPML.js";import"./use-project-scope-CGMALc0e.js";import"./thread-intent-DlbBEzNn.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./User01-Cfg0yVvz.js";import"./Building02-C9KWPxlH.js";import"./XClose-CdzjyNb0.js";import"./ZoomOut-B55seUHX.js";import"./use-clock-tick-CbuQEbGd.js";import"./Plus-xabrshQG.js";import"./Tool01-BGL2Qt57.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./SearchMd-BODiv7c9.js";import"./integration-icon-aeIvRSnw.js";import"./LinkBroken01-ZRquEJUl.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./ArrowLeft-BKYzlDQY.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./ShoppingBag01-DAjyOiiw.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./resizable-B1jyEV0m.js";import"./AlertCircle-xI8XX-bi.js";import"./ArrowUp-Cq3iZIwL.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Upload01-ZLE7vfB9.js";import"./Users01-vn3EOu8A.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./index-CxtzBp5_.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./chat-context-BnuwMOfj.js";import"./use-decopilot-events-TumByBkr.js";import"./use-ai-providers-DugUJNG4.js";import"./location-V0VwTJTt.js";import"./build-improve-prompt-doc-0HVt3TgE.js";import"./empty-state-B1xpK558.js";import"./use-date-fns-locale-CEVf4Ifn.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./use-debounced-autosave-D0TGgFvB.js";import"./add-connection-dialog-O4xCe9BP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-CEiS53oX.js";import"./form-Bdh0vUeg.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./collection-tabs-DJst1PBn.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./file-type-icon-Ez8-DRHg.js";import"./use-org-fs-D82Vx4hB.js";import"./checkbox-Dla8kRWj.js";import"./search-input-C77c23a_.js";import"./use-mcp-auth-status-2A9iou5g.js";import"./types-Cj3BjtjJ.js";import"./use-mcp-tools-BwuN38Gh.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./utils-CVEq3hMx.js";import"./switch-BQFbXMA-.js";import"./popover-CVCbWisj.js";import"./scroll-area-DowOzl5a.js";import"./use-main-schema-v8-Dcb6Yskn.js";import"./use-project-native-view-presence-DJiBua9F.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BFq_wpSt.js";import"./optimistic-project-sidebar-views-CKzSSiC-.js";import"./sections-uFSvOb1s.js";import"./format-time-Cq80KKvY.js";import"./use-copy-K9rQ1PJH.js";import"./virtual-mcp-CeCtCq_o.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-D6q2PbZG.js";import"./use-secrets-DbkATagb.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";let Nt=class extends Error{constructor(e,s){super(e),this.status=s}status};function ms(n){return n instanceof Nt&&n.status===401}async function ds(n){const e=await fetch(n),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new Nt(l,e.status)}return s}function Le(n){return n==null||!Number.isFinite(n)?"—":n>=1e3?`${(n/1e3).toFixed(n>=1e4?0:1)}s`:`${Math.round(n)}ms`}function Ze(n){const e=(n??"").toLowerCase();return e==="pass"||e==="passed"||e==="ok"||e==="success"}function Se(n){const e=(n??"").toLowerCase();return e==="fail"||e==="failed"||e==="error"}function yt(n){const e=(n??"").toLowerCase();return e==="skip"||e==="skipped"}function Qe(n,e){return n.viewport&&n.viewport.trim()?n.viewport:`viewport-${e}`}function et(n){const e=L.c(12),{status:s,t:l}=n;if(Se(s)){let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(We,{className:"size-3"}),e[0]=r):r=e[0];let o;e[1]!==l?(o=l("mainPanelTabs.e2eTab.statusFailed"),e[1]=l,e[2]=o):o=e[2];let c;return e[3]!==o?(c=t.jsxs(te,{variant:"destructive",children:[r,o]}),e[3]=o,e[4]=c):c=e[4],c}if(Ze(s)){let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Re,{className:"size-3"}),e[5]=r):r=e[5];let o;e[6]!==l?(o=l("mainPanelTabs.e2eTab.statusPassed"),e[6]=l,e[7]=o):o=e[7];let c;return e[8]!==o?(c=t.jsxs(te,{variant:"success",children:[r,o]}),e[8]=o,e[9]=c):c=e[9],c}const a=s??"—";let i;return e[10]!==a?(i=t.jsx(te,{variant:"secondary",children:a}),e[10]=a,e[11]=i):i=e[11],i}function us(n){const e=L.c(4),{status:s}=n;if(Ze(s)){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Re,{className:"size-4 shrink-0 text-success"}),e[0]=a):a=e[0],a}if(Se(s)){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(We,{className:"size-4 shrink-0 text-destructive"}),e[1]=a):a=e[1],a}if(yt(s)){let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Ot,{className:"size-4 shrink-0 text-muted-foreground"}),e[2]=a):a=e[2],a}let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(zt,{className:"size-4 shrink-0 text-muted-foreground/60"}),e[3]=l):l=e[3],l}function fs(n){return Ze(n)?"bg-success":Se(n)?"bg-destructive":yt(n)?"bg-muted-foreground/40":"bg-muted-foreground/25"}function xs(n){const e=L.c(4),{steps:s}=n;if(s.length===0)return null;let l;e[0]!==s?(l=s.map(ps),e[0]=s,e[1]=l):l=e[1];let a;return e[2]!==l?(a=t.jsx("div",{className:"flex flex-wrap items-center gap-1",children:l}),e[2]=l,e[3]=a):a=e[3],a}function ps(n,e){return t.jsx("span",{title:n.name??`step ${e+1}`,className:Ve("size-1.5 rounded-full",fs(n.status))},e)}const hs=[{key:"lcp",label:"LCP",good:2500,poor:4e3,unit:"ms"},{key:"inp",label:"INP",good:200,poor:500,unit:"ms"},{key:"cls",label:"CLS",good:.1,poor:.25,unit:"cls"},{key:"fcp",label:"FCP",good:1800,poor:3e3,unit:"ms"},{key:"ttfb",label:"TTFB",good:800,poor:1800,unit:"ms"}];function Pt(n){const e=L.c(7),{vitals:s}=n;let l,a,i;if(e[0]!==s){i=Symbol.for("react.early_return_sentinel");e:{const o=hs.filter(c=>{const{key:d}=c,m=s[d];return m!=null&&Number.isFinite(m)});if(o.length===0){i=null;break e}l="grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5",a=o.map(c=>{const{key:d,label:m,good:u,poor:T,unit:p}=c,f=s[d],x=f<=u?"text-success":f<=T?"text-warning":"text-destructive",v=p==="cls"?f.toFixed(3):Le(f);return t.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[t.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:m}),t.jsx("span",{className:Ve("font-mono text-sm font-semibold tabular-nums",x),children:v})]},d)})}e[0]=s,e[1]=l,e[2]=a,e[3]=i}else l=e[1],a=e[2],i=e[3];if(i!==Symbol.for("react.early_return_sentinel"))return i;let r;return e[4]!==l||e[5]!==a?(r=t.jsx("div",{className:l,children:a}),e[4]=l,e[5]=a,e[6]=r):r=e[6],r}function Fe(n){const e=L.c(17),{icon:s,label:l,badge:a,defaultOpen:i,children:r}=n,o=i===void 0?!1:i,[c,d]=pe.useState(o);let m;e[0]!==c?(m=c?t.jsx(dt,{className:"size-4 text-muted-foreground"}):t.jsx(ct,{className:"size-4 text-muted-foreground"}),e[0]=c,e[1]=m):m=e[1];let u;e[2]!==l?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=u):u=e[3];let T;e[4]!==a?(T=a!=null&&t.jsx("span",{className:"ml-auto",children:a}),e[4]=a,e[5]=T):T=e[5];let p;e[6]!==s||e[7]!==m||e[8]!==u||e[9]!==T?(p=t.jsxs(Wt,{className:"flex w-full items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-left hover:bg-accent",children:[m,s,u,T]}),e[6]=s,e[7]=m,e[8]=u,e[9]=T,e[10]=p):p=e[10];let f;e[11]!==r?(f=t.jsx(Yt,{className:"pt-2",children:r}),e[11]=r,e[12]=f):f=e[12];let x;return e[13]!==c||e[14]!==p||e[15]!==f?(x=t.jsxs(Gt,{open:c,onOpenChange:d,children:[p,f]}),e[13]=c,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function bs(n){const e=L.c(51),{step:s,index:l,t:a}=n;let i;e[0]!==s.status?(i=Se(s.status),e[0]=s.status,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.status?(o=t.jsx(us,{status:s.status}),e[2]=s.status,e[3]=o):o=e[3];const c=s.step??l+1;let d;e[4]!==c?(d=t.jsx("span",{className:"font-mono text-2xs text-muted-foreground/60 tabular-nums",children:c}),e[4]=c,e[5]=d):d=e[5];let m;e[6]!==o||e[7]!==d?(m=t.jsxs("div",{className:"flex flex-col items-center gap-1",children:[o,d]}),e[6]=o,e[7]=d,e[8]=m):m=e[8];let u;e[9]!==l||e[10]!==s.actionDescription||e[11]!==s.name||e[12]!==a?(u=s.name??s.actionDescription??`${a("mainPanelTabs.e2eTab.steps")} ${l+1}`,e[9]=l,e[10]=s.actionDescription,e[11]=s.name,e[12]=a,e[13]=u):u=e[13];let T;e[14]!==s.critical||e[15]!==a?(T=s.critical&&t.jsx(te,{variant:"warning",className:"ml-2 align-middle",children:a("mainPanelTabs.e2eTab.critical")}),e[14]=s.critical,e[15]=a,e[16]=T):T=e[16];let p;e[17]!==u||e[18]!==T?(p=t.jsxs("span",{className:"truncate text-sm font-medium text-foreground",children:[u,T]}),e[17]=u,e[18]=T,e[19]=p):p=e[19];let f;e[20]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Je,{className:"size-3"}),e[20]=f):f=e[20];let x;e[21]!==s.durationMs?(x=Le(s.durationMs),e[21]=s.durationMs,e[22]=x):x=e[22];let v;e[23]!==x?(v=t.jsxs("span",{className:"flex shrink-0 items-center gap-1 font-mono text-2xs text-muted-foreground tabular-nums",children:[f,x]}),e[23]=x,e[24]=v):v=e[24];let y;e[25]!==v||e[26]!==p?(y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,v]}),e[25]=v,e[26]=p,e[27]=y):y=e[27];let h;e[28]!==s.actionDescription||e[29]!==s.name?(h=s.actionDescription&&s.actionDescription!==s.name&&t.jsx("p",{className:"text-xs text-muted-foreground",children:s.actionDescription}),e[28]=s.actionDescription,e[29]=s.name,e[30]=h):h=e[30];let P;e[31]!==s.usedSelector?(P=s.usedSelector&&t.jsxs("code",{className:"flex w-fit items-center gap-1 rounded bg-muted px-1.5 py-0.5 font-mono text-2xs text-foreground/70",children:[t.jsx(Vt,{className:"size-3 text-muted-foreground"}),s.usedSelector]}),e[31]=s.usedSelector,e[32]=P):P=e[32];let g;e[33]!==r||e[34]!==s.errorDetail||e[35]!==a?(g=r&&s.errorDetail&&t.jsxs("div",{className:"flex items-start gap-1.5 rounded-lg bg-destructive/10 px-2.5 py-2 text-xs text-destructive",children:[t.jsx(_t,{className:"mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.errorDetail.slug&&t.jsx("span",{className:"break-words",children:a("mainPanelTabs.e2eTab.missingSelector",{slug:s.errorDetail.slug})}),s.errorDetail.expected&&t.jsx("span",{className:"break-words text-destructive/80",children:a("mainPanelTabs.e2eTab.expected",{value:s.errorDetail.expected})}),s.errorDetail.suggestion&&t.jsx("span",{className:"break-words text-destructive/80",children:s.errorDetail.suggestion})]})]}),e[33]=r,e[34]=s.errorDetail,e[35]=a,e[36]=g):g=e[36];let b;e[37]!==l||e[38]!==s.name||e[39]!==s.screenshotUrl||e[40]!==a?(b=s.screenshotUrl&&t.jsx("a",{href:s.screenshotUrl,target:"_blank",rel:"noreferrer",className:"mt-1 w-fit","aria-label":a("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:s.screenshotUrl,alt:s.name??`step ${l+1}`,loading:"lazy",className:"max-h-44 rounded-lg border border-border"})}),e[37]=l,e[38]=s.name,e[39]=s.screenshotUrl,e[40]=a,e[41]=b):b=e[41];let N;e[42]!==y||e[43]!==h||e[44]!==P||e[45]!==g||e[46]!==b?(N=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[y,h,P,g,b]}),e[42]=y,e[43]=h,e[44]=P,e[45]=g,e[46]=b,e[47]=N):N=e[47];let j;return e[48]!==N||e[49]!==m?(j=t.jsxs("li",{className:"flex gap-3 py-2.5",children:[m,N]}),e[48]=N,e[49]=m,e[50]=j):j=e[50],j}function gs(n){const e=L.c(8),{entries:s,t:l}=n;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noConsole"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let a;e[4]!==s?(a=s.map(js),e[4]=s,e[5]=a):a=e[5];let i;return e[6]!==a?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:a}),e[6]=a,e[7]=i):i=e[7],i}function js(n,e){const s=(n.type??"").toLowerCase(),l=s==="error"?"text-destructive":s==="warning"||s==="warn"?"text-warning":"text-foreground/70";return t.jsx("div",{className:"border-b border-border/60 px-2.5 py-1.5 font-mono text-2xs last:border-b-0",children:t.jsx("span",{className:Ve("break-words",l),children:n.text})},e)}function Ts(n){const e=L.c(8),{entries:s,t:l}=n;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noNetwork"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let a;e[4]!==s?(a=s.map(vs),e[4]=s,e[5]=a):a=e[5];let i;return e[6]!==a?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:a}),e[6]=a,e[7]=i):i=e[7],i}function vs(n,e){const s=(n.status??0)>=400;return t.jsxs("div",{className:"flex items-center gap-2 border-b border-border/60 px-2.5 py-1.5 font-mono text-2xs last:border-b-0",children:[t.jsx("span",{className:Ve("tabular-nums",s?"text-destructive":"text-muted-foreground"),children:n.status??"—"}),t.jsx("span",{className:"w-10 shrink-0 text-muted-foreground/70",children:n.method}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground/70",children:n.url}),n.resourceType&&t.jsx("span",{className:"shrink-0 text-muted-foreground/50",children:n.resourceType})]},e)}function Ns(n){const e=L.c(57),{run:s,page:l,t:a}=n;let i;e[0]!==s.steps?(i=s.steps??[],e[0]=s.steps,e[1]=i):i=e[1];const r=i;let o;e[2]!==r?(o=r.filter(Ps),e[2]=r,e[3]=o):o=e[3];const c=o.length;let d;e[4]!==s.console?(d=s.console??[],e[4]=s.console,e[5]=d):d=e[5];const m=d;let u;e[6]!==s.network?(u=s.network??[],e[6]=s.network,e[7]=u):u=e[7];const T=u;let p;e[8]!==m?(p=m.some(ys),e[8]=m,e[9]=p):p=e[9];const f=p;let x;e[10]!==s.verdict||e[11]!==a?(x=t.jsx(et,{status:s.verdict,t:a}),e[10]=s.verdict,e[11]=a,e[12]=x):x=e[12];let v;e[13]!==s.funnelVerdict||e[14]!==s.verdict||e[15]!==a?(v=s.funnelVerdict&&s.funnelVerdict!==s.verdict&&t.jsxs("span",{children:[a("mainPanelTabs.e2eTab.funnel"),":"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.funnelVerdict})]}),e[13]=s.funnelVerdict,e[14]=s.verdict,e[15]=a,e[16]=v):v=e[16];let y;e[17]!==s.durationMs?(y=s.durationMs!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Je,{className:"size-3"}),Le(s.durationMs)]}),e[17]=s.durationMs,e[18]=y):y=e[18];let h;e[19]!==l?(h=l?.status!=null&&t.jsxs(te,{variant:l.status<400?"secondary":"destructive",children:["HTTP ",l.status]}),e[19]=l,e[20]=h):h=e[20];let P;e[21]!==x||e[22]!==v||e[23]!==y||e[24]!==h?(P=t.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[x,v,y,h]}),e[21]=x,e[22]=v,e[23]=y,e[24]=h,e[25]=P):P=e[25];let g;e[26]!==r?(g=r.length>0&&t.jsx(xs,{steps:r}),e[26]=r,e[27]=g):g=e[27];let b;e[28]!==l||e[29]!==a?(b=l?.vitals&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a("mainPanelTabs.e2eTab.vitals")}),t.jsx(Pt,{vitals:l.vitals})]}),e[28]=l,e[29]=a,e[30]=b):b=e[30];let N;e[31]!==c||e[32]!==r||e[33]!==a?(N=r.length>0&&t.jsx(Fe,{defaultOpen:!0,icon:t.jsx(Re,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.steps"),badge:c>0?t.jsx(te,{variant:"destructive",children:a("mainPanelTabs.e2eTab.failCount",{count:String(c)})}):t.jsx(te,{variant:"secondary",children:a("mainPanelTabs.e2eTab.stepsCount",{count:String(r.length)})}),children:t.jsx("ol",{className:"divide-y divide-border/60 rounded-lg border border-border px-3",children:r.map((D,z)=>t.jsx(bs,{step:D,index:z,t:a},z))})}),e[31]=c,e[32]=r,e[33]=a,e[34]=N):N=e[34];let j;e[35]!==m||e[36]!==f||e[37]!==a?(j=m.length>0&&t.jsx(Fe,{icon:t.jsx(Jt,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.console"),badge:t.jsx(te,{variant:f?"destructive":"secondary",children:m.length}),children:t.jsx(gs,{entries:m,t:a})}),e[35]=m,e[36]=f,e[37]=a,e[38]=j):j=e[38];let w;e[39]!==T||e[40]!==a?(w=T.length>0&&t.jsx(Fe,{icon:t.jsx(Ht,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.network"),badge:t.jsx(te,{variant:"secondary",children:T.length}),children:t.jsx(Ts,{entries:T,t:a})}),e[39]=T,e[40]=a,e[41]=w):w=e[41];let S;e[42]!==s.videoUrl||e[43]!==a?(S=s.videoUrl&&t.jsx(Fe,{icon:t.jsx(qt,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.video"),children:t.jsx("video",{controls:!0,src:s.videoUrl,className:"max-h-80 w-full rounded-lg border border-border"})}),e[42]=s.videoUrl,e[43]=a,e[44]=S):S=e[44];let C;e[45]!==s.traceUrl||e[46]!==a?(C=s.traceUrl&&t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsx(ge,{size:"sm",variant:"secondary",asChild:!0,children:t.jsxs("a",{href:`https://trace.playwright.dev/?trace=${encodeURIComponent(s.traceUrl)}`,target:"_blank",rel:"noreferrer",children:[t.jsx(ot,{className:"size-4"}),a("mainPanelTabs.e2eTab.openTrace")]})}),t.jsx("a",{href:s.traceUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-muted-foreground hover:text-foreground hover:underline",children:a("mainPanelTabs.e2eTab.downloadTrace")})]}),e[45]=s.traceUrl,e[46]=a,e[47]=C):C=e[47];let k;return e[48]!==P||e[49]!==g||e[50]!==b||e[51]!==N||e[52]!==j||e[53]!==w||e[54]!==S||e[55]!==C?(k=t.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[P,g,b,N,j,w,S,C]}),e[48]=P,e[49]=g,e[50]=b,e[51]=N,e[52]=j,e[53]=w,e[54]=S,e[55]=C,e[56]=k):k=e[56],k}function ys(n){return(n.type??"").toLowerCase()==="error"}function Ps(n){return Se(n.status)}function wt(n){const e=L.c(7),{artifacts:s,t:l}=n;let a;if(e[0]!==s||e[1]!==l){const i=s.filter(Ss),r=s.filter(ws);let o;e[3]!==l?(o=l("mainPanelTabs.e2eTab.artifacts"),e[3]=l,e[4]=o):o=e[4];let c;e[5]!==o?(c=t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:o}),e[5]=o,e[6]=c):c=e[6],a=t.jsxs("section",{className:"flex flex-col gap-2",children:[c,s.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:l("mainPanelTabs.e2eTab.noArtifacts")}):t.jsxs("div",{className:"flex flex-col gap-2",children:[i.length>0&&t.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:i.map((d,m)=>t.jsx("a",{href:d.url,target:"_blank",rel:"noreferrer","aria-label":d.name??l("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:d.url,alt:d.name??"screenshot",loading:"lazy",className:"w-full rounded-lg border border-border"})},`${d.name??"img"}-${m}`))}),r.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((d,m)=>t.jsxs("a",{href:d.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1 font-mono text-2xs text-foreground/80 hover:bg-accent",children:[d.name??l("mainPanelTabs.e2eTab.openArtifact"),t.jsx(ot,{className:"size-3 text-muted-foreground"})]},`${d.name??"artifact"}-${m}`))})]})]}),e[0]=s,e[1]=l,e[2]=a}else a=e[2];return a}function ws(n){return!/\.png$/i.test(n.name??"")}function Ss(n){return/\.png$/i.test(n.name??"")}function Cs(n){const e=L.c(9),{checks:s,artifacts:l,t:a}=n;let i;e[0]!==s||e[1]!==a?(i=s.length>0?t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a("mainPanelTabs.e2eTab.checksTitle")}),t.jsx("div",{className:"rounded-lg border border-border",children:t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:a("mainPanelTabs.e2eTab.colCheck")}),t.jsx(W,{children:a("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:a("mainPanelTabs.e2eTab.colViewport")}),t.jsx(W,{className:"text-right",children:a("mainPanelTabs.e2eTab.colDuration")})]})}),t.jsx(Xe,{children:s.map((c,d)=>t.jsxs(we,{children:[t.jsx(Y,{className:"text-xs text-foreground",children:c.name??"—"}),t.jsx(Y,{children:t.jsx(et,{status:c.status,t:a})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:c.viewport??"—"}),t.jsx(Y,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Le(c.durationMs)})]},`${c.name??"check"}-${d}`))})]})})]}):t.jsx("p",{className:"text-sm text-muted-foreground",children:a("mainPanelTabs.e2eTab.noReport")}),e[0]=s,e[1]=a,e[2]=i):i=e[2];let r;e[3]!==l||e[4]!==a?(r=t.jsx(wt,{artifacts:l,t:a}),e[3]=l,e[4]=a,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==r?(o=t.jsxs("div",{className:"flex flex-col gap-5",children:[i,r]}),e[6]=i,e[7]=r,e[8]=o):o=e[8],o}function ks(n){const e=L.c(46),{data:s,t:l}=n,a=s.report??null;let i;e[0]!==a?.runs?(i=a?.runs??[],e[0]=a?.runs,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.checks?(o=s.checks??[],e[2]=s.checks,e[3]=o):o=e[3];const c=o;let d;e[4]!==s.artifacts?(d=s.artifacts??[],e[4]=s.artifacts,e[5]=d):d=e[5];const m=d;let u;if(e[6]!==a?.pages){u=new Map;for(const h of a?.pages??[])h.viewport&&!u.has(h.viewport)&&u.set(h.viewport,h);e[6]=a?.pages,e[7]=u}else u=e[7];const T=r[0];if(a&&T){let h;e[8]!==T?(h=Qe(T,0),e[8]=T,e[9]=h):h=e[9];let P;if(e[10]!==r||e[11]!==l){let S;e[13]!==l?(S=(C,k)=>{const D=Qe(C,k);return t.jsxs(Xt,{value:D,variant:"underline",className:"gap-1.5",children:[Se(C.verdict)?t.jsx(We,{className:"size-3.5 text-destructive"}):t.jsx(Re,{className:"size-3.5 text-success"}),C.viewport??`${l("mainPanelTabs.e2eTab.viewport")} ${k+1}`]},D)},e[13]=l,e[14]=S):S=e[14],P=r.map(S),e[10]=r,e[11]=l,e[12]=P}else P=e[12];let g;e[15]!==P?(g=t.jsx(Zt,{variant:"underline",children:P}),e[15]=P,e[16]=g):g=e[16];let b;if(e[17]!==u||e[18]!==r||e[19]!==l){let S;e[21]!==u||e[22]!==l?(S=(C,k)=>{const D=Qe(C,k);return t.jsx(es,{value:D,children:t.jsx(Ns,{run:C,page:C.viewport?u.get(C.viewport):void 0,t:l})},D)},e[21]=u,e[22]=l,e[23]=S):S=e[23],b=r.map(S),e[17]=u,e[18]=r,e[19]=l,e[20]=b}else b=e[20];let N;e[24]!==h||e[25]!==g||e[26]!==b?(N=t.jsxs(ts,{variant:"underline",defaultValue:h,children:[g,b]}),e[24]=h,e[25]=g,e[26]=b,e[27]=N):N=e[27];let j;e[28]!==m||e[29]!==l?(j=m.length>0&&t.jsx(wt,{artifacts:m,t:l}),e[28]=m,e[29]=l,e[30]=j):j=e[30];let w;return e[31]!==N||e[32]!==j?(w=t.jsxs("div",{className:"flex flex-col gap-5",children:[N,j]}),e[31]=N,e[32]=j,e[33]=w):w=e[33],w}let p;e[34]!==a?.pages?(p=(a?.pages??[]).find($s)?.vitals,e[34]=a?.pages,e[35]=p):p=e[35];const f=p;let x;e[36]!==f||e[37]!==l?(x=f&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:l("mainPanelTabs.e2eTab.vitals")}),t.jsx(Pt,{vitals:f})]}),e[36]=f,e[37]=l,e[38]=x):x=e[38];let v;e[39]!==m||e[40]!==c||e[41]!==l?(v=t.jsx(Cs,{checks:c,artifacts:m,t:l}),e[39]=m,e[40]=c,e[41]=l,e[42]=v):v=e[42];let y;return e[43]!==x||e[44]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-5",children:[x,v]}),e[43]=x,e[44]=v,e[45]=y):y=e[45],y}function $s(n){return n.vitals}function Ds(n){const e=L.c(50),{base:s,orgSlug:l,site:a,run:i,onOpenChange:r}=n,o=Ee(),c=i?.runId??"",d=i!=null;let m;e[0]!==l||e[1]!==c||e[2]!==a?(m=xe.e2eRun(l,a,c),e[0]=l,e[1]=c,e[2]=a,e[3]=m):m=e[3];let u;e[4]!==s||e[5]!==c?(u=()=>ds(`${s}/e2e/runs/${encodeURIComponent(c)}`),e[4]=s,e[5]=c,e[6]=u):u=e[6];const T=d&&!!c;let p;e[7]!==m||e[8]!==u||e[9]!==T?(p={queryKey:m,queryFn:u,enabled:T,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[7]=m,e[8]=u,e[9]=T,e[10]=p):p=e[10];const f=_e(p),x=f.data,v=x?.status??i?.status??null,y=i?.summary?.command??null,h=i?.summary?.url??null,P=x?.report?.totalDurationMs??null,g=x?.report?.platform??null;let b;e[11]!==o||e[12]!==v?(b=t.jsx(et,{status:v,t:o}),e[11]=o,e[12]=v,e[13]=b):b=e[13];let N;e[14]!==c?(N=t.jsx(ss,{className:"font-mono text-sm text-foreground",children:c}),e[14]=c,e[15]=N):N=e[15];let j;e[16]!==b||e[17]!==N?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[b,N]}),e[16]=b,e[17]=N,e[18]=j):j=e[18];let w;e[19]!==y||e[20]!==o?(w=y&&t.jsxs("span",{children:[o("mainPanelTabs.e2eTab.command")," ",t.jsx("span",{className:"font-medium text-foreground",children:y})]}),e[19]=y,e[20]=o,e[21]=w):w=e[21];let S;e[22]!==g?(S=g&&t.jsx("span",{className:"font-medium text-foreground/70",children:g}),e[22]=g,e[23]=S):S=e[23];let C;e[24]!==P?(C=P!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Je,{className:"size-3"}),Le(P)]}),e[24]=P,e[25]=C):C=e[25];let k;e[26]!==h?(k=h&&t.jsx("a",{href:h,target:"_blank",rel:"noreferrer",className:"truncate font-mono text-foreground/70 hover:underline",children:h.replace(/^https?:\/\//,"")}),e[26]=h,e[27]=k):k=e[27];let D;e[28]!==C||e[29]!==k||e[30]!==w||e[31]!==S?(D=t.jsx(ls,{asChild:!0,children:t.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[w,S,C,k]})}),e[28]=C,e[29]=k,e[30]=w,e[31]=S,e[32]=D):D=e[32];let z;e[33]!==D||e[34]!==j?(z=t.jsxs(ns,{className:"border-b border-border",children:[j,D]}),e[33]=D,e[34]=j,e[35]=z):z=e[35];let F;e[36]!==x||e[37]!==f.error||e[38]!==f.isLoading||e[39]!==o?(F=ms(f.error)?t.jsx(De,{icon:t.jsx(Re,{className:"size-5"}),title:o("mainPanelTabs.e2eTab.notConnectedTitle"),description:o("mainPanelTabs.e2eTab.notConnectedDescription")}):f.isLoading?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx($e,{className:"h-9 w-full"}),t.jsx($e,{className:"h-24 w-full"}),t.jsx($e,{className:"h-40 w-full"})]}):f.error?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("mainPanelTabs.e2eTab.detailError")}):x?t.jsx(ks,{data:x,t:o}):null,e[36]=x,e[37]=f.error,e[38]=f.isLoading,e[39]=o,e[40]=F):F=e[40];let R;e[41]!==F?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:F}),e[41]=F,e[42]=R):R=e[42];let A;e[43]!==z||e[44]!==R?(A=t.jsxs(as,{side:"right",className:"w-full gap-0 p-0 sm:max-w-2xl",children:[z,R]}),e[43]=z,e[44]=R,e[45]=A):A=e[45];let E;return e[46]!==r||e[47]!==d||e[48]!==A?(E=t.jsx(rs,{open:d,onOpenChange:r,children:A}),e[46]=r,e[47]=d,e[48]=A,e[49]=E):E=e[49],E}const Me="once",_s=[{value:Me,labelKey:"mainPanelTabs.e2eTab.scheduleOnce"},{value:"0 * * * *",labelKey:"mainPanelTabs.e2eTab.scheduleHourly"},{value:"0 8 * * *",labelKey:"mainPanelTabs.e2eTab.scheduleDaily"},{value:"0 8 * * 1",labelKey:"mainPanelTabs.e2eTab.scheduleWeekly"}];function zs(n){const e=L.c(16),{phase:s,t:l}=n,a=(s??"").toLowerCase();if(a==="running"){let o;e[0]!==l?(o=l("mainPanelTabs.e2eTab.statusRunning"),e[0]=l,e[1]=o):o=e[1];let c;return e[2]!==o?(c=t.jsx(te,{variant:"warning",children:o}),e[2]=o,e[3]=c):c=e[3],c}if(a==="succeeded"){let o;e[4]!==l?(o=l("mainPanelTabs.e2eTab.phaseRan"),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==o?(c=t.jsx(te,{variant:"secondary",children:o}),e[6]=o,e[7]=c):c=e[7],c}if(a==="failed"){let o;e[8]!==l?(o=l("mainPanelTabs.e2eTab.phaseErrored"),e[8]=l,e[9]=o):o=e[9];let c;return e[10]!==o?(c=t.jsx(te,{variant:"destructive",children:o}),e[10]=o,e[11]=c):c=e[11],c}let i;e[12]!==l?(i=l("mainPanelTabs.e2eTab.phasePending"),e[12]=l,e[13]=i):i=e[13];let r;return e[14]!==i?(r=t.jsx(te,{variant:"secondary",children:i}),e[14]=i,e[15]=r):r=e[15],r}function ze(n,e){if(Array.isArray(n))return n;if(n&&typeof n=="object"){const s=n[e];if(Array.isArray(s))return s}return[]}function St(n){const e=(n??"").toLowerCase();return e.includes("pass")||e.includes("success")||e.includes("ok")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("run")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Es(n,e){const s=St(n);return s==="success"?e("mainPanelTabs.e2eTab.statusPassed"):s==="destructive"?e("mainPanelTabs.e2eTab.statusFailed"):s==="warning"?e("mainPanelTabs.e2eTab.statusRunning"):n??"—"}function Rs(n,e){const s=[],l=n.summary?.exitCode;typeof l=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryExitCode",{code:String(l)}));const a=n.summary?.fileCount;return typeof a=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryFiles",{count:String(a)})),s.length>0?s.join(" · "):"—"}function Ct(n){if(!n)return"—";const e=new Date(n).getTime();if(Number.isNaN(e))return"—";const s=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,r]of a)if(Math.abs(s)>=r)return l.format(-Math.round(s/r),i);return l.format(-s,"second")}class tt extends Error{constructor(e,s){super(e),this.status=s}status}function Ls(n){return n instanceof tt&&n.status===401}function Oe(n){return n instanceof Error?n.message:String(n)}async function Ie(n){const e=await fetch(n),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new tt(l,e.status)}return s}async function qe(n,e,s){const l=await fetch(n,{method:e,headers:s!==void 0?{"Content-Type":"application/json"}:{},body:s!==void 0?JSON.stringify(s):void 0}),a=await l.json().catch(()=>({}));if(!l.ok){const i=a&&typeof a=="object"&&"error"in a?String(a.error):`request failed (${l.status})`;throw new tt(i,l.status)}return a}function kt(n){const e=L.c(15),{title:s,count:l,action:a,children:i}=n;let r;e[0]!==s?(r=t.jsx("h3",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1];let o;e[2]!==l?(o=typeof l=="number"&&l>0&&t.jsx(te,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=o):o=e[3];let c;e[4]!==a?(c=a?t.jsx("div",{className:"ml-auto",children:a}):null,e[4]=a,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d=t.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[r,o,c]}),e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];let m;e[10]!==i?(m=t.jsx("div",{className:"p-2",children:i}),e[10]=i,e[11]=m):m=e[11];let u;return e[12]!==d||e[13]!==m?(u=t.jsxs("section",{className:"surface overflow-hidden",children:[d,m]}),e[12]=d,e[13]=m,e[14]=u):u=e[14],u}function $t(n){const e=L.c(3),{cols:s}=n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let a;return e[1]!==s?(a=t.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(i=>t.jsx("div",{className:"flex gap-3",children:Array.from({length:s}).map(As)},i))}),e[1]=s,e[2]=a):a=e[2],a}function As(n,e){return t.jsx($e,{className:"h-4 flex-1"},e)}function Dt(n){const e=L.c(2),{children:s}=n;let l;return e[0]!==s?(l=t.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1],l}function Fs(n){const e=L.c(117),{base:s,orgSlug:l,site:a}=n,i=Ee(),r=He(),[o,c]=pe.useState(!1),[d,m]=pe.useState(""),[u,T]=pe.useState(Me),[p,f]=pe.useState("");let x;e[0]!==l||e[1]!==a?(x=xe.e2eTypes(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let v;e[3]!==s?(v=()=>Ie(`${s}/e2e/types`),e[3]=s,e[4]=v):v=e[4];let y;e[5]!==o||e[6]!==x||e[7]!==v?(y={queryKey:x,queryFn:v,enabled:o,retry:!1,staleTime:6e4},e[5]=o,e[6]=x,e[7]=v,e[8]=y):y=e[8];const h=_e(y),P=ze(h.data,"items");let g;e[9]!==s?(g=de=>{const st=de.schedule===Me?"":de.schedule,lt=de.url.trim();return qe(`${s}/e2e/runs`,"POST",{command:de.command,...st?{schedule:st}:{},...lt?{url:lt}:{}})},e[9]=s,e[10]=g):g=e[10];let b;e[11]!==l||e[12]!==r||e[13]!==a||e[14]!==i?(b=()=>{r.invalidateQueries({queryKey:xe.e2eRuns(l,a)}),r.invalidateQueries({queryKey:xe.e2eChecks(l,a)}),be.success(i("mainPanelTabs.e2eTab.toastRunQueued")),c(!1),m(""),T(Me),f("")},e[11]=l,e[12]=r,e[13]=a,e[14]=i,e[15]=b):b=e[15];let N;e[16]!==g||e[17]!==b?(N={mutationFn:g,onSuccess:b,onError:Us},e[16]=g,e[17]=b,e[18]=N):N=e[18];const j=Ue(N);let w;e[19]!==d?(w=de=>de.id===d,e[19]=d,e[20]=w):w=e[20];const S=P.find(w);let C,k;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=()=>c(!0),k=t.jsx(mt,{className:"size-4"}),e[21]=C,e[22]=k):(C=e[21],k=e[22]);let D;e[23]!==i?(D=i("mainPanelTabs.e2eTab.runTest"),e[23]=i,e[24]=D):D=e[24];let z;e[25]!==D?(z=t.jsxs(ge,{size:"sm",onClick:C,children:[k,D]}),e[25]=D,e[26]=z):z=e[26];const F=At,R=Lt,A="sm:max-w-md";let E;e[27]!==i?(E=i("mainPanelTabs.e2eTab.runTestTitle"),e[27]=i,e[28]=E):E=e[28];let B;e[29]!==E?(B=t.jsx(Ft,{children:t.jsx(Mt,{children:E})}),e[29]=E,e[30]=B):B=e[30];const G="flex flex-col gap-3";let me;e[31]!==i?(me=i("mainPanelTabs.e2eTab.runTestDescription"),e[31]=i,e[32]=me):me=e[32];let M;e[33]!==me?(M=t.jsx("p",{className:"text-sm text-muted-foreground",children:me}),e[33]=me,e[34]=M):M=e[34];let U;e[35]!==i?(U=i("mainPanelTabs.e2eTab.targetUrl"),e[35]=i,e[36]=U):U=e[36];let I;e[37]!==U?(I=t.jsx(Be,{htmlFor:"e2e-url",children:U}),e[37]=U,e[38]=I):I=e[38];let X;e[39]!==i?(X=i("mainPanelTabs.e2eTab.targetUrlPlaceholder"),e[39]=i,e[40]=X):X=e[40];let Z;e[41]===Symbol.for("react.memo_cache_sentinel")?(Z=de=>f(de.target.value),e[41]=Z):Z=e[41];let q;e[42]!==j.isPending||e[43]!==X||e[44]!==p?(q=t.jsx(Rt,{id:"e2e-url",type:"url",inputMode:"url",placeholder:X,value:p,onChange:Z,className:"font-mono text-xs",disabled:j.isPending}),e[42]=j.isPending,e[43]=X,e[44]=p,e[45]=q):q=e[45];let V;e[46]!==i?(V=i("mainPanelTabs.e2eTab.targetUrlHint"),e[46]=i,e[47]=V):V=e[47];let O;e[48]!==V?(O=t.jsx("p",{className:"text-xs text-muted-foreground",children:V}),e[48]=V,e[49]=O):O=e[49];let Q;e[50]!==I||e[51]!==q||e[52]!==O?(Q=t.jsxs("div",{className:"flex flex-col gap-2",children:[I,q,O]}),e[50]=I,e[51]=q,e[52]=O,e[53]=Q):Q=e[53];const se="flex flex-col gap-2";let _;e[54]!==i?(_=i("mainPanelTabs.e2eTab.selectType"),e[54]=i,e[55]=_):_=e[55];let ee;e[56]!==_?(ee=t.jsx(Be,{children:_}),e[56]=_,e[57]=ee):ee=e[57];const Ce=h.isLoading?t.jsx($e,{className:"h-9 w-full"}):h.error?t.jsx("p",{className:"text-xs text-destructive",children:i("mainPanelTabs.e2eTab.typesError")}):P.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.e2eTab.noTypes")}):t.jsxs(nt,{value:d,onValueChange:m,children:[t.jsx(at,{className:"w-full",children:t.jsx(rt,{placeholder:i("mainPanelTabs.e2eTab.selectTypePlaceholder")})}),t.jsx(it,{children:P.map(Ms)})]});let le;e[58]!==S?(le=S?.description&&t.jsx("p",{className:"text-xs text-muted-foreground",children:S.description}),e[58]=S,e[59]=le):le=e[59];let ne;e[60]!==ee||e[61]!==Ce||e[62]!==le?(ne=t.jsxs("div",{className:se,children:[ee,Ce,le]}),e[60]=ee,e[61]=Ce,e[62]=le,e[63]=ne):ne=e[63];let ae;e[64]!==i?(ae=i("mainPanelTabs.e2eTab.scheduleLabel"),e[64]=i,e[65]=ae):ae=e[65];let he;e[66]!==ae?(he=t.jsx(Be,{children:ae}),e[66]=ae,e[67]=he):he=e[67];let ue;e[68]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(at,{className:"w-full",children:t.jsx(rt,{})}),e[68]=ue):ue=e[68];let re;e[69]!==i?(re=_s.map(de=>t.jsx(vt,{value:de.value,children:i(de.labelKey)},de.value||"once")),e[69]=i,e[70]=re):re=e[70];let ie;e[71]!==re?(ie=t.jsx(it,{children:re}),e[71]=re,e[72]=ie):ie=e[72];let oe;e[73]!==u||e[74]!==ie?(oe=t.jsxs(nt,{value:u,onValueChange:T,children:[ue,ie]}),e[73]=u,e[74]=ie,e[75]=oe):oe=e[75];let ce;e[76]!==he||e[77]!==oe?(ce=t.jsxs("div",{className:"flex flex-col gap-2",children:[he,oe]}),e[76]=he,e[77]=oe,e[78]=ce):ce=e[78];let fe;e[79]!==M||e[80]!==Q||e[81]!==ne||e[82]!==ce?(fe=t.jsxs("div",{className:G,children:[M,Q,ne,ce]}),e[79]=M,e[80]=Q,e[81]=ne,e[82]=ce,e[83]=fe):fe=e[83];let $;e[84]===Symbol.for("react.memo_cache_sentinel")?($=()=>c(!1),e[84]=$):$=e[84];const H=j.isPending;let K;e[85]!==i?(K=i("mainPanelTabs.e2eTab.cancel"),e[85]=i,e[86]=K):K=e[86];let J;e[87]!==j.isPending||e[88]!==K?(J=t.jsx(ge,{variant:"outline",type:"button",onClick:$,disabled:H,children:K}),e[87]=j.isPending,e[88]=K,e[89]=J):J=e[89];let je;e[90]!==d||e[91]!==j||e[92]!==u||e[93]!==p?(je=()=>d&&j.mutate({command:d,schedule:u,url:p}),e[90]=d,e[91]=j,e[92]=u,e[93]=p,e[94]=je):je=e[94];const Ke=!d||j.isPending;let Te;e[95]!==j.isPending||e[96]!==i?(Te=j.isPending?i("mainPanelTabs.e2eTab.running"):i("mainPanelTabs.e2eTab.runConfirm"),e[95]=j.isPending,e[96]=i,e[97]=Te):Te=e[97];let ve;e[98]!==je||e[99]!==Ke||e[100]!==Te?(ve=t.jsx(ge,{type:"button",onClick:je,disabled:Ke,children:Te}),e[98]=je,e[99]=Ke,e[100]=Te,e[101]=ve):ve=e[101];let Ne;e[102]!==J||e[103]!==ve?(Ne=t.jsxs(Ut,{children:[J,ve]}),e[102]=J,e[103]=ve,e[104]=Ne):Ne=e[104];let ye;e[105]!==R||e[106]!==B||e[107]!==fe||e[108]!==Ne?(ye=t.jsxs(R,{className:A,children:[B,fe,Ne]}),e[105]=R,e[106]=B,e[107]=fe,e[108]=Ne,e[109]=ye):ye=e[109];let Pe;e[110]!==F||e[111]!==o||e[112]!==ye?(Pe=t.jsx(F,{open:o,onOpenChange:c,children:ye}),e[110]=F,e[111]=o,e[112]=ye,e[113]=Pe):Pe=e[113];let Ae;return e[114]!==z||e[115]!==Pe?(Ae=t.jsxs(t.Fragment,{children:[z,Pe]}),e[114]=z,e[115]=Pe,e[116]=Ae):Ae=e[116],Ae}function Ms(n){return t.jsx(vt,{value:n.id,textValue:n.label??n.id,children:t.jsx("span",{className:"text-sm",children:n.label??n.id})},n.id)}function Us(n){return be.error(Oe(n))}function Is(){const n=L.c(17),e=Ee(),[s,l]=pe.useState(!1);let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>l(qs),n[0]=a):a=n[0];let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Kt,{className:"size-4 text-muted-foreground"}),n[1]=i):i=n[1];let r;n[2]!==e?(r=e("mainPanelTabs.e2eTab.helpTitle"),n[2]=e,n[3]=r):r=n[3];let o;n[4]!==r?(o=t.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),n[4]=r,n[5]=o):o=n[5];let c;n[6]!==s?(c=s?t.jsx(dt,{className:"ml-auto size-4 text-muted-foreground"}):t.jsx(ct,{className:"ml-auto size-4 text-muted-foreground"}),n[6]=s,n[7]=c):c=n[7];let d;n[8]!==o||n[9]!==c?(d=t.jsxs("button",{type:"button",onClick:a,className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[i,o,c]}),n[8]=o,n[9]=c,n[10]=d):d=n[10];let m;n[11]!==s||n[12]!==e?(m=s&&t.jsxs("div",{className:"flex flex-col gap-2 border-t border-border px-4 py-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpIntro")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpTypes")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpRun")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpResults")})]}),n[11]=s,n[12]=e,n[13]=m):m=n[13];let u;return n[14]!==d||n[15]!==m?(u=t.jsxs("div",{className:"surface",children:[d,m]}),n[14]=d,n[15]=m,n[16]=u):u=n[16],u}function qs(n){return!n}function Vs(n){const e=L.c(71),{base:s,orgSlug:l,site:a,enabled:i}=n,r=Ee(),o=He(),[c,d]=pe.useState(!1);let m;e[0]!==l||e[1]!==a?(m=xe.e2eChecks(l,a),e[0]=l,e[1]=a,e[2]=m):m=e[2];let u;e[3]!==s?(u=()=>Ie(`${s}/e2e/checks`),e[3]=s,e[4]=u):u=e[4];let T;e[5]!==i||e[6]!==m||e[7]!==u?(T={queryKey:m,queryFn:u,enabled:i,retry:!1,staleTime:15e3,refetchInterval:Bs},e[5]=i,e[6]=m,e[7]=u,e[8]=T):T=e[8];const p=_e(T),f=ze(p.data,"items");let x;e[9]!==l||e[10]!==o||e[11]!==a?(x=()=>{o.invalidateQueries({queryKey:xe.e2eChecks(l,a)}),o.invalidateQueries({queryKey:xe.e2eRuns(l,a)})},e[9]=l,e[10]=o,e[11]=a,e[12]=x):x=e[12];const v=x;let y;e[13]!==s?(y=_=>qe(`${s}/e2e/runs`,"POST",{command:_}),e[13]=s,e[14]=y):y=e[14];let h;e[15]!==v||e[16]!==r?(h=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastRunQueued"))},e[15]=v,e[16]=r,e[17]=h):h=e[17];let P;e[18]!==y||e[19]!==h?(P={mutationFn:y,onSuccess:h,onError:Ks},e[18]=y,e[19]=h,e[20]=P):P=e[20];const g=Ue(P);let b;e[21]!==s?(b=()=>qe(`${s}/e2e/checks`,"DELETE"),e[21]=s,e[22]=b):b=e[22];let N;e[23]!==v||e[24]!==r?(N=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastCheckDeleted")),d(!1)},e[23]=v,e[24]=r,e[25]=N):N=e[25];let j;e[26]!==b||e[27]!==N?(j={mutationFn:b,onSuccess:N,onError:Os},e[26]=b,e[27]=N,e[28]=j):j=e[28];const w=Ue(j),S=g.isPending||w.isPending,C=kt;let k;e[29]!==r?(k=r("mainPanelTabs.e2eTab.checksSection"),e[29]=r,e[30]=k):k=e[30];const D=f.length,z=f.length>0?t.jsxs(ge,{size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive",onClick:()=>d(!0),disabled:S,children:[t.jsx(ut,{className:"size-4"}),r("mainPanelTabs.e2eTab.deleteAllChecks")]}):null,F=p.isLoading?t.jsx($t,{cols:6}):p.error?t.jsx(Dt,{children:r("mainPanelTabs.e2eTab.checksError")}):f.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:r("mainPanelTabs.e2eTab.noChecks")}):t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:r("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colCommand")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colSchedule")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.url")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colUpdated")}),t.jsx(W,{className:"w-[1%]"})]})}),t.jsx(Xe,{children:f.map((_,ee)=>t.jsxs(we,{children:[t.jsx(Y,{children:t.jsx(zs,{phase:_.phase,t:r})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:_.command??"—"}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:_.schedule?_.schedule:"—"}),t.jsx(Y,{className:"max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:_.url??"—"}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ct(_.updatedAt)}),t.jsx(Y,{className:"text-right align-middle whitespace-nowrap",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":r("mainPanelTabs.e2eTab.rerun"),title:r("mainPanelTabs.e2eTab.rerun"),onClick:()=>_.command&&g.mutate(_.command),disabled:S||!_.command,children:t.jsx(mt,{className:"size-4"})})})]},`${_.subject??a}-${_.command??""}-${ee}`))})]});let R;e[31]!==r?(R=r("mainPanelTabs.e2eTab.confirmDeleteCheckTitle"),e[31]=r,e[32]=R):R=e[32];let A;e[33]!==R?(A=t.jsx(ft,{children:R}),e[33]=R,e[34]=A):A=e[34];let E;e[35]!==r?(E=r("mainPanelTabs.e2eTab.confirmDeleteCheck"),e[35]=r,e[36]=E):E=e[36];let B;e[37]!==E?(B=t.jsx(xt,{children:E}),e[37]=E,e[38]=B):B=e[38];let G;e[39]!==A||e[40]!==B?(G=t.jsxs(pt,{children:[A,B]}),e[39]=A,e[40]=B,e[41]=G):G=e[41];const me=w.isPending;let M;e[42]!==r?(M=r("mainPanelTabs.e2eTab.cancel"),e[42]=r,e[43]=M):M=e[43];let U;e[44]!==w.isPending||e[45]!==M?(U=t.jsx(ht,{disabled:me,children:M}),e[44]=w.isPending,e[45]=M,e[46]=U):U=e[46];let I;e[47]!==w?(I=_=>{_.preventDefault(),w.mutate()},e[47]=w,e[48]=I):I=e[48];const X=w.isPending;let Z;e[49]!==r?(Z=r("mainPanelTabs.e2eTab.delete"),e[49]=r,e[50]=Z):Z=e[50];let q;e[51]!==w.isPending||e[52]!==I||e[53]!==Z?(q=t.jsx(bt,{variant:"destructive",onClick:I,disabled:X,children:Z}),e[51]=w.isPending,e[52]=I,e[53]=Z,e[54]=q):q=e[54];let V;e[55]!==U||e[56]!==q?(V=t.jsxs(gt,{children:[U,q]}),e[55]=U,e[56]=q,e[57]=V):V=e[57];let O;e[58]!==G||e[59]!==V?(O=t.jsxs(jt,{children:[G,V]}),e[58]=G,e[59]=V,e[60]=O):O=e[60];let Q;e[61]!==c||e[62]!==O?(Q=t.jsx(Tt,{open:c,onOpenChange:d,children:O}),e[61]=c,e[62]=O,e[63]=Q):Q=e[63];let se;return e[64]!==C||e[65]!==f||e[66]!==k||e[67]!==z||e[68]!==F||e[69]!==Q?(se=t.jsxs(C,{title:k,count:D,action:z,children:[F,Q]}),e[64]=C,e[65]=f,e[66]=k,e[67]=z,e[68]=F,e[69]=Q,e[70]=se):se=e[70],se}function Os(n){return be.error(Oe(n))}function Ks(n){return be.error(Oe(n))}function Bs(n){return ze(n.state.data,"items").some(Qs)?5e3:!1}function Qs(n){const e=(n.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}function Hs(n){const e=L.c(107),{virtualMcpId:s}=n,l=Ee(),{org:a}=Et(),i=Bt(s),r=Qt(i),o=!!r,c=r?`/api/${a.slug}/hosting/${encodeURIComponent(r)}`:"",d=He(),[m,u]=pe.useState(null),[T,p]=pe.useState(null);let f;e[0]!==c?(f=()=>Ie(`${c}/e2e/checks`),e[0]=c,e[1]=f):f=e[1];const x=_e({queryKey:xe.e2eChecks(a.slug,r??""),queryFn:f,enabled:o,retry:!1,staleTime:15e3}),v=ze(x.data,"items").some(Ws);let y;e[2]!==c?(y=()=>Ie(`${c}/e2e/runs`),e[2]=c,e[3]=y):y=e[3];const h=_e({queryKey:xe.e2eRuns(a.slug,r??""),queryFn:y,enabled:o,retry:!1,staleTime:3e4,refetchInterval:v?5e3:!1});let P;e[4]!==c?(P=$=>qe(`${c}/e2e/runs/${encodeURIComponent($)}`,"DELETE"),e[4]=c,e[5]=P):P=e[5];const g=Ue({mutationFn:P,onSuccess:()=>{d.invalidateQueries({queryKey:xe.e2eRuns(a.slug,r??"")}),be.success(l("mainPanelTabs.e2eTab.toastRunDeleted")),p(null)},onError:Js});if(!r){let $;e[6]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[6]=$):$=e[6];let H;e[7]!==l?(H=l("mainPanelTabs.e2eTab.noSiteTitle"),e[7]=l,e[8]=H):H=e[8];let K;e[9]!==l?(K=l("mainPanelTabs.e2eTab.noSiteDescription"),e[9]=l,e[10]=K):K=e[10];let J;return e[11]!==H||e[12]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:H,description:K})}),e[11]=H,e[12]=K,e[13]=J):J=e[13],J}if(Ls(h.error)){let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[14]=$):$=e[14];let H;e[15]!==l?(H=l("mainPanelTabs.e2eTab.notConnectedTitle"),e[15]=l,e[16]=H):H=e[16];let K;e[17]!==l?(K=l("mainPanelTabs.e2eTab.notConnectedDescription"),e[17]=l,e[18]=K):K=e[18];let J;return e[19]!==H||e[20]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:H,description:K})}),e[19]=H,e[20]=K,e[21]=J):J=e[21],J}const b=ze(h.data,"items"),N="h-full min-h-0 overflow-y-auto",j="mx-auto flex max-w-4xl flex-col gap-6 p-6";let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(ke,{className:"size-[18px] text-muted-foreground"}),e[22]=w):w=e[22];let S;e[23]!==l?(S=l("mainPanelTabs.e2eTab.title"),e[23]=l,e[24]=S):S=e[24];let C;e[25]!==S?(C=t.jsxs("div",{className:"flex items-center gap-2",children:[w,t.jsx("h2",{className:"text-base font-semibold text-foreground",children:S})]}),e[25]=S,e[26]=C):C=e[26];const k=l("mainPanelTabs.e2eTab.subtitle",{site:r});let D;e[27]!==k?(D=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[27]=k,e[28]=D):D=e[28];let z;e[29]!==D||e[30]!==C?(z=t.jsxs("div",{className:"flex flex-col gap-1",children:[C,D]}),e[29]=D,e[30]=C,e[31]=z):z=e[31];let F;e[32]!==c||e[33]!==a.slug||e[34]!==r?(F=t.jsx(Fs,{base:c,orgSlug:a.slug,site:r}),e[32]=c,e[33]=a.slug,e[34]=r,e[35]=F):F=e[35];let R;e[36]!==z||e[37]!==F?(R=t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[z,F]}),e[36]=z,e[37]=F,e[38]=R):R=e[38];let A;e[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Is,{}),e[39]=A):A=e[39];let E;e[40]!==c||e[41]!==o||e[42]!==a.slug||e[43]!==r?(E=t.jsx(Vs,{base:c,orgSlug:a.slug,site:r,enabled:o}),e[40]=c,e[41]=o,e[42]=a.slug,e[43]=r,e[44]=E):E=e[44];const B=kt;let G;e[45]!==l?(G=l("mainPanelTabs.e2eTab.runs"),e[45]=l,e[46]=G):G=e[46];const me=h.isLoading?t.jsx($t,{cols:5}):h.error?t.jsx(Dt,{children:l("mainPanelTabs.e2eTab.runsError")}):b.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:l("mainPanelTabs.e2eTab.noRuns")}):t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:l("mainPanelTabs.e2eTab.colRun")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colCommand")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colStarted")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colSummary")}),t.jsx(W,{className:"w-[1%]"})]})}),t.jsx(Xe,{children:b.map($=>t.jsxs(we,{className:"cursor-pointer",onClick:()=>u($),children:[t.jsx(Y,{className:"font-mono text-xs",children:$.runId}),t.jsx(Y,{children:t.jsx(te,{variant:St($.status),children:Es($.status,l)})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:$.summary?.command??"—"}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ct($.startedAt)}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap tabular-nums",children:Rs($,l)}),t.jsx(Y,{className:"text-right align-middle",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":l("mainPanelTabs.e2eTab.deleteRun"),onClick:H=>{H.stopPropagation(),p($)},disabled:g.isPending,children:t.jsx(ut,{className:"size-4"})})})]},$.runId))})]});let M;e[47]!==B||e[48]!==b||e[49]!==G||e[50]!==me?(M=t.jsx(B,{title:G,count:b.length,children:me}),e[47]=B,e[48]=b,e[49]=G,e[50]=me,e[51]=M):M=e[51];let U;e[52]!==R||e[53]!==A||e[54]!==E||e[55]!==M?(U=t.jsxs("div",{className:j,children:[R,A,E,M]}),e[52]=R,e[53]=A,e[54]=E,e[55]=M,e[56]=U):U=e[56];let I;e[57]!==u?(I=$=>{$||u(null)},e[57]=u,e[58]=I):I=e[58];let X;e[59]!==c||e[60]!==a.slug||e[61]!==m||e[62]!==r||e[63]!==I?(X=t.jsx(Ds,{base:c,orgSlug:a.slug,site:r,run:m,onOpenChange:I}),e[59]=c,e[60]=a.slug,e[61]=m,e[62]=r,e[63]=I,e[64]=X):X=e[64];const Z=T!=null;let q;e[65]!==p?(q=$=>{$||p(null)},e[65]=p,e[66]=q):q=e[66];let V;e[67]!==l?(V=l("mainPanelTabs.e2eTab.confirmDeleteRunTitle"),e[67]=l,e[68]=V):V=e[68];let O;e[69]!==V?(O=t.jsx(ft,{children:V}),e[69]=V,e[70]=O):O=e[70];const Q=T?.runId??"";let se;e[71]!==l||e[72]!==Q?(se=l("mainPanelTabs.e2eTab.confirmDeleteRun",{runId:Q}),e[71]=l,e[72]=Q,e[73]=se):se=e[73];let _;e[74]!==se?(_=t.jsx(xt,{children:se}),e[74]=se,e[75]=_):_=e[75];let ee;e[76]!==O||e[77]!==_?(ee=t.jsxs(pt,{children:[O,_]}),e[76]=O,e[77]=_,e[78]=ee):ee=e[78];const Ce=g.isPending;let le;e[79]!==l?(le=l("mainPanelTabs.e2eTab.cancel"),e[79]=l,e[80]=le):le=e[80];let ne;e[81]!==g.isPending||e[82]!==le?(ne=t.jsx(ht,{disabled:Ce,children:le}),e[81]=g.isPending,e[82]=le,e[83]=ne):ne=e[83];let ae;e[84]!==g||e[85]!==T?(ae=$=>{$.preventDefault(),T&&g.mutate(T.runId)},e[84]=g,e[85]=T,e[86]=ae):ae=e[86];const he=g.isPending;let ue;e[87]!==l?(ue=l("mainPanelTabs.e2eTab.delete"),e[87]=l,e[88]=ue):ue=e[88];let re;e[89]!==g.isPending||e[90]!==ae||e[91]!==ue?(re=t.jsx(bt,{variant:"destructive",onClick:ae,disabled:he,children:ue}),e[89]=g.isPending,e[90]=ae,e[91]=ue,e[92]=re):re=e[92];let ie;e[93]!==ne||e[94]!==re?(ie=t.jsxs(gt,{children:[ne,re]}),e[93]=ne,e[94]=re,e[95]=ie):ie=e[95];let oe;e[96]!==ee||e[97]!==ie?(oe=t.jsxs(jt,{children:[ee,ie]}),e[96]=ee,e[97]=ie,e[98]=oe):oe=e[98];let ce;e[99]!==Z||e[100]!==q||e[101]!==oe?(ce=t.jsx(Tt,{open:Z,onOpenChange:q,children:oe}),e[99]=Z,e[100]=q,e[101]=oe,e[102]=ce):ce=e[102];let fe;return e[103]!==U||e[104]!==X||e[105]!==ce?(fe=t.jsxs("div",{className:N,children:[U,X,ce]}),e[103]=U,e[104]=X,e[105]=ce,e[106]=fe):fe=e[106],fe}function Js(n){return be.error(Oe(n))}function Ws(n){const e=(n.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}function Ys(){const n=L.c(3),e=cs(),s=os();let l;return n[0]!==s.e2e||n[1]!==e?(l=s.e2e?t.jsx(Hs,{virtualMcpId:e}):t.jsx(is,{virtualMcpId:e}),n[0]=s.e2e,n[1]=e,n[2]=l):l=n[2],l}function za(){const n=L.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(It.Content,{children:t.jsx(Ys,{})}),n[0]=e):e=n[0],e}export{za as default};
1
+ import{c as L,b as Ee,m as _e,j as t,b2 as $e,a5 as ot,l as Ve,K as xe,B as ge,r as pe,a3 as _t,dd as zt,av as ct,a2 as Et,o as He,e as Ue,t as be,I as Rt,q as Lt,D as At,s as Ft,v as Mt,w as Ut}from"./index-CaH7O3hJ.js";import{C as It}from"./index-DUXVtfV1.js";import{aC as Je,F as We,bB as qt,bC as Vt,bD as Ot,v as ke,bE as mt,O as Kt}from"./agent-icon-U4gZaLOQ.js";import{t as dt}from"./ChevronUp-C8mqlnDX.js";import{s as ut}from"./Trash01-D92WhXf2.js";import{B as te}from"./badge-Cnnepvq1.js";import{L as Be}from"./label-Cnc4HQwP.js";import{A as ft,a as xt,b as pt,c as ht,g as bt,d as gt,e as jt,f as Tt}from"./alert-dialog-CKDHmJ-l.js";import{S as nt,b as at,a as rt,d as it,c as vt}from"./select-CSQbGY9x.js";import{e as Ye,a as Ge,b as we,T as W,d as Xe,c as Y}from"./table-BQLxO2Sb.js";import{E as De}from"./empty-state-Cu20Qj3-.js";import{a as Bt}from"./repository-binding-BLgLcT4o.js";import{r as Qt}from"./site-slug-DebpOoQq.js";import{i as Re}from"./CheckCircle-C2ndOEUO.js";import{i as Ht}from"./Monitor01-D3VwU2ni.js";import{d as Jt}from"./UserSquare-Drp4z0v0.js";import{C as Wt,a as Yt,b as Gt}from"./collapsible-CeBZpglT.js";import{T as Xt,a as Zt,c as es,b as ts}from"./tabs-2NCCfhSA.js";import{S as ss,d as ls,c as ns,a as as,b as rs}from"./sheet-C-yunzji.js";import{S as is}from"./settings-tab-BmEKDSFe.js";import{e as os}from"./use-organization-settings-DhvN44pQ.js";import{b as cs}from"./thread-route-CQ0phZyI.js";import"./use-mobile-DCpa1RnA.js";import"./use-sidebar-collapsed-DPHQfMII.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./use-panel-navigate-DoD4Atgz.js";import"./use-project-scope-Cq4vb2Sy.js";import"./thread-intent-DKuqiaG7.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./toolbar-icon-button-BPY5dUh9.js";import"./shell-layout-vQvYndIW.js";import"./avatar-RpIBVCkY.js";import"./User01-Cn3JqTjv.js";import"./Building02-BHIVlbfK.js";import"./XClose-dOW_RI9u.js";import"./ZoomOut-BfQx-fBr.js";import"./use-clock-tick-D3FoyBXt.js";import"./Plus-BDveVGJf.js";import"./Tool01-BM29_KWq.js";import"./command-C7n5qLsN.js";import"./index-DK4LlU65.js";import"./SearchMd-Cuf45jFP.js";import"./integration-icon-DCiBepJw.js";import"./LinkBroken01-BJx0R97x.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./ArrowLeft-DZ0mAFgb.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./ShoppingBag01-BMRnsG58.js";import"./use-debounced-value-DJkh4QSx.js";import"./required-auth-layout-e3_y0Tns.js";import"./autosend-BZOm698U.js";import"./use-org-sso-LC63-uuA.js";import"./resizable-D4wP3vt7.js";import"./AlertCircle-Ctbquk5a.js";import"./ArrowUp-bYg1aEOe.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Upload01-BSDy4f7m.js";import"./Users01-Cxbx87gg.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./index-BRzGXE32.js";import"./extract-connection-data-CNLani4P.js";import"./metadata-D72DunRR.js";import"./connection-Dik4epzq.js";import"./url-slug-B41xLFy_.js";import"./chat-context-_d3c57p1.js";import"./use-decopilot-events-AlKmmETJ.js";import"./use-ai-providers-D1TJRnIR.js";import"./location-V0VwTJTt.js";import"./build-improve-prompt-doc-ClmcYJRa.js";import"./empty-state-Bok1L2hc.js";import"./use-date-fns-locale-BuGEMgXR.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-3Gakbc_U.js";import"./mcp-oauth-CxgfM8zh.js";import"./textarea-CxhXyMKI.js";import"./use-connection-BwU_KLSF.js";import"./use-debounced-autosave-KHVF-MyQ.js";import"./add-connection-dialog-B0vtW1sl.js";import"./connection-card-DCnmTKpJ.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-ZlYTI3Z6.js";import"./form-Dpwt-9St.js";import"./schema-Cx9ZLa-H.js";import"./connection-form-helpers-ta2yIvIb.js";import"./authenticate-and-persist-oauth-jn1R1qId.js";import"./collection-tabs-DIFXv7hR.js";import"./use-infinite-scroll-BO0n6TVn.js";import"./useSuspenseInfiniteQuery-D2W70ffp.js";import"./file-type-icon-DPqHd815.js";import"./use-org-fs-D_4Q985K.js";import"./checkbox-CUzk21sc.js";import"./search-input-CXQLMhKZ.js";import"./use-mcp-auth-status-DmZSbEuf.js";import"./types-Bt5yyj-z.js";import"./use-mcp-tools-DiCKzhUm.js";import"./use-mcp-prompts-DHm-ZTib.js";import"./utils-CVEq3hMx.js";import"./switch-DYA2xfHU.js";import"./popover-DSRFfUdL.js";import"./scroll-area-Bnrys5oj.js";import"./use-main-schema-v8-CZLsOlEV.js";import"./use-project-native-view-presence-DF_1PP5b.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-tsH4be9V.js";import"./optimistic-project-sidebar-views-Cgq6MsN2.js";import"./sections-DT5ozPKC.js";import"./format-time-Cq80KKvY.js";import"./use-copy-d7X6hrKI.js";import"./virtual-mcp-CMZ8dHEU.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-HHgZv9y6.js";import"./use-secrets-D6tUoaJC.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";let Nt=class extends Error{constructor(e,s){super(e),this.status=s}status};function ms(n){return n instanceof Nt&&n.status===401}async function ds(n){const e=await fetch(n),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new Nt(l,e.status)}return s}function Le(n){return n==null||!Number.isFinite(n)?"—":n>=1e3?`${(n/1e3).toFixed(n>=1e4?0:1)}s`:`${Math.round(n)}ms`}function Ze(n){const e=(n??"").toLowerCase();return e==="pass"||e==="passed"||e==="ok"||e==="success"}function Se(n){const e=(n??"").toLowerCase();return e==="fail"||e==="failed"||e==="error"}function yt(n){const e=(n??"").toLowerCase();return e==="skip"||e==="skipped"}function Qe(n,e){return n.viewport&&n.viewport.trim()?n.viewport:`viewport-${e}`}function et(n){const e=L.c(12),{status:s,t:l}=n;if(Se(s)){let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(We,{className:"size-3"}),e[0]=r):r=e[0];let o;e[1]!==l?(o=l("mainPanelTabs.e2eTab.statusFailed"),e[1]=l,e[2]=o):o=e[2];let c;return e[3]!==o?(c=t.jsxs(te,{variant:"destructive",children:[r,o]}),e[3]=o,e[4]=c):c=e[4],c}if(Ze(s)){let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Re,{className:"size-3"}),e[5]=r):r=e[5];let o;e[6]!==l?(o=l("mainPanelTabs.e2eTab.statusPassed"),e[6]=l,e[7]=o):o=e[7];let c;return e[8]!==o?(c=t.jsxs(te,{variant:"success",children:[r,o]}),e[8]=o,e[9]=c):c=e[9],c}const a=s??"—";let i;return e[10]!==a?(i=t.jsx(te,{variant:"secondary",children:a}),e[10]=a,e[11]=i):i=e[11],i}function us(n){const e=L.c(4),{status:s}=n;if(Ze(s)){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Re,{className:"size-4 shrink-0 text-success"}),e[0]=a):a=e[0],a}if(Se(s)){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(We,{className:"size-4 shrink-0 text-destructive"}),e[1]=a):a=e[1],a}if(yt(s)){let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Ot,{className:"size-4 shrink-0 text-muted-foreground"}),e[2]=a):a=e[2],a}let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(zt,{className:"size-4 shrink-0 text-muted-foreground/60"}),e[3]=l):l=e[3],l}function fs(n){return Ze(n)?"bg-success":Se(n)?"bg-destructive":yt(n)?"bg-muted-foreground/40":"bg-muted-foreground/25"}function xs(n){const e=L.c(4),{steps:s}=n;if(s.length===0)return null;let l;e[0]!==s?(l=s.map(ps),e[0]=s,e[1]=l):l=e[1];let a;return e[2]!==l?(a=t.jsx("div",{className:"flex flex-wrap items-center gap-1",children:l}),e[2]=l,e[3]=a):a=e[3],a}function ps(n,e){return t.jsx("span",{title:n.name??`step ${e+1}`,className:Ve("size-1.5 rounded-full",fs(n.status))},e)}const hs=[{key:"lcp",label:"LCP",good:2500,poor:4e3,unit:"ms"},{key:"inp",label:"INP",good:200,poor:500,unit:"ms"},{key:"cls",label:"CLS",good:.1,poor:.25,unit:"cls"},{key:"fcp",label:"FCP",good:1800,poor:3e3,unit:"ms"},{key:"ttfb",label:"TTFB",good:800,poor:1800,unit:"ms"}];function Pt(n){const e=L.c(7),{vitals:s}=n;let l,a,i;if(e[0]!==s){i=Symbol.for("react.early_return_sentinel");e:{const o=hs.filter(c=>{const{key:d}=c,m=s[d];return m!=null&&Number.isFinite(m)});if(o.length===0){i=null;break e}l="grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5",a=o.map(c=>{const{key:d,label:m,good:u,poor:T,unit:p}=c,f=s[d],x=f<=u?"text-success":f<=T?"text-warning":"text-destructive",v=p==="cls"?f.toFixed(3):Le(f);return t.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[t.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:m}),t.jsx("span",{className:Ve("font-mono text-sm font-semibold tabular-nums",x),children:v})]},d)})}e[0]=s,e[1]=l,e[2]=a,e[3]=i}else l=e[1],a=e[2],i=e[3];if(i!==Symbol.for("react.early_return_sentinel"))return i;let r;return e[4]!==l||e[5]!==a?(r=t.jsx("div",{className:l,children:a}),e[4]=l,e[5]=a,e[6]=r):r=e[6],r}function Fe(n){const e=L.c(17),{icon:s,label:l,badge:a,defaultOpen:i,children:r}=n,o=i===void 0?!1:i,[c,d]=pe.useState(o);let m;e[0]!==c?(m=c?t.jsx(dt,{className:"size-4 text-muted-foreground"}):t.jsx(ct,{className:"size-4 text-muted-foreground"}),e[0]=c,e[1]=m):m=e[1];let u;e[2]!==l?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=u):u=e[3];let T;e[4]!==a?(T=a!=null&&t.jsx("span",{className:"ml-auto",children:a}),e[4]=a,e[5]=T):T=e[5];let p;e[6]!==s||e[7]!==m||e[8]!==u||e[9]!==T?(p=t.jsxs(Wt,{className:"flex w-full items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-left hover:bg-accent",children:[m,s,u,T]}),e[6]=s,e[7]=m,e[8]=u,e[9]=T,e[10]=p):p=e[10];let f;e[11]!==r?(f=t.jsx(Yt,{className:"pt-2",children:r}),e[11]=r,e[12]=f):f=e[12];let x;return e[13]!==c||e[14]!==p||e[15]!==f?(x=t.jsxs(Gt,{open:c,onOpenChange:d,children:[p,f]}),e[13]=c,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function bs(n){const e=L.c(51),{step:s,index:l,t:a}=n;let i;e[0]!==s.status?(i=Se(s.status),e[0]=s.status,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.status?(o=t.jsx(us,{status:s.status}),e[2]=s.status,e[3]=o):o=e[3];const c=s.step??l+1;let d;e[4]!==c?(d=t.jsx("span",{className:"font-mono text-2xs text-muted-foreground/60 tabular-nums",children:c}),e[4]=c,e[5]=d):d=e[5];let m;e[6]!==o||e[7]!==d?(m=t.jsxs("div",{className:"flex flex-col items-center gap-1",children:[o,d]}),e[6]=o,e[7]=d,e[8]=m):m=e[8];let u;e[9]!==l||e[10]!==s.actionDescription||e[11]!==s.name||e[12]!==a?(u=s.name??s.actionDescription??`${a("mainPanelTabs.e2eTab.steps")} ${l+1}`,e[9]=l,e[10]=s.actionDescription,e[11]=s.name,e[12]=a,e[13]=u):u=e[13];let T;e[14]!==s.critical||e[15]!==a?(T=s.critical&&t.jsx(te,{variant:"warning",className:"ml-2 align-middle",children:a("mainPanelTabs.e2eTab.critical")}),e[14]=s.critical,e[15]=a,e[16]=T):T=e[16];let p;e[17]!==u||e[18]!==T?(p=t.jsxs("span",{className:"truncate text-sm font-medium text-foreground",children:[u,T]}),e[17]=u,e[18]=T,e[19]=p):p=e[19];let f;e[20]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Je,{className:"size-3"}),e[20]=f):f=e[20];let x;e[21]!==s.durationMs?(x=Le(s.durationMs),e[21]=s.durationMs,e[22]=x):x=e[22];let v;e[23]!==x?(v=t.jsxs("span",{className:"flex shrink-0 items-center gap-1 font-mono text-2xs text-muted-foreground tabular-nums",children:[f,x]}),e[23]=x,e[24]=v):v=e[24];let y;e[25]!==v||e[26]!==p?(y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,v]}),e[25]=v,e[26]=p,e[27]=y):y=e[27];let h;e[28]!==s.actionDescription||e[29]!==s.name?(h=s.actionDescription&&s.actionDescription!==s.name&&t.jsx("p",{className:"text-xs text-muted-foreground",children:s.actionDescription}),e[28]=s.actionDescription,e[29]=s.name,e[30]=h):h=e[30];let P;e[31]!==s.usedSelector?(P=s.usedSelector&&t.jsxs("code",{className:"flex w-fit items-center gap-1 rounded bg-muted px-1.5 py-0.5 font-mono text-2xs text-foreground/70",children:[t.jsx(Vt,{className:"size-3 text-muted-foreground"}),s.usedSelector]}),e[31]=s.usedSelector,e[32]=P):P=e[32];let g;e[33]!==r||e[34]!==s.errorDetail||e[35]!==a?(g=r&&s.errorDetail&&t.jsxs("div",{className:"flex items-start gap-1.5 rounded-lg bg-destructive/10 px-2.5 py-2 text-xs text-destructive",children:[t.jsx(_t,{className:"mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.errorDetail.slug&&t.jsx("span",{className:"break-words",children:a("mainPanelTabs.e2eTab.missingSelector",{slug:s.errorDetail.slug})}),s.errorDetail.expected&&t.jsx("span",{className:"break-words text-destructive/80",children:a("mainPanelTabs.e2eTab.expected",{value:s.errorDetail.expected})}),s.errorDetail.suggestion&&t.jsx("span",{className:"break-words text-destructive/80",children:s.errorDetail.suggestion})]})]}),e[33]=r,e[34]=s.errorDetail,e[35]=a,e[36]=g):g=e[36];let b;e[37]!==l||e[38]!==s.name||e[39]!==s.screenshotUrl||e[40]!==a?(b=s.screenshotUrl&&t.jsx("a",{href:s.screenshotUrl,target:"_blank",rel:"noreferrer",className:"mt-1 w-fit","aria-label":a("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:s.screenshotUrl,alt:s.name??`step ${l+1}`,loading:"lazy",className:"max-h-44 rounded-lg border border-border"})}),e[37]=l,e[38]=s.name,e[39]=s.screenshotUrl,e[40]=a,e[41]=b):b=e[41];let N;e[42]!==y||e[43]!==h||e[44]!==P||e[45]!==g||e[46]!==b?(N=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[y,h,P,g,b]}),e[42]=y,e[43]=h,e[44]=P,e[45]=g,e[46]=b,e[47]=N):N=e[47];let j;return e[48]!==N||e[49]!==m?(j=t.jsxs("li",{className:"flex gap-3 py-2.5",children:[m,N]}),e[48]=N,e[49]=m,e[50]=j):j=e[50],j}function gs(n){const e=L.c(8),{entries:s,t:l}=n;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noConsole"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let a;e[4]!==s?(a=s.map(js),e[4]=s,e[5]=a):a=e[5];let i;return e[6]!==a?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:a}),e[6]=a,e[7]=i):i=e[7],i}function js(n,e){const s=(n.type??"").toLowerCase(),l=s==="error"?"text-destructive":s==="warning"||s==="warn"?"text-warning":"text-foreground/70";return t.jsx("div",{className:"border-b border-border/60 px-2.5 py-1.5 font-mono text-2xs last:border-b-0",children:t.jsx("span",{className:Ve("break-words",l),children:n.text})},e)}function Ts(n){const e=L.c(8),{entries:s,t:l}=n;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noNetwork"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let a;e[4]!==s?(a=s.map(vs),e[4]=s,e[5]=a):a=e[5];let i;return e[6]!==a?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:a}),e[6]=a,e[7]=i):i=e[7],i}function vs(n,e){const s=(n.status??0)>=400;return t.jsxs("div",{className:"flex items-center gap-2 border-b border-border/60 px-2.5 py-1.5 font-mono text-2xs last:border-b-0",children:[t.jsx("span",{className:Ve("tabular-nums",s?"text-destructive":"text-muted-foreground"),children:n.status??"—"}),t.jsx("span",{className:"w-10 shrink-0 text-muted-foreground/70",children:n.method}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground/70",children:n.url}),n.resourceType&&t.jsx("span",{className:"shrink-0 text-muted-foreground/50",children:n.resourceType})]},e)}function Ns(n){const e=L.c(57),{run:s,page:l,t:a}=n;let i;e[0]!==s.steps?(i=s.steps??[],e[0]=s.steps,e[1]=i):i=e[1];const r=i;let o;e[2]!==r?(o=r.filter(Ps),e[2]=r,e[3]=o):o=e[3];const c=o.length;let d;e[4]!==s.console?(d=s.console??[],e[4]=s.console,e[5]=d):d=e[5];const m=d;let u;e[6]!==s.network?(u=s.network??[],e[6]=s.network,e[7]=u):u=e[7];const T=u;let p;e[8]!==m?(p=m.some(ys),e[8]=m,e[9]=p):p=e[9];const f=p;let x;e[10]!==s.verdict||e[11]!==a?(x=t.jsx(et,{status:s.verdict,t:a}),e[10]=s.verdict,e[11]=a,e[12]=x):x=e[12];let v;e[13]!==s.funnelVerdict||e[14]!==s.verdict||e[15]!==a?(v=s.funnelVerdict&&s.funnelVerdict!==s.verdict&&t.jsxs("span",{children:[a("mainPanelTabs.e2eTab.funnel"),":"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.funnelVerdict})]}),e[13]=s.funnelVerdict,e[14]=s.verdict,e[15]=a,e[16]=v):v=e[16];let y;e[17]!==s.durationMs?(y=s.durationMs!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Je,{className:"size-3"}),Le(s.durationMs)]}),e[17]=s.durationMs,e[18]=y):y=e[18];let h;e[19]!==l?(h=l?.status!=null&&t.jsxs(te,{variant:l.status<400?"secondary":"destructive",children:["HTTP ",l.status]}),e[19]=l,e[20]=h):h=e[20];let P;e[21]!==x||e[22]!==v||e[23]!==y||e[24]!==h?(P=t.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[x,v,y,h]}),e[21]=x,e[22]=v,e[23]=y,e[24]=h,e[25]=P):P=e[25];let g;e[26]!==r?(g=r.length>0&&t.jsx(xs,{steps:r}),e[26]=r,e[27]=g):g=e[27];let b;e[28]!==l||e[29]!==a?(b=l?.vitals&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a("mainPanelTabs.e2eTab.vitals")}),t.jsx(Pt,{vitals:l.vitals})]}),e[28]=l,e[29]=a,e[30]=b):b=e[30];let N;e[31]!==c||e[32]!==r||e[33]!==a?(N=r.length>0&&t.jsx(Fe,{defaultOpen:!0,icon:t.jsx(Re,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.steps"),badge:c>0?t.jsx(te,{variant:"destructive",children:a("mainPanelTabs.e2eTab.failCount",{count:String(c)})}):t.jsx(te,{variant:"secondary",children:a("mainPanelTabs.e2eTab.stepsCount",{count:String(r.length)})}),children:t.jsx("ol",{className:"divide-y divide-border/60 rounded-lg border border-border px-3",children:r.map((D,z)=>t.jsx(bs,{step:D,index:z,t:a},z))})}),e[31]=c,e[32]=r,e[33]=a,e[34]=N):N=e[34];let j;e[35]!==m||e[36]!==f||e[37]!==a?(j=m.length>0&&t.jsx(Fe,{icon:t.jsx(Jt,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.console"),badge:t.jsx(te,{variant:f?"destructive":"secondary",children:m.length}),children:t.jsx(gs,{entries:m,t:a})}),e[35]=m,e[36]=f,e[37]=a,e[38]=j):j=e[38];let w;e[39]!==T||e[40]!==a?(w=T.length>0&&t.jsx(Fe,{icon:t.jsx(Ht,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.network"),badge:t.jsx(te,{variant:"secondary",children:T.length}),children:t.jsx(Ts,{entries:T,t:a})}),e[39]=T,e[40]=a,e[41]=w):w=e[41];let S;e[42]!==s.videoUrl||e[43]!==a?(S=s.videoUrl&&t.jsx(Fe,{icon:t.jsx(qt,{className:"size-4 text-muted-foreground"}),label:a("mainPanelTabs.e2eTab.video"),children:t.jsx("video",{controls:!0,src:s.videoUrl,className:"max-h-80 w-full rounded-lg border border-border"})}),e[42]=s.videoUrl,e[43]=a,e[44]=S):S=e[44];let C;e[45]!==s.traceUrl||e[46]!==a?(C=s.traceUrl&&t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsx(ge,{size:"sm",variant:"secondary",asChild:!0,children:t.jsxs("a",{href:`https://trace.playwright.dev/?trace=${encodeURIComponent(s.traceUrl)}`,target:"_blank",rel:"noreferrer",children:[t.jsx(ot,{className:"size-4"}),a("mainPanelTabs.e2eTab.openTrace")]})}),t.jsx("a",{href:s.traceUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-muted-foreground hover:text-foreground hover:underline",children:a("mainPanelTabs.e2eTab.downloadTrace")})]}),e[45]=s.traceUrl,e[46]=a,e[47]=C):C=e[47];let k;return e[48]!==P||e[49]!==g||e[50]!==b||e[51]!==N||e[52]!==j||e[53]!==w||e[54]!==S||e[55]!==C?(k=t.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[P,g,b,N,j,w,S,C]}),e[48]=P,e[49]=g,e[50]=b,e[51]=N,e[52]=j,e[53]=w,e[54]=S,e[55]=C,e[56]=k):k=e[56],k}function ys(n){return(n.type??"").toLowerCase()==="error"}function Ps(n){return Se(n.status)}function wt(n){const e=L.c(7),{artifacts:s,t:l}=n;let a;if(e[0]!==s||e[1]!==l){const i=s.filter(Ss),r=s.filter(ws);let o;e[3]!==l?(o=l("mainPanelTabs.e2eTab.artifacts"),e[3]=l,e[4]=o):o=e[4];let c;e[5]!==o?(c=t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:o}),e[5]=o,e[6]=c):c=e[6],a=t.jsxs("section",{className:"flex flex-col gap-2",children:[c,s.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:l("mainPanelTabs.e2eTab.noArtifacts")}):t.jsxs("div",{className:"flex flex-col gap-2",children:[i.length>0&&t.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:i.map((d,m)=>t.jsx("a",{href:d.url,target:"_blank",rel:"noreferrer","aria-label":d.name??l("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:d.url,alt:d.name??"screenshot",loading:"lazy",className:"w-full rounded-lg border border-border"})},`${d.name??"img"}-${m}`))}),r.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((d,m)=>t.jsxs("a",{href:d.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1 font-mono text-2xs text-foreground/80 hover:bg-accent",children:[d.name??l("mainPanelTabs.e2eTab.openArtifact"),t.jsx(ot,{className:"size-3 text-muted-foreground"})]},`${d.name??"artifact"}-${m}`))})]})]}),e[0]=s,e[1]=l,e[2]=a}else a=e[2];return a}function ws(n){return!/\.png$/i.test(n.name??"")}function Ss(n){return/\.png$/i.test(n.name??"")}function Cs(n){const e=L.c(9),{checks:s,artifacts:l,t:a}=n;let i;e[0]!==s||e[1]!==a?(i=s.length>0?t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a("mainPanelTabs.e2eTab.checksTitle")}),t.jsx("div",{className:"rounded-lg border border-border",children:t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:a("mainPanelTabs.e2eTab.colCheck")}),t.jsx(W,{children:a("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:a("mainPanelTabs.e2eTab.colViewport")}),t.jsx(W,{className:"text-right",children:a("mainPanelTabs.e2eTab.colDuration")})]})}),t.jsx(Xe,{children:s.map((c,d)=>t.jsxs(we,{children:[t.jsx(Y,{className:"text-xs text-foreground",children:c.name??"—"}),t.jsx(Y,{children:t.jsx(et,{status:c.status,t:a})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:c.viewport??"—"}),t.jsx(Y,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Le(c.durationMs)})]},`${c.name??"check"}-${d}`))})]})})]}):t.jsx("p",{className:"text-sm text-muted-foreground",children:a("mainPanelTabs.e2eTab.noReport")}),e[0]=s,e[1]=a,e[2]=i):i=e[2];let r;e[3]!==l||e[4]!==a?(r=t.jsx(wt,{artifacts:l,t:a}),e[3]=l,e[4]=a,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==r?(o=t.jsxs("div",{className:"flex flex-col gap-5",children:[i,r]}),e[6]=i,e[7]=r,e[8]=o):o=e[8],o}function ks(n){const e=L.c(46),{data:s,t:l}=n,a=s.report??null;let i;e[0]!==a?.runs?(i=a?.runs??[],e[0]=a?.runs,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.checks?(o=s.checks??[],e[2]=s.checks,e[3]=o):o=e[3];const c=o;let d;e[4]!==s.artifacts?(d=s.artifacts??[],e[4]=s.artifacts,e[5]=d):d=e[5];const m=d;let u;if(e[6]!==a?.pages){u=new Map;for(const h of a?.pages??[])h.viewport&&!u.has(h.viewport)&&u.set(h.viewport,h);e[6]=a?.pages,e[7]=u}else u=e[7];const T=r[0];if(a&&T){let h;e[8]!==T?(h=Qe(T,0),e[8]=T,e[9]=h):h=e[9];let P;if(e[10]!==r||e[11]!==l){let S;e[13]!==l?(S=(C,k)=>{const D=Qe(C,k);return t.jsxs(Xt,{value:D,variant:"underline",className:"gap-1.5",children:[Se(C.verdict)?t.jsx(We,{className:"size-3.5 text-destructive"}):t.jsx(Re,{className:"size-3.5 text-success"}),C.viewport??`${l("mainPanelTabs.e2eTab.viewport")} ${k+1}`]},D)},e[13]=l,e[14]=S):S=e[14],P=r.map(S),e[10]=r,e[11]=l,e[12]=P}else P=e[12];let g;e[15]!==P?(g=t.jsx(Zt,{variant:"underline",children:P}),e[15]=P,e[16]=g):g=e[16];let b;if(e[17]!==u||e[18]!==r||e[19]!==l){let S;e[21]!==u||e[22]!==l?(S=(C,k)=>{const D=Qe(C,k);return t.jsx(es,{value:D,children:t.jsx(Ns,{run:C,page:C.viewport?u.get(C.viewport):void 0,t:l})},D)},e[21]=u,e[22]=l,e[23]=S):S=e[23],b=r.map(S),e[17]=u,e[18]=r,e[19]=l,e[20]=b}else b=e[20];let N;e[24]!==h||e[25]!==g||e[26]!==b?(N=t.jsxs(ts,{variant:"underline",defaultValue:h,children:[g,b]}),e[24]=h,e[25]=g,e[26]=b,e[27]=N):N=e[27];let j;e[28]!==m||e[29]!==l?(j=m.length>0&&t.jsx(wt,{artifacts:m,t:l}),e[28]=m,e[29]=l,e[30]=j):j=e[30];let w;return e[31]!==N||e[32]!==j?(w=t.jsxs("div",{className:"flex flex-col gap-5",children:[N,j]}),e[31]=N,e[32]=j,e[33]=w):w=e[33],w}let p;e[34]!==a?.pages?(p=(a?.pages??[]).find($s)?.vitals,e[34]=a?.pages,e[35]=p):p=e[35];const f=p;let x;e[36]!==f||e[37]!==l?(x=f&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:l("mainPanelTabs.e2eTab.vitals")}),t.jsx(Pt,{vitals:f})]}),e[36]=f,e[37]=l,e[38]=x):x=e[38];let v;e[39]!==m||e[40]!==c||e[41]!==l?(v=t.jsx(Cs,{checks:c,artifacts:m,t:l}),e[39]=m,e[40]=c,e[41]=l,e[42]=v):v=e[42];let y;return e[43]!==x||e[44]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-5",children:[x,v]}),e[43]=x,e[44]=v,e[45]=y):y=e[45],y}function $s(n){return n.vitals}function Ds(n){const e=L.c(50),{base:s,orgSlug:l,site:a,run:i,onOpenChange:r}=n,o=Ee(),c=i?.runId??"",d=i!=null;let m;e[0]!==l||e[1]!==c||e[2]!==a?(m=xe.e2eRun(l,a,c),e[0]=l,e[1]=c,e[2]=a,e[3]=m):m=e[3];let u;e[4]!==s||e[5]!==c?(u=()=>ds(`${s}/e2e/runs/${encodeURIComponent(c)}`),e[4]=s,e[5]=c,e[6]=u):u=e[6];const T=d&&!!c;let p;e[7]!==m||e[8]!==u||e[9]!==T?(p={queryKey:m,queryFn:u,enabled:T,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[7]=m,e[8]=u,e[9]=T,e[10]=p):p=e[10];const f=_e(p),x=f.data,v=x?.status??i?.status??null,y=i?.summary?.command??null,h=i?.summary?.url??null,P=x?.report?.totalDurationMs??null,g=x?.report?.platform??null;let b;e[11]!==o||e[12]!==v?(b=t.jsx(et,{status:v,t:o}),e[11]=o,e[12]=v,e[13]=b):b=e[13];let N;e[14]!==c?(N=t.jsx(ss,{className:"font-mono text-sm text-foreground",children:c}),e[14]=c,e[15]=N):N=e[15];let j;e[16]!==b||e[17]!==N?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[b,N]}),e[16]=b,e[17]=N,e[18]=j):j=e[18];let w;e[19]!==y||e[20]!==o?(w=y&&t.jsxs("span",{children:[o("mainPanelTabs.e2eTab.command")," ",t.jsx("span",{className:"font-medium text-foreground",children:y})]}),e[19]=y,e[20]=o,e[21]=w):w=e[21];let S;e[22]!==g?(S=g&&t.jsx("span",{className:"font-medium text-foreground/70",children:g}),e[22]=g,e[23]=S):S=e[23];let C;e[24]!==P?(C=P!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Je,{className:"size-3"}),Le(P)]}),e[24]=P,e[25]=C):C=e[25];let k;e[26]!==h?(k=h&&t.jsx("a",{href:h,target:"_blank",rel:"noreferrer",className:"truncate font-mono text-foreground/70 hover:underline",children:h.replace(/^https?:\/\//,"")}),e[26]=h,e[27]=k):k=e[27];let D;e[28]!==C||e[29]!==k||e[30]!==w||e[31]!==S?(D=t.jsx(ls,{asChild:!0,children:t.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[w,S,C,k]})}),e[28]=C,e[29]=k,e[30]=w,e[31]=S,e[32]=D):D=e[32];let z;e[33]!==D||e[34]!==j?(z=t.jsxs(ns,{className:"border-b border-border",children:[j,D]}),e[33]=D,e[34]=j,e[35]=z):z=e[35];let F;e[36]!==x||e[37]!==f.error||e[38]!==f.isLoading||e[39]!==o?(F=ms(f.error)?t.jsx(De,{icon:t.jsx(Re,{className:"size-5"}),title:o("mainPanelTabs.e2eTab.notConnectedTitle"),description:o("mainPanelTabs.e2eTab.notConnectedDescription")}):f.isLoading?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx($e,{className:"h-9 w-full"}),t.jsx($e,{className:"h-24 w-full"}),t.jsx($e,{className:"h-40 w-full"})]}):f.error?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("mainPanelTabs.e2eTab.detailError")}):x?t.jsx(ks,{data:x,t:o}):null,e[36]=x,e[37]=f.error,e[38]=f.isLoading,e[39]=o,e[40]=F):F=e[40];let R;e[41]!==F?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:F}),e[41]=F,e[42]=R):R=e[42];let A;e[43]!==z||e[44]!==R?(A=t.jsxs(as,{side:"right",className:"w-full gap-0 p-0 sm:max-w-2xl",children:[z,R]}),e[43]=z,e[44]=R,e[45]=A):A=e[45];let E;return e[46]!==r||e[47]!==d||e[48]!==A?(E=t.jsx(rs,{open:d,onOpenChange:r,children:A}),e[46]=r,e[47]=d,e[48]=A,e[49]=E):E=e[49],E}const Me="once",_s=[{value:Me,labelKey:"mainPanelTabs.e2eTab.scheduleOnce"},{value:"0 * * * *",labelKey:"mainPanelTabs.e2eTab.scheduleHourly"},{value:"0 8 * * *",labelKey:"mainPanelTabs.e2eTab.scheduleDaily"},{value:"0 8 * * 1",labelKey:"mainPanelTabs.e2eTab.scheduleWeekly"}];function zs(n){const e=L.c(16),{phase:s,t:l}=n,a=(s??"").toLowerCase();if(a==="running"){let o;e[0]!==l?(o=l("mainPanelTabs.e2eTab.statusRunning"),e[0]=l,e[1]=o):o=e[1];let c;return e[2]!==o?(c=t.jsx(te,{variant:"warning",children:o}),e[2]=o,e[3]=c):c=e[3],c}if(a==="succeeded"){let o;e[4]!==l?(o=l("mainPanelTabs.e2eTab.phaseRan"),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==o?(c=t.jsx(te,{variant:"secondary",children:o}),e[6]=o,e[7]=c):c=e[7],c}if(a==="failed"){let o;e[8]!==l?(o=l("mainPanelTabs.e2eTab.phaseErrored"),e[8]=l,e[9]=o):o=e[9];let c;return e[10]!==o?(c=t.jsx(te,{variant:"destructive",children:o}),e[10]=o,e[11]=c):c=e[11],c}let i;e[12]!==l?(i=l("mainPanelTabs.e2eTab.phasePending"),e[12]=l,e[13]=i):i=e[13];let r;return e[14]!==i?(r=t.jsx(te,{variant:"secondary",children:i}),e[14]=i,e[15]=r):r=e[15],r}function ze(n,e){if(Array.isArray(n))return n;if(n&&typeof n=="object"){const s=n[e];if(Array.isArray(s))return s}return[]}function St(n){const e=(n??"").toLowerCase();return e.includes("pass")||e.includes("success")||e.includes("ok")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("run")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Es(n,e){const s=St(n);return s==="success"?e("mainPanelTabs.e2eTab.statusPassed"):s==="destructive"?e("mainPanelTabs.e2eTab.statusFailed"):s==="warning"?e("mainPanelTabs.e2eTab.statusRunning"):n??"—"}function Rs(n,e){const s=[],l=n.summary?.exitCode;typeof l=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryExitCode",{code:String(l)}));const a=n.summary?.fileCount;return typeof a=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryFiles",{count:String(a)})),s.length>0?s.join(" · "):"—"}function Ct(n){if(!n)return"—";const e=new Date(n).getTime();if(Number.isNaN(e))return"—";const s=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,r]of a)if(Math.abs(s)>=r)return l.format(-Math.round(s/r),i);return l.format(-s,"second")}class tt extends Error{constructor(e,s){super(e),this.status=s}status}function Ls(n){return n instanceof tt&&n.status===401}function Oe(n){return n instanceof Error?n.message:String(n)}async function Ie(n){const e=await fetch(n),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new tt(l,e.status)}return s}async function qe(n,e,s){const l=await fetch(n,{method:e,headers:s!==void 0?{"Content-Type":"application/json"}:{},body:s!==void 0?JSON.stringify(s):void 0}),a=await l.json().catch(()=>({}));if(!l.ok){const i=a&&typeof a=="object"&&"error"in a?String(a.error):`request failed (${l.status})`;throw new tt(i,l.status)}return a}function kt(n){const e=L.c(15),{title:s,count:l,action:a,children:i}=n;let r;e[0]!==s?(r=t.jsx("h3",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1];let o;e[2]!==l?(o=typeof l=="number"&&l>0&&t.jsx(te,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=o):o=e[3];let c;e[4]!==a?(c=a?t.jsx("div",{className:"ml-auto",children:a}):null,e[4]=a,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d=t.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[r,o,c]}),e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];let m;e[10]!==i?(m=t.jsx("div",{className:"p-2",children:i}),e[10]=i,e[11]=m):m=e[11];let u;return e[12]!==d||e[13]!==m?(u=t.jsxs("section",{className:"surface overflow-hidden",children:[d,m]}),e[12]=d,e[13]=m,e[14]=u):u=e[14],u}function $t(n){const e=L.c(3),{cols:s}=n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let a;return e[1]!==s?(a=t.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(i=>t.jsx("div",{className:"flex gap-3",children:Array.from({length:s}).map(As)},i))}),e[1]=s,e[2]=a):a=e[2],a}function As(n,e){return t.jsx($e,{className:"h-4 flex-1"},e)}function Dt(n){const e=L.c(2),{children:s}=n;let l;return e[0]!==s?(l=t.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1],l}function Fs(n){const e=L.c(117),{base:s,orgSlug:l,site:a}=n,i=Ee(),r=He(),[o,c]=pe.useState(!1),[d,m]=pe.useState(""),[u,T]=pe.useState(Me),[p,f]=pe.useState("");let x;e[0]!==l||e[1]!==a?(x=xe.e2eTypes(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let v;e[3]!==s?(v=()=>Ie(`${s}/e2e/types`),e[3]=s,e[4]=v):v=e[4];let y;e[5]!==o||e[6]!==x||e[7]!==v?(y={queryKey:x,queryFn:v,enabled:o,retry:!1,staleTime:6e4},e[5]=o,e[6]=x,e[7]=v,e[8]=y):y=e[8];const h=_e(y),P=ze(h.data,"items");let g;e[9]!==s?(g=de=>{const st=de.schedule===Me?"":de.schedule,lt=de.url.trim();return qe(`${s}/e2e/runs`,"POST",{command:de.command,...st?{schedule:st}:{},...lt?{url:lt}:{}})},e[9]=s,e[10]=g):g=e[10];let b;e[11]!==l||e[12]!==r||e[13]!==a||e[14]!==i?(b=()=>{r.invalidateQueries({queryKey:xe.e2eRuns(l,a)}),r.invalidateQueries({queryKey:xe.e2eChecks(l,a)}),be.success(i("mainPanelTabs.e2eTab.toastRunQueued")),c(!1),m(""),T(Me),f("")},e[11]=l,e[12]=r,e[13]=a,e[14]=i,e[15]=b):b=e[15];let N;e[16]!==g||e[17]!==b?(N={mutationFn:g,onSuccess:b,onError:Us},e[16]=g,e[17]=b,e[18]=N):N=e[18];const j=Ue(N);let w;e[19]!==d?(w=de=>de.id===d,e[19]=d,e[20]=w):w=e[20];const S=P.find(w);let C,k;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=()=>c(!0),k=t.jsx(mt,{className:"size-4"}),e[21]=C,e[22]=k):(C=e[21],k=e[22]);let D;e[23]!==i?(D=i("mainPanelTabs.e2eTab.runTest"),e[23]=i,e[24]=D):D=e[24];let z;e[25]!==D?(z=t.jsxs(ge,{size:"sm",onClick:C,children:[k,D]}),e[25]=D,e[26]=z):z=e[26];const F=At,R=Lt,A="sm:max-w-md";let E;e[27]!==i?(E=i("mainPanelTabs.e2eTab.runTestTitle"),e[27]=i,e[28]=E):E=e[28];let B;e[29]!==E?(B=t.jsx(Ft,{children:t.jsx(Mt,{children:E})}),e[29]=E,e[30]=B):B=e[30];const G="flex flex-col gap-3";let me;e[31]!==i?(me=i("mainPanelTabs.e2eTab.runTestDescription"),e[31]=i,e[32]=me):me=e[32];let M;e[33]!==me?(M=t.jsx("p",{className:"text-sm text-muted-foreground",children:me}),e[33]=me,e[34]=M):M=e[34];let U;e[35]!==i?(U=i("mainPanelTabs.e2eTab.targetUrl"),e[35]=i,e[36]=U):U=e[36];let I;e[37]!==U?(I=t.jsx(Be,{htmlFor:"e2e-url",children:U}),e[37]=U,e[38]=I):I=e[38];let X;e[39]!==i?(X=i("mainPanelTabs.e2eTab.targetUrlPlaceholder"),e[39]=i,e[40]=X):X=e[40];let Z;e[41]===Symbol.for("react.memo_cache_sentinel")?(Z=de=>f(de.target.value),e[41]=Z):Z=e[41];let q;e[42]!==j.isPending||e[43]!==X||e[44]!==p?(q=t.jsx(Rt,{id:"e2e-url",type:"url",inputMode:"url",placeholder:X,value:p,onChange:Z,className:"font-mono text-xs",disabled:j.isPending}),e[42]=j.isPending,e[43]=X,e[44]=p,e[45]=q):q=e[45];let V;e[46]!==i?(V=i("mainPanelTabs.e2eTab.targetUrlHint"),e[46]=i,e[47]=V):V=e[47];let O;e[48]!==V?(O=t.jsx("p",{className:"text-xs text-muted-foreground",children:V}),e[48]=V,e[49]=O):O=e[49];let Q;e[50]!==I||e[51]!==q||e[52]!==O?(Q=t.jsxs("div",{className:"flex flex-col gap-2",children:[I,q,O]}),e[50]=I,e[51]=q,e[52]=O,e[53]=Q):Q=e[53];const se="flex flex-col gap-2";let _;e[54]!==i?(_=i("mainPanelTabs.e2eTab.selectType"),e[54]=i,e[55]=_):_=e[55];let ee;e[56]!==_?(ee=t.jsx(Be,{children:_}),e[56]=_,e[57]=ee):ee=e[57];const Ce=h.isLoading?t.jsx($e,{className:"h-9 w-full"}):h.error?t.jsx("p",{className:"text-xs text-destructive",children:i("mainPanelTabs.e2eTab.typesError")}):P.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.e2eTab.noTypes")}):t.jsxs(nt,{value:d,onValueChange:m,children:[t.jsx(at,{className:"w-full",children:t.jsx(rt,{placeholder:i("mainPanelTabs.e2eTab.selectTypePlaceholder")})}),t.jsx(it,{children:P.map(Ms)})]});let le;e[58]!==S?(le=S?.description&&t.jsx("p",{className:"text-xs text-muted-foreground",children:S.description}),e[58]=S,e[59]=le):le=e[59];let ne;e[60]!==ee||e[61]!==Ce||e[62]!==le?(ne=t.jsxs("div",{className:se,children:[ee,Ce,le]}),e[60]=ee,e[61]=Ce,e[62]=le,e[63]=ne):ne=e[63];let ae;e[64]!==i?(ae=i("mainPanelTabs.e2eTab.scheduleLabel"),e[64]=i,e[65]=ae):ae=e[65];let he;e[66]!==ae?(he=t.jsx(Be,{children:ae}),e[66]=ae,e[67]=he):he=e[67];let ue;e[68]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(at,{className:"w-full",children:t.jsx(rt,{})}),e[68]=ue):ue=e[68];let re;e[69]!==i?(re=_s.map(de=>t.jsx(vt,{value:de.value,children:i(de.labelKey)},de.value||"once")),e[69]=i,e[70]=re):re=e[70];let ie;e[71]!==re?(ie=t.jsx(it,{children:re}),e[71]=re,e[72]=ie):ie=e[72];let oe;e[73]!==u||e[74]!==ie?(oe=t.jsxs(nt,{value:u,onValueChange:T,children:[ue,ie]}),e[73]=u,e[74]=ie,e[75]=oe):oe=e[75];let ce;e[76]!==he||e[77]!==oe?(ce=t.jsxs("div",{className:"flex flex-col gap-2",children:[he,oe]}),e[76]=he,e[77]=oe,e[78]=ce):ce=e[78];let fe;e[79]!==M||e[80]!==Q||e[81]!==ne||e[82]!==ce?(fe=t.jsxs("div",{className:G,children:[M,Q,ne,ce]}),e[79]=M,e[80]=Q,e[81]=ne,e[82]=ce,e[83]=fe):fe=e[83];let $;e[84]===Symbol.for("react.memo_cache_sentinel")?($=()=>c(!1),e[84]=$):$=e[84];const H=j.isPending;let K;e[85]!==i?(K=i("mainPanelTabs.e2eTab.cancel"),e[85]=i,e[86]=K):K=e[86];let J;e[87]!==j.isPending||e[88]!==K?(J=t.jsx(ge,{variant:"outline",type:"button",onClick:$,disabled:H,children:K}),e[87]=j.isPending,e[88]=K,e[89]=J):J=e[89];let je;e[90]!==d||e[91]!==j||e[92]!==u||e[93]!==p?(je=()=>d&&j.mutate({command:d,schedule:u,url:p}),e[90]=d,e[91]=j,e[92]=u,e[93]=p,e[94]=je):je=e[94];const Ke=!d||j.isPending;let Te;e[95]!==j.isPending||e[96]!==i?(Te=j.isPending?i("mainPanelTabs.e2eTab.running"):i("mainPanelTabs.e2eTab.runConfirm"),e[95]=j.isPending,e[96]=i,e[97]=Te):Te=e[97];let ve;e[98]!==je||e[99]!==Ke||e[100]!==Te?(ve=t.jsx(ge,{type:"button",onClick:je,disabled:Ke,children:Te}),e[98]=je,e[99]=Ke,e[100]=Te,e[101]=ve):ve=e[101];let Ne;e[102]!==J||e[103]!==ve?(Ne=t.jsxs(Ut,{children:[J,ve]}),e[102]=J,e[103]=ve,e[104]=Ne):Ne=e[104];let ye;e[105]!==R||e[106]!==B||e[107]!==fe||e[108]!==Ne?(ye=t.jsxs(R,{className:A,children:[B,fe,Ne]}),e[105]=R,e[106]=B,e[107]=fe,e[108]=Ne,e[109]=ye):ye=e[109];let Pe;e[110]!==F||e[111]!==o||e[112]!==ye?(Pe=t.jsx(F,{open:o,onOpenChange:c,children:ye}),e[110]=F,e[111]=o,e[112]=ye,e[113]=Pe):Pe=e[113];let Ae;return e[114]!==z||e[115]!==Pe?(Ae=t.jsxs(t.Fragment,{children:[z,Pe]}),e[114]=z,e[115]=Pe,e[116]=Ae):Ae=e[116],Ae}function Ms(n){return t.jsx(vt,{value:n.id,textValue:n.label??n.id,children:t.jsx("span",{className:"text-sm",children:n.label??n.id})},n.id)}function Us(n){return be.error(Oe(n))}function Is(){const n=L.c(17),e=Ee(),[s,l]=pe.useState(!1);let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>l(qs),n[0]=a):a=n[0];let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Kt,{className:"size-4 text-muted-foreground"}),n[1]=i):i=n[1];let r;n[2]!==e?(r=e("mainPanelTabs.e2eTab.helpTitle"),n[2]=e,n[3]=r):r=n[3];let o;n[4]!==r?(o=t.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),n[4]=r,n[5]=o):o=n[5];let c;n[6]!==s?(c=s?t.jsx(dt,{className:"ml-auto size-4 text-muted-foreground"}):t.jsx(ct,{className:"ml-auto size-4 text-muted-foreground"}),n[6]=s,n[7]=c):c=n[7];let d;n[8]!==o||n[9]!==c?(d=t.jsxs("button",{type:"button",onClick:a,className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[i,o,c]}),n[8]=o,n[9]=c,n[10]=d):d=n[10];let m;n[11]!==s||n[12]!==e?(m=s&&t.jsxs("div",{className:"flex flex-col gap-2 border-t border-border px-4 py-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpIntro")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpTypes")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpRun")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpResults")})]}),n[11]=s,n[12]=e,n[13]=m):m=n[13];let u;return n[14]!==d||n[15]!==m?(u=t.jsxs("div",{className:"surface",children:[d,m]}),n[14]=d,n[15]=m,n[16]=u):u=n[16],u}function qs(n){return!n}function Vs(n){const e=L.c(71),{base:s,orgSlug:l,site:a,enabled:i}=n,r=Ee(),o=He(),[c,d]=pe.useState(!1);let m;e[0]!==l||e[1]!==a?(m=xe.e2eChecks(l,a),e[0]=l,e[1]=a,e[2]=m):m=e[2];let u;e[3]!==s?(u=()=>Ie(`${s}/e2e/checks`),e[3]=s,e[4]=u):u=e[4];let T;e[5]!==i||e[6]!==m||e[7]!==u?(T={queryKey:m,queryFn:u,enabled:i,retry:!1,staleTime:15e3,refetchInterval:Bs},e[5]=i,e[6]=m,e[7]=u,e[8]=T):T=e[8];const p=_e(T),f=ze(p.data,"items");let x;e[9]!==l||e[10]!==o||e[11]!==a?(x=()=>{o.invalidateQueries({queryKey:xe.e2eChecks(l,a)}),o.invalidateQueries({queryKey:xe.e2eRuns(l,a)})},e[9]=l,e[10]=o,e[11]=a,e[12]=x):x=e[12];const v=x;let y;e[13]!==s?(y=_=>qe(`${s}/e2e/runs`,"POST",{command:_}),e[13]=s,e[14]=y):y=e[14];let h;e[15]!==v||e[16]!==r?(h=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastRunQueued"))},e[15]=v,e[16]=r,e[17]=h):h=e[17];let P;e[18]!==y||e[19]!==h?(P={mutationFn:y,onSuccess:h,onError:Ks},e[18]=y,e[19]=h,e[20]=P):P=e[20];const g=Ue(P);let b;e[21]!==s?(b=()=>qe(`${s}/e2e/checks`,"DELETE"),e[21]=s,e[22]=b):b=e[22];let N;e[23]!==v||e[24]!==r?(N=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastCheckDeleted")),d(!1)},e[23]=v,e[24]=r,e[25]=N):N=e[25];let j;e[26]!==b||e[27]!==N?(j={mutationFn:b,onSuccess:N,onError:Os},e[26]=b,e[27]=N,e[28]=j):j=e[28];const w=Ue(j),S=g.isPending||w.isPending,C=kt;let k;e[29]!==r?(k=r("mainPanelTabs.e2eTab.checksSection"),e[29]=r,e[30]=k):k=e[30];const D=f.length,z=f.length>0?t.jsxs(ge,{size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive",onClick:()=>d(!0),disabled:S,children:[t.jsx(ut,{className:"size-4"}),r("mainPanelTabs.e2eTab.deleteAllChecks")]}):null,F=p.isLoading?t.jsx($t,{cols:6}):p.error?t.jsx(Dt,{children:r("mainPanelTabs.e2eTab.checksError")}):f.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:r("mainPanelTabs.e2eTab.noChecks")}):t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:r("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colCommand")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colSchedule")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.url")}),t.jsx(W,{children:r("mainPanelTabs.e2eTab.colUpdated")}),t.jsx(W,{className:"w-[1%]"})]})}),t.jsx(Xe,{children:f.map((_,ee)=>t.jsxs(we,{children:[t.jsx(Y,{children:t.jsx(zs,{phase:_.phase,t:r})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:_.command??"—"}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:_.schedule?_.schedule:"—"}),t.jsx(Y,{className:"max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:_.url??"—"}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ct(_.updatedAt)}),t.jsx(Y,{className:"text-right align-middle whitespace-nowrap",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":r("mainPanelTabs.e2eTab.rerun"),title:r("mainPanelTabs.e2eTab.rerun"),onClick:()=>_.command&&g.mutate(_.command),disabled:S||!_.command,children:t.jsx(mt,{className:"size-4"})})})]},`${_.subject??a}-${_.command??""}-${ee}`))})]});let R;e[31]!==r?(R=r("mainPanelTabs.e2eTab.confirmDeleteCheckTitle"),e[31]=r,e[32]=R):R=e[32];let A;e[33]!==R?(A=t.jsx(ft,{children:R}),e[33]=R,e[34]=A):A=e[34];let E;e[35]!==r?(E=r("mainPanelTabs.e2eTab.confirmDeleteCheck"),e[35]=r,e[36]=E):E=e[36];let B;e[37]!==E?(B=t.jsx(xt,{children:E}),e[37]=E,e[38]=B):B=e[38];let G;e[39]!==A||e[40]!==B?(G=t.jsxs(pt,{children:[A,B]}),e[39]=A,e[40]=B,e[41]=G):G=e[41];const me=w.isPending;let M;e[42]!==r?(M=r("mainPanelTabs.e2eTab.cancel"),e[42]=r,e[43]=M):M=e[43];let U;e[44]!==w.isPending||e[45]!==M?(U=t.jsx(ht,{disabled:me,children:M}),e[44]=w.isPending,e[45]=M,e[46]=U):U=e[46];let I;e[47]!==w?(I=_=>{_.preventDefault(),w.mutate()},e[47]=w,e[48]=I):I=e[48];const X=w.isPending;let Z;e[49]!==r?(Z=r("mainPanelTabs.e2eTab.delete"),e[49]=r,e[50]=Z):Z=e[50];let q;e[51]!==w.isPending||e[52]!==I||e[53]!==Z?(q=t.jsx(bt,{variant:"destructive",onClick:I,disabled:X,children:Z}),e[51]=w.isPending,e[52]=I,e[53]=Z,e[54]=q):q=e[54];let V;e[55]!==U||e[56]!==q?(V=t.jsxs(gt,{children:[U,q]}),e[55]=U,e[56]=q,e[57]=V):V=e[57];let O;e[58]!==G||e[59]!==V?(O=t.jsxs(jt,{children:[G,V]}),e[58]=G,e[59]=V,e[60]=O):O=e[60];let Q;e[61]!==c||e[62]!==O?(Q=t.jsx(Tt,{open:c,onOpenChange:d,children:O}),e[61]=c,e[62]=O,e[63]=Q):Q=e[63];let se;return e[64]!==C||e[65]!==f||e[66]!==k||e[67]!==z||e[68]!==F||e[69]!==Q?(se=t.jsxs(C,{title:k,count:D,action:z,children:[F,Q]}),e[64]=C,e[65]=f,e[66]=k,e[67]=z,e[68]=F,e[69]=Q,e[70]=se):se=e[70],se}function Os(n){return be.error(Oe(n))}function Ks(n){return be.error(Oe(n))}function Bs(n){return ze(n.state.data,"items").some(Qs)?5e3:!1}function Qs(n){const e=(n.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}function Hs(n){const e=L.c(107),{virtualMcpId:s}=n,l=Ee(),{org:a}=Et(),i=Bt(s),r=Qt(i),o=!!r,c=r?`/api/${a.slug}/hosting/${encodeURIComponent(r)}`:"",d=He(),[m,u]=pe.useState(null),[T,p]=pe.useState(null);let f;e[0]!==c?(f=()=>Ie(`${c}/e2e/checks`),e[0]=c,e[1]=f):f=e[1];const x=_e({queryKey:xe.e2eChecks(a.slug,r??""),queryFn:f,enabled:o,retry:!1,staleTime:15e3}),v=ze(x.data,"items").some(Ws);let y;e[2]!==c?(y=()=>Ie(`${c}/e2e/runs`),e[2]=c,e[3]=y):y=e[3];const h=_e({queryKey:xe.e2eRuns(a.slug,r??""),queryFn:y,enabled:o,retry:!1,staleTime:3e4,refetchInterval:v?5e3:!1});let P;e[4]!==c?(P=$=>qe(`${c}/e2e/runs/${encodeURIComponent($)}`,"DELETE"),e[4]=c,e[5]=P):P=e[5];const g=Ue({mutationFn:P,onSuccess:()=>{d.invalidateQueries({queryKey:xe.e2eRuns(a.slug,r??"")}),be.success(l("mainPanelTabs.e2eTab.toastRunDeleted")),p(null)},onError:Js});if(!r){let $;e[6]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[6]=$):$=e[6];let H;e[7]!==l?(H=l("mainPanelTabs.e2eTab.noSiteTitle"),e[7]=l,e[8]=H):H=e[8];let K;e[9]!==l?(K=l("mainPanelTabs.e2eTab.noSiteDescription"),e[9]=l,e[10]=K):K=e[10];let J;return e[11]!==H||e[12]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:H,description:K})}),e[11]=H,e[12]=K,e[13]=J):J=e[13],J}if(Ls(h.error)){let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[14]=$):$=e[14];let H;e[15]!==l?(H=l("mainPanelTabs.e2eTab.notConnectedTitle"),e[15]=l,e[16]=H):H=e[16];let K;e[17]!==l?(K=l("mainPanelTabs.e2eTab.notConnectedDescription"),e[17]=l,e[18]=K):K=e[18];let J;return e[19]!==H||e[20]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:H,description:K})}),e[19]=H,e[20]=K,e[21]=J):J=e[21],J}const b=ze(h.data,"items"),N="h-full min-h-0 overflow-y-auto",j="mx-auto flex max-w-4xl flex-col gap-6 p-6";let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(ke,{className:"size-[18px] text-muted-foreground"}),e[22]=w):w=e[22];let S;e[23]!==l?(S=l("mainPanelTabs.e2eTab.title"),e[23]=l,e[24]=S):S=e[24];let C;e[25]!==S?(C=t.jsxs("div",{className:"flex items-center gap-2",children:[w,t.jsx("h2",{className:"text-base font-semibold text-foreground",children:S})]}),e[25]=S,e[26]=C):C=e[26];const k=l("mainPanelTabs.e2eTab.subtitle",{site:r});let D;e[27]!==k?(D=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[27]=k,e[28]=D):D=e[28];let z;e[29]!==D||e[30]!==C?(z=t.jsxs("div",{className:"flex flex-col gap-1",children:[C,D]}),e[29]=D,e[30]=C,e[31]=z):z=e[31];let F;e[32]!==c||e[33]!==a.slug||e[34]!==r?(F=t.jsx(Fs,{base:c,orgSlug:a.slug,site:r}),e[32]=c,e[33]=a.slug,e[34]=r,e[35]=F):F=e[35];let R;e[36]!==z||e[37]!==F?(R=t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[z,F]}),e[36]=z,e[37]=F,e[38]=R):R=e[38];let A;e[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Is,{}),e[39]=A):A=e[39];let E;e[40]!==c||e[41]!==o||e[42]!==a.slug||e[43]!==r?(E=t.jsx(Vs,{base:c,orgSlug:a.slug,site:r,enabled:o}),e[40]=c,e[41]=o,e[42]=a.slug,e[43]=r,e[44]=E):E=e[44];const B=kt;let G;e[45]!==l?(G=l("mainPanelTabs.e2eTab.runs"),e[45]=l,e[46]=G):G=e[46];const me=h.isLoading?t.jsx($t,{cols:5}):h.error?t.jsx(Dt,{children:l("mainPanelTabs.e2eTab.runsError")}):b.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:l("mainPanelTabs.e2eTab.noRuns")}):t.jsxs(Ye,{children:[t.jsx(Ge,{children:t.jsxs(we,{children:[t.jsx(W,{children:l("mainPanelTabs.e2eTab.colRun")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colStatus")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colCommand")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colStarted")}),t.jsx(W,{children:l("mainPanelTabs.e2eTab.colSummary")}),t.jsx(W,{className:"w-[1%]"})]})}),t.jsx(Xe,{children:b.map($=>t.jsxs(we,{className:"cursor-pointer",onClick:()=>u($),children:[t.jsx(Y,{className:"font-mono text-xs",children:$.runId}),t.jsx(Y,{children:t.jsx(te,{variant:St($.status),children:Es($.status,l)})}),t.jsx(Y,{className:"font-mono text-xs text-muted-foreground",children:$.summary?.command??"—"}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ct($.startedAt)}),t.jsx(Y,{className:"text-xs text-muted-foreground whitespace-nowrap tabular-nums",children:Rs($,l)}),t.jsx(Y,{className:"text-right align-middle",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":l("mainPanelTabs.e2eTab.deleteRun"),onClick:H=>{H.stopPropagation(),p($)},disabled:g.isPending,children:t.jsx(ut,{className:"size-4"})})})]},$.runId))})]});let M;e[47]!==B||e[48]!==b||e[49]!==G||e[50]!==me?(M=t.jsx(B,{title:G,count:b.length,children:me}),e[47]=B,e[48]=b,e[49]=G,e[50]=me,e[51]=M):M=e[51];let U;e[52]!==R||e[53]!==A||e[54]!==E||e[55]!==M?(U=t.jsxs("div",{className:j,children:[R,A,E,M]}),e[52]=R,e[53]=A,e[54]=E,e[55]=M,e[56]=U):U=e[56];let I;e[57]!==u?(I=$=>{$||u(null)},e[57]=u,e[58]=I):I=e[58];let X;e[59]!==c||e[60]!==a.slug||e[61]!==m||e[62]!==r||e[63]!==I?(X=t.jsx(Ds,{base:c,orgSlug:a.slug,site:r,run:m,onOpenChange:I}),e[59]=c,e[60]=a.slug,e[61]=m,e[62]=r,e[63]=I,e[64]=X):X=e[64];const Z=T!=null;let q;e[65]!==p?(q=$=>{$||p(null)},e[65]=p,e[66]=q):q=e[66];let V;e[67]!==l?(V=l("mainPanelTabs.e2eTab.confirmDeleteRunTitle"),e[67]=l,e[68]=V):V=e[68];let O;e[69]!==V?(O=t.jsx(ft,{children:V}),e[69]=V,e[70]=O):O=e[70];const Q=T?.runId??"";let se;e[71]!==l||e[72]!==Q?(se=l("mainPanelTabs.e2eTab.confirmDeleteRun",{runId:Q}),e[71]=l,e[72]=Q,e[73]=se):se=e[73];let _;e[74]!==se?(_=t.jsx(xt,{children:se}),e[74]=se,e[75]=_):_=e[75];let ee;e[76]!==O||e[77]!==_?(ee=t.jsxs(pt,{children:[O,_]}),e[76]=O,e[77]=_,e[78]=ee):ee=e[78];const Ce=g.isPending;let le;e[79]!==l?(le=l("mainPanelTabs.e2eTab.cancel"),e[79]=l,e[80]=le):le=e[80];let ne;e[81]!==g.isPending||e[82]!==le?(ne=t.jsx(ht,{disabled:Ce,children:le}),e[81]=g.isPending,e[82]=le,e[83]=ne):ne=e[83];let ae;e[84]!==g||e[85]!==T?(ae=$=>{$.preventDefault(),T&&g.mutate(T.runId)},e[84]=g,e[85]=T,e[86]=ae):ae=e[86];const he=g.isPending;let ue;e[87]!==l?(ue=l("mainPanelTabs.e2eTab.delete"),e[87]=l,e[88]=ue):ue=e[88];let re;e[89]!==g.isPending||e[90]!==ae||e[91]!==ue?(re=t.jsx(bt,{variant:"destructive",onClick:ae,disabled:he,children:ue}),e[89]=g.isPending,e[90]=ae,e[91]=ue,e[92]=re):re=e[92];let ie;e[93]!==ne||e[94]!==re?(ie=t.jsxs(gt,{children:[ne,re]}),e[93]=ne,e[94]=re,e[95]=ie):ie=e[95];let oe;e[96]!==ee||e[97]!==ie?(oe=t.jsxs(jt,{children:[ee,ie]}),e[96]=ee,e[97]=ie,e[98]=oe):oe=e[98];let ce;e[99]!==Z||e[100]!==q||e[101]!==oe?(ce=t.jsx(Tt,{open:Z,onOpenChange:q,children:oe}),e[99]=Z,e[100]=q,e[101]=oe,e[102]=ce):ce=e[102];let fe;return e[103]!==U||e[104]!==X||e[105]!==ce?(fe=t.jsxs("div",{className:N,children:[U,X,ce]}),e[103]=U,e[104]=X,e[105]=ce,e[106]=fe):fe=e[106],fe}function Js(n){return be.error(Oe(n))}function Ws(n){const e=(n.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}function Ys(){const n=L.c(3),e=cs(),s=os();let l;return n[0]!==s.e2e||n[1]!==e?(l=s.e2e?t.jsx(Hs,{virtualMcpId:e}):t.jsx(is,{virtualMcpId:e}),n[0]=s.e2e,n[1]=e,n[2]=l):l=n[2],l}function za(){const n=L.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(It.Content,{children:t.jsx(Ys,{})}),n[0]=e):e=n[0],e}export{za as default};