decocms 4.584.5 → 4.584.7

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 (474) hide show
  1. package/dist/client/assets/{AlertCircle-mj0sz0gj.js → AlertCircle-LERpHwFl.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DSUaBnyJ.js → AreaChart-BxoeWPuz.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft--TSM2Ux3.js → ArrowLeft-1PzfHfg2.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BVFSrvKf.js → ArrowRight-DEqBtwSl.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-D2bbOB2w.js → ArrowUp-ZrZG10pa.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-CTUEdBiB.js → BookOpen01-Du4Om727.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DynFqoj3.js → CartesianChart-CESYSx7X.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-_BlSk5IS.js → CategoricalChart-Blqz99On.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-BsBF4S8u.js → CheckCircle-BtWoVwB1.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CNlehUMA.js → ChevronDown-CTtpSqtu.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BdBrg7yc.js → ChevronSelectorVertical-CRLIgJUm.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BIaMfxq-.js → ChevronUp-q3wzYuvO.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-gHUc2u28.js → CreditCard01-DdoSZEKk.js} +1 -1
  14. package/dist/client/assets/{Eye-Xo5rS9iJ.js → Eye-Cm9q3fEb.js} +1 -1
  15. package/dist/client/assets/{File02-uZRQiPOp.js → File02-CvFMCRDa.js} +1 -1
  16. package/dist/client/assets/{Globe04-DhsnPBDD.js → Globe04-DiWiLDtF.js} +1 -1
  17. package/dist/client/assets/{Image01-C5Xqhwp5.js → Image01-C60XTiE0.js} +1 -1
  18. package/dist/client/assets/{Key01-h9Y3uaT_.js → Key01-D94vE5H1.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-CPMSR00X.js → LayoutLeft-eyBzoPS2.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-CxV1rDqL.js → LinkBroken01-BZ3y0SMI.js} +1 -1
  21. package/dist/client/assets/MessageCircle01-BI9UTEVS.js +1 -0
  22. package/dist/client/assets/{Minus-D55MDhYc.js → Minus-N5F461bR.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CBUOgSaC.js → Monitor01-CK_FwrHo.js} +1 -1
  24. package/dist/client/assets/{Play-zsnTCnBK.js → Play-CZH3MEMf.js} +1 -1
  25. package/dist/client/assets/{Plus-DAYIm6ow.js → Plus-D0avz2-9.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-Ccilwreq.js → ReferenceLine-Baor9_ls.js} +1 -1
  27. package/dist/client/assets/{SearchMd-CTSUPag9.js → SearchMd-CjGee94g.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CF4EYiC_.js → ShoppingBag01-Dl6ehSJq.js} +1 -1
  29. package/dist/client/assets/{Sun-B-xu6eHR.js → Sun-pelXqxnJ.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-qTGCOGX6.js → SwitchHorizontal01-BqvEtH8f.js} +1 -1
  31. package/dist/client/assets/{Tool01-Bscrvuft.js → Tool01-DdxQ5Wxa.js} +1 -1
  32. package/dist/client/assets/{Tooltip-EHWPdrLL.js → Tooltip-DBDYl8II.js} +1 -1
  33. package/dist/client/assets/{Trash01-CevYpZEM.js → Trash01-Dt5QksjR.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-DMf7H3tv.js → TrendUp01-CrdizHzO.js} +1 -1
  35. package/dist/client/assets/{Upload01-C_8HEOMT.js → Upload01-WRNWPmM8.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-4mEtfdkD.js → UserCheck01-DUGYNveK.js} +1 -1
  37. package/dist/client/assets/{UserSquare-oo1b4ulW.js → UserSquare-DhKeYx3_.js} +1 -1
  38. package/dist/client/assets/{Users01-av_p4B03.js → Users01-BxsO8RcV.js} +1 -1
  39. package/dist/client/assets/{XClose-WYCPZpkD.js → XClose-Cr9lMv3y.js} +1 -1
  40. package/dist/client/assets/{Zap-C-VVHO-P.js → Zap-XiBmD0Uf.js} +1 -1
  41. package/dist/client/assets/{access-gate-CBj6VxJ7.js → access-gate-DMvQJ5NH.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-CVC64Gmd.js → add-connection-dialog-CdlYXpjf.js} +1 -1
  43. package/dist/client/assets/agent-app-BviX7PfD.js +1 -0
  44. package/dist/client/assets/agent-assets-DIhiJA1i.js +1 -0
  45. package/dist/client/assets/{agent-automation-e9KFVJPg.js → agent-automation-DTXDhxCV.js} +1 -1
  46. package/dist/client/assets/agent-automations-D2Ku4EMX.js +1 -0
  47. package/dist/client/assets/agent-blog-DQ5PYBSC.js +2 -0
  48. package/dist/client/assets/agent-blog-post-EXZBFbAe.js +2 -0
  49. package/dist/client/assets/agent-calendar-DyqX1vCD.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-DEMFK1PG.js → agent-capabilities-B531K1j4.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-C6BkVz2l.js +1 -0
  52. package/dist/client/assets/agent-deck-OVvox7Qs.js +1 -0
  53. package/dist/client/assets/agent-e2e-BPcap2Q_.js +1 -0
  54. package/dist/client/assets/agent-experiments-ezhbhr3h.js +1 -0
  55. package/dist/client/assets/agent-file-D3VWXqNY.js +1 -0
  56. package/dist/client/assets/agent-hosting-DlNqwCuw.js +1 -0
  57. package/dist/client/assets/agent-icon-CoK8596D.js +1 -0
  58. package/dist/client/assets/agent-library-C7EtfeEr.js +1 -0
  59. package/dist/client/assets/agent-library-file-B2FgcsHJ.js +1 -0
  60. package/dist/client/assets/agent-overview-DYQAGPfG.js +1 -0
  61. package/dist/client/assets/{agent-releases-D4ESN3iT.js → agent-releases-BX_f-tUO.js} +1 -1
  62. package/dist/client/assets/agent-settings-D0aJ2WEC.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-DBCTlamd.js → agent-site-editor-C2kZSlyi.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-BtLscisv.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-qbHKbK69.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-jNuzW-j_.js +1 -0
  67. package/dist/client/assets/agent-view-IoGHNau6.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-BZTSZPH3.js → agent-view-guard-D_OOi9k-.js} +1 -1
  69. package/dist/client/assets/{ai-providers-Bd027SSh.js → ai-providers-N0kyktgZ.js} +1 -1
  70. package/dist/client/assets/{alert-fpttYoSQ.js → alert-D9u34EuS.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-BqryzJvo.js → analytics-sections-DdufhVqP.js} +1 -1
  72. package/dist/client/assets/api-keys-D0dVCkfj.js +1 -0
  73. package/dist/client/assets/{api-keys-DLlJejJF.js → api-keys-D2iSl3qQ.js} +1 -1
  74. package/dist/client/assets/app-editor-BUf7R47i.js +1 -0
  75. package/dist/client/assets/asset-utils-2loXzYTh.js +1 -0
  76. package/dist/client/assets/{auth-BOZ5swZI.js → auth-DF8kNBcM.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-DXChUDcZ.js → auth-catchall-GloGR8rY.js} +1 -1
  78. package/dist/client/assets/{auth-entry-DMbaj7KI.js → auth-entry-Cn4ErOzl.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-DNd6b-pH.js → auth-split-layout-Dv6n6WUU.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-Cj46Ik0_.js → authenticate-and-persist-oauth-Bj5ykVgk.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-Cpitkm-C.js → automation-list-row-DbAlWe8K.js} +1 -1
  82. package/dist/client/assets/{automation-runs-BxBjhLC7.js → automation-runs-CBMuf4ZB.js} +1 -1
  83. package/dist/client/assets/automations-CPzT36LA.js +1 -0
  84. package/dist/client/assets/{badge-CEYLDtOG.js → badge-BuRW7gbq.js} +1 -1
  85. package/dist/client/assets/{block-document-DJdZyw2U.js → block-document-CKqO6P9b.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-LI4fVaaR.js → blocks-preview-workspace-context-BXZAhTnG.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-Bx0tgd5u.js → blocks-tab-states-B1xVnp-k.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-6gNfi5Cv.js → blog-preview-url-BiKkREf8.js} +1 -1
  89. package/dist/client/assets/{blog-schema-BKDvfgHw.js → blog-schema-CAV9CGrP.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-BClmYTyo.js → blog-source-gate-ya88vBvU.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-eJ0uCj97.js → blog-view-gate-HwbK-xOk.js} +1 -1
  92. package/dist/client/assets/{buckets-DWNc5IQi.js → buckets-DLb8jm5H.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-CncoFUT6.js → build-improve-prompt-doc-DgL7K8YT.js} +1 -1
  94. package/dist/client/assets/{calendar-B0VrIuVV.js → calendar-D5SETI9f.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-D7_TKHDu.js → capability-load-error-B2sM2CpK.js} +1 -1
  96. package/dist/client/assets/category-editor-oYvPx2p2.js +1 -0
  97. package/dist/client/assets/{category-tree-T_JTuIiu.js → category-tree-C9T6n547.js} +1 -1
  98. package/dist/client/assets/{chart-Ef5OJL7Y.js → chart-BbXdQRqA.js} +1 -1
  99. package/dist/client/assets/{chat-context-BUMEnIPW.js → chat-context-cgQtGcxn.js} +1 -1
  100. package/dist/client/assets/{chat-draft-B7hvjq7e.js → chat-draft-BhR9lYJt.js} +1 -1
  101. package/dist/client/assets/{checkbox-BUvWR-iD.js → checkbox-BRBpFYe8.js} +1 -1
  102. package/dist/client/assets/choose-editor-BQuCaR6y.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-CIy6cPVO.js → cli-auth-success-B1RUmLvl.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-t9adizi8.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-BNAdDXxB.js → cms-store-drafts-mx6LCGke.js} +1 -1
  106. package/dist/client/assets/{collapsible-DYCInqz3.js → collapsible-FSqiIEKF.js} +1 -1
  107. package/dist/client/assets/collection-detail-imb7nFuz.js +1 -0
  108. package/dist/client/assets/{collection-display-button-C3xi0T_X.js → collection-display-button-BBlLsx_Y.js} +1 -1
  109. package/dist/client/assets/{collection-search-CMlKHTQ0.js → collection-search-CRXrZcjK.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-DbIa5pBT.js → collection-table-wrapper-CHHFYHOQ.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-ZW6Qb_Ul.js → collection-tabs-GTBWPOeS.js} +1 -1
  112. package/dist/client/assets/{combobox-CMR7JQ5s.js → combobox-B0ehX19R.js} +1 -1
  113. package/dist/client/assets/{command-DAachgGl.js → command-B42gKY6M.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-DFAviA9V.js → companion-mcps-section-DSn40AIW.js} +1 -1
  115. package/dist/client/assets/{config-CVrGKu1z.js → config-Cf7vj7Rh.js} +1 -1
  116. package/dist/client/assets/{connect-Dv780Ao_.js → connect-aiK89Vil.js} +3 -3
  117. package/dist/client/assets/{connect-key-BcTw1Dit.js → connect-key-BE8Ve88O.js} +1 -1
  118. package/dist/client/assets/{connect-layout-DVKIDoAk.js → connect-layout-CecU9htL.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-DmvQjMo_.js → connect-source-dialog-ClSByKPX.js} +1 -1
  120. package/dist/client/assets/{connection-CqG6Tj46.js → connection-CUNj386D.js} +1 -1
  121. package/dist/client/assets/{connection-card-CMRGPAUW.js → connection-card-CoPsfM-t.js} +1 -1
  122. package/dist/client/assets/connection-detail-ChnZ4wVO.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-BliOgdtt.js → connection-form-helpers-sEyGhYPt.js} +1 -1
  124. package/dist/client/assets/{connection-slug-BMyTAhb7.js → connection-slug-Dp27dyiZ.js} +1 -1
  125. package/dist/client/assets/connections-BAYvQyim.js +1 -0
  126. package/dist/client/assets/{content-tab-B1BKIfBg.js → content-tab-B_euqf89.js} +3 -3
  127. package/dist/client/assets/context-CprOX5Fk.js +1 -0
  128. package/dist/client/assets/{context-menu-dPQDOknl.js → context-menu-DumjepYq.js} +1 -1
  129. package/dist/client/assets/{context-shell-CU-clPo7.js → context-shell-DqsQoUXU.js} +4 -4
  130. package/dist/client/assets/{create-organization-dialog-BMVp8RKI.js → create-organization-dialog-D3lasgzU.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-BIfjhIvm.js → daily-pulse-BigzX6_X.js} +1 -1
  132. package/dist/client/assets/{delete-copy-Dyr7i9lK.js → delete-copy-Kctb2mBn.js} +1 -1
  133. package/dist/client/assets/{device-hint-DBfDHhL1.js → device-hint-BUPNp7Gx.js} +1 -1
  134. package/dist/client/assets/discover-C3ARrhth.js +1 -0
  135. package/dist/client/assets/{domain-settings-l_JDVQfq.js → domain-settings-CNSII-3v.js} +1 -1
  136. package/dist/client/assets/{drawer-BtNmmbgW.js → drawer-JNxusvzc.js} +1 -1
  137. package/dist/client/assets/{editor-DJNkhCaU.js → editor-5IlECLt2.js} +1 -1
  138. package/dist/client/assets/{editor-classes-D6VscvFm.js → editor-classes-BQUsTFeI.js} +1 -1
  139. package/dist/client/assets/{empty-message-BFHsH7_h.js → empty-message-xWDO9UOL.js} +1 -1
  140. package/dist/client/assets/{empty-state-Y9RPHES1.js → empty-state-Dy-zGk3L.js} +1 -1
  141. package/dist/client/assets/{empty-state-FI4NppsL.js → empty-state-yZFAU14m.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-Bp3jeDLT.js → experiments-tab-choice-BNTM2Tep.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-jaNfclWY.js → extract-connection-data-DWNh_g9w.js} +1 -1
  144. package/dist/client/assets/{feature-gate-32y7GiUu.js → feature-gate-OQExXuGJ.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-nyy14OlO.js → feature-paywall-BFla-pHe.js} +1 -1
  146. package/dist/client/assets/file-explorer-BI_RiaE-.js +2 -0
  147. package/dist/client/assets/{file-preview-DOlPWZsT.js → file-preview-D3IaHRZs.js} +1 -1
  148. package/dist/client/assets/{file-share-button-fnsd2V0Q.js → file-share-button-0grSC9Ok.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-Bw6tHUJI.js → file-type-icon-BDItiN_6.js} +1 -1
  150. package/dist/client/assets/{folder-icon-A6dxvF3y.js → folder-icon-BbdGhqVB.js} +1 -1
  151. package/dist/client/assets/{form-CE_i7Gc_.js → form-D440wdg0.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-D0o7MHwc.js → frame-navigation-uxp1vpqb.js} +1 -1
  153. package/dist/client/assets/{gateway-client-CuVQGtSK.js → gateway-client-DJgic-Qj.js} +1 -1
  154. package/dist/client/assets/{general-CF4LBOhX.js → general-O2NogS0h.js} +1 -1
  155. package/dist/client/assets/{github-icon-BBtraw32.js → github-icon-DY-ZDpjv.js} +1 -1
  156. package/dist/client/assets/{held-block-view-BCDffeao.js → held-block-view-Ci67S_86.js} +1 -1
  157. package/dist/client/assets/home-LH0qEA7E.js +1 -0
  158. package/dist/client/assets/{home-overview-CvjbBnOC.js → home-overview-B3mRGhL1.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-BV7FtBoJ.js → hosted-reconcile-CEmYvj4T.js} +1 -1
  160. package/dist/client/assets/{icon-button-vJpGdaXv.js → icon-button-DemWGnFJ.js} +1 -1
  161. package/dist/client/assets/{index-CvQo8gKP.js → index-8WAjXpHp.js} +1 -1
  162. package/dist/client/assets/{index-BfWp2Wnw.js → index-B044ByKY.js} +5 -5
  163. package/dist/client/assets/{index-C-SbeINf.js → index-BGR769_k.js} +1 -1
  164. package/dist/client/assets/index-BIjy4D7G.js +4 -0
  165. package/dist/client/assets/{index-Bq8aKp2l.js → index-BWFWeVYS.js} +1 -1
  166. package/dist/client/assets/{index-DqFWx3BB.js → index-BZnXvIYx.js} +1 -1
  167. package/dist/client/assets/{index-BO5G51Y2.js → index-BtoOPxq3.js} +1 -1
  168. package/dist/client/assets/{index-BBKDsc5X.js → index-CJnIUpq6.js} +1 -1
  169. package/dist/client/assets/{index-FE1RDBz7.js → index-CTnVElJ7.js} +1 -1
  170. package/dist/client/assets/{index-DN6wMhlh.js → index-DFtBQG6f.js} +1 -1
  171. package/dist/client/assets/{index-BDN2Il8W.js → index-DZ02XBmW.js} +1 -1
  172. package/dist/client/assets/{index-CJvXv5nj.js → index-Dd7W9LAl.js} +1 -1
  173. package/dist/client/assets/{index-CcEK8GbM.js → index-DiHieAhX.js} +1 -1
  174. package/dist/client/assets/{index-C_tC1dxx.js → index-LR929nhM.js} +1 -1
  175. package/dist/client/assets/{index-BFZAeRbT.js → index-emJ-SpC_.js} +1 -1
  176. package/dist/client/assets/{index-DvdlZugw.js → index-kBmh1EWB.js} +1 -1
  177. package/dist/client/assets/index-qmdwa9p_.js +1 -0
  178. package/dist/client/assets/{index-redirect-Bl5G9WWk.js → index-redirect-DFNmAEUS.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-1nr0P0K0.js → infiniteQueryObserver-CkKuSwnM.js} +1 -1
  180. package/dist/client/assets/{infra-billing-ho67U0rR.js → infra-billing-v-PyLbec.js} +1 -1
  181. package/dist/client/assets/{input-BNlFS4tL.js → input-Bxos3E1r.js} +1 -1
  182. package/dist/client/assets/{input-BJ5cUSYm.js → input-CmfobyY5.js} +4 -4
  183. package/dist/client/assets/{integration-icon-C4zzzxaS.js → integration-icon-D8qlWjgY.js} +1 -1
  184. package/dist/client/assets/{item-actions-B-wWhBMR.js → item-actions-B-BkLlVy.js} +1 -1
  185. package/dist/client/assets/{jira-icon-geKtCB2v.js → jira-icon-CuWy2cPQ.js} +1 -1
  186. package/dist/client/assets/{label-CWaQ3ANC.js → label-CTNjOu1p.js} +1 -1
  187. package/dist/client/assets/{layout-D8a54-AV.js → layout-DRNr969-.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-BnEG9TvC.js → legacy-admin-welcome-dialog-BdLr3pNE.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-D40bR2el.js → legacy-agents-deep-B9pNhw8H.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-Fa4p1NoA.js → legacy-main-redirect-VxHPv_GC.js} +1 -1
  191. package/dist/client/assets/library-DhJCQWEt.js +1 -0
  192. package/dist/client/assets/{library-tab-Bxyd3n6f.js → library-tab-DAKFtQAS.js} +1 -1
  193. package/dist/client/assets/{login-Cdi7iEkU.js → login-BywnxCyj.js} +1 -1
  194. package/dist/client/assets/{markdown-NetMLX1B.js → markdown-D9jcZKqO.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-OOnse3pT.js → mcp-app-renderer-B-8cpbuY.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-DOaDVyhA.js → mcp-oauth-CI1piP1i.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-C138KPCE.js → mcp-oauth-DcxKJjL0.js} +1 -1
  198. package/dist/client/assets/{members-r0zAY-Qq.js → members-BodivWaf.js} +1 -1
  199. package/dist/client/assets/{memory-aLB_WhbI.js → memory-B3iqunKn.js} +1 -1
  200. package/dist/client/assets/{mock-board-Dl0qBjh7.js → mock-board-DeVwaxGw.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-BJmxWrxj.js → monaco-editor-C7Pj09eb.js} +1 -1
  202. package/dist/client/assets/{monitoring-Cd-32_wp.js → monitoring-BEBDZh-O.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-C4l9QgAZ.js → monitoring-stats-row-CevJ0W2J.js} +1 -1
  204. package/dist/client/assets/{multi-select-B_L-qOo_.js → multi-select-BrPmuUJB.js} +1 -1
  205. package/dist/client/assets/{mustache-DsBc8nE5.js → mustache-BzqyxB7g.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-C6gSKxIZ.js → named-rule-step-Cst60jz3.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-D6a00Kd0.js → named-rule-view-x7JG4_kw.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-B6Lwo0Gj.js → new-project-dialog-BXZNX64Z.js} +1 -1
  209. package/dist/client/assets/{new-project-store-DQsI7Up8.js → new-project-store-D_Og4-mf.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-ZiXhFHTL.js → oauth-callback-CrPnZ5jk.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-G3iL8oeJ.js → oauth-callback-ai-provider-DQus4mxS.js} +1 -1
  212. package/dist/client/assets/{oauth-consent-BXyh0gna.js → oauth-consent-CQicRgof.js} +1 -1
  213. package/dist/client/assets/{onboarding-DAsPAll8.js → onboarding-BLI841xC.js} +1 -1
  214. package/dist/client/assets/openai-conversation-CsEmmVGs.js +3 -0
  215. package/dist/client/assets/{optimistic-project-sidebar-views-DFcCZ-o3.js → optimistic-project-sidebar-views-CFaDDb2l.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-C70gELqf.js → order-monitor-day-1IdfHt6a.js} +1 -1
  217. package/dist/client/assets/{organization-choice-DU0Iu2sl.js → organization-choice-n6RvuLql.js} +1 -1
  218. package/dist/client/assets/{orgs-BX0lk0zT.js → orgs-BZ0aeAEN.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-F5Hyapdn.js → own-accounts-section-DF2o9iTS.js} +1 -1
  220. package/dist/client/assets/{pair-B9IOPXjq.js → pair-C3H4DFS8.js} +6 -6
  221. package/dist/client/assets/{parse-sections--l6s_VwH.js → parse-sections-CONMKcn4.js} +4 -4
  222. package/dist/client/assets/plan-CurIUA4r.js +1 -0
  223. package/dist/client/assets/{plan-ladder-NC686t6f.js → plan-ladder-B5iRPBN6.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-WBfanqrN.js → plan-usage-card-DYD_YlVx.js} +1 -1
  225. package/dist/client/assets/{popover-oFcDtUvN.js → popover-BkhFtaxb.js} +1 -1
  226. package/dist/client/assets/post-calendar-D81wAfZ5.js +1 -0
  227. package/dist/client/assets/{post-editor-CcQmW5GV.js → post-editor-ynyEhGiV.js} +2 -2
  228. package/dist/client/assets/preview-content-DrjVirV6.js +1 -0
  229. package/dist/client/assets/{preview-dialog-Cded3kAU.js → preview-dialog-DjcGWS7E.js} +1 -1
  230. package/dist/client/assets/{preview-panel-rChZiu-N.js → preview-panel-CSkZBl4d.js} +1 -1
  231. package/dist/client/assets/{preview-tab-zxzhDMiQ.js → preview-tab-mGFlw_oF.js} +3 -3
  232. package/dist/client/assets/{product-picker-dialog-CX9KvtZh.js → product-picker-dialog-CFDF-X4h.js} +1 -1
  233. package/dist/client/assets/{profile-NWB9QWdA.js → profile-C9kP9Ndl.js} +1 -1
  234. package/dist/client/assets/project-app-view-Bgoqdt-m.js +1 -0
  235. package/dist/client/assets/{project-apps-D28U2fPi.js → project-apps-BRK2HTAW.js} +1 -1
  236. package/dist/client/assets/{project-icon-WyFXKdgN.js → project-icon-ycJeRtUY.js} +1 -1
  237. package/dist/client/assets/{project-index-COi5kduS.js → project-index-CTiqM4uG.js} +1 -1
  238. package/dist/client/assets/project-reports-IkD_LiW8.js +1 -0
  239. package/dist/client/assets/project-tasks-DAsLsvm5.js +1 -0
  240. package/dist/client/assets/projects-C7hOF9VU.js +1 -0
  241. package/dist/client/assets/{projects-empty-state-Dvqp2Zzy.js → projects-empty-state-sSPrRQ63.js} +1 -1
  242. package/dist/client/assets/{prompts-DhLlttmt.js → prompts-CS5QdOG-.js} +1 -1
  243. package/dist/client/assets/record-editor-Ccowc9mE.js +1 -0
  244. package/dist/client/assets/redirect-editor-lWYhYszZ.js +1 -0
  245. package/dist/client/assets/reports-CDTNLEHR.js +1 -0
  246. package/dist/client/assets/{reports-CREVrO7v.js → reports-Dit53cvs.js} +1 -1
  247. package/dist/client/assets/reports-onboarding-BxtEMz2c.js +1 -0
  248. package/dist/client/assets/{reports-tab-C197xYdE.js → reports-tab-CYBOOiKe.js} +2 -2
  249. package/dist/client/assets/repositories-BTdSIBC8.js +1 -0
  250. package/dist/client/assets/{repositories-CWMzkWDA.js → repositories-fdsYTlj_.js} +1 -1
  251. package/dist/client/assets/{repository-binding-BDu0tU0n.js → repository-binding-CS8khEsh.js} +1 -1
  252. package/dist/client/assets/{repository-picker-DKoD0HVQ.js → repository-picker-D9E_hkBL.js} +1 -1
  253. package/dist/client/assets/{require-capability-DXiZ0OON.js → require-capability-BouyAFmv.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-ZTLOobSH.js → required-auth-layout-BvHcocCT.js} +1 -1
  255. package/dist/client/assets/{reset-password-DiEnHrUJ.js → reset-password-ElmXf_OL.js} +1 -1
  256. package/dist/client/assets/resizable-BAb_Qbk7.js +1 -0
  257. package/dist/client/assets/{resolve-tab-icon-C99S9oDL.js → resolve-tab-icon-iMM8vyOS.js} +1 -1
  258. package/dist/client/assets/{review-settings-Brit3pLv.js → review-settings-HXhptTca.js} +1 -1
  259. package/dist/client/assets/{role-color-Ddqyp0w6.js → role-color-BXXcmodD.js} +1 -1
  260. package/dist/client/assets/roles-PBUgpFvf.js +1 -0
  261. package/dist/client/assets/route-BLavQpKZ.js +1 -0
  262. package/dist/client/assets/route-BfsrelsT.js +1 -0
  263. package/dist/client/assets/route-D6LPIVGu.js +1 -0
  264. package/dist/client/assets/{route-page-header-BeG7kyQP.js → route-page-header-DBxq_gQt.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-Bwhb8cKq.js → sandbox-git-api-DGN8-m6o.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-Dq2ETPAf.js → sandbox-lifecycle-context-Dsl7MNkK.js} +1 -1
  267. package/dist/client/assets/{save-status-BXxefOdA.js → save-status-ClChNGnX.js} +1 -1
  268. package/dist/client/assets/{schema-CI1Jg9rW.js → schema-C0HTL5Tu.js} +1 -1
  269. package/dist/client/assets/{schema-BJIhJXy6.js → schema-Cqzs-QeL.js} +1 -1
  270. package/dist/client/assets/{scroll-area-Dt-NcLdT.js → scroll-area-Bie9g__T.js} +1 -1
  271. package/dist/client/assets/{search-input-BjRiuWL9.js → search-input-BS--Nv9L.js} +1 -1
  272. package/dist/client/assets/{search-toggle-BOD5VZ7W.js → search-toggle-CgF8nJsm.js} +1 -1
  273. package/dist/client/assets/{secret-picker-CHt8ZrjG.js → secret-picker-BNwL5hiQ.js} +1 -1
  274. package/dist/client/assets/{secrets-DGZeS_5r.js → secrets-mEPeiO88.js} +1 -1
  275. package/dist/client/assets/{section-array-field-CYFq6Yfv.js → section-array-field-DvNS_bMu.js} +1 -1
  276. package/dist/client/assets/{sections-DBJ1YFK4.js → sections-eYfT1FTs.js} +1 -1
  277. package/dist/client/assets/sections-editor-CJzqzr9r.js +1 -0
  278. package/dist/client/assets/{select-BXZoshA8.js → select-OIt3OszY.js} +1 -1
  279. package/dist/client/assets/{select-model-Corsllp1.js → select-model-Bn37eZFm.js} +1 -1
  280. package/dist/client/assets/{seo-editor-CG0nowoP.js → seo-editor-DIBtbvVO.js} +1 -1
  281. package/dist/client/assets/{separator-Jij0j-j1.js → separator-CmNxBXQO.js} +1 -1
  282. package/dist/client/assets/{session-runtime-DFmRKpVg.js → session-runtime-C4M0661Q.js} +1 -1
  283. package/dist/client/assets/settings-tab-7gkiYnXk.js +1 -0
  284. package/dist/client/assets/{sheet-DT44IVE2.js → sheet-DjUF157Q.js} +1 -1
  285. package/dist/client/assets/shell-layout-Ck-LcWXa.js +1 -0
  286. package/dist/client/assets/{site-draft-actions-ChPsoqte.js → site-draft-actions-BNe0LgqH.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-CIc7HrWU.js → site-draft-view-DUB-waYG.js} +1 -1
  288. package/dist/client/assets/site-editor-6nVJ09KZ.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-D2nHZREM.js → site-editor-toast-B5ZcohXf.js} +1 -1
  290. package/dist/client/assets/skills-rkxB_As2.js +1 -0
  291. package/dist/client/assets/{slider-DCaB9Ine.js → slider-BYY7RXku.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-CfU7eu9S.js → sortable.esm-BwalEKhk.js} +1 -1
  293. package/dist/client/assets/{sso-BEMT6JJw.js → sso-C9Pa62fe.js} +1 -1
  294. package/dist/client/assets/{suggestion-BO6GNdWk.js → suggestion-CI_CTWom.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-Cu5ZQ2qC.js → super-agent-icon-B9A1_wXh.js} +1 -1
  296. package/dist/client/assets/{switch-CfCCzQdg.js → switch-DacUnlWF.js} +1 -1
  297. package/dist/client/assets/{synced-repos-gHf8sPwV.js → synced-repos-BT9oPWey.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-hPo-Gg9t.js → tab-icon-glyph-ClKMuyIu.js} +1 -1
  299. package/dist/client/assets/{table-BG-lRGNn.js → table-Cm1piWr1.js} +1 -1
  300. package/dist/client/assets/{tabs-DQRKyhjY.js → tabs-DR_a3cy9.js} +1 -1
  301. package/dist/client/assets/{task-board-B-hxKp5U.js → task-board-D8qsFD59.js} +1 -1
  302. package/dist/client/assets/{task-key-DjK7Kw8s.js → task-key-CzsPirbU.js} +1 -1
  303. package/dist/client/assets/{task-route-BwC6Um2K.js → task-route-CMJtH4RR.js} +1 -1
  304. package/dist/client/assets/{task-status-BiZeTmx1.js → task-status-CCkEahz2.js} +1 -1
  305. package/dist/client/assets/taskboard-analytics-BQInccqX.js +1 -0
  306. package/dist/client/assets/{tasks-Dac_YLSj.js → tasks-BwilCZ5E.js} +1 -1
  307. package/dist/client/assets/tasks-Dn1EYgHL.js +1 -0
  308. package/dist/client/assets/{textarea-DAZ3avm9.js → textarea-1IXo7Val.js} +1 -1
  309. package/dist/client/assets/thread-analytics-hUhZXVvR.js +1 -0
  310. package/dist/client/assets/thread-button-D39uEd_8.js +1 -0
  311. package/dist/client/assets/{thread-intent-BtcwbxTJ.js → thread-intent-CSpTLxvv.js} +1 -1
  312. package/dist/client/assets/{thread-route-Ds6Wombz.js → thread-route-BVjT00pZ.js} +1 -1
  313. package/dist/client/assets/thread-route-DaP36Fb6.js +1 -0
  314. package/dist/client/assets/{thread-sheet-body-Kjk5YJ_A.js → thread-sheet-body-DMUg61oD.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-y-R1DMgB.js → time-range-picker-DCFWQQ5w.js} +1 -1
  316. package/dist/client/assets/{toggle-group-BgBCZLaa.js → toggle-group-R442gvym.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-tZKV1bCv.js → tool-set-selector-BCIZdKwr.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-CaY1wsmY.js → toolbar-icon-button-B3baDmWg.js} +1 -1
  319. package/dist/client/assets/{tooltip-CqV-qcYU.js → tooltip-BCI4hJNA.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-5-7GWaNH.js → tooltipContext-DxsRC16N.js} +1 -1
  321. package/dist/client/assets/{track-qijzY7O9.js → track-BZMkb_90.js} +1 -1
  322. package/dist/client/assets/{types-DRaoZ_4I.js → types-nc7fS2ca.js} +1 -1
  323. package/dist/client/assets/{url-slug-CTOX8lQF.js → url-slug-Bzl0GF3m.js} +1 -1
  324. package/dist/client/assets/{usage-stats-BXxRbW0f.js → usage-stats-J0rd59WB.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-DgsrHLV3.js → use-ai-providers-ChBGYw51.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-1S0yfr-w.js → use-api-keys-BW-Dm0vS.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-DK9k5f8X.js → use-apply-named-rule-BB2iRP8e.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-DPw-0Txc.js +1 -0
  329. package/dist/client/assets/{use-automations-lWDVj-CU.js → use-automations-DiaMfc0z.js} +1 -1
  330. package/dist/client/assets/{use-autosave-CQIToQsM.js → use-autosave-DE64FcWz.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-BohhL70d.js +1 -0
  332. package/dist/client/assets/use-blog-view-D71WlL19.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-CS1wv5hl.js → use-chat-layout-state-VfNRqDmO.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-BoXieLUR.js → use-cms-publish-actions-DKyf7Nxr.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-C2Xf2qzV.js → use-connect-companion-Bs6LyV4D.js} +1 -1
  336. package/dist/client/assets/{use-connection-Df8_gpBB.js → use-connection-Brow5sd7.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-DzzCDnXY.js → use-content-sync-BgVUGY9M.js} +1 -1
  338. package/dist/client/assets/{use-copy-CCrC_M79.js → use-copy-DwFFv3pQ.js} +1 -1
  339. package/dist/client/assets/{use-current-view-B5rf1h54.js → use-current-view-CTapdPbK.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-Csnyj6_G.js → use-date-fns-locale-Dh0XY21H.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-BNJwBoKC.js → use-debounced-autosave-BEEO-91f.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-DFWDa0qH.js → use-debounced-value-CSJINZGW.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-CuB-vVK3.js → use-deco-credits-C1prb4M3.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-B7ke0MhO.js → use-decopilot-events-CUcqrlrN.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-ZPB3I9Ns.js → use-delete-block-FlSG7wJB.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-Zvzh2eht.js → use-delete-connection-BMlBXcGH.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-B4GqO2uv.js → use-deployment-admin-CR1e7wMq.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-CQZj5lkl.js → use-entitlements-6Hl7XUeQ.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-DYyM21UT.js → use-fast-preview-draft-url-qyW2jTtk.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-CyAC1Jn2.js → use-file-configs-Yqvq1uqv.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-CE2G3E6f.js → use-id-selection-HM6EVJM1.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-CRUM5hPE.js → use-in-settings-giDN7jOV.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-uWC2MWJH.js → use-inbox-feed-DAlFh8sQ.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-Cz_t92ww.js → use-infinite-scroll-yX_ymd0P.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-CS1fqgjk.js → use-join-requests-MAVQ9NWP.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-DwCoiX2k.js → use-main-panel-tabs-vcVvvxJY.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-CyjIfVIk.js → use-mcp-auth-status-CS69ZhB_.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-HASDr5yn.js → use-mcp-client-BVUIAr8_.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-CEtDj9VE.js → use-mcp-prompts-ChhyOrtn.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-CLfN0BYV.js → use-mcp-tools-B8_dWoBg.js} +1 -1
  361. package/dist/client/assets/{use-mobile-UoyYEGbQ.js → use-mobile-Cphz6oNl.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-CFb10aGP.js → use-move-blocks-KJ-Ie5XB.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-C4y9eC4A.js → use-navigate-to-agent-DGH6rBV1.js} +1 -1
  364. package/dist/client/assets/use-never-published-XuGsKAjg.js +1 -0
  365. package/dist/client/assets/{use-org-fs-BAgR3Jkh.js → use-org-fs-BaPrb2On.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-DQ7N3XWA.js → use-org-notice-cmfRg5TO.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-C556S9To.js → use-org-repo-syncs-DAkzT2X5.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-DrDj5K7f.js → use-org-sso-DPnB7gu8.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-BliP9B1t.js → use-organization-settings-C1xF80A6.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-db4k7dl4.js → use-panel-navigate-F68B_PSv.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-DPg5UqE1.js → use-project-native-view-presence-CEAgriR2.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-CFftAYVY.js → use-project-scope-DGVSYzGX.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-CS-hhWwQ.js → use-recent-apps-cPc2NJeH.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-CYymDS51.js → use-reports-diagnostic-BL-qCSEZ.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events-rgvK0R-0.js → use-sandbox-events-CoJuc1qT.js} +1 -1
  376. package/dist/client/assets/{use-secrets-Y_pjIaUL.js → use-secrets-CIw5wSGf.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-Bkq2jdsn.js → use-section-preview-base-DQamnk8d.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-BtrwP1AE.js → use-sidebar-collapsed-_2hylrFL.js} +1 -1
  379. package/dist/client/assets/{use-tags-CFlTqeDj.js → use-tags-M8rZH8UV.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-Bm2Eiqvn.js → use-task-board-analytics-GkJYhpVp.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-BCP6vVwh.js → use-task-board-item-prs-B8LyEjwN.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-CQPrgy8Z.js → use-task-board-items-0gZ0PkOh.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-CywAfsLX.js → use-task-board-prompts-qWQIt1vn.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-BIpPNwtn.js → use-task-metadata-LnH6agOS.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-BMHx59-u.js → use-thread-outputs-BakwC9lZ.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-DkapSxnZ.js → use-view-draft-kind-DceD82iW.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-DyQL3diM.js → use-voice-input-DzDpRS7B.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-BdHidzNH.js +1 -0
  389. package/dist/client/assets/{useQueries-Bay3GQsV.js → useQueries-Do5qUwdK.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-ByhMyjUR.js +1 -0
  391. package/dist/client/assets/{users-DTrW9ZIm.js → users-D6JfMMin.js} +1 -1
  392. package/dist/client/assets/{utils-D1ABa-c2.js → utils-CDA5cdNx.js} +1 -1
  393. package/dist/client/assets/variant-calendar-B--0Jte1.js +1 -0
  394. package/dist/client/assets/{variant-matcher-override-y-sjVy0V.js → variant-matcher-override-DKyUcq8Q.js} +1 -1
  395. package/dist/client/assets/{view-header-CJ8vxIod.js → view-header-T__B-aVz.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-m1o-7tiO.js → virtual-mcp-CF64TXLK.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-gEMXX-QL.js → watch-sse-pool-BC911AXE.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/server.js +129 -129
  400. package/package.json +1 -1
  401. package/dist/client/assets/Minimize01-BIynG3Ze.js +0 -1
  402. package/dist/client/assets/agent-app-Ba7JDwY6.js +0 -1
  403. package/dist/client/assets/agent-assets-DlGJDJr0.js +0 -1
  404. package/dist/client/assets/agent-automations-DHP9-Rvp.js +0 -1
  405. package/dist/client/assets/agent-blog-MchyO8b5.js +0 -2
  406. package/dist/client/assets/agent-blog-post-DUN7iPWt.js +0 -2
  407. package/dist/client/assets/agent-calendar-De-Im46e.js +0 -1
  408. package/dist/client/assets/agent-connect-sources-DkfqQk5b.js +0 -1
  409. package/dist/client/assets/agent-deck-Cx2e4txV.js +0 -1
  410. package/dist/client/assets/agent-e2e-cuAg7vvT.js +0 -1
  411. package/dist/client/assets/agent-experiments-CKleoVAf.js +0 -1
  412. package/dist/client/assets/agent-file-BrkmoibI.js +0 -1
  413. package/dist/client/assets/agent-hosting-D__8hPs9.js +0 -1
  414. package/dist/client/assets/agent-icon-Bq_Z7esB.js +0 -1
  415. package/dist/client/assets/agent-library-BfblIp1v.js +0 -1
  416. package/dist/client/assets/agent-library-file-C7p2ZAks.js +0 -1
  417. package/dist/client/assets/agent-overview-NZBYrRRV.js +0 -1
  418. package/dist/client/assets/agent-settings-iY554avh.js +0 -1
  419. package/dist/client/assets/agent-site-editor-code-CaQ191md.js +0 -2
  420. package/dist/client/assets/agent-site-editor-content-4-gXvHBG.js +0 -1
  421. package/dist/client/assets/agent-site-editor-preview-BE075svj.js +0 -1
  422. package/dist/client/assets/agent-view-D12VaGvy.js +0 -1
  423. package/dist/client/assets/api-keys-CQkJKCWp.js +0 -1
  424. package/dist/client/assets/app-editor-CPq25Dfa.js +0 -1
  425. package/dist/client/assets/asset-utils-C_CFQkKi.js +0 -1
  426. package/dist/client/assets/automations-DhtUKYcW.js +0 -1
  427. package/dist/client/assets/category-editor-Jfh1FEbD.js +0 -1
  428. package/dist/client/assets/choose-editor-C_rrZDqX.js +0 -1
  429. package/dist/client/assets/cms-settings-editor-agl-pdfk.js +0 -1
  430. package/dist/client/assets/collection-detail-BX7pAFmI.js +0 -1
  431. package/dist/client/assets/connection-detail-B2bDZqoS.js +0 -1
  432. package/dist/client/assets/connections-osURCVgm.js +0 -1
  433. package/dist/client/assets/context-SebnQ-fG.js +0 -1
  434. package/dist/client/assets/discover-4UiUWkTa.js +0 -1
  435. package/dist/client/assets/file-explorer-Berv-DjA.js +0 -2
  436. package/dist/client/assets/home-D5e51VDk.js +0 -1
  437. package/dist/client/assets/index-Cu5PtngA.js +0 -4
  438. package/dist/client/assets/index-DVC5Xh86.js +0 -1
  439. package/dist/client/assets/library-OBxcrPA6.js +0 -1
  440. package/dist/client/assets/openai-conversation-BAjqwRPV.js +0 -3
  441. package/dist/client/assets/plan-vHZHG0_E.js +0 -1
  442. package/dist/client/assets/post-calendar-DzBDM3b2.js +0 -1
  443. package/dist/client/assets/preview-content-MbQf8RGA.js +0 -1
  444. package/dist/client/assets/project-app-view-gJDZKZ8F.js +0 -1
  445. package/dist/client/assets/project-reports-DFICoZ3P.js +0 -1
  446. package/dist/client/assets/project-tasks-DHsoMFaC.js +0 -1
  447. package/dist/client/assets/projects-Cm9td8_E.js +0 -1
  448. package/dist/client/assets/record-editor-BaN-J3uT.js +0 -1
  449. package/dist/client/assets/redirect-editor-Dk4GjAcP.js +0 -1
  450. package/dist/client/assets/reports-BjhUDxT0.js +0 -1
  451. package/dist/client/assets/reports-onboarding-DlCteX2-.js +0 -1
  452. package/dist/client/assets/repositories-CpGjSRVu.js +0 -1
  453. package/dist/client/assets/resizable-BArMfXUk.js +0 -1
  454. package/dist/client/assets/roles-C9wYF2gv.js +0 -1
  455. package/dist/client/assets/route-Bhee4AVm.js +0 -1
  456. package/dist/client/assets/route-C0X_ekZH.js +0 -1
  457. package/dist/client/assets/route-cMh_8Xc3.js +0 -1
  458. package/dist/client/assets/sections-editor--Z8msN1o.js +0 -1
  459. package/dist/client/assets/settings-tab-PpyKi5jL.js +0 -1
  460. package/dist/client/assets/shell-layout-CQs-sSUy.js +0 -1
  461. package/dist/client/assets/site-editor-89VkH7GW.js +0 -1
  462. package/dist/client/assets/skills-CgUWJjrb.js +0 -1
  463. package/dist/client/assets/taskboard-analytics-C1hsIKyF.js +0 -1
  464. package/dist/client/assets/tasks-Cvrxb3RD.js +0 -1
  465. package/dist/client/assets/thread-analytics-DGVyUEMu.js +0 -1
  466. package/dist/client/assets/thread-button-Dy4pRky4.js +0 -1
  467. package/dist/client/assets/thread-route-BKnIUDl3.js +0 -1
  468. package/dist/client/assets/use-ask-in-chat-CC9ew9W1.js +0 -1
  469. package/dist/client/assets/use-blocks-v8-project-DwTQhXO1.js +0 -1
  470. package/dist/client/assets/use-blog-view-9w6CHFwT.js +0 -1
  471. package/dist/client/assets/use-never-published-D71BtZNY.js +0 -1
  472. package/dist/client/assets/useInfiniteQuery-D5Avp4ip.js +0 -1
  473. package/dist/client/assets/useSuspenseInfiniteQuery-BlIdZ7Pt.js +0 -1
  474. package/dist/client/assets/variant-calendar-CK1882s5.js +0 -1
@@ -1 +0,0 @@
1
- import{i8 as ei,bp as ti,c as wn,b as jn,r as b,m as le,j as r,c8 as ni,bm as Cs,i9 as Mo,B as It,Y as on,au as si,_ as ri,bo as oi,Z as ai,q as ii,hF as li,ia as ci,ib as ui,h as di,bq as wt,ic as Jr,id as bs,ie as fi,ig as pt,ih as Qr,ii as mi,fQ as pi,ij as hi,ik as Yr,il as gi,t as H,fu as Zr,im as vi,io as Bt,ip as yi,iq as Si,ir as bi,fi as Xr,is as xs,it as xi,iu as _i,iv as ki,ff as wi,fR as ji,iw as Ri,ix as Ei,ft as Vi,K as Ti,iy as eo,eM as Ai,fJ as Hn,fO as to,iz as no,iA as Ni,iB as Ci,iC as Pi,iD as _s,iE as Bi,iF as Ki,iG as Mi,iH as so,iI as Di,iJ as Fi,fh as ro,iK as Ii,iL as Li,fL as oo,iM as Oi,fd as zi}from"./index-BfWp2Wnw.js";import{u as $i}from"./chat-context-BUMEnIPW.js";import{a as Xn,M as ao}from"./save-status-BXxefOdA.js";import{p as kn,f as Wi,n as Hi}from"./parse-sections--l6s_VwH.js";import{a as qi}from"./repository-binding-BDu0tU0n.js";import{t as Gi}from"./ChevronDown-CNlehUMA.js";import{d as Do,b as Ui}from"./UserCheck01-4mEtfdkD.js";import{n as Ji}from"./ChevronUp-BIaMfxq-.js";import{b as Zn,e as Qi,P as io,K as lo}from"./agent-icon-Bq_Z7esB.js";import{S as an}from"./scroll-area-Dt-NcLdT.js";import{c as jt,T as Rt,a as Et}from"./tooltip-CqV-qcYU.js";import{h as Yi,i as Zi,j as Xi,E as el,k as tl,V as nl,l as sl,m as rl,G as ol,s as Jn,v as Qn,p as Fo,n as al,o as il,a as co,q as ll,u as cl,A as qn,P as uo,w as fo,x as mo,y as ks,z as ul,B as dl,D as po,F as fl,J as ho,K as go,L as vo,M as ml,Q as yo,c as pl,T as ln,U as hl,W as gl}from"./held-block-view-BCDffeao.js";import{j as vl,u as yl,i as Sl,v as bl,aD as xl,U as _l,k as So,aU as bo,a9 as Kt,aa as Mt,aq as kl,aV as wl,aW as jl,aO as xo,at as Rl,aA as El}from"./site-editor-toast-D2nHZREM.js";import{u as Vl,ao as _o,e as ko,j as Tl,z as Al,y as Gn,ad as Nl,ae as Cl,aj as Pl}from"./blocks-tab-states-Bx0tgd5u.js";import{u as Bl}from"./use-delete-block-ZPB3I9Ns.js";import{b as Kl,u as Ml,k as Un,e as xn}from"./use-never-published-D71BtZNY.js";import{a as Es,e as Io}from"./UserSquare-oo1b4ulW.js";import{c as Dl}from"./Minimize01-BIynG3Ze.js";import{i as wo}from"./Tool01-Bscrvuft.js";import{s as jo}from"./Eye-Xo5rS9iJ.js";import{s as Fl}from"./Plus-DAYIm6ow.js";import{s as Il}from"./Trash01-CevYpZEM.js";import{i as Vs}from"./Zap-C-VVHO-P.js";import{u as Ll,a as Ro,n as Ol,P as zl,o as $l,C as Wl,D as Hl,c as ql}from"./task-key-DjK7Kw8s.js";import{u as Gl,s as Ul,a as Yn,S as Jl,v as Ql}from"./sortable.esm-CfU7eu9S.js";import{s as Yl,g as Zl,u as Xl,A as ec}from"./use-section-preview-base-Bkq2jdsn.js";import{m as tc,P as nc}from"./mustache-DsBc8nE5.js";import{r as Eo,u as sc,a as rc,i as oc,f as ac,B as ic}from"./empty-message-BFHsH7_h.js";import{u as lc,a as cc,P as Vo,w as uc,b as dc}from"./seo-editor-CG0nowoP.js";import{v as fc,k as ws,x as To,j as mc,y as pc}from"./named-rule-step-C6gSKxIZ.js";import{u as hc}from"./use-apply-named-rule-DK9k5f8X.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as gc,n as Ut,r as js,m as Dt,k as _n,b as vc,s as Ao,z as yc,A as Sc,B as bc}from"./section-array-field-CYFq6Yfv.js";import{b as No,a as xc}from"./variant-matcher-override-y-sjVy0V.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./use-organization-settings-BliP9B1t.js";import"./schema-BJIhJXy6.js";import"./task-board-B-hxKp5U.js";import"./thread-intent-BtcwbxTJ.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-gEMXX-QL.js";import"./session-runtime-DFmRKpVg.js";import"./use-entitlements-CQZj5lkl.js";import"./use-ai-providers-DgsrHLV3.js";import"./use-current-view-B5rf1h54.js";import"./use-in-settings-CRUM5hPE.js";import"./use-decopilot-events-B7ke0MhO.js";import"./Image01-C5Xqhwp5.js";import"./Upload01-C_8HEOMT.js";import"./label-CWaQ3ANC.js";import"./SwitchHorizontal01-qTGCOGX6.js";import"./popover-oFcDtUvN.js";import"./switch-CfCCzQdg.js";import"./toggle-group-BgBCZLaa.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-CyAC1Jn2.js";import"./asset-utils-C_CFQkKi.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./AlertCircle-mj0sz0gj.js";import"./hosted-reconcile-BV7FtBoJ.js";import"./SearchMd-CTSUPag9.js";import"./textarea-DAZ3avm9.js";import"./use-copy-CCrC_M79.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./Play-zsnTCnBK.js";import"./monaco-editor-BJmxWrxj.js";import"./editor-DJNkhCaU.js";import"./ArrowUp-D2bbOB2w.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./CheckCircle-BsBF4S8u.js";import"./TrendUp01-DMf7H3tv.js";import"./LinkBroken01-CxV1rDqL.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./Key01-h9Y3uaT_.js";import"./LayoutLeft-CPMSR00X.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Users01-av_p4B03.js";import"./XClose-WYCPZpkD.js";import"./index-BdQq_4o_.js";import"./index-CvQo8gKP.js";import"./utils-D1ABa-c2.js";import"./calendar-B0VrIuVV.js";import"./usage-stats-BXxRbW0f.js";import"./utils-CVEq3hMx.js";import"./markdown-NetMLX1B.js";import"./use-mobile-UoyYEGbQ.js";import"./gateway-client-CuVQGtSK.js";import"./form-CE_i7Gc_.js";import"./select-BXZoshA8.js";import"./editor-classes-D6VscvFm.js";import"./combobox-CMR7JQ5s.js";import"./use-sandbox-events-rgvK0R-0.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-DwTQhXO1.js";import"./use-voice-input-DyQL3diM.js";import"./drawer-BtNmmbgW.js";import"./index-BFZAeRbT.js";import"./checkbox-BUvWR-iD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-Bwhb8cKq.js";import"./empty-state-Y9RPHES1.js";import"./search-input-BjRiuWL9.js";import"./tabs-DQRKyhjY.js";import"./use-debounced-value-DFWDa0qH.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-B9IOPXjq.js";import"./collapsible-DYCInqz3.js";import"./use-task-board-items-CQPrgy8Z.js";import"./config-CVrGKu1z.js";import"./task-route-BwC6Um2K.js";import"./project-index-COi5kduS.js";import"./shell-layout-CQs-sSUy.js";import"./use-deployment-admin-B4GqO2uv.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DQ7N3XWA.js";import"./integration-icon-C4zzzxaS.js";import"./project-icon-WyFXKdgN.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./new-project-dialog-B6Lwo0Gj.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./collection-search-CMlKHTQ0.js";import"./new-project-store-DQsI7Up8.js";import"./legacy-admin-welcome-dialog-BnEG9TvC.js";import"./required-auth-layout-ZTLOobSH.js";import"./use-org-sso-DrDj5K7f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-OOnse3pT.js";import"./types-DRaoZ_4I.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-DT44IVE2.js";import"./use-connection-Df8_gpBB.js";import"./use-mcp-prompts-CEtDj9VE.js";import"./use-thread-outputs-BMHx59-u.js";import"./file-type-icon-Bw6tHUJI.js";import"./slider-DCaB9Ine.js";import"./index-DvdlZugw.js";import"./tooltipContext-5-7GWaNH.js";import"./CategoricalChart-_BlSk5IS.js";import"./index-BBKDsc5X.js";import"./use-move-blocks-CFb10aGP.js";const _c={escape:Yi};function kc(v,e){for(const p of Yl(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function wc(v,e){if(!e)return;const p=ei(v,ti(e));if(p)try{const S=kc(p.resolveType,e);return S&&tc.render(S,p.data,{},_c).trim()||void 0}catch{return}}function jc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(Rt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(jt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Rc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Co(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Lo(v){return v.map((e,p)=>({...e,index:p}))}function Ec(v,e){if(e===v.length)return v;if(e<v.length)return Lo(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function Oo(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=jn(),_=Xn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?Zl(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?wc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=sl(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Zn:k?Do:Io;let G;e[16]!==k||e[17]!==P?(G=P?{color:oi}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=G):G=e[18];const _e=G;let I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(ol,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(Dl,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(jc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(ao,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(ao,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Vc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Tc="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function zo(v,e,p){if(p)return rl({selected:e});const S=v.isSavedBlock===!0,x=v.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":S?Vc:x?Tc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rs(v,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Ac(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=jn(),c=Xn(),xe=S?Cs(S.__resolveType??""):!1,G=p.isHidden===!0,_e=xe||G;let I;e[0]!==p?(I=Mo(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Pc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=Gl(Oe);let Pe;e[4]!==ze?(Pe=Wl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let de;e[6]!==Pe||e[7]!==st?(de={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=de):de=e[8];const g=de;let we;e[9]!==p?(we=Xi(p),e[9]=p,e[10]=we):we=e[10];const rt=we,ot="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=le("touch-none transition-colors",Xe,zo(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(Oo,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Qe):Qe=e[22];const W=!c&&d&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(Rs(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Cc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),at=c?r.jsx(el,{label:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:G,onToggle:Ue,children:G?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})}):r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(Rs(_e,G)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Nc,children:G?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=ri,Ye=tl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(Rs(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let $e;e[25]!==Ye||e[26]!==ve||e[27]!==it?($e=r.jsx(Ye,{label:ve,classicClassName:it}),e[25]=Ye,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(on,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(si,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=F=>{F.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Qi,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Y;e[38]!==w?(Y=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Y):Y=e[39];let ee;e[40]!==Ke||e[41]!==Y?(ee=r.jsxs(on,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let D;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(D=ke&&r.jsxs(on,{className:le(!c&&nl),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Do,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=D):D=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(on,{className:le(!c&&Rc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Zn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let me;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(me=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(on,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Io,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=me):me=e[58];let We;e[59]!==k?(We=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=We):We=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Il,{className:"h-4 w-4"}),e[61]=et):et=e[61];let Me;e[62]!==w?(Me=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=Me):Me=e[63];let $;e[64]!==We||e[65]!==Me?($=r.jsxs(on,{variant:"destructive",onClick:We,children:[et,Me]}),e[64]=We,e[65]=Me,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==D||e[70]!==T||e[71]!==me||e[72]!==$?(ie=r.jsxs(ai,{align:"end",className:"w-44",children:[Be,ee,D,T,me,$]}),e[67]=Be,e[68]=ee,e[69]=D,e[70]=T,e[71]=me,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==fe||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(fe,{children:[$e,ie]}),e[74]=fe,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==g||e[83]!==A||e[84]!==Qe||e[85]!==W||e[86]!==at||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:X,style:g,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Qe,W,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=g,e[83]=A,e[84]=Qe,e[85]=W,e[86]=at,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Nc(v){return v.stopPropagation()}function Cc(v){return v.stopPropagation()}function Pc(){return!1}function Ns(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=jn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Fl,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Bc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,G=xe===void 0?!0:xe,_e=jn(),I=Xn();let ke;e[0]!==x.length?(ke=()=>Co(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Co(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Ec(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:Ul},e[3]=g):g=e[3];const we=Ll(Ro(zl,de),Ro(Ol,g));let rt;e[4]!==d?(rt=d.map(Kc),e[4]=d,e[5]=rt):rt=e[5];const ot=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Xe;e[7]!==ot||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const He=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));He===-1||ht===-1||(Oe(bt=>Lo(Yn([...bt],He,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(He,ht))},e[7]=ot,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const W=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,We;if(e[11]!==u||e[12]!==G||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){me=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==G||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Ye=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let He;e[61]!==Ae?(He=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=He):He=e[62];const ht=He;let bt;e[63]!==G||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm"})]}),e[63]=G,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],me=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=G,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Ye,e[57]=ve,e[58]=T}else Ye=e[56],ve=e[57],T=e[58];fe=Hl,Ke=we,se=ql,Y=L,ee=A,D=W,at=Jl,$e=ot,Be=Ql,We="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Ac,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=G,e[13]=I,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=at,e[34]=fe,e[35]=Ye,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=Ke,e[41]=se,e[42]=Y,e[43]=ee,e[44]=D,e[45]=T,e[46]=me,e[47]=We}else at=e[33],fe=e[34],Ye=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],Ke=e[40],se=e[41],Y=e[42],ee=e[43],D=e[44],T=e[45],me=e[46],We=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==We?(et=r.jsx("div",{className:We,children:it}),e[68]=it,e[69]=We,e[70]=et):et=e[70];let Me;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(Me=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=Me):Me=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",zo(ve,!1,I)),children:r.jsx(Oo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=ni.createPortal(r.jsx($l,{dropAnimation:Zi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==fe||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==D||e[90]!==Me||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[Me,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=Me,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==G||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=G,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Kc(v){return v.id}function Mc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Ts(v,p,S)}:{kind:"noop"};const V=As(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Qn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Po="section-form-stale-save",Dc=3;function Bo(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Ko=new WeakMap;let Fc=0;function Ic(v){let e=Ko.get(v);return e===void 0&&(e=++Fc,Ko.set(v,e)),e}function Of({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=jn(),xe=$i(),G=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=vl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Vl(_e),X=Xn(),ze=xe?.virtualMcpId,Pe=qi(ze===e?e:null)?.metadata?.siteSlug??null,st=Xl({virtualMcpId:e,branch:p,sandboxUrl:x}),de=yl(e,p),g=Sl(de),we=Vi(g),rt=!g,ot=!!st||g,[m,L]=b.useState(null),[Xe,A]=b.useState(null),[Qe,W]=b.useState(null),[at,fe]=b.useState(0),[Ye,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[Ke,se]=b.useState(null),[Y,ee]=b.useState(null),[D,T]=b.useState([]),me=b.useRef(null),[We,et]=b.useState(D.length);We!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Me,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,He]=b.useState(!1),[ht,bt]=b.useState(!1),Rn=b.useRef(null),[En,$o]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[je,un]=b.useState(Z),[Ps,Bs]=b.useState(Z);Z&&!Ps&&(Bs(!0),un(!0),L(null),A(null),W(null),T([])),!Z&&Ps&&Bs(!1);const[Wo,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ms,Ot]=b.useState([]),[Ds,Yt]=b.useState(0),[De,lt]=b.useState(0),[Ho,Fe]=b.useState(null),[Zt,qe]=b.useState(null),[Fs,Is]=b.useState(null),Nn=ii(),Cn=bl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Kl({orgSlug:v,virtualMcpId:e,branch:p}),[qo,Go]=b.useState(V),[Uo,Jo]=b.useState(C),[Qo,Yo]=b.useState(_);(qo!==V||Uo!==C||Qo!==_)&&(queueMicrotask(()=>fn.flush()),Go(V),Jo(C),Yo(_),L(null),A(null),W(null),fe(0),se(null),ee(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const B=Ml({orgSlug:v,virtualMcpId:e,branch:p}),mn=pl(t=>{B.mutate(t,{onSuccess:()=>k?.(),onError:B.reportError})},d??{},B.v8),Pn=Bl({orgSlug:v,virtualMcpId:e,branch:p}),Ls=hc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);xl(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:o,selectedSectionIndex:a}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,a]){const f=l==null?void 0:s[l],R=l==null?void 0:o[l],h=f&&R?.isSavedBlock?_s(f,R):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Zo,Xo]=b.useState(0),$s=li(de,{orgSlug:v,virtualMcpId:e,branch:p}),Ws=ci($s,I[0]?.blockKey??null,ui(d,I[0]?.blockKey??null)),[ea,ta]=b.useState(null),ts=_l(v,e).epoch,[na,sa]=b.useState(ts);lc(je?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Hs=_??(d&&u?_o(ko(d,u),V,C)?.key??null:null),ns=So({orgSlug:v,virtualMcpId:e,branch:p},Hs?[Hs]:[],{withRefs:!0}),[qs,ra]=b.useState(!1),ss=So({orgSlug:v,virtualMcpId:e,branch:p},qs?Tl:[]),Gs={ready:!(de.kind==="protocol"&&de.hosted)||qs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>ra(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(di,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const oa=ko(d,u),q=!!_,oe=q?null:_o(oa,V,C),y=q?_:oe?.key??null,rs=q&&_?d[_]:void 0,Us=q&&_&&rs?Al(_,rs):q&&_?_:"",nn=!q&&y&&d[y]?d[y]:null,os=je&&d&&u&&y&&oe?Eo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,aa=je?nn?.seo:void 0,Kn=Ks!==void 0?Ks:aa,ia=je?sc(Kn):void 0,Js=os?.seoTypeOptions??[],Qs=je&&u?rc(u):"",as=Wo??ia??{},Mn=je&&os?cc(as,os):null,Ys=je&&Mn&&oc(Kn)?Gn(Mn,u):null,Zs=je?ac(d,u)?.seoData:void 0,pe=q?[{label:"Default",sections:[{__resolveType:_}]}]:Fo(nn?.sections,d??{},g),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],K=Se?.sections??[],ce=kn(K,d,g),Dn=!q&&gc(nn?.sections,g);if(q&&_&&Fs!==_){Is(_);const t=K[0],n=ce[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),W(s.resolveType),qe(null),Fe(null))}}!q&&Fs!==null&&Is(null),re.current={rawSections:K,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:De,selectedSectionIndex:m};const la=()=>({multivariate:Dn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:g&&Dn&&Ai(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Dn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=g?bo(y,s):No(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Dn&&yt&&!Oe&&!Ee?y:null;if(ls!==ea&&(ta(ls),ls)){const t=pe.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const o=la(),a=g?bo(y,o):No(y,o,d,u);if(!t||n<0){w(a.length>0?a:null);return}const i={pageKey:y,page:o,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?wl(i):xc({...i,decofile:d,meta:u}),f=g?jl(a,l):[...a,...l];w(f.length>0?f:null)},xt=(t,n,s,o=m??-1,a=!1)=>{const i=pt(t,n);if(!i){A(null),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const f=Qr(i,we)[s];if(!f){A(null),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const R=hi(f.value,d);A(R?.data??null),W(R?.resolveType??null);const{resolveType:h,formValue:j}=Ut(f.rule,d,u??void 0);qe(h),Fe(j),a&&$t(i,o,s)},cs=t=>{F(null),fe(t),L(null),A(null),W(null),T([]);const n=pe[t]?.rule,{resolveType:s,formValue:o}=Ut(n,d??{},u??void 0);ee(s),se(o),is(pe.map(a=>({rule:a.rule})),t)},ca=(t,n)=>{const s=K[t],o=ce[t];if(!s||!o)return!1;const a=o.isMultivariate?pt(s,o)?.variants?.length??0:0,i=n<a?n:0;if(L(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,g);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),qe(null),Fe(null)}return!0},Xs=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof Xs=="number"&&ca(Xs,0)),ts!==na){sa(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||B.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=K[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)L(null),A(null),W(null);else if(o.isMultivariate)xt(s,o,De,m);else{const a=wt(s,o,d,g);A(a?.data??null),W(a?.resolveType??null)}}!t&&je&&(dn(null),An(void 0),Yt(s=>s+1))}if(Os!==Zo){Xo(Os);const t=m!==null?K[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,De,m);else{const s=wt(t,n,d,g);A(s?.data??null),W(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Bo(d,n,g),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?bs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,g):null,i=fi(ut,a,l=>Yr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Fn=Qe&&u?Gn(Qe,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=ln(d,y,t,te,pe);B.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),B.reportError(o)}})},Wt=()=>{Ce?.(null),L(null),Tn(!1),A(null),W(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1)},er=()=>Jr(me.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,H.error(t,{id:Po}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=de.kind==="protocol"&&de.source==="github",rr=t=>El(Nn,Cn,t,de.kind==="protocol"?de:null),or=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},ua=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:o}=re.current,a=zt.current;return{formBase:a?.sectionIndex===t&&a.variantIndex===o?a:null,pageKey:n,global:q,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},da=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),o=s>=0?n[s]:void 0,a=o?n.with(s,{...t,choices:no(o.plan,o.choices,t.plan),fresh:Ii(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Hn(o.plan.theirs)!==Hn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ar=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Hn(a.plan.mine)===Hn(n))return!0;const i=to({...a.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==a);return vn(l),!1}return vn(s.with(o,{...a,plan:i,choices:no(a.plan,a.choices,i)})),!0},fa=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},ma=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const o=n.emitted;return o&&typeof o=="object"&&!ar(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},pa=()=>{const t=ct.current[0],n=ma();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=ji(n.plan,n.choices);de.kind==="protocol"&&de.source==="github"&&Ri(n.plan,n.choices)&&kl(c,!1),vn(ct.current.slice(1));const{formBase:o,target:a}=n;o.base=n.plan.theirs,o.version=void 0,o.emitted=s,es.current.add(o),(zt.current===o||fa(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ha=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??ua(n),l=i.sectionVariantIndex,f=i.formBase,R=a||eo(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const j=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(j,E);return}const M=typeof t=="function"?t():t,z=eo(ct.current,f,i,n,g).base;if(z&&ar(z,M))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Bo(ne,i,g),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const Ge=f?.base,Ze=bs(he,ue,l,ne,g),Nt=!!Ge&&!!Ze&&Ni(Ge,Ze)&&!(f&&Yr(f,Ze));if(Nt&&Ge&&Ze){if(Ci(Ge,Ze)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Pi(Ge,J.map((ae,mt)=>bs(ae,Ne[mt],l,ne,g)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&L(U),yn(M,U,s,i);return}}const Ct=Nt&&Ge&&Ze?to({ancestor:Ge,mine:M,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,da({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Bi(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?_s(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??M,qr=Ki({merged:!!Pt,tracked:f,current:zt.current,saved:M});Pt&&H.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),qr&&f&&(f.emitted=Pt,A(Pt));const Ss=qr||!Pt?rn:M;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const Gr={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&Ge&&(f.base=Ge),U instanceof Rl){if(f&&(f.version=void 0),s<Dc){ye.current.delete(j),hn.current=!0;const ae=Li(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:M},n,s+1,i,ae.immediate),ye.current.delete(j),or(xn(g))},ae.delay)}else us();return}B.reportError(U)}},Ur=U=>{pn.current=!0;let ae=!1;B.mutateAsync(U).then(()=>Gr.onSuccess(),mt=>{ae=!0,Gr.onError(mt)}).finally(()=>{pn.current=!1,or(ae?xn(g):0),tr()})};if(ue.isSavedBlock){const U=_s(he,ue);if(!U)return;Ur({blockKey:U,data:rn,...Ge?{base:{value:Di({startedFrom:Ge,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:so({formBase:f,rebased:!!Pt,versionOf:rr,productionVersionOf:ae=>oo(Nn,Cn,ae),...sr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Wn={...ne[Ie]},Gt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Fi(U,l,rn);Gt[n]=Bt(he,ue,ae)}else if(ue.isHidden){const U=Cs(he.__resolveType),ae=U?{...he.section}:{...he},mt=Array.isArray(ae.variants)?[...ae.variants]:[];mt[0]&&(mt[0]=ro(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?Gt[n]={...he,section:ae}:Gt[n]=ae}else ue.isLazy?Gt[n]={...he,section:rn}:Gt[n]=rn;if(Q.length>1){const U=Wn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=ro(U?.__resolveType,ae[be],Gt)),Wn.sections={...U,variants:ae}}else Wn.sections=Gt;Ur({blockKey:Ie,data:Wn,rebaseOnConflict:!1,guard:so({formBase:null,rebased:!1,versionOf:rr,productionVersionOf:U=>oo(Nn,Cn,U),...sr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},R){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(g))},ga=t=>{tn.current=!1,L(t),lt(0),T([]),$(a=>a+1);const n=K[t],s=ce[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const o=wt(n,s,d,g);if(!o){A(null),W(null),qe(null),Fe(null),$t(null,t,0);return}A(o.data),W(o.resolveType),qe(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=Ei(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!oe)return;const n={kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},s=Eo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ti.decofile(Cn))?.[y];if(!o||typeof o!="object"||o===null||Array.isArray(o))return null;const a={...o,...Bn.current};return Bn.current={},t?.raw!==void 0?uc(a,t.raw,u):t?.inner!==void 0?dc(n,s,a,t.inner):a})},lr=(t,n)=>{y&&(Bn.current[t]=n,ds())},va=(t,n)=>{if(!y)return;const s=Yn([...K],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},ya=t=>{if(!y)return;const n=K.filter((s,o)=>o!==t);m===t?Wt():m!==null&&m>t&&L(m-1),dt(n)},Sa=t=>{if(!y)return;const n=K[t];if(!n)return;const s=[...K];s.splice(t+1,0,hl(n)),m!==null&&m>t&&L(m+1),dt(s)},ba=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?_i(n,g):ki(n,u);if(!o)return;const a=[...K];a[t]=o,m===t&&Wt(),dt(a)},xa=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=xi(n);if(!o)return;const a=[...K];a[t]=o,m===t&&Wt(),dt(a)},_a=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,g);if(!o?.data)return;const{name:a,...i}=o.data,l=[...K];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Wt(),dt(l)},ka=t=>{if(!y)return;const n=Hi(ce),s=[...K.slice(0,n),{__resolveType:t.resolveType},...K.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Wt()}}),He(!1),L(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,g)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,g);if(!i){A(null),W(null),qe(null),Fe(null);return}A(i.data),W(i.resolveType),qe(null),Fe(null)},cr=t=>{Rn.current=t.append,He(!0)},wa=t=>{const n=Rn.current;if(!n){ka(t);return}n({__resolveType:t.resolveType}),He(!1),Rn.current=null},ur=t=>{if(m===null)return;const n=K[m],s=ce[m];!n||!s?.isMultivariate||(lt(t),T([]),$(o=>o+1),xt(n,s,t,m,!0))},ja=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=Si(o,t);if(!a){H.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...K];i[m]=Bt(n,s,a);const l=a.variants;let f=De;t===De?f=Math.min(t,l.length-1):t<De&&(f=De-1),lt(f),T([]),$(R=>R+1),xt(i[m],s,f),dt(i)},Ra=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t,g),i=[...K];i[m]=Bt(n,s,a);const l=Xr(o.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},Ea=(t,n)=>{if(m===null||!y||t===n)return;const s=K[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=vi(a,t,n),l=[...K];l[m]=Bt(s,o,i);let f=De;De===t?f=n:t<De&&n>=De?f=De-1:t>De&&n<=De&&(f=De+1),lt(f),xt(l[m],o,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=K[n],o=ce[n];if(!s||!o)return;const a=gi(s,o,void 0,u,g);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...K];i[n]=a.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){H.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=K[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=yi(t,n,s);if(!o){H.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...K];a[m]=o;const i=kn(a,d,g)[m];if(!i)return;lt(0),qe(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,g);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),$t(null,m,0),dt(a)},Va=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){H.error(n);return}const s=K[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,g);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await B.mutateAsync({blockKey:t,data:i,create:!0}),f=[...K];f[ie]={__resolveType:t},await B.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Wt(),Ve(null),Un(l)||H.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){H.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Mt(l))})}},fr=Se?.rule;if(yt&&m===null&&Y===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?al(u):[],fs=u&&d?il(u,d):[],Ht=g&&u&&d?fc(u,d):[],ms=(t,n)=>{if(Ht.length===0)return;const s=Nl(t);return{kinds:Ht,selected:s,campaignPrefill:mc(t),onPick:n,load:Gs}},mr=!q&&!!(ot&&u&&d),pr=Y&&u?Gn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},qt=async(t,n)=>{if(Sc(n,t,u,g))try{await Pn.mutateAsync({blockKey:t})}catch(s){H.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Mt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a={...s[n]},i={...a.sections},l=[...i.variants??[]],f=l[o],R=f?.rule;if(Jt(R,s,u)){const h=R?.__resolveType??"",j=s[h],E=typeof j?.name=="string"?j.name:h,{__resolveType:M,...z}=t;B.mutate({blockKey:h,data:Ft(M??"",z,E)},{onSuccess:()=>k?.(),onError:B.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},B.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};hr(s)},In=async(t,n,s)=>{const o=pc(n,t);if(!o.ok)return o.reason==="conflict"&&H.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),xo),null;const a={};if(s){const i=s(o.rule);if(!i)return null;a[i.blockKey]=i.data}return o.blockWrite&&(a[o.blockWrite.blockKey]=o.blockWrite.block),Object.keys(a).length>0&&!(await Ls.apply({writes:a})).ok?null:(o.blockWrite&&H.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...xo,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},yr=Ht.length>0?{kinds:Ht,load:Gs,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Cl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Pl(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const R=s[n],h=R?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const j=h;if(!Array.isArray(j.variants))return null;const E=[...j.variants],M=E[o];return M?(E[o]={...M,rule:f},{blockKey:n,data:{...R,sections:{...j,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=s[n],i=a?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[o];if(!R)return;const h=Dt(R.rule,s,u),j=cn(t);f[o]={...R,rule:j};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:M,formValue:z}=Ut(j,E,u??void 0);ee(M),se(z);try{await B.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await qt(h,E),k?.()}catch(ne){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Q=z?.__resolveType??"",be=i[Q],Ie=typeof be?.name=="string"?be.name:Q,{__resolveType:he,...ue}=t;B.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:B.reportError});return}const ne=xs(E,s,t),J=[...o];J[n]=Bt(h,j,ne);const Ne=ln(i,l,J,R,f);B.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g)))},Ta=t=>{qe(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),xr(n)},Aa=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};xr(s)},Na=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=await In(t,i,M=>{const z=o[n],ne=a[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...o];return Ne[n]=Bt(z,ne,xs(J,s,M)),{blockKey:l,data:ln(i,l,Ne,R,f)}});if(!h)return;const{resolveType:j,formValue:E}=Ut(h.rule,h.projected,u??void 0);qe(j),Fe(E),k?.()},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=Dt(M[s]?.rule,i,u),ne=cn(t),J=xs(E,s,ne),Ne=[...o];Ne[n]=Bt(h,j,J);const Q=ln(i,l,Ne,R,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);qe(Ie),Fe(he);try{await B.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await qt(z,be),k?.()}catch(ue){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ue))})}};if(!q&&!oe)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(q&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Re=m!==null?ce[m]??null:null,_r=m!==null?K[m]:null,kr=_r&&Re?.isMultivariate?pt(_r,Re):null,Vt=kr?Qr(kr,we,g):[],Ln=Math.min(De,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=Re?.isMultivariate===!0,ps=m!==null&&Re!==null,At=ps&&(Tt||!!(Fn&&Xe)),Pa=At&&!q&&Re?.isSavedBlock===!0,ft=q||Pa,wr=q?Us:Re?.label??"",Ba=Zt&&u?Gn(Zt,u):null,jr=(t,n)=>n&&X?`${t} · ${n}`:t,Rr=Re?Re.variantOf??Re.label:"",Ka=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[jr(Rr,t)]:[Re.label,t]:[Re?.label??""]})(),hs=jr(oe?.name??"",yt?Se?.label:null),On=At&&(!q||D.length>0)?q?[Us,...D]:[hs,...Ka,...D]:[],Er=je&&oe?[oe.name,"SEO",...Ms]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Qt&&oe?[oe.name,Vr]:Lt&&oe&&Re?[hs,Rr,Vr]:[],zn=Tr.length>0?Tr:Er.length>0?Er:ft?On.length>0?On:[wr]:On.length>0?On:[hs],Ar=ps&&!Tt&&!Re?.isHidden&&!!y,Ma=ft||!q&&yt&&!!Se||Ar,Da=ps&&!Tt&&!q&&D.length===0&&!!Re&&Mo(Re)&&!!y,Fa=X&&At&&!Lt&&Tt&&D.length===0&&!!kt,Nr=X&&D.length>0?co(D[D.length-1]):null,Ia=D.length>1?co(D[D.length-2]):null,Cr=ft?wr:At?Re?.label??"":oe?.name??"",La=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):je?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?Re?.variantOf??Re?.label??"":Qt||je?oe?.name??"":Nr?Ia??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!je&&!At&&!ft,Oa=!X&&!je&&!q&&Tt&&D.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=vc(t.sections,K,u,g);if(!n)return;const{sections:s,newVariantIndex:o}=n;B.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),L(null),A(null),W(null),T([]),se(null),ee(null)},onError:B.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const o=d[y],a=o.sections;if(!a||typeof a!="object"||Array.isArray(a))return;const i=a;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=yc(i,l),R={...d,[y]:{...o,sections:f}};B.mutate({blockKey:y,data:R[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const j of h)await qt(j,R)})()},onError:B.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),fe(s);const o=Yn(pe.map(a=>({rule:a.rule})),t,n);is(o,s),$n(a=>Yn(a,t,n))},Kr=t=>{const n=pe[t]?.rule,s=Dt(n,d??{},u??void 0);$n(o=>o.length<=1?null:(o.splice(t,1),o),()=>{pe.length-1===1?fe(0):t<te?fe(te-1):t===te&&fe(Math.max(0,t-1)),L(null),A(null),W(null),T([]),se(null),ee(null)},s)},za=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!wi(n.rule)).map(({variant:n})=>Dt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Oi({variants:n}),o=n[s];return o?[{...o,rule:zi(u)}]:null},()=>{fe(0),L(null),A(null),W(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=Xr(s,t,g),bc(s,t,g)),()=>{fe(n),L(null),A(null),W(null),T([]),se(null),ee(null)})},$a=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,o=re.current.decofile;if(!s)return;const a=o[s],i=a.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[t];if(!R?.rule||typeof R.rule!="object"){H.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=R.rule,j=n.trim();en(!0);try{if(!j){if(!Jt(h,o,u)){F(null);return}const Q=h.__resolveType??"";f[t]={...R,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await B.mutateAsync({blockKey:s,data:be[s]}),await qt(Q,be),F(null),k?.();return}const E=As(h,o,u);if(!E){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await B.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,j)}),F(null),k?.();return}const M=Jn(j),z=Qn(M,o,u);if(z){H.error(z);return}const ne=Ft(E.resolveType,E.data,j);let J=null,Ne=!1;try{const Q=await B.mutateAsync({blockKey:M,data:ne,create:!0});Ne=Un(Q),J=Ne?null:M,f[t]={...R,rule:cn(M)},await B.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}F(null),Ne||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:j})),k?.()}catch(E){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(E))})}finally{en(!1)}},Wa=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(s===null||!l)return;const h=o[s],j=a[s];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=M[t];if(!z?.rule||typeof z.rule!="object"){H.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Q=>{const be={...E,variants:Q},Ie=[...o];Ie[s]=Bt(h,j,be);const he=ln(i,l,Ie,R,f);return await B.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...M];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await qt(Ze,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await B.mutateAsync({blockKey:Q.blockKey,data:Ft(Q.resolveType,Q.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Qn(be,i,u);if(Ie){H.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,Ge=!1;try{const Ze=await B.mutateAsync({blockKey:be,data:he,create:!0});Ge=Un(Ze),ue=Ge?null:be;const Nt=[...M];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Ze){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Ze}O(null),Ge||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(Q))})}finally{en(!1)}},Dr=async(t,n,s)=>{A(s);try{await B.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},Ha={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,R=async j=>{const E={...t,variants:j};return await Dr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){H.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const M=[...i];M[n]={...l,rule:h.inlinedRule};const z=await R(M);await qt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await B.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let j=null,E=!1;try{const M=await B.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(M),j=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await R(z),j=null}catch(M){throw j&&await Pn.mutateAsync({blockKey:j}).catch(()=>{}),M}E||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(j){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(j))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Dt(l.rule,a,u);i[n]={...l,rule:cn(s)};const R={...t,variants:i},h={...a,[o]:R};try{await Dr(o,t,R),f&&f!==s&&await qt(f,h),k?.()}catch(j){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(j))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;let i=null;!await In(s,a,f=>{const R=Array.isArray(t.variants)?[...t.variants]:[],h=R[n];return h?(R[n]={...h,rule:f},i={...t,variants:R},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Wt(),g&&$t(null,-1,0)},Ir=t=>{dn(t),ds({inner:t})},Lr=t=>{An(t),ds({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Yt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},qa=()=>{Vn(!1),Tn(!1),L(null),un(!0)},Ga=()=>{je&&$r(),L(null),Vn(!0)},Ua=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(je){if(t===0){$r();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ms.slice(0,t-1)),Yt(s=>s+1);return}if(q){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(D.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(gl(zn.length,{isMultivariateSectionTop:Oa})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(Ui,{className:"size-4"})}):null,Ja=ft||At||je?Ma&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!q&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",cl),children:[r.jsx(ll,{rule:js(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(qn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr,variant:"header"})}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(qn,{onClick:bn})]}),Qa=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsx(mo,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Wr=r.jsxs(r.Fragment,{children:[r.jsx(ul,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:ur,onRename:O,onDuplicate:Ra,onDelete:ja,onRemoveAll:dr,onReorder:Ea,onAdd:()=>Sn()}),r.jsx(mo,{children:r.jsx(ks,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Ta,onSelectGlobal:Ca,named:ms(kt?.rule,Na),namedRow:ws(kt?.rule,Ht),rule:kt?.rule,schema:Ba,formValue:Ho,onChange:Aa,formKey:`${m??"none"}:${Ln}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Hr=r.jsx("div",{className:le(X?"px-2":"p-2 pt-3"),children:r.jsx(Bc,{listKey:`${y??""}-${te}`,rawSections:K,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{ga(t),Je?.(t)},onReorder:va,onDelete:ya,onDuplicate:Sa,onMakeReusable:Ve,onToggleHidden:ba,onToggleLazy:rt?xa:void 0,onAddVariant:Sn,onDetach:_a,onAddSection:()=>He(!0),canAddSection:mr})}),Ya=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr}),nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Za=r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Xa=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>$o(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(Ji,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Gi,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Hr]},"editor-section-list");return r.jsx(ic,{value:g,children:r.jsx(dl,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(X||zn.length>1)&&r.jsx(Wi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ys,ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:La}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),gs&&yt&&Se&&r.jsx(po,{variants:pe,activeIndex:te,onSelect:cs,onManage:Ga,onRemoveAll:za}),Fa&&r.jsx(po,{variants:Vt,activeIndex:Ln,onSelect:ur,onManage:Ua,onRemoveAll:dr}),gs&&!yt&&r.jsx(qn,{onClick:bn}),Da&&r.jsx(qn,{onClick:()=>Sn()}),r.jsx(fl,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:qa,children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Ja}),ut&&r.jsx(mi,{open:!0,fields:pi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Ws??null,authorPending:Ws===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>ha({...ut.choices,[t]:n}),onApply:pa},Ic(ut.formBase)),Lt?r.jsx(ho,{onAdd:()=>Sn(),children:Wr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&D.length===0&&Wr,r.jsx(To,{value:yr,children:r.jsx(go,{value:q&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:q?Ha:void 0})})})]},"editor-section-form"):q?r.jsx(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(To,{value:yr,children:r.jsx(go,{value:q&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):je?X?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Ya})},"editor-seo"):Za:Qt?r.jsx(ho,{onAdd:bn,children:Qa},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Hr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:mr,onAddSection:()=>He(!0)})})]},"editor-section-list"):Xa,r.jsx(ml,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:B.isPending,onSubmit:Va}),ot&&r.jsx(ec,{open:Ae,onOpenChange:t=>{He(t),t||(Rn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:wa}),ht&&y&&d&&r.jsx(nc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(yo,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(pe[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await $a(Te,t)},onOpenChange:t=>{!t&&!Xt&&F(null)}}),tt!==null&&r.jsx(yo,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Wa(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{Of as SectionsEditor};
@@ -1 +0,0 @@
1
- import{c as e,j as o}from"./index-BfWp2Wnw.js";import{V as a}from"./index-Cu5PtngA.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
@@ -1 +0,0 @@
1
- import{c as R,b as Q,e as Xe,j as n,B as F,t as We,o as gt,cp as pe,af as zt,a as fe,M as cn,V as Ft,K as ht,cq as Bt,cr as Mt,at as Ze,m as bt,b6 as dn,C as kt,r as X,ad as un,ae as ie,cs as mn,w as qt,x as Kt,v as Ht,D as Ut,d as Jt,a4 as jt,H as fn,T as Vt,i as et,E as xt,aU as Gt,ct as gn,cu as hn,b4 as Tt,J as pn,cv as yn,bB as bn,aS as xn,y as wn,cw as Sn,cx as jn,cy as vn,cz as kn,cA as Tn,a5 as Nn,u as Pn,a6 as _n,cB as In,cC as On,l as Wt,cD as Nt,cE as An,O as Cn,a$ as Pt,cF as En,a0 as $n}from"./index-BfWp2Wnw.js";import{t as Yt}from"./Globe04-DhsnPBDD.js";import{i as Ln,s as se}from"./UserSquare-oo1b4ulW.js";import{u as Dn}from"./use-deployment-admin-B4GqO2uv.js";import{a as Rn}from"./admin-fetch-BhTJlAsX.js";import{$ as zn,z as yt,x as Fn,a0 as Bn,a1 as Mn,n as _t,h as qn,a2 as Kn,k as Hn,a3 as Un}from"./agent-icon-Bq_Z7esB.js";import{s as Jn,d as Vn}from"./UserCheck01-4mEtfdkD.js";import{s as Gn}from"./XClose-WYCPZpkD.js";import{l as Qt,i as Wn,c as Yn,b as Qn,a as Xn,w as Zn,O as es,j as ts,u as ns,k as ss,o as os}from"./use-org-notice-DQ7N3XWA.js";import{u as is,a as as}from"./use-project-scope-CFftAYVY.js";import{u as Xt,a as rs}from"./use-panel-navigate-db4k7dl4.js";import{i as me}from"./CheckCircle-BsBF4S8u.js";import{i as It}from"./Monitor01-CBUOgSaC.js";import{i as Ve}from"./Zap-C-VVHO-P.js";import{s as Ot}from"./Plus-DAYIm6ow.js";import{a as ls}from"./Tool01-Bscrvuft.js";import{e as Ge,b as oe,d as cs,a as ds,c as us,C as ms}from"./command-DAachgGl.js";import{I as fs}from"./integration-icon-C4zzzxaS.js";import{P as gs}from"./project-icon-WyFXKdgN.js";import{a as hs}from"./use-navigate-to-agent-C4y9eC4A.js";import{u as ps}from"./use-debounced-value-DFWDa0qH.js";import{a as ys,m as bs}from"./use-mcp-client-HASDr5yn.js";import{a as xs}from"./new-project-dialog-B6Lwo0Gj.js";import{u as ws,n as Ss}from"./new-project-store-DQsI7Up8.js";import{L as js}from"./legacy-admin-welcome-dialog-BnEG9TvC.js";import{R as vs}from"./required-auth-layout-ZTLOobSH.js";import{t as ks,u as Ts,b as Ns,A as At}from"./use-view-draft-kind-DkapSxnZ.js";import{u as Ps,a as _s,c as Is,b as Os}from"./thread-route-Ds6Wombz.js";import{c as As,f as Cs}from"./thread-intent-BtcwbxTJ.js";import{u as Es}from"./use-blog-view-9w6CHFwT.js";import{u as $s}from"./use-org-sso-DrDj5K7f.js";function Ls(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Q();let c;e[0]!==a||e[1]!==i?(c=async()=>{const I=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await I.json();if(!I.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=i,e[2]=c):c=e[2];let f;e[3]!==a?(f=I=>{window.location.href=`/${I.slug??a}`},e[3]=a,e[4]=f):f=e[4];let g;e[5]!==i?(g=I=>{We.error(I instanceof Error?I.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=g):g=e[6];let h;e[7]!==c||e[8]!==f||e[9]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[7]=c,e[8]=f,e[9]=g,e[10]=h):h=e[10];const d=Xe(h),u=Ds;let l;e[11]!==s||e[12]!==o?(l=s?n.jsx(gt,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Yt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=l):l=e[13];let y;e[14]!==o||e[15]!==i?(y=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=y):y=e[16];let m;e[17]!==y?(m=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=m):m=e[18];let w;e[19]!==r||e[20]!==i?(w=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=w):w=e[21];let j;e[22]!==w?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[22]=w,e[23]=j):j=e[23];let p;e[24]!==m||e[25]!==j?(p=n.jsxs("div",{className:"space-y-2",children:[m,j]}),e[24]=m,e[25]=j,e[26]=p):p=e[26];let b;e[27]!==d?(b=()=>d.mutate(),e[27]=d,e[28]=b):b=e[28];let S;e[29]!==d.isPending||e[30]!==o||e[31]!==i?(S=d.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=d.isPending,e[30]=o,e[31]=i,e[32]=S):S=e[32];let x;e[33]!==d.isPending||e[34]!==b||e[35]!==S?(x=n.jsx(F,{onClick:b,disabled:d.isPending,children:S}),e[33]=d.isPending,e[34]=b,e[35]=S,e[36]=x):x=e[36];const k=d.isPending;let T;e[37]!==i?(T=i("common.goHome"),e[37]=i,e[38]=T):T=e[38];let v;e[39]!==d.isPending||e[40]!==T?(v=n.jsx(F,{variant:"ghost",onClick:u,disabled:k,children:T}),e[39]=d.isPending,e[40]=T,e[41]=v):v=e[41];let P;e[42]!==x||e[43]!==v?(P=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[x,v]}),e[42]=x,e[43]=v,e[44]=P):P=e[44];let _;return e[45]!==p||e[46]!==P||e[47]!==l?(_=n.jsxs(pe,{children:[l,p,P]}),e[45]=p,e[46]=P,e[47]=l,e[48]=_):_=e[48],_}function Ds(){window.location.href="/"}function Ct(t){const e=R.c(26),{orgSlug:o,orgId:a,orgName:s,reason:r}=t,i=Q(),{isAdmin:c}=Dn(),f=Rs,g=r==="not-found",h=g?Ln:zt;let d;e[0]!==g||e[1]!==i?(d=i(g?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=g,e[1]=i,e[2]=d):d=e[2];const u=d;let l;e[3]!==g||e[4]!==s||e[5]!==o||e[6]!==i?(l=g?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:s??o}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=g,e[4]=s,e[5]=o,e[6]=i,e[7]=l):l=e[7];const y=l;let m;e[8]!==h?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(h,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=h,e[9]=m):m=e[9];let w;e[10]!==u?(w=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[10]=u,e[11]=w):w=e[11];let j;e[12]!==y?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=j):j=e[13];let p;e[14]!==w||e[15]!==j?(p=n.jsxs("div",{className:"space-y-2",children:[w,j]}),e[14]=w,e[15]=j,e[16]=p):p=e[16];let b;e[17]!==c||e[18]!==a||e[19]!==o||e[20]!==i?(b=c&&a?n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(zs,{orgId:a,orgSlug:o}),n.jsx(F,{variant:"ghost",onClick:f,children:i("common.goHome")})]}):n.jsx(F,{onClick:f,children:i("common.goHome")}),e[17]=c,e[18]=a,e[19]=o,e[20]=i,e[21]=b):b=e[21];let S;return e[22]!==m||e[23]!==p||e[24]!==b?(S=n.jsxs(pe,{children:[m,p,b]}),e[22]=m,e[23]=p,e[24]=b,e[25]=S):S=e[25],S}function Rs(){window.location.href="/"}function zs(t){const e=R.c(20),{orgId:o,orgSlug:a}=t,s=Q(),{data:r}=fe.useSession(),i=r?.user.email;let c;e[0]!==i||e[1]!==o?(c=()=>Rn(`/api/_admin/orgs/${o}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,role:"admin"})}),e[0]=i,e[1]=o,e[2]=c):c=e[2];let f;e[3]!==a?(f=()=>{window.location.href=`/${a}`},e[3]=a,e[4]=f):f=e[4];let g;e[5]!==s?(g=w=>{We.error(w instanceof Error?w.message:s("common.noAccessScreen.adminJoinFailed"))},e[5]=s,e[6]=g):g=e[6];let h;e[7]!==c||e[8]!==f||e[9]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[7]=c,e[8]=f,e[9]=g,e[10]=h):h=e[10];const d=Xe(h);let u;e[11]!==d?(u=()=>d.mutate(),e[11]=d,e[12]=u):u=e[12];const l=!i||d.isPending;let y;e[13]!==d.isPending||e[14]!==s?(y=d.isPending?s("common.noAccessScreen.adminJoining"):s("common.noAccessScreen.adminJoin"),e[13]=d.isPending,e[14]=s,e[15]=y):y=e[15];let m;return e[16]!==u||e[17]!==l||e[18]!==y?(m=n.jsx(F,{onClick:u,disabled:l,children:y}),e[16]=u,e[17]=l,e[18]=y,e[19]=m):m=e[19],m}function Fs(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=Q();let c;e[0]!==o?(c=async()=>{const O=await fe.organization.acceptInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[0]=o,e[1]=c):c=e[1];let f;e[2]!==s?(f=()=>{cn(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let g;e[4]!==i?(g=O=>{We.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=g):g=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[6]=c,e[7]=f,e[8]=g,e[9]=h):h=e[9];const d=Xe(h);let u;e[10]!==o?(u=async()=>{const O=await fe.organization.rejectInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[10]=o,e[11]=u):u=e[11];let l,y;e[12]!==i?(l=()=>{We.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=O=>{We.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=l,e[14]=y):(l=e[13],y=e[14]);let m;e[15]!==u||e[16]!==l||e[17]!==y?(m={mutationFn:u,onSuccess:l,onError:y},e[15]=u,e[16]=l,e[17]=y,e[18]=m):m=e[18];const w=Xe(m),j=d.isPending||w.isPending;let p;e[19]!==r||e[20]!==a?(p=r?n.jsx(gt,{url:r,fallback:a,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(zn,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=p):p=e[21];let b;e[22]!==a||e[23]!==i?(b=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=b):b=e[24];let S;e[25]!==b?(S=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[25]=b,e[26]=S):S=e[26];let x;e[27]!==i?(x=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=x):x=e[28];let k;e[29]!==x?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[29]=x,e[30]=k):k=e[30];let T;e[31]!==S||e[32]!==k?(T=n.jsxs("div",{className:"space-y-2",children:[S,k]}),e[31]=S,e[32]=k,e[33]=T):T=e[33];let v;e[34]!==d?(v=()=>d.mutate(),e[34]=d,e[35]=v):v=e[35];let P;e[36]!==d.isPending||e[37]!==i?(P=d.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=d.isPending,e[37]=i,e[38]=P):P=e[38];let _;e[39]!==j||e[40]!==v||e[41]!==P?(_=n.jsx(F,{onClick:v,disabled:j,children:P}),e[39]=j,e[40]=v,e[41]=P,e[42]=_):_=e[42];let I;e[43]!==w?(I=()=>w.mutate(),e[43]=w,e[44]=I):I=e[44];let A;e[45]!==w.isPending||e[46]!==i?(A=w.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=w.isPending,e[46]=i,e[47]=A):A=e[47];let E;e[48]!==j||e[49]!==I||e[50]!==A?(E=n.jsx(F,{variant:"ghost",onClick:I,disabled:j,children:A}),e[48]=j,e[49]=I,e[50]=A,e[51]=E):E=e[51];let $;e[52]!==_||e[53]!==E?($=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,E]}),e[52]=_,e[53]=E,e[54]=$):$=e[54];let L;return e[55]!==T||e[56]!==$||e[57]!==p?(L=n.jsxs(pe,{children:[p,T,$]}),e[55]=T,e[56]=$,e[57]=p,e[58]=L):L=e[58],L}function Bs(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=Q();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(gt,{url:a,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Jn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let c;e[5]!==i?(c=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=c):c=e[6];let f;e[7]!==o||e[8]!==s?(f=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=f):f=e[9];let g;e[10]!==f?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=g):g=e[11];let h;e[12]!==c||e[13]!==g?(h=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[12]=c,e[13]=g,e[14]=h):h=e[14];let d;e[15]!==s?(d=s("common.goHome"),e[15]=s,e[16]=d):d=e[16];let u;e[17]!==d?(u=n.jsx(F,{variant:"ghost",onClick:Ms,children:d}),e[17]=d,e[18]=u):u=e[18];let l;return e[19]!==r||e[20]!==h||e[21]!==u?(l=n.jsxs(pe,{children:[r,h,u]}),e[19]=r,e[20]=h,e[21]=u,e[22]=l):l=e[22],l}function Ms(){window.location.href="/"}function qs(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Q();let c;e[0]!==a?(c=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),I=await _.json();if(!_.ok||!I.success)throw new Error(I.error??"Failed to request access");return I},e[0]=a,e[1]=c):c=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Hs,e[2]=f):f=e[2];let g;e[3]!==i?(g=_=>{We.error(_ instanceof Error?_.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=g):g=e[4];let h;e[5]!==c||e[6]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[5]=c,e[6]=g,e[7]=h):h=e[7];const d=Xe(h);let u;e[8]!==s||e[9]!==o?(u=s?n.jsx(gt,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Yt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=u):u=e[10];let l;e[11]!==o||e[12]!==i?(l=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=l):l=e[13];let y;e[14]!==l?(y=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[14]=l,e[15]=y):y=e[15];let m;e[16]!==r||e[17]!==i?(m=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=m):m=e[18];let w;e[19]!==m?(w=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=w):w=e[20];let j;e[21]!==y||e[22]!==w?(j=n.jsxs("div",{className:"space-y-2",children:[y,w]}),e[21]=y,e[22]=w,e[23]=j):j=e[23];let p;e[24]!==d?(p=()=>d.mutate(),e[24]=d,e[25]=p):p=e[25];let b;e[26]!==d.isPending||e[27]!==i?(b=d.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=d.isPending,e[27]=i,e[28]=b):b=e[28];let S;e[29]!==d.isPending||e[30]!==p||e[31]!==b?(S=n.jsx(F,{onClick:p,disabled:d.isPending,children:b}),e[29]=d.isPending,e[30]=p,e[31]=b,e[32]=S):S=e[32];const x=d.isPending;let k;e[33]!==i?(k=i("common.goHome"),e[33]=i,e[34]=k):k=e[34];let T;e[35]!==d.isPending||e[36]!==k?(T=n.jsx(F,{variant:"ghost",onClick:Ks,disabled:x,children:k}),e[35]=d.isPending,e[36]=k,e[37]=T):T=e[37];let v;e[38]!==S||e[39]!==T?(v=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[S,T]}),e[38]=S,e[39]=T,e[40]=v):v=e[40];let P;return e[41]!==j||e[42]!==v||e[43]!==u?(P=n.jsxs(pe,{children:[u,j,v]}),e[41]=j,e[42]=v,e[43]=u,e[44]=P):P=e[44],P}function Ks(){window.location.href="/"}function Hs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Us(t){const e=R.c(7);let o;e[0]!==t?(o=ht.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],Ft(s)}function Js({orgSlug:t}){const{data:e}=Us(t);if(e.status!=="member"){const o=Bt()?.org===t;o&&Mt();const a=localStorage.getItem(Ze.lastOrgSlug())===t;if(a&&localStorage.removeItem(Ze.lastOrgSlug()),(o||a)&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Ct,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Fs,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Ls,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(qs,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Bs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Ct,{orgSlug:t,orgId:e.organization.id,orgName:e.organization.name,reason:"no-access"})}function Zt(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:c,children:f,footerLeading:g,actions:h,onDismiss:d,tone:u}=t,l=u===void 0?"neutral":u,y=g||h;let m;e[0]!==l?(m=l==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=l,e[1]=m):m=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Gn,{size:14}),e[2]=w):w=e[2];let j;e[3]!==a||e[4]!==d?(j=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:d,children:w}),e[3]=a,e[4]=d,e[5]=j):j=e[5];const p=c&&"flex items-start gap-3",b=f&&"pb-3";let S;e[6]!==p||e[7]!==b?(S=bt("p-4 pr-11",p,b),e[6]=p,e[7]=b,e[8]=S):S=e[8];let x;e[9]!==c?(x=c&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:c}),e[9]=c,e[10]=x):x=e[10];let k;e[11]!==s?(k=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=k):k=e[12];let T;e[13]!==r?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let v;e[15]!==i?(v=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=v):v=e[16];let P;e[17]!==T||e[18]!==v||e[19]!==k?(P=n.jsxs("div",{children:[k,T,v]}),e[17]=T,e[18]=v,e[19]=k,e[20]=P):P=e[20];let _;e[21]!==f?(_=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=_):_=e[22];let I;e[23]!==P||e[24]!==_?(I=n.jsxs("div",{className:"min-w-0 flex-1",children:[P,_]}),e[23]=P,e[24]=_,e[25]=I):I=e[25];let A;e[26]!==I||e[27]!==S||e[28]!==x?(A=n.jsxs("div",{className:S,children:[x,I]}),e[26]=I,e[27]=S,e[28]=x,e[29]=A):A=e[29];let E;e[30]!==h||e[31]!==g||e[32]!==y||e[33]!==l?(E=y&&n.jsxs("div",{className:bt("flex items-center justify-between gap-3 px-4 py-2.5",l==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:g}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:h})]}),e[30]=h,e[31]=g,e[32]=y,e[33]=l,e[34]=E):E=e[34];let $;return e[35]!==o||e[36]!==A||e[37]!==E||e[38]!==m||e[39]!==j||e[40]!==l?($=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":l,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[m,j,A,E]}),e[35]=o,e[36]=A,e[37]=E,e[38]=m,e[39]=j,e[40]=l,e[41]=$):$=e[41],$}const Vs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function Gs(t){return Vs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function Ws(t,e){return Gs(e).map(o=>({element:Qt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const Ys=Qt("switcher"),Qs=30;function en(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function Xs(t,e){return Ws(t,e).filter(o=>typeof o.element=="string"&&en(o.element))}function Zs(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Qe=!1},steps:e}}let Qe=!1;async function eo(){return(await dn(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function to(t,e){if(Qe)return;Qe=!0;let o=0;const a=()=>{if(!en(Ys)&&o++<Qs){requestAnimationFrame(a);return}const s=Xs(t,e);if(s.length===0){Qe=!1;return}eo().then(r=>{r(Zs(t,s)).drive()}).catch(()=>{Qe=!1})};a()}const tn=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:It,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:yt,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:Vn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:kt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:se,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:It,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:se,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:me,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Ve,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:se,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:me,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:Ve,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:me,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:se,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:Ve,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:se,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:me,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:Ve,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:se,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:me,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:Ve,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:se,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:yt,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:me,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:kt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:Ve,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:me,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:se,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:yt,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:se,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Fn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ft="studio.release-feed.v1",wt=new Set;let ge="",he={},St=!1;function no(){if(St)return ge||"{}";try{return localStorage.getItem(ft)??"{}"}catch{return ge||"{}"}}function nn(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Et(){const t=no();return t!==ge&&(ge=t,he=nn(t)),he}function so(t){wt.add(t);const e=o=>{if(!(o.key!==ft&&o.key!==null)){try{const a=localStorage.getItem(ft)??"{}",r={...nn(a),...he};he=r,ge=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{wt.delete(t),window.removeEventListener("storage",e)}}function oo(t){he=t,ge=JSON.stringify(t);try{localStorage.setItem(ft,ge),St=!1}catch{St=!0}wt.forEach(e=>e())}function io(){const t=R.c(7),e=X.useSyncExternalStore(so,Et,Et);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const a=o,s=ao;let r;t[2]!==e?(r=tn.reduce((f,g)=>e[g.id]?f:f+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let c;return t[4]!==a||t[5]!==i?(c={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=c):c=t[6],c}function ao(t){he[t]||oo({...he,[t]:{seenAt:new Date().toISOString()}})}const $t=new Map;function sn(t){let e=$t.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},$t.set(t,e)),e}function ro(t,e){const o=sn(t);return o.subscribers.add(e),o.intervalId===null&&(o.intervalId=setInterval(()=>{o.now=Date.now();for(const a of o.subscribers)a()},t)),()=>{o.subscribers.delete(e),o.subscribers.size===0&&o.intervalId!==null&&(clearInterval(o.intervalId),o.intervalId=null)}}function lo(t){const e=R.c(4),o=t===void 0?6e4:t;let a;e[0]!==o?(a=()=>sn(o).now,e[0]=o,e[1]=a):a=e[1];const s=a;let r;return e[2]!==o?(r=i=>ro(o,i),e[2]=o,e[3]=r):r=e[3],X.useSyncExternalStore(r,s,s)}const co=720*60*60*1e3,uo=10080*60*1e3;function mo(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function fo(t){const e=tn[0];if(!e)return null;const o=mo(e.date),a=t-o;return a<0||a>co?null:e}function go(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function ho(t,e){const o=go(t);return o===null?!1:e-o>=uo}function po(){const t=R.c(46),e=Q(),o=is(),a=un(),s=Xt(),r=!!o,i=a===ie.home&&!o;let c;t[0]!==s||t[1]!==r?(c=r&&!!s&&Wn(s),t[0]=s,t[1]=r,t[2]=c):c=t[2];const f=c,{data:g}=fe.useSession(),{isSeen:h,markSeen:d}=io(),u=lo(6e4);let l,y,m;if(t[3]!==h||t[4]!==u||t[5]!==g?.user?.createdAt){m=Symbol.for("react.early_return_sentinel");e:{if(l=fo(u),!l){m=null;break e}if(!ho(g?.user?.createdAt,u)){m=null;break e}y=h(l.id)}t[3]=h,t[4]=u,t[5]=g?.user?.createdAt,t[6]=l,t[7]=y,t[8]=m}else l=t[6],y=t[7],m=t[8];if(m!==Symbol.for("react.early_return_sentinel"))return m;if(y)return null;let w;t[9]!==l.id||t[10]!==r||t[11]!==d||t[12]!==i||t[13]!==f||t[14]!==e?(w=()=>{d(l.id),to(e,{onOrgHome:i,inProject:r,onSiteEditor:f})},t[9]=l.id,t[10]=r,t[11]=d,t[12]=i,t[13]=f,t[14]=e,t[15]=w):w=t[15];const j=w;let p;t[16]!==e?(p=e("announcements.release.ariaLabel"),t[16]=e,t[17]=p):p=t[17];let b;t[18]!==e?(b=e("announcements.release.dismiss"),t[18]=e,t[19]=b):b=t[19];const S=l.eyebrow,x=l.title;let k;t[20]!==l.id||t[21]!==d?(k=()=>d(l.id),t[20]=l.id,t[21]=d,t[22]=k):k=t[22];let T;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==d||t[26]!==e?(T=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>d(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=d,t[26]=e,t[27]=T):T=t[27];let v;t[28]!==l.cta||t[29]!==l.id||t[30]!==d||t[31]!==j?(v=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>d(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):n.jsx(F,{size:"sm",onClick:j,children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=d,t[31]=j,t[32]=v):v=t[32];let P;t[33]!==l.bullets?(P=l.bullets.map(yo),t[33]=l.bullets,t[34]=P):P=t[34];let _;t[35]!==P?(_=n.jsx("ul",{className:"flex flex-col gap-3",children:P}),t[35]=P,t[36]=_):_=t[36];let I;return t[37]!==l.eyebrow||t[38]!==l.title||t[39]!==v||t[40]!==_||t[41]!==p||t[42]!==b||t[43]!==k||t[44]!==T?(I=n.jsx(Zt,{ariaLabel:p,dismissLabel:b,eyebrow:S,title:x,onDismiss:k,footerLeading:T,actions:v,children:_}),t[37]=l.eyebrow,t[38]=l.title,t[39]=v,t[40]=_,t[41]=p,t[42]=b,t[43]=k,t[44]=T,t[45]=I):I=t[45],I}function yo(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}function bo(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=Q();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(qt,{children:n.jsx(Kt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex flex-col gap-4",children:mn.map(xo)}),e[4]=c):c=e[4];let f;e[5]!==i?(f=n.jsxs(Ht,{className:"sm:max-w-md",children:[i,c]}),e[5]=i,e[6]=f):f=e[6];let g;return e[7]!==a||e[8]!==o||e[9]!==f?(g=n.jsx(Ut,{open:o,onOpenChange:a,children:f}),e[7]=a,e[8]=o,e[9]=f,e[10]=g):g=e[10],g}function xo(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(wo)})]},t.label)}function wo(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(So)})]},t.description)}function So(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Lt=8,Ye=["all","organizations","projects","chats","connections","actions"],jo=5;function Dt(t){switch(t){case"all":return"commandPalette.scope.all";case"organizations":return"commandPalette.organizations";case"projects":return"commandPalette.projects";case"chats":return"commandPalette.scope.chats";case"connections":return"commandPalette.connections";case"actions":return"commandPalette.actions";default:return t}}function vo(t,e){const o=a=>{const s=e.indexOf(a);return s===-1?Number.POSITIVE_INFINITY:s};return[...t].sort((a,s)=>o(a.slug)-o(s.slug)||a.name.localeCompare(s.name))}function ko(t,e){const{org:o}=jt(),a=ys({connectionId:Vt,orgId:o.id,orgSlug:o.slug}),{data:s}=et({queryKey:ht.globalSearch(o.id,t,Lt),enabled:e&&!!a&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!a)return[];try{return(await a.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:Lt}})).structuredContent?.items??[]}catch{return[]}}});return s??[]}function To(t){const e=R.c(213),{open:o,onOpenChange:a}=t,s=Q(),r=Jt(),{org:i}=jt(),{projects:c,hasProjects:f}=as(),{remember:g}=hs(i.slug),[h,d]=X.useState(""),[u,l]=X.useState("all");let y;e[0]!==u?(y=z=>u==="all"||u===z,e[0]=u,e[1]=y):y=e[1];const m=y,w=X.useDeferredValue(h),j=ko(w,m("chats")||m("connections")),p=Yn(),{data:b}=fn(),{recent:S}=Qn();let x;e[2]!==h?(x=h.trim(),e[2]=h,e[3]=x):x=e[3];const k=x,T=ps(k,150),{hits:v}=Xn(m("organizations")?T:"");let P,_;if(e[4]!==i||e[5]!==v||e[6]!==b||e[7]!==S){const z=vo(Zn(b??[],i),S);let U;e[10]!==v?(U=new Set(v.map(Io)),e[10]=v,e[11]=U):U=e[11],P=U,_=[...z,...v.filter(Ie=>!z.some(B=>B.id===Ie.id))],e[4]=i,e[5]=v,e[6]=b,e[7]=S,e[8]=P,e[9]=_}else P=e[8],_=e[9];const I=_;let A;e[12]!==I||e[13]!==i.slug||e[14]!==u||e[15]!==k?(A=u==="all"&&!k?I.filter(z=>z.slug!==i.slug).slice(0,jo):I,e[12]=I,e[13]=i.slug,e[14]=u,e[15]=k,e[16]=A):A=e[16];const E=A;let $;e[17]!==a?($=()=>{a(!1),d(""),l("all")},e[17]=a,e[18]=$):$=e[18];const L=$;let O;e[19]!==u?(O=z=>{const U=Ye.indexOf(u);l(Ye[(U+z+Ye.length)%Ye.length]??"all")},e[19]=u,e[20]=O):O=e[20];const M=O;let H;e[21]!==L?(H=(z,U)=>{xt("command_palette_used",{kind:U}),z(),L()},e[21]=L,e[22]=H):H=e[22];const D=H;let ae;e[23]!==r||e[24]!==i.id||e[25]!==i.slug?(ae=z=>{if(z.type==="connection"){if(!z.slug){r({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:z.slug}});return}if(z.type==="task"){r({to:ie.tasks,params:{org:i.slug,taskKey:z.key??void 0}});return}const U=Gt(i.id).id;gn(r,hn({org:i.slug,agentId:z.virtual_mcp_id??U,superAgentId:U}),{search:()=>({thread:z.id}),replace:!1})},e[23]=r,e[24]=i.id,e[25]=i.slug,e[26]=ae):ae=e[26];const Z=ae;let ee;e[27]!==h?(ee=[h],e[27]=h,e[28]=ee):ee=e[28];const ne=ee;let te,J,V,K,G,W,Y,C,q,ye,be,re,le,ce,de,ue;if(e[29]!==L||e[30]!==M||e[31]!==D||e[32]!==f||e[33]!==j||e[34]!==r||e[35]!==a||e[36]!==o||e[37]!==Z||e[38]!==i.slug||e[39]!==E||e[40]!==c||e[41]!==g||e[42]!==ne||e[43]!==u||e[44]!==P||e[45]!==m||e[46]!==s||e[47]!==h||e[48]!==p){const z=j.filter(_o),U=j.filter(Po);let Ie;e[65]!==i.slug?(Ie={org:i.slug},e[65]=i.slug,e[66]=Ie):Ie=e[66];const B=Ie;let Oe;e[67]!==s?(Oe=s("sidebar.navDestinations.home"),e[67]=s,e[68]=Oe):Oe=e[68];let at;e[69]===Symbol.for("react.memo_cache_sentinel")?(at=n.jsx(qn,{"aria-hidden":"true"}),e[69]=at):at=e[69];let Ae;e[70]!==B||e[71]!==Oe?(Ae={key:"home",label:Oe,icon:at,to:ie.home,params:B},e[70]=B,e[71]=Oe,e[72]=Ae):Ae=e[72];let Ce;e[73]!==s?(Ce=s("sidebar.navDestinations.reports"),e[73]=s,e[74]=Ce):Ce=e[74];let rt;e[75]===Symbol.for("react.memo_cache_sentinel")?(rt=n.jsx(Kn,{"aria-hidden":"true"}),e[75]=rt):rt=e[75];let Ee;e[76]!==B||e[77]!==Ce?(Ee={key:"reports",label:Ce,icon:rt,to:ie.reports,params:B},e[76]=B,e[77]=Ce,e[78]=Ee):Ee=e[78];let $e;e[79]!==s?($e=s("sidebar.navDestinations.tasks"),e[79]=s,e[80]=$e):$e=e[80];let lt;e[81]===Symbol.for("react.memo_cache_sentinel")?(lt=n.jsx(_t,{"aria-hidden":"true"}),e[81]=lt):lt=e[81];let Le;e[82]!==i.slug?(Le={org:i.slug,taskKey:void 0},e[82]=i.slug,e[83]=Le):Le=e[83];let De;e[84]!==$e||e[85]!==Le?(De={key:"tasks",label:$e,icon:lt,to:ie.tasks,params:Le},e[84]=$e,e[85]=Le,e[86]=De):De=e[86];let Re;e[87]!==s?(Re=s("sidebar.navDestinations.library"),e[87]=s,e[88]=Re):Re=e[88];let ct;e[89]===Symbol.for("react.memo_cache_sentinel")?(ct=n.jsx(Hn,{"aria-hidden":"true"}),e[89]=ct):ct=e[89];let ze;e[90]!==B||e[91]!==Re?(ze={key:"library",label:Re,icon:ct,to:ie.library,params:B},e[90]=B,e[91]=Re,e[92]=ze):ze=e[92];let Fe;e[93]!==s?(Fe=s("sidebar.navDestinations.discover"),e[93]=s,e[94]=Fe):Fe=e[94];let dt;e[95]===Symbol.for("react.memo_cache_sentinel")?(dt=n.jsx(Un,{"aria-hidden":"true"}),e[95]=dt):dt=e[95];let Be;e[96]!==B||e[97]!==Fe?(Be={key:"discover",label:Fe,icon:dt,to:ie.discover,params:B},e[96]=B,e[97]=Fe,e[98]=Be):Be=e[98];let ut;e[99]!==Ae||e[100]!==Ee||e[101]!==De||e[102]!==ze||e[103]!==Be?(ut=[Ae,Ee,De,ze,Be],e[99]=Ae,e[100]=Ee,e[101]=De,e[102]=ze,e[103]=Be,e[104]=ut):ut=e[104];const pt=ut;J=cs,be=o,e[105]!==L||e[106]!==a?(re=N=>N?a(!0):L(),e[105]=L,e[106]=a,e[107]=re):re=e[107],e[108]!==s?(le=s("commandPalette.title"),e[108]=s,e[109]=le):le=e[109],e[110]!==s?(ce=s("commandPalette.description"),e[110]=s,e[111]=ce):ce=e[111];let Me;e[112]!==u||e[113]!==s?(Me=u==="all"?s("commandPalette.placeholder"):s("commandPalette.placeholderScoped",{scope:s(Dt(u)).toLowerCase()}),e[112]=u,e[113]=s,e[114]=Me):Me=e[114];let qe;e[115]!==s?(qe=s("commandPalette.placeholder"),e[115]=s,e[116]=qe):qe=e[116];let Ke;e[117]!==M||e[118]!==u||e[119]!==h?(Ke=N=>{if(N.key==="Tab"){N.preventDefault(),M(N.shiftKey?-1:1);return}N.key==="Backspace"&&!h&&u!=="all"&&(N.preventDefault(),l("all"))},e[117]=M,e[118]=u,e[119]=h,e[120]=Ke):Ke=e[120],e[121]!==Me||e[122]!==qe||e[123]!==Ke||e[124]!==h?(de=n.jsx(ds,{placeholder:Me,"aria-label":qe,value:h,onValueChange:d,onKeyDown:Ke}),e[121]=Me,e[122]=qe,e[123]=Ke,e[124]=h,e[125]=de):de=e[125];let He;e[126]!==s?(He=s("commandPalette.scope.label"),e[126]=s,e[127]=He):He=e[127];let Ue;e[128]!==u||e[129]!==s?(Ue=Ye.map(N=>n.jsx("button",{type:"button",role:"radio","aria-checked":u===N,tabIndex:-1,onMouseDown:No,onClick:()=>l(N),className:bt("h-7 shrink-0 cursor-pointer rounded-full px-3 text-xs font-medium transition-colors focus-ring",u===N?"bg-foreground text-background":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:s(Dt(N))},N)),e[128]=u,e[129]=s,e[130]=Ue):Ue=e[130],e[131]!==He||e[132]!==Ue?(ue=n.jsx("div",{role:"radiogroup","aria-label":He,className:"flex gap-1 overflow-x-auto border-b px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:Ue}),e[131]=He,e[132]=Ue,e[133]=ue):ue=e[133],te=us,V="h-[min(420px,60vh)] max-h-none";let Je;e[134]!==s?(Je=s("commandPalette.empty"),e[134]=s,e[135]=Je):Je=e[135],e[136]!==Je?(K=n.jsx(ms,{children:Je}),e[136]=Je,e[137]=K):K=e[137],e[138]!==D||e[139]!==i.slug||e[140]!==E||e[141]!==P||e[142]!==m||e[143]!==s||e[144]!==h||e[145]!==p?(G=m("organizations")&&E.length>0&&n.jsx(Ge,{heading:s("commandPalette.organizations"),children:E.map(N=>n.jsxs(oe,{value:`org ${N.name} ${N.slug}`,keywords:P.has(N.id)?[h]:void 0,onSelect:()=>D(()=>p(N.slug),"organization"),children:[n.jsx(es,{org:N,size:"xs"}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:N.name}),N.slug===i.slug&&n.jsx("span",{className:"text-meta shrink-0",children:s("sidebar.rail.currentOrganization")})]},`org:${N.id}`))}),e[138]=D,e[139]=i.slug,e[140]=E,e[141]=P,e[142]=m,e[143]=s,e[144]=h,e[145]=p,e[146]=G):G=e[146],e[147]!==pt||e[148]!==D||e[149]!==r||e[150]!==m||e[151]!==s?(W=m("actions")&&n.jsx(Ge,{heading:s("commandPalette.goTo"),children:pt.map(N=>n.jsxs(oe,{onSelect:()=>D(()=>r({to:N.to,params:N.params}),"destination"),children:[N.icon,n.jsx("span",{children:N.label})]},N.key))}),e[147]=pt,e[148]=D,e[149]=r,e[150]=m,e[151]=s,e[152]=W):W=e[152],e[153]!==D||e[154]!==f||e[155]!==r||e[156]!==i.slug||e[157]!==c||e[158]!==g||e[159]!==m||e[160]!==s?(Y=m("projects")&&f&&n.jsx(Ge,{heading:s("commandPalette.projects"),children:c.map(N=>n.jsxs(oe,{value:`project ${N.title}`,onSelect:()=>D(()=>{g(N.id),r({to:ie.projects,params:{org:i.slug,agentId:N.id}})},"project"),children:[n.jsx(gs,{icon:N.icon,name:N.title,"aria-hidden":"true"}),n.jsx("span",{children:N.title})]},N.id))}),e[153]=D,e[154]=f,e[155]=r,e[156]=i.slug,e[157]=c,e[158]=g,e[159]=m,e[160]=s,e[161]=Y):Y=e[161],e[162]!==D||e[163]!==r||e[164]!==B||e[165]!==m||e[166]!==s?(C=m("actions")&&n.jsxs(Ge,{heading:s("commandPalette.actions"),children:[n.jsxs(oe,{value:s("commandPalette.newProject"),onSelect:()=>D(()=>r({to:ie.home,params:B}),"new_project"),children:[n.jsx(Ot,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.newProject")})]}),n.jsxs(oe,{value:s("commandPalette.inviteTeammate"),onSelect:()=>D(()=>r({to:"/$org/settings/members",params:B}),"invite"),children:[n.jsx(Bn,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.inviteTeammate")})]}),n.jsxs(oe,{value:s("commandPalette.addConnection"),onSelect:()=>D(()=>r({to:"/$org/settings/connections",params:B,search:{tab:"all"}}),"add_connection"),children:[n.jsx(Ot,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.addConnection")})]}),n.jsxs(oe,{value:s("commandPalette.settings"),onSelect:()=>D(()=>r({to:"/$org/settings/general",params:B}),"settings"),children:[n.jsx(ls,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.settings")})]})]}),e[162]=D,e[163]=r,e[164]=B,e[165]=m,e[166]=s,e[167]=C):C=e[167],q=m("connections")&&z.length>0&&n.jsx(Ge,{heading:s("commandPalette.connections"),children:z.map(N=>n.jsxs(oe,{value:`${N.title} ${N.id}`,keywords:ne,onSelect:()=>D(()=>Z(N),"connection"),children:[n.jsx(fs,{icon:N.icon,name:N.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:N.title})]},`connection:${N.id}`))}),ye=m("chats")&&U.length>0&&n.jsx(Ge,{heading:s("commandPalette.results"),children:U.map(N=>n.jsxs(oe,{value:`${N.title} ${N.id}`,keywords:ne,onSelect:()=>D(()=>Z(N),N.type),children:[N.type==="thread"?n.jsx(Mn,{"aria-hidden":"true"}):n.jsx(_t,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:N.title}),N.type==="task"&&N.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:N.key})]},`${N.type}:${N.id}`))}),e[29]=L,e[30]=M,e[31]=D,e[32]=f,e[33]=j,e[34]=r,e[35]=a,e[36]=o,e[37]=Z,e[38]=i.slug,e[39]=E,e[40]=c,e[41]=g,e[42]=ne,e[43]=u,e[44]=P,e[45]=m,e[46]=s,e[47]=h,e[48]=p,e[49]=te,e[50]=J,e[51]=V,e[52]=K,e[53]=G,e[54]=W,e[55]=Y,e[56]=C,e[57]=q,e[58]=ye,e[59]=be,e[60]=re,e[61]=le,e[62]=ce,e[63]=de,e[64]=ue}else te=e[49],J=e[50],V=e[51],K=e[52],G=e[53],W=e[54],Y=e[55],C=e[56],q=e[57],ye=e[58],be=e[59],re=e[60],le=e[61],ce=e[62],de=e[63],ue=e[64];let xe;e[168]!==te||e[169]!==V||e[170]!==K||e[171]!==G||e[172]!==W||e[173]!==Y||e[174]!==C||e[175]!==q||e[176]!==ye?(xe=n.jsxs(te,{className:V,children:[K,G,W,Y,C,q,ye]}),e[168]=te,e[169]=V,e[170]=K,e[171]=G,e[172]=W,e[173]=Y,e[174]=C,e[175]=q,e[176]=ye,e[177]=xe):xe=e[177];let tt;e[178]===Symbol.for("react.memo_cache_sentinel")?(tt=["↑","↓"],e[178]=tt):tt=e[178];let we;e[179]!==s?(we=s("commandPalette.hint.navigate"),e[179]=s,e[180]=we):we=e[180];let Se;e[181]!==we?(Se=n.jsx(mt,{keys:tt,label:we}),e[181]=we,e[182]=Se):Se=e[182];let nt;e[183]===Symbol.for("react.memo_cache_sentinel")?(nt=["↵"],e[183]=nt):nt=e[183];let je;e[184]!==s?(je=s("commandPalette.hint.open"),e[184]=s,e[185]=je):je=e[185];let ve;e[186]!==je?(ve=n.jsx(mt,{keys:nt,label:je}),e[186]=je,e[187]=ve):ve=e[187];let st;e[188]===Symbol.for("react.memo_cache_sentinel")?(st=["Tab"],e[188]=st):st=e[188];let ke;e[189]!==s?(ke=s("commandPalette.hint.filter"),e[189]=s,e[190]=ke):ke=e[190];let Te;e[191]!==ke?(Te=n.jsx(mt,{keys:st,label:ke}),e[191]=ke,e[192]=Te):Te=e[192];let ot;e[193]===Symbol.for("react.memo_cache_sentinel")?(ot=["Esc"],e[193]=ot):ot=e[193];let Ne;e[194]!==s?(Ne=s("commandPalette.hint.close"),e[194]=s,e[195]=Ne):Ne=e[195];let Pe;e[196]!==Ne?(Pe=n.jsx(mt,{keys:ot,label:Ne}),e[196]=Ne,e[197]=Pe):Pe=e[197];let _e;e[198]!==Se||e[199]!==ve||e[200]!==Te||e[201]!==Pe?(_e=n.jsxs("div",{className:"flex items-center gap-4 border-t px-3 py-2 text-xs text-muted-foreground",children:[Se,ve,Te,Pe]}),e[198]=Se,e[199]=ve,e[200]=Te,e[201]=Pe,e[202]=_e):_e=e[202];let it;return e[203]!==J||e[204]!==be||e[205]!==re||e[206]!==le||e[207]!==ce||e[208]!==de||e[209]!==ue||e[210]!==xe||e[211]!==_e?(it=n.jsxs(J,{open:be,onOpenChange:re,title:le,description:ce,children:[de,ue,xe,_e]}),e[203]=J,e[204]=be,e[205]=re,e[206]=le,e[207]=ce,e[208]=de,e[209]=ue,e[210]=xe,e[211]=_e,e[212]=it):it=e[212],it}function No(t){return t.preventDefault()}function Po(t){return t.type!=="connection"}function _o(t){return t.type==="connection"}function Io(t){return t.id}function mt(t){const e=R.c(7),{keys:o,label:a}=t;let s;e[0]!==o?(s=o.map(Oo),e[0]=o,e[1]=s):s=e[1];let r;e[2]!==s?(r=n.jsx("span",{className:"flex items-center gap-0.5",children:s}),e[2]=s,e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==r?(i=n.jsxs("span",{className:"flex items-center gap-1.5",children:[r,a]}),e[4]=a,e[5]=r,e[6]=i):i=e[6],i}function Oo(t){return n.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border bg-muted px-1 font-mono text-2xs",children:t},t)}const Ao=300*1e3,Co=2;function Eo(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function $o(t,e){return t.count>=Co&&t.version!==null&&t.version!==e}function Lo(){const t=R.c(31),e=Q();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ht.appVersionCheck(),queryFn:Ro,refetchInterval:Ao,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:s}=et(o),[r,i]=X.useState(0);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={version:null,count:0},t[1]=c):c=t[1];const[f,g]=X.useState(c);s!==r&&(i(s),g(v=>Eo(v,a,"4.584.5")));const[h,d]=X.useState(null);if(!$o(f,h))return null;let u;t[2]!==e?(u=e("announcements.version.ariaLabel"),t[2]=e,t[3]=u):u=t[3];let l;t[4]!==e?(l=e("announcements.version.dismiss"),t[4]=e,t[5]=l):l=t[5];let y;t[6]!==e?(y=e("announcements.version.eyebrow"),t[6]=e,t[7]=y):y=t[7];let m;t[8]!==e?(m=e("announcements.version.title"),t[8]=e,t[9]=m):m=t[9];let w;t[10]!==e?(w=e("announcements.version.description"),t[10]=e,t[11]=w):w=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Tt,{size:16}),t[12]=j):j=t[12];let p;t[13]!==f.version?(p=()=>d(f.version),t[13]=f.version,t[14]=p):p=t[14];let b;t[15]!==e?(b=e("announcements.version.currentSession",{version:"4.584.5"}),t[15]=e,t[16]=b):b=t[16];let S;t[17]!==e?(S=e("announcements.version.refresh"),t[17]=e,t[18]=S):S=t[18];let x;t[19]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Tt,{size:14}),t[19]=x):x=t[19];let k;t[20]!==S?(k=n.jsxs(F,{size:"sm",onClick:Do,children:[S,x]}),t[20]=S,t[21]=k):k=t[21];let T;return t[22]!==k||t[23]!==u||t[24]!==l||t[25]!==y||t[26]!==m||t[27]!==w||t[28]!==p||t[29]!==b?(T=n.jsx(Zt,{ariaLabel:u,dismissLabel:l,eyebrow:y,title:m,description:w,icon:j,tone:"system",onDismiss:p,footerLeading:b,actions:k}),t[22]=k,t[23]=u,t[24]=l,t[25]=y,t[26]=m,t[27]=w,t[28]=p,t[29]=b,t[30]=T):T=t[30],T}function Do(){return window.location.reload()}async function Ro(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function zo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Fo=Date.parse("2026-07-21T00:00:00Z"),Rt=t=>zo(Ze.ptBrAnnouncementSeen(t));function Bo(){const t=R.c(35),e=Q(),[o,a]=pn(),{data:s,isPending:r}=fe.useSession(),i=s?.user,c=i?.id,f=i?.createdAt,g=f!=null&&new Date(f).getTime()<Fo,h=yn()==="pt-BR",d=!r&&!!c&&g&&h&&o.language==="en"&&!Rt(c).has()&&!bn(),[u,l]=X.useState(!1),[y,m]=X.useState(!1);!u&&!r&&(l(!0),d&&c&&(Rt(c).mark(),a(qo),m(!0),xt("pt_br_auto_switch_shown")));let w;t[0]===Symbol.for("react.memo_cache_sentinel")?(w=D=>{xt("pt_br_auto_switch_closed",{action:D}),m(!1)},t[0]=w):w=t[0];const j=w;let p;t[1]!==a?(p=()=>{a(Mo),j("switch-back")},t[1]=a,t[2]=p):p=t[2];const b=p;let S;t[3]===Symbol.for("react.memo_cache_sentinel")?(S=D=>!D&&j("dismiss"),t[3]=S):S=t[3];let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=x):x=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let T;t[7]!==k?(T=n.jsx(Kt,{children:k}),t[7]=k,t[8]=T):T=t[8];let v;t[9]!==e?(v=e("announcements.ptBr.description"),t[9]=e,t[10]=v):v=t[10];let P;t[11]!==v?(P=n.jsx(xn,{children:v}),t[11]=v,t[12]=P):P=t[12];let _;t[13]!==T||t[14]!==P?(_=n.jsxs(qt,{children:[T,P]}),t[13]=T,t[14]=P,t[15]=_):_=t[15];let I;t[16]!==e?(I=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=I):I=t[17];let A;t[18]!==b||t[19]!==I?(A=n.jsx(F,{variant:"outline",onClick:b,children:I}),t[18]=b,t[19]=I,t[20]=A):A=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>j("ok"),t[21]=E):E=t[21];let $;t[22]!==e?($=e("announcements.ptBr.ok"),t[22]=e,t[23]=$):$=t[23];let L;t[24]!==$?(L=n.jsx(F,{onClick:E,children:$}),t[24]=$,t[25]=L):L=t[25];let O;t[26]!==A||t[27]!==L?(O=n.jsxs(wn,{children:[A,L]}),t[26]=A,t[27]=L,t[28]=O):O=t[28];let M;t[29]!==O||t[30]!==_?(M=n.jsxs(Ht,{className:"sm:max-w-md",children:[x,_,O]}),t[29]=O,t[30]=_,t[31]=M):M=t[31];let H;return t[32]!==y||t[33]!==M?(H=n.jsx(Ut,{open:y,onOpenChange:S,children:M}),t[32]=y,t[33]=M,t[34]=H):H=t[34],H}function Mo(t){return{...t,language:"en"}}function qo(t){return{...t,language:"pt-BR"}}function Ko(t){const e=Sn(t);return typeof e=="string"?e:void 0}function Ho(){return Ko("experiment-pipeline-check"),null}function Uo(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;jn(o.id,{name:o.name??void 0,slug:o.slug??void 0}),vn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ho,{}),e[0]=a):a=e[0],a}function Jo(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,c={mainpanel:void 0};o?c.virtualmcpid=o:e.virtualmcpid&&(c.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,h=(o??f)!==f;let d,u;return r?.panel?u=r.panel:r?.newThread&&!h&&kn(e.tabId)?(u=e.tabId,c.mainpanel=e.mainpanel,d=e.sidepanel):s?(u=s.tab,s.sidepanel!==void 0&&(d=s.sidepanel),s.mainpanel!==void 0&&(c.mainpanel=s.mainpanel)):!h&&e.tabId&&!Tn(e.tabId)&&(u=e.tabId),d!==void 0&&(c.sidepanel=d),r?.autosend&&(c.autosend=i),{tabId:ks(u,t.target,t.blogView),search:c}}const on="studio:thread-layout:v4",Vo=50;function an(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Go(t,e,o,a=Vo){const s=t.filter(([r])=>r!==e);for(s.push([e,an(o)]);s.length>a;)s.shift();return s}function vt(){try{const t=sessionStorage.getItem(on);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function rn(t){try{sessionStorage.setItem(on,JSON.stringify(t))}catch{}}function Wo(t,e){t&&rn(Go(vt(),t,e))}function Yo(t){if(!t)return null;const e=vt().find(([o])=>o===t);return e?an(e[1]):null}function Mi(t){if(!t)return;const e=vt(),o=e.filter(([a])=>a!==t);o.length!==e.length&&rn(o)}function ln(t){return{queryKey:ht.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function qi(t){const e=R.c(10);let o;e[0]!==t?(o=ln(t),e[0]=t,e[1]=o):o=e[1];const a=et(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function Qo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=Q();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const c=i,f=Xo;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(zt,{className:"h-6 w-6 text-primary"})}),e[2]=g):g=e[2];let h;e[3]!==r?(h=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=h):h=e[4];let d;e[5]!==h?(d=n.jsx("h3",{className:"text-lg font-medium",children:h}),e[5]=h,e[6]=d):d=e[6];let u;e[7]!==s||e[8]!==a||e[9]!==r?(u=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=u):u=e[10];let l;e[11]!==u?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[11]=u,e[12]=l):l=e[12];let y;e[13]!==d||e[14]!==l?(y=n.jsxs("div",{className:"space-y-2",children:[d,l]}),e[13]=d,e[14]=l,e[15]=y):y=e[15];let m;e[16]!==r?(m=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=m):m=e[17];let w;e[18]!==c||e[19]!==m?(w=n.jsx(F,{onClick:c,children:m}),e[18]=c,e[19]=m,e[20]=w):w=e[20];let j;e[21]!==r?(j=r("common.goBack"),e[21]=r,e[22]=j):j=e[22];let p;e[23]!==j?(p=n.jsx(F,{variant:"ghost",onClick:f,children:j}),e[23]=j,e[24]=p):p=e[24];let b;e[25]!==p||e[26]!==w?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[w,p]}),e[25]=p,e[26]=w,e[27]=b):b=e[27];let S;return e[28]!==b||e[29]!==y?(S=n.jsxs(pe,{children:[g,y,b]}),e[28]=b,e[29]=y,e[30]=S):S=e[30],S}function Xo(){window.location.href="/"}function Zo(t){const e=R.c(27),{notice:o,orgSlug:a}=t,s=Q();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(Nn,{className:"h-6 w-6 text-destructive"})}),e[0]=r):r=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let c;e[3]!==o.message?(c=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=c):c=e[4];let f;e[5]!==i||e[6]!==c?(f=n.jsxs("div",{className:"space-y-2",children:[i,c]}),e[5]=i,e[6]=c,e[7]=f):f=e[7];let g;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(g=o.ctaUrl&&o.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=g):g=e[10];const h=`/${encodeURIComponent(a)}/settings/infra-billing`;let d;e[11]!==s?(d=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=d):d=e[12];let u;e[13]!==h||e[14]!==d?(u=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:h,children:d})}),e[13]=h,e[14]=d,e[15]=u):u=e[15];let l;e[16]!==s?(l=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=l):l=e[17];let y;e[18]!==l?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:l})}),e[18]=l,e[19]=y):y=e[19];let m;e[20]!==y||e[21]!==g||e[22]!==u?(m=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,u,y]}),e[20]=y,e[21]=g,e[22]=u,e[23]=m):m=e[23];let w;return e[24]!==m||e[25]!==f?(w=n.jsxs(pe,{children:[r,f,m]}),e[24]=m,e[25]=f,e[26]=w):w=e[26],w}const ei="/settings/infra-billing";function ti(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(ei)}function ni(t){const e=R.c(7),{org:o,children:a}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const r=s;let i;return e[3]!==a||e[4]!==o||e[5]!==r?(i=n.jsx($n,{org:o,project:r,children:a}),e[3]=a,e[4]=o,e[5]=r,e[6]=i):i=e[6],i}function si(){const t=Jt(),e=As(),{org:o}=jt(),a=Pn({strict:!1}),s=Xt(),{openPanel:r,closePanel:i}=rs(),c=Ps(),f=_s(),g=Is(),h=Os(),d=Ts(),u=Es(),{data:l}=fe.useSession(),y=(p,b=!0)=>t({to:".",search:p,replace:b}),m=()=>y(p=>({...p,sidepanel:!0})),w=(p,b,S)=>{const x=!!f&&f===p;f&&!x&&Wo(f,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const k=x?null:Yo(p),T=Gt(o.id).id;if(b===T&&!S?.panel)return h(p,()=>S?.autosend?{autosend:At}:{});const v=Jo({prev:{virtualmcpid:c,tabId:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel},virtualMcpId:b,decopilotId:T,savedLayout:k,opts:S,autosendValue:At,target:e?.threads.get().find(P=>P.id===p),blogView:u});return h(p,()=>v.search,{virtualMcpId:b,view:{tabId:v.tabId}})};return{openSidePanel:m,setTaskId:w,createNewTask:async(p,b,S)=>{const x=crypto.randomUUID(),k=p??g,T=d==="blog"&&k===g&&!S?.panel?Ns(b,Cs(l?.user)):null;try{await e?.create({id:x,virtual_mcp_id:k,...T??(b?{branch:b}:{})})}catch{}w(x,k,{...S,newThread:!0})},openTab:r,closeTab:i}}const oi=new Set(["/$org/","/$org/home"]);function ii(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ai},t[0]=e):e=t[0],Wt(e)}function ai(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&oi.has(e)}function ri(){const t=R.c(54);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=_n(e)?.params.org,[s,r]=X.useState(!1),[i,c]=ts(),[f,g]=ws(),h=In(),d=ii(),u=a??"";let l;t[1]!==u?(l=ln(u),t[1]=u,t[2]=l):l=t[2];const y=!!a&&d;let m;t[3]!==l||t[4]!==y?(m={...l,enabled:y},t[3]=l,t[4]=y,t[5]=m):m=t[5],et(m);const{data:w}=fe.useSession(),j=w?.user?.id;let p,b;t[6]!==h?(p=()=>{const C=q=>{if(Pt(q)&&q.code==="KeyK"){q.preventDefault(),os();return}if(q.key==="?"&&!En(q.target)){q.preventDefault(),r(!0);return}Pt(q)&&q.code==="BracketLeft"&&h.history.canGoBack()&&(q.preventDefault(),h.history.back())};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},b=[h],t[6]=h,t[7]=p,t[8]=b):(p=t[7],b=t[8]),X.useEffect(p,b);let S;t[9]!==a||t[10]!==j?(S=On(a,j),t[9]=a,t[10]=j,t[11]=S):S=t[11];const{data:x}=Ft(S),k=x?.id,T=x?.slug,{data:v}=$s(k,T),P=!!v?.ssoRequired&&!v.authenticated,{data:_}=ns(T);let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I={select:li},t[12]=I):I=t[12];const A=Wt(I),E=_?.severity==="block"&&!ti(A),$=k??"",L=T??"";let O;t[13]!==L||t[14]!==$?(O=bs({connectionId:Vt,orgId:$,orgSlug:L}),t[13]=L,t[14]=$,t[15]=O):O=t[15];const M=!!k&&!!T;let H;if(t[16]!==O||t[17]!==M?(H={...O,enabled:M},t[16]=O,t[17]=M,t[18]=H):H=t[18],et(H),(!x||Nt(x)||P||E)&&ss(),!x){let C;return t[19]!==a?(C=n.jsx(Js,{orgSlug:a}),t[19]=a,t[20]=C):C=t[20],C}if(Nt(x)){localStorage.getItem(Ze.lastOrgSlug())===a&&localStorage.removeItem(Ze.lastOrgSlug()),Bt()?.org===a&&Mt();let C;return t[21]!==x.name?(C=n.jsx(An,{orgName:x.name}),t[21]=x.name,t[22]=C):C=t[22],C}if(E&&_){let C;return t[23]!==x.slug||t[24]!==_?(C=n.jsx(Zo,{notice:_,orgSlug:x.slug}),t[23]=x.slug,t[24]=_,t[25]=C):C=t[25],C}if(P){let C;return t[26]!==x.id||t[27]!==x.name||t[28]!==x.slug||t[29]!==v.domain?(C=n.jsx(Qo,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:v.domain}),t[26]=x.id,t[27]=x.name,t[28]=x.slug,t[29]=v.domain,t[30]=C):C=t[30],C}const ae=x.logo??null;let Z;t[31]!==x||t[32]!==ae?(Z={...x,logo:ae},t[31]=x,t[32]=ae,t[33]=Z):Z=t[33];let ee;t[34]!==x?(ee=n.jsx(Uo,{activeOrg:x}),t[34]=x,t[35]=ee):ee=t[35];let ne;t[36]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Cn,{}),t[36]=ne):ne=t[36];let te;t[37]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(po,{}),n.jsx(Lo,{})]}),t[37]=te):te=t[37];let J;t[38]!==i||t[39]!==c?(J=i&&n.jsx(To,{open:i,onOpenChange:c}),t[38]=i,t[39]=c,t[40]=J):J=t[40];let V;t[41]!==f||t[42]!==g?(V=f&&n.jsx(xs,{open:!0,onOpenChange:g,source:Ss()}),t[41]=f,t[42]=g,t[43]=V):V=t[43];let K;t[44]!==s?(K=n.jsx(bo,{open:s,onOpenChange:r}),t[44]=s,t[45]=K):K=t[45];let G,W;t[46]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Bo,{}),W=n.jsx(js,{}),t[46]=G,t[47]=W):(G=t[46],W=t[47]);let Y;return t[48]!==Z||t[49]!==ee||t[50]!==J||t[51]!==V||t[52]!==K?(Y=n.jsxs(ni,{org:Z,children:[ee,ne,te,J,V,K,G,W]}),t[48]=Z,t[49]=ee,t[50]=J,t[51]=V,t[52]=K,t[53]=Y):Y=t[53],Y}function li(t){return t.location.pathname}function ci(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(vs,{children:n.jsx(ri,{})}),t[0]=e):e=t[0],e}const Ki=Object.freeze(Object.defineProperty({__proto__:null,default:ci,usePanelActions:si},Symbol.toStringTag,{value:"Module"}));export{lo as a,qi as b,Mi as f,Ki as s,si as u};
@@ -1 +0,0 @@
1
- import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-BfWp2Wnw.js";import{C as M}from"./chat-context-BUMEnIPW.js";import{ChatLayout as x}from"./index-DVC5Xh86.js";import{L}from"./index-Bq8aKp2l.js";import{B as J}from"./blocks-preview-workspace-context-LI4fVaaR.js";import{e as T,p as K,s as V,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-D2nHZREM.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-zxzhDMiQ.js";import{C as Y}from"./content-tab-B1BKIfBg.js";import{T as Z}from"./tab-icon-glyph-hPo-Gg9t.js";import{r as tt}from"./resolve-tab-icon-C99S9oDL.js";import ot from"./agent-site-editor-DBCTlamd.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./repository-binding-BDu0tU0n.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./use-organization-settings-BliP9B1t.js";import"./schema-BJIhJXy6.js";import"./task-board-B-hxKp5U.js";import"./thread-intent-BtcwbxTJ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-gEMXX-QL.js";import"./session-runtime-DFmRKpVg.js";import"./use-entitlements-CQZj5lkl.js";import"./use-ai-providers-DgsrHLV3.js";import"./use-current-view-B5rf1h54.js";import"./use-in-settings-CRUM5hPE.js";import"./use-decopilot-events-B7ke0MhO.js";import"./use-mobile-UoyYEGbQ.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./Minimize01-BIynG3Ze.js";import"./XClose-WYCPZpkD.js";import"./thread-button-Dy4pRky4.js";import"./use-sidebar-collapsed-BtrwP1AE.js";import"./sheet-DT44IVE2.js";import"./use-chat-layout-state-CS1wv5hl.js";import"./toolbar-icon-button-CaY1wsmY.js";import"./resizable-BArMfXUk.js";import"./route-page-header-BeG7kyQP.js";import"./LayoutLeft-CPMSR00X.js";import"./task-key-DjK7Kw8s.js";import"./sortable.esm-CfU7eu9S.js";import"./Tool01-Bscrvuft.js";import"./agent-icon-Bq_Z7esB.js";import"./AlertCircle-mj0sz0gj.js";import"./UserCheck01-4mEtfdkD.js";import"./ArrowUp-D2bbOB2w.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./CheckCircle-BsBF4S8u.js";import"./TrendUp01-DMf7H3tv.js";import"./ChevronDown-CNlehUMA.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./ChevronUp-BIaMfxq-.js";import"./UserSquare-oo1b4ulW.js";import"./LinkBroken01-CxV1rDqL.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./SwitchHorizontal01-qTGCOGX6.js";import"./Eye-Xo5rS9iJ.js";import"./Image01-C5Xqhwp5.js";import"./Key01-h9Y3uaT_.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./Play-zsnTCnBK.js";import"./Plus-DAYIm6ow.js";import"./SearchMd-CTSUPag9.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Trash01-CevYpZEM.js";import"./Upload01-C_8HEOMT.js";import"./Users01-av_p4B03.js";import"./Zap-C-VVHO-P.js";import"./context-menu-dPQDOknl.js";import"./use-org-notice-DQ7N3XWA.js";import"./create-organization-dialog-BMVp8RKI.js";import"./form-CE_i7Gc_.js";import"./label-CWaQ3ANC.js";import"./project-apps-D28U2fPi.js";import"./use-recent-apps-CS-hhWwQ.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./use-debounced-value-DFWDa0qH.js";import"./feedback-BqoIMOg7.js";import"./textarea-DAZ3avm9.js";import"./use-sandbox-events-rgvK0R-0.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-DwTQhXO1.js";import"./use-voice-input-DyQL3diM.js";import"./popover-oFcDtUvN.js";import"./drawer-BtNmmbgW.js";import"./index-BFZAeRbT.js";import"./checkbox-BUvWR-iD.js";import"./select-BXZoshA8.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-D1ABa-c2.js";import"./sandbox-git-api-Bwhb8cKq.js";import"./save-status-BXxefOdA.js";import"./use-never-published-D71BtZNY.js";import"./hosted-reconcile-BV7FtBoJ.js";import"./blocks-tab-states-Bx0tgd5u.js";import"./empty-state-Y9RPHES1.js";import"./search-input-BjRiuWL9.js";import"./tabs-DQRKyhjY.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-CyAC1Jn2.js";import"./asset-utils-C_CFQkKi.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./usage-stats-BXxRbW0f.js";import"./utils-CVEq3hMx.js";import"./markdown-NetMLX1B.js";import"./use-copy-CCrC_M79.js";import"./gateway-client-CuVQGtSK.js";import"./switch-CfCCzQdg.js";import"./toggle-group-BgBCZLaa.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-Dq2ETPAf.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-D0o7MHwc.js";import"./variant-matcher-override-y-sjVy0V.js";import"./section-array-field-CYFq6Yfv.js";import"./use-fast-preview-draft-url-DYyM21UT.js";import"./parse-sections--l6s_VwH.js";import"./held-block-view-BCDffeao.js";import"./calendar-B0VrIuVV.js";import"./editor-classes-D6VscvFm.js";import"./empty-message-BFHsH7_h.js";import"./pair-B9IOPXjq.js";import"./collapsible-DYCInqz3.js";import"./use-task-board-items-CQPrgy8Z.js";import"./config-CVrGKu1z.js";import"./task-route-BwC6Um2K.js";import"./project-index-COi5kduS.js";import"./shell-layout-CQs-sSUy.js";import"./use-deployment-admin-B4GqO2uv.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-C4zzzxaS.js";import"./project-icon-WyFXKdgN.js";import"./new-project-dialog-B6Lwo0Gj.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./collection-search-CMlKHTQ0.js";import"./new-project-store-DQsI7Up8.js";import"./legacy-admin-welcome-dialog-BnEG9TvC.js";import"./required-auth-layout-ZTLOobSH.js";import"./use-org-sso-DrDj5K7f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-OOnse3pT.js";import"./types-DRaoZ_4I.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-Df8_gpBB.js";import"./use-mcp-prompts-CEtDj9VE.js";import"./use-thread-outputs-BMHx59-u.js";import"./file-type-icon-Bw6tHUJI.js";import"./named-rule-step-C6gSKxIZ.js";import"./slider-DCaB9Ine.js";import"./index-DvdlZugw.js";import"./tooltipContext-5-7GWaNH.js";import"./CategoricalChart-_BlSk5IS.js";import"./index-BBKDsc5X.js";import"./combobox-CMR7JQ5s.js";import"./scroll-area-Dt-NcLdT.js";import"./monaco-editor-BJmxWrxj.js";import"./editor-DJNkhCaU.js";import"./useQueries-Bay3GQsV.js";import"./device-hint-DBfDHhL1.js";import"./alert-fpttYoSQ.js";import"./virtual-mcp-m1o-7tiO.js";import"./url-slug-CTOX8lQF.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-DEMFK1PG.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-BIpPNwtn.js";import"./delete-copy-Dyr7i9lK.js";import"./category-tree-T_JTuIiu.js";import"./use-move-blocks-CFb10aGP.js";import"./index-DqFWx3BB.js";import"./view-header-CJ8vxIod.js";import"./use-cms-publish-actions-BoXieLUR.js";import"./use-content-sync-DzzCDnXY.js";import"./use-delete-block-ZPB3I9Ns.js";import"./item-actions-B-wWhBMR.js";import"./date-utils-CrvIKg-s.js";import"./badge-CEYLDtOG.js";import"./empty-state-FI4NppsL.js";import"./mustache-DsBc8nE5.js";import"./collection-table-wrapper-DbIa5pBT.js";import"./table-BG-lRGNn.js";import"./site-draft-actions-ChPsoqte.js";import"./separator-Jij0j-j1.js";import"./cms-store-drafts-BNAdDXxB.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-C-SbeINf.js";import"./input-BJ5cUSYm.js";import"./icon-button-vJpGdaXv.js";import"./chat-draft-B7hvjq7e.js";import"./use-deco-credits-CuB-vVK3.js";import"./input-BNlFS4tL.js";import"./suggestion-BO6GNdWk.js";import"./use-org-fs-BAgR3Jkh.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-nyy14OlO.js";import"./plan-ladder-NC686t6f.js";import"./add-connection-dialog-CVC64Gmd.js";import"./extract-connection-data-jaNfclWY.js";import"./metadata-D72DunRR.js";import"./connection-CqG6Tj46.js";import"./connection-card-CMRGPAUW.js";import"./connection-slug-BMyTAhb7.js";import"./schema-CI1Jg9rW.js";import"./connection-form-helpers-BliOgdtt.js";import"./authenticate-and-persist-oauth-Cj46Ik0_.js";import"./mcp-oauth-DOaDVyhA.js";import"./mcp-oauth-C138KPCE.js";import"./collection-tabs-ZW6Qb_Ul.js";import"./use-infinite-scroll-Cz_t92ww.js";import"./useSuspenseInfiniteQuery-BlIdZ7Pt.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-CIc7HrWU.js";import"./blog-view-gate-eJ0uCj97.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const it=o=>o;function et(o){const t=u.c(10),{candidates:i,invalidLink:c,shell:s,editor:e}=o,r=c===void 0?!1:c,m=s===void 0?it:s,[p,a]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==e?(h=e(p,f),t[1]=p,t[2]=e,t[3]=h):h=t[3],h}let l;t[4]!==i||t[5]!==r?(l=n.jsx(rt,{candidates:i,invalidLink:r,onConnect:a}),t[4]=i,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==m||t[8]!==l?(d=m(l),t[7]=m,t[8]=l,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:i,invalidLink:c,onConnect:s}=o,e=c===void 0?!1:c,[r]=G(),{language:m}=r;let p;t[0]!==s?(p=N=>s({endpoint:N}),t[0]=s,t[1]=p):p=t[1];let a;t[2]!==i||t[3]!==p?(a={candidates:i,onFound:p},t[2]=i,t[3]=p,t[4]=a):a=t[4];const l=q(a),{state:d,access:f,needsGesture:h}=l;let k;t[5]!==i||t[6]!==m?(k=new Intl.ListFormat(m,{style:"long",type:"conjunction"}).format(i.map(T)),t[5]=i,t[6]=m,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==l.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:l.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=l.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==e||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:e}),t[13]=C,t[14]=e,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),i=t?K(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),i&&V(i),{candidates:W(i,U()),invalidLink:t&&!i}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const o=u.c(6),t=P();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ct},o[0]=i):i=o[0];const c=O(i);let s;o[1]!==t||o[2]!==c?(s=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=s):s=o[3];let e;return o[4]!==s?(e=n.jsx(y.Tabs,{children:s}),o[4]=s,o[5]=e):e=o[5],e}function ct(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:i}=o,c=P(),{connection:s}=z(v),e=R(v,w);let r,m;if(t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==c){m=Symbol.for("react.early_return_sentinel");t:{if(r=s?T(s.endpoint):"",e.kind==="protocol"){m=i;break t}if(e.kind!=="unavailable"||I(e)){m=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=r,t[5]=m}else r=t[4],m=t[5];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;t[6]!==e.problem?(p=e.problem??{reason:"not-answering"},t[6]=e.problem,t[7]=p):p=t[7];let a;t[8]!==r||t[9]!==p?(a={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=a):a=t[10];let l;return t[11]!==r||t[12]!==a?(l=n.jsx(B,{wait:a,hosts:r}),t[11]=r,t[12]=a,t[13]=l):l=t[13],l}function dt(o){const t=u.c(6),{onLost:i}=o,c=R(v,w);let s;t[0]!==c?(s=I(c),t[0]=c,t[1]=s):s=t[1];const e=s;let r,m;return t[2]!==e||t[3]!==i?(r=()=>{e&&i()},m=[e,i],t[2]=e,t[3]=i,t[4]=r,t[5]=m):(r=t[4],m=t[5]),g.useEffect(r,m),null}const D={threadOpen:!1,contentOpen:!0,toggleFullscreen:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ft},o[0]=i):i=o[0];const c=O(i),s=!!t?.user;let e;o[1]!==s?(e={rail:s},o[1]=s,o[2]=e):e=o[2];const r=c??"preview";let m,p,a;o[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(lt,{}),p=n.jsx(ot,{}),a=n.jsx(x.Thread,{children:null}),o[3]=m,o[4]=p,o[5]=a):(m=o[3],p=o[4],a=o[5]);let l;o[6]!==r?(l=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:m,children:[p,a]})}),o[6]=r,o[7]=l):l=o[7];let d;return o[8]!==e||o[9]!==l?(d=n.jsx(L,{outsideOrg:e,children:l}),o[8]=e,o[9]=l,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(10),{children:i}=o,{data:c}=E.useSession(),s=!!c?.user;let e;t[0]!==s?(e={rail:s},t[0]=s,t[1]=e):e=t[1];let r;t[2]!==i?(r=n.jsx(x.Content,{children:i}),t[2]=i,t[3]=r):r=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(x.Thread,{children:null}),t[4]=m):m=t[4];let p;t[5]!==r?(p=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,m]})}),t[5]=r,t[6]=p):p=t[6];let a;return t[7]!==e||t[8]!==p?(a=n.jsx(L,{outsideOrg:e,children:p}),t[7]=e,t[8]=p,t[9]=a):a=t[9],a}const b=()=>{},vt={connection:null,set:b,clear:b};function Ir(){const o=u.c(3),[t]=g.useState(pt);let i;return o[0]!==t.candidates||o[1]!==t.invalidLink?(i=n.jsx(F,{org:nt,project:st,children:n.jsx(et,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=i):i=o[2],i}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(J,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function Ar(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function Dr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{Dr as SiteEditorContent,Ar as SiteEditorPreview,Ir as default};
@@ -1 +0,0 @@
1
- import{b as ee,a4 as te,q as ne,r as E,j as t,B as Q,n as F,d_ as ae,a5 as ce,aN as me,aM as pe,aJ as de,aH as ue,aI as ge,aL as fe,aK as he,b7 as xe,t as C,dM as je,c as se,m as ke,_ as ve,X as ye,Z as Se,Y as be,K as H,gE as Ce}from"./index-BfWp2Wnw.js";import{a as De}from"./SwitchHorizontal01-qTGCOGX6.js";import{D as we}from"./agent-icon-Bq_Z7esB.js";import{s as Ne}from"./Trash01-CevYpZEM.js";import{i as Pe}from"./Upload01-C_8HEOMT.js";import{i as ie}from"./Zap-C-VVHO-P.js";import{S as Ae}from"./search-toggle-BOD5VZ7W.js";import{E as Y}from"./empty-state-Y9RPHES1.js";import{C as Ee}from"./collection-tabs-ZW6Qb_Ul.js";import{S as Me,F as Oe}from"./folder-icon-A6dxvF3y.js";import{j as Te,k as Ie,n as Re}from"./use-org-fs-BAgR3Jkh.js";import{a7 as ze,R as Z,Z as _e}from"./chat-context-BUMEnIPW.js";import{c as $e}from"./context-shell-CU-clPo7.js";import"./AlertCircle-mj0sz0gj.js";import"./UserCheck01-4mEtfdkD.js";import"./Tool01-Bscrvuft.js";import"./ArrowUp-D2bbOB2w.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./CheckCircle-BsBF4S8u.js";import"./TrendUp01-DMf7H3tv.js";import"./ChevronDown-CNlehUMA.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./ChevronUp-BIaMfxq-.js";import"./UserSquare-oo1b4ulW.js";import"./LinkBroken01-CxV1rDqL.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./Minimize01-BIynG3Ze.js";import"./Eye-Xo5rS9iJ.js";import"./Image01-C5Xqhwp5.js";import"./Key01-h9Y3uaT_.js";import"./LayoutLeft-CPMSR00X.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./Play-zsnTCnBK.js";import"./Plus-DAYIm6ow.js";import"./SearchMd-CTSUPag9.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Users01-av_p4B03.js";import"./XClose-WYCPZpkD.js";import"./icon-button-vJpGdaXv.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./badge-CEYLDtOG.js";import"./markdown-NetMLX1B.js";import"./use-copy-CCrC_M79.js";import"./use-mobile-UoyYEGbQ.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./repository-binding-BDu0tU0n.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./task-board-B-hxKp5U.js";import"./schema-BJIhJXy6.js";import"./file-preview-DOlPWZsT.js";import"./utils-D1ABa-c2.js";import"./editor-DJNkhCaU.js";import"./file-type-icon-Bw6tHUJI.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./use-organization-settings-BliP9B1t.js";import"./thread-intent-BtcwbxTJ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-gEMXX-QL.js";import"./session-runtime-DFmRKpVg.js";import"./use-entitlements-CQZj5lkl.js";import"./use-ai-providers-DgsrHLV3.js";import"./use-current-view-B5rf1h54.js";import"./use-in-settings-CRUM5hPE.js";import"./use-decopilot-events-B7ke0MhO.js";import"./require-capability-DXiZ0OON.js";import"./access-gate-CBj6VxJ7.js";import"./capability-load-error-D7_TKHDu.js";import"./sections-DBJ1YFK4.js";import"./textarea-DAZ3avm9.js";import"./use-ask-in-chat-CC9ew9W1.js";import"./shell-layout-CQs-sSUy.js";import"./use-deployment-admin-B4GqO2uv.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DQ7N3XWA.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./integration-icon-C4zzzxaS.js";import"./project-icon-WyFXKdgN.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./use-debounced-value-DFWDa0qH.js";import"./new-project-dialog-B6Lwo0Gj.js";import"./label-CWaQ3ANC.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./collection-search-CMlKHTQ0.js";import"./new-project-store-DQsI7Up8.js";import"./legacy-admin-welcome-dialog-BnEG9TvC.js";import"./drawer-BtNmmbgW.js";import"./required-auth-layout-ZTLOobSH.js";import"./use-org-sso-DrDj5K7f.js";const J=200,Fe=new Set(["node_modules","__pycache__"]);function G(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return G(s).split("/").every(e=>!e.startsWith(".")&&!Fe.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const i=new Map;for(const o of s){const c=G(o).split("/");c.pop();const a=["skills",e,...c].join("/");i.set(a,[...i.get(a)??[],o])}return i}async function qe(s,e){const o=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(o)throw o.reason}function He(s,e){const i=$e(e),o=`skills/${s}`;return{id:`home/${o}`,name:i.name??s,description:i.description,disableModelInvocation:i.disableModelInvocation,source:"home",volume:Z,path:o,sandboxPath:`${ze}/${Z}/${o}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const i=s.indexOf(":");return i===-1?{label:e,glyph:ie}:{label:s.slice(i+1),glyph:s.startsWith("repo:")?je:we}}function Qe(s){const e=se.c(48),{entry:i,pending:o,onOpen:c,onDelete:a}=s,n=ee(),{org:g}=te();let M;e[0]!==i.source||e[1]!==g.name?(M=re(i.source,g.name),e[0]=i.source,e[1]=g.name,e[2]=M):M=e[2];const{label:O,glyph:I}=M;let D;e[3]!==i?(D=B(i),e[3]=i,e[4]=D):D=e[4];const R=D,w=o?"opacity-60":"hover:bg-accent";let f;e[5]!==w?(f=ke("relative transition-colors group overflow-hidden flex flex-col h-full",w),e[5]=w,e[6]=f):f=e[6];let m;e[7]!==i.name||e[8]!==c||e[9]!==o?(m=!o&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=c,e[9]=o,e[10]=m):m=e[10];const N=R?"default":"system",z=!R;let h;e[11]!==I||e[12]!==N||e[13]!==z?(h=t.jsx(Oe,{glyph:I,tone:N,readOnly:z,className:"size-8 shrink-0"}),e[11]=I,e[12]=N,e[13]=z,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==n?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ve,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"icon",children:t.jsx(De,{size:16})})}),t.jsx(Se,{align:"end",children:t.jsxs(be,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(Ne,{size:16}),n("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=n,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==i.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let k;e[23]!==i.description||e[24]!==n?(k=i.description||n("settings.skills.noDescription"),e[23]=i.description,e[24]=n,e[25]=k):k=e[25];let p;e[26]!==k?(p=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=p):p=e[27];let v;e[28]!==b||e[29]!==p?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,p]}),e[28]=b,e[29]=p,e[30]=v):v=e[30];let d;e[31]!==j||e[32]!==v?(d=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=d):d=e[33];let y;e[34]!==O||e[35]!==o||e[36]!==n?(y=o?n("settings.skills.importing"):O,e[34]=O,e[35]=o,e[36]=n,e[37]=y):y=e[37];let u;e[38]!==y?(u=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=u):u=e[39];let S;e[40]!==d||e[41]!==u?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[d,u]}),e[40]=d,e[41]=u,e[42]=S):S=e[42];let T;return e[43]!==o||e[44]!==S||e[45]!==f||e[46]!==m?(T=t.jsxs(Ce,{size:"flush","aria-busy":o,className:f,children:[m,S]}),e[43]=o,e[44]=S,e[45]=f,e[46]=m,e[47]=T):T=e[47],T}function V(s){const e=se.c(2),{children:i}=s;let o;return e[0]!==i?(o=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=o):o=e[1],o}function Ks(){const s=ee(),{org:e}=te(),i=Te(),{remove:o,upload:c}=Ie("home"),a=ne(),n=E.useRef(null),[g,M]=E.useState(""),[O,I]=E.useState(L),[D,R]=E.useState(!1),[w,f]=E.useState(null),[m,N]=E.useState(null),[z,h]=E.useState(null),x=()=>{a.invalidateQueries({queryKey:H.slashSkills(e.id)}),a.invalidateQueries({queryKey:H.orgFsSkills(e.id)})},j=r=>a.setQueryData(H.slashSkills(e.id),l=>r(l??[]));async function b(r){const l=[...r??[]];if(n.current&&(n.current.value=""),l.length===0)return;const P=l[0]?.webkitRelativePath??"";if(!P){C.error(s("settings.skills.importNeedsFolder"));return}const q=P.split("/")[0]??"",$=l.filter(Le),U=$.find(A=>G(A)==="SKILL.md");if(!U){C.error(s("settings.skills.importMissingSkillMd"));return}if($.length>J){C.error(s("settings.skills.importTooManyFiles",{count:String($.length),max:String(J)}));return}const _=Be(q),X=`skills/${_}`;let W=!1;R(!0);try{if(await Re(e.slug,"home",X)){C.error(s("settings.skills.importSlugTaken",{slug:_}));return}W=!0;const A=He(_,await U.text());j(le=>[A,...le]),h(A.id),await qe(Ke($,_),c.mutateAsync),C.success(s("settings.skills.importSuccess",{name:_}))}catch(A){W&&await o.mutateAsync(X).catch(()=>{}),C.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),R(!1)}}const k=g.toLowerCase(),p=(i.data??[]).filter(r=>r.name.toLowerCase().includes(k)||(r.description??"").toLowerCase().includes(k)).sort((r,l)=>Number(B(l))-Number(B(r))||r.name.localeCompare(l.name)),v=new Set((i.data??[]).map(r=>r.source)),d=new Map;for(const r of p)d.set(r.source,(d.get(r.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:p.length},...[...v].map(r=>({id:r,label:re(r,e.name).label,count:d.get(r)??0}))],u=v.has(O)?O:L,S=u===L?p:p.filter(r=>r.source===u),T=r=>f(_e(r.volume,r.path)),K=async()=>{if(!m)return;const{id:r,path:l}=m;N(null),j(P=>P.filter(q=>q.id!==r));try{await o.mutateAsync(l),C.success(s("settings.skills.deleteSuccess"))}catch(P){C.error(P instanceof Error?P.message:s("settings.skills.deleteError"))}finally{x()}},oe=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>n.current?.click(),children:[t.jsx(Pe,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(F,{children:[t.jsx(F.Content,{children:t.jsx(F.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(F.Actions,{secondary:t.jsx(Ae,{value:g,onChange:M,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:oe}),t.jsx("input",{ref:n,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:r=>{b(r.target.files)}}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:u,onTabChange:I}),i.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(r,l)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},l))})}):i.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:i.error instanceof Error?i.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{i.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(r=>{const l=r.id===z;return t.jsx(Qe,{entry:r,pending:l,onOpen:()=>T(r),onDelete:B(r)&&!l?()=>N(r):void 0},r.id)})})})]})})}),w&&t.jsx(Me,{skillPath:w,onClose:()=>f(null)},w),t.jsx(me,{open:m!==null,onOpenChange:r=>!r&&N(null),children:t.jsxs(pe,{children:[t.jsxs(de,{children:[t.jsx(ue,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(ge,{children:s("settings.skills.deleteDialogDescription",{name:m?.name??""})})]}),t.jsxs(fe,{children:[t.jsx(he,{children:s("settings.skills.cancel")}),t.jsx(xe,{onClick:K,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Ks as default};
@@ -1 +0,0 @@
1
- import{c as q,b as G,r as B,j as s,n as Q,m as J,f as X}from"./index-BfWp2Wnw.js";import{ChatLayout as Z}from"./index-DVC5Xh86.js";import{C as ee}from"./collection-tabs-ZW6Qb_Ul.js";import{A as M,a as te,b as se,u as ae}from"./use-task-board-analytics-Bm2Eiqvn.js";import{T as le,e as W}from"./time-range-picker-y-R1DMgB.js";import{S as ie,d as oe,c as re,a as ne,b as ce}from"./sheet-DT44IVE2.js";import{S as me,s as de,D as fe}from"./analytics-sections-BqryzJvo.js";import{a as pe}from"./task-route-BwC6Um2K.js";import{C as ge}from"./combobox-CMR7JQ5s.js";import"./use-mobile-UoyYEGbQ.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./Minimize01-BIynG3Ze.js";import"./XClose-WYCPZpkD.js";import"./thread-button-Dy4pRky4.js";import"./use-sidebar-collapsed-BtrwP1AE.js";import"./use-chat-layout-state-CS1wv5hl.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./repository-binding-BDu0tU0n.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./toolbar-icon-button-CaY1wsmY.js";import"./use-in-settings-CRUM5hPE.js";import"./resizable-BArMfXUk.js";import"./route-page-header-BeG7kyQP.js";import"./LayoutLeft-CPMSR00X.js";import"./use-current-view-B5rf1h54.js";import"./badge-CEYLDtOG.js";import"./popover-oFcDtUvN.js";import"./scroll-area-Dt-NcLdT.js";import"./index-BdQq_4o_.js";import"./ChevronDown-CNlehUMA.js";import"./UserCheck01-4mEtfdkD.js";import"./calendar-B0VrIuVV.js";import"./chart-Ef5OJL7Y.js";import"./CategoricalChart-_BlSk5IS.js";import"./index-BBKDsc5X.js";import"./tooltipContext-5-7GWaNH.js";import"./CartesianChart-DynFqoj3.js";import"./table-BG-lRGNn.js";import"./AlertCircle-mj0sz0gj.js";import"./ArrowUp-D2bbOB2w.js";import"./toggle-group-BgBCZLaa.js";import"./active-indicator-CCMhAsc_.js";import"./config-CVrGKu1z.js";import"./task-key-DjK7Kw8s.js";import"./CheckCircle-BsBF4S8u.js";import"./Eye-Xo5rS9iJ.js";import"./task-board-B-hxKp5U.js";import"./schema-BJIhJXy6.js";import"./AreaChart-DSUaBnyJ.js";import"./project-index-COi5kduS.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./SearchMd-CTSUPag9.js";const ue={TASK_BOARD_OPERATION:"taskBoard.analytics.tabOperation",TASK_BOARD_REWORK:"taskBoard.analytics.tabRework",TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_SPRINTS:"taskBoard.analytics.tabSprints",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function F(t){const e=new Date;return{from:(W(t.from).date??e).toISOString(),to:(W(t.to).date??e).toISOString()}}function z(t){const e=q.c(6),{className:d}=t;let r;e[0]!==d?(r=J("surface flex flex-col gap-6 p-4",d),e[0]=d,e[1]=r):r=e[1];let l,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]}),f=s.jsx("div",{className:"h-[140px] w-full animate-pulse rounded bg-muted/60"}),e[2]=l,e[3]=f):(l=e[2],f=e[3]);let n;return e[4]!==r?(n=s.jsxs("div",{className:r,children:[l,f]}),e[4]=r,e[5]=n):n=e[5],n}function xe(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[0,1,2,3].map(he)}),t[0]=e):e=t[0];let d;return t[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs("div",{className:"flex flex-col gap-4","aria-busy":!0,children:[e,s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.jsx(z,{}),s.jsx(z,{})]}),s.jsx(z,{})]}),t[1]=d):d=t[1],d}function he(t){return s.jsxs("div",{className:"surface flex flex-col gap-1 p-4",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]},t)}function Se(t){const e=q.c(27),{target:d,open:r,onOpenChange:l,params:f,taskHref:n}=t,j=G(),{data:i,isLoading:a,error:y}=se(f,r?d?.drill??null:null);let u;e[0]!==i?.sections?(u=i?.sections.find(ke),e[0]=i?.sections,e[1]=u):u=e[1];const c=u,T=c?.rows.length??0,b=d?.label;let x;e[2]!==b?(x=s.jsx(ie,{children:b}),e[2]=b,e[3]=x):x=e[3];let h;e[4]!==T||e[5]!==j||e[6]!==c?(h=c?j(T===1?"taskBoard.analytics.drillCountOne":"taskBoard.analytics.drillCount",{n:String(T)}):" ",e[4]=T,e[5]=j,e[6]=c,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx(oe,{children:h}),e[8]=h,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=s.jsxs(re,{children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let k;e[13]!==y||e[14]!==a||e[15]!==n||e[16]!==c?(k=a?s.jsx("div",{className:"flex flex-col gap-2 p-2","aria-busy":!0,children:[0,1,2,3,4].map(be)}):y?s.jsx("p",{className:"p-2 text-sm text-destructive",children:y.message}):c?.kind==="table"&&s.jsx(fe,{section:c,taskHref:n}),e[13]=y,e[14]=a,e[15]=n,e[16]=c,e[17]=k):k=e[17];let o;e[18]!==k?(o=s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:k}),e[18]=k,e[19]=o):o=e[19];let m;e[20]!==g||e[21]!==o?(m=s.jsxs(ne,{side:"right",size:"lg",children:[g,o]}),e[20]=g,e[21]=o,e[22]=m):m=e[22];let S;return e[23]!==l||e[24]!==r||e[25]!==m?(S=s.jsx(ce,{open:r,onOpenChange:l,children:m}),e[23]=l,e[24]=r,e[25]=m,e[26]=S):S=e[26],S}function be(t){return s.jsx("div",{className:"h-11 animate-pulse rounded bg-muted"},t)}function ke(t){return t.kind==="table"}function je(t){const e=q.c(26),{tool:d,org:r,project:l,range:f,taskHref:n}=t;let j;e[0]!==r||e[1]!==l||e[2]!==f?(j={org:r,project:l,...f},e[0]=r,e[1]=l,e[2]=f,e[3]=j):j=e[3];const i=j,{data:a,isPending:y,error:u}=te(d,i),[c,T]=B.useState(null),[b,x]=B.useState(!1);if(u){let o;return e[4]!==u.message?(o=s.jsx("div",{className:"surface p-8 text-center text-sm text-destructive",children:u.message}),e[4]=u.message,e[5]=o):o=e[5],o}if(y||!a){let o;return e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(xe,{}),e[6]=o):o=e[6],o}let h;if(e[7]!==a.range||e[8]!==a.sections||e[9]!==r||e[10]!==n){let o;e[12]!==a.range||e[13]!==r||e[14]!==n?(o=m=>s.jsx("div",{className:J("min-w-0",de(m)==="full"&&"md:col-span-2",m.kind==="table"&&"mt-6"),children:s.jsx(me,{section:m,threadLinks:!0,showOrg:r==="all",taskHref:n,range:a.range,onDrill:S=>{T(S),x(!0)}})},m.title),e[12]=a.range,e[13]=r,e[14]=n,e[15]=o):o=e[15],h=a.sections.map(o),e[7]=a.range,e[8]=a.sections,e[9]=r,e[10]=n,e[11]=h}else h=e[11];let p;e[16]!==h?(p=s.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:h}),e[16]=h,e[17]=p):p=e[17];let g;e[18]!==c||e[19]!==b||e[20]!==i||e[21]!==n?(g=s.jsx(Se,{target:c,open:b,onOpenChange:x,params:i,taskHref:n}),e[18]=c,e[19]=b,e[20]=i,e[21]=n,e[22]=g):g=e[22];let k;return e[23]!==p||e[24]!==g?(k=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,g]}),e[23]=p,e[24]=g,e[25]=k):k=e[25],k}function Te(t){const e=q.c(64),{org:d,project:r,taskHref:l,actions:f,notice:n,showTenants:j}=t,i=G(),[a,y]=B.useState("TASK_BOARD_OPERATION");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"now-30d",to:"now"},e[0]=u):u=e[0];const[c,T]=B.useState(u);let b;e[1]!==c?(b=()=>F(c),e[1]=c,e[2]=b):b=e[2];const[x,h]=B.useState(b);let p;if(e[3]!==j||e[4]!==i){let R;e[6]!==j?(R=Y=>Y!=="TASK_BOARD_TENANTS"||j,e[6]=j,e[7]=R):R=e[7];let O;e[8]!==i?(O=Y=>({id:Y,label:i(ue[Y])}),e[8]=i,e[9]=O):O=e[9],p=M.filter(R).map(O),e[3]=j,e[4]=i,e[5]=p}else p=e[5];const g=p;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=R=>{T(R),h(F(R))},e[10]=k):k=e[10];let o;e[11]!==i?(o=i("monitoring.timeRangePicker.absoluteTimeRange"),e[11]=i,e[12]=o):o=e[12];let m;e[13]!==i?(m=i("monitoring.timeRangePicker.from"),e[13]=i,e[14]=m):m=e[14];let S;e[15]!==i?(S=i("monitoring.timeRangePicker.to"),e[15]=i,e[16]=S):S=e[16];let _;e[17]!==i?(_=i("monitoring.timeRangePicker.applyTimeRange"),e[17]=i,e[18]=_):_=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==S||e[22]!==_?(v={absoluteTimeRange:o,from:m,to:S,applyTimeRange:_},e[19]=o,e[20]=m,e[21]=S,e[22]=_,e[23]=v):v=e[23];let A;e[24]!==i?(A=i("monitoring.timeRangePicker.last7Days"),e[24]=i,e[25]=A):A=e[25];let N;e[26]!==A?(N={label:A,from:"now-7d",to:"now",value:"7d"},e[26]=A,e[27]=N):N=e[27];let w;e[28]!==i?(w=i("monitoring.timeRangePicker.last30Days"),e[28]=i,e[29]=w):w=e[29];let D;e[30]!==w?(D={label:w,from:"now-30d",to:"now",value:"30d"},e[30]=w,e[31]=D):D=e[31];let C;e[32]!==i?(C=i("monitoring.timeRangePicker.last90Days"),e[32]=i,e[33]=C):C=e[33];let P;e[34]!==C?(P={label:C,from:"now-90d",to:"now",value:"90d"},e[34]=C,e[35]=P):P=e[35];let E;e[36]!==N||e[37]!==D||e[38]!==P?(E=[N,D,P],e[36]=N,e[37]=D,e[38]=P,e[39]=E):E=e[39];let K;e[40]!==c||e[41]!==E||e[42]!==v?(K=s.jsx(le,{value:c,onChange:k,labels:v,quickRanges:E}),e[40]=c,e[41]=E,e[42]=v,e[43]=K):K=e[43];let L;e[44]!==f||e[45]!==K?(L=s.jsxs(Q.Actions,{children:[f,K]}),e[44]=f,e[45]=K,e[46]=L):L=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=R=>{const O=M.find(Y=>Y===R);O&&y(O)},e[47]=U):U=e[47];let $;e[48]!==a||e[49]!==g?($=s.jsx(ee,{placement:"page",tabs:g,activeTab:a,onTabChange:U}),e[48]=a,e[49]=g,e[50]=$):$=e[50];let I;e[51]!==d||e[52]!==r||e[53]!==x||e[54]!==a||e[55]!==l?(I=s.jsx(je,{tool:a,org:d,project:r,range:x,taskHref:l},a),e[51]=d,e[52]=r,e[53]=x,e[54]=a,e[55]=l,e[56]=I):I=e[56];let H;e[57]!==n||e[58]!==I?(H=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1200px] flex-col gap-4 px-4 pt-6 pb-10 md:px-10",children:[n,I]}),e[57]=n,e[58]=I,e[59]=H):H=e[59];let V;return e[60]!==L||e[61]!==$||e[62]!==H?(V=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:[L,$,H]}),e[60]=L,e[61]=$,e[62]=H,e[63]=V):V=e[63],V}function Ot(){const t=q.c(37),e=G();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const r=X(d),l=r.org??"",f=r.agentId,n=ae(),[j,i]=B.useState(l),[a,y]=B.useState(l);l!==j&&(i(l),y(l));const u=!f&&(n.data?.isTaskBoardAdmin??!1);let c;t[1]!==e?(c=e("taskBoard.analytics.orgCurrent"),t[1]=e,t[2]=c):c=t[2];let T;t[3]!==l||t[4]!==c?(T={value:l,label:c},t[3]=l,t[4]=c,t[5]=T):T=t[5];let b;t[6]!==e?(b=e("taskBoard.analytics.orgAll"),t[6]=e,t[7]=b):b=t[7];let x;t[8]!==b?(x={value:"all",label:b},t[8]=b,t[9]=x):x=t[9];let h;if(t[10]!==n.data?.orgs||t[11]!==l||t[12]!==T||t[13]!==x){let v;t[15]!==l?(v=A=>A.slug!==l,t[15]=l,t[16]=v):v=t[16],h=[T,x,...(n.data?.orgs??[]).filter(v).map(ve)],t[10]=n.data?.orgs,t[11]=l,t[12]=T,t[13]=x,t[14]=h}else h=t[14];const p=h;let g;t[17]!==a||t[18]!==l||t[19]!==f?(g=v=>pe(l,{id:v,keySeq:null},f)+(a===l?"":`?boardOrg=${encodeURIComponent(a)}`),t[17]=a,t[18]=l,t[19]=f,t[20]=g):g=t[20];const o=a==="all"?void 0:g;let m;t[21]!==u||t[22]!==a||t[23]!==p||t[24]!==e?(m=u&&s.jsx(ge,{options:p,value:a,onChange:y,width:"w-[220px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[21]=u,t[22]=a,t[23]=p,t[24]=e,t[25]=m):m=t[25];let S;t[26]!==a||t[27]!==l||t[28]!==e?(S=a!==l&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:a==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:a})}),t[26]=a,t[27]=l,t[28]=e,t[29]=S):S=t[29];let _;return t[30]!==u||t[31]!==a||t[32]!==f||t[33]!==o||t[34]!==m||t[35]!==S?(_=s.jsx(Z.Content,{children:s.jsx(Te,{org:a,project:f,taskHref:o,showTenants:u,actions:m,notice:S},a)}),t[30]=u,t[31]=a,t[32]=f,t[33]=o,t[34]=m,t[35]=S,t[36]=_):_=t[36],_}function ve(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}export{Ot as default};
@@ -1 +0,0 @@
1
- import{c as l,a4 as n,j as r,K as f}from"./index-BfWp2Wnw.js";import{ChatLayout as d}from"./index-DVC5Xh86.js";import{m as u,P as x,T as h}from"./mock-board-Dl0qBjh7.js";import{F as j}from"./feature-gate-32y7GiUu.js";import"./use-mobile-UoyYEGbQ.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./Minimize01-BIynG3Ze.js";import"./XClose-WYCPZpkD.js";import"./thread-button-Dy4pRky4.js";import"./use-sidebar-collapsed-BtrwP1AE.js";import"./sheet-DT44IVE2.js";import"./use-chat-layout-state-CS1wv5hl.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./repository-binding-BDu0tU0n.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./toolbar-icon-button-CaY1wsmY.js";import"./use-in-settings-CRUM5hPE.js";import"./resizable-BArMfXUk.js";import"./route-page-header-BeG7kyQP.js";import"./LayoutLeft-CPMSR00X.js";import"./use-current-view-B5rf1h54.js";import"./task-key-DjK7Kw8s.js";import"./sortable.esm-CfU7eu9S.js";import"./use-task-board-analytics-Bm2Eiqvn.js";import"./combobox-CMR7JQ5s.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./SearchMd-CTSUPag9.js";import"./popover-oFcDtUvN.js";import"./agent-icon-Bq_Z7esB.js";import"./AlertCircle-mj0sz0gj.js";import"./UserCheck01-4mEtfdkD.js";import"./Tool01-Bscrvuft.js";import"./ArrowUp-D2bbOB2w.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./CheckCircle-BsBF4S8u.js";import"./TrendUp01-DMf7H3tv.js";import"./ChevronDown-CNlehUMA.js";import"./ChevronUp-BIaMfxq-.js";import"./UserSquare-oo1b4ulW.js";import"./LinkBroken01-CxV1rDqL.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./SwitchHorizontal01-qTGCOGX6.js";import"./Eye-Xo5rS9iJ.js";import"./Image01-C5Xqhwp5.js";import"./Key01-h9Y3uaT_.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./Play-zsnTCnBK.js";import"./Plus-DAYIm6ow.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Trash01-CevYpZEM.js";import"./Upload01-C_8HEOMT.js";import"./Users01-av_p4B03.js";import"./Zap-C-VVHO-P.js";import"./use-task-board-prompts-CywAfsLX.js";import"./badge-CEYLDtOG.js";import"./icon-button-vJpGdaXv.js";import"./use-org-fs-BAgR3Jkh.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./use-automations-lWDVj-CU.js";import"./task-board-B-hxKp5U.js";import"./schema-BJIhJXy6.js";import"./watch-sse-pool-gEMXX-QL.js";import"./backoff-CrEUbyZT.js";import"./search-toggle-BOD5VZ7W.js";import"./context-menu-dPQDOknl.js";import"./super-agent-icon-Cu5ZQ2qC.js";import"./daily-pulse-BIfjhIvm.js";import"./config-CVrGKu1z.js";import"./new-project-dialog-B6Lwo0Gj.js";import"./label-CWaQ3ANC.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./thread-intent-BtcwbxTJ.js";import"./delay-CnY5UFtP.js";import"./session-runtime-DFmRKpVg.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./collection-search-CMlKHTQ0.js";import"./use-debounced-value-DFWDa0qH.js";import"./use-organization-settings-BliP9B1t.js";import"./new-project-store-DQsI7Up8.js";import"./use-task-board-items-CQPrgy8Z.js";import"./use-decopilot-events-B7ke0MhO.js";import"./sprints-C1z9xhcL.js";import"./select-BXZoshA8.js";import"./index-BdQq_4o_.js";import"./use-tags-CFlTqeDj.js";import"./feedback-BqoIMOg7.js";import"./task-route-BwC6Um2K.js";import"./project-index-COi5kduS.js";import"./calendar-B0VrIuVV.js";import"./alert-fpttYoSQ.js";import"./collapsible-DYCInqz3.js";import"./use-copy-CCrC_M79.js";import"./markdown-NetMLX1B.js";import"./chat-context-BUMEnIPW.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./use-entitlements-CQZj5lkl.js";import"./use-ai-providers-DgsrHLV3.js";import"./index-DN6wMhlh.js";import"./usage-stats-BXxRbW0f.js";import"./utils-CVEq3hMx.js";import"./gateway-client-CuVQGtSK.js";import"./form-CE_i7Gc_.js";import"./editor-classes-D6VscvFm.js";import"./suggestion-BO6GNdWk.js";import"./index-BDN2Il8W.js";import"./index-DqFWx3BB.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-BCP6vVwh.js";import"./use-connection-Df8_gpBB.js";import"./project-icon-WyFXKdgN.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-Kjk5YJ_A.js";import"./useSuspenseInfiniteQuery-BlIdZ7Pt.js";import"./pair-B9IOPXjq.js";import"./shell-layout-CQs-sSUy.js";import"./use-deployment-admin-B4GqO2uv.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DQ7N3XWA.js";import"./integration-icon-C4zzzxaS.js";import"./legacy-admin-welcome-dialog-BnEG9TvC.js";import"./drawer-BtNmmbgW.js";import"./required-auth-layout-ZTLOobSH.js";import"./use-org-sso-DrDj5K7f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-OOnse3pT.js";import"./types-DRaoZ_4I.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-CEtDj9VE.js";import"./use-thread-outputs-BMHx59-u.js";import"./file-type-icon-Bw6tHUJI.js";import"./use-infinite-scroll-Cz_t92ww.js";import"./task-status-BiZeTmx1.js";import"./separator-Jij0j-j1.js";import"./chat-draft-B7hvjq7e.js";import"./feature-paywall-nyy14OlO.js";import"./plan-ladder-NC686t6f.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function ar(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{ar as default};
@@ -1 +0,0 @@
1
- import{c as D,i as ue,f as ye,r as V,K as fe,al as pe,cH as Ne,b as ee,j as l,h as Ae,a4 as be,a0 as _e,T as Ce}from"./index-BfWp2Wnw.js";import{ChatLayout as se}from"./index-DVC5Xh86.js";import{S as we}from"./analytics-sections-BqryzJvo.js";import{e as ke}from"./watch-sse-pool-gEMXX-QL.js";import{B as Ee}from"./badge-CEYLDtOG.js";import{C as Le}from"./combobox-CMR7JQ5s.js";import{S as ae,b as oe,a as ne,d as ce,c as Z}from"./select-BXZoshA8.js";import{e as Re,a as Oe,b as Se,T as F,d as Ie,c as q}from"./table-BG-lRGNn.js";import{T as le,a as $e,c as re,b as De}from"./tabs-DQRKyhjY.js";import{c as He,S as Be,a as Ke,b as Pe}from"./sheet-DT44IVE2.js";import{T as Fe}from"./thread-sheet-body-Kjk5YJ_A.js";import{b as qe}from"./use-connection-Df8_gpBB.js";import{u as Ve}from"./use-mcp-client-HASDr5yn.js";import{u as Ye}from"./repository-binding-BDu0tU0n.js";import"./use-mobile-UoyYEGbQ.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./Minimize01-BIynG3Ze.js";import"./XClose-WYCPZpkD.js";import"./thread-button-Dy4pRky4.js";import"./use-sidebar-collapsed-BtrwP1AE.js";import"./use-chat-layout-state-CS1wv5hl.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./use-project-scope-CFftAYVY.js";import"./toolbar-icon-button-CaY1wsmY.js";import"./use-in-settings-CRUM5hPE.js";import"./resizable-BArMfXUk.js";import"./route-page-header-BeG7kyQP.js";import"./LayoutLeft-CPMSR00X.js";import"./use-current-view-B5rf1h54.js";import"./auth-BOZ5swZI.js";import"./chart-Ef5OJL7Y.js";import"./CategoricalChart-_BlSk5IS.js";import"./index-BBKDsc5X.js";import"./tooltipContext-5-7GWaNH.js";import"./CartesianChart-DynFqoj3.js";import"./AlertCircle-mj0sz0gj.js";import"./ArrowUp-D2bbOB2w.js";import"./UserCheck01-4mEtfdkD.js";import"./toggle-group-BgBCZLaa.js";import"./active-indicator-CCMhAsc_.js";import"./config-CVrGKu1z.js";import"./task-key-DjK7Kw8s.js";import"./CheckCircle-BsBF4S8u.js";import"./Eye-Xo5rS9iJ.js";import"./task-board-B-hxKp5U.js";import"./schema-BJIhJXy6.js";import"./AreaChart-DSUaBnyJ.js";import"./backoff-CrEUbyZT.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./command-DAachgGl.js";import"./index-C_tC1dxx.js";import"./SearchMd-CTSUPag9.js";import"./popover-oFcDtUvN.js";import"./index-BdQq_4o_.js";import"./ChevronDown-CNlehUMA.js";import"./ChevronUp-BIaMfxq-.js";import"./useSuspenseInfiniteQuery-BlIdZ7Pt.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./LinkBroken01-CxV1rDqL.js";import"./pair-B9IOPXjq.js";import"./agent-icon-Bq_Z7esB.js";import"./Tool01-Bscrvuft.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./TrendUp01-DMf7H3tv.js";import"./UserSquare-oo1b4ulW.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./SwitchHorizontal01-qTGCOGX6.js";import"./Image01-C5Xqhwp5.js";import"./Key01-h9Y3uaT_.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./Play-zsnTCnBK.js";import"./Plus-DAYIm6ow.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Trash01-CevYpZEM.js";import"./Upload01-C_8HEOMT.js";import"./Users01-av_p4B03.js";import"./Zap-C-VVHO-P.js";import"./collapsible-DYCInqz3.js";import"./use-copy-CCrC_M79.js";import"./usage-stats-BXxRbW0f.js";import"./utils-CVEq3hMx.js";import"./markdown-NetMLX1B.js";import"./chat-context-BUMEnIPW.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./use-organization-settings-BliP9B1t.js";import"./thread-intent-BtcwbxTJ.js";import"./delay-CnY5UFtP.js";import"./session-runtime-DFmRKpVg.js";import"./use-entitlements-CQZj5lkl.js";import"./use-ai-providers-DgsrHLV3.js";import"./use-decopilot-events-B7ke0MhO.js";import"./gateway-client-CuVQGtSK.js";import"./form-CE_i7Gc_.js";import"./label-CWaQ3ANC.js";import"./use-task-board-items-CQPrgy8Z.js";import"./task-route-BwC6Um2K.js";import"./project-index-COi5kduS.js";import"./shell-layout-CQs-sSUy.js";import"./use-deployment-admin-B4GqO2uv.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DQ7N3XWA.js";import"./integration-icon-C4zzzxaS.js";import"./project-icon-WyFXKdgN.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./use-debounced-value-DFWDa0qH.js";import"./new-project-dialog-B6Lwo0Gj.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./collection-search-CMlKHTQ0.js";import"./new-project-store-DQsI7Up8.js";import"./legacy-admin-welcome-dialog-BnEG9TvC.js";import"./drawer-BtNmmbgW.js";import"./required-auth-layout-ZTLOobSH.js";import"./use-org-sso-DrDj5K7f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-OOnse3pT.js";import"./types-DRaoZ_4I.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-CEtDj9VE.js";import"./use-thread-outputs-BMHx59-u.js";import"./file-type-icon-Bw6tHUJI.js";import"./use-infinite-scroll-Cz_t92ww.js";import"./task-status-BiZeTmx1.js";function xe(){return ye({strict:!1}).org??""}function Me(){const t=D.c(8),e=xe();let s;t[0]!==e?(s=fe.threadAnalyticsOrgs(e),t[0]=e,t[1]=s):s=t[1];const r=!!e;let i;t[2]!==e?(i=()=>pe(e,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=e,t[3]=i):i=t[3];let o;return t[4]!==s||t[5]!==r||t[6]!==i?(o={queryKey:s,enabled:r,queryFn:i,staleTime:3e5},t[4]=s,t[5]=r,t[6]=i,t[7]=o):o=t[7],ue(o)}const Ue=3e3,me=new Map,ge=new Map;function ze(t){let e=ge.get(t);return e||(e=s=>{let r=null;const i=()=>{r||(r=setTimeout(()=>{r=null,me.set(t,(me.get(t)??0)+1),s()},Ue))},o=ke.subscribe(t,i,i);return()=>{r&&clearTimeout(r),o()}},ge.set(t,e)),e}function Ge(t,e){const s=D.c(5);let r;s[0]!==e||s[1]!==t?(r=ze(t),s[0]=e,s[1]=t,s[2]=r):r=s[2];let i;return s[3]!==t?(i=()=>me.get(t)??0,s[3]=t,s[4]=i):i=s[4],V.useSyncExternalStore(r,i)}function We(t,e){const s=D.c(11),r=xe(),i=Ge(r,e);let o;s[0]!==t||s[1]!==r||s[2]!==i?(o=fe.threadAnalytics(r,"live",t,i),s[0]=t,s[1]=r,s[2]=i,s[3]=o):o=s[3];const a=!!r;let c;s[4]!==t||s[5]!==r?(c=()=>pe(r,"THREAD_ANALYTICS_LIVE",t),s[4]=t,s[5]=r,s[6]=c):c=s[6];let n;return s[7]!==o||s[8]!==a||s[9]!==c?(n={queryKey:o,enabled:a,queryFn:c,placeholderData:Ne},s[7]=o,s[8]=a,s[9]=c,s[10]=n):n=s[10],ue(n)}function Qe(t,e){const s=D.c(12),r=xe();let i;s[0]!==e||s[1]!==r||s[2]!==t?(i=fe.threadAnalytics(r,t,e,0),s[0]=e,s[1]=r,s[2]=t,s[3]=i):i=s[3];const o=!!r;let a;s[4]!==e||s[5]!==r||s[6]!==t?(a=()=>pe(r,t,e),s[4]=e,s[5]=r,s[6]=t,s[7]=a):a=s[7];let c;return s[8]!==i||s[9]!==o||s[10]!==a?(c={queryKey:i,enabled:o,queryFn:a},s[8]=i,s[9]=o,s[10]=a,s[11]=c):c=s[11],ue(c)}const Je=[1,7,30,90],Xe=["in_progress","requires_action","failed","completed"],Ze=["chat","automation","task"],X="any",de={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},ve={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},et={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function he(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx("div",{className:"flex justify-center py-12",children:l.jsx(Ae,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Te(t){const e=D.c(2),{message:s}=t;let r;return e[0]!==s?(r=l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ie(t){const e=D.c(9),{label:s,value:r}=t;let i;e[0]!==s?(i=l.jsx("div",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1];let o;e[2]!==r?(o=r.toLocaleString(),e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=l.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:o}),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==a?(c=l.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i,a]}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function tt(t){const e=D.c(56),{thread:s,onOpen:r}=t,i=ee(),o=s.status;let a;e[0]!==s.updatedAt?(a=new Date(s.updatedAt).toLocaleString(),e[0]=s.updatedAt,e[1]=a):a=e[1];let c;e[2]!==a?(c=l.jsx(q,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:a}),e[2]=a,e[3]=c):c=e[3];let n;e[4]!==s.orgSlug?(n=l.jsx(q,{className:"text-sm",children:s.orgSlug}),e[4]=s.orgSlug,e[5]=n):n=e[5];let u;e[6]!==r||e[7]!==s?(u=()=>r(s),e[6]=r,e[7]=s,e[8]=u):u=e[8];let m;e[9]!==i||e[10]!==s.title?(m=s.title||i("thread.analytics.untitled"),e[9]=i,e[10]=s.title,e[11]=m):m=e[11];let x;e[12]!==u||e[13]!==m?(x=l.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:m}),e[12]=u,e[13]=m,e[14]=x):x=e[14];let d;e[15]!==s.failureReason||e[16]!==s.lastError||e[17]!==s.status?(d=s.status==="failed"&&(s.lastError||s.failureReason)&&l.jsx("div",{className:"truncate text-xs text-destructive",children:s.lastError??s.failureReason}),e[15]=s.failureReason,e[16]=s.lastError,e[17]=s.status,e[18]=d):d=e[18];let h;e[19]!==x||e[20]!==d?(h=l.jsxs(q,{className:"max-w-sm text-sm",children:[x,d]}),e[19]=x,e[20]=d,e[21]=h):h=e[21];const g=ve[s.kind];let f;e[22]!==i||e[23]!==g?(f=i(g),e[22]=i,e[23]=g,e[24]=f):f=e[24];let w;e[25]!==f?(w=l.jsx(q,{className:"text-sm",children:f}),e[25]=f,e[26]=w):w=e[26];const k=et[o]??"outline";let j;e[27]!==o||e[28]!==i||e[29]!==s.status?(j=de[o]?i(de[o]):s.status,e[27]=o,e[28]=i,e[29]=s.status,e[30]=j):j=e[30];let N;e[31]!==k||e[32]!==j?(N=l.jsx(q,{children:l.jsx(Ee,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=N):N=e[33];const E=s.userEmail??s.userName??"—";let y;e[34]!==E?(y=l.jsx(q,{className:"max-w-48 truncate text-sm",children:E}),e[34]=E,e[35]=y):y=e[35];let b;e[36]!==s.agent?(b=l.jsx(q,{className:"max-w-48 truncate text-sm",children:s.agent}),e[36]=s.agent,e[37]=b):b=e[37];let A;e[38]!==s.usd?(A=s.usd===null?"—":`$${s.usd.toFixed(2)}`,e[38]=s.usd,e[39]=A):A=e[39];let S;e[40]!==A?(S=l.jsx(q,{className:"text-sm tabular-nums",children:A}),e[40]=A,e[41]=S):S=e[41];let v;e[42]!==s.tokens?(v=s.tokens===null?"—":s.tokens.toLocaleString(),e[42]=s.tokens,e[43]=v):v=e[43];let T;e[44]!==v?(T=l.jsx(q,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=T):T=e[45];let _;return e[46]!==w||e[47]!==N||e[48]!==y||e[49]!==b||e[50]!==S||e[51]!==c||e[52]!==T||e[53]!==n||e[54]!==h?(_=l.jsxs(Se,{children:[c,n,h,w,N,y,b,S,T]}),e[46]=w,e[47]=N,e[48]=y,e[49]=b,e[50]=S,e[51]=c,e[52]=T,e[53]=n,e[54]=h,e[55]=_):_=e[55],_}function st(t){const e=D.c(51),{org:s}=t,r=ee(),[i,o]=V.useState(X),[a,c]=V.useState(X),n=i===X?void 0:i,u=a===X?void 0:a;let m;e[0]!==s||e[1]!==n||e[2]!==u?(m={org:s,status:n,kind:u,limit:150},e[0]=s,e[1]=n,e[2]=u,e[3]=m):m=e[3];const x=m,{data:d,isLoading:h,error:g}=We(x,!0),[f,w]=V.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(oe,{className:"w-[180px]",size:"sm",children:l.jsx(ne,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let N;e[7]!==j?(N=l.jsx(Z,{value:X,children:j}),e[7]=j,e[8]=N):N=e[8];let E;e[9]!==r?(E=Xe.map(C=>l.jsx(Z,{value:C,children:r(de[C])},C)),e[9]=r,e[10]=E):E=e[10];let y;e[11]!==N||e[12]!==E?(y=l.jsxs(ce,{children:[N,E]}),e[11]=N,e[12]=E,e[13]=y):y=e[13];let b;e[14]!==i||e[15]!==y?(b=l.jsxs(ae,{value:i,onValueChange:o,children:[k,y]}),e[14]=i,e[15]=y,e[16]=b):b=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(oe,{className:"w-[180px]",size:"sm",children:l.jsx(ne,{})}),e[17]=A):A=e[17];let S;e[18]!==r?(S=r("thread.analytics.anyKind"),e[18]=r,e[19]=S):S=e[19];let v;e[20]!==S?(v=l.jsx(Z,{value:X,children:S}),e[20]=S,e[21]=v):v=e[21];let T;e[22]!==r?(T=Ze.map(C=>l.jsx(Z,{value:C,children:r(ve[C])},C)),e[22]=r,e[23]=T):T=e[23];let _;e[24]!==v||e[25]!==T?(_=l.jsxs(ce,{children:[v,T]}),e[24]=v,e[25]=T,e[26]=_):_=e[26];let L;e[27]!==a||e[28]!==_?(L=l.jsxs(ae,{value:a,onValueChange:c,children:[A,_]}),e[27]=a,e[28]=_,e[29]=L):L=e[29];let H;e[30]===Symbol.for("react.memo_cache_sentinel")?(H=l.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=H):H=e[30];let B;e[31]!==r?(B=r("thread.analytics.liveHint"),e[31]=r,e[32]=B):B=e[32];let R;e[33]!==B?(R=l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[H,B]}),e[33]=B,e[34]=R):R=e[34];let O;e[35]!==L||e[36]!==R||e[37]!==b?(O=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,L,R]}),e[35]=L,e[36]=R,e[37]=b,e[38]=O):O=e[38];let I;e[39]!==d||e[40]!==g||e[41]!==h||e[42]!==r?(I=h?l.jsx(he,{}):g?l.jsx(Te,{message:g.message}):d?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(ie,{label:r("thread.analytics.countRunning"),value:d.counts.running}),l.jsx(ie,{label:r("thread.analytics.countWaiting"),value:d.counts.waiting}),l.jsx(ie,{label:r("thread.analytics.countFailedHour"),value:d.counts.failedLastHour})]}),d.threads.length===0?l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):l.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:l.jsxs(Re,{children:[l.jsx(Oe,{children:l.jsxs(Se,{children:[l.jsx(F,{children:r("thread.analytics.colUpdated")}),l.jsx(F,{children:r("thread.analytics.colOrg")}),l.jsx(F,{children:r("thread.analytics.colChat")}),l.jsx(F,{children:r("thread.analytics.colKind")}),l.jsx(F,{children:r("thread.analytics.colStatus")}),l.jsx(F,{children:r("thread.analytics.colUser")}),l.jsx(F,{children:r("thread.analytics.colAgent")}),l.jsx(F,{children:r("thread.analytics.colCost")}),l.jsx(F,{children:r("thread.analytics.colTokens")})]})}),l.jsx(Ie,{children:d.threads.map(C=>l.jsx(tt,{thread:C,onOpen:w},C.id))})]})})]}):null,e[39]=d,e[40]=g,e[41]=h,e[42]=r,e[43]=I):I=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=()=>w(null),e[44]=K):K=e[44];let $;e[45]!==f?($=l.jsx(rt,{thread:f,onClose:K}),e[45]=f,e[46]=$):$=e[46];let P;return e[47]!==O||e[48]!==I||e[49]!==$?(P=l.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[O,I,$]}),e[47]=O,e[48]=I,e[49]=$,e[50]=P):P=e[50],P}function lt(t){const e=D.c(14),{thread:s}=t,{org:r,locator:i}=be();let o;e[0]!==r.id||e[1]!==r.slug?(o={connectionId:Ce,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=o):o=e[2];const a=Ve(o),c=qe(),n=Ye();let u;e[3]!==s.createdAt||e[4]!==s.id||e[5]!==s.status||e[6]!==s.title?(u={id:s.id,title:s.title,status:s.status,created_at:s.createdAt},e[3]=s.createdAt,e[4]=s.id,e[5]=s.status,e[6]=s.title,e[7]=u):u=e[7];let m;return e[8]!==a||e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==n?(m=l.jsx(Fe,{thread:u,client:a,locator:i,connections:c,virtualMcps:n,members:void 0,meta:!1}),e[8]=a,e[9]=c,e[10]=i,e[11]=u,e[12]=n,e[13]=m):m=e[13],m}function rt(t){const e=D.c(12),{thread:s,onClose:r}=t,i=ee(),{project:o}=be(),a=!!s;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let n;e[2]!==o||e[3]!==i||e[4]!==s?(n=s&&l.jsx(_e,{org:{id:s.orgId,name:s.orgSlug,slug:s.orgSlug,logo:null},project:o,children:l.jsx(V.Suspense,{fallback:l.jsx(He,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:l.jsx(Be,{className:"truncate text-sm leading-snug",children:s.title||i("thread.analytics.untitled")})}),children:l.jsx(lt,{thread:s})})}),e[2]=o,e[3]=i,e[4]=s,e[5]=n):n=e[5];let u;e[6]!==n?(u=l.jsx(Ke,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:n}),e[6]=n,e[7]=u):u=e[7];let m;return e[8]!==a||e[9]!==c||e[10]!==u?(m=l.jsx(Pe,{open:a,onOpenChange:c,children:u}),e[8]=a,e[9]=c,e[10]=u,e[11]=m):m=e[11],m}function je(t){const e=D.c(16),{tool:s,org:r,from:i,to:o}=t,a=ee();let c;e[0]!==i||e[1]!==r||e[2]!==o?(c={org:r,from:i,to:o},e[0]=i,e[1]=r,e[2]=o,e[3]=c):c=e[3];const{data:n,isLoading:u,error:m}=Qe(s,c);if(u){let f;return e[4]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(he,{}),e[4]=f):f=e[4],f}if(m){let f;return e[5]!==m.message?(f=l.jsx(Te,{message:m.message}),e[5]=m.message,e[6]=f):f=e[6],f}if(!n)return null;let x;e[7]!==n.sections?(x=n.sections.map(it),e[7]=n.sections,e[8]=x):x=e[8];let d;e[9]!==a?(d=a("thread.analytics.costFootnote"),e[9]=a,e[10]=d):d=e[10];let h;e[11]!==d?(h=l.jsx("p",{className:"text-xs text-muted-foreground",children:d}),e[11]=d,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=l.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function it(t){return l.jsx(we,{section:t,threadLinks:!0},t.title)}function Ol(){const t=D.c(99),e=ee(),s=ye({strict:!1}).org??"",r=Me(),[i,o]=V.useState("all"),[a,c]=V.useState(7),[n,u]=V.useState("live"),[m]=V.useState(ot);let x;t[0]!==m?(x=new Date(m).toISOString(),t[0]=m,t[1]=x):x=t[1];const d=x;let h;t[2]!==a||t[3]!==m?(h=new Date(m-a*864e5).toISOString(),t[2]=a,t[3]=m,t[4]=h):h=t[4];const g=h;if(r.isLoading){let p;return t[5]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(se.Content,{children:l.jsx(he,{})}),t[5]=p):p=t[5],p}if(!r.data?.isAdmin){let p;t[6]!==e?(p=e("thread.analytics.notAdmin"),t[6]=e,t[7]=p):p=t[7];let J;return t[8]!==p?(J=l.jsx(se.Content,{children:l.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:p})}),t[8]=p,t[9]=J):J=t[9],J}let f;t[10]!==e?(f=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=f):f=t[11];let w;t[12]!==f?(w={value:"all",label:f},t[12]=f,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==s||t[17]!==k?(j={value:s,label:k},t[16]=s,t[17]=k,t[18]=j):j=t[18];let N;if(t[19]!==r.data.orgs||t[20]!==s||t[21]!==w||t[22]!==j){let p;t[24]!==s?(p=J=>J.slug!==s,t[24]=s,t[25]=p):p=t[25],N=[w,j,...r.data.orgs.filter(p).map(at)],t[19]=r.data.orgs,t[20]=s,t[21]=w,t[22]=j,t[23]=N}else N=t[23];const E=N;let y;t[26]!==e?(y=e("thread.analytics.title"),t[26]=e,t[27]=y):y=t[27];let b;t[28]!==y?(b=l.jsx("h1",{className:"text-xl font-medium text-foreground",children:y}),t[28]=y,t[29]=b):b=t[29];let A;t[30]!==e?(A=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=A):A=t[31];let S;t[32]!==e?(S=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=S):S=t[33];let v;t[34]!==i||t[35]!==E||t[36]!==S||t[37]!==A?(v=l.jsx(Le,{options:E,value:i,onChange:o,width:"w-[240px]",searchPlaceholder:A,emptyMessage:S}),t[34]=i,t[35]=E,t[36]=S,t[37]=A,t[38]=v):v=t[38];let T;t[39]!==a||t[40]!==e||t[41]!==n?(T=n!=="live"&&l.jsxs(ae,{value:String(a),onValueChange:p=>c(Number(p)),children:[l.jsx(oe,{className:"w-[140px]",size:"sm",children:l.jsx(ne,{})}),l.jsx(ce,{children:Je.map(p=>l.jsx(Z,{value:String(p),children:e("taskBoard.analytics.rangeDays",{days:String(p)})},p))})]}),t[39]=a,t[40]=e,t[41]=n,t[42]=T):T=t[42];let _;t[43]!==v||t[44]!==T?(_=l.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,T]}),t[43]=v,t[44]=T,t[45]=_):_=t[45];let L;t[46]!==_||t[47]!==b?(L=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,_]}),t[46]=_,t[47]=b,t[48]=L):L=t[48];let H;t[49]!==i||t[50]!==s||t[51]!==e?(H=i!==s&&l.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[49]=i,t[50]=s,t[51]=e,t[52]=H):H=t[52];let B;t[53]===Symbol.for("react.memo_cache_sentinel")?(B=p=>u(p),t[53]=B):B=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let O;t[56]!==R?(O=l.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=O):O=t[57];let I;t[58]!==e?(I=e("thread.analytics.tabUsage"),t[58]=e,t[59]=I):I=t[59];let K;t[60]!==I?(K=l.jsx(le,{value:"usage",children:I}),t[60]=I,t[61]=K):K=t[61];let $;t[62]!==e?($=e("thread.analytics.tabErrors"),t[62]=e,t[63]=$):$=t[63];let P;t[64]!==$?(P=l.jsx(le,{value:"errors",children:$}),t[64]=$,t[65]=P):P=t[65];let C;t[66]!==O||t[67]!==K||t[68]!==P?(C=l.jsxs($e,{children:[O,K,P]}),t[66]=O,t[67]=K,t[68]=P,t[69]=C):C=t[69];let Y;t[70]!==i||t[71]!==n?(Y=n==="live"&&l.jsx(st,{org:i}),t[70]=i,t[71]=n,t[72]=Y):Y=t[72];let M;t[73]!==Y?(M=l.jsx(re,{value:"live",children:Y}),t[73]=Y,t[74]=M):M=t[74];let U;t[75]!==g||t[76]!==i||t[77]!==n||t[78]!==d?(U=n==="usage"&&l.jsx(je,{tool:"THREAD_ANALYTICS_USAGE",org:i,from:g,to:d}),t[75]=g,t[76]=i,t[77]=n,t[78]=d,t[79]=U):U=t[79];let z;t[80]!==U?(z=l.jsx(re,{value:"usage",children:U}),t[80]=U,t[81]=z):z=t[81];let G;t[82]!==g||t[83]!==i||t[84]!==n||t[85]!==d?(G=n==="errors"&&l.jsx(je,{tool:"THREAD_ANALYTICS_ERRORS",org:i,from:g,to:d}),t[82]=g,t[83]=i,t[84]=n,t[85]=d,t[86]=G):G=t[86];let W;t[87]!==G?(W=l.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let Q;t[89]!==C||t[90]!==M||t[91]!==z||t[92]!==W||t[93]!==n?(Q=l.jsxs(De,{value:n,onValueChange:B,children:[C,M,z,W]}),t[89]=C,t[90]=M,t[91]=z,t[92]=W,t[93]=n,t[94]=Q):Q=t[94];let te;return t[95]!==L||t[96]!==H||t[97]!==Q?(te=l.jsx(se.Content,{children:l.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[L,H,Q]})})}),t[95]=L,t[96]=H,t[97]=Q,t[98]=te):te=t[98],te}function at(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function ot(){return Date.now()}export{Ol as default};
@@ -1 +0,0 @@
1
- import{c as h,r as g,c8 as j,j as n,b as S,d as v,a4 as B}from"./index-BfWp2Wnw.js";import{c as T}from"./use-sidebar-collapsed-BtrwP1AE.js";import{m as C}from"./use-chat-layout-state-CS1wv5hl.js";import{t as $}from"./Minimize01-BIynG3Ze.js";import{T as E,a as y,c as N}from"./tooltip-CqV-qcYU.js";import{T as P}from"./toolbar-icon-button-CaY1wsmY.js";import{u as z}from"./use-in-settings-CRUM5hPE.js";const x=g.createContext(null);function L(t){const e=h.c(5),{children:s}=t,[r,c]=g.useState(null);let a;e[0]!==r?(a={target:r,setTarget:c},e[0]=r,e[1]=a):a=e[1];let o;return e[2]!==s||e[3]!==a?(o=n.jsx(x,{value:a,children:s}),e[2]=s,e[3]=a,e[4]=o):o=e[4],o}function _(){const t=g.use(x);if(!t)throw new Error("Sidebar thread controls require a Layout");return t}function b(t){const e=h.c(16),{open:s,onToggle:r}=t,c=S(),{setOpenMobile:a}=T(),o=s?"page.closeThread":"page.openThread";let l;e[0]!==c||e[1]!==o?(l=c(o),e[0]=c,e[1]=o,e[2]=l):l=e[2];const i=l;let u;e[3]!==r||e[4]!==a?(u=()=>{r(),a(!1)},e[3]=r,e[4]=a,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx($,{size:16}),e[6]=m):m=e[6];let d;e[7]!==i||e[8]!==s||e[9]!==u?(d=n.jsx(E,{asChild:!0,children:n.jsx(P,{"aria-label":i,"aria-pressed":s,active:s,className:"size-7 shrink-0 group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:size-8",onClick:u,children:m})}),e[7]=i,e[8]=s,e[9]=u,e[10]=d):d=e[10];let f;e[11]!==i?(f=n.jsx(y,{side:"right",children:i}),e[11]=i,e[12]=f):f=e[12];let p;return e[13]!==d||e[14]!==f?(p=n.jsxs(N,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=p):p=e[15],p}function O(t){const e=h.c(3),s=g.use(x);let r;return e[0]!==t||e[1]!==s?(r=s?.target?j.createPortal(n.jsx(b,{...t}),s.target):null,e[0]=t,e[1]=s,e[2]=r):r=e[2],r}function A(){const t=h.c(9),{setTarget:e}=_(),s=z(),{isMobile:r}=T(),c=v(),{org:a}=B();if(!r)return null;let o;t[0]!==e?(o=n.jsx("div",{ref:e,className:"peer/thread-button contents empty:hidden"}),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==s||t[3]!==c||t[4]!==a?(l=n.jsx("div",{className:"hidden peer-empty/thread-button:contents",children:n.jsx(b,{open:!1,onToggle:()=>{c(s?{to:"/$org/home",params:{org:a.slug},search:{sidepanel:!0,mainpanel:!1}}:{to:".",search:k,replace:!0})}})}),t[2]=s,t[3]=c,t[4]=a,t[5]=l):l=t[5];let i;return t[6]!==o||t[7]!==l?(i=n.jsxs(n.Fragment,{children:[o,l]}),t[6]=o,t[7]=l,t[8]=i):i=t[8],i}function k(t){return{...t,...C("chat")}}export{A as S,L as a,O as b};