decocms 4.618.0 → 4.618.1

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 (432) hide show
  1. package/dist/client/assets/{AlertCircle-BYyFOifG.js → AlertCircle-GoAGGV0G.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D6tyN032.js → AreaChart-BCH9fczV.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BQKI9I0k.js → ArrowLeft-DuGHc_Gh.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-B21E_uc5.js → ArrowRight-CMJyKdyB.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BbdlU24N.js → ArrowUp-s5a8DQxj.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-BUy5CVjC.js → BookOpen01-DZs1-yi9.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DDuspEUo.js → CartesianChart-BFVvuNgw.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CclXOr_i.js → CategoricalChart-iNQ2kTf5.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DtUq_uxu.js → CheckCircle-vIQcB0iT.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-C0rME5fU.js → ChevronDown-Dm2xO7jf.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BCjXLDN_.js → ChevronSelectorVertical-Cvgyclsz.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CIqW-9_W.js → ChevronUp-BKdcyIOm.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BGMvQi86.js → CreditCard01-BUXydXso.js} +1 -1
  14. package/dist/client/assets/{Eye-DvysNEeS.js → Eye-DwRCQHLk.js} +1 -1
  15. package/dist/client/assets/{File02-Nky5bxni.js → File02-Y4Nh84qP.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-DNoiAgrN.js → Fingerprint04-DlIWxzRc.js} +1 -1
  17. package/dist/client/assets/{Globe04--1ycu_yQ.js → Globe04-5yHQa01g.js} +1 -1
  18. package/dist/client/assets/{Image01-BGZNkNVE.js → Image01-BRABRo3v.js} +1 -1
  19. package/dist/client/assets/{Key01-B7vuN73N.js → Key01-DfLmV_su.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DTjvUEMi.js → LayoutLeft-owMYqid0.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-w2HNuUHo.js → LinkBroken01-CyjdgWmP.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-BUz5eIR5.js → MessageCircle01-zc37Krdu.js} +1 -1
  23. package/dist/client/assets/{Minus-DhX2EjkJ.js → Minus-CFYZtYi9.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Dv4dKtFe.js → Monitor01-DUhT2Mcw.js} +1 -1
  25. package/dist/client/assets/{Play-BcRuLGoC.js → Play-C_9Fb_Ik.js} +1 -1
  26. package/dist/client/assets/{Plus-Bd_Azs6t.js → Plus-BoPsX_T8.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-B5a2JVy9.js → ReferenceLine-ChigmKEb.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DoUjFKDV.js → SearchMd-BGRe_18c.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-DsiPVRC3.js → ShoppingBag01-CoN4FBW5.js} +1 -1
  30. package/dist/client/assets/{Sun-bgIMzv-s.js → Sun-uwKn4QPm.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-BZWsjo2g.js → SwitchHorizontal01-CHtrDs50.js} +1 -1
  32. package/dist/client/assets/{Tool01-JC0jUvnM.js → Tool01-D90Wr5xR.js} +1 -1
  33. package/dist/client/assets/{Tooltip-DmnEut8_.js → Tooltip-Vyb5xIGx.js} +1 -1
  34. package/dist/client/assets/{Trash01-DUjxO1Dn.js → Trash01-Ctp9Olbr.js} +1 -1
  35. package/dist/client/assets/{Upload01-BcZgaIHQ.js → Upload01-DgxprpI7.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CHkzczFI.js → UserCheck01-CA8kXGn8.js} +1 -1
  37. package/dist/client/assets/{UserSquare-D6ubIo4l.js → UserSquare-dgrNjiXb.js} +1 -1
  38. package/dist/client/assets/{Users01-DOgFV3e5.js → Users01-BasqfwpC.js} +1 -1
  39. package/dist/client/assets/{XClose-CHJIrn3i.js → XClose-BUxhnZ3x.js} +1 -1
  40. package/dist/client/assets/{Zap-6gSNYeqn.js → Zap-CxPsn4FS.js} +1 -1
  41. package/dist/client/assets/{access-gate-B30zL1q2.js → access-gate-4Yp7vAaA.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-DgKMGv-9.js → add-connection-dialog-D2t3ivnz.js} +1 -1
  43. package/dist/client/assets/agent-app-CKN609Ao.js +1 -0
  44. package/dist/client/assets/{agent-assets-CamOcpgT.js → agent-assets-DDFIPSsr.js} +1 -1
  45. package/dist/client/assets/{agent-automation-BfbO9Khi.js → agent-automation-B7CVzf5F.js} +1 -1
  46. package/dist/client/assets/{agent-automations-B4IdsMR9.js → agent-automations-5RoGEa0z.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Cafvmf-h.js → agent-blog-Sl8lv70B.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-Dqts0p9T.js → agent-blog-post-CeGtmOXI.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-BhUa4Myx.js → agent-business-case-CMOhhL4x.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-yZ-kBQTO.js → agent-calendar-DN3_psfi.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-CWtYqnIq.js → agent-capabilities-DmT72SWM.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-D6NBeEEC.js → agent-connect-sources-B2mB08r7.js} +1 -1
  53. package/dist/client/assets/agent-deck-B4OrR3A7.js +1 -0
  54. package/dist/client/assets/{agent-e2e-WoNG4ZEl.js → agent-e2e-63TLdzRb.js} +1 -1
  55. package/dist/client/assets/agent-experiments-D6tEEJ7A.js +1 -0
  56. package/dist/client/assets/agent-file-BbWhb5MG.js +1 -0
  57. package/dist/client/assets/{agent-hosting-nth6pteI.js → agent-hosting-DR49fQQv.js} +1 -1
  58. package/dist/client/assets/{agent-icon-zKGrqypc.js → agent-icon-DoabtHNW.js} +1 -1
  59. package/dist/client/assets/agent-library-DB8Gnwn6.js +1 -0
  60. package/dist/client/assets/agent-library-file-Cc6xu5fG.js +1 -0
  61. package/dist/client/assets/agent-overview-Dp6TUwUW.js +1 -0
  62. package/dist/client/assets/{agent-releases-Bf5mW-Cb.js → agent-releases-CjOdbsoc.js} +1 -1
  63. package/dist/client/assets/agent-settings-Bl07TGrR.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-Cs2byz0P.js → agent-site-editor-CZ2oqt5O.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-D7ZiHs5k.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-D7tLGQbd.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-BwKMWPep.js +1 -0
  68. package/dist/client/assets/agent-view-DkN5uE0f.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-BlaaF4Tt.js → agent-view-guard-wWwEqBbc.js} +1 -1
  70. package/dist/client/assets/{ai-providers-DtnDf2l2.js → ai-providers-DTKly69Q.js} +1 -1
  71. package/dist/client/assets/{alert-Bv1HVos8.js → alert-C5EpdwBA.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-BszcYb0J.js → analytics-sections-BjczT6mc.js} +1 -1
  73. package/dist/client/assets/api-keys-BCHOPkMm.js +1 -0
  74. package/dist/client/assets/{api-keys-omOxFywl.js → api-keys-CV36tutN.js} +1 -1
  75. package/dist/client/assets/{app-editor-CrhcliiJ.js → app-editor--um7u6Wc.js} +1 -1
  76. package/dist/client/assets/{asset-utils-C40NGt6S.js → asset-utils-D7ZsoUjl.js} +1 -1
  77. package/dist/client/assets/{auth-BbyP7Mh4.js → auth-IBAsOARn.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-DC_pvXWR.js → auth-catchall-DPqMCEC6.js} +1 -1
  79. package/dist/client/assets/{auth-entry-DTt6oF6n.js → auth-entry-Bk_VrJBw.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-D6lmqNl3.js → auth-split-layout-zr8fqIYk.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-Dv5K3sbt.js → authenticate-and-persist-oauth-BmdGjqM8.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-CVyxW8bA.js → automation-list-row-kZcPBX-Y.js} +1 -1
  83. package/dist/client/assets/{automation-runs-DxzIf484.js → automation-runs-NP4ibGIs.js} +1 -1
  84. package/dist/client/assets/{automations-D6gxCniS.js → automations-D7IUlLWI.js} +1 -1
  85. package/dist/client/assets/{badge-DhCDyINb.js → badge-DONoxQO7.js} +1 -1
  86. package/dist/client/assets/{block-document-DhUbHSJu.js → block-document-Dlll0MPP.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-Bmn4QW94.js → blocks-preview-workspace-context-LApXEaVX.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-CtDx-TXT.js → blocks-tab-states-CTy1iAF5.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-C8ne1zjD.js → blog-preview-url-BGp0zYxW.js} +1 -1
  90. package/dist/client/assets/{blog-schema-XbxpqD7n.js → blog-schema-CGys1Vfw.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate--8e6WU5f.js → blog-source-gate-D3KL0oEF.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-5YPkAPHi.js → blog-view-gate-BFq59z60.js} +1 -1
  93. package/dist/client/assets/{buckets-mVuz76PR.js → buckets-C-9n1VRF.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-YaUfgVXc.js → build-improve-prompt-doc-CcS36Qyr.js} +1 -1
  95. package/dist/client/assets/{calendar-BDRihgLI.js → calendar-BRx4DiEx.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-BUXjQvww.js → capability-load-error-C6JoLBp9.js} +1 -1
  97. package/dist/client/assets/{category-editor-DAZ1WajU.js → category-editor-B-RRxjlW.js} +1 -1
  98. package/dist/client/assets/{category-tree-9o5eAqGF.js → category-tree-CW0acTf_.js} +1 -1
  99. package/dist/client/assets/{chart-BD1DM8Vo.js → chart-BhhOak8o.js} +1 -1
  100. package/dist/client/assets/{chat-context-DHSww0cO.js → chat-context-vJ6R-Clt.js} +1 -1
  101. package/dist/client/assets/{chat-draft-BwCJJBjY.js → chat-draft-C93TMi7F.js} +1 -1
  102. package/dist/client/assets/{checkbox-BK5KAA6g.js → checkbox-CkODjqKt.js} +1 -1
  103. package/dist/client/assets/{choose-editor-Xa2hczm2.js → choose-editor-CUGLPz2R.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-4m_qDet6.js → cli-auth-success-DISNojzj.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-CT9mj3NU.js → cms-settings-editor-DLMpcsg9.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-BZtc347l.js → cms-store-drafts-DgvuEc1i.js} +1 -1
  107. package/dist/client/assets/{collapsible-Ff_HBxQZ.js → collapsible-BdVp5Lcb.js} +1 -1
  108. package/dist/client/assets/{collection-detail-Da5T5FHc.js → collection-detail-CYRLagxm.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-Dsc8IsyJ.js → collection-display-button-CrLnf-_h.js} +1 -1
  110. package/dist/client/assets/{collection-search-C3yL3Si4.js → collection-search-DL8nJQx4.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-CC70QIiG.js → collection-table-wrapper-fYA2bGN6.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-Bw8ZEjbc.js → collection-tabs-9jbbjBDw.js} +1 -1
  113. package/dist/client/assets/{combobox-DhzcDPGN.js → combobox-B9eEiOM0.js} +1 -1
  114. package/dist/client/assets/{command-C04_rx60.js → command-D5O7M-Cf.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-Cyom-mwN.js → companion-mcps-section-D_ernmuP.js} +1 -1
  116. package/dist/client/assets/{config-CTUwx0E7.js → config-BOn4tvAD.js} +1 -1
  117. package/dist/client/assets/{connect-BFJ96IAv.js → connect-B9Or7Mba.js} +1 -1
  118. package/dist/client/assets/{connect-key-x35pzj1P.js → connect-key-BddF4e4b.js} +1 -1
  119. package/dist/client/assets/{connect-layout-CYxI3Ix2.js → connect-layout-CNgkeyZs.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-DW2Q7-Vc.js → connect-source-dialog-F5S3IN4q.js} +1 -1
  121. package/dist/client/assets/{connection-OrxsAVXu.js → connection-BxF6Rdiu.js} +1 -1
  122. package/dist/client/assets/{connection-card-JSblTqum.js → connection-card-Ca3jxrTD.js} +1 -1
  123. package/dist/client/assets/{connection-detail-BDZh3nKl.js → connection-detail-B5pUbex_.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-D-61dVx3.js → connection-form-helpers-oAW0sDLm.js} +1 -1
  125. package/dist/client/assets/{connection-slug-BxAeiVuI.js → connection-slug-B7w04sZ1.js} +1 -1
  126. package/dist/client/assets/{connections-Cm49J0DF.js → connections-C0U7G-PU.js} +1 -1
  127. package/dist/client/assets/{content-changes-Sy14c4Sj.js → content-changes-DXqxs3Wb.js} +1 -1
  128. package/dist/client/assets/{content-tab-B08qF9Ws.js → content-tab-C23eyWcW.js} +3 -3
  129. package/dist/client/assets/{context-DWbB1_E6.js → context-LlVd3qyN.js} +1 -1
  130. package/dist/client/assets/{context-menu-2WNbt8mp.js → context-menu-DJtvu4JZ.js} +1 -1
  131. package/dist/client/assets/{context-shell-CsxbLyhW.js → context-shell-0fpmlncZ.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-Cmj0uZ47.js → create-organization-dialog-97eVCkRr.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-C2a7jj6_.js → daily-pulse-DVtdyKrr.js} +1 -1
  134. package/dist/client/assets/{delete-copy-B_bYyZez.js → delete-copy-rajlpHzK.js} +1 -1
  135. package/dist/client/assets/{device-hint-BT8_DhB_.js → device-hint-DVUadRrt.js} +1 -1
  136. package/dist/client/assets/{discover-DqSkXP2Q.js → discover-CCbrOrMD.js} +1 -1
  137. package/dist/client/assets/{domain-settings-Cyu0iMV3.js → domain-settings-CcAHeKi4.js} +1 -1
  138. package/dist/client/assets/{drawer-BdL5OKVC.js → drawer-DO0sMAej.js} +1 -1
  139. package/dist/client/assets/{editor-CUzd1SE7.js → editor-UaRoONxx.js} +1 -1
  140. package/dist/client/assets/{editor-classes-1dg1pjaK.js → editor-classes-DMpdrv32.js} +1 -1
  141. package/dist/client/assets/{empty-state-CCe_gxuj.js → empty-state-C4MgLcBg.js} +1 -1
  142. package/dist/client/assets/{empty-state-9tWEtAox.js → empty-state-UX_DOq42.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-CvZgfB88.js → experiments-tab-choice-loxGESO7.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-0MTwkkap.js → extract-connection-data-DXA3Rt-s.js} +1 -1
  145. package/dist/client/assets/{feature-gate-BoNGlq-b.js → feature-gate-Bc8aW-U-.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-Bg-PT-Nn.js → feature-paywall-hqI35k49.js} +1 -1
  147. package/dist/client/assets/{file-explorer-DQI3RjrR.js → file-explorer-DE4Pg5Zn.js} +1 -1
  148. package/dist/client/assets/{file-preview-pAXtoXVY.js → file-preview-BKJnTrOe.js} +1 -1
  149. package/dist/client/assets/{file-share-button-BpR0pG7Z.js → file-share-button--SjJonFb.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-BINq6pAJ.js → file-type-icon-R4tsODq6.js} +1 -1
  151. package/dist/client/assets/{folder-icon-JauS1zcB.js → folder-icon-DC-T6LMD.js} +1 -1
  152. package/dist/client/assets/{form-DINHcU5h.js → form-DwGozYbG.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-bHiDiNE9.js → frame-navigation-CoKnARJv.js} +1 -1
  154. package/dist/client/assets/{gateway-client-BXoRIC2f.js → gateway-client-C5MrdR_p.js} +1 -1
  155. package/dist/client/assets/{general-KZQuDKZq.js → general-BiR6hkWa.js} +1 -1
  156. package/dist/client/assets/{github-icon-DeI0LVM6.js → github-icon-YYYF_UPl.js} +1 -1
  157. package/dist/client/assets/{held-block-view-BplchR69.js → held-block-view-CRIGJWyy.js} +1 -1
  158. package/dist/client/assets/{home-BM2M0ir_.js → home-Crikv5tf.js} +1 -1
  159. package/dist/client/assets/{home-overview-C7_beN9y.js → home-overview-CJ86tdHp.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-zJ_hLbuq.js → hosted-reconcile-CTronLZo.js} +1 -1
  161. package/dist/client/assets/{icon-button-DTvCNNgw.js → icon-button-DFliy54K.js} +1 -1
  162. package/dist/client/assets/{index-gkLejYlX.js → index-B9Qs-0Gp.js} +1 -1
  163. package/dist/client/assets/{index-D4Cq4uu-.js → index-BFFHlwFA.js} +1 -1
  164. package/dist/client/assets/{index-DpsRmOqH.js → index-BH4xxzAP.js} +1 -1
  165. package/dist/client/assets/{index-KT7S-wXA.js → index-BKFaN6Ld.js} +1 -1
  166. package/dist/client/assets/{index-BYAVvzAx.js → index-BTNa7cC6.js} +1 -1
  167. package/dist/client/assets/{index-cHqyigDN.js → index-BVDmO57n.js} +1 -1
  168. package/dist/client/assets/{index-WY5skHFQ.js → index-C_NkXLoh.js} +1 -1
  169. package/dist/client/assets/{index-DOAcfhWB.js → index-CcrP-nDa.js} +1 -1
  170. package/dist/client/assets/{index-CxRoy25G.js → index-D4CqkEu4.js} +1 -1
  171. package/dist/client/assets/{index-BE5pN4ch.js → index-D5QLXgD8.js} +1 -1
  172. package/dist/client/assets/{index-B7VjCiRT.js → index-DDritN78.js} +1 -1
  173. package/dist/client/assets/{index-DkgRE7a8.js → index-DJ-fS83G.js} +1 -1
  174. package/dist/client/assets/{index-DGzcH4Vq.js → index-DRuy-mDa.js} +1 -1
  175. package/dist/client/assets/{index-C1HmbFkP.js → index-DdK1k8EY.js} +1 -1
  176. package/dist/client/assets/{index-DNY1LCEV.js → index-DoEtSiIe.js} +3 -3
  177. package/dist/client/assets/{index-BpSAkv2Q.js → index-FcoC7l5_.js} +1 -1
  178. package/dist/client/assets/{index-redirect-D7g6EvmF.js → index-redirect-CbsKaCLd.js} +1 -1
  179. package/dist/client/assets/{index-Ctcj_Ic4.js → index-w1wolPTy.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-C58dnOYG.js → infiniteQueryObserver-BRGiYBJv.js} +1 -1
  181. package/dist/client/assets/{infra-billing-PmBjX27u.js → infra-billing-mbjUHJA6.js} +1 -1
  182. package/dist/client/assets/{input-DW2VJfvP.js → input-C6McKl01.js} +3 -3
  183. package/dist/client/assets/{input-Biz1-kQq.js → input-DIuJhVNp.js} +1 -1
  184. package/dist/client/assets/{integration-icon-B7GQGDoQ.js → integration-icon-DvT6X8cI.js} +1 -1
  185. package/dist/client/assets/{item-actions-CigQSqIo.js → item-actions-BSnXs1TT.js} +1 -1
  186. package/dist/client/assets/{jira-icon-CNLkC5R4.js → jira-icon-pZDG9IEF.js} +1 -1
  187. package/dist/client/assets/{label-BleuytxV.js → label-G4Rj_cXa.js} +1 -1
  188. package/dist/client/assets/{layout-BCbrxcxs.js → layout-CTvR7VG1.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-B_mFKFt0.js → legacy-admin-welcome-dialog-BYL3pyxT.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-suvWZq4w.js → legacy-agents-deep-Df5JF_SK.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-CqfpK3yi.js → legacy-main-redirect-oBYkuRmD.js} +1 -1
  192. package/dist/client/assets/library-mSFHNE8F.js +1 -0
  193. package/dist/client/assets/{library-tab-B6-1oo-4.js → library-tab-DJQybwNu.js} +1 -1
  194. package/dist/client/assets/{login-CIC76liy.js → login-DdaMpBPE.js} +1 -1
  195. package/dist/client/assets/{markdown-D7s3zZ1r.js → markdown-DeZATUv_.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-xoRmsbxJ.js → mcp-app-renderer-pvE5c1WF.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-Bm9eowFy.js → mcp-oauth-BkAlBGe_.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DdZ5iqUI.js → mcp-oauth-C4zfq49i.js} +1 -1
  199. package/dist/client/assets/{members-BVDYMl5s.js → members-Dhg3sD3K.js} +1 -1
  200. package/dist/client/assets/{memory-OIMax3Mf.js → memory-ls8FI-ER.js} +1 -1
  201. package/dist/client/assets/{mock-board-DcJ7MEwz.js → mock-board-UBlWXoTV.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-wJhgDEpd.js → monaco-editor-BwfJ8i7M.js} +1 -1
  203. package/dist/client/assets/{monitoring-Dhz_4NNt.js → monitoring-CQc-Jc5R.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-BGw1gEqW.js → monitoring-stats-row-CBrA5DNm.js} +1 -1
  205. package/dist/client/assets/{multi-select-j_cBBkSq.js → multi-select-D3r33Eqf.js} +1 -1
  206. package/dist/client/assets/{mustache-ByNI-hYL.js → mustache-DKc6J7pv.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CIgwVXN9.js → named-rule-step-BAentWbs.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-QjZFYuFQ.js → named-rule-view-B12Mihtd.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-B8SVDcTm.js → new-project-dialog-CT39WKMt.js} +1 -1
  210. package/dist/client/assets/{new-project-store-rLMUNU2t.js → new-project-store-DYc4RZIM.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-BCJ9lzNV.js → oauth-callback-ByK2SiJO.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-DUTt9OdA.js → oauth-callback-ai-provider-Beze5ATE.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-aERAtVyD.js → oauth-consent-C7XByUpM.js} +1 -1
  214. package/dist/client/assets/{onboarding-BEeDAE1n.js → onboarding-DxARgVon.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-CalrcjOi.js → openai-conversation-BZPG3E07.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-gHKEu9Pp.js → optimistic-project-sidebar-views-DtHZp47L.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-BMsq7ZVq.js → order-monitor-day-BjMh6dP-.js} +1 -1
  218. package/dist/client/assets/{organization-choice-Dumfb2MT.js → organization-choice-B7oZjoV-.js} +1 -1
  219. package/dist/client/assets/{orgs-BaQBoOtD.js → orgs-Dnp8mGIE.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-CYaA86cP.js → own-accounts-section-Ox_H5E7F.js} +1 -1
  221. package/dist/client/assets/{pair-Bb6oWjIQ.js → pair-C9Fumckp.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Dru7Bhw3.js → parse-sections-Bbp8QY_-.js} +2 -2
  223. package/dist/client/assets/plan-Bkifmwdt.js +1 -0
  224. package/dist/client/assets/{plan-ladder-DCMpCI9t.js → plan-ladder-DNa_CJD5.js} +1 -1
  225. package/dist/client/assets/{plan-page-DhlVp1jr.js → plan-page-DA2CBoO7.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-b1xfvJA5.js → plan-usage-card-DnVnSftp.js} +1 -1
  227. package/dist/client/assets/{popover-O0--zxB3.js → popover-mrQ4T9ru.js} +1 -1
  228. package/dist/client/assets/{post-calendar-TZVPBEms.js → post-calendar-D-RLnzxz.js} +1 -1
  229. package/dist/client/assets/{post-editor-CjdfbpGv.js → post-editor-BpIis1xH.js} +1 -1
  230. package/dist/client/assets/{preview-content-Cb6-Hnk_.js → preview-content-DTs-hWSP.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-CeEvmRUv.js → preview-dialog-CGhTVXYZ.js} +1 -1
  232. package/dist/client/assets/{preview-panel-DLXxpwqH.js → preview-panel-CS2evrdt.js} +1 -1
  233. package/dist/client/assets/{preview-tab-h0moNltj.js → preview-tab-C8EYcsK2.js} +3 -3
  234. package/dist/client/assets/{primitives-B_wOu0KD.js → primitives-DCeh9ZFM.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BBGqgaUN.js → product-picker-dialog-BuD1Uiqo.js} +1 -1
  236. package/dist/client/assets/{profile-DXP_cVu3.js → profile-Drm_c_7P.js} +1 -1
  237. package/dist/client/assets/{project-app-view-Df72eQDp.js → project-app-view-BK0cCPsD.js} +1 -1
  238. package/dist/client/assets/{project-apps-D0yVssTS.js → project-apps-CSkPT54a.js} +1 -1
  239. package/dist/client/assets/{project-icon-Bys_QVfz.js → project-icon-BxqBM24K.js} +1 -1
  240. package/dist/client/assets/{project-index-D8QhEEmc.js → project-index-BcbyhrUz.js} +1 -1
  241. package/dist/client/assets/project-reports-C1LMMcEB.js +1 -0
  242. package/dist/client/assets/project-tasks-CYJZp2Uh.js +1 -0
  243. package/dist/client/assets/{projects-DLDVeooh.js → projects-Bt0tB7bD.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-BYfzt1p6.js → projects-empty-state-CUxxduZa.js} +1 -1
  245. package/dist/client/assets/{prompts-RK2BST5w.js → prompts-Cypbuo50.js} +1 -1
  246. package/dist/client/assets/record-editor-BsKWufWE.js +1 -0
  247. package/dist/client/assets/{redirect-editor-CvpFIhP3.js → redirect-editor-C4dWTnRQ.js} +1 -1
  248. package/dist/client/assets/{reports-DiiYMFp7.js → reports-BJDaNojR.js} +1 -1
  249. package/dist/client/assets/reports-oGZqT3QW.js +1 -0
  250. package/dist/client/assets/{reports-onboarding-CoRYS8wo.js → reports-onboarding-CH17bHGS.js} +1 -1
  251. package/dist/client/assets/{reports-tab-BoI6tcUT.js → reports-tab-muq1g1pm.js} +2 -2
  252. package/dist/client/assets/{repositories-dckrDwEU.js → repositories-Bf8CqdKD.js} +1 -1
  253. package/dist/client/assets/repositories-JzZI0XMl.js +1 -0
  254. package/dist/client/assets/{repository-binding-0rqv5CYu.js → repository-binding-BAQCDq-W.js} +1 -1
  255. package/dist/client/assets/{repository-picker-8sFtA2jE.js → repository-picker-BBkgoOlP.js} +1 -1
  256. package/dist/client/assets/{require-capability-GB4QCUSY.js → require-capability-FcSdruCZ.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-9Vw9oHyS.js → required-auth-layout-DPL2sBE1.js} +1 -1
  258. package/dist/client/assets/{reset-password-Bkf_fwQB.js → reset-password-D15aZJot.js} +1 -1
  259. package/dist/client/assets/{resizable-BycP7e00.js → resizable-DwqWjQSo.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-B49st38Z.js → resolve-tab-icon-De0SSCOI.js} +1 -1
  261. package/dist/client/assets/{review-settings-AaM16RjA.js → review-settings-X9fyjheP.js} +1 -1
  262. package/dist/client/assets/{role-color-CilFDy12.js → role-color-BX_AhYik.js} +1 -1
  263. package/dist/client/assets/{roles-BN919U7y.js → roles-B-siyM42.js} +1 -1
  264. package/dist/client/assets/{route-CH_5nuP_.js → route-CNMBOzJN.js} +1 -1
  265. package/dist/client/assets/route-CalpiHU1.js +1 -0
  266. package/dist/client/assets/{route-BcZK3YCw.js → route-Cz_N3YLd.js} +1 -1
  267. package/dist/client/assets/{route-page-header-DpWJFSUF.js → route-page-header-nTLU5ayk.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-CG9RWp1R.js → sandbox-git-api-DiUyKbJU.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-B2ggxGXu.js → sandbox-lifecycle-context-CRyp43o1.js} +1 -1
  270. package/dist/client/assets/{save-status-BQkBpUbv.js → save-status-CQe-z40L.js} +1 -1
  271. package/dist/client/assets/{schema-JoNeetSU.js → schema-C5ZQLddp.js} +1 -1
  272. package/dist/client/assets/{schema-UfVOE_vK.js → schema-CG6ylG0z.js} +1 -1
  273. package/dist/client/assets/{scroll-area-vXLoyQQw.js → scroll-area-KLotig-P.js} +1 -1
  274. package/dist/client/assets/{search-input-CazoQHCn.js → search-input-wk0beNbE.js} +1 -1
  275. package/dist/client/assets/{search-toggle-om107pCr.js → search-toggle-CMYcoB9P.js} +1 -1
  276. package/dist/client/assets/{secret-picker-BUV633yj.js → secret-picker-j7H2EK7l.js} +1 -1
  277. package/dist/client/assets/{secrets-DGpgtf7U.js → secrets-B9rKvRSV.js} +1 -1
  278. package/dist/client/assets/{section-array-field-B5wOOl5Q.js → section-array-field-yz7QHNSD.js} +1 -1
  279. package/dist/client/assets/{sections-BuMIRgN_.js → sections-44_mUmcy.js} +1 -1
  280. package/dist/client/assets/{sections-editor-JNsgN9Jp.js → sections-editor-vs42n8iz.js} +1 -1
  281. package/dist/client/assets/{select-BtuZ1_PE.js → select-OlcoUSVg.js} +1 -1
  282. package/dist/client/assets/{select-model-D2eRzxwR.js → select-model-D0BbDHat.js} +1 -1
  283. package/dist/client/assets/{seo-editor-CnvOLI1T.js → seo-editor-D1i_wsxL.js} +1 -1
  284. package/dist/client/assets/{separator-CDpQOaDp.js → separator-CunLPufQ.js} +1 -1
  285. package/dist/client/assets/{session-runtime-C9K2fhXt.js → session-runtime-CZKHty5X.js} +1 -1
  286. package/dist/client/assets/settings-tab-VZsLRrpt.js +1 -0
  287. package/dist/client/assets/{sheet-BclrNEHN.js → sheet-De8qzGNI.js} +1 -1
  288. package/dist/client/assets/{shell-layout-B0CrobX4.js → shell-layout-596_q4a1.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-CKyxePcd.js → site-draft-actions-DXu7he69.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-DITfvlDo.js → site-draft-view-UnsYH70N.js} +1 -1
  291. package/dist/client/assets/site-editor-2NiQbUmg.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-ByfMLHrL.js → site-editor-toast-B-FDGvtN.js} +1 -1
  293. package/dist/client/assets/{skills-UpHMjGzP.js → skills-BjbKR2I7.js} +1 -1
  294. package/dist/client/assets/{slider-BccigXwM.js → slider-c-3WdQpH.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-LMzGz7vy.js → sortable.esm-B0hCRAsX.js} +1 -1
  296. package/dist/client/assets/{sso-BOXfHaVK.js → sso-D4qQzdCn.js} +1 -1
  297. package/dist/client/assets/{suggestion-6kwzt7Yb.js → suggestion-CIik1sqO.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-z6Ee2KPL.js → super-agent-icon-BQUmZAhN.js} +1 -1
  299. package/dist/client/assets/{switch-DVmURNlF.js → switch-C5tCt-1T.js} +1 -1
  300. package/dist/client/assets/{synced-repos-J7N806y3.js → synced-repos-CBI3cJpx.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-D6HWUMfv.js → tab-icon-glyph-DrXbuC1r.js} +1 -1
  302. package/dist/client/assets/{table-Dfn_tXRY.js → table-RDPVkrI6.js} +1 -1
  303. package/dist/client/assets/{tabs-DzZuOsBG.js → tabs-Bh3jtZIY.js} +1 -1
  304. package/dist/client/assets/{task-board-B6w6sUwb.js → task-board-BRF3ZwKz.js} +1 -1
  305. package/dist/client/assets/{task-key-DwKgVgaG.js → task-key-CajjdR3t.js} +1 -1
  306. package/dist/client/assets/{task-route-DILYUxw7.js → task-route-DltlnXMA.js} +1 -1
  307. package/dist/client/assets/{task-status-CWjPA6gQ.js → task-status-CS7Ps1ks.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-D8X9MO7l.js → taskboard-analytics-BM7xNDXS.js} +1 -1
  309. package/dist/client/assets/tasks-BVcnl5hV.js +1 -0
  310. package/dist/client/assets/{tasks-BWMxQc4P.js → tasks-BeWBUFN3.js} +1 -1
  311. package/dist/client/assets/{textarea-BS-fwvE3.js → textarea-CP9TQ5HN.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-BEFAIWhI.js → thread-analytics-CyVeHqD_.js} +1 -1
  313. package/dist/client/assets/{thread-button-CCXdzpOs.js → thread-button-B51gC6ln.js} +1 -1
  314. package/dist/client/assets/{thread-intent-Dmqjim4G.js → thread-intent-R2KI8ie_.js} +1 -1
  315. package/dist/client/assets/{thread-route-DFPY6b9-.js → thread-route-B5gjf6Cd.js} +1 -1
  316. package/dist/client/assets/{thread-route-BMQ7FfFy.js → thread-route-D-UE3Db_.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-D_58wlnB.js → thread-sheet-body-B9XdKhNS.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-DVPzF6pR.js → time-range-picker-5TsTBsYK.js} +1 -1
  319. package/dist/client/assets/{toggle-group-BSOB6hW8.js → toggle-group-CtXgLS7e.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-D9iHbEUH.js → tool-set-selector-WN2Xo0Mj.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-B2FJhjHB.js → toolbar-icon-button-Ce7Zk4Z1.js} +1 -1
  322. package/dist/client/assets/{tooltip-DEqrMv7W.js → tooltip-DhlWzeQv.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-BbljAPKp.js → tooltipContext-BkLzQGib.js} +1 -1
  324. package/dist/client/assets/{track-Bp6zOhD6.js → track-xlpKzX88.js} +1 -1
  325. package/dist/client/assets/{types-mnHt7RAy.js → types-rurFGFZy.js} +1 -1
  326. package/dist/client/assets/{url-slug-BNPYObW-.js → url-slug-CiUrNKts.js} +1 -1
  327. package/dist/client/assets/{usage-stats-PE4G0CeB.js → usage-stats-CLeyhHyT.js} +1 -1
  328. package/dist/client/assets/{use-ai-providers-DuE4C2Wp.js → use-ai-providers-BwkzkRi2.js} +1 -1
  329. package/dist/client/assets/{use-api-keys-C3mHEKzm.js → use-api-keys-B_vZqtxC.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-C6ts9bt2.js → use-apply-named-rule-CaZ5oLnq.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-CuhqUmC7.js +1 -0
  332. package/dist/client/assets/{use-automations-LOYHDjb3.js → use-automations-CLa8yUdj.js} +1 -1
  333. package/dist/client/assets/{use-autosave-CLPruo2u.js → use-autosave-CwP_nadT.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-BLAijVCk.js +1 -0
  335. package/dist/client/assets/use-blog-view-DJnS2ipo.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-Dx_P1Xmx.js → use-chat-layout-state-x3sd6PWp.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-_ZdSdw_1.js → use-cms-publish-actions-Bn8BUqaj.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-DQq6EgX3.js → use-connect-companion-CkgH2aNV.js} +1 -1
  339. package/dist/client/assets/{use-connection-DW1VkUDp.js → use-connection-BO-ZUzee.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-DadcVTeN.js → use-content-sync-By62We3p.js} +1 -1
  341. package/dist/client/assets/{use-copy-D1Ps751Y.js → use-copy-CjEnyhFT.js} +1 -1
  342. package/dist/client/assets/{use-current-view-DTeimNo3.js → use-current-view-C2fbVQ-O.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-D0UHCWV7.js → use-date-fns-locale-DQRGqxvr.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-DYsdj7A1.js → use-debounced-autosave-DN03qSfm.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-Cj3YP2Ju.js → use-debounced-value-DqHSmPMR.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-1ccyr4DS.js → use-deco-credits-5H0OzCE5.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-qTcqpluN.js → use-decopilot-events-DwNDOIa1.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-DeCae--m.js → use-delete-block-nP_FtjiY.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-Ddr1KxTc.js → use-delete-connection-BBTdkJYy.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-CmLloBgI.js → use-deployment-admin-Bh76rlF7.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-BaQvjR8x.js → use-entitlements-4v7LU4jM.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-Bx6WUO99.js → use-fast-preview-draft-url-DQSkfUDT.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-J6V_3k5a.js → use-file-configs-J6lDtEfO.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-DKtNLyFh.js → use-id-selection-2psZYBx1.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-WKil-W1U.js → use-in-settings-LMUeu63D.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-BHASI7cE.js → use-inbox-feed-_58TtHpK.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-BCAJFUTI.js → use-infinite-scroll-uxxC9xbL.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-BVkKaLgc.js → use-join-requests-Dlx4kfO9.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-BmS9u6Cm.js → use-main-panel-tabs-D5zQhSWJ.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-WaulxB9m.js → use-mcp-auth-status-FhB3trZz.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-XSpKurXu.js → use-mcp-client-86j-Nolb.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-Bs2ZYPMm.js → use-mcp-prompts-CPXLXWTp.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-C_TsO2I8.js → use-mcp-tools-BeJ4_Tij.js} +1 -1
  364. package/dist/client/assets/{use-mobile-BxcOWRrF.js → use-mobile-BjsAkqwr.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-B_TQedwE.js → use-move-blocks-CCDsEu9Z.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-D9QHHZbU.js → use-navigate-to-agent-C-BC28kE.js} +1 -1
  367. package/dist/client/assets/{use-never-published-CchQezqP.js → use-never-published-C4cAqdmZ.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-B4WWFHbJ.js → use-org-fs-C62_MbqW.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-CuExaYhO.js → use-org-notice-BzvGZbQ2.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-KiPPmYc8.js → use-org-repo-syncs-SmfSLgc1.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-BU8x_N9w.js → use-org-sso-CypQjzG8.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-BCnB7DAB.js → use-organization-settings-CgKOO7Ms.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-CRTRFR_W.js → use-panel-navigate-DHff9CS9.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-DNQAebLP.js → use-project-native-view-presence-Dug5CWyl.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-AQre_lGB.js → use-project-scope-AMUoXt2c.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-TNv8uCPr.js → use-recent-apps-qXhoWNgp.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-BblOLKh2.js → use-reports-diagnostic-CiiYsnje.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-CDzu8MpI.js → use-sandbox-events-A8aB0HnP.js} +1 -1
  379. package/dist/client/assets/{use-secrets-BS48xwT8.js → use-secrets-DumIaW5z.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-DKzaRrN2.js → use-section-preview-base-BcIQh9cw.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-DhXPD56p.js → use-sidebar-collapsed-iTcR18ZK.js} +1 -1
  382. package/dist/client/assets/{use-tags-DZB3cOG6.js → use-tags-Bm6VkRP9.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-BJUgitsX.js → use-task-board-analytics-CcKWYx4U.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-BRhTw2_C.js → use-task-board-item-prs-Db89Oevz.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-ClS47WXt.js → use-task-board-items-BVQx7Wft.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-CLIPLPO_.js → use-task-board-prompts-C468T8Y7.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-D_A2WmqA.js → use-task-metadata-FjAJnVQn.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-DqTcUmJ7.js → use-thread-outputs-BnMyEJ2l.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-BtTSFIlo.js → use-view-draft-kind-hbAZo1QG.js} +1 -1
  390. package/dist/client/assets/{use-voice-input-BXFfCREB.js → use-voice-input-DJjQBO4e.js} +1 -1
  391. package/dist/client/assets/useInfiniteQuery-9vIAXgqG.js +1 -0
  392. package/dist/client/assets/{useQueries-CY78CcHi.js → useQueries-CuzZgNOl.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-CucINu-S.js +1 -0
  394. package/dist/client/assets/{users-B7RH0HPb.js → users-QlOHt7jV.js} +1 -1
  395. package/dist/client/assets/{utils-CeyBwb4E.js → utils-CzRFs-0R.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-CbNvuhgP.js → variant-calendar-DaLwTMzO.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-WW9vsYwt.js → variant-matcher-override-BBj0ymp1.js} +1 -1
  398. package/dist/client/assets/{view-header-D-W3mMsY.js → view-header-CRFbPvFT.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-DFMEmmYR.js → virtual-mcp-K5tXQmiD.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-CLN8yu6T.js → watch-sse-pool-C0me6Edt.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +44 -44
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-BVo-JN5-.js +0 -1
  405. package/dist/client/assets/agent-deck-BV2v1bg2.js +0 -1
  406. package/dist/client/assets/agent-experiments-Dn6ATqm3.js +0 -1
  407. package/dist/client/assets/agent-file-BdlM9DC-.js +0 -1
  408. package/dist/client/assets/agent-library-CRndyLSN.js +0 -1
  409. package/dist/client/assets/agent-library-file-CHMBjLP9.js +0 -1
  410. package/dist/client/assets/agent-overview-0qKuyyc3.js +0 -1
  411. package/dist/client/assets/agent-settings-BhODPzv3.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-Cf9FJAgn.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-CBrR-oWD.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-DKqXk_Fc.js +0 -1
  415. package/dist/client/assets/agent-view-B6-XGf3q.js +0 -1
  416. package/dist/client/assets/api-keys-BWBRmUoJ.js +0 -1
  417. package/dist/client/assets/library-Dp3HrH7T.js +0 -1
  418. package/dist/client/assets/plan-CEsNJEgV.js +0 -1
  419. package/dist/client/assets/project-reports-DF_CqS1r.js +0 -1
  420. package/dist/client/assets/project-tasks-BiRpzten.js +0 -1
  421. package/dist/client/assets/record-editor-D7wKjKze.js +0 -1
  422. package/dist/client/assets/reports-CAZ7fJej.js +0 -1
  423. package/dist/client/assets/repositories-DhWmEVga.js +0 -1
  424. package/dist/client/assets/route-ZfCX71Dd.js +0 -1
  425. package/dist/client/assets/settings-tab-DXCgvlZo.js +0 -1
  426. package/dist/client/assets/site-editor-CRBSEbgW.js +0 -1
  427. package/dist/client/assets/tasks-B5T10R9U.js +0 -1
  428. package/dist/client/assets/use-ask-in-chat-ClsOxWIw.js +0 -1
  429. package/dist/client/assets/use-blocks-v8-project-GPjsiHKH.js +0 -1
  430. package/dist/client/assets/use-blog-view-BjBkHa1n.js +0 -1
  431. package/dist/client/assets/useInfiniteQuery-jSvPkUAC.js +0 -1
  432. package/dist/client/assets/useSuspenseInfiniteQuery-DQoY99kG.js +0 -1
@@ -1 +1 @@
1
- import{c as M,b as Z,J as X,a as V,r as z,j as r,at as re,n as R,a6 as oe,h as ie}from"./index-DNY1LCEV.js";import{ChatLayout as ne}from"./index-BpSAkv2Q.js";import{b as se}from"./input-DW2VJfvP.js";import{D as ae,a as me}from"./chat-context-DHSww0cO.js";import{u as le}from"./use-organization-settings-BCnB7DAB.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-C7_beN9y.js";import{I as de}from"./icon-button-DTvCNNgw.js";import{T as he,a as W}from"./toggle-group-BSOB6hW8.js";import{a as xe}from"./MessageCircle01-BUz5eIR5.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-pAXtoXVY.js";import{u as q,a as je}from"./use-org-fs-B4WWFHbJ.js";import{L as Se}from"./preview-dialog-CeEvmRUv.js";import{t as _e,r as we,s as De}from"./daily-pulse-C2a7jj6_.js";import{N as ke}from"./new-project-dialog-B8SVDcTm.js";import{P as ve}from"./projects-empty-state-BYfzt1p6.js";import{b as Be}from"./project-index-D8QhEEmc.js";import{u as Ce}from"./use-inbox-feed-BHASI7cE.js";import{b as Ne}from"./use-recent-apps-TNv8uCPr.js";import{s as Pe}from"./use-project-scope-AQre_lGB.js";import{u as $e}from"./repository-binding-0rqv5CYu.js";import"./use-mobile-BxcOWRrF.js";import"./tooltip-DEqrMv7W.js";import"./index-D4Cq4uu-.js";import"./XClose-CHJIrn3i.js";import"./thread-button-CCXdzpOs.js";import"./use-sidebar-collapsed-DhXPD56p.js";import"./sheet-BclrNEHN.js";import"./use-chat-layout-state-Dx_P1Xmx.js";import"./use-panel-navigate-CRTRFR_W.js";import"./thread-route-BMQ7FfFy.js";import"./toolbar-icon-button-B2FJhjHB.js";import"./use-in-settings-WKil-W1U.js";import"./resizable-BycP7e00.js";import"./route-page-header-DpWJFSUF.js";import"./LayoutLeft-DTjvUEMi.js";import"./use-current-view-DTeimNo3.js";import"./usage-stats-PE4G0CeB.js";import"./utils-CVEq3hMx.js";import"./markdown-D7s3zZ1r.js";import"./use-copy-D1Ps751Y.js";import"./agent-icon-zKGrqypc.js";import"./AlertCircle-BYyFOifG.js";import"./UserCheck01-CHkzczFI.js";import"./Tool01-JC0jUvnM.js";import"./ArrowUp-BbdlU24N.js";import"./ArrowLeft-BQKI9I0k.js";import"./ArrowRight-B21E_uc5.js";import"./BookOpen01-BUy5CVjC.js";import"./Globe04--1ycu_yQ.js";import"./CheckCircle-DtUq_uxu.js";import"./ChevronDown-C0rME5fU.js";import"./ChevronSelectorVertical-BCjXLDN_.js";import"./ChevronUp-CIqW-9_W.js";import"./UserSquare-D6ubIo4l.js";import"./LinkBroken01-w2HNuUHo.js";import"./CreditCard01-BGMvQi86.js";import"./File02-Nky5bxni.js";import"./SwitchHorizontal01-BZWsjo2g.js";import"./Eye-DvysNEeS.js";import"./Fingerprint04-DNoiAgrN.js";import"./Image01-BGZNkNVE.js";import"./Key01-B7vuN73N.js";import"./Minus-DhX2EjkJ.js";import"./Monitor01-Dv4dKtFe.js";import"./Sun-bgIMzv-s.js";import"./Play-BcRuLGoC.js";import"./Plus-Bd_Azs6t.js";import"./SearchMd-DoUjFKDV.js";import"./ShoppingBag01-DsiPVRC3.js";import"./Trash01-DUjxO1Dn.js";import"./Upload01-BcZgaIHQ.js";import"./Users01-DOgFV3e5.js";import"./Zap-6gSNYeqn.js";import"./task-board-B6w6sUwb.js";import"./schema-UfVOE_vK.js";import"./gateway-client-BXoRIC2f.js";import"./form-DINHcU5h.js";import"./label-BleuytxV.js";import"./use-entitlements-BaQvjR8x.js";import"./file-type-icon-BINq6pAJ.js";import"./use-view-draft-kind-BtTSFIlo.js";import"./use-blog-view-BjBkHa1n.js";import"./thread-intent-Dmqjim4G.js";import"./use-mcp-client-XSpKurXu.js";import"./auth-BbyP7Mh4.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CLN8yu6T.js";import"./session-runtime-C9K2fhXt.js";import"./chat-draft-BwCJJBjY.js";import"./use-voice-input-BXFfCREB.js";import"./popover-O0--zxB3.js";import"./drawer-BdL5OKVC.js";import"./use-ai-providers-DuE4C2Wp.js";import"./index-cHqyigDN.js";import"./checkbox-BK5KAA6g.js";import"./select-BtuZ1_PE.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DzZuOsBG.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-1ccyr4DS.js";import"./input-Biz1-kQq.js";import"./suggestion-6kwzt7Yb.js";import"./use-mcp-prompts-Bs2ZYPMm.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-Bg-PT-Nn.js";import"./plan-ladder-DCMpCI9t.js";import"./add-connection-dialog-DgKMGv-9.js";import"./collection-search-C3yL3Si4.js";import"./extract-connection-data-0MTwkkap.js";import"./metadata-D72DunRR.js";import"./connection-OrxsAVXu.js";import"./url-slug-BNPYObW-.js";import"./connection-card-JSblTqum.js";import"./useInfiniteQuery-jSvPkUAC.js";import"./infiniteQueryObserver-C58dnOYG.js";import"./connection-slug-BxAeiVuI.js";import"./integration-icon-B7GQGDoQ.js";import"./textarea-BS-fwvE3.js";import"./use-connection-DW1VkUDp.js";import"./schema-JoNeetSU.js";import"./connection-form-helpers-D-61dVx3.js";import"./authenticate-and-persist-oauth-Dv5K3sbt.js";import"./mcp-oauth-DdZ5iqUI.js";import"./mcp-oauth-Bm9eowFy.js";import"./collection-tabs-Bw8ZEjbc.js";import"./badge-DhCDyINb.js";import"./use-infinite-scroll-BCAJFUTI.js";import"./useSuspenseInfiniteQuery-DQoY99kG.js";import"./use-task-board-items-ClS47WXt.js";import"./use-decopilot-events-qTcqpluN.js";import"./connect-key-x35pzj1P.js";import"./use-api-keys-C3mHEKzm.js";import"./chart-BD1DM8Vo.js";import"./CategoricalChart-CclXOr_i.js";import"./index-WY5skHFQ.js";import"./tooltipContext-BbljAPKp.js";import"./CartesianChart-DDuspEUo.js";import"./project-icon-Bys_QVfz.js";import"./project-apps-D0yVssTS.js";import"./config-CTUwx0E7.js";import"./task-key-DwKgVgaG.js";import"./task-route-DILYUxw7.js";import"./ReferenceLine-B5a2JVy9.js";import"./utils-CeyBwb4E.js";import"./editor-CUzd1SE7.js";import"./preview-content-Cb6-Hnk_.js";import"./file-share-button-BpR0pG7Z.js";import"./use-navigate-to-agent-D9QHHZbU.js";import"./repository-picker-8sFtA2jE.js";import"./github-icon-DeI0LVM6.js";import"./use-debounced-value-Cj3YP2Ju.js";import"./new-project-store-rLMUNU2t.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
1
+ import{c as M,b as Z,J as X,a as V,r as z,j as r,at as re,n as R,a6 as oe,h as ie}from"./index-DoEtSiIe.js";import{ChatLayout as ne}from"./index-FcoC7l5_.js";import{b as se}from"./input-C6McKl01.js";import{D as ae,a as me}from"./chat-context-vJ6R-Clt.js";import{u as le}from"./use-organization-settings-CgKOO7Ms.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-CJ86tdHp.js";import{I as de}from"./icon-button-DFliy54K.js";import{T as he,a as W}from"./toggle-group-CtXgLS7e.js";import{a as xe}from"./MessageCircle01-zc37Krdu.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-BKJnTrOe.js";import{u as q,a as je}from"./use-org-fs-C62_MbqW.js";import{L as Se}from"./preview-dialog-CGhTVXYZ.js";import{t as _e,r as we,s as De}from"./daily-pulse-DVtdyKrr.js";import{N as ke}from"./new-project-dialog-CT39WKMt.js";import{P as ve}from"./projects-empty-state-CUxxduZa.js";import{b as Be}from"./project-index-BcbyhrUz.js";import{u as Ce}from"./use-inbox-feed-_58TtHpK.js";import{b as Ne}from"./use-recent-apps-qXhoWNgp.js";import{s as Pe}from"./use-project-scope-AMUoXt2c.js";import{u as $e}from"./repository-binding-BAQCDq-W.js";import"./use-mobile-BjsAkqwr.js";import"./tooltip-DhlWzeQv.js";import"./index-BFFHlwFA.js";import"./XClose-BUxhnZ3x.js";import"./thread-button-B51gC6ln.js";import"./use-sidebar-collapsed-iTcR18ZK.js";import"./sheet-De8qzGNI.js";import"./use-chat-layout-state-x3sd6PWp.js";import"./use-panel-navigate-DHff9CS9.js";import"./thread-route-D-UE3Db_.js";import"./toolbar-icon-button-Ce7Zk4Z1.js";import"./use-in-settings-LMUeu63D.js";import"./resizable-DwqWjQSo.js";import"./route-page-header-nTLU5ayk.js";import"./LayoutLeft-owMYqid0.js";import"./use-current-view-C2fbVQ-O.js";import"./usage-stats-CLeyhHyT.js";import"./utils-CVEq3hMx.js";import"./markdown-DeZATUv_.js";import"./use-copy-CjEnyhFT.js";import"./agent-icon-DoabtHNW.js";import"./AlertCircle-GoAGGV0G.js";import"./UserCheck01-CA8kXGn8.js";import"./Tool01-D90Wr5xR.js";import"./ArrowUp-s5a8DQxj.js";import"./ArrowLeft-DuGHc_Gh.js";import"./ArrowRight-CMJyKdyB.js";import"./BookOpen01-DZs1-yi9.js";import"./Globe04-5yHQa01g.js";import"./CheckCircle-vIQcB0iT.js";import"./ChevronDown-Dm2xO7jf.js";import"./ChevronSelectorVertical-Cvgyclsz.js";import"./ChevronUp-BKdcyIOm.js";import"./UserSquare-dgrNjiXb.js";import"./LinkBroken01-CyjdgWmP.js";import"./CreditCard01-BUXydXso.js";import"./File02-Y4Nh84qP.js";import"./SwitchHorizontal01-CHtrDs50.js";import"./Eye-DwRCQHLk.js";import"./Fingerprint04-DlIWxzRc.js";import"./Image01-BRABRo3v.js";import"./Key01-DfLmV_su.js";import"./Minus-CFYZtYi9.js";import"./Monitor01-DUhT2Mcw.js";import"./Sun-uwKn4QPm.js";import"./Play-C_9Fb_Ik.js";import"./Plus-BoPsX_T8.js";import"./SearchMd-BGRe_18c.js";import"./ShoppingBag01-CoN4FBW5.js";import"./Trash01-Ctp9Olbr.js";import"./Upload01-DgxprpI7.js";import"./Users01-BasqfwpC.js";import"./Zap-CxPsn4FS.js";import"./task-board-BRF3ZwKz.js";import"./schema-CG6ylG0z.js";import"./gateway-client-C5MrdR_p.js";import"./form-DwGozYbG.js";import"./label-G4Rj_cXa.js";import"./use-entitlements-4v7LU4jM.js";import"./file-type-icon-R4tsODq6.js";import"./use-view-draft-kind-hbAZo1QG.js";import"./use-blog-view-DJnS2ipo.js";import"./thread-intent-R2KI8ie_.js";import"./use-mcp-client-86j-Nolb.js";import"./auth-IBAsOARn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C0me6Edt.js";import"./session-runtime-CZKHty5X.js";import"./chat-draft-C93TMi7F.js";import"./use-voice-input-DJjQBO4e.js";import"./popover-mrQ4T9ru.js";import"./drawer-DO0sMAej.js";import"./use-ai-providers-BwkzkRi2.js";import"./index-BVDmO57n.js";import"./checkbox-CkODjqKt.js";import"./select-OlcoUSVg.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-Bh3jtZIY.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-5H0OzCE5.js";import"./input-DIuJhVNp.js";import"./suggestion-CIik1sqO.js";import"./use-mcp-prompts-CPXLXWTp.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-hqI35k49.js";import"./plan-ladder-DNa_CJD5.js";import"./add-connection-dialog-D2t3ivnz.js";import"./collection-search-DL8nJQx4.js";import"./extract-connection-data-DXA3Rt-s.js";import"./metadata-D72DunRR.js";import"./connection-BxF6Rdiu.js";import"./url-slug-CiUrNKts.js";import"./connection-card-Ca3jxrTD.js";import"./useInfiniteQuery-9vIAXgqG.js";import"./infiniteQueryObserver-BRGiYBJv.js";import"./connection-slug-B7w04sZ1.js";import"./integration-icon-DvT6X8cI.js";import"./textarea-CP9TQ5HN.js";import"./use-connection-BO-ZUzee.js";import"./schema-C5ZQLddp.js";import"./connection-form-helpers-oAW0sDLm.js";import"./authenticate-and-persist-oauth-BmdGjqM8.js";import"./mcp-oauth-C4zfq49i.js";import"./mcp-oauth-BkAlBGe_.js";import"./collection-tabs-9jbbjBDw.js";import"./badge-DONoxQO7.js";import"./use-infinite-scroll-uxxC9xbL.js";import"./useSuspenseInfiniteQuery-CucINu-S.js";import"./use-task-board-items-BVQx7Wft.js";import"./use-decopilot-events-DwNDOIa1.js";import"./connect-key-BddF4e4b.js";import"./use-api-keys-B_vZqtxC.js";import"./chart-BhhOak8o.js";import"./CategoricalChart-iNQ2kTf5.js";import"./index-C_NkXLoh.js";import"./tooltipContext-BkLzQGib.js";import"./CartesianChart-BFVvuNgw.js";import"./project-icon-BxqBM24K.js";import"./project-apps-CSkPT54a.js";import"./config-BOn4tvAD.js";import"./task-key-CajjdR3t.js";import"./task-route-DltlnXMA.js";import"./ReferenceLine-ChigmKEb.js";import"./utils-CzRFs-0R.js";import"./editor-UaRoONxx.js";import"./preview-content-DTs-hWSP.js";import"./file-share-button--SjJonFb.js";import"./use-navigate-to-agent-C-BC28kE.js";import"./repository-picker-BBkgoOlP.js";import"./github-icon-YYYF_UPl.js";import"./use-debounced-value-DqHSmPMR.js";import"./new-project-store-DYc4RZIM.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
@@ -1 +1 @@
1
- import{c as A,b as B,a6 as q,at as ne,j as o,m as K,L as P,E as V,an as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-DNY1LCEV.js";import{i as Z}from"./ArrowRight-B21E_uc5.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-x35pzj1P.js";import{u as xe}from"./use-api-keys-C3mHEKzm.js";import{u as pe,t as ge}from"./use-task-board-items-ClS47WXt.js";import{i as he}from"./AlertCircle-BYyFOifG.js";import{i as Q}from"./CheckCircle-DtUq_uxu.js";import{s as je}from"./Eye-DvysNEeS.js";import{v as ve,A as ke}from"./agent-icon-zKGrqypc.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-BD1DM8Vo.js";import{P as Se}from"./project-icon-Bys_QVfz.js";import{T as X,P as Ce,A as Ie}from"./project-apps-D0yVssTS.js";import{a as Te}from"./config-CTUwx0E7.js";import{t as ze}from"./task-route-DILYUxw7.js";import{p as $e}from"./project-index-D8QhEEmc.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-C2a7jj6_.js";import{R as De}from"./ReferenceLine-B5a2JVy9.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-DDuspEUo.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
1
+ import{c as A,b as B,a6 as q,at as ne,j as o,m as K,L as P,E as V,an as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-DoEtSiIe.js";import{i as Z}from"./ArrowRight-CMJyKdyB.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-BddF4e4b.js";import{u as xe}from"./use-api-keys-B_vZqtxC.js";import{u as pe,t as ge}from"./use-task-board-items-BVQx7Wft.js";import{i as he}from"./AlertCircle-GoAGGV0G.js";import{i as Q}from"./CheckCircle-vIQcB0iT.js";import{s as je}from"./Eye-DwRCQHLk.js";import{v as ve,A as ke}from"./agent-icon-DoabtHNW.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-BhhOak8o.js";import{P as Se}from"./project-icon-BxqBM24K.js";import{T as X,P as Ce,A as Ie}from"./project-apps-CSkPT54a.js";import{a as Te}from"./config-BOn4tvAD.js";import{t as ze}from"./task-route-DltlnXMA.js";import{p as $e}from"./project-index-BcbyhrUz.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-DVtdyKrr.js";import{R as De}from"./ReferenceLine-ChigmKEb.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-BFVvuNgw.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
@@ -1 +1 @@
1
- import{f$ as q,eE as B,g0 as U,c as J,r as Y,fR as P,fS as M,fX as K,fT as N,K as V,fU as X,fW as z,fV as G,fP as R}from"./index-DNY1LCEV.js";import{ax as Z,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-ByfMLHrL.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-CtDx-TXT.js";async function ce(e,t){return e.inDraft?e.value===void 0?B:U(e.value):await q(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=J.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return X({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];_(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!_(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function $(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function H(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function T(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:$(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function W(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:$(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=W(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Se(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await q(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Me(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===B);if(m.length>0){try{if(!M())throw new p(!0);r=await T(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!M())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const S=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=H(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await T(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=W(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const Q=h.pointers.length===0?h.merged:K(h,b),j=he(d,Q,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return S(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw S(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function _(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,$ as e,ge as f,Ce as g,ce as h,Me as i,pe as j,Se as k,he as l,we as m,de as p,De as u};
1
+ import{f$ as q,eE as B,g0 as U,c as J,r as Y,fR as P,fS as M,fX as K,fT as N,K as V,fU as X,fW as z,fV as G,fP as R}from"./index-DoEtSiIe.js";import{ax as Z,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-B-FDGvtN.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-CTy1iAF5.js";async function ce(e,t){return e.inDraft?e.value===void 0?B:U(e.value):await q(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=J.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return X({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];_(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!_(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function $(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function H(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function T(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:$(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function W(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:$(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=W(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Se(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await q(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Me(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===B);if(m.length>0){try{if(!M())throw new p(!0);r=await T(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!M())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const S=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=H(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await T(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=W(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const Q=h.pointers.length===0?h.merged:K(h,b),j=he(d,Q,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return S(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw S(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function _(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,$ as e,ge as f,Ce as g,ce as h,Me as i,pe as j,Se as k,he as l,we as m,de as p,De as u};
@@ -1 +1 @@
1
- import{c as f,j as p,B as h}from"./index-DNY1LCEV.js";import{T as j,a as v,c as T}from"./tooltip-DEqrMv7W.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
1
+ import{c as f,j as p,B as h}from"./index-DoEtSiIe.js";import{T as j,a as v,c as T}from"./tooltip-DhlWzeQv.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
@@ -1 +1 @@
1
- import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-PE4G0CeB.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-DNY1LCEV.js";import{C as k}from"./index-DkgRE7a8.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};
1
+ import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-CLeyhHyT.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-DoEtSiIe.js";import{C as k}from"./index-DJ-fS83G.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};
@@ -1 +1 @@
1
- import{r as i,j as t,c9 as o}from"./index-DNY1LCEV.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
1
+ import{r as i,j as t,c9 as o}from"./index-DoEtSiIe.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
@@ -1 +1 @@
1
- import{c as I,b as X,r as M,m as B,j as s,a6 as Re,e as nt,t as je,D as lt,v as ot,w as at,x as ct,y as dt,B as Fe,ax as ut,Y as ke,a7 as ft,E as H,X as mt,Z as ht,_ as pt,d as gt,aE as bt,l as Ye,H as xt,au as $e,L as Ge,$ as jt,aw as Ve,aF as vt,aG as yt,P as St}from"./index-DNY1LCEV.js";import{u as Ie,c as Ze,g as wt,h as Ct,i as _t}from"./use-sidebar-collapsed-DhXPD56p.js";import{S as kt,a as Ot,b as Rt}from"./sheet-BclrNEHN.js";import{u as Et}from"./use-mobile-BxcOWRrF.js";import{u as zt,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./task-key-DwKgVgaG.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-LMzGz7vy.js";import{i as It}from"./Tool01-JC0jUvnM.js";import{t as Kt,u as Ft,v as Ut,w as Wt,A as Bt,x as Ue}from"./agent-icon-zKGrqypc.js";import{s as Ht}from"./Plus-Bd_Azs6t.js";import{a as Xt}from"./UserSquare-D6ubIo4l.js";import{a as Yt}from"./UserCheck01-CHkzczFI.js";import{s as qe}from"./XClose-CHJIrn3i.js";import{T as ge,a as be,c as xe}from"./tooltip-DEqrMv7W.js";import{C as Pe,f as Gt,g as Vt,e as Zt}from"./context-menu-2WNbt8mp.js";import{a as qt,O as Je,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as is,t as ns,f as Qe,m as ls,o as os}from"./use-org-notice-CuExaYhO.js";import{C as as}from"./create-organization-dialog-Cmj0uZ47.js";import{P as cs}from"./project-apps-D0yVssTS.js";import{u as ds,a as us}from"./use-recent-apps-TNv8uCPr.js";import{a as fs}from"./use-navigate-to-agent-D9QHHZbU.js";import{a as ms,u as hs}from"./use-project-scope-AQre_lGB.js";import{C as We,a as ps,b as gs,c as bs,d as xs}from"./command-C04_rx60.js";import{u as js}from"./use-debounced-value-Cj3YP2Ju.js";import{n as vs}from"./BookOpen01-BUy5CVjC.js";import{F as ys,a as Ae,b as Ss,c as et}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-BS-fwvE3.js";import{a as Cs}from"./thread-button-CCXdzpOs.js";function _s(t){const e=I.c(48),{open:i,onOpenChange:r,orgs:n,currentSlug:d,onSelect:l}=t,a=X(),[o,u]=M.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const p=b,m=js(p,150),h=p.length>0,f=m===p,{hits:v,isSearching:j,isStale:C,isError:w}=qt(h?m:""),c=h?v:n;let x;e[2]!==r?(x=L=>{r(L),L||u("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==a?(y=a("sidebar.rail.searchOrganizations"),e[4]=a,e[5]=y):y=e[5];let S;e[6]!==a?(S=a("sidebar.rail.searchPlaceholder"),e[6]=a,e[7]=S):S=e[7];let k;e[8]!==a?(k=a("sidebar.rail.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(ps,{value:o,onValueChange:u,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=h&&(C||!f)&&"opacity-50";let E;e[13]!==T?(E=B(T),e[13]=T,e[14]=E):E=e[14];let O;e[15]!==w||e[16]!==h||e[17]!==a?(O=h&&w&&s.jsx(We,{children:a("sidebar.rail.searchFailed")}),e[15]=w,e[16]=h,e[17]=a,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==c.length||e[22]!==f||e[23]!==a?(z=!w&&f&&!j&&c.length===0&&s.jsx(We,{children:a("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=c.length,e[22]=f,e[23]=a,e[24]=z):z=e[24];let D;if(e[25]!==d||e[26]!==l||e[27]!==g||e[28]!==c||e[29]!==a){let L;e[31]!==d||e[32]!==l||e[33]!==g||e[34]!==a?(L=P=>s.jsxs(gs,{value:P.slug,onSelect:()=>{g(!1),P.slug!==d&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Je,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===d&&s.jsx("span",{className:"text-meta shrink-0",children:a("sidebar.rail.currentOrganization")})]},P.id),e[31]=d,e[32]=l,e[33]=g,e[34]=a,e[35]=L):L=e[35],D=c.map(L),e[25]=d,e[26]=l,e[27]=g,e[28]=c,e[29]=a,e[30]=D}else D=e[30];let R;e[36]!==z||e[37]!==D||e[38]!==E||e[39]!==O?(R=s.jsxs(bs,{className:E,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=E,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==i||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:i,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=i,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function ks(t){const e=I.c(4),{size:i,className:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=n):n=e[0];let d;return e[1]!==r||e[2]!==i?(d=s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:n}),e[1]=r,e[2]=i,e[3]=d):d=e[3],d}const Os=250;function Rs(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,i){return new Promise(r=>t.toBlob(r,e,i))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(d=>setTimeout(d,Os));const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(i,"image/png");if((!r||r.size>et)&&(r=await Be(i,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const n=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${n}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:i}){const r=X(),n=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:d}=Re(),[l,a]=M.useState(""),[o,u]=M.useState([]),[b,p]=M.useState(!1),m=()=>{for(const c of o)URL.revokeObjectURL(c.previewUrl);u([]),a("")},h=c=>{const x=c.filter(S=>Ss.includes(S.type)?S.size>et?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&u(S=>[...S,...y])},f=c=>{URL.revokeObjectURL(c.previewUrl),u(x=>x.filter(g=>g!==c))},v=async()=>{p(!0);try{h([await Es()])}catch(c){c instanceof DOMException&&c.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",c),je.error(r("sidebar.feedback.screenshotFailed")))}finally{p(!1)}},j=c=>{const x=Array.from(c.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(c.preventDefault(),h(x))},C=nt({mutationFn:async()=>{const c=new FormData;c.set("kind",t),c.set("message",l.trim()),c.set("pageUrl",window.location.href);for(const g of o)c.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(d.slug)}/feedback`,{method:"POST",body:c});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(n.sent),m(),i(!1)},onError:()=>je.error(n.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(lt,{open:e&&!b,onOpenChange:i,children:s.jsxs(ot,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(at,{children:s.jsx(ct,{children:n.title})}),s.jsx(ws,{autoFocus:!0,value:l,onChange:c=>a(c.target.value),onPaste:j,onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w&&C.mutate())},placeholder:n.placeholder,className:"min-h-32 max-h-80",maxLength:ys}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((c,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:c.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:c.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},c.previewUrl))}),s.jsxs(dt,{className:"sm:justify-between",children:[Rs()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(Kt,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:i,label:r,children:n}=t,d=i?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==d?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",d),e[0]=d,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=a):a=e[3];let o;e[4]!==i||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=i,e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==a||e[9]!==o?(u=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,n,o]}),e[7]=n,e[8]=a,e[9]=o,e[10]=u):u=e[10],u}const zs="https://docs.decocms.com/",Ds="https://discord.gg/EQkX7CymV";function Ns(){const t=I.c(39),e=X(),{org:i}=Re(),[r,n]=M.useState(null),d=!!i.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),n(_)},t[0]=l):l=t[0];const a=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ut,{size:18}),t[3]=u):u=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ps,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:u})})}),t[4]=o,t[5]=b):b=t[5];let p;t[6]!==e?(p=e("sidebar.help.button"),t[6]=e,t[7]=p):p=t[7];let m;t[8]!==p?(m=s.jsx(be,{side:"right",children:p}),t[8]=p,t[9]=m):m=t[9];let h;t[10]!==b||t[11]!==m?(h=s.jsxs(xe,{children:[b,m]}),t[10]=b,t[11]=m,t[12]=h):h=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{}),t[13]=f):f=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ls,children:[f,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ks,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let c;t[21]!==w?(c=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Ds,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[C,w]})}),t[21]=w,t[22]=c):c=t[22];let x;t[23]!==d||t[24]!==e?(x=d&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsxs(ke,{onSelect:()=>a("problem"),children:[s.jsx(ft,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>a("feedback"),children:[s.jsx(Ft,{}),e("sidebar.feedback.button")]})]}),t[23]=d,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==c||t[27]!==x||t[28]!==j?(g=s.jsxs(ht,{side:"right",align:"end",className:"w-56",children:[j,c,x]}),t[26]=c,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==h?(y=s.jsx(ve,{active:!1,children:s.jsxs(pt,{children:[h,g]})}),t[30]=g,t[31]=h,t[32]=y):y=t[32];let S;t[33]!==d||t[34]!==r?(S=d&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>n(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>n(_?"feedback":null)})]}),t[33]=d,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ts(){return H("help_menu_discord_opened")}function Ls(){return H("help_menu_guides_opened")}function Ps(){return H("help_menu_opened")}function As(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const Ms=()=>Qe(globalThis.innerHeight),$s=()=>Qe(0);function Is(t){const e=I.c(59),{org:i,active:r,onSelect:n,pinned:d,onOpenSettings:l,onTogglePin:a,onHide:o}=t,u=X();let b;e[0]!==i.slug?(b={id:i.slug},e[0]=i.slug,e[1]=b):b=e[1];const{setNodeRef:p,listeners:m,transform:h,transition:f,isDragging:v}=$t(b);let j;e[2]!==h?(j=Lt.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${i.slug}`;let c;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==f?(c={transform:j,transition:f,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=f,e[8]=c):c=e[8];const x=i.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=n&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==i?(_=s.jsx(Je,{org:i,size:"lg"}),e[12]=i,e[13]=_):_=e[13];let T;e[14]!==d?(T=d&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=d,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==i.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(E=s.jsx(ge,{asChild:!0,children:s.jsx(Gt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:n,className:k,children:[_,T]})})}),e[16]=n,e[17]=i.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=E):E=e[22];let O;e[23]!==i.name?(O=s.jsx(be,{side:"right",children:i.name}),e[23]=i.name,e[24]=O):O=e[24];let z;e[25]!==E||e[26]!==O?(z=s.jsxs(xe,{children:[E,O]}),e[25]=E,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Yt,{}),e[28]=D):D=e[28];let R;e[29]!==u?(R=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==d||e[36]!==u?(P=u(d?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=d,e[36]=u,e[37]=P):P=e[37];let F;e[38]!==a||e[39]!==P?(F=s.jsxs(Pe,{onSelect:a,children:[L,P]}),e[38]=a,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==u?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),u("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=u,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Vt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==m||e[55]!==p||e[56]!==W||e[57]!==c?(G=s.jsx("div",{ref:p,...m,style:c,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=p,e[56]=W,e[57]=c,e[58]=G):G=e[58],G}function Ks(t){const e=I.c(64),{project:i,orgSlug:r,active:n,onClose:d,onNavigate:l}=t,a=X();let o,u,b,p,m,h,f,v,j,C,w;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==i.icon||e[4]!==i.id||e[5]!==i.title){const L=Wt(i.icon,i.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,u=ge,C=!0,o=Ge,p=jt.root,e[17]!==r||e[18]!==i.id?(m={org:r,agentId:i.id},e[17]=r,e[18]=i.id,e[19]=m):m=e[19],h=i.title,f=n||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,n&&"ring-[1.5px] ring-current"),e[0]=n,e[1]=l,e[2]=r,e[3]=i.icon,e[4]=i.id,e[5]=i.title,e[6]=o,e[7]=u,e[8]=b,e[9]=p,e[10]=m,e[11]=h,e[12]=f,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],u=e[7],b=e[8],p=e[9],m=e[10],h=e[11],f=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let c;e[22]!==i.icon||e[23]!==i.title?(c=s.jsx(Bt,{icon:i.icon,name:i.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=i.icon,e[23]=i.title,e[24]=c):c=e[24];let x;e[25]!==o||e[26]!==p||e[27]!==m||e[28]!==h||e[29]!==f||e[30]!==v||e[31]!==j||e[32]!==c?(x=s.jsx(o,{to:p,params:m,"aria-label":h,"aria-current":f,onClick:v,className:j,children:c}),e[25]=o,e[26]=p,e[27]=m,e[28]=h,e[29]=f,e[30]=v,e[31]=j,e[32]=c,e[33]=x):x=e[33];let g;e[34]!==u||e[35]!==x||e[36]!==C?(g=s.jsx(u,{asChild:C,children:x}),e[34]=u,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==i.title?(y=s.jsx(be,{side:"right",children:i.title}),e[38]=i.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==i.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:i.title}),e[46]=i.title,e[47]=_,e[48]=T):T=e[48];let E;e[49]!==i.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:i.title}),e[49]=i.title,e[50]=a,e[51]=E):E=e[51];let O;e[52]!==d?(O=()=>{H("org_rail_recent_project_closed"),d()},e[52]=d,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let R;e[56]!==E||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":E,onClick:O,className:z,children:D}),e[56]=E,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Fs={"site-editor":"/site-editor"};function Us(t){const e=I.c(26),{app:i}=t,r=X(),n=cs[i],d=Fs[i];if(!n||!d)return null;let l;e[0]!==n.labelKey||e[1]!==r?(l=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==n.labelKey||e[4]!==r?(a=r(n.labelKey),e[3]=n.labelKey,e[4]=r,e[5]=a):a=e[5];let o;e[6]!==n.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",n.tone),e[6]=n.tone,e[7]=o):o=e[7];let u;e[8]!==n.Icon?(u=s.jsx(n.Icon,{size:18}),e[8]=n.Icon,e[9]=u):u=e[9];let b;e[10]!==a||e[11]!==o||e[12]!==u||e[13]!==d?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ge,{to:d,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:u})}),e[10]=a,e[11]=o,e[12]=u,e[13]=d,e[14]=b):b=e[14];let p;e[15]!==n.labelKey||e[16]!==r?(p=r(n.labelKey),e[15]=n.labelKey,e[16]=r,e[17]=p):p=e[17];let m;e[18]!==p?(m=s.jsx(be,{side:"right",children:p}),e[18]=p,e[19]=m):m=e[19];let h;e[20]!==b||e[21]!==m?(h=s.jsxs(xe,{children:[b,m]}),e[20]=b,e[21]=m,e[22]=h):h=e[22];let f;return e[23]!==l||e[24]!==h?(f=s.jsx(ve,{active:!0,label:l,children:h}),e[23]=l,e[24]=h,e[25]=f):f=e[25],f}function Ws(){const{org:t}=Re();return ds(t.slug),null}function tt(t){const e=I.c(77),{onNavigate:i}=t===void 0?{}:t,r=X(),n=gt(),{org:d}=Re(),l=bt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ys},e[0]=a):a=e[0];const o=Ye(a);let u;e[1]!==o||e[2]!==l?(u=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=u):u=e[3];const b=u,p=b?b.org:d.slug,{data:m}=xt(),[h,f]=M.useState(!1),[v,j]=M.useState(!1),C=Ie(),{recent:w,forget:c}=fs(d.slug),{projects:x}=ms(),g=hs(),y=us(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter($=>$.id===N)),_=Jt(m??[],d),{recent:T}=Qt(),E=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ve.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,ts),R=Oe(z),A=M.useSyncExternalStore(As,Ms,$s),{shown:L}=ss(rs(_,R,d.slug),T,d.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Dt(Pt,P)),U=N=>{const{active:$,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(it=>ls(Oe(it),L.map(Xs),String($.id),String(Ke.id))))},Y=N=>{i?.(),n({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),i?.(),E(N,L.map(Hs))},W=()=>{if(H("org_rail_search_opened"),!d.id){j(!0);return}i?.(),os()},G=!C&&"border-r border-sidebar-border";let V;e[6]!==G?(V=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=V):V=e[7];const rt="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Ee=Nt,ze=Tt,De=At,Ne=L.map(Bs),Te=Mt,Le=L.map(N=>s.jsxs(M.Fragment,{children:[s.jsx(Is,{org:N,active:N.slug===p,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==d.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{i?.(),n({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D($=>ns(Oe($),N.slug)),onHide:N.slug===d.slug?void 0:()=>D($=>is(Oe($),N.slug))}),N.slug===d.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map($=>s.jsx(Ks,{project:$,orgSlug:d.slug,active:g===$.id,onClose:()=>c($.id),onNavigate:i},$.id))})]},N.id));let q;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(q=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=q):q=e[14];let J;e[15]!==Ee||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==q?(J=s.jsx(Ee,{sensors:F,collisionDetection:ze,onDragEnd:U,children:q}),e[15]=Ee,e[16]=U,e[17]=F,e[18]=ze,e[19]=q,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Us,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==Z?(ee=s.jsxs("div",{className:rt,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Xt,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ie;e[36]!==re?(ie=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ie):ie=e[37];let ne;e[38]!==se||e[39]!==ie?(ne=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=ne):ne=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==f?(oe=()=>f(!0),e[43]=f,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ht,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ns,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ne||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,ue,Ce]}),e[57]=ne,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==V?(me=s.jsxs("div",{className:V,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=V,e[63]=me):me=e[63];let he;e[64]!==d.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(_s,{open:v,onOpenChange:j,orgs:_,currentSlug:d.slug,onSelect:K}),e[64]=d.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==h||e[71]!==f?(pe=s.jsx(as,{open:h,onOpenChange:f}),e[70]=h,e[71]=f,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.slug}function Ys(t){return t.isLoading}function Gs(t){const e=I.c(15),{width:i,minWidth:r,maxWidth:n,onPointerDown:d,onKeyDown:l,onDoubleClick:a}=t,o=X(),{isMobile:u}=Ze(),b=Ie();if(u||b)return null;let p;e[0]!==o?(p=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=p):p=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let h,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=h,e[5]=f):(h=e[4],f=e[5]);let v;return e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==l||e[10]!==d||e[11]!==p||e[12]!==m||e[13]!==i?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":p,"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":n,title:m,tabIndex:0,onPointerDown:d,onKeyDown:l,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:h,children:f}),e[6]=n,e[7]=r,e[8]=a,e[9]=l,e[10]=d,e[11]=p,e[12]=m,e[13]=i,e[14]=v):v=e[14],v}const Me=400,Xe=16,Vs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>typeof f=="number"?e(f):192,t[0]=i):i=t[0];const[r,n]=$e(Vs,i),d=M.useRef(null);let l;t[1]!==n||t[2]!==r?(l=f=>{f.preventDefault();const v=f.clientX,j=e(r),C=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const c=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));n(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",c),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=n,t[2]=r,t[3]=l):l=t[3];const a=l;let o;t[4]!==n?(o=()=>{n(192)},t[4]=n,t[5]=o):o=t[5];const u=o;let b;t[6]!==n||t[7]!==r?(b=f=>{if(f.key==="ArrowLeft")n(e(r-Xe));else if(f.key==="ArrowRight")n(e(r+Xe));else if(f.key==="Home")n(192);else if(f.key==="End")n(Me);else return;f.preventDefault()},t[6]=n,t[7]=r,t[8]=b):b=t[8];const p=b,m=e(r);let h;return t[9]!==p||t[10]!==a||t[11]!==u||t[12]!==m?(h={width:m,minWidth:192,maxWidth:Me,wrapperRef:d,onStartResize:a,onKeyDownResize:p,resetWidth:u},t[9]=p,t[10]=a,t[11]=u,t[12]=m,t[13]=h):h=t[13],h}function qs(t){return Math.max(192,Math.min(Me,t))}const st=M.createContext(null);function Js(){const t=M.use(st);if(!t)throw new Error("Layout regions require a Layout");return t}function Qs({children:t,notice:e,outsideOrg:i}){const r=Et(),[n,d]=$e(Ve.sidebarOpen(),!0),l=Zs(),a=Ye({select:m=>yt(m.location.state)}),[o,u]=M.useState(!1);!a&&o&&u(!1);const b=a&&!o?!1:n,p=m=>{if(!a){d(m);return}u(m),m&&!n&&d(!0)};return s.jsx(st,{value:{isMobile:r,resize:l},children:s.jsx(wt,{open:b,onOpenChange:p,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!i&&s.jsx(Ws,{}),!r&&(i?.rail??!0)&&s.jsx(tt,{}),s.jsx(Ct,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(Cs,{children:t})})]})]})})})}function er(t){const e=I.c(36),{children:i,renderMobile:r}=t,n=X(),{isMobile:d,resize:l}=Js(),{openMobile:a,setOpenMobile:o}=Ze(),u=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const p=b;if(!d){let x;e[2]!==i||e[3]!==u?(x=s.jsx("div",{className:"contents",inert:u,children:i}),e[2]=i,e[3]=u,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Gs,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let m;e[15]!==n?(m=n("layouts.shellControls.navigationTitle"),e[15]=n,e[16]=m):m=e[16];let h;e[17]!==m?(h=s.jsx(kt,{className:"sr-only",children:m}),e[17]=m,e[18]=h):h=e[18];let f;e[19]!==p?(f=s.jsx(tt,{onNavigate:p}),e[19]=p,e[20]=f):f=e[20];let v;e[21]!==p||e[22]!==r?(v=r({onClose:p}),e[21]=p,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==f||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[f,j]}),e[26]=f,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==h||e[30]!==C?(w=s.jsxs(Ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:tr,children:[h,C]}),e[29]=h,e[30]=C,e[31]=w):w=e[31];let c;return e[32]!==a||e[33]!==o||e[34]!==w?(c=s.jsx(Rt,{open:a,onOpenChange:o,children:w}),e[32]=a,e[33]=o,e[34]=w,e[35]=c):c=e[35],c}function tr(t){return t.preventDefault()}function sr(t){const e=I.c(3),{children:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let n;return e[1]!==i?(n=s.jsx(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(St,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:i})})}),e[1]=i,e[2]=n):n=e[2],n}const Er=Object.assign(Qs,{Sidebar:er,Content:sr});export{Er as L};
1
+ import{c as I,b as X,r as M,m as B,j as s,a6 as Re,e as nt,t as je,D as lt,v as ot,w as at,x as ct,y as dt,B as Fe,ax as ut,Y as ke,a7 as ft,E as H,X as mt,Z as ht,_ as pt,d as gt,aE as bt,l as Ye,H as xt,au as $e,L as Ge,$ as jt,aw as Ve,aF as vt,aG as yt,P as St}from"./index-DoEtSiIe.js";import{u as Ie,c as Ze,g as wt,h as Ct,i as _t}from"./use-sidebar-collapsed-iTcR18ZK.js";import{S as kt,a as Ot,b as Rt}from"./sheet-De8qzGNI.js";import{u as Et}from"./use-mobile-BjsAkqwr.js";import{u as zt,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./task-key-CajjdR3t.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-B0hCRAsX.js";import{i as It}from"./Tool01-D90Wr5xR.js";import{t as Kt,u as Ft,v as Ut,w as Wt,A as Bt,x as Ue}from"./agent-icon-DoabtHNW.js";import{s as Ht}from"./Plus-BoPsX_T8.js";import{a as Xt}from"./UserSquare-dgrNjiXb.js";import{a as Yt}from"./UserCheck01-CA8kXGn8.js";import{s as qe}from"./XClose-BUxhnZ3x.js";import{T as ge,a as be,c as xe}from"./tooltip-DhlWzeQv.js";import{C as Pe,f as Gt,g as Vt,e as Zt}from"./context-menu-DJtvu4JZ.js";import{a as qt,O as Je,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as is,t as ns,f as Qe,m as ls,o as os}from"./use-org-notice-BzvGZbQ2.js";import{C as as}from"./create-organization-dialog-97eVCkRr.js";import{P as cs}from"./project-apps-CSkPT54a.js";import{u as ds,a as us}from"./use-recent-apps-qXhoWNgp.js";import{a as fs}from"./use-navigate-to-agent-C-BC28kE.js";import{a as ms,u as hs}from"./use-project-scope-AMUoXt2c.js";import{C as We,a as ps,b as gs,c as bs,d as xs}from"./command-D5O7M-Cf.js";import{u as js}from"./use-debounced-value-DqHSmPMR.js";import{n as vs}from"./BookOpen01-DZs1-yi9.js";import{F as ys,a as Ae,b as Ss,c as et}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-CP9TQ5HN.js";import{a as Cs}from"./thread-button-B51gC6ln.js";function _s(t){const e=I.c(48),{open:i,onOpenChange:r,orgs:n,currentSlug:d,onSelect:l}=t,a=X(),[o,u]=M.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const p=b,m=js(p,150),h=p.length>0,f=m===p,{hits:v,isSearching:j,isStale:C,isError:w}=qt(h?m:""),c=h?v:n;let x;e[2]!==r?(x=L=>{r(L),L||u("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==a?(y=a("sidebar.rail.searchOrganizations"),e[4]=a,e[5]=y):y=e[5];let S;e[6]!==a?(S=a("sidebar.rail.searchPlaceholder"),e[6]=a,e[7]=S):S=e[7];let k;e[8]!==a?(k=a("sidebar.rail.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(ps,{value:o,onValueChange:u,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=h&&(C||!f)&&"opacity-50";let E;e[13]!==T?(E=B(T),e[13]=T,e[14]=E):E=e[14];let O;e[15]!==w||e[16]!==h||e[17]!==a?(O=h&&w&&s.jsx(We,{children:a("sidebar.rail.searchFailed")}),e[15]=w,e[16]=h,e[17]=a,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==c.length||e[22]!==f||e[23]!==a?(z=!w&&f&&!j&&c.length===0&&s.jsx(We,{children:a("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=c.length,e[22]=f,e[23]=a,e[24]=z):z=e[24];let D;if(e[25]!==d||e[26]!==l||e[27]!==g||e[28]!==c||e[29]!==a){let L;e[31]!==d||e[32]!==l||e[33]!==g||e[34]!==a?(L=P=>s.jsxs(gs,{value:P.slug,onSelect:()=>{g(!1),P.slug!==d&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Je,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===d&&s.jsx("span",{className:"text-meta shrink-0",children:a("sidebar.rail.currentOrganization")})]},P.id),e[31]=d,e[32]=l,e[33]=g,e[34]=a,e[35]=L):L=e[35],D=c.map(L),e[25]=d,e[26]=l,e[27]=g,e[28]=c,e[29]=a,e[30]=D}else D=e[30];let R;e[36]!==z||e[37]!==D||e[38]!==E||e[39]!==O?(R=s.jsxs(bs,{className:E,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=E,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==i||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:i,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=i,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function ks(t){const e=I.c(4),{size:i,className:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=n):n=e[0];let d;return e[1]!==r||e[2]!==i?(d=s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:n}),e[1]=r,e[2]=i,e[3]=d):d=e[3],d}const Os=250;function Rs(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,i){return new Promise(r=>t.toBlob(r,e,i))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(d=>setTimeout(d,Os));const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(i,"image/png");if((!r||r.size>et)&&(r=await Be(i,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const n=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${n}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:i}){const r=X(),n=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:d}=Re(),[l,a]=M.useState(""),[o,u]=M.useState([]),[b,p]=M.useState(!1),m=()=>{for(const c of o)URL.revokeObjectURL(c.previewUrl);u([]),a("")},h=c=>{const x=c.filter(S=>Ss.includes(S.type)?S.size>et?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&u(S=>[...S,...y])},f=c=>{URL.revokeObjectURL(c.previewUrl),u(x=>x.filter(g=>g!==c))},v=async()=>{p(!0);try{h([await Es()])}catch(c){c instanceof DOMException&&c.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",c),je.error(r("sidebar.feedback.screenshotFailed")))}finally{p(!1)}},j=c=>{const x=Array.from(c.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(c.preventDefault(),h(x))},C=nt({mutationFn:async()=>{const c=new FormData;c.set("kind",t),c.set("message",l.trim()),c.set("pageUrl",window.location.href);for(const g of o)c.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(d.slug)}/feedback`,{method:"POST",body:c});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(n.sent),m(),i(!1)},onError:()=>je.error(n.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(lt,{open:e&&!b,onOpenChange:i,children:s.jsxs(ot,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(at,{children:s.jsx(ct,{children:n.title})}),s.jsx(ws,{autoFocus:!0,value:l,onChange:c=>a(c.target.value),onPaste:j,onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w&&C.mutate())},placeholder:n.placeholder,className:"min-h-32 max-h-80",maxLength:ys}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((c,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:c.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:c.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},c.previewUrl))}),s.jsxs(dt,{className:"sm:justify-between",children:[Rs()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(Kt,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:i,label:r,children:n}=t,d=i?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==d?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",d),e[0]=d,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=a):a=e[3];let o;e[4]!==i||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=i,e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==a||e[9]!==o?(u=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,n,o]}),e[7]=n,e[8]=a,e[9]=o,e[10]=u):u=e[10],u}const zs="https://docs.decocms.com/",Ds="https://discord.gg/EQkX7CymV";function Ns(){const t=I.c(39),e=X(),{org:i}=Re(),[r,n]=M.useState(null),d=!!i.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),n(_)},t[0]=l):l=t[0];const a=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ut,{size:18}),t[3]=u):u=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ps,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:u})})}),t[4]=o,t[5]=b):b=t[5];let p;t[6]!==e?(p=e("sidebar.help.button"),t[6]=e,t[7]=p):p=t[7];let m;t[8]!==p?(m=s.jsx(be,{side:"right",children:p}),t[8]=p,t[9]=m):m=t[9];let h;t[10]!==b||t[11]!==m?(h=s.jsxs(xe,{children:[b,m]}),t[10]=b,t[11]=m,t[12]=h):h=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{}),t[13]=f):f=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ls,children:[f,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ks,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let c;t[21]!==w?(c=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Ds,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[C,w]})}),t[21]=w,t[22]=c):c=t[22];let x;t[23]!==d||t[24]!==e?(x=d&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsxs(ke,{onSelect:()=>a("problem"),children:[s.jsx(ft,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>a("feedback"),children:[s.jsx(Ft,{}),e("sidebar.feedback.button")]})]}),t[23]=d,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==c||t[27]!==x||t[28]!==j?(g=s.jsxs(ht,{side:"right",align:"end",className:"w-56",children:[j,c,x]}),t[26]=c,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==h?(y=s.jsx(ve,{active:!1,children:s.jsxs(pt,{children:[h,g]})}),t[30]=g,t[31]=h,t[32]=y):y=t[32];let S;t[33]!==d||t[34]!==r?(S=d&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>n(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>n(_?"feedback":null)})]}),t[33]=d,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ts(){return H("help_menu_discord_opened")}function Ls(){return H("help_menu_guides_opened")}function Ps(){return H("help_menu_opened")}function As(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const Ms=()=>Qe(globalThis.innerHeight),$s=()=>Qe(0);function Is(t){const e=I.c(59),{org:i,active:r,onSelect:n,pinned:d,onOpenSettings:l,onTogglePin:a,onHide:o}=t,u=X();let b;e[0]!==i.slug?(b={id:i.slug},e[0]=i.slug,e[1]=b):b=e[1];const{setNodeRef:p,listeners:m,transform:h,transition:f,isDragging:v}=$t(b);let j;e[2]!==h?(j=Lt.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${i.slug}`;let c;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==f?(c={transform:j,transition:f,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=f,e[8]=c):c=e[8];const x=i.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=n&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==i?(_=s.jsx(Je,{org:i,size:"lg"}),e[12]=i,e[13]=_):_=e[13];let T;e[14]!==d?(T=d&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=d,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==i.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(E=s.jsx(ge,{asChild:!0,children:s.jsx(Gt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:n,className:k,children:[_,T]})})}),e[16]=n,e[17]=i.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=E):E=e[22];let O;e[23]!==i.name?(O=s.jsx(be,{side:"right",children:i.name}),e[23]=i.name,e[24]=O):O=e[24];let z;e[25]!==E||e[26]!==O?(z=s.jsxs(xe,{children:[E,O]}),e[25]=E,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Yt,{}),e[28]=D):D=e[28];let R;e[29]!==u?(R=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==d||e[36]!==u?(P=u(d?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=d,e[36]=u,e[37]=P):P=e[37];let F;e[38]!==a||e[39]!==P?(F=s.jsxs(Pe,{onSelect:a,children:[L,P]}),e[38]=a,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==u?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),u("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=u,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Vt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==m||e[55]!==p||e[56]!==W||e[57]!==c?(G=s.jsx("div",{ref:p,...m,style:c,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=p,e[56]=W,e[57]=c,e[58]=G):G=e[58],G}function Ks(t){const e=I.c(64),{project:i,orgSlug:r,active:n,onClose:d,onNavigate:l}=t,a=X();let o,u,b,p,m,h,f,v,j,C,w;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==i.icon||e[4]!==i.id||e[5]!==i.title){const L=Wt(i.icon,i.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,u=ge,C=!0,o=Ge,p=jt.root,e[17]!==r||e[18]!==i.id?(m={org:r,agentId:i.id},e[17]=r,e[18]=i.id,e[19]=m):m=e[19],h=i.title,f=n||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,n&&"ring-[1.5px] ring-current"),e[0]=n,e[1]=l,e[2]=r,e[3]=i.icon,e[4]=i.id,e[5]=i.title,e[6]=o,e[7]=u,e[8]=b,e[9]=p,e[10]=m,e[11]=h,e[12]=f,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],u=e[7],b=e[8],p=e[9],m=e[10],h=e[11],f=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let c;e[22]!==i.icon||e[23]!==i.title?(c=s.jsx(Bt,{icon:i.icon,name:i.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=i.icon,e[23]=i.title,e[24]=c):c=e[24];let x;e[25]!==o||e[26]!==p||e[27]!==m||e[28]!==h||e[29]!==f||e[30]!==v||e[31]!==j||e[32]!==c?(x=s.jsx(o,{to:p,params:m,"aria-label":h,"aria-current":f,onClick:v,className:j,children:c}),e[25]=o,e[26]=p,e[27]=m,e[28]=h,e[29]=f,e[30]=v,e[31]=j,e[32]=c,e[33]=x):x=e[33];let g;e[34]!==u||e[35]!==x||e[36]!==C?(g=s.jsx(u,{asChild:C,children:x}),e[34]=u,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==i.title?(y=s.jsx(be,{side:"right",children:i.title}),e[38]=i.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==i.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:i.title}),e[46]=i.title,e[47]=_,e[48]=T):T=e[48];let E;e[49]!==i.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:i.title}),e[49]=i.title,e[50]=a,e[51]=E):E=e[51];let O;e[52]!==d?(O=()=>{H("org_rail_recent_project_closed"),d()},e[52]=d,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let R;e[56]!==E||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":E,onClick:O,className:z,children:D}),e[56]=E,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Fs={"site-editor":"/site-editor"};function Us(t){const e=I.c(26),{app:i}=t,r=X(),n=cs[i],d=Fs[i];if(!n||!d)return null;let l;e[0]!==n.labelKey||e[1]!==r?(l=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==n.labelKey||e[4]!==r?(a=r(n.labelKey),e[3]=n.labelKey,e[4]=r,e[5]=a):a=e[5];let o;e[6]!==n.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",n.tone),e[6]=n.tone,e[7]=o):o=e[7];let u;e[8]!==n.Icon?(u=s.jsx(n.Icon,{size:18}),e[8]=n.Icon,e[9]=u):u=e[9];let b;e[10]!==a||e[11]!==o||e[12]!==u||e[13]!==d?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ge,{to:d,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:u})}),e[10]=a,e[11]=o,e[12]=u,e[13]=d,e[14]=b):b=e[14];let p;e[15]!==n.labelKey||e[16]!==r?(p=r(n.labelKey),e[15]=n.labelKey,e[16]=r,e[17]=p):p=e[17];let m;e[18]!==p?(m=s.jsx(be,{side:"right",children:p}),e[18]=p,e[19]=m):m=e[19];let h;e[20]!==b||e[21]!==m?(h=s.jsxs(xe,{children:[b,m]}),e[20]=b,e[21]=m,e[22]=h):h=e[22];let f;return e[23]!==l||e[24]!==h?(f=s.jsx(ve,{active:!0,label:l,children:h}),e[23]=l,e[24]=h,e[25]=f):f=e[25],f}function Ws(){const{org:t}=Re();return ds(t.slug),null}function tt(t){const e=I.c(77),{onNavigate:i}=t===void 0?{}:t,r=X(),n=gt(),{org:d}=Re(),l=bt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ys},e[0]=a):a=e[0];const o=Ye(a);let u;e[1]!==o||e[2]!==l?(u=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=u):u=e[3];const b=u,p=b?b.org:d.slug,{data:m}=xt(),[h,f]=M.useState(!1),[v,j]=M.useState(!1),C=Ie(),{recent:w,forget:c}=fs(d.slug),{projects:x}=ms(),g=hs(),y=us(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter($=>$.id===N)),_=Jt(m??[],d),{recent:T}=Qt(),E=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ve.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,ts),R=Oe(z),A=M.useSyncExternalStore(As,Ms,$s),{shown:L}=ss(rs(_,R,d.slug),T,d.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Dt(Pt,P)),U=N=>{const{active:$,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(it=>ls(Oe(it),L.map(Xs),String($.id),String(Ke.id))))},Y=N=>{i?.(),n({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),i?.(),E(N,L.map(Hs))},W=()=>{if(H("org_rail_search_opened"),!d.id){j(!0);return}i?.(),os()},G=!C&&"border-r border-sidebar-border";let V;e[6]!==G?(V=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=V):V=e[7];const rt="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Ee=Nt,ze=Tt,De=At,Ne=L.map(Bs),Te=Mt,Le=L.map(N=>s.jsxs(M.Fragment,{children:[s.jsx(Is,{org:N,active:N.slug===p,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==d.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{i?.(),n({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D($=>ns(Oe($),N.slug)),onHide:N.slug===d.slug?void 0:()=>D($=>is(Oe($),N.slug))}),N.slug===d.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map($=>s.jsx(Ks,{project:$,orgSlug:d.slug,active:g===$.id,onClose:()=>c($.id),onNavigate:i},$.id))})]},N.id));let q;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(q=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=q):q=e[14];let J;e[15]!==Ee||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==q?(J=s.jsx(Ee,{sensors:F,collisionDetection:ze,onDragEnd:U,children:q}),e[15]=Ee,e[16]=U,e[17]=F,e[18]=ze,e[19]=q,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Us,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==Z?(ee=s.jsxs("div",{className:rt,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Xt,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ie;e[36]!==re?(ie=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ie):ie=e[37];let ne;e[38]!==se||e[39]!==ie?(ne=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=ne):ne=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==f?(oe=()=>f(!0),e[43]=f,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ht,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ns,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ne||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,ue,Ce]}),e[57]=ne,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==V?(me=s.jsxs("div",{className:V,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=V,e[63]=me):me=e[63];let he;e[64]!==d.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(_s,{open:v,onOpenChange:j,orgs:_,currentSlug:d.slug,onSelect:K}),e[64]=d.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==h||e[71]!==f?(pe=s.jsx(as,{open:h,onOpenChange:f}),e[70]=h,e[71]=f,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.slug}function Ys(t){return t.isLoading}function Gs(t){const e=I.c(15),{width:i,minWidth:r,maxWidth:n,onPointerDown:d,onKeyDown:l,onDoubleClick:a}=t,o=X(),{isMobile:u}=Ze(),b=Ie();if(u||b)return null;let p;e[0]!==o?(p=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=p):p=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let h,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=h,e[5]=f):(h=e[4],f=e[5]);let v;return e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==l||e[10]!==d||e[11]!==p||e[12]!==m||e[13]!==i?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":p,"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":n,title:m,tabIndex:0,onPointerDown:d,onKeyDown:l,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:h,children:f}),e[6]=n,e[7]=r,e[8]=a,e[9]=l,e[10]=d,e[11]=p,e[12]=m,e[13]=i,e[14]=v):v=e[14],v}const Me=400,Xe=16,Vs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>typeof f=="number"?e(f):192,t[0]=i):i=t[0];const[r,n]=$e(Vs,i),d=M.useRef(null);let l;t[1]!==n||t[2]!==r?(l=f=>{f.preventDefault();const v=f.clientX,j=e(r),C=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const c=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));n(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",c),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=n,t[2]=r,t[3]=l):l=t[3];const a=l;let o;t[4]!==n?(o=()=>{n(192)},t[4]=n,t[5]=o):o=t[5];const u=o;let b;t[6]!==n||t[7]!==r?(b=f=>{if(f.key==="ArrowLeft")n(e(r-Xe));else if(f.key==="ArrowRight")n(e(r+Xe));else if(f.key==="Home")n(192);else if(f.key==="End")n(Me);else return;f.preventDefault()},t[6]=n,t[7]=r,t[8]=b):b=t[8];const p=b,m=e(r);let h;return t[9]!==p||t[10]!==a||t[11]!==u||t[12]!==m?(h={width:m,minWidth:192,maxWidth:Me,wrapperRef:d,onStartResize:a,onKeyDownResize:p,resetWidth:u},t[9]=p,t[10]=a,t[11]=u,t[12]=m,t[13]=h):h=t[13],h}function qs(t){return Math.max(192,Math.min(Me,t))}const st=M.createContext(null);function Js(){const t=M.use(st);if(!t)throw new Error("Layout regions require a Layout");return t}function Qs({children:t,notice:e,outsideOrg:i}){const r=Et(),[n,d]=$e(Ve.sidebarOpen(),!0),l=Zs(),a=Ye({select:m=>yt(m.location.state)}),[o,u]=M.useState(!1);!a&&o&&u(!1);const b=a&&!o?!1:n,p=m=>{if(!a){d(m);return}u(m),m&&!n&&d(!0)};return s.jsx(st,{value:{isMobile:r,resize:l},children:s.jsx(wt,{open:b,onOpenChange:p,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!i&&s.jsx(Ws,{}),!r&&(i?.rail??!0)&&s.jsx(tt,{}),s.jsx(Ct,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(Cs,{children:t})})]})]})})})}function er(t){const e=I.c(36),{children:i,renderMobile:r}=t,n=X(),{isMobile:d,resize:l}=Js(),{openMobile:a,setOpenMobile:o}=Ze(),u=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const p=b;if(!d){let x;e[2]!==i||e[3]!==u?(x=s.jsx("div",{className:"contents",inert:u,children:i}),e[2]=i,e[3]=u,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Gs,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let m;e[15]!==n?(m=n("layouts.shellControls.navigationTitle"),e[15]=n,e[16]=m):m=e[16];let h;e[17]!==m?(h=s.jsx(kt,{className:"sr-only",children:m}),e[17]=m,e[18]=h):h=e[18];let f;e[19]!==p?(f=s.jsx(tt,{onNavigate:p}),e[19]=p,e[20]=f):f=e[20];let v;e[21]!==p||e[22]!==r?(v=r({onClose:p}),e[21]=p,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==f||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[f,j]}),e[26]=f,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==h||e[30]!==C?(w=s.jsxs(Ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:tr,children:[h,C]}),e[29]=h,e[30]=C,e[31]=w):w=e[31];let c;return e[32]!==a||e[33]!==o||e[34]!==w?(c=s.jsx(Rt,{open:a,onOpenChange:o,children:w}),e[32]=a,e[33]=o,e[34]=w,e[35]=c):c=e[35],c}function tr(t){return t.preventDefault()}function sr(t){const e=I.c(3),{children:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let n;return e[1]!==i?(n=s.jsx(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(St,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:i})})}),e[1]=i,e[2]=n):n=e[2],n}const Er=Object.assign(Qs,{Sidebar:er,Content:sr});export{Er as L};