decocms 4.513.3 → 4.513.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-CV2gQvF0.js → ActiveShapeUtils-ZRNWCZWq.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Czw3GOXM.js → AlertCircle-CcVhl96j.js} +1 -1
  3. package/dist/client/assets/{AreaChart-BhM70eeA.js → AreaChart-BlLvjs0A.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CBNZ6Kc8.js → ArrowLeft-Bph0OW09.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-D1TV4x6T.js → ArrowUp-DHpvU3H5.js} +1 -1
  6. package/dist/client/assets/{BarChart-BV8WJLUg.js → BarChart-CLaD079J.js} +1 -1
  7. package/dist/client/assets/{Building02-BufOoi54.js → Building02-C1Q8doPE.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-ButQNI6T.js → CartesianChart-B72NH8Np.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-CU6wjw2Q.js → CategoricalChart-DG6BKu5a.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-C6kHCEBQ.js → CheckCircle-CQsC-Pz6.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CREWgR2i.js → ChevronSelectorVertical-CaNDzI1v.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DZ6u-CDn.js → ChevronUp-BruZRzgU.js} +1 -1
  13. package/dist/client/assets/{Copy01-Br8MuAU9.js → Copy01-XsrxN5V9.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-BLe5-9IQ.js → CreditCard01-DD6f0NE9.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DgdCLmlp.js → DotsVertical-DdEm5Yv0.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-D8FHRXZQ.js → ErrorBarContext-D6UYrmJv.js} +1 -1
  17. package/dist/client/assets/{Globe04-BkNwdwoM.js → Globe04-BHgzUZy8.js} +1 -1
  18. package/dist/client/assets/{Image01-DxuLkpjX.js → Image01-Ca0i2mzS.js} +1 -1
  19. package/dist/client/assets/{Key01-Qdm6kw39.js → Key01-Bv_pipnz.js} +1 -1
  20. package/dist/client/assets/{Link01-B4M7ojFg.js → Link01-vSc5x3Bn.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-CJN7aOrV.js → LinkBroken01-C8p4Wo5b.js} +1 -1
  22. package/dist/client/assets/{Monitor01-CHS3e170.js → Monitor01--o8UwWGt.js} +1 -1
  23. package/dist/client/assets/{Play-Da27xlG_.js → Play-Cf-3VNEt.js} +1 -1
  24. package/dist/client/assets/{Plus-D0ucptrV.js → Plus-BPcCtngU.js} +1 -1
  25. package/dist/client/assets/{ReferenceLine-CoS52beo.js → ReferenceLine-CZu5hBwf.js} +1 -1
  26. package/dist/client/assets/{SearchMd-0qnilUuy.js → SearchMd-DqEK_DOV.js} +1 -1
  27. package/dist/client/assets/{Sector-CKh2L0yG.js → Sector-DdZAGjV7.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-DV74WoBV.js → ShoppingBag01-PFUS9e0t.js} +1 -1
  29. package/dist/client/assets/{Sun-D0O3J2yf.js → Sun-eU5CLU87.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-Ba0pyLay.js → SwitchHorizontal01-BGjFR9KE.js} +1 -1
  31. package/dist/client/assets/{Tool01-C0454p2c.js → Tool01-Ug2p294_.js} +1 -1
  32. package/dist/client/assets/{Trash01-CyxedK0n.js → Trash01-Xpxk5zpI.js} +1 -1
  33. package/dist/client/assets/{Upload01-BWpYXx52.js → Upload01-D14Q1k_-.js} +1 -1
  34. package/dist/client/assets/{User01-Bb04dh7g.js → User01-tGRdCp2F.js} +1 -1
  35. package/dist/client/assets/{UserSquare-B_weldPC.js → UserSquare-C_0nfX2V.js} +1 -1
  36. package/dist/client/assets/{Users01-CNd-hMC8.js → Users01-DxA_yIKK.js} +1 -1
  37. package/dist/client/assets/{XClose-BeqwQ2Ei.js → XClose-CRuXcWlf.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-DWT1qHXA.js → ZoomOut-BKkBz5Lz.js} +1 -1
  39. package/dist/client/assets/{access-gate-mycOF7cD.js → access-gate-DQGa34O6.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-BkWp2fK0.js → add-connection-dialog-CrxqWLHC.js} +1 -1
  41. package/dist/client/assets/{agent-analytics-B5byH36W.js → agent-analytics-BsXr7E0h.js} +1 -1
  42. package/dist/client/assets/agent-app-CScNEVjT.js +1 -0
  43. package/dist/client/assets/{agent-assets-pGTlMleF.js → agent-assets-Nmgl0Bht.js} +1 -1
  44. package/dist/client/assets/{agent-automation-D5u89G2_.js → agent-automation-KIw24kwd.js} +1 -1
  45. package/dist/client/assets/{agent-automations-C4_XXiyv.js → agent-automations-DzZ1KR2l.js} +1 -1
  46. package/dist/client/assets/{agent-connect-sources-C5p-0QMu.js → agent-connect-sources-CS1Fawlh.js} +1 -1
  47. package/dist/client/assets/agent-deck-DnVf6eXY.js +1 -0
  48. package/dist/client/assets/{agent-e2e-Ce5bkH9z.js → agent-e2e-jRzRvCKY.js} +1 -1
  49. package/dist/client/assets/{agent-experiments-D4NapCfE.js → agent-experiments-B-k5fGOU.js} +1 -1
  50. package/dist/client/assets/agent-file-alt93QCe.js +1 -0
  51. package/dist/client/assets/{agent-hosting-ftgEMkT0.js → agent-hosting-BPzlodMl.js} +1 -1
  52. package/dist/client/assets/{agent-icon-C0Cpk_fI.js → agent-icon-DeF-Pwnu.js} +1 -1
  53. package/dist/client/assets/agent-library-e6Q9kL87.js +1 -0
  54. package/dist/client/assets/agent-library-file-DuAVI14c.js +1 -0
  55. package/dist/client/assets/{agent-monitor-C-1u284m.js → agent-monitor-CIHPsQTo.js} +1 -1
  56. package/dist/client/assets/{agent-overview-B5DYE-Ji.js → agent-overview-yYINKyA5.js} +1 -1
  57. package/dist/client/assets/{agent-releases-aHzQJT8R.js → agent-releases-DsfoHksu.js} +1 -1
  58. package/dist/client/assets/agent-settings-CsjZAmMJ.js +1 -0
  59. package/dist/client/assets/agent-site-editor-code-CTL6nplL.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-DyDxJPiY.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-sckNqSpj.js +1 -0
  62. package/dist/client/assets/{agent-site-editor-CPMVDSTZ.js → agent-site-editor-ucf0POve.js} +1 -1
  63. package/dist/client/assets/agent-view-CSLmaEfT.js +1 -0
  64. package/dist/client/assets/{agent-view-guard-DNE4CXyR.js → agent-view-guard-CalJ4-cy.js} +1 -1
  65. package/dist/client/assets/{agents-list-BeohBYvm.js → agents-list-DGfxOrSx.js} +1 -1
  66. package/dist/client/assets/{ai-providers-BYfFnvED.js → ai-providers-BNG3Pq5o.js} +1 -1
  67. package/dist/client/assets/{alert-fFwi0Rct.js → alert-Doqmk56v.js} +1 -1
  68. package/dist/client/assets/{alert-dialog-DBOmU5EL.js → alert-dialog-DlwY2mBI.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-BSFzvx60.js → analytics-sections-Dd9YiSBR.js} +1 -1
  70. package/dist/client/assets/{api-keys-CjBRjWKE.js → api-keys-1ccIE6pI.js} +1 -1
  71. package/dist/client/assets/api-keys-B0NOOdkt.js +1 -0
  72. package/dist/client/assets/{app-editor-9oqlCdGz.js → app-editor-BIue3kOR.js} +1 -1
  73. package/dist/client/assets/{asset-utils-DRLxCAgr.js → asset-utils-2OOO4Yxi.js} +1 -1
  74. package/dist/client/assets/{auth-BPJq9uZN.js → auth-BdGh-8AS.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-D2arJj-l.js → auth-catchall-eV8hRYix.js} +1 -1
  76. package/dist/client/assets/{auth-entry-BUYS1aRG.js → auth-entry-CWOOzYKd.js} +1 -1
  77. package/dist/client/assets/{auth-split-layout-B60d6um2.js → auth-split-layout-DU8QZJ8d.js} +1 -1
  78. package/dist/client/assets/{authenticate-and-persist-oauth-CEKJsXYr.js → authenticate-and-persist-oauth-nsYJn_2g.js} +1 -1
  79. package/dist/client/assets/{automation-list-row-BKl9kQg2.js → automation-list-row-19GG3R6A.js} +1 -1
  80. package/dist/client/assets/{automation-runs-Bc4ZG8Cd.js → automation-runs-dSOAvyQz.js} +1 -1
  81. package/dist/client/assets/{automations-Byx2iIlC.js → automations-DNcjd_bB.js} +1 -1
  82. package/dist/client/assets/{autosend-BRrz2Y4f.js → autosend-BtiCWD94.js} +1 -1
  83. package/dist/client/assets/{avatar--bVWjvdf.js → avatar-DQNWmybT.js} +1 -1
  84. package/dist/client/assets/{badge-O9zNBxIS.js → badge-MCqrr8fM.js} +1 -1
  85. package/dist/client/assets/{block-document-EMb4OAJD.js → block-document-DQPZERUD.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-CswMFv9v.js → blocks-preview-workspace-context-DVjcSoNC.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-CXGOEMTq.js → blocks-tab-states-DzpOdO2C.js} +3 -3
  88. package/dist/client/assets/{blog-schema-BBgfoIQP.js → blog-schema-aRJCR6HM.js} +1 -1
  89. package/dist/client/assets/{board-analytics-BnyzhqyI.js → board-analytics-BI7gAn9b.js} +1 -1
  90. package/dist/client/assets/{buckets-CScAlRwn.js → buckets-VKui74jg.js} +1 -1
  91. package/dist/client/assets/{build-improve-prompt-doc-DZKU2eq8.js → build-improve-prompt-doc-B5xD6YpI.js} +1 -1
  92. package/dist/client/assets/{calendar-DsjGYQg2.js → calendar-NDXBts7_.js} +1 -1
  93. package/dist/client/assets/{capability-load-error-D5sZmG67.js → capability-load-error-BuYxZf-L.js} +1 -1
  94. package/dist/client/assets/{category-editor-TdrhQc2d.js → category-editor-DaVXWcjz.js} +1 -1
  95. package/dist/client/assets/{chart-CdJbyFrF.js → chart-BQCQoKhk.js} +1 -1
  96. package/dist/client/assets/{chat-context-Dnn7Mdeu.js → chat-context-CGgDKLoI.js} +1 -1
  97. package/dist/client/assets/{chat-draft-QF0rnEVx.js → chat-draft-BLQR50du.js} +1 -1
  98. package/dist/client/assets/{checkbox-_9cHZuVh.js → checkbox-Dkp4p5XQ.js} +1 -1
  99. package/dist/client/assets/{choose-editor-DjeEuPt0.js → choose-editor-Dl5YQ9PQ.js} +1 -1
  100. package/dist/client/assets/{cli-auth-success-s_E43D3X.js → cli-auth-success-yfNGYJu1.js} +1 -1
  101. package/dist/client/assets/{client-icons-CnZ15Laz.js → client-icons-B_zKBg36.js} +1 -1
  102. package/dist/client/assets/cms-settings-editor-BN72z7zx.js +1 -0
  103. package/dist/client/assets/{collapsible-CzHslCH_.js → collapsible-DC7y5Los.js} +1 -1
  104. package/dist/client/assets/{collection-detail-DRUItL6q.js → collection-detail-DlDT6vQ9.js} +1 -1
  105. package/dist/client/assets/{collection-display-button-BLKqGGaY.js → collection-display-button-CLVPueRo.js} +1 -1
  106. package/dist/client/assets/{collection-search-BiaY0GVT.js → collection-search-By8NjPfM.js} +1 -1
  107. package/dist/client/assets/{collection-table-wrapper-ymUDH0Iy.js → collection-table-wrapper-B4h8x2dc.js} +1 -1
  108. package/dist/client/assets/{collection-tabs-BLEBGgk-.js → collection-tabs-mcOoP5Dy.js} +1 -1
  109. package/dist/client/assets/{column-rules-B7xl4xQZ.js → column-rules-CsMTnhOl.js} +1 -1
  110. package/dist/client/assets/{combobox-CdVSN4C-.js → combobox-ub2_k_zt.js} +1 -1
  111. package/dist/client/assets/{coming-soon-page-DU1ARjbb.js → coming-soon-page-BYV_n6px.js} +1 -1
  112. package/dist/client/assets/{command-BwFTVPCg.js → command-D4hDkkTy.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-wyIo_eN7.js → companion-mcps-section-BSAJrsSk.js} +1 -1
  114. package/dist/client/assets/{config-D3pVqIKI.js → config-YgZ-3rie.js} +1 -1
  115. package/dist/client/assets/{connect-DBOmX-8C.js → connect-Ye3vTIux.js} +1 -1
  116. package/dist/client/assets/{connect-layout-BI0GOmFg.js → connect-layout-B_22_91k.js} +1 -1
  117. package/dist/client/assets/{connection-DdsAVMED.js → connection-L0IOnxQL.js} +1 -1
  118. package/dist/client/assets/{connection-card-DquRZmyq.js → connection-card-VTqJv3VR.js} +1 -1
  119. package/dist/client/assets/{connection-detail-C2_9jZRg.js → connection-detail-Cq27HXRr.js} +1 -1
  120. package/dist/client/assets/{connection-form-helpers-CppaGv96.js → connection-form-helpers-CGHpR5fJ.js} +1 -1
  121. package/dist/client/assets/{connections-CPYwbOBM.js → connections-7gS929_D.js} +1 -1
  122. package/dist/client/assets/{content-tab-BGK1XaKL.js → content-tab-aADEXlYN.js} +3 -3
  123. package/dist/client/assets/{context-D2VrQMS2.js → context-D0MYn7m7.js} +1 -1
  124. package/dist/client/assets/{context-menu-D1SjU6l-.js → context-menu-o9g6FS55.js} +1 -1
  125. package/dist/client/assets/{context-shell-CKI9uW2C.js → context-shell-CGEiLl4q.js} +3 -3
  126. package/dist/client/assets/{core.esm-DnTbXhD8.js → core.esm-BjDph18k.js} +1 -1
  127. package/dist/client/assets/{create-organization-dialog-BIJBsiHg.js → create-organization-dialog-DGSfBHq9.js} +1 -1
  128. package/dist/client/assets/{daily-pulse-Drk3CnaM.js → daily-pulse-B8CfUsCm.js} +1 -1
  129. package/dist/client/assets/{discover-BDubv_ZJ.js → discover-8XW9Qw09.js} +1 -1
  130. package/dist/client/assets/{domain-settings-CCe7QH7l.js → domain-settings-D0GFJxX4.js} +1 -1
  131. package/dist/client/assets/{drawer-CTSig7Vj.js → drawer-DlCF45Q0.js} +1 -1
  132. package/dist/client/assets/{editor-B8TTVjFi.js → editor-BdcTVQDa.js} +1 -1
  133. package/dist/client/assets/{editor-classes-BUSqIt7e.js → editor-classes-DZr3o3GG.js} +1 -1
  134. package/dist/client/assets/{empty-state-DIpCFPkI.js → empty-state-CGdhhxwn.js} +1 -1
  135. package/dist/client/assets/{empty-state-DweMe7pE.js → empty-state-gAZRZ0i8.js} +1 -1
  136. package/dist/client/assets/{extract-connection-data-C2M3P64h.js → extract-connection-data-DXn9w9lL.js} +1 -1
  137. package/dist/client/assets/{feature-gate-hxH8uzOp.js → feature-gate-Bri_WNYh.js} +1 -1
  138. package/dist/client/assets/{feature-paywall-5JkjVbP-.js → feature-paywall-oJbClSRc.js} +1 -1
  139. package/dist/client/assets/{file-explorer-CsGruqCR.js → file-explorer-DU2mc2Lb.js} +1 -1
  140. package/dist/client/assets/{file-preview-ySEcJuT1.js → file-preview-D_biMFJs.js} +1 -1
  141. package/dist/client/assets/{file-share-button-BcJLFZEu.js → file-share-button-Ciq5jDCO.js} +1 -1
  142. package/dist/client/assets/{file-type-icon-CBmuqe9u.js → file-type-icon-YdZxxv_V.js} +1 -1
  143. package/dist/client/assets/flat-project-B6LNuW-w.js +1 -0
  144. package/dist/client/assets/{folder-icon-BbG7eONI.js → folder-icon-CM4478FY.js} +1 -1
  145. package/dist/client/assets/{form-CGiGUgzW.js → form-PY0dh9eA.js} +1 -1
  146. package/dist/client/assets/{general-40Wry3sr.js → general-BBEU5SQb.js} +1 -1
  147. package/dist/client/assets/{home-CuekDzCb.js → home-CRzzoJc4.js} +1 -1
  148. package/dist/client/assets/{hosted-publish-feedback-Dj41Gksp.js → hosted-publish-feedback-B8yni-1P.js} +1 -1
  149. package/dist/client/assets/{icon-button-D0a6m1Sz.js → icon-button-bWdE1kh9.js} +1 -1
  150. package/dist/client/assets/{index-D_cOu6AK.js → index-2uTSdbBq.js} +1 -1
  151. package/dist/client/assets/{index-DMApSpFV.js → index-B95goRjI.js} +1 -1
  152. package/dist/client/assets/{index-fdN8eXM2.js → index-BRQYvW_2.js} +1 -1
  153. package/dist/client/assets/{index-CQodxdYF.js → index-BiYLgE9h.js} +1 -1
  154. package/dist/client/assets/{index-C5AhGK9V.js → index-C-FWiUeO.js} +3 -3
  155. package/dist/client/assets/{index-Ct79h6Jq.js → index-CHynF4t3.js} +1 -1
  156. package/dist/client/assets/{index-C1nhsm_w.js → index-CJni2i7d.js} +1 -1
  157. package/dist/client/assets/{index-FsB7lUoK.js → index-CV3tbWK4.js} +1 -1
  158. package/dist/client/assets/{index-DZWoZhT5.js → index-CoRXAeTB.js} +1 -1
  159. package/dist/client/assets/{index-BL53jR3y.js → index-D43cboe_.js} +1 -1
  160. package/dist/client/assets/{index-BgaKQ-Q-.js → index-DIHkisxi.js} +1 -1
  161. package/dist/client/assets/{index-eirpwNKj.js → index-DjAPw3FZ.js} +2 -2
  162. package/dist/client/assets/{index-DOjuGDiB.js → index-bCTed2tb.js} +1 -1
  163. package/dist/client/assets/{index-YSmMnHTP.js → index-d6hp7-E7.js} +1 -1
  164. package/dist/client/assets/{index-Cn8WHbCR.js → index-fwWRoUIR.js} +1 -1
  165. package/dist/client/assets/{index-redirect-Dk2uc0Gh.js → index-redirect-CDsFqeNY.js} +1 -1
  166. package/dist/client/assets/{index-CEYZyBqV.js → index-vepJw596.js} +1 -1
  167. package/dist/client/assets/{infiniteQueryObserver-47K3Cxqe.js → infiniteQueryObserver-4ZDstsFa.js} +1 -1
  168. package/dist/client/assets/{infra-billing-CE_ELMRw.js → infra-billing-C2Fx7aIm.js} +1 -1
  169. package/dist/client/assets/{input-BH9IvcPC.js → input-CMWKaQuM.js} +1 -1
  170. package/dist/client/assets/{input-DdEOORL2.js → input-DiIRBTgb.js} +3 -3
  171. package/dist/client/assets/{integration-icon-CKknGZhR.js → integration-icon-7gJWUFS2.js} +1 -1
  172. package/dist/client/assets/{jira-icon-DreVKI44.js → jira-icon-m-27rEgi.js} +1 -1
  173. package/dist/client/assets/{label-BL4W2KPI.js → label-D4JBPN7q.js} +1 -1
  174. package/dist/client/assets/{layout-B6GTwWgR.js → layout-D-WO_5nK.js} +1 -1
  175. package/dist/client/assets/{legacy-agents-deep-h-k8kxkI.js → legacy-agents-deep-Byg7XYZi.js} +1 -1
  176. package/dist/client/assets/{legacy-main-redirect-D6Wq6vr4.js → legacy-main-redirect-C0KkBzuS.js} +1 -1
  177. package/dist/client/assets/library-Do1cxIgP.js +1 -0
  178. package/dist/client/assets/{library-tab-6tliBei-.js → library-tab-nnHKU6n2.js} +1 -1
  179. package/dist/client/assets/{login-2dWlgBxu.js → login-DsUB3uQj.js} +1 -1
  180. package/dist/client/assets/{markdown-BjPIZk-u.js → markdown-Bj3WyP0d.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-afmtzlAD.js → mcp-app-renderer-cIFgImrX.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-DJh33UXx.js → mcp-oauth-DXt2H3qs.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-DqMHjHip.js → mcp-oauth-ubL7A6O8.js} +1 -1
  184. package/dist/client/assets/{members-De3ITOSK.js → members-CvgFB3s-.js} +1 -1
  185. package/dist/client/assets/{memory-Bd-agrjz.js → memory-BF1uVIim.js} +1 -1
  186. package/dist/client/assets/{mini-report-page-qugNBWyG.js → mini-report-page-y5KfS4tn.js} +1 -1
  187. package/dist/client/assets/{mock-board-DsyG_BKd.js → mock-board-BKG-LWFe.js} +1 -1
  188. package/dist/client/assets/{monaco-editor-frZbpSC4.js → monaco-editor-CKrlIC9T.js} +1 -1
  189. package/dist/client/assets/monitoring-BPhxBDd5.js +1 -0
  190. package/dist/client/assets/{monitoring-stats-row-CbmvtcQ8.js → monitoring-stats-row-HV07Y8PZ.js} +1 -1
  191. package/dist/client/assets/{multi-select-mMhkiaxx.js → multi-select-DD-AQA0o.js} +1 -1
  192. package/dist/client/assets/{mustache-BE_jNzrX.js → mustache-DEGJahrS.js} +1 -1
  193. package/dist/client/assets/{new-project-dialog-BMxQGh6T.js → new-project-dialog-DRh9zuKa.js} +1 -1
  194. package/dist/client/assets/{oauth-callback-NxseMyYt.js → oauth-callback-DZJS_AT0.js} +1 -1
  195. package/dist/client/assets/{oauth-callback-ai-provider-JHRZj7cm.js → oauth-callback-ai-provider-BJubcWsa.js} +1 -1
  196. package/dist/client/assets/{onboarding-BNSpsBHl.js → onboarding-Cd27VqU6.js} +1 -1
  197. package/dist/client/assets/{openai-conversation-B9wySkKU.js → openai-conversation-UxlPvOfF.js} +1 -1
  198. package/dist/client/assets/{optimistic-project-sidebar-views-DqJuR4Ij.js → optimistic-project-sidebar-views-Dv80C_rk.js} +1 -1
  199. package/dist/client/assets/{order-monitor-day-DTRXFSPm.js → order-monitor-day-EUZZaMp3.js} +1 -1
  200. package/dist/client/assets/{organization-choice-D_pQMc9T.js → organization-choice-BGM_rbWT.js} +1 -1
  201. package/dist/client/assets/{orgs-CsIZaTyi.js → orgs-BV_vEF7j.js} +1 -1
  202. package/dist/client/assets/{page-seo-form-DAN_oC73.js → page-seo-form-BH-BJ6qw.js} +1 -1
  203. package/dist/client/assets/{pair-BERDoCro.js → pair-DC812Nih.js} +1 -1
  204. package/dist/client/assets/plan-05_HVNuz.js +1 -0
  205. package/dist/client/assets/{plan-ladder-DL1JtpvS.js → plan-ladder-PV6fdtQs.js} +1 -1
  206. package/dist/client/assets/{popover-oZJ3oDMA.js → popover-fq0tjxPf.js} +1 -1
  207. package/dist/client/assets/{post-calendar-DfH5svUX.js → post-calendar-BRi-XhNu.js} +1 -1
  208. package/dist/client/assets/{post-editor-hWgegmwE.js → post-editor-HjQ5CpOo.js} +1 -1
  209. package/dist/client/assets/{preview-content-PTYjaSyC.js → preview-content-BIaRb_kp.js} +1 -1
  210. package/dist/client/assets/{preview-dialog-4ft9O22y.js → preview-dialog-DRTfEqCp.js} +1 -1
  211. package/dist/client/assets/{preview-panel-DM51Fpvo.js → preview-panel-Cic9CX2M.js} +1 -1
  212. package/dist/client/assets/{preview-tab-CNeiDQgU.js → preview-tab-C83Vx0Mi.js} +3 -3
  213. package/dist/client/assets/{product-picker-dialog-BDff_MLx.js → product-picker-dialog-Bals-alJ.js} +1 -1
  214. package/dist/client/assets/{profile-_0v0w_uk.js → profile-D5xJAT34.js} +1 -1
  215. package/dist/client/assets/{project-app-view-D_QJpB96.js → project-app-view-Cj07pABw.js} +1 -1
  216. package/dist/client/assets/{project-apps-BRjQ6ES3.js → project-apps-D71RwGSP.js} +1 -1
  217. package/dist/client/assets/{project-feed-CYGKnY4Q.js → project-feed-1ErfglDo.js} +1 -1
  218. package/dist/client/assets/{project-icon-D_aSXDOt.js → project-icon-CZlCW1ie.js} +1 -1
  219. package/dist/client/assets/project-reports-D49xSOrs.js +1 -0
  220. package/dist/client/assets/project-tasks-WMe77gba.js +1 -0
  221. package/dist/client/assets/{projects-empty-state-BdoV9-x8.js → projects-empty-state-ComKFNOr.js} +1 -1
  222. package/dist/client/assets/{projects-BmIdJmG4.js → projects-utpjVaXN.js} +1 -1
  223. package/dist/client/assets/{prompts-BSkHwl6y.js → prompts-D3kehQbi.js} +1 -1
  224. package/dist/client/assets/record-editor-DBsKbQap.js +1 -0
  225. package/dist/client/assets/{redirect-editor-CtFVIrY2.js → redirect-editor-CjT7iAl-.js} +1 -1
  226. package/dist/client/assets/{reports-CLhp1Pr5.js → reports-C4Lk2vHf.js} +1 -1
  227. package/dist/client/assets/reports-DWVNCveo.js +1 -0
  228. package/dist/client/assets/{reports-onboarding-C8PLHLPc.js → reports-onboarding-CZWTNr3A.js} +1 -1
  229. package/dist/client/assets/{reports-tab-DDrFZP3m.js → reports-tab-DSPAWkBb.js} +2 -2
  230. package/dist/client/assets/{repositories-DoNhvU-g.js → repositories-8h94CkIp.js} +1 -1
  231. package/dist/client/assets/repositories-BOZH7UzC.js +1 -0
  232. package/dist/client/assets/{repository-binding-BNbbDYQQ.js → repository-binding-Dd_B1wfM.js} +1 -1
  233. package/dist/client/assets/{repository-import-picker-CMsE5EOk.js → repository-import-picker-BrYPIHbh.js} +1 -1
  234. package/dist/client/assets/{repository-picker-DOtWfpYo.js → repository-picker-1MzRX-H7.js} +1 -1
  235. package/dist/client/assets/{require-capability-CBG6rA7o.js → require-capability-yDcZ2JQa.js} +1 -1
  236. package/dist/client/assets/{required-auth-layout-Dz1OowhH.js → required-auth-layout-BxVO9mgl.js} +1 -1
  237. package/dist/client/assets/{reset-password-v_UkU5Xg.js → reset-password-C49JkdXA.js} +1 -1
  238. package/dist/client/assets/{resizable-CWaYgp8D.js → resizable-D_ipbPgS.js} +1 -1
  239. package/dist/client/assets/{resolve-tab-icon-B2EU-8BB.js → resolve-tab-icon-Byb93xhw.js} +1 -1
  240. package/dist/client/assets/{review-settings-BZhzjgRq.js → review-settings-C6E-Bw8y.js} +1 -1
  241. package/dist/client/assets/{roles-Y2HKVQnL.js → roles-CAwPb5fO.js} +1 -1
  242. package/dist/client/assets/route-BTQLh0S6.js +1 -0
  243. package/dist/client/assets/{route-7L_TW384.js → route-BmBKnc7t.js} +1 -1
  244. package/dist/client/assets/{route-DPCqrSJX.js → route-CBMvGMnA.js} +1 -1
  245. package/dist/client/assets/{sandbox-lifecycle-context-Pb8-9nPA.js → sandbox-lifecycle-context-BzWTxRjc.js} +1 -1
  246. package/dist/client/assets/{schema-C1o97tHt.js → schema-CEZ3_pMV.js} +1 -1
  247. package/dist/client/assets/{schema-CviV2OeO.js → schema-CTZ2buw6.js} +1 -1
  248. package/dist/client/assets/{scroll-area-D2V3l6oK.js → scroll-area-C7CRSfWv.js} +1 -1
  249. package/dist/client/assets/{search-input-Bq9urCGV.js → search-input-D_LVZNpa.js} +1 -1
  250. package/dist/client/assets/{search-toggle-DwZ6dTB5.js → search-toggle-BPTT4hLg.js} +1 -1
  251. package/dist/client/assets/{secret-ciphertext-BkXDtxC6.js → secret-ciphertext-D4M9tY0M.js} +1 -1
  252. package/dist/client/assets/{secret-picker-BoK4uSMi.js → secret-picker-CvHiZDPS.js} +1 -1
  253. package/dist/client/assets/{secrets-C0qlLAI4.js → secrets-RdCGJOsH.js} +1 -1
  254. package/dist/client/assets/{sections-CR_pzMlx.js → sections-CWZ2z5m1.js} +1 -1
  255. package/dist/client/assets/{sections-editor-BK3_J9sX.js → sections-editor-BxvR-YOF.js} +1 -1
  256. package/dist/client/assets/{select-C5-hj9Ts.js → select-CowaxA54.js} +1 -1
  257. package/dist/client/assets/{select-model-CwXefPFG.js → select-model-9jlQrG56.js} +1 -1
  258. package/dist/client/assets/{seo-editor-CSy5-rpo.js → seo-editor-dhnPdQ71.js} +1 -1
  259. package/dist/client/assets/{separator-BD6ld_rn.js → separator-CXpOKLhH.js} +1 -1
  260. package/dist/client/assets/settings-tab-cH5EHrjn.js +1 -0
  261. package/dist/client/assets/{sheet-s29eirRf.js → sheet-DJxxN2qW.js} +1 -1
  262. package/dist/client/assets/{shell-layout-DS0Ye6S1.js → shell-layout-CCXDhne-.js} +1 -1
  263. package/dist/client/assets/site-editor-Dgv3Mgur.js +1 -0
  264. package/dist/client/assets/{site-editor-toast-C5e-1uEv.js → site-editor-toast-yWBrscDo.js} +1 -1
  265. package/dist/client/assets/{skills-pQpcosHp.js → skills-BlaOj1S-.js} +1 -1
  266. package/dist/client/assets/{slider-P84DbLvc.js → slider-BNL65434.js} +1 -1
  267. package/dist/client/assets/{sortable.esm-DMQ-WncJ.js → sortable.esm-CffOom9k.js} +1 -1
  268. package/dist/client/assets/{sso-BaZj_16B.js → sso-tXxuMVkw.js} +1 -1
  269. package/dist/client/assets/{suggestion-BtCYsnHk.js → suggestion-CuYIU5Nv.js} +1 -1
  270. package/dist/client/assets/{switch-COyvKYHV.js → switch-jFgl7iT_.js} +1 -1
  271. package/dist/client/assets/{symbol-DE4EJv1h.js → symbol-CLrIFhMo.js} +1 -1
  272. package/dist/client/assets/{synced-repos-BchTuYeZ.js → synced-repos-CpEKcy1N.js} +1 -1
  273. package/dist/client/assets/{tab-icon-glyph-Bd77emAf.js → tab-icon-glyph-hHd2Az-Y.js} +1 -1
  274. package/dist/client/assets/{table-E7GbRtTD.js → table-piPFXrR-.js} +1 -1
  275. package/dist/client/assets/{tabs-DWtBgLg_.js → tabs-D3aHw45h.js} +1 -1
  276. package/dist/client/assets/{task-assignee-avatar-DTLURih6.js → task-assignee-avatar-BhSmfeHE.js} +1 -1
  277. package/dist/client/assets/{task-board-fU-Cl8m2.js → task-board-jGxaINzs.js} +1 -1
  278. package/dist/client/assets/{task-route-DuNmXwWp.js → task-route-C1NRExZ4.js} +1 -1
  279. package/dist/client/assets/{task-status-wpuxJDO5.js → task-status-Dgc_qXrK.js} +1 -1
  280. package/dist/client/assets/taskboard-analytics-Cc7xLiYJ.js +1 -0
  281. package/dist/client/assets/{tasks-B4X2VVxT.js → tasks-74e9M9v_.js} +1 -1
  282. package/dist/client/assets/tasks-q5I9pn3S.js +1 -0
  283. package/dist/client/assets/{textarea-BDL4MHBS.js → textarea-g4W4EEJV.js} +1 -1
  284. package/dist/client/assets/{thread-analytics-0ZqqwnzE.js → thread-analytics-BeecXXf9.js} +1 -1
  285. package/dist/client/assets/{thread-intent-DzC9Ji46.js → thread-intent-U667QxJn.js} +1 -1
  286. package/dist/client/assets/{thread-route-D0aLhRkR.js → thread-route-BXNLST2v.js} +1 -1
  287. package/dist/client/assets/{thread-route-DuRhXh4I.js → thread-route-_azg3sPx.js} +1 -1
  288. package/dist/client/assets/{thread-sheet-body-VXXOBFly.js → thread-sheet-body-BLZwnPMr.js} +1 -1
  289. package/dist/client/assets/{time-range-picker-vYJ0Kk8S.js → time-range-picker-BpCt7APB.js} +1 -1
  290. package/dist/client/assets/{toggle-group-CRigS0R4.js → toggle-group-CUDFWI8h.js} +1 -1
  291. package/dist/client/assets/{tool-namespace-DPiptzHh.js → tool-namespace-WBa95YMk.js} +1 -1
  292. package/dist/client/assets/{toolbar-icon-button-uuYUYVtr.js → toolbar-icon-button-CTdoQK-j.js} +1 -1
  293. package/dist/client/assets/{tooltip-DX3EibzC.js → tooltip-Cn8xKOs3.js} +1 -1
  294. package/dist/client/assets/{tooltipContext-DiSBImQr.js → tooltipContext-DPfTt5uJ.js} +1 -1
  295. package/dist/client/assets/{track-D-YCF_rE.js → track-CKD_o69Z.js} +1 -1
  296. package/dist/client/assets/{types-BmDn-Bmr.js → types-C_3VJftQ.js} +1 -1
  297. package/dist/client/assets/{url-slug-BjYL2qGa.js → url-slug-CDSsr_-I.js} +1 -1
  298. package/dist/client/assets/{usage-stats-DViGt9Z5.js → usage-stats-Cgvbigdd.js} +1 -1
  299. package/dist/client/assets/{use-ai-providers-XvM2-sU7.js → use-ai-providers-CcMoAKt2.js} +1 -1
  300. package/dist/client/assets/{use-automations-BP7Qo80Q.js → use-automations-CyRwkMiw.js} +1 -1
  301. package/dist/client/assets/{use-autosave-DLpdlg6z.js → use-autosave-o1UGCuaC.js} +1 -1
  302. package/dist/client/assets/{use-chat-layout-state-BEn27bqi.js → use-chat-layout-state-CjcoHJNS.js} +1 -1
  303. package/dist/client/assets/{use-clock-tick--0G9fYV8.js → use-clock-tick-Ba-YyXfj.js} +1 -1
  304. package/dist/client/assets/{use-connect-companion-Byfe_uLr.js → use-connect-companion-Qyek3iaQ.js} +1 -1
  305. package/dist/client/assets/{use-connection-C4wyl2ru.js → use-connection-K7ZRp1go.js} +1 -1
  306. package/dist/client/assets/{use-content-sync-BdbVP04j.js → use-content-sync-C7GSdrCv.js} +1 -1
  307. package/dist/client/assets/{use-copy-BS5soA37.js → use-copy-B2CiMRws.js} +1 -1
  308. package/dist/client/assets/{use-create-virtual-mcp-Bgr2d-1k.js → use-create-virtual-mcp-Be-PSH8v.js} +1 -1
  309. package/dist/client/assets/{use-date-fns-locale-D_SHRVT8.js → use-date-fns-locale-BtERR385.js} +1 -1
  310. package/dist/client/assets/{use-debounced-autosave-CteI237O.js → use-debounced-autosave-C7gpczsa.js} +1 -1
  311. package/dist/client/assets/{use-debounced-value-DGbphRsM.js → use-debounced-value-B8h9GHgw.js} +1 -1
  312. package/dist/client/assets/{use-deco-credits-B7vnPi2P.js → use-deco-credits-BLtT_99v.js} +1 -1
  313. package/dist/client/assets/{use-decopilot-events-DTU6iW_4.js → use-decopilot-events-tAuPN_q4.js} +1 -1
  314. package/dist/client/assets/{use-delete-connection-v7vjwrBf.js → use-delete-connection-DdA2eUwf.js} +1 -1
  315. package/dist/client/assets/{use-deployment-admin-Cr49Ea_9.js → use-deployment-admin-B-AsTGAj.js} +1 -1
  316. package/dist/client/assets/{use-ensure-project-folder-BiBJcIU0.js → use-ensure-project-folder-1zJV-ebL.js} +1 -1
  317. package/dist/client/assets/{use-fast-preview-draft-url-CUkbW62G.js → use-fast-preview-draft-url-CudEspao.js} +1 -1
  318. package/dist/client/assets/{use-file-configs-dTlYe09H.js → use-file-configs-C_QUQ8GN.js} +1 -1
  319. package/dist/client/assets/{use-inbox-feed-d4Pg1vDp.js → use-inbox-feed-20OcgQCQ.js} +1 -1
  320. package/dist/client/assets/{use-infinite-scroll-DYPYtqG2.js → use-infinite-scroll-BP0LI3QU.js} +1 -1
  321. package/dist/client/assets/{use-join-requests-CgaNoIHU.js → use-join-requests-CKw0dC-f.js} +1 -1
  322. package/dist/client/assets/{use-main-panel-tabs-bEgIKNUF.js → use-main-panel-tabs-BLDJnI0j.js} +1 -1
  323. package/dist/client/assets/{use-main-schema-v8-BpRBE2if.js → use-main-schema-v8-CyJzgrXz.js} +1 -1
  324. package/dist/client/assets/{use-mcp-auth-status-XO9Yp1aB.js → use-mcp-auth-status-Dy1xU38X.js} +1 -1
  325. package/dist/client/assets/{use-mcp-client-DA050uNw.js → use-mcp-client-CS_M4RkG.js} +1 -1
  326. package/dist/client/assets/{use-mcp-prompts-C_C6tlAY.js → use-mcp-prompts-CPyQYK7C.js} +1 -1
  327. package/dist/client/assets/{use-mcp-tools-DDRwYO6T.js → use-mcp-tools-D9Ee_oS_.js} +1 -1
  328. package/dist/client/assets/{use-members-C4ay671C.js → use-members-BBgUoW6G.js} +1 -1
  329. package/dist/client/assets/{use-mobile-BsNhhNj1.js → use-mobile-BKCNcL5w.js} +1 -1
  330. package/dist/client/assets/{use-navigate-to-agent-y0z5Ii2q.js → use-navigate-to-agent-BRsDJt0-.js} +1 -1
  331. package/dist/client/assets/{use-open-billing-url-B2tbuRiV.js → use-open-billing-url-BT_PQxjy.js} +1 -1
  332. package/dist/client/assets/{use-org-auth-client-Cn5Gs8uE.js → use-org-auth-client-DboLlm0U.js} +1 -1
  333. package/dist/client/assets/{use-org-fs-QKl-Epzm.js → use-org-fs-CqBTb_bN.js} +1 -1
  334. package/dist/client/assets/{use-org-repo-syncs-DkE7BEdc.js → use-org-repo-syncs-CrHKManu.js} +1 -1
  335. package/dist/client/assets/{use-org-sso-fQ5NHD0A.js → use-org-sso-CPfWfgUD.js} +1 -1
  336. package/dist/client/assets/{use-organization-roles-DDX-q-Qm.js → use-organization-roles-GM12gN8m.js} +1 -1
  337. package/dist/client/assets/{use-organization-settings-BAyreMqm.js → use-organization-settings-KcG74cJs.js} +1 -1
  338. package/dist/client/assets/{use-panel-navigate-CYHQ9H_T.js → use-panel-navigate-BnKH_DED.js} +1 -1
  339. package/dist/client/assets/{use-project-native-view-presence-DG_OsicQ.js → use-project-native-view-presence-6zlafMD0.js} +1 -1
  340. package/dist/client/assets/{use-project-scope-DTa66aFc.js → use-project-scope-DLt89uaH.js} +1 -1
  341. package/dist/client/assets/{use-recent-apps-BkiI05bl.js → use-recent-apps-Beh0P-eJ.js} +1 -1
  342. package/dist/client/assets/{use-releases-3QZUJcU8.js → use-releases-CLwewD1A.js} +1 -1
  343. package/dist/client/assets/{use-reports-diagnostic-CFGQSOke.js → use-reports-diagnostic-BWqDIpUl.js} +1 -1
  344. package/dist/client/assets/{use-secrets-CFDBcYIs.js → use-secrets-BWS1Znk9.js} +1 -1
  345. package/dist/client/assets/{use-section-preview-base-Bi0fZdk_.js → use-section-preview-base-8d2ycoZ0.js} +1 -1
  346. package/dist/client/assets/{use-sidebar-collapsed-BDC4KJoA.js → use-sidebar-collapsed-DQVR9tzU.js} +1 -1
  347. package/dist/client/assets/{use-tags-Ck-mty1R.js → use-tags-DLPMXTJ_.js} +1 -1
  348. package/dist/client/assets/{use-task-board-analytics-K9XTOq2z.js → use-task-board-analytics-CtHDTWzg.js} +1 -1
  349. package/dist/client/assets/{use-task-board-events-Jz6kbe9R.js → use-task-board-events-3Dkuwhd-.js} +1 -1
  350. package/dist/client/assets/{use-task-board-item-prs-BGCAD4bx.js → use-task-board-item-prs-C-xbnweQ.js} +1 -1
  351. package/dist/client/assets/{use-task-metadata-CkrB-bRy.js → use-task-metadata-rKLv0cZj.js} +1 -1
  352. package/dist/client/assets/{use-thread-analytics-BNcqqwBS.js → use-thread-analytics-CoAOmWMe.js} +1 -1
  353. package/dist/client/assets/{use-thread-outputs-LnnMQYmj.js → use-thread-outputs-BvzhiS4m.js} +1 -1
  354. package/dist/client/assets/useInfiniteQuery-DwZtx0VJ.js +1 -0
  355. package/dist/client/assets/{useQueries-DsTjk3mN.js → useQueries-7fETpNi-.js} +1 -1
  356. package/dist/client/assets/useSuspenseInfiniteQuery-C9cYPm72.js +1 -0
  357. package/dist/client/assets/{users-CnjGVWpi.js → users-WRigaqVb.js} +1 -1
  358. package/dist/client/assets/{utils-CetO33tt.js → utils-Bv54OqIc.js} +1 -1
  359. package/dist/client/assets/{variant-calendar-BVQKG7Pz.js → variant-calendar-3vABqSwV.js} +1 -1
  360. package/dist/client/assets/{variant-draft-pointer-1XzXcLtg.js → variant-draft-pointer-BkoaUnwP.js} +1 -1
  361. package/dist/client/assets/{view-mode-toggle-BuqrnQGM.js → view-mode-toggle-B_PFkRZ8.js} +1 -1
  362. package/dist/client/assets/{virtual-mcp-Ux8j-_02.js → virtual-mcp-I0mUiSD3.js} +1 -1
  363. package/dist/client/assets/{watch-sse-pool-YHoQCS1I.js → watch-sse-pool-GA-vauaD.js} +1 -1
  364. package/dist/client/index.html +1 -1
  365. package/dist/server/server.js +193 -193
  366. package/package.json +1 -1
  367. package/dist/client/assets/agent-app-C8Q8eJy6.js +0 -1
  368. package/dist/client/assets/agent-deck-XMMtyHjd.js +0 -1
  369. package/dist/client/assets/agent-file-BNo94gQC.js +0 -1
  370. package/dist/client/assets/agent-library-GkmC1ahU.js +0 -1
  371. package/dist/client/assets/agent-library-file-6MKr5gfE.js +0 -1
  372. package/dist/client/assets/agent-settings-5nByAqOM.js +0 -1
  373. package/dist/client/assets/agent-site-editor-code-0fxD14rb.js +0 -2
  374. package/dist/client/assets/agent-site-editor-content-BN4VoKnm.js +0 -1
  375. package/dist/client/assets/agent-site-editor-preview-BXzeSsT8.js +0 -1
  376. package/dist/client/assets/agent-view-hlAx7Qgd.js +0 -1
  377. package/dist/client/assets/api-keys-Dvm1thDW.js +0 -1
  378. package/dist/client/assets/cms-settings-editor-DLURX7ZR.js +0 -1
  379. package/dist/client/assets/flat-project-CcO2Ar9k.js +0 -1
  380. package/dist/client/assets/library-0gJacikj.js +0 -1
  381. package/dist/client/assets/monitoring-D5Nohicc.js +0 -1
  382. package/dist/client/assets/plan-N5Xy4KXF.js +0 -1
  383. package/dist/client/assets/project-reports-s2VJkQN9.js +0 -1
  384. package/dist/client/assets/project-tasks-DqRp61Xr.js +0 -1
  385. package/dist/client/assets/record-editor-BakkGf1Y.js +0 -1
  386. package/dist/client/assets/reports-DzmhhR-x.js +0 -1
  387. package/dist/client/assets/repositories-6gZ6hUD8.js +0 -1
  388. package/dist/client/assets/route-DXMOqHVl.js +0 -1
  389. package/dist/client/assets/settings-tab-DHN7ZjAa.js +0 -1
  390. package/dist/client/assets/site-editor-BfEYXklV.js +0 -1
  391. package/dist/client/assets/taskboard-analytics-jASQU8UF.js +0 -1
  392. package/dist/client/assets/tasks-DLjtcYlA.js +0 -1
  393. package/dist/client/assets/useInfiniteQuery-DhVIMVRh.js +0 -1
  394. package/dist/client/assets/useSuspenseInfiniteQuery-BVpu0vkd.js +0 -1
@@ -1 +1 @@
1
- import{a as $,a1 as Ne,r as b,e as ae,y as M,j as t,l as f,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-eirpwNKj.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:v=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(v)||v<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${v}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=v)throw new Pe(A,v);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={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:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,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 Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:v,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,x]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[W,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,w=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:w?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(w?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:w?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:w?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(w?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{M("password_reset_requested"),pe(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),ve&&J.reset(),we&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,ve=J.error,we=K.error,ye=z.error||B.error,T=w?c.trim()&&_.trim()&&re.trim():R?c.trim():k?W?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=ve||we||ye||ke,Me=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),M("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},We=R?a.resetPasswordTitle:k&&W?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&W?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:f("grid w-full",p?"gap-5":"gap-10"),children:[v??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:f("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:We}),Se&&t.jsx("p",{className:f("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&W)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{Me(s.name)},className:f("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 rounded-lg",p?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:f("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&W)&&I&&(C||E.enabled)&&t.jsxs("div",{className:f("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:f("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:W?t.jsxs("form",{onSubmit:Te,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:f("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[w&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!w&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(x),required:!0,disabled:m,autoComplete:w?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:f("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:f("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:f("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?w?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[w?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(w?"signIn":"signUp"),disabled:m,className:ie,children:w?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,v]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),v(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?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:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const v=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{v({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){v({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:v,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=v===void 0?!0:v,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let x;return e[2]!==S||e[3]!==I?(x=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=x):x=e[4],x}if(h.enabled){let x;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(x=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=x):x=e[8],x}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let x;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(x=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=x):x=e[20],x}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
1
+ import{a as $,a1 as Ne,r as b,e as ae,y as M,j as t,l as f,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-DjAPw3FZ.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:v=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(v)||v<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${v}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=v)throw new Pe(A,v);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={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:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,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 Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:v,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,x]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[W,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,w=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:w?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(w?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:w?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:w?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(w?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{M("password_reset_requested"),pe(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),ve&&J.reset(),we&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,ve=J.error,we=K.error,ye=z.error||B.error,T=w?c.trim()&&_.trim()&&re.trim():R?c.trim():k?W?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=ve||we||ye||ke,Me=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),M("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},We=R?a.resetPasswordTitle:k&&W?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&W?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:f("grid w-full",p?"gap-5":"gap-10"),children:[v??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:f("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:We}),Se&&t.jsx("p",{className:f("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&W)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{Me(s.name)},className:f("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 rounded-lg",p?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:f("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&W)&&I&&(C||E.enabled)&&t.jsxs("div",{className:f("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:f("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:W?t.jsxs("form",{onSubmit:Te,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:f("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[w&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!w&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(x),required:!0,disabled:m,autoComplete:w?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:f("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:f("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:f("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?w?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[w?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(w?"signIn":"signUp"),disabled:m,className:ie,children:w?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,v]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),v(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?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:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const v=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{v({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){v({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:v,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=v===void 0?!0:v,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let x;return e[2]!==S||e[3]!==I?(x=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=x):x=e[4],x}if(h.enabled){let x;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(x=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=x):x=e[8],x}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let x;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(x=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=x):x=e[20],x}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
@@ -1 +1 @@
1
- import{c as g,l as p,j as f}from"./index-eirpwNKj.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-DjAPw3FZ.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{a as u}from"./mcp-oauth-DJh33UXx.js";import{i as p}from"./mcp-oauth-DqMHjHip.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 p({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 u({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{a as u}from"./mcp-oauth-DXt2H3qs.js";import{i as p}from"./mcp-oauth-ubL7A6O8.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 p({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 u({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 W,b as Y,r as ee,l as Q,j as t,T as te,B as se,X as ie,V as ne,U as oe}from"./index-eirpwNKj.js";import{B as ae}from"./badge-O9zNBxIS.js";import{A as re,a as le,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-DBOmU5EL.js";import{A as xe,aC as pe}from"./agent-icon-C0Cpk_fI.js";import{i as he}from"./DotsVertical-DgdCLmlp.js";import{s as je}from"./Trash01-CyxedK0n.js";import{i as ve}from"./ZoomOut-DWT1qHXA.js";import{c as we}from"./repository-binding-BNbbDYQQ.js";import{a as _e}from"./use-automations-BP7Qo80Q.js";function Be(c){const e=W.c(89),{automation:s,showAgent:a,onClick:n}=c,i=Y(),{remove:o}=_e(),[l,H]=ee.useState(!1),r=we(a?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==o?(F=()=>{o.mutate(s.id),H(!1)},e[0]=s.id,e[1]=o,e[2]=F):F=e[2];const U=F;let $;e[3]!==n?($=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=$):$=e[4];const X=$,q=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==q?(u=Q("inline-block size-2 rounded-full shrink-0",q),e[5]=q,e[6]=u):u=e[6];const G=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==G?(d=i(G),e[7]=i,e[8]=G,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(xe,{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]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ae,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==r||e[24]!==a?(h=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[23]=r,e[24]=a,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let v;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(v=t.jsx(Ae,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=v):v=e[32];let w;e[33]!==j||e[34]!==v?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,v]}),e[33]=j,e[34]=v,e[35]=w):w=e[35];const J=s.system_key&&"invisible";let _;e[36]!==J?(_=Q("shrink-0",J),e[36]=J,e[37]=_):_=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{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(he,{size:16})})}),e[38]=K):K=e[38];let O,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=O,e[40]=I):(O=e[39],I=e[40]);let b;e[41]!==i?(b=i("automations.automationListRow.delete"),e[41]=i,e[42]=b):b=e[42];let y;e[43]!==b?(y=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(oe,{variant:"destructive",onClick:O,children:[I,b]})})]}),e[43]=b,e[44]=y):y=e[44];let A;e[45]!==_||e[46]!==y?(A=t.jsx("div",{onClick:ye,onKeyDown:be,role:"presentation",className:_,children:y}),e[45]=_,e[46]=y,e[47]=A):A=e[47];let D;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==A||e[52]!==f||e[53]!==g?(D=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,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,A]}),e[48]=X,e[49]=n,e[50]=w,e[51]=A,e[52]=f,e[53]=g,e[54]=D):D=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(re,{children:N}),e[57]=N,e[58]=k):k=e[58];let R;e[59]!==s.name||e[60]!==i?(R=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=R):R=e[61];let C;e[62]!==R?(C=t.jsx(le,{children:R}),e[62]=R,e[63]=C):C=e[63];let L;e[64]!==k||e[65]!==C?(L=t.jsxs(ce,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=L):L=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=o.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==U||e[74]!==o.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:z}),e[73]=U,e[74]=o.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==L||e[81]!==M?(S=t.jsxs(fe,{children:[L,M]}),e[80]=L,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==l||e[84]!==S?(E=t.jsx(ge,{open:l,onOpenChange:H,children:S}),e[83]=l,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==D||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[D,E]}),e[86]=D,e[87]=E,e[88]=V):V=e[88],V}function be(c){return c.stopPropagation()}function ye(c){return c.stopPropagation()}function Ae(c){const e=W.c(8),{triggerCount:s,nextRunAt:a}=c,n=Y();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(pe,{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(ve,{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{Be as A};
1
+ import{c as W,b as Y,r as ee,l as Q,j as t,T as te,B as se,X as ie,V as ne,U as oe}from"./index-DjAPw3FZ.js";import{B as ae}from"./badge-MCqrr8fM.js";import{A as re,a as le,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-DlwY2mBI.js";import{A as xe,aC as pe}from"./agent-icon-DeF-Pwnu.js";import{i as he}from"./DotsVertical-DdEm5Yv0.js";import{s as je}from"./Trash01-Xpxk5zpI.js";import{i as ve}from"./ZoomOut-BKkBz5Lz.js";import{c as we}from"./repository-binding-Dd_B1wfM.js";import{a as _e}from"./use-automations-CyRwkMiw.js";function Be(c){const e=W.c(89),{automation:s,showAgent:a,onClick:n}=c,i=Y(),{remove:o}=_e(),[l,H]=ee.useState(!1),r=we(a?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==o?(F=()=>{o.mutate(s.id),H(!1)},e[0]=s.id,e[1]=o,e[2]=F):F=e[2];const U=F;let $;e[3]!==n?($=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=$):$=e[4];const X=$,q=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==q?(u=Q("inline-block size-2 rounded-full shrink-0",q),e[5]=q,e[6]=u):u=e[6];const G=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==G?(d=i(G),e[7]=i,e[8]=G,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(xe,{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]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ae,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==r||e[24]!==a?(h=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[23]=r,e[24]=a,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let v;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(v=t.jsx(Ae,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=v):v=e[32];let w;e[33]!==j||e[34]!==v?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,v]}),e[33]=j,e[34]=v,e[35]=w):w=e[35];const J=s.system_key&&"invisible";let _;e[36]!==J?(_=Q("shrink-0",J),e[36]=J,e[37]=_):_=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{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(he,{size:16})})}),e[38]=K):K=e[38];let O,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=O,e[40]=I):(O=e[39],I=e[40]);let b;e[41]!==i?(b=i("automations.automationListRow.delete"),e[41]=i,e[42]=b):b=e[42];let y;e[43]!==b?(y=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(oe,{variant:"destructive",onClick:O,children:[I,b]})})]}),e[43]=b,e[44]=y):y=e[44];let A;e[45]!==_||e[46]!==y?(A=t.jsx("div",{onClick:ye,onKeyDown:be,role:"presentation",className:_,children:y}),e[45]=_,e[46]=y,e[47]=A):A=e[47];let D;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==A||e[52]!==f||e[53]!==g?(D=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,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,A]}),e[48]=X,e[49]=n,e[50]=w,e[51]=A,e[52]=f,e[53]=g,e[54]=D):D=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(re,{children:N}),e[57]=N,e[58]=k):k=e[58];let R;e[59]!==s.name||e[60]!==i?(R=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=R):R=e[61];let C;e[62]!==R?(C=t.jsx(le,{children:R}),e[62]=R,e[63]=C):C=e[63];let L;e[64]!==k||e[65]!==C?(L=t.jsxs(ce,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=L):L=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=o.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==U||e[74]!==o.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:z}),e[73]=U,e[74]=o.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==L||e[81]!==M?(S=t.jsxs(fe,{children:[L,M]}),e[80]=L,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==l||e[84]!==S?(E=t.jsx(ge,{open:l,onOpenChange:H,children:S}),e[83]=l,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==D||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[D,E]}),e[86]=D,e[87]=E,e[88]=V):V=e[88],V}function be(c){return c.stopPropagation()}function ye(c){return c.stopPropagation()}function Ae(c){const e=W.c(8),{triggerCount:s,nextRunAt:a}=c,n=Y();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(pe,{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(ve,{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{Be as A};
@@ -1 +1 @@
1
- import{c as V,r as lt,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as dt,eW as mt}from"./index-eirpwNKj.js";import{u as ft}from"./useInfiniteQuery-DhVIMVRh.js";import{u as xt}from"./use-connection-C4wyl2ru.js";import{u as pt}from"./use-mcp-client-DA050uNw.js";import{b as gt}from"./repository-binding-BNbbDYQQ.js";import{b as ht,a as Rt}from"./sheet-s29eirRf.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-E7GbRtTD.js";import{E as et}from"./empty-state-DIpCFPkI.js";import{u as Tt}from"./use-infinite-scroll-DYPYtqG2.js";import{u as St}from"./use-members-C4ay671C.js";import{g as vt}from"./task-status-wpuxJDO5.js";import{e as wt}from"./use-automations-BP7Qo80Q.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-VXXOBFly.js";function It(c){const t=V.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 Z=50;function W(c){const t=V.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 yt(c){const t=V.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(W,{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 y=o?"…":f;let C;t[19]!==T||t[20]!==y?(C=s.jsx(W,{title:T,value:y}),t[19]=T,t[20]=y,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(W,{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(W,{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 kt(c){const t=V.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,y,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,y=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(Q,{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=Q,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]=y,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],y=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(Q,{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 k;t[38]!==N?(k=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=k):k=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(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==k||t[52]!==E||t[53]!==y||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:y,className:C,onClick:S,children:[m,d,v,k,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=k,t[52]=E,t[53]=y,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=V.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 M=>{const{pageParam:z}=M,ot=z===void 0?0:z;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,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:y,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(d=(y?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.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 k;t[21]!==e||t[22]!==f||t[23]!==N?(k=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]=k):k=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==k||t[27]!==D?(_={queryKey:j,queryFn:k,enabled:D,staleTime:3e4},t[25]=j,t[26]=k,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;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 Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{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]!==Y||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((M,z)=>s.jsx(kt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===d.length-1?Y:void 0},M.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]=Y,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=M=>{M||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 J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=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]=J):J=t[72],J}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)<Z))return r.length*Z}export{Bt as A,It as u};
1
+ import{c as V,r as lt,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as dt,eW as mt}from"./index-DjAPw3FZ.js";import{u as ft}from"./useInfiniteQuery-DwZtx0VJ.js";import{u as xt}from"./use-connection-K7ZRp1go.js";import{u as pt}from"./use-mcp-client-CS_M4RkG.js";import{b as gt}from"./repository-binding-Dd_B1wfM.js";import{b as ht,a as Rt}from"./sheet-DJxxN2qW.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-piPFXrR-.js";import{E as et}from"./empty-state-CGdhhxwn.js";import{u as Tt}from"./use-infinite-scroll-BP0LI3QU.js";import{u as St}from"./use-members-BBgUoW6G.js";import{g as vt}from"./task-status-Dgc_qXrK.js";import{e as wt}from"./use-automations-CyRwkMiw.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-BLZwnPMr.js";function It(c){const t=V.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 Z=50;function W(c){const t=V.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 yt(c){const t=V.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(W,{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 y=o?"…":f;let C;t[19]!==T||t[20]!==y?(C=s.jsx(W,{title:T,value:y}),t[19]=T,t[20]=y,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(W,{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(W,{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 kt(c){const t=V.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,y,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,y=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(Q,{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=Q,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]=y,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],y=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(Q,{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 k;t[38]!==N?(k=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=k):k=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(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==k||t[52]!==E||t[53]!==y||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:y,className:C,onClick:S,children:[m,d,v,k,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=k,t[52]=E,t[53]=y,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=V.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 M=>{const{pageParam:z}=M,ot=z===void 0?0:z;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,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:y,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(d=(y?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.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 k;t[21]!==e||t[22]!==f||t[23]!==N?(k=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]=k):k=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==k||t[27]!==D?(_={queryKey:j,queryFn:k,enabled:D,staleTime:3e4},t[25]=j,t[26]=k,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;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 Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{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]!==Y||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((M,z)=>s.jsx(kt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===d.length-1?Y:void 0},M.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]=Y,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=M=>{M||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 J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=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]=J):J=t[72],J}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)<Z))return r.length*Z}export{Bt as A,It as u};
@@ -1 +1 @@
1
- import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fu as F,y as R}from"./index-eirpwNKj.js";import{s as G}from"./Plus-D0ucptrV.js";import{i as S}from"./ZoomOut-DWT1qHXA.js";import{S as H}from"./search-input-Bq9urCGV.js";import{E as T}from"./empty-state-DIpCFPkI.js";import{u as J}from"./use-automations-BP7Qo80Q.js";import{u as K}from"./use-navigate-to-agent-y0z5Ii2q.js";import{A as O}from"./automation-list-row-BKl9kQg2.js";import{b as Q}from"./repository-binding-BNbbDYQQ.js";import{R as U}from"./require-capability-CBG6rA7o.js";import"./SearchMd-0qnilUuy.js";import"./use-mcp-client-DA050uNw.js";import"./auth-BPJq9uZN.js";import"./thread-intent-DzC9Ji46.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-YHoQCS1I.js";import"./task-board-fU-Cl8m2.js";import"./schema-CviV2OeO.js";import"./slugify-CEUa2lfQ.js";import"./badge-O9zNBxIS.js";import"./alert-dialog-DBOmU5EL.js";import"./agent-icon-C0Cpk_fI.js";import"./AlertCircle-Czw3GOXM.js";import"./Tool01-C0454p2c.js";import"./ArrowUp-D1TV4x6T.js";import"./ArrowLeft-CBNZ6Kc8.js";import"./LinkBroken01-CJN7aOrV.js";import"./ShoppingBag01-DV74WoBV.js";import"./Building02-BufOoi54.js";import"./CheckCircle-C6kHCEBQ.js";import"./ChevronUp-DZ6u-CDn.js";import"./ChevronSelectorVertical-CREWgR2i.js";import"./UserSquare-B_weldPC.js";import"./Copy01-Br8MuAU9.js";import"./CreditCard01-BLe5-9IQ.js";import"./DotsVertical-DgdCLmlp.js";import"./Image01-DxuLkpjX.js";import"./Globe04-BkNwdwoM.js";import"./SwitchHorizontal01-Ba0pyLay.js";import"./Key01-Qdm6kw39.js";import"./Link01-B4M7ojFg.js";import"./Monitor01-CHS3e170.js";import"./Sun-D0O3J2yf.js";import"./Play-Da27xlG_.js";import"./Trash01-CyxedK0n.js";import"./Upload01-BWpYXx52.js";import"./User01-Bb04dh7g.js";import"./Users01-CNd-hMC8.js";import"./XClose-BeqwQ2Ei.js";import"./access-gate-mycOF7cD.js";import"./capability-load-error-D5sZmG67.js";function W(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:F(p.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:p.slug}})},t[0]=f,t[1]=p.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:z,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 Wt(){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{Wt as default};
1
+ import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fu as F,y as R}from"./index-DjAPw3FZ.js";import{s as G}from"./Plus-BPcCtngU.js";import{i as S}from"./ZoomOut-BKkBz5Lz.js";import{S as H}from"./search-input-D_LVZNpa.js";import{E as T}from"./empty-state-CGdhhxwn.js";import{u as J}from"./use-automations-CyRwkMiw.js";import{u as K}from"./use-navigate-to-agent-BRsDJt0-.js";import{A as O}from"./automation-list-row-19GG3R6A.js";import{b as Q}from"./repository-binding-Dd_B1wfM.js";import{R as U}from"./require-capability-yDcZ2JQa.js";import"./SearchMd-DqEK_DOV.js";import"./use-mcp-client-CS_M4RkG.js";import"./auth-BdGh-8AS.js";import"./thread-intent-U667QxJn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-GA-vauaD.js";import"./task-board-jGxaINzs.js";import"./schema-CTZ2buw6.js";import"./slugify-CEUa2lfQ.js";import"./badge-MCqrr8fM.js";import"./alert-dialog-DlwY2mBI.js";import"./agent-icon-DeF-Pwnu.js";import"./AlertCircle-CcVhl96j.js";import"./Tool01-Ug2p294_.js";import"./ArrowUp-DHpvU3H5.js";import"./ArrowLeft-Bph0OW09.js";import"./LinkBroken01-C8p4Wo5b.js";import"./ShoppingBag01-PFUS9e0t.js";import"./Building02-C1Q8doPE.js";import"./CheckCircle-CQsC-Pz6.js";import"./ChevronUp-BruZRzgU.js";import"./ChevronSelectorVertical-CaNDzI1v.js";import"./UserSquare-C_0nfX2V.js";import"./Copy01-XsrxN5V9.js";import"./CreditCard01-DD6f0NE9.js";import"./DotsVertical-DdEm5Yv0.js";import"./Image01-Ca0i2mzS.js";import"./Globe04-BHgzUZy8.js";import"./SwitchHorizontal01-BGjFR9KE.js";import"./Key01-Bv_pipnz.js";import"./Link01-vSc5x3Bn.js";import"./Monitor01--o8UwWGt.js";import"./Sun-eU5CLU87.js";import"./Play-Cf-3VNEt.js";import"./Trash01-Xpxk5zpI.js";import"./Upload01-D14Q1k_-.js";import"./User01-tGRdCp2F.js";import"./Users01-DxA_yIKK.js";import"./XClose-CRuXcWlf.js";import"./access-gate-DQGa34O6.js";import"./capability-load-error-BuYxZf-L.js";function W(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:F(p.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:p.slug}})},t[0]=f,t[1]=p.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:z,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 Wt(){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{Wt as default};
@@ -1 +1 @@
1
- import{aw as d}from"./index-eirpwNKj.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{aw as d}from"./index-DjAPw3FZ.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,aU as R,br as V,bs as I,bt as U}from"./index-eirpwNKj.js";import{s as $}from"./User01-Bb04dh7g.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(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(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($,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{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,aU as R,br as V,bs as I,bt as U}from"./index-DjAPw3FZ.js";import{s as $}from"./User01-tGRdCp2F.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(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(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($,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{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 as u,j as b,bu as l,aU as v}from"./index-eirpwNKj.js";const f=v("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",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80",brand:"border-transparent bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{default:"px-2 py-0.5",control:"h-7 gap-1.5 pr-3 pl-1.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 x(d){const e=g.c(14);let r,t,a,i,s;e[0]!==d?({className:r,variant:s,size:a,asChild:i,...t}=d,e[0]=d,e[1]=r,e[2]=t,e[3]=a,e[4]=i,e[5]=s):(r=e[1],t=e[2],a=e[3],i=e[4],s=e[5]);const c=(i===void 0?!1:i)?l:"span";let n;e[6]!==r||e[7]!==a||e[8]!==s?(n=u(f({variant:s,size:a}),r),e[6]=r,e[7]=a,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==t||e[12]!==n?(o=b.jsx(c,{"data-slot":"badge",className:n,...t}),e[10]=c,e[11]=t,e[12]=n,e[13]=o):o=e[13],o}export{x as B};
1
+ import{c as g,l as u,j as b,bu as l,aU as v}from"./index-DjAPw3FZ.js";const f=v("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",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80",brand:"border-transparent bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{default:"px-2 py-0.5",control:"h-7 gap-1.5 pr-3 pl-1.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 x(d){const e=g.c(14);let r,t,a,i,s;e[0]!==d?({className:r,variant:s,size:a,asChild:i,...t}=d,e[0]=d,e[1]=r,e[2]=t,e[3]=a,e[4]=i,e[5]=s):(r=e[1],t=e[2],a=e[3],i=e[4],s=e[5]);const c=(i===void 0?!1:i)?l:"span";let n;e[6]!==r||e[7]!==a||e[8]!==s?(n=u(f({variant:s,size:a}),r),e[6]=r,e[7]=a,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==t||e[12]!==n?(o=b.jsx(c,{"data-slot":"badge",className:n,...t}),e[10]=c,e[11]=t,e[12]=n,e[13]=o):o=e[13],o}export{x as B};