decocms 3.105.1 → 3.106.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 (231) hide show
  1. package/dist/client/assets/{AlertCircle-BByROm_p.js → AlertCircle-Xqr6j1ec.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-_4PndQnE.js → ArrowUpRight-JIM5EKmo.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-DN5CRmoG.js → CheckCircle-0YWte2gD.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-_QIKT6SA.js → ChevronDown-BynJeIwt.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-DlPz6yo9.js → ChevronLeft-DQiHQWQL.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DV6TH1br.js → ChevronRight-D9yn8jpR.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DXq8Dp0y.js → ChevronUp-Cw2uQynG.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-Duuu1rut.js → DotsVertical-s-I-SeMs.js} +1 -1
  9. package/dist/client/assets/{Eye-DBXM6Zj1.js → Eye-Dy66amqx.js} +1 -1
  10. package/dist/client/assets/{FilterLines-DRREmb5i.js → FilterLines-CKjQJFz5.js} +1 -1
  11. package/dist/client/assets/{Globe01-DGNVXaH_.js → Globe01-ClbfJyVj.js} +1 -1
  12. package/dist/client/assets/{Globe04-BdpvmyzG.js → Globe04-2CK2mPg1.js} +1 -1
  13. package/dist/client/assets/{HardDrive-BnHX5rk8.js → HardDrive-Dx19OIYm.js} +1 -1
  14. package/dist/client/assets/{Key01-Co4vwTZr.js → Key01-CYpto-hP.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-CY2bCLro.js → LayoutLeft-DfuPk5zB.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-BHOPN66U.js → LinkExternal01-BY6pxfcE.js} +1 -1
  17. package/dist/client/assets/{Monitor01-DIto-EWx.js → Monitor01-DIakRasc.js} +1 -1
  18. package/dist/client/assets/{Palette-DeLXb-ef.js → Palette-BiMvnm3j.js} +1 -1
  19. package/dist/client/assets/{Play-C_bV7niL.js → Play-RNy-gHCT.js} +1 -1
  20. package/dist/client/assets/{Plus-Bfl2Mr1z.js → Plus-BUzQUcBo.js} +1 -1
  21. package/dist/client/assets/{SearchLg-xan1p51u.js → SearchLg-BrFHn1VQ.js} +1 -1
  22. package/dist/client/assets/{SearchMd-Bn23mcBP.js → SearchMd-BCWqgdhj.js} +1 -1
  23. package/dist/client/assets/{Settings02-CETGCcAp.js → Settings02-e1tD5mMi.js} +1 -1
  24. package/dist/client/assets/{Shield01-DHcTXWCs.js → Shield01-CCbPTO_T.js} +1 -1
  25. package/dist/client/assets/{Star01-IeVtusrz.js → Star01-K-8uJAnL.js} +1 -1
  26. package/dist/client/assets/{Stars01-DsEVLQGr.js → Stars01-DC5B5fh3.js} +1 -1
  27. package/dist/client/assets/{Stars02-Xy76m3KA.js → Stars02-D2H5PbBg.js} +1 -1
  28. package/dist/client/assets/{Sun-DE4b9Sn0.js → Sun-BEU2sOPn.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-BdWlDtq0.js → SwitchHorizontal01-CuuAQB1I.js} +1 -1
  30. package/dist/client/assets/{Tool01-C7YicPIW.js → Tool01-CfYPNw_C.js} +1 -1
  31. package/dist/client/assets/{Trash01-Bb31xMPA.js → Trash01-mBWH2_eT.js} +1 -1
  32. package/dist/client/assets/{Upload01-Ct3XJhf3.js → Upload01-C5TCL0j-.js} +1 -1
  33. package/dist/client/assets/{User01-D8va4iBz.js → User01-DLp0deex.js} +1 -1
  34. package/dist/client/assets/{Users01-C8khHCsF.js → Users01-fyeOJNBU.js} +1 -1
  35. package/dist/client/assets/{Users03-DcG-uvYG.js → Users03-6gLyEuGv.js} +1 -1
  36. package/dist/client/assets/{X-B8wYbOHP.js → X-BICfxl5D.js} +1 -1
  37. package/dist/client/assets/{XCircle-Cbl4oRwE.js → XCircle-CKou8mpC.js} +1 -1
  38. package/dist/client/assets/{XClose-DA8oRcGC.js → XClose-xV2ZQDrx.js} +1 -1
  39. package/dist/client/assets/{Zap-Ck4Jbz5x.js → Zap-Dc5VDOja.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-Cvjv-DE3.js → ZapSquare-O2LJAU94.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-CJ8iZ9OJ.js → ZoomOut-TulSR7oT.js} +1 -1
  42. package/dist/client/assets/{access-gate-DBkmPPlf.js → access-gate-BgsOEZrK.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-DkUYmSyY.js → add-section-modal-BZfRz2dr.js} +1 -1
  44. package/dist/client/assets/{agent-icon-D6ScS5eo.js → agent-icon-CmJIYKNa.js} +1 -1
  45. package/dist/client/assets/{agents-list-DYgfmpQ-.js → agents-list-ClT2kfHF.js} +1 -1
  46. package/dist/client/assets/ai-providers-DMmN4ueH.js +1 -0
  47. package/dist/client/assets/{alert-BdhL3xdV.js → alert-BCNR7EVx.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-BXnZrTbX.js → alert-dialog-ZMN4L58U.js} +1 -1
  49. package/dist/client/assets/app-editor-CnqMwcfe.js +1 -0
  50. package/dist/client/assets/{auth-I8PcsAZz.js → auth-Ci0maryd.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-DRjOrMPI.js → auth-catchall-BZbp3bDE.js} +1 -1
  52. package/dist/client/assets/{auth-entry-HMvk6Dsy.js → auth-entry-DoyiD20Z.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-Dt60FoUk.js → auth-split-layout-IB7BGkE-.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-CVsGhQoh.js → authenticate-and-persist-oauth-CZPX5X5k.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-BsPVv9-8.js → automation-list-row-wzlcI0kv.js} +1 -1
  56. package/dist/client/assets/{automation-runs-BiLlGi5i.js → automation-runs-Cz-auyir.js} +1 -1
  57. package/dist/client/assets/{automations-BDRy4W4a.js → automations-C3n--i43.js} +1 -1
  58. package/dist/client/assets/{avatar-Bpn7ltM4.js → avatar-Cd0xwXxq.js} +1 -1
  59. package/dist/client/assets/{badge-CVwJxD7r.js → badge-US-X-4MC.js} +1 -1
  60. package/dist/client/assets/{block-document-BxsfcHpJ.js → block-document-BiB4Wr2c.js} +1 -1
  61. package/dist/client/assets/{brand-context-Co0uWyBM.js → brand-context-BEutrZxI.js} +1 -1
  62. package/dist/client/assets/{buckets-DAgLILdk.js → buckets-DUN5ldCC.js} +1 -1
  63. package/dist/client/assets/{capability-load-error-BrvPQpma.js → capability-load-error-B8GWHwlL.js} +1 -1
  64. package/dist/client/assets/{card-Ci8NZwVP.js → card-B200otkw.js} +1 -1
  65. package/dist/client/assets/category-editor-DSfTPN75.js +1 -0
  66. package/dist/client/assets/chat-context-GFFBEPEU.js +21 -0
  67. package/dist/client/assets/{checkbox-CJMdVFNu.js → checkbox-DA-oWLyy.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-CJgqOkyk.js → cli-auth-success-BLTFgffv.js} +1 -1
  69. package/dist/client/assets/collection-detail-ksU3fola.js +1 -0
  70. package/dist/client/assets/{collection-display-button-DDbIlc4p.js → collection-display-button-CdmxMOBW.js} +1 -1
  71. package/dist/client/assets/{collection-search-CRmkJvUt.js → collection-search-BvmQJq8P.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-Gyp1a8vw.js → collection-tabs-BLB5SWZa.js} +1 -1
  73. package/dist/client/assets/{command-D-xFDgLJ.js → command-esgtnpD6.js} +1 -1
  74. package/dist/client/assets/{commerce-onboarding-B0pBV7MT.js → commerce-onboarding-CmxbKnuZ.js} +1 -1
  75. package/dist/client/assets/{connect-desktop-dialog-06YJzoAV.js → connect-desktop-dialog-BBGOPoIq.js} +1 -1
  76. package/dist/client/assets/{connection-card-Cjd1XzQq.js → connection-card-BH-OGmTu.js} +1 -1
  77. package/dist/client/assets/{connection-detail-GidamtLz.js → connection-detail-BqcZ4rre.js} +1 -1
  78. package/dist/client/assets/{connection-form-helpers-W8YQhc7h.js → connection-form-helpers-Bi2tQByg.js} +1 -1
  79. package/dist/client/assets/{connections-BCSUiGFO.js → connections-rl2xlhQn.js} +1 -1
  80. package/dist/client/assets/{context-menu-C9KB5nzd.js → context-menu-zwWLAMxe.js} +1 -1
  81. package/dist/client/assets/{decopilot-Dbt2jBoA.js → decopilot-bUCWwVB7.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-TYE_B7pR.js → decopilot-sse-pool-IAlPSPK_.js} +1 -1
  83. package/dist/client/assets/{dialog-MiZL-_YR.js → dialog-BxPiF5oN.js} +1 -1
  84. package/dist/client/assets/{domain-settings-CX3cfrWP.js → domain-settings-CeRsMV94.js} +1 -1
  85. package/dist/client/assets/{drawer-CtVcR9-y.js → drawer-DaarKmto.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-DXRwFWu2.js → dropdown-menu-CZpb3eYC.js} +1 -1
  87. package/dist/client/assets/{empty-state-a9stw3Wm.js → empty-state-CAlFsQdU.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-DtIqJdjB.js → extract-connection-data-Dsj4pa-O.js} +1 -1
  89. package/dist/client/assets/file-explorer-CQwIfJcQ.js +2 -0
  90. package/dist/client/assets/{file-type-icon-hXLsuGMr.js → file-type-icon-BwBw9jgA.js} +1 -1
  91. package/dist/client/assets/{files-BGQIc3Zv.js → files-Ywa5pDAk.js} +1 -1
  92. package/dist/client/assets/{form-B8RX1FbF.js → form-Bf2ApXQo.js} +1 -1
  93. package/dist/client/assets/{general-pujya2Je.js → general-C7ye12K0.js} +1 -1
  94. package/dist/client/assets/{github-repo-picker-B_w3Ltce.js → github-repo-picker--XFvpeLm.js} +1 -1
  95. package/dist/client/assets/{hooks-BtB9MPhf.js → hooks-B9L41m_Y.js} +6 -6
  96. package/dist/client/assets/{import-from-deco-dialog-zs11gduw.js → import-from-deco-dialog-CZYRrcZ4.js} +1 -1
  97. package/dist/client/assets/{index-_JYNVywS.js → index-B8k191tl.js} +1 -1
  98. package/dist/client/assets/index-BADtduG9.css +1 -0
  99. package/dist/client/assets/{index-DxlHohos.js → index-BSJueg0-.js} +3 -3
  100. package/dist/client/assets/{index-dQkZC9Us.js → index-BWgKDEIC.js} +1 -1
  101. package/dist/client/assets/{index-CJ_WyHaH.js → index-CvGS2PsG.js} +5 -5
  102. package/dist/client/assets/{index-CmazY4pI.js → index-D9z3Q7j8.js} +1 -1
  103. package/dist/client/assets/{index-BVpOsWbq.js → index-DBTxlw_P.js} +1 -1
  104. package/dist/client/assets/index-DiptY5jt.js +3 -0
  105. package/dist/client/assets/{index-ARMeWSz8.js → index-DqbKvpBX.js} +2 -2
  106. package/dist/client/assets/{index-DaDnXYYt.js → index-Dxw7KXbh.js} +1 -1
  107. package/dist/client/assets/index-OO3MJk0K.js +1 -0
  108. package/dist/client/assets/{index-BR8zBqiF.js → index-PCJmXHv-.js} +1 -1
  109. package/dist/client/assets/{index-DSUV3he9.js → index-Q6pGpUHX.js} +1 -1
  110. package/dist/client/assets/index-_pdBi5yI.js +1 -0
  111. package/dist/client/assets/{index-e6GyeBP5.js → index-gHhgmmKj.js} +1 -1
  112. package/dist/client/assets/{index-redirect-BNc-bIGx.js → index-redirect-B85UW6J0.js} +1 -1
  113. package/dist/client/assets/{input-ynoHkRGd.js → input-cp_TKu2Y.js} +1 -1
  114. package/dist/client/assets/{integration-icon-B15UAASa.js → integration-icon-CmIcxQej.js} +1 -1
  115. package/dist/client/assets/{label-V1xGlDvf.js → label-Bqc_uyUQ.js} +1 -1
  116. package/dist/client/assets/{login--tZMrPCS.js → login-D-sAQcuc.js} +1 -1
  117. package/dist/client/assets/{mcp-oauth-BiyHe-0P.js → mcp-oauth-C63GAzZt.js} +1 -1
  118. package/dist/client/assets/{members-DtAgFjE0.js → members-Cm4EmLJ1.js} +1 -1
  119. package/dist/client/assets/{monaco-editor-C_4iCLuk.js → monaco-editor-CpkaOm7i.js} +1 -1
  120. package/dist/client/assets/{monitoring-stats-row-C6wS3zjp.js → monitoring-stats-row-DNfFrBf6.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-D6Rcg_Zb.js → oauth-callback-B6xjzh36.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-ai-provider-w3KtPFqf.js → oauth-callback-ai-provider-C4bzhTUi.js} +1 -1
  123. package/dist/client/assets/{onboarding-DuYGAwIF.js → onboarding-BOmFCgNY.js} +1 -1
  124. package/dist/client/assets/{org-install-DEvusFVS.js → org-install-DJi_hBJB.js} +1 -1
  125. package/dist/client/assets/{org-layout-DKFVl90y.js → org-layout-Dist7T6X.js} +1 -1
  126. package/dist/client/assets/{organization-choice-C0Z0jWob.js → organization-choice-COX5rRn1.js} +1 -1
  127. package/dist/client/assets/{page-seo-form-ILJLsAuC.js → page-seo-form-DeC7xkG4.js} +1 -1
  128. package/dist/client/assets/page-seo-sheet-F5FfJolP.js +1 -0
  129. package/dist/client/assets/{popover-CLPjeHBw.js → popover-C5HgpX4x.js} +1 -1
  130. package/dist/client/assets/post-editor-DSFBqpu_.js +1 -0
  131. package/dist/client/assets/{preview-dialog-AzszzSwr.js → preview-dialog-BdwQBPGz.js} +1 -1
  132. package/dist/client/assets/{primitives-DLz7zjZ-.js → primitives-DTGB3Mts.js} +1 -1
  133. package/dist/client/assets/{profile-BWAExLb5.js → profile-B3f7KSDE.js} +1 -1
  134. package/dist/client/assets/project-app-view-By8MOEIa.js +1 -0
  135. package/dist/client/assets/record-editor-Bos57gw5.js +1 -0
  136. package/dist/client/assets/registry-DxM4RNob.js +2 -0
  137. package/dist/client/assets/{registry-layout-BqJeHdsD.js → registry-layout-BuBeN6w1.js} +1 -1
  138. package/dist/client/assets/{require-capability-OmzKtJ8d.js → require-capability-Ddee1AmI.js} +1 -1
  139. package/dist/client/assets/{required-auth-layout-DLQWxGOz.js → required-auth-layout-C5MLQuQM.js} +1 -1
  140. package/dist/client/assets/{reset-password-Bj_roNvZ.js → reset-password-BqewD2Xb.js} +1 -1
  141. package/dist/client/assets/{roles-Bpe6PFJS.js → roles-D2yEgJSq.js} +1 -1
  142. package/dist/client/assets/{scroll-area-BQ4NX1bn.js → scroll-area-DQp5D973.js} +1 -1
  143. package/dist/client/assets/{search-input-Ct5Xi3oF.js → search-input-Be3BJ5YO.js} +1 -1
  144. package/dist/client/assets/{secrets-XTAVC8co.js → secrets-yrIWdsoK.js} +1 -1
  145. package/dist/client/assets/{sections-editor-BR-Kmz5j.js → sections-editor-DqTPco-Q.js} +2 -2
  146. package/dist/client/assets/{select-DkrQC107.js → select-DTMty5cI.js} +1 -1
  147. package/dist/client/assets/{select-model-DzXi1qbA.js → select-model-Cv0Zl4px.js} +1 -1
  148. package/dist/client/assets/seo-editor-DqNZ_ieG.js +1 -0
  149. package/dist/client/assets/settings-layout-CooyVDE-.js +1 -0
  150. package/dist/client/assets/{settings-section-DoeeVHY_.js → settings-section-Czv-RCDl.js} +1 -1
  151. package/dist/client/assets/{sheet-BrXdL-Lt.js → sheet-BYUn2G0P.js} +1 -1
  152. package/dist/client/assets/{shell-controls-_CHhBdE3.js → shell-controls-aiEu-oNo.js} +1 -1
  153. package/dist/client/assets/{shell-layout-BYRDelQn.js → shell-layout-DlX3hQOg.js} +1 -1
  154. package/dist/client/assets/{shell-route-loading-DjGn54jz.js → shell-route-loading-B5fcdA3q.js} +1 -1
  155. package/dist/client/assets/{sidebar-ZPFWMUP5.js → sidebar-bM2CxBRy.js} +1 -1
  156. package/dist/client/assets/{skeleton-DTay4-M3.js → skeleton-DGyuQcWM.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-_Zt-p5de.js → sortable.esm-BpfhpFW8.js} +1 -1
  158. package/dist/client/assets/{sso-CRaftWmW.js → sso-4AoXSWbM.js} +1 -1
  159. package/dist/client/assets/{store-Bg-LYwnp.js → store-Di9pgKIN.js} +1 -1
  160. package/dist/client/assets/store-registry-D-YwJpzW.js +2 -0
  161. package/dist/client/assets/{studio-tools-D9_XU7fF.js → studio-tools-FVMOC3DG.js} +1 -1
  162. package/dist/client/assets/{switch-ClTjjV_x.js → switch-RrT6wLYL.js} +1 -1
  163. package/dist/client/assets/{table-gmNXuzch.js → table-FgURfELI.js} +1 -1
  164. package/dist/client/assets/{tabs-Dj7TFZyD.js → tabs-Dyn89gKO.js} +1 -1
  165. package/dist/client/assets/{task-status-CdFvis4P.js → task-status-ClaTWvtm.js} +1 -1
  166. package/dist/client/assets/{textarea-CxDb-u2d.js → textarea-Sgn1Re8l.js} +1 -1
  167. package/dist/client/assets/{toggle-group-D_3_bPL8.js → toggle-group-DLGm3J-b.js} +1 -1
  168. package/dist/client/assets/{toolbar-rA1gLMyG.js → toolbar-CSosPZ4D.js} +1 -1
  169. package/dist/client/assets/{tooltip-DMmgM7e7.js → tooltip-h0yvcJt8.js} +1 -1
  170. package/dist/client/assets/{types-CE-xSeW6.js → types-BRex8hoG.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-wHUqYAGC.js → use-ai-providers-hvnDjM8p.js} +1 -1
  172. package/dist/client/assets/{use-automations-BxMn7-hR.js → use-automations-BKwvpJAo.js} +1 -1
  173. package/dist/client/assets/{use-capability-ddKCLYA5.js → use-capability-CFzya3JS.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-BxA5cEF7.js → use-clock-tick-DMIcMeX9.js} +1 -1
  175. package/dist/client/assets/{use-collections-B6pMz1IK.js → use-collections-_UlIpgjP.js} +1 -1
  176. package/dist/client/assets/{use-connection-BMbtT7eU.js → use-connection-BxSCzh2E.js} +1 -1
  177. package/dist/client/assets/{use-copy-Di7IRNeU.js → use-copy-BvBAqh5C.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-Bz-J6AZ9.js → use-create-virtual-mcp-DjQWwvK4.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-BpDYt9KJ.js → use-debounced-autosave-BHDQ7RHW.js} +1 -1
  180. package/dist/client/assets/{use-debounced-value-LxQyiGK7.js → use-debounced-value-BB2O7NbI.js} +1 -1
  181. package/dist/client/assets/use-decopilot-events-CRfiqA6B.js +1 -0
  182. package/dist/client/assets/{use-delete-connection-Ce2rhNHB.js → use-delete-connection-Pw6IkYwM.js} +1 -1
  183. package/dist/client/assets/{use-file-configs-B33ILX1M.js → use-file-configs-BasVpNvI.js} +1 -1
  184. package/dist/client/assets/{use-infinite-scroll-DISg61-W.js → use-infinite-scroll-BSMoGR4k.js} +1 -1
  185. package/dist/client/assets/{use-join-requests-DjTV8gKb.js → use-join-requests-Df5JF2iE.js} +1 -1
  186. package/dist/client/assets/{use-mcp-client-CNnx-haj.js → use-mcp-client-Bcb6PO24.js} +1 -1
  187. package/dist/client/assets/{use-mcp-prompts-C3ux8bEv.js → use-mcp-prompts-AJeQrCqj.js} +1 -1
  188. package/dist/client/assets/{use-mcp-tools-JoKvL2pB.js → use-mcp-tools-qTvFx3Nb.js} +1 -1
  189. package/dist/client/assets/{use-members-BsBXC0fj.js → use-members-zes1mdlJ.js} +1 -1
  190. package/dist/client/assets/{use-mobile-hKrwQBDS.js → use-mobile-CMJi7yoD.js} +1 -1
  191. package/dist/client/assets/{use-navigate-to-agent-C0J9CJSW.js → use-navigate-to-agent-C83xFoxW.js} +1 -1
  192. package/dist/client/assets/{use-org-auth-client-o86Ff5f3.js → use-org-auth-client-DJhVKhdJ.js} +1 -1
  193. package/dist/client/assets/{use-org-sso-CwJuiyEi.js → use-org-sso-C1crpljI.js} +1 -1
  194. package/dist/client/assets/{use-organization-roles-Dj2BwNVh.js → use-organization-roles-m3zsO9Ct.js} +1 -1
  195. package/dist/client/assets/{use-organization-settings-DwyMEelQ.js → use-organization-settings-D1Ju0RBO.js} +1 -1
  196. package/dist/client/assets/{use-registry-connections-CRiSvQWj.js → use-registry-connections-iyE_-Lc9.js} +1 -1
  197. package/dist/client/assets/{use-secrets-C6nujoJA.js → use-secrets-DnspbGKA.js} +1 -1
  198. package/dist/client/assets/use-status-sounds-HySek8pC.js +1 -0
  199. package/dist/client/assets/{use-view-mode-BikGMtf7.js → use-view-mode-ZGLIhwLE.js} +1 -1
  200. package/dist/client/assets/{use-virtual-mcp-y_uhJfNX.js → use-virtual-mcp-co7b_FD9.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-CuzY8zzZ.js +1 -0
  202. package/dist/client/assets/useSuspenseInfiniteQuery-BpUXD3KF.js +1 -0
  203. package/dist/client/assets/{useSuspenseQueries-BKDBm-Nf.js → useSuspenseQueries-DnuDPZjI.js} +1 -1
  204. package/dist/client/assets/variant-calendar-DDApZRGI.js +1 -0
  205. package/dist/client/assets/{view-mode-toggle-xXBscn87.js → view-mode-toggle-BChdPYXY.js} +1 -1
  206. package/dist/client/index.html +2 -2
  207. package/dist/server/cli.js +452 -452
  208. package/dist/server/server.js +303 -303
  209. package/package.json +1 -1
  210. package/dist/client/assets/ai-providers-DNVcTn1-.js +0 -1
  211. package/dist/client/assets/app-editor-DLS2Ao40.js +0 -1
  212. package/dist/client/assets/category-editor-DLZPLk4Z.js +0 -1
  213. package/dist/client/assets/chat-context-Crn2GsKg.js +0 -21
  214. package/dist/client/assets/collection-detail-C8dcSxQg.js +0 -1
  215. package/dist/client/assets/file-explorer-BIWTFXQW.js +0 -2
  216. package/dist/client/assets/index-BBz2M403.css +0 -1
  217. package/dist/client/assets/index-BDT4WGCR.js +0 -1
  218. package/dist/client/assets/index-BNXFraW9.js +0 -3
  219. package/dist/client/assets/index-CZU7Bce-.js +0 -1
  220. package/dist/client/assets/page-seo-sheet-BHZlDs16.js +0 -1
  221. package/dist/client/assets/post-editor-ByHrL6yq.js +0 -1
  222. package/dist/client/assets/project-app-view-C8_khFT-.js +0 -1
  223. package/dist/client/assets/record-editor-DttyJ_og.js +0 -1
  224. package/dist/client/assets/registry-CbDUMvyl.js +0 -2
  225. package/dist/client/assets/seo-editor-tbJ8xcmu.js +0 -1
  226. package/dist/client/assets/settings-layout-tf8FTKhO.js +0 -1
  227. package/dist/client/assets/store-registry-CCR87NxK.js +0 -2
  228. package/dist/client/assets/use-status-sounds-aucp5nWv.js +0 -1
  229. package/dist/client/assets/useInfiniteQuery-CtYnQlRb.js +0 -1
  230. package/dist/client/assets/useSuspenseInfiniteQuery-P7u-T8E2.js +0 -1
  231. package/dist/client/assets/variant-calendar-Bvpzf5Hr.js +0 -1
@@ -1 +0,0 @@
1
- import{c as k,j as n,r as $,D as J,m as xe,l as Q,i as le,an as Z,t as U,K as te,k as se,B as Y,d as st,a8 as nt,E as it,a as ot}from"./index-DxlHohos.js";import{u as ge}from"./use-mobile-hKrwQBDS.js";import{u as rt}from"./useSuspenseQueries-BKDBm-Nf.js";import{i as lt,u as ae,m as at,a as ct,S as dt}from"./use-mcp-client-CNnx-haj.js";import{u as mt,b as ut,v as ft,a as pt}from"./use-virtual-mcp-y_uhJfNX.js";import{i as ht}from"./ChevronUp-DXq8Dp0y.js";import{i as xt,A as ce,t as gt,ab as yt,E as bt,k as jt}from"./agent-icon-D6ScS5eo.js";import{s as ye}from"./Plus-Bfl2Mr1z.js";import{i as $e}from"./X-B8wYbOHP.js";import{C as oe}from"./index-BNXFraW9.js";import{b as vt}from"./chat-context-Crn2GsKg.js";import{N as Nt}from"./decopilot-Dbt2jBoA.js";import{g as wt,b as Ae,c as re,K as Pe,P as Ee,D as Me,d as St,S as _t,v as Ct,e as It,C as Tt,s as kt,l as $t,k as At,o as Pt,u as Et,j as Mt,h as zt}from"./sortable.esm-_Zt-p5de.js";import{u as ze,a as Oe,o as Ot}from"./use-organization-settings-DwyMEelQ.js";import{c as be,b as Lt,h as Dt}from"./shell-layout-BYRDelQn.js";import{I as Le}from"./input-ynoHkRGd.js";import{S as Ht,t as je,P as Rt,j as Ft,s as Ut,g as Bt}from"./scroll-area-BQ4NX1bn.js";import{S as Vt,a as Kt,b as Wt,c as qt,d as Gt}from"./sheet-BrXdL-Lt.js";import{S as H}from"./skeleton-DTay4-M3.js";import{t as De}from"./ChevronDown-_QIKT6SA.js";import{c as He}from"./ZoomOut-CJ8iZ9OJ.js";import{g as Re,M as Qt}from"./types-CE-xSeW6.js";import{I as Fe}from"./integration-icon-B15UAASa.js";import{b as Jt,c as Xt,S as Zt,a as we,d as Yt}from"./select-DkrQC107.js";import{T as es}from"./textarea-CxDb-u2d.js";import{u as Ue}from"./studio-tools-D9_XU7fF.js";import{a as ts}from"./use-mcp-tools-JoKvL2pB.js";import{i as ss}from"./XCircle-Cbl4oRwE.js";import{f as ns}from"./tab-id-BptcWVWa.js";import{g as is}from"./use-mcp-prompts-C3ux8bEv.js";import{u as os,w as rs}from"./hooks-BtB9MPhf.js";import{a as ls,g as as,c as cs,b as ds,D as ms}from"./dropdown-menu-DXRwFWu2.js";import{s as us}from"./Trash01-Bb31xMPA.js";import{a as fs,u as ps}from"./use-ai-providers-wHUqYAGC.js";import{u as hs}from"./connect-desktop-dialog-06YJzoAV.js";import{a as xs}from"./toolbar-rA1gLMyG.js";import"./auth-I8PcsAZz.js";import"./use-collections-B6pMz1IK.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./Zap-Ck4Jbz5x.js";import"./tooltip-DMmgM7e7.js";import"./dialog-MiZL-_YR.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./form-B8RX1FbF.js";import"./label-V1xGlDvf.js";import"./tabs-Dj7TFZyD.js";import"./toggle-group-D_3_bPL8.js";import"./popover-CLPjeHBw.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./question-004-sINsf4GQ.js";import"./checkbox-CJMdVFNu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bpn7ltM4.js";import"./settings-section-DoeeVHY_.js";import"./card-Ci8NZwVP.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./use-connection-BMbtT7eU.js";import"./extract-connection-data-DtIqJdjB.js";import"./collection-tabs-Gyp1a8vw.js";import"./badge-CVwJxD7r.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./file-type-icon-hXLsuGMr.js";import"./content-blocks-o63cs2vh.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function Be(t){const e=k.c(11),{properties:s,required:o,values:i,onChange:r}=t;let a;e[0]!==o?(a=o??[],e[0]=o,e[1]=a):a=e[1];let d;e[2]!==a?(d=new Set(a),e[2]=a,e[3]=d):d=e[3];const l=d;let m;e[4]!==s?(m=Object.entries(s),e[4]=s,e[5]=m):m=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==m||e[9]!==i?(c=n.jsx("div",{className:"flex flex-col gap-2",children:m.map(u=>{const[f,p]=u;return n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"text-xs font-medium leading-none flex items-center gap-1",children:[f,l.has(f)&&n.jsx("span",{className:"text-red-500 text-[10px]",children:"*"})]}),n.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:p.type})]}),p.description&&n.jsx("p",{className:"text-[10px] text-muted-foreground leading-snug",children:p.description}),n.jsx(gs,{type:p.type,fieldKey:f,value:i[f],onChange:h=>r(f,h)})]},f)})}),e[6]=r,e[7]=l,e[8]=m,e[9]=i,e[10]=c):c=e[10],c}function gs(t){const e=k.c(19),{type:s,fieldKey:o,value:i,onChange:r}=t;if(s==="object"||s==="array"){const c=i??"";let u;e[0]!==r?(u=h=>r(h.target.value),e[0]=r,e[1]=u):u=e[1];const f=`Enter ${o} as JSON…`;let p;return e[2]!==c||e[3]!==u||e[4]!==f?(p=n.jsx(es,{className:"font-mono text-xs h-16",value:c,onChange:u,placeholder:f,rows:2}),e[2]=c,e[3]=u,e[4]=f,e[5]=p):p=e[5],p}if(s==="boolean"){const c=i!=null?String(i):"";let u;e[6]!==r?(u=x=>r(x==="true"),e[6]=r,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Jt,{className:"h-7 text-xs",children:n.jsx(Xt,{placeholder:"Select…"})}),e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Zt,{children:[n.jsx(we,{value:"true",children:"true"}),n.jsx(we,{value:"false",children:"false"})]}),e[9]=p):p=e[9];let h;return e[10]!==c||e[11]!==u?(h=n.jsxs(Yt,{value:c,onValueChange:u,children:[f,p]}),e[10]=c,e[11]=u,e[12]=h):h=e[12],h}const a=i??"";let d;e[13]!==r?(d=c=>r(c.target.value),e[13]=r,e[14]=d):d=e[14];const l=`Enter ${o}…`;let m;return e[15]!==a||e[16]!==d||e[17]!==l?(m=n.jsx(Le,{className:"h-7 text-xs",value:a,onChange:d,placeholder:l}),e[15]=a,e[16]=d,e[17]=l,e[18]=m):m=e[18],m}const ne=8;function ys(t){const e=k.c(16),{open:s,onOpenChange:o}=t,[i,r]=$.useState("");let a,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Vt,{children:"Manage home"}),d=n.jsx(Kt,{children:"Add agents to the home board and pin their interactive UIs or prompts."}),e[0]=a,e[1]=d):(a=e[0],d=e[1]);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(xt,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none","aria-hidden":!0}),e[2]=l):l=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=x=>r(x.target.value),e[3]=m):m=e[3];let c;e[4]!==i?(c=n.jsxs(Wt,{className:"px-5 py-4 border-b border-border",children:[a,d,n.jsxs("div",{className:"relative mt-3",children:[l,n.jsx(Le,{value:i,onChange:m,placeholder:"Search agents…",className:"pl-8 h-8 text-sm"})]})]}),e[4]=i,e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Gs,{}),e[6]=u):u=e[6];let f;e[7]!==i?(f=n.jsx(Ht,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"p-3 flex flex-col gap-4",children:n.jsx($.Suspense,{fallback:u,children:n.jsx(js,{search:i})})})}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==c||e[10]!==f?(p=n.jsxs(qt,{side:"right",className:"w-full sm:max-w-md p-0 flex flex-col",children:[c,f]}),e[9]=c,e[10]=f,e[11]=p):p=e[11];let h;return e[12]!==o||e[13]!==s||e[14]!==p?(h=n.jsx(Gt,{open:s,onOpenChange:o,children:p}),e[12]=o,e[13]=s,e[14]=p,e[15]=h):h=e[15],h}function bs(t){const e=k.c(32),{org:s}=J(),o=ze();let i;e[0]!==o?.ids?(i=o?.ids??[],e[0]=o?.ids,e[1]=i):i=e[1];const r=i,a=Oe(),d=ut(),l=xe();let m;e[2]!==s||e[3]!==l?(m=()=>l.refetchQueries({queryKey:te.homeNextActions(s.slug),type:"active"}),e[2]=s,e[3]=l,e[4]=m):m=e[4];const c=m;let u;e[5]!==r?(u=_=>r.includes(_),e[5]=r,e[6]=u):u=e[6];const f=u;let p;e[7]!==r||e[8]!==t?(p=t?r.filter(_=>t.has(_)).length:r.length,e[7]=r,e[8]=t,e[9]=p):p=e[9];const x=p>=ne;let y;e[10]!==x||e[11]!==f||e[12]!==a?(y=_=>f(_)||x?Promise.resolve():a.apply(I=>I.includes(_)?null:[...I,_]),e[10]=x,e[11]=f,e[12]=a,e[13]=y):y=e[13];const b=y;let v;e[14]!==a?(v=_=>a.apply(I=>I.filter(T=>T!==_)),e[14]=a,e[15]=v):v=e[15];const N=v;let j;e[16]!==a?(j=_=>a.apply(()=>_),e[16]=a,e[17]=j):j=e[17];const g=j;let w;e[18]!==d||e[19]!==x||e[20]!==f||e[21]!==c||e[22]!==a?(w=async(_,I)=>{await d.update.mutateAsync({id:_.id,data:{metadata:I}}),!f(_.id)&&!x&&await a.apply(T=>T.includes(_.id)?null:[...T,_.id]),await c()},e[18]=d,e[19]=x,e[20]=f,e[21]=c,e[22]=a,e[23]=w):w=e[23];const S=w;let C;return e[24]!==b||e[25]!==x||e[26]!==r||e[27]!==f||e[28]!==N||e[29]!==g||e[30]!==S?(C={homeIds:r,isOnHome:f,atLimit:x,addAgent:b,removeAgent:N,reorder:g,saveAgentMetadata:S},e[24]=b,e[25]=x,e[26]=r,e[27]=f,e[28]=N,e[29]=g,e[30]=S,e[31]=C):C=e[31],C}function js(t){const e=k.c(21),{search:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={pageSize:1e3},e[0]=o):o=e[0];const i=mt(o);let r;e[1]!==i?(r=new Set(i.map(_s)),e[1]=i,e[2]=r):r=e[2];const a=bs(r);let d,l,m;if(e[3]!==i||e[4]!==a||e[5]!==s){const x=new Map(i.map(Ss));d=s.trim().toLowerCase();const y=N=>!d||N.title?.toLowerCase().includes(d);l=a.homeIds.map(N=>x.get(N)).filter(ws).filter(y);const b=wt(i);let v;e[9]!==a?(v=N=>!a.isOnHome(N.id),e[9]=a,e[10]=v):v=e[10],m=i.filter(Ns).filter(N=>!b.has(N.id)).filter(v).filter(y).sort(vs),e[3]=i,e[4]=a,e[5]=s,e[6]=d,e[7]=l,e[8]=m}else d=e[6],l=e[7],m=e[8];const c=m;let u;e[11]!==a||e[12]!==l?(u=n.jsx(Cs,{home:a,agents:l}),e[11]=a,e[12]=l,e[13]=u):u=e[13];const f=!!d;let p;e[14]!==c||e[15]!==a||e[16]!==f?(p=n.jsx(ks,{home:a,agents:c,hasSearch:f}),e[14]=c,e[15]=a,e[16]=f,e[17]=p):p=e[17];let h;return e[18]!==u||e[19]!==p?(h=n.jsxs(n.Fragment,{children:[u,p]}),e[18]=u,e[19]=p,e[20]=h):h=e[20],h}function vs(t,e){return(t.title??"").localeCompare(e.title??"")}function Ns(t){return t.id&&!lt(t.id)}function ws(t){return!!t}function Ss(t){return[t.id,t]}function _s(t){return t.id}function Ve(t){const e=k.c(7),{title:s,hint:o}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1];let r;e[2]!==o?(r=o&&n.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=r):r=e[3];let a;return e[4]!==i||e[5]!==r?(a=n.jsxs("div",{className:"flex items-center justify-between px-1",children:[i,r]}),e[4]=i,e[5]=r,e[6]=a):a=e[6],a}function Cs(t){const e=k.c(14),{home:s,agents:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={activationConstraint:{distance:5}},e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={coordinateGetter:kt},e[1]=r):r=e[1];const a=Ae(re(Ee,i),re(Pe,r));let d;e[2]!==s?(d=p=>{const{active:h,over:x}=p;if(!x||h.id===x.id)return;const y=s.homeIds,b=y.indexOf(h.id),v=y.indexOf(x.id);b===-1||v===-1||s.reorder($t([...y],b,v)).catch(Ts)},e[2]=s,e[3]=d):d=e[3];const l=d,m=`${s.homeIds.length}/${ne}`;let c;e[4]!==m?(c=n.jsx(Ve,{title:"On home",hint:m}),e[4]=m,e[5]=c):c=e[5];let u;e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==a?(u=o.length===0?n.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No agents on the home yet."}):n.jsx(Me,{sensors:a,collisionDetection:St,onDragEnd:l,children:n.jsx(_t,{items:o.map(Is),strategy:Ct,children:n.jsx("div",{className:"flex flex-col gap-1",children:o.map(p=>n.jsx(As,{agent:p,home:s},p.id))})})}),e[6]=o,e[7]=l,e[8]=s,e[9]=a,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==u?(f=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f}function Is(t){return t.id}function Ts(){return U.error("Couldn't reorder home — please try again.")}function ks(t){const e=k.c(6),{home:s,agents:o,hasSearch:i}=t,[r,a]=$.useState(20);let d;if(e[0]!==o||e[1]!==i||e[2]!==s||e[3]!==r){const l=o.slice(0,r);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ve,{title:"Add to home"}),e[5]=m):m=e[5],d=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,o.length===0?n.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:i?"No agents match.":"Every agent is on the home."}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex flex-col gap-1",children:l.map(c=>n.jsx(Ms,{agent:c,home:s},c.id))}),o.length>r&&n.jsxs("button",{type:"button",onClick:()=>a($s),className:"mt-1 self-center rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",children:["Load more (",o.length-r,")"]})]})]}),e[0]=o,e[1]=i,e[2]=s,e[3]=r,e[4]=d}else d=e[4];return d}function $s(t){return t+20}function Ke(t){const e=Z(t.metadata?.ui).filter(r=>!!r.resourceUri).length,s=t.metadata?.ui?.homePrompts,o=Array.isArray(s)?s.length:null,i=[];return e>0&&i.push(`${e} tile${e===1?"":"s"}`),o!==null&&o>0&&i.push(`${o} prompt${o===1?"":"s"}`),o===0&&i.push("prompts off"),i.join(" · ")}function As(t){const e=k.c(57),{agent:s,home:o}=t,[i,r]=$.useState(!1);let a;e[0]!==s.id?(a={id:s.id},e[0]=s.id,e[1]=a):a=e[1];const{attributes:d,listeners:l,setNodeRef:m,transform:c,transition:u,isDragging:f}=It(a),p=Ke(s)||"Quick access";let h;e[2]!==c?(h=Tt.Transform.toString(c),e[2]=c,e[3]=h):h=e[3];const x=f?.5:void 0,y=f?100:void 0;let b;e[4]!==h||e[5]!==x||e[6]!==y||e[7]!==u?(b={transform:h,transition:u,opacity:x,zIndex:y},e[4]=h,e[5]=x,e[6]=y,e[7]=u,e[8]=b):b=e[8];const v=b,N=f&&"shadow-lg";let j;e[9]!==N?(j=Q("rounded-lg border border-border bg-card",N),e[9]=N,e[10]=j):j=e[10];const g=`Drag to reorder ${s.title??s.id}`;let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(He,{size:14}),e[11]=w):w=e[11];let S;e[12]!==d||e[13]!==l||e[14]!==g?(S=n.jsx("button",{type:"button",...d,...l,className:"shrink-0 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","aria-label":g,children:w}),e[12]=d,e[13]=l,e[14]=g,e[15]=S):S=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=()=>r(Es),e[16]=C):C=e[16];const _=s.title??s.id;let I;e[17]!==s.icon||e[18]!==_?(I=n.jsx(ce,{icon:s.icon,name:_,size:"sm"}),e[17]=s.icon,e[18]=_,e[19]=I):I=e[19];const T=s.title??s.id;let P;e[20]!==T?(P=n.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:T}),e[20]=T,e[21]=P):P=e[21];let M;e[22]!==p?(M=n.jsx("div",{className:"truncate text-xs text-muted-foreground",children:p}),e[22]=p,e[23]=M):M=e[23];let z;e[24]!==P||e[25]!==M?(z=n.jsxs("div",{className:"min-w-0 flex-1",children:[P,M]}),e[24]=P,e[25]=M,e[26]=z):z=e[26];const B=i&&"rotate-180";let O;e[27]!==B?(O=Q("shrink-0 text-muted-foreground transition-transform",B),e[27]=B,e[28]=O):O=e[28];let L;e[29]!==O?(L=n.jsx(De,{size:16,className:O}),e[29]=O,e[30]=L):L=e[30];let K;e[31]!==i||e[32]!==I||e[33]!==z||e[34]!==L?(K=n.jsxs("button",{type:"button",onClick:C,className:"flex min-w-0 flex-1 items-center gap-2.5 text-left outline-none","aria-expanded":i,children:[I,z,L]}),e[31]=i,e[32]=I,e[33]=z,e[34]=L,e[35]=K):K=e[35];let A;e[36]!==s.id||e[37]!==o?(A=()=>o.removeAgent(s.id).catch(Ps),e[36]=s.id,e[37]=o,e[38]=A):A=e[38];const V=`Remove ${s.title??s.id} from home`;let D;e[39]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx($e,{size:14}),e[39]=D):D=e[39];let E;e[40]!==A||e[41]!==V?(E=n.jsx("button",{type:"button",onClick:A,"aria-label":V,title:"Remove from home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:D}),e[40]=A,e[41]=V,e[42]=E):E=e[42];let R;e[43]!==S||e[44]!==K||e[45]!==E?(R=n.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-2.5",children:[S,K,E]}),e[43]=S,e[44]=K,e[45]=E,e[46]=R):R=e[46];let F;e[47]!==s||e[48]!==i||e[49]!==o?(F=i&&n.jsx(We,{agent:s,home:o}),e[47]=s,e[48]=i,e[49]=o,e[50]=F):F=e[50];let q;return e[51]!==m||e[52]!==v||e[53]!==R||e[54]!==F||e[55]!==j?(q=n.jsxs("div",{ref:m,style:v,className:j,children:[R,F]}),e[51]=m,e[52]=v,e[53]=R,e[54]=F,e[55]=j,e[56]=q):q=e[56],q}function Ps(){return U.error("Couldn't remove from home — please try again.")}function Es(t){return!t}function Ms({agent:t,home:e}){const[s,o]=$.useState(!1),[i,r]=$.useState(!1),a=Ke(t),d=async()=>{if(!e.atLimit){r(!0);try{await e.addAgent(t.id)}catch{U.error("Couldn't add to home — please try again.")}finally{r(!1)}}};return n.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[n.jsxs("button",{type:"button",onClick:()=>o(l=>!l),className:"flex min-w-0 flex-1 items-center gap-3 text-left outline-none","aria-expanded":s,children:[n.jsx(ce,{icon:t.icon,name:t.title??t.id,size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:t.title??t.id}),a&&n.jsx("div",{className:"truncate text-xs text-muted-foreground",children:a})]}),n.jsx(De,{size:16,className:Q("shrink-0 text-muted-foreground transition-transform",s&&"rotate-180")})]}),n.jsx("button",{type:"button",onClick:d,disabled:i||e.atLimit,"aria-label":"Add to home",title:e.atLimit?`Home is full (${ne}) — remove an agent first`:"Add to home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md bg-foreground text-background text-xs hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:i?n.jsx(le,{size:12,className:"animate-spin"}):n.jsx(ye,{size:14})})]}),s&&n.jsx(We,{agent:t,home:e})]})}function We(t){const e=k.c(17),{agent:s,home:o}=t,i=s.metadata?.ui;let r;e[0]!==i?(r=Z(i),e[0]=i,e[1]=r):r=e[1];const a=r;let d;e[2]!==s.connections?(d=(s.connections??[]).map(zs).sort(),e[2]=s.connections,e[3]=d):d=e[3];const l=d,m=s.metadata?.ui?.homePrompts;let c;e[4]!==s||e[5]!==l||e[6]!==o||e[7]!==a?(c=n.jsx(Ls,{agent:s,home:o,connectionIds:l,pinnedTiles:a}),e[4]=s,e[5]=l,e[6]=o,e[7]=a,e[8]=c):c=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Os,{}),e[9]=u):u=e[9];const f=m??null;let p;e[10]!==s||e[11]!==o||e[12]!==f?(p=n.jsx($.Suspense,{fallback:u,children:n.jsx(Us,{agent:s,home:o,curated:f})}),e[10]=s,e[11]=o,e[12]=f,e[13]=p):p=e[13];let h;return e[14]!==c||e[15]!==p?(h=n.jsxs("div",{className:"border-t border-border px-3 py-2 flex flex-col gap-3",children:[c,p]}),e[14]=c,e[15]=p,e[16]=h):h=e[16],h}function zs(t){return t.connection_id}function Os(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-2 py-1",children:[n.jsx(H,{className:"h-8 w-full"}),n.jsx(H,{className:"h-8 w-2/3"})]}),t[0]=e):e=t[0],e}function Ls({agent:t,home:e,connectionIds:s,pinnedTiles:o}){const i=Ue(),{data:r,isLoading:a}=se({queryKey:te.projectConnectionDetails(t.id,s),enabled:s.length>0,queryFn:async()=>(await Promise.all(s.map(async u=>{try{const{item:f}=await i.call("COLLECTION_CONNECTIONS_GET",{id:u}),p=(f?.tools??[]).flatMap(h=>{const x=Re(h._meta);return x?[{name:h.name,description:h.description,resourceUri:x,inputSchema:h.inputSchema}]:[]});return{id:u,title:f?.title??u,icon:f?.icon??null,uiTools:p}}catch{return{id:u,title:u,icon:null,uiTools:[]}}}))).filter(u=>u.uiTools.length>0)});if(s.length===0)return null;if(a)return n.jsxs("div",{className:"flex flex-col gap-1 py-0.5",children:[n.jsx(H,{className:"h-7 w-full"}),n.jsx(H,{className:"h-7 w-2/3"})]});if(!r||r.length===0)return null;const d=new Map;for(const c of r)for(const u of c.uiTools)d.set(`${c.id}:${u.name}`,{conn:c,tool:u});const l=c=>{if(c.toolName&&c.connectionId)return d.get(`${c.connectionId}:${c.toolName}`);for(const[,u]of d)if(u.conn.id===c.connectionId&&u.tool.resourceUri===c.resourceUri)return u},m=o.some(c=>!!l(c));return n.jsxs("div",{className:"flex flex-col gap-2",children:[m&&n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground px-2",children:"Pinned tiles"}),o.map(c=>{const u=l(c);return u?n.jsx(Rs,{agent:t,home:e,connection:u.conn,tool:u.tool,tile:c},c.tileId??`${c.connectionId}:${c.resourceUri}:${c.toolName}`):null})]}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground px-2",children:"Add tile"}),r.map(c=>c.uiTools.map(u=>n.jsx(Fs,{agent:t,home:e,connection:c,tool:u},`add:${c.id}:${u.name}`)))]})]})}function qe(t,e){const s={};for(const[o,i]of Object.entries(t)){const r=e[o]?.type;if((r==="object"||r==="array")&&typeof i=="string"){if(!i.trim())continue;try{s[o]=JSON.parse(i)}catch{return null}}else if((r==="number"||r==="integer")&&typeof i=="string"){if(!i.trim())continue;s[o]=Number(i)}else i!==""&&i!=null&&(s[o]=i)}return s}function Ds(t,e){if(!t||!e)return{};const s={};for(const[o,i]of Object.entries(t)){const r=e[o]?.type;(r==="object"||r==="array")&&i!=null&&typeof i!="string"?s[o]=JSON.stringify(i,null,2):s[o]=i}return s}function Hs(t){if(!t)return"";const e=Object.entries(t).filter(([,s])=>s!=null&&s!=="");return e.length===0?"":e.slice(0,3).map(([s,o])=>{const i=typeof o=="object"?JSON.stringify(o):String(o);return`${s}=${i.length>20?`${i.slice(0,20)}…`:i}`}).join(", ")}function Rs({agent:t,home:e,connection:s,tool:o,tile:i}){const[r,a]=$.useState(!1),[d,l]=$.useState(!1),m=o.inputSchema?.properties&&Object.keys(o.inputSchema.properties).length>0,[c,u]=$.useState(()=>Ds(i.toolInput,o.inputSchema?.properties)),f=async()=>{a(!0);try{const x=Z(t.metadata?.ui),y=i.tileId?x.filter(v=>v.tileId!==i.tileId):x.filter(v=>v!==i),b={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:y}};await e.saveAgentMetadata(t,b),l(!1)}catch(x){console.error("[home-tiles] failed to remove tile",x),U.error("Couldn't update home — please try again.")}finally{a(!1)}},p=async()=>{a(!0);try{let x;if(m&&o.inputSchema?.properties){const N=qe(c,o.inputSchema.properties);if(!N){U.error("Invalid JSON in one of the fields — please fix it."),a(!1);return}Object.keys(N).length>0&&(x=N)}const b=Z(t.metadata?.ui).map(N=>(i.tileId?N.tileId===i.tileId:N===i)?{...N,toolInput:x}:N),v={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:b}};await e.saveAgentMetadata(t,v),l(!1)}catch(x){console.error("[home-tiles] failed to save tile",x),U.error("Couldn't update home — please try again.")}finally{a(!1)}},h=Hs(i.toolInput);return n.jsxs("div",{className:"flex flex-col rounded-md bg-accent/20",children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[n.jsx(Fe,{icon:s.icon,name:s.title,size:"xs"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"truncate text-sm text-foreground",children:je(o.name)}),h&&n.jsx("div",{className:"truncate text-[10px] text-muted-foreground font-mono",children:h})]}),m&&n.jsx("button",{type:"button",onClick:()=>l(x=>!x),"aria-label":"Configure tile props",title:"Configure tile props",className:"inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent/60",children:n.jsx(gt,{size:14})}),n.jsx(ve,{isPinned:!0,submitting:r,onClick:f,label:"Remove from home"})]}),d&&m&&o.inputSchema?.properties&&n.jsxs("div",{className:"px-3 pb-2 pt-1 flex flex-col gap-2",children:[n.jsx(Be,{properties:o.inputSchema.properties,required:o.inputSchema.required,values:c,onChange:(x,y)=>u(b=>({...b,[x]:y}))}),n.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[n.jsx(Y,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>l(!1),children:"Cancel"}),n.jsx(Y,{size:"sm",className:"h-7 text-xs",disabled:r,onClick:p,children:r?n.jsx(le,{size:12,className:"animate-spin"}):"Save"})]})]})]})}function Fs({agent:t,home:e,connection:s,tool:o}){const[i,r]=$.useState(!1),[a,d]=$.useState(!1),l=o.inputSchema?.properties&&Object.keys(o.inputSchema.properties).length>0,[m,c]=$.useState({}),u=async()=>{if(l&&!a){d(!0);return}if(!e.isOnHome(t.id)&&e.atLimit){U.error(`Home is full (${ne}) — remove an agent first`);return}await f()},f=async()=>{r(!0);try{let p;if(l&&o.inputSchema?.properties){const b=qe(m,o.inputSchema.properties);if(!b){U.error("Invalid JSON in one of the fields — please fix it."),r(!1);return}Object.keys(b).length>0&&(p=b)}const x=[...Z(t.metadata?.ui),{tileId:crypto.randomUUID(),connectionId:s.id,resourceUri:o.resourceUri,toolName:o.name,...p?{toolInput:p}:{}}],y={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:x}};await e.saveAgentMetadata(t,y),d(!1),c({})}catch(p){console.error("[home-tiles] failed to add tile",p),U.error("Couldn't update home — please try again.")}finally{r(!1)}};return n.jsxs("div",{className:"flex flex-col rounded-md hover:bg-accent/40",children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[n.jsx(Fe,{icon:s.icon,name:s.title,size:"xs"}),n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:je(o.name)}),n.jsx(ve,{isPinned:!1,submitting:i,onClick:u,label:"Add to home"})]}),a&&l&&o.inputSchema?.properties&&n.jsxs("div",{className:"px-3 pb-2 pt-1 flex flex-col gap-2",children:[n.jsx(Be,{properties:o.inputSchema.properties,required:o.inputSchema.required,values:m,onChange:(p,h)=>c(x=>({...x,[p]:h}))}),n.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[n.jsx(Y,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>{d(!1),c({})},children:"Cancel"}),n.jsx(Y,{size:"sm",className:"h-7 text-xs",disabled:i,onClick:f,children:i?n.jsx(le,{size:12,className:"animate-spin"}):"Pin"})]})]})]})}function ve(t){const e=k.c(11),{isPinned:s,submitting:o,onClick:i,label:r}=t,a=s?"text-muted-foreground hover:bg-destructive/10 hover:text-destructive":"bg-foreground text-background hover:opacity-90";let d;e[0]!==a?(d=Q("inline-flex size-7 shrink-0 items-center justify-center rounded-md text-xs transition-colors disabled:opacity-50 disabled:cursor-progress",a),e[0]=a,e[1]=d):d=e[1];let l;e[2]!==s||e[3]!==o?(l=o?n.jsx(le,{size:12,className:"animate-spin"}):s?n.jsx(yt,{size:14}):n.jsx(ye,{size:14}),e[2]=s,e[3]=o,e[4]=l):l=e[4];let m;return e[5]!==r||e[6]!==i||e[7]!==o||e[8]!==d||e[9]!==l?(m=n.jsx("button",{type:"button",onClick:i,disabled:o,"aria-label":r,title:r,className:d,children:l}),e[5]=r,e[6]=i,e[7]=o,e[8]=d,e[9]=l,e[10]=m):m=e[10],m}function Us(t){const e=k.c(32),{agent:s,home:o,curated:i}=t,{org:r}=J();let a;e[0]!==s.id||e[1]!==r.id||e[2]!==r.slug?(a={connectionId:s.id,orgId:r.id,orgSlug:r.slug},e[0]=s.id,e[1]=r.id,e[2]=r.slug,e[3]=a):a=e[3];const d=ae(a);let l;e[4]!==s.id||e[5]!==r.id?(l=te.agentPrompts(r.id,s.id),e[4]=s.id,e[5]=r.id,e[6]=l):l=e[6];let m;e[7]!==d?(m=async()=>{const{prompts:g}=await d.listPrompts();return g.map(Ws)},e[7]=d,e[8]=m):m=e[8];let c;e[9]!==l||e[10]!==m?(c={queryKey:l,queryFn:m,staleTime:3e4,retry:!1},e[9]=l,e[10]=m,e[11]=c):c=e[11];const{data:u,isLoading:f,error:p}=se(c),h=be(r.slug);let x,y;if(e[12]!==s.id||e[13]!==u||e[14]!==h.prompts){let g;e[17]!==s.id?(g=S=>S.agentId===s.id&&S.promptName,e[17]=s.id,e[18]=g):g=e[18],x=h.prompts.filter(g).map(Ks);let w;e[19]!==u?(w=u??[],e[19]=u,e[20]=w):w=e[20],y=[...w];for(const S of x)y.some(C=>C.name===S.name)||y.push(S);e[12]=s.id,e[13]=u,e[14]=h.prompts,e[15]=x,e[16]=y}else x=e[15],y=e[16];if(f&&x.length===0){let g;return e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(H,{className:"h-7 w-full"}),n.jsx(H,{className:"h-7 w-2/3"})]}),e[21]=g):g=e[21],g}if(p&&x.length===0)return console.error("[home-tiles] listPrompts failed for agent",s.id,p),null;if(y.length===0)return null;let b;e[22]!==i||e[23]!==y?(b=i??y.map(Vs),e[22]=i,e[23]=y,e[24]=b):b=e[24];let v;e[25]!==b?(v=new Set(b),e[25]=b,e[26]=v):v=e[26];const N=v;let j;return e[27]!==s||e[28]!==o||e[29]!==y||e[30]!==N?(j=n.jsx("div",{className:"flex flex-col gap-0.5",children:y.map(g=>n.jsx(qs,{agent:s,home:o,prompt:g,allPromptNames:y.map(Bs),isPinned:N.has(g.name)},g.name))}),e[27]=s,e[28]=o,e[29]=y,e[30]=N,e[31]=j):j=e[31],j}function Bs(t){return t.name}function Vs(t){return t.name}function Ks(t){return{name:t.promptName,title:t.title,description:t.description}}function Ws(t){return{name:t.name,title:t.title,description:t.description}}function qs({agent:t,home:e,prompt:s,allPromptNames:o,isPinned:i}){const[r,a]=$.useState(!1),d=async()=>{if(!i&&!e.isOnHome(t.id)&&e.atLimit){U.error(`Home is full (${ne}) — remove an agent first`);return}a(!0);try{const l=t.metadata?.ui?.homePrompts;let m;Array.isArray(l)?m=i?l.filter(u=>u!==s.name):[...l,s.name]:m=i?o.filter(u=>u!==s.name):o;const c={...t.metadata??{},ui:{...t.metadata?.ui??{},homePrompts:m}};await e.saveAgentMetadata(t,c)}catch(l){console.error("[home-tiles] failed to toggle prompt",l),U.error("Couldn't update home — please try again.")}finally{a(!1)}};return n.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:s.title??je(s.name)}),n.jsx(ve,{isPinned:i,submitting:r,onClick:d,label:i?"Remove from home":"Add to home"})]})}function Gs(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col gap-2 p-2",children:Array.from({length:4},Qs)}),t[0]=e):e=t[0],e}function Qs(t,e){return n.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border p-2.5",children:[n.jsx(H,{className:"size-8 rounded-md"}),n.jsxs("div",{className:"flex-1 space-y-1.5",children:[n.jsx(H,{className:"h-3 w-1/2"}),n.jsx(H,{className:"h-2.5 w-1/3"})]})]},e)}const ee=1,Ge=`home-board.layout.v${ee}`;function Qe(t){return`home-board.layout.v${ee}.${t}`}const Je={version:ee,tiles:{},hidden:[]};function fe(t){return!t||t.version!==ee?Je:{version:ee,tiles:t.tiles??{},hidden:Array.isArray(t.hidden)?t.hidden:[]}}function Js(t){return Object.keys(t.tiles).length>0||t.hidden.length>0}function Xs(t){try{const e=localStorage.getItem(Qe(t));return e?fe(JSON.parse(e)):void 0}catch{return}}function Se(t,e){try{localStorage.setItem(Qe(t),JSON.stringify(e))}catch{}}async function _e(t,e){if(!(await fetch(`/api/${t}/kv/${Ge}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save board layout")}function Zs(t){const e=k.c(24),s=xe();let o;e[0]!==t?(o=te.boardLayout(t),e[0]=t,e[1]=o):o=e[1];const i=o;let r;e[2]!==t?(r=Xs(t),e[2]=t,e[3]=r):r=e[3];const a=r;let d;e[4]!==a||e[5]!==t?(d=async()=>{const b=await fetch(`/api/${t}/kv/${Ge}`);if(b.status===404)return a&&Js(a)?(await _e(t,a),a):Je;if(!b.ok)throw new Error("Failed to load board layout");const v=await b.json(),N=fe(v.value);return Se(t,N),N},e[4]=a,e[5]=t,e[6]=d):d=e[6];let l;e[7]!==a||e[8]!==i||e[9]!==d?(l={queryKey:i,queryFn:d,initialData:a,staleTime:0,refetchOnWindowFocus:!1},e[7]=a,e[8]=i,e[9]=d,e[10]=l):l=e[10];const{data:m,isLoading:c}=se(l);let u;e[11]!==t?(u={mutationFn:b=>_e(t,b)},e[11]=t,e[12]=u):u=e[12];const f=st(u);let p;e[13]!==f||e[14]!==t||e[15]!==s||e[16]!==i?(p=b=>{Se(t,b),s.setQueryData(i,b),f.mutate(b)},e[13]=f,e[14]=t,e[15]=s,e[16]=i,e[17]=p):p=e[17];const h=p;let x;e[18]!==m?(x=fe(m),e[18]=m,e[19]=x):x=e[19];let y;return e[20]!==c||e[21]!==h||e[22]!==x?(y={layout:x,isLoading:c,save:h},e[20]=c,e[21]=h,e[22]=x,e[23]=y):y=e[23],y}const Xe=$.createContext(null);function Ys(t){const e=k.c(24),{children:s}=t,{org:o}=J(),i=Zs(o.slug),[r,a]=$.useState(!1),[d,l]=$.useState(null);let m;e[0]!==i.layout?(m=()=>{l(i.layout),a(!0)},e[0]=i.layout,e[1]=m):m=e[1];const c=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{l(null),a(!1)},e[2]=u):u=e[2];const f=u;let p;e[3]!==d||e[4]!==i?(p=()=>{d&&i.save(d),l(null),a(!1)},e[3]=d,e[4]=i,e[5]=p):p=e[5];const h=p,x=r&&d!==null,y=x?d:i.layout;let b;e[6]!==d||e[7]!==x||e[8]!==i.layout?(b=x?JSON.stringify(d)!==JSON.stringify(i.layout):!1,e[6]=d,e[7]=x,e[8]=i.layout,e[9]=b):b=e[9];const v=b;let N;e[10]!==r||e[11]!==i?(N=S=>{r?l(S):i.save(S)},e[10]=r,e[11]=i,e[12]=N):N=e[12];const j=N;let g;e[13]!==j||e[14]!==c||e[15]!==v||e[16]!==r||e[17]!==y||e[18]!==h||e[19]!==i.isLoading?(g={isEditMode:r,enter:c,cancel:f,save:h,hasChanges:v,layout:y,isLayoutLoading:i.isLoading,commitLayout:j},e[13]=j,e[14]=c,e[15]=v,e[16]=r,e[17]=y,e[18]=h,e[19]=i.isLoading,e[20]=g):g=e[20];let w;return e[21]!==s||e[22]!==g?(w=n.jsx(Xe.Provider,{value:g,children:s}),e[21]=s,e[22]=g,e[23]=w):w=e[23],w}function Ze(){const t=$.useContext(Xe);if(!t)throw new Error("useHomeEdit must be used within a HomeEditProvider");return t}function en({agentId:t}){const{org:e,locator:s}=J(),o=ae({connectionId:t,orgId:e.id,orgSlug:e.slug}),{create:i}=os(),{setTaskId:r}=Lt(),[a,d]=$.useState(null),[l,m]=$.useState(!1),c=$.useRef(!1),u=async(y,b)=>{if(!o){U.error("MCP client not available");return}if(!c.current){c.current=!0,m(!0);try{const v=await is(o,y.name,b),N={type:"doc",content:[{type:"paragraph",content:[Ft({id:y.name,name:Ut(y.name,Bt(y._meta)),metadata:v.messages,char:"/",kind:"prompt",args:b}),{type:"text",text:" "}]}]},j=crypto.randomUUID();rs(sessionStorage,s,j,{tiptapDoc:N}),await i({id:j,virtual_mcp_id:t}),r(j,t,{autosend:!0})}catch(v){console.error("[start-thread-from-prompt] failed",v),U.error("Failed to start thread. Please try again.")}finally{c.current=!1,m(!1)}}},f=async y=>{if(!c.current){if(y.arguments&&y.arguments.length>0){d(y);return}await u(y)}},p=async y=>{if(!a)return;const b=a;d(null),await u(b,y)};return{start:f,startBlank:async y=>{if(!c.current){c.current=!0,m(!0);try{const b=crypto.randomUUID();await i({id:b,virtual_mcp_id:t}),r(b,t,y?.main?{main:y.main}:void 0)}catch(b){console.error("[start-thread-from-prompt] startBlank failed",b),U.error("Failed to start thread. Please try again.")}finally{c.current=!1,m(!1)}}},dialog:n.jsx(Rt,{prompt:a,setPrompt:y=>d(y),onSubmit:p}),dialogPrompt:a,starting:l}}const W=4,G=100,Ce=12,tn=5,sn={w:2,h:2};class pe extends $.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,message:e instanceof Error?e.message:"Unknown error"}}componentDidCatch(e,s){console.error("[home-tiles] tile crashed:",e,s.componentStack)}render(){return this.state.hasError?n.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-4 text-center",children:[n.jsx("span",{className:"flex size-8 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:n.jsx(nt,{size:16})}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:"This tile crashed"}),n.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:this.state.message??"Something went wrong rendering this tile."})]}):this.props.children}}function nn(t){const e=k.c(72),{tiles:s,isEditMode:o,renderTile:i,onMove:r,onResize:a,onRemove:d}=t,l=ge(),m=$.useRef(null),[c,u]=$.useState(null),[f,p]=$.useState(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={activationConstraint:{distance:4}},e[0]=h):h=e[0];const x=Ae(re(Ee,h),re(Pe)),y=s.reduce(on,0),b=o?Math.max(y+2,4):Math.max(y,1);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const A=m.current?.getBoundingClientRect();return A?{cellWidth:A.width/W,cellHeight:G}:null},e[1]=v):v=e[1];const N=v;let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=A=>{u(String(A.active.id)),p(N())},e[2]=j):j=e[2];const g=j;let w;e[3]!==f||e[4]!==r||e[5]!==s?(w=A=>{const V=String(A.active.id),D=f??N();if(u(null),p(null),!D||D.cellWidth<=0)return;const E=s.find(q=>q.id===V);if(!E)return;const R=Math.round(A.delta.x/D.cellWidth),F=Math.round(A.delta.y/D.cellHeight);R===0&&F===0||r(V,{x:E.x+R,y:E.y+F})},e[3]=f,e[4]=r,e[5]=s,e[6]=w):w=e[6];const S=w;if(l){let A;if(e[7]!==i||e[8]!==s){let D;e[10]!==i?(D=E=>n.jsx("div",{className:"group bg-card card-shadow rounded-2xl overflow-hidden",style:{minHeight:G},children:n.jsx(pe,{children:i(E)})},E.id),e[10]=i,e[11]=D):D=e[11],A=s.map(D),e[7]=i,e[8]=s,e[9]=A}else A=e[9];let V;return e[12]!==A?(V=n.jsx("div",{className:"flex flex-col gap-3 px-4 pb-8",children:A}),e[12]=A,e[13]=V):V=e[13],V}let C,_,I,T,P,M,z,B,O;if(e[14]!==c||e[15]!==f||e[16]!==o||e[17]!==S||e[18]!==d||e[19]!==a||e[20]!==i||e[21]!==x||e[22]!==s||e[23]!==b){const A=c?s.find(X=>X.id===c):null;_=Me,B=x,O=g,I=S;const V=b*G,D=o?G*4:G;let E;e[33]!==V||e[34]!==D?(E={height:V,minHeight:D},e[33]=V,e[34]=D,e[35]=E):E=e[35];let R;e[36]!==o||e[37]!==s||e[38]!==b?(R=o&&n.jsx(rn,{rows:b,tiles:s}),e[36]=o,e[37]=s,e[38]=b,e[39]=R):R=e[39];let F;if(e[40]!==c||e[41]!==o||e[42]!==d||e[43]!==a||e[44]!==i||e[45]!==s){let X;e[47]!==c||e[48]!==o||e[49]!==d||e[50]!==a||e[51]!==i?(X=ie=>n.jsx(an,{tile:ie,isEditMode:o,isDragging:c===ie.id,onResize:a,onRemove:d,children:i(ie)},ie.id),e[47]=c,e[48]=o,e[49]=d,e[50]=a,e[51]=i,e[52]=X):X=e[52],F=s.map(X),e[40]=c,e[41]=o,e[42]=d,e[43]=a,e[44]=i,e[45]=s,e[46]=F}else F=e[46];e[53]!==E||e[54]!==R||e[55]!==F?(T=n.jsxs("div",{ref:m,className:"relative w-full",style:E,children:[R,F]}),e[53]=E,e[54]=R,e[55]=F,e[56]=T):T=e[56],C=At,P=null;const q=A&&f?A.w*f.cellWidth-Ce:void 0,de=A&&f?A.h*f.cellHeight-Ce:void 0;e[57]!==q||e[58]!==de?(M={width:q,height:de},e[57]=q,e[58]=de,e[59]=M):M=e[59],z=A&&n.jsx("div",{className:"bg-card card-shadow rounded-2xl shadow-2xl ring-2 ring-primary/40 h-full overflow-hidden opacity-95",children:n.jsx(pe,{children:i(A)})}),e[14]=c,e[15]=f,e[16]=o,e[17]=S,e[18]=d,e[19]=a,e[20]=i,e[21]=x,e[22]=s,e[23]=b,e[24]=C,e[25]=_,e[26]=I,e[27]=T,e[28]=P,e[29]=M,e[30]=z,e[31]=B,e[32]=O}else C=e[24],_=e[25],I=e[26],T=e[27],P=e[28],M=e[29],z=e[30],B=e[31],O=e[32];let L;e[60]!==C||e[61]!==P||e[62]!==M||e[63]!==z?(L=n.jsx(C,{dropAnimation:P,style:M,children:z}),e[60]=C,e[61]=P,e[62]=M,e[63]=z,e[64]=L):L=e[64];let K;return e[65]!==_||e[66]!==I||e[67]!==T||e[68]!==L||e[69]!==B||e[70]!==O?(K=n.jsxs(_,{sensors:B,onDragStart:O,onDragEnd:I,children:[T,L]}),e[65]=_,e[66]=I,e[67]=T,e[68]=L,e[69]=B,e[70]=O,e[71]=K):K=e[71],K}function on(t,e){return Math.max(t,e.y+e.h)}function rn(t){const e=k.c(7),{rows:s,tiles:o}=t;let i;e[0]!==o?(i=(l,m)=>o.some(c=>l>=c.x&&l<c.x+c.w&&m>=c.y&&m<c.y+c.h),e[0]=o,e[1]=i):i=e[1];const r=i;let a;if(e[2]!==r||e[3]!==s){a=[];for(let l=0;l<s;l++)for(let m=0;m<W;m++)r(m,l)||a.push({x:m,y:l});e[2]=r,e[3]=s,e[4]=a}else a=e[4];let d;return e[5]!==a?(d=n.jsx("div",{className:"absolute inset-0 pointer-events-none",children:a.map(ln)}),e[5]=a,e[6]=d):d=e[6],d}function ln(t){return n.jsx("div",{className:"absolute p-1",style:{left:`${t.x/W*100}%`,top:t.y*G,width:`${1/W*100}%`,height:G},children:n.jsx("div",{className:"h-full w-full rounded-2xl border border-dashed border-border/60"})},`${t.x}-${t.y}`)}function an(t){const e=k.c(31),{tile:s,isEditMode:o,isDragging:i,onResize:r,onRemove:a,children:d}=t,l=!o;let m;e[0]!==l||e[1]!==s.id?(m={id:s.id,disabled:l},e[0]=l,e[1]=s.id,e[2]=m):m=e[2];const{setNodeRef:c,attributes:u,listeners:f,isDragging:p}=Pt(m),h=`${s.x/W*100}%`,x=`${s.w/W*100}%`,y=s.y*G,b=s.h*G,v=p||i,N=!v&&"transition-[left,top,width,height,opacity] duration-200 ease-out",j=v&&"opacity-30";let g;e[3]!==N||e[4]!==j?(g=Q("absolute p-1 will-change-[left,top,width,height,opacity]",N,j),e[3]=N,e[4]=j,e[5]=g):g=e[5];let w;e[6]!==b||e[7]!==h||e[8]!==y||e[9]!==x?(w={left:h,top:y,width:x,height:b},e[6]=b,e[7]=h,e[8]=y,e[9]=x,e[10]=w):w=e[10];const S=o&&"outline outline-1 outline-transparent hover:outline-primary/40";let C;e[11]!==S?(C=Q("group relative h-full bg-card card-shadow rounded-2xl overflow-hidden",S),e[11]=S,e[12]=C):C=e[12];let _;e[13]!==u||e[14]!==o||e[15]!==f||e[16]!==a||e[17]!==r||e[18]!==s?(_=o&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",...u,...f,className:"absolute top-2 left-2 z-10 flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted cursor-grab active:cursor-grabbing","aria-label":"Drag tile",children:n.jsx(He,{size:16})}),n.jsx("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1",children:n.jsx(cn,{tile:s,onResize:r,onRemove:a})})]}),e[13]=u,e[14]=o,e[15]=f,e[16]=a,e[17]=r,e[18]=s,e[19]=_):_=e[19];let I;e[20]!==d?(I=n.jsx("div",{className:"h-full overflow-hidden",children:n.jsx(pe,{children:d})}),e[20]=d,e[21]=I):I=e[21];let T;e[22]!==I||e[23]!==C||e[24]!==_?(T=n.jsxs("div",{className:C,children:[_,I]}),e[22]=I,e[23]=C,e[24]=_,e[25]=T):T=e[25];let P;return e[26]!==c||e[27]!==T||e[28]!==g||e[29]!==w?(P=n.jsx("div",{ref:c,className:g,style:w,children:T}),e[26]=c,e[27]=T,e[28]=g,e[29]=w,e[30]=P):P=e[30],P}function cn(t){const e=k.c(20),{tile:s,onResize:o,onRemove:i}=t,[r,a]=$.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(ls,{asChild:!0,children:n.jsx("button",{type:"button",className:"flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Tile options",children:n.jsx(bt,{size:16})})}),e[0]=d):d=e[0];let l;e[1]!==o||e[2]!==s.id?(l=y=>{o(s.id,y),a(!1)},e[1]=o,e[2]=s.id,e[3]=l):l=e[3];let m;e[4]!==l||e[5]!==s?(m=n.jsx(dn,{tile:s,onPick:l}),e[4]=l,e[5]=s,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(as,{}),e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==s.id?(u=()=>i(s.id),e[8]=i,e[9]=s.id,e[10]=u):u=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(us,{size:14,className:"mr-2"}),e[11]=f):f=e[11];let p;e[12]!==u?(p=n.jsxs(cs,{onSelect:u,className:"text-destructive focus:text-destructive",children:[f,"Remove tile"]}),e[12]=u,e[13]=p):p=e[13];let h;e[14]!==m||e[15]!==p?(h=n.jsxs(ds,{align:"end",className:"w-auto",children:[m,c,p]}),e[14]=m,e[15]=p,e[16]=h):h=e[16];let x;return e[17]!==r||e[18]!==h?(x=n.jsxs(ms,{open:r,onOpenChange:a,children:[d,h]}),e[17]=r,e[18]=h,e[19]=x):x=e[19],x}function dn(t){const e=k.c(19),{tile:s,onPick:o}=t,i=s.minW??1,r=s.minH??1,[a,d]=$.useState(null);let l;e[0]!==a||e[1]!==s.h||e[2]!==s.w?(l=a??{w:s.w,h:s.h},e[0]=a,e[1]=s.h,e[2]=s.w,e[3]=l):l=e[3];const m=l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("span",{className:"text-xs text-muted-foreground",children:"Size"}),e[4]=c):c=e[4];let u;e[5]!==m.h||e[6]!==m.w?(u=n.jsxs("div",{className:"mb-2 flex items-center justify-between gap-4",children:[c,n.jsxs("span",{className:"text-xs font-medium tabular-nums",children:[m.w," × ",m.h]})]}),e[5]=m.h,e[6]=m.w,e[7]=u):u=e[7];let f,p;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={gridTemplateColumns:`repeat(${W}, 1.25rem)`},p=()=>d(null),e[8]=f,e[9]=p):(f=e[8],p=e[9]);let h;e[10]!==m.h||e[11]!==m.w||e[12]!==r||e[13]!==i||e[14]!==o?(h=n.jsx("div",{className:"grid w-max gap-1",style:f,onPointerLeave:p,children:Array.from({length:tn},(y,b)=>Array.from({length:W},(v,N)=>{const j=N+1,g=b+1,w=j<i||g<r,S=j<=m.w&&g<=m.h;return n.jsx("button",{type:"button",disabled:w,"aria-label":`${j} by ${g}`,onPointerEnter:()=>d({w:j,h:g}),onClick:()=>o({w:j,h:g}),className:Q("size-5 rounded-sm border transition-colors",S?"border-primary bg-primary/30":"border-border bg-muted",w?"cursor-not-allowed opacity-40":"cursor-pointer hover:border-primary/60")},`${j}x${g}`)}))}),e[10]=m.h,e[11]=m.w,e[12]=r,e[13]=i,e[14]=o,e[15]=h):h=e[15];let x;return e[16]!==u||e[17]!==h?(x=n.jsxs("div",{className:"px-2 py-1.5",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18],x}function mn(t,e,s){return t.some(o=>e>=o.x&&e<o.x+o.w&&s>=o.y&&s<o.y+o.h)}function he(t,e,s){for(let o=0;o<100;o++)for(let i=0;i<=W-e;i++){let r=!0;for(let a=0;a<s&&r;a++)for(let d=0;d<e&&r;d++)mn(t,i+d,o+a)&&(r=!1);if(r)return{x:i,y:o}}return{x:0,y:0}}function me(t,e,s={w:1,h:1}){const o=Math.max(s.w,Math.min(W,t)),i=Math.max(s.h,Math.min(6,e));return{w:o,h:i}}function ue(t,e,s){const o=Math.max(0,Math.min(W-s,t)),i=Math.max(0,e);return{x:o,y:i}}function un(t,e,s){const o=t.find(l=>l.id===e);if(!o)return t;const i=t.filter(l=>l.id!==e),r=i.find(l=>s.x>=l.x&&s.x<l.x+l.w&&s.y>=l.y&&s.y<l.y+l.h);if(r&&r.w===o.w&&r.h===o.h)return t.map(l=>l.id===e?{...l,x:r.x,y:r.y}:l.id===r.id?{...l,x:o.x,y:o.y}:l);const d=[{...o,x:s.x,y:s.y}];for(const l of i){const m=he(d,l.w,l.h);d.push({...l,x:m.x,y:m.y})}return d}function fn(t){const e=k.c(35),{layout:s,isLayoutLoading:o,commitLayout:i}=Ze();let r;e[0]!==s.hidden?(r=new Set(s.hidden),e[0]=s.hidden,e[1]=r):r=e[1];const a=r;let d,l;if(e[2]!==t||e[3]!==a||e[4]!==s.tiles){l=[];let v;e[7]!==a?(v=j=>j.pinned||!a.has(j.id),e[7]=a,e[8]=v):v=e[8];const N=t.filter(v);d=new Map;for(const j of t)j.minSize&&d.set(j.id,j.minSize);for(const j of N){const g=s.tiles[j.id];if(!g)continue;const w=d.get(j.id),{w:S,h:C}=me(g.w,g.h,w),{x:_,y:I}=ue(g.x,g.y,S);l.push({id:j.id,x:_,y:I,w:S,h:C,minW:w?.w,minH:w?.h})}for(const j of N){if(l.some(I=>I.id===j.id))continue;const g=j.defaultSize??sn,w=d.get(j.id),{w:S,h:C}=me(g.w,g.h,w),_=he(l,S,C);l.push({id:j.id,x:_.x,y:_.y,w:S,h:C,minW:w?.w,minH:w?.h})}e[2]=t,e[3]=a,e[4]=s.tiles,e[5]=d,e[6]=l}else d=e[5],l=e[6];let m;e[9]!==t?(m=new Set(t.map(pn)),e[9]=t,e[10]=m):m=e[10];const c=m;let u;e[11]!==c||e[12]!==i?(u=(v,N)=>{const j={};for(const g of v)j[g.id]={x:g.x,y:g.y,w:g.w,h:g.h};i({version:ee,tiles:j,hidden:N.filter(g=>c.has(g))})},e[11]=c,e[12]=i,e[13]=u):u=e[13];const f=u;let p;e[14]!==l?(p={visible:l},e[14]=l,e[15]=p):p=e[15];let h;e[16]!==f||e[17]!==s||e[18]!==l?(h=(v,N)=>{const j=l.find(S=>S.id===v);if(!j)return;const g=ue(N.x,N.y,j.w);if(g.x===j.x&&g.y===j.y)return;const w=un(l,v,g);f(w,s.hidden)},e[16]=f,e[17]=s,e[18]=l,e[19]=h):h=e[19];let x;e[20]!==f||e[21]!==s||e[22]!==d||e[23]!==l?(x=(v,N)=>{const j=l.find(T=>T.id===v);if(!j)return;const g=d.get(v),{w,h:S}=me(N.w,N.h,g);if(w===j.w&&S===j.h)return;const C={...j,w,h:S,x:ue(j.x,j.y,w).x},_=l.filter(T=>T.id!==v),I=[C];for(const T of _){const P=he(I,T.w,T.h);I.push({...T,x:P.x,y:P.y})}f(I,s.hidden)},e[20]=f,e[21]=s,e[22]=d,e[23]=l,e[24]=x):x=e[24];let y;e[25]!==f||e[26]!==s||e[27]!==l?(y=v=>{const N=l.filter(j=>j.id!==v);f(N,Array.from(new Set([...s.hidden,v])))},e[25]=f,e[26]=s,e[27]=l,e[28]=y):y=e[28];let b;return e[29]!==o||e[30]!==p||e[31]!==h||e[32]!==x||e[33]!==y?(b={snapshot:p,isLoading:o,moveTile:h,resizeTile:x,hideTile:y},e[29]=o,e[30]=p,e[31]=h,e[32]=x,e[33]=y,e[34]=b):b=e[34],b}function pn(t){return t.id}const hn={w:2,h:4},xn={w:1,h:2},gn={w:1,h:1};function yn(t){return`prompt:${t.agentId}:${t.promptName||"blank"}`}function bn(t){return t.tileId?`tile:${t.tileId}`:`tile:${t.agentId}:${t.resourceUri}`}function jn(t){return t.promptName?t.agentName:t.description}function vn(t){return{name:t.promptName,title:t.title,description:t.description,arguments:t.arguments,_meta:t._meta}}function Ye(t){const e=k.c(14),{org:s}=J();let o;e[0]!==s.id||e[1]!==s.slug||e[2]!==t.connectionId?(o=at({connectionId:t.connectionId,orgId:s.id,orgSlug:s.slug}),e[0]=s.id,e[1]=s.slug,e[2]=t.connectionId,e[3]=o):o=e[3];const{data:i}=se(o),r=!!i&&!t.toolName;let a;e[4]!==i||e[5]!==r?(a={client:i,enabled:r},e[4]=i,e[5]=r,e[6]=a):a=e[6];const{data:d}=ts(a);let l;e[7]!==t.resourceUri||e[8]!==t.toolName||e[9]!==d?.tools?(l=t.toolName??d?.tools.find(u=>Re(u._meta)===t.resourceUri)?.name,e[7]=t.resourceUri,e[8]=t.toolName,e[9]=d?.tools,e[10]=l):l=e[10];const m=l;let c;return e[11]!==t.connectionId||e[12]!==m?(c=m?ns(t.connectionId,m):void 0,e[11]=t.connectionId,e[12]=m,e[13]=c):c=e[13],c}function Ne(t){const e=k.c(10);let s;e[0]!==t?(s={agentId:t},e[0]=t,e[1]=s):s=e[1];const{start:o,startBlank:i,dialog:r,starting:a}=en(s);let d;e[2]!==o||e[3]!==i?(d=c=>{if(!c.promptName){i();return}o(vn(c))},e[2]=o,e[3]=i,e[4]=d):d=e[4];const l=d;let m;return e[5]!==r||e[6]!==l||e[7]!==i||e[8]!==a?(m={open:l,startBlank:i,dialog:r,starting:a},e[5]=r,e[6]=l,e[7]=i,e[8]=a,e[9]=m):m=e[9],m}function Nn(t){const e=k.c(32),{entry:s,isEditMode:o}=t,{open:i,dialog:r,starting:a}=Ne(s.agentId);let d;e[0]!==s||e[1]!==i?(d=()=>i(s),e[0]=s,e[1]=i,e[2]=d):d=e[2];const l=a||o,m=!o&&"cursor-pointer transition-colors hover:bg-accent/40",c=o&&"cursor-default pl-12",u=a&&"opacity-60";let f;e[3]!==m||e[4]!==c||e[5]!==u?(f=Q("group/tile relative flex h-full w-full items-center gap-3 px-4 py-3 text-left bg-card",m,c,u),e[3]=m,e[4]=c,e[5]=u,e[6]=f):f=e[6];let p;e[7]!==s.agentIcon||e[8]!==s.agentName?(p=n.jsx(ce,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[7]=s.agentIcon,e[8]=s.agentName,e[9]=p):p=e[9];let h;e[10]!==s.title?(h=n.jsx("div",{className:"line-clamp-2 text-sm font-medium text-foreground leading-snug",children:s.title}),e[10]=s.title,e[11]=h):h=e[11];let x;e[12]!==s?(x=jn(s),e[12]=s,e[13]=x):x=e[13];let y;e[14]!==x?(y=n.jsx("div",{className:"truncate text-xs text-muted-foreground mt-0.5",children:x}),e[14]=x,e[15]=y):y=e[15];let b;e[16]!==y||e[17]!==h?(b=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,y]}),e[16]=y,e[17]=h,e[18]=b):b=e[18];let v;e[19]!==o?(v=!o&&n.jsx(ss,{size:16,className:"shrink-0 text-muted-foreground opacity-0 -translate-x-1 transition-all duration-200 group-hover/tile:opacity-100 group-hover/tile:translate-x-0","aria-hidden":!0}),e[19]=o,e[20]=v):v=e[20];let N;e[21]!==a||e[22]!==d||e[23]!==b||e[24]!==v||e[25]!==l||e[26]!==f||e[27]!==p?(N=n.jsxs("button",{type:"button",onClick:d,disabled:l,"aria-busy":a,className:f,children:[p,b,v]}),e[21]=a,e[22]=d,e[23]=b,e[24]=v,e[25]=l,e[26]=f,e[27]=p,e[28]=N):N=e[28];let j;return e[29]!==r||e[30]!==N?(j=n.jsxs(n.Fragment,{children:[N,r]}),e[29]=r,e[30]=N,e[31]=j):j=e[31],j}function wn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"mt-4 grid w-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:3},Sn)}),t[0]=e):e=t[0],e}function Sn(t,e){return n.jsxs("div",{className:"flex w-full items-center gap-3 rounded-2xl bg-card card-shadow px-3 py-2.5",children:[n.jsx(H,{className:"size-10 rounded-xl"}),n.jsxs("div",{className:"flex-1 space-y-1.5",children:[n.jsx(H,{className:"h-3 w-2/3"}),n.jsx(H,{className:"h-2.5 w-1/3"})]})]},`chip-skeleton-${e}`)}function _n(t){const e=k.c(17),{tile:s,prompts:o,isEditMode:i,tileWidth:r}=t,{org:a}=J(),{open:d,startBlank:l,dialog:m,starting:c}=Ne(s.agentId),u=o.filter(Cn),f=Ye(s),p="relative flex h-full w-full flex-col p-3";let h;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==c?(h=!i&&n.jsx("button",{type:"button",onClick:()=>{l(f?{main:f}:void 0)},disabled:c,"aria-busy":c,className:"mb-1 self-start rounded-md px-2 py-1 text-[10px] text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:"Open chat"}),e[0]=i,e[1]=f,e[2]=l,e[3]=c,e[4]=h):h=e[4];const x="flex min-h-0 flex-1 gap-3 overflow-hidden";let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Tn,{}),e[5]=y):y=e[5];let b;e[6]!==a.id||e[7]!==a.slug||e[8]!==s?(b=n.jsx("div",{className:"min-h-0 flex-1 overflow-hidden rounded-lg border border-border",children:n.jsx($.Suspense,{fallback:y,children:n.jsx(In,{tile:s,orgId:a.id,orgSlug:a.slug})})}),e[6]=a.id,e[7]=a.slug,e[8]=s,e[9]=b):b=e[9];const v=u.length>0&&!i&&r>=2&&n.jsx("div",{className:"flex w-44 shrink-0 flex-col gap-2 overflow-hidden",children:u.map(g=>n.jsx("button",{type:"button",onClick:()=>d(g),disabled:c,className:"shrink-0 rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:n.jsx("span",{className:"line-clamp-2",children:g.title})},g.promptName))});let N;e[10]!==b||e[11]!==v?(N=n.jsxs("div",{className:x,children:[b,v]}),e[10]=b,e[11]=v,e[12]=N):N=e[12];let j;return e[13]!==m||e[14]!==h||e[15]!==N?(j=n.jsxs("div",{className:p,children:[h,N,m]}),e[13]=m,e[14]=h,e[15]=N,e[16]=j):j=e[16],j}function Cn(t){return!!t.promptName}function In(t){const e=k.c(13),{tile:s,orgId:o,orgSlug:i}=t;let r;e[0]!==o||e[1]!==i||e[2]!==s.connectionId?(r={connectionId:s.connectionId,orgId:o,orgSlug:i},e[0]=o,e[1]=i,e[2]=s.connectionId,e[3]=r):r=e[3];const a=ae(r),d=s.minHeight??200,l=s.maxHeight??4e3;let m;return e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==l||e[9]!==s.connectionId||e[10]!==s.resourceUri||e[11]!==s.toolInput?(m=n.jsx(Qt,{resourceURI:s.resourceUri,orgId:o,orgSlug:i,connectionId:s.connectionId,client:a,toolInput:s.toolInput,displayMode:"fullscreen",minHeight:d,maxHeight:l,className:"h-full"}),e[4]=a,e[5]=o,e[6]=i,e[7]=d,e[8]=l,e[9]=s.connectionId,e[10]=s.resourceUri,e[11]=s.toolInput,e[12]=m):m=e[12],m}function Tn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex h-full w-full flex-col gap-2 p-4",children:[n.jsx(H,{className:"h-3 w-2/3"}),n.jsx(H,{className:"h-3 w-1/2"}),n.jsx(H,{className:"mt-1 h-full w-full rounded-md"})]}),t[0]=e):e=t[0],e}function kn(t){const e=k.c(14),{icon:s,name:o}=t;let i;e[0]!==s||e[1]!==o?(i=n.jsx(ce,{icon:s,name:o,size:"sm+"}),e[0]=s,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=n.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:o}),e[3]=o,e[4]=r):r=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Loading tile…"}),e[5]=a):a=e[5];let d;e[6]!==r?(d=n.jsxs("div",{className:"min-w-0 flex-1",children:[r,a]}),e[6]=r,e[7]=d):d=e[7];let l;e[8]!==i||e[9]!==d?(l=n.jsxs("div",{className:"flex items-center gap-2.5",children:[i,d]}),e[8]=i,e[9]=d,e[10]=l):l=e[10];let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[n.jsx(H,{className:"h-3 w-3/4"}),n.jsx(H,{className:"h-3 w-1/2"}),n.jsx(H,{className:"h-3 w-2/3"})]}),e[11]=m):m=e[11];let c;return e[12]!==l?(c=n.jsxs("div",{className:"flex h-full w-full flex-col gap-3 p-5 opacity-60",children:[l,m]}),e[12]=l,e[13]=c):c=e[13],c}function $n(t){const e=k.c(10),{tile:s,prompts:o,isEditMode:i}=t,{open:r,startBlank:a,dialog:d,starting:l}=Ne(s.agentId),m=o.filter(An),c=Ye(s),u="flex h-full w-full flex-col gap-3 p-4";let f;e[0]!==c||e[1]!==a?(f=()=>{a(c?{main:c}:void 0)},e[0]=c,e[1]=a,e[2]=f):f=e[2];const p=l||i;let h;e[3]!==f||e[4]!==p?(h=n.jsx("button",{type:"button",onClick:f,disabled:p,className:"mb-1 self-start rounded-md px-2 py-1 text-[10px] text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:"Open chat"}),e[3]=f,e[4]=p,e[5]=h):h=e[5];const x=m.length>0&&!i&&n.jsx("div",{className:"grid grid-cols-1 gap-2 overflow-hidden sm:grid-cols-2",children:m.map(b=>n.jsx("button",{type:"button",onClick:()=>!i&&r(b),disabled:l,className:"rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:n.jsx("span",{className:"line-clamp-2",children:b.title})},b.promptName))});let y;return e[6]!==d||e[7]!==h||e[8]!==x?(y=n.jsxs("div",{className:u,children:[h,x,d]}),e[6]=d,e[7]=h,e[8]=x,e[9]=y):y=e[9],y}function An(t){return!!t.promptName}function et({isEditMode:t}){const{org:e}=J(),{isLoading:s,prompts:o,tiles:i}=be(e.slug),r=ze()?.ids??[],a=new Set(r),d=Oe(),l=Ue(),m=xe(),c=new Set(i.map(g=>g.agentId)),u=new Map;for(const g of o){const w=u.get(g.agentId);w?w.push(g):u.set(g.agentId,[g])}const f=o.filter(g=>!c.has(g.agentId)),p=[...i.map(g=>({kind:"tile",id:bn(g),data:g})),...f.map(g=>({kind:"prompt",id:yn(g),data:g}))],h=new Map(p.map(g=>[g.id,g])),x=fn(p.map(g=>({id:g.id,defaultSize:g.kind==="tile"?hn:gn,minSize:g.kind==="tile"?xn:void 0,pinned:a.has(g.data.agentId)}))),y=g=>{d.apply(w=>w.filter(S=>S!==g)).catch(()=>U.error("Couldn't remove from home — please try again."))},b=async g=>{if(i.filter(S=>S.agentId===g.agentId).length<=1){y(g.agentId);return}try{const C=(await l.call("COLLECTION_VIRTUAL_MCP_GET",{id:g.agentId})).item;if(!C)throw new Error("Agent not found");const _=Z(C.metadata?.ui),I=g.tileId?_.filter(T=>T.tileId!==g.tileId):_.filter(T=>T.connectionId!==g.connectionId||T.resourceUri!==g.resourceUri);await l.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:g.agentId,data:{metadata:{...C.metadata??{},ui:{...C.metadata?.ui??{},homeTile:null,homeTiles:I}}}}),m.invalidateQueries({queryKey:te.homeNextActions(e.slug)})}catch{U.error("Couldn't remove tile — please try again.")}},v=g=>{const w=h.get(g);if(w){if(!a.has(w.data.agentId)){x.hideTile(g);return}w.kind==="tile"?b(w.data):y(w.data.agentId)}},N=g=>{const w=h.get(g.id);if(!w)return null;if(w.kind==="tile"){const S=u.get(w.data.agentId)??[];return n.jsx(it,{fallback:n.jsx($n,{tile:w.data,prompts:S,isEditMode:t}),children:n.jsx($.Suspense,{fallback:n.jsx(kn,{icon:w.data.agentIcon,name:w.data.agentName}),children:n.jsx(_n,{tile:w.data,prompts:S,isEditMode:t,tileWidth:g.w})})})}return n.jsx(Nn,{entry:w.data,isEditMode:t})};return s||x.isLoading?n.jsx(wn,{}):x.snapshot.visible.length===0&&!t?null:n.jsx("div",{className:"mt-4 flex w-full max-w-7xl flex-col gap-4",children:n.jsx(nn,{tiles:x.snapshot.visible,isEditMode:t,renderTile:N,onMove:x.moveTile,onResize:x.resizeTile,onRemove:v})})}function Pn(t){const e=k.c(2),{prompts:s,tiles:o}=be(t),i=o.length>0||s.length>0;let r;return e[0]!==i?(r={hasVisibleTiles:i},e[0]=i,e[1]=r):r=e[1],r}const Ie=420,Te=305;function tt(){const t=k.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("img",{src:"/home/bg-top-left.svg",alt:"",className:"absolute top-0 left-0 h-auto select-none opacity-80 dark:hidden",style:{width:Ie}}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("img",{src:"/home/bg-top-left-dark.svg",alt:"",className:"absolute top-0 left-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Ie}}),t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("img",{src:"/home/bg-bottom-right.svg",alt:"",className:"absolute bottom-0 right-0 h-auto select-none opacity-80 dark:hidden",style:{width:Te}}),t[2]=o):o=t[2];let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e,s,o,n.jsx("img",{src:"/home/bg-bottom-right-dark.svg",alt:"",className:"absolute bottom-0 right-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Te}})]}),t[3]=i):i=t[3],i}function ke(){const t=k.c(33),{data:e}=ot.useSession(),{org:s}=J(),o=ge(),i=hs(),{selectedVirtualMcp:r}=vt();let a;t[0]!==s.id?(a=ct(s.id),t[0]=s.id,t[1]=a):a=t[1];const l=r??a;let m;t[2]!==s.slug?(m=Dt(s.slug),t[2]=s.slug,t[3]=m):m=t[3],se(m);let c;t[4]!==s.id||t[5]!==s.slug?(c={connectionId:dt,orgId:s.id,orgSlug:s.slug},t[4]=s.id,t[5]=s.slug,t[6]=c):c=t[6];const u=ae(c);let f;t[7]!==s.id||t[8]!==s.slug?(f=fs(s.slug,s.id),t[7]=s.id,t[8]=s.slug,t[9]=f):f=t[9];let p;t[10]!==s.id||t[11]!==s.slug?(p=Ot(s.slug,s.id),t[10]=s.id,t[11]=s.slug,t[12]=p):p=t[12];let h;t[13]!==l.id||t[14]!==s.id||t[15]!==u?(h=ft(s.id,l.id,u),t[13]=l.id,t[14]=s.id,t[15]=u,t[16]=h):h=t[16];let x;t[17]!==f||t[18]!==p||t[19]!==h?(x={queries:[f,p,h]},t[17]=f,t[18]=p,t[19]=h,t[20]=x):x=t[20],rt(x);const y=ps(),b=pt(l.id),{hasDecoKey:v,isZeroBalance:N,isInitialFreeCredit:j,balanceDollars:g,hasOnlyDecoProvider:w}=Et(),{hasVisibleTiles:S}=Pn(s.slug),C=Mt(b?.metadata);if(y.length===0&&!(C&&zt(i))){let L;return t[21]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsx("div",{className:"min-h-full flex items-center justify-center px-4 py-10",children:n.jsx(Nt,{})})}),t[21]=L):L=t[21],L}let I;t[22]!==e?.user?.name?(I=e?.user?.name?.split(" ")[0]||"there",t[22]=e?.user?.name,t[23]=I):I=t[23];const T=I,P=v&&j&&g!=null,M=v&&N&&w;let z;t[24]!==g||t[25]!==P||t[26]!==M?(z=P?n.jsx(oe.CreditsEyebrow,{balanceDollars:g}):M?n.jsx(oe.NoCreditsEyebrow,{}):null,t[24]=g,t[25]=P,t[26]=M,t[27]=z):z=t[27];const B=z;let O;return t[28]!==B||t[29]!==S||t[30]!==o||t[31]!==T?(O=n.jsx(Ys,{children:o?n.jsx(En,{eyebrow:B,userName:T}):n.jsx(Mn,{eyebrow:B,userName:T,hasVisibleTiles:S})}),t[28]=B,t[29]=S,t[30]=o,t[31]=T,t[32]=O):O=t[32],O}function En(t){const e=k.c(12),{eyebrow:s,userName:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(tt,{}),e[0]=i):i=e[0];let r;e[1]!==s?(r=s&&n.jsx("div",{className:"mb-4",children:s}),e[1]=s,e[2]=r):r=e[2];let a;e[3]!==o?(a=n.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",o,"?"]}),e[3]=o,e[4]=a):a=e[4];let d;e[5]!==r||e[6]!==a?(d=n.jsxs("div",{className:"relative flex flex-col items-center justify-center w-full pt-28 pb-8 px-4",children:[r,a]}),e[5]=r,e[6]=a,e[7]=d):d=e[7];let l;e[8]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("div",{className:"relative w-full flex flex-col gap-4 pb-8 px-4",children:n.jsx(oe.Input,{showConnectionsBanner:!0})}),e[8]=l):l=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"relative w-full px-4 pb-8",children:n.jsx(et,{isEditMode:!1})}),e[9]=m):m=e[9];let c;return e[10]!==d?(c=n.jsxs("div",{className:"flex-1 relative flex flex-col items-center overflow-y-auto",children:[i,d,l,m]}),e[10]=d,e[11]=c):c=e[11],c}function Mn(t){const e=k.c(32),{eyebrow:s,userName:o,hasVisibleTiles:i}=t,{isEditMode:r,enter:a,save:d,cancel:l,hasChanges:m}=Ze(),[c,u]=$.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[0]=f):f=e[0];let p;e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==r||e[5]!==d?(p=n.jsx(xs.Right,{children:n.jsx(zn,{isEditMode:r,hasChanges:m,onEnter:a,onSave:d,onCancel:l,onAddTile:f})}),e[1]=l,e[2]=a,e[3]=m,e[4]=r,e[5]=d,e[6]=p):p=e[6];let h;e[7]!==c?(h=n.jsx(ys,{open:c,onOpenChange:u}),e[7]=c,e[8]=h):h=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(tt,{}),e[9]=x):x=e[9];const y=i||r?"pt-32":"flex-1 justify-center";let b;e[10]!==y?(b=Q("relative flex flex-col items-center px-10 pb-4",y),e[10]=y,e[11]=b):b=e[11];let v;e[12]!==s?(v=s&&n.jsx("div",{className:"mb-4",children:s}),e[12]=s,e[13]=v):v=e[13];let N;e[14]!==o?(N=n.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",o,"?"]}),e[14]=o,e[15]=N):N=e[15];let j;e[16]!==v||e[17]!==N?(j=n.jsxs("div",{className:"text-center mb-10",children:[v,N]}),e[16]=v,e[17]=N,e[18]=j):j=e[18];let g;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs("div",{className:"relative w-full",children:[n.jsx(On,{}),n.jsx(oe.Input,{showConnectionsBanner:!0})]}),e[19]=g):g=e[19];let w;e[20]!==j?(w=n.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[j,g]}),e[20]=j,e[21]=w):w=e[21];let S;e[22]!==r?(S=n.jsx("div",{className:"relative w-full mt-10 mx-auto max-w-[1280px] px-2 pb-16",children:n.jsx(et,{isEditMode:r})}),e[22]=r,e[23]=S):S=e[23];let C;e[24]!==w||e[25]!==S||e[26]!==b?(C=n.jsxs("div",{className:"flex-1 relative flex flex-col min-h-0",children:[x,n.jsx("div",{className:"flex-1 relative flex flex-col overflow-y-auto",children:n.jsxs("div",{className:b,children:[w,S]})})]}),e[24]=w,e[25]=S,e[26]=b,e[27]=C):C=e[27];let _;return e[28]!==C||e[29]!==p||e[30]!==h?(_=n.jsxs(n.Fragment,{children:[p,h,C]}),e[28]=C,e[29]=p,e[30]=h,e[31]=_):_=e[31],_}function zn(t){const e=k.c(17),{isEditMode:s,hasChanges:o,onEnter:i,onSave:r,onCancel:a,onAddTile:d}=t;if(s){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ye,{size:14}),e[0]=c):c=e[0];let u;e[1]!==d?(u=n.jsxs("button",{type:"button",onClick:d,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Add a tile from any agent",children:[c,"Add tile"]}),e[1]=d,e[2]=u):u=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx($e,{size:14}),e[3]=f):f=e[3];let p;e[4]!==a?(p=n.jsxs(Y,{size:"sm",variant:"ghost",onClick:a,className:"gap-1.5 h-7 text-xs",children:[f,"Cancel"]}),e[4]=a,e[5]=p):p=e[5];const h=!o;let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ht,{size:14}),e[6]=x):x=e[6];let y;e[7]!==r||e[8]!==h?(y=n.jsxs(Y,{size:"sm",onClick:r,disabled:h,className:"gap-1.5 h-7 text-xs",children:[x,"Save"]}),e[7]=r,e[8]=h,e[9]=y):y=e[9];let b;return e[10]!==u||e[11]!==p||e[12]!==y?(b=n.jsxs(n.Fragment,{children:[u,p,y]}),e[10]=u,e[11]=p,e[12]=y,e[13]=b):b=e[13],b}let l;e[14]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(jt,{size:14}),e[14]=l):l=e[14];let m;return e[15]!==i?(m=n.jsxs("button",{type:"button",onClick:i,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Customize your home",children:[l,"Customize"]}),e[15]=i,e[16]=m):m=e[16],m}function On(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("img",{src:"/home/capybara.png",alt:"","aria-hidden":!0,className:"pointer-events-none absolute -top-16 right-6 z-20 h-20 w-auto select-none"}),t[0]=e):e=t[0],e}function Bo(){const t=k.c(2);if(ge()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:n.jsx(ke,{})}),t[0]=o):o=t[0],o}let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex-1 min-h-0 pb-1 pr-1 pl-0 pt-0",children:n.jsx("div",{className:"h-full p-0.5 pt-0.25",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:n.jsx(ke,{})})})}),t[1]=s):s=t[1],s}export{Bo as default};
@@ -1 +0,0 @@
1
- import{c as it,r as E,j as e,i as rt}from"./index-DxlHohos.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-BrXdL-Lt.js";import{S as nt}from"./scroll-area-BQ4NX1bn.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-ILJLsAuC.js";import{p as xt}from"./index-CJ_WyHaH.js";import"./X-B8wYbOHP.js";import"./agent-icon-D6ScS5eo.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./Zap-Ck4Jbz5x.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./tooltip-DMmgM7e7.js";import"./file-type-icon-hXLsuGMr.js";import"./dialog-MiZL-_YR.js";import"./use-mobile-hKrwQBDS.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CE-xSeW6.js";import"./use-mcp-client-CNnx-haj.js";import"./auth-I8PcsAZz.js";import"./chat-context-Crn2GsKg.js";import"./hooks-BtB9MPhf.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./use-collections-B6pMz1IK.js";import"./use-ai-providers-wHUqYAGC.js";import"./studio-tools-D9_XU7fF.js";import"./use-organization-settings-DwyMEelQ.js";import"./shell-layout-BYRDelQn.js";import"./avatar-Bpn7ltM4.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./integration-icon-B15UAASa.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-connection-BMbtT7eU.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./label-V1xGlDvf.js";import"./input-ynoHkRGd.js";import"./select-DkrQC107.js";import"./switch-ClTjjV_x.js";import"./index-BNXFraW9.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./tabs-Dj7TFZyD.js";import"./toggle-group-D_3_bPL8.js";import"./sortable.esm-_Zt-p5de.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./extract-connection-data-DtIqJdjB.js";import"./card-Ci8NZwVP.js";import"./collection-tabs-Gyp1a8vw.js";import"./badge-CVwJxD7r.js";import"./textarea-CxDb-u2d.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./connect-desktop-dialog-06YJzoAV.js";import"./decopilot-Dbt2jBoA.js";import"./checkbox-CJMdVFNu.js";import"./skeleton-DTay4-M3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DoeeVHY_.js";import"./popover-CLPjeHBw.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./dropdown-menu-DXRwFWu2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-aucp5nWv.js";import"./empty-state-a9stw3Wm.js";import"./toolbar-rA1gLMyG.js";import"./preview-dialog-AzszzSwr.js";import"./index-e6GyeBP5.js";import"./use-mcp-tools-JoKvL2pB.js";import"./use-capability-ddKCLYA5.js";import"./shell-route-loading-DjGn54jz.js";import"./index-_JYNVywS.js";import"./alert-dialog-BXnZrTbX.js";import"./use-debounced-autosave-BpDYt9KJ.js";import"./index-DSUV3he9.js";import"./sidebar-ZPFWMUP5.js";import"./search-input-Ct5Xi3oF.js";import"./github-repo-picker-B_w3Ltce.js";import"./use-debounced-value-LxQyiGK7.js";import"./use-secrets-C6nujoJA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-xXBscn87.js";import"./automation-runs-BiLlGi5i.js";import"./table-gmNXuzch.js";import"./use-members-BsBXC0fj.js";import"./use-org-auth-client-o86Ff5f3.js";import"./task-status-CdFvis4P.js";import"./use-automations-BxMn7-hR.js";import"./use-file-configs-B33ILX1M.js";import"./monaco-editor-C_4iCLuk.js";import"./select-model-DzXi1qbA.js";import"./automation-list-row-BsPVv9-8.js";function ii(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{ii as SeoSheet};
@@ -1 +0,0 @@
1
- import{c as H,j as t,B as Z}from"./index-DxlHohos.js";import{n as ee}from"./LinkExternal01-BHOPN66U.js";import{aB as te,t as oe}from"./agent-icon-D6ScS5eo.js";import{I as J}from"./input-ynoHkRGd.js";import{L as G}from"./label-V1xGlDvf.js";import{M as ie}from"./automation-runs-BiLlGi5i.js";import{T as Q,a as se,b as W,c as le}from"./tabs-Dj7TFZyD.js";import{T as re}from"./textarea-CxDb-u2d.js";import{au as ae,av as me,at as pe,aw as ne,ax as ce,ay as de,az as fe}from"./index-CJ_WyHaH.js";import{b as ue,a as xe,B as he}from"./block-document-BxsfcHpJ.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-DLz7zjZ-.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./X-B8wYbOHP.js";import"./Zap-Ck4Jbz5x.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./use-connection-BMbtT7eU.js";import"./use-collections-B6pMz1IK.js";import"./use-mcp-client-CNnx-haj.js";import"./auth-I8PcsAZz.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./card-Ci8NZwVP.js";import"./sheet-BrXdL-Lt.js";import"./table-gmNXuzch.js";import"./empty-state-a9stw3Wm.js";import"./use-members-BsBXC0fj.js";import"./use-org-auth-client-o86Ff5f3.js";import"./task-status-CdFvis4P.js";import"./use-automations-BxMn7-hR.js";import"./studio-tools-D9_XU7fF.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./badge-CVwJxD7r.js";import"./select-DkrQC107.js";import"./tooltip-DMmgM7e7.js";import"./checkbox-CJMdVFNu.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./dialog-MiZL-_YR.js";import"./popover-CLPjeHBw.js";import"./avatar-Bpn7ltM4.js";import"./scroll-area-BQ4NX1bn.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./file-type-icon-hXLsuGMr.js";import"./use-mobile-hKrwQBDS.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CE-xSeW6.js";import"./chat-context-Crn2GsKg.js";import"./hooks-BtB9MPhf.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-wHUqYAGC.js";import"./use-organization-settings-DwyMEelQ.js";import"./shell-layout-BYRDelQn.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./integration-icon-B15UAASa.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./index-BNXFraW9.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./toggle-group-D_3_bPL8.js";import"./sortable.esm-_Zt-p5de.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./extract-connection-data-DtIqJdjB.js";import"./collection-tabs-Gyp1a8vw.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./connect-desktop-dialog-06YJzoAV.js";import"./decopilot-Dbt2jBoA.js";import"./skeleton-DTay4-M3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DoeeVHY_.js";import"./dropdown-menu-DXRwFWu2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-aucp5nWv.js";import"./toolbar-rA1gLMyG.js";import"./preview-dialog-AzszzSwr.js";import"./index-e6GyeBP5.js";import"./use-mcp-tools-JoKvL2pB.js";import"./use-capability-ddKCLYA5.js";import"./shell-route-loading-DjGn54jz.js";import"./index-_JYNVywS.js";import"./alert-dialog-BXnZrTbX.js";import"./switch-ClTjjV_x.js";import"./use-debounced-autosave-BpDYt9KJ.js";import"./index-DSUV3he9.js";import"./sidebar-ZPFWMUP5.js";import"./search-input-Ct5Xi3oF.js";import"./github-repo-picker-B_w3Ltce.js";import"./use-debounced-value-LxQyiGK7.js";import"./use-secrets-C6nujoJA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-xXBscn87.js";import"./use-file-configs-B33ILX1M.js";import"./monaco-editor-C_4iCLuk.js";import"./select-model-DzXi1qbA.js";import"./automation-list-row-BsPVv9-8.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function ri(A){const e=H.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let U;e[40]!==L||e[41]!==R?(U=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=U):U=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=O):O=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[O,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let $;e[45]!==r.sections?($=xe(r.sections),e[45]=r.sections,e[46]=$):$=e[46];let I;e[47]!==h?(I=T=>h("sections",T),e[47]=h,e[48]=I):I=e[48];let M;e[49]!==u||e[50]!==$||e[51]!==I?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:$,onChange:I,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=$,e[51]=I,e[52]=M):M=e[52];let z;e[53]!==m||e[54]!==r||e[55]!==h?(z=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=z):z=e[56];let D;e[57]!==M||e[58]!==z?(D=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,z]}),e[57]=M,e[58]=z,e[59]=D):D=e[59];let V;e[60]!==U||e[61]!==D?(V=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,D]})}),e[60]=U,e[61]=D,e[62]=V):V=e[62];let q;return e[63]!==v||e[64]!==V?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[v,V]}),e[63]=v,e[64]=V,e[65]=q):q=e[65],q}function Ce(A){const e=H.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(J,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=H.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(G,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=H.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(G,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{ri as PostEditor};
@@ -1 +0,0 @@
1
- import{c as $,D as H,j as A}from"./index-DxlHohos.js";import{l as L,g as E,s as y}from"./scroll-area-BQ4NX1bn.js";import{p as O,u as k}from"./use-mcp-client-CNnx-haj.js";import{b as q,c as B}from"./use-mcp-tools-JoKvL2pB.js";import{u as Y}from"./index-CJ_WyHaH.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-CE-xSeW6.js";import{u as z,b as F}from"./chat-context-Crn2GsKg.js";import{b as J}from"./shell-layout-BYRDelQn.js";import"./agent-icon-D6ScS5eo.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./X-B8wYbOHP.js";import"./Zap-Ck4Jbz5x.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./tooltip-DMmgM7e7.js";import"./file-type-icon-hXLsuGMr.js";import"./dialog-MiZL-_YR.js";import"./use-mobile-hKrwQBDS.js";import"./tab-id-BptcWVWa.js";import"./hooks-BtB9MPhf.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-D9_XU7fF.js";import"./sheet-BrXdL-Lt.js";import"./integration-icon-B15UAASa.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./use-collections-B6pMz1IK.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-connection-BMbtT7eU.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./label-V1xGlDvf.js";import"./input-ynoHkRGd.js";import"./select-DkrQC107.js";import"./auth-I8PcsAZz.js";import"./index-BNXFraW9.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./tabs-Dj7TFZyD.js";import"./toggle-group-D_3_bPL8.js";import"./sortable.esm-_Zt-p5de.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./use-organization-settings-DwyMEelQ.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./extract-connection-data-DtIqJdjB.js";import"./card-Ci8NZwVP.js";import"./collection-tabs-Gyp1a8vw.js";import"./badge-CVwJxD7r.js";import"./textarea-CxDb-u2d.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./use-ai-providers-wHUqYAGC.js";import"./connect-desktop-dialog-06YJzoAV.js";import"./decopilot-Dbt2jBoA.js";import"./checkbox-CJMdVFNu.js";import"./skeleton-DTay4-M3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bpn7ltM4.js";import"./settings-section-DoeeVHY_.js";import"./popover-CLPjeHBw.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./dropdown-menu-DXRwFWu2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-aucp5nWv.js";import"./empty-state-a9stw3Wm.js";import"./toolbar-rA1gLMyG.js";import"./preview-dialog-AzszzSwr.js";import"./index-e6GyeBP5.js";import"./use-capability-ddKCLYA5.js";import"./shell-route-loading-DjGn54jz.js";import"./index-_JYNVywS.js";import"./alert-dialog-BXnZrTbX.js";import"./switch-ClTjjV_x.js";import"./use-debounced-autosave-BpDYt9KJ.js";import"./index-DSUV3he9.js";import"./sidebar-ZPFWMUP5.js";import"./search-input-Ct5Xi3oF.js";import"./github-repo-picker-B_w3Ltce.js";import"./use-debounced-value-LxQyiGK7.js";import"./use-secrets-C6nujoJA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-xXBscn87.js";import"./automation-runs-BiLlGi5i.js";import"./table-gmNXuzch.js";import"./use-members-BsBXC0fj.js";import"./use-org-auth-client-o86Ff5f3.js";import"./task-status-CdFvis4P.js";import"./use-automations-BxMn7-hR.js";import"./use-file-configs-B33ILX1M.js";import"./monaco-editor-C_4iCLuk.js";import"./select-model-DzXi1qbA.js";import"./automation-list-row-BsPVv9-8.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function ye(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{ye as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as S,j as r}from"./index-DxlHohos.js";import{I as T}from"./input-ynoHkRGd.js";import{L as C}from"./label-V1xGlDvf.js";import{T as L}from"./textarea-CxDb-u2d.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-CJ_WyHaH.js";import{u as M,s as P}from"./primitives-DLz7zjZ-.js";import"./index-BNXFraW9.js";import"./chat-context-Crn2GsKg.js";import"./hooks-BtB9MPhf.js";import"./use-mcp-client-CNnx-haj.js";import"./auth-I8PcsAZz.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./use-collections-B6pMz1IK.js";import"./use-ai-providers-wHUqYAGC.js";import"./studio-tools-D9_XU7fF.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DwyMEelQ.js";import"./scroll-area-BQ4NX1bn.js";import"./agent-icon-D6ScS5eo.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./X-B8wYbOHP.js";import"./Zap-Ck4Jbz5x.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./tooltip-DMmgM7e7.js";import"./file-type-icon-hXLsuGMr.js";import"./dialog-MiZL-_YR.js";import"./use-mobile-hKrwQBDS.js";import"./content-blocks-o63cs2vh.js";import"./types-CE-xSeW6.js";import"./shell-layout-BYRDelQn.js";import"./avatar-Bpn7ltM4.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./sheet-BrXdL-Lt.js";import"./integration-icon-B15UAASa.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-connection-BMbtT7eU.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./select-DkrQC107.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./tabs-Dj7TFZyD.js";import"./toggle-group-D_3_bPL8.js";import"./sortable.esm-_Zt-p5de.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./extract-connection-data-DtIqJdjB.js";import"./card-Ci8NZwVP.js";import"./collection-tabs-Gyp1a8vw.js";import"./badge-CVwJxD7r.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./connect-desktop-dialog-06YJzoAV.js";import"./decopilot-Dbt2jBoA.js";import"./checkbox-CJMdVFNu.js";import"./skeleton-DTay4-M3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DoeeVHY_.js";import"./popover-CLPjeHBw.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./dropdown-menu-DXRwFWu2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-aucp5nWv.js";import"./empty-state-a9stw3Wm.js";import"./toolbar-rA1gLMyG.js";import"./preview-dialog-AzszzSwr.js";import"./index-e6GyeBP5.js";import"./use-mcp-tools-JoKvL2pB.js";import"./use-capability-ddKCLYA5.js";import"./shell-route-loading-DjGn54jz.js";import"./index-_JYNVywS.js";import"./alert-dialog-BXnZrTbX.js";import"./switch-ClTjjV_x.js";import"./use-debounced-autosave-BpDYt9KJ.js";import"./index-DSUV3he9.js";import"./sidebar-ZPFWMUP5.js";import"./search-input-Ct5Xi3oF.js";import"./github-repo-picker-B_w3Ltce.js";import"./use-debounced-value-LxQyiGK7.js";import"./use-secrets-C6nujoJA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-xXBscn87.js";import"./automation-runs-BiLlGi5i.js";import"./table-gmNXuzch.js";import"./use-members-BsBXC0fj.js";import"./use-org-auth-client-o86Ff5f3.js";import"./task-status-CdFvis4P.js";import"./use-automations-BxMn7-hR.js";import"./use-file-configs-B33ILX1M.js";import"./monaco-editor-C_4iCLuk.js";import"./select-model-DzXi1qbA.js";import"./automation-list-row-BsPVv9-8.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function fr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{fr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BqJeHdsD.js","assets/index-DxlHohos.js","assets/index-BBz2M403.css","assets/XCircle-Cbl4oRwE.js","assets/CheckCircle-DN5CRmoG.js","assets/Settings02-CETGCcAp.js","assets/use-mcp-client-CNnx-haj.js","assets/auth-I8PcsAZz.js","assets/useInfiniteQuery-CtYnQlRb.js","assets/use-infinite-scroll-DISg61-W.js","assets/studio-tools-D9_XU7fF.js","assets/badge-CVwJxD7r.js","assets/input-ynoHkRGd.js","assets/dropdown-menu-DXRwFWu2.js","assets/ChevronUp-DXq8Dp0y.js","assets/ChevronRight-DV6TH1br.js","assets/DotsVertical-Duuu1rut.js","assets/table-gmNXuzch.js","assets/toggle-group-D_3_bPL8.js","assets/use-view-mode-BikGMtf7.js","assets/use-mobile-hKrwQBDS.js","assets/FilterLines-DRREmb5i.js","assets/Globe01-DGNVXaH_.js","assets/SearchMd-Bn23mcBP.js","assets/dialog-MiZL-_YR.js","assets/X-B8wYbOHP.js","assets/AlertCircle-BByROm_p.js","assets/Upload01-Ct3XJhf3.js","assets/alert-dialog-BXnZrTbX.js","assets/card-Ci8NZwVP.js","assets/Trash01-Bb31xMPA.js","assets/label-V1xGlDvf.js","assets/select-DkrQC107.js","assets/tooltip-DMmgM7e7.js","assets/ChevronDown-_QIKT6SA.js","assets/switch-ClTjjV_x.js","assets/textarea-CxDb-u2d.js","assets/checkbox-CJMdVFNu.js","assets/Eye-DBXM6Zj1.js","assets/LinkExternal01-BHOPN66U.js","assets/use-copy-Di7IRNeU.js","assets/Key01-Co4vwTZr.js","assets/Plus-Bfl2Mr1z.js","assets/mcp-oauth-BiyHe-0P.js","assets/Play-C_bV7niL.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,am as o}from"./index-DxlHohos.js";import{R as m}from"./require-capability-OmzKtJ8d.js";import"./use-capability-ddKCLYA5.js";import"./access-gate-DBkmPPlf.js";import"./capability-load-error-BrvPQpma.js";const n=i.lazy(()=>o(()=>import("./registry-layout-BqJeHdsD.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,44])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{c as T,j as t,r as Q,B as je,i as Se}from"./index-DxlHohos.js";import{i as be}from"./ChevronRight-DV6TH1br.js";import{M as fe}from"./agent-icon-D6ScS5eo.js";import{S as ue}from"./scroll-area-BQ4NX1bn.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-ILJLsAuC.js";import{s as xe,p as ze}from"./index-CJ_WyHaH.js";import{a as ge}from"./Tool01-C7YicPIW.js";import"./AlertCircle-BByROm_p.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./ChevronLeft-DlPz6yo9.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./X-B8wYbOHP.js";import"./Zap-Ck4Jbz5x.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./tooltip-DMmgM7e7.js";import"./file-type-icon-hXLsuGMr.js";import"./dialog-MiZL-_YR.js";import"./use-mobile-hKrwQBDS.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CE-xSeW6.js";import"./use-mcp-client-CNnx-haj.js";import"./auth-I8PcsAZz.js";import"./chat-context-Crn2GsKg.js";import"./hooks-BtB9MPhf.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./use-collections-B6pMz1IK.js";import"./use-ai-providers-wHUqYAGC.js";import"./studio-tools-D9_XU7fF.js";import"./use-organization-settings-DwyMEelQ.js";import"./shell-layout-BYRDelQn.js";import"./avatar-Bpn7ltM4.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./sheet-BrXdL-Lt.js";import"./integration-icon-B15UAASa.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-connection-BMbtT7eU.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./label-V1xGlDvf.js";import"./input-ynoHkRGd.js";import"./select-DkrQC107.js";import"./switch-ClTjjV_x.js";import"./index-BNXFraW9.js";import"./drawer-CtVcR9-y.js";import"./collection-search-CRmkJvUt.js";import"./tabs-Dj7TFZyD.js";import"./toggle-group-D_3_bPL8.js";import"./sortable.esm-_Zt-p5de.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Cjd1XzQq.js";import"./use-registry-connections-CRiSvQWj.js";import"./useInfiniteQuery-CtYnQlRb.js";import"./use-infinite-scroll-DISg61-W.js";import"./extract-connection-data-DtIqJdjB.js";import"./card-Ci8NZwVP.js";import"./collection-tabs-Gyp1a8vw.js";import"./badge-CVwJxD7r.js";import"./textarea-CxDb-u2d.js";import"./connection-form-helpers-W8YQhc7h.js";import"./authenticate-and-persist-oauth-CVsGhQoh.js";import"./mcp-oauth-BiyHe-0P.js";import"./useSuspenseInfiniteQuery-P7u-T8E2.js";import"./connect-desktop-dialog-06YJzoAV.js";import"./decopilot-Dbt2jBoA.js";import"./checkbox-CJMdVFNu.js";import"./skeleton-DTay4-M3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DoeeVHY_.js";import"./popover-CLPjeHBw.js";import"./command-D-xFDgLJ.js";import"./index-BVpOsWbq.js";import"./dropdown-menu-DXRwFWu2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-aucp5nWv.js";import"./empty-state-a9stw3Wm.js";import"./toolbar-rA1gLMyG.js";import"./preview-dialog-AzszzSwr.js";import"./index-e6GyeBP5.js";import"./use-mcp-tools-JoKvL2pB.js";import"./use-capability-ddKCLYA5.js";import"./shell-route-loading-DjGn54jz.js";import"./index-_JYNVywS.js";import"./alert-dialog-BXnZrTbX.js";import"./use-debounced-autosave-BpDYt9KJ.js";import"./index-DSUV3he9.js";import"./sidebar-ZPFWMUP5.js";import"./search-input-Ct5Xi3oF.js";import"./github-repo-picker-B_w3Ltce.js";import"./use-debounced-value-LxQyiGK7.js";import"./use-secrets-C6nujoJA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-xXBscn87.js";import"./automation-runs-BiLlGi5i.js";import"./table-gmNXuzch.js";import"./use-members-BsBXC0fj.js";import"./use-org-auth-client-o86Ff5f3.js";import"./task-status-CdFvis4P.js";import"./use-automations-BxMn7-hR.js";import"./use-file-configs-B33ILX1M.js";import"./monaco-editor-C_4iCLuk.js";import"./select-model-DzXi1qbA.js";import"./automation-list-row-BsPVv9-8.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 Ci(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{Ci as SeoEditor};
@@ -1 +0,0 @@
1
- import{c as S,e as R,j as s,D as H,l as k,ag as J,G as L,v as B,P as G,a as I,i as Q,r as F,O as K}from"./index-DxlHohos.js";import{u as E,S as U,M as V}from"./shell-controls-_CHhBdE3.js";import{j as X,k as Y,l as Z,b as q,c as w,d as P,S as M,a as O,f as ee,g as se}from"./sidebar-ZPFWMUP5.js";import{a as te}from"./index-DSUV3he9.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as T}from"./ZapSquare-Cvjv-DE3.js";import{t as ae,a as A}from"./Users03-DcG-uvYG.js";import{i as ce}from"./HardDrive-BnHX5rk8.js";import{i as me}from"./Key01-Co4vwTZr.js";import{i as fe}from"./Shield01-DHcTXWCs.js";import{s as de}from"./User01-D8va4iBz.js";import{i as xe}from"./Zap-Ck4Jbz5x.js";import{a as be}from"./use-capability-ddKCLYA5.js";import{a as ue}from"./use-join-requests-DjTV8gKb.js";import{u as W}from"./use-mobile-hKrwQBDS.js";import{u as he}from"./use-status-sounds-aucp5nWv.js";import{a as y}from"./toolbar-rA1gLMyG.js";import"./sheet-BrXdL-Lt.js";import"./X-B8wYbOHP.js";import"./LayoutLeft-CY2bCLro.js";import"./tooltip-DMmgM7e7.js";import"./studio-tools-D9_XU7fF.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./ChevronLeft-DlPz6yo9.js";import"./ChevronRight-DV6TH1br.js";function D(){const e=S.c(21),{capabilities:t,isPrivileged:f,loading:l,error:a}=be(),r=ue().length;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ae,{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(le,{size:14}),e[8]=u):u=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(re,{size:14}),e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(me,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ie,{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(xe,{size:14}),e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ne,{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(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(J,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{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=z;break e}n=z.map(C=>({...C,items:C.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=D();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org"},e[0]=f):f=e[0];const{org:l}=R(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(P,{className:"gap-0.5",children:p.items.map(h=>s.jsx(M,{children:s.jsx(O,{asChild:!0,isActive:n(h.to),children:s.jsxs(L,{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(P,{className:"gap-0.5",children:s.jsx(M,{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(ee,{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.105.1"]})}),e[16]=x):x=e[16];let m;return e[17]!==d?(m=s.jsxs(se,{variant:"sidebar",children:[d,x]}),e[17]=d,e[18]=m):m=e[18],m}function je(){B("signed_out",{source:"settings_sidebar"}),G(),I.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:f}=e,l=D();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org"},t[0]=a):a=t[0];const{org:r}=R(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(L,{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.105.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(){G(),I.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:f}=H();he(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(Q,{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(te,{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 Ye(){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(U,{}),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(X,{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(Y,{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(V,{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(Z,{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,Ye as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BqJeHdsD.js","assets/index-DxlHohos.js","assets/index-BBz2M403.css","assets/XCircle-Cbl4oRwE.js","assets/CheckCircle-DN5CRmoG.js","assets/Settings02-CETGCcAp.js","assets/use-mcp-client-CNnx-haj.js","assets/auth-I8PcsAZz.js","assets/useInfiniteQuery-CtYnQlRb.js","assets/use-infinite-scroll-DISg61-W.js","assets/studio-tools-D9_XU7fF.js","assets/badge-CVwJxD7r.js","assets/input-ynoHkRGd.js","assets/dropdown-menu-DXRwFWu2.js","assets/ChevronUp-DXq8Dp0y.js","assets/ChevronRight-DV6TH1br.js","assets/DotsVertical-Duuu1rut.js","assets/table-gmNXuzch.js","assets/toggle-group-D_3_bPL8.js","assets/use-view-mode-BikGMtf7.js","assets/use-mobile-hKrwQBDS.js","assets/FilterLines-DRREmb5i.js","assets/Globe01-DGNVXaH_.js","assets/SearchMd-Bn23mcBP.js","assets/dialog-MiZL-_YR.js","assets/X-B8wYbOHP.js","assets/AlertCircle-BByROm_p.js","assets/Upload01-Ct3XJhf3.js","assets/alert-dialog-BXnZrTbX.js","assets/card-Ci8NZwVP.js","assets/Trash01-Bb31xMPA.js","assets/label-V1xGlDvf.js","assets/select-DkrQC107.js","assets/tooltip-DMmgM7e7.js","assets/ChevronDown-_QIKT6SA.js","assets/switch-ClTjjV_x.js","assets/textarea-CxDb-u2d.js","assets/checkbox-CJMdVFNu.js","assets/Eye-DBXM6Zj1.js","assets/LinkExternal01-BHOPN66U.js","assets/use-copy-Di7IRNeU.js","assets/Key01-Co4vwTZr.js","assets/Plus-Bfl2Mr1z.js","assets/mcp-oauth-BiyHe-0P.js","assets/Play-C_bV7niL.js"])))=>i.map(i=>d[i]);
2
- import{c as m,b as n,e as c,j as t,i as p,r as l,am as f}from"./index-DxlHohos.js";import{R as u}from"./require-capability-OmzKtJ8d.js";import"./use-capability-ddKCLYA5.js";import"./access-gate-DBkmPPlf.js";import"./capability-load-error-BrvPQpma.js";const g=l.lazy(()=>f(()=>import("./registry-layout-BqJeHdsD.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,44])));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(p,{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{r as o,c as m,J as h}from"./index-DxlHohos.js";import{p as R,q as I}from"./question-004-sINsf4GQ.js";import{d as y,D as S}from"./decopilot-sse-pool-TYE_B7pR.js";const b=()=>0;function D(s){const{orgSlug:e,taskId:r,enabled:t=!0,onStep:n,onFinish:u,onTaskStatus:f}=s,l=o.useRef({taskId:r,onStep:n,onFinish:u,onTaskStatus:f});l.current={taskId:r,onStep:n,onFinish:u,onTaskStatus:f};const i=o.useRef(null),p=o.useRef(t),d=o.useRef(e);(!i.current||p.current!==t||d.current!==e)&&(p.current=t,d.current=e,i.current=E=>{if(!t||!e)return()=>{};const k=T=>{let a;try{a=JSON.parse(T.data)}catch{return}const c=l.current;if(!(c.taskId&&a.subject!==c.taskId)){switch(a.type){case S.STEP:c.onStep?.(a);break;case S.FINISH:c.onFinish?.(a);break;case S.THREAD_STATUS:c.onTaskStatus?.(a);break}E()}};return y.subscribe(e,k)}),o.useSyncExternalStore(i.current,b,b)}const O=new Set(["completed","failed","requires_action"]);function U(s){const e=m.c(5),[r]=h();let t;e[0]!==r?(t=u=>{r.enableSounds&&O.has(u.data.status)&&R(I.dataUri).catch(_)},e[0]=r,e[1]=t):t=e[1];let n;e[2]!==s||e[3]!==t?(n={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=n):n=e[4],D(n)}function _(s){console.warn("[status-sounds] playback failed:",s)}export{U as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-DISg61-W.js";import{cJ as i}from"./index-DxlHohos.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-DISg61-W.js";import{cJ as u,aC as n}from"./index-DxlHohos.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{c as V,r as U,j as o,l as J,B as Y}from"./index-DxlHohos.js";import{U as et,f as ct}from"./agent-icon-D6ScS5eo.js";import{n as mt}from"./ChevronLeft-DlPz6yo9.js";import{i as dt}from"./ChevronRight-DV6TH1br.js";import{L as ft}from"./label-V1xGlDvf.js";import{S as nt}from"./scroll-area-BQ4NX1bn.js";import{S as pt}from"./switch-ClTjjV_x.js";import{a as ut,T as ht,b as gt}from"./tooltip-DMmgM7e7.js";import{V as xt}from"./view-mode-toggle-xXBscn87.js";import"./AlertCircle-BByROm_p.js";import"./Tool01-C7YicPIW.js";import"./SwitchHorizontal01-BdWlDtq0.js";import"./Settings02-CETGCcAp.js";import"./XCircle-Cbl4oRwE.js";import"./ArrowUpRight-_4PndQnE.js";import"./ZapSquare-Cvjv-DE3.js";import"./Users03-DcG-uvYG.js";import"./CheckCircle-DN5CRmoG.js";import"./ChevronUp-DXq8Dp0y.js";import"./ChevronDown-_QIKT6SA.js";import"./DotsVertical-Duuu1rut.js";import"./Stars02-Xy76m3KA.js";import"./Eye-DBXM6Zj1.js";import"./ZoomOut-CJ8iZ9OJ.js";import"./Globe01-DGNVXaH_.js";import"./FilterLines-DRREmb5i.js";import"./Star01-IeVtusrz.js";import"./Globe04-BdpvmyzG.js";import"./HardDrive-BnHX5rk8.js";import"./Key01-Co4vwTZr.js";import"./LayoutLeft-CY2bCLro.js";import"./LinkExternal01-BHOPN66U.js";import"./Monitor01-DIto-EWx.js";import"./Sun-DE4b9Sn0.js";import"./Palette-DeLXb-ef.js";import"./Play-C_bV7niL.js";import"./Plus-Bfl2Mr1z.js";import"./SearchLg-xan1p51u.js";import"./SearchMd-Bn23mcBP.js";import"./Shield01-DHcTXWCs.js";import"./Stars01-DsEVLQGr.js";import"./Trash01-Bb31xMPA.js";import"./Upload01-Ct3XJhf3.js";import"./User01-D8va4iBz.js";import"./Users01-C8khHCsF.js";import"./XClose-DA8oRcGC.js";import"./X-B8wYbOHP.js";import"./Zap-Ck4Jbz5x.js";import"./use-clock-tick-BxA5cEF7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Di7IRNeU.js";import"./file-type-icon-hXLsuGMr.js";import"./dialog-MiZL-_YR.js";import"./use-mobile-hKrwQBDS.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CE-xSeW6.js";import"./use-mcp-client-CNnx-haj.js";import"./auth-I8PcsAZz.js";import"./chat-context-Crn2GsKg.js";import"./hooks-BtB9MPhf.js";import"./decopilot-sse-pool-TYE_B7pR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-y_uhJfNX.js";import"./use-collections-B6pMz1IK.js";import"./use-ai-providers-wHUqYAGC.js";import"./studio-tools-D9_XU7fF.js";import"./use-organization-settings-DwyMEelQ.js";import"./shell-layout-BYRDelQn.js";import"./avatar-Bpn7ltM4.js";import"./required-auth-layout-DLQWxGOz.js";import"./use-org-sso-CwJuiyEi.js";import"./sheet-BrXdL-Lt.js";import"./integration-icon-B15UAASa.js";import"./use-navigate-to-agent-C0J9CJSW.js";import"./use-connection-BMbtT7eU.js";import"./use-mcp-prompts-C3ux8bEv.js";import"./form-B8RX1FbF.js";import"./input-ynoHkRGd.js";import"./select-DkrQC107.js";const bt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),yt=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Tt=new Date(-864e13),vt=new Date(864e13),jt=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Nt=/\/flags\/multivariate\.ts$/;function wt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function kt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",l=typeof n=="string";if(!r&&!l)return null;const s=r?new Date(t):Tt,m=l?new Date(n):vt;return Number.isNaN(s.getTime())||Number.isNaN(m.getTime())||r&&l&&m.getTime()<=s.getTime()?null:{start:s,end:m,openStart:!r,openEnd:!l}}function rt(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(bt.has(n)){const r=kt(e);r&&t.push(r);return}if(yt.has(n)){const r=e.matchers;if(Array.isArray(r))for(const l of r)rt(l,t)}}}function _t(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!jt.test(t))return!1;const n=e.variants;return Array.isArray(n)}function Mt(e){if(typeof e=="string"){const a=e.trim();if(a.length===0)return null;try{const i=new URL(a).pathname.split("/").filter(Boolean),d=i[i.length-1];if(d)return decodeURIComponent(d)}catch{}return a.length>80?`${a.slice(0,77)}…`:a}if(!e||typeof e!="object")return null;const t=e,n=t.config,l=t.desktop?.media,s=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,l?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const a of s)if(typeof a=="string"&&a.trim().length>0)return a.trim();const m=t.__resolveType;if(typeof m=="string"){const c=(m.split("/").pop()??m).replace(/\.(tsx?|jsx?)$/i,"");if(c.length>0)return c}return null}function St(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function W(e,t,n,r,l){if(_t(e)){const s=e.variants,m=e.__resolveType,a=Nt.test(m)?"":St(r);s.forEach((c,i)=>{if(!c||typeof c!="object")return;const d=c,f=[];if(rt(d.rule,f),f.length===0)return;const x=Mt(d.value)??(a||n);for(const h of f)l.push({blockKey:t,blockLabel:n,innerPath:a,variantIndex:i,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:m})});for(let c=0;c<s.length;c++){const i=s[c];i&&typeof i=="object"&&W(i.value,t,n,[...r,"variants",c,"value"],l)}return}if(Array.isArray(e)){for(let s=0;s<e.length;s++)W(e[s],t,n,[...r,s],l);return}if(e&&typeof e=="object")for(const[s,m]of Object.entries(e))s!=="__resolveType"&&W(m,t,n,[...r,s],l)}function Et(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))W(r,n,wt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function At(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,l)=>{const s=l*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${s})`,text:"white",border:`oklch(0.50 0.14 ${s})`})}),n}const Dt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function st(e,t){return e.get(t)??Dt}const $t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"],it=1440*60*1e3;function P(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function at(e){return new Date(e.getFullYear(),e.getMonth(),1)}function F(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function K(e,t){return Math.round((P(e).getTime()-P(t).getTime())/it)}function Ct(e){const t=(e.getTime()-P(e).getTime())/it;return Math.min(Math.max(t,0),1)}function q(e,t){return K(e,t)+Ct(e)}function Rt(e){const t=z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const l=[];for(let s=0;s<7;s++)l.push(z(t,r*7+s));n.push(l)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Lt(e,t){const n=P(e[0]),r=z(n,7),l=n.getTime(),s=r.getTime(),m=[];for(const i of t){const d=P(i.start),f=P(i.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?z(r,-1):f,h=K(u,n),g=K(x,u)+1;if(g<=0)continue;const b=Math.max(i.start.getTime(),l),y=Math.min(i.end.getTime(),s),T=q(new Date(b),n),p=Math.max(q(new Date(y),n)-T,0);p<=0||m.push({variant:i,startCol:h,span:g,leftUnits:T,widthUnits:p})}m.sort((i,d)=>i.startCol-d.startCol||d.span-i.span||i.variant.blockKey.localeCompare(d.variant.blockKey));const a=[],c=[];for(const i of m){let d=a.findIndex(f=>f<=i.startCol);d===-1&&(d=a.length,a.push(0)),a[d]=i.startCol+i.span,c.push({...i,lane:d})}return c}const Q=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ot(e){const t=e.openStart?"Always":Q.format(e.start),n=e.openEnd?"Ongoing":Q.format(e.end);return`${t} → ${n}`}function Pt(e){const t=V.c(17),{variant:n}=e;let r;t[0]!==n.blockLabel?(r=o.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=r):r=t[1];let l;t[2]!==n.innerPath?(l=n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=l):l=t[3];let s;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(s=n.label!==n.blockLabel&&n.label!==n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=s):s=t[7];let m;t[8]!==n?(m=Ot(n),t[8]=n,t[9]=m):m=t[9];let a;t[10]!==m?(a=o.jsx("div",{className:"mt-1",children:m}),t[10]=m,t[11]=a):a=t[11];let c;return t[12]!==r||t[13]!==l||t[14]!==s||t[15]!==a?(c=o.jsx(gt,{children:o.jsxs("div",{className:"text-xs",children:[r,l,s,a]})}),t[12]=r,t[13]=l,t[14]=s,t[15]=a,t[16]=c):c=t[16],c}const X=16;function It(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${X}px, #000 calc(100% - ${X}px), ${r})`}function lt(e){const t=V.c(26),{variant:n,color:r,style:l,children:s,fadeStart:m,fadeEnd:a}=e,c=m===void 0?!1:m,i=a===void 0?!1:a;let d;t[0]!==i||t[1]!==c?(d=It(c,i),t[0]=i,t[1]=c,t[2]=d):d=t[2];const f=d;let u;t[3]!==c?(u=c&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=c,t[4]=u):u=t[4];let x;t[5]!==i?(x=i&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=i,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==l||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...l},t[9]=r.bg,t[10]=r.text,t[11]=l,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==s?(b=o.jsx("span",{className:"truncate",children:s}),t[16]=s,t[17]=b):b=t[17];let y;t[18]!==g||t[19]!==b?(y=o.jsx(ut,{asChild:!0,children:o.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=y):y=t[20];let T;t[21]!==n?(T=o.jsx(Pt,{variant:n}),t[21]=n,t[22]=T):T=t[22];let p;return t[23]!==T||t[24]!==y?(p=o.jsxs(ht,{children:[y,T]}),t[23]=T,t[24]=y,t[25]=p):p=t[25],p}function Mn(e){const t=V.c(49),{decofile:n}=e,[r,l]=U.useState("calendar"),[s,m]=U.useState(Bt),[a,c]=U.useState(!1);let i,d,f;if(t[0]!==n||t[1]!==a){const E=Et(n);i=E.filter(Ht).length,f=a?E:E.filter(Vt),d=At(f.map(Ft)),t[0]=n,t[1]=a,t[2]=i,t[3]=d,t[4]=f}else i=t[2],d=t[3],f=t[4];const u=d;let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=()=>m(at(new Date)),t[5]=x):x=t[5];const h=x;let g;t[6]!==r?(g=()=>m(E=>r==="calendar"?F(E,-1):F(E,-3)),t[6]=r,t[7]=g):g=t[7];const b=g;let y;t[8]!==r?(y=()=>m(E=>r==="calendar"?F(E,1):F(E,3)),t[8]=r,t[9]=y):y=t[9];const T=y;let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(Y,{variant:"outline",size:"sm",onClick:h,children:"Today"}),t[10]=p):p=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(mt,{size:16}),t[11]=w):w=t[11];let k;t[12]!==b?(k=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:b,"aria-label":"Previous",children:w}),t[12]=b,t[13]=k):k=t[13];let _;t[14]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(dt,{size:16}),t[14]=_):_=t[14];let M;t[15]!==T?(M=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:T,"aria-label":"Next",children:_}),t[15]=T,t[16]=M):M=t[16];const A=ot[s.getMonth()];let S;t[17]!==s?(S=s.getFullYear(),t[17]=s,t[18]=S):S=t[18];let v;t[19]!==A||t[20]!==S?(v=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[A," ",S]}),t[19]=A,t[20]=S,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==k||t[24]!==M?(j=o.jsxs("div",{className:"flex items-center gap-2",children:[p,k,M,v]}),t[22]=v,t[23]=k,t[24]=M,t[25]=j):j=t[25];let D;t[26]!==i||t[27]!==a?(D=i>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(pt,{id:"show-ongoing",checked:a,onCheckedChange:c}),o.jsxs(ft,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:["Show ongoing (",i,")"]})]}),t[26]=i,t[27]=a,t[28]=D):D=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L={value:"calendar",icon:o.jsx(et,{}),label:"Calendar"},t[29]=L):L=t[29];let I;t[30]===Symbol.for("react.memo_cache_sentinel")?(I=[L,{value:"timeline",icon:o.jsx(ct,{}),label:"Timeline"}],t[30]=I):I=t[30];let N;t[31]!==r?(N=o.jsx(xt,{value:r,onValueChange:l,options:I}),t[31]=r,t[32]=N):N=t[32];let R;t[33]!==D||t[34]!==N?(R=o.jsxs("div",{className:"flex items-center gap-4",children:[D,N]}),t[33]=D,t[34]=N,t[35]=R):R=t[35];let $;t[36]!==j||t[37]!==R?($=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,R]}),t[36]=j,t[37]=R,t[38]=$):$=t[38];let C;t[39]!==u||t[40]!==s||t[41]!==i||t[42]!==a||t[43]!==f||t[44]!==r?(C=f.length===0?o.jsx(Wt,{hiddenOngoing:a?0:i}):r==="calendar"?o.jsx(Ut,{monthStart:s,variants:f,colorMap:u}):o.jsx(Jt,{monthStart:s,variants:f,colorMap:u}),t[39]=u,t[40]=s,t[41]=i,t[42]=a,t[43]=f,t[44]=r,t[45]=C):C=t[45];let O;return t[46]!==$||t[47]!==C?(O=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[$,C]}),t[46]=$,t[47]=C,t[48]=O):O=t[48],O}function Ft(e){return e.blockKey}function Vt(e){return!e.openEnd}function Ht(e){return e.openEnd}function Bt(){return at(new Date)}function Wt(e){const t=V.c(3),{hiddenOngoing:n}=e,r=n===void 0?0:n;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(et,{size:24,className:"text-muted-foreground/60"}),t[0]=l):l=t[0];let s;return t[1]!==r?(s=o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[l,r>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No dated variants in view."}),o.jsxs("div",{className:"text-xs text-muted-foreground/80",children:[r," ongoing"," ",r===1?"variant is":"variants are"," hidden — enable “Show ongoing” to view."]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No scheduled variants."}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:"Variants gated by a date matcher appear here."})]})]}),t[1]=r,t[2]=s):s=t[2],s}const G=20,Z=2,tt=28,zt=6;function Ut(e){const t=V.c(17),{monthStart:n,variants:r,colorMap:l}=e;let s,m,a,c,i;if(t[0]!==l||t[1]!==n||t[2]!==r){const u=Rt(n),x=P(new Date);s=nt,i="flex-1 min-h-0",m="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:$t.map(Gt)}),t[8]=a):a=t[8],c=u.map((h,g)=>{const b=Lt(h,r),y=b.reduce(Yt,0),T=tt+y*(G+Z)+8;return o.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((p,w)=>{const k=p.getMonth()===n.getMonth(),_=p.getTime()===x.getTime();return o.jsx("div",{className:J("border-r last:border-r-0 px-2 pt-1.5 text-xs",k?"bg-background":"bg-muted/30 text-muted-foreground"),children:o.jsx("span",{className:J("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",_&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},w)}),b.map((p,w)=>{const k=st(l,p.variant.blockKey),_=tt+p.lane*(G+Z),M=p.leftUnits/7*100,A=p.widthUnits/7*100,S=p.variant.openStart&&g===0,v=p.variant.openEnd&&g===u.length-1;return o.jsxs(lt,{variant:p.variant,color:k,fadeStart:S,fadeEnd:v,style:{top:_,left:`calc(${M}% + 2px)`,width:`calc(${A}% - 4px)`,minWidth:zt,height:G},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${w}`)})]},g)}),t[0]=l,t[1]=n,t[2]=r,t[3]=s,t[4]=m,t[5]=a,t[6]=c,t[7]=i}else s=t[3],m=t[4],a=t[5],c=t[6],i=t[7];let d;t[9]!==m||t[10]!==a||t[11]!==c?(d=o.jsxs("div",{className:m,children:[a,c]}),t[9]=m,t[10]=a,t[11]=c,t[12]=d):d=t[12];let f;return t[13]!==s||t[14]!==i||t[15]!==d?(f=o.jsx(s,{className:i,children:d}),t[13]=s,t[14]=i,t[15]=d,t[16]=f):f=t[16],f}function Yt(e,t){return Math.max(e,t.lane+1)}function Gt(e){return o.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const B=4,Kt=32,H=240;function Jt(e){const t=V.c(27),{monthStart:n,variants:r,colorMap:l}=e,s=n;let m,a,c,i,d,f;if(t[0]!==l||t[1]!==n||t[2]!==s||t[3]!==r){const h=F(n,B),g=new Date,b=new Map;for(const v of r){const j=b.get(v.blockKey)??[];j.push(v),b.set(v.blockKey,j)}const y=Array.from(b.entries()).sort(Xt),T=h.getTime()-s.getTime(),p=v=>(Math.max(s.getTime(),Math.min(h.getTime(),v.getTime()))-s.getTime())/T*100;let w;t[10]!==s?(w=(v,j)=>F(s,j),t[10]=s,t[11]=w):w=t[11];const k=Array.from({length:B},w),_=g.getTime()>=s.getTime()&&g.getTime()<=h.getTime()?p(g):null;m=nt,f="flex-1 min-h-0",a="min-w-[900px] relative";let M;t[12]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:{width:H},children:"Variant / Block"}),t[12]=M):M=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},t[13]=A):A=t[13];const S=k.map(Qt);t[14]!==S?(c=o.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[M,o.jsx("div",{className:"flex-1 grid",style:A,children:S})]}),t[14]=S,t[15]=c):c=t[15],t[16]!==_?(i=_!==null&&o.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${H}px + (100% - ${H}px) * ${_} / 100)`},children:o.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:"Today"})}),t[16]=_,t[17]=i):i=t[17],d=y.map(v=>{const[j,D]=v,L=st(l,j),I=D[0]?.blockLabel??j;return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:o.jsx("div",{className:"px-3 truncate",style:{width:H},children:I})}),D.map((N,R)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Kt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:H},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:L.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:N.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},children:k.map(qt)}),(()=>{const $=Math.max(N.start.getTime(),s.getTime()),C=Math.min(N.end.getTime(),h.getTime());if(C<=$)return null;const O=p(new Date($)),E=p(new Date(C))-O;return o.jsx(lt,{variant:N,color:L,fadeStart:N.openStart,fadeEnd:N.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${E}% - 2px)`,height:22},children:N.label})})()]})]},R))]},j)}),t[0]=l,t[1]=n,t[2]=s,t[3]=r,t[4]=m,t[5]=a,t[6]=c,t[7]=i,t[8]=d,t[9]=f}else m=t[4],a=t[5],c=t[6],i=t[7],d=t[8],f=t[9];let u;t[18]!==a||t[19]!==c||t[20]!==i||t[21]!==d?(u=o.jsxs("div",{className:a,children:[c,i,d]}),t[18]=a,t[19]=c,t[20]=i,t[21]=d,t[22]=u):u=t[22];let x;return t[23]!==m||t[24]!==f||t[25]!==u?(x=o.jsx(m,{className:f,children:u}),t[23]=m,t[24]=f,t[25]=u,t[26]=x):x=t[26],x}function qt(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function Qt(e,t){return o.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ot[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function Xt(e,t){return e[0].localeCompare(t[0])}export{Mn as VariantCalendar};