decocms 4.397.1 → 4.398.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/dist/client/assets/{AlertCircle-DwYUjJBu.js → AlertCircle-BQBmepo1.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BhT_gWYN.js → AreaChart-Bnl86Bmb.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BrzmATFY.js → ArrowLeft-DHPtMbTg.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DYu8UyAE.js → ArrowRight-m94XgZ3O.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Bgr2TLsm.js → ArrowUp-DBDp30x0.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D3J9yYMj.js → CartesianChart-W8IwLG3F.js} +1 -1
  7. package/dist/client/assets/{Check-BgzQchyA.js → Check-Bcnv-H55.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DxLYuezp.js → CheckCircle-CySwUqst.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CEt2-KWf.js → ChevronUp-wyCoS3df.js} +1 -1
  10. package/dist/client/assets/{Copy01-DY06zeXh.js → Copy01-CMEvgxoC.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-atzqozkq.js → CreditCard01-Bi7YfG5v.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DY1WVLqG.js → DotsVertical-B97QY-fA.js} +1 -1
  13. package/dist/client/assets/{Download01-BsnTCWqr.js → Download01-DokiLBvz.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-q2DeMR5z.js → ErrorBarContext-CyEUeczg.js} +1 -1
  15. package/dist/client/assets/{Eye-BCLEOXNL.js → Eye-DlNsmazk.js} +1 -1
  16. package/dist/client/assets/{Globe04-C9YOUwUx.js → Globe04-CcTw2hMd.js} +1 -1
  17. package/dist/client/assets/{Image01-Dnl26WcB.js → Image01-CGox3JEN.js} +1 -1
  18. package/dist/client/assets/{Key01-CwoMWwVQ.js → Key01-MH27mIao.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-Bis2ERIL.js → LayoutLeft-CpKRfpdN.js} +1 -1
  20. package/dist/client/assets/{Line-BkS8r3Hh.js → Line-BldjxoIZ.js} +1 -1
  21. package/dist/client/assets/{Link01-1Ii-ZBB1.js → Link01-BcMSFUIJ.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CxPBcUve.js → LinkExternal01-3Lsw2Z8I.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DypnteF9.js → Monitor01-FNWg7-7u.js} +1 -1
  24. package/dist/client/assets/{Package-DLofDsnv.js → Package-ColnpoOk.js} +1 -1
  25. package/dist/client/assets/{Palette-DZw1jmn0.js → Palette-Bb9IRvVj.js} +1 -1
  26. package/dist/client/assets/{Plus-DJAmbMrJ.js → Plus-t4kIBGIE.js} +1 -1
  27. package/dist/client/assets/{SearchLg-0M2kccVO.js → SearchLg-DrU6iSmg.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BT8cdzsW.js → SearchMd-Y5wxql57.js} +1 -1
  29. package/dist/client/assets/{Sector-BJGxTbou.js → Sector-DfoxRE0A.js} +1 -1
  30. package/dist/client/assets/{Share07-BqFFQNeK.js → Share07-DxxTtQWb.js} +1 -1
  31. package/dist/client/assets/{Stars01-BFm8fGnC.js → Stars01-Dwmyh59Q.js} +1 -1
  32. package/dist/client/assets/{Sun-qCW4hQHf.js → Sun-mSxdzNTE.js} +1 -1
  33. package/dist/client/assets/{Tool01-BNu7BHqQ.js → Tool01-CaOf6Mu4.js} +1 -1
  34. package/dist/client/assets/{Trash01-CSeT8ZD8.js → Trash01-DHtEq5nA.js} +1 -1
  35. package/dist/client/assets/{Upload01-GlJ5Ud3s.js → Upload01--yrzZIir.js} +1 -1
  36. package/dist/client/assets/{User01-D0NPPWmZ.js → User01-Dn00_JAZ.js} +1 -1
  37. package/dist/client/assets/{UserSquare-B_QuMjVL.js → UserSquare-BfH7tTry.js} +1 -1
  38. package/dist/client/assets/{Users01-K81i8krS.js → Users01-BBUvRTwh.js} +1 -1
  39. package/dist/client/assets/{X-ClBxN2Lo.js → X-xX_XXXXt.js} +1 -1
  40. package/dist/client/assets/{XCircle-Ds0Log1_.js → XCircle-Bdqr7Csd.js} +1 -1
  41. package/dist/client/assets/{XClose-DjadAVCX.js → XClose-Cx8dSxYY.js} +1 -1
  42. package/dist/client/assets/{Zap-D3U8XJRb.js → Zap-Da5qzBL9.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-DsH_k1C4.js → ZoomOut-C8BTMnO9.js} +1 -1
  44. package/dist/client/assets/{access-gate-CuIthKSm.js → access-gate-wTt0hkiV.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-BKL_hKkk.js → add-connection-dialog-C8n1sIiv.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-AEMDlU2l.js → agent-analytics-BigiGcC3.js} +1 -1
  47. package/dist/client/assets/agent-app-BynIiQPm.js +1 -0
  48. package/dist/client/assets/{agent-assets-BI_o8EXn.js → agent-assets-C0cz7g53.js} +1 -1
  49. package/dist/client/assets/{agent-automation-DUiD7Tiw.js → agent-automation-NB5zps7C.js} +1 -1
  50. package/dist/client/assets/{agent-automations-BqRu2Acp.js → agent-automations-Dr2TOtVh.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-wVhW_Voj.js → agent-connect-sources-BP-ePYzm.js} +1 -1
  52. package/dist/client/assets/agent-deck-B4AuEIZ3.js +1 -0
  53. package/dist/client/assets/{agent-e2e-B_VPTtsE.js → agent-e2e-7pGygJe1.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-VNCtI9MN.js → agent-experiments-NFpgU_vW.js} +1 -1
  55. package/dist/client/assets/agent-file-CtFUY5q3.js +1 -0
  56. package/dist/client/assets/{agent-git-DvIcC2QG.js → agent-git-Dp2pjcq7.js} +1 -1
  57. package/dist/client/assets/{agent-hosting-DQWvdG7u.js → agent-hosting-swMJFfI8.js} +1 -1
  58. package/dist/client/assets/{agent-icon-v-YF8SZ6.js → agent-icon-b_XHjZEZ.js} +1 -1
  59. package/dist/client/assets/agent-library-file-Cs2o3xUR.js +1 -0
  60. package/dist/client/assets/{agent-monitor-CEAGevcJ.js → agent-monitor-DXml8cXU.js} +1 -1
  61. package/dist/client/assets/{agent-overview-B9mWtQrN.js → agent-overview-B-8Q_kMe.js} +1 -1
  62. package/dist/client/assets/agent-settings-D_j9iMnB.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-Dn-SwMeX.js → agent-site-editor-C69PUReM.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-DSXPZTZD.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-B9j94FVC.js +9 -0
  66. package/dist/client/assets/{agent-site-editor-preview-BGtSWN6k.js → agent-site-editor-preview-CKfhefDr.js} +3 -3
  67. package/dist/client/assets/agent-view-cJkl5h-x.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-KuUlGmjg.js → agent-view-guard-DH71qayK.js} +1 -1
  69. package/dist/client/assets/{agents-list-DUTGAaYB.js → agents-list-DqxafIkw.js} +1 -1
  70. package/dist/client/assets/{ai-providers-CvP0mu_h.js → ai-providers-DjYgCZLG.js} +1 -1
  71. package/dist/client/assets/{alert-BGlOaWga.js → alert-DJICfxE6.js} +1 -1
  72. package/dist/client/assets/{alert-dialog-5zuyoQ54.js → alert-dialog-DehGSRTj.js} +1 -1
  73. package/dist/client/assets/{analytics-sections-B2FKhhgH.js → analytics-sections-DAtGnCwB.js} +1 -1
  74. package/dist/client/assets/{api-keys-B85PZWC-.js → api-keys-BRbJWypK.js} +1 -1
  75. package/dist/client/assets/api-keys-CRlcHMxs.js +1 -0
  76. package/dist/client/assets/app-editor-BYU_FtWh.js +1 -0
  77. package/dist/client/assets/{asset-utils-DHE59DFm.js → asset-utils-Dc_dFFTI.js} +1 -1
  78. package/dist/client/assets/{auth-Bdfh9TTN.js → auth-CxmhwEgd.js} +1 -1
  79. package/dist/client/assets/{auth-catchall-BoMWkor5.js → auth-catchall-CJK5Vd3r.js} +1 -1
  80. package/dist/client/assets/{auth-entry-BEwITJEV.js → auth-entry-XnuRce_W.js} +1 -1
  81. package/dist/client/assets/{auth-split-layout-BdEGeOmG.js → auth-split-layout-CNTa1r8B.js} +1 -1
  82. package/dist/client/assets/{authenticate-and-persist-oauth-DKS7LloY.js → authenticate-and-persist-oauth-D88bk5XQ.js} +1 -1
  83. package/dist/client/assets/{automation-list-row-C8lOzNNS.js → automation-list-row-CQBHFIqU.js} +1 -1
  84. package/dist/client/assets/{automation-runs-VhaUbL_z.js → automation-runs-BNk_SzYI.js} +1 -1
  85. package/dist/client/assets/{automations-BxXnVrTy.js → automations-CzHIfHdu.js} +1 -1
  86. package/dist/client/assets/{autosend-D8pg19Rh.js → autosend-CR9k38nC.js} +1 -1
  87. package/dist/client/assets/{avatar-CAxICn2w.js → avatar-BOPY-KDj.js} +1 -1
  88. package/dist/client/assets/{badge-BnOb-zsy.js → badge-CN6KFcHa.js} +1 -1
  89. package/dist/client/assets/{block-document-Kro-pK9Z.js → block-document-9qy4_FT6.js} +1 -1
  90. package/dist/client/assets/{blocks-preview-workspace-context-DdZhOygI.js → blocks-preview-workspace-context-uDXO7VHT.js} +1 -1
  91. package/dist/client/assets/{breadcrumb-CkGzv7W5.js → breadcrumb-BxovhK-E.js} +1 -1
  92. package/dist/client/assets/{buckets-CjuL4oVA.js → buckets-B83w_wIY.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-BUDaGIGD.js → build-improve-prompt-doc-Z251-hmh.js} +1 -1
  94. package/dist/client/assets/{calendar-Rh3Ayi6D.js → calendar-Dd9w8Cda.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-Dy5jJdoS.js → capability-load-error-DVSWQq85.js} +1 -1
  96. package/dist/client/assets/{category-editor-BWM9wIdp.js → category-editor-Bvuph8Uc.js} +1 -1
  97. package/dist/client/assets/{chart-BXfjoXsa.js → chart-D837siBd.js} +1 -1
  98. package/dist/client/assets/{chat-context-ZGS-0Lc6.js → chat-context-mOTo9_NI.js} +1 -1
  99. package/dist/client/assets/{chat-draft-WttJ8tkW.js → chat-draft-D14VCCNF.js} +1 -1
  100. package/dist/client/assets/{checkbox-8e5Ux6Bp.js → checkbox-I2peiheL.js} +1 -1
  101. package/dist/client/assets/{choose-editor-C6KpaeEk.js → choose-editor-BF24n3Ts.js} +1 -1
  102. package/dist/client/assets/{claim-phase-copy-B9MsUskO.js → claim-phase-copy-nu5hupgI.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-Li-2eHwe.js → cli-auth-success-BDtPEboS.js} +1 -1
  104. package/dist/client/assets/{client-icons-xZ20IU_9.js → client-icons-D_GjDPGl.js} +1 -1
  105. package/dist/client/assets/{collapsible-BSf9Onia.js → collapsible-gVegBMwF.js} +1 -1
  106. package/dist/client/assets/{collection-detail-fBl2Fztc.js → collection-detail-RDK_8DsU.js} +1 -1
  107. package/dist/client/assets/{collection-display-button-4NcwJUay.js → collection-display-button-BFbabvmp.js} +1 -1
  108. package/dist/client/assets/{collection-search-DUPEyodi.js → collection-search-4vCvX0QD.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-zQraMMIZ.js → collection-table-wrapper-DxjlDy-5.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-DltvKsB7.js → collection-tabs-DS-Im1ic.js} +1 -1
  111. package/dist/client/assets/{combobox-CFoM-dcS.js → combobox-DrUSoNBs.js} +1 -1
  112. package/dist/client/assets/{command-0Q71adD5.js → command-gKTxqgCX.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-A0aC2MKi.js → companion-mcps-section-CP9gqcaw.js} +1 -1
  114. package/dist/client/assets/{connect-jOjDz1xq.js → connect-DRelsvjB.js} +1 -1
  115. package/dist/client/assets/{connect-layout-BrutlKFN.js → connect-layout-Cqhyb7PV.js} +1 -1
  116. package/dist/client/assets/{connection-BwlYp_98.js → connection-C15f5bNS.js} +1 -1
  117. package/dist/client/assets/{connection-card-BwH4OiUh.js → connection-card-BMeKUGng.js} +1 -1
  118. package/dist/client/assets/{connection-detail-CM-qh20_.js → connection-detail-CcO19QVa.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-DukXidKL.js → connection-form-helpers-CmIBkFb3.js} +1 -1
  120. package/dist/client/assets/{connections-cAoSaU23.js → connections-kJZ9DqVg.js} +1 -1
  121. package/dist/client/assets/{context-Dqy_Piwx.js → context-waQx2W4V.js} +1 -1
  122. package/dist/client/assets/{create-organization-dialog-2wNLwwUG.js → create-organization-dialog-DoTSwQvQ.js} +1 -1
  123. package/dist/client/assets/{decofile-api-Bk6Q_m6Q.js → decofile-api-DwohDDOu.js} +1 -1
  124. package/dist/client/assets/{decopilot-CjeDftvq.js → decopilot-bLAHPQ8D.js} +1 -1
  125. package/dist/client/assets/{dialog-aNfvq0Gx.js → dialog-Dcra4McE.js} +1 -1
  126. package/dist/client/assets/{discover-BhBU7Gzl.js → discover-srrXvfjV.js} +1 -1
  127. package/dist/client/assets/{domain-settings-Cg5mUYYW.js → domain-settings-CcyamET0.js} +1 -1
  128. package/dist/client/assets/{download-app-dialog-jqsRuRCN.js → download-app-dialog-Bt9MR0m_.js} +1 -1
  129. package/dist/client/assets/{drawer-DSLgUl8S.js → drawer-0y_cyI4K.js} +1 -1
  130. package/dist/client/assets/{editor-PxmQfpfP.js → editor-BCdzptBY.js} +1 -1
  131. package/dist/client/assets/{empty-state-Bryk1SHf.js → empty-state-BV17J4rU.js} +1 -1
  132. package/dist/client/assets/{empty-state-BtpZBU4x.js → empty-state-BimfTH5j.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-B9DyPVU-.js → extract-connection-data-ByvXZO_i.js} +1 -1
  134. package/dist/client/assets/{feature-gate-D6zo6xG-.js → feature-gate-CGTKfO9Z.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-Bh8RRr9y.js → feature-paywall-Bl0cYtHt.js} +1 -1
  136. package/dist/client/assets/{file-explorer-CN0NFZe1.js → file-explorer-76PPVdlw.js} +1 -1
  137. package/dist/client/assets/{file-preview-CJ-_1Vqz.js → file-preview-cVqXpH_G.js} +1 -1
  138. package/dist/client/assets/{file-share-button-f2Yvf1Ye.js → file-share-button-BuMvzP63.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-BYgiZIDa.js → file-type-icon-DYMR5_m7.js} +1 -1
  140. package/dist/client/assets/{folder-icon-CNG-f1SD.js → folder-icon-DQB6n2kf.js} +1 -1
  141. package/dist/client/assets/{form-BvSGycPj.js → form-Bn_VlbjB.js} +1 -1
  142. package/dist/client/assets/{gateway-client-DEZhRkTS.js → gateway-client-DSN8PosO.js} +1 -1
  143. package/dist/client/assets/{general-BJZXxBNe.js → general-B-jviDo6.js} +1 -1
  144. package/dist/client/assets/{github-icon-BP92s-aj.js → github-icon-8fpS8l__.js} +1 -1
  145. package/dist/client/assets/{home-CdxWRWJt.js → home-CL83ye26.js} +1 -1
  146. package/dist/client/assets/{hooks-BHo3iW8o.js → hooks-V57yclqv.js} +1 -1
  147. package/dist/client/assets/{icon-button-rGUjPiBO.js → icon-button-B2Jd-vIw.js} +1 -1
  148. package/dist/client/assets/{index-CEIxT9-w.js → index-B9RXO-FB.js} +1 -1
  149. package/dist/client/assets/{index-DfHvWqHg.js → index-BRVGbtHX.js} +1 -1
  150. package/dist/client/assets/{index-Bv8ovZX7.js → index-CFZrnnmD.js} +5 -5
  151. package/dist/client/assets/{index-D4jxiDhV.js → index-C_YKA6uy.js} +1 -1
  152. package/dist/client/assets/{index-CCZIVOTb.js → index-CsvWb_z5.js} +1 -1
  153. package/dist/client/assets/{index-CW3mvbP-.js → index-Cv3P6Wq4.js} +1 -1
  154. package/dist/client/assets/{index-CMM8OiJN.js → index-Cw3ZmUL2.js} +1 -1
  155. package/dist/client/assets/{index-DGESUJrE.js → index-D-R5D9vw.js} +1 -1
  156. package/dist/client/assets/{index-DB7CW9tW.js → index-DRFd03i9.js} +1 -1
  157. package/dist/client/assets/{index-B-vo5TqF.js → index-DdGk5PPa.js} +1 -1
  158. package/dist/client/assets/{index-BmxQhKcc.js → index-Do9AlR8P.js} +1 -1
  159. package/dist/client/assets/{index-B1YIjoy8.js → index-Dq-IpwkC.js} +1 -1
  160. package/dist/client/assets/{index-B9Mt2Zue.js → index-DtZHgx57.js} +1 -1
  161. package/dist/client/assets/{index-BIlCrPH2.js → index-gECsHnHY.js} +1 -1
  162. package/dist/client/assets/{index-redirect-Cf0qGvvQ.js → index-redirect-CTTvBSR1.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-CLmBPvOC.js → infiniteQueryObserver-Gux7qMEO.js} +1 -1
  164. package/dist/client/assets/{infra-billing-CgTT7mEA.js → infra-billing-Cvvw03Dm.js} +1 -1
  165. package/dist/client/assets/{input-D7VKtVHV.js → input-B_-SnRO5.js} +1 -1
  166. package/dist/client/assets/{input-BrBT4VAu.js → input-Bwe8NZ5T.js} +1 -1
  167. package/dist/client/assets/{input-CXs-YVYu.js → input-DmvvEyNC.js} +1 -1
  168. package/dist/client/assets/{integration-icon-_QdW_HEl.js → integration-icon-C9XaIOHe.js} +1 -1
  169. package/dist/client/assets/{label-BAb2clBH.js → label-DSLU6fFz.js} +1 -1
  170. package/dist/client/assets/{last-preview-page-BOasaofB.js → last-preview-page-Bq7holaY.js} +1 -1
  171. package/dist/client/assets/{layout-DKz_gVMk.js → layout-BKGCgfkN.js} +1 -1
  172. package/dist/client/assets/{legacy-agents-deep-DzJV9WdZ.js → legacy-agents-deep-T9NXwWHP.js} +1 -1
  173. package/dist/client/assets/{legacy-main-redirect-DoEPYUQz.js → legacy-main-redirect-CdjJmBj-.js} +1 -1
  174. package/dist/client/assets/{library-BxKGOYLR.js → library-CDWN3mYj.js} +1 -1
  175. package/dist/client/assets/{login-B13wBUsH.js → login-Cx2qLFTf.js} +1 -1
  176. package/dist/client/assets/{markdown-IEb50bp3.js → markdown-oeL4d_tN.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-BVjb1uep.js → mcp-app-renderer-CmLIkf6i.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-D7EnzUg3.js → mcp-oauth-D1pDEEn0.js} +1 -1
  179. package/dist/client/assets/{members-DaYkffyz.js → members-DDvZMbmX.js} +1 -1
  180. package/dist/client/assets/{message-templates-DIQZvuul.js → message-templates-D-nRIsWk.js} +1 -1
  181. package/dist/client/assets/{mini-report-page-gPQljQx-.js → mini-report-page-nehi6gd3.js} +1 -1
  182. package/dist/client/assets/{mock-board-BCEtuogR.js → mock-board-BcrW0eEv.js} +3 -3
  183. package/dist/client/assets/{monaco-editor-CZ3UOq2C.js → monaco-editor-rG_ojQtN.js} +1 -1
  184. package/dist/client/assets/{monitoring-stats-row-BKgG20GP.js → monitoring-stats-row-u_eyyh8S.js} +1 -1
  185. package/dist/client/assets/{multi-select-B_FsyhJ3.js → multi-select-C1vxoOWR.js} +1 -1
  186. package/dist/client/assets/{mustache-B64bzbQE.js → mustache-_05g5fSZ.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-BVa1wqY_.js → oauth-callback-BParqGue.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-B6p3LEub.js → oauth-callback-ai-provider-CFCc4vuY.js} +1 -1
  189. package/dist/client/assets/{onboarding-CjY9ZaJa.js → onboarding-CefimiY5.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-CIgk0pPq.js → optimistic-project-sidebar-views-Ds7dxAP-.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-C3CvG90a.js → org-file-open-context-DI6t8wtB.js} +1 -1
  192. package/dist/client/assets/{organization-choice-4sTsbqZY.js → organization-choice-DqCYRx3X.js} +1 -1
  193. package/dist/client/assets/{orgs-DMLLTLY8.js → orgs-B9XC3G_x.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-BGuhWwqo.js → page-seo-form-Bxx9SwNT.js} +1 -1
  195. package/dist/client/assets/{pair-DSAE6kBc.js → pair-CVurrPq-.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-DRDlfnKQ.js → plan-ladder-BfylXdSz.js} +1 -1
  197. package/dist/client/assets/{popover-n4tdwfg1.js → popover-Baq0imIs.js} +1 -1
  198. package/dist/client/assets/post-calendar-Deyu5RSY.js +1 -0
  199. package/dist/client/assets/{post-editor-BOL_jJ5F.js → post-editor-B77-jPfP.js} +1 -1
  200. package/dist/client/assets/{preview-content-BOr8t_B7.js → preview-content-Cb2RYCeo.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-CBQATPoA.js → preview-dialog-AWoznOua.js} +1 -1
  202. package/dist/client/assets/{profile-CP_1bWDP.js → profile-Bno_MC0t.js} +1 -1
  203. package/dist/client/assets/{project-app-view-XkPj660d.js → project-app-view-BoEEmEk4.js} +1 -1
  204. package/dist/client/assets/{project-feed-mDfQ-laa.js → project-feed-DT9rU3wJ.js} +1 -1
  205. package/dist/client/assets/{project-icon-K8IkvwTu.js → project-icon-CzEj0avy.js} +1 -1
  206. package/dist/client/assets/project-reports-DYAJh_Wl.js +1 -0
  207. package/dist/client/assets/project-tasks-CE9Re7Tj.js +1 -0
  208. package/dist/client/assets/{prompts-49OLfQnt.js → prompts-BU3lT5yK.js} +1 -1
  209. package/dist/client/assets/record-editor-BZi1czEu.js +1 -0
  210. package/dist/client/assets/{redirect-editor-6KbeprTc.js → redirect-editor-BrsiQdWf.js} +1 -1
  211. package/dist/client/assets/reports-ARrC7tI6.js +1 -0
  212. package/dist/client/assets/{reports-C1-T_XI6.js → reports-BWa8EEwC.js} +1 -1
  213. package/dist/client/assets/{reports-onboarding-BbH4V7A-.js → reports-onboarding-soeZpVO2.js} +1 -1
  214. package/dist/client/assets/{reports-tab-DyE4mWa3.js → reports-tab-DvvKKs9h.js} +2 -2
  215. package/dist/client/assets/{repositories-DHwboveY.js → repositories-DxBiP88Q.js} +1 -1
  216. package/dist/client/assets/{repository-import-picker-CRs10CPh.js → repository-import-picker-DmgbIRex.js} +1 -1
  217. package/dist/client/assets/{repository-picker-CZ9LQZYf.js → repository-picker-BdbJB8MH.js} +1 -1
  218. package/dist/client/assets/{require-capability-D9SZxHsZ.js → require-capability-CUtBt1bi.js} +1 -1
  219. package/dist/client/assets/{required-auth-layout-5gvCMtcO.js → required-auth-layout-BlnGUT2q.js} +1 -1
  220. package/dist/client/assets/{reset-password-DWdrV3bH.js → reset-password-OMiTHFai.js} +1 -1
  221. package/dist/client/assets/{resizable-B57Znxf0.js → resizable-Dr5PNlfE.js} +1 -1
  222. package/dist/client/assets/{review-settings-BQC6b8ZY.js → review-settings-84byzwHU.js} +1 -1
  223. package/dist/client/assets/{rich-text-link-control-B-NORzEn.js → rich-text-link-control-CFnLXxfY.js} +1 -1
  224. package/dist/client/assets/{roles-BMRJMNLe.js → roles-AcbVFhCZ.js} +1 -1
  225. package/dist/client/assets/{route-Bv4TqLdN.js → route-73J6vHiy.js} +1 -1
  226. package/dist/client/assets/{route-BCJP0MYO.js → route-BA_J22E-.js} +1 -1
  227. package/dist/client/assets/{route-Bms7Naqu.js → route-BHnu0h_N.js} +1 -1
  228. package/dist/client/assets/{route-page-header-CsPi4GMO.js → route-page-header-CByDrdCZ.js} +1 -1
  229. package/dist/client/assets/{runnable-block-editor-DM8wSMV8.js → runnable-block-editor-C-z6sg8d.js} +1 -1
  230. package/dist/client/assets/{sandbox-lifecycle-context-DsRGwORN.js → sandbox-lifecycle-context-244BQJ78.js} +1 -1
  231. package/dist/client/assets/{schema-CMlylut3.js → schema-Du8_zRy7.js} +1 -1
  232. package/dist/client/assets/{scroll-area-t3NukeQO.js → scroll-area-DWMWIudU.js} +1 -1
  233. package/dist/client/assets/{search-input-B3K0cIXk.js → search-input-C7zzo1gV.js} +1 -1
  234. package/dist/client/assets/{search-toggle-7vfSZ3oM.js → search-toggle-CArb_7uo.js} +1 -1
  235. package/dist/client/assets/{secret-picker-BvIcwT9-.js → secret-picker-CQN9d587.js} +1 -1
  236. package/dist/client/assets/{secrets-Vf4pio1e.js → secrets-D1CraqxC.js} +1 -1
  237. package/dist/client/assets/{sections-editor-Diy2sJ51.js → sections-editor-Wq74SyFR.js} +1 -1
  238. package/dist/client/assets/{select-B_9gxhnf.js → select-BOM-aKhP.js} +1 -1
  239. package/dist/client/assets/{select-model-Dc8NFwmy.js → select-model-DpXoMCZH.js} +1 -1
  240. package/dist/client/assets/{seo-editor-CyA_IHYp.js → seo-editor-D1cw49ws.js} +1 -1
  241. package/dist/client/assets/{separator-CeYTQgxJ.js → separator-DW6Prz-B.js} +1 -1
  242. package/dist/client/assets/{settings-tab-CSmq_TZm.js → settings-tab-BlphdJug.js} +1 -1
  243. package/dist/client/assets/{sheet-ncGbwo3c.js → sheet-Dq13NqY6.js} +1 -1
  244. package/dist/client/assets/{shell-layout-Cn2XiFfO.js → shell-layout-DMJ3Gw_b.js} +1 -1
  245. package/dist/client/assets/{sidebar-DMorNI5B.js → sidebar-n3X--4aE.js} +1 -1
  246. package/dist/client/assets/{skill-preview-Csp1-IaM.js → skill-preview-ht8NWRpt.js} +1 -1
  247. package/dist/client/assets/{skills-JdOILRst.js → skills-2dbI_ehN.js} +1 -1
  248. package/dist/client/assets/{sso-D6HM5t6s.js → sso-D4ClPuk5.js} +1 -1
  249. package/dist/client/assets/{suggestion-5QOsyBWf.js → suggestion-B2gCPjEY.js} +1 -1
  250. package/dist/client/assets/{switch-B8V9Ox46.js → switch-BpU_dXOg.js} +1 -1
  251. package/dist/client/assets/{synced-repos-Cq9R4ohv.js → synced-repos-B4WffdFD.js} +1 -1
  252. package/dist/client/assets/{table-CqSUYS4O.js → table-BK5Bj0BA.js} +1 -1
  253. package/dist/client/assets/{tabs-god_zfat.js → tabs-DtulKHna.js} +1 -1
  254. package/dist/client/assets/{task-board-CSfWLhg4.js → task-board-BlCSl7H6.js} +1 -1
  255. package/dist/client/assets/{task-route-qv7COOYP.js → task-route-Buk2mgML.js} +1 -1
  256. package/dist/client/assets/{task-status-BAjWghil.js → task-status-BvbYEbq9.js} +1 -1
  257. package/dist/client/assets/{taskboard-analytics-D-yRn1S6.js → taskboard-analytics-C4h2ZM5g.js} +1 -1
  258. package/dist/client/assets/{tasks-ChC4tJl9.js → tasks-ClVRdGRp.js} +1 -1
  259. package/dist/client/assets/tasks-IK2ZoIhQ.js +1 -0
  260. package/dist/client/assets/{textarea-Bs1krskq.js → textarea-CDG_4h5K.js} +1 -1
  261. package/dist/client/assets/{thread-analytics-BgyyDuVq.js → thread-analytics-CrrAYz-K.js} +1 -1
  262. package/dist/client/assets/{thread-button-CU8FEc0x.js → thread-button-Bt2nv3eP.js} +1 -1
  263. package/dist/client/assets/{thread-intent-Bl6xIfFf.js → thread-intent-DfUdqfo1.js} +1 -1
  264. package/dist/client/assets/{thread-route-BSeISsE6.js → thread-route-BcHRblub.js} +1 -1
  265. package/dist/client/assets/{thread-route-CX0quyn9.js → thread-route-CIar6WIg.js} +1 -1
  266. package/dist/client/assets/{thread-sheet-body-hkS4aUg5.js → thread-sheet-body-BeD4yJxi.js} +1 -1
  267. package/dist/client/assets/{toggle-group-uWDttGAl.js → toggle-group-CNL0xUW4.js} +1 -1
  268. package/dist/client/assets/{toolbar-icon-button-CL9TUqhr.js → toolbar-icon-button-bv_fQ-aj.js} +1 -1
  269. package/dist/client/assets/{tooltip-452rT2Av.js → tooltip-CPnP6Sjs.js} +1 -1
  270. package/dist/client/assets/{track-9kgX0QPk.js → track-B9PuaPFx.js} +1 -1
  271. package/dist/client/assets/{types-CKACT3re.js → types-d1eRFziw.js} +1 -1
  272. package/dist/client/assets/{usage-stats-DpOdKRPA.js → usage-stats-DJsI8Eqk.js} +1 -1
  273. package/dist/client/assets/{use-ai-providers-BfBmzjxk.js → use-ai-providers-BV_DvH7o.js} +1 -1
  274. package/dist/client/assets/{use-automations-BSATGAzs.js → use-automations-BHsMhlO9.js} +1 -1
  275. package/dist/client/assets/{use-autosave-Cgp9LI2B.js → use-autosave-DgwX0mMm.js} +1 -1
  276. package/dist/client/assets/{use-connect-companion-C-aC_6H2.js → use-connect-companion-BzIs5X88.js} +1 -1
  277. package/dist/client/assets/{use-connection-DZHmMxeG.js → use-connection-Bi6HLcH4.js} +1 -1
  278. package/dist/client/assets/{use-copy-CKbfXSV3.js → use-copy-CDhoRgm3.js} +1 -1
  279. package/dist/client/assets/{use-create-virtual-mcp-DT6S24Ek.js → use-create-virtual-mcp-DIHuJhyr.js} +1 -1
  280. package/dist/client/assets/{use-date-fns-locale-4nMtSnpk.js → use-date-fns-locale-Cy0bIV3c.js} +1 -1
  281. package/dist/client/assets/{use-debounced-autosave-Dabnhryq.js → use-debounced-autosave-D8Sorx0q.js} +1 -1
  282. package/dist/client/assets/{use-debounced-value-D4IIgvZ6.js → use-debounced-value-Bi1oqAau.js} +1 -1
  283. package/dist/client/assets/{use-deco-credits-CUhDqFNs.js → use-deco-credits-CRBFL3xa.js} +1 -1
  284. package/dist/client/assets/{use-decopilot-events-E0BM35TR.js → use-decopilot-events-CVfzaSiv.js} +1 -1
  285. package/dist/client/assets/{use-delete-connection-CKxZ4wsy.js → use-delete-connection-CX0v-UqP.js} +1 -1
  286. package/dist/client/assets/{use-deployment-admin-CULH8aip.js → use-deployment-admin-C2loCmMs.js} +1 -1
  287. package/dist/client/assets/{use-entitlements-BTK1TiYJ.js → use-entitlements-qq0onzk3.js} +1 -1
  288. package/dist/client/assets/{use-fast-preview-draft-url-CDZ9QnYg.js → use-fast-preview-draft-url-DUGuDJ0B.js} +1 -1
  289. package/dist/client/assets/{use-file-configs-BX41631Z.js → use-file-configs-DI6Asnep.js} +1 -1
  290. package/dist/client/assets/{use-in-settings-DMlBXVsJ.js → use-in-settings-2EIzhXwd.js} +1 -1
  291. package/dist/client/assets/{use-infinite-scroll-Be1BN8YX.js → use-infinite-scroll-BwJMlu6L.js} +1 -1
  292. package/dist/client/assets/{use-join-requests-D7k_-rqK.js → use-join-requests-752eIkzS.js} +1 -1
  293. package/dist/client/assets/{use-main-panel-tabs-Xzm5JVo2.js → use-main-panel-tabs-DIxFD1x0.js} +1 -1
  294. package/dist/client/assets/{use-mcp-auth-status-DZc1kZiD.js → use-mcp-auth-status-Cyg7VElH.js} +1 -1
  295. package/dist/client/assets/{use-mcp-client-8W4pv2iG.js → use-mcp-client-4SfStdvU.js} +1 -1
  296. package/dist/client/assets/{use-mcp-prompts-EP5VAc7p.js → use-mcp-prompts-DNTC-VnG.js} +1 -1
  297. package/dist/client/assets/{use-mcp-tools-CWjm4_qp.js → use-mcp-tools-CmJbGXa2.js} +1 -1
  298. package/dist/client/assets/{use-members-DdFSpvT6.js → use-members-ChLgHSO3.js} +1 -1
  299. package/dist/client/assets/{use-mobile-CbgvL5x6.js → use-mobile-DARHzVZh.js} +1 -1
  300. package/dist/client/assets/{use-navigate-to-agent-CnwjWuW_.js → use-navigate-to-agent-a1v5JNRv.js} +1 -1
  301. package/dist/client/assets/{use-open-billing-url-DAJYSvuP.js → use-open-billing-url-CSkUOZcG.js} +1 -1
  302. package/dist/client/assets/{use-org-auth-client-PjV6soYN.js → use-org-auth-client-BcltMH40.js} +1 -1
  303. package/dist/client/assets/{use-org-fs-DlHKBaPi.js → use-org-fs-PfmH2IwE.js} +1 -1
  304. package/dist/client/assets/{use-org-repo-syncs-IAlIRz5z.js → use-org-repo-syncs-BGgD9fX9.js} +1 -1
  305. package/dist/client/assets/{use-org-sso-Od2nvWUP.js → use-org-sso-BcU16muD.js} +1 -1
  306. package/dist/client/assets/{use-organization-roles-Cma99AA4.js → use-organization-roles-RhvAN6UI.js} +1 -1
  307. package/dist/client/assets/{use-organization-settings-BXDoAx1p.js → use-organization-settings-BLvm6CUv.js} +1 -1
  308. package/dist/client/assets/{use-panel-navigate-CeERwAhY.js → use-panel-navigate-Ba3IZxfG.js} +1 -1
  309. package/dist/client/assets/{use-project-native-view-presence-0O5UQcYW.js → use-project-native-view-presence-CsPNZgcc.js} +1 -1
  310. package/dist/client/assets/{use-project-scope-CdX2mBNC.js → use-project-scope-BspeH_sq.js} +1 -1
  311. package/dist/client/assets/{use-releases-BKjJ4TJe.js → use-releases-CVzN8uNR.js} +1 -1
  312. package/dist/client/assets/{use-reports-diagnostic-T8Asd01v.js → use-reports-diagnostic-CrvplLbm.js} +1 -1
  313. package/dist/client/assets/{use-route-default-main-BW9UadGk.js → use-route-default-main-DSqzyOuP.js} +1 -1
  314. package/dist/client/assets/{use-secrets-CfE-SREF.js → use-secrets-DgrFX5xg.js} +1 -1
  315. package/dist/client/assets/{use-section-preview-base-WUaK1Pi8.js → use-section-preview-base-B-Hn9i9b.js} +1 -1
  316. package/dist/client/assets/{use-session-runtime-Bf6vLaxh.js → use-session-runtime-BVLmSBh6.js} +1 -1
  317. package/dist/client/assets/{use-tags-BUAJ1eC5.js → use-tags-BOv9arBp.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-BDIpYBbX.js → use-task-board-analytics-DPM83CD7.js} +1 -1
  319. package/dist/client/assets/{use-task-metadata-DyG3Lo1p.js → use-task-metadata-CJ-QxfGm.js} +1 -1
  320. package/dist/client/assets/{use-thread-analytics-DjnPlB1b.js → use-thread-analytics-C0CiMqbi.js} +1 -1
  321. package/dist/client/assets/{use-thread-outputs-CSH9qR28.js → use-thread-outputs-CTmmbNmM.js} +1 -1
  322. package/dist/client/assets/{use-virtual-mcp-DyTrBBn7.js → use-virtual-mcp-B1-yfeBH.js} +1 -1
  323. package/dist/client/assets/useInfiniteQuery-CpVWUzdl.js +1 -0
  324. package/dist/client/assets/{useQueries-BxKAM4Rs.js → useQueries-CrqtqlHM.js} +1 -1
  325. package/dist/client/assets/useSuspenseInfiniteQuery-CXyd6z14.js +1 -0
  326. package/dist/client/assets/{users-hKaW80lb.js → users-mYCEW-vA.js} +1 -1
  327. package/dist/client/assets/{utils-BnjmVFWV.js → utils-D2y8J057.js} +1 -1
  328. package/dist/client/assets/{variant-calendar-7Gr0v6MN.js → variant-calendar-7H3LNEKh.js} +1 -1
  329. package/dist/client/assets/{variant-matcher-override-BhXPWsTJ.js → variant-matcher-override-4dV3T02L.js} +1 -1
  330. package/dist/client/assets/{view-mode-toggle-Blh9kDM6.js → view-mode-toggle-BQub2iHi.js} +1 -1
  331. package/dist/client/assets/{virtual-mcp-BYf8h9T-.js → virtual-mcp-7pXCbTsW.js} +1 -1
  332. package/dist/client/index.html +1 -1
  333. package/dist/server/cli.js +1 -1
  334. package/dist/server/server.js +1 -1
  335. package/package.json +1 -1
  336. package/dist/client/assets/agent-app-Dg3IYcc1.js +0 -1
  337. package/dist/client/assets/agent-deck-BZGEf92K.js +0 -1
  338. package/dist/client/assets/agent-file-D1Iq_S8L.js +0 -1
  339. package/dist/client/assets/agent-library-file-DJ5gCk1X.js +0 -1
  340. package/dist/client/assets/agent-settings-Bd8_YJSI.js +0 -1
  341. package/dist/client/assets/agent-site-editor-code-Y4xPIzmS.js +0 -2
  342. package/dist/client/assets/agent-site-editor-content-Dn2d28FJ.js +0 -9
  343. package/dist/client/assets/agent-view-BqNl4IOK.js +0 -1
  344. package/dist/client/assets/api-keys-guA8nw2b.js +0 -1
  345. package/dist/client/assets/app-editor-B4Z-g5Dd.js +0 -1
  346. package/dist/client/assets/post-calendar-BAf3rV18.js +0 -1
  347. package/dist/client/assets/project-reports-8pX-TMsT.js +0 -1
  348. package/dist/client/assets/project-tasks-C6Kryc4_.js +0 -1
  349. package/dist/client/assets/record-editor-13ULQgYo.js +0 -1
  350. package/dist/client/assets/reports-BrFDkh6w.js +0 -1
  351. package/dist/client/assets/tasks-BR9-q4OQ.js +0 -1
  352. package/dist/client/assets/useInfiniteQuery-COua6s42.js +0 -1
  353. package/dist/client/assets/useSuspenseInfiniteQuery-6311fHu0.js +0 -1
@@ -1 +1 @@
1
- import{a as V,Y as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-Bv8ovZX7.js";import{I as ee}from"./input-D7VKtVHV.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 compact:rounded-lg",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
1
+ import{a as V,Y as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-CFZrnnmD.js";import{I as ee}from"./input-B_-SnRO5.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 compact:rounded-lg",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
@@ -1 +1 @@
1
- import{c as g,l as p,j as f}from"./index-Bv8ovZX7.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
1
+ import{c as g,l as p,j as f}from"./index-CFZrnnmD.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
@@ -1 +1 @@
1
- import"./index-Bv8ovZX7.js";import{i as u,a as p}from"./mcp-oauth-D7EnzUg3.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
1
+ import"./index-CFZrnnmD.js";import{i as u,a as p}from"./mcp-oauth-D1pDEEn0.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
@@ -1 +1 @@
1
- import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-Bv8ovZX7.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-5zuyoQ54.js";import{A as me,L as ue}from"./agent-icon-v-YF8SZ6.js";import{i as de}from"./DotsVertical-DY1WVLqG.js";import{s as fe}from"./Trash01-CSeT8ZD8.js";import{i as ge}from"./Zap-D3U8XJRb.js";import{a as xe}from"./use-virtual-mcp-DyTrBBn7.js";import{a as pe}from"./use-automations-BSATGAzs.js";function ye(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,K]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),K(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),K(!0)},B=t.jsx(fe,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let L;e[55]!==D||e[56]!==R?(L=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=L):L=e[57];let y;e[58]!==i?(y=i("automations.automationListRow.cancel"),e[58]=i,e[59]=y):y=e[59];let C;e[60]!==y?(C=t.jsx(oe,{children:y}),e[60]=y,e[61]=C):C=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==C||e[69]!==P?(T=t.jsxs(re,{children:[C,P]}),e[68]=C,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==L||e[72]!==T?(z=t.jsxs(le,{children:[L,T]}),e[71]=L,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:K,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let I;return e[77]!==A||e[78]!==F?(I=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=I):I=e[79],I}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ye as A};
1
+ import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-CFZrnnmD.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-DehGSRTj.js";import{A as me,L as ue}from"./agent-icon-b_XHjZEZ.js";import{i as de}from"./DotsVertical-B97QY-fA.js";import{s as fe}from"./Trash01-DHtEq5nA.js";import{i as ge}from"./Zap-Da5qzBL9.js";import{a as xe}from"./use-virtual-mcp-B1-yfeBH.js";import{a as pe}from"./use-automations-BHsMhlO9.js";function ye(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,K]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),K(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),K(!0)},B=t.jsx(fe,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let L;e[55]!==D||e[56]!==R?(L=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=L):L=e[57];let y;e[58]!==i?(y=i("automations.automationListRow.cancel"),e[58]=i,e[59]=y):y=e[59];let C;e[60]!==y?(C=t.jsx(oe,{children:y}),e[60]=y,e[61]=C):C=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==C||e[69]!==P?(T=t.jsxs(re,{children:[C,P]}),e[68]=C,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==L||e[72]!==T?(z=t.jsxs(le,{children:[L,T]}),e[71]=L,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:K,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let I;return e[77]!==A||e[78]!==F?(I=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=I):I=e[79],I}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ye as A};
@@ -1 +1 @@
1
- import{c as z,r as lt,b as X,a0 as it,z as rt,a6 as ct,K as tt,j as s,l as ut,m as dt,eM as mt}from"./index-Bv8ovZX7.js";import{u as ft}from"./useInfiniteQuery-COua6s42.js";import{u as xt}from"./use-connection-DZHmMxeG.js";import{u as pt}from"./use-mcp-client-8W4pv2iG.js";import{b as gt}from"./use-virtual-mcp-DyTrBBn7.js";import{b as ht,a as Rt}from"./sheet-ncGbwo3c.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-CqSUYS4O.js";import{E as et}from"./empty-state-Bryk1SHf.js";import{u as Tt}from"./use-infinite-scroll-Be1BN8YX.js";import{a as St}from"./use-members-DdFSpvT6.js";import{g as vt}from"./task-status-BAjWghil.js";import{e as wt}from"./use-automations-BSATGAzs.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-hkS4aUg5.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const W=50;function Y(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(Y,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(Y,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(Y,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=X();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?(M=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=M):M=t[56],M}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async $=>{const{pageParam:J}=$,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=M):M=t[30];const P=M;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Z||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map(($,J)=>s.jsx(yt,{run:$,usage:P.get($.id),onClick:()=>b.select($.id),lastRowRef:J===d.length-1?Z:void 0},$.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Z,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=$=>{$||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Bt as A,It as u};
1
+ import{c as z,r as lt,b as X,a0 as it,z as rt,a6 as ct,K as tt,j as s,l as ut,m as dt,eM as mt}from"./index-CFZrnnmD.js";import{u as ft}from"./useInfiniteQuery-CpVWUzdl.js";import{u as xt}from"./use-connection-Bi6HLcH4.js";import{u as pt}from"./use-mcp-client-4SfStdvU.js";import{b as gt}from"./use-virtual-mcp-B1-yfeBH.js";import{b as ht,a as Rt}from"./sheet-Dq13NqY6.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-BK5Bj0BA.js";import{E as et}from"./empty-state-BV17J4rU.js";import{u as Tt}from"./use-infinite-scroll-BwJMlu6L.js";import{a as St}from"./use-members-ChLgHSO3.js";import{g as vt}from"./task-status-BvbYEbq9.js";import{e as wt}from"./use-automations-BHsMhlO9.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-BeD4yJxi.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const W=50;function Y(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(Y,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(Y,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(Y,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=X();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?(M=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=M):M=t[56],M}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async $=>{const{pageParam:J}=$,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=M):M=t[30];const P=M;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Z||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map(($,J)=>s.jsx(yt,{run:$,usage:P.get($.id),onClick:()=>b.select($.id),lastRowRef:J===d.length-1?Z:void 0},$.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Z,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=$=>{$||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Bt as A,It as u};
@@ -1 +1 @@
1
- import{c as k,j as e,b as $,a0 as D,d as M,r as q,n as d,B as V,fz as F,q as R}from"./index-Bv8ovZX7.js";import{s as G}from"./Plus-DJAmbMrJ.js";import{i as S}from"./Zap-D3U8XJRb.js";import{S as H}from"./search-input-B3K0cIXk.js";import{E as T}from"./empty-state-Bryk1SHf.js";import{u as J}from"./use-automations-BSATGAzs.js";import{u as K}from"./use-navigate-to-agent-CnwjWuW_.js";import{A as O}from"./automation-list-row-C8lOzNNS.js";import{b as Q}from"./use-virtual-mcp-DyTrBBn7.js";import{R as U}from"./require-capability-D9SZxHsZ.js";import"./SearchMd-BT8cdzsW.js";import"./use-mcp-client-8W4pv2iG.js";import"./auth-Bdfh9TTN.js";import"./hooks-BHo3iW8o.js";import"./backoff-8mStPHYB.js";import"./task-board-CSfWLhg4.js";import"./schema-CMlylut3.js";import"./thread-intent-Bl6xIfFf.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./alert-dialog-5zuyoQ54.js";import"./agent-icon-v-YF8SZ6.js";import"./AlertCircle-DwYUjJBu.js";import"./Tool01-BNu7BHqQ.js";import"./ArrowUp-Bgr2TLsm.js";import"./ArrowLeft-BrzmATFY.js";import"./ArrowRight-DYu8UyAE.js";import"./XCircle-Ds0Log1_.js";import"./ZoomOut-DsH_k1C4.js";import"./Globe04-C9YOUwUx.js";import"./CheckCircle-DxLYuezp.js";import"./Check-BgzQchyA.js";import"./ChevronUp-CEt2-KWf.js";import"./UserSquare-B_QuMjVL.js";import"./Copy01-DY06zeXh.js";import"./CreditCard01-atzqozkq.js";import"./DotsVertical-DY1WVLqG.js";import"./Download01-BsnTCWqr.js";import"./Eye-BCLEOXNL.js";import"./Share07-BqFFQNeK.js";import"./XClose-DjadAVCX.js";import"./Image01-Dnl26WcB.js";import"./Key01-CwoMWwVQ.js";import"./LayoutLeft-Bis2ERIL.js";import"./Link01-1Ii-ZBB1.js";import"./LinkExternal01-CxPBcUve.js";import"./Monitor01-DypnteF9.js";import"./Sun-qCW4hQHf.js";import"./Package-DLofDsnv.js";import"./Palette-DZw1jmn0.js";import"./SearchLg-0M2kccVO.js";import"./Stars01-BFm8fGnC.js";import"./Trash01-CSeT8ZD8.js";import"./Upload01-GlJ5Ud3s.js";import"./User01-D0NPPWmZ.js";import"./Users01-K81i8krS.js";import"./X-ClBxN2Lo.js";import"./access-gate-CuIthKSm.js";import"./capability-load-error-Dy5jJdoS.js";function W(){const t=k.c(20),o=$(),{org:l}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,z=Q(),E=K(),f=M(),[x,P]=q.useState(""),h=x.toLowerCase(),b=new Map(z.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=b.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),B=(i,p)=>{const N=p&&b.has(p)?p:F(l.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),E(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(H,{value:x,onChange:P,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function oe(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{oe as default};
1
+ import{c as k,j as e,b as $,a0 as D,d as M,r as q,n as d,B as V,fz as F,q as R}from"./index-CFZrnnmD.js";import{s as G}from"./Plus-t4kIBGIE.js";import{i as S}from"./Zap-Da5qzBL9.js";import{S as H}from"./search-input-C7zzo1gV.js";import{E as T}from"./empty-state-BV17J4rU.js";import{u as J}from"./use-automations-BHsMhlO9.js";import{u as K}from"./use-navigate-to-agent-a1v5JNRv.js";import{A as O}from"./automation-list-row-CQBHFIqU.js";import{b as Q}from"./use-virtual-mcp-B1-yfeBH.js";import{R as U}from"./require-capability-CUtBt1bi.js";import"./SearchMd-Y5wxql57.js";import"./use-mcp-client-4SfStdvU.js";import"./auth-CxmhwEgd.js";import"./hooks-V57yclqv.js";import"./backoff-8mStPHYB.js";import"./task-board-BlCSl7H6.js";import"./schema-Du8_zRy7.js";import"./thread-intent-DfUdqfo1.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./alert-dialog-DehGSRTj.js";import"./agent-icon-b_XHjZEZ.js";import"./AlertCircle-BQBmepo1.js";import"./Tool01-CaOf6Mu4.js";import"./ArrowUp-DBDp30x0.js";import"./ArrowLeft-DHPtMbTg.js";import"./ArrowRight-m94XgZ3O.js";import"./XCircle-Bdqr7Csd.js";import"./ZoomOut-C8BTMnO9.js";import"./Globe04-CcTw2hMd.js";import"./CheckCircle-CySwUqst.js";import"./Check-Bcnv-H55.js";import"./ChevronUp-wyCoS3df.js";import"./UserSquare-BfH7tTry.js";import"./Copy01-CMEvgxoC.js";import"./CreditCard01-Bi7YfG5v.js";import"./DotsVertical-B97QY-fA.js";import"./Download01-DokiLBvz.js";import"./Eye-DlNsmazk.js";import"./Share07-DxxTtQWb.js";import"./XClose-Cx8dSxYY.js";import"./Image01-CGox3JEN.js";import"./Key01-MH27mIao.js";import"./LayoutLeft-CpKRfpdN.js";import"./Link01-BcMSFUIJ.js";import"./LinkExternal01-3Lsw2Z8I.js";import"./Monitor01-FNWg7-7u.js";import"./Sun-mSxdzNTE.js";import"./Package-ColnpoOk.js";import"./Palette-Bb9IRvVj.js";import"./SearchLg-DrU6iSmg.js";import"./Stars01-Dwmyh59Q.js";import"./Trash01-DHtEq5nA.js";import"./Upload01--yrzZIir.js";import"./User01-Dn00_JAZ.js";import"./Users01-BBUvRTwh.js";import"./X-xX_XXXXt.js";import"./access-gate-wTt0hkiV.js";import"./capability-load-error-DVSWQq85.js";function W(){const t=k.c(20),o=$(),{org:l}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,z=Q(),E=K(),f=M(),[x,P]=q.useState(""),h=x.toLowerCase(),b=new Map(z.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=b.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),B=(i,p)=>{const N=p&&b.has(p)?p:F(l.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),E(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(H,{value:x,onChange:P,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function oe(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{oe as default};
@@ -1 +1 @@
1
- import{$ as d}from"./index-Bv8ovZX7.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
1
+ import{$ as d}from"./index-CFZrnnmD.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
@@ -1 +1 @@
1
- import{c as k,j as i,l as f,aE as R,bd as V,be as I,bf as $}from"./index-Bv8ovZX7.js";import{s as E}from"./User01-D0NPPWmZ.js";function O(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(E,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(W,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
1
+ import{c as k,j as i,l as f,aE as R,bd as V,be as I,bf as $}from"./index-CFZrnnmD.js";import{s as E}from"./User01-Dn00_JAZ.js";function O(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(E,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(W,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
@@ -1 +1 @@
1
- import{c as g,l,j as u,bg as v,aE as b}from"./index-Bv8ovZX7.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function h(d){const e=g.c(14);let r,s,a,n,t;e[0]!==d?({className:r,variant:t,size:a,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=a,e[4]=n,e[5]=t):(r=e[1],s=e[2],a=e[3],n=e[4],t=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==a||e[8]!==t?(i=l(f({variant:t,size:a}),r),e[6]=r,e[7]=a,e[8]=t,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{h as B};
1
+ import{c as g,l,j as u,bg as v,aE as b}from"./index-CFZrnnmD.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function h(d){const e=g.c(14);let r,s,a,n,t;e[0]!==d?({className:r,variant:t,size:a,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=a,e[4]=n,e[5]=t):(r=e[1],s=e[2],a=e[3],n=e[4],t=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==a||e[8]!==t?(i=l(f({variant:t,size:a}),r),e[6]=r,e[7]=a,e[8]=t,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{h as B};