decocms 3.73.1 → 3.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/dist/client/assets/{AlertCircle-DMqR3m0L.js → AlertCircle-CqOVaXci.js} +1 -1
  2. package/dist/client/assets/ArrowRight-CTyWXakV.js +1 -0
  3. package/dist/client/assets/{ArrowUpRight-DeYzuaJ8.js → ArrowUpRight-xZqz95CV.js} +1 -1
  4. package/dist/client/assets/Check-CBlc59JS.js +1 -0
  5. package/dist/client/assets/{CheckCircle-D6b8lFUP.js → CheckCircle-CY28HM-W.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-CYFvWHpZ.js → ChevronDown-2DYEh3oE.js} +1 -1
  7. package/dist/client/assets/{ChevronLeft-DXSAgzPw.js → ChevronLeft-B75Dfp8F.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Dj41DV2U.js → ChevronRight-ax97YKuz.js} +1 -1
  9. package/dist/client/assets/ChevronUp-g-p4yrQF.js +1 -0
  10. package/dist/client/assets/{DotsVertical-y5lMfVOQ.js → DotsVertical-DRQxhuxE.js} +1 -1
  11. package/dist/client/assets/{Eye-D3THRXh6.js → Eye-Bxan3Sqa.js} +1 -1
  12. package/dist/client/assets/{FilterLines-BPeCeYIz.js → FilterLines-DglSMqXL.js} +1 -1
  13. package/dist/client/assets/{Globe01-BquIL2vg.js → Globe01-C4v1tUFc.js} +1 -1
  14. package/dist/client/assets/{Globe04-BBRZWdJY.js → Globe04-uuqaZSXc.js} +1 -1
  15. package/dist/client/assets/{HardDrive-DmtpWveq.js → HardDrive-BNcT29uK.js} +1 -1
  16. package/dist/client/assets/{Key01-Lcx9qTy7.js → Key01-dy7oLiQz.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-CkiSxkS_.js → LayoutLeft-C7Cwg5dB.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-jwO28Eeb.js → LinkExternal01-Bxjblrw6.js} +1 -1
  19. package/dist/client/assets/{Monitor01-L6hrk62b.js → Monitor01-gDDtOZYE.js} +1 -1
  20. package/dist/client/assets/{Palette-ClNyQOQA.js → Palette-CmP2nXkm.js} +1 -1
  21. package/dist/client/assets/{Play-C6QgiUls.js → Play-DR1SFBmJ.js} +1 -1
  22. package/dist/client/assets/{Plus-_82_8sq8.js → Plus-41YUU3X4.js} +1 -1
  23. package/dist/client/assets/{SearchMd-C3Pmxf99.js → SearchMd-kFyk-Zpn.js} +1 -1
  24. package/dist/client/assets/{Settings02-B7hO-Tma.js → Settings02-BQvb6NDs.js} +1 -1
  25. package/dist/client/assets/{Shield01-RDE62wRx.js → Shield01-CwXJTWO7.js} +1 -1
  26. package/dist/client/assets/{Star01-BfSEPDRT.js → Star01-DmOmdDYT.js} +1 -1
  27. package/dist/client/assets/{Stars01-W6Wl0Pse.js → Stars01-DY8Z1eLP.js} +1 -1
  28. package/dist/client/assets/{Stars02-9vF61uFx.js → Stars02-RZSAG7rn.js} +1 -1
  29. package/dist/client/assets/{Sun-BxuJFhF6.js → Sun-DqCoPTzZ.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-yw5VS97V.js → SwitchHorizontal01-B6awNCuJ.js} +1 -1
  31. package/dist/client/assets/{Tool01-B4SsemMS.js → Tool01-YzuqPBZS.js} +1 -1
  32. package/dist/client/assets/{Trash01-CG0gTYx7.js → Trash01-xhyzjxAl.js} +1 -1
  33. package/dist/client/assets/{Upload01-BlvGy5d-.js → Upload01-Dz2Fe5CV.js} +1 -1
  34. package/dist/client/assets/{User01-CTuKNCEa.js → User01-pnGUlp6P.js} +1 -1
  35. package/dist/client/assets/{Users01-KXiCgru2.js → Users01-D6UupxJE.js} +1 -1
  36. package/dist/client/assets/{Users03-BOvyNEV4.js → Users03-DJchxrNl.js} +1 -1
  37. package/dist/client/assets/{X-CKIhVHQk.js → X-RMAI-CnD.js} +1 -1
  38. package/dist/client/assets/XCircle-C_zOOXjw.js +1 -0
  39. package/dist/client/assets/{XClose-Ig7y9gcI.js → XClose-CL72OyYw.js} +1 -1
  40. package/dist/client/assets/{Zap-w60sxAoc.js → Zap-T1H5BLPl.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-C7yt7KfQ.js → ZapSquare-DI8RUlXz.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-DVSwpwUz.js → ZoomOut-BSvbLjMK.js} +1 -1
  43. package/dist/client/assets/{access-gate-CEtgmlCt.js → access-gate-DstBDFIb.js} +1 -1
  44. package/dist/client/assets/add-section-modal-DBrqHaz_.js +1 -0
  45. package/dist/client/assets/agent-icon-DTdfxhoG.js +1 -0
  46. package/dist/client/assets/agents-list-D0eHoQaW.js +1 -0
  47. package/dist/client/assets/ai-providers-c7kYb7as.js +1 -0
  48. package/dist/client/assets/{alert-dialog-BuJSufuR.js → alert-dialog-DN5_Bt7m.js} +3 -3
  49. package/dist/client/assets/{alert-DIqgQstn.js → alert-waKnXqGk.js} +1 -1
  50. package/dist/client/assets/app-editor-CjIo2G2v.js +1 -0
  51. package/dist/client/assets/{auth-tkqpBHf1.js → auth-D-vZuhvw.js} +1 -1
  52. package/dist/client/assets/{auth-catchall-CHUZWWSw.js → auth-catchall-CSqcjejU.js} +1 -1
  53. package/dist/client/assets/auth-entry-DQ7yt2AO.js +1 -0
  54. package/dist/client/assets/{auth-split-layout-DRR0KEkj.js → auth-split-layout-B5a3UwoJ.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-40GibzkL.js → automation-list-row-D-BX02uH.js} +1 -1
  56. package/dist/client/assets/{automation-runs-BEntIYkJ.js → automation-runs-B1BUJ0hr.js} +1 -1
  57. package/dist/client/assets/automations-BNbMRDB2.js +1 -0
  58. package/dist/client/assets/{avatar-DfTXVgX9.js → avatar-BSTZ3pLJ.js} +1 -1
  59. package/dist/client/assets/backoff-CrEUbyZT.js +1 -0
  60. package/dist/client/assets/{badge-an9iff2c.js → badge-C-FrgWTB.js} +1 -1
  61. package/dist/client/assets/{block-document-DZEmtfok.js → block-document-tkHTmk1o.js} +1 -1
  62. package/dist/client/assets/{brand-context-BhD6vM0G.js → brand-context-DTdKKUc_.js} +1 -1
  63. package/dist/client/assets/buckets-Buf4MXLa.js +1 -0
  64. package/dist/client/assets/{calendar-tEWC6_XV.js → calendar-0PXqzC_Y.js} +1 -1
  65. package/dist/client/assets/{capability-load-error-BXEh1mp-.js → capability-load-error-aingpVqh.js} +1 -1
  66. package/dist/client/assets/{card-Ckx3Kwvj.js → card-DWaNR_SK.js} +1 -1
  67. package/dist/client/assets/category-editor-Dp8tqW7w.js +1 -0
  68. package/dist/client/assets/chat-context-Bdh5JOoc.js +21 -0
  69. package/dist/client/assets/checkbox-DATFo6mV.js +1 -0
  70. package/dist/client/assets/{cli-auth-success-DWLJa27h.js → cli-auth-success-Q9j8LqnR.js} +1 -1
  71. package/dist/client/assets/collection-detail--PV4VgNS.js +1 -0
  72. package/dist/client/assets/collection-display-button-D2Dz4UQ9.js +1 -0
  73. package/dist/client/assets/{collection-search-CCzYANV5.js → collection-search-B3PCp0sJ.js} +1 -1
  74. package/dist/client/assets/{collection-tabs-CBstOc4r.js → collection-tabs-B5bp1dvV.js} +1 -1
  75. package/dist/client/assets/{command-pIEd50-L.js → command-BKUAhUTA.js} +1 -1
  76. package/dist/client/assets/commerce-onboarding-DQThXa88.js +1 -0
  77. package/dist/client/assets/connect-desktop-dialog-ueZU4yr9.js +1 -0
  78. package/dist/client/assets/{connection-card-CqvtHNnU.js → connection-card-D6eF5jM2.js} +1 -1
  79. package/dist/client/assets/connection-detail-YrkoweOb.js +1 -0
  80. package/dist/client/assets/{connection-form-helpers-ByFrPc9N.js → connection-form-helpers-yM5F39cE.js} +1 -1
  81. package/dist/client/assets/connections-Co0mzlVI.js +1 -0
  82. package/dist/client/assets/context-menu-rnym8CLu.js +1 -0
  83. package/dist/client/assets/{decopilot-D6xQ1qh2.js → decopilot-CR1kdCz1.js} +1 -1
  84. package/dist/client/assets/decopilot-sse-pool-CznG8mAO.js +1 -0
  85. package/dist/client/assets/delay-CnY5UFtP.js +1 -0
  86. package/dist/client/assets/dialog-D5b28yFH.js +1 -0
  87. package/dist/client/assets/{domain-settings-DIU6G_-3.js → domain-settings-0tGbevEe.js} +1 -1
  88. package/dist/client/assets/drawer-ColE1TJK.js +1 -0
  89. package/dist/client/assets/dropdown-menu-DYoIlQSg.js +1 -0
  90. package/dist/client/assets/{empty-state-BrSxZrfZ.js → empty-state-DHarvDyS.js} +1 -1
  91. package/dist/client/assets/{extract-connection-data-CBzjCfJ2.js → extract-connection-data-uuFWP3hz.js} +1 -1
  92. package/dist/client/assets/file-explorer-B808VENL.js +2 -0
  93. package/dist/client/assets/{file-type-icon-BOPDPlds.js → file-type-icon-DEvi9B1o.js} +1 -1
  94. package/dist/client/assets/{files-cbAPSaRo.js → files-CWeUPbcm.js} +1 -1
  95. package/dist/client/assets/{form-BZY9ZRz4.js → form-BKLsYVOj.js} +1 -1
  96. package/dist/client/assets/general-Drmz-YIR.js +1 -0
  97. package/dist/client/assets/{github-repo-picker-CrW8szfE.js → github-repo-picker-D5sPE9uB.js} +1 -1
  98. package/dist/client/assets/{hooks-DLdyjUhZ.js → hooks-Bb_hjVv2.js} +6 -6
  99. package/dist/client/assets/image-field-1axHkRyS.js +1 -0
  100. package/dist/client/assets/{import-from-deco-dialog-BVpWCCC9.js → import-from-deco-dialog-C8-Pf8Mw.js} +2 -2
  101. package/dist/client/assets/{index-CqHy6432.js → index-BJGyjJJt.js} +10 -10
  102. package/dist/client/assets/index-BolisCRq.js +1 -0
  103. package/dist/client/assets/{index-BQXvSs-s.js → index-CUKe_k5H.js} +3 -3
  104. package/dist/client/assets/{index-WHuW26DU.js → index-CXYNhsAc.js} +12 -12
  105. package/dist/client/assets/{index-BBz_54sx.js → index-CjzKLlWA.js} +1 -1
  106. package/dist/client/assets/{index-DexxTctJ.js → index-D972QGLJ.js} +1 -1
  107. package/dist/client/assets/{index-C3Ab2DJ2.js → index-D9IK491L.js} +29 -29
  108. package/dist/client/assets/{index-CszBxeF9.js → index-DCgPZCHy.js} +1 -1
  109. package/dist/client/assets/index-DTxciPdS.js +1 -0
  110. package/dist/client/assets/{index-xsAZnQ1t.js → index-DjKTb3Jx.js} +1 -1
  111. package/dist/client/assets/{index-BwhwNs2D.js → index-Dmymcqqe.js} +4 -4
  112. package/dist/client/assets/{index-CE8AoMpS.js → index-DuzF9uKh.js} +1 -1
  113. package/dist/client/assets/{index-BY2TC4bG.js → index-dhnE5w8d.js} +2 -2
  114. package/dist/client/assets/{index-C4w1u5Cz.js → index-nU2ktNYZ.js} +1 -1
  115. package/dist/client/assets/{index-redirect-DHc9uFFV.js → index-redirect-CbKHrvpG.js} +1 -1
  116. package/dist/client/assets/{input-BmmiCY6T.js → input-B9q8KV4F.js} +1 -1
  117. package/dist/client/assets/{integration-icon-CFvT6ZpF.js → integration-icon-BVY3nW43.js} +1 -1
  118. package/dist/client/assets/label-x3YhPSqt.js +1 -0
  119. package/dist/client/assets/login-DJq6zJkS.js +1 -0
  120. package/dist/client/assets/{mcp-oauth-BGmk7Mi5.js → mcp-oauth-HIYUmIS7.js} +1 -1
  121. package/dist/client/assets/{members-DO2LVAyy.js → members-CEIQEz29.js} +2 -2
  122. package/dist/client/assets/{monaco-editor-yw8USVwR.js → monaco-editor-DQsadrcR.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-BuR-EBQ0.js → monitoring-stats-row-XQSX37Es.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-wtZvQiOu.js → oauth-callback-BHYoQdej.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-17H-B-SW.js → oauth-callback-ai-provider-BQxMDjkd.js} +1 -1
  126. package/dist/client/assets/onboarding-YBSFHrWd.js +1 -0
  127. package/dist/client/assets/{org-install-e7rNwps-.js → org-install-BYuosPdC.js} +1 -1
  128. package/dist/client/assets/org-layout-MRzgibsh.js +1 -0
  129. package/dist/client/assets/organization-choice-CapZcYtV.js +1 -0
  130. package/dist/client/assets/{page-seo-form-BgMsVAcV.js → page-seo-form-CqZfv8X_.js} +1 -1
  131. package/dist/client/assets/page-seo-sheet-DtnjMpuE.js +1 -0
  132. package/dist/client/assets/popover-BzQ5wL7A.js +1 -0
  133. package/dist/client/assets/post-editor-CTE-wZis.js +1 -0
  134. package/dist/client/assets/preview-dialog-BueN40wX.js +5 -0
  135. package/dist/client/assets/{primitives-BcfJna5s.js → primitives-CKy26jWq.js} +1 -1
  136. package/dist/client/assets/profile-DChufnnG.js +1 -0
  137. package/dist/client/assets/project-app-view-CkSSi0TS.js +1 -0
  138. package/dist/client/assets/record-editor-CbsS0IVi.js +1 -0
  139. package/dist/client/assets/registry-DK3Q5gX_.js +2 -0
  140. package/dist/client/assets/{registry-layout-t_GwGR-W.js → registry-layout-CodfYx2r.js} +4 -4
  141. package/dist/client/assets/require-capability-DwLm9QUw.js +1 -0
  142. package/dist/client/assets/required-auth-layout-CyLg9iYq.js +1 -0
  143. package/dist/client/assets/{reset-password-CPoVJQh2.js → reset-password-DMNx-Vj9.js} +1 -1
  144. package/dist/client/assets/roles-CJZwr85B.js +1 -0
  145. package/dist/client/assets/save-referenced-block-BuKB-TPt.js +1 -0
  146. package/dist/client/assets/save-status-Odb6tzfv.js +1 -0
  147. package/dist/client/assets/{schema-form-D8_e7uDj.js → schema-form-CJ9tFDNN.js} +1 -1
  148. package/dist/client/assets/{scroll-area-DwqNfKe5.js → scroll-area-CijwgfU1.js} +7 -7
  149. package/dist/client/assets/{search-input-DjHO_xeh.js → search-input-BSp_OQdj.js} +1 -1
  150. package/dist/client/assets/secrets-BbqOZ3Gn.js +1 -0
  151. package/dist/client/assets/sections-editor-CyLQRlzi.js +2 -0
  152. package/dist/client/assets/select-BTavF8g-.js +1 -0
  153. package/dist/client/assets/{select-model-4ZBcZdkE.js → select-model-CYUBV6FP.js} +1 -1
  154. package/dist/client/assets/seo-editor-DsbALoze.js +1 -0
  155. package/dist/client/assets/settings-layout-kO_j7afz.js +1 -0
  156. package/dist/client/assets/{settings-section-Dxa_AxFP.js → settings-section-nTIyismy.js} +1 -1
  157. package/dist/client/assets/{sheet-COdJ-0Qy.js → sheet-Be7nx13S.js} +1 -1
  158. package/dist/client/assets/shell-controls-BdoUGZ5s.js +1 -0
  159. package/dist/client/assets/shell-layout-Ceh14jWF.js +1 -0
  160. package/dist/client/assets/shell-route-loading-COgnRrgS.js +1 -0
  161. package/dist/client/assets/{sidebar-DCgpgzJu.js → sidebar-aqkJk02H.js} +1 -1
  162. package/dist/client/assets/skeleton-BZA1ydJ5.js +1 -0
  163. package/dist/client/assets/{sortable.esm-LmSoSdxy.js → sortable.esm-3Eb-EVuH.js} +1 -1
  164. package/dist/client/assets/sso-T9-I0dOY.js +1 -0
  165. package/dist/client/assets/{store-Dj11zgxF.js → store-hSXqoJiA.js} +1 -1
  166. package/dist/client/assets/store-registry-CO5po8Ys.js +2 -0
  167. package/dist/client/assets/studio-tools-BThbo34U.js +1 -0
  168. package/dist/client/assets/switch-ChNCbD78.js +1 -0
  169. package/dist/client/assets/table-DyhJ_N7y.js +1 -0
  170. package/dist/client/assets/{tabs-BcUIMPwc.js → tabs-CEcgElcv.js} +1 -1
  171. package/dist/client/assets/{task-status-BfQltC__.js → task-status-BrIZavAZ.js} +1 -1
  172. package/dist/client/assets/textarea-CnG5GolZ.js +1 -0
  173. package/dist/client/assets/{toggle-group-Cp4C3_lM.js → toggle-group-88j9eFgy.js} +1 -1
  174. package/dist/client/assets/{toolbar-DyjTkAru.js → toolbar-tWfkybln.js} +1 -1
  175. package/dist/client/assets/tooltip-DVqOmAgj.js +1 -0
  176. package/dist/client/assets/{types-7ak1Ve40.js → types-Azj4SL2T.js} +1 -1
  177. package/dist/client/assets/{use-ai-providers-CC3uGtbf.js → use-ai-providers-D3K1IBXP.js} +1 -1
  178. package/dist/client/assets/{use-automations-D2hKtMe8.js → use-automations-CJcYBYig.js} +1 -1
  179. package/dist/client/assets/use-capability-t8jcbJQc.js +1 -0
  180. package/dist/client/assets/{use-clock-tick-SbPzFjh0.js → use-clock-tick-GkLlDe0y.js} +1 -1
  181. package/dist/client/assets/{use-collections-DrlB7sAG.js → use-collections-Bau2O-hk.js} +1 -1
  182. package/dist/client/assets/use-connection-nkWhshyI.js +1 -0
  183. package/dist/client/assets/use-copy-BQ6cLTdv.js +1 -0
  184. package/dist/client/assets/use-create-virtual-mcp-YKgnWL2r.js +1 -0
  185. package/dist/client/assets/{use-debounced-autosave-C4B5942u.js → use-debounced-autosave-BwtEh4oP.js} +1 -1
  186. package/dist/client/assets/use-deco-credits-DlEQB-Si.js +1 -0
  187. package/dist/client/assets/{use-delete-connection-C_lUSAxo.js → use-delete-connection-BJMhiTgm.js} +1 -1
  188. package/dist/client/assets/use-file-configs-JZp3bWtX.js +1 -0
  189. package/dist/client/assets/{use-infinite-scroll-CaTJY2LS.js → use-infinite-scroll-DwZozWFz.js} +1 -1
  190. package/dist/client/assets/{use-join-requests-Bf6--Yng.js → use-join-requests-8ZuovDfH.js} +1 -1
  191. package/dist/client/assets/use-mcp-client-RiDQVGqe.js +10 -0
  192. package/dist/client/assets/{use-mcp-prompts-5xEBY9_7.js → use-mcp-prompts-_xCjRWbU.js} +1 -1
  193. package/dist/client/assets/{use-mcp-tools-CYtQa-6Z.js → use-mcp-tools-DdnF4WnM.js} +1 -1
  194. package/dist/client/assets/{use-members-BWyLHt4a.js → use-members-CL8wIDhY.js} +1 -1
  195. package/dist/client/assets/use-navigate-to-agent-Dxf_z3z_.js +1 -0
  196. package/dist/client/assets/{use-org-auth-client-Blpkj8FB.js → use-org-auth-client-BB07oHZb.js} +1 -1
  197. package/dist/client/assets/{use-org-sso-CEQ82hSZ.js → use-org-sso-BlwxfZ0b.js} +1 -1
  198. package/dist/client/assets/{use-organization-roles-lBgqu0F4.js → use-organization-roles-DiyfHPtd.js} +1 -1
  199. package/dist/client/assets/use-organization-settings-DKT8xIyC.js +1 -0
  200. package/dist/client/assets/{use-registry-connections-CK9xDmAR.js → use-registry-connections-DCqUfQJj.js} +1 -1
  201. package/dist/client/assets/use-secrets-CPbnjha6.js +1 -0
  202. package/dist/client/assets/{use-status-sounds-C5Tq4YPI.js → use-status-sounds-BUy3GUGM.js} +1 -1
  203. package/dist/client/assets/{use-view-mode-Dz9A7efZ.js → use-view-mode-WOpiEgc-.js} +1 -1
  204. package/dist/client/assets/{use-virtual-mcp-Bc7GdFZa.js → use-virtual-mcp-DY0FqgMd.js} +1 -1
  205. package/dist/client/assets/useInfiniteQuery-GAIa3lI8.js +1 -0
  206. package/dist/client/assets/useSuspenseInfiniteQuery-CB85USQy.js +1 -0
  207. package/dist/client/assets/variant-calendar-f-5HkKFU.js +1 -0
  208. package/dist/client/assets/view-mode-toggle-DIP0BMUY.js +1 -0
  209. package/dist/client/index.html +1 -1
  210. package/dist/server/cli.js +509 -506
  211. package/dist/server/server.js +318 -318
  212. package/package.json +1 -1
  213. package/dist/client/assets/ChevronUp-CiXMtnii.js +0 -1
  214. package/dist/client/assets/XCircle-DRGwo6Em.js +0 -1
  215. package/dist/client/assets/add-section-modal-CwlL6ayr.js +0 -1
  216. package/dist/client/assets/agent-icon-D5EbntAT.js +0 -1
  217. package/dist/client/assets/agents-list-DOj0Fh6v.js +0 -1
  218. package/dist/client/assets/ai-providers-D2FalLjO.js +0 -1
  219. package/dist/client/assets/app-editor-DH47BAx3.js +0 -1
  220. package/dist/client/assets/automations-C8R4Fvhm.js +0 -1
  221. package/dist/client/assets/buckets-BNXQ-vfY.js +0 -1
  222. package/dist/client/assets/category-editor-511TL03p.js +0 -1
  223. package/dist/client/assets/chat-context-BNtznWGC.js +0 -21
  224. package/dist/client/assets/checkbox-I3IyJWnj.js +0 -1
  225. package/dist/client/assets/collection-detail-CqdkHGGR.js +0 -1
  226. package/dist/client/assets/collection-display-button-C3NMWQ0u.js +0 -1
  227. package/dist/client/assets/connect-desktop-dialog-BgIjMJ8k.js +0 -1
  228. package/dist/client/assets/connection-detail-BljhUTi8.js +0 -1
  229. package/dist/client/assets/connections-BxfE7CNZ.js +0 -1
  230. package/dist/client/assets/context-menu-CUB1yHM7.js +0 -1
  231. package/dist/client/assets/decopilot-sse-pool-BkzSWgw-.js +0 -1
  232. package/dist/client/assets/dialog-CyIn0DRx.js +0 -1
  233. package/dist/client/assets/drawer-DFg9xgM4.js +0 -1
  234. package/dist/client/assets/dropdown-menu-kPcoeCiJ.js +0 -1
  235. package/dist/client/assets/file-explorer-DqjZVlFC.js +0 -2
  236. package/dist/client/assets/general-DiEcrxnP.js +0 -1
  237. package/dist/client/assets/image-field-CodUWKZv.js +0 -1
  238. package/dist/client/assets/index-CE5zniob.js +0 -1
  239. package/dist/client/assets/index-DCOB_mfs.js +0 -1
  240. package/dist/client/assets/label-DitP_QKf.js +0 -1
  241. package/dist/client/assets/login-B5Epw0z9.js +0 -1
  242. package/dist/client/assets/onboarding-BoQhKI2i.js +0 -1
  243. package/dist/client/assets/org-layout-BMfkaVCj.js +0 -1
  244. package/dist/client/assets/page-seo-sheet-DeiY4L_a.js +0 -1
  245. package/dist/client/assets/popover-BcAFMnrn.js +0 -1
  246. package/dist/client/assets/post-editor-B7uc8ZWG.js +0 -1
  247. package/dist/client/assets/preview-dialog-CWq_MXwm.js +0 -5
  248. package/dist/client/assets/profile-D0fa1gEu.js +0 -1
  249. package/dist/client/assets/project-app-view-CXpwRwLv.js +0 -1
  250. package/dist/client/assets/record-editor-Ct33qGpE.js +0 -1
  251. package/dist/client/assets/registry-BIqKm9sP.js +0 -2
  252. package/dist/client/assets/require-capability-CoJVffIR.js +0 -1
  253. package/dist/client/assets/required-auth-layout-B3CS-pLH.js +0 -1
  254. package/dist/client/assets/roles-Kqs8iopc.js +0 -1
  255. package/dist/client/assets/save-referenced-block-rb2uyE9z.js +0 -1
  256. package/dist/client/assets/save-status-C9PbQUEN.js +0 -1
  257. package/dist/client/assets/secrets-Dlj_raMe.js +0 -1
  258. package/dist/client/assets/sections-editor-D8YHUjur.js +0 -2
  259. package/dist/client/assets/select-Di6xzzYo.js +0 -1
  260. package/dist/client/assets/seo-editor-C9cdDir2.js +0 -1
  261. package/dist/client/assets/settings-layout-DR15Rbl6.js +0 -1
  262. package/dist/client/assets/shell-controls-Cw8j2a_F.js +0 -1
  263. package/dist/client/assets/shell-layout-DmxTk-Cg.js +0 -1
  264. package/dist/client/assets/shell-route-loading-DW_liPbt.js +0 -1
  265. package/dist/client/assets/skeleton-CZ9pOveV.js +0 -1
  266. package/dist/client/assets/sso-BJQWPrvg.js +0 -1
  267. package/dist/client/assets/store-registry-BXdj_bIJ.js +0 -2
  268. package/dist/client/assets/studio-tools-DRut7Wwk.js +0 -1
  269. package/dist/client/assets/switch-sHkW6RUp.js +0 -1
  270. package/dist/client/assets/table-BUxYcsuG.js +0 -1
  271. package/dist/client/assets/textarea-D8B22gmM.js +0 -1
  272. package/dist/client/assets/tooltip-2IhfImXT.js +0 -1
  273. package/dist/client/assets/use-capability-CU6DCnG3.js +0 -1
  274. package/dist/client/assets/use-connection-Dffadu_t.js +0 -1
  275. package/dist/client/assets/use-copy-Btaqep1K.js +0 -1
  276. package/dist/client/assets/use-create-virtual-mcp-D6wTKoFC.js +0 -1
  277. package/dist/client/assets/use-deco-credits-16Jb7c03.js +0 -1
  278. package/dist/client/assets/use-file-configs-qOKR17qO.js +0 -1
  279. package/dist/client/assets/use-mcp-client-BdKIOTso.js +0 -10
  280. package/dist/client/assets/use-navigate-to-agent-BTMo9com.js +0 -1
  281. package/dist/client/assets/use-organization-settings--a-kmsBC.js +0 -1
  282. package/dist/client/assets/use-secrets-B008jqWi.js +0 -1
  283. package/dist/client/assets/useInfiniteQuery-Ca6dlOLl.js +0 -1
  284. package/dist/client/assets/useRouterState-DgLuS94C.js +0 -1
  285. package/dist/client/assets/useSuspenseInfiniteQuery-CZbIaY66.js +0 -1
  286. package/dist/client/assets/variant-calendar-DgzKgoL6.js +0 -1
  287. package/dist/client/assets/view-mode-toggle-Cc6sYskX.js +0 -1
@@ -1 +0,0 @@
1
- import{e as p,j as t,a1 as P,r as j,ae as w,B as S,n as y}from"./index-C3Ab2DJ2.js";import{i as k}from"./AlertCircle-DMqR3m0L.js";import{s as z}from"./Plus-_82_8sq8.js";import{s as F}from"./User01-CTuKNCEa.js";import{t as E}from"./Users01-KXiCgru2.js";import{d as $,c as I,D as O,a as A,b as R,e as T}from"./dialog-CyIn0DRx.js";import{I as N}from"./input-BmmiCY6T.js";import{L as g}from"./label-DitP_QKf.js";import{d as B,b as V,c as L,S as q,a as C}from"./select-Di6xzzYo.js";import{S as H}from"./skeleton-CZ9pOveV.js";import{T as K}from"./textarea-D8B22gmM.js";import{P as b}from"./index-CszBxeF9.js";import{c as W}from"./settings-section-Dxa_AxFP.js";import{u as Y,a as G}from"./use-secrets-B008jqWi.js";import{R as J}from"./require-capability-CoJVffIR.js";import"./X-CKIhVHQk.js";import"./tooltip-2IhfImXT.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./sidebar-DCgpgzJu.js";import"./LayoutLeft-CkiSxkS_.js";import"./sheet-COdJ-0Qy.js";import"./card-Ckx3Kwvj.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./studio-tools-DRut7Wwk.js";import"./use-capability-CU6DCnG3.js";import"./access-gate-CEtgmlCt.js";import"./capability-load-error-BXEh1mp-.js";function M(s){const e=p.c(3),{error:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k,{size:16}),e[0]=c):c=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function Q(s){const e=p.c(5),{scope:r}=s,c=r==="user"?F:E,n=r==="user"?"Private":"Organization";let i;e[0]!==c?(i=t.jsx(c,{size:12}),e[0]=c,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=p.c(20),{secret:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(Q,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[c,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let o;e[15]!==l?(o=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=o):o=e[16];let x;return e[17]!==u||e[18]!==o?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,o]}),e[17]=u,e[18]=o,e[19]=x):x=e[19],x}function U(s){const e=p.c(5),{onCreate:r}=s;let c,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=c,e[1]=n):(c=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,c]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),o=G();function x(){c("organization"),i(""),d(""),l("")}function f(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await o.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),f()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):f()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>c(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:f,disabled:o.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:o.isPending||!n.trim()||!a,children:o.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=p.c(21),e=Y(),[r,c]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(U,{onCreate:()=>c(!0)}),s[0]=l):l=s[0];let o;return s[1]!==r?(o=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:c})]}),s[1]=r,s[2]=o):o=s[2],o}let n,i,a;if(s[3]!==e){const l=e.filter(se),o=e.filter(te),x=e.length===1?"":"s";let f;s[7]!==e.length||s[8]!==x?(f=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=f):f=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==f?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[f,m]}),s[12]=f,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=o.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:o.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:c}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=p.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(W,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(M,{error:e??new Error("Failed to load secrets")})}function $e(){const s=p.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(J,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{$e as default};
@@ -1,2 +0,0 @@
1
- import{e as Ie,r as _,j as t,B as Fe,l as Ut,c as Ce,F as Gs,n as fe,K as ea}from"./index-C3Ab2DJ2.js";import{r as ta,i as Tn,c as na,G as sa,a as xt,b as aa,d as ra,e as ia,f as oa,g as la,h as ca,j as ua,k as da,l as ma,m as vt,p as St,n as fa,o as Ot,q as Qe,s as Sn,t as bn,P as pa,v as $t,w as ha,x as ga,y as va,z as Sa,A as ba,B as xa,C as ya,D as dt,E as ja,F as _a,H as ka,I as wa,J as Na,K as Ra,L as Ca,M as Da,N as Kt,O as Ta,Q as xn,R as Pa,S as Aa,T as Va,U as Bt,V as Ma,W as Ea,X as yn}from"./index-WHuW26DU.js";import{t as Oa}from"./ChevronDown-CYFvWHpZ.js";import{i as $a}from"./ChevronRight-Dj41DV2U.js";import{n as Ka}from"./ChevronUp-CiXMtnii.js";import{K as zt,D as Pn,S as An,l as Ba,L as Fa,M as La}from"./agent-icon-D5EbntAT.js";import{i as za}from"./Globe01-BquIL2vg.js";import{S as bt}from"./scroll-area-DwqNfKe5.js";import{b as st,T as at,a as rt}from"./tooltip-2IhfImXT.js";import{a as Vn,D as Mn,b as En,e as On,c as $n,d as Kn}from"./dialog-CyIn0DRx.js";import{I as Bn}from"./input-BmmiCY6T.js";import{s as Ia,a as Ha}from"./Eye-D3THRXh6.js";import{c as Ua}from"./ZoomOut-DVSwpwUz.js";import{b as Wa}from"./Settings02-B7hO-Tma.js";import{s as It}from"./Plus-_82_8sq8.js";import{s as Fn}from"./Trash01-CG0gTYx7.js";import{i as qa}from"./Zap-w60sxAoc.js";import{c as nt,a as Ln,D as zn,b as In,g as Ja}from"./dropdown-menu-kPcoeCiJ.js";import{u as Hn,a as yt,K as Un,P as Wn,b as qn,C as Jn,s as Yn,d as mt,D as Zn,c as Qn,S as Xn,v as Ya,e as Gn,h as Za}from"./sortable.esm-LmSoSdxy.js";import{r as Qa,s as Xa,V as Ga,a as er,u as et,e as tr,S as nr,M as jn,f as tt,b as Ht}from"./schema-form-D8_e7uDj.js";import{r as _n,u as sr,d as ar,a as rr,i as ir,f as or,P as lr,b as cr,S as ur}from"./page-seo-form-BgMsVAcV.js";import{i as dr}from"./Tool01-B4SsemMS.js";import{AddSectionModal as mr}from"./add-section-modal-CwlL6ayr.js";import{c as fr}from"./save-referenced-block-rb2uyE9z.js";import"./index-BY2TC4bG.js";import"./chat-context-BNtznWGC.js";import"./hooks-DLdyjUhZ.js";import"./use-mcp-client-BdKIOTso.js";import"./auth-tkqpBHf1.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-ai-providers-CC3uGtbf.js";import"./studio-tools-DRut7Wwk.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings--a-kmsBC.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./SearchMd-C3Pmxf99.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./X-CKIhVHQk.js";import"./shell-layout-DmxTk-Cg.js";import"./avatar-DfTXVgX9.js";import"./User01-CTuKNCEa.js";import"./Users03-BOvyNEV4.js";import"./Stars02-9vF61uFx.js";import"./XClose-Ig7y9gcI.js";import"./CheckCircle-D6b8lFUP.js";import"./FilterLines-BPeCeYIz.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./ZapSquare-C7yt7KfQ.js";import"./Star01-BfSEPDRT.js";import"./Upload01-BlvGy5d-.js";import"./AlertCircle-DMqR3m0L.js";import"./form-BZY9ZRz4.js";import"./label-DitP_QKf.js";import"./select-Di6xzzYo.js";import"./XCircle-DRGwo6Em.js";import"./tabs-BcUIMPwc.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./use-connection-Dffadu_t.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./extract-connection-data-CBzjCfJ2.js";import"./card-Ckx3Kwvj.js";import"./integration-icon-CFvT6ZpF.js";import"./collection-tabs-CBstOc4r.js";import"./badge-an9iff2c.js";import"./textarea-D8B22gmM.js";import"./connection-form-helpers-ByFrPc9N.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./mcp-oauth-BGmk7Mi5.js";import"./Monitor01-L6hrk62b.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./checkbox-I3IyJWnj.js";import"./skeleton-CZ9pOveV.js";import"./Key01-Lcx9qTy7.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dxa_AxFP.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./Stars01-W6Wl0Pse.js";import"./popover-BcAFMnrn.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./question-004-sINsf4GQ.js";import"./ChevronLeft-DXSAgzPw.js";import"./use-status-sounds-C5Tq4YPI.js";import"./empty-state-BrSxZrfZ.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./LinkExternal01-jwO28Eeb.js";import"./index-xsAZnQ1t.js";import"./file-type-icon-BOPDPlds.js";import"./LayoutLeft-CkiSxkS_.js";import"./use-mcp-tools-CYtQa-6Z.js";import"./types-7ak1Ve40.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./switch-sHkW6RUp.js";import"./Play-C6QgiUls.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./sheet-COdJ-0Qy.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-navigate-to-agent-BTMo9com.js";import"./Users01-KXiCgru2.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./view-mode-toggle-Cc6sYskX.js";import"./DotsVertical-y5lMfVOQ.js";import"./select-model-4ZBcZdkE.js";import"./use-automations-D2hKtMe8.js";import"./monaco-editor-yw8USVwR.js";import"./automation-runs-BEntIYkJ.js";import"./table-BUxYcsuG.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./automation-list-row-40GibzkL.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Shield01-RDE62wRx.js";import"./use-clock-tick-SbPzFjh0.js";import"./use-copy-Btaqep1K.js";import"./content-blocks-o63cs2vh.js";import"./calendar-tEWC6_XV.js";import"./image-field-CodUWKZv.js";import"./use-file-configs-qOKR17qO.js";function pr(l){const e=Ie.c(38),{open:r,initialName:c,autoLabel:m,isPending:g,onSubmit:v,onOpenChange:f}=l,d=g===void 0?!1:g,[S,N]=_.useState(c),[A,T]=_.useState(r);r!==A&&(T(r),r&&N(c));let R;e[0]!==d||e[1]!==f?(R=ee=>{!ee&&!d&&f(!1)},e[0]=d,e[1]=f,e[2]=R):R=e[2];const k=R;let i;e[3]!==d||e[4]!==S||e[5]!==v?(i=async ee=>{ee.preventDefault(),!d&&await v(S.trim())},e[3]=d,e[4]=S,e[5]=v,e[6]=i):i=e[6];const b=i;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Vn,{children:"Rename variant"}),e[7]=p):p=e[7];const $=m||"the rule";let I;e[8]!==$?(I=t.jsxs(Mn,{children:[p,t.jsxs(En,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",t.jsx("span",{className:"font-medium",children:$}),"."]})]}),e[8]=$,e[9]=I):I=e[9];let P;e[10]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=P):P=e[10];let o;e[11]===Symbol.for("react.memo_cache_sentinel")?(o=ee=>N(ee.target.value),e[11]=o):o=e[11];let j;e[12]!==m||e[13]!==d||e[14]!==S?(j=t.jsxs("div",{className:"space-y-1.5 py-4",children:[P,t.jsx(Bn,{id:"variant-rename-name",value:S,onChange:o,placeholder:m,autoFocus:!0,disabled:d})]}),e[12]=m,e[13]=d,e[14]=S,e[15]=j):j=e[15];let J;e[16]!==f?(J=()=>f(!1),e[16]=f,e[17]=J):J=e[17];let w;e[18]!==d||e[19]!==J?(w=t.jsx(Fe,{type:"button",variant:"outline",onClick:J,disabled:d,children:"Cancel"}),e[18]=d,e[19]=J,e[20]=w):w=e[20];let Q;e[21]!==d?(Q=d?t.jsxs(t.Fragment,{children:[t.jsx(Ut,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=d,e[22]=Q):Q=e[22];let C;e[23]!==d||e[24]!==Q?(C=t.jsx(Fe,{type:"submit",disabled:d,children:Q}),e[23]=d,e[24]=Q,e[25]=C):C=e[25];let z;e[26]!==w||e[27]!==C?(z=t.jsxs(On,{children:[w,C]}),e[26]=w,e[27]=C,e[28]=z):z=e[28];let M;e[29]!==b||e[30]!==z||e[31]!==I||e[32]!==j?(M=t.jsx($n,{className:"sm:max-w-md",children:t.jsxs("form",{onSubmit:b,children:[I,j,z]})}),e[29]=b,e[30]=z,e[31]=I,e[32]=j,e[33]=M):M=e[33];let U;return e[34]!==k||e[35]!==r||e[36]!==M?(U=t.jsx(Kn,{open:r,onOpenChange:k,children:M}),e[34]=k,e[35]=r,e[36]=M,e[37]=U):U=e[37],U}function Ft(l,e,r,c,m){const g={...l[e]};if(m.length>1){const v=g.sections,f=[...v?.variants??[]];f[c]&&(f[c]={...f[c],value:r}),g.sections={...v,variants:f}}else g.sections=r;return g}function hr(l){return structuredClone(l)}function gr(l){return!l.isSavedBlock&&!l.isMultivariate&&!l.isHidden}function kn(l){const e=l.replace(/[^A-Za-z0-9_-]/g,"");return/^[A-Za-z]/.test(e)?e:e?`Block${e}`:""}function wn(l,e){const r=l.trim();return r?r.includes("/")?"Block name cannot contain slashes.":Object.hasOwn(e,r)?"A block with this name already exists.":/^[A-Za-z][A-Za-z0-9_-]*$/.test(r)?null:"Use letters, numbers, hyphens, or underscores. Must start with a letter.":"Block name is required."}function vr(l){return l.schema?.definitions??l.schema?.$defs??{}}function Sr(l,e){const r=vr(e),c=r[btoa(l)];if(!c)return;let m=typeof c.image=="string"?c.image:void 0;if(!m&&Array.isArray(c.allOf)){const g=c.allOf.find(v=>typeof v.$ref=="string")?.$ref;if(typeof g=="string"){const v=g.replace("#/definitions/",""),f=r[v];m=typeof f?.image=="string"?f.image:void 0}}if(m?.includes("{{{"))return m}function br(l,e){if(!e)return;const r=ta(l);if(!r)return;const c=Sr(r.resolveType,e);if(!c)return;const m=Qa(c,r.data);if(m)return Xa(m)}const xr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",yr="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 Nn(l){return Array.from({length:l},(e,r)=>({id:crypto.randomUUID(),index:r}))}function es(l){return l.map((e,r)=>({...e,index:r}))}function jr(l,e){if(e===l.length)return l;if(e<l.length)return es(l.slice(0,e));const r=Array.from({length:e-l.length},(c,m)=>({id:crypto.randomUUID(),index:l.length+m}));return[...l,...r]}function ts(l){const e=Ie.c(20),{section:r,raw:c,meta:m}=l,g=r.isSavedBlock===!0,v=r.isMultivariate===!0;let f;e[0]!==m||e[1]!==c?(f=c&&m?br(c,m):void 0,e[0]=m,e[1]=c,e[2]=f):f=e[2];const d=f;let S;e[3]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ua,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=S):S=e[3];let N;e[4]!==d?(N=d&&t.jsx("img",{src:d,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=d,e[5]=N):N=e[5];let A;e[6]!==v||e[7]!==g?(A=g?{color:sa}:v?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=v,e[7]=g,e[8]=A):A=e[8];let T;e[9]!==A?(T=t.jsx(zt,{className:"h-4 w-4 shrink-0",style:A}),e[9]=A,e[10]=T):T=e[10];const R=r.isHidden&&"line-through opacity-50";let k;e[11]!==R?(k=Ce("min-w-0 flex-1 truncate text-sm font-medium",R),e[11]=R,e[12]=k):k=e[12];let i;e[13]!==r.label||e[14]!==k?(i=t.jsx("span",{className:k,children:r.label}),e[13]=r.label,e[14]=k,e[15]=i):i=e[15];let b;return e[16]!==N||e[17]!==T||e[18]!==i?(b=t.jsxs(t.Fragment,{children:[S,N,T,i]}),e[16]=N,e[17]=T,e[18]=i,e[19]=b):b=e[19],b}function ns(l,e){const r=l.isSavedBlock===!0,c=l.isMultivariate===!0;return Ce("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":r?xr:c?"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)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function _r(l){const e=Ie.c(64),{section:r,raw:c,meta:m,sortableId:g,selected:v,onSelect:f,onDelete:d,onDuplicate:S,onMakeReusable:N,onToggleHidden:A,onToggleLazy:T,onAddVariant:R,onDetach:k}=l,i=c?Tn(c.__resolveType??""):!1;let b;e[0]!==r?(b=na(r),e[0]=r,e[1]=b):b=e[1];const p=b;let $;e[2]!==g?($={id:g,animateLayoutChanges:Cr},e[2]=g,e[3]=$):$=e[3];const{attributes:I,listeners:P,setNodeRef:o,transform:j,isDragging:J}=qn($);let w;e[4]!==j?(w=Jn.Transform.toString(j?{...j,x:0}:null),e[4]=j,e[5]=w):w=e[5];const Q=J?0:void 0;let C;e[6]!==w||e[7]!==Q?(C={transform:w,opacity:Q},e[6]=w,e[7]=Q,e[8]=C):C=e[8];const z=C;let M;e[9]!==r?(M=gr(r),e[9]=r,e[10]=M):M=e[10];const U=M,ee="button",Se=0;let se;e[11]!==f?(se=B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),f())},e[11]=f,e[12]=se):se=e[12];const Y=J?"cursor-grabbing":"cursor-pointer";let ae;e[13]!==r||e[14]!==v||e[15]!==Y?(ae=Ce("touch-none transition-colors",Y,ns(r,v)),e[13]=r,e[14]=v,e[15]=Y,e[16]=ae):ae=e[16];let te;e[17]!==m||e[18]!==c||e[19]!==r?(te=t.jsx(ts,{section:r,raw:c,meta:m}),e[17]=m,e[18]=c,e[19]=r,e[20]=te):te=e[20];const E=!r.isMultivariate&&t.jsxs(st,{children:[t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":i?"Disable async render":"Enable async render",className:Ce("h-7 w-7 shrink-0",i?"":"opacity-0 group-hover:opacity-100"),onClick:B=>{B.stopPropagation(),T()},onPointerDown:Rr,children:t.jsx(qa,{className:Ce("h-3.5 w-3.5",i&&"text-yellow-500")})})}),t.jsx(rt,{side:"bottom",children:i?"Disable async render":"Enable async render"})]});let le;e[21]!==A||e[22]!==r.isHidden||e[23]!==r.isMultivariate?(le=!r.isMultivariate&&t.jsxs(st,{children:[t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":r.isHidden?"Show section":"Hide section",className:Ce("h-7 w-7 shrink-0",r.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:B=>{B.stopPropagation(),A()},onPointerDown:Nr,children:r.isHidden?t.jsx(Wa,{className:"h-3.5 w-3.5"}):t.jsx(Ia,{className:"h-3.5 w-3.5"})})}),t.jsx(rt,{side:"bottom",children:r.isHidden?"Show section":"Hide section"})]}),e[21]=A,e[22]=r.isHidden,e[23]=r.isMultivariate,e[24]=le):le=e[24];let X;e[25]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(Ln,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:wr,onPointerDown:kr,children:t.jsx(Pn,{className:"h-3.5 w-3.5"})})}),e[25]=X):X=e[25];let ne;e[26]!==S?(ne=B=>{B.stopPropagation(),S()},e[26]=S,e[27]=ne):ne=e[27];let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx(Ha,{className:"h-4 w-4"}),e[28]=re):re=e[28];let H;e[29]!==ne?(H=t.jsxs(nt,{onClick:ne,children:[re,"Duplicate"]}),e[29]=ne,e[30]=H):H=e[30];let O;e[31]!==p||e[32]!==R?(O=p&&t.jsxs(nt,{className:Ga,onClick:B=>{B.stopPropagation(),R()},children:[t.jsx(An,{className:"h-4 w-4"}),"Add variant"]}),e[31]=p,e[32]=R,e[33]=O):O=e[33];let K;e[34]!==U||e[35]!==N?(K=U&&t.jsxs(nt,{className:yr,onClick:B=>{B.stopPropagation(),N()},children:[t.jsx(zt,{className:"h-4 w-4"}),"Make reusable"]}),e[34]=U,e[35]=N,e[36]=K):K=e[36];let ie;e[37]!==k||e[38]!==r.isMultivariate||e[39]!==r.isSavedBlock?(ie=r.isSavedBlock===!0&&!r.isMultivariate&&t.jsxs(nt,{onClick:B=>{B.stopPropagation(),k()},children:[t.jsx(zt,{className:"h-4 w-4"}),"Detach"]}),e[37]=k,e[38]=r.isMultivariate,e[39]=r.isSavedBlock,e[40]=ie):ie=e[40];let pe;e[41]!==d?(pe=B=>{B.stopPropagation(),d()},e[41]=d,e[42]=pe):pe=e[42];let he;e[43]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Fn,{className:"h-4 w-4"}),e[43]=he):he=e[43];let de;e[44]!==pe?(de=t.jsxs(nt,{className:"text-destructive focus:text-destructive",onClick:pe,children:[he,"Delete"]}),e[44]=pe,e[45]=de):de=e[45];let ce;e[46]!==H||e[47]!==O||e[48]!==K||e[49]!==ie||e[50]!==de?(ce=t.jsxs(zn,{children:[X,t.jsxs(In,{align:"end",className:"w-44",children:[H,O,K,ie,de]})]}),e[46]=H,e[47]=O,e[48]=K,e[49]=ie,e[50]=de,e[51]=ce):ce=e[51];let W;return e[52]!==I||e[53]!==P||e[54]!==f||e[55]!==o||e[56]!==z||e[57]!==ae||e[58]!==te||e[59]!==E||e[60]!==le||e[61]!==ce||e[62]!==se?(W=t.jsxs("div",{ref:o,style:z,...I,...P,role:ee,tabIndex:Se,onClick:f,onKeyDown:se,className:ae,children:[te,E,le,ce]}),e[52]=I,e[53]=P,e[54]=f,e[55]=o,e[56]=z,e[57]=ae,e[58]=te,e[59]=E,e[60]=le,e[61]=ce,e[62]=se,e[63]=W):W=e[63],W}function kr(l){return l.stopPropagation()}function wr(l){return l.stopPropagation()}function Nr(l){return l.stopPropagation()}function Rr(l){return l.stopPropagation()}function Cr(){return!1}function Dr(l){const e=Ie.c(90),{listKey:r,rawSections:c,sections:m,meta:g,selectedIndex:v,onSelect:f,onReorder:d,onDelete:S,onDuplicate:N,onMakeReusable:A,onToggleHidden:T,onToggleLazy:R,onAddVariant:k,onDetach:i,onAddSection:b,canAddSection:p}=l,$=p===void 0?!0:p;let I;e[0]!==m.length?(I=()=>Nn(m.length),e[0]=m.length,e[1]=I):I=e[1];const[P,o]=_.useState(I),[j,J]=_.useState(null),[w,Q]=_.useState(r),[C,z]=_.useState(m.length),M=_.useRef(!1);w!==r?(Q(r),z(m.length),o(Nn(m.length))):C!==m.length&&(z(m.length),o(V=>jr(V,m.length)));let U;e[2]===Symbol.for("react.memo_cache_sentinel")?(U={activationConstraint:{distance:8}},e[2]=U):U=e[2];let ee;e[3]===Symbol.for("react.memo_cache_sentinel")?(ee={coordinateGetter:Yn},e[3]=ee):ee=e[3];const Se=Hn(yt(Wn,U),yt(Un,ee));let se;e[4]!==P?(se=P.map(Tr),e[4]=P,e[5]=se):se=e[5];const Y=se;let ae;e[6]===Symbol.for("react.memo_cache_sentinel")?(ae=V=>{J(String(V.active.id))},e[6]=ae):ae=e[6];const te=ae;let E;e[7]!==Y||e[8]!==d?(E=V=>{J(null);const{active:L,over:Z}=V;if(!Z||L.id===Z.id)return;const Le=Y.indexOf(String(L.id)),He=Y.indexOf(String(Z.id));Le===-1||He===-1||(o(We=>es(mt([...We],Le,He))),M.current=!0,requestAnimationFrame(()=>{M.current=!1}),d?.(Le,He))},e[7]=Y,e[8]=d,e[9]=E):E=e[9];const le=E;let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{J(null)},e[10]=X):X=e[10];const ne=X;let re,H,O,K,ie,pe,he,de,ce,W,B,De,_e,Ee,ke;if(e[11]!==j||e[12]!==$||e[13]!==P||e[14]!==Y||e[15]!==le||e[16]!==g||e[17]!==b||e[18]!==k||e[19]!==S||e[20]!==i||e[21]!==N||e[22]!==A||e[23]!==f||e[24]!==T||e[25]!==R||e[26]!==c||e[27]!==m||e[28]!==v||e[29]!==Se){Ee=Symbol.for("react.early_return_sentinel");e:{const V=L=>{M.current||f(L)};if(e[45]!==j||e[46]!==$||e[47]!==P||e[48]!==b||e[49]!==c||e[50]!==m){const L=j?P.find(Z=>Z.id===j):null;if(K=L!=null?m[L.index]:null,O=L!=null?c[L.index]:void 0,P.length===0){let Z;e[54]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[54]=Z):Z=e[54];const Le=!$;let He;e[55]===Symbol.for("react.memo_cache_sentinel")?(He=t.jsx(It,{size:14}),e[55]=He):He=e[55];let We;e[56]!==b||e[57]!==Le?(We=t.jsxs("div",{className:"space-y-2",children:[Z,t.jsxs(Fe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Le,onClick:b,children:[He,"Add section"]})]}),e[56]=b,e[57]=Le,e[58]=We):We=e[58],Ee=We;break e}_e=Ce(L&&"cursor-grabbing"),e[45]=j,e[46]=$,e[47]=P,e[48]=b,e[49]=c,e[50]=m,e[51]=O,e[52]=K,e[53]=_e}else O=e[51],K=e[52],_e=e[53];H=Zn,de=Se,ce=Qn,W=te,B=le,De=ne,re=Xn,pe=Y,he=Ya,ke="space-y-1",ie=P.map(L=>{const Z=m[L.index];return Z?t.jsx(_r,{sortableId:L.id,section:Z,raw:c[L.index],meta:g,selected:v===L.index,onSelect:()=>V(L.index),onDelete:()=>S(L.index),onDuplicate:()=>N(L.index),onMakeReusable:()=>A(L.index),onToggleHidden:()=>T(L.index),onToggleLazy:()=>R(L.index),onAddVariant:()=>k(L.index),onDetach:()=>i(L.index)},L.id):null})}e[11]=j,e[12]=$,e[13]=P,e[14]=Y,e[15]=le,e[16]=g,e[17]=b,e[18]=k,e[19]=S,e[20]=i,e[21]=N,e[22]=A,e[23]=f,e[24]=T,e[25]=R,e[26]=c,e[27]=m,e[28]=v,e[29]=Se,e[30]=re,e[31]=H,e[32]=O,e[33]=K,e[34]=ie,e[35]=pe,e[36]=he,e[37]=de,e[38]=ce,e[39]=W,e[40]=B,e[41]=De,e[42]=_e,e[43]=Ee,e[44]=ke}else re=e[30],H=e[31],O=e[32],K=e[33],ie=e[34],pe=e[35],he=e[36],de=e[37],ce=e[38],W=e[39],B=e[40],De=e[41],_e=e[42],Ee=e[43],ke=e[44];if(Ee!==Symbol.for("react.early_return_sentinel"))return Ee;let Te;e[59]!==ie||e[60]!==ke?(Te=t.jsx("div",{className:ke,children:ie}),e[59]=ie,e[60]=ke,e[61]=Te):Te=e[61];let Oe;e[62]!==re||e[63]!==pe||e[64]!==he||e[65]!==Te?(Oe=t.jsx(re,{items:pe,strategy:he,children:Te}),e[62]=re,e[63]=pe,e[64]=he,e[65]=Te,e[66]=Oe):Oe=e[66];let $e;e[67]!==O||e[68]!==K||e[69]!==g?($e=K?t.jsx("div",{className:Ce("cursor-grabbing shadow-lg ring-1 ring-border/60",ns(K,!1)),children:t.jsx(ts,{section:K,raw:O,meta:g})}):null,e[67]=O,e[68]=K,e[69]=g,e[70]=$e):$e=e[70];let be;e[71]!==$e?(be=t.jsx(Gn,{dropAnimation:null,children:$e}),e[71]=$e,e[72]=be):be=e[72];let Ke;e[73]!==H||e[74]!==de||e[75]!==ce||e[76]!==W||e[77]!==B||e[78]!==De||e[79]!==Oe||e[80]!==be?(Ke=t.jsxs(H,{sensors:de,collisionDetection:ce,onDragStart:W,onDragEnd:B,onDragCancel:De,children:[Oe,be]}),e[73]=H,e[74]=de,e[75]=ce,e[76]=W,e[77]=B,e[78]=De,e[79]=Oe,e[80]=be,e[81]=Ke):Ke=e[81];const Pe=!$;let ue;e[82]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(It,{size:14}),e[82]=ue):ue=e[82];let oe;e[83]!==b||e[84]!==Pe?(oe=t.jsxs(Fe,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:Pe,onClick:b,children:[ue,"Add section"]}),e[83]=b,e[84]=Pe,e[85]=oe):oe=e[85];let we;return e[86]!==_e||e[87]!==Ke||e[88]!==oe?(we=t.jsxs("div",{className:_e,children:[Ke,oe]}),e[86]=_e,e[87]=Ke,e[88]=oe,e[89]=we):we=e[89],we}function Tr(l){return l.id}const Pr="oklch(0.65 0.15 160)",ss="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function Wt(l){const e=Ie.c(5),{rule:r,matchers:c}=l,m=r?.__resolveType??"";let g;if(e[0]!==c||e[1]!==m){const S=c.find(N=>N.resolveType===m)?.iconName??er(m);g=Ba(S),e[0]=c,e[1]=m,e[2]=g}else g=e[2];const v=g;if(!v)return null;let f;return e[3]!==v?(f=t.jsx(v,{size:14,className:"shrink-0"}),e[3]=v,e[4]=f):f=e[4],f}function Rn(l){return l.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
2
- `)}function Lt(l){return l.map((e,r)=>({id:crypto.randomUUID(),index:r,variant:e}))}function Ar(l){return l.map((e,r)=>({...e,index:r}))}function Vr(l){const e=Ie.c(51),{entry:r,sortableId:c,isActive:m,canDelete:g,decofile:v,meta:f,matchers:d,onSelect:S,onRename:N,onDelete:A}=l;let T;e[0]!==c?(T={id:c,animateLayoutChanges:Or},e[0]=c,e[1]=T):T=e[1];const{attributes:R,listeners:k,setNodeRef:i,transform:b,isDragging:p}=qn(T);let $;e[2]!==b?($=Jn.Transform.toString(b?{...b,y:0}:null),e[2]=b,e[3]=$):$=e[3];const I=p?0:void 0;let P;e[4]!==$||e[5]!==I?(P={transform:$,opacity:I},e[4]=$,e[5]=I,e[6]=P):P=e[6];const o=P,j=f??void 0;let J;e[7]!==v||e[8]!==r.variant.rule||e[9]!==j?(J=xt(r.variant.rule,v,j),e[7]=v,e[8]=r.variant.rule,e[9]=j,e[10]=J):J=e[10];const w=J,Q=m?ss:"text-muted-foreground hover:bg-muted hover:text-foreground",C=p?"cursor-grabbing":"cursor-grab";let z;e[11]!==Q||e[12]!==C?(z=Ce("group shrink-0 inline-flex items-center rounded-md transition-colors touch-none",Q,C),e[11]=Q,e[12]=C,e[13]=z):z=e[13];let M;e[14]!==w||e[15]!==d?(M=t.jsx(Wt,{rule:w,matchers:d}),e[14]=w,e[15]=d,e[16]=M):M=e[16];let U;e[17]!==r.variant.label?(U=t.jsx("span",{className:"truncate",children:r.variant.label}),e[17]=r.variant.label,e[18]=U):U=e[18];let ee;e[19]!==R||e[20]!==k||e[21]!==S||e[22]!==M||e[23]!==U?(ee=t.jsxs("button",{type:"button",...R,...k,onClick:S,className:"inline-flex items-center gap-1.5 h-8 pl-3 pr-1.5 text-sm font-medium cursor-[inherit]",children:[M,U]}),e[19]=R,e[20]=k,e[21]=S,e[22]=M,e[23]=U,e[24]=ee):ee=e[24];const Se=`Actions for ${r.variant.label}`,se=m&&"opacity-100";let Y;e[25]!==se?(Y=Ce("inline-flex h-8 w-6 items-center justify-center pr-1 cursor-pointer transition-opacity","opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",se),e[25]=se,e[26]=Y):Y=e[26];let ae;e[27]===Symbol.for("react.memo_cache_sentinel")?(ae=t.jsx(Pn,{size:12}),e[27]=ae):ae=e[27];let te;e[28]!==Se||e[29]!==Y?(te=t.jsx(Ln,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":Se,onClick:Er,onPointerDown:Mr,className:Y,children:ae})}),e[28]=Se,e[29]=Y,e[30]=te):te=e[30];let E;e[31]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(dr,{size:14}),e[31]=E):E=e[31];let le;e[32]!==N?(le=t.jsxs(nt,{onClick:N,children:[E,"Rename"]}),e[32]=N,e[33]=le):le=e[33];let X;e[34]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(Ja,{}),e[34]=X):X=e[34];const ne=!g;let re;e[35]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx(Fn,{size:14}),e[35]=re):re=e[35];let H;e[36]!==A||e[37]!==ne?(H=t.jsxs(nt,{variant:"destructive",disabled:ne,onClick:A,children:[re,"Delete"]}),e[36]=A,e[37]=ne,e[38]=H):H=e[38];let O;e[39]!==le||e[40]!==H?(O=t.jsxs(In,{align:"start",className:"w-36",children:[le,X,H]}),e[39]=le,e[40]=H,e[41]=O):O=e[41];let K;e[42]!==te||e[43]!==O?(K=t.jsxs(zn,{children:[te,O]}),e[42]=te,e[43]=O,e[44]=K):K=e[44];let ie;return e[45]!==i||e[46]!==o||e[47]!==ee||e[48]!==K||e[49]!==z?(ie=t.jsxs("div",{ref:i,style:o,className:z,children:[ee,K]}),e[45]=i,e[46]=o,e[47]=ee,e[48]=K,e[49]=z,e[50]=ie):ie=e[50],ie}function Mr(l){return l.stopPropagation()}function Er(l){return l.stopPropagation()}function Or(){return!1}function $r(l){const e=Ie.c(13),{variant:r,decofile:c,meta:m,matchers:g}=l,v=m??void 0;let f;e[0]!==c||e[1]!==v||e[2]!==r.rule?(f=xt(r.rule,c,v),e[0]=c,e[1]=v,e[2]=r.rule,e[3]=f):f=e[3];const d=f;let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=Ce("inline-flex items-center gap-1.5 h-8 pl-3 pr-3 text-sm font-medium rounded-md shadow-lg ring-1 ring-border/60 cursor-grabbing",ss),e[4]=S):S=e[4];let N;e[5]!==d||e[6]!==g?(N=t.jsx(Wt,{rule:d,matchers:g}),e[5]=d,e[6]=g,e[7]=N):N=e[7];let A;e[8]!==r.label?(A=t.jsx("span",{className:"truncate",children:r.label}),e[8]=r.label,e[9]=A):A=e[9];let T;return e[10]!==N||e[11]!==A?(T=t.jsxs("div",{className:S,children:[N,A]}),e[10]=N,e[11]=A,e[12]=T):T=e[12],T}function Kr(l){const e=Ie.c(77),{listKey:r,variants:c,activeIndex:m,decofile:g,meta:v,matchers:f,onSelect:d,onReorder:S,onRename:N,onDelete:A,onAdd:T}=l;let R;e[0]!==c?(R=()=>Lt(c),e[0]=c,e[1]=R):R=e[1];const[k,i]=_.useState(R),[b,p]=_.useState(null),[$,I]=_.useState(r),[P,o]=_.useState(c.length);let j;e[2]!==c?(j=()=>Rn(c),e[2]=c,e[3]=j):j=e[3];const[J,w]=_.useState(j),Q=_.useRef(!1),C=Rn(c);$!==r?(I(r),o(c.length),w(C),i(Lt(c))):P!==c.length?(o(c.length),w(C),i(Lt(c))):J!==C&&(w(C),i(oe=>c.map((we,V)=>({id:oe[V]?.id??crypto.randomUUID(),index:V,variant:we}))));let z;e[4]===Symbol.for("react.memo_cache_sentinel")?(z={activationConstraint:{distance:8}},e[4]=z):z=e[4];let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M={coordinateGetter:Yn},e[5]=M):M=e[5];const U=Hn(yt(Wn,z),yt(Un,M));let ee;e[6]!==k?(ee=k.map(Br),e[6]=k,e[7]=ee):ee=e[7];const Se=ee,se=c.length>1;let Y;e[8]!==k?(Y=oe=>{const we=String(oe.active.id);p(k.find(V=>V.id===we)??null)},e[8]=k,e[9]=Y):Y=e[9];const ae=Y;let te;e[10]!==Se||e[11]!==S?(te=oe=>{p(null);const{active:we,over:V}=oe;if(!V||we.id===V.id)return;const L=Se.indexOf(String(we.id)),Z=Se.indexOf(String(V.id));L===-1||Z===-1||(i(Le=>Ar(mt([...Le],L,Z))),Q.current=!0,requestAnimationFrame(()=>{Q.current=!1}),S(L,Z))},e[10]=Se,e[11]=S,e[12]=te):te=e[12];const E=te;let le;e[13]===Symbol.for("react.memo_cache_sentinel")?(le=()=>{p(null)},e[13]=le):le=e[13];const X=le;let ne,re,H,O,K,ie,pe,he,de,ce,W,B;if(e[14]!==b||e[15]!==m||e[16]!==se||e[17]!==g||e[18]!==k||e[19]!==Se||e[20]!==E||e[21]!==ae||e[22]!==f||e[23]!==v||e[24]!==A||e[25]!==N||e[26]!==d||e[27]!==U){const oe=V=>{Q.current||d(V)};W="flex items-center border-b shrink-0";const we=b&&"cursor-grabbing";e[40]!==we?(ce=Ce("flex flex-1 min-w-0 items-center gap-1.5 pl-3 pr-2 py-2 overflow-x-auto",we),e[40]=we,e[41]=ce):ce=e[41],re=Zn,K=U,ie=Qn,pe=ae,he=E,de=X,ne=Xn,B=Se,H=Za,O=k.map(V=>t.jsx(Vr,{sortableId:V.id,entry:V,isActive:V.index===m,canDelete:se,decofile:g,meta:v,matchers:f,onSelect:()=>oe(V.index),onRename:()=>N(V.index),onDelete:()=>A(V.index)},V.id)),e[14]=b,e[15]=m,e[16]=se,e[17]=g,e[18]=k,e[19]=Se,e[20]=E,e[21]=ae,e[22]=f,e[23]=v,e[24]=A,e[25]=N,e[26]=d,e[27]=U,e[28]=ne,e[29]=re,e[30]=H,e[31]=O,e[32]=K,e[33]=ie,e[34]=pe,e[35]=he,e[36]=de,e[37]=ce,e[38]=W,e[39]=B}else ne=e[28],re=e[29],H=e[30],O=e[31],K=e[32],ie=e[33],pe=e[34],he=e[35],de=e[36],ce=e[37],W=e[38],B=e[39];let De;e[42]!==ne||e[43]!==H||e[44]!==O||e[45]!==B?(De=t.jsx(ne,{items:B,strategy:H,children:O}),e[42]=ne,e[43]=H,e[44]=O,e[45]=B,e[46]=De):De=e[46];let _e;e[47]!==b||e[48]!==g||e[49]!==f||e[50]!==v?(_e=b?t.jsx($r,{variant:b.variant,decofile:g,meta:v,matchers:f}):null,e[47]=b,e[48]=g,e[49]=f,e[50]=v,e[51]=_e):_e=e[51];let Ee;e[52]!==_e?(Ee=t.jsx(Gn,{dropAnimation:null,children:_e}),e[52]=_e,e[53]=Ee):Ee=e[53];let ke;e[54]!==re||e[55]!==K||e[56]!==ie||e[57]!==pe||e[58]!==he||e[59]!==de||e[60]!==De||e[61]!==Ee?(ke=t.jsxs(re,{sensors:K,collisionDetection:ie,onDragStart:pe,onDragEnd:he,onDragCancel:de,children:[De,Ee]}),e[54]=re,e[55]=K,e[56]=ie,e[57]=pe,e[58]=he,e[59]=de,e[60]=De,e[61]=Ee,e[62]=ke):ke=e[62];let Te;e[63]!==ce||e[64]!==ke?(Te=t.jsx("div",{className:ce,children:ke}),e[63]=ce,e[64]=ke,e[65]=Te):Te=e[65];let Oe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Oe={color:Pr},e[66]=Oe):Oe=e[66];let $e;e[67]===Symbol.for("react.memo_cache_sentinel")?($e=t.jsx(It,{size:14}),e[67]=$e):$e=e[67];let be;e[68]!==T?(be=t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-8 shrink-0 cursor-pointer",style:Oe,onClick:T,children:$e})}),e[68]=T,e[69]=be):be=e[69];let Ke;e[70]===Symbol.for("react.memo_cache_sentinel")?(Ke=t.jsx(rt,{side:"bottom",children:"Add variant"}),e[70]=Ke):Ke=e[70];let Pe;e[71]!==be?(Pe=t.jsx("div",{className:"shrink-0 pr-3 pl-1 py-2",children:t.jsxs(st,{children:[be,Ke]})}),e[71]=be,e[72]=Pe):Pe=e[72];let ue;return e[73]!==W||e[74]!==Te||e[75]!==Pe?(ue=t.jsxs("div",{className:W,children:[Te,Pe]}),e[73]=W,e[74]=Te,e[75]=Pe,e[76]=ue):ue=e[76],ue}function Br(l){return l.id}function Fr(l){const e=Ie.c(37),{open:r,onOpenChange:c,defaultBlockId:m,isPending:g,onSubmit:v}=l,f=m===void 0?"":m,d=g===void 0?!1:g,[S,N]=_.useState(f),[A,T]=_.useState(r);r!==A&&(T(r),r&&N(f));let R;e[0]!==d||e[1]!==c?(R=U=>{!U&&!d&&c(!1)},e[0]=d,e[1]=c,e[2]=R):R=e[2];const k=R;let i;e[3]!==S||e[4]!==d||e[5]!==v?(i=async U=>{U.preventDefault();const ee=S.trim();!ee||d||await v(ee)},e[3]=S,e[4]=d,e[5]=v,e[6]=i):i=e[6];const b=i;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs(Mn,{children:[t.jsx(Vn,{children:"Save as global"}),t.jsx(En,{children:"Save this section as a global block so it can be reused on other pages."})]}),e[7]=p):p=e[7];let $;e[8]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("label",{htmlFor:"block-id",className:"text-sm font-medium",children:"Block name"}),e[8]=$):$=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=U=>N(U.target.value),e[9]=I):I=e[9];let P;e[10]!==S||e[11]!==d?(P=t.jsxs("div",{className:"py-4 space-y-2",children:[$,t.jsx(Bn,{id:"block-id",value:S,onChange:I,placeholder:"MyNewBlock",autoFocus:!0,disabled:d})]}),e[10]=S,e[11]=d,e[12]=P):P=e[12];let o;e[13]!==c?(o=()=>c(!1),e[13]=c,e[14]=o):o=e[14];let j;e[15]!==d||e[16]!==o?(j=t.jsx(Fe,{type:"button",variant:"outline",onClick:o,disabled:d,children:"Cancel"}),e[15]=d,e[16]=o,e[17]=j):j=e[17];let J;e[18]!==S||e[19]!==d?(J=!S.trim()||d,e[18]=S,e[19]=d,e[20]=J):J=e[20];let w;e[21]!==d?(w=d?t.jsxs(t.Fragment,{children:[t.jsx(Ut,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=d,e[22]=w):w=e[22];let Q;e[23]!==J||e[24]!==w?(Q=t.jsx(Fe,{type:"submit",disabled:J,children:w}),e[23]=J,e[24]=w,e[25]=Q):Q=e[25];let C;e[26]!==j||e[27]!==Q?(C=t.jsxs(On,{children:[j,Q]}),e[26]=j,e[27]=Q,e[28]=C):C=e[28];let z;e[29]!==b||e[30]!==C||e[31]!==P?(z=t.jsx($n,{className:"sm:max-w-md",children:t.jsxs("form",{onSubmit:b,children:[p,P,C]})}),e[29]=b,e[30]=C,e[31]=P,e[32]=z):z=e[32];let M;return e[33]!==k||e[34]!==r||e[35]!==z?(M=t.jsx(Kn,{open:r,onOpenChange:k,children:z}),e[33]=k,e[34]=r,e[35]=z,e[36]=M):M=e[36],M}function Cn(l){const e=Ie.c(21),{activeSchema:r,formValue:c,formResetKey:m,onFormChange:g,onBreadcrumbChange:v,breadcrumbPath:f,emptyMessage:d,beforeForm:S,seoResolveType:N,siteDefaultSeo:A,meta:T,decofile:R,onSaveReferencedBlock:k,sandbox:i}=l;let b;e[0]!==f?(b=f===void 0?[]:f,e[0]=f,e[1]=b):b=e[1];const p=b;let $;e[2]!==r||e[3]!==p||e[4]!==R||e[5]!==m||e[6]!==c||e[7]!==T||e[8]!==v||e[9]!==g||e[10]!==k||e[11]!==i||e[12]!==N||e[13]!==A?($=r&&c?N?t.jsx(ur,{schema:r,resolveType:N,value:c,formResetKey:m,onChange:g,onBreadcrumbChange:v,siteDefaultSeo:A}):t.jsx(Ht,{schema:r,value:c,onChange:g,basePath:"",breadcrumbPath:p,onBreadcrumbChange:v,meta:T,decofile:R,onSaveReferencedBlock:k,sandbox:i},m):null,e[2]=r,e[3]=p,e[4]=R,e[5]=m,e[6]=c,e[7]=T,e[8]=v,e[9]=g,e[10]=k,e[11]=i,e[12]=N,e[13]=A,e[14]=$):$=e[14];const I=$;let P;e[15]!==d||e[16]!==I?(P=I??t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:d}),e[15]=d,e[16]=I,e[17]=P):P=e[17];let o;return e[18]!==S||e[19]!==P?(o=t.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:t.jsxs("div",{className:"mx-auto max-w-2xl",children:[S,P]})}),e[18]=S,e[19]=P,e[20]=o):o=e[20],o}const Lr="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function zr(l,e){return ha(l,e,tt)}function Ir(l){const e=Ie.c(13),{pageKey:r,initialName:c,initialPath:m,onFieldChange:g}=l,[v,f]=_.useState(c),[d,S]=_.useState(m),[N,A]=_.useState(r);N!==r&&(A(r),f(c),S(m));let T;e[0]!==g?(T=p=>{f(p.target.value),g("name",p.target.value)},e[0]=g,e[1]=T):T=e[1];let R;e[2]!==v||e[3]!==T?(R=t.jsx("input",{type:"text",value:v,onChange:T,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"Page name"}),e[2]=v,e[3]=T,e[4]=R):R=e[4];let k;e[5]!==g?(k=p=>{S(p.target.value),g("path",p.target.value)},e[5]=g,e[6]=k):k=e[6];let i;e[7]!==d||e[8]!==k?(i=t.jsx("input",{type:"text",value:d,onChange:k,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"/path"}),e[7]=d,e[8]=k,e[9]=i):i=e[9];let b;return e[10]!==R||e[11]!==i?(b=t.jsxs("div",{className:"space-y-1",children:[R,i]}),e[10]=R,e[11]=i,e[12]=b):b=e[12],b}function Dn(l){const e=Ie.c(6),{onClick:r}=l;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(An,{size:14}),e[0]=c):c=e[0];let m;e[1]!==r?(m=t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:r,children:c})}),e[1]=r,e[2]=m):m=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(rt,{side:"bottom",children:"Add variant"}),e[3]=g):g=e[3];let v;return e[4]!==m?(v=t.jsxs(st,{children:[m,g]}),e[4]=m,e[5]=v):v=e[5],v}function Nl({orgSlug:l,virtualMcpId:e,branch:r,previewReady:c=!0,previewUrl:m,currentPath:g,activePageBlockKey:v=null,activeGlobalBlockKey:f=null,externalSelectedIndex:d,onSaved:S,initialEditSeo:N=!1,onExitSeo:A,onViewJsonFile:T,onVariantPreviewOverride:R}){const k=c?{orgSlug:l,virtualMcpId:e,branch:r,previewUrl:m}:null,{data:i,isLoading:b}=aa(k),{data:p,isLoading:$}=ra(k),I=ia(),P=I?.entity?.id===e?I.entity.metadata?.siteSlug??null:null,[o,j]=_.useState(null),[J,w]=_.useState(null),[Q,C]=_.useState(null),[z,M]=_.useState(0),[U,ee]=_.useState(void 0),[Se,se]=_.useState(null),[Y,ae]=_.useState(null),[te,E]=_.useState([]),[le,X]=_.useState(0),[ne,re]=_.useState(null),[H,O]=_.useState(null),[K,ie]=_.useState(!0),[pe,he]=_.useState(!1),[de,ce]=_.useState(!1),[W,B]=_.useState(N),[De,_e]=_.useState(N);N&&!De&&(_e(!0),B(!0),j(null),w(null),C(null),E([])),!N&&De&&_e(!1);const[Ee,ke]=_.useState(null),[Te,Oe]=_.useState(void 0),[$e,be]=_.useState([]),[Ke,Pe]=_.useState(0),[ue,oe]=_.useState(0),[we,V]=_.useState(null),[L,Z]=_.useState(null),[Le,He]=_.useState(null),We=Gs(),as=`${l}/${e}/${r}`,jt=oa({orgSlug:l,virtualMcpId:e,branch:r}),[rs,is]=_.useState(g),[os,ls]=_.useState(v),[cs,us]=_.useState(f);(rs!==g||os!==v||cs!==f)&&(queueMicrotask(()=>jt.flush()),is(g),ls(v),us(f),j(null),w(null),C(null),M(0),se(null),ae(null),oe(0),V(null),Z(null),E([]),X(n=>n+1),B(!1),ke(null),Oe(void 0),be([]),Pe(n=>n+1));const Ae=la({orgSlug:l,virtualMcpId:e,branch:r}),qt=fr((n,s)=>{Ae.mutate({blockKey:n,data:s},{onSuccess:()=>S?.(),onError:a=>fe.error(`Save failed: ${a.message}`)})}),Jt=ca({orgSlug:l,virtualMcpId:e,branch:r}),[_t,Yt]=_.useState(!1),kt=_.useRef(null),it=_.useRef(null),ot=_.useRef(null),wt=_.useRef({}),qe=_.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!c||b||$)return t.jsx("div",{className:"h-full w-full flex items-center justify-center",children:t.jsx(Ut,{size:20,className:"animate-spin text-muted-foreground"})});if(!i||!p)return t.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Could not load site data."});const ds=ua(i),ve=!!f,Be=ve?null:da(ds,g,v),x=ve?f:Be?.key??null,Nt=ve&&f?i[f]:void 0,Zt=ve&&f&&Nt?ma(f,Nt):ve&&f?f:"",ft=!ve&&x&&i[x]?i[x]:null,Rt=W&&i&&p&&x&&Be?_n(i,{kind:"page",pageKey:x,pageName:String(Be.name??""),path:String(Be.path??"")},p):null,ms=W?ft?.seo:void 0,Ct=Te!==void 0?Te:ms,fs=W?sr(Ct):void 0,ps=Rt?.seoTypeOptions??[],hs=W&&p?ar(p):"",Qt=Ee??fs??{},Dt=W&&Rt?rr(Qt,Rt):null,gs=W&&Dt&&ir(Ct)?vt(Dt,p):null,vs=W?or(i,p)?.seoData:void 0,Ve=ve?[{label:"Default",sections:[{__resolveType:f}]}]:zr(ft?.sections,i??{}),pt=Ve.length>1,Ne=Math.min(z,Ve.length-1),Xe=Ve[Ne],q=Xe?.sections??[],Re=St(q,i),Xt=!ve&&fa(ft?.sections);if(ve&&f&&Le!==f){He(f);const n=q[0],s=Re[0];if(n&&s){j(0),oe(0),E([]);const a=et(n,s,i);a&&(w(a.data),C(a.resolveType),Z(null),V(null))}}!ve&&Le!==null&&He(null),qe.current={rawSections:q,parsedSections:Re,decofile:i??{},activePageKey:x,pageVariants:Ve,variantIndex:Ne,sectionVariantIndex:ue,selectedSectionIndex:o};const Ss=()=>({multivariate:Xt,index:Ne,variants:Ve.map(n=>({rule:n.rule}))}),Gt=(n,s)=>{if(!R)return;if(!x||!Xt||n.length<=1){R(null);return}const a=xn(x,{multivariate:!0,index:s,variants:n},i,p);R(a.length>0?a:null)},lt=(n,s,a)=>{if(!R)return;if(!x){R(null);return}const u=Ss(),h=xn(x,u,i,p);if(!n||s<0){R(h.length>0?h:null);return}const D=Pa({pageKey:x,page:u,sectionIndex:s,sectionLazy:Re[s]?.isLazy??!1,mvObj:n,selectedVariantIndex:a,decofile:i,meta:p}),y=[...h,...D];R(y.length>0?y:null)},Je=(n,s,a,u=o??-1,h=!1)=>{const D=Qe(n,s);if(!D){w(null),C(null),Z(null),V(null),h&&lt(null,u,a);return}const F=Sn(D,tt)[a];if(!F){w(null),C(null),Z(null),V(null),h&&lt(null,u,a);return}const ge=ga(F.value,i);w(ge?.data??null),C(ge?.resolveType??null);const{resolveType:G,formValue:me}=Ot(F.rule,i,p??void 0);Z(G),V(me),h&&lt(D,u,a)};if(d!==void 0&&d!==U&&(ee(d??null),typeof d=="number")){const n=q[d],s=Re[d];if(n&&s)if(j(d),oe(0),E([]),X(a=>a+1),s.isMultivariate)Je(n,s,0,d);else{const a=et(n,s,i);a?(w(a.data),C(a.resolveType)):(w(null),C(null)),Z(null),V(null)}}const en={orgSlug:l,virtualMcpId:e,branch:r,previewUrl:m??void 0,siteSlug:P},Tt=Q&&p?vt(Q,p):null,ze=(n,s)=>{if(!x)return;const a=Ft(i,x,n,Ne,Ve);Ae.mutate({blockKey:x,data:a},{onSuccess:()=>s?.onSuccess?.()??S?.(),onError:u=>fe.error(`Save failed: ${u.message}`)})},ct=()=>{j(null),w(null),C(null),oe(0),V(null),Z(null),E([]),X(n=>n+1)},bs=(n,s)=>{kt.current&&clearTimeout(kt.current);const a=qe.current.sectionVariantIndex;kt.current=setTimeout(()=>{const{rawSections:u,parsedSections:h,decofile:D,activePageKey:y,pageVariants:F,variantIndex:ge}=qe.current,G=u[s];if(!G)return;const me=h[s];if(!me)return;if(me.isSavedBlock){const ye=me.isLazy?G.section?.__resolveType??G.__resolveType:G.__resolveType;Ae.mutate({blockKey:ye,data:n},{onSuccess:()=>S?.(),onError:je=>fe.error(`Save failed: ${je.message}`)});return}if(!y)return;const xe={...D[y]},Me=[...u];if(me.isMultivariate){const ye=Qe(G,me);if(!ye||!y)return;const je=Ma(ye,a,n);Me[s]=dt(G,me,je)}else if(me.isHidden){const ye=Tn(G.__resolveType),je=ye?{...G.section}:{...G},Ue=Array.isArray(je.variants)?[...je.variants]:[];Ue[0]&&(Ue[0]={...Ue[0],value:n}),je.variants=Ue,ye?Me[s]={...G,section:je}:Me[s]=je}else me.isLazy?Me[s]={...G,section:n}:Me[s]=n;if(F.length>1){const ye=xe.sections,je=[...ye?.variants??[]];je[ge]&&(je[ge]={...je[ge],value:Me}),xe.sections={...ye,variants:je}}else xe.sections=Me;Ae.mutate({blockKey:y,data:xe},{onSuccess:()=>S?.(),onError:ye=>fe.error(`Save failed: ${ye.message}`)})},Bt)},xs=n=>{j(n),oe(0),E([]),X(h=>h+1);const s=q[n],a=Re[n];if(!s||!a)return;if(a.isMultivariate){Je(s,a,0,n);return}const u=et(s,a,i);if(!u){w(null),C(null),Z(null),V(null),lt(null,n,0);return}w(u.data),C(u.resolveType),Z(null),V(null),lt(null,n,0)},tn=n=>{const s=n;w(s),o!==null&&bs(s,o)},Pt=n=>{if(!x||!i||!p||!Be)return;const s={kind:"page",pageKey:x,pageName:String(Be.name??""),path:String(Be.path??"")},a=_n(i,s,p);a&&jt.save(x,()=>{const u=We.getQueryData(ea.decofile(as))?.[x];if(!u||typeof u!="object"||u===null||Array.isArray(u))return null;const h={...u,...wt.current};return wt.current={},n?.raw!==void 0?{...h,seo:n.raw}:n?.inner!==void 0?cr(s,a,h,n.inner):h})},ys=(n,s)=>{x&&(wt.current[n]=s,Pt())},js=(n,s)=>{if(!x)return;const a=mt([...q],n,s);o!==null&&(o===n?j(s):n<o&&s>=o?j(o-1):n>o&&s<=o&&j(o+1)),ze(a)},_s=n=>{if(!x)return;const s=q.filter((a,u)=>u!==n);o===n?ct():o!==null&&o>n&&j(o-1),ze(s)},ks=n=>{if(!x)return;const s=q[n];if(!s)return;const a=[...q];a.splice(n+1,0,hr(s)),o!==null&&o>n&&j(o+1),ze(a)},ws=n=>{if(!x)return;const s=q[n],a=Re[n];if(!s||!a||a.isMultivariate)return;const u=a.isHidden?Na(s):Ra(s);if(!u)return;const h=[...q];h[n]=u,o===n&&ct(),ze(h)},Ns=n=>{if(!x)return;const s=q[n],a=Re[n];if(!s||!a||a.isMultivariate)return;const u=wa(s);if(!u)return;const h=[...q];h[n]=u,o===n&&ct(),ze(h)},Rs=n=>{if(!x)return;const s=q[n],a=Re[n];if(!s||!a?.isSavedBlock)return;const u=et(s,a,i);if(!u?.data)return;const{name:h,...D}=u.data,y=[...q];a.isLazy?y[n]={...s,section:D}:y[n]=D,o===n&&ct(),ze(y)},Cs=n=>{if(!x)return;const s=[...q,{__resolveType:n.resolveType}],a=s.length-1;ze(s,{onSuccess:()=>{he(!1),j(a),oe(0),E([]),X(y=>y+1);const u=s[a],h=St(s,i)[a];if(!u||!h)return;if(h.isMultivariate){Je(u,h,0);return}const D=et(u,h,i);if(!D){w(null),C(null),Z(null),V(null);return}w(D.data),C(D.resolveType),Z(null),V(null)}})},Ds=n=>{if(o===null)return;const s=q[o],a=Re[o];!s||!a?.isMultivariate||(oe(n),E([]),X(u=>u+1),Je(s,a,n,o,!0))},Ts=n=>{if(o===null||!x)return;const s=q[o],a=Re[o];if(!s||!a?.isMultivariate)return;const u=Qe(s,a);if(!u)return;const h=_a(u,n);if(!h){fe.error("Cannot delete the only variant.");return}const D=[...q];D[o]=dt(s,a,h);const y=h.variants;let F=ue;n===ue?F=Math.min(n,y.length-1):n<ue&&(F=ue-1),oe(F),E([]),X(ge=>ge+1),Je(D[o],a,F),ze(D)},Ps=n=>{if(o===null||!x)return;const s=q[o],a=Re[o];if(!s||!a?.isMultivariate)return;const u=Qe(s,a);if(!u)return;const h=ka(u,n),D=[...q];D[o]=dt(s,a,h);const y=n+1;oe(y),E([]),X(F=>F+1),Je(D[o],a,y),ze(D)},As=(n,s)=>{if(o===null||!x||n===s)return;const a=q[o],u=Re[o];if(!a||!u?.isMultivariate)return;const h=Qe(a,u);if(!h)return;const D=ya(h,n,s),y=[...q];y[o]=dt(a,u,D);let F=ue;ue===n?F=s:n<ue&&s>=ue?F=ue-1:n>ue&&s<=ue&&(F=ue+1),oe(F),Je(y[o],u,F),ze(y)},At=n=>{const s=n??o;if(s===null||!x)return;const a=q[s],u=Re[s];if(!a||!u)return;const h=va(a,u);if(!h){fe.error("This section cannot have variants.");return}const D=[...q];D[s]=h.section;const y=St(D,i)[s];if(!y?.isMultivariate){fe.error("Could not add variant.");return}j(s),oe(h.newVariantIndex),E([]),X(F=>F+1),Je(h.section,y,h.newVariantIndex,s),ze(D)},Vs=()=>{if(o===null||!x)return;const n=q[o],s=Re[o];if(!n||!s?.isMultivariate)return;const a=Qe(n,s);if(!a)return;const u=ja(n,s,a);if(!u){fe.error("Could not remove variants.");return}const h=[...q];h[o]=u;const D=St(h,i)[o];if(!D)return;oe(0),Z(null),V(null),E([]),X(F=>F+1);const y=et(u,D,i);y?(w(y.data),C(y.resolveType)):(w(null),C(null)),lt(null,o,0),ze(h)},Ms=async n=>{if(ne===null||!x)return;const s=wn(n,i);if(s){fe.error(s);return}const a=q[ne],u=Re[ne];if(!a||!u)return;const h=et(a,u,i);if(!h){fe.error("This section cannot be saved as global.");return}const D={...h.data,name:n};try{await Ae.mutateAsync({blockKey:n,data:D});const y=[...q];y[ne]={__resolveType:n},await Ae.mutateAsync({blockKey:x,data:Ft(i,x,y,Ne,Ve)}),o===ne&&ct(),re(null),fe.success(`Saved global block "${n}"`),S?.()}catch(y){fe.error(y instanceof Error?y.message:"Failed to save global block")}},nn=Xe?.rule;if(pt&&o===null&&Y===null&&nn){const{resolveType:n,formValue:s}=Ot(nn,i??{},p??void 0);ae(n),se(s)}const ht=p?tr(p):[],Es=!ve&&!!(m&&p&&i),sn=Y&&p?vt(Y,p):null,Os=()=>{it.current&&(clearTimeout(it.current),it.current=null),ot.current&&(clearTimeout(ot.current),ot.current=null)},an=async(n,s)=>{if(!(Ea(s,n,p)>0))try{await Jt.mutateAsync({blockKey:n})}catch(a){fe.error(a instanceof Error?a.message:"Could not delete matcher block")}},rn=n=>{it.current&&clearTimeout(it.current),it.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:u}=qe.current;if(!s)return;const h={...a[s]},D={...h.sections},y=[...D.variants??[]],F=y[u],ge=F?.rule;if($t(ge,a,p)){const G=ge?.__resolveType??"",me=a[G],xe=typeof me?.name=="string"?me.name:G,{__resolveType:Me,...ye}=n;Ae.mutate({blockKey:G,data:Kt(Me??"",ye,xe)},{onSuccess:()=>S?.(),onError:je=>fe.error(`Save failed: ${je.message}`)});return}F&&(y[u]={...F,rule:n}),h.sections={...D,variants:y},Ae.mutate({blockKey:s,data:h},{onSuccess:()=>S?.(),onError:G=>fe.error(`Save failed: ${G.message}`)})},Bt)},$s=n=>{ae(n);const s=n?{__resolveType:n}:{__resolveType:yn};se({}),rn(s)},Ks=n=>{const s=n;se(s);const a=Y?{__resolveType:Y,...s}:{...s};rn(a)},on=n=>{ot.current&&clearTimeout(ot.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=qe.current;s!==null&&(ot.current=setTimeout(()=>{const{rawSections:u,parsedSections:h,decofile:D,activePageKey:y,pageVariants:F,variantIndex:ge}=qe.current;if(!y)return;const G=u[s],me=h[s];if(!G||!me?.isMultivariate)return;const xe=Qe(G,me);if(!xe)return;const Me=Va(xe,a,n),ye=[...u];ye[s]=dt(G,me,Me);const je=Ft(D,y,ye,ge,F);Ae.mutate({blockKey:y,data:je},{onSuccess:()=>S?.(),onError:Ue=>fe.error(`Save failed: ${Ue.message}`)})},Bt))},Bs=n=>{Z(n),V({}),on(n?{__resolveType:n}:{__resolveType:yn})},Fs=n=>{const s=n;V(s);const a=L?{__resolveType:L,...s}:{...s};on(a)};if(!ve&&!Be)return t.jsxs("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:["No page found for ",g]});if(ve&&!Nt)return t.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Global block not found"});const Ye=o!==null?Re[o]??null:null,ln=o!==null?q[o]:null,cn=ln&&Ye?.isMultivariate?Qe(ln,Ye):null,gt=cn?Sn(cn,tt):[],un=Math.min(ue,Math.max(gt.length-1,0)),Vt=gt[un]??null,Ge=Ye?.isMultivariate===!0,dn=o!==null&&Ye!==null,ut=dn&&(Ge||!!(Tt&&J)),Ls=ut&&!ve&&Ye?.isSavedBlock===!0,Ze=ve||Ls,zs=ve?Zt:Ye?.label??"",mn=L&&p?vt(L,p):null,Mt=ut&&(!ve||te.length>0)?ve?[Zt,...te]:[Be.name,Ye.label,...Ge&&Vt?[Vt.label]:[],...te]:[],Is=W&&Be?[Be.name,"SEO",...$e]:[],fn=W?Is:Ze?Mt.length>0?Mt:[zs]:Mt,pn=()=>{if(!x)return;const n=i[x],s=Sa(n.sections,q);if(!s)return;const a=ba(s);Ae.mutate({blockKey:x,data:{...n,sections:s}},{onSuccess:()=>{M(a),j(null),w(null),C(null),E([]),se(null),ae(null)},onError:u=>fe.error(`Save failed: ${u.message}`)})},hn=(n,s,a)=>{if(!x)return;const u=i[x],h=u.sections;if(!h||typeof h!="object"||Array.isArray(h))return;const D=h;if(!Array.isArray(D.variants))return;const y=n([...D.variants]);if(!y)return;const F=Aa(D,y),ge={...i,[x]:{...u,sections:F}};Ae.mutate({blockKey:x,data:ge[x]},{onSuccess:()=>{s?.(),a&&an(a,ge)},onError:G=>fe.error(`Save failed: ${G.message}`)})},Hs=n=>{O(null),M(n),j(null),w(null),C(null),E([]);const s=Ve[n]?.rule,{resolveType:a,formValue:u}=Ot(s,i??{},p??void 0);ae(a),se(u),Gt(Ve.map(h=>({rule:h.rule})),n)},Us=(n,s)=>{if(n===s)return;let a=Ne;Ne===n?a=s:n<Ne&&s>=Ne?a=Ne-1:n>Ne&&s<=Ne&&(a=Ne+1),M(a);const u=mt(Ve.map(h=>({rule:h.rule})),n,s);Gt(u,a),hn(h=>mt(h,n,s))},Ws=n=>{const s=Ve[n]?.rule,a=xa(s,i??{},p??void 0);hn(u=>u.length<=1?null:(u.splice(n,1),u),()=>{Ve.length-1===1?M(0):n<Ne?M(Ne-1):n===Ne&&M(Math.max(0,n-1)),j(null),w(null),C(null),E([]),se(null),ae(null)},a)},qs=async(n,s)=>{Os();const a=qe.current.activePageKey,u=qe.current.decofile;if(!a)return;const h=u[a],D=h.sections;if(!D||typeof D!="object"||Array.isArray(D))return;const y=D;if(!Array.isArray(y.variants))return;const F=[...y.variants],ge=F[n];if(!ge?.rule||typeof ge.rule!="object"){fe.error("This variant has no matcher rule to rename.");return}const G=ge.rule,me=s.trim();Yt(!0);try{if(!me){if(!$t(G,u,p)){O(null);return}const Et=G.__resolveType??"";F[n]={...ge,rule:Ca(G,u,p)};const vn={...u,[a]:{...h,sections:{...y,variants:F}}};await Ae.mutateAsync({blockKey:a,data:vn[a]}),await an(Et,vn),O(null),S?.();return}const xe=Da(G,u,p);if(!xe){fe.error("Could not read this variant's matcher rule.");return}if(xe.blockKey){await Ae.mutateAsync({blockKey:xe.blockKey,data:Kt(xe.resolveType,xe.data,me)}),O(null),S?.();return}const Me=kn(me),ye=wn(Me,u);if(ye){fe.error(ye);return}const je=Kt(xe.resolveType,xe.data,me);let Ue=null;try{await Ae.mutateAsync({blockKey:Me,data:je}),Ue=Me,F[n]={...ge,rule:Ta(Me)},await Ae.mutateAsync({blockKey:a,data:{...h,sections:{...y,variants:F}}}),Ue=null}catch(Et){throw Ue&&await Jt.mutateAsync({blockKey:Ue}).catch(()=>{}),Et}O(null),fe.success(`Saved matcher as global block "${me}"`),S?.()}catch(xe){fe.error(xe instanceof Error?xe.message:"Failed to rename variant")}finally{Yt(!1)}},gn=()=>{ct()},Js=n=>{ke(n),Pt({inner:n})},Ys=n=>{Oe(n),Pt({raw:n})},Zs=()=>{ke(null),be([])},Qs=()=>Pe(n=>n+1),Xs=n=>{if(W){if(n===0){jt.flush(),B(!1),ke(null),Oe(void 0),be([]),Pe(a=>a+1),A?.();return}if(n===1){be([]),Pe(a=>a+1);return}be($e.slice(0,n-1)),Pe(a=>a+1);return}if(ve){E(te.slice(0,n)),X(a=>a+1);return}if(n===0){gn();return}if(n===1){E([]),X(a=>a+1);return}if(Ge&&n===2){E([]),X(a=>a+1);return}const s=Ge?2:1;E(te.slice(0,n-s))};return t.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[t.jsx("div",{className:"shrink-0",children:Ze||ut||W?t.jsxs("div",{className:Ce("border-b px-3 py-2.5",Ze&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ve&&pt&&Xe&&t.jsxs("button",{type:"button",onClick:gn,title:`Editing in variant: ${Xe.label}`,className:Ce("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Lr),children:[t.jsx(Wt,{rule:xt(Xe.rule,i??{},p??void 0),matchers:ht}),t.jsx("span",{className:"max-w-[160px] truncate",children:Xe.label})]}),t.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:fn.map((n,s)=>{const a=s===fn.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[s>0&&t.jsx($a,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("button",{type:"button",onClick:()=>Xs(s),title:n,className:Ce("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?Ze?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":Ze?"text-foreground/80":"text-muted-foreground",Ze?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:n})]},`${n}-${s}`)})}),Ze&&t.jsxs(st,{children:[t.jsx(at,{asChild:!0,children:t.jsx("span",{className:"shrink-0 cursor-help",children:t.jsx(za,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),t.jsx(rt,{side:"bottom",className:"max-w-[260px]",children:"A global section is a reusable block shared across your site. Editing it here updates it everywhere it's used."})]}),dn&&!Ge&&!Ye?.isHidden&&x&&t.jsx(Dn,{onClick:()=>At()})]}),Ze&&t.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:"This is a global section. Changes apply everywhere this section is used across your site."})]}):t.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(Ir,{pageKey:x,initialName:Be.name,initialPath:Be.path,onFieldChange:ys})}),t.jsxs(st,{children:[t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":"Edit SEO",className:"size-7 shrink-0",onClick:()=>B(!0),children:t.jsx(Fa,{size:14})})}),t.jsx(rt,{side:"bottom",children:"Edit SEO"})]}),t.jsxs(st,{children:[t.jsx(at,{asChild:!0,children:t.jsx(Fe,{type:"button",variant:"ghost",size:"icon","aria-label":"View JSON",className:"size-7 shrink-0",onClick:()=>T&&x?T(x):ce(!0),children:t.jsx(La,{size:14})})}),t.jsx(rt,{side:"bottom",children:"View JSON"})]}),t.jsx(Dn,{onClick:pn})]})}),pt&&!ut&&!W&&x&&t.jsx(Kr,{listKey:x,variants:Ve,activeIndex:Ne,decofile:i??{},meta:p,matchers:ht,onSelect:Hs,onReorder:Us,onRename:O,onDelete:Ws,onAdd:pn}),W?t.jsx(bt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:t.jsx("div",{className:"mx-auto max-w-2xl",children:ft&&x?t.jsx(lr,{rawSeo:Ct,innerSeo:Qt,defaultResolveType:hs,seoSchema:gs,activeResolveType:Dt,seoTypeOptions:ps,formResetKey:Ke,siteDefaultSeo:vs,onBreadcrumbChange:be,onPersistRaw:Ys,onInnerChange:Js,onClearForm:Zs,onBumpFormKey:Qs}):t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"SEO schema not found for this site."})})})}):ut?t.jsxs(bt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Ge&&gt.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(nr,{listKey:`${x??""}:${o??""}`,variants:gt.map((n,s)=>({index:s,label:n.label})),selectedIndex:un,onSelect:Ds,onDuplicate:Ps,onDelete:Ts,onRemoveAll:Vs,onReorder:As,onAdd:()=>At()}),Ge&&t.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),t.jsx(jn,{currentRt:L??"",currentLabel:tt(Vt?.rule),matchers:ht,onSelect:Bs}),mn&&we&&t.jsx("div",{className:"pt-1",children:t.jsx(Ht,{schema:mn,value:we,onChange:Fs,basePath:""})})]})]}),t.jsx(Cn,{activeSchema:Tt,formValue:J,formResetKey:le,onFormChange:tn,onBreadcrumbChange:E,breadcrumbPath:te,emptyMessage:"No editable fields for this variant.",meta:p,decofile:i,onSaveReferencedBlock:qt,sandbox:en})]}):ve?t.jsx(bt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx(Cn,{activeSchema:Tt,formValue:J,formResetKey:le,onFormChange:tn,onBreadcrumbChange:E,breadcrumbPath:te,emptyMessage:"No editable fields for this global block.",meta:p,decofile:i,onSaveReferencedBlock:qt,sandbox:en})}):t.jsxs(bt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[pt&&Y!==null&&t.jsxs("div",{className:Ce("px-3 border-b",K?"pt-3 pb-5 space-y-3":"py-2"),children:[t.jsxs("button",{type:"button",onClick:()=>ie(n=>!n),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":K,children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),K?t.jsx(Ka,{className:"size-3.5 shrink-0 text-muted-foreground"}):t.jsx(Oa,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),K&&t.jsxs("div",{className:Ce("space-y-3",_t&&"pointer-events-none opacity-50"),children:[t.jsx(jn,{currentRt:Y,currentLabel:bn(Xe?.rule,i??{},tt,p??void 0),matchers:ht,onSelect:$s}),sn&&Se&&t.jsx("div",{className:"space-y-3",children:t.jsx(Ht,{schema:sn,value:Se,onChange:Ks,basePath:""})})]})]}),t.jsx("div",{className:"p-2 pt-3",children:t.jsx(Dr,{listKey:`${x??""}-${Ne}`,rawSections:q,sections:Re,meta:p,selectedIndex:o,onSelect:xs,onReorder:js,onDelete:_s,onDuplicate:ks,onMakeReusable:re,onToggleHidden:ws,onToggleLazy:Ns,onAddVariant:At,onDetach:Rs,onAddSection:()=>he(!0),canAddSection:Es})})]}),t.jsx(Fr,{open:ne!==null,onOpenChange:n=>{n||re(null)},defaultBlockId:ne!==null?kn(Re[ne]?.label??""):"",isPending:Ae.isPending,onSubmit:Ms}),m&&t.jsx(mr,{open:pe,onOpenChange:he,meta:p,decofile:i,previewBaseUrl:m,onSelect:Cs}),de&&x&&i&&t.jsx(pa,{open:de,onOpenChange:ce,pageKey:x,decofile:i}),H!==null&&t.jsx(pr,{open:!0,initialName:$t(Ve[H]?.rule,i??{},p??void 0)?bn(Ve[H]?.rule,i??{},tt,p??void 0):"",autoLabel:tt(xt(Ve[H]?.rule,i??{},p??void 0)),isPending:_t,onSubmit:async n=>{await qs(H,n)},onOpenChange:n=>{!n&&!_t&&O(null)}})]})}export{Nl as SectionsEditor};
@@ -1 +0,0 @@
1
- import{r as i,ah as nt,_ as Pe,j as d,$ as rt,ai as be,V as L,J as st,P as j,M as N,bL as $,Z as lt,aO as _e,Q as Ee,ag as at,bH as ct,bN as it,cI as dt,cL as ut,cJ as pt,cM as ft,W as mt,T as ht,cK as gt,X as vt,Y as xt,e as ee,c as oe}from"./index-C3Ab2DJ2.js";import{V as St}from"./tooltip-2IhfImXT.js";import{i as wt,n as Ct}from"./ChevronUp-CiXMtnii.js";import{t as Re}from"./ChevronDown-CYFvWHpZ.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),k=i.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:k,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=L(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),C=g.find(x=>x.value===s.value),m=ot(g,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{h.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(g&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,v=L(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:v,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var _t="SelectIcon",Le=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=_t;var Et="SelectPortal",ke=r=>d.jsx(lt,{asChild:!0,...r});ke.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...C}=r,m=G(Q,t),[x,F]=i.useState(null),[M,re]=i.useState(null),_=L(e,f=>F(f)),[O,U]=i.useState(null),[q,k]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&k(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),v=L(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&g&&C){const _=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=_.left-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ce=B-te,se=g.offsetHeight/2,f=g.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=k.length>0&&g===k[k.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=k.length>0&&g===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,g,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(vt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=L(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=s;if(b?.current&&v){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(v.style.minHeight),g=parseFloat(v.style.height),C=Math.max(p,g);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,Lt]=ne(Ue),kt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});kt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,v]=i.useState(c??""),[b,w]=i.useState(!1),S=L(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{v(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,v]=i.useState(null),b=L(e,C=>v(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=L(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const v=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(v)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Qe.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=Le,qt=ke,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function io(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let v;e[9]!==a?(v=!a&&d.jsx(no,{}),e[9]=a,e[10]=v):v=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==v||e[22]!==S||e[23]!==p?(g=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[v,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=v,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,mo as a,po as b,uo as c,io as d,Ne as e};
@@ -1 +0,0 @@
1
- import{e as T,j as t,r as Q,B as je,l as Se}from"./index-C3Ab2DJ2.js";import{i as be}from"./ChevronRight-Dj41DV2U.js";import{L as fe}from"./agent-icon-D5EbntAT.js";import{S as ue}from"./scroll-area-DwqNfKe5.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-BgMsVAcV.js";import{m as ze}from"./index-WHuW26DU.js";import{a as ge}from"./Tool01-B4SsemMS.js";import{s as xe}from"./schema-form-D8_e7uDj.js";import"./AlertCircle-DMqR3m0L.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./Settings02-B7hO-Tma.js";import"./XCircle-DRGwo6Em.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./ChevronLeft-DXSAgzPw.js";import"./DotsVertical-y5lMfVOQ.js";import"./Stars02-9vF61uFx.js";import"./Eye-D3THRXh6.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LayoutLeft-CkiSxkS_.js";import"./LinkExternal01-jwO28Eeb.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Plus-_82_8sq8.js";import"./SearchMd-C3Pmxf99.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./Trash01-CG0gTYx7.js";import"./Upload01-BlvGy5d-.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./X-CKIhVHQk.js";import"./Zap-w60sxAoc.js";import"./use-clock-tick-SbPzFjh0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Btaqep1K.js";import"./tooltip-2IhfImXT.js";import"./file-type-icon-BOPDPlds.js";import"./dialog-CyIn0DRx.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-7ak1Ve40.js";import"./use-mcp-client-BdKIOTso.js";import"./auth-tkqpBHf1.js";import"./chat-context-BNtznWGC.js";import"./hooks-DLdyjUhZ.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-ai-providers-CC3uGtbf.js";import"./studio-tools-DRut7Wwk.js";import"./use-organization-settings--a-kmsBC.js";import"./shell-layout-DmxTk-Cg.js";import"./avatar-DfTXVgX9.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";import"./sheet-COdJ-0Qy.js";import"./integration-icon-CFvT6ZpF.js";import"./use-navigate-to-agent-BTMo9com.js";import"./use-connection-Dffadu_t.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./form-BZY9ZRz4.js";import"./label-DitP_QKf.js";import"./input-BmmiCY6T.js";import"./select-Di6xzzYo.js";import"./switch-sHkW6RUp.js";import"./index-BY2TC4bG.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./tabs-BcUIMPwc.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./extract-connection-data-CBzjCfJ2.js";import"./card-Ckx3Kwvj.js";import"./collection-tabs-CBstOc4r.js";import"./badge-an9iff2c.js";import"./textarea-D8B22gmM.js";import"./connection-form-helpers-ByFrPc9N.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./mcp-oauth-BGmk7Mi5.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./checkbox-I3IyJWnj.js";import"./skeleton-CZ9pOveV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dxa_AxFP.js";import"./popover-BcAFMnrn.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./dropdown-menu-kPcoeCiJ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C5Tq4YPI.js";import"./empty-state-BrSxZrfZ.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./index-xsAZnQ1t.js";import"./use-mcp-tools-CYtQa-6Z.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Cc6sYskX.js";import"./select-model-4ZBcZdkE.js";import"./use-automations-D2hKtMe8.js";import"./monaco-editor-yw8USVwR.js";import"./automation-runs-BEntIYkJ.js";import"./table-BUxYcsuG.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./automation-list-row-40GibzkL.js";import"./calendar-tEWC6_XV.js";import"./sortable.esm-LmSoSdxy.js";import"./image-field-CodUWKZv.js";import"./use-file-configs-qOKR17qO.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function wi(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{wi as SeoEditor};
@@ -1 +0,0 @@
1
- import{e as S,g as L,j as s,p as J,c as k,ae as Q,L as R,t as B,C as I,b as G,l as D,r as F,O as K}from"./index-C3Ab2DJ2.js";import{u as E}from"./useRouterState-DgLuS94C.js";import{j as U,k as V,l as X,b as q,c as w,d as M,S as P,a as O,f as Y,g as Z}from"./sidebar-DCgpgzJu.js";import{a as ee}from"./index-CszBxeF9.js";import{n as se,b as te,a as le,c as re,d as ie,i as T}from"./ZapSquare-C7yt7KfQ.js";import{t as oe,a as A}from"./Users03-BOvyNEV4.js";import{i as ne}from"./HardDrive-DmtpWveq.js";import{i as ae}from"./Key01-Lcx9qTy7.js";import{i as ce}from"./Shield01-RDE62wRx.js";import{s as me}from"./User01-CTuKNCEa.js";import{i as fe}from"./Zap-w60sxAoc.js";import{a as de}from"./use-capability-CU6DCnG3.js";import{a as xe}from"./use-join-requests-Bf6--Yng.js";import{u as W}from"./tooltip-2IhfImXT.js";import{u as be}from"./use-status-sounds-C5Tq4YPI.js";import{a as y}from"./toolbar-DyjTkAru.js";import{S as ue,M as he}from"./shell-controls-Cw8j2a_F.js";import"./LayoutLeft-CkiSxkS_.js";import"./sheet-COdJ-0Qy.js";import"./X-CKIhVHQk.js";import"./studio-tools-DRut7Wwk.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./ChevronLeft-DXSAgzPw.js";import"./ChevronRight-Dj41DV2U.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=de(),r=xe().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(oe,{size:14}),e[0]=o):o=e[0];let n,i;if(e[1]!==t||e[2]!==a||e[3]!==f||e[4]!==r||e[5]!==l){i=Symbol.for("react.early_return_sentinel");e:{let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(se,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(te,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ae,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ne,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(le,{size:14}),e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(A,{size:14}),e[13]=b):b=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(fe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(re,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ie,{size:14}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ce,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{size:14}),e[20]=N):N=e[20];const C=[{label:"Organization",items:[{key:"general",label:"General",icon:o,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:u,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:c,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:d,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:m,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:b,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:p,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:r},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||a){i=C;break e}n=C.map(z=>({...z,items:z.items.filter($=>$.privilegedOnly?f:$.requires?f||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=a,e[3]=f,e[4]=r,e[5]=l,e[6]=n,e[7]=i}else n=e[6],i=e[7];return i!==Symbol.for("react.early_return_sentinel")?i:n}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=L(f);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:_e},e[1]=a):a=e[1];const r=E(a);let o;e[2]!==l||e[3]!==r?(o=b=>{const p=b.replace("$org",l);return r.startsWith(p)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const n=o;let i;if(e[5]!==t||e[6]!==n||e[7]!==l){let b;e[9]!==n||e[10]!==l?(b=(p,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:p.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:p.items.map(h=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(R,{to:h.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:h.key,section_label:h.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[h.icon,h.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:h.label})]})})},h.key))})})]},`${p.label}-${g}`),e[9]=n,e[10]=l,e[11]=b):b=e[11],i=t.map(b),e[5]=t,e[6]=n,e[7]=l,e[8]=i}else i=e[8];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=u):u=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[u,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=c):c=e[13];let d;e[14]!==i?(d=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[14]=i,e[15]=d):d=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.73.1"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(Z,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=H();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=L(a);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:ve},t[1]=o):o=t[1];const n=E(o);let i;t[2]!==r||t[3]!==n?(i=g=>{const h=g.replace("$org",r);return n.startsWith(h)},t[2]=r,t[3]=n,t[4]=i):i=t[4];const u=i;let c;if(t[5]!==l||t[6]!==u||t[7]!==f||t[8]!==r){let g;t[10]!==u||t[11]!==f||t[12]!==r?(g=(h,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:h.label}),h.items.map(j=>s.jsxs(R,{to:j.to,params:{org:r},onClick:f,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",u(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${h.label}-${_}`),t[10]=u,t[11]=f,t[12]=r,t[13]=g):g=t[13],c=l.map(g),t[5]=l,t[6]=u,t[7]=f,t[8]=r,t[9]=c}else c=t[9];let d;t[14]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=d):d=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[d,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(T,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let m;t[16]!==c?(m=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[c,x]}),t[16]=c,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.73.1"]})}),t[18]=b):b=t[18];let p;return t[19]!==m?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[m,b]}),t[19]=m,t[20]=p):p=t[20],p}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=J();be(f.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(ee,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=a):a=e[1];const r=a;if(t){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=n):n=e[2],n}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function Xe(){const e=S.c(22),t=W();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(y.LogoLink,{}),e[0]=f):f=e[0];let l;e[1]!==t?(l=t&&s.jsx(ue,{}),e[1]=t,e[2]=l):l=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=a):a=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[f,l,a]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=n):n=e[7];let i;e[8]!==r?(i=s.jsxs(y.Header,{children:[r,o,n]}),e[8]=r,e[9]=i):i=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width-icon":"3.5rem"},e[10]=u):u=e[10];let c;e[11]!==t?(c=!t&&s.jsx(ge,{}),e[11]=t,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(U,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[13]=d):d=e[13];let x;e[14]!==c?(x=s.jsxs(V,{className:"flex-1 bg-sidebar min-h-0",style:u,children:[c,d]}),e[14]=c,e[15]=x):x=e[15];let m;e[16]!==t?(m=t&&s.jsx(he,{renderSidebar:ke}),e[16]=t,e[17]=m):m=e[17];let b;return e[18]!==x||e[19]!==m||e[20]!==i?(b=s.jsx(y.Provider,{children:s.jsx(X,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,x,m]})})}),e[18]=x,e[19]=m,e[20]=i,e[21]=b):b=e[21],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Xe as default};
@@ -1 +0,0 @@
1
- import{e as f,j as a}from"./index-C3Ab2DJ2.js";import{S as p,c as b,d as S}from"./sheet-COdJ-0Qy.js";import{u as d}from"./sidebar-DCgpgzJu.js";import{i as h}from"./LayoutLeft-CkiSxkS_.js";import{T as u}from"./toolbar-DyjTkAru.js";function M(){const t=f.c(3),{toggleSidebar:e}=d();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),t[0]=o):o=t[0];let s;return t[1]!==e?(s=a.jsx(u,{onClick:e,"aria-label":"Toggle sidebar",children:o}),t[1]=e,t[2]=s):s=t[2],s}function _(t){const e=f.c(12),{renderSidebar:o}=t,{openMobile:s,setOpenMobile:i}=d();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=c):c=e[0];let n;e[1]!==i?(n=()=>i(!1),e[1]=i,e[2]=n):n=e[2];let r;e[3]!==o||e[4]!==n?(r=o({onClose:n}),e[3]=o,e[4]=n,e[5]=r):r=e[5];let l;e[6]!==r?(l=a.jsxs(b,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[c,r]}),e[6]=r,e[7]=l):l=e[7];let m;return e[8]!==s||e[9]!==i||e[10]!==l?(m=a.jsx(S,{open:s,onOpenChange:i,children:l}),e[8]=s,e[9]=i,e[10]=l,e[11]=m):m=e[11],m}export{_ as M,M as S};
@@ -1 +0,0 @@
1
- import{e as k,a as X,j as s,B as O,bT as U,n as G,ae as fe,b as Z,H as Se,a5 as ge,K as le,bU as je,bV as ve,a2 as H,r as V,bW as ke,bX as Ne,m as ie,f as Oe,p as _e,g as he,d as Ce,y as Ae,bY as $e,bZ as ce,b_ as ze,b$ as Te,S as Ee,O as Pe,c0 as Me}from"./index-C3Ab2DJ2.js";import{A as te}from"./avatar-DfTXVgX9.js";import{t as pe,a as Le}from"./Users03-BOvyNEV4.js";import{i as Fe,b as Ie,s as qe,a as D,n as Re}from"./Stars02-9vF61uFx.js";import{s as De}from"./XClose-Ig7y9gcI.js";import{i as K}from"./CheckCircle-D6b8lFUP.js";import{i as de}from"./FilterLines-BPeCeYIz.js";import{i as Q}from"./Zap-w60sxAoc.js";import{c as Ue,D as Ke,a as He,d as Ge}from"./dialog-CyIn0DRx.js";import{R as Be}from"./required-auth-layout-B3CS-pLH.js";import{g as We,c as Ye,A as Je}from"./hooks-DLdyjUhZ.js";import{g as Qe,m as Ve,S as Xe}from"./use-mcp-client-BdKIOTso.js";import{n as Ze}from"./tab-id-BptcWVWa.js";import{c as et}from"./use-organization-settings--a-kmsBC.js";import{u as tt}from"./use-org-sso-CEQ82hSZ.js";function nt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:ot},e[0]=o,e[1]=i):i=e[1];const l=X(i),d=st;let c;e[2]!==r||e[3]!==n?(c=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=s.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let h;e[12]!==l?(h=()=>l.mutate(),e[12]=l,e[13]=h):h=e[13];const x=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==h||e[16]!==x?(f=s.jsx(O,{onClick:h,disabled:l.isPending,children:x}),e[14]=l.isPending,e[15]=h,e[16]=x,e[17]=f):f=e[17];let g;e[18]!==l.isPending?(g=s.jsx(O,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=g):g=e[19];let y;e[20]!==f||e[21]!==g?(y=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,g]}),e[20]=f,e[21]=g,e[22]=y):y=e[22];let w;return e[23]!==y||e[24]!==c||e[25]!==p?(w=s.jsxs(U,{children:[c,p,y]}),e[23]=y,e[24]=c,e[25]=p,e[26]=w):w=e[26],w}function st(){window.location.href="/"}function ot(t){G.error(t instanceof Error?t.message:"Failed to join organization")}function ue(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:r}=t,a=it,i=r==="not-found",l=i?Fe:fe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==n?(c=i?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=o,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=s.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let h;e[8]!==m?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=h):h=e[9];let x;e[10]!==p||e[11]!==h?(x=s.jsxs("div",{className:"space-y-2",children:[p,h]}),e[10]=p,e[11]=h,e[12]=x):x=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(O,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let g;return e[14]!==u||e[15]!==x?(g=s.jsxs(U,{children:[u,x,f]}),e[14]=u,e[15]=x,e[16]=g):g=e[16],g}function it(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const C=await Z.organization.acceptInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{Se(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:ct},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=X(d);let m;e[7]!==n?(m=async()=>{const C=await Z.organization.rejectInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=lt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:rt},e[10]=m,e[11]=p):p=e[11];const h=X(p),x=c.isPending||h.isPending;let f;e[12]!==a||e[13]!==o?(f=a?s.jsx(te,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=o,e[14]=f):f=e[14];let g;e[15]!==o?(g=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=g):g=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=y):y=e[17];let w;e[18]!==g?(w=s.jsxs("div",{className:"space-y-2",children:[g,y]}),e[18]=g,e[19]=w):w=e[19];let b;e[20]!==c?(b=()=>c.mutate(),e[20]=c,e[21]=b):b=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==x||e[23]!==b||e[24]!==v?(N=s.jsx(O,{onClick:b,disabled:x,children:v}),e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let _;e[26]!==h?(_=()=>h.mutate(),e[26]=h,e[27]=_):_=e[27];const S=h.isPending?"Declining…":"Decline";let A;e[28]!==x||e[29]!==_||e[30]!==S?(A=s.jsx(O,{variant:"ghost",onClick:_,disabled:x,children:S}),e[28]=x,e[29]=_,e[30]=S,e[31]=A):A=e[31];let $;e[32]!==N||e[33]!==A?($=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,A]}),e[32]=N,e[33]=A,e[34]=$):$=e[34];let z;return e[35]!==w||e[36]!==$||e[37]!==f?(z=s.jsxs(U,{children:[f,w,$]}),e[35]=w,e[36]=$,e[37]=f,e[38]=z):z=e[38],z}function rt(t){G.error(t instanceof Error?t.message:"Failed to decline invitation")}function lt(){G.success("Invitation declined"),window.location.href="/"}function ct(t){G.error(t instanceof Error?t.message:"Failed to accept invitation")}function dt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let r;e[0]!==o||e[1]!==n?(r=o?s.jsx(te,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(qe,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=a):a=e[3];let i;e[4]!==n?(i=s.jsxs("div",{className:"space-y-2",children:[a,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:ut,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs(U,{children:[r,i,l]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function ut(){window.location.href="/"}function mt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ht,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:gt},e[3]=i,e[4]=d):d=e[4];const c=X(d);let m;e[5]!==r||e[6]!==n?(m=r?s.jsx(te,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[5]=r,e[6]=n,e[7]=m):m=e[7];let u;e[8]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=u):u=e[9];let p;e[10]!==a?(p=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",a]})," emails before you can join."]}),e[10]=a,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"space-y-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];let x;e[15]!==c?(x=()=>c.mutate(),e[15]=c,e[16]=x):x=e[16];const f=c.isPending?"Requesting…":"Request to join";let g;e[17]!==c.isPending||e[18]!==x||e[19]!==f?(g=s.jsx(O,{onClick:x,disabled:c.isPending,children:f}),e[17]=c.isPending,e[18]=x,e[19]=f,e[20]=g):g=e[20];let y;e[21]!==c.isPending?(y=s.jsx(O,{variant:"ghost",onClick:ft,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=y):y=e[22];let w;e[23]!==g||e[24]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[23]=g,e[24]=y,e[25]=w):w=e[25];let b;return e[26]!==w||e[27]!==m||e[28]!==h?(b=s.jsxs(U,{children:[m,h,w]}),e[26]=w,e[27]=m,e[28]=h,e[29]=b):b=e[29],b}function ft(){window.location.href="/"}function gt(t){G.error(t instanceof Error?t.message:"Failed to request access")}function ht(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function pt(t){const e=k.c(7);let n;e[0]!==t?(n=le.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=o):o=e[3];let r;return e[4]!==n||e[5]!==o?(r={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=r):r=e[6],ge(r)}function xt({orgSlug:t}){const{data:e}=pt(t);if(e.status!=="member"){je()?.org===t&&ve();const n=localStorage.getItem(H.lastOrgSlug())===t;if(n&&localStorage.removeItem(H.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ue,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(mt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(dt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ue,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function yt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=s.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(bt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=s.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function bt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const xe=[{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,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:D,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:Q,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:D,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:K,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:Q,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:D,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:K,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:Q,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:D,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:de,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:K,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:Le,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:Q,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:K,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:D,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:de,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:D,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:Re,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",ae=new Set;let M="",L={},re=!1;function wt(){if(re)return M||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return M||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function me(){const t=wt();return t!==M&&(M=t,L=ye(t)),L}function St(t){ae.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",a={...ye(o),...L};L=a,M=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function jt(t){L=t,M=JSON.stringify(t);try{localStorage.setItem(ee,M),re=!1}catch{re=!0}ae.forEach(e=>e())}function vt(){const t=k.c(7),e=V.useSyncExternalStore(St,me,me);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const o=n,r=kt;let a;t[2]!==e?(a=xe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:r,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function kt(t){L[t]||jt({...L,[t]:{seenAt:new Date().toISOString()}})}const Nt=720*60*60*1e3;function Ot(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function _t(t){const e=xe[0];if(!e)return null;const n=Ot(e.date),o=t-n;return o<0||o>Nt?null:e}function Ct(){const t=k.c(21),{isSeen:e,markSeen:n}=vt();let o,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(o=_t(Date.now()),!o){a=null;break e}r=e(o.id)}t[0]=e,t[1]=o,t[2]=r,t[3]=a}else o=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==o.id||t[5]!==n?(i=()=>n(o.id),t[4]=o.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(De,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==o.id||t[11]!==n?(c=()=>n(o.id),m=()=>n(o.id),t[10]=o.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==o||t[15]!==c||t[16]!==m?(u=s.jsx(yt,{release:o,onCtaClick:c,onLearnMoreClick:m}),t[14]=o,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),P=be?"⌘":"Ctrl",E={keyboardShortcuts:{keys:[P,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[P,"L"],description:"Focus chat input"},saveAndFormat:{keys:[P,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[P,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[P,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",P,"S"],description:"New task"},toggleDaemon:{keys:[P,"D"],description:"Toggle daemon logs"}},At=[{label:"General",shortcuts:[E.keyboardShortcuts,E.newTask,E.toggleDaemon]},{label:"Editor",shortcuts:[E.saveAndFormat]},{label:"Chat",shortcuts:[E.focusChatInput,E.togglePlanMode,E.sendMessage,E.newLine]},{label:"Questions",shortcuts:[E.selectOption]},{label:"Monitoring",shortcuts:[E.applyFilter]}];function $t(t){return be?t.metaKey:t.ctrlKey}function zt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{children:s.jsx(He,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Ue,{className:"sm:max-w-md",children:[r,s.jsx("div",{className:"flex flex-col gap-4",children:At.map(Tt)})]}),e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==n?(i=s.jsx(Ge,{open:n,onOpenChange:o,children:a}),e[2]=o,e[3]=n,e[4]=i):i=e[4],i}function Tt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Et)})]},t.label)}function Et(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Pt)})]},t.description)}function Pt(t){return s.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)}function Mt({activeOrg:t}){return t&&(ke(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ne()),null}function Lt(t,e,n){if(!n)return null;const o=We(t,e);return o?o.threads.get().find(a=>a.id===n)?.branch??null:null}function we(t){return{queryKey:le.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 rn(t){const e=k.c(10);let n;e[0]!==t?(n=we(t),e[0]=t,e[1]=n):n=e[1];const o=ie(n);let r;e[2]!==o.data?.prompts?(r=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==o.data?.tiles?(a=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==o.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:o.isLoading,prompts:r,tiles:a},e[6]=o.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Ft(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=It;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(fe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==o?(m=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=o,e[6]=m):m=e[6];let u;e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=s.jsx(O,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=h):h=e[11];let x;e[12]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,h]}),e[12]=p,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs(U,{children:[d,u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function It(){window.location.href="/"}function qt(t){const e=k.c(8),{org:n,children:o}=t,a=et(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==n||e[6]!==l?(d=s.jsx(Me,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function Rt(){const t=Oe(),e=Ye(),{org:n,locator:o}=_e(),r=he({strict:!1}),a=Ce({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:g,replace:y}),c=(f,g=!0)=>d(l,f,g),m=f=>c(g=>({...g,chat:f?1:0})),u=(f,g,y)=>d(f,w=>{const b={chat:1};if(g?b.virtualmcpid=g:w.virtualmcpid&&(b.virtualmcpid=w.virtualmcpid),y?.main)b.main=y.main;else{const v=w.main;v&&typeof v=="string"&&!Ze(v)&&(b.main=v)}return y?.autosend&&(b.autosend=Je),b},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??a.virtualmcpid??Qe(n.id).id,b=y===a.virtualmcpid?Lt(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}u(g,y)},openTab:f=>d(l||crypto.randomUUID(),g=>({...g,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const y={...f};return delete y.main,y})}}function Dt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=V.useState(!1),d=o??"";let c;t[2]!==d?(c=we(d),t[2]=d,t[3]=c):c=t[3];const m=!!o&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],ie(u);const{data:p}=Z.useSession(),h=p?.user?.id;let x;t[7]!==o||t[8]!==h?(x=o&&h?$e(h,o):null,t[7]=o,t[8]=h,t[9]=x):x=t[9];const f=x;let g,y;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const j=T=>{$t(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},y=[],t[10]=g,t[11]=y):(g=t[10],y=t[11]),V.useEffect(g,y);let w;t[12]!==o?(w=le.activeOrganization(o),t[12]=o,t[13]=w):w=t[13];let b;t[14]!==o||t[15]!==h?(b=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Z.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Ut),T=ce(j);return j&&!T&&localStorage.setItem(H.lastOrgSlug(),o),h&&j&&Te(h,o,j),j},t[14]=o,t[15]=h,t[16]=b):b=t[16];const v=f?f.data:void 0,N=f?.updatedAt;let _;t[17]!==b||t[18]!==v||t[19]!==N||t[20]!==w?(_={queryKey:w,queryFn:b,initialData:v,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=b,t[18]=v,t[19]=N,t[20]=w,t[21]=_):_=t[21];const{data:S}=ge(_),A=S?.id,$=S?.slug,{data:z}=tt(A,$),C=A??"",ne=$??"";let F;t[22]!==C||t[23]!==ne?(F=Ve({connectionId:Xe,orgId:C,orgSlug:ne}),t[22]=C,t[23]=ne,t[24]=F):F=t[24];const se=!!A&&!!$;let B;if(t[25]!==F||t[26]!==se?(B={...F,enabled:se},t[25]=F,t[26]=se,t[27]=B):B=t[27],ie(B),!S){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ee,{}),t[28]=j):j=t[28];let T;return t[29]!==o?(T=s.jsx(V.Suspense,{fallback:j,children:s.jsx(xt,{orgSlug:o})}),t[29]=o,t[30]=T):T=t[30],T}if(ce(S)){localStorage.getItem(H.lastOrgSlug())===o&&localStorage.removeItem(H.lastOrgSlug());let j;return t[31]!==S.name?(j=s.jsx(ze,{orgName:S.name}),t[31]=S.name,t[32]=j):j=t[32],j}if(z?.ssoRequired&&!z.authenticated){let j;return t[33]!==S.id||t[34]!==S.name||t[35]!==S.slug||t[36]!==z.domain?(j=s.jsx(Ft,{orgId:S.id,orgSlug:S.slug,orgName:S.name,domain:z.domain}),t[33]=S.id,t[34]=S.name,t[35]=S.slug,t[36]=z.domain,t[37]=j):j=t[37],j}const oe=S.logo??null;let I;t[38]!==S||t[39]!==oe?(I={...S,logo:oe},t[38]=S,t[39]=oe,t[40]=I):I=t[40];let q;t[41]!==S?(q=s.jsx(Mt,{activeOrg:S}),t[41]=S,t[42]=q):q=t[42];let W,Y;t[43]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Pe,{}),Y=s.jsx(Ct,{}),t[43]=W,t[44]=Y):(W=t[43],Y=t[44]);let R;t[45]!==i?(R=s.jsx(zt,{open:i,onOpenChange:l}),t[45]=i,t[46]=R):R=t[46];let J;return t[47]!==I||t[48]!==q||t[49]!==R?(J=s.jsxs(qt,{org:I,children:[q,W,Y,R]}),t[47]=I,t[48]=q,t[49]=R,t[50]=J):J=t[50],J}function Ut(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Kt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Be,{children:s.jsx(Dt,{})}),t[0]=e):e=t[0],e}const ln=Object.freeze(Object.defineProperty({__proto__:null,default:Kt,usePanelActions:Rt},Symbol.toStringTag,{value:"Module"}));export{E as K,xe as R,yt as a,Rt as b,rn as c,we as h,$t as i,Lt as r,ln as s,vt as u};
@@ -1 +0,0 @@
1
- import{e as l,j as s,l as i}from"./index-C3Ab2DJ2.js";function a(){const t=l.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:s.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{a as S};
@@ -1 +0,0 @@
1
- import{e as n,c,j as i}from"./index-C3Ab2DJ2.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
@@ -1 +0,0 @@
1
- import{p as D,r as v,j as e,B as p,t as S,n as c,e as N}from"./index-C3Ab2DJ2.js";import{D as k}from"./domain-settings-DIU6G_-3.js";import{P as f}from"./index-CszBxeF9.js";import{I as l}from"./input-BmmiCY6T.js";import{S as z}from"./switch-sHkW6RUp.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-CEQ82hSZ.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-Dxa_AxFP.js";import{s as L}from"./Trash01-CG0gTYx7.js";import{R as q}from"./require-capability-CoJVffIR.js";import"./studio-tools-DRut7Wwk.js";import"./badge-an9iff2c.js";import"./select-Di6xzzYo.js";import"./tooltip-2IhfImXT.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./sidebar-DCgpgzJu.js";import"./LayoutLeft-CkiSxkS_.js";import"./sheet-COdJ-0Qy.js";import"./X-CKIhVHQk.js";import"./card-Ckx3Kwvj.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./use-capability-CU6DCnG3.js";import"./access-gate-CEtgmlCt.js";import"./capability-load-error-BXEh1mp-.js";function B(){const{org:s}=D(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),j=T(s.id,s.slug),[t,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function me(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{me as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-t_GwGR-W.js","assets/index-C3Ab2DJ2.js","assets/index-BITgxoqa.css","assets/XCircle-DRGwo6Em.js","assets/CheckCircle-D6b8lFUP.js","assets/Settings02-B7hO-Tma.js","assets/use-mcp-client-BdKIOTso.js","assets/auth-tkqpBHf1.js","assets/useInfiniteQuery-Ca6dlOLl.js","assets/use-infinite-scroll-CaTJY2LS.js","assets/studio-tools-DRut7Wwk.js","assets/badge-an9iff2c.js","assets/input-BmmiCY6T.js","assets/dropdown-menu-kPcoeCiJ.js","assets/ChevronUp-CiXMtnii.js","assets/ChevronRight-Dj41DV2U.js","assets/DotsVertical-y5lMfVOQ.js","assets/table-BUxYcsuG.js","assets/toggle-group-Cp4C3_lM.js","assets/use-view-mode-Dz9A7efZ.js","assets/tooltip-2IhfImXT.js","assets/FilterLines-BPeCeYIz.js","assets/Globe01-BquIL2vg.js","assets/SearchMd-C3Pmxf99.js","assets/dialog-CyIn0DRx.js","assets/X-CKIhVHQk.js","assets/AlertCircle-DMqR3m0L.js","assets/Upload01-BlvGy5d-.js","assets/alert-dialog-BuJSufuR.js","assets/card-Ckx3Kwvj.js","assets/Trash01-CG0gTYx7.js","assets/label-DitP_QKf.js","assets/select-Di6xzzYo.js","assets/ChevronDown-CYFvWHpZ.js","assets/switch-sHkW6RUp.js","assets/textarea-D8B22gmM.js","assets/checkbox-I3IyJWnj.js","assets/Eye-D3THRXh6.js","assets/LinkExternal01-jwO28Eeb.js","assets/use-copy-Btaqep1K.js","assets/Key01-Lcx9qTy7.js","assets/Plus-_82_8sq8.js","assets/mcp-oauth-BGmk7Mi5.js","assets/Play-C6QgiUls.js"])))=>i.map(i=>d[i]);
2
- import{e as m,f as n,g as c,j as t,l as f,r as l,ak as p}from"./index-C3Ab2DJ2.js";import{R as u}from"./require-capability-CoJVffIR.js";import"./use-capability-CU6DCnG3.js";import"./access-gate-CEtgmlCt.js";import"./capability-load-error-BXEh1mp-.js";const g=l.lazy(()=>p(()=>import("./registry-layout-t_GwGR-W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{e as i,p as c}from"./index-C3Ab2DJ2.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=i.c(5),{org:r}=c(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
@@ -1 +0,0 @@
1
- import{r as c,j as i,P as C,V as y,_ as B,M as I,bH as M,bG as H,T as z,e as A,c as g}from"./index-C3Ab2DJ2.js";var m="Switch",[U]=z(m),[q,L]=U(m),P=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=B({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(T=>!T),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});P.displayName=m;var E="SwitchThumb",_=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(E,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});_.displayName=E;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(a){return a?"checked":"unchecked"}var $=P,D=_;function G(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
@@ -1 +0,0 @@
1
- import{e as c,c as i,j as r}from"./index-C3Ab2DJ2.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
@@ -1 +0,0 @@
1
- import{e as o,c as l,j as n}from"./index-C3Ab2DJ2.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
@@ -1 +0,0 @@
1
- import{r as a,j as c,P as H,ai as Z,_ as ee,$ as te,V as $,J as oe,M as C,U as G,Z as re,Q as V,W as ne,X as se,T as ae,dB as ie,Y as le,e as _,c as ce}from"./index-C3Ab2DJ2.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",B=a.forwardRef((o,e)=>c.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));B.displayName=de;var pe=B,[O]=ae("Tooltip",[V]),D=V(),z="TooltipProvider",fe=700,A="tooltip.open",[ve,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=fe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(ve,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[he,j]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),h=Z(),f=a.useRef(0),x=i??l.disableHoverableContent,m=d??l.delayDuration,g=a.useRef(!1),[y,T]=ee({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(A))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(te,{...p,children:c.jsx(he,{scope:e,contentId:h,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};Y.displayName=R;var M="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(M,t),s=k(M,t),i=D(t),d=a.useRef(null),l=$(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(oe,{asChild:!0,...i,children:c.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:C(o.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=M;var I="TooltipPortal",[xe,ge]=O(I,{forceMount:void 0}),W=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(xe,{scope:e,forceMount:t,children:c.jsx(G,{present:t||s.open,children:c.jsx(re,{asChild:!0,container:n,children:r})})})};W.displayName=I;var b="TooltipContent",q=a.forwardRef((o,e)=>{const t=ge(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(b,o.__scopeTooltip);return c.jsx(G,{present:r||i.open,children:i.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(me,{side:n,...s,ref:e})})}),me=a.forwardRef((o,e)=>{const t=j(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=$(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=be(y,g.getBoundingClientRect()),w=we(y,T),E=Ee(m.getBoundingClientRect()),P=Re([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(l&&u){const x=g=>f(g,u),m=g=>f(g,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),a.useEffect(()=>{if(i){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=l?.contains(g)||u?.contains(g),w=!Pe(y,i);T?h():w&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,h]),c.jsx(X,{...o,ref:s})}),[Te,ye]=O(R,{isInside:!1}),Ce=ie("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(b,t),p=D(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),a.useEffect(()=>{if(l.trigger){const v=h=>{h.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,u]),c.jsx(ne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(se,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Ce,{children:r}),c.jsx(Te,{scope:t,isInside:!0,children:c.jsx(pe,{id:l.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var K="TooltipArrow",J=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return ye(K,t).isInside?null:c.jsx(le,{...n,...r,ref:e})});J.displayName=K;function be(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function we(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ee(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Pe(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,v=l.x,h=l.y;u>r!=h>r&&t<(v-p)*(r-u)/(h-u)+p&&(n=!n)}return n}function Re(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(e)}function _e(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var je=F,Oe=Y,De=U,Le=W,Ae=q,Me=J;const Q=768,L=()=>globalThis.innerWidth<Q;function Ne(){const o=_.c(2),[e,t]=a.useState(L);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(L),i=globalThis.matchMedia(`(max-width: ${Q-1}px)`);return i.addEventListener("change",s),t(L),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}function ke(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(je,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(ke,{children:c.jsx(Oe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(De,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function $e(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Me,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(Le,{children:c.jsxs(Ae,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}export{He as T,ue as V,$e as a,Se as b,ke as c,Ne as u};
@@ -1 +0,0 @@
1
- import{e as u,p as m,m as g,K as p}from"./index-C3Ab2DJ2.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
@@ -1 +0,0 @@
1
- import{e as f,p as C}from"./index-C3Ab2DJ2.js";import{a as N,b as O,u as S}from"./use-collections-DrlB7sAG.js";import{S as I,u as p}from"./use-mcp-client-BdKIOTso.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const m=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:I,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=p(a);return O(u.id,"CONNECTIONS",A,m)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:I,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=p(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:I,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=p(i);return N(o.id,"CONNECTIONS",n)}export{_ as a,x as b,E as u};
@@ -1 +0,0 @@
1
- import{e as c,r as n}from"./index-C3Ab2DJ2.js";function p(){const e=c.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async i=>{await navigator.clipboard.writeText(i),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
@@ -1 +0,0 @@
1
- import{e as g}from"./index-C3Ab2DJ2.js";import{b as f}from"./use-virtual-mcp-Bc7GdFZa.js";import{m}from"./use-navigate-to-agent-BTMo9com.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,r=u===void 0?!1:u,t=f(),c=m();let s;e[2]!==t.create||e[3]!==r||e[4]!==c?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return r&&c(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=r,e[4]=c,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};