decocms 4.584.0 → 4.584.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 (428) hide show
  1. package/dist/client/assets/{AlertCircle-BZ0BGwnM.js → AlertCircle-DQxZei1M.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Bx-g_z7W.js → AreaChart-BpPDw3S2.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BTOFmFlT.js → ArrowLeft-BXhTMhZ6.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BpkoTWQH.js → ArrowRight-BrCDap4m.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CwKaPNjB.js → ArrowUp-DqYXEiS6.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-DhDZ7eNO.js → BookOpen01-BJOsJKWt.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BHS62I-v.js → CartesianChart-DovdkEKF.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-BnSCjdlG.js → CategoricalChart-g0ZOgFoY.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CY8bNwGH.js → CheckCircle-BupieyS2.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-BKlrlXc3.js → ChevronDown-rYBqLYZM.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BePvvjKF.js → ChevronSelectorVertical-BRPtW72N.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CHCELrzp.js → ChevronUp-DH1sZis7.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-uK4ZToQn.js → CreditCard01-jTESoJyl.js} +1 -1
  14. package/dist/client/assets/{Eye-kjpbNZjZ.js → Eye-CHPIJQjl.js} +1 -1
  15. package/dist/client/assets/{File02-CKfJdGFc.js → File02-DTSJu4_M.js} +1 -1
  16. package/dist/client/assets/{Globe04-jkYXmi_b.js → Globe04-BBhKUFMP.js} +1 -1
  17. package/dist/client/assets/{Image01-Bo1SdsGt.js → Image01-DhuPGc9J.js} +1 -1
  18. package/dist/client/assets/{Key01-7H0qkrA1.js → Key01-Cy6U3PPJ.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BgxQ02aQ.js → LayoutLeft-CQYXrSFJ.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-Cxiv48HY.js → LinkBroken01-C0qz4eZM.js} +1 -1
  21. package/dist/client/assets/{Minimize01-BSWAuJc_.js → Minimize01-B-w6jPRM.js} +1 -1
  22. package/dist/client/assets/{Minus-DcVQxn2x.js → Minus-CuVl5Nk4.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DihbBP9d.js → Monitor01-Du9j9yAH.js} +1 -1
  24. package/dist/client/assets/{Play-C20jb3jc.js → Play-5POBzwun.js} +1 -1
  25. package/dist/client/assets/{Plus-i14Zi4mM.js → Plus-BuHEMQHj.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-C4ifFxvc.js → ReferenceLine-CD2YCNYN.js} +1 -1
  27. package/dist/client/assets/{SearchMd-fVOqR5XB.js → SearchMd-BvADjx7u.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CGXAeyMk.js → ShoppingBag01-BX-lvdE7.js} +1 -1
  29. package/dist/client/assets/{Sun-CfU4AOYR.js → Sun-rTc-uCbQ.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-BSYwKL4Y.js → SwitchHorizontal01-CSYGFkCN.js} +1 -1
  31. package/dist/client/assets/{Tool01-BVIO9Qty.js → Tool01-e3-ebizX.js} +1 -1
  32. package/dist/client/assets/{Tooltip-Cfj1COLE.js → Tooltip-DZsuCEaj.js} +1 -1
  33. package/dist/client/assets/{Trash01-P2MZx3ms.js → Trash01-C4Y4RaH9.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-CLufuADE.js → TrendUp01-BTeMqD6U.js} +1 -1
  35. package/dist/client/assets/{Upload01-Dprp9ZwK.js → Upload01-BwW7JFsg.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-C2z5zhQe.js → UserCheck01-BaEElAkP.js} +1 -1
  37. package/dist/client/assets/{UserSquare-B9MlTUcx.js → UserSquare-Dyyof09V.js} +1 -1
  38. package/dist/client/assets/{Users01-BcGcy0wY.js → Users01-BnstW7gr.js} +1 -1
  39. package/dist/client/assets/{XClose-CbqnWE9C.js → XClose-CtKN8GLR.js} +1 -1
  40. package/dist/client/assets/{Zap-DPxvV-Nt.js → Zap-DsBnYwKs.js} +1 -1
  41. package/dist/client/assets/{access-gate-C8T1_NGY.js → access-gate-BntOlgl7.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-C22z0dJk.js → add-connection-dialog-59sWEK5_.js} +1 -1
  43. package/dist/client/assets/agent-app-DAyp6W1I.js +1 -0
  44. package/dist/client/assets/{agent-assets-DLiEqX7t.js → agent-assets-CSBU0hid.js} +1 -1
  45. package/dist/client/assets/{agent-automation-D707BChu.js → agent-automation-CxWAwCKQ.js} +1 -1
  46. package/dist/client/assets/{agent-automations-xu_RP6J4.js → agent-automations-BiFwrTja.js} +1 -1
  47. package/dist/client/assets/{agent-blog-DGVUKsy8.js → agent-blog-CvqVSDQe.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-BxafFxUn.js → agent-blog-post-CNmT-Bw1.js} +2 -2
  49. package/dist/client/assets/{agent-calendar-DWr9pjl2.js → agent-calendar-Df2E5iU7.js} +1 -1
  50. package/dist/client/assets/{agent-capabilities-DepzNhfJ.js → agent-capabilities-DL0Et1pz.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-Kv2PdtBo.js → agent-connect-sources-DjO3ELqr.js} +1 -1
  52. package/dist/client/assets/agent-deck-DKfZyTG1.js +1 -0
  53. package/dist/client/assets/{agent-e2e-k5mMFS8d.js → agent-e2e-DPsBEkPw.js} +1 -1
  54. package/dist/client/assets/agent-experiments-CGsGxxo6.js +1 -0
  55. package/dist/client/assets/agent-file-CPOrYbU2.js +1 -0
  56. package/dist/client/assets/{agent-hosting-CWKW5hjL.js → agent-hosting-N1yvJFNT.js} +1 -1
  57. package/dist/client/assets/{agent-icon-DkJRVLqK.js → agent-icon-DKmZvJgZ.js} +1 -1
  58. package/dist/client/assets/agent-library-BkV0iVdr.js +1 -0
  59. package/dist/client/assets/agent-library-file-2kVH1dmS.js +1 -0
  60. package/dist/client/assets/agent-overview-BwQW84d6.js +1 -0
  61. package/dist/client/assets/{agent-releases-DSIYOvyj.js → agent-releases-CTHfLMQR.js} +1 -1
  62. package/dist/client/assets/agent-settings-iJ--LXZN.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-C1fA8VpJ.js → agent-site-editor-cTApO8_e.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-C9qZvHAo.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-MtSfvdcm.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-bCH5xSAf.js +1 -0
  67. package/dist/client/assets/agent-view-DkyKhs8z.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-2_KCfto_.js → agent-view-guard-BhYsk1BZ.js} +1 -1
  69. package/dist/client/assets/{ai-providers-DX-ltrPo.js → ai-providers-Do3U2ueK.js} +1 -1
  70. package/dist/client/assets/{alert-Bv02tf7n.js → alert-1FQypqKU.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-pY8ydIOR.js → analytics-sections-6shIIY_9.js} +1 -1
  72. package/dist/client/assets/{api-keys-CtapHyd2.js → api-keys-CLle76fE.js} +1 -1
  73. package/dist/client/assets/api-keys-tRTG3oS8.js +1 -0
  74. package/dist/client/assets/{app-editor-b_F0QWd_.js → app-editor-LFvS-D7P.js} +1 -1
  75. package/dist/client/assets/{asset-utils-sFjfnFiW.js → asset-utils-C17ggG12.js} +1 -1
  76. package/dist/client/assets/{auth-JsuyXQmx.js → auth-DM_x_MzR.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-BF2sAyru.js → auth-catchall-BPafoRCP.js} +1 -1
  78. package/dist/client/assets/{auth-entry-DpOoMaDl.js → auth-entry-DpZohCSe.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-uHl5qLom.js → auth-split-layout-TV_ZF3vV.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-bpkds3b0.js → authenticate-and-persist-oauth-BB_emyV8.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-C0N85u6M.js → automation-list-row-CSZy0P8y.js} +1 -1
  82. package/dist/client/assets/{automation-runs-D7wABNtH.js → automation-runs-Dwd63wnZ.js} +1 -1
  83. package/dist/client/assets/{automations-DoJiUx4k.js → automations-BneDlBwJ.js} +1 -1
  84. package/dist/client/assets/{badge-BcL569rK.js → badge-C4UVwcna.js} +1 -1
  85. package/dist/client/assets/{block-document-BjznMIp2.js → block-document--vYZqLkK.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-GWtlleeP.js → blocks-preview-workspace-context-CICZXJZV.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-BSrtLgq9.js → blocks-tab-states-Cd3JWT_-.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-Czu_9H4e.js → blog-preview-url-Ba2xc55V.js} +1 -1
  89. package/dist/client/assets/{blog-schema-Cf62uKwQ.js → blog-schema-B4mnHHT1.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-DiR6cjBJ.js → blog-source-gate-CJ7ECLCv.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-BhcycJ8-.js → blog-view-gate-8-5UD9Vy.js} +1 -1
  92. package/dist/client/assets/{buckets-AU2_f8G6.js → buckets-Cbg1Gz3J.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-em6vVUiq.js → build-improve-prompt-doc-C11pf2M8.js} +1 -1
  94. package/dist/client/assets/{calendar-lMJXe0Vk.js → calendar-CJeS1cU0.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-D2PPUj2i.js → capability-load-error-DJnu-VAt.js} +1 -1
  96. package/dist/client/assets/{category-editor-C6GjoH9R.js → category-editor-DYKgEga_.js} +1 -1
  97. package/dist/client/assets/{category-tree-XVjkohBB.js → category-tree-DMad1kgd.js} +1 -1
  98. package/dist/client/assets/{chart-CzCK-tF-.js → chart-DFW5rTOU.js} +1 -1
  99. package/dist/client/assets/{chat-context-BLnGXGPp.js → chat-context-BNZ_9-8I.js} +1 -1
  100. package/dist/client/assets/{chat-draft-jC339CDY.js → chat-draft-D-mbDU5V.js} +1 -1
  101. package/dist/client/assets/{checkbox-jFW417rg.js → checkbox-BhkoX8Ty.js} +1 -1
  102. package/dist/client/assets/{choose-editor-GJQxUyy8.js → choose-editor-PSR-AhBm.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-Bb87LPip.js → cli-auth-success-iqwwPoIK.js} +1 -1
  104. package/dist/client/assets/{cms-settings-editor-C1h0m5Lx.js → cms-settings-editor-CODxJGge.js} +1 -1
  105. package/dist/client/assets/{cms-store-drafts-Bi9z0Tv5.js → cms-store-drafts-DbB0rL_p.js} +1 -1
  106. package/dist/client/assets/{collapsible-IkM9Ewzf.js → collapsible-2JPp4iG8.js} +1 -1
  107. package/dist/client/assets/{collection-detail-C0lp4GBi.js → collection-detail-DDg39GUv.js} +1 -1
  108. package/dist/client/assets/{collection-display-button-Cl_5d_nT.js → collection-display-button-a-kxAH9S.js} +1 -1
  109. package/dist/client/assets/{collection-search-bFfkZUb6.js → collection-search-BKN9EjWI.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-B2jzfzUl.js → collection-table-wrapper-BTsJY-2Y.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-DEboaJXk.js → collection-tabs-BByE0AF2.js} +1 -1
  112. package/dist/client/assets/{combobox-CiGXUnCv.js → combobox-D-AE0za3.js} +1 -1
  113. package/dist/client/assets/{command-D_N7zpwy.js → command-1rGUkJU6.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-DNWssZd2.js → companion-mcps-section-C0SBN__q.js} +1 -1
  115. package/dist/client/assets/{config-giA1KgEi.js → config-ySNx5jY7.js} +1 -1
  116. package/dist/client/assets/{connect-Dr03SpeZ.js → connect-dcudJGkR.js} +1 -1
  117. package/dist/client/assets/{connect-key-XfiSxoIE.js → connect-key-BdMAsXh0.js} +1 -1
  118. package/dist/client/assets/{connect-layout-Bbat9hlH.js → connect-layout-DzBvWaNS.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-B_9vLQS4.js → connect-source-dialog-BxAaaWS9.js} +1 -1
  120. package/dist/client/assets/{connection-C8CUAy7P.js → connection-B1w9XeEb.js} +1 -1
  121. package/dist/client/assets/{connection-card-D_Uc1OoH.js → connection-card-ozwXxBsz.js} +1 -1
  122. package/dist/client/assets/{connection-detail-BIDElD0e.js → connection-detail-C4zRa_cO.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-DASQdNW4.js → connection-form-helpers-B6__xS0A.js} +1 -1
  124. package/dist/client/assets/{connection-slug-BywwM0Xb.js → connection-slug-C95YanvL.js} +1 -1
  125. package/dist/client/assets/{connections-CsGzxnL4.js → connections-NomfYn_t.js} +1 -1
  126. package/dist/client/assets/{content-tab-vWa8SHR9.js → content-tab-BvcDl2gQ.js} +3 -3
  127. package/dist/client/assets/{context-DQAvq4o7.js → context-Cvc8fgay.js} +1 -1
  128. package/dist/client/assets/{context-menu-725S94S-.js → context-menu-DBCh223t.js} +1 -1
  129. package/dist/client/assets/{context-shell-DZVf-jmL.js → context-shell-CAxUAqQN.js} +3 -3
  130. package/dist/client/assets/{create-organization-dialog-CQU8vsHz.js → create-organization-dialog-WzOR16k9.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-CzMff-et.js → daily-pulse-9WDMhYxD.js} +1 -1
  132. package/dist/client/assets/{delete-copy-tVwI6KKh.js → delete-copy-B4_SCbWy.js} +1 -1
  133. package/dist/client/assets/{device-hint-BeggFfp6.js → device-hint-B8guedWJ.js} +1 -1
  134. package/dist/client/assets/{discover-JRFPAUk3.js → discover-CBb9-mOO.js} +1 -1
  135. package/dist/client/assets/{domain-settings-DqDImPS-.js → domain-settings-8msdYCkg.js} +1 -1
  136. package/dist/client/assets/{drawer-BHd0Jra6.js → drawer-CN3NEJqY.js} +1 -1
  137. package/dist/client/assets/{editor-BYfzbACz.js → editor-BIhlI60e.js} +1 -1
  138. package/dist/client/assets/{editor-classes-B97Owa1G.js → editor-classes-CPgVKg5X.js} +1 -1
  139. package/dist/client/assets/{empty-message-CH3ICmuH.js → empty-message-CTz0j9ie.js} +1 -1
  140. package/dist/client/assets/{empty-state-BtNfctJt.js → empty-state-3xiekdCM.js} +1 -1
  141. package/dist/client/assets/{empty-state-BGUxoSrw.js → empty-state-myFrB_Ip.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-Cqk56o_2.js → experiments-tab-choice-2CS-Zgr0.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-X90aKvel.js → extract-connection-data-BPRLQOFh.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DZa9r59Q.js → feature-gate-BuF8FtOJ.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-B5dVUVm-.js → feature-paywall-DYmmeBz6.js} +1 -1
  146. package/dist/client/assets/{file-explorer-CuqUmCvx.js → file-explorer-o1fJE87z.js} +1 -1
  147. package/dist/client/assets/{file-preview-DxP6YCuS.js → file-preview-BxRBK5s6.js} +1 -1
  148. package/dist/client/assets/{file-share-button-DUiUmzDk.js → file-share-button-C8YeuQFC.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-CPmLjdw0.js → file-type-icon-DO8X7oBj.js} +1 -1
  150. package/dist/client/assets/{folder-icon-UhsVAhlz.js → folder-icon-BER7BhBb.js} +1 -1
  151. package/dist/client/assets/{form-YdpHvMEe.js → form-CdBjJq5W.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-DjoSOUXB.js → frame-navigation-D3UfnhDI.js} +1 -1
  153. package/dist/client/assets/{gateway-client-BmjZ0joI.js → gateway-client-CqrPq2Zk.js} +1 -1
  154. package/dist/client/assets/{general-Bt4D7jSJ.js → general-DubsWx1F.js} +1 -1
  155. package/dist/client/assets/{github-icon-DBNhbuOq.js → github-icon-BzIHSx26.js} +1 -1
  156. package/dist/client/assets/{held-block-view-BPyv_Bj9.js → held-block-view-CyRccyrh.js} +1 -1
  157. package/dist/client/assets/{home-BdEm6uTS.js → home-kU7uY0wN.js} +1 -1
  158. package/dist/client/assets/{home-overview-CilZm22n.js → home-overview-CVeVpH2f.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-CACimEU-.js → hosted-reconcile-CfjfxtVx.js} +1 -1
  160. package/dist/client/assets/{icon-button-BVEHdZYj.js → icon-button-ue-T-dgY.js} +1 -1
  161. package/dist/client/assets/{index-Qo4M3qMa.js → index-BAOf8r3P.js} +1 -1
  162. package/dist/client/assets/{index-Big5zxJQ.js → index-BpLMoHof.js} +1 -1
  163. package/dist/client/assets/{index-hwrw3rkU.js → index-BqtN0tVI.js} +1 -1
  164. package/dist/client/assets/{index-DfQA1GAT.js → index-CJfrwB-R.js} +1 -1
  165. package/dist/client/assets/{index-BwUztF-N.js → index-CKb3YsIm.js} +1 -1
  166. package/dist/client/assets/{index-CN3SCz7U.js → index-CTrggIhe.js} +1 -1
  167. package/dist/client/assets/{index-BW7F0oP5.js → index-CV1w3jjI.js} +1 -1
  168. package/dist/client/assets/{index-DMMrJmQ3.js → index-D0nLrq64.js} +1 -1
  169. package/dist/client/assets/{index-CaInDSB5.js → index-DBvbzGen.js} +1 -1
  170. package/dist/client/assets/{index-Bg2cA5dN.js → index-DFWNckdo.js} +1 -1
  171. package/dist/client/assets/{index-CxRVhGQ4.js → index-DK0mPK-c.js} +1 -1
  172. package/dist/client/assets/{index-DMf-vAS9.js → index-DKfNWn49.js} +1 -1
  173. package/dist/client/assets/{index-D9poEv_S.js → index-DLuam-oO.js} +3 -3
  174. package/dist/client/assets/{index-DdcawAy-.js → index-DSnXPPOf.js} +1 -1
  175. package/dist/client/assets/{index-4hVIbVvu.js → index-DVG3DDnP.js} +1 -1
  176. package/dist/client/assets/{index-C302vCyS.js → index-DuLSpVbY.js} +1 -1
  177. package/dist/client/assets/{index-CksQ7RxK.js → index-MxDefvFp.js} +1 -1
  178. package/dist/client/assets/{index-redirect-DiL6wV_c.js → index-redirect-DjZ-Sa8w.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-CaEK8ONs.js → infiniteQueryObserver-DmwMo8IW.js} +1 -1
  180. package/dist/client/assets/{infra-billing-BCFp1gNE.js → infra-billing-tL7M-OYS.js} +1 -1
  181. package/dist/client/assets/{input-DP0rL1U_.js → input-BmLmPqN8.js} +3 -3
  182. package/dist/client/assets/{input-B9td9Urd.js → input-CleFKoms.js} +1 -1
  183. package/dist/client/assets/{integration-icon-NqhVgI3n.js → integration-icon-DNMl6-J4.js} +1 -1
  184. package/dist/client/assets/{item-actions-BZytzuQ9.js → item-actions-Dx1AQzgR.js} +1 -1
  185. package/dist/client/assets/{jira-icon-CwYh2GFn.js → jira-icon-Daus-Qh_.js} +1 -1
  186. package/dist/client/assets/{label-BCYFBbIw.js → label-B40B-mb1.js} +1 -1
  187. package/dist/client/assets/{layout-CL42o1Yr.js → layout-BdcpXWG7.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-CmqRv0HT.js → legacy-admin-welcome-dialog-Dty139TN.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-BUyPXwwA.js → legacy-agents-deep-Dzc7RIdK.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-D7vM0GiU.js → legacy-main-redirect-0mpfN8mn.js} +1 -1
  191. package/dist/client/assets/library-BrEeR06C.js +1 -0
  192. package/dist/client/assets/{library-tab-BEc6Pbwf.js → library-tab-BQGS1hg4.js} +1 -1
  193. package/dist/client/assets/{login-CLuevGyf.js → login-fewT-eGQ.js} +1 -1
  194. package/dist/client/assets/{markdown-DYPhmlaF.js → markdown-DIZTLySz.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-Cs2iJUy6.js → mcp-app-renderer-BxY6mRCw.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-CdZI7dfM.js → mcp-oauth-CYwT_ghl.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-C6Tisjqi.js → mcp-oauth-DPpUVCIn.js} +1 -1
  198. package/dist/client/assets/{members-BaALa9xH.js → members-B50nL28U.js} +1 -1
  199. package/dist/client/assets/{memory-B2E3y0Yc.js → memory-DFivCTx1.js} +1 -1
  200. package/dist/client/assets/{mock-board-Cu5T7-1Z.js → mock-board-DSINFAen.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-ISdNcoi4.js → monaco-editor-UA1YjU4h.js} +1 -1
  202. package/dist/client/assets/{monitoring-BV9cqhbn.js → monitoring-BK7wCv-P.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-ad45HV04.js → monitoring-stats-row-Brhc7V-D.js} +1 -1
  204. package/dist/client/assets/{multi-select-B4a4O5qC.js → multi-select-BIcoAJyN.js} +1 -1
  205. package/dist/client/assets/{mustache-BocCKXOv.js → mustache-CiKDfLgV.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-CKkqw0jp.js → named-rule-step-5FH6L5dL.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-C3wI3Xnv.js → named-rule-view-DngGXZwe.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-tmPiPwbR.js → new-project-dialog-CJFHxf5_.js} +1 -1
  209. package/dist/client/assets/{new-project-store-RJXM205V.js → new-project-store-BXbDjmer.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-ai-provider-Be18PCqq.js → oauth-callback-ai-provider-U5G79VLu.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ItNO54kB.js → oauth-callback-jqZo425q.js} +1 -1
  212. package/dist/client/assets/{oauth-consent--O6O8U3z.js → oauth-consent-39y0iaMU.js} +1 -1
  213. package/dist/client/assets/{onboarding-Bt8NRajr.js → onboarding-DWLBD5ut.js} +1 -1
  214. package/dist/client/assets/{openai-conversation-De66y8sD.js → openai-conversation-DpZUzyhJ.js} +1 -1
  215. package/dist/client/assets/{optimistic-project-sidebar-views-CfFOXS7u.js → optimistic-project-sidebar-views-CTVuJVPD.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-CePGGrQl.js → order-monitor-day-dpkjc8ij.js} +1 -1
  217. package/dist/client/assets/{organization-choice-BREc4-rY.js → organization-choice-D5AXEApQ.js} +1 -1
  218. package/dist/client/assets/{orgs-BuZAVuUT.js → orgs-loxqaAZ4.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-yyVEvkX6.js → own-accounts-section-BheLkLhk.js} +1 -1
  220. package/dist/client/assets/{pair-CiXtBbbF.js → pair-Cd9OPgUF.js} +1 -1
  221. package/dist/client/assets/{parse-sections-WY1RJ27g.js → parse-sections-Ddd3WX1b.js} +2 -2
  222. package/dist/client/assets/{plan-CTTUCOCf.js → plan-057NyNVI.js} +1 -1
  223. package/dist/client/assets/{plan-ladder-Dn5ZPJM9.js → plan-ladder-Dtd21Pl6.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-C5_KdZ2_.js → plan-usage-card-jrtY0QJl.js} +1 -1
  225. package/dist/client/assets/{popover-CP-hSbhT.js → popover-DWDvG2sJ.js} +1 -1
  226. package/dist/client/assets/{post-calendar-Be8qbnFE.js → post-calendar-Bu09DnPi.js} +1 -1
  227. package/dist/client/assets/{post-editor-GBnt5Obn.js → post-editor-BDNaaN9x.js} +1 -1
  228. package/dist/client/assets/{preview-content-CqyBoW0D.js → preview-content-CtnZUPEs.js} +1 -1
  229. package/dist/client/assets/{preview-dialog-CKevN11A.js → preview-dialog-DdxdDV82.js} +1 -1
  230. package/dist/client/assets/{preview-panel-BuQ4yGSo.js → preview-panel-ixPYwT5r.js} +1 -1
  231. package/dist/client/assets/{preview-tab-C-V2oAhZ.js → preview-tab-Cm_klhH-.js} +3 -3
  232. package/dist/client/assets/{product-picker-dialog-C-Bh-agz.js → product-picker-dialog-BAGp-pzM.js} +1 -1
  233. package/dist/client/assets/{profile-CI-BPtuo.js → profile-BPxHpR5D.js} +1 -1
  234. package/dist/client/assets/{project-app-view-B_29oE4R.js → project-app-view-CdRO1n9x.js} +1 -1
  235. package/dist/client/assets/{project-apps-hjYt3L4J.js → project-apps-DjfXES5v.js} +1 -1
  236. package/dist/client/assets/{project-icon-CtK060oN.js → project-icon-CySwwEU9.js} +1 -1
  237. package/dist/client/assets/{project-index-rV1NSwrP.js → project-index-1ZydFeWl.js} +1 -1
  238. package/dist/client/assets/project-reports-DqV8Bd24.js +1 -0
  239. package/dist/client/assets/project-tasks-qTU5720S.js +1 -0
  240. package/dist/client/assets/{projects-BaH2HGg3.js → projects-He1mlmS7.js} +1 -1
  241. package/dist/client/assets/{projects-empty-state-COghPAu-.js → projects-empty-state-ADXUwUj7.js} +1 -1
  242. package/dist/client/assets/{prompts-DpolCk2C.js → prompts-DK1e5czf.js} +1 -1
  243. package/dist/client/assets/record-editor-DCJNlw5O.js +1 -0
  244. package/dist/client/assets/{redirect-editor-rDQg8ffs.js → redirect-editor-IDqQ8xFk.js} +1 -1
  245. package/dist/client/assets/reports-B6ii5CDi.js +1 -0
  246. package/dist/client/assets/{reports-BaxCffzc.js → reports-lYJ13Oyh.js} +1 -1
  247. package/dist/client/assets/{reports-onboarding-BejwYIRj.js → reports-onboarding-DaousQwr.js} +1 -1
  248. package/dist/client/assets/{reports-tab-D7-ZHRK_.js → reports-tab-by1j2nl6.js} +2 -2
  249. package/dist/client/assets/{repositories-DjySXVoQ.js → repositories-BrfAbLdn.js} +1 -1
  250. package/dist/client/assets/repositories-CSXIjdlZ.js +1 -0
  251. package/dist/client/assets/{repository-binding-DnDGprHj.js → repository-binding-BnP0NJWu.js} +1 -1
  252. package/dist/client/assets/{repository-picker-CoyA5imt.js → repository-picker-vBJtxDaP.js} +1 -1
  253. package/dist/client/assets/{require-capability-BcPRJVcD.js → require-capability-Cr8WvkbM.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-DDlu3UJb.js → required-auth-layout-DEnKlG9k.js} +1 -1
  255. package/dist/client/assets/{reset-password-BJJQZMwh.js → reset-password-G1XaV8Dd.js} +1 -1
  256. package/dist/client/assets/{resizable-p6SPDaRS.js → resizable-D8QP7rfi.js} +1 -1
  257. package/dist/client/assets/{resolve-tab-icon-BdVF5ixR.js → resolve-tab-icon-DcSz8B7S.js} +1 -1
  258. package/dist/client/assets/{review-settings-BmsFMrpA.js → review-settings-CgzfxoaC.js} +1 -1
  259. package/dist/client/assets/{role-color-Csw3CmY5.js → role-color-C69WmCOL.js} +1 -1
  260. package/dist/client/assets/{roles-BUQWm2PB.js → roles-BGI2Y25_.js} +1 -1
  261. package/dist/client/assets/{route-xEKNDBRl.js → route-B4TcTxp_.js} +1 -1
  262. package/dist/client/assets/{route-Bb6Jc2uw.js → route-BjSwEarg.js} +1 -1
  263. package/dist/client/assets/route-BqTOx7z7.js +1 -0
  264. package/dist/client/assets/{route-page-header-BHWZyk8y.js → route-page-header-D5mciaLz.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-Bi9RvPsJ.js → sandbox-git-api-BsZqakhs.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-C4V1kqms.js → sandbox-lifecycle-context-CabivZ0G.js} +1 -1
  267. package/dist/client/assets/{save-status-CbKB2tgB.js → save-status-Bt5jCay9.js} +1 -1
  268. package/dist/client/assets/{schema-DH1Yp9e9.js → schema-3tzQDCWP.js} +1 -1
  269. package/dist/client/assets/{schema-ur1hUUl7.js → schema-BM6o7q66.js} +1 -1
  270. package/dist/client/assets/{scroll-area-Od2oOAKa.js → scroll-area-CltAMX3V.js} +1 -1
  271. package/dist/client/assets/{search-input-CAfR6Gbn.js → search-input-CyDCJavO.js} +1 -1
  272. package/dist/client/assets/{search-toggle-CUVCbHGs.js → search-toggle-uNgvu336.js} +1 -1
  273. package/dist/client/assets/{secret-picker-DM8sNXWg.js → secret-picker-C8eTSOuG.js} +1 -1
  274. package/dist/client/assets/{secrets-C6Drbexb.js → secrets-Bj8129eI.js} +1 -1
  275. package/dist/client/assets/{section-array-field-BreHGIvy.js → section-array-field-CbwaMhTt.js} +1 -1
  276. package/dist/client/assets/{sections-BVtQLv-b.js → sections-BW9uhCQa.js} +1 -1
  277. package/dist/client/assets/{sections-editor-IaZ-F2EE.js → sections-editor-DMAnP9ts.js} +1 -1
  278. package/dist/client/assets/{select-DbziOf0e.js → select-IOXOk3Ja.js} +1 -1
  279. package/dist/client/assets/{select-model-D7lvbmbp.js → select-model-DSJLMb4j.js} +1 -1
  280. package/dist/client/assets/{seo-editor-DGJ2myhV.js → seo-editor-CBuQjDAN.js} +1 -1
  281. package/dist/client/assets/{separator-DCZYVGqN.js → separator-CKPY3Jny.js} +1 -1
  282. package/dist/client/assets/{session-runtime-D87un1xV.js → session-runtime-AXnCtlIf.js} +1 -1
  283. package/dist/client/assets/settings-tab-wW6TWR10.js +1 -0
  284. package/dist/client/assets/{sheet-DCU86hqn.js → sheet-C7jRkpDc.js} +1 -1
  285. package/dist/client/assets/{shell-layout-DhXO3kdV.js → shell-layout-MV3x6XdO.js} +1 -1
  286. package/dist/client/assets/{site-draft-actions-BoCCfw5y.js → site-draft-actions-Cs2K4nbV.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-B7wPj61X.js → site-draft-view-BORE1dgv.js} +1 -1
  288. package/dist/client/assets/site-editor-CeDcKfa-.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-BEmWExuz.js → site-editor-toast-Btsx5baB.js} +1 -1
  290. package/dist/client/assets/{skills-B3F1746i.js → skills-Gl5GY5F7.js} +1 -1
  291. package/dist/client/assets/{slider-DX6aptUe.js → slider-Z3uc-J_e.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-YJOEuS_v.js → sortable.esm-BsRtZMdI.js} +1 -1
  293. package/dist/client/assets/{sso-D0XXTIV_.js → sso-CBda3voX.js} +1 -1
  294. package/dist/client/assets/{suggestion-DrTYv82A.js → suggestion-DOa2is9l.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-Cnp5uAFQ.js → super-agent-icon-BQSqMktN.js} +1 -1
  296. package/dist/client/assets/{switch-DwFzcsns.js → switch-DSmB9qdd.js} +1 -1
  297. package/dist/client/assets/{synced-repos-caTE6jNz.js → synced-repos-uAwFax5M.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-DU1L4T-q.js → tab-icon-glyph-DrbVFRqR.js} +1 -1
  299. package/dist/client/assets/{table-DSVromj4.js → table-CulA5cEm.js} +1 -1
  300. package/dist/client/assets/{tabs-DNtYd_FL.js → tabs-Bl2CDwVl.js} +1 -1
  301. package/dist/client/assets/{task-board-S28SxUs0.js → task-board-BgNefmZ8.js} +1 -1
  302. package/dist/client/assets/{task-key-CXYVACcD.js → task-key-BTXsrkSp.js} +1 -1
  303. package/dist/client/assets/{task-route-CSEPljWs.js → task-route-DF_PNMho.js} +1 -1
  304. package/dist/client/assets/{task-status-BaHeMzhD.js → task-status-B0c9osDw.js} +1 -1
  305. package/dist/client/assets/{taskboard-analytics-BbIrzNe4.js → taskboard-analytics-BxKSmses.js} +1 -1
  306. package/dist/client/assets/tasks-CcFMDLuk.js +1 -0
  307. package/dist/client/assets/{tasks-Dfzb6Qu5.js → tasks-f3FLHitr.js} +1 -1
  308. package/dist/client/assets/{textarea-CUxYZmtB.js → textarea-C4626nq7.js} +1 -1
  309. package/dist/client/assets/{thread-analytics-BW-e5YjI.js → thread-analytics-BKF7OuH8.js} +1 -1
  310. package/dist/client/assets/{thread-button-B-htK7Vf.js → thread-button-B9KUEqWE.js} +1 -1
  311. package/dist/client/assets/{thread-intent-DHr3JStM.js → thread-intent-CMXI4-Qn.js} +1 -1
  312. package/dist/client/assets/{thread-route-O2mpxOLc.js → thread-route-BF3m0AEN.js} +1 -1
  313. package/dist/client/assets/{thread-route-DXN_3XgT.js → thread-route-CJ7vAn39.js} +1 -1
  314. package/dist/client/assets/{thread-sheet-body-FVjAMKlq.js → thread-sheet-body-BH7bDMNO.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-jFkw6TGI.js → time-range-picker-TDPR9tPD.js} +1 -1
  316. package/dist/client/assets/{toggle-group-7Kk4-ob3.js → toggle-group-PrSAkfEN.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-DZKptQot.js → tool-set-selector-UU50iLeq.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-DeWs4WCs.js → toolbar-icon-button-D16G27u4.js} +1 -1
  319. package/dist/client/assets/{tooltip-BEauahba.js → tooltip-CDlpUz6Q.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-BSzAb1Kl.js → tooltipContext-jGLnEmc0.js} +1 -1
  321. package/dist/client/assets/{track-098xAr1a.js → track-C9ncInZ1.js} +1 -1
  322. package/dist/client/assets/{types-Dw1-yAGJ.js → types-NGYefc4q.js} +1 -1
  323. package/dist/client/assets/{url-slug-CauSsJ0r.js → url-slug-D4QdPt75.js} +1 -1
  324. package/dist/client/assets/{usage-stats-C3riqRUR.js → usage-stats-BoGlEdlD.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-CV6RttZq.js → use-ai-providers-BR6hIwAY.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-C_NdcoOi.js → use-api-keys-BswXTYVi.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-CqD-eMBs.js → use-apply-named-rule-Bs9HuiLY.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-DQ7NDNSO.js +1 -0
  329. package/dist/client/assets/{use-automations-Bj-0uEbO.js → use-automations-kWiY5yEx.js} +1 -1
  330. package/dist/client/assets/{use-autosave-CPGuRk2l.js → use-autosave-DWxLArrt.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-Dr2j7xAG.js +1 -0
  332. package/dist/client/assets/use-blog-view-C9Shh8Sd.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-CAyGUasr.js → use-chat-layout-state-Rd9RKrqE.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-S499FS9c.js → use-cms-publish-actions-BURhmTo2.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-CY2Jhm-O.js → use-connect-companion-C7oXoVon.js} +1 -1
  336. package/dist/client/assets/{use-connection-Bbf6g-lU.js → use-connection-stybxl69.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-36WIXZeF.js → use-content-sync-DOJ-d6ui.js} +1 -1
  338. package/dist/client/assets/{use-copy-CLhCSJsi.js → use-copy-DyvoSaWK.js} +1 -1
  339. package/dist/client/assets/{use-current-view-DPlgL3Qy.js → use-current-view-DYsOXIAq.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-CaaCuDu_.js → use-date-fns-locale-Lfy9W6k7.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-DSyr3ji1.js → use-debounced-autosave-D-vOeZW7.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-DcMmpwkI.js → use-debounced-value-nMm2S7EZ.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-C3HRZZ9R.js → use-deco-credits-DBi73j00.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-CjaQwgdu.js → use-decopilot-events-Eq5Di3tt.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-SgRzkXSC.js → use-delete-block-CQsMvlR4.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-BRCngTFL.js → use-delete-connection-DX3VcYoy.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-BLj_HET-.js → use-deployment-admin-B8eJaq0l.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-DFIFwphq.js → use-entitlements-q1JiSGnY.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-DkfO7kpa.js → use-fast-preview-draft-url-CZJSDWBz.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-BQgzQxDR.js → use-file-configs-BwDtz-SL.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-DVqj6GHl.js → use-id-selection-B5uuKs_6.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-CeajORvg.js → use-in-settings-B7PmXEGx.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-BlDTr6Lw.js → use-inbox-feed-DAFI3RXk.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-BtlabLXL.js → use-infinite-scroll-DIo4dLVO.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-BS3z5J_a.js → use-join-requests-Cije4ISI.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-BAhbR3ff.js → use-main-panel-tabs-QBCK4CGm.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-DQPqhHIm.js → use-mcp-auth-status-Ht1UiyQD.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-DUKo5caa.js → use-mcp-client-oQNpcxdA.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-92SLArS_.js → use-mcp-prompts-DJDMRBKo.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-qCHBmr6_.js → use-mcp-tools-B3lfSeU8.js} +1 -1
  361. package/dist/client/assets/{use-mobile-CwwSZrIf.js → use-mobile-B6Glooki.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-DKQg1wdr.js → use-move-blocks-DgoYqSh3.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-BcceyDj5.js → use-navigate-to-agent-DHcX_wvC.js} +1 -1
  364. package/dist/client/assets/{use-never-published-rNVNFzx6.js → use-never-published-DIs5T7vx.js} +1 -1
  365. package/dist/client/assets/{use-org-fs-ChCg0GqS.js → use-org-fs-D6go1e07.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-Fc3F28TT.js → use-org-notice-MJYmvNw3.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-DzvaTNMY.js → use-org-repo-syncs-CTYF72h2.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-CLb0Ca9G.js → use-org-sso-DQr7OjOZ.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-eZ0X29xl.js → use-organization-settings-1p7-uoSE.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-CWTvXMgS.js → use-panel-navigate-CX_YerR_.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-BGo9wHxi.js → use-project-native-view-presence-C1CJqaSZ.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-DFLIrTST.js → use-project-scope-CUICChkO.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-ikKC1oeZ.js → use-recent-apps-jf9rGSSR.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-BUw8-WPG.js → use-reports-diagnostic-CzsUPfAR.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events-lKDZ1Wyg.js → use-sandbox-events-CZaUevSl.js} +1 -1
  376. package/dist/client/assets/{use-secrets-BhtMJX_Y.js → use-secrets-YqO4Pj-K.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-DtVYSJMh.js → use-section-preview-base-B_DOEyxF.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-mYa34tIq.js → use-sidebar-collapsed-DPsCe0op.js} +1 -1
  379. package/dist/client/assets/{use-tags-ixaLqIix.js → use-tags-Bipp2IYl.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-BxetW7cJ.js → use-task-board-analytics-SrK71r3z.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-BwV_XfKn.js → use-task-board-item-prs-Bt3VjLjz.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-DDIJt2ov.js → use-task-board-items-CbhYR4S7.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-zNd0qYQN.js → use-task-board-prompts-CywXKY9x.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-CNDyuNbK.js → use-task-metadata-ZmaeCO2k.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-DAKjQ5Pu.js → use-thread-outputs-CFLu8mMl.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-TCEqZWio.js → use-view-draft-kind-CEwc6BMY.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-fhkEdy7b.js → use-voice-input-CoHzgJEF.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-U8sFHKjc.js +1 -0
  389. package/dist/client/assets/{useQueries-CTvQGMKH.js → useQueries-BRIu-KH4.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-B3Zlqz10.js +1 -0
  391. package/dist/client/assets/{users-CBKWRxCU.js → users-BHbfDVzi.js} +1 -1
  392. package/dist/client/assets/{utils-DHHEaoAA.js → utils-BLkb241y.js} +1 -1
  393. package/dist/client/assets/{variant-calendar-BLXNK5ej.js → variant-calendar-t-_VXUP5.js} +1 -1
  394. package/dist/client/assets/{variant-matcher-override-DzGrqs7q.js → variant-matcher-override-CorWpPMf.js} +1 -1
  395. package/dist/client/assets/{view-header-1myD_Wkk.js → view-header-BOHwmkNu.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-Cmf0LAEo.js → virtual-mcp-DkZfQiia.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-ClMPSfwQ.js → watch-sse-pool-fx4VSRmD.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/server.js +1186 -1186
  400. package/package.json +1 -1
  401. package/dist/client/assets/agent-app--F4BNoyB.js +0 -1
  402. package/dist/client/assets/agent-deck-1yGtqqX7.js +0 -1
  403. package/dist/client/assets/agent-experiments-BjwAV1ze.js +0 -1
  404. package/dist/client/assets/agent-file-BAQYezOJ.js +0 -1
  405. package/dist/client/assets/agent-library-DfrFeGkX.js +0 -1
  406. package/dist/client/assets/agent-library-file-IPcJ3k4D.js +0 -1
  407. package/dist/client/assets/agent-overview-CjuprpaL.js +0 -1
  408. package/dist/client/assets/agent-settings-C2k2pYaj.js +0 -1
  409. package/dist/client/assets/agent-site-editor-code-De_VzwTE.js +0 -2
  410. package/dist/client/assets/agent-site-editor-content-BvuCeOgl.js +0 -1
  411. package/dist/client/assets/agent-site-editor-preview-ALhHKuHE.js +0 -1
  412. package/dist/client/assets/agent-view-BJGWAiHE.js +0 -1
  413. package/dist/client/assets/api-keys-DFTiZEXV.js +0 -1
  414. package/dist/client/assets/library-otkiWlmc.js +0 -1
  415. package/dist/client/assets/project-reports-DkhAaibb.js +0 -1
  416. package/dist/client/assets/project-tasks-DxN-rhsH.js +0 -1
  417. package/dist/client/assets/record-editor-CgyNKdK4.js +0 -1
  418. package/dist/client/assets/reports-Bl1YOFp5.js +0 -1
  419. package/dist/client/assets/repositories-BD9AiItp.js +0 -1
  420. package/dist/client/assets/route-D373Xcd2.js +0 -1
  421. package/dist/client/assets/settings-tab-ukKpNwn1.js +0 -1
  422. package/dist/client/assets/site-editor-BAKS5237.js +0 -1
  423. package/dist/client/assets/tasks-DyhjZTVk.js +0 -1
  424. package/dist/client/assets/use-ask-in-chat-CnUh1VzW.js +0 -1
  425. package/dist/client/assets/use-blocks-v8-project-CIRMr5RK.js +0 -1
  426. package/dist/client/assets/use-blog-view-BD--oPX4.js +0 -1
  427. package/dist/client/assets/useInfiniteQuery-CA_opHOs.js +0 -1
  428. package/dist/client/assets/useSuspenseInfiniteQuery-BN1c7Ych.js +0 -1
@@ -1 +1 @@
1
- import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as R,a4 as oe,h as ie}from"./index-D9poEv_S.js";import{ChatLayout as ne}from"./index-DfQA1GAT.js";import{b as se}from"./input-DP0rL1U_.js";import{D as ae,a as me}from"./chat-context-BLnGXGPp.js";import{a as le}from"./use-organization-settings-eZ0X29xl.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-CilZm22n.js";import{I as de}from"./icon-button-BVEHdZYj.js";import{T as he,a as V}from"./toggle-group-7Kk4-ob3.js";import{a as xe}from"./Minimize01-BSWAuJc_.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-DxP6YCuS.js";import{u as W,a as je}from"./use-org-fs-ChCg0GqS.js";import{L as Se}from"./preview-dialog-CKevN11A.js";import{t as _e,r as we,s as De}from"./daily-pulse-CzMff-et.js";import{N as ke}from"./new-project-dialog-tmPiPwbR.js";import{P as ve}from"./projects-empty-state-COghPAu-.js";import{b as Be}from"./project-index-rV1NSwrP.js";import{u as Ce}from"./use-inbox-feed-BlDTr6Lw.js";import{b as Ne}from"./use-recent-apps-ikKC1oeZ.js";import{s as Pe}from"./use-project-scope-DFLIrTST.js";import{u as $e}from"./repository-binding-DnDGprHj.js";import"./use-mobile-CwwSZrIf.js";import"./tooltip-BEauahba.js";import"./index-DMf-vAS9.js";import"./XClose-CbqnWE9C.js";import"./thread-button-B-htK7Vf.js";import"./use-sidebar-collapsed-mYa34tIq.js";import"./sheet-DCU86hqn.js";import"./use-chat-layout-state-CAyGUasr.js";import"./use-panel-navigate-CWTvXMgS.js";import"./thread-route-DXN_3XgT.js";import"./toolbar-icon-button-DeWs4WCs.js";import"./use-in-settings-CeajORvg.js";import"./resizable-p6SPDaRS.js";import"./route-page-header-BHWZyk8y.js";import"./LayoutLeft-BgxQ02aQ.js";import"./use-current-view-DPlgL3Qy.js";import"./usage-stats-C3riqRUR.js";import"./utils-CVEq3hMx.js";import"./markdown-DYPhmlaF.js";import"./use-copy-CLhCSJsi.js";import"./agent-icon-DkJRVLqK.js";import"./AlertCircle-BZ0BGwnM.js";import"./UserCheck01-C2z5zhQe.js";import"./Tool01-BVIO9Qty.js";import"./ArrowUp-CwKaPNjB.js";import"./ArrowLeft-BTOFmFlT.js";import"./ArrowRight-BpkoTWQH.js";import"./BookOpen01-DhDZ7eNO.js";import"./Globe04-jkYXmi_b.js";import"./CheckCircle-CY8bNwGH.js";import"./TrendUp01-CLufuADE.js";import"./ChevronDown-BKlrlXc3.js";import"./ChevronSelectorVertical-BePvvjKF.js";import"./ChevronUp-CHCELrzp.js";import"./UserSquare-B9MlTUcx.js";import"./LinkBroken01-Cxiv48HY.js";import"./CreditCard01-uK4ZToQn.js";import"./File02-CKfJdGFc.js";import"./SwitchHorizontal01-BSYwKL4Y.js";import"./Eye-kjpbNZjZ.js";import"./Image01-Bo1SdsGt.js";import"./Key01-7H0qkrA1.js";import"./Minus-DcVQxn2x.js";import"./Monitor01-DihbBP9d.js";import"./Sun-CfU4AOYR.js";import"./Play-C20jb3jc.js";import"./Plus-i14Zi4mM.js";import"./SearchMd-fVOqR5XB.js";import"./ShoppingBag01-CGXAeyMk.js";import"./Trash01-P2MZx3ms.js";import"./Upload01-Dprp9ZwK.js";import"./Users01-BcGcy0wY.js";import"./Zap-DPxvV-Nt.js";import"./task-board-S28SxUs0.js";import"./schema-ur1hUUl7.js";import"./gateway-client-BmjZ0joI.js";import"./form-YdpHvMEe.js";import"./label-BCYFBbIw.js";import"./use-entitlements-DFIFwphq.js";import"./file-type-icon-CPmLjdw0.js";import"./use-view-draft-kind-TCEqZWio.js";import"./use-blog-view-BD--oPX4.js";import"./thread-intent-DHr3JStM.js";import"./use-mcp-client-DUKo5caa.js";import"./auth-JsuyXQmx.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-ClMPSfwQ.js";import"./session-runtime-D87un1xV.js";import"./chat-draft-jC339CDY.js";import"./use-voice-input-fhkEdy7b.js";import"./popover-CP-hSbhT.js";import"./drawer-BHd0Jra6.js";import"./use-ai-providers-CV6RttZq.js";import"./index-BW7F0oP5.js";import"./checkbox-jFW417rg.js";import"./select-DbziOf0e.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DNtYd_FL.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-C3HRZZ9R.js";import"./input-B9td9Urd.js";import"./suggestion-DrTYv82A.js";import"./use-mcp-prompts-92SLArS_.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-B5dVUVm-.js";import"./plan-ladder-Dn5ZPJM9.js";import"./add-connection-dialog-C22z0dJk.js";import"./collection-search-bFfkZUb6.js";import"./extract-connection-data-X90aKvel.js";import"./metadata-D72DunRR.js";import"./connection-C8CUAy7P.js";import"./url-slug-CauSsJ0r.js";import"./connection-card-D_Uc1OoH.js";import"./useInfiniteQuery-CA_opHOs.js";import"./infiniteQueryObserver-CaEK8ONs.js";import"./connection-slug-BywwM0Xb.js";import"./integration-icon-NqhVgI3n.js";import"./textarea-CUxYZmtB.js";import"./use-connection-Bbf6g-lU.js";import"./schema-DH1Yp9e9.js";import"./connection-form-helpers-DASQdNW4.js";import"./authenticate-and-persist-oauth-bpkds3b0.js";import"./mcp-oauth-CdZI7dfM.js";import"./mcp-oauth-C6Tisjqi.js";import"./collection-tabs-DEboaJXk.js";import"./badge-BcL569rK.js";import"./use-infinite-scroll-BtlabLXL.js";import"./useSuspenseInfiniteQuery-BN1c7Ych.js";import"./use-task-board-items-DDIJt2ov.js";import"./use-decopilot-events-CjaQwgdu.js";import"./connect-key-XfiSxoIE.js";import"./use-api-keys-C_NdcoOi.js";import"./chart-CzCK-tF-.js";import"./CategoricalChart-BnSCjdlG.js";import"./index-CxRVhGQ4.js";import"./tooltipContext-BSzAb1Kl.js";import"./CartesianChart-BHS62I-v.js";import"./project-icon-CtK060oN.js";import"./project-apps-hjYt3L4J.js";import"./config-giA1KgEi.js";import"./task-key-CXYVACcD.js";import"./task-route-CSEPljWs.js";import"./ReferenceLine-C4ifFxvc.js";import"./utils-DHHEaoAA.js";import"./editor-BYfzbACz.js";import"./preview-content-CqyBoW0D.js";import"./file-share-button-DUiUmzDk.js";import"./use-navigate-to-agent-BcceyDj5.js";import"./repository-picker-CoyA5imt.js";import"./github-icon-DBNhbuOq.js";import"./use-debounced-value-DcMmpwkI.js";import"./new-project-store-RJXM205V.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}=q.useSession(),a=s?.user?.id,n=W(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=W(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(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{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 qe(){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 Ve(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 We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=q.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=Ve(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}=q.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(qe,{}),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(We,{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 q,r as z,j as r,aq as re,n as R,a4 as oe,h as ie}from"./index-DLuam-oO.js";import{ChatLayout as ne}from"./index-CJfrwB-R.js";import{b as se}from"./input-BmLmPqN8.js";import{D as ae,a as me}from"./chat-context-BNZ_9-8I.js";import{a as le}from"./use-organization-settings-1p7-uoSE.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-CVeVpH2f.js";import{I as de}from"./icon-button-ue-T-dgY.js";import{T as he,a as V}from"./toggle-group-PrSAkfEN.js";import{a as xe}from"./Minimize01-B-w6jPRM.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-BxRBK5s6.js";import{u as W,a as je}from"./use-org-fs-D6go1e07.js";import{L as Se}from"./preview-dialog-DdxdDV82.js";import{t as _e,r as we,s as De}from"./daily-pulse-9WDMhYxD.js";import{N as ke}from"./new-project-dialog-CJFHxf5_.js";import{P as ve}from"./projects-empty-state-ADXUwUj7.js";import{b as Be}from"./project-index-1ZydFeWl.js";import{u as Ce}from"./use-inbox-feed-DAFI3RXk.js";import{b as Ne}from"./use-recent-apps-jf9rGSSR.js";import{s as Pe}from"./use-project-scope-CUICChkO.js";import{u as $e}from"./repository-binding-BnP0NJWu.js";import"./use-mobile-B6Glooki.js";import"./tooltip-CDlpUz6Q.js";import"./index-DKfNWn49.js";import"./XClose-CtKN8GLR.js";import"./thread-button-B9KUEqWE.js";import"./use-sidebar-collapsed-DPsCe0op.js";import"./sheet-C7jRkpDc.js";import"./use-chat-layout-state-Rd9RKrqE.js";import"./use-panel-navigate-CX_YerR_.js";import"./thread-route-CJ7vAn39.js";import"./toolbar-icon-button-D16G27u4.js";import"./use-in-settings-B7PmXEGx.js";import"./resizable-D8QP7rfi.js";import"./route-page-header-D5mciaLz.js";import"./LayoutLeft-CQYXrSFJ.js";import"./use-current-view-DYsOXIAq.js";import"./usage-stats-BoGlEdlD.js";import"./utils-CVEq3hMx.js";import"./markdown-DIZTLySz.js";import"./use-copy-DyvoSaWK.js";import"./agent-icon-DKmZvJgZ.js";import"./AlertCircle-DQxZei1M.js";import"./UserCheck01-BaEElAkP.js";import"./Tool01-e3-ebizX.js";import"./ArrowUp-DqYXEiS6.js";import"./ArrowLeft-BXhTMhZ6.js";import"./ArrowRight-BrCDap4m.js";import"./BookOpen01-BJOsJKWt.js";import"./Globe04-BBhKUFMP.js";import"./CheckCircle-BupieyS2.js";import"./TrendUp01-BTeMqD6U.js";import"./ChevronDown-rYBqLYZM.js";import"./ChevronSelectorVertical-BRPtW72N.js";import"./ChevronUp-DH1sZis7.js";import"./UserSquare-Dyyof09V.js";import"./LinkBroken01-C0qz4eZM.js";import"./CreditCard01-jTESoJyl.js";import"./File02-DTSJu4_M.js";import"./SwitchHorizontal01-CSYGFkCN.js";import"./Eye-CHPIJQjl.js";import"./Image01-DhuPGc9J.js";import"./Key01-Cy6U3PPJ.js";import"./Minus-CuVl5Nk4.js";import"./Monitor01-Du9j9yAH.js";import"./Sun-rTc-uCbQ.js";import"./Play-5POBzwun.js";import"./Plus-BuHEMQHj.js";import"./SearchMd-BvADjx7u.js";import"./ShoppingBag01-BX-lvdE7.js";import"./Trash01-C4Y4RaH9.js";import"./Upload01-BwW7JFsg.js";import"./Users01-BnstW7gr.js";import"./Zap-DsBnYwKs.js";import"./task-board-BgNefmZ8.js";import"./schema-BM6o7q66.js";import"./gateway-client-CqrPq2Zk.js";import"./form-CdBjJq5W.js";import"./label-B40B-mb1.js";import"./use-entitlements-q1JiSGnY.js";import"./file-type-icon-DO8X7oBj.js";import"./use-view-draft-kind-CEwc6BMY.js";import"./use-blog-view-C9Shh8Sd.js";import"./thread-intent-CMXI4-Qn.js";import"./use-mcp-client-oQNpcxdA.js";import"./auth-DM_x_MzR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-fx4VSRmD.js";import"./session-runtime-AXnCtlIf.js";import"./chat-draft-D-mbDU5V.js";import"./use-voice-input-CoHzgJEF.js";import"./popover-DWDvG2sJ.js";import"./drawer-CN3NEJqY.js";import"./use-ai-providers-BR6hIwAY.js";import"./index-CV1w3jjI.js";import"./checkbox-BhkoX8Ty.js";import"./select-IOXOk3Ja.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-Bl2CDwVl.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DBi73j00.js";import"./input-CleFKoms.js";import"./suggestion-DOa2is9l.js";import"./use-mcp-prompts-DJDMRBKo.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DYmmeBz6.js";import"./plan-ladder-Dtd21Pl6.js";import"./add-connection-dialog-59sWEK5_.js";import"./collection-search-BKN9EjWI.js";import"./extract-connection-data-BPRLQOFh.js";import"./metadata-D72DunRR.js";import"./connection-B1w9XeEb.js";import"./url-slug-D4QdPt75.js";import"./connection-card-ozwXxBsz.js";import"./useInfiniteQuery-U8sFHKjc.js";import"./infiniteQueryObserver-DmwMo8IW.js";import"./connection-slug-C95YanvL.js";import"./integration-icon-DNMl6-J4.js";import"./textarea-C4626nq7.js";import"./use-connection-stybxl69.js";import"./schema-3tzQDCWP.js";import"./connection-form-helpers-B6__xS0A.js";import"./authenticate-and-persist-oauth-BB_emyV8.js";import"./mcp-oauth-CYwT_ghl.js";import"./mcp-oauth-DPpUVCIn.js";import"./collection-tabs-BByE0AF2.js";import"./badge-C4UVwcna.js";import"./use-infinite-scroll-DIo4dLVO.js";import"./useSuspenseInfiniteQuery-B3Zlqz10.js";import"./use-task-board-items-CbhYR4S7.js";import"./use-decopilot-events-Eq5Di3tt.js";import"./connect-key-BdMAsXh0.js";import"./use-api-keys-BswXTYVi.js";import"./chart-DFW5rTOU.js";import"./CategoricalChart-g0ZOgFoY.js";import"./index-DK0mPK-c.js";import"./tooltipContext-jGLnEmc0.js";import"./CartesianChart-DovdkEKF.js";import"./project-icon-CySwwEU9.js";import"./project-apps-DjfXES5v.js";import"./config-ySNx5jY7.js";import"./task-key-BTXsrkSp.js";import"./task-route-DF_PNMho.js";import"./ReferenceLine-CD2YCNYN.js";import"./utils-BLkb241y.js";import"./editor-BIhlI60e.js";import"./preview-content-CtnZUPEs.js";import"./file-share-button-C8YeuQFC.js";import"./use-navigate-to-agent-DHcX_wvC.js";import"./repository-picker-vBJtxDaP.js";import"./github-icon-BzIHSx26.js";import"./use-debounced-value-nMm2S7EZ.js";import"./new-project-store-BXbDjmer.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}=q.useSession(),a=s?.user?.id,n=W(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=W(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(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{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 qe(){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 Ve(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 We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=q.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=Ve(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}=q.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(qe,{}),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(We,{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,a4 as Q,aq as ne,j as o,m as K,L as P,E as V,ak as oe,V as re,h as ae,ae as ie,$ as le,o as ce}from"./index-D9poEv_S.js";import{i as Z}from"./ArrowRight-BpkoTWQH.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-XfiSxoIE.js";import{u as xe}from"./use-api-keys-C_NdcoOi.js";import{u as pe,t as ge}from"./use-task-board-items-DDIJt2ov.js";import{i as he}from"./AlertCircle-BZ0BGwnM.js";import{i as H}from"./CheckCircle-CY8bNwGH.js";import{s as je}from"./Eye-kjpbNZjZ.js";import{u as ve,A as ke}from"./agent-icon-DkJRVLqK.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-CzCK-tF-.js";import{P as Se}from"./project-icon-CtK060oN.js";import{T as X,P as Ce,A as Ie}from"./project-apps-hjYt3L4J.js";import{a as Te}from"./config-giA1KgEi.js";import{t as ze}from"./task-route-CSEPljWs.js";import{p as $e}from"./project-index-rV1NSwrP.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-CzMff-et.js";import{R as De}from"./ReferenceLine-C4ifFxvc.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-BHS62I-v.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 qe(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const He={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:H,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:H,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(H,{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:He[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...qe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{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(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 q(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(q,{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(q,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=q,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,a4 as Q,aq as ne,j as o,m as K,L as P,E as V,ak as oe,V as re,h as ae,ae as ie,$ as le,o as ce}from"./index-DLuam-oO.js";import{i as Z}from"./ArrowRight-BrCDap4m.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-BdMAsXh0.js";import{u as xe}from"./use-api-keys-BswXTYVi.js";import{u as pe,t as ge}from"./use-task-board-items-CbhYR4S7.js";import{i as he}from"./AlertCircle-DQxZei1M.js";import{i as H}from"./CheckCircle-BupieyS2.js";import{s as je}from"./Eye-CHPIJQjl.js";import{u as ve,A as ke}from"./agent-icon-DKmZvJgZ.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-DFW5rTOU.js";import{P as Se}from"./project-icon-CySwwEU9.js";import{T as X,P as Ce,A as Ie}from"./project-apps-DjfXES5v.js";import{a as Te}from"./config-ySNx5jY7.js";import{t as ze}from"./task-route-DF_PNMho.js";import{p as $e}from"./project-index-1ZydFeWl.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-9WDMhYxD.js";import{R as De}from"./ReferenceLine-CD2YCNYN.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-DovdkEKF.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 qe(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const He={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:H,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:H,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(H,{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:He[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...qe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{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(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 q(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(q,{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(q,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=q,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{fV as B,ey as T,fW as J,c as U,r as Y,fL as N,fM as S,fR as K,fN as P,K as V,fO as z,fQ as G,fP as X,fJ as R}from"./index-D9poEv_S.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-BEmWExuz.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-BSrtLgq9.js";async function ce(e,t){return e.inDraft?e.value===void 0?T:J(e.value):await B(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=U.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 z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];W(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(!W(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 L(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 q(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 P({kind:"theyDeleted",label:L(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function Q(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:L(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=Q(e);if(r)return{[r.pointer]:await P(r.conflict)};const o=G(e,t);return X(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(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 B(i,n[o],N(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 Se(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],N(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===T);if(m.length>0){try{if(!S())throw new p(!0);r=await q(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(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),_=r;w(e,D,u=>({value:_.writes[u]}));const M=()=>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 q(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=Q(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const $=h.pointers.length===0?h.merged:K(h,b),j=he(d,$,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),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 W(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,L as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me as k,he as l,we as m,de as p,De as u};
1
+ import{fV as B,ey as T,fW as J,c as U,r as Y,fL as N,fM as S,fR as K,fN as P,K as V,fO as z,fQ as G,fP as X,fJ as R}from"./index-DLuam-oO.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-Btsx5baB.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-Cd3JWT_-.js";async function ce(e,t){return e.inDraft?e.value===void 0?T:J(e.value):await B(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=U.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 z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];W(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(!W(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 L(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 q(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 P({kind:"theyDeleted",label:L(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function Q(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:L(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=Q(e);if(r)return{[r.pointer]:await P(r.conflict)};const o=G(e,t);return X(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(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 B(i,n[o],N(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 Se(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],N(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===T);if(m.length>0){try{if(!S())throw new p(!0);r=await q(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(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),_=r;w(e,D,u=>({value:_.writes[u]}));const M=()=>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 q(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=Q(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const $=h.pointers.length===0?h.merged:K(h,b),j=he(d,$,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),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 W(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,L as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me 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-D9poEv_S.js";import{T as j,a as v,c as T}from"./tooltip-BEauahba.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-DLuam-oO.js";import{T as j,a as v,c as T}from"./tooltip-CDlpUz6Q.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{A as H,t as U,a9 as R,C as Z,aa as X,f as S,ab as J,ac as Q,o as z}from"./usage-stats-C3riqRUR.js";import{gy as M,hi as C,gx as P,hj as x,hk as L,hl as V,hm as K,hn as _,gA as A,eR as N,r as p,c8 as $}from"./index-D9poEv_S.js";import{C as k}from"./index-hwrw3rkU.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=R(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){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&&X(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 B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});S.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({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=R(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})});S.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,j=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 q(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){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(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=B({...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]),$.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]),$.createPortal(d,u.current)});export{Tt as B};
1
+ import{A as H,t as U,a9 as R,C as Z,aa as X,f as S,ab as J,ac as Q,o as z}from"./usage-stats-BoGlEdlD.js";import{gy as M,hi as C,gx as P,hj as x,hk as L,hl as V,hm as K,hn as _,gA as A,eR as N,r as p,c8 as $}from"./index-DLuam-oO.js";import{C as k}from"./index-BqtN0tVI.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=R(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){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&&X(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 B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});S.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({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=R(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})});S.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,j=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 q(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){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(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=B({...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]),$.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]),$.createPortal(d,u.current)});export{Tt as B};
@@ -1 +1 @@
1
- import{r as l,b$ as ce,j as p,c5 as _,c4 as T,c2 as C,ca as le,b_ as de,cm as ue,ci as fe,cb as me}from"./index-D9poEv_S.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};
1
+ import{r as l,b$ as ce,j as p,c5 as _,c4 as T,c2 as C,ca as le,b_ as de,cm as ue,ci as fe,cb as me}from"./index-DLuam-oO.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};