decocms 4.429.3 → 4.429.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/client/assets/{AlertCircle-Dz9cBs-m.js → AlertCircle-CXwWyjWL.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DdSEp1PD.js → AreaChart-CWnwFPGD.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D7Qv40Uj.js → ArrowLeft-DYnQbYxF.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-yu2EcGiJ.js → ArrowRight-C4e8QGnK.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DfDTdHqA.js → ArrowUp-BiYv-XbK.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D64U_nuI.js → CartesianChart-BGE8uJq6.js} +1 -1
  7. package/dist/client/assets/{Check-D0vo_Hz-.js → Check-C8M8v3vI.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CumYT0Xg.js → CheckCircle-jESFBkr7.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CtEbEkWq.js → ChevronUp-Q2TBgNib.js} +1 -1
  10. package/dist/client/assets/{Copy01-BpbowiHW.js → Copy01-CaF9W1F_.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D2EcwWI8.js → CreditCard01-Czi8bh9o.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-EXf2w9q0.js → DotsVertical-DyDeVQCx.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-B8upM3yO.js → ErrorBarContext-D4BkOvp5.js} +1 -1
  14. package/dist/client/assets/{Image01-BdTgRZP1.js → Image01-CsDdVFAJ.js} +1 -1
  15. package/dist/client/assets/{Key01-B4eK1DBH.js → Key01-D2FR3CbZ.js} +1 -1
  16. package/dist/client/assets/{Line-KSe8sJzM.js → Line-BfgHJMc3.js} +1 -1
  17. package/dist/client/assets/{Link01-By2X_oW1.js → Link01-NjQr5iwv.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-CBdG7toR.js → LinkExternal01-CR1925bA.js} +1 -1
  19. package/dist/client/assets/{Monitor01-B7ACM5ru.js → Monitor01-50nhII2F.js} +1 -1
  20. package/dist/client/assets/{Palette-DE1SiHuh.js → Palette-AyH3xXYO.js} +1 -1
  21. package/dist/client/assets/{Plus-BkxlBn4y.js → Plus-DP7AHtKt.js} +1 -1
  22. package/dist/client/assets/{SearchMd-LHNOznc4.js → SearchMd-D_KPqWqZ.js} +1 -1
  23. package/dist/client/assets/{Sector-BRrxOLYM.js → Sector-BR7_Ijx1.js} +1 -1
  24. package/dist/client/assets/{ShoppingBag01-DoxUqYra.js → ShoppingBag01-Dq4UD5Hm.js} +1 -1
  25. package/dist/client/assets/{Sun-DNDTyIac.js → Sun-oSoDHq1v.js} +1 -1
  26. package/dist/client/assets/{Tool01-CpVGuPOC.js → Tool01-D2y7RTX1.js} +1 -1
  27. package/dist/client/assets/{Trash01-TOxKcbID.js → Trash01-64yehlfB.js} +1 -1
  28. package/dist/client/assets/{Upload01-CjVkZP6G.js → Upload01-BvgQ3r-o.js} +1 -1
  29. package/dist/client/assets/{User01-DLdS4GEa.js → User01-CU3qbr5s.js} +1 -1
  30. package/dist/client/assets/{UserSquare-CcCul-Ku.js → UserSquare-nGw6lX43.js} +1 -1
  31. package/dist/client/assets/{Users01-ByxJpuoo.js → Users01-Lf2fvOej.js} +1 -1
  32. package/dist/client/assets/{X-Bv_7H4P-.js → X-NPE_cXRR.js} +1 -1
  33. package/dist/client/assets/{XAxis-Cn9tLjnY.js → XAxis-Drv4sXya.js} +1 -1
  34. package/dist/client/assets/{XClose-pHmDo5-O.js → XClose-CMTvfCel.js} +1 -1
  35. package/dist/client/assets/{ZoomOut-Ya7GOVCv.js → ZoomOut-xQj4oorm.js} +1 -1
  36. package/dist/client/assets/{access-gate-BhPkP25z.js → access-gate-DRBSlBtJ.js} +1 -1
  37. package/dist/client/assets/add-connection-dialog-DHl4H43e.js +1 -0
  38. package/dist/client/assets/{agent-analytics-DHc3-l-w.js → agent-analytics-RDv7d0ta.js} +1 -1
  39. package/dist/client/assets/agent-app-BMOs_YKU.js +1 -0
  40. package/dist/client/assets/{agent-assets-DAEmoFC8.js → agent-assets-QMTortLS.js} +1 -1
  41. package/dist/client/assets/{agent-automation-Cz1jsKJf.js → agent-automation-kP7qIZSD.js} +1 -1
  42. package/dist/client/assets/{agent-automations-EvO0qN6w.js → agent-automations-D5AIE6G6.js} +1 -1
  43. package/dist/client/assets/{agent-connect-sources-9RNHPk2h.js → agent-connect-sources-1UnRN6mW.js} +1 -1
  44. package/dist/client/assets/agent-deck-9_2F3EG2.js +1 -0
  45. package/dist/client/assets/{agent-e2e-CXics08q.js → agent-e2e-DEc1NtfK.js} +1 -1
  46. package/dist/client/assets/{agent-experiments-CkZQ-REV.js → agent-experiments-D33dFCpI.js} +1 -1
  47. package/dist/client/assets/{agent-file-CLSI2x6K.js → agent-file-DxlwynYZ.js} +1 -1
  48. package/dist/client/assets/{agent-git-DR3UCmuP.js → agent-git-DVn4DsKt.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-BWh6v3V_.js → agent-hosting-CgiR8Ql4.js} +1 -1
  50. package/dist/client/assets/{agent-icon-BTsAxpiE.js → agent-icon-TQUkqPJj.js} +1 -1
  51. package/dist/client/assets/agent-library-BoJuDeBh.js +1 -0
  52. package/dist/client/assets/agent-library-file-Dyz9u3bt.js +1 -0
  53. package/dist/client/assets/{agent-monitor-DFjCcLUm.js → agent-monitor-DgcF05B9.js} +1 -1
  54. package/dist/client/assets/{agent-overview-uEke4jgZ.js → agent-overview-dLl0w1eM.js} +1 -1
  55. package/dist/client/assets/agent-settings-MQLrMTV8.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-Cs2D0Grt.js → agent-site-editor-ITnkleU1.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-D4dXTr1f.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-Db30XnTN.js → agent-site-editor-content-CNFJoRJD.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-CjnIUhh-.js → agent-site-editor-preview-CNLkTYYB.js} +3 -3
  60. package/dist/client/assets/agent-view-CfCVRWZl.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-xLwNDoFo.js → agent-view-guard-BbHyaShN.js} +1 -1
  62. package/dist/client/assets/{agents-list-Bk-nP-Hz.js → agents-list-D9hihWFU.js} +1 -1
  63. package/dist/client/assets/{ai-providers-Q2xHefD1.js → ai-providers-oyOl9W3y.js} +1 -1
  64. package/dist/client/assets/{alert-ClVmStz3.js → alert-CokNymqA.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-Ba4KW5Tb.js → alert-dialog-DeJgSFRZ.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-sz__W2rJ.js → analytics-sections-DDWh8YnS.js} +1 -1
  67. package/dist/client/assets/{api-keys-WAwxvH4q.js → api-keys-Ch7q_sOP.js} +1 -1
  68. package/dist/client/assets/api-keys-DLiRLY55.js +1 -0
  69. package/dist/client/assets/{app-editor-Bzg858Ei.js → app-editor-BhWLpri1.js} +1 -1
  70. package/dist/client/assets/{asset-utils-Cl-DIW8f.js → asset-utils-BRk3fUR7.js} +1 -1
  71. package/dist/client/assets/{auth-LIeEUIDR.js → auth-BNR-bSJO.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-Ch_Ds6Cn.js → auth-catchall-CJ0eRklU.js} +1 -1
  73. package/dist/client/assets/{auth-entry-vJGoo3g-.js → auth-entry-XcfUUozZ.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-CzKiP8ly.js → auth-split-layout-mYNIGFvp.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-8VvMLeY7.js → authenticate-and-persist-oauth-CZrI0wkU.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-Wm3a5p7E.js → automation-list-row-DfLOPauj.js} +1 -1
  77. package/dist/client/assets/{automation-runs-CPD7oJx0.js → automation-runs-RuvSYlk2.js} +1 -1
  78. package/dist/client/assets/{automations-C7HPgN05.js → automations-CQh_fULy.js} +1 -1
  79. package/dist/client/assets/{autosend-BnYajEPM.js → autosend-h1h21hnM.js} +1 -1
  80. package/dist/client/assets/{avatar-DUUKBKEq.js → avatar-UFbMnkmr.js} +1 -1
  81. package/dist/client/assets/{badge-DzpaGRTk.js → badge-DzTxW-Ts.js} +1 -1
  82. package/dist/client/assets/{block-document-mfhczLQn.js → block-document-hxIwEIoN.js} +3 -3
  83. package/dist/client/assets/{blocks-preview-workspace-context-BntOatBH.js → blocks-preview-workspace-context-DRl7lMaq.js} +1 -1
  84. package/dist/client/assets/{buckets-Cv77xDfH.js → buckets-B-CYwdgC.js} +1 -1
  85. package/dist/client/assets/{build-improve-prompt-doc-BH3yj16d.js → build-improve-prompt-doc-DNmtsTJk.js} +1 -1
  86. package/dist/client/assets/{calendar-ByzzyV6c.js → calendar-Bx26MiuJ.js} +1 -1
  87. package/dist/client/assets/{capability-load-error-DdZhOWh1.js → capability-load-error-BWTOxRLG.js} +1 -1
  88. package/dist/client/assets/{category-editor-CY9yp7vC.js → category-editor-DjdC64aL.js} +1 -1
  89. package/dist/client/assets/{chart-_tBRgksg.js → chart-BxpZzVsr.js} +1 -1
  90. package/dist/client/assets/{chat-context-BI1s3T66.js → chat-context-DppIIhzA.js} +1 -1
  91. package/dist/client/assets/{chat-draft-D0PL2mCh.js → chat-draft-DiJpqitX.js} +1 -1
  92. package/dist/client/assets/{checkbox-Cpv7L0N6.js → checkbox-BGfnFNv1.js} +1 -1
  93. package/dist/client/assets/{choose-editor-LNwLyfg_.js → choose-editor-DHwWSJiW.js} +1 -1
  94. package/dist/client/assets/{claim-phase-copy-EPhExNlM.js → claim-phase-copy-BRgB3yX1.js} +1 -1
  95. package/dist/client/assets/{cli-auth-success-CBcItsza.js → cli-auth-success-BX3DQOO5.js} +1 -1
  96. package/dist/client/assets/{client-icons-DC-8hNpP.js → client-icons-CYZ83j__.js} +1 -1
  97. package/dist/client/assets/{collapsible-pPCznIf4.js → collapsible-C2j127TD.js} +1 -1
  98. package/dist/client/assets/{collection-detail-D_X4bBB3.js → collection-detail-ehNX3PLY.js} +1 -1
  99. package/dist/client/assets/{collection-display-button-B5I1d5Uv.js → collection-display-button-CwIm419d.js} +1 -1
  100. package/dist/client/assets/{collection-search-Be-n29of.js → collection-search-D_azi8Gq.js} +1 -1
  101. package/dist/client/assets/{collection-table-wrapper-D52zfTjc.js → collection-table-wrapper-DMU9yWMT.js} +1 -1
  102. package/dist/client/assets/{collection-tabs-fftcEeJN.js → collection-tabs-C6N84gCC.js} +1 -1
  103. package/dist/client/assets/{combobox-B1AZk18o.js → combobox--XWfS5lw.js} +1 -1
  104. package/dist/client/assets/{command-DQBtHyyq.js → command-D1RoIxg2.js} +1 -1
  105. package/dist/client/assets/{companion-mcps-section-7Vm6IlF1.js → companion-mcps-section-Cs-LBxQr.js} +1 -1
  106. package/dist/client/assets/{config-CELJkL0z.js → config-CMMAnMUF.js} +1 -1
  107. package/dist/client/assets/{connect-CqRFxjYq.js → connect-DVE1Hnuy.js} +1 -1
  108. package/dist/client/assets/{connect-layout-XKXgqJNp.js → connect-layout--NwWaqYw.js} +1 -1
  109. package/dist/client/assets/{connection-Cd9kpW2N.js → connection-Ds6vwkGM.js} +1 -1
  110. package/dist/client/assets/{connection-card-C_b6Kn3i.js → connection-card-BPKFHpho.js} +1 -1
  111. package/dist/client/assets/{connection-detail-Bi6mvLNo.js → connection-detail-BroJMnyc.js} +1 -1
  112. package/dist/client/assets/{connection-form-helpers-CRij5u84.js → connection-form-helpers-C4OB4j_3.js} +1 -1
  113. package/dist/client/assets/{connections-HYiawKCj.js → connections-DG2GlCvy.js} +1 -1
  114. package/dist/client/assets/{context-BkyYtq6r.js → context-BL1LKuLQ.js} +1 -1
  115. package/dist/client/assets/{context-menu-B6lNE0Gz.js → context-menu-CBJP1RfU.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-CAvO4TWV.js → create-organization-dialog-BQ0I0t_j.js} +1 -1
  117. package/dist/client/assets/{daily-pulse-BYmWzKWl.js → daily-pulse-Dpp9pCbq.js} +1 -1
  118. package/dist/client/assets/{decopilot-Cb-_oMnP.js → decopilot-BRlhj2Gw.js} +1 -1
  119. package/dist/client/assets/{dialog-CGclnAkN.js → dialog-Mg_Z3ES1.js} +1 -1
  120. package/dist/client/assets/{discover-De-KJC5j.js → discover-DCHf1gBE.js} +1 -1
  121. package/dist/client/assets/{domain-settings-DrGUovmZ.js → domain-settings-CmoTC2Mj.js} +1 -1
  122. package/dist/client/assets/{download-app-dialog-D1557QUF.js → download-app-dialog-B7zcmkcH.js} +1 -1
  123. package/dist/client/assets/{drawer-BDoe-caH.js → drawer-BIoKJwCW.js} +1 -1
  124. package/dist/client/assets/{editor-BJgmcO1D.js → editor-JpZ1gWwV.js} +1 -1
  125. package/dist/client/assets/{empty-state-B18ltfc_.js → empty-state-BayRP7H4.js} +1 -1
  126. package/dist/client/assets/{empty-state-B34CEwUC.js → empty-state-BmztM-Bo.js} +1 -1
  127. package/dist/client/assets/{extract-connection-data-CGsWt1C2.js → extract-connection-data-D5wjQBt3.js} +1 -1
  128. package/dist/client/assets/{feature-gate-DYu08LcP.js → feature-gate-DvQXfI5S.js} +1 -1
  129. package/dist/client/assets/{feature-paywall-C_x6v-Ey.js → feature-paywall-sc2LtOXc.js} +1 -1
  130. package/dist/client/assets/{file-explorer-DFkQYLLD.js → file-explorer-CqjD-skS.js} +1 -1
  131. package/dist/client/assets/{file-preview-oOFgi0tu.js → file-preview-VfWoS2gk.js} +1 -1
  132. package/dist/client/assets/{file-share-button-zWuRzlor.js → file-share-button-BGOzbmtb.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-RYJiailm.js → file-type-icon-BhiPdwxi.js} +1 -1
  134. package/dist/client/assets/flat-project-wkNYEFlO.js +1 -0
  135. package/dist/client/assets/{folder-icon-Bf8F6949.js → folder-icon-DBIJdeY7.js} +1 -1
  136. package/dist/client/assets/{form-bcXKqc8N.js → form-BgAERq-t.js} +1 -1
  137. package/dist/client/assets/{gateway-client-DCdFKKN_.js → gateway-client-CIbTMjGx.js} +1 -1
  138. package/dist/client/assets/{general-16qHlqcQ.js → general-BBuB4XlH.js} +1 -1
  139. package/dist/client/assets/{home-D781nRhS.js → home-C96-FMPc.js} +1 -1
  140. package/dist/client/assets/{icon-button-CIiTk2PX.js → icon-button-CWL5E4Ua.js} +1 -1
  141. package/dist/client/assets/{index-CvEB1wsJ.js → index-2-Z1VD2F.js} +1 -1
  142. package/dist/client/assets/{index-Bw3BnaKs.js → index-B0WfPFpv.js} +1 -1
  143. package/dist/client/assets/{index-D9LnhQDL.js → index-B9dD9jj0.js} +4 -4
  144. package/dist/client/assets/{index-CrqZGA61.js → index-BZOsa8jC.js} +1 -1
  145. package/dist/client/assets/{index-59z4bzDc.js → index-Bv71AEH5.js} +1 -1
  146. package/dist/client/assets/{index-bzuuux9r.js → index-CORXJXSN.js} +1 -1
  147. package/dist/client/assets/{index-Czf46ykC.js → index-CpszPQp_.js} +1 -1
  148. package/dist/client/assets/{index-BS2Uqa0H.js → index-DL-sDqTO.js} +1 -1
  149. package/dist/client/assets/{index-DMU-WXJw.js → index-DR9ob9os.js} +1 -1
  150. package/dist/client/assets/{index---Q5zO6x.js → index-DWe-6mCD.js} +1 -1
  151. package/dist/client/assets/{index-DAh-d37k.js → index-ROw_u5-U.js} +1 -1
  152. package/dist/client/assets/{index-BouVTFfo.js → index-RYaP6qX3.js} +3 -3
  153. package/dist/client/assets/{index-D9sHyQVv.js → index-r8TBLtcZ.js} +1 -1
  154. package/dist/client/assets/{index-redirect-DVgM6RRC.js → index-redirect-DN5m0MeF.js} +1 -1
  155. package/dist/client/assets/{index-DiqXHSnv.js → index-v5QvptSB.js} +1 -1
  156. package/dist/client/assets/{index-BScbcffF.js → index-vYawqXRD.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-BHgtnfJm.js → infiniteQueryObserver-Ex2lNjjr.js} +1 -1
  158. package/dist/client/assets/{infra-billing-Ce7lPCaU.js → infra-billing-BvYXN3Z1.js} +1 -1
  159. package/dist/client/assets/{input-DANvmr7V.js → input-BZloVZ72.js} +3 -3
  160. package/dist/client/assets/{input-DGRfwNJU.js → input-BmzPGvUi.js} +1 -1
  161. package/dist/client/assets/{input-D_ZVa75L.js → input-Cndqm_5O.js} +1 -1
  162. package/dist/client/assets/{integration-icon-COxNT19S.js → integration-icon-C5NBXdpz.js} +1 -1
  163. package/dist/client/assets/{label-DiLYcWOq.js → label-DpahMcEo.js} +1 -1
  164. package/dist/client/assets/{last-preview-page-3TpsD5I_.js → last-preview-page-Dfux_ulA.js} +1 -1
  165. package/dist/client/assets/{layout-DPfFiV1_.js → layout-C6k3EFd1.js} +1 -1
  166. package/dist/client/assets/{legacy-agents-deep-yBBdl4Te.js → legacy-agents-deep-B_DiKZ0c.js} +1 -1
  167. package/dist/client/assets/{legacy-main-redirect-DXVMcdr-.js → legacy-main-redirect-BgIGaynA.js} +1 -1
  168. package/dist/client/assets/library-D6flTj5t.js +1 -0
  169. package/dist/client/assets/{library-tab-CXCLZRQC.js → library-tab-Bso2C2NG.js} +1 -1
  170. package/dist/client/assets/{login-C4QrpT-9.js → login-CXuSqosI.js} +1 -1
  171. package/dist/client/assets/{markdown-CYbDwdl9.js → markdown-D8U5yexH.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-CqnN_gT7.js → mcp-app-renderer-CWOIFfi6.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-Bx2SR9KP.js → mcp-oauth-DCDrWVc0.js} +1 -1
  174. package/dist/client/assets/{members-BZBvmhnB.js → members-BfRC0ceX.js} +1 -1
  175. package/dist/client/assets/{message-templates-I2fytmn2.js → message-templates-DgOMle6a.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-eltvP_76.js → mini-report-page-BIktJNbh.js} +1 -1
  177. package/dist/client/assets/{mock-board-CgZiTliz.js → mock-board-DjQ6xrU_.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-FD1izitZ.js → monaco-editor-BRUSLTLk.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-BQCERodS.js → monitoring-stats-row-C4bB2YFf.js} +1 -1
  180. package/dist/client/assets/{multi-select-BfQySwLK.js → multi-select-6bm7qEEn.js} +1 -1
  181. package/dist/client/assets/{mustache-Di_1lUk9.js → mustache-CAmcva4T.js} +1 -1
  182. package/dist/client/assets/new-project-dialog-BejzbVG2.js +1 -0
  183. package/dist/client/assets/{oauth-callback-DKQfywQG.js → oauth-callback-0bxicPCo.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-BHBlU05u.js → oauth-callback-ai-provider-D4kx59om.js} +1 -1
  185. package/dist/client/assets/{onboarding-ByVxEqxG.js → onboarding-C7mIZXvc.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-TGydZ30W.js → openai-conversation-DYPzWsQc.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-2cxR9DkL.js → optimistic-project-sidebar-views-DHo7EiTm.js} +1 -1
  188. package/dist/client/assets/{org-file-open-context-BZYS0LJs.js → org-file-open-context-CSDcMwBD.js} +1 -1
  189. package/dist/client/assets/{organization-choice-BqUqcpt3.js → organization-choice-BZ-4C5a6.js} +1 -1
  190. package/dist/client/assets/{orgs-BmaONpkl.js → orgs-DnEd_o3Y.js} +1 -1
  191. package/dist/client/assets/{page-seo-form-ChmpTY6H.js → page-seo-form-BjAunJ7T.js} +1 -1
  192. package/dist/client/assets/{pair-DGI5fx0e.js → pair-o8Pcow3m.js} +1 -1
  193. package/dist/client/assets/{plan-ladder-X8Zj9SaM.js → plan-ladder-COYrpP9N.js} +1 -1
  194. package/dist/client/assets/{popover-qQDOtUT-.js → popover-D5s3M61L.js} +1 -1
  195. package/dist/client/assets/{post-calendar-B8almCuR.js → post-calendar-Cl-vAwk3.js} +1 -1
  196. package/dist/client/assets/post-editor-D2HU9kfD.js +2 -0
  197. package/dist/client/assets/{preview-content-Dyu5DkV0.js → preview-content-B9bgsNRh.js} +1 -1
  198. package/dist/client/assets/{preview-dialog-CtBqa24y.js → preview-dialog-CwQ43Y6v.js} +1 -1
  199. package/dist/client/assets/{profile-L1-N4m6i.js → profile-BB1G47uY.js} +1 -1
  200. package/dist/client/assets/{project-app-view-ClwBU9Qs.js → project-app-view-DS-jWTJh.js} +1 -1
  201. package/dist/client/assets/{project-feed-Crh26cH9.js → project-feed-Ceha3l-R.js} +1 -1
  202. package/dist/client/assets/{project-icon-C4nL4fZk.js → project-icon-CmV-Y1UZ.js} +1 -1
  203. package/dist/client/assets/project-reports-M4OcQRnq.js +1 -0
  204. package/dist/client/assets/project-tasks-D2UK5JuX.js +1 -0
  205. package/dist/client/assets/{projects-BSybKzWl.js → projects-Cv5osXsD.js} +1 -1
  206. package/dist/client/assets/{projects-empty-state-Bk1XoaJn.js → projects-empty-state-CaTjevnb.js} +1 -1
  207. package/dist/client/assets/{prompts-5ReZRdb6.js → prompts-BgUtk3zC.js} +1 -1
  208. package/dist/client/assets/record-editor-C0G9mTGj.js +1 -0
  209. package/dist/client/assets/{redirect-editor-Bp56flLw.js → redirect-editor-BpclUTIj.js} +1 -1
  210. package/dist/client/assets/{reports-9unH-pwd.js → reports-CLznlgS5.js} +1 -1
  211. package/dist/client/assets/reports-cbjIbfxK.js +1 -0
  212. package/dist/client/assets/{reports-onboarding-Bd3z6EGO.js → reports-onboarding-BHCXUocU.js} +1 -1
  213. package/dist/client/assets/{reports-tab-CR2TjCBy.js → reports-tab-CoZHZlVb.js} +2 -2
  214. package/dist/client/assets/{repositories-CflRXNfG.js → repositories-DoauYKeu.js} +1 -1
  215. package/dist/client/assets/{repository-binding-5QFpfewx.js → repository-binding-DzrKIMc8.js} +1 -1
  216. package/dist/client/assets/{repository-import-picker-B2sU66dU.js → repository-import-picker-CVP1mN_O.js} +1 -1
  217. package/dist/client/assets/{repository-picker-Vcv9BzsE.js → repository-picker-BIkrH86Z.js} +1 -1
  218. package/dist/client/assets/{require-capability-BW3G4Us3.js → require-capability-CEGMzsiO.js} +1 -1
  219. package/dist/client/assets/{required-auth-layout-CD9nIPTu.js → required-auth-layout-BPzqc-yZ.js} +1 -1
  220. package/dist/client/assets/{reset-password-D1RRMRVB.js → reset-password-CC9lxhEO.js} +1 -1
  221. package/dist/client/assets/{resizable-D9vEsnsF.js → resizable-Ck9CN4S9.js} +1 -1
  222. package/dist/client/assets/{resolve-tab-icon-B5IDCHgC.js → resolve-tab-icon-CgOUF0YA.js} +1 -1
  223. package/dist/client/assets/{review-settings-BrevH4Wn.js → review-settings-cCLUF68J.js} +1 -1
  224. package/dist/client/assets/{rich-text-link-control-BzuTiJzL.js → rich-text-link-control-RS2mJIfp.js} +1 -1
  225. package/dist/client/assets/{roles-DJw04POK.js → roles-DWD7cz1d.js} +1 -1
  226. package/dist/client/assets/{route-Crbe3P1G.js → route-CjKIfVgB.js} +1 -1
  227. package/dist/client/assets/{route-oyHhMnH0.js → route-DI4K2hiz.js} +1 -1
  228. package/dist/client/assets/route-n8gaWLVb.js +1 -0
  229. package/dist/client/assets/{runnable-block-editor-Dm1ttguK.js → runnable-block-editor-h-xGxUBS.js} +1 -1
  230. package/dist/client/assets/{sandbox-lifecycle-context-B7U4JGhb.js → sandbox-lifecycle-context-OPdARg4I.js} +1 -1
  231. package/dist/client/assets/{schema-D-otOqEn.js → schema-BejaMrNT.js} +1 -1
  232. package/dist/client/assets/{scroll-area-BWPHSxC7.js → scroll-area-DjfgE2jb.js} +1 -1
  233. package/dist/client/assets/{search-input-CpX3lkQR.js → search-input-DviARBm2.js} +1 -1
  234. package/dist/client/assets/{search-toggle-HqLOjE33.js → search-toggle-DvOTtKmA.js} +1 -1
  235. package/dist/client/assets/{secret-picker-C3zHxvuV.js → secret-picker-CuEw2DSI.js} +1 -1
  236. package/dist/client/assets/{secrets-B2qQxKlO.js → secrets-CoVAIKwE.js} +1 -1
  237. package/dist/client/assets/{sections-editor-DD2nj5mI.js → sections-editor-CsNiIfgn.js} +1 -1
  238. package/dist/client/assets/{select-C2txP07f.js → select-Cd1ykg-h.js} +1 -1
  239. package/dist/client/assets/{select-model-DHlaKKMM.js → select-model-a344Xqu_.js} +1 -1
  240. package/dist/client/assets/{seo-editor-De017z1l.js → seo-editor-D4_b59uB.js} +1 -1
  241. package/dist/client/assets/{separator--5K9h2sI.js → separator-Ch977YA1.js} +1 -1
  242. package/dist/client/assets/{settings-tab-Cl0o9K4e.js → settings-tab-sWmscvB1.js} +1 -1
  243. package/dist/client/assets/{sheet-B12cZ7x2.js → sheet-lggFYx6M.js} +1 -1
  244. package/dist/client/assets/shell-layout-Bl8of89A.js +1 -0
  245. package/dist/client/assets/{skills-8pBxw9bR.js → skills-CzJ783Zp.js} +1 -1
  246. package/dist/client/assets/{sso-TN5MAp8K.js → sso-DKlO8_Lq.js} +1 -1
  247. package/dist/client/assets/{suggestion-NZIrFsLR.js → suggestion-K--t6EP5.js} +1 -1
  248. package/dist/client/assets/{switch-Bwf4p87L.js → switch-BLWgY1pz.js} +1 -1
  249. package/dist/client/assets/{synced-repos-DLmz0NmT.js → synced-repos-BnWEHPVF.js} +1 -1
  250. package/dist/client/assets/{tab-icon-glyph-DH47_x1a.js → tab-icon-glyph-C_bZ6WrZ.js} +1 -1
  251. package/dist/client/assets/{table-lla-0ZP_.js → table-CufJwyXQ.js} +1 -1
  252. package/dist/client/assets/{tabs-Cqnx8A4d.js → tabs-C1zPDoUI.js} +1 -1
  253. package/dist/client/assets/{task-board-ECBN5WTV.js → task-board-DlEJAtdm.js} +1 -1
  254. package/dist/client/assets/{task-route-BDq4YcnG.js → task-route-z_uMrYh2.js} +1 -1
  255. package/dist/client/assets/{task-status-CnOLwVKV.js → task-status-DrVr4O9O.js} +1 -1
  256. package/dist/client/assets/{taskboard-analytics-uCDwsGG2.js → taskboard-analytics-BEIixlIh.js} +1 -1
  257. package/dist/client/assets/{tasks-BX0Q_hE9.js → tasks-CpEABx-G.js} +1 -1
  258. package/dist/client/assets/tasks-l5i1Y6YC.js +1 -0
  259. package/dist/client/assets/{textarea-D-mcJV9e.js → textarea-r66bOcCD.js} +1 -1
  260. package/dist/client/assets/{thread-analytics-DDKoGJv6.js → thread-analytics-BmowQF8I.js} +1 -1
  261. package/dist/client/assets/{thread-intent-CUdr-H41.js → thread-intent-UQGFcX_y.js} +1 -1
  262. package/dist/client/assets/{thread-route-BWPYI0ZR.js → thread-route-CVz2UKe8.js} +1 -1
  263. package/dist/client/assets/{thread-route-Dxs07flR.js → thread-route-CowkfwAl.js} +1 -1
  264. package/dist/client/assets/{thread-sheet-body-BAKNbMRN.js → thread-sheet-body-CxW1uZ8Z.js} +1 -1
  265. package/dist/client/assets/{toggle-group-C9SgUNwy.js → toggle-group-BQtHqwCK.js} +1 -1
  266. package/dist/client/assets/{toolbar-icon-button-DWT7n987.js → toolbar-icon-button-B4QTn-IO.js} +1 -1
  267. package/dist/client/assets/{tooltip-C-B-WE46.js → tooltip-CM3YyNDC.js} +1 -1
  268. package/dist/client/assets/{track-D7y9daDt.js → track-BqJ0I7ao.js} +1 -1
  269. package/dist/client/assets/{types-CJIIzGfz.js → types-DyM6In73.js} +1 -1
  270. package/dist/client/assets/{usage-stats-H19WpNRU.js → usage-stats-5Vc6zWOp.js} +1 -1
  271. package/dist/client/assets/{use-ai-providers-DKskI-lk.js → use-ai-providers-C98JaJAU.js} +1 -1
  272. package/dist/client/assets/{use-automations-Cx0j7Q3N.js → use-automations-CqbCGltu.js} +1 -1
  273. package/dist/client/assets/{use-autosave-CHQrnT-o.js → use-autosave-tzZy_E8d.js} +1 -1
  274. package/dist/client/assets/{use-chat-layout-state-BjAQ-jEe.js → use-chat-layout-state-BfZJHnkW.js} +1 -1
  275. package/dist/client/assets/{use-connect-companion-BqzewW5u.js → use-connect-companion-DfiphJ3V.js} +1 -1
  276. package/dist/client/assets/{use-connection-DHC7ikhv.js → use-connection-BdSGHKJK.js} +1 -1
  277. package/dist/client/assets/{use-copy-CdZ1BFua.js → use-copy-CiP5Vy7i.js} +1 -1
  278. package/dist/client/assets/{use-create-virtual-mcp-CPtrtZAW.js → use-create-virtual-mcp-CoU2LYN8.js} +1 -1
  279. package/dist/client/assets/{use-date-fns-locale-B7kL8ljG.js → use-date-fns-locale-BQIR67dY.js} +1 -1
  280. package/dist/client/assets/{use-debounced-autosave-CYhKiUyc.js → use-debounced-autosave-6IETzqNZ.js} +1 -1
  281. package/dist/client/assets/{use-debounced-value-CiGe63CI.js → use-debounced-value-DCYhoWzs.js} +1 -1
  282. package/dist/client/assets/{use-deco-credits-Cte4t6Hc.js → use-deco-credits-x58AfrXU.js} +1 -1
  283. package/dist/client/assets/{use-decopilot-events-DRNQZQd4.js → use-decopilot-events-BZQXzmAo.js} +1 -1
  284. package/dist/client/assets/{use-delete-connection-B7AFWvdy.js → use-delete-connection-CzvLG4mr.js} +1 -1
  285. package/dist/client/assets/{use-deployment-admin-DLIzcPao.js → use-deployment-admin-BmH0eskZ.js} +1 -1
  286. package/dist/client/assets/{use-fast-preview-draft-url-xQxrekFA.js → use-fast-preview-draft-url-DFL8djh0.js} +1 -1
  287. package/dist/client/assets/{use-file-configs-Dgw51am7.js → use-file-configs-DRP3Y7X_.js} +1 -1
  288. package/dist/client/assets/{use-infinite-scroll-C8OfQLMA.js → use-infinite-scroll-BjVQV3DR.js} +1 -1
  289. package/dist/client/assets/{use-join-requests-nZ3kOzHD.js → use-join-requests-B6dqmlCQ.js} +1 -1
  290. package/dist/client/assets/{use-main-panel-tabs-DxwYJrDB.js → use-main-panel-tabs-sy9nYCqA.js} +1 -1
  291. package/dist/client/assets/{use-mcp-auth-status-CcDs9GVg.js → use-mcp-auth-status-Cjd2QrWU.js} +1 -1
  292. package/dist/client/assets/{use-mcp-client-DwI8A7i_.js → use-mcp-client-CqsHeShn.js} +1 -1
  293. package/dist/client/assets/{use-mcp-prompts-DldVoJeZ.js → use-mcp-prompts-D2YpCb1K.js} +1 -1
  294. package/dist/client/assets/{use-mcp-tools-CfhB5gVo.js → use-mcp-tools-CHvaFbLg.js} +1 -1
  295. package/dist/client/assets/{use-members-C0vxrdj1.js → use-members-BIhBY7mT.js} +1 -1
  296. package/dist/client/assets/{use-mobile-Bl8tDUow.js → use-mobile-3MM_rw4D.js} +1 -1
  297. package/dist/client/assets/{use-navigate-to-agent-BkimVMTW.js → use-navigate-to-agent-PjEm7mol.js} +1 -1
  298. package/dist/client/assets/use-new-blocks-editor-BAZ5qlTk.js +1 -0
  299. package/dist/client/assets/{use-open-billing-url-C6UjE84T.js → use-open-billing-url-CVEaCqtR.js} +1 -1
  300. package/dist/client/assets/{use-org-auth-client-DveZle8A.js → use-org-auth-client-DM3Q5_fm.js} +1 -1
  301. package/dist/client/assets/{use-org-fs-BgFAHUUb.js → use-org-fs-DazA0BMP.js} +1 -1
  302. package/dist/client/assets/{use-org-repo-syncs-EVtNPamp.js → use-org-repo-syncs-DGjVBBAK.js} +1 -1
  303. package/dist/client/assets/{use-org-sso-BliqnW_C.js → use-org-sso-DGy0uwEN.js} +1 -1
  304. package/dist/client/assets/{use-organization-roles-Bapbgw8R.js → use-organization-roles-Bjw-G0xx.js} +1 -1
  305. package/dist/client/assets/{use-organization-settings-Cwt51JJ-.js → use-organization-settings-DbPbYeMx.js} +1 -1
  306. package/dist/client/assets/{use-panel-navigate-Bs3wrk2o.js → use-panel-navigate-DH6_TAsx.js} +1 -1
  307. package/dist/client/assets/{use-project-scope-B0guFEKE.js → use-project-scope-Bgnjdhs7.js} +1 -1
  308. package/dist/client/assets/{use-releases-ktnIEIhq.js → use-releases-DQGDjOy5.js} +1 -1
  309. package/dist/client/assets/{use-reports-diagnostic-D3V-85up.js → use-reports-diagnostic-BASyyQU9.js} +1 -1
  310. package/dist/client/assets/{use-secrets-BkecMwUf.js → use-secrets-B41nk4LH.js} +1 -1
  311. package/dist/client/assets/{use-section-preview-base-Cx_Jy896.js → use-section-preview-base-DKahorN-.js} +1 -1
  312. package/dist/client/assets/{use-session-runtime-DePI4bwj.js → use-session-runtime-CsLaMszW.js} +1 -1
  313. package/dist/client/assets/{use-tags-oLoiyIWO.js → use-tags-BQ9peM4A.js} +1 -1
  314. package/dist/client/assets/{use-task-board-analytics-Cb5Wgr40.js → use-task-board-analytics-Co6FjpoI.js} +1 -1
  315. package/dist/client/assets/{use-task-board-events-Dh62k4Ty.js → use-task-board-events-BsviWCWn.js} +1 -1
  316. package/dist/client/assets/{use-task-metadata-w1PI2EXQ.js → use-task-metadata-DvgRil5z.js} +1 -1
  317. package/dist/client/assets/{use-thread-analytics-lgnAQ6CS.js → use-thread-analytics-Bf4bUeLT.js} +1 -1
  318. package/dist/client/assets/{use-thread-outputs-C-Wf6OBJ.js → use-thread-outputs-CvWfZHjR.js} +1 -1
  319. package/dist/client/assets/useInfiniteQuery-TQWsreUe.js +1 -0
  320. package/dist/client/assets/{useQueries-Bp03xGbc.js → useQueries-CIVnwtOu.js} +1 -1
  321. package/dist/client/assets/useSuspenseInfiniteQuery-DMyZCSsI.js +1 -0
  322. package/dist/client/assets/{users-BhXTEA2Q.js → users-2Adoo8D9.js} +1 -1
  323. package/dist/client/assets/{utils-DLvRHMkE.js → utils-BeoNvR__.js} +1 -1
  324. package/dist/client/assets/{variant-calendar-dnPy16Uh.js → variant-calendar-C6HvphcB.js} +1 -1
  325. package/dist/client/assets/{variant-matcher-override-Ck-W94Rw.js → variant-matcher-override-De1zsqbc.js} +1 -1
  326. package/dist/client/assets/{view-mode-toggle-B0zbI0V1.js → view-mode-toggle-DtqPFP6s.js} +1 -1
  327. package/dist/client/assets/{virtual-mcp-CXOm_lWW.js → virtual-mcp-Cr9A-Wo0.js} +1 -1
  328. package/dist/client/index.html +1 -1
  329. package/dist/server/cli.js +4 -4
  330. package/dist/server/server.js +4 -4
  331. package/package.json +1 -1
  332. package/dist/client/assets/add-connection-dialog-CMIKgpSn.js +0 -1
  333. package/dist/client/assets/agent-app-DvbjKuoc.js +0 -1
  334. package/dist/client/assets/agent-deck-BOkkFgcN.js +0 -1
  335. package/dist/client/assets/agent-library-C1r0MXrh.js +0 -1
  336. package/dist/client/assets/agent-library-file-D5IDjKQA.js +0 -1
  337. package/dist/client/assets/agent-settings-AbY4U8u3.js +0 -1
  338. package/dist/client/assets/agent-site-editor-code-bJU2jCGA.js +0 -2
  339. package/dist/client/assets/agent-view-DS1snkTk.js +0 -1
  340. package/dist/client/assets/api-keys-ttV9p_C3.js +0 -1
  341. package/dist/client/assets/flat-project-5lJIGqGg.js +0 -1
  342. package/dist/client/assets/library-BetPT5Rc.js +0 -1
  343. package/dist/client/assets/new-project-dialog-BJabJxXa.js +0 -1
  344. package/dist/client/assets/post-editor-3AfRGsBD.js +0 -2
  345. package/dist/client/assets/project-reports--pld6WR0.js +0 -1
  346. package/dist/client/assets/project-tasks-DOClEfO3.js +0 -1
  347. package/dist/client/assets/record-editor-Cz6r4s_z.js +0 -1
  348. package/dist/client/assets/reports-Cs6RnnEs.js +0 -1
  349. package/dist/client/assets/route-B0zINpnC.js +0 -1
  350. package/dist/client/assets/shell-layout-jXhY2XCJ.js +0 -1
  351. package/dist/client/assets/tasks-FILO35tu.js +0 -1
  352. package/dist/client/assets/use-new-blocks-editor-Bg78S2yh.js +0 -1
  353. package/dist/client/assets/useInfiniteQuery-CkfME6EV.js +0 -1
  354. package/dist/client/assets/useSuspenseInfiniteQuery-Cb-DHagn.js +0 -1
@@ -1 +1 @@
1
- import{c as p,X as S,K as y,m as $,o as T,e as K}from"./index-D9LnhQDL.js";function Y(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function F(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}function z(n,e,t){const s=p.c(16),{org:i}=S(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let l;s[4]!==i.id||s[5]!==n?(l=(d,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?d:void 0,s[4]=i.id,s[5]=n,s[6]=l):l=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=async()=>(await(await h(F(i.slug,n,"list",{path:e}))).json()).entries.toSorted(x),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let o;return s[11]!==r||s[12]!==a||s[13]!==l||s[14]!==c?(o={enabled:r,queryKey:a,placeholderData:l,queryFn:c},s[11]=r,s[12]=a,s[13]=l,s[14]=c,s[15]=o):o=s[15],$(o)}function x(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}async function C(n,e,t){const s=await h(F(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function B(n,e,t){const s=p.c(15),{org:i}=S();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null;let l;s[4]!==t?(l=t?.refetchIntervalWhenAbsent?d=>d.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=l):l=s[5];let c;s[6]!==i.slug||s[7]!==e||s[8]!==n?(c=()=>C(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let o;return s[10]!==r||s[11]!==a||s[12]!==l||s[13]!==c?(o={queryKey:r,enabled:a,refetchInterval:l,queryFn:c},s[10]=r,s[11]=a,s[12]=l,s[13]=c,s[14]=o):o=s[14],$(o)}function J(n){const e=p.c(9),{org:t}=S();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async()=>await(await h(F(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,queryFn:i},e[6]=s,e[7]=i,e[8]=r):r=e[8],$(r)}function V(n,e){const t=p.c(9),s=n===void 0?60:n,{org:i}=S();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let l;t[2]!==s||t[3]!==i.slug?(l=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==l?(c={queryKey:r,enabled:a,queryFn:l},t[5]=r,t[6]=a,t[7]=l,t[8]=c):c=t[8],$(c)}const _=50;function G(n,e){const t=p.c(16),{org:s}=S();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(o,d)=>d?.queryKey[1]===s.id?o:void 0,t[5]=s.id,t[6]=a):a=t[6];let l;t[7]!==s.slug||t[8]!==n||t[9]!==e?(l=async()=>{const o=new URLSearchParams({q:n,limit:String(_)});return e&&(o.set("volume",e.volume),e.prefix&&o.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${o}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=l):l=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==l?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:l},t[11]=i,t[12]=r,t[13]=a,t[14]=l,t[15]=c):c=t[15],$(c)}function Z(n){const e=p.c(8),{org:t}=S();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const l=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await l.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function E(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function v(){const n=p.c(7),{org:e}=S();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>E(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function R(n,e,t){return(await h(F(n,e,"read",{path:t}))).text()}function ee(n,e){const t=p.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const l=await fetch(n,{credentials:"include"});return l.ok?await l.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const U=new Set(["md","mdx","markdown","txt","text"]),Q=25,M=64*1024,A=256*1024,D=4;function N(n){const e=n.lastIndexOf(".");return e===-1?!1:U.has(n.slice(e+1).toLowerCase())}async function te(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],l=[{path:t,depth:0}];for(;l.length>0;){const u=l.shift();if(!u)break;let g;try{g=(await(await h(F(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const f of[...g].sort((b,q)=>b.path.localeCompare(q.path))){if(f.kind==="dir"){u.depth<D&&l.push({path:f.path,depth:u.depth+1});continue}N(f.path)&&f.size<=M&&r.length<Q?r.push(f.path):a.push(i(f.path))}}const c=await Promise.all(r.map(u=>R(n,e,u).catch(()=>null))),o=[];let d=0;return r.forEach((u,g)=>{const f=c[g];if(f==null||d+f.length>A){a.push(i(u));return}d+=f.length,o.push({relPath:i(u),content:f})}),o.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:o,omittedPaths:a}}function se(){const n=p.c(7),{org:e}=S();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function ne(n){const e=p.c(3),{org:t}=S();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>F(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ie(){const n=p.c(2),{org:e}=S();let t;return n[0]!==e.slug?(t=(s,i)=>F(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function re(n){const e=p.c(3),{org:t}=S();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(F(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],K(s)}function ae(n){const e=p.c(18),{org:t}=S(),s=T();let i;e[0]!==t||e[1]!==n?(i=async o=>(await(await h(F(t.slug,n,"public",{path:o.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:o.mode,password:o.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async o=>{const d=y.orgFsStat(t.id,n,o.path);await s.cancelQueries({queryKey:d});const u=s.getQueryData(d),g=o.mode!=="private";return s.setQueryData(d,f=>f&&{...f,readPublic:g,effectivePublic:g,shareMode:o.mode}),{key:d,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(o,d,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let l;e[9]!==t||e[10]!==s||e[11]!==n?(l=(o,d,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=l):l=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==l?(c={mutationFn:i,onMutate:r,onError:a,onSettled:l},e[13]=i,e[14]=r,e[15]=a,e[16]=l,e[17]=c):c=e[17],K(c)}function le(n){const e=p.c(33),{org:t}=S(),s=T();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>{s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async w=>{const k=(await Promise.allSettled(w.files.map(L=>{const P=w.dir?`${w.dir}/${L.name}`:L.name;return h(F(t.slug,n,"file",{path:P}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(X);if(k)throw k.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=l):l=e[9];const c=K(l);let o;e[10]!==t||e[11]!==n?(o=async w=>{await h(F(t.slug,n,"dir",{path:w}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=o):o=e[12];let d;e[13]!==r||e[14]!==o?(d={mutationFn:o,onSuccess:r},e[13]=r,e[14]=o,e[15]=d):d=e[15];const u=K(d);let g;e[16]!==t||e[17]!==n?(g=async w=>{await h(F(t.slug,n,"file",{path:w}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let f;e[19]!==r||e[20]!==g?(f={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=f):f=e[21];const b=K(f);let q;e[22]!==t||e[23]!==n?(q=async w=>{await h(F(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(w)})},e[22]=t,e[23]=n,e[24]=q):q=e[24];let I;e[25]!==r||e[26]!==q?(I={mutationFn:q,onSuccess:r},e[25]=r,e[26]=q,e[27]=I):I=e[27];const O=K(I);let m;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(m={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=m):m=e[32],m}function X(n){return n.status==="rejected"}export{E as a,ne as b,ee as c,re as d,Y as e,te as f,ae as g,ie as h,le as i,z as j,G as k,se as l,V as m,J as n,Z as o,v as p,C as q,B as u};
1
+ import{c as p,X as S,K as y,m as $,o as T,e as K}from"./index-B9dD9jj0.js";function Y(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function F(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}function z(n,e,t){const s=p.c(16),{org:i}=S(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let l;s[4]!==i.id||s[5]!==n?(l=(d,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?d:void 0,s[4]=i.id,s[5]=n,s[6]=l):l=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=async()=>(await(await h(F(i.slug,n,"list",{path:e}))).json()).entries.toSorted(x),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let o;return s[11]!==r||s[12]!==a||s[13]!==l||s[14]!==c?(o={enabled:r,queryKey:a,placeholderData:l,queryFn:c},s[11]=r,s[12]=a,s[13]=l,s[14]=c,s[15]=o):o=s[15],$(o)}function x(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}async function C(n,e,t){const s=await h(F(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function B(n,e,t){const s=p.c(15),{org:i}=S();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null;let l;s[4]!==t?(l=t?.refetchIntervalWhenAbsent?d=>d.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=l):l=s[5];let c;s[6]!==i.slug||s[7]!==e||s[8]!==n?(c=()=>C(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let o;return s[10]!==r||s[11]!==a||s[12]!==l||s[13]!==c?(o={queryKey:r,enabled:a,refetchInterval:l,queryFn:c},s[10]=r,s[11]=a,s[12]=l,s[13]=c,s[14]=o):o=s[14],$(o)}function J(n){const e=p.c(9),{org:t}=S();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async()=>await(await h(F(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,queryFn:i},e[6]=s,e[7]=i,e[8]=r):r=e[8],$(r)}function V(n,e){const t=p.c(9),s=n===void 0?60:n,{org:i}=S();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let l;t[2]!==s||t[3]!==i.slug?(l=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==l?(c={queryKey:r,enabled:a,queryFn:l},t[5]=r,t[6]=a,t[7]=l,t[8]=c):c=t[8],$(c)}const _=50;function G(n,e){const t=p.c(16),{org:s}=S();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(o,d)=>d?.queryKey[1]===s.id?o:void 0,t[5]=s.id,t[6]=a):a=t[6];let l;t[7]!==s.slug||t[8]!==n||t[9]!==e?(l=async()=>{const o=new URLSearchParams({q:n,limit:String(_)});return e&&(o.set("volume",e.volume),e.prefix&&o.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${o}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=l):l=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==l?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:l},t[11]=i,t[12]=r,t[13]=a,t[14]=l,t[15]=c):c=t[15],$(c)}function Z(n){const e=p.c(8),{org:t}=S();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const l=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await l.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function E(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function v(){const n=p.c(7),{org:e}=S();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>E(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function R(n,e,t){return(await h(F(n,e,"read",{path:t}))).text()}function ee(n,e){const t=p.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const l=await fetch(n,{credentials:"include"});return l.ok?await l.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const U=new Set(["md","mdx","markdown","txt","text"]),Q=25,M=64*1024,A=256*1024,D=4;function N(n){const e=n.lastIndexOf(".");return e===-1?!1:U.has(n.slice(e+1).toLowerCase())}async function te(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],l=[{path:t,depth:0}];for(;l.length>0;){const u=l.shift();if(!u)break;let g;try{g=(await(await h(F(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const f of[...g].sort((b,q)=>b.path.localeCompare(q.path))){if(f.kind==="dir"){u.depth<D&&l.push({path:f.path,depth:u.depth+1});continue}N(f.path)&&f.size<=M&&r.length<Q?r.push(f.path):a.push(i(f.path))}}const c=await Promise.all(r.map(u=>R(n,e,u).catch(()=>null))),o=[];let d=0;return r.forEach((u,g)=>{const f=c[g];if(f==null||d+f.length>A){a.push(i(u));return}d+=f.length,o.push({relPath:i(u),content:f})}),o.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:o,omittedPaths:a}}function se(){const n=p.c(7),{org:e}=S();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function ne(n){const e=p.c(3),{org:t}=S();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>F(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ie(){const n=p.c(2),{org:e}=S();let t;return n[0]!==e.slug?(t=(s,i)=>F(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function re(n){const e=p.c(3),{org:t}=S();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(F(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],K(s)}function ae(n){const e=p.c(18),{org:t}=S(),s=T();let i;e[0]!==t||e[1]!==n?(i=async o=>(await(await h(F(t.slug,n,"public",{path:o.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:o.mode,password:o.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async o=>{const d=y.orgFsStat(t.id,n,o.path);await s.cancelQueries({queryKey:d});const u=s.getQueryData(d),g=o.mode!=="private";return s.setQueryData(d,f=>f&&{...f,readPublic:g,effectivePublic:g,shareMode:o.mode}),{key:d,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(o,d,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let l;e[9]!==t||e[10]!==s||e[11]!==n?(l=(o,d,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=l):l=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==l?(c={mutationFn:i,onMutate:r,onError:a,onSettled:l},e[13]=i,e[14]=r,e[15]=a,e[16]=l,e[17]=c):c=e[17],K(c)}function le(n){const e=p.c(33),{org:t}=S(),s=T();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>{s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async w=>{const k=(await Promise.allSettled(w.files.map(L=>{const P=w.dir?`${w.dir}/${L.name}`:L.name;return h(F(t.slug,n,"file",{path:P}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(X);if(k)throw k.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=l):l=e[9];const c=K(l);let o;e[10]!==t||e[11]!==n?(o=async w=>{await h(F(t.slug,n,"dir",{path:w}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=o):o=e[12];let d;e[13]!==r||e[14]!==o?(d={mutationFn:o,onSuccess:r},e[13]=r,e[14]=o,e[15]=d):d=e[15];const u=K(d);let g;e[16]!==t||e[17]!==n?(g=async w=>{await h(F(t.slug,n,"file",{path:w}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let f;e[19]!==r||e[20]!==g?(f={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=f):f=e[21];const b=K(f);let q;e[22]!==t||e[23]!==n?(q=async w=>{await h(F(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(w)})},e[22]=t,e[23]=n,e[24]=q):q=e[24];let I;e[25]!==r||e[26]!==q?(I={mutationFn:q,onSuccess:r},e[25]=r,e[26]=q,e[27]=I):I=e[27];const O=K(I);let m;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(m={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=m):m=e[32],m}function X(n){return n.status==="rejected"}export{E as a,ne as b,ee as c,re as d,Y as e,te as f,ae as g,ie as h,le as i,z as j,G as k,se as l,V as m,J as n,Z as o,v as p,C as q,B as u};
@@ -1 +1 @@
1
- import{c as r,X as f,a2 as y,K as S,m as _,o as d,e as R}from"./index-D9LnhQDL.js";const m=5e3;function p(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let c;e[0]!==n.id?(c=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=c):c=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==c||e[5]!==s?(o={queryKey:c,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=c,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return p(e.state.data)?m:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),c=d();let s;e[0]!==n||e[1]!==c?(s=()=>c.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=c,e[2]=s):s=e[2];const o=s;let i;e[3]!==t?(i=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=i):i=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==i||e[10]!==a?(l={mutationFn:i,onSuccess:a,onSettled:o},e[8]=o,e[9]=i,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),c=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==c?(o=()=>c.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=c,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=i):i=e[7],R(i)}export{P as a,q as b,T as c,g as u};
1
+ import{c as r,X as f,a2 as y,K as S,m as _,o as d,e as R}from"./index-B9dD9jj0.js";const m=5e3;function p(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let c;e[0]!==n.id?(c=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=c):c=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==c||e[5]!==s?(o={queryKey:c,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=c,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return p(e.state.data)?m:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),c=d();let s;e[0]!==n||e[1]!==c?(s=()=>c.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=c,e[2]=s):s=e[2];const o=s;let i;e[3]!==t?(i=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=i):i=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==i||e[10]!==a?(l={mutationFn:i,onSuccess:a,onSettled:o},e[8]=o,e[9]=i,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),c=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==c?(o=()=>c.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=c,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=i):i=e[7],R(i)}export{P as a,q as b,T as c,g as u};
@@ -1 +1 @@
1
- import{c as u,m as S,o as r,e as y,K as c}from"./index-D9LnhQDL.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function m(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{q as a,C as b,O as c,h as d,m as u};
1
+ import{c as u,m as S,o as r,e as y,K as c}from"./index-B9dD9jj0.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function m(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{q as a,C as b,O as c,h as d,m as u};
@@ -1 +1 @@
1
- import{u as R}from"./use-org-auth-client-DveZle8A.js";import{X as b,m as P,K as y}from"./index-D9LnhQDL.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function I(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{I as u};
1
+ import{u as R}from"./use-org-auth-client-DM3Q5_fm.js";import{X as b,m as P,K as y}from"./index-B9dD9jj0.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function I(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{I as u};
@@ -1 +1 @@
1
- import{a as b,c as u,aT as M,X as T,m as x,af as $,K as h,a2 as A,o as O,e as I}from"./index-D9LnhQDL.js";import{D as z,o as D,a as P}from"./schema-D-otOqEn.js";import{r as R}from"./task-board-ECBN5WTV.js";const C={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},G={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function k(t,e){return{queryKey:h.organizationSettings(e),queryFn:async()=>{try{return await $(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...C,organizationId:e}}},staleTime:6e4}}function d(t){const e=u.c(6),{org:n}=T();let s;e[0]!==n.id||e[1]!==n.slug?(s=k(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t;let a;return e[3]!==s||e[4]!==o?(a={...s,select:o},e[3]=s,e[4]=o,e[5]=a):a=e[5],x(a)}function _(){const t=u.c(9),{org:e}=T(),n=A(),s=O();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(h.organizationSettings(e.id),r=>({...r??C,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],I(i)}function L(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:G}function B(){const{data:t}=d(Q);return t??G}function Q(t){return L(t.simple_mode)}function V(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function W(){return c("reports_only")}function c(t){const e=u.c(5);let n;e[0]!==t?(n=a=>D(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=d(n);let o;return e[2]!==s||e[3]!==t?(o=s??z.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function X(){const t=u.c(8),{org:e}=T(),n=A(),s=O();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(h.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],I(i)}function N(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function H(){const{data:t}=b.useSession();return N(t?.user?.email)}function J(){const t=u.c(9),{data:e}=b.useSession(),n=M();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||N(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=c("hosting_enabled"),r=c("deco_analytics_enabled"),m=c("e2e_enabled"),w=c("monitor_enabled"),F=c("experiments_enabled"),g=o||a||l,p=o||a||r,S=o||a||m,y=o||i||w,E=o||a||F;let f;return t[3]!==g||t[4]!==p||t[5]!==S||t[6]!==y||t[7]!==E?(f={hosting:g,analytics:p,e2e:S,monitor:y,experiments:E},t[3]=g,t[4]=p,t[5]=S,t[6]=y,t[7]=E,t[8]=f):f=t[8],f}function tt(){const{data:t}=d(U);return t??!1}function U(t){return P(t.flags)}function et(){const{data:t}=d(q);return t??!0}function q(t){return R(t.flags)}function nt(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function st(){const t=u.c(2),{data:e}=d(K);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function K(t){return t.coding_agent_mcp_excluded}function ot(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function at(){const t=u.c(2),{data:e}=d(Z);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Z(t){return t.submodule_credentials}function it(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{c as a,J as b,B as c,et as d,X as e,tt as f,nt as g,st as h,ot as i,V as j,at as k,it as l,H as m,W as u};
1
+ import{a as b,c as u,aT as M,X as T,m as x,af as $,K as h,a2 as A,o as O,e as I}from"./index-B9dD9jj0.js";import{D as z,o as D,a as P}from"./schema-BejaMrNT.js";import{r as R}from"./task-board-DlEJAtdm.js";const C={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},G={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function k(t,e){return{queryKey:h.organizationSettings(e),queryFn:async()=>{try{return await $(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...C,organizationId:e}}},staleTime:6e4}}function d(t){const e=u.c(6),{org:n}=T();let s;e[0]!==n.id||e[1]!==n.slug?(s=k(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t;let a;return e[3]!==s||e[4]!==o?(a={...s,select:o},e[3]=s,e[4]=o,e[5]=a):a=e[5],x(a)}function _(){const t=u.c(9),{org:e}=T(),n=A(),s=O();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(h.organizationSettings(e.id),r=>({...r??C,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],I(i)}function L(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:G}function B(){const{data:t}=d(Q);return t??G}function Q(t){return L(t.simple_mode)}function V(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function W(){return c("reports_only")}function c(t){const e=u.c(5);let n;e[0]!==t?(n=a=>D(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=d(n);let o;return e[2]!==s||e[3]!==t?(o=s??z.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function X(){const t=u.c(8),{org:e}=T(),n=A(),s=O();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(h.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],I(i)}function N(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function H(){const{data:t}=b.useSession();return N(t?.user?.email)}function J(){const t=u.c(9),{data:e}=b.useSession(),n=M();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||N(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=c("hosting_enabled"),r=c("deco_analytics_enabled"),m=c("e2e_enabled"),w=c("monitor_enabled"),F=c("experiments_enabled"),g=o||a||l,p=o||a||r,S=o||a||m,y=o||i||w,E=o||a||F;let f;return t[3]!==g||t[4]!==p||t[5]!==S||t[6]!==y||t[7]!==E?(f={hosting:g,analytics:p,e2e:S,monitor:y,experiments:E},t[3]=g,t[4]=p,t[5]=S,t[6]=y,t[7]=E,t[8]=f):f=t[8],f}function tt(){const{data:t}=d(U);return t??!1}function U(t){return P(t.flags)}function et(){const{data:t}=d(q);return t??!0}function q(t){return R(t.flags)}function nt(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function st(){const t=u.c(2),{data:e}=d(K);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function K(t){return t.coding_agent_mcp_excluded}function ot(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function at(){const t=u.c(2),{data:e}=d(Z);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Z(t){return t.submodule_credentials}function it(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{c as a,J as b,B as c,et as d,X as e,tt as f,nt as g,st as h,ot as i,V as j,at as k,it as l,H as m,W as u};
@@ -1 +1 @@
1
- import{c as p,f as g,u as S,cY as _,d as k,k as b,cZ as P,c_ as E}from"./index-D9LnhQDL.js";import{b as I}from"./thread-route-Dxs07flR.js";import{a as R}from"./use-project-scope-B0guFEKE.js";function x(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function T(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:j},e[0]=t):t=e[0],b(t)}function j(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function A(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=T();return _({mainView:r,siteEditorView:n,params:a,search:s})}function D(){const e=p.c(11),t=k();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=R(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(d,c)=>{const h=P(d),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>x({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:d,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=d=>t({to:".",search:z,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let u;return e[8]!==f||e[9]!==m?(u={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=u):u=e[10],u}function z(e){return{...e,mainpanel:!1,sidepanel:!0}}export{D as a,x as r,A as u};
1
+ import{c as p,f as g,u as S,cY as _,d as k,k as b,cZ as P,c_ as E}from"./index-B9dD9jj0.js";import{b as I}from"./thread-route-CowkfwAl.js";import{a as R}from"./use-project-scope-Bgnjdhs7.js";function x(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function T(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:j},e[0]=t):t=e[0],b(t)}function j(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function A(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=T();return _({mainView:r,siteEditorView:n,params:a,search:s})}function D(){const e=p.c(11),t=k();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=R(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(d,c)=>{const h=P(d),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>x({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:d,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=d=>t({to:".",search:z,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let u;return e[8]!==f||e[9]!==m?(u={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=u):u=e[10],u}function z(e){return{...e,mainpanel:!1,sidepanel:!0}}export{D as a,x as r,A as u};
@@ -1 +1 @@
1
- import{c as A,f as _,u as R,d as T,a9 as k,c$ as C,d0 as N,d1 as j,c_ as E,a5 as S}from"./index-D9LnhQDL.js";import{d as b,i as w,f as D,p as H}from"./repository-binding-5QFpfewx.js";function F(t){if(typeof t!="object"||t===null)return!1;const s=t.repository?.url;return typeof s=="string"&&s.length>0}function J(t){return b(t).status==="attached"}function K(t){const e=b(t).status;return e==="attached"||e==="detached"}function O(t){const e=new Set;for(const s of t??[]){const n=s.metadata?.liveAgentId;typeof n=="string"&&n&&e.add(s.id)}return e}function L(t,e){if(!t)return null;const s=t.metadata?.liveAgentId;if(typeof s=="string"&&s)return(e??[]).find(a=>a.id===s)?{mode:"dev",targetId:s}:null;const n=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return n?{mode:"live",targetId:n.id}:null}const M=1;function y(t){const e=t??[],s=O(e);return e.filter(n=>!s.has(n.id)&&!C(n.id)&&!N(n.id)&&!j(n.id))}function V(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=_(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[1]=n):n=t[1];const o=R(n);if(s.agentId)return s.agentId;let a;return t[2]!==o?(a="virtualmcpid"in o&&typeof o.virtualmcpid=="string"?o.virtualmcpid.trim():void 0,t[2]=o,t[3]=a):a=t[3],a||null}function U(){const t=A.c(16),e=T();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s),o=k(),a=w(),c=y(a),i=V(),P=c.find(r=>r.id===i)??null;let l;t[1]!==a||t[2]!==i?(l=i&&a.length>0&&!a.some(r=>r.id===i)?i:null,t[1]=a,t[2]=i,t[3]=l):l=t[3];const h=D(l),d=P??y(h?[h]:[])[0]??null;let u;t[4]!==o||t[5]!==e||t[6]!==n||t[7]!==i?(u=r=>{if(r===i&&o!==void 0)return;const v=n.org??"",I=$;if(r){E(e,{org:v,agentId:r,tabId:o==="board"||o==="reports"?o:"overview",search:I,replace:!1});return}if(o==="board"){e({to:S.tasks,params:{org:v,taskKey:void 0},search:I});return}e({to:S.home,params:{org:v},search:I})},t[4]=o,t[5]=e,t[6]=n,t[7]=i,t[8]=u):u=t[8];const m=u,p=H(d),g=c.length>=M;let f;return t[9]!==d||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==p||t[14]!==g?(f={scopeId:i,project:d,repo:p,projects:c,hasProjects:g,setScope:m},t[9]=d,t[10]=c,t[11]=i,t[12]=m,t[13]=p,t[14]=g,t[15]=f):f=t[15],f}function $(t){return{...t,virtualmcpid:void 0,thread:void 0,mainpanel:void 0}}export{V as a,F as b,K as c,J as d,L as f,O as g,y as s,U as u};
1
+ import{c as A,f as _,u as R,d as T,a9 as k,c$ as C,d0 as N,d1 as j,c_ as E,a5 as S}from"./index-B9dD9jj0.js";import{d as b,i as w,f as D,p as H}from"./repository-binding-DzrKIMc8.js";function F(t){if(typeof t!="object"||t===null)return!1;const s=t.repository?.url;return typeof s=="string"&&s.length>0}function J(t){return b(t).status==="attached"}function K(t){const e=b(t).status;return e==="attached"||e==="detached"}function O(t){const e=new Set;for(const s of t??[]){const n=s.metadata?.liveAgentId;typeof n=="string"&&n&&e.add(s.id)}return e}function L(t,e){if(!t)return null;const s=t.metadata?.liveAgentId;if(typeof s=="string"&&s)return(e??[]).find(a=>a.id===s)?{mode:"dev",targetId:s}:null;const n=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return n?{mode:"live",targetId:n.id}:null}const M=1;function y(t){const e=t??[],s=O(e);return e.filter(n=>!s.has(n.id)&&!C(n.id)&&!N(n.id)&&!j(n.id))}function V(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=_(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[1]=n):n=t[1];const o=R(n);if(s.agentId)return s.agentId;let a;return t[2]!==o?(a="virtualmcpid"in o&&typeof o.virtualmcpid=="string"?o.virtualmcpid.trim():void 0,t[2]=o,t[3]=a):a=t[3],a||null}function U(){const t=A.c(16),e=T();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s),o=k(),a=w(),c=y(a),i=V(),P=c.find(r=>r.id===i)??null;let l;t[1]!==a||t[2]!==i?(l=i&&a.length>0&&!a.some(r=>r.id===i)?i:null,t[1]=a,t[2]=i,t[3]=l):l=t[3];const h=D(l),d=P??y(h?[h]:[])[0]??null;let u;t[4]!==o||t[5]!==e||t[6]!==n||t[7]!==i?(u=r=>{if(r===i&&o!==void 0)return;const v=n.org??"",I=$;if(r){E(e,{org:v,agentId:r,tabId:o==="board"||o==="reports"?o:"overview",search:I,replace:!1});return}if(o==="board"){e({to:S.tasks,params:{org:v,taskKey:void 0},search:I});return}e({to:S.home,params:{org:v},search:I})},t[4]=o,t[5]=e,t[6]=n,t[7]=i,t[8]=u):u=t[8];const m=u,p=H(d),g=c.length>=M;let f;return t[9]!==d||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==p||t[14]!==g?(f={scopeId:i,project:d,repo:p,projects:c,hasProjects:g,setScope:m},t[9]=d,t[10]=c,t[11]=i,t[12]=m,t[13]=p,t[14]=g,t[15]=f):f=t[15],f}function $(t){return{...t,virtualmcpid:void 0,thread:void 0,mainpanel:void 0}}export{V as a,F as b,K as c,J as d,L as f,O as g,y as s,U as u};
@@ -1 +1 @@
1
- import{c as N,X as Q,o as k}from"./index-D9LnhQDL.js";import{a as E,e as P}from"./repository-binding-5QFpfewx.js";import{r as z}from"./serial-task-queue-CGOeQgpr.js";function O(t){return(t??"").normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"user"}function B(t){return t?.name||t?.email?.split("@")[0]||void 0}function F(t){const e=O(t),s=Date.now().toString(36).split("").reverse().join("");return`${e}-${s}`}function T(t,e){return t.some(s=>s.branch===e.branch)?t:[...t,e]}function V(t,e){return t.filter(s=>s.branch!==e)}function _(t,e,s){return t.map(o=>o.branch===e?{...o,name:s}:o)}const S=["orange","violet","blue","pink","amber","teal"];function K(t){return S[t%S.length]}function W(t,e){const s=`${e} `,o=t.reduce((u,n)=>{if(!n.name.startsWith(s))return u;const l=Number(n.name.slice(s.length));return Number.isInteger(l)&&l>u?l:u},0);return`${e} ${o+1}`}const j={orange:"bg-orange-500",violet:"bg-violet-500",blue:"bg-blue-500",pink:"bg-pink-500",amber:"bg-amber-500",teal:"bg-teal-500"};function X(t){return t&&j[t]||"bg-muted-foreground"}function G(t){const e=N.c(26),s=E(t),o=P(),{org:u}=Q(),n=k();let l;e[0]!==s?.metadata?.releases?(l=s?.metadata?.releases??[],e[0]=s?.metadata?.releases,e[1]=l):l=e[1];const f=l;let b;e[2]!==u||e[3]!==t?(b=a=>a[1]===u.id&&a[3]==="collection"&&a[4]==="VIRTUAL_MCP"&&a[5]===t,e[2]=u,e[3]=t,e[4]=b):b=e[4];const m=b;let d;e[5]!==m||e[6]!==n||e[7]!==f?(d=()=>{for(const[,a]of n.getQueriesData({predicate:r=>m(r.queryKey)}))if(a?.item)return a.item.metadata?.releases??[];return f},e[5]=m,e[6]=n,e[7]=f,e[8]=d):d=e[8];const $=d;let p;e[9]!==o||e[10]!==m||e[11]!==n||e[12]!==$||e[13]!==t?(p=a=>z(`vm-releases:${t}`,async()=>{const r=$(),g=a(r);if(g!==r){n.setQueriesData({predicate:c=>m(c.queryKey)},c=>c?.item?{item:{...c.item,metadata:{...c.item.metadata,releases:g}}}:c);try{await o.update.mutateAsync({id:t,data:{metadata:{releases:g}}})}catch(c){const w=c;throw n.invalidateQueries({predicate:A=>m(A.queryKey)}),w}}}),e[9]=o,e[10]=m,e[11]=n,e[12]=$,e[13]=t,e[14]=p):p=e[14];const i=p;let R;e[15]!==i?(R=a=>i(r=>T(r,a)),e[15]=i,e[16]=R):R=e[16];const y=R;let h;e[17]!==i?(h=(a,r)=>i(g=>_(g,a,r)),e[17]=i,e[18]=h):h=e[18];const D=h;let C;e[19]!==i?(C=a=>i(r=>V(r,a)),e[19]=i,e[20]=C):C=e[20];const L=C;let x;return e[21]!==y||e[22]!==L||e[23]!==f||e[24]!==D?(x={releases:f,createRelease:y,renameRelease:D,deleteRelease:L},e[21]=y,e[22]=L,e[23]=f,e[24]=D,e[25]=x):x=e[25],x}export{W as a,B as b,F as g,K as n,X as r,G as u};
1
+ import{c as N,X as Q,o as k}from"./index-B9dD9jj0.js";import{a as E,e as P}from"./repository-binding-DzrKIMc8.js";import{r as z}from"./serial-task-queue-CGOeQgpr.js";function O(t){return(t??"").normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"user"}function B(t){return t?.name||t?.email?.split("@")[0]||void 0}function F(t){const e=O(t),s=Date.now().toString(36).split("").reverse().join("");return`${e}-${s}`}function T(t,e){return t.some(s=>s.branch===e.branch)?t:[...t,e]}function V(t,e){return t.filter(s=>s.branch!==e)}function _(t,e,s){return t.map(o=>o.branch===e?{...o,name:s}:o)}const S=["orange","violet","blue","pink","amber","teal"];function K(t){return S[t%S.length]}function W(t,e){const s=`${e} `,o=t.reduce((u,n)=>{if(!n.name.startsWith(s))return u;const l=Number(n.name.slice(s.length));return Number.isInteger(l)&&l>u?l:u},0);return`${e} ${o+1}`}const j={orange:"bg-orange-500",violet:"bg-violet-500",blue:"bg-blue-500",pink:"bg-pink-500",amber:"bg-amber-500",teal:"bg-teal-500"};function X(t){return t&&j[t]||"bg-muted-foreground"}function G(t){const e=N.c(26),s=E(t),o=P(),{org:u}=Q(),n=k();let l;e[0]!==s?.metadata?.releases?(l=s?.metadata?.releases??[],e[0]=s?.metadata?.releases,e[1]=l):l=e[1];const f=l;let b;e[2]!==u||e[3]!==t?(b=a=>a[1]===u.id&&a[3]==="collection"&&a[4]==="VIRTUAL_MCP"&&a[5]===t,e[2]=u,e[3]=t,e[4]=b):b=e[4];const m=b;let d;e[5]!==m||e[6]!==n||e[7]!==f?(d=()=>{for(const[,a]of n.getQueriesData({predicate:r=>m(r.queryKey)}))if(a?.item)return a.item.metadata?.releases??[];return f},e[5]=m,e[6]=n,e[7]=f,e[8]=d):d=e[8];const $=d;let p;e[9]!==o||e[10]!==m||e[11]!==n||e[12]!==$||e[13]!==t?(p=a=>z(`vm-releases:${t}`,async()=>{const r=$(),g=a(r);if(g!==r){n.setQueriesData({predicate:c=>m(c.queryKey)},c=>c?.item?{item:{...c.item,metadata:{...c.item.metadata,releases:g}}}:c);try{await o.update.mutateAsync({id:t,data:{metadata:{releases:g}}})}catch(c){const w=c;throw n.invalidateQueries({predicate:A=>m(A.queryKey)}),w}}}),e[9]=o,e[10]=m,e[11]=n,e[12]=$,e[13]=t,e[14]=p):p=e[14];const i=p;let R;e[15]!==i?(R=a=>i(r=>T(r,a)),e[15]=i,e[16]=R):R=e[16];const y=R;let h;e[17]!==i?(h=(a,r)=>i(g=>_(g,a,r)),e[17]=i,e[18]=h):h=e[18];const D=h;let C;e[19]!==i?(C=a=>i(r=>V(r,a)),e[19]=i,e[20]=C):C=e[20];const L=C;let x;return e[21]!==y||e[22]!==L||e[23]!==f||e[24]!==D?(x={releases:f,createRelease:y,renameRelease:D,deleteRelease:L},e[21]=y,e[22]=L,e[23]=f,e[24]=D,e[25]=x):x=e[25],x}export{W as a,B as b,F as g,K as n,X as r,G as u};
@@ -1 +1 @@
1
- import{c as N,X as Q,W as F,z as A,m as f,K as T,e1 as L,J as K,C as D}from"./index-D9LnhQDL.js";import{m as O}from"./use-mcp-client-DwI8A7i_.js";import{u as h}from"./companions-core-DzyeM-yJ.js";function M(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function U(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:T.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const R=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(R)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=T.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const R=await s.callTool({name:L,arguments:{}});return h(R).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,I=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==I?(a=U({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=I,n[13]=a):a=n[13];const S=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const _=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==_||n[20]!==P||n[21]!==a||n[22]!==S?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:S,host:c,connectionId:t,cdClient:_},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=_,n[20]=P,n[21]=a,n[22]=S,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&M(n.state.data)==="generating"?b:!1}function z(n,e){return{to:K.app,params:{org:n.slug,agentId:D(n.id),connectionId:e,toolName:L},search:{}}}export{M as d,z as r,j as u};
1
+ import{c as N,X as Q,W as F,z as A,m as f,K as T,e1 as L,J as K,C as D}from"./index-B9dD9jj0.js";import{m as O}from"./use-mcp-client-CqsHeShn.js";import{u as h}from"./companions-core-DzyeM-yJ.js";function M(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function U(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:T.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const R=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(R)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=T.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const R=await s.callTool({name:L,arguments:{}});return h(R).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,I=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==I?(a=U({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=I,n[13]=a):a=n[13];const S=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const _=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==_||n[20]!==P||n[21]!==a||n[22]!==S?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:S,host:c,connectionId:t,cdClient:_},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=_,n[20]=P,n[21]=a,n[22]=S,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&M(n.state.data)==="generating"?b:!1}function z(n,e){return{to:K.app,params:{org:n.slug,agentId:D(n.id),connectionId:e,toolName:L},search:{}}}export{M as d,z as r,j as u};
@@ -1 +1 @@
1
- import{c as u,X as c,a2 as r,K as l,D as d,o as f,e as S}from"./index-D9LnhQDL.js";function C(){const e=u.c(7),{org:o}=c(),a=r();let i;e[0]!==o.id?(i=l.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==a?(t=async()=>await a.call("SECRET_LIST",{}),e[2]=a,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:n}=d(s);return n.secrets}function m(){const e=u.c(8),{org:o}=c(),a=r(),i=f();let t;e[0]!==a?(t=async y=>await a.call("SECRET_CREATE",{...y}),e[0]=a,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:l.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{m as a,C as u};
1
+ import{c as u,X as c,a2 as r,K as l,D as d,o as f,e as S}from"./index-B9dD9jj0.js";function C(){const e=u.c(7),{org:o}=c(),a=r();let i;e[0]!==o.id?(i=l.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==a?(t=async()=>await a.call("SECRET_LIST",{}),e[2]=a,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:n}=d(s);return n.secrets}function m(){const e=u.c(8),{org:o}=c(),a=r(),i=f();let t;e[0]!==a?(t=async y=>await a.call("SECRET_CREATE",{...y}),e[0]=a,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:l.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{m as a,C as u};
@@ -1 +1 @@
1
- import{c as _,b as Y,r as S,j as r,l as Z}from"./index-D9LnhQDL.js";import{a as J,d as K}from"./UserSquare-CcCul-Ku.js";import{b as ee}from"./agent-icon-BTsAxpiE.js";import{i as te}from"./SearchMd-LHNOznc4.js";import{D as re,b as se,d as le,c as oe}from"./dialog-CGclnAkN.js";import{I as ie}from"./input-D_ZVa75L.js";import{u as Q}from"./use-new-blocks-editor-Bg78S2yh.js";import{_ as ne,k as ce,a2 as ae,G as fe,u as de}from"./claim-phase-copy-EPhExNlM.js";import{d as V,r as ue}from"./section-preview-url-Csj0_ZDg.js";import{u as me}from"./use-session-runtime-DePI4bwj.js";const ve=12,D=new Set,q=new Set;function pe(){for(const s of q)s()}function xe(s){return D.has(s)?!0:D.size>=ve?!1:(D.add(s),!0)}function X(s){D.delete(s)&&pe()}function he(s){return q.add(s),()=>{q.delete(s)}}function we(s,e){const t=S.useRef(!1),[m,i]=S.useState(!1),l=S.useRef(null),c=S.useRef(null),u=S.useRef(null),o=S.useRef(s);o.current=s;const[d]=S.useState(()=>{const a=()=>{u.current?.(),u.current=null},f=()=>t.current?!0:xe(e)?(t.current=!0,i(!0),a(),!0):!1;return n=>{if(c.current=n,l.current&&(l.current.disconnect(),l.current=null),a(),!n){t.current&&(X(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(c.current!==n)return;const w=new IntersectionObserver(v=>{if(v[0]?.isIntersecting??!1){!f()&&!u.current&&(u.current=he(()=>{c.current===n&&f()}));return}a(),t.current&&(X(e),t.current=!1,i(!1))},{root:o.current.current,rootMargin:"160px 0px"});w.observe(n),l.current=w})}});return{ref:d,iframeActive:m}}function ge(s){const e=_.c(9),{previewUrl:t,title:m,scrollRootRef:i,slotId:l}=s,{ref:c,iframeActive:u}=we(i,l),[o,d]=S.useState(!1),a=Q()?K:J;let f;e[0]!==a||e[1]!==u||e[2]!==o||e[3]!==t||e[4]!==m?(f=u?r.jsxs(r.Fragment,{children:[!o&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(a,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${m}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>d(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(a,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=a,e[1]=u,e[2]=o,e[3]=t,e[4]=m,e[5]=f):f=e[5];let n;return e[6]!==c||e[7]!==f?(n=r.jsx("div",{ref:c,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:f}),e[6]=c,e[7]=f,e[8]=n):n=e[8],n}function Se(s){const e=_.c(27),{entry:t,previewUrl:m,scrollRootRef:i,onSelect:l}=s,u=Q()?t.isSavedBlock?ee:K:J,o=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let d;e[0]!==o?(d=Z("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors card-shadow","hover:border-primary/40 hover:bg-accent/30",o),e[0]=o,e[1]=d):d=e[1];let a;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==m||e[5]!==i?(a=r.jsx(ge,{previewUrl:m,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=m,e[5]=i,e[6]=a):a=e[6];let f;e[7]!==t.isSavedBlock?(f=t.isSavedBlock?{color:fe}:void 0,e[7]=t.isSavedBlock,e[8]=f):f=e[8];let n;e[9]!==u||e[10]!==f?(n=r.jsx(u,{className:"h-4 w-4 shrink-0",style:f}),e[9]=u,e[10]=f,e[11]=n):n=e[11];let w;e[12]!==t.title?(w=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[12]=t.title,e[13]=w):w=e[13];let v;e[14]!==t.description?(v=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[14]=t.description,e[15]=v):v=e[15];let p;e[16]!==w||e[17]!==v?(p=r.jsxs("div",{className:"min-w-0 flex-1",children:[w,v]}),e[16]=w,e[17]=v,e[18]=p):p=e[18];let h;e[19]!==n||e[20]!==p?(h=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[n,p]}),e[19]=n,e[20]=p,e[21]=h):h=e[21];let g;return e[22]!==l||e[23]!==d||e[24]!==a||e[25]!==h?(g=r.jsxs("button",{type:"button",onClick:l,className:d,children:[a,h]}),e[22]=l,e[23]=d,e[24]=a,e[25]=h,e[26]=g):g=e[26],g}function Be(s){const e=_.c(51),{open:t,onOpenChange:m,meta:i,decofile:l,previewBaseUrl:c,onSelect:u}=s,o=Y(),[d,a]=S.useState(""),[f,n]=S.useState(t),w=S.useRef(null);t!==f&&(n(t),t&&a(""));let v,p,h,g,j,N,R,y,b,P,C;if(e[0]!==l||e[1]!==i||e[2]!==m||e[3]!==u||e[4]!==t||e[5]!==c||e[6]!==d||e[7]!==o){const z=t&&i&&l?ne(i,l):[],W=i?ce(i):"",F=l?ae(l):void 0,G=new Map;if(t&&W)for(const x of z)G.set(x.resolveType,V(c,W,x.previewBlock,F));const M=d.trim().toLowerCase(),H=M?z.filter(x=>x.title.toLowerCase().includes(M)||x.resolveType.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)):z;p=re,P=t,C=m,v=se,R="top-3 right-3",y="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==o?(B=o("sectionsEditor.addSectionModal.title"),e[19]=o,e[20]=B):B=e[20];let L;e[21]!==B?(L=r.jsx(le,{children:B}),e[21]=B,e[22]=L):L=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(te,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=O):O=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=x=>a(x.target.value),e[24]=$):$=e[24];let k;e[25]!==o?(k=o("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=o,e[26]=k):k=e[26];let A;e[27]!==d||e[28]!==k?(A=r.jsxs("div",{className:"relative pt-2",children:[O,r.jsx(ie,{value:d,onChange:$,placeholder:k,className:"h-9 pl-8"})]}),e[27]=d,e[28]=k,e[29]=A):A=e[29],e[30]!==L||e[31]!==A?(b=r.jsxs(oe,{className:"shrink-0 border-b px-4 py-3 text-left",children:[L,A]}),e[30]=L,e[31]=A,e[32]=b):b=e[32],j=w,N="min-h-0 flex-1 overflow-y-auto",h="p-4",g=H.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:H.map(x=>r.jsx(Se,{entry:x,scrollRootRef:w,previewUrl:G.get(x.resolveType)??V(c,W,x.previewBlock,F),onSelect:()=>u(x)},x.resolveType))}),e[0]=l,e[1]=i,e[2]=m,e[3]=u,e[4]=t,e[5]=c,e[6]=d,e[7]=o,e[8]=v,e[9]=p,e[10]=h,e[11]=g,e[12]=j,e[13]=N,e[14]=R,e[15]=y,e[16]=b,e[17]=P,e[18]=C}else v=e[8],p=e[9],h=e[10],g=e[11],j=e[12],N=e[13],R=e[14],y=e[15],b=e[16],P=e[17],C=e[18];let I;e[33]!==h||e[34]!==g?(I=r.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=I):I=e[35];let T;e[36]!==I||e[37]!==j||e[38]!==N?(T=r.jsx("div",{ref:j,className:N,children:I}),e[36]=I,e[37]=j,e[38]=N,e[39]=T):T=e[39];let U;e[40]!==v||e[41]!==T||e[42]!==R||e[43]!==y||e[44]!==b?(U=r.jsxs(v,{closeButtonClassName:R,className:y,children:[b,T]}),e[40]=v,e[41]=T,e[42]=R,e[43]=y,e[44]=b,e[45]=U):U=e[45];let E;return e[46]!==p||e[47]!==U||e[48]!==P||e[49]!==C?(E=r.jsx(p,{open:P,onOpenChange:C,children:U}),e[46]=p,e[47]=U,e[48]=P,e[49]=C,e[50]=E):E=e[50],E}function Le(s){const e=_.c(4),{previewServerUrl:t,runtime:m}=me(s.virtualMcpId),{url:i}=de(s.virtualMcpId),l=m==="cms";if(i)return i;let c;return e[0]!==l||e[1]!==s.sandboxUrl||e[2]!==t?(c=ue({sandboxUrl:s.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=s.sandboxUrl,e[2]=t,e[3]=c):c=e[3],c}export{Be as A,Le as u};
1
+ import{c as _,b as Y,r as S,j as r,l as Z}from"./index-B9dD9jj0.js";import{a as J,d as K}from"./UserSquare-nGw6lX43.js";import{b as ee}from"./agent-icon-TQUkqPJj.js";import{i as te}from"./SearchMd-D_KPqWqZ.js";import{D as re,b as se,d as le,c as oe}from"./dialog-Mg_Z3ES1.js";import{I as ie}from"./input-Cndqm_5O.js";import{u as Q}from"./use-new-blocks-editor-BAZ5qlTk.js";import{_ as ne,k as ce,a2 as ae,G as fe,u as de}from"./claim-phase-copy-BRgB3yX1.js";import{d as V,r as ue}from"./section-preview-url-Csj0_ZDg.js";import{u as me}from"./use-session-runtime-CsLaMszW.js";const ve=12,D=new Set,q=new Set;function pe(){for(const s of q)s()}function xe(s){return D.has(s)?!0:D.size>=ve?!1:(D.add(s),!0)}function X(s){D.delete(s)&&pe()}function he(s){return q.add(s),()=>{q.delete(s)}}function we(s,e){const t=S.useRef(!1),[m,i]=S.useState(!1),l=S.useRef(null),c=S.useRef(null),u=S.useRef(null),o=S.useRef(s);o.current=s;const[d]=S.useState(()=>{const a=()=>{u.current?.(),u.current=null},f=()=>t.current?!0:xe(e)?(t.current=!0,i(!0),a(),!0):!1;return n=>{if(c.current=n,l.current&&(l.current.disconnect(),l.current=null),a(),!n){t.current&&(X(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(c.current!==n)return;const w=new IntersectionObserver(v=>{if(v[0]?.isIntersecting??!1){!f()&&!u.current&&(u.current=he(()=>{c.current===n&&f()}));return}a(),t.current&&(X(e),t.current=!1,i(!1))},{root:o.current.current,rootMargin:"160px 0px"});w.observe(n),l.current=w})}});return{ref:d,iframeActive:m}}function ge(s){const e=_.c(9),{previewUrl:t,title:m,scrollRootRef:i,slotId:l}=s,{ref:c,iframeActive:u}=we(i,l),[o,d]=S.useState(!1),a=Q()?K:J;let f;e[0]!==a||e[1]!==u||e[2]!==o||e[3]!==t||e[4]!==m?(f=u?r.jsxs(r.Fragment,{children:[!o&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(a,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${m}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>d(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(a,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=a,e[1]=u,e[2]=o,e[3]=t,e[4]=m,e[5]=f):f=e[5];let n;return e[6]!==c||e[7]!==f?(n=r.jsx("div",{ref:c,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:f}),e[6]=c,e[7]=f,e[8]=n):n=e[8],n}function Se(s){const e=_.c(27),{entry:t,previewUrl:m,scrollRootRef:i,onSelect:l}=s,u=Q()?t.isSavedBlock?ee:K:J,o=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let d;e[0]!==o?(d=Z("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors card-shadow","hover:border-primary/40 hover:bg-accent/30",o),e[0]=o,e[1]=d):d=e[1];let a;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==m||e[5]!==i?(a=r.jsx(ge,{previewUrl:m,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=m,e[5]=i,e[6]=a):a=e[6];let f;e[7]!==t.isSavedBlock?(f=t.isSavedBlock?{color:fe}:void 0,e[7]=t.isSavedBlock,e[8]=f):f=e[8];let n;e[9]!==u||e[10]!==f?(n=r.jsx(u,{className:"h-4 w-4 shrink-0",style:f}),e[9]=u,e[10]=f,e[11]=n):n=e[11];let w;e[12]!==t.title?(w=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[12]=t.title,e[13]=w):w=e[13];let v;e[14]!==t.description?(v=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[14]=t.description,e[15]=v):v=e[15];let p;e[16]!==w||e[17]!==v?(p=r.jsxs("div",{className:"min-w-0 flex-1",children:[w,v]}),e[16]=w,e[17]=v,e[18]=p):p=e[18];let h;e[19]!==n||e[20]!==p?(h=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[n,p]}),e[19]=n,e[20]=p,e[21]=h):h=e[21];let g;return e[22]!==l||e[23]!==d||e[24]!==a||e[25]!==h?(g=r.jsxs("button",{type:"button",onClick:l,className:d,children:[a,h]}),e[22]=l,e[23]=d,e[24]=a,e[25]=h,e[26]=g):g=e[26],g}function Be(s){const e=_.c(51),{open:t,onOpenChange:m,meta:i,decofile:l,previewBaseUrl:c,onSelect:u}=s,o=Y(),[d,a]=S.useState(""),[f,n]=S.useState(t),w=S.useRef(null);t!==f&&(n(t),t&&a(""));let v,p,h,g,j,N,R,y,b,P,C;if(e[0]!==l||e[1]!==i||e[2]!==m||e[3]!==u||e[4]!==t||e[5]!==c||e[6]!==d||e[7]!==o){const z=t&&i&&l?ne(i,l):[],W=i?ce(i):"",F=l?ae(l):void 0,G=new Map;if(t&&W)for(const x of z)G.set(x.resolveType,V(c,W,x.previewBlock,F));const M=d.trim().toLowerCase(),H=M?z.filter(x=>x.title.toLowerCase().includes(M)||x.resolveType.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)):z;p=re,P=t,C=m,v=se,R="top-3 right-3",y="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==o?(B=o("sectionsEditor.addSectionModal.title"),e[19]=o,e[20]=B):B=e[20];let L;e[21]!==B?(L=r.jsx(le,{children:B}),e[21]=B,e[22]=L):L=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(te,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=O):O=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=x=>a(x.target.value),e[24]=$):$=e[24];let k;e[25]!==o?(k=o("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=o,e[26]=k):k=e[26];let A;e[27]!==d||e[28]!==k?(A=r.jsxs("div",{className:"relative pt-2",children:[O,r.jsx(ie,{value:d,onChange:$,placeholder:k,className:"h-9 pl-8"})]}),e[27]=d,e[28]=k,e[29]=A):A=e[29],e[30]!==L||e[31]!==A?(b=r.jsxs(oe,{className:"shrink-0 border-b px-4 py-3 text-left",children:[L,A]}),e[30]=L,e[31]=A,e[32]=b):b=e[32],j=w,N="min-h-0 flex-1 overflow-y-auto",h="p-4",g=H.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:H.map(x=>r.jsx(Se,{entry:x,scrollRootRef:w,previewUrl:G.get(x.resolveType)??V(c,W,x.previewBlock,F),onSelect:()=>u(x)},x.resolveType))}),e[0]=l,e[1]=i,e[2]=m,e[3]=u,e[4]=t,e[5]=c,e[6]=d,e[7]=o,e[8]=v,e[9]=p,e[10]=h,e[11]=g,e[12]=j,e[13]=N,e[14]=R,e[15]=y,e[16]=b,e[17]=P,e[18]=C}else v=e[8],p=e[9],h=e[10],g=e[11],j=e[12],N=e[13],R=e[14],y=e[15],b=e[16],P=e[17],C=e[18];let I;e[33]!==h||e[34]!==g?(I=r.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=I):I=e[35];let T;e[36]!==I||e[37]!==j||e[38]!==N?(T=r.jsx("div",{ref:j,className:N,children:I}),e[36]=I,e[37]=j,e[38]=N,e[39]=T):T=e[39];let U;e[40]!==v||e[41]!==T||e[42]!==R||e[43]!==y||e[44]!==b?(U=r.jsxs(v,{closeButtonClassName:R,className:y,children:[b,T]}),e[40]=v,e[41]=T,e[42]=R,e[43]=y,e[44]=b,e[45]=U):U=e[45];let E;return e[46]!==p||e[47]!==U||e[48]!==P||e[49]!==C?(E=r.jsx(p,{open:P,onOpenChange:C,children:U}),e[46]=p,e[47]=U,e[48]=P,e[49]=C,e[50]=E):E=e[50],E}function Le(s){const e=_.c(4),{previewServerUrl:t,runtime:m}=me(s.virtualMcpId),{url:i}=de(s.virtualMcpId),l=m==="cms";if(i)return i;let c;return e[0]!==l||e[1]!==s.sandboxUrl||e[2]!==t?(c=ue({sandboxUrl:s.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=s.sandboxUrl,e[2]=t,e[3]=c):c=e[3],c}export{Be as A,Le as u};
@@ -1 +1 @@
1
- import{c as h}from"./index-D9LnhQDL.js";import{r as R,d as T,g as k,i as S}from"./thread-intent-CUdr-H41.js";import{u as j}from"./chat-context-BI1s3T66.js";import{a as w}from"./repository-binding-5QFpfewx.js";function g(d){const t=h.c(14),u=w(d),p=j(),e=u?.metadata,o=p?.activeTask,m=o?.metadata?.runtime;let i;t[0]!==m?(i=S(m),t[0]=m,t[1]=i):i=t[1];const f=i,v=!!o&&!o.partial,l=o?.metadata;let a;t[2]!==e||t[3]!==l?(a=R(l,e),t[2]=e,t[3]=l,t[4]=a):a=t[4];const c=!!f||v&&!!u;let r;t[5]!==e?(r=T(e),t[5]=e,t[6]=r):r=t[6];let s;t[7]!==e?(s=k(e),t[7]=e,t[8]=s):s=t[8];let n;return t[9]!==a||t[10]!==c||t[11]!==r||t[12]!==s?(n={runtime:a,resolved:c,projectDefault:r,previewServerUrl:s},t[9]=a,t[10]=c,t[11]=r,t[12]=s,t[13]=n):n=t[13],n}export{g as u};
1
+ import{c as h}from"./index-B9dD9jj0.js";import{r as R,d as T,g as k,i as S}from"./thread-intent-UQGFcX_y.js";import{u as j}from"./chat-context-DppIIhzA.js";import{a as w}from"./repository-binding-DzrKIMc8.js";function g(d){const t=h.c(14),u=w(d),p=j(),e=u?.metadata,o=p?.activeTask,m=o?.metadata?.runtime;let i;t[0]!==m?(i=S(m),t[0]=m,t[1]=i):i=t[1];const f=i,v=!!o&&!o.partial,l=o?.metadata;let a;t[2]!==e||t[3]!==l?(a=R(l,e),t[2]=e,t[3]=l,t[4]=a):a=t[4];const c=!!f||v&&!!u;let r;t[5]!==e?(r=T(e),t[5]=e,t[6]=r):r=t[6];let s;t[7]!==e?(s=k(e),t[7]=e,t[8]=s):s=t[8];let n;return t[9]!==a||t[10]!==c||t[11]!==r||t[12]!==s?(n={runtime:a,resolved:c,projectDefault:r,previewServerUrl:s},t[9]=a,t[10]=c,t[11]=r,t[12]=s,t[13]=n):n=t[13],n}export{g as u};
@@ -1 +1 @@
1
- import{c as u,X as f,a2 as y,m,o as g,e as T,K as l,t as E}from"./index-D9LnhQDL.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
1
+ import{c as u,X as f,a2 as y,m,o as g,e as T,K as l,t as E}from"./index-B9dD9jj0.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
@@ -1 +1 @@
1
- import{c as i,f as T,m as l,X as S,a2 as _,K as u,af as f}from"./index-D9LnhQDL.js";const R=["TASK_BOARD_DELIVERY","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_QUALITY","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function K(){const t=i.c(8),s=T({strict:!1}).org??"";let e;t[0]!==s?(e=u.taskBoardAdminOrgs(s),t[0]=s,t[1]=e):e=t[1];const n=!!s;let A;t[2]!==s?(A=()=>f(s,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=s,t[3]=A):A=t[3];let o;return t[4]!==e||t[5]!==n||t[6]!==A?(o={queryKey:e,enabled:n,queryFn:A,staleTime:3e5},t[4]=e,t[5]=n,t[6]=A,t[7]=o):o=t[7],l(o)}function B(t,s){const e=i.c(13),{locator:n}=S(),A=_();let o;e[0]!==n||e[1]!==s.from||e[2]!==s.org||e[3]!==s.to||e[4]!==t?(o=u.taskBoardAnalytics(n,t,s.org,s.from,s.to),e[0]=n,e[1]=s.from,e[2]=s.org,e[3]=s.to,e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==A||e[8]!==t?(r=()=>A.call(t,s),e[6]=s,e[7]=A,e[8]=t,e[9]=r):r=e[9];let c;return e[10]!==o||e[11]!==r?(c={queryKey:o,queryFn:r},e[10]=o,e[11]=r,e[12]=c):c=e[12],l(c)}export{R as A,B as a,K as u};
1
+ import{c as i,f as T,m as l,X as S,a2 as _,K as u,af as f}from"./index-B9dD9jj0.js";const R=["TASK_BOARD_DELIVERY","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_QUALITY","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function K(){const t=i.c(8),s=T({strict:!1}).org??"";let e;t[0]!==s?(e=u.taskBoardAdminOrgs(s),t[0]=s,t[1]=e):e=t[1];const n=!!s;let A;t[2]!==s?(A=()=>f(s,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=s,t[3]=A):A=t[3];let o;return t[4]!==e||t[5]!==n||t[6]!==A?(o={queryKey:e,enabled:n,queryFn:A,staleTime:3e5},t[4]=e,t[5]=n,t[6]=A,t[7]=o):o=t[7],l(o)}function B(t,s){const e=i.c(13),{locator:n}=S(),A=_();let o;e[0]!==n||e[1]!==s.from||e[2]!==s.org||e[3]!==s.to||e[4]!==t?(o=u.taskBoardAnalytics(n,t,s.org,s.from,s.to),e[0]=n,e[1]=s.from,e[2]=s.org,e[3]=s.to,e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==A||e[8]!==t?(r=()=>A.call(t,s),e[6]=s,e[7]=A,e[8]=t,e[9]=r):r=e[9];let c;return e[10]!==o||e[11]!==r?(c={queryKey:o,queryFn:r},e[10]=o,e[11]=r,e[12]=c):c=e[12],l(c)}export{R as A,B as a,K as u};
@@ -1 +1 @@
1
- import{a as m}from"./task-board-ECBN5WTV.js";import{r as e}from"./index-D9LnhQDL.js";import{t as g}from"./thread-intent-CUdr-H41.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
1
+ import{a as m}from"./task-board-DlEJAtdm.js";import{r as e}from"./index-B9dD9jj0.js";import{t as g}from"./thread-intent-UQGFcX_y.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
@@ -1 +1 @@
1
- import{X as o,a2 as c,r as i,D as d,K as m}from"./index-D9LnhQDL.js";import{a as T}from"./thread-intent-CUdr-H41.js";function h(e){const{org:n}=o(),r=c(),a=T(),s=i.useSyncExternalStore(a.threads.subscribe,a.threads.get),u=e===null?null:s.find(t=>t.id===e)??null,{data:l}=d({queryKey:m.ensureTask(n.id,e),queryFn:async()=>{if(e===null)return null;try{const{item:t}=await r.call("COLLECTION_THREADS_GET",{id:e});return t??null}catch{return null}},select:t=>t?.metadata??null,staleTime:3e4});return u?.metadata??l??null}export{h as u};
1
+ import{X as o,a2 as c,r as i,D as d,K as m}from"./index-B9dD9jj0.js";import{a as T}from"./thread-intent-UQGFcX_y.js";function h(e){const{org:n}=o(),r=c(),a=T(),s=i.useSyncExternalStore(a.threads.subscribe,a.threads.get),u=e===null?null:s.find(t=>t.id===e)??null,{data:l}=d({queryKey:m.ensureTask(n.id,e),queryFn:async()=>{if(e===null)return null;try{const{item:t}=await r.call("COLLECTION_THREADS_GET",{id:e});return t??null}catch{return null}},select:t=>t?.metadata??null,staleTime:3e4});return u?.metadata??l??null}export{h as u};
@@ -1 +1 @@
1
- import{c as u,m as o,f as d,r as A,K as T,af as y,a7 as E}from"./index-D9LnhQDL.js";import{k as O}from"./thread-intent-CUdr-H41.js";function b(){return d({strict:!1}).org??""}function k(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function F(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function K(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{F as a,K as b,k as u};
1
+ import{c as u,m as o,f as d,r as A,K as T,af as y,a7 as E}from"./index-B9dD9jj0.js";import{k as O}from"./thread-intent-UQGFcX_y.js";function b(){return d({strict:!1}).org??""}function k(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function F(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function K(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{F as a,K as b,k as u};
@@ -1 +1 @@
1
- import{c,X as i,m as l,K as p}from"./index-D9LnhQDL.js";import{f}from"./chat-context-BI1s3T66.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
1
+ import{c,X as i,m as l,K as p}from"./index-B9dD9jj0.js";import{f}from"./chat-context-DppIIhzA.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-Ex2lNjjr.js";import{de as i}from"./index-B9dD9jj0.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{dp as Q,dq as y,dr as w,ds as S,df as C,o as k,dt as x,du as q,r as p,dv as M,dw as H,dx as B,dy as L,dz as O,dA as P,dB as A}from"./index-D9LnhQDL.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function z(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!w(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=S(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new C(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=z(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function U({queries:r,...s},e){const t=k(e),i=x(),n=q(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),B(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):L,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return P(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
1
+ import{dp as Q,dq as y,dr as w,ds as S,df as C,o as k,dt as x,du as q,r as p,dv as M,dw as H,dx as B,dy as L,dz as O,dA as P,dB as A}from"./index-B9dD9jj0.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function z(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!w(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=S(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new C(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=z(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function U({queries:r,...s},e){const t=k(e),i=x(),n=q(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),B(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):L,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return P(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
@@ -0,0 +1 @@
1
+ import{I as n}from"./infiniteQueryObserver-Ex2lNjjr.js";import{de as s,dn as u}from"./index-B9dD9jj0.js";function a(e,r){return s({...e,enabled:!0,suspense:!0,throwOnError:u},n,r)}export{a as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-D9LnhQDL.js";import{C as G}from"./collection-table-wrapper-D52zfTjc.js";import{E as L}from"./empty-state-B34CEwUC.js";import{S as H}from"./search-input-CpX3lkQR.js";import{A as X}from"./avatar-DUUKBKEq.js";import{B as D}from"./badge-DzpaGRTk.js";import{u as Z}from"./use-debounced-value-CiGe63CI.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-lla-0ZP_.js";import"./ArrowUp-DfDTdHqA.js";import"./SearchMd-LHNOznc4.js";import"./User01-DLdS4GEa.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
1
+ import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-B9dD9jj0.js";import{C as G}from"./collection-table-wrapper-DMU9yWMT.js";import{E as L}from"./empty-state-BmztM-Bo.js";import{S as H}from"./search-input-DviARBm2.js";import{A as X}from"./avatar-UFbMnkmr.js";import{B as D}from"./badge-DzTxW-Ts.js";import{u as Z}from"./use-debounced-value-DCYhoWzs.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-CufJwyXQ.js";import"./ArrowUp-BiYv-XbK.js";import"./SearchMd-D_KPqWqZ.js";import"./User01-CU3qbr5s.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{c as W,s as E,b as k}from"./ZoomOut-Ya7GOVCv.js";import{a as j}from"./Image01-BdTgRZP1.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
1
+ import{c as W,s as E,b as k}from"./ZoomOut-xQj4oorm.js";import{a as j}from"./Image01-CsDdVFAJ.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
2
2
  `)){if(!n)continue;const r=n.indexOf(":");if(r<0)continue;const s=n.indexOf(":",r+1);if(s<0)continue;const o=Number.parseInt(n.slice(r+1,s),10);Number.isFinite(o)&&t.push({path:h(n.slice(0,r)),line:o,text:n.slice(s+1)})}return t}function Q(e,t,n){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.split("/").pop()??o).toLowerCase().includes(r)&&(s.push(h(o)),s.length>=n))break;return s}const w=24;function Y(e,t){const n=e.replace(/^\s+/,""),r=t.trim().toLowerCase();if(!r)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const s=n.toLowerCase().indexOf(r);if(s<0)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const o=s>w,u=o?n.slice(s-w):n,a=u.toLowerCase(),i=[];let c=0;for(;;){const l=a.indexOf(r,c);if(l<0){c<u.length&&i.push({text:u.slice(c),match:!1});break}l>c&&i.push({text:u.slice(c,l),match:!1}),i.push({text:u.slice(l,l+r.length),match:!0}),c=l+r.length}return{leadingEllipsis:o,segments:i}}function Z(e){const t=[],n=new Map;for(const r of e){let s=n.get(r.path);s||(s={path:r.path,matches:[]},n.set(r.path,s),t.push(s)),s.matches.push(r)}return t}function tt(e){return e.split(`
3
3
  `).map(t=>t.replace(/^\d+\t/,"")).join(`
4
4
  `)}export{F as E,G as a,L as b,v as c,C as d,V as e,N as f,A as g,Z as h,z as i,_ as j,h as k,X as l,$ as m,K as n,Y as o,H as p,D as q,q as r,tt as s,x as t,Q as u,M as v,J as w,U as x,S as y};
@@ -1 +1 @@
1
- import{c as Y,b as J,r as Q,j as n,l as rt,B as tt,ak as ut}from"./index-D9LnhQDL.js";import{x as ht,Z as at,B as xt}from"./agent-icon-BTsAxpiE.js";import{L as gt}from"./label-DiLYcWOq.js";import{S as lt}from"./scroll-area-BWPHSxC7.js";import{S as bt}from"./switch-Bwf4p87L.js";import{T as vt,b as yt,a as jt}from"./tooltip-C-B-WE46.js";import{V as Tt}from"./view-mode-toggle-B0zbI0V1.js";import{V as ct,W as mt,X as Nt,Y as _t,Z as kt,_ as U,$ as wt}from"./agent-site-editor-content-Db30XnTN.js";import"./AlertCircle-Dz9cBs-m.js";import"./Tool01-CpVGuPOC.js";import"./ArrowUp-DfDTdHqA.js";import"./ArrowLeft-D7Qv40Uj.js";import"./ArrowRight-yu2EcGiJ.js";import"./ShoppingBag01-DoxUqYra.js";import"./ZoomOut-Ya7GOVCv.js";import"./Palette-DE1SiHuh.js";import"./CheckCircle-CumYT0Xg.js";import"./Check-D0vo_Hz-.js";import"./ChevronUp-CtEbEkWq.js";import"./UserSquare-CcCul-Ku.js";import"./Copy01-BpbowiHW.js";import"./CreditCard01-D2EcwWI8.js";import"./DotsVertical-EXf2w9q0.js";import"./Image01-BdTgRZP1.js";import"./XClose-pHmDo5-O.js";import"./Key01-B4eK1DBH.js";import"./Link01-By2X_oW1.js";import"./LinkExternal01-CBdG7toR.js";import"./Monitor01-B7ACM5ru.js";import"./Sun-DNDTyIac.js";import"./Plus-BkxlBn4y.js";import"./SearchMd-LHNOznc4.js";import"./Trash01-TOxKcbID.js";import"./Upload01-CjVkZP6G.js";import"./User01-DLdS4GEa.js";import"./Users01-ByxJpuoo.js";import"./X-Bv_7H4P-.js";import"./select-C2txP07f.js";import"./index---Q5zO6x.js";import"./agent-view-guard-xLwNDoFo.js";import"./use-main-panel-tabs-DxwYJrDB.js";import"./use-chat-layout-state-BjAQ-jEe.js";import"./use-file-configs-Dgw51am7.js";import"./use-organization-settings-Cwt51JJ-.js";import"./schema-D-otOqEn.js";import"./task-board-ECBN5WTV.js";import"./site-slug-DebpOoQq.js";import"./thread-route-Dxs07flR.js";import"./use-panel-navigate-Bs3wrk2o.js";import"./use-project-scope-B0guFEKE.js";import"./repository-binding-5QFpfewx.js";import"./use-mcp-client-DwI8A7i_.js";import"./auth-LIeEUIDR.js";import"./thread-intent-CUdr-H41.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-DHC7ikhv.js";import"./use-mcp-tools-CfhB5gVo.js";import"./types-CJIIzGfz.js";import"./utils-CVEq3hMx.js";import"./index-CvEB1wsJ.js";import"./chat-context-BI1s3T66.js";import"./autosend-BnYajEPM.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-DRNQZQd4.js";import"./use-ai-providers-DKskI-lk.js";import"./location-DBePU4bz.js";import"./gateway-client-DCdFKKN_.js";import"./dialog-CGclnAkN.js";import"./drawer-BDoe-caH.js";import"./collection-search-Be-n29of.js";import"./use-mobile-Bl8tDUow.js";import"./use-mcp-prompts-DldVoJeZ.js";import"./index-DiqXHSnv.js";import"./form-bcXKqc8N.js";import"./input-D_ZVa75L.js";import"./org-file-open-context-BZYS0LJs.js";import"./input-DANvmr7V.js";import"./shell-layout-jXhY2XCJ.js";import"./avatar-DUUKBKEq.js";import"./download-app-dialog-D1557QUF.js";import"./command-DQBtHyyq.js";import"./index-CrqZGA61.js";import"./integration-icon-COxNT19S.js";import"./project-icon-C4nL4fZk.js";import"./new-project-dialog-BJabJxXa.js";import"./repository-import-picker-B2sU66dU.js";import"./use-navigate-to-agent-BkimVMTW.js";import"./repository-picker-Vcv9BzsE.js";import"./useInfiniteQuery-CkfME6EV.js";import"./infiniteQueryObserver-BHgtnfJm.js";import"./use-debounced-value-CiGe63CI.js";import"./required-auth-layout-CD9nIPTu.js";import"./use-org-sso-BliqnW_C.js";import"./chat-draft-D0PL2mCh.js";import"./use-session-runtime-DePI4bwj.js";import"./usage-stats-H19WpNRU.js";import"./use-copy-CdZ1BFua.js";import"./markdown-CYbDwdl9.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-Cqnx8A4d.js";import"./use-deco-credits-Cte4t6Hc.js";import"./toggle-group-C9SgUNwy.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-C6UjE84T.js";import"./decopilot-Cb-_oMnP.js";import"./checkbox-Cpv7L0N6.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-qQDOtUT-.js";import"./index-D9sHyQVv.js";import"./input-DGRfwNJU.js";import"./suggestion-NZIrFsLR.js";import"./use-org-fs-BgFAHUUb.js";import"./question-004-sINsf4GQ.js";import"./use-members-C0vxrdj1.js";import"./use-org-auth-client-DveZle8A.js";import"./feature-paywall-C_x6v-Ey.js";import"./plan-ladder-X8Zj9SaM.js";import"./add-connection-dialog-CMIKgpSn.js";import"./extract-connection-data-CGsWt1C2.js";import"./metadata-D72DunRR.js";import"./connection-Cd9kpW2N.js";import"./connection-card-C_b6Kn3i.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-D-mcJV9e.js";import"./connection-form-helpers-CRij5u84.js";import"./authenticate-and-persist-oauth-8VvMLeY7.js";import"./mcp-oauth-Bx2SR9KP.js";import"./collection-tabs-fftcEeJN.js";import"./badge-DzpaGRTk.js";import"./use-infinite-scroll-C8OfQLMA.js";import"./useSuspenseInfiniteQuery-Cb-DHagn.js";import"./use-task-board-events-Dh62k4Ty.js";import"./pair-DGI5fx0e.js";import"./collapsible-pPCznIf4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CqnN_gT7.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-B12cZ7x2.js";import"./use-thread-outputs-C-Wf6OBJ.js";import"./file-type-icon-RYJiailm.js";import"./sandbox-lifecycle-context-B7U4JGhb.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-B5IDCHgC.js";import"./use-task-metadata-w1PI2EXQ.js";import"./virtual-mcp-CXOm_lWW.js";import"./feature-gate-DYu08LcP.js";import"./alert-dialog-Ba4KW5Tb.js";import"./runnable-block-editor-Dm1ttguK.js";import"./claim-phase-copy-EPhExNlM.js";import"./utils-DLvRHMkE.js";import"./monaco-editor-FD1izitZ.js";import"./editor-BJgmcO1D.js";import"./calendar-ByzzyV6c.js";import"./use-new-blocks-editor-Bg78S2yh.js";import"./rich-text-link-control-BzuTiJzL.js";import"./combobox-B1AZk18o.js";import"./search-input-CpX3lkQR.js";import"./asset-utils-Cl-DIW8f.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-Di_1lUk9.js";import"./empty-state-B18ltfc_.js";import"./empty-state-B34CEwUC.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),$t=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,At=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!$t.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=At.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&q(a,t,r,[...o,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=Y.c(18),{variant:r}=e,o=J();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=Y.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function cn(e){const t=Y.c(72),{decofile:r}=e,o=J(),[s,i]=Q.useState("calendar"),[a,c]=Q.useState(Yt),[l,m]=Q.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let $;t[16]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ht,{size:16}),t[16]=$):$=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:$}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let A;t[23]!==d||t[24]!==k?(A=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=A):A=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==A||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,A,w]}),t[31]=A,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let I;t[41]!==o?(I=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:H,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Kt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Xt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let Z;return t[69]!==W||t[70]!==G?(Z=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Z):Z=t[71],Z}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Yt(){return mt(new Date)}function Kt(e){const t=Y.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Zt=6;function Xt(e){const t=Y.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Jt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),$=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Zt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function qt(e,t){return Math.max(e,t.lane+1)}function Jt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const X=4,Qt=32,K=240;function te(e){const t=Y.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,X),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:X},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=J(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:K},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${X}, minmax(0, 1fr))`},t[7]=N):N=t[7];const $=g.map(re);let _;t[8]!==$?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:$}),t[8]=$,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${K}px + (100% - ${K}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const A=m.map(w=>{const[j,R]=w,H=dt(s,j),I=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:K},children:I})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Qt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:K},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${X}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==A?(L=n.jsxs("div",{className:T,children:[k,C,A]}),t[16]=k,t[17]=C,t[18]=A,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{cn as VariantCalendar};
1
+ import{c as Y,b as J,r as Q,j as n,l as rt,B as tt,ak as ut}from"./index-B9dD9jj0.js";import{x as ht,Z as at,B as xt}from"./agent-icon-TQUkqPJj.js";import{L as gt}from"./label-DpahMcEo.js";import{S as lt}from"./scroll-area-DjfgE2jb.js";import{S as bt}from"./switch-BLWgY1pz.js";import{T as vt,b as yt,a as jt}from"./tooltip-CM3YyNDC.js";import{V as Tt}from"./view-mode-toggle-DtqPFP6s.js";import{V as ct,W as mt,X as Nt,Y as _t,Z as kt,_ as U,$ as wt}from"./agent-site-editor-content-CNFJoRJD.js";import"./AlertCircle-CXwWyjWL.js";import"./Tool01-D2y7RTX1.js";import"./ArrowUp-BiYv-XbK.js";import"./ArrowLeft-DYnQbYxF.js";import"./ArrowRight-C4e8QGnK.js";import"./ShoppingBag01-Dq4UD5Hm.js";import"./ZoomOut-xQj4oorm.js";import"./Palette-AyH3xXYO.js";import"./CheckCircle-jESFBkr7.js";import"./Check-C8M8v3vI.js";import"./ChevronUp-Q2TBgNib.js";import"./UserSquare-nGw6lX43.js";import"./Copy01-CaF9W1F_.js";import"./CreditCard01-Czi8bh9o.js";import"./DotsVertical-DyDeVQCx.js";import"./Image01-CsDdVFAJ.js";import"./XClose-CMTvfCel.js";import"./Key01-D2FR3CbZ.js";import"./Link01-NjQr5iwv.js";import"./LinkExternal01-CR1925bA.js";import"./Monitor01-50nhII2F.js";import"./Sun-oSoDHq1v.js";import"./Plus-DP7AHtKt.js";import"./SearchMd-D_KPqWqZ.js";import"./Trash01-64yehlfB.js";import"./Upload01-BvgQ3r-o.js";import"./User01-CU3qbr5s.js";import"./Users01-Lf2fvOej.js";import"./X-NPE_cXRR.js";import"./select-Cd1ykg-h.js";import"./index-DWe-6mCD.js";import"./agent-view-guard-BbHyaShN.js";import"./use-main-panel-tabs-sy9nYCqA.js";import"./use-chat-layout-state-BfZJHnkW.js";import"./use-file-configs-DRP3Y7X_.js";import"./use-organization-settings-DbPbYeMx.js";import"./schema-BejaMrNT.js";import"./task-board-DlEJAtdm.js";import"./site-slug-DebpOoQq.js";import"./thread-route-CowkfwAl.js";import"./use-panel-navigate-DH6_TAsx.js";import"./use-project-scope-Bgnjdhs7.js";import"./repository-binding-DzrKIMc8.js";import"./use-mcp-client-CqsHeShn.js";import"./auth-BNR-bSJO.js";import"./thread-intent-UQGFcX_y.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-BdSGHKJK.js";import"./use-mcp-tools-CHvaFbLg.js";import"./types-DyM6In73.js";import"./utils-CVEq3hMx.js";import"./index-2-Z1VD2F.js";import"./chat-context-DppIIhzA.js";import"./autosend-h1h21hnM.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-BZQXzmAo.js";import"./use-ai-providers-C98JaJAU.js";import"./location-DBePU4bz.js";import"./gateway-client-CIbTMjGx.js";import"./dialog-Mg_Z3ES1.js";import"./drawer-BIoKJwCW.js";import"./collection-search-D_azi8Gq.js";import"./use-mobile-3MM_rw4D.js";import"./use-mcp-prompts-D2YpCb1K.js";import"./index-v5QvptSB.js";import"./form-BgAERq-t.js";import"./input-Cndqm_5O.js";import"./org-file-open-context-CSDcMwBD.js";import"./input-BZloVZ72.js";import"./shell-layout-Bl8of89A.js";import"./avatar-UFbMnkmr.js";import"./download-app-dialog-B7zcmkcH.js";import"./command-D1RoIxg2.js";import"./index-BZOsa8jC.js";import"./integration-icon-C5NBXdpz.js";import"./project-icon-CmV-Y1UZ.js";import"./new-project-dialog-BejzbVG2.js";import"./repository-import-picker-CVP1mN_O.js";import"./use-navigate-to-agent-PjEm7mol.js";import"./repository-picker-BIkrH86Z.js";import"./useInfiniteQuery-TQWsreUe.js";import"./infiniteQueryObserver-Ex2lNjjr.js";import"./use-debounced-value-DCYhoWzs.js";import"./required-auth-layout-BPzqc-yZ.js";import"./use-org-sso-DGy0uwEN.js";import"./chat-draft-DiJpqitX.js";import"./use-session-runtime-CsLaMszW.js";import"./usage-stats-5Vc6zWOp.js";import"./use-copy-CiP5Vy7i.js";import"./markdown-D8U5yexH.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-C1zPDoUI.js";import"./use-deco-credits-x58AfrXU.js";import"./toggle-group-BQtHqwCK.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-CVEaCqtR.js";import"./decopilot-BRlhj2Gw.js";import"./checkbox-BGfnFNv1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-D5s3M61L.js";import"./index-r8TBLtcZ.js";import"./input-BmzPGvUi.js";import"./suggestion-K--t6EP5.js";import"./use-org-fs-DazA0BMP.js";import"./question-004-sINsf4GQ.js";import"./use-members-BIhBY7mT.js";import"./use-org-auth-client-DM3Q5_fm.js";import"./feature-paywall-sc2LtOXc.js";import"./plan-ladder-COYrpP9N.js";import"./add-connection-dialog-DHl4H43e.js";import"./extract-connection-data-D5wjQBt3.js";import"./metadata-D72DunRR.js";import"./connection-Ds6vwkGM.js";import"./connection-card-BPKFHpho.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-r66bOcCD.js";import"./connection-form-helpers-C4OB4j_3.js";import"./authenticate-and-persist-oauth-CZrI0wkU.js";import"./mcp-oauth-DCDrWVc0.js";import"./collection-tabs-C6N84gCC.js";import"./badge-DzTxW-Ts.js";import"./use-infinite-scroll-BjVQV3DR.js";import"./useSuspenseInfiniteQuery-DMyZCSsI.js";import"./use-task-board-events-BsviWCWn.js";import"./pair-o8Pcow3m.js";import"./collapsible-C2j127TD.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CWOIFfi6.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-lggFYx6M.js";import"./use-thread-outputs-CvWfZHjR.js";import"./file-type-icon-BhiPdwxi.js";import"./sandbox-lifecycle-context-OPdARg4I.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-CgOUF0YA.js";import"./use-task-metadata-DvgRil5z.js";import"./virtual-mcp-Cr9A-Wo0.js";import"./feature-gate-DvQXfI5S.js";import"./alert-dialog-DeJgSFRZ.js";import"./runnable-block-editor-h-xGxUBS.js";import"./claim-phase-copy-BRgB3yX1.js";import"./utils-BeoNvR__.js";import"./monaco-editor-BRUSLTLk.js";import"./editor-JpZ1gWwV.js";import"./calendar-Bx26MiuJ.js";import"./use-new-blocks-editor-BAZ5qlTk.js";import"./rich-text-link-control-RS2mJIfp.js";import"./combobox--XWfS5lw.js";import"./search-input-DviARBm2.js";import"./asset-utils-BRk3fUR7.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-CAmcva4T.js";import"./empty-state-BayRP7H4.js";import"./empty-state-BmztM-Bo.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),$t=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,At=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!$t.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=At.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&q(a,t,r,[...o,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=Y.c(18),{variant:r}=e,o=J();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=Y.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function cn(e){const t=Y.c(72),{decofile:r}=e,o=J(),[s,i]=Q.useState("calendar"),[a,c]=Q.useState(Yt),[l,m]=Q.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let $;t[16]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ht,{size:16}),t[16]=$):$=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:$}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let A;t[23]!==d||t[24]!==k?(A=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=A):A=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==A||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,A,w]}),t[31]=A,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let I;t[41]!==o?(I=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:H,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Kt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Xt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let Z;return t[69]!==W||t[70]!==G?(Z=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Z):Z=t[71],Z}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Yt(){return mt(new Date)}function Kt(e){const t=Y.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Zt=6;function Xt(e){const t=Y.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Jt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),$=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Zt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function qt(e,t){return Math.max(e,t.lane+1)}function Jt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const X=4,Qt=32,K=240;function te(e){const t=Y.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,X),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:X},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=J(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:K},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${X}, minmax(0, 1fr))`},t[7]=N):N=t[7];const $=g.map(re);let _;t[8]!==$?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:$}),t[8]=$,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${K}px + (100% - ${K}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const A=m.map(w=>{const[j,R]=w,H=dt(s,j),I=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:K},children:I})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Qt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:K},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${X}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==A?(L=n.jsxs("div",{className:T,children:[k,C,A]}),t[16]=k,t[17]=C,t[18]=A,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{cn as VariantCalendar};
@@ -1 +1 @@
1
- import{H as f,I as $}from"./runnable-block-editor-Dm1ttguK.js";const l="x-deco-matchers-override";function h({pageKey:a,prefix:r,variants:t,selectedIndex:n,decofile:i,meta:s}){if(!a||n<0||n>=t.length)return[];const o=[];for(let e=0;e<=n;e++){const u=t[e];if(!u)continue;const c=u.rule,v=e===n?"1":"0",d=(f(c,i,s)?$(c,i,s):null)??`${a}@${r}.${e}.rule`;o.push(`${d}=${v}`)}return o}function B(a,r,t,n){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:a,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:n})}function P({pageKey:a,page:r,sectionIndex:t,sectionLazy:n,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${n?".section":""}.variants`,v=Array.isArray(i.variants)?i.variants:[];return h({pageKey:a,prefix:c,variants:v,selectedIndex:s,decofile:o,meta:e})}function x(a,r){if(r.length===0)return a;try{const t=new URL(a,"http://local");t.searchParams.delete(l);for(const n of r)t.searchParams.append(l,n);return a.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return a}}export{P as a,B as b,x as w};
1
+ import{H as f,I as $}from"./runnable-block-editor-h-xGxUBS.js";const l="x-deco-matchers-override";function h({pageKey:a,prefix:r,variants:t,selectedIndex:n,decofile:i,meta:s}){if(!a||n<0||n>=t.length)return[];const o=[];for(let e=0;e<=n;e++){const u=t[e];if(!u)continue;const c=u.rule,v=e===n?"1":"0",d=(f(c,i,s)?$(c,i,s):null)??`${a}@${r}.${e}.rule`;o.push(`${d}=${v}`)}return o}function B(a,r,t,n){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:a,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:n})}function P({pageKey:a,page:r,sectionIndex:t,sectionLazy:n,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${n?".section":""}.variants`,v=Array.isArray(i.variants)?i.variants:[];return h({pageKey:a,prefix:c,variants:v,selectedIndex:s,decofile:o,meta:e})}function x(a,r){if(r.length===0)return a;try{const t=new URL(a,"http://local");t.searchParams.delete(l);for(const n of r)t.searchParams.append(l,n);return a.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return a}}export{P as a,B as b,x as w};
@@ -1 +1 @@
1
- import{c as $,r as T,l as f,j as i}from"./index-D9LnhQDL.js";import{b as k,T as I,a as P}from"./tooltip-C-B-WE46.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=R.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
1
+ import{c as $,r as T,l as f,j as i}from"./index-B9dD9jj0.js";import{b as k,T as I,a as P}from"./tooltip-CM3YyNDC.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=R.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};