decocms 4.286.2 → 4.286.3

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 (271) hide show
  1. package/dist/client/assets/{AlertCircle-hiOqJcW5.js → AlertCircle-CWbbvCE8.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BqfhkmRW.js → AreaChart-BxPMYD6n.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DEFSUc-V.js → ArrowLeft-yxeobg0v.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CHCWVGsK.js → ArrowUp-ClPk-tEL.js} +1 -1
  5. package/dist/client/assets/{Check-yS6TBRKx.js → Check-B-T1OdyM.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DUmezbyG.js → CheckCircle-Di9U5M_3.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-RrKk7H6I.js → ChevronDown-lhRoz8ve.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-B3-5oKsn.js → ChevronRight-PA4SrDe8.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-CqILirh0.js → ChevronSelectorVertical-BVHuvXcc.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-7BeD5K4q.js → ChevronUp-CjB5cNrn.js} +1 -1
  11. package/dist/client/assets/Circle-0WhMTazG.js +1 -0
  12. package/dist/client/assets/{Copy01-DH1C4T5n.js → Copy01-rjZTF0JK.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DxOjVad1.js → CreditCard01-CEJXC95D.js} +1 -1
  14. package/dist/client/assets/DotsVertical-BK4JkTfJ.js +1 -0
  15. package/dist/client/assets/{Download01-uGF8VQkc.js → Download01-B29-DAMF.js} +1 -1
  16. package/dist/client/assets/{Eye-BP8ZftGB.js → Eye-Dwcpfw8S.js} +1 -1
  17. package/dist/client/assets/{FilterLines-DQxyjNBq.js → FilterLines-T3vrjlCu.js} +1 -1
  18. package/dist/client/assets/Flag01-BeOUsooU.js +1 -0
  19. package/dist/client/assets/{Globe01-DZMulFU5.js → Globe01-BJregYun.js} +1 -1
  20. package/dist/client/assets/{Globe04-DCtFs4xl.js → Globe04-CzbTyKcv.js} +1 -1
  21. package/dist/client/assets/{HardDrive-BLuff5wS.js → HardDrive-KdEZynii.js} +1 -1
  22. package/dist/client/assets/{Key01-DLwJ7Ckf.js → Key01-Dw14FM0z.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01--8l2Mzfp.js → LinkExternal01-GY6MBjsu.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-DiNL4sfs.js → LockUnlocked01-Dy5fUMBA.js} +1 -1
  25. package/dist/client/assets/{LogOut01-DDaRu_3P.js → LogOut01-LLXPIQBH.js} +1 -1
  26. package/dist/client/assets/{Monitor01-i2p8_gzb.js → Monitor01-Dbzqlbm3.js} +1 -1
  27. package/dist/client/assets/{Palette-xsvHNVzX.js → Palette-2Z9yrBrj.js} +1 -1
  28. package/dist/client/assets/{Play-BAPfXOmA.js → Play-C8DX3MNw.js} +1 -1
  29. package/dist/client/assets/{Plus-BAv6QwTj.js → Plus-B-dc60nq.js} +1 -1
  30. package/dist/client/assets/{SearchLg-C-Eqo4y8.js → SearchLg-BR5Nvvey.js} +1 -1
  31. package/dist/client/assets/{SearchMd-BsqgJ4OR.js → SearchMd-BkU5uvZ3.js} +1 -1
  32. package/dist/client/assets/{Settings02-EAB5l-Jo.js → Settings02-D2DQzPhq.js} +1 -1
  33. package/dist/client/assets/{Share07-D3k-RSTq.js → Share07-C7EQRNeA.js} +1 -1
  34. package/dist/client/assets/{Shield01-XqMu5Nf3.js → Shield01-CE7mb3Ix.js} +1 -1
  35. package/dist/client/assets/{Stars01-CqDHtnom.js → Stars01-Dd5b7TNK.js} +1 -1
  36. package/dist/client/assets/{Stars02-DvnkqIQI.js → Stars02-U_TQPDnJ.js} +1 -1
  37. package/dist/client/assets/{Sun-BArbxBTe.js → Sun-Bv9Ylpqk.js} +1 -1
  38. package/dist/client/assets/{SwitchHorizontal01-V4kh4_ID.js → SwitchHorizontal01-Ba8D7M8C.js} +1 -1
  39. package/dist/client/assets/Tag01-hM9BONIh.js +1 -0
  40. package/dist/client/assets/ThumbsUp-DsTVql5w.js +1 -0
  41. package/dist/client/assets/{Tool01-Bi7x_pFT.js → Tool01-Du0WeBXL.js} +1 -1
  42. package/dist/client/assets/{Tool02-BahI2w-F.js → Tool02-FNZ9nQDs.js} +1 -1
  43. package/dist/client/assets/{Trash01-CxXI4uLo.js → Trash01-jS-aJOE_.js} +1 -1
  44. package/dist/client/assets/TrendUp01-BTPOrFwv.js +1 -0
  45. package/dist/client/assets/{Upload01-Dx6t-7oj.js → Upload01-CbBPEmg7.js} +1 -1
  46. package/dist/client/assets/{User01-Bs6_V_tl.js → User01-CRCcS7B3.js} +1 -1
  47. package/dist/client/assets/UserSquare-CZDBDZu6.js +1 -0
  48. package/dist/client/assets/{Users01-UmcM8Jww.js → Users01-D3bzr0SJ.js} +1 -1
  49. package/dist/client/assets/{Users03-xamSOp-f.js → Users03-DgFiBAG1.js} +1 -1
  50. package/dist/client/assets/{XCircle-DbIIvoOs.js → XCircle-BiZVJH8A.js} +1 -1
  51. package/dist/client/assets/{XClose-BWO2zbra.js → XClose-CF46faeu.js} +1 -1
  52. package/dist/client/assets/{YAxis-ByFmlys2.js → YAxis-BMyIVcKx.js} +1 -1
  53. package/dist/client/assets/{Zap-DrubYVJC.js → Zap-BWNllArR.js} +1 -1
  54. package/dist/client/assets/{ZapSquare-BWMDlPC4.js → ZapSquare-hz2fwhYk.js} +1 -1
  55. package/dist/client/assets/{access-gate-BxOMxDlN.js → access-gate-O3YxMPI-.js} +1 -1
  56. package/dist/client/assets/agent-icon-BWc_2R02.js +1 -0
  57. package/dist/client/assets/agents-list-C8dqBI87.js +1 -0
  58. package/dist/client/assets/{ai-providers-DudSkLhI.js → ai-providers-j3ehPHdm.js} +1 -1
  59. package/dist/client/assets/{alert-Bz2oKGcW.js → alert-_VpoEhWD.js} +1 -1
  60. package/dist/client/assets/{alert-dialog-C7gi43qw.js → alert-dialog-BGVZQi8t.js} +1 -1
  61. package/dist/client/assets/{api-keys-BmwPSJJx.js → api-keys-iBLrzFhd.js} +1 -1
  62. package/dist/client/assets/app-editor-BFs81spL.js +1 -0
  63. package/dist/client/assets/{auth-XA3XVIU6.js → auth-CLHX9XFE.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-C9aYupjX.js → auth-catchall-DM1aExYv.js} +1 -1
  65. package/dist/client/assets/{auth-entry-DxkDBhzc.js → auth-entry-m5S-1owW.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-Dl6V6Y4j.js → auth-split-layout-D6uGwCuZ.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-C4F2LaiG.js → authenticate-and-persist-oauth-DI4W2xjU.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-CmUv79s4.js → automation-list-row-CNNkrJuI.js} +1 -1
  69. package/dist/client/assets/{automation-runs-DHi91GZY.js → automation-runs-Z0iz6dal.js} +1 -1
  70. package/dist/client/assets/automations-CtclgEfp.js +1 -0
  71. package/dist/client/assets/{avatar-BKEDMSnX.js → avatar-BwzKyp1i.js} +1 -1
  72. package/dist/client/assets/{badge-BVOT5cY1.js → badge-QK4_b8m3.js} +1 -1
  73. package/dist/client/assets/{block-document-CIjl4dWS.js → block-document-C4eczyjS.js} +2 -2
  74. package/dist/client/assets/{breadcrumb-DcuBWgU6.js → breadcrumb-WBjlnhkt.js} +1 -1
  75. package/dist/client/assets/{buckets-BxUOH6pm.js → buckets-CfR2ycW8.js} +1 -1
  76. package/dist/client/assets/bulk-category-panel-CWZMpFWx.js +1 -0
  77. package/dist/client/assets/{capability-load-error-Bz8fYgjS.js → capability-load-error-B42WqLL_.js} +1 -1
  78. package/dist/client/assets/{cards-XUuMSfqb.js → cards-CVa-fA_N.js} +1 -1
  79. package/dist/client/assets/category-editor-Bm1CzlKC.js +1 -0
  80. package/dist/client/assets/{chart-Ck_FKld6.js → chart-C0_sgo02.js} +1 -1
  81. package/dist/client/assets/{chat-context-cfHPN5ei.js → chat-context-xMr_4Axs.js} +1 -1
  82. package/dist/client/assets/{checkbox-hfjBf94F.js → checkbox-BBAE_NPI.js} +1 -1
  83. package/dist/client/assets/choose-editor-Bd3WyAXg.js +1 -0
  84. package/dist/client/assets/{cli-auth-success-CyoOzdgx.js → cli-auth-success-BWuEV9D3.js} +1 -1
  85. package/dist/client/assets/collection-detail-NXDlLsWB.js +1 -0
  86. package/dist/client/assets/{collection-display-button-C-VYkKeK.js → collection-display-button-DiJ_qzja.js} +1 -1
  87. package/dist/client/assets/{collection-search-Bw_HysKr.js → collection-search-BBBLCvXm.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-D6YxcBlE.js → collection-table-wrapper-BkCl1Oxu.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-B_gvi_U1.js → collection-tabs-BhNVbQRQ.js} +1 -1
  90. package/dist/client/assets/{command-DmgErSks.js → command-dzcaI1yG.js} +1 -1
  91. package/dist/client/assets/commerce-onboarding-Da6sVkAK.js +1 -0
  92. package/dist/client/assets/config-n1zSHZqO.js +1 -0
  93. package/dist/client/assets/{connect-B3CB3NbU.js → connect-Cqh3zHKK.js} +1 -1
  94. package/dist/client/assets/{connection-Du-s9JTq.js → connection-D7fgeB0z.js} +1 -1
  95. package/dist/client/assets/{connection-card-qmGgp48y.js → connection-card-Cr01Ig2w.js} +1 -1
  96. package/dist/client/assets/connection-detail-BHZZoofs.js +1 -0
  97. package/dist/client/assets/{connection-form-helpers-CEN5IzSB.js → connection-form-helpers-BBbhpert.js} +1 -1
  98. package/dist/client/assets/connections-BQaOPVh2.js +1 -0
  99. package/dist/client/assets/{decopilot-sse-pool-JfBMouUo.js → decopilot-sse-pool-BxpeMujQ.js} +1 -1
  100. package/dist/client/assets/{dialog-qy0Z1aJp.js → dialog-DROTnc8B.js} +1 -1
  101. package/dist/client/assets/{domain-settings-BAj4VRPx.js → domain-settings-trPPWhCm.js} +1 -1
  102. package/dist/client/assets/{drawer-Ba-RJ-Vm.js → drawer-BXgwQk-w.js} +1 -1
  103. package/dist/client/assets/dropdown-menu-B4M2oT-i.js +1 -0
  104. package/dist/client/assets/{empty-state-jsXC5kwN.js → empty-state-CUXmv4-D.js} +1 -1
  105. package/dist/client/assets/{extract-connection-data-C4yVX3dU.js → extract-connection-data-BLs-F9MR.js} +1 -1
  106. package/dist/client/assets/file-explorer-DQyKeH0t.js +2 -0
  107. package/dist/client/assets/{file-type-icon-Qndp-c2z.js → file-type-icon-t6saePJP.js} +1 -1
  108. package/dist/client/assets/{form-YGkaTcsZ.js → form-Cedy9Kwp.js} +1 -1
  109. package/dist/client/assets/general-BOCK3WGH.js +1 -0
  110. package/dist/client/assets/github-icon-Dz4xNzgo.js +1 -0
  111. package/dist/client/assets/github-repo-picker-BziyF4os.js +1 -0
  112. package/dist/client/assets/{hooks-BQCR9h_s.js → hooks-RMH7Z-XL.js} +1 -1
  113. package/dist/client/assets/index-BC8qJ9Xs.js +1 -0
  114. package/dist/client/assets/{index-CP07biT3.js → index-BQHsB5yn.js} +1 -1
  115. package/dist/client/assets/{index-B_cjnmHp.js → index-Bkh-xk2l.js} +1 -1
  116. package/dist/client/assets/index-C6sSInvt.js +1 -0
  117. package/dist/client/assets/{index-CYDZxSyh.js → index-CRg_jvMs.js} +1 -1
  118. package/dist/client/assets/{index-BlALgPn0.js → index-CXprdmhJ.js} +1 -1
  119. package/dist/client/assets/{index-w7SC22aY.js → index-DucPHVXk.js} +2 -2
  120. package/dist/client/assets/{index-B069nvZi.js → index-Tc1_kaTc.js} +1 -1
  121. package/dist/client/assets/{index-66BUlUCq.js → index-ZtSDBa1M.js} +3 -3
  122. package/dist/client/assets/{index-CXN6bmWL.js → index-_P3U4SZO.js} +61 -61
  123. package/dist/client/assets/{index-redirect-CCwJiDzA.js → index-redirect-CoqPAfXV.js} +1 -1
  124. package/dist/client/assets/{infra-billing-BMnY0AH9.js → infra-billing-BeWq1GLp.js} +1 -1
  125. package/dist/client/assets/{input-DSNlRZp-.js → input-DF-XKSRq.js} +1 -1
  126. package/dist/client/assets/{integration-icon-DgpBd9x9.js → integration-icon-DjGRurnq.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-BxVvTBsq.js → invite-member-dialog-DqcFAinu.js} +1 -1
  128. package/dist/client/assets/{label-CqOwuXw5.js → label-CLXgBrTK.js} +1 -1
  129. package/dist/client/assets/{layout-BX1xrGBZ.js → layout-C-2mHUlC.js} +1 -1
  130. package/dist/client/assets/{login-CdYcIAH1.js → login-D4OWmFXZ.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-CCK0vzqY.js → mcp-oauth-CCo8zz0v.js} +1 -1
  132. package/dist/client/assets/members-CBSKDkea.js +1 -0
  133. package/dist/client/assets/{monaco-editor-doGausTU.js → monaco-editor-Dz28X6On.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-BE0x_Y2T.js → monitoring-stats-row-BWd9vmex.js} +1 -1
  135. package/dist/client/assets/{multi-select-CpP6bWVL.js → multi-select-CeCd11zE.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-DDLCnMS3.js → oauth-callback-B5fykUah.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-ai-provider-BdKpH2mQ.js → oauth-callback-ai-provider-ChH0BX2g.js} +1 -1
  138. package/dist/client/assets/{onboarding-BhdMYjwb.js → onboarding-BXPduKNj.js} +1 -1
  139. package/dist/client/assets/{org-layout-6Z4I0hHW.js → org-layout-CjgcxBH7.js} +1 -1
  140. package/dist/client/assets/{organization-choice-BP7uSM89.js → organization-choice-CiVNPul4.js} +1 -1
  141. package/dist/client/assets/{orgs-Dg1CXVTF.js → orgs-J85r2cCC.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-CqsF5lXU.js → page-seo-form-BG0L-bvt.js} +1 -1
  143. package/dist/client/assets/{popover-B-hxuR7_.js → popover-Dac8KJD5.js} +1 -1
  144. package/dist/client/assets/post-calendar-DQB5WZcK.js +1 -0
  145. package/dist/client/assets/post-editor-s8s5QbBW.js +1 -0
  146. package/dist/client/assets/{primitives-DFmC6p_Q.js → primitives-CB_18Rqi.js} +1 -1
  147. package/dist/client/assets/{profile-Dkr0W5iY.js → profile-V5EfUztV.js} +1 -1
  148. package/dist/client/assets/project-app-view-B2hne0Rq.js +1 -0
  149. package/dist/client/assets/{prompts-7twTnqOX.js → prompts-rYMXdTcD.js} +1 -1
  150. package/dist/client/assets/record-editor-DuktYC5p.js +1 -0
  151. package/dist/client/assets/redirect-editor-EZGYI9JT.js +1 -0
  152. package/dist/client/assets/registry-C02S6pn1.js +2 -0
  153. package/dist/client/assets/{registry-layout-BKOsGixf.js → registry-layout-jVaMxhaB.js} +2 -2
  154. package/dist/client/assets/{reports-DRMI8_m1.js → reports-BwjyR_vK.js} +2 -2
  155. package/dist/client/assets/{require-capability-NxUQlfkl.js → require-capability-DuOlrYne.js} +1 -1
  156. package/dist/client/assets/{required-auth-layout-CHGHhIp4.js → required-auth-layout-Cw5XELIs.js} +1 -1
  157. package/dist/client/assets/{reset-password-DqdRqc5j.js → reset-password-Dtq_X_bY.js} +1 -1
  158. package/dist/client/assets/review-settings-CZcxafz4.js +1 -0
  159. package/dist/client/assets/roles-BXp9ASCp.js +1 -0
  160. package/dist/client/assets/{scroll-area-5vzmt2fx.js → scroll-area-I0x16PDc.js} +1 -1
  161. package/dist/client/assets/{search-input-fSMW29Ha.js → search-input-D0Xkp13F.js} +1 -1
  162. package/dist/client/assets/{secrets-DZUJRYpg.js → secrets-BSMCFXRK.js} +1 -1
  163. package/dist/client/assets/{sections-editor-dUiZNQ0T.js → sections-editor-xYo3wCUt.js} +2 -2
  164. package/dist/client/assets/{select-BxxMay64.js → select-DbwWg8mr.js} +1 -1
  165. package/dist/client/assets/{select-model-3PUtzWOF.js → select-model-2tHFqpDQ.js} +1 -1
  166. package/dist/client/assets/self-tool-result-xpNWJZXF.js +1 -0
  167. package/dist/client/assets/seo-editor-Dqckneoh.js +1 -0
  168. package/dist/client/assets/{settings-layout-68cErOzo.js → settings-layout-DWqCPuUa.js} +1 -1
  169. package/dist/client/assets/{shell-controls-CnzOBK-d.js → shell-controls-CN_f1c-4.js} +1 -1
  170. package/dist/client/assets/{shell-layout-BAPiuVCF.js → shell-layout-C_ZyBlX2.js} +1 -1
  171. package/dist/client/assets/{spinner-5kJIZwhC.js → spinner-DG-xe-ih.js} +1 -1
  172. package/dist/client/assets/{sso-BSgokATe.js → sso-D9XY7jrz.js} +1 -1
  173. package/dist/client/assets/{store-BDt4_0eK.js → store-BXWhlkgq.js} +1 -1
  174. package/dist/client/assets/store-registry-HpksP_CA.js +2 -0
  175. package/dist/client/assets/super-agent-icon-DcTJHa3h.js +1 -0
  176. package/dist/client/assets/{switch-DranR37-.js → switch-Dy2L3YiE.js} +1 -1
  177. package/dist/client/assets/synced-repos-DmEk8PVk.js +1 -0
  178. package/dist/client/assets/{tab-id-rV9ba-P7.js → tab-id-9f5Elcwo.js} +1 -1
  179. package/dist/client/assets/{table-BaBcwP7i.js → table-L3_2rt8c.js} +1 -1
  180. package/dist/client/assets/{tabs-C4RG823b.js → tabs-DT4yo0dz.js} +1 -1
  181. package/dist/client/assets/{task-board-U9ekmgf6.js → task-board-BU3VhW_R.js} +1 -1
  182. package/dist/client/assets/task-filters-C6nXtRnq.js +1 -0
  183. package/dist/client/assets/tasks-BAPI3Xju.js +1 -0
  184. package/dist/client/assets/{textarea-BJRhlIeX.js → textarea-Dak8L16r.js} +1 -1
  185. package/dist/client/assets/{toggle-group-BjESUsiw.js → toggle-group-B64JMRC7.js} +1 -1
  186. package/dist/client/assets/{toolbar-B7xp1f_g.js → toolbar-H9jBvos0.js} +1 -1
  187. package/dist/client/assets/{track-CLV6okT5.js → track-D52qjC2J.js} +1 -1
  188. package/dist/client/assets/{types-Dptm8vRS.js → types-DBBMfbWD.js} +1 -1
  189. package/dist/client/assets/{use-ai-providers-Dnx2BwXA.js → use-ai-providers-D88F4M9N.js} +1 -1
  190. package/dist/client/assets/{use-api-keys-9J2chZIl.js → use-api-keys-Bf2TrBSR.js} +1 -1
  191. package/dist/client/assets/{use-automations-hHGlxB3Q.js → use-automations-DVpA7X4y.js} +1 -1
  192. package/dist/client/assets/{use-autosave-CjMVnZ9D.js → use-autosave-P1hDwXVA.js} +1 -1
  193. package/dist/client/assets/use-commerce-diagnostic-CWLq3qkc.js +1 -0
  194. package/dist/client/assets/{use-connection-lpB7Ak3D.js → use-connection-CC36uLn5.js} +1 -1
  195. package/dist/client/assets/{use-copy-cPUcRSDk.js → use-copy-DdEgqbGk.js} +1 -1
  196. package/dist/client/assets/{use-create-virtual-mcp-BE3_FLPI.js → use-create-virtual-mcp-D3LB27Lm.js} +1 -1
  197. package/dist/client/assets/{use-debounced-autosave-BTblZwgG.js → use-debounced-autosave-B1A8E_zm.js} +1 -1
  198. package/dist/client/assets/{use-debounced-value-C1RgoEO7.js → use-debounced-value-DPpXL-7f.js} +1 -1
  199. package/dist/client/assets/{use-decopilot-events-BKdVQlWj.js → use-decopilot-events-BlGPRpvB.js} +1 -1
  200. package/dist/client/assets/{use-delete-connection-D-APxGPc.js → use-delete-connection-qgsHvwBc.js} +1 -1
  201. package/dist/client/assets/{use-deployment-admin-BaYSlZon.js → use-deployment-admin-DgGUpAFW.js} +1 -1
  202. package/dist/client/assets/{use-file-configs-CwqLdhuz.js → use-file-configs-CbqZjK3e.js} +1 -1
  203. package/dist/client/assets/{use-infinite-scroll--Ew0plMX.js → use-infinite-scroll-Dh44_qVU.js} +1 -1
  204. package/dist/client/assets/{use-join-requests-C7H_x6Qk.js → use-join-requests-sPfR15KV.js} +1 -1
  205. package/dist/client/assets/{use-mcp-auth-status-5BY6Nzu_.js → use-mcp-auth-status-BojxBf39.js} +1 -1
  206. package/dist/client/assets/{use-mcp-client-DPpSkRNd.js → use-mcp-client-4vfKAZII.js} +1 -1
  207. package/dist/client/assets/{use-mcp-tools-BgQkZEa9.js → use-mcp-tools-kLeUVQb5.js} +1 -1
  208. package/dist/client/assets/{use-members-ZgUYxfoN.js → use-members-BThWW8DN.js} +1 -1
  209. package/dist/client/assets/{use-navigate-to-agent-BDnGtSYT.js → use-navigate-to-agent-B7O4mdOp.js} +1 -1
  210. package/dist/client/assets/{use-org-auth-client-s5DfOquz.js → use-org-auth-client-CvXr6xpG.js} +1 -1
  211. package/dist/client/assets/{use-org-repo-syncs-BVrqXPPs.js → use-org-repo-syncs-CdgqxwZ1.js} +1 -1
  212. package/dist/client/assets/{use-org-sso-4XYfaR1R.js → use-org-sso-dXFz_XEn.js} +1 -1
  213. package/dist/client/assets/{use-organization-roles-BhSD9m9-.js → use-organization-roles-Iu-q9dgw.js} +1 -1
  214. package/dist/client/assets/{use-organization-settings-DyKnNOU1.js → use-organization-settings-DYWZmbib.js} +1 -1
  215. package/dist/client/assets/{use-registry-connections-CumAXYCD.js → use-registry-connections-Dp-yVGrd.js} +1 -1
  216. package/dist/client/assets/{use-secrets-Dv8l4-qt.js → use-secrets-07Tequ4i.js} +1 -1
  217. package/dist/client/assets/{use-section-preview-base-DNZmvPJ8.js → use-section-preview-base-DfPlaDKY.js} +1 -1
  218. package/dist/client/assets/{use-status-sounds-Lkn4Z7sU.js → use-status-sounds-taT8tvJS.js} +1 -1
  219. package/dist/client/assets/{use-tags-mKLoUee7.js → use-tags-p0LvS31V.js} +1 -1
  220. package/dist/client/assets/{use-view-mode-C2aXQ0iB.js → use-view-mode-BkOAgSbw.js} +1 -1
  221. package/dist/client/assets/{use-virtual-mcp-CE8tx9or.js → use-virtual-mcp-B6Y0d6n-.js} +1 -1
  222. package/dist/client/assets/useInfiniteQuery-Dive_90S.js +1 -0
  223. package/dist/client/assets/useSuspenseInfiniteQuery-CV0LhXLD.js +1 -0
  224. package/dist/client/assets/{users-B59tCokk.js → users-xEs7h3qa.js} +1 -1
  225. package/dist/client/assets/variant-calendar-DuMy7tLJ.js +1 -0
  226. package/dist/client/assets/{view-mode-toggle-D1UCXWa2.js → view-mode-toggle-BVn0Ll1M.js} +1 -1
  227. package/dist/client/index.html +1 -1
  228. package/dist/server/cli.js +477 -477
  229. package/dist/server/server.js +326 -326
  230. package/package.json +1 -1
  231. package/dist/client/assets/DotsVertical-DL_xKTby.js +0 -1
  232. package/dist/client/assets/TrendUp01-CYU0S4zQ.js +0 -1
  233. package/dist/client/assets/UserSquare-BaeuOy58.js +0 -1
  234. package/dist/client/assets/agent-icon-Dk522vgR.js +0 -1
  235. package/dist/client/assets/agents-list-DPxzcA1Q.js +0 -1
  236. package/dist/client/assets/app-editor-CyR5TnHa.js +0 -1
  237. package/dist/client/assets/automations-CbhqrSJB.js +0 -1
  238. package/dist/client/assets/bulk-category-panel-BLG4ug1F.js +0 -1
  239. package/dist/client/assets/category-editor-CdqRjEq-.js +0 -1
  240. package/dist/client/assets/choose-editor-Zlcu6_gN.js +0 -1
  241. package/dist/client/assets/collection-detail-BltlsBDt.js +0 -1
  242. package/dist/client/assets/commerce-onboarding-CVXvwgis.js +0 -1
  243. package/dist/client/assets/config-Bhu5kCwB.js +0 -1
  244. package/dist/client/assets/connection-detail-CdS57-hi.js +0 -1
  245. package/dist/client/assets/connections-4JE1f-NA.js +0 -1
  246. package/dist/client/assets/dropdown-menu-U_vACpBP.js +0 -1
  247. package/dist/client/assets/file-explorer-BQ3uCYfn.js +0 -2
  248. package/dist/client/assets/general-MN_YuUqq.js +0 -1
  249. package/dist/client/assets/github-repo-picker-BqSmN9CA.js +0 -1
  250. package/dist/client/assets/index-BbuG8Jbg.js +0 -1
  251. package/dist/client/assets/index-BpfHCkMo.js +0 -1
  252. package/dist/client/assets/members-DArjgHPY.js +0 -1
  253. package/dist/client/assets/post-calendar-CwOyzayg.js +0 -1
  254. package/dist/client/assets/post-editor-CMogJsWz.js +0 -1
  255. package/dist/client/assets/project-app-view-CU0pWUxg.js +0 -1
  256. package/dist/client/assets/record-editor-B5zgmpPT.js +0 -1
  257. package/dist/client/assets/redirect-editor-CBQTBNAl.js +0 -1
  258. package/dist/client/assets/registry-CT7qFX2T.js +0 -2
  259. package/dist/client/assets/review-settings-hF6_ejz-.js +0 -1
  260. package/dist/client/assets/roles-DNg-v40Q.js +0 -1
  261. package/dist/client/assets/self-tool-result-CnLvIY_a.js +0 -1
  262. package/dist/client/assets/seo-editor-C771IjDu.js +0 -1
  263. package/dist/client/assets/store-registry-417KFpib.js +0 -2
  264. package/dist/client/assets/synced-repos-C9zoHXsA.js +0 -1
  265. package/dist/client/assets/task-key-n93QwSK2.js +0 -1
  266. package/dist/client/assets/tasks-CLCpAm24.js +0 -1
  267. package/dist/client/assets/use-commerce-diagnostic-Brb2fqiq.js +0 -1
  268. package/dist/client/assets/use-task-board-items-DhOTd2ok.js +0 -1
  269. package/dist/client/assets/useInfiniteQuery-1rU8yXy8.js +0 -1
  270. package/dist/client/assets/useSuspenseInfiniteQuery-DiMhuD_T.js +0 -1
  271. package/dist/client/assets/variant-calendar-C9x2S-wB.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as q,c as G,H as Fe,ac as Ne,p as He,o as We,K as ce,b as W,e as oe,q as at,t as ke,j as a,B as Le,n as V,av as rt}from"./index-ZtSDBa1M.js";import{T as nt,S as ze}from"./task-board-BU3VhW_R.js";import{t as it}from"./decopilot-sse-pool-BxpeMujQ.js";import{u as ot}from"./use-decopilot-events-BlGPRpvB.js";import{p as Oe,S as $e}from"./super-agent-icon-DcTJHa3h.js";import{A as Me}from"./avatar-BwzKyp1i.js";import{d as ct,b as ut,f as dt,g as ft,a as mt,D as ht}from"./drawer-BXgwQk-w.js";import{h as Z,D as Se,b as Be,g as Ce,c as ve}from"./dropdown-menu-B4M2oT-i.js";import{a as _e,b as De,P as Te}from"./popover-Dac8KJD5.js";import{a as Ee,c as we,d as X,e as de,b as Ie,C as Ae}from"./command-dzcaI1yG.js";import{n as je,b as gt,a as pt,i as xt}from"./Tag01-hM9BONIh.js";import{i as Je}from"./Check-B-T1OdyM.js";import{t as ue}from"./ChevronDown-lhRoz8ve.js";import{i as Xe}from"./FilterLines-T3vrjlCu.js";import{s as kt}from"./Flag01-BeOUsooU.js";import{s as Pe}from"./User01-CRCcS7B3.js";import{G as Ke}from"./github-icon-Dz4xNzgo.js";import{g as Qe}from"./get-initials-D-f_fDFw.js";import{P as pe,b as jt,t as qe,f as bt}from"./config-n1zSHZqO.js";const Ue=()=>0;function yt(t){const{orgSlug:e,enabled:s=!0,onUpdate:r,onDelete:n,onResync:o}=t,l=q.useRef(r);l.current=r;const i=q.useRef(n);i.current=n;const m=q.useRef(o);m.current=o;const c=q.useRef(null),j=q.useRef(s),y=q.useRef(e);(!c.current||j.current!==s||y.current!==e)&&(j.current=s,y.current=e,c.current=S=>{if(!s||!e)return()=>{};const p=b=>{let x;try{x=JSON.parse(b.data)}catch{return}x.data&&(b.type===nt?i.current?.(x.data.id):l.current(x.data)),S()};return it.subscribe(e,p,()=>m.current?.())}),q.useSyncExternalStore(c.current,Ue,Ue)}function as(){const t=G.c(9),{locator:e}=Fe(),s=Ne();let r;t[0]!==e?(r=ce.taskBoardItems(e),t[0]=e,t[1]=r):r=t[1];let n;t[2]!==s?(n=async()=>{const{items:m,sprints:c}=await s.call("TASK_BOARD_ITEM_LIST",{});return{items:m,sprints:c}},t[2]=s,t[3]=n):n=t[3];let o;t[4]!==r||t[5]!==n?(o={queryKey:r,queryFn:n},t[4]=r,t[5]=n,t[6]=o):o=t[6];const{data:l}=We(o);let i;return t[7]!==l?.sprints?(i=new Map((l?.sprints??[]).map(Ft)),t[7]=l?.sprints,t[8]=i):i=t[8],i}function Ft(t){return[t.id,t]}function rs(){const t=G.c(35),{org:e,locator:s}=Fe(),r=Ne(),n=He();let o;t[0]!==s?(o=ce.taskBoardItems(s),t[0]=s,t[1]=o):o=t[1];const l=o;let i;t[2]!==r?(i=async()=>{const{items:h,sprints:u}=await r.call("TASK_BOARD_ITEM_LIST",{});return{items:h,sprints:u}},t[2]=r,t[3]=i):i=t[3];let m;t[4]!==l||t[5]!==i?(m={queryKey:l,queryFn:i,refetchInterval:6e4},t[4]=l,t[5]=i,t[6]=m):m=t[6];const c=We(m);let j;t[7]!==s||t[8]!==n||t[9]!==l?(j=h=>{n.cancelQueries({queryKey:l}),n.setQueryData(l,u=>u&&{...u,items:u.items.some(f=>f.id===h.id)?u.items.map(f=>f.id===h.id?h:f):[h,...u.items]}),n.invalidateQueries({queryKey:ce.taskBoardActivity(s,h.id)})},t[7]=s,t[8]=n,t[9]=l,t[10]=j):j=t[10];let y,d;t[11]!==n||t[12]!==l?(y=()=>{n.invalidateQueries({queryKey:l})},d=h=>{n.cancelQueries({queryKey:l}),n.setQueryData(l,u=>u&&{...u,items:u.items.filter(f=>f.id!==h)})},t[11]=n,t[12]=l,t[13]=y,t[14]=d):(y=t[13],d=t[14]);let S;t[15]!==e.slug||t[16]!==j||t[17]!==y||t[18]!==d?(S={orgSlug:e.slug,onUpdate:j,onResync:y,onDelete:d},t[15]=e.slug,t[16]=j,t[17]=y,t[18]=d,t[19]=S):S=t[19],yt(S);let p;t[20]!==n||t[21]!==l?(p=h=>{const u=h.subject,f=h.data.status;n.cancelQueries({queryKey:l}),n.setQueryData(l,g=>g&&{...g,items:g.items.map(F=>F.threads.some(B=>B.threadId===u)?{...F,threads:F.threads.map(B=>B.threadId===u?{...B,status:f}:B)}:F)})},t[20]=n,t[21]=l,t[22]=p):p=t[22];let b;t[23]!==e.slug||t[24]!==p?(b={orgSlug:e.slug,onTaskStatus:p},t[23]=e.slug,t[24]=p,t[25]=b):b=t[25],ot(b);let x;t[26]!==c.data?.items?(x=c.data?.items??[],t[26]=c.data?.items,t[27]=x):x=t[27];let k;t[28]!==c.data?.sprints?(k=c.data?.sprints??[],t[28]=c.data?.sprints,t[29]=k):k=t[29];let N;return t[30]!==c.error||t[31]!==c.isLoading||t[32]!==k||t[33]!==x?(N={items:x,sprints:k,isLoading:c.isLoading,error:c.error},t[30]=c.error,t[31]=c.isLoading,t[32]=k,t[33]=x,t[34]=N):N=t[34],N}function ns(){const t=G.c(70),{org:e,locator:s}=Fe(),r=Ne(),n=He(),o=W();let l;t[0]!==s?(l=ce.taskBoardItems(s),t[0]=s,t[1]=l):l=t[1];const i=l;let m;t[2]!==n||t[3]!==i?(m=()=>n.invalidateQueries({queryKey:i}),t[2]=n,t[3]=i,t[4]=m):m=t[4];const c=m;let j;t[5]!==r?(j=T=>r.call("TASK_BOARD_ITEM_CREATE",T),t[5]=r,t[6]=j):j=t[6];let y;t[7]!==c||t[8]!==j?(y={mutationFn:j,onSuccess:c},t[7]=c,t[8]=j,t[9]=y):y=t[9];const d=oe(y);let S;t[10]!==r?(S=T=>r.call("TASK_BOARD_ITEM_UPDATE",T),t[10]=r,t[11]=S):S=t[11];let p;t[12]!==n||t[13]!==i?(p=async T=>{await n.cancelQueries({queryKey:i});const z=n.getQueryData(i);return n.setQueryData(i,A=>A&&{...A,items:A.items.map(Q=>Q.id===T.id?{...Q,...T}:Q)}),{previous:z}},t[12]=n,t[13]=i,t[14]=p):p=t[14];let b;t[15]!==e?(b=(T,z)=>{z.status==="done"&&at("task_marked_done",{organization_id:e.id,task_board_item_id:z.id})},t[15]=e,t[16]=b):b=t[16];let x;t[17]!==n||t[18]!==i?(x=(T,z,A)=>{A?.previous&&n.setQueryData(i,A.previous)},t[17]=n,t[18]=i,t[19]=x):x=t[19];let k;t[20]!==c||t[21]!==s||t[22]!==n?(k=(T,z,A)=>{c(),n.invalidateQueries({queryKey:ce.taskBoardActivity(s,A.id)})},t[20]=c,t[21]=s,t[22]=n,t[23]=k):k=t[23];let N;t[24]!==S||t[25]!==p||t[26]!==b||t[27]!==x||t[28]!==k?(N={mutationFn:S,onMutate:p,onSuccess:b,onError:x,onSettled:k},t[24]=S,t[25]=p,t[26]=b,t[27]=x,t[28]=k,t[29]=N):N=t[29];const h=oe(N);let u;t[30]!==r?(u=T=>r.call("TASK_BOARD_ITEM_DELETE",{id:T}),t[30]=r,t[31]=u):u=t[31];let f;t[32]!==c||t[33]!==o?(f=T=>{ke.error(T instanceof Error&&T.message?T.message:o("taskBoard.taskBoard.deleteError")),c()},t[32]=c,t[33]=o,t[34]=f):f=t[34];let g;t[35]!==c||t[36]!==u||t[37]!==f?(g={mutationFn:u,onSuccess:c,onError:f},t[35]=c,t[36]=u,t[37]=f,t[38]=g):g=t[38];const F=oe(g);let B;t[39]!==r?(B=async T=>{const z=await Promise.allSettled(T.map(A=>r.call("TASK_BOARD_ITEM_DELETE",{id:A})));return{total:T.length,failed:z.filter(Nt).length}},t[39]=r,t[40]=B):B=t[40];let C,v;t[41]!==o?(C=T=>{const{total:z,failed:A}=T;A!==0&&ke.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(A),total:String(z)}))},v=()=>ke.error(o("taskBoard.taskBoard.deleteError")),t[41]=o,t[42]=C,t[43]=v):(C=t[42],v=t[43]);let _;t[44]!==c||t[45]!==B||t[46]!==C||t[47]!==v?(_={mutationFn:B,onSuccess:C,onError:v,onSettled:c},t[44]=c,t[45]=B,t[46]=C,t[47]=v,t[48]=_):_=t[48];const E=oe(_);let D;t[49]!==r?(D=T=>r.call("TASK_BOARD_ITEM_UPDATE",T),t[49]=r,t[50]=D):D=t[50];let w;t[51]!==c||t[52]!==D?(w={mutationFn:D,onSuccess:c},t[51]=c,t[52]=D,t[53]=w):w=t[53];const O=oe(w);let L;t[54]!==r?(L=T=>r.call("TASK_BOARD_ITEM_RERUN",T),t[54]=r,t[55]=L):L=t[55];let I;t[56]!==c||t[57]!==s||t[58]!==n?(I=(T,z,A)=>{c(),n.invalidateQueries({queryKey:ce.taskBoardActivity(s,A.id)})},t[56]=c,t[57]=s,t[58]=n,t[59]=I):I=t[59];let R;t[60]!==L||t[61]!==I?(R={mutationFn:L,onSettled:I},t[60]=L,t[61]=I,t[62]=R):R=t[62];const K=oe(R);let P;return t[63]!==d||t[64]!==O||t[65]!==F||t[66]!==E||t[67]!==K||t[68]!==h?(P={create:d,update:h,remove:F,removeMany:E,link:O,rerun:K},t[63]=d,t[64]=O,t[65]=F,t[66]=E,t[67]=K,t[68]=h,t[69]=P):P=t[69],P}function Nt(t){return t.status==="rejected"}const Ge={active:0,future:1,closed:2};function Ye(t){if(!t.startsAt)return null;const e=Date.parse(t.startsAt);return Number.isNaN(e)?null:e}function St(t,e){const s=Ge[t.state]-Ge[e.state];if(s!==0)return s;const r=Ye(t),n=Ye(e);if(r===null||n===null){if(r!==n)return r===null?1:-1}else if(r!==n)return t.state==="closed"?n-r:r-n;return t.name.localeCompare(e.name)||t.id.localeCompare(e.id)}function Re(t){return t.filter(s=>s.state==="active").sort(St)[0]?.id??null}const be="__unassigned__",ye="__no_repo__",xe="backlog",Ze="all",J="__any__",et={assignee:null,priority:null,due:null,tags:[],repo:null,sprint:null,search:""};function is(t,e){return t===Ze?null:t===xe||t!==null&&e.some(s=>s.id===t)?t:Re(e)}function tt(t,e){return t.sprint!==null&&t.sprint!==e}function Bt(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||t.repo!==null||tt(t,e)||t.search.trim()!==""}function Ct(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(t.repo!==null?1:0)+(tt(t,e)?1:0)+(t.search.trim()!==""?1:0)}const vt=864e5;function _t(t,e){const s=new Date(t),r=new Date(e);return s.getFullYear()===r.getFullYear()&&s.getMonth()===r.getMonth()&&s.getDate()===r.getDate()}const Dt=/^0*(\d+)$/;function Tt(t,e,s){const r=t.trim();if(r==="")return!1;const n=s?.trim();if(n){if(r.toLowerCase()===n.toLowerCase())return!0;const o=Dt.exec(r)?.[1];return o!==void 0&&Number(o)===Oe(n)}return e!=null&&Oe(r)===e}function os(t,e){const s=e.search.trim().toLowerCase();if(s!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(s)&&!Tt(s,t.keySeq,t.jiraIssueKey))return!1;if(e.assignee!==null){if(e.assignee===be){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const r=new Date(t.dueDate).getTime(),n=Date.now();if(e.due==="overdue"&&r>=n||e.due==="today"&&!_t(r,n)||e.due==="week"&&(r<n||r>n+7*vt))return!1}if(e.tags.length>0){const r=t.tags.map(n=>n.id);if(!e.tags.some(n=>r.includes(n)))return!1}if(e.repo!==null){if(e.repo===ye){if(t.repo!=null)return!1}else if(t.repo?.toLowerCase()!==e.repo.toLowerCase())return!1}if(e.sprint!==null){if(e.sprint===xe){if(t.sprintId!=null)return!1}else if(t.sprintId!==e.sprint)return!1}return!0}const Ve={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function ee(t,e=!1){return V("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Et(t){const e=G.c(107),{value:s,members:r,onChange:n,block:o}=t,l=W(),[i,m]=q.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(Pe,{size:14,className:"shrink-0"}),e[0]=c):c=e[0];let j=c,y;e[1]!==l?(y=l("taskBoard.taskFilters.assigneeLabel"),e[1]=l,e[2]=y):y=e[2];let d=y;if(s===be){let $;e[3]!==l?($=l("taskBoard.taskFilters.assigneeUnassigned"),e[3]=l,e[4]=$):$=e[4],d=$}else if(s===ze){let $;e[5]===Symbol.for("react.memo_cache_sentinel")?($=a.jsx($e,{size:14}),e[5]=$):$=e[5],j=$;let M;e[6]!==l?(M=l("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=l,e[7]=M):M=e[7],d=M}else if(s){let $,M,ne,ie;if(e[8]!==r||e[9]!==s){let ge;e[14]!==s?(ge=lt=>lt.userId===s,e[14]=s,e[15]=ge):ge=e[15],M=r.find(ge),$=Me,ne=M?.user?.image??void 0,ie=Qe(M?.user?.name),e[8]=r,e[9]=s,e[10]=$,e[11]=M,e[12]=ne,e[13]=ie}else $=e[10],M=e[11],ne=e[12],ie=e[13];let me;e[16]!==$||e[17]!==ne||e[18]!==ie?(me=a.jsx($,{url:ne,fallback:ie,shape:"circle",size:"2xs"}),e[16]=$,e[17]=ne,e[18]=ie,e[19]=me):me=e[19],j=me;let he;e[20]!==M?.user?.name||e[21]!==l?(he=M?.user?.name??l("taskBoard.taskFilters.assigneeMember"),e[20]=M?.user?.name,e[21]=l,e[22]=he):he=e[22],d=he}let S;e[23]!==n?(S=$=>{n($),m(!1)},e[23]=n,e[24]=S):S=e[24];const p=S,b=s!==null;let x;e[25]!==o||e[26]!==b?(x=ee(b,o),e[25]=o,e[26]=b,e[27]=x):x=e[27];const k=x,N=o&&"ml-auto";let h;e[28]!==N?(h=V("shrink-0 opacity-60",N),e[28]=N,e[29]=h):h=e[29];const u=h;let f;e[30]!==d?(f=a.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[30]=d,e[31]=f):f=e[31];let g;e[32]!==u?(g=a.jsx(ue,{size:12,className:u}),e[32]=u,e[33]=g):g=e[33];let F;e[34]!==j||e[35]!==f||e[36]!==g||e[37]!==k?(F=a.jsx(_e,{asChild:!0,children:a.jsxs("button",{type:"button",className:k,children:[j,f,g]})}),e[34]=j,e[35]=f,e[36]=g,e[37]=k,e[38]=F):F=e[38];let B;e[39]!==l?(B=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=l,e[40]=B):B=e[40];let C;e[41]!==l?(C=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=l,e[42]=C):C=e[42];let v;e[43]!==B||e[44]!==C?(v=a.jsx(Ee,{placeholder:B,"aria-label":C,className:"h-9"}),e[43]=B,e[44]=C,e[45]=v):v=e[45];let _;e[46]!==l?(_=l("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=l,e[47]=_):_=e[47];let E;e[48]!==_?(E=a.jsx(we,{children:_}),e[48]=_,e[49]=E):E=e[49];let D;e[50]!==l?(D=l("taskBoard.taskFilters.assigneeAnyone"),e[50]=l,e[51]=D):D=e[51];let w;e[52]!==p?(w=()=>p(null),e[52]=p,e[53]=w):w=e[53];let O;e[54]!==l?(O=l("taskBoard.taskFilters.assigneeAnyone"),e[54]=l,e[55]=O):O=e[55];let L;e[56]!==D||e[57]!==w||e[58]!==O?(L=a.jsx(X,{value:D,onSelect:w,children:O}),e[56]=D,e[57]=w,e[58]=O,e[59]=L):L=e[59];let I;e[60]!==l?(I=l("taskBoard.taskFilters.assigneeUnassigned"),e[60]=l,e[61]=I):I=e[61];let R;e[62]!==p?(R=()=>p(be),e[62]=p,e[63]=R):R=e[63];let K;e[64]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(Pe,{size:16,className:"text-muted-foreground"}),e[64]=K):K=e[64];let P;e[65]!==l?(P=l("taskBoard.taskFilters.assigneeUnassigned"),e[65]=l,e[66]=P):P=e[66];let T;e[67]!==I||e[68]!==R||e[69]!==P?(T=a.jsxs(X,{value:I,onSelect:R,className:"gap-2",children:[K,P]}),e[67]=I,e[68]=R,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==l?(z=l("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=l,e[72]=z):z=e[72];let A;e[73]!==p?(A=()=>p(ze),e[73]=p,e[74]=A):A=e[74];let Q;e[75]===Symbol.for("react.memo_cache_sentinel")?(Q=a.jsx($e,{size:16}),e[75]=Q):Q=e[75];let H;e[76]!==l?(H=l("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=l,e[77]=H):H=e[77];let U;e[78]!==z||e[79]!==A||e[80]!==H?(U=a.jsxs(X,{value:z,onSelect:A,className:"gap-2",children:[Q,H]}),e[78]=z,e[79]=A,e[80]=H,e[81]=U):U=e[81];let Y;e[82]!==L||e[83]!==T||e[84]!==U?(Y=a.jsxs(de,{children:[L,T,U]}),e[82]=L,e[83]=T,e[84]=U,e[85]=Y):Y=e[85];let te;e[86]!==l?(te=l("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=l,e[87]=te):te=e[87];let se;if(e[88]!==r||e[89]!==p){let $;e[91]!==p?($=M=>a.jsxs(X,{value:M.user?.name??M.userId,onSelect:()=>p(M.userId),className:"gap-2",children:[a.jsx(Me,{url:M.user?.image??void 0,fallback:Qe(M.user?.name),shape:"circle",size:"2xs"}),a.jsx("span",{className:"truncate",children:M.user?.name??M.userId})]},M.userId),e[91]=p,e[92]=$):$=e[92],se=r.map($),e[88]=r,e[89]=p,e[90]=se}else se=e[90];let le;e[93]!==te||e[94]!==se?(le=a.jsx(de,{heading:te,children:se}),e[93]=te,e[94]=se,e[95]=le):le=e[95];let ae;e[96]!==E||e[97]!==Y||e[98]!==le?(ae=a.jsxs(Ie,{children:[E,Y,le]}),e[96]=E,e[97]=Y,e[98]=le,e[99]=ae):ae=e[99];let re;e[100]!==v||e[101]!==ae?(re=a.jsx(De,{align:"start",className:"w-56 p-0",children:a.jsxs(Ae,{children:[v,ae]})}),e[100]=v,e[101]=ae,e[102]=re):re=e[102];let fe;return e[103]!==i||e[104]!==F||e[105]!==re?(fe=a.jsxs(Te,{open:i,onOpenChange:m,children:[F,re]}),e[103]=i,e[104]=F,e[105]=re,e[106]=fe):fe=e[106],fe}function wt(t){const e=G.c(33),{value:s,onChange:r,block:n}=t,o=W(),l=s!==null;let i;e[0]!==n||e[1]!==l?(i=ee(l,n),e[0]=n,e[1]=l,e[2]=i):i=e[2];const m=i,c=n&&"ml-auto";let j;e[3]!==c?(j=V("shrink-0 opacity-60",c),e[3]=c,e[4]=j):j=e[4];const y=j;let d;e[5]!==s?(d=s?a.jsx("span",{className:V("size-2 shrink-0 rounded-full",pe[s].dotClassName)}):a.jsx(kt,{size:14,className:"shrink-0"}),e[5]=s,e[6]=d):d=e[6];let S;e[7]!==o||e[8]!==s?(S=o(s?pe[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=o,e[8]=s,e[9]=S):S=e[9];let p;e[10]!==y?(p=a.jsx(ue,{size:12,className:y}),e[10]=y,e[11]=p):p=e[11];let b;e[12]!==d||e[13]!==S||e[14]!==p||e[15]!==m?(b=a.jsx(Se,{asChild:!0,children:a.jsxs("button",{type:"button",className:m,children:[d,S,p]})}),e[12]=d,e[13]=S,e[14]=p,e[15]=m,e[16]=b):b=e[16];const x=s??J;let k;e[17]!==r?(k=F=>r(F===J?null:F),e[17]=r,e[18]=k):k=e[18];let N;e[19]!==o?(N=o("taskBoard.taskFilters.priorityAnyPriority"),e[19]=o,e[20]=N):N=e[20];let h;e[21]!==N?(h=a.jsx(Z,{value:J,children:N}),e[21]=N,e[22]=h):h=e[22];let u;e[23]!==o?(u=jt.map(F=>a.jsxs(Z,{value:F,className:"gap-2",children:[a.jsx("span",{className:V("size-2 rounded-full",pe[F].dotClassName)}),o(pe[F].labelKey)]},F)),e[23]=o,e[24]=u):u=e[24];let f;e[25]!==k||e[26]!==h||e[27]!==u||e[28]!==x?(f=a.jsx(Be,{align:"start",className:"w-40",children:a.jsxs(Ce,{value:x,onValueChange:k,children:[h,u]})}),e[25]=k,e[26]=h,e[27]=u,e[28]=x,e[29]=f):f=e[29];let g;return e[30]!==f||e[31]!==b?(g=a.jsxs(ve,{children:[b,f]}),e[30]=f,e[31]=b,e[32]=g):g=e[32],g}function It(t){const e=G.c(35),{value:s,onChange:r,block:n}=t,o=W();let l;e[0]!==o||e[1]!==s?(l=s?o(Ve[s]):void 0,e[0]=o,e[1]=s,e[2]=l):l=e[2];const i=l,m=s!==null;let c;e[3]!==n||e[4]!==m?(c=ee(m,n),e[3]=n,e[4]=m,e[5]=c):c=e[5];const j=c,y=n&&"ml-auto";let d;e[6]!==y?(d=V("shrink-0 opacity-60",y),e[6]=y,e[7]=d):d=e[7];const S=d;let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(je,{size:14,className:"shrink-0"}),e[8]=p):p=e[8];let b;e[9]!==i||e[10]!==o?(b=i??o("taskBoard.taskFilters.dueDateLabel"),e[9]=i,e[10]=o,e[11]=b):b=e[11];let x;e[12]!==S?(x=a.jsx(ue,{size:12,className:S}),e[12]=S,e[13]=x):x=e[13];let k;e[14]!==b||e[15]!==x||e[16]!==j?(k=a.jsx(Se,{asChild:!0,children:a.jsxs("button",{type:"button",className:j,children:[p,b,x]})}),e[14]=b,e[15]=x,e[16]=j,e[17]=k):k=e[17];const N=s??J;let h;e[18]!==r?(h=v=>r(v===J?null:v),e[18]=r,e[19]=h):h=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(je,{size:16,className:"text-muted-foreground"}),e[20]=u):u=e[20];let f;e[21]!==o?(f=o("taskBoard.taskFilters.dueDateAnyTime"),e[21]=o,e[22]=f):f=e[22];let g;e[23]!==f?(g=a.jsxs(Z,{value:J,className:"gap-2",children:[u,f]}),e[23]=f,e[24]=g):g=e[24];let F;e[25]!==o?(F=Object.entries(Ve).map(v=>{const[_,E]=v,D=_==="overdue";return a.jsxs(Z,{value:_,className:V("gap-2",D&&"text-destructive"),children:[a.jsx(je,{size:16,className:V("shrink-0",D?"text-destructive":"text-muted-foreground")}),o(E)]},_)}),e[25]=o,e[26]=F):F=e[26];let B;e[27]!==N||e[28]!==h||e[29]!==g||e[30]!==F?(B=a.jsx(Be,{align:"start",className:"w-44",children:a.jsxs(Ce,{value:N,onValueChange:h,children:[g,F]})}),e[27]=N,e[28]=h,e[29]=g,e[30]=F,e[31]=B):B=e[31];let C;return e[32]!==B||e[33]!==k?(C=a.jsxs(ve,{children:[k,B]}),e[32]=B,e[33]=k,e[34]=C):C=e[34],C}function At(t){const e=G.c(56),{value:s,tags:r,onChange:n,block:o}=t,l=W(),[i,m]=q.useState(!1);let c;e[0]!==n||e[1]!==s?(c=I=>n(s.includes(I)?s.filter(R=>R!==I):[...s,I]),e[0]=n,e[1]=s,e[2]=c):c=e[2];const j=c;let y;e[3]!==l||e[4]!==r||e[5]!==s[0]||e[6]!==s.length?(y=s.length===0?l("taskBoard.taskFilters.tagsLabel"):s.length===1?r.find(I=>I.id===s[0])?.name??l("taskBoard.taskFilters.tagsLabel"):l("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=l,e[4]=r,e[5]=s[0],e[6]=s.length,e[7]=y):y=e[7];const d=y,S=s.length>0;let p;e[8]!==o||e[9]!==S?(p=ee(S,o),e[8]=o,e[9]=S,e[10]=p):p=e[10];const b=p,x=o&&"ml-auto";let k;e[11]!==x?(k=V("shrink-0 opacity-60",x),e[11]=x,e[12]=k):k=e[12];const N=k;let h;e[13]!==r||e[14]!==s[0]||e[15]!==s.length?(h=s.length===1?a.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qe(r.find(I=>I.id===s[0])?.color)}}):a.jsx(gt,{size:14,className:"shrink-0"}),e[13]=r,e[14]=s[0],e[15]=s.length,e[16]=h):h=e[16];let u;e[17]!==d?(u=a.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[17]=d,e[18]=u):u=e[18];let f;e[19]!==N?(f=a.jsx(ue,{size:12,className:N}),e[19]=N,e[20]=f):f=e[20];let g;e[21]!==h||e[22]!==u||e[23]!==f||e[24]!==b?(g=a.jsx(_e,{asChild:!0,children:a.jsxs("button",{type:"button",className:b,children:[h,u,f]})}),e[21]=h,e[22]=u,e[23]=f,e[24]=b,e[25]=g):g=e[25];let F;e[26]!==l?(F=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=l,e[27]=F):F=e[27];let B;e[28]!==l?(B=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=l,e[29]=B):B=e[29];let C;e[30]!==F||e[31]!==B?(C=a.jsx(Ee,{placeholder:F,"aria-label":B,className:"h-9"}),e[30]=F,e[31]=B,e[32]=C):C=e[32];let v;e[33]!==l?(v=l("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=l,e[34]=v):v=e[34];let _;e[35]!==v?(_=a.jsx(we,{children:v}),e[35]=v,e[36]=_):_=e[36];let E;if(e[37]!==r||e[38]!==j||e[39]!==s){let I;e[41]!==j||e[42]!==s?(I=R=>a.jsxs(X,{value:R.name,onSelect:()=>j(R.id),className:"gap-2",children:[a.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qe(R.color)}}),a.jsx("span",{className:"flex-1 truncate",children:R.name}),s.includes(R.id)&&a.jsx(Je,{size:14,className:"shrink-0 text-foreground"})]},R.id),e[41]=j,e[42]=s,e[43]=I):I=e[43],E=r.map(I),e[37]=r,e[38]=j,e[39]=s,e[40]=E}else E=e[40];let D;e[44]!==E?(D=a.jsx(de,{children:E}),e[44]=E,e[45]=D):D=e[45];let w;e[46]!==_||e[47]!==D?(w=a.jsxs(Ie,{children:[_,D]}),e[46]=_,e[47]=D,e[48]=w):w=e[48];let O;e[49]!==C||e[50]!==w?(O=a.jsx(De,{align:"start",className:"w-56 p-0",children:a.jsxs(Ae,{children:[C,w]})}),e[49]=C,e[50]=w,e[51]=O):O=e[51];let L;return e[52]!==i||e[53]!==g||e[54]!==O?(L=a.jsxs(Te,{open:i,onOpenChange:m,children:[g,O]}),e[52]=i,e[53]=g,e[54]=O,e[55]=L):L=e[55],L}function Rt(t){const e=G.c(73),{value:s,repos:r,onChange:n,block:o}=t,l=W(),[i,m]=q.useState(!1);let c;e[0]!==l||e[1]!==s?(c=s===null?l("taskBoard.taskFilters.repoLabel"):s===ye?l("taskBoard.taskFilters.repoNoRepo"):s,e[0]=l,e[1]=s,e[2]=c):c=e[2];const j=c;let y;e[3]!==n?(y=U=>{n(U),m(!1)},e[3]=n,e[4]=y):y=e[4];const d=y,S=s!==null;let p;e[5]!==o||e[6]!==S?(p=ee(S,o),e[5]=o,e[6]=S,e[7]=p):p=e[7];const b=p,x=o&&"ml-auto";let k;e[8]!==x?(k=V("shrink-0 opacity-60",x),e[8]=x,e[9]=k):k=e[9];const N=k;let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(Ke,{className:"size-3.5 shrink-0"}),e[10]=h):h=e[10];let u;e[11]!==j?(u=a.jsx("span",{className:"max-w-[12rem] truncate",children:j}),e[11]=j,e[12]=u):u=e[12];let f;e[13]!==N?(f=a.jsx(ue,{size:12,className:N}),e[13]=N,e[14]=f):f=e[14];let g;e[15]!==u||e[16]!==f||e[17]!==b?(g=a.jsx(_e,{asChild:!0,children:a.jsxs("button",{type:"button",className:b,children:[h,u,f]})}),e[15]=u,e[16]=f,e[17]=b,e[18]=g):g=e[18];let F;e[19]!==l?(F=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[19]=l,e[20]=F):F=e[20];let B;e[21]!==l?(B=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[21]=l,e[22]=B):B=e[22];let C;e[23]!==F||e[24]!==B?(C=a.jsx(Ee,{placeholder:F,"aria-label":B,className:"h-9"}),e[23]=F,e[24]=B,e[25]=C):C=e[25];let v;e[26]!==l?(v=l("taskBoard.taskFilters.repoNoReposFound"),e[26]=l,e[27]=v):v=e[27];let _;e[28]!==v?(_=a.jsx(we,{children:v}),e[28]=v,e[29]=_):_=e[29];let E;e[30]!==l?(E=l("taskBoard.taskFilters.repoAnyRepo"),e[30]=l,e[31]=E):E=e[31];let D;e[32]!==d?(D=()=>d(null),e[32]=d,e[33]=D):D=e[33];let w;e[34]!==l?(w=l("taskBoard.taskFilters.repoAnyRepo"),e[34]=l,e[35]=w):w=e[35];let O;e[36]!==E||e[37]!==D||e[38]!==w?(O=a.jsx(X,{value:E,onSelect:D,children:w}),e[36]=E,e[37]=D,e[38]=w,e[39]=O):O=e[39];let L;e[40]!==l?(L=l("taskBoard.taskFilters.repoNoRepo"),e[40]=l,e[41]=L):L=e[41];let I;e[42]!==d?(I=()=>d(ye),e[42]=d,e[43]=I):I=e[43];let R;e[44]!==l?(R=l("taskBoard.taskFilters.repoNoRepo"),e[44]=l,e[45]=R):R=e[45];let K;e[46]!==L||e[47]!==I||e[48]!==R?(K=a.jsx(X,{value:L,onSelect:I,children:R}),e[46]=L,e[47]=I,e[48]=R,e[49]=K):K=e[49];let P;e[50]!==O||e[51]!==K?(P=a.jsxs(de,{children:[O,K]}),e[50]=O,e[51]=K,e[52]=P):P=e[52];let T;if(e[53]!==r||e[54]!==d||e[55]!==s){let U;e[57]!==d||e[58]!==s?(U=Y=>a.jsxs(X,{value:Y,onSelect:()=>d(Y),className:"gap-2",children:[a.jsx(Ke,{className:"size-4 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:Y}),s===Y&&a.jsx(Je,{size:14,className:"shrink-0 text-foreground"})]},Y),e[57]=d,e[58]=s,e[59]=U):U=e[59],T=r.map(U),e[53]=r,e[54]=d,e[55]=s,e[56]=T}else T=e[56];let z;e[60]!==T?(z=a.jsx(de,{children:T}),e[60]=T,e[61]=z):z=e[61];let A;e[62]!==_||e[63]!==P||e[64]!==z?(A=a.jsxs(Ie,{children:[_,P,z]}),e[62]=_,e[63]=P,e[64]=z,e[65]=A):A=e[65];let Q;e[66]!==C||e[67]!==A?(Q=a.jsx(De,{align:"start",className:"w-64 p-0",children:a.jsxs(Ae,{children:[C,A]})}),e[66]=C,e[67]=A,e[68]=Q):Q=e[68];let H;return e[69]!==i||e[70]!==g||e[71]!==Q?(H=a.jsxs(Te,{open:i,onOpenChange:m,children:[g,Q]}),e[69]=i,e[70]=g,e[71]=Q,e[72]=H):H=e[72],H}function Lt(t){const e=G.c(45),{value:s,sprints:r,onChange:n,block:o}=t,l=W();let i;if(e[0]!==r||e[1]!==s){let D;e[3]!==s?(D=w=>w.id===s,e[3]=s,e[4]=D):D=e[4],i=r.find(D),e[0]=r,e[1]=s,e[2]=i}else i=e[2];const m=i;let c;e[5]!==m?.name||e[6]!==l||e[7]!==s?(c=s===null?l("taskBoard.taskFilters.sprintLabel"):s===xe?l("taskBoard.taskFilters.sprintBacklog"):m?.name??l("taskBoard.taskFilters.sprintLabel"),e[5]=m?.name,e[6]=l,e[7]=s,e[8]=c):c=e[8];const j=c,y=s!==null;let d;e[9]!==o||e[10]!==y?(d=ee(y,o),e[9]=o,e[10]=y,e[11]=d):d=e[11];const S=d,p=o&&"ml-auto";let b;e[12]!==p?(b=V("shrink-0 opacity-60",p),e[12]=p,e[13]=b):b=e[13];const x=b;let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(pt,{size:14,className:"shrink-0"}),e[14]=k):k=e[14];let N;e[15]!==x?(N=a.jsx(ue,{size:12,className:x}),e[15]=x,e[16]=N):N=e[16];let h;e[17]!==j||e[18]!==N||e[19]!==S?(h=a.jsx(Se,{asChild:!0,children:a.jsxs("button",{type:"button",className:S,children:[k,j,N]})}),e[17]=j,e[18]=N,e[19]=S,e[20]=h):h=e[20];const u=s===null?J:s;let f;e[21]!==n?(f=D=>n(D===J?Ze:D),e[21]=n,e[22]=f):f=e[22];let g;e[23]!==l?(g=l("taskBoard.taskFilters.sprintAnySprint"),e[23]=l,e[24]=g):g=e[24];let F;e[25]!==g?(F=a.jsx(Z,{value:J,children:g}),e[25]=g,e[26]=F):F=e[26];let B;e[27]!==l?(B=l("taskBoard.taskFilters.sprintBacklog"),e[27]=l,e[28]=B):B=e[28];let C;e[29]!==B?(C=a.jsx(Z,{value:xe,children:B}),e[29]=B,e[30]=C):C=e[30];let v;if(e[31]!==r||e[32]!==l){let D;e[34]!==l?(D=w=>a.jsxs(Z,{value:w.id,children:[a.jsx("span",{className:"truncate",children:w.name}),a.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:w.state==="active"?l("taskBoard.taskFilters.sprintCurrent"):bt(w)})]},w.id),e[34]=l,e[35]=D):D=e[35],v=r.map(D),e[31]=r,e[32]=l,e[33]=v}else v=e[33];let _;e[36]!==u||e[37]!==f||e[38]!==F||e[39]!==C||e[40]!==v?(_=a.jsx(Be,{align:"start",className:"max-h-80 w-72 overflow-y-auto",children:a.jsxs(Ce,{value:u,onValueChange:f,children:[F,C,v]})}),e[36]=u,e[37]=f,e[38]=F,e[39]=C,e[40]=v,e[41]=_):_=e[41];let E;return e[42]!==_||e[43]!==h?(E=a.jsxs(ve,{children:[h,_]}),e[42]=_,e[43]=h,e[44]=E):E=e[44],E}function zt(t){const e=G.c(25),{value:s,onChange:r,block:n}=t,o=W(),[l,i]=q.useState(s!==""),[m,c]=q.useState(!1),[j,y]=q.useState(s);s!==j&&(y(s),s===""&&!m&&i(!1));const d=l||n,S=d?"w-32 sm:w-44":"w-8 px-0 justify-center",p=n&&"h-10 w-full px-3 text-sm sm:w-full";let b;e[0]!==S||e[1]!==p?(b=V("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",S,p),e[0]=S,e[1]=p,e[2]=b):b=e[2];let x;e[3]!==o?(x=o("taskBoard.taskFilters.searchLabel"),e[3]=o,e[4]=x):x=e[4];let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>i(!0),e[5]=k):k=e[5];let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx(xt,{size:14}),e[6]=N):N=e[6];let h;e[7]!==x?(h=a.jsx("button",{type:"button","aria-label":x,onClick:k,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:N}),e[7]=x,e[8]=h):h=e[8];let u;e[9]!==n||e[10]!==d||e[11]!==r||e[12]!==o||e[13]!==s?(u=d&&a.jsx("input",{autoFocus:!n,value:s,onChange:F=>r(F.target.value),onFocus:()=>c(!0),onBlur:()=>{c(!1),s===""&&i(!1)},placeholder:o("taskBoard.taskFilters.searchPlaceholder"),"aria-label":o("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=n,e[10]=d,e[11]=r,e[12]=o,e[13]=s,e[14]=u):u=e[14];let f;e[15]!==n||e[16]!==r||e[17]!==o||e[18]!==s?(f=s!==""&&a.jsx("button",{type:"button","aria-label":o("taskBoard.taskFilters.searchClearLabel"),onMouseDown:Ot,onClick:()=>{r(""),n||i(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(rt,{size:14})}),e[15]=n,e[16]=r,e[17]=o,e[18]=s,e[19]=f):f=e[19];let g;return e[20]!==b||e[21]!==h||e[22]!==u||e[23]!==f?(g=a.jsxs("div",{className:b,children:[h,u,f]}),e[20]=b,e[21]=h,e[22]=u,e[23]=f,e[24]=g):g=e[24],g}function Ot(t){return t.preventDefault()}function st(t){const e=G.c(55),{filters:s,members:r,tags:n,repos:o,sprints:l,onChange:i,block:m}=t;let c;e[0]!==s||e[1]!==i?(c=g=>i({...s,search:g}),e[0]=s,e[1]=i,e[2]=c):c=e[2];let j;e[3]!==m||e[4]!==s.search||e[5]!==c?(j=a.jsx(zt,{block:m,value:s.search,onChange:c}),e[3]=m,e[4]=s.search,e[5]=c,e[6]=j):j=e[6];let y;e[7]!==s||e[8]!==i?(y=g=>i({...s,assignee:g}),e[7]=s,e[8]=i,e[9]=y):y=e[9];let d;e[10]!==m||e[11]!==s.assignee||e[12]!==r||e[13]!==y?(d=a.jsx(Et,{block:m,value:s.assignee,members:r,onChange:y}),e[10]=m,e[11]=s.assignee,e[12]=r,e[13]=y,e[14]=d):d=e[14];let S;e[15]!==s||e[16]!==i?(S=g=>i({...s,priority:g}),e[15]=s,e[16]=i,e[17]=S):S=e[17];let p;e[18]!==m||e[19]!==s.priority||e[20]!==S?(p=a.jsx(wt,{block:m,value:s.priority,onChange:S}),e[18]=m,e[19]=s.priority,e[20]=S,e[21]=p):p=e[21];let b;e[22]!==s||e[23]!==i?(b=g=>i({...s,due:g}),e[22]=s,e[23]=i,e[24]=b):b=e[24];let x;e[25]!==m||e[26]!==s.due||e[27]!==b?(x=a.jsx(It,{block:m,value:s.due,onChange:b}),e[25]=m,e[26]=s.due,e[27]=b,e[28]=x):x=e[28];let k;e[29]!==s||e[30]!==i?(k=g=>i({...s,tags:g}),e[29]=s,e[30]=i,e[31]=k):k=e[31];let N;e[32]!==m||e[33]!==s.tags||e[34]!==k||e[35]!==n?(N=a.jsx(At,{block:m,value:s.tags,tags:n,onChange:k}),e[32]=m,e[33]=s.tags,e[34]=k,e[35]=n,e[36]=N):N=e[36];let h;e[37]!==m||e[38]!==s||e[39]!==i||e[40]!==o?(h=(o.length>0||s.repo!==null)&&a.jsx(Rt,{block:m,value:s.repo,repos:o,onChange:g=>i({...s,repo:g})}),e[37]=m,e[38]=s,e[39]=i,e[40]=o,e[41]=h):h=e[41];let u;e[42]!==m||e[43]!==s||e[44]!==i||e[45]!==l?(u=(l.length>0||s.sprint!==null)&&a.jsx(Lt,{block:m,value:s.sprint,sprints:l,onChange:g=>i({...s,sprint:g})}),e[42]=m,e[43]=s,e[44]=i,e[45]=l,e[46]=u):u=e[46];let f;return e[47]!==N||e[48]!==h||e[49]!==u||e[50]!==j||e[51]!==d||e[52]!==p||e[53]!==x?(f=a.jsxs(a.Fragment,{children:[j,d,p,x,N,h,u]}),e[47]=N,e[48]=h,e[49]=u,e[50]=j,e[51]=d,e[52]=p,e[53]=x,e[54]=f):f=e[54],f}function cs(t){const e=G.c(16),{filters:s,members:r,tags:n,repos:o,sprints:l,onChange:i}=t,m=W();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(Xe,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=c):c=e[0];let j;e[1]!==s||e[2]!==r||e[3]!==i||e[4]!==o||e[5]!==l||e[6]!==n?(j=a.jsx(st,{filters:s,members:r,tags:n,repos:o,sprints:l,onChange:i}),e[1]=s,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=n,e[7]=j):j=e[7];let y;e[8]!==s||e[9]!==i||e[10]!==l||e[11]!==m?(y=Bt(s,Re(l))&&a.jsx("button",{type:"button",onClick:()=>i(et),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:m("taskBoard.taskFilters.clearButton")}),e[8]=s,e[9]=i,e[10]=l,e[11]=m,e[12]=y):y=e[12];let d;return e[13]!==j||e[14]!==y?(d=a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c,j,y]}),e[13]=j,e[14]=y,e[15]=d):d=e[15],d}function us(t){const e=G.c(44),{filters:s,members:r,tags:n,repos:o,sprints:l,onChange:i}=t,m=W(),[c,j]=q.useState(!1);let y;e[0]!==s||e[1]!==l?(y=Ct(s,Re(l)),e[0]=s,e[1]=l,e[2]=y):y=e[2];const d=y,S=d>0;let p;e[3]!==S?(p=ee(S),e[3]=S,e[4]=p):p=e[4];const b=p;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Xe,{size:14,className:"shrink-0"}),e[5]=x):x=e[5];let k;e[6]!==m?(k=m("taskBoard.taskFilters.filterDrawerButtonLabel"),e[6]=m,e[7]=k):k=e[7];let N;e[8]!==d?(N=d>0&&a.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:d}),e[8]=d,e[9]=N):N=e[9];let h;e[10]!==k||e[11]!==N||e[12]!==b?(h=a.jsx(ct,{asChild:!0,children:a.jsxs("button",{type:"button",className:b,children:[x,k,N]})}),e[10]=k,e[11]=N,e[12]=b,e[13]=h):h=e[13];let u;e[14]!==m?(u=m("taskBoard.taskFilters.filterDrawerTitle"),e[14]=m,e[15]=u):u=e[15];let f;e[16]!==u?(f=a.jsx(ut,{className:"px-4 pt-4 text-base font-medium text-foreground",children:u}),e[16]=u,e[17]=f):f=e[17];let g;e[18]!==s||e[19]!==r||e[20]!==i||e[21]!==o||e[22]!==l||e[23]!==n?(g=a.jsx("div",{className:"flex flex-col gap-2 p-4",children:a.jsx(st,{block:!0,filters:s,members:r,tags:n,repos:o,sprints:l,onChange:i})}),e[18]=s,e[19]=r,e[20]=i,e[21]=o,e[22]=l,e[23]=n,e[24]=g):g=e[24];let F;e[25]!==d||e[26]!==i||e[27]!==m?(F=d>0&&a.jsx(Le,{variant:"outline",className:"flex-1",onClick:()=>i(et),children:m("taskBoard.taskFilters.clearAllButton")}),e[25]=d,e[26]=i,e[27]=m,e[28]=F):F=e[28];let B;e[29]!==m?(B=m("taskBoard.taskFilters.doneButton"),e[29]=m,e[30]=B):B=e[30];let C;e[31]!==B?(C=a.jsx(dt,{asChild:!0,children:a.jsx(Le,{className:"flex-1",children:B})}),e[31]=B,e[32]=C):C=e[32];let v;e[33]!==F||e[34]!==C?(v=a.jsxs(ft,{className:"flex-row gap-2",children:[F,C]}),e[33]=F,e[34]=C,e[35]=v):v=e[35];let _;e[36]!==g||e[37]!==v||e[38]!==f?(_=a.jsxs(mt,{className:"p-0",children:[f,g,v]}),e[36]=g,e[37]=v,e[38]=f,e[39]=_):_=e[39];let E;return e[40]!==c||e[41]!==_||e[42]!==h?(E=a.jsxs(ht,{open:c,onOpenChange:j,direction:"bottom",children:[h,_]}),e[40]=c,e[41]=_,e[42]=h,e[43]=E):E=e[43],E}export{et as E,us as T,rs as a,ns as b,cs as c,Tt as m,is as r,os as t,as as u};
@@ -0,0 +1 @@
1
+ import{c as P,r as U,j as a,n as Y,B as z,H as Q,ac as V,K as G,o as ae,p as se,e as ie,b as q,P as Z,d9 as Ne,d6 as Ce,d8 as H,t as L,d7 as ne,Y as de,s as we}from"./index-ZtSDBa1M.js";import{I as te}from"./input-DF-XKSRq.js";import{i as fe}from"./Check-B-T1OdyM.js";import{i as me}from"./ChevronSelectorVertical-BVHuvXcc.js";import{a as _e,c as ke,d as Te,e as Ae,b as Pe,C as Ie}from"./command-dzcaI1yG.js";import{a as Re,P as De,b as Ee}from"./popover-Dac8KJD5.js";import{S as ue}from"./switch-Dy2L3YiE.js";import{c as ge,d as pe,b as je,f as xe,g as he,e as ye,a as be,A as ve}from"./alert-dialog-BGVZQi8t.js";import{S as Oe,a as Be,b as Fe,c as $e,d as re}from"./select-DbwWg8mr.js";import{R as Ke,A as Me}from"./review-settings-CZcxafz4.js";import{t as Le}from"./cards-CVa-fA_N.js";import{n as qe}from"./config-n1zSHZqO.js";import{u as Je}from"./use-organization-settings-DYWZmbib.js";import{R as Ue}from"./require-capability-DuOlrYne.js";import"./index-Bkh-xk2l.js";import"./dialog-DROTnc8B.js";import"./SearchMd-BkU5uvZ3.js";import"./ChevronDown-lhRoz8ve.js";import"./ChevronUp-CjB5cNrn.js";import"./UserSquare-CZDBDZu6.js";import"./ThumbsUp-DsTVql5w.js";import"./DotsVertical-BK4JkTfJ.js";import"./Download01-B29-DAMF.js";import"./Share07-C7EQRNeA.js";import"./Globe01-BJregYun.js";import"./Key01-Dw14FM0z.js";import"./Palette-2Z9yrBrj.js";import"./Trash01-jS-aJOE_.js";import"./Zap-BWNllArR.js";import"./dropdown-menu-B4M2oT-i.js";import"./ChevronRight-PA4SrDe8.js";import"./Circle-0WhMTazG.js";import"./file-type-icon-t6saePJP.js";import"./Eye-Dwcpfw8S.js";import"./AlertCircle-CWbbvCE8.js";import"./CheckCircle-Di9U5M_3.js";import"./Shield01-CE7mb3Ix.js";import"./task-board-BU3VhW_R.js";import"./constants-dLUUoWH7.js";import"./access-gate-O3YxMPI-.js";import"./capability-load-error-B42WqLL_.js";function ze(t){const e=P.c(41),{options:n,value:s,onChange:l,placeholder:i,triggerClassName:r,contentClassName:o,width:p,renderTrigger:f,renderItem:m,emptyMessage:c,searchPlaceholder:g,filter:j}=t,x=i===void 0?"Select...":i,b=p===void 0?"w-[200px]":p,y=c===void 0?"No results found.":c,v=g===void 0?"Search...":g;let d;e[0]!==s?(d=M=>M.value===s,e[0]=s,e[1]=d):d=e[1];const u=n.find(d),[h,S]=U.useState(!1),C=De,N=Re,_=!0,k=f?a.jsx("div",{className:Y("cursor-pointer",r),children:f(u)}):a.jsxs(z,{variant:"outline",role:"combobox",className:Y("justify-between",b,r),children:[u?u.label:x,a.jsx(me,{className:"opacity-50"})]});let T;e[2]!==N||e[3]!==k?(T=a.jsx(N,{asChild:_,children:k}),e[2]=N,e[3]=k,e[4]=T):T=e[4];let A;e[5]!==o?(A=Y("p-0",o),e[5]=o,e[6]=A):A=e[6];let O;e[7]===Symbol.for("react.memo_cache_sentinel")?(O={width:"var(--radix-popover-trigger-width)"},e[7]=O):O=e[7];let B;e[8]!==v?(B=a.jsx(_e,{placeholder:v,className:"h-9"}),e[8]=v,e[9]=B):B=e[9];let $;e[10]!==y?($=a.jsx(ke,{children:y}),e[10]=y,e[11]=$):$=e[11];let I;if(e[12]!==l||e[13]!==n||e[14]!==m||e[15]!==S||e[16]!==s){let M;e[18]!==l||e[19]!==m||e[20]!==S||e[21]!==s?(M=w=>{const X=s===w.value;return a.jsx(Te,{value:w.label,onSelect:()=>{l(w.value===s?"":w.value),S(!1)},children:m?m(w,X):a.jsxs(a.Fragment,{children:[w.label,a.jsx(fe,{className:Y("ml-auto",X?"opacity-100":"opacity-0")})]})},w.value)},e[18]=l,e[19]=m,e[20]=S,e[21]=s,e[22]=M):M=e[22],I=n.map(M),e[12]=l,e[13]=n,e[14]=m,e[15]=S,e[16]=s,e[17]=I}else I=e[17];let R;e[23]!==I?(R=a.jsx(Ae,{children:I}),e[23]=I,e[24]=R):R=e[24];let K;e[25]!==$||e[26]!==R?(K=a.jsxs(Pe,{children:[$,R]}),e[25]=$,e[26]=R,e[27]=K):K=e[27];let D;e[28]!==j||e[29]!==B||e[30]!==K?(D=a.jsxs(Ie,{filter:j,children:[B,K]}),e[28]=j,e[29]=B,e[30]=K,e[31]=D):D=e[31];let E;e[32]!==D||e[33]!==A?(E=a.jsx(Ee,{className:A,style:O,children:D}),e[32]=D,e[33]=A,e[34]=E):E=e[34];let F;return e[35]!==C||e[36]!==h||e[37]!==S||e[38]!==E||e[39]!==T?(F=a.jsxs(C,{open:h,onOpenChange:S,children:[T,E]}),e[35]=C,e[36]=h,e[37]=S,e[38]=E,e[39]=T,e[40]=F):F=e[40],F}function Qe(t){const e=P.c(4),{size:n,className:s}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=l):l=e[0];let i;return e[1]!==s||e[2]!==n?(i=a.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:s,children:l}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function Se(t){const e=t.projectName?.replace(/\s+/g," ").trim(),n=t.name.trim();return e?{primary:e,secondary:[n,t.projectKey].filter(Boolean).join(" · ")}:{primary:n,secondary:t.projectKey??""}}function Ve(t){const{primary:e,secondary:n}=Se(t);return[e,n,`#${t.id}`].filter(Boolean).join(" ")}function oe(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}function Ge(t,e){const n=oe(e).trim();if(!n)return 1;const s=oe(t);return n.split(/\s+/).every(l=>s.includes(l))?1:0}function He(){const t=P.c(7),{org:e}=Q(),n=V();let s;t[0]!==e.id?(s=G.jiraIntegration(e.id),t[0]=e.id,t[1]=s):s=t[1];let l;t[2]!==n?(l=async()=>(await n.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=n,t[3]=l):l=t[3];let i;return t[4]!==s||t[5]!==l?(i={queryKey:s,queryFn:l},t[4]=s,t[5]=l,t[6]=i):i=t[6],ae(i)}function W(){const t=P.c(8),{org:e}=Q(),n=V(),s=se();let l;t[0]!==n?(l=async o=>(await n.call("JIRA_INTEGRATION_UPSERT",o)).integration,t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let r;return t[5]!==l||t[6]!==i?(r={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=r):r=t[7],ie(r)}function Ye(){const t=P.c(8),{org:e}=Q(),n=V(),s=se();let l;t[0]!==n?(l=()=>n.call("JIRA_INTEGRATION_DELETE",{}),t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let r;return t[5]!==l||t[6]!==i?(r={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=r):r=t[7],ie(r)}function We(t){const e=P.c(8),{org:n}=Q(),s=V();let l;e[0]!==n.id?(l=G.jiraBoards(n.id),e[0]=n.id,e[1]=l):l=e[1];let i;e[2]!==s?(i=async()=>(await s.call("JIRA_BOARDS_LIST",{})).boards,e[2]=s,e[3]=i):i=e[3];let r;return e[4]!==t||e[5]!==l||e[6]!==i?(r={queryKey:l,enabled:t,staleTime:6e4,queryFn:i},e[4]=t,e[5]=l,e[6]=i,e[7]=r):r=e[7],ae(r)}function Xe(t){const e=P.c(10),{org:n}=Q(),s=V();let l;e[0]!==t||e[1]!==n.id?(l=G.jiraBoardColumns(n.id,t??""),e[0]=t,e[1]=n.id,e[2]=l):l=e[2];const i=t!==null;let r;e[3]!==t||e[4]!==s?(r=async()=>(await s.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=s,e[5]=r):r=e[5];let o;return e[6]!==l||e[7]!==i||e[8]!==r?(o={queryKey:l,enabled:i,staleTime:6e4,queryFn:r},e[6]=l,e[7]=i,e[8]=r,e[9]=o):o=e[9],ae(o)}function Ze(){const t=P.c(8),{org:e}=Q(),n=V(),s=se();let l;t[0]!==n?(l=async()=>(await n.call("JIRA_SYNC_RUN",{})).result,t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let r;return t[5]!==l||t[6]!==i?(r={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=r):r=t[7],ie(r)}function et(){const t=P.c(8),{org:e}=Q(),n=V(),s=se();let l;t[0]!==n?(l=async()=>await n.call("JIRA_RESYNC_REQUEST",{}),t[0]=n,t[1]=l):l=t[1];let i;t[2]!==e||t[3]!==s?(i=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let r;return t[5]!==l||t[6]!==i?(r={mutationFn:l,onSettled:i},t[5]=l,t[6]=i,t[7]=r):r=t[7],ie(r)}function ee(t,e){const n=e.statuses[0];if(n)return Object.entries(t).find(([,s])=>s.includes(n))?.[0]}const ce=[{value:"triage",labelKey:"taskBoard.config.statusBacklog"},{value:"todo",labelKey:"taskBoard.config.statusTodo"},{value:"in_progress",labelKey:"taskBoard.config.statusInProgress"},{value:"in_review",labelKey:"taskBoard.config.statusInReview"},{value:"approved",labelKey:"taskBoard.config.statusApproved"},{value:"merged",labelKey:"taskBoard.config.statusMerged"},{value:"post_deploy_validation",labelKey:"taskBoard.config.statusPostDeployValidation"},{value:"done",labelKey:"taskBoard.config.statusDone"},{value:"archived",labelKey:"taskBoard.config.statusArchived"}];function tt(t,e){return t?ce:ce.filter(n=>!qe(n.value)||n.value===e)}const le="__dont_sync__";function J(t,e){return t instanceof Error?t.message:e}const st="https://id.atlassian.com/manage-profile/security/api-tokens";function it(t){const e=P.c(7),{stepKeys:n}=t,s=q();let l;if(e[0]!==n||e[1]!==s){let r;e[3]!==s?(r=o=>a.jsx("li",{children:s(o)},o),e[3]=s,e[4]=r):r=e[4],l=n.map(r),e[0]=n,e[1]=s,e[2]=l}else l=e[2];let i;return e[5]!==l?(i=a.jsx("ol",{className:"list-decimal pl-5 flex flex-col gap-1 text-xs text-muted-foreground",children:l}),e[5]=l,e[6]=i):i=e[6],i}function nt(){const t=P.c(69),e=q(),n=W(),[s,l]=U.useState(""),[i,r]=U.useState(""),[o,p]=U.useState("");let f;t[0]!==o||t[1]!==i||t[2]!==s?(f=s.trim()!==""&&i.trim()!==""&&o.trim()!=="",t[0]=o,t[1]=i,t[2]=s,t[3]=f):f=t[3];const m=f;let c;t[4]!==e?(c=e("settings.jira.siteLabel"),t[4]=e,t[5]=c):c=t[5];let g;t[6]!==c?(g=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:c}),t[6]=c,t[7]=g):g=t[7];let j;t[8]===Symbol.for("react.memo_cache_sentinel")?(j=w=>l(w.target.value),t[8]=j):j=t[8];let x;t[9]!==e?(x=e("settings.jira.sitePlaceholder"),t[9]=e,t[10]=x):x=t[10];let b;t[11]!==s||t[12]!==x?(b=a.jsx(te,{value:s,onChange:j,placeholder:x,autoComplete:"off"}),t[11]=s,t[12]=x,t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==b?(y=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,b]}),t[14]=g,t[15]=b,t[16]=y):y=t[16];let v;t[17]!==e?(v=e("settings.jira.emailLabel"),t[17]=e,t[18]=v):v=t[18];let d;t[19]!==v?(d=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:v}),t[19]=v,t[20]=d):d=t[20];let u;t[21]===Symbol.for("react.memo_cache_sentinel")?(u=w=>r(w.target.value),t[21]=u):u=t[21];let h;t[22]!==e?(h=e("settings.jira.emailPlaceholder"),t[22]=e,t[23]=h):h=t[23];let S;t[24]!==i||t[25]!==h?(S=a.jsx(te,{value:i,onChange:u,placeholder:h,autoComplete:"off"}),t[24]=i,t[25]=h,t[26]=S):S=t[26];let C;t[27]!==S||t[28]!==d?(C=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,S]}),t[27]=S,t[28]=d,t[29]=C):C=t[29];let N;t[30]!==e?(N=e("settings.jira.tokenLabel"),t[30]=e,t[31]=N):N=t[31];let _;t[32]!==N?(_=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:N}),t[32]=N,t[33]=_):_=t[33];let k;t[34]!==e?(k=e("settings.jira.createTokenLink"),t[34]=e,t[35]=k):k=t[35];let T;t[36]===Symbol.for("react.memo_cache_sentinel")?(T=a.jsx(we,{size:12}),t[36]=T):T=t[36];let A;t[37]!==k?(A=a.jsxs("a",{href:st,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-xs text-foreground hover:underline",children:[k,T]}),t[37]=k,t[38]=A):A=t[38];let O;t[39]!==_||t[40]!==A?(O=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[_,A]}),t[39]=_,t[40]=A,t[41]=O):O=t[41];let B;t[42]===Symbol.for("react.memo_cache_sentinel")?(B=w=>p(w.target.value),t[42]=B):B=t[42];let $;t[43]!==e?($=e("settings.jira.tokenPlaceholder"),t[43]=e,t[44]=$):$=t[44];let I;t[45]!==o||t[46]!==$?(I=a.jsx(te,{type:"password",value:o,onChange:B,placeholder:$,autoComplete:"off"}),t[45]=o,t[46]=$,t[47]=I):I=t[47];let R;t[48]!==O||t[49]!==I?(R=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[O,I]}),t[48]=O,t[49]=I,t[50]=R):R=t[50];const K=!m||n.isPending;let D;t[51]!==o||t[52]!==i||t[53]!==s||t[54]!==e||t[55]!==n?(D=()=>n.mutate({siteUrl:s.trim(),email:i.trim(),apiToken:o.trim()},{onSuccess:()=>L.success(e("settings.jira.connected")),onError:w=>L.error(J(w,e("settings.jira.connectFailed")))}),t[51]=o,t[52]=i,t[53]=s,t[54]=e,t[55]=n,t[56]=D):D=t[56];let E;t[57]!==e||t[58]!==n.isPending?(E=n.isPending?e("settings.jira.connecting"):e("settings.jira.connect"),t[57]=e,t[58]=n.isPending,t[59]=E):E=t[59];let F;t[60]!==K||t[61]!==D||t[62]!==E?(F=a.jsx(z,{size:"sm",className:"w-fit",disabled:K,onClick:D,children:E}),t[60]=K,t[61]=D,t[62]=E,t[63]=F):F=t[63];let M;return t[64]!==C||t[65]!==R||t[66]!==F||t[67]!==y?(M=a.jsxs("div",{className:"flex flex-col gap-4 mt-3 max-w-md",children:[y,C,R,F]}),t[64]=C,t[65]=R,t[66]=F,t[67]=y,t[68]=M):M=t[68],M}function lt(t){const e=P.c(7),{integration:n}=t,s=q();if(n.lastSyncError){let r;return e[0]!==n.lastSyncError?(r=a.jsx("p",{className:"text-xs text-destructive truncate",children:n.lastSyncError}),e[0]=n.lastSyncError,e[1]=r):r=e[1],r}let l;e[2]!==n.lastSyncedAt||e[3]!==s?(l=n.lastSyncedAt?s("settings.jira.lastSynced",{ago:Le(n.lastSyncedAt)}):s("settings.jira.waitingFirstSync"),e[2]=n.lastSyncedAt,e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==l?(i=a.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[5]=l,e[6]=i):i=e[6],i}function at(t){const e=P.c(35),{integration:n}=t,s=q(),l=W(),i=Xe(n.boardId),r=Je("delivery_lanes_enabled"),[o,p]=U.useState(n.statusMapping),[f,m]=U.useState(n);if(f!==n&&(m(n),p(n.statusMapping)),i.isPending){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(de,{className:"h-24 w-full mt-3"}),e[0]=d):d=e[0],d}if(i.isError){let d;e[1]!==i.error||e[2]!==s?(d=J(i.error,s("settings.jira.columnsFailed")),e[1]=i.error,e[2]=s,e[3]=d):d=e[3];let u;return e[4]!==d?(u=a.jsx("p",{className:"text-xs text-destructive mt-3",children:d}),e[4]=d,e[5]=u):u=e[5],u}let c;e[6]!==i.data||e[7]!==o||e[8]!==s||e[9]!==l?(c=function(u,h){const S=o,C={};for(const N of i.data??[]){const _=N.name===u.name?h===le?void 0:h:ee(o,N);_&&(C[_]=[...C[_]??[],...N.statuses])}p(C),l.mutate({statusMapping:C},{onError:N=>{p(S),L.error(J(N,s("settings.jira.saveFailed")))}})},e[6]=i.data,e[7]=o,e[8]=s,e[9]=l,e[10]=c):c=e[10];const g=c;let j,x;if(e[11]!==i.data||e[12]!==o||e[13]!==s){let d;e[16]!==o?(d=h=>!ee(o,h),e[16]=o,e[17]=d):d=e[17];const u=(i.data??[]).filter(d);j="flex flex-col mt-3",x=u.length>0&&a.jsx("p",{className:"mb-2 rounded-md bg-warning/10 px-3 py-2 text-xs text-warning",children:s("settings.jira.unmappedWarning",{columns:u.map(rt).join(", ")})}),e[11]=i.data,e[12]=o,e[13]=s,e[14]=j,e[15]=x}else j=e[14],x=e[15];let b;e[18]!==i.data?(b=i.data??[],e[18]=i.data,e[19]=b):b=e[19];let y;if(e[20]!==r||e[21]!==o||e[22]!==g||e[23]!==s||e[24]!==b){let d;e[26]!==r||e[27]!==o||e[28]!==g||e[29]!==s?(d=u=>a.jsxs("div",{className:"flex items-center justify-between gap-4 py-2.5 border-b border-border/60 last:border-b-0",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("span",{className:"text-sm truncate",children:u.name}),(u.statuses.length>1||u.statuses[0]!==u.name)&&a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:u.statuses.join(", ")})]}),a.jsxs(Oe,{value:ee(o,u)??le,onValueChange:h=>g(u,h),children:[a.jsx(Be,{className:"w-44 shrink-0",children:a.jsx(Fe,{})}),a.jsxs($e,{children:[a.jsx(re,{value:le,children:s("settings.jira.dontSync")}),tt(r,ee(o,u)).map(h=>a.jsx(re,{value:h.value,children:s(h.labelKey)},h.value))]})]})]},u.name),e[26]=r,e[27]=o,e[28]=g,e[29]=s,e[30]=d):d=e[30],y=b.map(d),e[20]=r,e[21]=o,e[22]=g,e[23]=s,e[24]=b,e[25]=y}else y=e[25];let v;return e[31]!==j||e[32]!==x||e[33]!==y?(v=a.jsxs("div",{className:j,children:[x,y]}),e[31]=j,e[32]=x,e[33]=y,e[34]=v):v=e[34],v}function rt(t){return t.name}function ot(t){const e=P.c(44),{integration:n}=t,s=q(),l=Ye(),[i,r]=U.useState(!1),o=n.siteUrl,p=n.email;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),e[0]=f):f=e[0];let m;e[1]!==s?(m=s("settings.jira.disconnect"),e[1]=s,e[2]=m):m=e[2];let c;e[3]!==m?(c=a.jsx(z,{variant:"outline",size:"sm",onClick:f,children:m}),e[3]=m,e[4]=c):c=e[4];let g;e[5]!==n.email||e[6]!==n.siteUrl||e[7]!==c?(g=a.jsx(H,{title:o,description:p,action:c}),e[5]=n.email,e[6]=n.siteUrl,e[7]=c,e[8]=g):g=e[8];let j;e[9]!==s?(j=s("settings.jira.disconnectTitle"),e[9]=s,e[10]=j):j=e[10];let x;e[11]!==j?(x=a.jsx(ge,{children:j}),e[11]=j,e[12]=x):x=e[12];let b;e[13]!==s?(b=s("settings.jira.disconnectDescription"),e[13]=s,e[14]=b):b=e[14];let y;e[15]!==b?(y=a.jsx(pe,{children:b}),e[15]=b,e[16]=y):y=e[16];let v;e[17]!==y||e[18]!==x?(v=a.jsxs(je,{children:[x,y]}),e[17]=y,e[18]=x,e[19]=v):v=e[19];let d;e[20]!==s?(d=s("settings.jira.cancel"),e[20]=s,e[21]=d):d=e[21];let u;e[22]!==d?(u=a.jsx(xe,{children:d}),e[22]=d,e[23]=u):u=e[23];let h;e[24]!==l||e[25]!==s?(h=()=>l.mutate(void 0,{onSuccess:()=>L.success(s("settings.jira.disconnected")),onError:A=>L.error(J(A,s("settings.jira.saveFailed")))}),e[24]=l,e[25]=s,e[26]=h):h=e[26];let S;e[27]!==s?(S=s("settings.jira.disconnect"),e[27]=s,e[28]=S):S=e[28];let C;e[29]!==h||e[30]!==S?(C=a.jsx(he,{onClick:h,children:S}),e[29]=h,e[30]=S,e[31]=C):C=e[31];let N;e[32]!==u||e[33]!==C?(N=a.jsxs(ye,{children:[u,C]}),e[32]=u,e[33]=C,e[34]=N):N=e[34];let _;e[35]!==v||e[36]!==N?(_=a.jsxs(be,{children:[v,N]}),e[35]=v,e[36]=N,e[37]=_):_=e[37];let k;e[38]!==i||e[39]!==_?(k=a.jsx(ve,{open:i,onOpenChange:r,children:_}),e[38]=i,e[39]=_,e[40]=k):k=e[40];let T;return e[41]!==k||e[42]!==g?(T=a.jsxs(a.Fragment,{children:[g,k]}),e[41]=k,e[42]=g,e[43]=T):T=e[43],T}function ct(t){const e=P.c(36),{integration:n}=t,s=q(),l=W(),i=We(!0);let r,o;e[0]!==i.data||e[1]!==n.boardId||e[2]!==n.boardName?(r=(i.data??[]).map(ft),o=n.boardId?r.find(u=>u.value===n.boardId)?.primary??n.boardName??n.boardId:null,e[0]=i.data,e[1]=n.boardId,e[2]=n.boardName,e[3]=r,e[4]=o):(r=e[3],o=e[4]);const p=o;let f;e[5]!==s?(f=s("settings.jira.boardLabel"),e[5]=s,e[6]=f):f=e[6];let m;e[7]!==s?(m=s("settings.jira.boardDescription"),e[7]=s,e[8]=m):m=e[8];const c=n.boardId??"";let g;e[9]!==s?(g=s("settings.jira.boardPlaceholder"),e[9]=s,e[10]=g):g=e[10];let j;e[11]!==s?(j=s("settings.jira.boardSearchPlaceholder"),e[11]=s,e[12]=j):j=e[12];let x;e[13]!==i.isPending||e[14]!==s?(x=i.isPending?s("settings.jira.loadingBoards"):s("settings.jira.noBoardsMatch"),e[13]=i.isPending,e[14]=s,e[15]=x):x=e[15];let b;e[16]!==p||e[17]!==s?(b=()=>a.jsxs(z,{variant:"outline",role:"combobox",className:"w-72 justify-between font-normal",children:[a.jsx("span",{className:"truncate",children:p??s("settings.jira.boardPlaceholder")}),a.jsx(me,{className:"opacity-50 shrink-0"})]}),e[16]=p,e[17]=s,e[18]=b):b=e[18];let y;e[19]!==r||e[20]!==n.boardId||e[21]!==s||e[22]!==l?(y=u=>{!u||u===n.boardId||l.mutate({boardId:u,boardName:r.find(h=>h.value===u)?.primary??null,statusMapping:{},enabled:!1},{onError:h=>L.error(J(h,s("settings.jira.saveFailed")))})},e[19]=r,e[20]=n.boardId,e[21]=s,e[22]=l,e[23]=y):y=e[23];let v;e[24]!==r||e[25]!==c||e[26]!==g||e[27]!==j||e[28]!==x||e[29]!==b||e[30]!==y?(v=a.jsx(ze,{options:r,value:c,width:"w-72",triggerClassName:"shrink-0",placeholder:g,searchPlaceholder:j,filter:Ge,emptyMessage:x,renderTrigger:b,renderItem:dt,onChange:y}),e[24]=r,e[25]=c,e[26]=g,e[27]=j,e[28]=x,e[29]=b,e[30]=y,e[31]=v):v=e[31];let d;return e[32]!==v||e[33]!==f||e[34]!==m?(d=a.jsx(H,{title:f,description:m,action:v}),e[32]=v,e[33]=f,e[34]=m,e[35]=d):d=e[35],d}function dt(t,e){return a.jsxs("div",{className:"flex items-start gap-2 min-w-0 w-full",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate",children:t.primary}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.secondary})]}),a.jsx(fe,{className:Y("mt-0.5 shrink-0",e?"opacity-100":"opacity-0")})]})}function ft(t){const{primary:e,secondary:n}=Se(t);return{value:String(t.id),label:Ve(t),primary:e,secondary:n}}function mt(t){const e=P.c(10),{integration:n}=t,s=q();let l;e[0]!==s?(l=s("settings.jira.mappingLabel"),e[0]=s,e[1]=l):l=e[1];let i;e[2]!==s?(i=s("settings.jira.mappingDescription"),e[2]=s,e[3]=i):i=e[3];let r;e[4]!==n?(r=a.jsx(at,{integration:n}),e[4]=n,e[5]=r):r=e[5];let o;return e[6]!==l||e[7]!==i||e[8]!==r?(o=a.jsx(H,{title:l,description:i,children:r}),e[6]=l,e[7]=i,e[8]=r,e[9]=o):o=e[9],o}function ut(t){const e=P.c(15),{integration:n}=t,s=q(),l=W();let i;e[0]!==s?(i=s("settings.jira.autoDelegateLabel"),e[0]=s,e[1]=i):i=e[1];let r;e[2]!==s?(r=s("settings.jira.autoDelegateDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==s||e[5]!==l?(o=m=>l.mutate({autoDelegate:m},{onError:c=>L.error(J(c,s("settings.jira.saveFailed")))}),e[4]=s,e[5]=l,e[6]=o):o=e[6];let p;e[7]!==n.autoDelegate||e[8]!==o||e[9]!==l.isPending?(p=a.jsx(ue,{checked:n.autoDelegate,disabled:l.isPending,onCheckedChange:o}),e[7]=n.autoDelegate,e[8]=o,e[9]=l.isPending,e[10]=p):p=e[10];let f;return e[11]!==i||e[12]!==r||e[13]!==p?(f=a.jsx(H,{title:i,description:r,action:p}),e[11]=i,e[12]=r,e[13]=p,e[14]=f):f=e[14],f}function gt(t){const e=P.c(72),{integration:n}=t,s=q(),l=W(),i=Ze(),r=et(),[o,p]=U.useState(!1);let f;e[0]!==n.statusMapping?(f=Object.keys(n.statusMapping),e[0]=n.statusMapping,e[1]=f):f=e[1];const m=f.length>0;let c;e[2]!==s?(c=s("settings.jira.enableLabel"),e[2]=s,e[3]=c):c=e[3];let g;e[4]!==n?(g=a.jsx(lt,{integration:n}),e[4]=n,e[5]=g):g=e[5];const j=!n.enabled||i.isPending||r.isPending;let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=()=>p(!0),e[6]=x):x=e[6];let b;e[7]!==s?(b=s("settings.jira.resyncAll"),e[7]=s,e[8]=b):b=e[8];let y;e[9]!==j||e[10]!==b?(y=a.jsx(z,{variant:"outline",size:"sm",disabled:j,onClick:x,children:b}),e[9]=j,e[10]=b,e[11]=y):y=e[11];let v;e[12]!==s?(v=s("settings.jira.resyncAllTitle"),e[12]=s,e[13]=v):v=e[13];let d;e[14]!==v?(d=a.jsx(ge,{children:v}),e[14]=v,e[15]=d):d=e[15];let u;e[16]!==s?(u=s("settings.jira.resyncAllDescription"),e[16]=s,e[17]=u):u=e[17];let h;e[18]!==u?(h=a.jsx(pe,{children:u}),e[18]=u,e[19]=h):h=e[19];let S;e[20]!==h||e[21]!==d?(S=a.jsxs(je,{children:[d,h]}),e[20]=h,e[21]=d,e[22]=S):S=e[22];let C;e[23]!==s?(C=s("settings.jira.cancel"),e[23]=s,e[24]=C):C=e[24];let N;e[25]!==C?(N=a.jsx(xe,{children:C}),e[25]=C,e[26]=N):N=e[26];let _;e[27]!==r||e[28]!==s?(_=()=>r.mutate(void 0,{onSuccess:()=>L.success(s("settings.jira.resyncAllQueued")),onError:w=>L.error(J(w,s("settings.jira.syncFailed")))}),e[27]=r,e[28]=s,e[29]=_):_=e[29];let k;e[30]!==s?(k=s("settings.jira.resyncAll"),e[30]=s,e[31]=k):k=e[31];let T;e[32]!==_||e[33]!==k?(T=a.jsx(he,{onClick:_,children:k}),e[32]=_,e[33]=k,e[34]=T):T=e[34];let A;e[35]!==N||e[36]!==T?(A=a.jsxs(ye,{children:[N,T]}),e[35]=N,e[36]=T,e[37]=A):A=e[37];let O;e[38]!==S||e[39]!==A?(O=a.jsxs(be,{children:[S,A]}),e[38]=S,e[39]=A,e[40]=O):O=e[40];let B;e[41]!==o||e[42]!==O||e[43]!==y?(B=a.jsxs(ve,{open:o,onOpenChange:p,children:[y,O]}),e[41]=o,e[42]=O,e[43]=y,e[44]=B):B=e[44];const $=!n.enabled||i.isPending;let I;e[45]!==i||e[46]!==s?(I=()=>i.mutate(void 0,{onSuccess:w=>{"error"in w?L.error(w.error):L.success(s("settings.jira.syncDone",{created:String(w.created),updated:String(w.updated),archived:String(w.archived)}))},onError:w=>L.error(J(w,s("settings.jira.syncFailed")))}),e[45]=i,e[46]=s,e[47]=I):I=e[47];let R;e[48]!==i.isPending||e[49]!==s?(R=i.isPending?s("settings.jira.syncing"):s("settings.jira.syncNow"),e[48]=i.isPending,e[49]=s,e[50]=R):R=e[50];let K;e[51]!==$||e[52]!==I||e[53]!==R?(K=a.jsx(z,{variant:"outline",size:"sm",disabled:$,onClick:I,children:R}),e[51]=$,e[52]=I,e[53]=R,e[54]=K):K=e[54];let D;e[55]!==m||e[56]!==n.boardId||e[57]!==s||e[58]!==l?(D=w=>{if(w&&(!n.boardId||!m)){L.error(s("settings.jira.enableRequirements"));return}l.mutate({enabled:w},{onError:X=>L.error(J(X,s("settings.jira.saveFailed")))})},e[55]=m,e[56]=n.boardId,e[57]=s,e[58]=l,e[59]=D):D=e[59];let E;e[60]!==n.enabled||e[61]!==D||e[62]!==l.isPending?(E=a.jsx(ue,{checked:n.enabled,disabled:l.isPending,onCheckedChange:D}),e[60]=n.enabled,e[61]=D,e[62]=l.isPending,e[63]=E):E=e[63];let F;e[64]!==B||e[65]!==K||e[66]!==E?(F=a.jsxs("div",{className:"flex items-center gap-3",children:[B,K,E]}),e[64]=B,e[65]=K,e[66]=E,e[67]=F):F=e[67];let M;return e[68]!==c||e[69]!==F||e[70]!==g?(M=a.jsx(H,{title:c,description:g,action:F}),e[68]=c,e[69]=F,e[70]=g,e[71]=M):M=e[71],M}function pt(t){const e=P.c(24),{integration:n}=t,s=q(),l=`${window.location.origin}/api/_jira/webhook/${n.webhookSecret}`;let i;e[0]!==s?(i=s("settings.jira.webhookTitle"),e[0]=s,e[1]=i):i=e[1];let r;e[2]!==s?(r=s("settings.jira.webhookDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==l?(o=a.jsx(te,{readOnly:!0,value:l,className:"font-mono text-xs"}),e[4]=l,e[5]=o):o=e[5];let p;e[6]!==s||e[7]!==l?(p=()=>{navigator.clipboard.writeText(l),L.success(s("settings.jira.webhookCopied"))},e[6]=s,e[7]=l,e[8]=p):p=e[8];let f;e[9]!==s?(f=s("settings.jira.webhookCopy"),e[9]=s,e[10]=f):f=e[10];let m;e[11]!==p||e[12]!==f?(m=a.jsx(z,{variant:"outline",size:"sm",className:"shrink-0",onClick:p,children:f}),e[11]=p,e[12]=f,e[13]=m):m=e[13];let c;e[14]!==o||e[15]!==m?(c=a.jsxs("div",{className:"flex items-center gap-2",children:[o,m]}),e[14]=o,e[15]=m,e[16]=c):c=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(it,{stepKeys:["settings.jira.webhookStep1","settings.jira.webhookStep2","settings.jira.webhookStep3","settings.jira.webhookStep4","settings.jira.webhookStep5"]}),e[17]=g):g=e[17];let j;e[18]!==c?(j=a.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[c,g]}),e[18]=c,e[19]=j):j=e[19];let x;return e[20]!==i||e[21]!==r||e[22]!==j?(x=a.jsx(H,{title:i,description:r,children:j}),e[20]=i,e[21]=r,e[22]=j,e[23]=x):x=e[23],x}function jt(){const t=P.c(25),e=q(),n=He();if(n.isPending){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(ne,{children:a.jsx("div",{className:"p-4",children:a.jsx(de,{className:"h-40 w-full"})})}),t[0]=c):c=t[0],c}if(!n.data){let c;t[1]!==e?(c=e("settings.jira.connectTitle"),t[1]=e,t[2]=c):c=t[2];let g;t[3]!==e?(g=e("settings.jira.connectDescription"),t[3]=e,t[4]=g):g=t[4];let j;t[5]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(nt,{}),t[5]=j):j=t[5];let x;return t[6]!==c||t[7]!==g?(x=a.jsx(ne,{children:a.jsx(H,{title:c,description:g,children:j})}),t[6]=c,t[7]=g,t[8]=x):x=t[8],x}const s=n.data;let l,i,r;t[9]!==s?(l=a.jsx(ot,{integration:s}),i=a.jsx(ct,{integration:s}),r=s.boardId&&a.jsx(mt,{integration:s}),t[9]=s,t[10]=l,t[11]=i,t[12]=r):(l=t[10],i=t[11],r=t[12]);let o;t[13]!==s?(o=s.boardId&&a.jsx(ut,{integration:s}),t[13]=s,t[14]=o):o=t[14];let p,f;t[15]!==s?(p=a.jsx(gt,{integration:s}),f=a.jsx(pt,{integration:s}),t[15]=s,t[16]=p,t[17]=f):(p=t[16],f=t[17]);let m;return t[18]!==l||t[19]!==i||t[20]!==r||t[21]!==o||t[22]!==p||t[23]!==f?(m=a.jsxs(ne,{children:[l,i,r,o,p,f]}),t[18]=l,t[19]=i,t[20]=r,t[21]=o,t[22]=p,t[23]=f,t[24]=m):m=t[24],m}function xt(){const t=P.c(17),e=q();let n;t[0]!==e?(n=e("settings.nav.tasks"),t[0]=e,t[1]=n):n=t[1];let s;t[2]!==n?(s=a.jsx(Z.Title,{children:n}),t[2]=n,t[3]=s):s=t[3];let l,i;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(Ke,{}),i=a.jsx(Me,{}),t[4]=l,t[5]=i):(l=t[4],i=t[5]);let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Qe,{size:18}),t[6]=r):r=t[6];let o;t[7]!==e?(o=e("settings.jira.sectionTitle"),t[7]=e,t[8]=o):o=t[8];let p;t[9]!==o?(p=a.jsxs("span",{className:"flex items-center gap-2",children:[r,o]}),t[9]=o,t[10]=p):p=t[10];let f;t[11]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(jt,{}),t[11]=f):f=t[11];let m;t[12]!==p?(m=a.jsx(Ce,{title:p,children:f}),t[12]=p,t[13]=m):m=t[13];let c;return t[14]!==s||t[15]!==m?(c=a.jsx(Z,{children:a.jsx(Z.Content,{children:a.jsx(Z.Body,{children:a.jsxs(Ne,{children:[s,l,i,m]})})})}),t[14]=s,t[15]=m,t[16]=c):c=t[16],c}function ls(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Ue,{capability:"org:manage",area:"settings",children:a.jsx(xt,{})}),t[0]=e):e=t[0],e}export{ls as default};
@@ -1 +1 @@
1
- import{c as o,n,j as l}from"./index-66BUlUCq.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=n("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=l.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
1
+ import{c as o,n,j as l}from"./index-ZtSDBa1M.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=n("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=l.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
@@ -1 +1 @@
1
- import{r as x,bl as b,j as c,bi as m,bo as V,b0 as p,db as M,dc as T,bn as S,dd as A,bk as F,bs as $,c as P,n as C}from"./index-66BUlUCq.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:V(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=H(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),k=x.createContext({size:"default",variant:"default"});function K(r){const e=P.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(k.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=P.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(k),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=C(q({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
1
+ import{r as x,bl as b,j as c,bi as m,bo as V,b0 as p,db as M,dc as T,bn as S,dd as A,bk as F,bs as $,c as P,n as C}from"./index-ZtSDBa1M.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:V(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=H(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),k=x.createContext({size:"default",variant:"default"});function K(r){const e=P.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(k.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=P.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(k),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=C(q({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
@@ -1 +1 @@
1
- import{c as u,n as T,j as i,r as g,b as j,f as N,aH as p,L as k,bq as y,bN as L}from"./index-66BUlUCq.js";function A(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let b;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(b=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=b):b=e[13],b}const S=g.createContext(null);function x(){const t=g.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=g.useState(null),[n,r]=g.useState(null),[c,a]=g.useState(null),[f,b]=g.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:b},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let h;return e[5]!==l||e[6]!==d?(h=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=h):h=e[7],h}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function _(){const t=u.c(13),e=j(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let b;return t[10]!==c||t[11]!==f?(b=i.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=b):b=t[12],b}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(g.Suspense,{fallback:i.jsx("span",{className:"shrink-0 size-6 mx-2"}),children:i.jsx(_,{})}),t[0]=e):e=t[0],e}function z(){const t=u.c(12),e=j();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=N(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(k,{to:"/$org",params:o,"aria-label":n,title:r,className:"flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function P(){const t=u.c(2),{setCenterEl:e}=x();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function w(t){const e=u.c(3),{children:l}=t,{centerEl:s}=x();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=p.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=x();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=x();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=p.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=x();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=x();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=R;m.Logo=E;m.LogoLink=z;m.CenterSlot=P;m.Center=w;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{A as T,m as a};
1
+ import{c as u,n as T,j as i,r as g,b as j,f as N,aH as p,L as k,bq as y,bN as L}from"./index-ZtSDBa1M.js";function A(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let b;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(b=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=b):b=e[13],b}const S=g.createContext(null);function x(){const t=g.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=g.useState(null),[n,r]=g.useState(null),[c,a]=g.useState(null),[f,b]=g.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:b},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let h;return e[5]!==l||e[6]!==d?(h=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=h):h=e[7],h}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function _(){const t=u.c(13),e=j(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let b;return t[10]!==c||t[11]!==f?(b=i.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=b):b=t[12],b}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(g.Suspense,{fallback:i.jsx("span",{className:"shrink-0 size-6 mx-2"}),children:i.jsx(_,{})}),t[0]=e):e=t[0],e}function z(){const t=u.c(12),e=j();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=N(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(k,{to:"/$org",params:o,"aria-label":n,title:r,className:"flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function P(){const t=u.c(2),{setCenterEl:e}=x();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function w(t){const e=u.c(3),{children:l}=t,{centerEl:s}=x();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=p.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=x();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=x();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=p.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=x();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=x();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=R;m.Logo=E;m.LogoLink=z;m.CenterSlot=P;m.Center=w;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{A as T,m as a};
@@ -1 +1 @@
1
- import{v as _,T as l}from"./index-66BUlUCq.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
1
+ import{v as _,T as l}from"./index-ZtSDBa1M.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
@@ -1,4 +1,4 @@
1
- import{b_ as p,at as t,ap as v,an as a,cJ as q,ak as s,am as g,al as u,ar as h,au as x,bY as O,cK as fe,cL as be,cM as B,cN as j,cO as ye,cP as ve,cQ as $,cR as _e,cS as He,cT as Me,cU as ke,cV as Pe,cW as qe,cX as Te,cY as Ie,ca as Ee,cZ as Le,c_ as ze,c$ as Ue,d0 as Ae,d1 as De,d2 as Ne,d3 as Oe,c8 as je,r as oe,c as V,j as y,d4 as Be,d5 as $e,q as Ve,x as Fe,n as se}from"./index-66BUlUCq.js";import{P as We}from"./use-mcp-client-DPpSkRNd.js";const ce=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ke(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Je(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
1
+ import{b_ as p,at as t,ap as v,an as a,cJ as q,ak as s,am as g,al as u,ar as h,au as x,bY as O,cK as fe,cL as be,cM as B,cN as j,cO as ye,cP as ve,cQ as $,cR as _e,cS as He,cT as Me,cU as ke,cV as Pe,cW as qe,cX as Te,cY as Ie,ca as Ee,cZ as Le,c_ as ze,c$ as Ue,d0 as Ae,d1 as De,d2 as Ne,d3 as Oe,c8 as je,r as oe,c as V,j as y,d4 as Be,d5 as $e,q as Ve,x as Fe,n as se}from"./index-ZtSDBa1M.js";import{P as We}from"./use-mcp-client-4vfKAZII.js";const ce=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ke(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Je(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
2
2
  `+i+r.slice(f)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const f=(d.index??0)+d[0].length;return r.slice(0,f)+`
3
3
  <head>
4
4
  `+i+`
@@ -1 +1 @@
1
- import{c as p,H as h,ac as R,K as m,o as y,z as S,aV as D}from"./index-66BUlUCq.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},w={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function x(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||x(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,w[s]??[],F))}return t}function H(o,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=h(),t=R();let n;o[0]!==e.id?(n=m.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=h();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function z(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(V),o[0]=e,o[1]=t):t=o[1],t}function V(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function B(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function G(o){const e=p.c(11),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{B as a,E as b,F as c,N as d,O as e,$ as f,G as g,C as i,b as p,z as u};
1
+ import{c as p,H as h,ac as R,K as m,o as y,z as S,aV as D}from"./index-ZtSDBa1M.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},w={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function x(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||x(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,w[s]??[],F))}return t}function H(o,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=h(),t=R();let n;o[0]!==e.id?(n=m.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=h();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function z(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(V),o[0]=e,o[1]=t):t=o[1],t}function V(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function B(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function G(o){const e=p.c(11),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{B as a,E as b,F as c,N as d,O as e,$ as f,G as g,C as i,b as p,z as u};
@@ -1 +1 @@
1
- import{c,H as d,p,e as I,K as g,o as E}from"./index-66BUlUCq.js";import{u as y}from"./use-mcp-client-DPpSkRNd.js";import{S as m}from"./constants-dLUUoWH7.js";function f(e,t){if(e?.isError)throw new Error(e.content?.[0]?.text??t);if(!e.structuredContent)throw new Error(t);return e.structuredContent}function S(){const e=c.c(10),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n);let o;e[3]!==t.id?(o=g.apiKeysList(t.id),e[3]=t.id,e[4]=o):o=e[4];let s;e[5]!==r?(s=async()=>{const l=await r.callTool({name:"API_KEY_LIST",arguments:{}});return f(l,"Failed to list API keys").items},e[5]=r,e[6]=s):s=e[6];let i;return e[7]!==o||e[8]!==s?(i={queryKey:o,queryFn:s,staleTime:3e4},e[7]=o,e[8]=s,e[9]=i):i=e[9],E(i)}function P(){const e=c.c(11),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n),o=p();let s;e[3]!==r?(s=async u=>{const a=await r.callTool({name:"API_KEY_CREATE",arguments:{name:u.name,permissions:u.permissions??{"*":["*"]}}});return f(a,"Failed to create API key")},e[3]=r,e[4]=s):s=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==i?(l={mutationFn:s,onSuccess:i},e[8]=s,e[9]=i,e[10]=l):l=e[10],I(l)}function _(){const e=c.c(11),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n),o=p();let s;e[3]!==r?(s=async u=>{const a=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:u}});return f(a,"Failed to delete API key")},e[3]=r,e[4]=s):s=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==i?(l={mutationFn:s,onSuccess:i},e[8]=s,e[9]=i,e[10]=l):l=e[10],I(l)}export{S as a,_ as b,P as u};
1
+ import{c,H as d,p,e as I,K as g,o as E}from"./index-ZtSDBa1M.js";import{u as y}from"./use-mcp-client-4vfKAZII.js";import{S as m}from"./constants-dLUUoWH7.js";function f(e,t){if(e?.isError)throw new Error(e.content?.[0]?.text??t);if(!e.structuredContent)throw new Error(t);return e.structuredContent}function S(){const e=c.c(10),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n);let o;e[3]!==t.id?(o=g.apiKeysList(t.id),e[3]=t.id,e[4]=o):o=e[4];let s;e[5]!==r?(s=async()=>{const l=await r.callTool({name:"API_KEY_LIST",arguments:{}});return f(l,"Failed to list API keys").items},e[5]=r,e[6]=s):s=e[6];let i;return e[7]!==o||e[8]!==s?(i={queryKey:o,queryFn:s,staleTime:3e4},e[7]=o,e[8]=s,e[9]=i):i=e[9],E(i)}function P(){const e=c.c(11),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n),o=p();let s;e[3]!==r?(s=async u=>{const a=await r.callTool({name:"API_KEY_CREATE",arguments:{name:u.name,permissions:u.permissions??{"*":["*"]}}});return f(a,"Failed to create API key")},e[3]=r,e[4]=s):s=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==i?(l={mutationFn:s,onSuccess:i},e[8]=s,e[9]=i,e[10]=l):l=e[10],I(l)}function _(){const e=c.c(11),{org:t}=d();let n;e[0]!==t.id||e[1]!==t.slug?(n={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=n):n=e[2];const r=y(n),o=p();let s;e[3]!==r?(s=async u=>{const a=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:u}});return f(a,"Failed to delete API key")},e[3]=r,e[4]=s):s=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==i?(l={mutationFn:s,onSuccess:i},e[8]=s,e[9]=i,e[10]=l):l=e[10],I(l)}export{S as a,_ as b,P as u};
@@ -1 +1 @@
1
- import{c as U,H as q,ac as I,K as T,o as Q,p as x,e as y,t as m}from"./index-66BUlUCq.js";import{u as z}from"./use-mcp-client-DPpSkRNd.js";import{S as H}from"./constants-dLUUoWH7.js";function J(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??H;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=z(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(J)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function it(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=I(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let p;t[13]!==s?(p=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=p):p=t[14];let A;t[15]!==i||t[16]!==o?(A=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=A):A=t[17];let G;t[18]!==p||t[19]!==A?(G={mutationFn:p,onSuccess:A,onError:W},t[18]=p,t[19]=A,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:B},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:Y,onError:V},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function V(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function Y(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function B(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
1
+ import{c as U,H as q,ac as I,K as T,o as Q,p as x,e as y,t as m}from"./index-ZtSDBa1M.js";import{u as z}from"./use-mcp-client-4vfKAZII.js";import{S as H}from"./constants-dLUUoWH7.js";function J(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??H;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=z(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(J)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function it(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=I(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let p;t[13]!==s?(p=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=p):p=t[14];let A;t[15]!==i||t[16]!==o?(A=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=A):A=t[17];let G;t[18]!==p||t[19]!==A?(G={mutationFn:p,onSuccess:A,onError:W},t[18]=p,t[19]=A,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:B},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:Y,onError:V},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function V(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function Y(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function B(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
@@ -1 +1 @@
1
- import{c as T,r as o}from"./index-66BUlUCq.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
1
+ import{c as T,r as o}from"./index-ZtSDBa1M.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
@@ -0,0 +1 @@
1
+ import{c as O,b as L,j as t,C as Gt,av as Qt,B as te,r as R,bu as Wt,d as ot,w as Xt,n as q,a as re,t as H,y as Yt,k as Ie,a5 as xt,M as jt,q as E,_ as vt,Z as bt,Y as Jt,H as ne,f as it,u as at,a8 as Ce,a9 as ye,ab as Ne,L as Zt,G as en,aw as tn,ax as nn,R as sn,I as on,K as Ae,p as an,ac as ln,o as ke}from"./index-ZtSDBa1M.js";import{i as cn}from"./ChevronRight-PA4SrDe8.js";import{aG as rn,Q as dn,A as Ct,L as un,s as Ze}from"./agent-icon-BWc_2R02.js";import{t as yt}from"./ChevronDown-lhRoz8ve.js";import{a as lt,i as mn,d as fn,S as Nt,W as gn,C as wt,g as hn}from"./constants-dLUUoWH7.js";import{u as _t,a as pn}from"./use-virtual-mcp-B6Y0d6n-.js";import{a as Re,b as St,P as Dt}from"./popover-Dac8KJD5.js";import{i as Ve}from"./Check-B-T1OdyM.js";import{s as we}from"./Plus-B-dc60nq.js";import{i as kt}from"./SearchMd-BkU5uvZ3.js";import{s as It}from"./XClose-CF46faeu.js";import{C as xn,d as ut}from"./self-tool-result-xpNWJZXF.js";import{T as At}from"./toolbar-H9jBvos0.js";import{D as Tt,a as Pt,b as Ot,c as jn,e as vn,f as bn,g as Cn}from"./drawer-BXgwQk-w.js";import{G as yn}from"./github-icon-Dz4xNzgo.js";import{G as Nn}from"./github-repo-picker-BziyF4os.js";import{g as wn,a as _n,u as zt}from"./hooks-RMH7Z-XL.js";import{u as Sn,g as Dn,a as kn,b as In}from"./use-navigate-to-agent-B7O4mdOp.js";import{g as An,a as Mt}from"./agent-capabilities-B52k7xCe.js";import{u as $t}from"./shell-layout-C_ZyBlX2.js";import{f as Tn}from"./reusable-new-chat-CzvRy4Pe.js";import{d as Pn}from"./session-runtime-wVXsCwcJ.js";import{C as On}from"./collection-search-BBBLCvXm.js";import{g as zn,a as Mn,b as $n,e as Fn}from"./extract-connection-data-BLs-F9MR.js";import{u as Ft,a as Lt,g as Ln,C as et}from"./connection-card-Cr01Ig2w.js";import{e as Bt,d as Et,a as Rt,b as Vt,h as Bn,c as En}from"./dialog-DROTnc8B.js";import{d as X,a as Y,e as J,b as Z,c as ee,F as mt}from"./form-Cedy9Kwp.js";import{I as ce}from"./input-DF-XKSRq.js";import{S as Rn,a as Vn,b as Hn,c as Un,d as De}from"./select-DbwWg8mr.js";import{T as qn}from"./textarea-Dak8L16r.js";import{b as Ht}from"./use-connection-CC36uLn5.js";import{n as Ee,i as tt}from"./Tool02-FNZ9nQDs.js";import{b as Kn}from"./UserSquare-CZDBDZu6.js";import{c as Gn,i as Le,a as ft,E as Qn,p as Wn,b as Xn,d as Yn}from"./connection-form-helpers-BBbhpert.js";import{a as nt}from"./authenticate-and-persist-oauth-DI4W2xjU.js";import{g as Jn}from"./connection-slug-eyAPH6o3.js";import{C as Zn}from"./collection-tabs-BhNVbQRQ.js";import{u as gt}from"./use-infinite-scroll-Dh44_qVU.js";import{B as Be}from"./badge-QK4_b8m3.js";import{u as es}from"./useSuspenseInfiniteQuery-CV0LhXLD.js";import{u as ts,m as ht}from"./use-mcp-client-4vfKAZII.js";import{g as He}from"./metadata-dUsYcpuu.js";import{u as ns}from"./use-ai-providers-D88F4M9N.js";import{f as ss}from"./tab-id-9f5Elcwo.js";const os="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function is(){const n=O.c(13),e=L();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:os,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let r;n[6]!==e?(r=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=r):r=n[7];let c;n[8]!==r?(c=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:r})]}),n[8]=r,n[9]=c):c=n[9];let l;return n[10]!==a||n[11]!==c?(l=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,c]}),n[10]=a,n[11]=c,n[12]=l):l=n[12],l}function as(){const n=O.c(19),e=L();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:rn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Gt,label:a},n[6]=a,n[7]=i):i=n[7];let r;n[8]!==e?(r=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=r):r=n[9];let c;n[10]!==r?(c={Icon:dn,label:r},n[10]=r,n[11]=c):c=n[11];let l;n[12]!==o||n[13]!==i||n[14]!==c?(l=[o,i,c],n[12]=o,n[13]=i,n[14]=c,n[15]=l):l=n[15];const u=l;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(ls)})]}),n[17]=u,n[18]=f):f=n[18],f}function ls(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function Vo(n){const e=O.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,r=L(),c=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let l;e[0]!==a||e[1]!==r?(l=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":r("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Qt,{size:18})}),e[0]=a,e[1]=r,e[2]=l):l=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==c||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(cn,{size:16,className:"shrink-0 text-foreground/25"}),c&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:c,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=c,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let g;e[10]!==o?(g=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=g):g=e[11];let C;e[12]!==i||e[13]!==d||e[14]!==g?(C=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,g]}),e[12]=i,e[13]=d,e[14]=g,e[15]=C):C=e[15];let x,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),h=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=x,e[17]=h):(x=e[16],h=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[x,h,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(is,{}),t.jsx("div",{className:"flex-1"}),t.jsx(as,{})]})]}),e[18]=p):p=e[18];let v;return e[19]!==l||e[20]!==C?(v=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[l,C,p]}),e[19]=l,e[20]=C,e[21]=v):v=e[21],v}function Ho(n){const e=O.c(5),{ready:s,pending:o,label:a,onClick:i,children:r}=n,c=o||!s,l=s&&!o?r:null;let u;return e[0]!==a||e[1]!==i||e[2]!==c||e[3]!==l?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:c,children:[a,l]}),e[0]=a,e[1]=i,e[2]=c,e[3]=l,e[4]=u):u=e[4],u}function Ut(){const n=R.useContext(Wt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function cs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ct(n){const e=O.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",r=a==="xs"?"text-[9px]":"text-xs";let c;e[0]!==i?(c=q(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=c):c=e[1];let l;e[2]!==s.logo||e[3]!==s.name?(l=s.logo?void 0:cs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=l):l=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:q("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=u):u=e[8];let m;return e[9]!==c||e[10]!==l||e[11]!==u?(m=t.jsx("div",{className:c,style:l,children:u}),e[9]=c,e[10]=l,e[11]=u,e[12]=m):m=e[12],m}function rs({invitation:n,onChanged:e}){const s=L(),[o,a]=R.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{a(!0);try{const u=await re.organization.acceptInvitation({invitationId:n.id});if(u.error){H.error(u.error.message),a(!1);return}}catch{H.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}H.success(s("header.orgSwitcher.joined",{name:i})),Yt();let l;try{l=(await re.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=l?`/${l}`:"/"},c=async()=>{a(!0);try{const l=await re.organization.rejectInvitation({invitationId:n.id});if(l.error){H.error(l.error.message),a(!1);return}H.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{H.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(ct,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:c,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(It,{size:14})})]})]})}function ds(n){const e=O.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=L(),{data:r}=Xt(),{invitations:c,refetch:l}=Ut();let u;e[0]!==s?(u=(I,T)=>I.slug===s?-1:T.slug===s?1:I.name.localeCompare(T.name),e[0]=s,e[1]=u):u=e[1];const m=[...r??[]].sort(u),[f,d]=R.useState(""),g=f.toLowerCase(),C=g?m.filter(I=>I.name.toLowerCase().includes(g)||I.slug.toLowerCase().includes(g)):m;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(kt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=I=>d(I.target.value),e[3]=h):h=e[3];let p;e[4]!==f?(p=I=>I.key==="Escape"&&f&&d(""),e[4]=f,e[5]=p):p=e[5];let v;e[6]!==i?(v=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=v):v=e[7];let b;e[8]!==f||e[9]!==p||e[10]!==v?(b=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:h,onKeyDown:p,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=p,e[10]=v,e[11]=b):b=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(we,{size:16}),e[12]=N):N=e[12];let S;e[13]!==a?(S=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:N}),e[13]=a,e[14]=S):S=e[14];let k;e[15]!==b||e[16]!==S?(k=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,b,S]}),e[15]=b,e[16]=S,e[17]=k):k=e[17];const z="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let j;e[18]!==c||e[19]!==f||e[20]!==l?(j=!f&&c.map(I=>t.jsx(rs,{invitation:I,onChanged:l},I.id)),e[18]=c,e[19]=f,e[20]=l,e[21]=j):j=e[21];const D=C.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let A;e[22]!==o||e[23]!==s?(A=I=>t.jsxs("button",{type:"button",onClick:()=>o(I.slug),className:q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",I.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(ct,{org:I,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.slug})]}),I.slug===s&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},I.id),e[22]=o,e[23]=s,e[24]=A):A=e[24];const w=C.map(A);let y;e[25]!==j||e[26]!==D||e[27]!==w?(y=t.jsxs("div",{className:z,children:[j,D,w]}),e[25]=j,e[26]=D,e[27]=w,e[28]=y):y=e[28];let P;return e[29]!==y||e[30]!==k?(P=t.jsxs(t.Fragment,{children:[k,y]}),e[29]=y,e[30]=k,e[31]=P):P=e[31],P}function us(n){const e=O.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,r=a===void 0?"start":a,c=i===void 0?"bottom":i,l=ot(),[u,m]=R.useState(!1),[f,d]=R.useState(!1);let g;e[0]!==s?(g=t.jsx(Re,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const C=String(u);let x;e[2]!==l?(x=k=>{m(!1),l({to:"/$org",params:{org:k}})},e[2]=l,e[3]=x):x=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m(!1),d(!0)},e[4]=h):h=e[4];let p;e[5]!==o||e[6]!==C||e[7]!==x?(p=t.jsx(ds,{orgParam:o,onSelectOrg:x,onCreateOrg:h},C),e[5]=o,e[6]=C,e[7]=x,e[8]=p):p=e[8];let v;e[9]!==r||e[10]!==c||e[11]!==p?(v=t.jsx(St,{side:c,align:r,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:fs,onCloseAutoFocus:ms,children:p}),e[9]=r,e[10]=c,e[11]=p,e[12]=v):v=e[12];let b;e[13]!==u||e[14]!==g||e[15]!==v?(b=t.jsxs(Dt,{open:u,onOpenChange:m,children:[g,v]}),e[13]=u,e[14]=g,e[15]=v,e[16]=b):b=e[16];let N;e[17]!==f?(N=t.jsx(xn,{open:f,onOpenChange:d}),e[17]=f,e[18]=N):N=e[18];let S;return e[19]!==N||e[20]!==b?(S=t.jsxs(t.Fragment,{children:[b,N]}),e[19]=N,e[20]=b,e[21]=S):S=e[21],S}function ms(n){return n.preventDefault()}function fs(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function gs(n){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:r,isSearching:c,disabled:l}=n,u=a===void 0?"Search...":a;let m;e[0]!==r?(m=q("shrink-0 w-full border-b border-border h-12",r),e[0]=r,e[1]=m):m=e[1];const f=l?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=q("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let g;e[4]!==c?(g=c?t.jsx(Ie,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=g):g=e[5];let C;e[6]!==o?(C=v=>o(v.target.value),e[6]=o,e[7]=C):C=e[7];let x;e[8]!==l||e[9]!==i||e[10]!==u||e[11]!==C||e[12]!==s?(x=t.jsx("input",{type:"text",value:s,onChange:C,onKeyDown:i,placeholder:u,disabled:l,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=l,e[9]=i,e[10]=u,e[11]=C,e[12]=s,e[13]=x):x=e[13];let h;e[14]!==d||e[15]!==g||e[16]!==x?(h=t.jsxs("label",{className:d,children:[g,x]}),e[14]=d,e[15]=g,e[16]=x,e[17]=h):h=e[17];let p;return e[18]!==m||e[19]!==h?(p=t.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=p):p=e[20],p}function hs(n,e,s){if(!s)return null;const o=wn(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function ps(n){const e=O.c(6),{value:s,onChange:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let r;return e[2]!==o||e[3]!==i||e[4]!==s?(r=t.jsx(gs,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=r):r=e[5],r}function xs(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function js(n){const e=O.c(10),{org:s,onClose:o}=n,a=L();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let r;e[2]!==o?(r=()=>o(),e[2]=o,e[3]=r):r=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==i||e[7]!==r||e[8]!==c?(l=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Zt,{to:"/$org/settings/agents",params:i,onClick:r,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=i,e[7]=r,e[8]=c,e[9]=l):l=e[9],l}function vs(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(qt,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function bs(n){const e=O.c(11),{onImportFromGithub:s}=n,o=L();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(yn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let r;e[3]!==s||e[4]!==i?(r=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let l;return e[8]!==r||e[9]!==c?(l=t.jsx(qt,{action:r,children:c}),e[8]=r,e[9]=c,e[10]=l):l=e[10],l}function Cs(n){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==o?(r=q(o),e[2]=o,e[3]=r):r=e[3];let c;e[4]!==s?(c=()=>{E("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[6]=l):l=e[6];let u;return e[7]!==i||e[8]!==r||e[9]!==c?(u=t.jsx(At,{"aria-label":i,className:r,onClick:c,children:l}),e[7]=i,e[8]=r,e[9]=c,e[10]=u):u=e[10],u}function ys(n){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let r;e[0]!==o||e[1]!==i?(r=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=r):r=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==s?(l=()=>{E("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=l):l=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==r||e[13]!==c||e[14]!==l||e[15]!==f?(d=t.jsx(vt,{children:t.jsxs(bt,{tooltip:r,className:c,onClick:l,children:[u,f]})}),e[12]=r,e[13]=c,e[14]=l,e[15]=f,e[16]=d):d=e[16],d}function Ns(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ot,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function ws(n){const e=O.c(8),{emptyCtaClass:s}=n,o=L();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=q(s),e[2]=s,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{className:"size-4"}),e[4]=r):r=e[4];let c;return e[5]!==a||e[6]!==i?(c=t.jsx(At,{"aria-label":a,className:i,children:r}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function _s(n){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let r;e[0]!==o||e[1]!==i?(r=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=r):r=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{}),e[5]=l):l=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==r||e[11]!==c||e[12]!==m?(f=t.jsx(Re,{asChild:!0,children:t.jsxs(bt,{tooltip:r,className:c,children:[l,m]})}),e[10]=r,e[11]=c,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let g;return e[17]!==d?(g=t.jsx(vt,{children:d}),e[17]=d,e[18]=g):g=e[18],g}function Ss(n){const e=O.c(9),{children:s}=n,o=L();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==i?(r=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=r):r=e[5];let c;return e[6]!==a||e[7]!==r?(c=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,r]}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function Ds(n){const e=ot(),{create:s}=_n(),{locator:o}=ne(),a=it({strict:!1}),i=at({strict:!1});return async r=>{const c=crypto.randomUUID(),l=r===i.virtualmcpid?hs(n,o,a.taskId??""):null;try{await s({id:c,virtual_mcp_id:r,...l?{branch:l}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:c},search:{virtualmcpid:r}})}}function st(n){const e=O.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let r;e[0]!==i?(r=q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=r):r=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(Ct,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let l;e[5]!==s.title?(l=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=l):l=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==l||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,u]}),e[9]=l,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==r||e[16]!==c||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:r,children:[c,m,f]}),e[14]=a,e[15]=r,e[16]=c,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function qt(n){const e=O.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function ks(n){const e=O.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[r,c]=R.useState(""),l=_t(),u=l??[],{org:m}=ne(),{data:f}=re.useSession(),d=f?.user?.id??"anon",g=Dn(l),C=kn(),x=Ds(m.slug),h=An(l),p=r.toLowerCase(),v=u.filter(Ps).filter(F=>!h.has(F.id)).filter(Ts).filter(F=>!r||F.title.toLowerCase().includes(p)),b=v.filter(As),N=v.filter(Is),S=lt(m.id),k=!r||S.title.toLowerCase().includes(p),z=!!(o&&k);let j;e[0]!==s||e[1]!==o?(j=()=>{o?.(null),s(),c("")},e[0]=s,e[1]=o,e[2]=j):j=e[2];const D=j,A=F=>{if(o){o(F.id),s(),c("");return}In({orgId:m.id,userId:d},F.id,g),C(),s(),c(""),x(F.id)},w="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==r?(y=t.jsx(ps,{value:r,onChange:c}),e[3]=r,e[4]=y):y=e[4];const P="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",I=o&&k&&S&&t.jsx(st,{agent:S,selected:!a||a===S.id,onClick:D}),T=(b.length>0||!r)&&t.jsx(bs,{onImportFromGithub:i}),M=b.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>A(F)},F.id)),V=N.length>0&&t.jsx(vs,{}),Q=N.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>A(F)},F.id));let B;e[5]!==z||e[6]!==r||e[7]!==v.length?(B=v.length===0&&!z&&r&&t.jsx(xs,{}),e[5]=z,e[6]=r,e[7]=v.length,e[8]=B):B=e[8];let se;e[9]!==B||e[10]!==I||e[11]!==T||e[12]!==M||e[13]!==V||e[14]!==Q?(se=t.jsxs("div",{className:P,children:[I,T,M,V,Q,B]}),e[9]=B,e[10]=I,e[11]=T,e[12]=M,e[13]=V,e[14]=Q,e[15]=se):se=e[15];let K;e[16]!==s||e[17]!==m?(K=t.jsx(js,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=K):K=e[18];let de;return e[19]!==se||e[20]!==K||e[21]!==y?(de=t.jsxs("div",{className:w,children:[y,se,K]}),e[19]=se,e[20]=K,e[21]=y,e[22]=de):de=e[22],de}function Is(n){return!Mt(n.metadata)}function As(n){return Mt(n.metadata)}function Ts(n){return!fn(n.id)}function Ps(n){return!mn(n.id)}function Os(n){const e=O.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:r,side:c,align:l}=s,u=o===void 0?!1:o,m=c===void 0?"right":c,f=l===void 0?"start":l,[d,g]=R.useState(!1),[C,x]=R.useState(!1),h=xt(),{setOpenMobile:p}=jt(),v=Sn(),b=v?"border border-border":void 0;let N;e[2]!==v?(N=T=>v?t.jsx(Ss,{children:T}):T,e[2]=v,e[3]=N):N=e[3];const S=N;let k;e[4]!==h||e[5]!==p?(k=()=>{g(!1),h&&p(!1)},e[4]=h,e[5]=p,e[6]=k):k=e[6];const z=k;let j;e[7]!==z?(j=()=>{z(),x(!0)},e[7]=z,e[8]=j):j=e[8];const D=j;let A;e[9]!==z||e[10]!==D||e[11]!==i||e[12]!==d||e[13]!==r?(A=d&&t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Jt,{className:"h-4 w-24"})}),children:t.jsx(ks,{onClose:z,onSelectAgent:i,selectedAgentId:r,onImportFromGithub:D})}),e[9]=z,e[10]=D,e[11]=i,e[12]=d,e[13]=r,e[14]=A):A=e[14];const w=A;let y;e[15]!==f||e[16]!==u||e[17]!==b||e[18]!==v||e[19]!==h||e[20]!==d||e[21]!==w||e[22]!==m||e[23]!==a||e[24]!==S?(y=h?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:a}):u?S(t.jsx(Cs,{setOpen:g,emptyCtaClass:b})):t.jsx(ys,{setOpen:g,highlightEmpty:v,emptyCtaClass:b}),t.jsx(Tt,{open:d,onOpenChange:g,direction:"bottom",children:t.jsxs(Pt,{className:"max-h-[85dvh] p-0",children:[t.jsx(Ns,{}),w]})})]}):t.jsxs(Dt,{open:d,onOpenChange:T=>{T&&!d&&E("agent_browser_opened",{surface:"desktop_popover"}),g(T)},children:[a?t.jsx(Re,{asChild:!0,children:a}):u?S(t.jsx(Re,{asChild:!0,children:t.jsx(ws,{emptyCtaClass:b})})):t.jsx(_s,{wrapEmptyHint:S,highlightEmpty:v,emptyCtaClass:b}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:w})]}),e[15]=f,e[16]=u,e[17]=b,e[18]=v,e[19]=h,e[20]=d,e[21]=w,e[22]=m,e[23]=a,e[24]=S,e[25]=y):y=e[25];let P;e[26]!==C?(P=t.jsx(Nn,{open:C,onOpenChange:x,mode:"agent"}),e[26]=C,e[27]=P):P=e[27];let I;return e[28]!==P||e[29]!==y?(I=t.jsxs(t.Fragment,{children:[y,P]}),e[28]=P,e[29]=y,e[30]=I):I=e[30],I}function zs(){const n=O.c(2),e=_t()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?Pn(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Ms="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function $s(n){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,r=L(),c=pn(s)??o??null;let l,u,m,f,d;e[0]!==c?.title||e[1]!==a||e[2]!==r?(d=c?.title??r("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",l="button",u=a,m=r("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=r,e[3]=l,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(l=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const g=c?.icon??null;let C;e[8]!==g||e[9]!==d?(C=t.jsx(Ct,{icon:g,name:d,size:"xs"}),e[8]=g,e[9]=d,e[10]=C):C=e[10];let x;e[11]!==l||e[12]!==u||e[13]!==m||e[14]!==C?(x=t.jsx("button",{type:l,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:C}),e[11]=l,e[12]=u,e[13]=m,e[14]=C,e[15]=x):x=e[15];let h;e[16]!==d?(h=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=h):h=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(yt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=p):p=e[18];let v;e[19]!==h?(v=t.jsxs("button",{type:"button",className:Ms,children:[h,p]}),e[19]=h,e[20]=v):v=e[20];let b;e[21]!==s||e[22]!==i||e[23]!==v?(b=t.jsx(Os,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:v}),e[21]=s,e[22]=i,e[23]=v,e[24]=b):b=e[24];let N;return e[25]!==b||e[26]!==f||e[27]!==x?(N=t.jsxs("div",{className:f,children:[x,b]}),e[25]=b,e[26]=f,e[27]=x,e[28]=N):N=e[28],N}function Uo(n){const e=O.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=L(),{org:i}=ne(),{state:r,isMobile:c}=jt(),l=Ut().invitations.length>0,u=r==="collapsed"||c;let m;e[2]!==l||e[3]!==i.name||e[4]!==a?(m=l?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=l,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(ct,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==l||e[9]!==u?(d=l&&t.jsx("span",{className:q("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=l,e[9]=u,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==d?(g=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=g):g=e[13];let C;e[14]!==i.name||e[15]!==o?(C=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=C):C=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(yt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=x):x=e[17];let h;e[18]!==m||e[19]!==g||e[20]!==C?(h=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,C,x]})}),e[18]=m,e[19]=g,e[20]=C,e[21]=h):h=e[21];let p;e[22]!==i.slug||e[23]!==h?(p=t.jsx(us,{orgParam:i.slug,trigger:h}),e[22]=i.slug,e[23]=h,e[24]=p):p=e[24];let v;e[25]!==i.name?(v=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=v):v=e[26];let b;return e[27]!==v||e[28]!==p?(b=t.jsxs(Ne,{children:[p,v]}),e[27]=v,e[28]=p,e[29]=b):b=e[29],b}function qo(n){const e=O.c(23);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=ne();let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[2]=i):i=e[2];const r=it(i);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[3]=c):c=e[3];const l=at(c),{threads:u}=zt(),{data:m}=re.useSession(),{setTaskId:f,createNewTask:d}=$t(),g=zs();let C;e[4]!==a.id?(C=lt(a.id),e[4]=a.id,e[5]=C):C=e[5];const x=C,h=x.id,p=r.taskId?l.virtualmcpid??h:h;let v;e[6]!==d||e[7]!==h||e[8]!==o||e[9]!==g||e[10]!==m?.user?.id||e[11]!==f||e[12]!==u?(v=j=>{const D=j??h,A=Tn(u,D,m?.user?.id,g(D));A?f(A.id,D):d(D),o?.()},e[6]=d,e[7]=h,e[8]=o,e[9]=g,e[10]=m?.user?.id,e[11]=f,e[12]=u,e[13]=v):v=e[13];const b=v;let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[14]=N):N=e[14];const S=p===h?x:void 0;let k;e[15]!==p||e[16]!==b?(k=()=>b(p),e[15]=p,e[16]=b,e[17]=k):k=e[17];let z;return e[18]!==p||e[19]!==b||e[20]!==S||e[21]!==k?(z=t.jsx(R.Suspense,{fallback:N,children:t.jsx($s,{agentId:p,fallback:S,onOpenHome:k,onPick:b})}),e[18]=p,e[19]=b,e[20]=S,e[21]=k,e[22]=z):z=e[22],z}function Ko(){const n=O.c(24),e=L(),{org:s}=ne();let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},n[0]=o):o=n[0];const a=it(o);let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},n[1]=i):i=n[1];const r=at(i),{threads:c}=zt(),{createNewTask:l}=$t();let u;n[2]!==s.id?(u=lt(s.id),n[2]=s.id,n[3]=u):u=n[3];const m=u.id,f=a.taskId?r.virtualmcpid??m:m;let d;n[4]!==a.taskId||n[5]!==c?(d=(a.taskId?c.find(k=>k.id===a.taskId)?.branch:null)??null,n[4]=a.taskId,n[5]=c,n[6]=d):d=n[6];const g=d;let C;n[7]!==f||n[8]!==l||n[9]!==g?(C=()=>{l(f,g)},n[7]=f,n[8]=l,n[9]=g,n[10]=C):C=n[10];const x=C;let h;n[11]!==e?(h=e("sidebar.taskGroupsList.newChat"),n[11]=e,n[12]=h):h=n[12];let p;n[13]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(un,{size:16}),n[13]=p):p=n[13];let v;n[14]!==x||n[15]!==h?(v=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:x,"aria-label":h,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:p})}),n[14]=x,n[15]=h,n[16]=v):v=n[16];let b;n[17]!==e?(b=e("sidebar.taskGroupsList.newChat"),n[17]=e,n[18]=b):b=n[18];let N;n[19]!==b?(N=t.jsx(ye,{side:"bottom",children:b}),n[19]=b,n[20]=N):N=n[20];let S;return n[21]!==v||n[22]!==N?(S=t.jsxs(Ne,{children:[v,N]}),n[21]=v,n[22]=N,n[23]=S):S=n[23],S}function Fs({open:n,onOpenChange:e,onCreated:s}){const o=L(),{org:a}=ne(),{data:i}=re.useSession(),{stdioEnabled:r}=en(),c=xt(),l=Ht(),u=Ft(),f=Lt(u,"").items,d=tn({resolver:nn(Gn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),C=d.watch("connection_url"),x=d.watch("npx_package"),h=Le({uiType:g,connectionUrl:C??"",npxPackage:x??""})??ft({uiType:g,connectionUrl:C??"",registryItems:f}),p=j=>{const D=j.trim();if(!D)return;const A=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,P=T=>{if(T&&(!A&&!d.getValues("title").trim()&&T.title&&d.setValue("title",T.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&T.description&&d.setValue("description",T.description,{shouldDirty:!1}),!y&&T.envVarKeys?.length)){const M=d.getValues("env_vars")??[],V=new Set(M.map(B=>B.key)),Q=T.envVarKeys.filter(B=>!V.has(B));Q.length>0&&d.setValue("env_vars",[...M,...Q.map(B=>({key:B,value:""}))],{shouldDirty:!0})}},I=Wn(D);if(I&&r){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",I.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),P(Le({uiType:"NPX",npxPackage:I.packageName}));return}if(D.startsWith("http://")||D.startsWith("https://")){const T=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",T,{shouldDirty:!0}),d.setValue("connection_url",D,{shouldDirty:!0}),P(Le({uiType:T,connectionUrl:D})??ft({uiType:T,connectionUrl:D,registryItems:f}));return}g==="NPX"&&P(Le({uiType:"NPX",npxPackage:D}))},v=j=>{j||d.reset(),e(j)},b=async j=>{let D,A=null,w=null,y=null;j.ui_type==="NPX"?(D="STDIO",A="",y=Xn(j.npx_package||"",j.env_vars||[])):j.ui_type==="STDIO"?(D="STDIO",A="",y=Yn(j.stdio_command||"",j.stdio_args||"",j.stdio_cwd,j.env_vars||[])):(D=j.ui_type,A=j.connection_url||"",w=j.connection_token||null);const P=zn("conn");try{await l.create.mutateAsync({id:P,title:j.title,description:j.description||null,connection_type:D,connection_url:A,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:j.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(P)}catch{H.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},N=o("connections.createConnectionDialog.title"),S=o("connections.createConnectionDialog.description"),k=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),z=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(X,{control:d.control,name:"ui_type",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(Rn,{value:j.value,onValueChange:j.onChange,children:[t.jsx(Z,{children:t.jsx(Vn,{children:t.jsx(Hn,{})})}),t.jsxs(Un,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),r&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ee,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Kn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(X,{control:d.control,name:"npx_package",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...j,value:j.value??"",onPaste:D=>{const A=D.clipboardData.getData("text");A&&(D.preventDefault(),d.setValue("npx_package",A.trim(),{shouldDirty:!0}),p(A))},onBlur:D=>{p(D.target.value),j.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(X,{control:d.control,name:"stdio_command",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...j,value:j.value??""})}),t.jsx(ee,{})]})}),t.jsx(X,{control:d.control,name:"stdio_args",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...j,value:j.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(X,{control:d.control,name:"stdio_cwd",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...j,value:j.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(X,{control:d.control,name:"env_vars",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(Z,{children:t.jsx(Qn,{value:j.value??[],onChange:j.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(X,{control:d.control,name:"connection_url",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...j,value:j.value??"",onPaste:D=>{const A=D.clipboardData.getData("text");A&&(D.preventDefault(),d.setValue("connection_url",A.trim(),{shouldDirty:!0}),p(A))},onBlur:D=>{p(D.target.value),j.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(X,{control:d.control,name:"connection_token",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:h?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(Z,{children:t.jsx(ce,{type:"password",placeholder:h?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...j,value:j.value??""})}),h?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(X,{control:d.control,name:"title",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...j})}),t.jsx(ee,{})]})}),t.jsx(X,{control:d.control,name:"description",render:({field:j})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(Z,{children:t.jsx(qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...j,value:j.value??""})}),t.jsx(ee,{})]})})]});return c?t.jsx(Tt,{open:n,onOpenChange:v,children:t.jsxs(Pt,{className:"max-h-[90vh]",children:[t.jsx(jn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ot,{children:N}),t.jsx(vn,{className:"mt-1",children:S})]}),t.jsx(bn,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(It,{size:16})})})]})}),t.jsx(mt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(b),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:z}),t.jsx(Cn,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):t.jsx(Bt,{open:n,onOpenChange:v,children:t.jsxs(Et,{className:"sm:max-w-[525px]",children:[t.jsxs(Rt,{children:[t.jsx(Vt,{children:N}),t.jsx(Bn,{children:S})]}),t.jsx(mt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(b),children:[t.jsx("div",{className:"py-4",children:z}),t.jsxs(En,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function Ls(n){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:r,onConnectAndAdd:c,connectingItemId:l,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,g=s===void 0?"add":s,C=d===void 0?"connected":d,x=L(),{org:h}=ne(),p=R.useDeferredValue(u),v=u!==p;let b;e[0]!==p?(b=p.trim().toLowerCase(),e[0]=p,e[1]=b):b=e[1];const N=b;let S;e[2]!==C?(S=_=>_??C,e[2]=C,e[3]=S):S=e[3];const[k,z]=sn(on.connectionsTab(h.slug)+(C==="all"?":home-modal":":agent-modal"),S);let j;e[4]!==k||e[5]!==z?(j=_=>{_!==k&&E("connections_dialog_tab_changed",{to_tab:_}),z(_)},e[4]=k,e[5]=z,e[6]=j):j=e[6];const D=j;let A;e[7]!==h.id||e[8]!==h.slug?(A={connectionId:Nt,orgId:h.id,orgSlug:h.slug},e[7]=h.id,e[8]=h.slug,e[9]=A):A=e[9];const w=ts(A),y=p?.trim().split(/\s+/).filter(Boolean)??[],P=y.length>0?{operator:"or",conditions:y.flatMap(Ks)}:void 0,I={...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(I),{data:M,fetchNextPage:V,hasNextPage:Q,isFetchingNextPage:B}=es({queryKey:Ae.collectionListInfinite(w,h.id,"","CONNECTIONS",T),queryFn:async _=>{const{pageParam:$}=_,oe=$===void 0?0:$;return(await w.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:oe}})).structuredContent},initialPageParam:0,getNextPageParam:Us,staleTime:3e4}),se=M?.pages.flatMap(Hs)??[],K=Ln(se),de=new Set(se.filter(Vs).map(Rs)),F=Ft(),ie=Lt(F,p),Ue=gt(ie.loadMore,ie.hasMore,ie.isLoadingMore),qe=gt(V,Q??!1,B),G=k==="all"||!!N,rt=G?ie.items.filter(_=>{const $=Mn(_);if($&&de.has($))return!1;if(!N)return!0;const oe=He(_._meta),ae=[_.title,_.description,_.name,_.server?.title,_.server?.description,_.server?.name,oe?.friendly_name,oe?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(W=>ae.includes(W.toLowerCase()))}):[],_e=rt.filter(Es),Se=rt.filter(Bs);let Te;e[10]!==a?(Te=_=>_.some($=>a.has($.id)),e[10]=a,e[11]=Te):Te=e[11];const Ke=Te;let Pe;e[12]!==a||e[13]!==o||e[14]!==l||e[15]!==Ke||e[16]!==g||e[17]!==i||e[18]!==f||e[19]!==r||e[20]!==x?(Pe=(_,$,oe,ae,W)=>{const Fe=Ke(W),be=W.find(le=>!a.has(le.id)),U=W[0];if(g==="browse"){const le=Jn(U);return t.jsx(et,{connection:{title:$,icon:oe,description:W.length>1?`${W.length} instances`:ae??void 0},fallbackIcon:t.jsx(Ee,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Be,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",x("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{E("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:W.length}),f?.(le)}},_)}return t.jsx(et,{connection:{title:$,icon:oe,description:ae},fallbackIcon:t.jsx(Ee,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Fe&&t.jsxs(Be,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",x("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:le=>{le.stopPropagation(),be?(E("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&E("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(E("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),r(U))},children:x("virtualMcp.connectionDialogContent.add")})]})},_)},e[12]=a,e[13]=o,e[14]=l,e[15]=Ke,e[16]=g,e[17]=i,e[18]=f,e[19]=r,e[20]=x,e[21]=Pe):Pe=e[21];const Oe=Pe;let ze;e[22]!==l||e[23]!==g||e[24]!==c||e[25]!==x?(ze=_=>{const $=He(_._meta),oe=$?.friendlyName||$?.friendly_name||_.server?.title||_.title||_.server?.name||_.name||_.id||"",ae=_.server?.description||_.description||null,W=_.server?.icons?.[0]?.src||$n(_.server?.repository)||null,Fe=$?.official===!0,be=$?.verified===!0,U=$?.owner==="deco";return t.jsx(et,{connection:{title:oe,description:ae,icon:W},fallbackIcon:t.jsx(Ee,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:x("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Fe&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Be,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Fe&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Be,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:le=>{le.stopPropagation(),E("connection_add_clicked",{action:"connect_new",registry_item_id:_.id,app_name:$?.friendlyName||_.server?.name||_.name||null}),c(_)},children:l===_.id?t.jsx(Ie,{size:14,className:"animate-spin"}):x(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${_.id}`)},e[22]=l,e[23]=g,e[24]=c,e[25]=x,e[26]=ze):ze=e[26];const dt=ze;let ue;e[27]!==k||e[28]!==D||e[29]!==m||e[30]!==N||e[31]!==x?(ue=!N&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(Zn,{tabs:[{id:"all",label:x("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:x("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:k,onTabChange:_=>D(_)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{E("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),x("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=k,e[28]=D,e[29]=m,e[30]=N,e[31]=x,e[32]=ue):ue=e[32];const Ge=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ge?(me=q("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[33]=Ge,e[34]=me):me=e[34];const Kt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Me;e[35]!==Oe?(Me=_=>{if(_.type==="group")return Oe(_.key,_.title,_.icon,null,_.connections);const $=_.connection;return Oe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Oe,e[36]=Me):Me=e[36];const Qe=K.map(Me);let fe;e[37]!==qe?(fe=t.jsx("div",{ref:qe,className:"col-span-full h-1"}),e[37]=qe,e[38]=fe):fe=e[38];let ge;e[39]!==B?(ge=B&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=B,e[40]=ge):ge=e[40];const We=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(tt,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Xe=G&&_e.map(dt),Ye=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Je=G&&Se.map(dt);let he;e[41]!==Ue||e[42]!==F||e[43]!==G?(he=G&&F.length>0&&t.jsx("div",{ref:Ue,className:"col-span-full h-1"}),e[41]=Ue,e[42]=F,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==Qe||e[49]!==fe||e[50]!==ge||e[51]!==We||e[52]!==Xe||e[53]!==Ye||e[54]!==Je||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:Kt,children:[Qe,fe,ge,We,Xe,Ye,Je,he,pe]}),e[48]=Qe,e[49]=fe,e[50]=ge,e[51]=We,e[52]=Xe,e[53]=Ye,e[54]=Je,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==k||e[59]!==K.length||e[60]!==Se||e[61]!==u||e[62]!==x||e[63]!==_e?(je=K.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?x("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):x(k==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=k,e[59]=K.length,e[60]=Se,e[61]=u,e[62]=x,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let $e;return e[69]!==ue||e[70]!==ve?($e=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=$e):$e=e[71],$e}function Bs(n){return!n.verified&&!He(n._meta)?.verified&&!n.meta?.verified}function Es(n){return n.verified||He(n._meta)?.verified||n.meta?.verified}function Rs(n){return n.app_name}function Vs(n){return n.app_name}function Hs(n){return n?.items??[]}function Us(n,e){if(n?.hasMore)return e.reduce(qs,0)}function qs(n,e){return n+(e?.items?.length??0)}function Ks(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Go({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=L(),r=a.mode??"add",c="agentId"in a?a.agentId:void 0,l="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:w=>{},m=(w,y,P)=>{c&&E("agent_connection_attached",{agent_id:c,connection_id:w,app_name:y,mode:P})},[f,d]=R.useState(null),[g,C]=R.useState(o),[x,h]=R.useState(!1),{org:p}=ne(),{data:v}=re.useSession(),b=Ht(),N=an(),S=ot(),k=w=>{e(!1),S({to:"/$org/settings/connections/$appSlug",params:{org:p.slug,appSlug:w}})},z=()=>{N.invalidateQueries({predicate:w=>{const y=w.queryKey;return y[1]===p.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},j=async(w,y)=>{E("connection_oauth_succeeded",{connection_id:w,flow:y});const P=new URL(`/api/${p.slug}/mcp/${w}`,window.location.origin);await N.invalidateQueries({queryKey:Ae.isMCPAuthenticated(P.href,null)}),z()},D=async w=>{d(w.app_name??w.id);try{const P=`${w.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,T=(await b.create.mutateAsync({title:P,description:w.description??null,connection_type:w.connection_type,connection_url:w.connection_url??null,connection_token:null,icon:w.icon??null,app_name:w.app_name??null,app_id:w.app_id??null,connection_headers:w.connection_headers??null})).id,M=await nt({connectionId:T,orgId:p.id,orgSlug:p.slug,persistFallback:V=>b.update.mutateAsync({id:T,data:{connection_token:V}}).then(()=>{})});if(M.ran&&!M.ok){E("connection_oauth_failed",{connection_id:T,flow:"clone",error:M.error??"no_token"}),H.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:M.error??"no token received"})),await b.delete.mutateAsync(T);return}M.ran&&await j(T,"clone"),m(T,w.app_name??null,"clone"),u(T)}catch(y){console.error("Failed to add connection:",y),H.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},A=async w=>{if(!(!p||!v?.user?.id)){d(w.id);try{const y=Fn(w,p.id,v.user.id,{remoteIndex:0}),P=y.connection_type==="STDIO",I=!!y.connection_url,T=P&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!T){H.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:M}=await b.create.mutateAsync(y),V=await nt({connectionId:M,orgId:p.id,orgSlug:p.slug,persistFallback:Q=>b.update.mutateAsync({id:M,data:{connection_token:Q}}).then(()=>{})});if(V.ran&&!V.ok){E("connection_oauth_failed",{connection_id:M,flow:"connect_new",error:V.error??"no_token"}),H.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:V.error??"no token received"})}),m(M,y.app_name??null,"new"),u(M);return}V.ran?(await j(M,"connect_new"),H.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):H.success(i("virtualMcp.addConnectionDialog.connected")),m(M,y.app_name??null,"new"),u(M)}catch(y){console.error("Failed to connect:",y),H.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(Bt,{open:n,onOpenChange:e,children:[t.jsxs(Et,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Rt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Vt,{className:"text-base font-semibold",children:i(r==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(On,{value:g,onChange:C,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ls,{mode:r,agentId:c,addedConnectionIds:l,onAdd:u,onCloneAndAdd:D,onConnectAndAdd:A,connectingItemId:f,search:g,onCreateConnection:()=>h(!0),onBrowseNavigate:k,defaultTab:s})})]}),t.jsx(Fs,{open:x,onOpenChange:h,onCreated:async w=>{h(!1);const y=await nt({connectionId:w,orgId:p.id,orgSlug:p.slug,persistFallback:P=>b.update.mutateAsync({id:w,data:{connection_token:P}}).then(()=>{})});if(y.ran&&!y.ok){E("connection_oauth_failed",{connection_id:w,flow:"custom_create",error:y.error??"no_token"}),H.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(w,null,"custom"),u(w),e(!1);return}y.ran&&await j(w,"custom_create"),m(w,null,"custom"),u(w),e(!1)}})]})}const pt=new Map;function Qo(){const{org:n}=ne(),e=ln(),s=ns(),o=s.find(h=>h.providerId==="deco"),{data:a,isLoading:i,refetch:r,isFetching:c}=ke({queryKey:Ae.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=a?.balanceCents??null,u=l!=null?l/100:null,m=R.useRef(new Map);if(l!=null){const h=pt.get(n.id);m.current.get(n.id)&&h!=null&&l>h&&E("credits_topped_up_detected",{organization_id:n.id,delta_cents:l-h,previous_balance_cents:h,new_balance_cents:l}),pt.set(n.id,l),m.current.set(n.id,!0)}const f=!!o,d=l!=null&&l>0,g=l!=null&&l===0,C=l!=null&&l===200,x=s.length>0&&s.every(h=>h.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:l,balanceDollars:u,hasCredits:d,isZeroBalance:g,isInitialFreeCredit:C,hasOnlyDecoProvider:x,isLoading:i,isFetching:c,refetch:r}}function Gs(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const Qs=2e4;function Ws(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Wo(){const n=O.c(19),{org:e}=ne(),s=gn.COMMERCE_DISCOVERY(e.id);let o;n[0]!==e.id||n[1]!==e.slug?(o=ht({connectionId:Nt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=o):o=n[2];const{data:a}=ke(o),i=ke({queryKey:Ae.commerceDiscoveryConnection(e.id,s),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const S=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return ut(S)}}),r=i.data?.item??null,{data:c}=ke({...ht({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),l=Ae.commerceDiscoveryDiagnostic(e.id,s),u=!!c;let m;n[3]!==c?(m=async()=>{if(!c)throw new Error("cdClient not ready");const S=await c.callTool({name:wt,arguments:{}});return ut(S).diagnostic??null},n[3]=c,n[4]=m):m=n[4];let f;n[5]!==l||n[6]!==u||n[7]!==m?(f={queryKey:l,enabled:u,retry:1,refetchInterval:Xs,queryFn:m},n[5]=l,n[6]=u,n[7]=m,n[8]=f):f=n[8];const d=ke(f),g=r?.metadata?.siteUrl,C=d.data??null,x=d.isSuccess,h=i.isPending||!!r&&d.isPending,p=typeof g=="string"&&g?g:null;let v;n[9]!==g?(v=Ws(g),n[9]=g,n[10]=v):v=n[10];const b=c??null;let N;return n[11]!==s||n[12]!==d.isSuccess||n[13]!==b||n[14]!==C||n[15]!==h||n[16]!==p||n[17]!==v?(N={diagnostic:C,isSuccess:x,isLoading:h,siteUrl:p,host:v,connectionId:s,cdClient:b},n[11]=s,n[12]=d.isSuccess,n[13]=b,n[14]=C,n[15]=h,n[16]=p,n[17]=v,n[18]=N):N=n[18],N}function Xs(n){return n.state.status!=="error"&&Gs(n.state.data)==="generating"?Qs:!1}function Xo(n,e){return{to:"/$org/$taskId",params:{org:n.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:hn(n.id),main:ss(e,wt)}}}export{qo as A,Vo as C,Ko as N,Uo as O,Ho as a,Go as b,Wo as c,zs as d,us as e,ct as f,Gs as g,Xo as h,Qo as u};
@@ -1 +1 @@
1
- import{c as f,H as C,bU as N,eP as O,bT as S}from"./index-66BUlUCq.js";import{u as I}from"./use-mcp-client-DPpSkRNd.js";import{S as m}from"./constants-dLUUoWH7.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function P(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function _(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{P as a,_ as b,E as u};
1
+ import{c as f,H as C,bU as N,eP as O,bT as S}from"./index-ZtSDBa1M.js";import{u as I}from"./use-mcp-client-4vfKAZII.js";import{S as m}from"./constants-dLUUoWH7.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function P(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function _(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{P as a,_ as b,E as u};
@@ -1 +1 @@
1
- import{c as i,r as n}from"./index-66BUlUCq.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
1
+ import{c as i,r as n}from"./index-ZtSDBa1M.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
@@ -1 +1 @@
1
- import{c as g}from"./index-66BUlUCq.js";import{b as f}from"./use-virtual-mcp-CE8tx9or.js";import{c as p}from"./use-navigate-to-agent-BDnGtSYT.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
1
+ import{c as g}from"./index-ZtSDBa1M.js";import{b as f}from"./use-virtual-mcp-B6Y0d6n-.js";import{c as p}from"./use-navigate-to-agent-B7O4mdOp.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
@@ -1 +1 @@
1
- import{r as u}from"./index-66BUlUCq.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
1
+ import{r as u}from"./index-ZtSDBa1M.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
@@ -1 +1 @@
1
- import{c as m,r as n}from"./index-66BUlUCq.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
1
+ import{c as m,r as n}from"./index-ZtSDBa1M.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
@@ -1 +1 @@
1
- import{r as s}from"./index-66BUlUCq.js";import{d as R,D as u}from"./decopilot-sse-pool-JfBMouUo.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
1
+ import{r as s}from"./index-ZtSDBa1M.js";import{d as R,D as u}from"./decopilot-sse-pool-BxpeMujQ.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
@@ -1 +1 @@
1
- import{c as oe,b as le,j as n,H as se,p as ie,ac as ce,r as re,t as Y,bR as ae,bS as de}from"./index-66BUlUCq.js";import{c as z,d as G,b as V,f as X,g as Z,e as ee,a as te,A as ne}from"./alert-dialog-C7gi43qw.js";function ge(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),k=s.mode==="deleting";let m;e[0]!==a?(m=W=>{W||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(z,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const w=s.mode==="deleting"&&s.connection.title;let o;e[8]!==w?(o=n.jsx("span",{className:"font-medium text-foreground",children:w}),e[8]=w,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(G,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let p;e[31]!==k||e[32]!==j||e[33]!==m?(p=n.jsx(ne,{open:k,onOpenChange:m,children:j}),e[31]=k,e[32]=j,e[33]=m,e[34]=p):p=e[34];const J=s.mode==="force-deleting";let N;e[35]!==a?(N=W=>{W||a()},e[35]=a,e[36]=N):N=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(z,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const M=s.mode==="force-deleting"&&s.connection.title;let S;e[43]!==M?(S=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[43]=M,e[44]=S):S=e[44];let v;e[45]!==t?(v=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=v):v=e[46];const P=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==P?(T=n.jsx("span",{className:"font-medium text-foreground",children:P}),e[47]=P,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==S||e[51]!==v||e[52]!==T?(A=n.jsxs("p",{children:[O," ",S," ",v," ",T,"."]}),e[49]=O,e[50]=S,e[51]=v,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let b;e[56]!==_?(b=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=b):b=e[57];let F;e[58]!==A||e[59]!==b?(F=n.jsx(G,{asChild:!0,children:n.jsxs("div",{children:[A,b]})}),e[58]=A,e[59]=b,e[60]=F):F=e[60];let I;e[61]!==y||e[62]!==F?(I=n.jsxs(V,{children:[y,F]}),e[61]=y,e[62]=F,e[63]=I):I=e[63];let L;e[64]!==t?(L=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=L):L=e[65];let R;e[66]!==L?(R=n.jsx(X,{children:L}),e[66]=L,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let H;e[73]!==R||e[74]!==U?(H=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=H):H=e[75];let K;e[76]!==I||e[77]!==H?(K=n.jsxs(te,{children:[I,H]}),e[76]=I,e[77]=H,e[78]=K):K=e[78];let $;e[79]!==J||e[80]!==N||e[81]!==K?($=n.jsx(ne,{open:J,onOpenChange:N,children:K}),e[79]=J,e[80]=N,e[81]=K,e[82]=$):$=e[82];let Q;return e[83]!==p||e[84]!==$?(Q=n.jsxs(n.Fragment,{children:[p,$]}),e[83]=p,e[84]=$,e[85]=Q):Q=e[85],Q}function ue({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=ce(),[d,c]=re.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},k=o=>{ae(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===de&&l.queryKey[3]===o})},m=o=>{t(),k(o),Y.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}Y.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);Y.error(`Failed to delete connection: ${i}`)}}}}export{ge as D,ue as u};
1
+ import{c as oe,b as le,j as n,H as se,p as ie,ac as ce,r as re,t as Y,bR as ae,bS as de}from"./index-ZtSDBa1M.js";import{c as z,d as G,b as V,f as X,g as Z,e as ee,a as te,A as ne}from"./alert-dialog-BGVZQi8t.js";function ge(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),k=s.mode==="deleting";let m;e[0]!==a?(m=W=>{W||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(z,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const w=s.mode==="deleting"&&s.connection.title;let o;e[8]!==w?(o=n.jsx("span",{className:"font-medium text-foreground",children:w}),e[8]=w,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(G,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let p;e[31]!==k||e[32]!==j||e[33]!==m?(p=n.jsx(ne,{open:k,onOpenChange:m,children:j}),e[31]=k,e[32]=j,e[33]=m,e[34]=p):p=e[34];const J=s.mode==="force-deleting";let N;e[35]!==a?(N=W=>{W||a()},e[35]=a,e[36]=N):N=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(z,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const M=s.mode==="force-deleting"&&s.connection.title;let S;e[43]!==M?(S=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[43]=M,e[44]=S):S=e[44];let v;e[45]!==t?(v=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=v):v=e[46];const P=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==P?(T=n.jsx("span",{className:"font-medium text-foreground",children:P}),e[47]=P,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==S||e[51]!==v||e[52]!==T?(A=n.jsxs("p",{children:[O," ",S," ",v," ",T,"."]}),e[49]=O,e[50]=S,e[51]=v,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let b;e[56]!==_?(b=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=b):b=e[57];let F;e[58]!==A||e[59]!==b?(F=n.jsx(G,{asChild:!0,children:n.jsxs("div",{children:[A,b]})}),e[58]=A,e[59]=b,e[60]=F):F=e[60];let I;e[61]!==y||e[62]!==F?(I=n.jsxs(V,{children:[y,F]}),e[61]=y,e[62]=F,e[63]=I):I=e[63];let L;e[64]!==t?(L=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=L):L=e[65];let R;e[66]!==L?(R=n.jsx(X,{children:L}),e[66]=L,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let H;e[73]!==R||e[74]!==U?(H=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=H):H=e[75];let K;e[76]!==I||e[77]!==H?(K=n.jsxs(te,{children:[I,H]}),e[76]=I,e[77]=H,e[78]=K):K=e[78];let $;e[79]!==J||e[80]!==N||e[81]!==K?($=n.jsx(ne,{open:J,onOpenChange:N,children:K}),e[79]=J,e[80]=N,e[81]=K,e[82]=$):$=e[82];let Q;return e[83]!==p||e[84]!==$?(Q=n.jsxs(n.Fragment,{children:[p,$]}),e[83]=p,e[84]=$,e[85]=Q):Q=e[85],Q}function ue({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=ce(),[d,c]=re.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},k=o=>{ae(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===de&&l.queryKey[3]===o})},m=o=>{t(),k(o),Y.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}Y.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);Y.error(`Failed to delete connection: ${i}`)}}}}export{ge as D,ue as u};
@@ -1 +1 @@
1
- import{c as s,o as m,K as c}from"./index-66BUlUCq.js";function l(){const e=s.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:c.deploymentAdminMe(),queryFn:d,staleTime:1/0,retry:2},e[0]=t):t=e[0];const{data:a,isLoading:i}=m(t),r=a==="admin",o=a==="unverified";let n;return e[1]!==i||e[2]!==r||e[3]!==o?(n={isAdmin:r,loading:i,needsEmailVerification:o},e[1]=i,e[2]=r,e[3]=o,e[4]=n):n=e[4],n}async function d(){const e=await fetch("/api/_admin/me",{credentials:"include"});if(e.status>=500)throw new Error(`admin/me request failed: ${e.status}`);return e.ok?"admin":(await e.json().catch(u)).error==="email_not_verified"?"unverified":"denied"}function u(){return{}}export{l as u};
1
+ import{c as s,o as m,K as c}from"./index-ZtSDBa1M.js";function l(){const e=s.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:c.deploymentAdminMe(),queryFn:d,staleTime:1/0,retry:2},e[0]=t):t=e[0];const{data:a,isLoading:i}=m(t),r=a==="admin",o=a==="unverified";let n;return e[1]!==i||e[2]!==r||e[3]!==o?(n={isAdmin:r,loading:i,needsEmailVerification:o},e[1]=i,e[2]=r,e[3]=o,e[4]=n):n=e[4],n}async function d(){const e=await fetch("/api/_admin/me",{credentials:"include"});if(e.status>=500)throw new Error(`admin/me request failed: ${e.status}`);return e.ok?"admin":(await e.json().catch(u)).error==="email_not_verified"?"unverified":"denied"}function u(){return{}}export{l as u};