decocms 4.609.0 → 4.609.2

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 (450) hide show
  1. package/dist/client/assets/{AlertCircle-DgsOeALC.js → AlertCircle-Dt3GY0Bh.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D_4jMbl4.js → AreaChart-C-iaogOR.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-ee9FD9EY.js → ArrowLeft-YUwyiwVw.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-B4dtiIJD.js → ArrowRight-DenptpQc.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BIhe7Lhg.js → ArrowUp-CPULRpjx.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-B__Mouay.js → BookOpen01-CxcJv7PA.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-C_p0t44A.js → CartesianChart-DKQJ8ZHe.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CYGAPQwB.js → CategoricalChart-BITTkM6Z.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-vFrDqZ4B.js → CheckCircle-7BnmcHqO.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-HLxb8bS_.js → ChevronDown-D8DhHnMq.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-D_H0hZtd.js → ChevronSelectorVertical-D-BmJmT0.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-L_lW7nwa.js → ChevronUp-DXnUGc0S.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-D73oF3Mm.js → CreditCard01-BcT6bkOS.js} +1 -1
  14. package/dist/client/assets/{Eye-qHvXZckP.js → Eye-DtSBHO9f.js} +1 -1
  15. package/dist/client/assets/{File02-Dqb2iBoe.js → File02-CFZGfPVy.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-9msUtpR-.js → Fingerprint04-De4VufgL.js} +1 -1
  17. package/dist/client/assets/{Globe04-CkvC5czE.js → Globe04-DnTwfyGh.js} +1 -1
  18. package/dist/client/assets/{Image01-ChQ0r1W_.js → Image01-sXwH8-FK.js} +1 -1
  19. package/dist/client/assets/{Key01-DYK8BFv1.js → Key01-0BhoHNxq.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-7L-RzzTx.js → LayoutLeft-DhcW8L2l.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-CbQ_msZQ.js → LinkBroken01-nJS8cN1w.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-B-ZSTXJs.js → MessageCircle01-DrWlC4OP.js} +1 -1
  23. package/dist/client/assets/{Minus-Bc7-o6jy.js → Minus-BnUrCu3K.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Ddme45JH.js → Monitor01-CMAhieTY.js} +1 -1
  25. package/dist/client/assets/{Play-B4KVGqgs.js → Play-DGe00qZP.js} +1 -1
  26. package/dist/client/assets/{Plus-C1KkV9dn.js → Plus-BXH7i2b3.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-CuuR7S1w.js → ReferenceLine-Ch0qfjOg.js} +1 -1
  28. package/dist/client/assets/{SearchMd-B1LXZuWH.js → SearchMd-DgVjcl_1.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BdQC0ZUe.js → ShoppingBag01-Blomur-w.js} +1 -1
  30. package/dist/client/assets/{Sun-CmZ8bSeW.js → Sun-BsEDX0xb.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-8q3M45Gy.js → SwitchHorizontal01-z6tySRlC.js} +1 -1
  32. package/dist/client/assets/{Tool01-BXWKt8NX.js → Tool01-DOdYsq79.js} +1 -1
  33. package/dist/client/assets/{Tooltip-DoKCDtd8.js → Tooltip-BlmkPtAg.js} +1 -1
  34. package/dist/client/assets/{Trash01-BnkfN2k5.js → Trash01-C6DjwKcE.js} +1 -1
  35. package/dist/client/assets/{Upload01-CwKCC6d5.js → Upload01-BswyIwDw.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-yDImsmrP.js → UserCheck01-DYJoLz9O.js} +1 -1
  37. package/dist/client/assets/{UserSquare-4oxgMoPf.js → UserSquare-B8TnRXAA.js} +1 -1
  38. package/dist/client/assets/{Users01-wCJ8kCIe.js → Users01-2WULI_RK.js} +1 -1
  39. package/dist/client/assets/{XClose-C7uUuAz2.js → XClose-kwcMavwj.js} +1 -1
  40. package/dist/client/assets/{Zap-Dcq6Ux-0.js → Zap-CAQ2824E.js} +1 -1
  41. package/dist/client/assets/{access-gate-DJZvxHOy.js → access-gate-D3VbJ5hb.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog--VmAC1xi.js → add-connection-dialog-yj7w7MEx.js} +1 -1
  43. package/dist/client/assets/agent-app-BLWgH57_.js +1 -0
  44. package/dist/client/assets/{agent-assets-C5m7Swv2.js → agent-assets-ZMeuuOY2.js} +1 -1
  45. package/dist/client/assets/agent-automation-DJ00NooN.js +20 -0
  46. package/dist/client/assets/{agent-automations-CUZ0lahk.js → agent-automations-Iq079Jmy.js} +1 -1
  47. package/dist/client/assets/agent-blog-CBo8Ngz6.js +2 -0
  48. package/dist/client/assets/agent-blog-post-CluN0LI_.js +2 -0
  49. package/dist/client/assets/agent-business-case-Ckxk5XzB.js +1 -0
  50. package/dist/client/assets/{agent-calendar-DCMZK0j2.js → agent-calendar-D2WF756G.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-2zrP_oST.js → agent-capabilities-DDJdPYLQ.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-84zH0vwS.js → agent-connect-sources-DfPdgSxy.js} +1 -1
  53. package/dist/client/assets/agent-deck-CW1yW8Vm.js +1 -0
  54. package/dist/client/assets/{agent-e2e-aQ_nLlS-.js → agent-e2e-4dV5u5EF.js} +1 -1
  55. package/dist/client/assets/agent-experiments-BWVQ9ZHh.js +1 -0
  56. package/dist/client/assets/agent-file-D-TRmaf6.js +1 -0
  57. package/dist/client/assets/{agent-hosting-CViOnhAa.js → agent-hosting-Cj4zPjoX.js} +1 -1
  58. package/dist/client/assets/{agent-icon-pvTjuJ6E.js → agent-icon-CH_f-N3x.js} +1 -1
  59. package/dist/client/assets/agent-library-DMIwgJWF.js +1 -0
  60. package/dist/client/assets/agent-library-file-CIrPVVPN.js +1 -0
  61. package/dist/client/assets/agent-overview-BAvllSSA.js +1 -0
  62. package/dist/client/assets/{agent-releases-D7GRVEkc.js → agent-releases-Bdvkby_i.js} +2 -2
  63. package/dist/client/assets/agent-settings-ClWfKZHb.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-DKQpBiJD.js → agent-site-editor-DAwI7Kyr.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-DCquxkpu.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-id2Bex58.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-BVLtK2Fr.js +1 -0
  68. package/dist/client/assets/agent-view-Ya3GHsqL.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-FCDcxTY1.js → agent-view-guard-C935KHIb.js} +1 -1
  70. package/dist/client/assets/{ai-providers-_OzKFD2D.js → ai-providers-CqYI8qa5.js} +1 -1
  71. package/dist/client/assets/{alert-DT2Q_-E6.js → alert-DWWFKk-5.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-DJl0OiuO.js → analytics-sections-D44Na4Nk.js} +1 -1
  73. package/dist/client/assets/api-keys-BJ2V0tem.js +1 -0
  74. package/dist/client/assets/{api-keys-BSTgDZzj.js → api-keys-CCVw99SU.js} +1 -1
  75. package/dist/client/assets/{app-editor-AgEiTs2_.js → app-editor-BhmqaaCu.js} +1 -1
  76. package/dist/client/assets/{asset-utils-BLyT1xNx.js → asset-utils-C3Wi1LwR.js} +1 -1
  77. package/dist/client/assets/{auth-Bw2tXN0z.js → auth-YQD6gAdb.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-Bj2Dlg2C.js → auth-catchall-Dmtg29Qo.js} +1 -1
  79. package/dist/client/assets/{auth-entry-D409QQ5L.js → auth-entry-DsDcbFDM.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-DuptqPjI.js → auth-split-layout-Cbbrw4Ki.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-B9xNOiAT.js → authenticate-and-persist-oauth-DmyJjsW7.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-BbSpR6Rl.js → automation-list-row-CUFPqnO8.js} +1 -1
  83. package/dist/client/assets/{automation-runs-BAsKz_ar.js → automation-runs-BUwZaqPB.js} +1 -1
  84. package/dist/client/assets/{automations-D6YtS_eT.js → automations-C7WLZUZV.js} +1 -1
  85. package/dist/client/assets/{badge-BPOibh1z.js → badge-BgjvI8Jn.js} +1 -1
  86. package/dist/client/assets/{block-document-BJflY3QM.js → block-document-BMs5yQbd.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-DPs9YS5a.js → blocks-preview-workspace-context-CFskIuPO.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-DCYJUQtS.js → blocks-tab-states-DBpi4m7n.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-DzHxsCpo.js → blog-preview-url-PmkO-jQs.js} +1 -1
  90. package/dist/client/assets/{blog-schema-JIuXdDeK.js → blog-schema-DPJ6pbPE.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-CXt_mkFB.js → blog-source-gate-BNTns-Tj.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-Cn2JuBJ2.js → blog-view-gate-XHO990wv.js} +1 -1
  93. package/dist/client/assets/{buckets-D4CMCX6f.js → buckets-FwOH03Y6.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-DdCMAWp-.js → build-improve-prompt-doc-CKSwvFRv.js} +1 -1
  95. package/dist/client/assets/{calendar-Bdj9jUmS.js → calendar-BjODMIQG.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-I4Yc1ytM.js → capability-load-error-BZgx3S6r.js} +1 -1
  97. package/dist/client/assets/category-editor-D49fYnPR.js +1 -0
  98. package/dist/client/assets/{category-tree-BLoyW897.js → category-tree-BRAQfnIe.js} +5 -5
  99. package/dist/client/assets/{chart-DjJp6Be8.js → chart-B0EUkF3N.js} +2 -2
  100. package/dist/client/assets/{chat-context-DaK1Yrzk.js → chat-context-CtXhrjSm.js} +7 -7
  101. package/dist/client/assets/{chat-draft-GVRYGgVC.js → chat-draft-VC3sd6LG.js} +1 -1
  102. package/dist/client/assets/{checkbox-DFbpPbja.js → checkbox-CEz5sveC.js} +1 -1
  103. package/dist/client/assets/{choose-editor-Bo0L0UD1.js → choose-editor-BxH12yXf.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-gmD3SxqP.js → cli-auth-success-BhEsygAu.js} +1 -1
  105. package/dist/client/assets/cms-settings-editor-B-1aq1IS.js +1 -0
  106. package/dist/client/assets/{cms-store-drafts-Bq7pE-8n.js → cms-store-drafts-CHe8Yq48.js} +1 -1
  107. package/dist/client/assets/{collapsible-CmLYWXhM.js → collapsible-BaySCHgb.js} +1 -1
  108. package/dist/client/assets/{collection-detail-Cw7UAzp9.js → collection-detail-Dns-hBc0.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-C0uT9g7-.js → collection-display-button-BEirnd5i.js} +1 -1
  110. package/dist/client/assets/{collection-search-DbqzyK2L.js → collection-search-C4zFbPFw.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-BgxC_m_W.js → collection-table-wrapper-BGBEi7W9.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-l9Rm1byP.js → collection-tabs-CJ_TiFfs.js} +1 -1
  113. package/dist/client/assets/{combobox-BfpG_5FA.js → combobox-YbQYNAI4.js} +1 -1
  114. package/dist/client/assets/{command-Cjlt4NYo.js → command-ClLr83k5.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-Dt2PNYyF.js → companion-mcps-section-u7SmZnvS.js} +1 -1
  116. package/dist/client/assets/{config-Bl9iWUWu.js → config-VL9iqOxm.js} +1 -1
  117. package/dist/client/assets/{connect-CcotJE7P.js → connect-B5HJ-dj9.js} +3 -3
  118. package/dist/client/assets/{connect-key-BLdyzZfH.js → connect-key-Byohnb78.js} +1 -1
  119. package/dist/client/assets/{connect-layout-BMmFOnsY.js → connect-layout-0w96Vn6m.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-CTPiWDc2.js → connect-source-dialog-DyTekM4a.js} +1 -1
  121. package/dist/client/assets/{connection-068pJ_io.js → connection-Dk3ZpWiR.js} +1 -1
  122. package/dist/client/assets/{connection-card-D4EugjwD.js → connection-card-X6LBG2kz.js} +1 -1
  123. package/dist/client/assets/{connection-detail-DLOruc56.js → connection-detail-CBLDUNQs.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-Bun8v9J_.js → connection-form-helpers-xYGhC7rS.js} +1 -1
  125. package/dist/client/assets/{connection-slug-DBDVjDxP.js → connection-slug-DDIL8GBP.js} +1 -1
  126. package/dist/client/assets/{connections-CRDmqlHV.js → connections-CgZzcIpU.js} +1 -1
  127. package/dist/client/assets/{content-changes-CAdVNZYr.js → content-changes-D2Zs24rN.js} +1 -1
  128. package/dist/client/assets/{content-tab-Ctr84xPy.js → content-tab-nBcO35Ay.js} +3 -3
  129. package/dist/client/assets/{context-CyH8HKpn.js → context-DJXbSIqC.js} +1 -1
  130. package/dist/client/assets/{context-menu-hmngmOyV.js → context-menu-D6szttzM.js} +1 -1
  131. package/dist/client/assets/{context-shell-CzJ65eJF.js → context-shell-DucfEXXy.js} +5 -5
  132. package/dist/client/assets/{create-organization-dialog-CIUgKQxN.js → create-organization-dialog-CM_u8_eq.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-BLIyG0FR.js → daily-pulse-C9clHv9l.js} +1 -1
  134. package/dist/client/assets/{delete-copy-ze2eTDiM.js → delete-copy-BQdwkEVM.js} +1 -1
  135. package/dist/client/assets/{device-hint-DunaGjJW.js → device-hint-DU6CIZHu.js} +1 -1
  136. package/dist/client/assets/{discover-D7SOfpwo.js → discover-DPkQbwQq.js} +1 -1
  137. package/dist/client/assets/{domain-settings-eGLSeNYd.js → domain-settings-1xFiEhJG.js} +1 -1
  138. package/dist/client/assets/{drawer-9GUvyTNb.js → drawer-BqcK626t.js} +1 -1
  139. package/dist/client/assets/{editor-BV5mmXeC.js → editor-ClEwQRn-.js} +2 -2
  140. package/dist/client/assets/{editor-classes-CoVLI63W.js → editor-classes-DSuutlS7.js} +1 -1
  141. package/dist/client/assets/{empty-state-BbNHwm8G.js → empty-state-C9z6v98n.js} +1 -1
  142. package/dist/client/assets/{empty-state-DHm6hawX.js → empty-state-E3VscpRN.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-BfmfMfVM.js → experiments-tab-choice-Di5_08ju.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-DOr6SLIT.js → extract-connection-data-BVkijTqO.js} +1 -1
  145. package/dist/client/assets/{feature-gate-l7M3kCNe.js → feature-gate-BVgfJghP.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-Cje-blAj.js → feature-paywall-CeiuDVrJ.js} +1 -1
  147. package/dist/client/assets/{file-explorer-B4dsHeXL.js → file-explorer-HTKMVqMJ.js} +2 -2
  148. package/dist/client/assets/{file-preview-CbZualSz.js → file-preview-Bjz37LYm.js} +1 -1
  149. package/dist/client/assets/{file-share-button-CoeghTGi.js → file-share-button-DDv7yLFa.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-CugZpl5p.js → file-type-icon-DZ13Kaio.js} +1 -1
  151. package/dist/client/assets/{folder-icon-dAFkoeuP.js → folder-icon-CXfmILS-.js} +1 -1
  152. package/dist/client/assets/{form-DD0ivG3M.js → form-CG-nxH4G.js} +1 -1
  153. package/dist/client/assets/frame-navigation-By99mATz.js +1 -0
  154. package/dist/client/assets/{gateway-client-DDyFFIgO.js → gateway-client-_ucPCL20.js} +1 -1
  155. package/dist/client/assets/general-CPN_jSyx.js +1 -0
  156. package/dist/client/assets/{github-icon-CIEsB1DB.js → github-icon-Q8GJQd2H.js} +1 -1
  157. package/dist/client/assets/{held-block-view-_p1jMUzm.js → held-block-view-CQqo1UsV.js} +1 -1
  158. package/dist/client/assets/{home-sFZggHF1.js → home-DSubmDCr.js} +1 -1
  159. package/dist/client/assets/{home-overview-DjxYvEip.js → home-overview-CYe7001d.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-BjTOedDx.js → hosted-reconcile-DRjsDibm.js} +1 -1
  161. package/dist/client/assets/{icon-button-OK_-LM30.js → icon-button-BuzP0C4n.js} +1 -1
  162. package/dist/client/assets/{index-DZ1lVzhF.js → index-B5Vy9pqV.js} +1 -1
  163. package/dist/client/assets/{index-vsG63i2D.js → index-BDTw_gvo.js} +1 -1
  164. package/dist/client/assets/{index-DmYgx-mG.js → index-BMYIuo3L.js} +1 -1
  165. package/dist/client/assets/{index-BsX9UbFy.js → index-BSDvsLw1.js} +2 -2
  166. package/dist/client/assets/{index-CgbncEFq.js → index-BoCsMgEt.js} +1 -1
  167. package/dist/client/assets/{index-DV5oCYMC.js → index-BzVjoBZR.js} +1 -1
  168. package/dist/client/assets/{index-Lyf_37T_.js → index-C5fHI9y5.js} +1 -1
  169. package/dist/client/assets/{index-CKiVSSTc.js → index-CCoda8hy.js} +1 -1
  170. package/dist/client/assets/{index-CG73SDwb.js → index-CM-KaTV3.js} +1 -1
  171. package/dist/client/assets/{index-Bc90cedN.js → index-CXyc1XRt.js} +1 -1
  172. package/dist/client/assets/{index-C1ub_U1Q.js → index-CaT4JsCE.js} +29 -29
  173. package/dist/client/assets/index-Ccbd_91u.js +1 -0
  174. package/dist/client/assets/{index-LESY8PsW.js → index-Cmw1-PfS.js} +1 -1
  175. package/dist/client/assets/{index-8__yj9A8.js → index-D-nior4c.js} +1 -1
  176. package/dist/client/assets/{index-654OnQGa.js → index-DUl_f6UU.js} +1 -1
  177. package/dist/client/assets/{index-Bq_D7Efs.js → index-qv7etdoP.js} +1 -1
  178. package/dist/client/assets/{index-redirect-UXX_5L78.js → index-redirect-Cqzj8viF.js} +1 -1
  179. package/dist/client/assets/{index-CC-bsUWE.js → index-zeN-7Cn6.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-C0-hSbfo.js → infiniteQueryObserver-DjmxTVn9.js} +1 -1
  181. package/dist/client/assets/{infra-billing-IsVMflpq.js → infra-billing-CB7DZfYo.js} +1 -1
  182. package/dist/client/assets/{input-CYE8dEKJ.js → input-CpxUgj4y.js} +1 -1
  183. package/dist/client/assets/{input-CyFU8wN2.js → input-P7Rufjcy.js} +4 -4
  184. package/dist/client/assets/{integration-icon-BUwIBVDW.js → integration-icon-Dtih4xc7.js} +1 -1
  185. package/dist/client/assets/{item-actions-Bcd36NN2.js → item-actions-BkjvdFq4.js} +1 -1
  186. package/dist/client/assets/{jira-icon-DaKZ5C1y.js → jira-icon-Gki7sDDq.js} +1 -1
  187. package/dist/client/assets/{label-MEZXCG7R.js → label-BWgTIudr.js} +1 -1
  188. package/dist/client/assets/{layout-DqwW5KgT.js → layout-2b9a92kv.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-B5IdWm49.js → legacy-admin-welcome-dialog-BZk8Utt6.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-BaFhGUvM.js → legacy-agents-deep-B4-aSX-9.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-8V-vUmHU.js → legacy-main-redirect-AdMA-EVm.js} +1 -1
  192. package/dist/client/assets/library-DJBjhiug.js +1 -0
  193. package/dist/client/assets/{library-tab-DOseUX7E.js → library-tab-oXjowMBh.js} +3 -3
  194. package/dist/client/assets/{login-BHMF8SEz.js → login-B0pEl3o0.js} +1 -1
  195. package/dist/client/assets/{markdown-ByDkuymE.js → markdown-r449Hfho.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-DLiWo4pG.js → mcp-app-renderer-YPhCUxxb.js} +2 -2
  197. package/dist/client/assets/{mcp-oauth-DB4k4xDQ.js → mcp-oauth-B4C3DLh4.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-MdQqhUwI.js → mcp-oauth-CqXZxzFC.js} +1 -1
  199. package/dist/client/assets/{members-uZ5WIXj3.js → members-k-mj-5Va.js} +1 -1
  200. package/dist/client/assets/{memory-DH7ax2_S.js → memory-DXFBSY3B.js} +2 -2
  201. package/dist/client/assets/{mock-board-BKqriAsg.js → mock-board-DJRKIS_z.js} +4 -4
  202. package/dist/client/assets/{monaco-editor-BjoMxV0m.js → monaco-editor-D1CWShG9.js} +2 -2
  203. package/dist/client/assets/{monitoring-BXm8CKJz.js → monitoring-BWrsMdHd.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-Ccq_5Pis.js → monitoring-stats-row-Ditvwbem.js} +1 -1
  205. package/dist/client/assets/{multi-select-BAUwYZSW.js → multi-select-DXPjvW15.js} +1 -1
  206. package/dist/client/assets/{mustache-DfiEfZhl.js → mustache-BPvtuZ9v.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CLhRTJ54.js → named-rule-step-Ez1gAQKy.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-c0gBiUkc.js → named-rule-view-Ce8Aki88.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-BFLZ9X71.js → new-project-dialog-Bf2X9J1F.js} +1 -1
  210. package/dist/client/assets/{new-project-store-t1LrYNy3.js → new-project-store-CcRyCfqt.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-D8zI9QZ5.js → oauth-callback-ai-provider-DAJ1uvU8.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-PJn9bt0u.js → oauth-callback-rmCqKqtn.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-Cd5lUk6G.js → oauth-consent-CKBNTNpS.js} +1 -1
  214. package/dist/client/assets/{onboarding-GJ0kBKYC.js → onboarding-RLX1WNeL.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-CgZdBmhP.js → openai-conversation-Cs4RFD_j.js} +2 -2
  216. package/dist/client/assets/{optimistic-project-sidebar-views-BHAN0czc.js → optimistic-project-sidebar-views-DHIvlN7w.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-BB9WlRUK.js → order-monitor-day-wYgAIb03.js} +1 -1
  218. package/dist/client/assets/{organization-choice-DrL7bQKs.js → organization-choice-DF4YsbE1.js} +1 -1
  219. package/dist/client/assets/{orgs-D_FfwlAC.js → orgs-Cpo1HonV.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-Dgpn-cK2.js → own-accounts-section-D3b6SI3K.js} +1 -1
  221. package/dist/client/assets/{pair-DjSTW8vY.js → pair-fYdRIvpB.js} +1 -1
  222. package/dist/client/assets/{parse-sections-uNHSuM51.js → parse-sections-lZ6UNUvT.js} +4 -4
  223. package/dist/client/assets/plan-BGU2134I.js +1 -0
  224. package/dist/client/assets/{plan-ladder-BizSTmui.js → plan-ladder-BT6v1KK6.js} +1 -1
  225. package/dist/client/assets/{plan-page-DPXJjQjX.js → plan-page-DdRlUMZj.js} +2 -2
  226. package/dist/client/assets/{plan-usage-card-DucLuZ5s.js → plan-usage-card-BhjVJgyo.js} +2 -2
  227. package/dist/client/assets/{popover-C8MTUbMP.js → popover-BSXUrcE6.js} +1 -1
  228. package/dist/client/assets/{post-calendar-CNZ0zxSA.js → post-calendar-B3grhhbg.js} +1 -1
  229. package/dist/client/assets/{post-editor-Ah6UfRni.js → post-editor-Ch_iIOnp.js} +2 -2
  230. package/dist/client/assets/{preview-content-X88d2Q9c.js → preview-content-CBCToI9s.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-6taKsS3H.js → preview-dialog-CC4_EzSj.js} +1 -1
  232. package/dist/client/assets/{preview-panel-hAvkZDhV.js → preview-panel-YpdH_fuF.js} +1 -1
  233. package/dist/client/assets/preview-tab-CwK2dFzK.js +557 -0
  234. package/dist/client/assets/{primitives-BSg0_WA9.js → primitives-DNHNToXc.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-Dmze2mN-.js → product-picker-dialog-Cj-HJUFE.js} +1 -1
  236. package/dist/client/assets/{profile-X9Pp8_LM.js → profile-BB8z9nD6.js} +1 -1
  237. package/dist/client/assets/project-app-view-Cs6lYsxe.js +1 -0
  238. package/dist/client/assets/{project-apps-a5epEY_s.js → project-apps-DVjGbegU.js} +1 -1
  239. package/dist/client/assets/{project-icon-DCW53jHQ.js → project-icon-BrcJONBf.js} +1 -1
  240. package/dist/client/assets/{project-index-BlU5s5jm.js → project-index-DkaIO5pU.js} +1 -1
  241. package/dist/client/assets/project-reports-Bq0nT_NV.js +1 -0
  242. package/dist/client/assets/project-tasks-B9M3BGrW.js +1 -0
  243. package/dist/client/assets/{projects-mj39aQMY.js → projects-DPWDj1Hp.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-DNEvN2US.js → projects-empty-state-DwLmM-Bd.js} +1 -1
  245. package/dist/client/assets/{prompts-CRXoePx6.js → prompts-BG6VCS0b.js} +1 -1
  246. package/dist/client/assets/record-editor-B3XMUuBg.js +1 -0
  247. package/dist/client/assets/{redirect-editor-EMJ5thnl.js → redirect-editor-C2qzzTAe.js} +1 -1
  248. package/dist/client/assets/reports-BEraAvpt.js +1 -0
  249. package/dist/client/assets/{reports-Vs9r8j7y.js → reports-ftS1CTPN.js} +1 -1
  250. package/dist/client/assets/{reports-onboarding-B6osJ6J_.js → reports-onboarding-CZH0Mv_h.js} +1 -1
  251. package/dist/client/assets/{reports-tab-nsiK69b0.js → reports-tab-K95KTCvW.js} +2 -2
  252. package/dist/client/assets/{repositories-aKQRMXxV.js → repositories-BR1ZPeuP.js} +1 -1
  253. package/dist/client/assets/repositories-BoUeqVw4.js +1 -0
  254. package/dist/client/assets/{repository-binding-DsR2HngX.js → repository-binding-BVqJcY39.js} +1 -1
  255. package/dist/client/assets/{repository-picker-CEvPHE__.js → repository-picker-DWNj0wFN.js} +1 -1
  256. package/dist/client/assets/require-capability-CqlqzXSG.js +1 -0
  257. package/dist/client/assets/{required-auth-layout-BkH-QI99.js → required-auth-layout-CRxzoxmw.js} +1 -1
  258. package/dist/client/assets/{reset-password-CbE30Adb.js → reset-password-DanrtyLF.js} +1 -1
  259. package/dist/client/assets/{resizable-D1j5ZKXJ.js → resizable-C9TNCfpu.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-DmN6MW3K.js → resolve-tab-icon-DMNzKqRz.js} +1 -1
  261. package/dist/client/assets/{review-settings-C5KcXNql.js → review-settings-Cchlz2PT.js} +1 -1
  262. package/dist/client/assets/{role-color-D4BjDPR1.js → role-color-BoRz3OOX.js} +1 -1
  263. package/dist/client/assets/{roles-BQZMPKR1.js → roles-DJvkg2rk.js} +1 -1
  264. package/dist/client/assets/{route-Cq6wHRqc.js → route-C3OSB4-2.js} +1 -1
  265. package/dist/client/assets/route-DF02kU9q.js +1 -0
  266. package/dist/client/assets/route-Dj7mU5aY.js +1 -0
  267. package/dist/client/assets/{route-page-header-TUh2jvxt.js → route-page-header-BtKcWz0X.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-BTCoe3SD.js → sandbox-git-api-DV2Rps3Q.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-BNYPzUmr.js → sandbox-lifecycle-context-BEJFod31.js} +1 -1
  270. package/dist/client/assets/{save-status-sZNWYgwi.js → save-status-z4LtIZ69.js} +1 -1
  271. package/dist/client/assets/{schema-CL6RLkNE.js → schema-Am-4674Q.js} +1 -1
  272. package/dist/client/assets/{schema-CLnylEy_.js → schema-CBdCZe4x.js} +1 -1
  273. package/dist/client/assets/{scroll-area-jlFC4TAS.js → scroll-area-Cng2fvWP.js} +1 -1
  274. package/dist/client/assets/{search-input-Bq0ZqFg8.js → search-input-TR7sI7RN.js} +1 -1
  275. package/dist/client/assets/{search-toggle-U_qk24b2.js → search-toggle-0rIUYCou.js} +1 -1
  276. package/dist/client/assets/{secret-picker-Bn8GXEiI.js → secret-picker-DJowBB1m.js} +1 -1
  277. package/dist/client/assets/{secrets-DMHJfPvy.js → secrets-Ed66n9no.js} +1 -1
  278. package/dist/client/assets/section-array-field-e9ny1D-V.js +1 -0
  279. package/dist/client/assets/{sections-CLg-HWtr.js → sections-IlGnYknl.js} +1 -1
  280. package/dist/client/assets/{sections-editor-BCsQDadn.js → sections-editor-DfDMtXrY.js} +1 -1
  281. package/dist/client/assets/{select-D1KmAjMK.js → select-CZrUcB4m.js} +1 -1
  282. package/dist/client/assets/{select-model-CeTnhOq5.js → select-model-CTyZTiyK.js} +1 -1
  283. package/dist/client/assets/{seo-editor-ChPHbThU.js → seo-editor-Dr8_81n_.js} +1 -1
  284. package/dist/client/assets/{separator-Dof5-ye5.js → separator-DnBo8TF_.js} +1 -1
  285. package/dist/client/assets/{session-runtime-CgVs5kAm.js → session-runtime-C7lRk1bm.js} +1 -1
  286. package/dist/client/assets/settings-tab-BPEuO9Nb.js +1 -0
  287. package/dist/client/assets/{sheet-C8us_fGJ.js → sheet-CF7PsYXH.js} +1 -1
  288. package/dist/client/assets/{shell-layout-D2O4ysld.js → shell-layout-Dh4-Yy93.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-51pNQWzr.js → site-draft-actions-Bl2gM76X.js} +5 -5
  290. package/dist/client/assets/{site-draft-view-DWvUh_WK.js → site-draft-view-AsxHU4E-.js} +1 -1
  291. package/dist/client/assets/site-editor-BNSO7RL5.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-uie07d22.js → site-editor-toast-BEQHRuj3.js} +1 -1
  293. package/dist/client/assets/{skills-BFZxwCkL.js → skills-CNmvamii.js} +1 -1
  294. package/dist/client/assets/{slider-HFdsWfEF.js → slider-DG3ddCcf.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-B9245299.js → sortable.esm-DakfNCWl.js} +1 -1
  296. package/dist/client/assets/{sso-DT00q4fr.js → sso-CZJCHXw3.js} +1 -1
  297. package/dist/client/assets/{suggestion-BggpCZqm.js → suggestion-CyC2sguH.js} +2 -2
  298. package/dist/client/assets/{super-agent-icon-Bn4-UJ6J.js → super-agent-icon-Cv1v4K1q.js} +1 -1
  299. package/dist/client/assets/{switch-CTc8x0BQ.js → switch-CFYJyn7X.js} +1 -1
  300. package/dist/client/assets/{synced-repos-iykKzJd2.js → synced-repos-ZehP4MJA.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-Ds1u4H1q.js → tab-icon-glyph-BnwiRAqQ.js} +1 -1
  302. package/dist/client/assets/{table-laIfNHWy.js → table-BahGaqnh.js} +1 -1
  303. package/dist/client/assets/{tabs-BB147dUo.js → tabs-CevBbuWX.js} +1 -1
  304. package/dist/client/assets/{task-board-2M4kKpcl.js → task-board-D4sEZC2J.js} +1 -1
  305. package/dist/client/assets/{task-key-G26zQGBv.js → task-key-BJmCPG8w.js} +2 -2
  306. package/dist/client/assets/{task-route-C9tK4RBt.js → task-route-C3App6nY.js} +1 -1
  307. package/dist/client/assets/{task-status-DX0qZOle.js → task-status-BRcYy_b3.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-BI35CeEo.js → taskboard-analytics-DoXPramT.js} +1 -1
  309. package/dist/client/assets/tasks-DOZuoGKL.js +1 -0
  310. package/dist/client/assets/{tasks-DrAlCWGL.js → tasks-DszGSYGn.js} +3 -3
  311. package/dist/client/assets/{textarea-C6yf2vK0.js → textarea-CDH6DEPF.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-CX2uqIzv.js → thread-analytics-JqF9lP4x.js} +1 -1
  313. package/dist/client/assets/{thread-button-YHB_c5xv.js → thread-button-BAd68SAf.js} +1 -1
  314. package/dist/client/assets/{thread-intent-CoKmpw2U.js → thread-intent-yju7EkUf.js} +4 -4
  315. package/dist/client/assets/{thread-route-DCVbYT2J.js → thread-route-BX6inU_N.js} +1 -1
  316. package/dist/client/assets/{thread-route-Dm7-78IA.js → thread-route-BYmLVBsa.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-pioajwMd.js → thread-sheet-body-Dw_TM17U.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-CPWSqx-u.js → time-range-picker-hyR_HtS6.js} +1 -1
  319. package/dist/client/assets/{toggle-group-BRCHThnb.js → toggle-group-xl-tep-u.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-DJv3lhmv.js → tool-set-selector-C1CP18jT.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-B8qI9Xe-.js → toolbar-icon-button-uyi5Sobp.js} +1 -1
  322. package/dist/client/assets/{tooltip-BOLZbpj7.js → tooltip-C-37wWLH.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-B4wDHkzU.js → tooltipContext-TeVhWC1F.js} +1 -1
  324. package/dist/client/assets/{track-eV5Nkbyp.js → track-XaM8gmGf.js} +1 -1
  325. package/dist/client/assets/{types-BJJFFySR.js → types-B3fBNTfg.js} +3 -3
  326. package/dist/client/assets/{url-slug-6VNIFVy2.js → url-slug-BYlcIr9o.js} +1 -1
  327. package/dist/client/assets/{usage-stats-DjQ8xjIs.js → usage-stats-eYkU9yPk.js} +1 -1
  328. package/dist/client/assets/use-ai-providers-bUEURX0w.js +1 -0
  329. package/dist/client/assets/{use-api-keys-DXpxpkMH.js → use-api-keys-2PbXwDnW.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-CNVZfMlq.js → use-apply-named-rule-Ds-O2qrV.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-Dk1eKQ7U.js +1 -0
  332. package/dist/client/assets/{use-automations-DvRjIhQq.js → use-automations-DYXtS06g.js} +1 -1
  333. package/dist/client/assets/{use-autosave-DtAYL2g1.js → use-autosave-DeA6ij_2.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-BIWQ4f6h.js +1 -0
  335. package/dist/client/assets/use-blog-view-BpUj7Xe1.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-Cd_LsYGN.js → use-chat-layout-state-BvzCvk0o.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-Chr3mwU6.js → use-cms-publish-actions-DcVrTizG.js} +6 -6
  338. package/dist/client/assets/{use-connect-companion-DaXYp_6I.js → use-connect-companion-Dtig4TU7.js} +1 -1
  339. package/dist/client/assets/{use-connection-BuctFlwT.js → use-connection-CiK8c3Rq.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-DGkKMJx1.js → use-content-sync-C_bHHCMZ.js} +1 -1
  341. package/dist/client/assets/{use-copy-B1QPiUon.js → use-copy-3Av1V_Lb.js} +1 -1
  342. package/dist/client/assets/{use-current-view-B6YhRw2T.js → use-current-view-Ce-uPUNE.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-DltBlMnb.js → use-date-fns-locale-B5HtkTCa.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-CoQOjEPJ.js → use-debounced-autosave-CTQmD-RA.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-BDlfWHh1.js → use-debounced-value-5Xxz9sDf.js} +1 -1
  346. package/dist/client/assets/use-deco-credits-BhK3nU70.js +1 -0
  347. package/dist/client/assets/{use-decopilot-events-DXxOHVW-.js → use-decopilot-events-_641Ov59.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-DKPQf--N.js → use-delete-block-CtZrW5Tp.js} +1 -1
  349. package/dist/client/assets/use-delete-connection-YQsC5kJ2.js +1 -0
  350. package/dist/client/assets/{use-deployment-admin-BCtv0iLh.js → use-deployment-admin-r26zz2q8.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-CACmQNFr.js → use-entitlements-D7RtNoTI.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-Bm7i9COx.js → use-fast-preview-draft-url-DGbqLmFw.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-BdTBWYMl.js → use-file-configs-BfS0tPOy.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-DkUjjDot.js → use-id-selection-q4gmzD-G.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-BxxJ3np_.js → use-in-settings-CwiXXVnc.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-HbcED_kU.js → use-inbox-feed-5l9MLvEO.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-DUlkoAFo.js → use-infinite-scroll-DCsViXEp.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-zqkmsQY_.js → use-join-requests-DBf1oGZ9.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-Bg_X2-wJ.js → use-main-panel-tabs-X90T9xKg.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-CxOne3EN.js → use-mcp-auth-status-DUsZigI7.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-qxB46vkc.js → use-mcp-client-CTvio_L5.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-BpyrqxcY.js → use-mcp-prompts-CEPCAgjv.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-CXH754vi.js → use-mcp-tools-BE_ZMsjl.js} +1 -1
  364. package/dist/client/assets/{use-mobile-BcxOmK-J.js → use-mobile-CLhCB1ec.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-DQHvwUPc.js → use-move-blocks-DWud6YXb.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-CUw-xOEA.js → use-navigate-to-agent-DqZ2afZ_.js} +1 -1
  367. package/dist/client/assets/{use-never-published-C3irhERz.js → use-never-published-CDMbsQXF.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-C6rwPPaE.js → use-org-fs-cNPBBpNZ.js} +1 -1
  369. package/dist/client/assets/use-org-notice-CUXeWF9K.js +1 -0
  370. package/dist/client/assets/{use-org-repo-syncs-Bn2yVUz_.js → use-org-repo-syncs-D9cEubUP.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-hdCu5kD4.js → use-org-sso-DwhYKe5K.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-BUtsdGXi.js → use-organization-settings-DsOm4fQ2.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-Dj1ZUU8u.js → use-panel-navigate-B5d8StTT.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-5ArCowYI.js → use-project-native-view-presence-DLzue4pE.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-CCzY-N2k.js → use-project-scope-DD2NBlJU.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-BOJbSXk5.js → use-recent-apps-IXQff8O-.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-BRuyL4ss.js → use-reports-diagnostic-DwPRH9dQ.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-CmDtF5wo.js → use-sandbox-events-DezOKcND.js} +2 -2
  379. package/dist/client/assets/{use-secrets-DPttuCyM.js → use-secrets-DnrAThmr.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-D-z-mvAj.js → use-section-preview-base-BLAISjiC.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-BLsHptPn.js → use-sidebar-collapsed-D7vF4wTU.js} +1 -1
  382. package/dist/client/assets/{use-tags-DTwdffN3.js → use-tags-Cl8tsgI9.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-3PTRWMze.js → use-task-board-analytics-C7Gx2NpK.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-B5qHiP2P.js → use-task-board-item-prs-EGNEHlXU.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-BjByaBdg.js → use-task-board-items-DBI-S1K4.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-D0bB7pk4.js → use-task-board-prompts-CvGpBCID.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-C2wnm2Kl.js → use-task-metadata-mXn3J_39.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-C5VSoArb.js → use-thread-outputs-C3HzAtJ7.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-C9IdncTF.js → use-view-draft-kind-CQgXNieu.js} +1 -1
  390. package/dist/client/assets/{use-voice-input-C2RbHNgC.js → use-voice-input-CFCuPvYA.js} +1 -1
  391. package/dist/client/assets/useInfiniteQuery-Cark_fFU.js +1 -0
  392. package/dist/client/assets/{useQueries-ixTrcMGM.js → useQueries-D8baGR42.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-Cnb2unAB.js +1 -0
  394. package/dist/client/assets/{users-DqTYEXAk.js → users-BVT97EjV.js} +1 -1
  395. package/dist/client/assets/{utils-20hZRv25.js → utils-DT9H-K9H.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-BqMIpNPY.js → variant-calendar-BbK_wqOd.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-BIajUN2O.js → variant-matcher-override-Dt7nYHUe.js} +1 -1
  398. package/dist/client/assets/{view-header-d-zjTxWn.js → view-header-D_odaMiu.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-D5ExCj22.js → virtual-mcp-C45xWPBS.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-CwLVI1nD.js → watch-sse-pool-BU2YQMB0.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +1 -1
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-Dz1jjjVe.js +0 -1
  405. package/dist/client/assets/agent-automation-Cin_c-ej.js +0 -20
  406. package/dist/client/assets/agent-blog-BEmUtxJB.js +0 -2
  407. package/dist/client/assets/agent-blog-post-CRCuEIym.js +0 -2
  408. package/dist/client/assets/agent-business-case-BaqGpYBW.js +0 -1
  409. package/dist/client/assets/agent-deck-Cr1YjbMB.js +0 -1
  410. package/dist/client/assets/agent-experiments-BhfJlj6G.js +0 -1
  411. package/dist/client/assets/agent-file-dgzGDL0t.js +0 -1
  412. package/dist/client/assets/agent-library-DVCTBqyz.js +0 -1
  413. package/dist/client/assets/agent-library-file-Lp8prgqG.js +0 -1
  414. package/dist/client/assets/agent-overview-DYbd8V3Q.js +0 -1
  415. package/dist/client/assets/agent-settings-QTPmlbcv.js +0 -1
  416. package/dist/client/assets/agent-site-editor-code-LnmpcWvG.js +0 -2
  417. package/dist/client/assets/agent-site-editor-content-Epu9dWVm.js +0 -1
  418. package/dist/client/assets/agent-site-editor-preview-5ohlMisy.js +0 -1
  419. package/dist/client/assets/agent-view-2vMTi1CW.js +0 -1
  420. package/dist/client/assets/api-keys-NuFR_bS1.js +0 -1
  421. package/dist/client/assets/category-editor-DuIL0KKo.js +0 -1
  422. package/dist/client/assets/cms-settings-editor-C-CpWFZK.js +0 -1
  423. package/dist/client/assets/frame-navigation-D8_V5RRD.js +0 -1
  424. package/dist/client/assets/general-BE0UcGjs.js +0 -1
  425. package/dist/client/assets/index-CSWApQsd.js +0 -1
  426. package/dist/client/assets/library-Cm-EdAie.js +0 -1
  427. package/dist/client/assets/plan-GPTbEKWs.js +0 -1
  428. package/dist/client/assets/preview-tab-BJ7YObm7.js +0 -557
  429. package/dist/client/assets/project-app-view-GJSXmvbw.js +0 -1
  430. package/dist/client/assets/project-reports-DfWgrWSj.js +0 -1
  431. package/dist/client/assets/project-tasks-0_wJgrFD.js +0 -1
  432. package/dist/client/assets/record-editor-rzzFNWcY.js +0 -1
  433. package/dist/client/assets/reports-_FWhqgvH.js +0 -1
  434. package/dist/client/assets/repositories-DSUnBVL5.js +0 -1
  435. package/dist/client/assets/require-capability-BUCZmhwC.js +0 -1
  436. package/dist/client/assets/route-BaC97KyM.js +0 -1
  437. package/dist/client/assets/route-D25kyNEn.js +0 -1
  438. package/dist/client/assets/section-array-field-Bdq2X9R9.js +0 -1
  439. package/dist/client/assets/settings-tab-Dfi1zcxG.js +0 -1
  440. package/dist/client/assets/site-editor-DQxOUNwE.js +0 -1
  441. package/dist/client/assets/tasks-BoHqcXpT.js +0 -1
  442. package/dist/client/assets/use-ai-providers-CfgoSOxz.js +0 -1
  443. package/dist/client/assets/use-ask-in-chat-BGjd1yaA.js +0 -1
  444. package/dist/client/assets/use-blocks-v8-project-CLTk3H1q.js +0 -1
  445. package/dist/client/assets/use-blog-view-imlI-wE_.js +0 -1
  446. package/dist/client/assets/use-deco-credits-BL2vimtb.js +0 -1
  447. package/dist/client/assets/use-delete-connection-DsP1pjJu.js +0 -1
  448. package/dist/client/assets/use-org-notice-vqcHuCJv.js +0 -1
  449. package/dist/client/assets/useInfiniteQuery-zsDGm_L7.js +0 -1
  450. package/dist/client/assets/useSuspenseInfiniteQuery-DV9_oC3-.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as h,j as u,o as C,b as M,r as A,B as S,a as p,t as f,M as $,i as _,K as z,cM as D,au as E,aw as I,d as G}from"./index-CaT4JsCE.js";import{s as q}from"./XClose-kwcMavwj.js";import{S as F}from"./thread-intent-yju7EkUf.js";const K={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function oe(e){return`[data-tour="${K[e]}"]`}function Y(e){return e!=="off"}function ie(e){if(!e.hasSource)return[];const t=["site-editor"];return Y(e.cmsMode)&&t.push("content"),e.runtime==="sandbox"&&t.push("code"),t}function X(e){return e==="site-editor"||e==="content"||e==="code"||e.startsWith("code:")}function ae(e){return e.reportsOnly&&!e.onReportAgent&&X(e.tabId)}const B={xs:"xs",sm:"xs",lg:"md"};function U(e){const t=h.c(4),{org:n,size:o}=e,s=o===void 0?"sm":o,r=n.logo??void 0,i=B[s];let a;return t[0]!==n.name||t[1]!==r||t[2]!==i?(a=u.jsx(C,{url:r,fallback:n.name,size:i,tone:"solid"}),t[0]=n.name,t[1]=r,t[2]=i,t[3]=a):a=t[3],a}function ce({invitation:e,onChanged:t}){const n=M(),[o,s]=A.useState(!1),r=e.organizationName??n("header.orgSwitcher.unknownOrganization"),i=async()=>{s(!0);try{const d=await p.organization.acceptInvitation({invitationId:e.id});if(d.error){f.error(d.error.message),s(!1);return}}catch{f.error(n("header.orgSwitcher.failedToAcceptInvitation")),s(!1);return}f.success(n("header.orgSwitcher.joined",{name:r})),$();let c;try{c=(await p.organization.getFullOrganization({query:{organizationId:e.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{s(!0);try{const c=await p.organization.rejectInvitation({invitationId:e.id});if(c.error){f.error(c.error.message),s(!1);return}f.success(n("header.orgSwitcher.invitationDeclined")),s(!1),t()}catch{f.error(n("header.orgSwitcher.failedToDeclineInvitation")),s(!1)}};return u.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[u.jsx(U,{org:{name:r},size:"sm"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate text-sm font-medium",children:r}),u.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n("header.orgSwitcher.invitedToJoin")})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[u.jsx(S,{size:"sm",variant:"default",onClick:i,disabled:o,children:n("header.orgSwitcher.accept")}),u.jsx(S,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":n("header.orgSwitcher.declineInvitationTo",{name:r}),children:u.jsx(q,{size:14})})]})]})}function H(e){return typeof e=="object"&&e!==null&&Array.isArray(e.items)}function de(e){const t=h.c(13),n=e.trim(),{data:o}=p.useSession(),s=o?.user?.id??"",r=n.length>0&&!!s,i=z.organizationSearch(s,n);let a;t[0]!==n?(a=async P=>{const{signal:L}=P,w=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(n)}`,{signal:L});if(!w.ok)throw new Error(`Organization search failed: ${w.status}`);const R=await w.json();if(!H(R))throw new Error("Invalid organization search response");return R},t[0]=n,t[1]=a):a=t[1];let c;t[2]!==r||t[3]!==i||t[4]!==a?(c={queryKey:i,queryFn:a,enabled:r,placeholderData:D,staleTime:3e4,retry:!1},t[2]=r,t[3]=i,t[4]=a,t[5]=c):c=t[5];const{data:d,isFetching:k,isPlaceholderData:N,isError:O}=_(c);let l;t[6]!==d?.items?(l=d?.items??[],t[6]=d?.items,t[7]=l):l=t[7];const b=r&&k,x=r&&N;let y;return t[8]!==O||t[9]!==l||t[10]!==b||t[11]!==x?(y={hits:l,isSearching:b,isStale:x,isError:O},t[8]=O,t[9]=l,t[10]=b,t[11]=x,t[12]=y):y=t[12],y}const J=3,T=10,Q=440,V=55;function ue(e){const t=Math.floor((e-Q)/V);return Math.min(T,Math.max(J,t))}function W(e,t,n=T*3,o=[]){return[...new Set([t,...o,...e])].slice(0,n)}function le(e,t){return!t.id||e.some(n=>n.slug===t.slug)?[...e]:[...e,t]}function fe(e,t,n,o,s=[]){if(e.length<=o)return{shown:[...e],hidden:[]};const r=new Map(e.map(a=>[a.slug,a])),i=new Set;n&&r.has(n)&&i.add(n);for(const a of s)r.has(a)&&i.add(a);for(const a of t){if(i.size>=o)break;r.has(a)&&i.add(a)}for(const a of e){if(i.size>=o)break;i.add(a.slug)}return{shown:e.filter(a=>i.has(a.slug)),hidden:e.filter(a=>!i.has(a.slug))}}const v=[];function Z(){const e=h.c(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=I.recentOrgs(),e[0]=t):t=e[0];const[n,o]=E(t,v),s=Array.isArray(n)?n:v;let r;e[1]!==o?(r=(a,c)=>o(d=>W(Array.isArray(d)?d:[],a,void 0,c)),e[1]=o,e[2]=r):r=e[2];let i;return e[3]!==s||e[4]!==r?(i={recent:s,remember:r},e[3]=s,e[4]=r,e[5]=i):i=e[5],i}const j={hidden:[],pinned:[],order:[]},g=(e,t)=>e.filter(n=>n!==t);function ee(e){if(typeof e!="object"||e===null)return j;const t=o=>Array.isArray(o)?o.filter(s=>typeof s=="string"):[],n=e;return{hidden:t(n.hidden),pinned:t(n.pinned),order:t(n.order)}}function he(e,t){return{...e,hidden:[...g(e.hidden,t),t],pinned:g(e.pinned,t)}}function te(e,t){return{...e,hidden:g(e.hidden,t)}}function me(e,t){return e.pinned.includes(t)?{...e,pinned:g(e.pinned,t)}:{...e,hidden:g(e.hidden,t),pinned:[...e.pinned,t]}}function ge(e,t,n){const o=s=>{const r=t.order.indexOf(s);return r===-1?Number.MAX_SAFE_INTEGER:r};return e.filter(s=>s.slug===n||!t.hidden.includes(s.slug)).map((s,r)=>({org:s,index:r})).sort((s,r)=>Number(t.pinned.includes(r.org.slug))-Number(t.pinned.includes(s.org.slug))||o(s.org.slug)-o(r.org.slug)||s.index-r.index).map(({org:s})=>s)}function ye(e,t,n,o){const s=t.indexOf(n),r=t.indexOf(o);if(s===-1||r===-1||s===r||e.pinned.includes(n)!==e.pinned.includes(o))return e;const i=[...t];return i.splice(s,1),i.splice(r,0,n),{...e,order:[...i,...e.order.filter(a=>!i.includes(a))]}}function pe(){const e=h.c(5),t=G(),{remember:n}=Z();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=I.railOrgPrefs(),e[0]=o):o=e[0];const[,s]=E(o,j);let r;return e[1]!==t||e[2]!==n||e[3]!==s?(r=(i,a)=>{const c=a?.includes(i)??!1;s(d=>te(ee(d),i)),n(i,c?a:void 0),t({to:"/$org/home",params:{org:i},search:{thread:void 0},viewTransition:!0})},e[1]=t,e[2]=n,e[3]=s,e[4]=r):r=e[4],r}const m=new F(!1);function Oe(){m.set(!0)}function be(){m.set(!1)}function xe(){const e=h.c(2),t=A.useSyncExternalStore(m.subscribe,m.get);let n;return e[0]!==t?(n=[t,m.set],e[0]=t,e[1]=n):n=e[1],n}function we(e){const t=h.c(8);let n;t[0]!==e?(n=z.orgNotice(e??""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==e?(o=async()=>{const i=await fetch(`/api/${e}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},t[2]=e,t[3]=o):o=t[3];const s=!!e;let r;return t[4]!==n||t[5]!==o||t[6]!==s?(r={queryKey:n,queryFn:o,enabled:s,staleTime:6e4},t[4]=n,t[5]=o,t[6]=s,t[7]=r):r=t[7],_(r)}export{j as E,ce as I,K as L,U as O,de as a,Z as b,pe as c,fe as d,ge as e,ue as f,Y as g,he as h,X as i,xe as j,be as k,oe as l,ye as m,ie as n,Oe as o,ee as r,ae as s,me as t,we as u,le as w};
@@ -1 +1 @@
1
- import{c as r,a6 as f,am as y,K as S,i as _,q as d,e as R}from"./index-C1ub_U1Q.js";const m=5e3;function p(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return p(e.state.data)?m:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
1
+ import{c as r,a6 as f,an as y,K as S,i as _,q as d,e as R}from"./index-CaT4JsCE.js";const p=5e3;function m(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return m(e.state.data)?p:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
@@ -1 +1 @@
1
- import{c as u,i as S,q as r,e as y,K as c}from"./index-C1ub_U1Q.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
1
+ import{c as u,i as S,q as r,e as y,K as c}from"./index-CaT4JsCE.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
@@ -1 +1 @@
1
- import{c as u,a as x,dW as A,a6 as _,i as P,an as $,K as g,am as S,q as y,e as p}from"./index-C1ub_U1Q.js";import{D as I,o as N,a as w}from"./schema-CL6RLkNE.js";import{r as M}from"./task-board-2M4kKpcl.js";const C={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},G={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function R(t,e){return{queryKey:g.organizationSettings(e),queryFn:async()=>{try{return await $(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...C,organizationId:e}}},staleTime:6e4}}function d(t){const e=u.c(7),{org:n}=_();let s;e[0]!==n.id||e[1]!==n.slug?(s=R(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],P(i)}function E(){const t=u.c(9),{org:e}=_(),n=S(),s=y();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(g.organizationSettings(e.id),r=>({...r??C,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],p(i)}function z(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:G}function K(){const{data:t}=d(D);return t??G}function D(t){return z(t.simple_mode)}function V(){const t=u.c(7),e=E();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function Y(){return m("reports_only")}function m(t){const e=u.c(5);let n;e[0]!==t?(n=a=>N(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=d(n);let o;return e[2]!==s||e[3]!==t?(o=s??I.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function J(t){const e=u.c(6);let n;e[0]!==t?(n=i=>N(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=d(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?I.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function W(){const t=m("chat_harness_sandbox_only");return A().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=_(),n=S(),s=y();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(g.organizationSettings(e.id),c=>c&&{...c,flags:{...c.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],p(i)}function X(){const{data:t}=d(L);return t??null}function L(t){return t.plan_objective??null}function tt(){const t=u.c(8),{org:e}=_(),n=S(),s=y();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_PLAN_OBJECTIVE_SET",l),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{plan_objective:r}=l;s.setQueryData(g.organizationSettings(e.id),c=>c&&{...c,plan_objective:r})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],p(i)}function et(){const t=u.c(2),e=S();let n;return t[0]!==e?(n={mutationFn:()=>e.call("ORGANIZATION_PLAN_OBJECTIVE_FIND",{})},t[0]=e,t[1]=n):n=t[1],p(n)}function j(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function nt(){const t=u.c(8),{data:e}=x.useSession(),n=A();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||j(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=m("hosting_enabled"),r=m("e2e_enabled"),c=m("monitor_enabled"),F=m("experiments_enabled"),O=o||a||l,b=o||a||r,T=o||i||c,h=o||a||F;let f;return t[3]!==O||t[4]!==b||t[5]!==T||t[6]!==h?(f={hosting:O,e2e:b,monitor:T,experiments:h},t[3]=O,t[4]=b,t[5]=T,t[6]=h,t[7]=f):f=t[7],f}function st(){const{data:t}=d(q);return t??!1}function q(t){return w(t.flags)}function ot(){const{data:t}=d(v);return t??!0}function v(t){return M(t.flags)}function at(){const t=u.c(7),e=E();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function it(){const t=u.c(2),{data:e}=d(k);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function k(t){return t.coding_agent_mcp_excluded}function lt(){const t=u.c(5),e=E();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ut(){const t=u.c(2),{data:e}=d(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.submodule_credentials}function rt(){const t=u.c(5),e=E();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{Y as a,W as b,J as c,K as d,nt as e,ot as f,X as g,tt as h,et as i,H as j,st as k,at as l,it as m,lt as n,V as o,ut as p,rt as q,m as u};
1
+ import{c as u,a as x,dZ as A,a6 as _,i as P,ao as $,K as g,an as S,q as y,e as p}from"./index-CaT4JsCE.js";import{D as I,o as N,a as w}from"./schema-Am-4674Q.js";import{r as M}from"./task-board-D4sEZC2J.js";const C={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},G={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function R(t,e){return{queryKey:g.organizationSettings(e),queryFn:async()=>{try{return await $(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...C,organizationId:e}}},staleTime:6e4}}function d(t){const e=u.c(7),{org:n}=_();let s;e[0]!==n.id||e[1]!==n.slug?(s=R(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],P(i)}function E(){const t=u.c(9),{org:e}=_(),n=S(),s=y();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(g.organizationSettings(e.id),r=>({...r??C,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],p(i)}function z(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:G}function K(){const{data:t}=d(D);return t??G}function D(t){return z(t.simple_mode)}function V(){const t=u.c(7),e=E();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function Y(){return m("reports_only")}function m(t){const e=u.c(5);let n;e[0]!==t?(n=a=>N(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=d(n);let o;return e[2]!==s||e[3]!==t?(o=s??I.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function J(t){const e=u.c(6);let n;e[0]!==t?(n=i=>N(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=d(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?I.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function W(){const t=m("chat_harness_sandbox_only");return A().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=_(),n=S(),s=y();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(g.organizationSettings(e.id),c=>c&&{...c,flags:{...c.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],p(i)}function X(){const{data:t}=d(L);return t??null}function L(t){return t.plan_objective??null}function tt(){const t=u.c(8),{org:e}=_(),n=S(),s=y();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_PLAN_OBJECTIVE_SET",l),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{plan_objective:r}=l;s.setQueryData(g.organizationSettings(e.id),c=>c&&{...c,plan_objective:r})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],p(i)}function et(){const t=u.c(2),e=S();let n;return t[0]!==e?(n={mutationFn:()=>e.call("ORGANIZATION_PLAN_OBJECTIVE_FIND",{})},t[0]=e,t[1]=n):n=t[1],p(n)}function j(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function nt(){const t=u.c(8),{data:e}=x.useSession(),n=A();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||j(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=m("hosting_enabled"),r=m("e2e_enabled"),c=m("monitor_enabled"),F=m("experiments_enabled"),O=o||a||l,b=o||a||r,T=o||i||c,h=o||a||F;let f;return t[3]!==O||t[4]!==b||t[5]!==T||t[6]!==h?(f={hosting:O,e2e:b,monitor:T,experiments:h},t[3]=O,t[4]=b,t[5]=T,t[6]=h,t[7]=f):f=t[7],f}function st(){const{data:t}=d(q);return t??!1}function q(t){return w(t.flags)}function ot(){const{data:t}=d(v);return t??!0}function v(t){return M(t.flags)}function at(){const t=u.c(7),e=E();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function it(){const t=u.c(2),{data:e}=d(Z);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Z(t){return t.coding_agent_mcp_excluded}function lt(){const t=u.c(5),e=E();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ut(){const t=u.c(2),{data:e}=d(k);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function k(t){return t.submodule_credentials}function rt(){const t=u.c(5),e=E();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{Y as a,W as b,J as c,K as d,nt as e,ot as f,X as g,tt as h,et as i,H as j,st as k,at as l,it as m,lt as n,V as o,ut as p,rt as q,m as u};
@@ -1 +1 @@
1
- import{c as p,f as g,u as S,dJ as _,d as k,l as b,cK as P,dK as E}from"./index-C1ub_U1Q.js";import{c as I}from"./thread-route-DCVbYT2J.js";import{u as R}from"./use-project-scope-CCzY-N2k.js";function x(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function K(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:T},e[0]=t):t=e[0],b(t)}function T(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function $(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=K();return _({mainView:r,siteEditorView:n,params:a,search:s})}function A(){const e=p.c(11),t=k();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=R(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(d,c)=>{const h=P(d),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>x({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:d,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=d=>t({to:".",search:j,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let u;return e[8]!==f||e[9]!==m?(u={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=u):u=e[10],u}function j(e){return{...e,mainpanel:!1,sidepanel:!0}}export{A as a,x as r,$ as u};
1
+ import{c as p,f as g,u as S,dM as _,d as k,l as b,cN as P,dN as E}from"./index-CaT4JsCE.js";import{c as I}from"./thread-route-BX6inU_N.js";import{u as N}from"./use-project-scope-DD2NBlJU.js";function R(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function x(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:M},e[0]=t):t=e[0],b(t)}function M(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function A(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=x();return _({mainView:r,siteEditorView:n,params:a,search:s})}function D(){const e=p.c(11),t=k();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=N(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(d,c)=>{const h=P(d),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>R({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:d,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=d=>t({to:".",search:T,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let u;return e[8]!==f||e[9]!==m?(u={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=u):u=e[10],u}function T(e){return{...e,mainpanel:!1,sidepanel:!0}}export{D as a,R as r,A as u};
@@ -1 +1 @@
1
- import{c as O,a6 as C,dW as y,bu as B,i as N,K as F}from"./index-C1ub_U1Q.js";import{m as J}from"./match-site-slug-config-B47_xZCi.js";import{u as K}from"./use-file-configs-BdTBWYMl.js";import{a as U}from"./use-blog-view-imlI-wE_.js";import{e as $}from"./use-organization-settings-BUtsdGXi.js";import{b as k}from"./use-blocks-v8-project-CLTk3H1q.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],q=["overview","reports","board","site-editor","blog"],T=1,D=["overview","context","monitor","plan","board"],L=["blog"],Q=["calendar","experiments"],H=["hosting"],Y={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function W(t){return[...D,...t.calendar?Q:[],...t.hosting&&t["site-editor"]?H:[],...t.blog?L:[]]}function z(t,e){const n=new Set(t??[]);return W(e).filter(s=>!n.has(s))}function le(t,e,n){const s=new Set([...t??[],...W({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function fe(t,e){if(!t&&e===void 0)return new Set(D);const n=new Set(e!==void 0?V(e,T):V(X(t),t?.sidebarViewsVersion,z(t?.sidebarViewsSeen,Y)));return new Set(D.filter(s=>n.has(s)))}const G=["calendar","experiments","assets","releases","hosting","e2e"];function ue(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function X(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function V(t,e,n=[]){const s=new Set(t??[]);if(e!==T)for(const r of q)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function Z(t){return u.some(e=>e===t)}function M(t){return G.some(e=>e===t)}function ee(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function de(t,e,n){const s=ee(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function Se(t,e,n,s=[]){const r=new Set(V(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function be(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ge(t){return u.filter(e=>t[e])}function te(t,e,n){return!Z(t)||e[t]?!1:t==="blog"?n.blog!==!0:!M(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return te(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function we(t,e,n,s){const r=new Set(V(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function Pe(t){const e=O.c(22),{org:n}=C(),s=y(),r=$(),o=U(),i=K();let c;e[0]!==t?(c=k(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,R=w&&!!a,j=se(n.slug,a,R),v=j.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];const P=t?.metadata?.assetStorageConfigId;let b;e[6]!==a||e[7]!==l||e[8]!==P?(b=J(l,a,P),e[6]=a,e[7]=l,e[8]=P,e[9]=b):b=e[9];const E=!!b,m=d&&!!t?.metadata?.siteSlug,_=w&&v&&r.hosting,p=w&&v&&r.e2e,I=o===!0;let f;e[10]!==E||e[11]!==m||e[12]!==_||e[13]!==p||e[14]!==I||e[15]!==d?(f={assets:E,releases:m,hosting:_,e2e:p,calendar:d,experiments:d,blog:I},e[10]=E,e[11]=m,e[12]=_,e[13]=p,e[14]=I,e[15]=d,e[16]=f):f=e[16];const A=!!(a||t?.metadata?.assetStorageConfigId)&&i.isPending,h=R&&j.isPending,x=o===void 0;let g;return e[17]!==f||e[18]!==A||e[19]!==h||e[20]!==x?(g={presence:f,assetsPending:A,siteAccessPending:h,blogPending:x},e[17]=f,e[18]=A,e[19]=h,e[20]=x,e[21]=g):g=e[21],g}function se(t,e,n){const s=O.c(10);let r;s[0]!==t||s[1]!==e?(r=F.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],N(i)}export{u as P,Se as a,T as b,ue as c,de as d,Ve as e,te as f,V as g,ge as h,M as i,D as j,le as k,be as l,z as o,ee as p,X as r,fe as s,we as t,Pe as u};
1
+ import{c as O,a6 as W,dZ as y,bx as B,i as N,K as F}from"./index-CaT4JsCE.js";import{m as J}from"./match-site-slug-config-B47_xZCi.js";import{u as K}from"./use-file-configs-BfS0tPOy.js";import{a as U}from"./use-blog-view-BpUj7Xe1.js";import{e as $}from"./use-organization-settings-DsOm4fQ2.js";import{b as k}from"./use-blocks-v8-project-BIWQ4f6h.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],q=["overview","reports","board","site-editor","blog"],T=1,D=["overview","context","monitor","plan","board"],L=["blog"],Q=["calendar","experiments"],H=["hosting"],Y={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function C(t){return[...D,...t.calendar?Q:[],...t.hosting&&t["site-editor"]?H:[],...t.blog?L:[]]}function Z(t,e){const n=new Set(t??[]);return C(e).filter(s=>!n.has(s))}function le(t,e,n){const s=new Set([...t??[],...C({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function fe(t,e){if(!t&&e===void 0)return new Set(D);const n=new Set(e!==void 0?V(e,T):V(G(t),t?.sidebarViewsVersion,Z(t?.sidebarViewsSeen,Y)));return new Set(D.filter(s=>n.has(s)))}const z=["calendar","experiments","assets","releases","hosting","e2e"];function ue(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function G(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function V(t,e,n=[]){const s=new Set(t??[]);if(e!==T)for(const r of q)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function X(t){return u.some(e=>e===t)}function M(t){return z.some(e=>e===t)}function ee(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function de(t,e,n){const s=ee(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function Se(t,e,n,s=[]){const r=new Set(V(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function be(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ge(t){return u.filter(e=>t[e])}function te(t,e,n){return!X(t)||e[t]?!1:t==="blog"?n.blog!==!0:!M(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return te(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function we(t,e,n,s){const r=new Set(V(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function Pe(t){const e=O.c(22),{org:n}=W(),s=y(),r=$(),o=U(),i=K();let c;e[0]!==t?(c=k(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,R=w&&!!a,j=se(n.slug,a,R),v=j.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];const P=t?.metadata?.assetStorageConfigId;let b;e[6]!==a||e[7]!==l||e[8]!==P?(b=J(l,a,P),e[6]=a,e[7]=l,e[8]=P,e[9]=b):b=e[9];const E=!!b,m=d&&!!t?.metadata?.siteSlug,_=w&&v&&r.hosting,p=w&&v&&r.e2e,I=o===!0;let f;e[10]!==E||e[11]!==m||e[12]!==_||e[13]!==p||e[14]!==I||e[15]!==d?(f={assets:E,releases:m,hosting:_,e2e:p,calendar:d,experiments:d,blog:I},e[10]=E,e[11]=m,e[12]=_,e[13]=p,e[14]=I,e[15]=d,e[16]=f):f=e[16];const A=!!(a||t?.metadata?.assetStorageConfigId)&&i.isPending,x=R&&j.isPending,h=o===void 0;let g;return e[17]!==f||e[18]!==A||e[19]!==x||e[20]!==h?(g={presence:f,assetsPending:A,siteAccessPending:x,blogPending:h},e[17]=f,e[18]=A,e[19]=x,e[20]=h,e[21]=g):g=e[21],g}function se(t,e,n){const s=O.c(10);let r;s[0]!==t||s[1]!==e?(r=F.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],N(i)}export{u as P,Se as a,T as b,ue as c,de as d,Ve as e,te as f,V as g,ge as h,M as i,D as j,le as k,be as l,Z as o,ee as p,G as r,fe as s,we as t,Pe as u};
@@ -1 +1 @@
1
- import{c as I,f as P,u as T,d as N,cL as R,dL as E,dK as k,ag as l}from"./index-C1ub_U1Q.js";import{d as C,a as O,p as w}from"./repository-binding-DsR2HngX.js";const x=1;function b(e){return(e??[]).filter(E)}function L(){const e=I.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=T(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function B(){const e=I.c(16),o=N();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=R(),a=C(),c=b(a),s=L(),y=c.find(i=>i.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(i=>i.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const _=O(p),u=y??b(_?[_]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=i=>{if(i===s&&t!==void 0)return;const h=n.org??"",S=M;if(i){k(o,{org:h,agentId:i,tabId:t==="board"||t==="reports"?t:"overview",search:S,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:S});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:S})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=c.length>=x;let d;return e[9]!==u||e[10]!==c||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:c,hasProjects:g,setScope:f},e[9]=u,e[10]=c,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function M(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{B as a,b as s,L as u};
1
+ import{c as I,f as P,u as N,d as T,cO as O,dO as R,dN as E,ag as l}from"./index-CaT4JsCE.js";import{d as k,a as C,p as w}from"./repository-binding-BVqJcY39.js";const x=1;function b(e){return(e??[]).filter(R)}function M(){const e=I.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=N(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function D(){const e=I.c(16),o=T();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=O(),a=k(),c=b(a),s=M(),y=c.find(i=>i.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(i=>i.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const _=C(p),u=y??b(_?[_]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=i=>{if(i===s&&t!==void 0)return;const h=n.org??"",S=V;if(i){E(o,{org:h,agentId:i,tabId:t==="board"||t==="reports"?t:"overview",search:S,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:S});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:S})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=c.length>=x;let d;return e[9]!==u||e[10]!==c||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:c,hasProjects:g,setScope:f},e[9]=u,e[10]=c,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function V(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{D as a,b as s,M as u};
@@ -1 +1 @@
1
- import{r as A,c as m,l as j,at as y,av as b,ai as N}from"./index-C1ub_U1Q.js";import{u as w}from"./use-blog-view-imlI-wE_.js";import{P as E}from"./project-apps-a5epEY_s.js";import{a as P}from"./repository-binding-DsR2HngX.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function O(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:i,siteEditorView:p,local:r}=c.staticData;if(!i)return null;const o=c.params,a=o?.agentId;if(a&&i==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":i;return e(s)?a?{app:s,projectId:a}:r?{app:s,projectId:null}:null:null}const d=[];function S(n){const e=m.c(12);let t;e[0]!==n?(t=b.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,i]=y(t,d),p=w(),r=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==r?(o=p?r:r.filter(T),e[2]=p,e[3]=r,e[4]=o):o=e[4];let a,s;e[5]!==i?(a=f=>i(u=>h(Array.isArray(u)?u:[],f)),s=f=>i(u=>_(Array.isArray(u)?u:[],f)),e[5]=i,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function T(n){return n.app!=="blog"}function g(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return O(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=S(n),t=g(),c=P(t?.projectId),i=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,r=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!i||e({app:t.app,projectId:t.projectId,projectTitle:i,...r&&{connection:r}})},[n,t?.app,t?.projectId,i,r?.label,r?.icon])}export{g as a,S as b,D as k,R as p,Y as u};
1
+ import{r as A,c as m,l as j,au as y,aw as b,aj as N}from"./index-CaT4JsCE.js";import{u as w}from"./use-blog-view-BpUj7Xe1.js";import{P as E}from"./project-apps-DVjGbegU.js";import{a as P}from"./repository-binding-BVqJcY39.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function O(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:i,siteEditorView:p,local:r}=c.staticData;if(!i)return null;const o=c.params,a=o?.agentId;if(a&&i==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":i;return e(s)?a?{app:s,projectId:a}:r?{app:s,projectId:null}:null:null}const d=[];function S(n){const e=m.c(12);let t;e[0]!==n?(t=b.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,i]=y(t,d),p=w(),r=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==r?(o=p?r:r.filter(T),e[2]=p,e[3]=r,e[4]=o):o=e[4];let a,s;e[5]!==i?(a=f=>i(u=>h(Array.isArray(u)?u:[],f)),s=f=>i(u=>_(Array.isArray(u)?u:[],f)),e[5]=i,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function T(n){return n.app!=="blog"}function g(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return O(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=S(n),t=g(),c=P(t?.projectId),i=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,r=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!i||e({app:t.app,projectId:t.projectId,projectTitle:i,...r&&{connection:r}})},[n,t?.app,t?.projectId,i,r?.label,r?.icon])}export{g as a,S as b,D as k,R as p,Y as u};
@@ -1 +1 @@
1
- import{c as N,a6 as Q,W as F,T as A,i as f,K as R,h1 as L,$ as K,U}from"./index-C1ub_U1Q.js";import{m as O}from"./use-mcp-client-qxB46vkc.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const _=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(_)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const _=await s.callTool({name:L,arguments:{}});return h(_).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,I=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==I?(a=M({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=I,n[13]=a):a=n[13];const S=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const T=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==T||n[20]!==P||n[21]!==a||n[22]!==S?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:S,host:c,connectionId:t,cdClient:T},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=T,n[20]=P,n[21]=a,n[22]=S,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
1
+ import{c as N,a6 as Q,W as F,T as A,i as f,K as R,h4 as L,$ as K,U}from"./index-CaT4JsCE.js";import{m as O}from"./use-mcp-client-CTvio_L5.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const _=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(_)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const _=await s.callTool({name:L,arguments:{}});return h(_).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,I=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==I?(a=M({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=I,n[13]=a):a=n[13];const S=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const T=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==T||n[20]!==P||n[21]!==a||n[22]!==S?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:S,host:c,connectionId:t,cdClient:T},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=T,n[20]=P,n[21]=a,n[22]=S,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
@@ -1,2 +1,2 @@
1
- import{r as a,c as he,j as G,a6 as Ee,q as ve,K as C,cI as J}from"./index-C1ub_U1Q.js";import{h as pe,u as me}from"./chat-context-DaK1Yrzk.js";import{b as Se}from"./sandbox-url-D3mC8qhT.js";import{b as ge}from"./repository-binding-DsR2HngX.js";import{e as ye}from"./backoff-CrEUbyZT.js";function W(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const be={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Z=a.createContext(be),z=16384;class De{data="";append(e){this.data+=e,this.data.length>z&&(this.data=this.data.slice(this.data.length-z))}get(){return this.data}clear(){this.data=""}}const ke=1e3,Re=3e4,Te=3e3,I=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],X="log";function xe(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ce(t){return t===404}function Le(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function _e(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),Ce(e.status)}catch{return!1}}const ee=pe(Z);function Me(t){const e=he.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=G.jsx(we,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=G.jsx(ee.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function we(t){return ee.usePublish(Pe(t)),null}function Pe({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=Ee(),o=ve(),h=me()?.taskId??null,[ne,L]=a.useState(null),[se,_]=a.useState({phase:"idle"}),[re,w]=a.useState({state:"running"}),[ae,P]=a.useState({kind:"unknown"}),[ce,O]=a.useState(!1),[oe,N]=a.useState([]),[ue,B]=a.useState([]),[,ie]=a.useState(0),m=a.useRef(new Map),K=a.useRef(new Set),k=a.useRef(new Set),A=a.useRef(null),R=xe(i),Q=ge(t)?.metadata?.runtime?.selected==="deno",le=l=>{let d=m.current.get(l);return d||(d=new De,m.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,O(!1),N([]),B([]),m.current.clear(),!t||!e||!f)return;const l=Se({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,T=null,g=null,y=null,v=null,E=null,x=null,V=!1;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},de=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(O(!1),S=0),s.kind==="ready"&&H()}catch(s){console.warn("[vm-events] bad phase payload",s)}},$=()=>{O(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),N([]),B([]),m.current.clear()},j=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
2
- `);le(s.source).append(u);for(const r of K.current)try{r(s.source,u)}catch{}ie(r=>r+1)}catch{}},q=n=>{const s=n.type;try{const u=JSON.parse(n.data);switch(S=0,s){case"lifecycle":{const r=u;_(r.state);const b=`${c.slug}/${t}/${e}`;if(W(r.state.phase)&&!(x&&W(x))){J(o,c.id);const D=C.decofile(b);o.getQueryData(D)===void 0&&o.invalidateQueries({queryKey:D})}r.state.phase==="running"&&x!=="running"&&(J(o,c.id),o.invalidateQueries({queryKey:C.decofile(b)}),F()),x=r.state.phase;const p=r.state.phase==="running"?r.state.port:null,U=A.current;if(A.current=p,U!==null&&p!==null&&U!==p)for(const D of k.current)try{D()}catch{}return}case"status":w(u);return;case"tasks":{const r=u;V=r.active.some(p=>Le(p.command));const b=r.active.map(p=>p.logName??"").filter(Boolean);B(b);return}case"scripts":N(u.scripts);return;case"branch":{const r=u.meta;P(r);return}case"reload":for(const r of k.current)try{r()}catch{}return;case"file-changed":{const{path:r}=u,b=`${c.slug}/${t}/${e}`;if(r.startsWith(".deco/")||r.includes("/.deco/")){if(!(x==="running"))return;r.endsWith(".deco/meta.gen.json")&&F(),y&&clearTimeout(y),y=setTimeout(()=>{if(y=null,o.invalidateQueries({queryKey:C.decofile(b)}),Q||V)for(const D of k.current)try{D()}catch{}},500)}else F();return}}}catch{}};function M(){if(d)return;const n=new EventSource(l);v=n,n.onopen=()=>{},n.onerror=()=>{v===n&&n.readyState===EventSource.CLOSED&&Y("studio")},n.addEventListener("phase",de),n.addEventListener("gone",$),n.addEventListener(X,j);for(const s of I)n.addEventListener(s,q)}function H(){if(d||!R||E)return;const n=new EventSource(R);E=n;let s=!1;n.onopen=()=>{if(d||E!==n)return;s=!0,S=0;const u=v;v=null,u?.close()},n.onerror=()=>{E===n&&n.readyState===EventSource.CLOSED&&fe(n,s)},n.addEventListener(X,j);for(const u of I)n.addEventListener(u,q)}async function fe(n,s){const u=R?await _e(R):!1;if(!(d||E!==n)){if(n.close(),E=null,u){$(),v||M();return}s&&Y("direct")}}function Y(n){if(d||T)return;const s=ye(Re,ke,S,2,0);S++,T=setTimeout(()=>{if(T=null,!d){if(n==="direct"){E?.close(),E=null,H();return}v?.close(),v=null,M()}},s)}return M(),()=>{d=!0,v?.close(),E?.close(),T&&clearTimeout(T),g&&clearTimeout(g),y&&clearTimeout(y)}},[t,e,c.slug,c.id,f,h,R,o,Q]),{phase:ne,lifecycle:se,status:re,branch:ae,notFound:ce,scripts:oe,activeProcesses:ue,getBuffer:l=>m.current.get(l)?.get()??"",hasData:l=>(m.current.get(l)?.get().length??0)>0,subscribeChunks:l=>(K.current.add(l),()=>{K.current.delete(l)}),subscribeReload:l=>(k.current.add(l),()=>{k.current.delete(l)})}}function te(){return a.use(Z)}function Ue(t){const{subscribeChunks:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e((o,h)=>{i.current?.(o,h)}),[e])}function Qe(t){const{subscribeReload:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e(()=>{i.current?.()}),[e])}export{Me as S,Ue as a,Qe as b,W as i,te as u};
1
+ import{r as a,c as he,j as G,a6 as Ee,q as ve,K as C,cL as J}from"./index-CaT4JsCE.js";import{h as pe,u as me}from"./chat-context-CtXhrjSm.js";import{b as Se}from"./sandbox-url-D3mC8qhT.js";import{b as ge}from"./repository-binding-BVqJcY39.js";import{e as ye}from"./backoff-CrEUbyZT.js";function W(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const be={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Z=a.createContext(be),z=16384;class De{data="";append(e){this.data+=e,this.data.length>z&&(this.data=this.data.slice(this.data.length-z))}get(){return this.data}clear(){this.data=""}}const ke=1e3,Re=3e4,Te=3e3,X=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],I="log";function xe(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ce(t){return t===404}function Le(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function _e(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),Ce(e.status)}catch{return!1}}const ee=pe(Z);function Me(t){const e=he.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=G.jsx(we,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=G.jsx(ee.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function we(t){return ee.usePublish(Pe(t)),null}function Pe({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=Ee(),o=ve(),h=me()?.taskId??null,[ne,L]=a.useState(null),[se,_]=a.useState({phase:"idle"}),[re,w]=a.useState({state:"running"}),[ae,P]=a.useState({kind:"unknown"}),[ce,O]=a.useState(!1),[oe,N]=a.useState([]),[ue,B]=a.useState([]),[,ie]=a.useState(0),m=a.useRef(new Map),K=a.useRef(new Set),k=a.useRef(new Set),A=a.useRef(null),R=xe(i),Q=ge(t)?.metadata?.runtime?.selected==="deno",le=l=>{let d=m.current.get(l);return d||(d=new De,m.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,O(!1),N([]),B([]),m.current.clear(),!t||!e||!f)return;const l=Se({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,T=null,g=null,y=null,v=null,E=null,x=null,V=!1;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},de=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(O(!1),S=0),s.kind==="ready"&&H()}catch(s){console.warn("[vm-events] bad phase payload",s)}},$=()=>{O(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),N([]),B([]),m.current.clear()},j=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
2
+ `);le(s.source).append(u);for(const r of K.current)try{r(s.source,u)}catch{}ie(r=>r+1)}catch{}},q=n=>{const s=n.type;try{const u=JSON.parse(n.data);switch(S=0,s){case"lifecycle":{const r=u;_(r.state);const b=`${c.slug}/${t}/${e}`;if(W(r.state.phase)&&!(x&&W(x))){J(o,c.id);const D=C.decofile(b);o.getQueryData(D)===void 0&&o.invalidateQueries({queryKey:D})}r.state.phase==="running"&&x!=="running"&&(J(o,c.id),o.invalidateQueries({queryKey:C.decofile(b)}),F()),x=r.state.phase;const p=r.state.phase==="running"?r.state.port:null,U=A.current;if(A.current=p,U!==null&&p!==null&&U!==p)for(const D of k.current)try{D()}catch{}return}case"status":w(u);return;case"tasks":{const r=u;V=r.active.some(p=>Le(p.command));const b=r.active.map(p=>p.logName??"").filter(Boolean);B(b);return}case"scripts":N(u.scripts);return;case"branch":{const r=u.meta;P(r);return}case"reload":for(const r of k.current)try{r()}catch{}return;case"file-changed":{const{path:r}=u,b=`${c.slug}/${t}/${e}`;if(r.startsWith(".deco/")||r.includes("/.deco/")){if(!(x==="running"))return;r.endsWith(".deco/meta.gen.json")&&F(),y&&clearTimeout(y),y=setTimeout(()=>{if(y=null,o.invalidateQueries({queryKey:C.decofile(b)}),Q||V)for(const D of k.current)try{D()}catch{}},500)}else F();return}}}catch{}};function M(){if(d)return;const n=new EventSource(l);v=n,n.onopen=()=>{},n.onerror=()=>{v===n&&n.readyState===EventSource.CLOSED&&Y("studio")},n.addEventListener("phase",de),n.addEventListener("gone",$),n.addEventListener(I,j);for(const s of X)n.addEventListener(s,q)}function H(){if(d||!R||E)return;const n=new EventSource(R);E=n;let s=!1;n.onopen=()=>{if(d||E!==n)return;s=!0,S=0;const u=v;v=null,u?.close()},n.onerror=()=>{E===n&&n.readyState===EventSource.CLOSED&&fe(n,s)},n.addEventListener(I,j);for(const u of X)n.addEventListener(u,q)}async function fe(n,s){const u=R?await _e(R):!1;if(!(d||E!==n)){if(n.close(),E=null,u){$(),v||M();return}s&&Y("direct")}}function Y(n){if(d||T)return;const s=ye(Re,ke,S,2,0);S++,T=setTimeout(()=>{if(T=null,!d){if(n==="direct"){E?.close(),E=null,H();return}v?.close(),v=null,M()}},s)}return M(),()=>{d=!0,v?.close(),E?.close(),T&&clearTimeout(T),g&&clearTimeout(g),y&&clearTimeout(y)}},[t,e,c.slug,c.id,f,h,R,o,Q]),{phase:ne,lifecycle:se,status:re,branch:ae,notFound:ce,scripts:oe,activeProcesses:ue,getBuffer:l=>m.current.get(l)?.get()??"",hasData:l=>(m.current.get(l)?.get().length??0)>0,subscribeChunks:l=>(K.current.add(l),()=>{K.current.delete(l)}),subscribeReload:l=>(k.current.add(l),()=>{k.current.delete(l)})}}function te(){return a.use(Z)}function Ue(t){const{subscribeChunks:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e((o,h)=>{i.current?.(o,h)}),[e])}function Qe(t){const{subscribeReload:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e(()=>{i.current?.()}),[e])}export{Me as S,Ue as a,Qe as b,W as i,te as u};
@@ -1 +1 @@
1
- import{c as u,a6 as c,am as r,K as l,V as d,q as f,e as S}from"./index-C1ub_U1Q.js";function m(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function C(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{C as a,m as u};
1
+ import{c as u,a6 as c,an as r,K as l,V as d,q as f,e as S}from"./index-CaT4JsCE.js";function C(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function m(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{m as a,C as u};
@@ -1 +1 @@
1
- import{ic as ee,br as te,c as M,b as re,r as b,j as i,m as se,bq as oe,D as ie,v as le,x as ne,I as ce,w as ae}from"./index-C1ub_U1Q.js";import{b as G,f as V}from"./UserSquare-4oxgMoPf.js";import{b as fe}from"./agent-icon-pvTjuJ6E.js";import{i as ue}from"./SearchMd-B1LXZuWH.js";import{a as _}from"./save-status-sZNWYgwi.js";import{ac as de,l as me,an as ve}from"./blocks-tab-states-DCYJUQtS.js";import{aS as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-uie07d22.js";import{d as Y,r as we}from"./held-block-view-_p1jMUzm.js";import{u as Se}from"./use-voice-input-C2RbHNgC.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const n=s.allOf.find(l=>typeof l.$ref=="string")?.$ref;if(typeof n=="string"){const l=t[n.replace("#/definitions/","")];l&&o.push(l)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function ze(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,q=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return q.has(r)?!0:q.size>=Ne?!1:(q.add(r),!0)}function Q(r){q.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),n=b.useRef(null),l=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(l.current=a,n.current&&(n.current.disconnect(),n.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(l.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{l.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),n.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:n}=r,{ref:l,iframeActive:f}=Te(o,n),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==d?(a=i.jsx("div",{ref:l,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=l,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function Be(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:n,onSelect:l}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==n?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:n,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==l||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:l,className:u,children:[d,g]}),e[23]=l,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function We(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:n,previewBaseUrl:l,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==l||e[6]!==p||e[7]!==c){const z=t&&o&&n?de(o,n):[],W=o?me(o):"",H=n?ve(n):void 0,X=new Map;if(t&&W&&l)for(const v of z)X.set(v.resolveType,K(l,W,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?z.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):z;x=ie,P=t,I=s,m=le,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==c?(B=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=B):B=e[20];let k;e[21]!==B?(k=i.jsx(ne,{children:B}),e[21]=B,e[22]=k):k=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==k||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[k,L]}),e[30]=k,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(Be,{entry:v,scrollRootRef:w,previewUrl:l?X.get(v.resolveType)??K(l,W,v.previewBlock,H):null,image:l||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=n,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=l,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),n=xe(r.virtualMcpId,r.branch),l=s==="cms";if(he(n))return null;if(o)return o;let f;return e[0]!==l||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{We as A,ze as g,Z as s,Fe as u};
1
+ import{ig as ee,bu as te,c as M,b as re,r as b,j as i,m as se,bt as oe,D as ie,v as le,x as ne,I as ce,w as ae}from"./index-CaT4JsCE.js";import{b as G,f as V}from"./UserSquare-B8TnRXAA.js";import{b as fe}from"./agent-icon-CH_f-N3x.js";import{i as ue}from"./SearchMd-DgVjcl_1.js";import{a as _}from"./save-status-z4LtIZ69.js";import{ac as de,l as me,an as ve}from"./blocks-tab-states-DBpi4m7n.js";import{aS as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-BEQHRuj3.js";import{d as Y,r as we}from"./held-block-view-CQqo1UsV.js";import{u as Se}from"./use-voice-input-CFCuPvYA.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const n=s.allOf.find(l=>typeof l.$ref=="string")?.$ref;if(typeof n=="string"){const l=t[n.replace("#/definitions/","")];l&&o.push(l)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function We(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,z=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return z.has(r)?!0:z.size>=Ne?!1:(z.add(r),!0)}function Q(r){z.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),n=b.useRef(null),l=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(l.current=a,n.current&&(n.current.disconnect(),n.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(l.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{l.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),n.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:n}=r,{ref:l,iframeActive:f}=Te(o,n),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==d?(a=i.jsx("div",{ref:l,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=l,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function Be(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:n,onSelect:l}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==n?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:n,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==l||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:l,className:u,children:[d,g]}),e[23]=l,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function qe(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:n,previewBaseUrl:l,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==l||e[6]!==p||e[7]!==c){const W=t&&o&&n?de(o,n):[],q=o?me(o):"",H=n?ve(n):void 0,X=new Map;if(t&&q&&l)for(const v of W)X.set(v.resolveType,K(l,q,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?W.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):W;x=ie,P=t,I=s,m=le,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==c?(B=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=B):B=e[20];let k;e[21]!==B?(k=i.jsx(ne,{children:B}),e[21]=B,e[22]=k):k=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==k||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[k,L]}),e[30]=k,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(Be,{entry:v,scrollRootRef:w,previewUrl:l?X.get(v.resolveType)??K(l,q,v.previewBlock,H):null,image:l||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=n,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=l,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),n=xe(r.virtualMcpId,r.branch),l=s==="cms";if(he(n))return null;if(o)return o;let f;return e[0]!==l||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{qe as A,We as g,Z as s,Fe as u};
@@ -1 +1 @@
1
- import{r as T,c as y,j as o,m as C,bZ as $,b_ as z}from"./index-C1ub_U1Q.js";import{u as B}from"./use-mobile-BcxOmK-J.js";import{b as A,c as P,S as R,d as k,a as H}from"./sheet-C8us_fGJ.js";import{b as V,a as W,T as L,c as F}from"./tooltip-BOLZbpj7.js";const Z="15rem",q="18rem",G="4.5rem",E=T.createContext(null);function D(){const l=T.useContext(E);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ee(l){const e=y.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,c=s===void 0?!1:s,r=B(),[n,S]=T.useState(c),[v,j]=T.useState(!1),p=a!==void 0,m=p?a:n;let g;e[0]!==p||e[1]!==i?(g=M=>{p||S(M),i?.(M)},e[0]=p,e[1]=i,e[2]=g):g=e[2];const d=g;let h;e[3]!==r||e[4]!==m||e[5]!==d?(h=()=>{r?j(J):d(!m)},e[3]=r,e[4]=m,e[5]=d,e[6]=h):h=e[6];const w=h,f=m?"expanded":"collapsed";let u;e[7]!==r||e[8]!==m||e[9]!==v||e[10]!==d||e[11]!==f||e[12]!==w?(u={state:f,open:m,setOpen:d,isMobile:r,openMobile:v,setOpenMobile:j,toggleSidebar:w},e[7]=r,e[8]=m,e[9]=v,e[10]=d,e[11]=f,e[12]=w,e[13]=u):u=e[13];const x=u;let b;e[14]!==t?(b=o.jsx(V,{delayDuration:0,children:t}),e[14]=t,e[15]=b):b=e[15];let N;return e[16]!==x||e[17]!==b?(N=o.jsx(E.Provider,{value:x,children:b}),e[16]=x,e[17]=b,e[18]=N):N=e[18],N}function J(l){return!l}function te(l){const e=y.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let c;e[5]!==i?(c={"--sidebar-width":Z,"--sidebar-width-icon":G,...i},e[5]=i,e[6]=c):c=e[6];const r=c;let n;e[7]!==s?(n=C("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=n):n=e[8];let S;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==n?(S=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=n,e[13]=S):S=e[13],S}function ae(l){const e=y.c(36);let t,s,a,i,c;e[0]!==l?({side:i,variant:c,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=c):(t=e[1],s=e[2],a=e[3],i=e[4],c=e[5]);const r=i===void 0?"left":i,n=c===void 0?"sidebar":c,{isMobile:S,state:v,openMobile:j,setOpenMobile:p}=D();if(S){let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N={"--sidebar-width":q},e[6]=N):N=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(P,{className:"sr-only",children:[o.jsx(R,{children:"Sidebar"}),o.jsx(k,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let I;e[10]!==r||e[11]!==_?(I=o.jsxs(H,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:N,side:r,children:[M,_]}),e[10]=r,e[11]=_,e[12]=I):I=e[12];let O;return e[13]!==j||e[14]!==a||e[15]!==p||e[16]!==I?(O=o.jsx(A,{open:j,onOpenChange:p,...a,children:I}),e[13]=j,e[14]=a,e[15]=p,e[16]=I,e[17]=O):O=e[17],O}const m=v==="expanded",g=m?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let d;e[18]!==g?(d=C("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",g),e[18]=g,e[19]=d):d=e[19];const h=m?void 0:"icon",w=m?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[20]!==s||e[21]!==w?(f=C("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",w,s),e[20]=s,e[21]=w,e[22]=f):f=e[22];let u;e[23]!==t?(u=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=u):u=e[24];let x;e[25]!==a||e[26]!==f||e[27]!==u?(x=o.jsx("div",{"data-slot":"sidebar-container",className:f,...a,children:u}),e[25]=a,e[26]=f,e[27]=u,e[28]=x):x=e[28];let b;return e[29]!==r||e[30]!==v||e[31]!==d||e[32]!==h||e[33]!==x||e[34]!==n?(b=o.jsx("div",{className:d,"data-state":v,"data-collapsible":h,"data-variant":n,"data-side":r,"data-slot":"sidebar",children:x}),e[29]=r,e[30]=v,e[31]=d,e[32]=h,e[33]=x,e[34]=n,e[35]=b):b=e[35],b}function se(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ie(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function le(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ne(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function re(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const K=z("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function oe(l){const e=y.c(28);let t,s,a,i,c,r,n;e[0]!==l?({asChild:a,isActive:i,variant:c,size:r,tooltip:n,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=c,e[6]=r,e[7]=n):(t=e[1],s=e[2],a=e[3],i=e[4],c=e[5],r=e[6],n=e[7]);const S=a===void 0?!1:a,v=i===void 0?!1:i,j=c===void 0?"default":c,p=r===void 0?"default":r,m=S?$:"button",{isMobile:g}=D();let d;e[8]!==t||e[9]!==p||e[10]!==j?(d=C(K({variant:j,size:p}),t),e[8]=t,e[9]=p,e[10]=j,e[11]=d):d=e[11];let h;e[12]!==m||e[13]!==v||e[14]!==s||e[15]!==p||e[16]!==d?(h=o.jsx(m,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":p,"data-active":v,className:d,...s}),e[12]=m,e[13]=v,e[14]=s,e[15]=p,e[16]=d,e[17]=h):h=e[17];const w=h;if(!n)return w;if(typeof n=="string"){let b;e[18]!==n?(b={children:n},e[18]=n,e[19]=b):b=e[19],n=b}let f;e[20]!==w?(f=o.jsx(L,{asChild:!0,children:w}),e[20]=w,e[21]=f):f=e[21];let u;e[22]!==g||e[23]!==n?(u=o.jsx(W,{side:"right",align:"center",hidden:g,...n}),e[22]=g,e[23]=n,e[24]=u):u=e[24];let x;return e[25]!==f||e[26]!==u?(x=o.jsxs(F,{children:[f,u]}),e[25]=f,e[26]=u,e[27]=x):x=e[27],x}function de(){const{state:l,isMobile:e}=D();return l==="collapsed"&&!e}export{oe as S,ne as a,re as b,D as c,ie as d,le as e,ae as f,ee as g,te as h,se as i,de as u};
1
+ import{r as T,c as y,j as o,m as C,c0 as $,c1 as z}from"./index-CaT4JsCE.js";import{u as B}from"./use-mobile-CLhCB1ec.js";import{b as A,c as P,S as R,d as k,a as H}from"./sheet-CF7PsYXH.js";import{b as V,a as W,T as L,c as F}from"./tooltip-C-37wWLH.js";const q="15rem",G="18rem",J="4.5rem",E=T.createContext(null);function D(){const l=T.useContext(E);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ee(l){const e=y.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,c=s===void 0?!1:s,r=B(),[n,S]=T.useState(c),[v,j]=T.useState(!1),p=a!==void 0,m=p?a:n;let g;e[0]!==p||e[1]!==i?(g=M=>{p||S(M),i?.(M)},e[0]=p,e[1]=i,e[2]=g):g=e[2];const d=g;let h;e[3]!==r||e[4]!==m||e[5]!==d?(h=()=>{r?j(K):d(!m)},e[3]=r,e[4]=m,e[5]=d,e[6]=h):h=e[6];const w=h,f=m?"expanded":"collapsed";let u;e[7]!==r||e[8]!==m||e[9]!==v||e[10]!==d||e[11]!==f||e[12]!==w?(u={state:f,open:m,setOpen:d,isMobile:r,openMobile:v,setOpenMobile:j,toggleSidebar:w},e[7]=r,e[8]=m,e[9]=v,e[10]=d,e[11]=f,e[12]=w,e[13]=u):u=e[13];const x=u;let b;e[14]!==t?(b=o.jsx(V,{delayDuration:0,children:t}),e[14]=t,e[15]=b):b=e[15];let N;return e[16]!==x||e[17]!==b?(N=o.jsx(E.Provider,{value:x,children:b}),e[16]=x,e[17]=b,e[18]=N):N=e[18],N}function K(l){return!l}function te(l){const e=y.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let c;e[5]!==i?(c={"--sidebar-width":q,"--sidebar-width-icon":J,...i},e[5]=i,e[6]=c):c=e[6];const r=c;let n;e[7]!==s?(n=C("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=n):n=e[8];let S;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==n?(S=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=n,e[13]=S):S=e[13],S}function ae(l){const e=y.c(36);let t,s,a,i,c;e[0]!==l?({side:i,variant:c,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=c):(t=e[1],s=e[2],a=e[3],i=e[4],c=e[5]);const r=i===void 0?"left":i,n=c===void 0?"sidebar":c,{isMobile:S,state:v,openMobile:j,setOpenMobile:p}=D();if(S){let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N={"--sidebar-width":G},e[6]=N):N=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(P,{className:"sr-only",children:[o.jsx(R,{children:"Sidebar"}),o.jsx(k,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let I;e[8]!==t?(I=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=I):I=e[9];let _;e[10]!==r||e[11]!==I?(_=o.jsxs(H,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:N,side:r,children:[M,I]}),e[10]=r,e[11]=I,e[12]=_):_=e[12];let O;return e[13]!==j||e[14]!==a||e[15]!==p||e[16]!==_?(O=o.jsx(A,{open:j,onOpenChange:p,...a,children:_}),e[13]=j,e[14]=a,e[15]=p,e[16]=_,e[17]=O):O=e[17],O}const m=v==="expanded",g=m?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let d;e[18]!==g?(d=C("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",g),e[18]=g,e[19]=d):d=e[19];const h=m?void 0:"icon",w=m?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[20]!==s||e[21]!==w?(f=C("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",w,s),e[20]=s,e[21]=w,e[22]=f):f=e[22];let u;e[23]!==t?(u=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=u):u=e[24];let x;e[25]!==a||e[26]!==f||e[27]!==u?(x=o.jsx("div",{"data-slot":"sidebar-container",className:f,...a,children:u}),e[25]=a,e[26]=f,e[27]=u,e[28]=x):x=e[28];let b;return e[29]!==r||e[30]!==v||e[31]!==d||e[32]!==h||e[33]!==x||e[34]!==n?(b=o.jsx("div",{className:d,"data-state":v,"data-collapsible":h,"data-variant":n,"data-side":r,"data-slot":"sidebar",children:x}),e[29]=r,e[30]=v,e[31]=d,e[32]=h,e[33]=x,e[34]=n,e[35]=b):b=e[35],b}function se(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ie(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function le(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ne(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function re(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=C("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Q=z("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function oe(l){const e=y.c(28);let t,s,a,i,c,r,n;e[0]!==l?({asChild:a,isActive:i,variant:c,size:r,tooltip:n,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=c,e[6]=r,e[7]=n):(t=e[1],s=e[2],a=e[3],i=e[4],c=e[5],r=e[6],n=e[7]);const S=a===void 0?!1:a,v=i===void 0?!1:i,j=c===void 0?"default":c,p=r===void 0?"default":r,m=S?$:"button",{isMobile:g}=D();let d;e[8]!==t||e[9]!==p||e[10]!==j?(d=C(Q({variant:j,size:p}),t),e[8]=t,e[9]=p,e[10]=j,e[11]=d):d=e[11];let h;e[12]!==m||e[13]!==v||e[14]!==s||e[15]!==p||e[16]!==d?(h=o.jsx(m,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":p,"data-active":v,className:d,...s}),e[12]=m,e[13]=v,e[14]=s,e[15]=p,e[16]=d,e[17]=h):h=e[17];const w=h;if(!n)return w;if(typeof n=="string"){let b;e[18]!==n?(b={children:n},e[18]=n,e[19]=b):b=e[19],n=b}let f;e[20]!==w?(f=o.jsx(L,{asChild:!0,children:w}),e[20]=w,e[21]=f):f=e[21];let u;e[22]!==g||e[23]!==n?(u=o.jsx(W,{side:"right",align:"center",hidden:g,...n}),e[22]=g,e[23]=n,e[24]=u):u=e[24];let x;return e[25]!==f||e[26]!==u?(x=o.jsxs(F,{children:[f,u]}),e[25]=f,e[26]=u,e[27]=x):x=e[27],x}function de(){const{state:l,isMobile:e}=D();return l==="collapsed"&&!e}export{oe as S,ne as a,re as b,D as c,ie as d,le as e,ae as f,ee as g,te as h,se as i,de as u};
@@ -1 +1 @@
1
- import{c as u,a6 as f,am as y,i as m,q as g,e as T,K as l,t as E}from"./index-C1ub_U1Q.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
1
+ import{c as u,a6 as f,an as y,i as m,q as g,e as T,K as l,t as E}from"./index-CaT4JsCE.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
@@ -1 +1 @@
1
- import{c as O,f,i as S,K as _,an as R,a6 as i,am as l}from"./index-C1ub_U1Q.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let c;t[2]!==o?(c=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=c):c=t[3];let n;return t[4]!==e||t[5]!==s||t[6]!==c?(n={queryKey:e,enabled:s,queryFn:c,staleTime:3e5},t[4]=e,t[5]=s,t[6]=c,t[7]=n):n=t[7],S(n)}function y(t,o){const e=O.c(14),{locator:s}=i(),c=l();let n;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(n=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=n):n=e[6];let T;e[7]!==o||e[8]!==c||e[9]!==t?(T=()=>c.call(t,o),e[7]=o,e[8]=c,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==n||e[12]!==T?(A={queryKey:n,queryFn:T},e[11]=n,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),c=l();let n;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(n=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=n):n=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==c?(A=()=>c.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=c,e[10]=A):A=e[10];let u;return e[11]!==n||e[12]!==T||e[13]!==A?(u={queryKey:n,enabled:T,queryFn:A},e[11]=n,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
1
+ import{c as O,f,i as S,K as _,ao as R,a6 as i,an as l}from"./index-CaT4JsCE.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let c;t[2]!==o?(c=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=c):c=t[3];let n;return t[4]!==e||t[5]!==s||t[6]!==c?(n={queryKey:e,enabled:s,queryFn:c,staleTime:3e5},t[4]=e,t[5]=s,t[6]=c,t[7]=n):n=t[7],S(n)}function y(t,o){const e=O.c(14),{locator:s}=i(),c=l();let n;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(n=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=n):n=e[6];let T;e[7]!==o||e[8]!==c||e[9]!==t?(T=()=>c.call(t,o),e[7]=o,e[8]=c,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==n||e[12]!==T?(A={queryKey:n,queryFn:T},e[11]=n,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),c=l();let n;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(n=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=n):n=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==c?(A=()=>c.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=c,e[10]=A):A=e[10];let u;return e[11]!==n||e[12]!==T||e[13]!==A?(u={queryKey:n,enabled:T,queryFn:A},e[11]=n,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
@@ -1 +1 @@
1
- import{r as y,av as w,c as h,a6 as R,am as T,q as k,i as O,K as A}from"./index-C1ub_U1Q.js";import{c as B}from"./watch-sse-pool-CwLVI1nD.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function v(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function L(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(v(r)))}catch{}}const b=6e4,K=2e3,N=e=>e.state===null;function j(e){const t=h.c(25),{org:s,locator:r}=R(),o=T(),l=k();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return L(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:b}export{j as u};
1
+ import{r as y,aw as _,c as h,a6 as R,an as T,q as k,i as O,K as A}from"./index-CaT4JsCE.js";import{c as B}from"./watch-sse-pool-BU2YQMB0.js";const w=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,w,w)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(_.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function P(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(_.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function j(e){const t=h.c(25),{org:s,locator:r}=R(),o=T(),l=k();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?P(r,e)?.data??void 0:void 0,n=()=>e?P(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{j as u};
@@ -1 +1 @@
1
- import{r as R,c as $,a6 as V,am as W,i as G,q as Y,K as k,b as H,e as O,E as X,t as N}from"./index-C1ub_U1Q.js";import{a as Z}from"./task-board-2M4kKpcl.js";import{t as ee}from"./watch-sse-pool-CwLVI1nD.js";import{u as te}from"./use-decopilot-events-DXxOHVW-.js";const J=()=>0;function se(e){const{orgSlug:u,enabled:o=!0,onUpdate:t,onDelete:s,onResync:a}=e,c=R.useRef(t);c.current=t;const i=R.useRef(s);i.current=s;const g=R.useRef(a);g.current=a;const r=R.useRef(null),m=R.useRef(o),I=R.useRef(u);(!r.current||m.current!==o||I.current!==u)&&(m.current=o,I.current=u,r.current=l=>{if(!o||!u)return()=>{};const d=T=>{let f;try{f=JSON.parse(T.data)}catch{return}f.data&&(T.type===Z?i.current?.(f.data.id):c.current(f.data)),l()};return ee.subscribe(u,d,()=>g.current?.())}),R.useSyncExternalStore(r.current,J,J)}function ae(e,u){return{queryKey:k.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:o,demoFrozenItemIds:t}=await u.call("TASK_BOARD_ITEM_LIST",{});return{items:o,demoFrozenItemIds:t}}}}function re(){const e=$.c(21),{org:u,locator:o}=V(),t=Y();let s;e[0]!==o?(s=k.taskBoardItems(o),e[0]=o,e[1]=s):s=e[1];const a=s;let c;e[2]!==o||e[3]!==t||e[4]!==a?(c=y=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,l=>l&&{...l,items:l.items.some(d=>d.id===y.id)?l.items.map(d=>d.id===y.id?y:d):[y,...l.items]}),t.invalidateQueries({queryKey:k.taskBoardActivity(o,y.id)}),t.invalidateQueries({queryKey:k.taskBoardComments(o,y.id)})},e[2]=o,e[3]=t,e[4]=a,e[5]=c):c=e[5];let i,g;e[6]!==t||e[7]!==a?(i=()=>{t.invalidateQueries({queryKey:a})},g=y=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,l=>l&&{...l,items:l.items.filter(d=>d.id!==y)})},e[6]=t,e[7]=a,e[8]=i,e[9]=g):(i=e[8],g=e[9]);let r;e[10]!==u.slug||e[11]!==c||e[12]!==i||e[13]!==g?(r={orgSlug:u.slug,onUpdate:c,onResync:i,onDelete:g},e[10]=u.slug,e[11]=c,e[12]=i,e[13]=g,e[14]=r):r=e[14],se(r);let m;e[15]!==t||e[16]!==a?(m=y=>{const l=y.subject,d=y.data.status;t.cancelQueries({queryKey:a}),t.setQueryData(a,f=>f&&{...f,items:f.items.map(S=>S.threads.some(_=>_.threadId===l)?{...S,threads:S.threads.map(_=>_.threadId===l?{..._,status:d}:_)}:S)});const T=t.getQueryData(a)?.items.some(f=>f.threads.some(S=>S.threadId===l));d==="failed"&&T&&t.invalidateQueries({queryKey:a})},e[15]=t,e[16]=a,e[17]=m):m=e[17];let I;e[18]!==u.slug||e[19]!==m?(I={orgSlug:u.slug,onTaskStatus:m},e[18]=u.slug,e[19]=m,e[20]=I):I=e[20],te(I)}function ce(){const e=$.c(13),{locator:u}=V(),o=W();let t;e[0]!==u||e[1]!==o?(t=ae(u,o),e[0]=u,e[1]=o,e[2]=t):t=e[2];const s=G(t);re();let a;e[3]!==s.data?.items?(a=s.data?.items??[],e[3]=s.data?.items,e[4]=a):a=e[4];let c;e[5]!==s.data?.demoFrozenItemIds?(c=s.data?.demoFrozenItemIds??[],e[5]=s.data?.demoFrozenItemIds,e[6]=c):c=e[6];let i;return e[7]!==s.error||e[8]!==s.isFetching||e[9]!==s.isLoading||e[10]!==a||e[11]!==c?(i={items:a,demoFrozenItemIds:c,isLoading:s.isLoading,isFetching:s.isFetching,error:s.error},e[7]=s.error,e[8]=s.isFetching,e[9]=s.isLoading,e[10]=a,e[11]=c,e[12]=i):i=e[12],i}function de(){const e=$.c(70),{org:u,locator:o}=V(),t=W(),s=Y(),a=H();let c;e[0]!==o?(c=k.taskBoardItems(o),e[0]=o,e[1]=c):c=e[1];const i=c;let g;e[2]!==s||e[3]!==i?(g=()=>s.invalidateQueries({queryKey:i}),e[2]=s,e[3]=i,e[4]=g):g=e[4];const r=g;let m;e[5]!==t?(m=n=>t.call("TASK_BOARD_ITEM_CREATE",n),e[5]=t,e[6]=m):m=e[6];let I;e[7]!==r||e[8]!==m?(I={mutationFn:m,onSuccess:r},e[7]=r,e[8]=m,e[9]=I):I=e[9];const y=O(I);let l;e[10]!==t?(l=n=>t.call("TASK_BOARD_ITEM_UPDATE",n),e[10]=t,e[11]=l):l=e[11];let d;e[12]!==s||e[13]!==i?(d=async n=>{await s.cancelQueries({queryKey:i});const B=s.getQueryData(i);return s.setQueryData(i,E=>E&&{...E,items:E.items.map(z=>z.id===n.id?{...z,...n,...n.status!==void 0&&n.status!==z.status&&{statusSince:new Date().toISOString()}}:z)}),{previous:B}},e[12]=s,e[13]=i,e[14]=d):d=e[14];let T;e[15]!==u?(T=(n,B)=>{B.status==="done"&&X("task_marked_done",{organization_id:u.id,task_board_item_id:B.id})},e[15]=u,e[16]=T):T=e[16];let f;e[17]!==s||e[18]!==i?(f=(n,B,E)=>{E?.previous&&s.setQueryData(i,E.previous)},e[17]=s,e[18]=i,e[19]=f):f=e[19];let S;e[20]!==r||e[21]!==o||e[22]!==s?(S=(n,B,E)=>{r(),s.invalidateQueries({queryKey:k.taskBoardActivity(o,E.id)})},e[20]=r,e[21]=o,e[22]=s,e[23]=S):S=e[23];let _;e[24]!==l||e[25]!==d||e[26]!==T||e[27]!==f||e[28]!==S?(_={mutationFn:l,onMutate:d,onSuccess:T,onError:f,onSettled:S},e[24]=l,e[25]=d,e[26]=T,e[27]=f,e[28]=S,e[29]=_):_=e[29];const U=O(_);let D;e[30]!==t?(D=n=>t.call("TASK_BOARD_ITEM_DELETE",{id:n}),e[30]=t,e[31]=D):D=e[31];let A;e[32]!==r||e[33]!==a?(A=n=>{N.error(n instanceof Error&&n.message?n.message:a("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=a,e[34]=A):A=e[34];let p;e[35]!==r||e[36]!==D||e[37]!==A?(p={mutationFn:D,onSuccess:r,onError:A},e[35]=r,e[36]=D,e[37]=A,e[38]=p):p=e[38];const w=O(p);let Q;e[39]!==t?(Q=async n=>{const B=await Promise.allSettled(n.map(E=>t.call("TASK_BOARD_ITEM_DELETE",{id:E})));return{total:n.length,failed:B.filter(oe).length}},e[39]=t,e[40]=Q):Q=e[40];let h,K;e[41]!==a?(h=n=>{const{total:B,failed:E}=n;E!==0&&N.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(E),total:String(B)}))},K=()=>N.error(a("taskBoard.taskBoard.deleteError")),e[41]=a,e[42]=h,e[43]=K):(h=e[42],K=e[43]);let M;e[44]!==r||e[45]!==Q||e[46]!==h||e[47]!==K?(M={mutationFn:Q,onSuccess:h,onError:K,onSettled:r},e[44]=r,e[45]=Q,e[46]=h,e[47]=K,e[48]=M):M=e[48];const x=O(M);let F;e[49]!==t?(F=n=>t.call("TASK_BOARD_ITEM_UPDATE",n),e[49]=t,e[50]=F):F=e[50];let v;e[51]!==r||e[52]!==F?(v={mutationFn:F,onSuccess:r},e[51]=r,e[52]=F,e[53]=v):v=e[53];const P=O(v);let b;e[54]!==t?(b=n=>t.call("TASK_BOARD_ITEM_RERUN",n),e[54]=t,e[55]=b):b=e[55];let q;e[56]!==r||e[57]!==o||e[58]!==s?(q=(n,B,E)=>{r(),s.invalidateQueries({queryKey:k.taskBoardActivity(o,E.id)})},e[56]=r,e[57]=o,e[58]=s,e[59]=q):q=e[59];let L;e[60]!==b||e[61]!==q?(L={mutationFn:b,onSettled:q},e[60]=b,e[61]=q,e[62]=L):L=e[62];const j=O(L);let C;return e[63]!==y||e[64]!==P||e[65]!==w||e[66]!==x||e[67]!==j||e[68]!==U?(C={create:y,update:U,remove:w,removeMany:x,link:P,rerun:j},e[63]=y,e[64]=P,e[65]=w,e[66]=x,e[67]=j,e[68]=U,e[69]=C):C=e[69],C}function oe(e){return e.status==="rejected"}export{ce as a,se as b,de as c,ae as t,re as u};
1
+ import{r as R,c as $,a6 as V,an as W,i as G,q as Y,K as k,b as H,e as O,E as X,t as N}from"./index-CaT4JsCE.js";import{a as Z}from"./task-board-D4sEZC2J.js";import{t as ee}from"./watch-sse-pool-BU2YQMB0.js";import{u as te}from"./use-decopilot-events-_641Ov59.js";const J=()=>0;function se(e){const{orgSlug:u,enabled:o=!0,onUpdate:t,onDelete:s,onResync:a}=e,c=R.useRef(t);c.current=t;const i=R.useRef(s);i.current=s;const g=R.useRef(a);g.current=a;const r=R.useRef(null),m=R.useRef(o),I=R.useRef(u);(!r.current||m.current!==o||I.current!==u)&&(m.current=o,I.current=u,r.current=l=>{if(!o||!u)return()=>{};const d=T=>{let f;try{f=JSON.parse(T.data)}catch{return}f.data&&(T.type===Z?i.current?.(f.data.id):c.current(f.data)),l()};return ee.subscribe(u,d,()=>g.current?.())}),R.useSyncExternalStore(r.current,J,J)}function ae(e,u){return{queryKey:k.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:o,demoFrozenItemIds:t}=await u.call("TASK_BOARD_ITEM_LIST",{});return{items:o,demoFrozenItemIds:t}}}}function re(){const e=$.c(21),{org:u,locator:o}=V(),t=Y();let s;e[0]!==o?(s=k.taskBoardItems(o),e[0]=o,e[1]=s):s=e[1];const a=s;let c;e[2]!==o||e[3]!==t||e[4]!==a?(c=y=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,l=>l&&{...l,items:l.items.some(d=>d.id===y.id)?l.items.map(d=>d.id===y.id?y:d):[y,...l.items]}),t.invalidateQueries({queryKey:k.taskBoardActivity(o,y.id)}),t.invalidateQueries({queryKey:k.taskBoardComments(o,y.id)})},e[2]=o,e[3]=t,e[4]=a,e[5]=c):c=e[5];let i,g;e[6]!==t||e[7]!==a?(i=()=>{t.invalidateQueries({queryKey:a})},g=y=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,l=>l&&{...l,items:l.items.filter(d=>d.id!==y)})},e[6]=t,e[7]=a,e[8]=i,e[9]=g):(i=e[8],g=e[9]);let r;e[10]!==u.slug||e[11]!==c||e[12]!==i||e[13]!==g?(r={orgSlug:u.slug,onUpdate:c,onResync:i,onDelete:g},e[10]=u.slug,e[11]=c,e[12]=i,e[13]=g,e[14]=r):r=e[14],se(r);let m;e[15]!==t||e[16]!==a?(m=y=>{const l=y.subject,d=y.data.status;t.cancelQueries({queryKey:a}),t.setQueryData(a,f=>f&&{...f,items:f.items.map(S=>S.threads.some(_=>_.threadId===l)?{...S,threads:S.threads.map(_=>_.threadId===l?{..._,status:d}:_)}:S)});const T=t.getQueryData(a)?.items.some(f=>f.threads.some(S=>S.threadId===l));d==="failed"&&T&&t.invalidateQueries({queryKey:a})},e[15]=t,e[16]=a,e[17]=m):m=e[17];let I;e[18]!==u.slug||e[19]!==m?(I={orgSlug:u.slug,onTaskStatus:m},e[18]=u.slug,e[19]=m,e[20]=I):I=e[20],te(I)}function ce(){const e=$.c(13),{locator:u}=V(),o=W();let t;e[0]!==u||e[1]!==o?(t=ae(u,o),e[0]=u,e[1]=o,e[2]=t):t=e[2];const s=G(t);re();let a;e[3]!==s.data?.items?(a=s.data?.items??[],e[3]=s.data?.items,e[4]=a):a=e[4];let c;e[5]!==s.data?.demoFrozenItemIds?(c=s.data?.demoFrozenItemIds??[],e[5]=s.data?.demoFrozenItemIds,e[6]=c):c=e[6];let i;return e[7]!==s.error||e[8]!==s.isFetching||e[9]!==s.isLoading||e[10]!==a||e[11]!==c?(i={items:a,demoFrozenItemIds:c,isLoading:s.isLoading,isFetching:s.isFetching,error:s.error},e[7]=s.error,e[8]=s.isFetching,e[9]=s.isLoading,e[10]=a,e[11]=c,e[12]=i):i=e[12],i}function de(){const e=$.c(70),{org:u,locator:o}=V(),t=W(),s=Y(),a=H();let c;e[0]!==o?(c=k.taskBoardItems(o),e[0]=o,e[1]=c):c=e[1];const i=c;let g;e[2]!==s||e[3]!==i?(g=()=>s.invalidateQueries({queryKey:i}),e[2]=s,e[3]=i,e[4]=g):g=e[4];const r=g;let m;e[5]!==t?(m=n=>t.call("TASK_BOARD_ITEM_CREATE",n),e[5]=t,e[6]=m):m=e[6];let I;e[7]!==r||e[8]!==m?(I={mutationFn:m,onSuccess:r},e[7]=r,e[8]=m,e[9]=I):I=e[9];const y=O(I);let l;e[10]!==t?(l=n=>t.call("TASK_BOARD_ITEM_UPDATE",n),e[10]=t,e[11]=l):l=e[11];let d;e[12]!==s||e[13]!==i?(d=async n=>{await s.cancelQueries({queryKey:i});const B=s.getQueryData(i);return s.setQueryData(i,E=>E&&{...E,items:E.items.map(z=>z.id===n.id?{...z,...n,...n.status!==void 0&&n.status!==z.status&&{statusSince:new Date().toISOString()}}:z)}),{previous:B}},e[12]=s,e[13]=i,e[14]=d):d=e[14];let T;e[15]!==u?(T=(n,B)=>{B.status==="done"&&X("task_marked_done",{organization_id:u.id,task_board_item_id:B.id})},e[15]=u,e[16]=T):T=e[16];let f;e[17]!==s||e[18]!==i?(f=(n,B,E)=>{E?.previous&&s.setQueryData(i,E.previous)},e[17]=s,e[18]=i,e[19]=f):f=e[19];let S;e[20]!==r||e[21]!==o||e[22]!==s?(S=(n,B,E)=>{r(),s.invalidateQueries({queryKey:k.taskBoardActivity(o,E.id)})},e[20]=r,e[21]=o,e[22]=s,e[23]=S):S=e[23];let _;e[24]!==l||e[25]!==d||e[26]!==T||e[27]!==f||e[28]!==S?(_={mutationFn:l,onMutate:d,onSuccess:T,onError:f,onSettled:S},e[24]=l,e[25]=d,e[26]=T,e[27]=f,e[28]=S,e[29]=_):_=e[29];const U=O(_);let D;e[30]!==t?(D=n=>t.call("TASK_BOARD_ITEM_DELETE",{id:n}),e[30]=t,e[31]=D):D=e[31];let A;e[32]!==r||e[33]!==a?(A=n=>{N.error(n instanceof Error&&n.message?n.message:a("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=a,e[34]=A):A=e[34];let p;e[35]!==r||e[36]!==D||e[37]!==A?(p={mutationFn:D,onSuccess:r,onError:A},e[35]=r,e[36]=D,e[37]=A,e[38]=p):p=e[38];const w=O(p);let Q;e[39]!==t?(Q=async n=>{const B=await Promise.allSettled(n.map(E=>t.call("TASK_BOARD_ITEM_DELETE",{id:E})));return{total:n.length,failed:B.filter(oe).length}},e[39]=t,e[40]=Q):Q=e[40];let h,K;e[41]!==a?(h=n=>{const{total:B,failed:E}=n;E!==0&&N.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(E),total:String(B)}))},K=()=>N.error(a("taskBoard.taskBoard.deleteError")),e[41]=a,e[42]=h,e[43]=K):(h=e[42],K=e[43]);let M;e[44]!==r||e[45]!==Q||e[46]!==h||e[47]!==K?(M={mutationFn:Q,onSuccess:h,onError:K,onSettled:r},e[44]=r,e[45]=Q,e[46]=h,e[47]=K,e[48]=M):M=e[48];const x=O(M);let F;e[49]!==t?(F=n=>t.call("TASK_BOARD_ITEM_UPDATE",n),e[49]=t,e[50]=F):F=e[50];let v;e[51]!==r||e[52]!==F?(v={mutationFn:F,onSuccess:r},e[51]=r,e[52]=F,e[53]=v):v=e[53];const P=O(v);let b;e[54]!==t?(b=n=>t.call("TASK_BOARD_ITEM_RERUN",n),e[54]=t,e[55]=b):b=e[55];let q;e[56]!==r||e[57]!==o||e[58]!==s?(q=(n,B,E)=>{r(),s.invalidateQueries({queryKey:k.taskBoardActivity(o,E.id)})},e[56]=r,e[57]=o,e[58]=s,e[59]=q):q=e[59];let L;e[60]!==b||e[61]!==q?(L={mutationFn:b,onSettled:q},e[60]=b,e[61]=q,e[62]=L):L=e[62];const j=O(L);let C;return e[63]!==y||e[64]!==P||e[65]!==w||e[66]!==x||e[67]!==j||e[68]!==U?(C={create:y,update:U,remove:w,removeMany:x,link:P,rerun:j},e[63]=y,e[64]=P,e[65]=w,e[66]=x,e[67]=j,e[68]=U,e[69]=C):C=e[69],C}function oe(e){return e.status==="rejected"}export{ce as a,se as b,de as c,ae as t,re as u};
@@ -1 +1 @@
1
- import{c as $,b as D,m as z,j as o,a6 as q,L as Z,au as ee,d as te,r as U,hk as se,B as ae,t as oe,am as V,K as F,i as ne,q as Y,e as le}from"./index-C1ub_U1Q.js";import{s as W}from"./Plus-C1KkV9dn.js";import{s as re}from"./XClose-C7uUuAz2.js";import{i as ie}from"./Zap-Dcq6Ux-0.js";import{B as K}from"./badge-BPOibh1z.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-Cjlt4NYo.js";import{I as xe}from"./icon-button-OK_-LM30.js";import{c as ge,a as he,b as je,S as ke}from"./sheet-C8us_fGJ.js";import{j as ve}from"./use-org-fs-C6rwPPaE.js";import{a as Ne}from"./use-project-scope-CCzY-N2k.js";import{u as J,a as _e}from"./use-automations-DvRjIhQq.js";import{C as ye}from"./task-board-2M4kKpcl.js";import{b as be}from"./watch-sse-pool-CwLVI1nD.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),g=Se(a),d=Re(a);let h;e[0]!==c?(h=()=>c(!1),e[0]=c,e[1]=h):h=e[1];const x=h,R=je,_=he,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=ge,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ke,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=g&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(g)});let k;e[8]!==B||e[9]!==j||e[10]!==T?(k=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=k):k=e[11];let v;e[12]!==i?(v=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=v):v=e[13];let S;e[14]!==v?(S=o.jsx("h3",{className:"text-meta",children:v}),e[14]=v,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==k?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[k,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=k,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,g]=U.useState(!1),d=l?.id??se(n.id),h=async()=>{g(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{g(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:h,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ve();let g;e[0]!==u.data?(g=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=g):g=e[1];const d=g;let h,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],h=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=h,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else h=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==h||e[50]!==O?(j=o.jsx(h,{children:O}),e[49]=h,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let k;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(k=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=k):k=e[61];let v;e[62]!==r||e[63]!==d||e[64]!==i?(v=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=v):v=e[65];let S;return e[66]!==_||e[67]!==k||e[68]!==v||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,k,v]}),e[66]=_,e[67]=k,e[68]=v,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const g=u.prompt.trim();await(g||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:g,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
1
+ import{c as $,b as D,m as z,j as o,a6 as q,L as Z,av as ee,d as te,r as U,hn as se,B as ae,t as oe,an as V,K as F,i as ne,q as Y,e as le}from"./index-CaT4JsCE.js";import{s as W}from"./Plus-BXH7i2b3.js";import{s as re}from"./XClose-kwcMavwj.js";import{i as ie}from"./Zap-CAQ2824E.js";import{B as K}from"./badge-BgjvI8Jn.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-ClLr83k5.js";import{I as xe}from"./icon-button-BuzP0C4n.js";import{c as ge,a as he,b as je,S as ve}from"./sheet-CF7PsYXH.js";import{j as ke}from"./use-org-fs-cNPBBpNZ.js";import{a as Ne}from"./use-project-scope-DD2NBlJU.js";import{u as J,a as _e}from"./use-automations-DYXtS06g.js";import{C as ye}from"./task-board-D4sEZC2J.js";import{b as be}from"./watch-sse-pool-BU2YQMB0.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),g=Se(a),d=Re(a);let h;e[0]!==c?(h=()=>c(!1),e[0]=c,e[1]=h):h=e[1];const x=h,R=je,_=he,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=ge,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ve,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=g&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(g)});let v;e[8]!==B||e[9]!==j||e[10]!==T?(v=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=v):v=e[11];let k;e[12]!==i?(k=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=k):k=e[13];let S;e[14]!==k?(S=o.jsx("h3",{className:"text-meta",children:k}),e[14]=k,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==v?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[v,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=v,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,g]=U.useState(!1),d=l?.id??se(n.id),h=async()=>{g(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{g(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:h,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ke();let g;e[0]!==u.data?(g=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=g):g=e[1];const d=g;let h,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],h=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=h,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else h=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==h||e[50]!==O?(j=o.jsx(h,{children:O}),e[49]=h,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let v;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(v=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=v):v=e[61];let k;e[62]!==r||e[63]!==d||e[64]!==i?(k=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=k):k=e[65];let S;return e[66]!==_||e[67]!==v||e[68]!==k||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,v,k]}),e[66]=_,e[67]=v,e[68]=k,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const g=u.prompt.trim();await(g||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:g,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
@@ -1 +1 @@
1
- import{a6 as l,am as c,r as i,V as d,K as m}from"./index-C1ub_U1Q.js";import{c as T}from"./thread-intent-CoKmpw2U.js";const p=[],S=()=>()=>{},h=()=>p;function f(t){const{org:s}=l(),r=c(),n=T(),o=i.useSyncExternalStore(n?.threads.subscribe??S,n?.threads.get??h),e=t===null?null:o.find(a=>a.id===t)??null,{data:u}=d({queryKey:m.ensureTask(s.id,t),queryFn:async()=>{if(t===null)return null;try{const{item:a}=await r.call("COLLECTION_THREADS_GET",{id:t});return a??null}catch{return null}},initialData:e&&!e.partial?e:void 0,select:a=>a?.metadata??null,staleTime:3e4});return e?.metadata??u??null}export{f as u};
1
+ import{a6 as l,an as c,r as i,V as d,K as T}from"./index-CaT4JsCE.js";import{c as m}from"./thread-intent-yju7EkUf.js";const p=[],S=()=>()=>{},h=()=>p;function f(t){const{org:s}=l(),r=c(),n=m(),o=i.useSyncExternalStore(n?.threads.subscribe??S,n?.threads.get??h),e=t===null?null:o.find(a=>a.id===t)??null,{data:u}=d({queryKey:T.ensureTask(s.id,t),queryFn:async()=>{if(t===null)return null;try{const{item:a}=await r.call("COLLECTION_THREADS_GET",{id:t});return a??null}catch{return null}},initialData:e&&!e.partial?e:void 0,select:a=>a?.metadata??null,staleTime:3e4});return e?.metadata??u??null}export{f as u};
@@ -1 +1 @@
1
- import{c,a6 as i,i as l,K as p}from"./index-C1ub_U1Q.js";import{f}from"./chat-context-DaK1Yrzk.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
1
+ import{c,a6 as i,i as l,K as p}from"./index-CaT4JsCE.js";import{f}from"./chat-context-CtXhrjSm.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
@@ -1 +1 @@
1
- import{av as b,cK as g,c as p,cL as h,u as A}from"./index-C1ub_U1Q.js";import{u as y}from"./use-blog-view-imlI-wE_.js";import{e as f,i as o,g as d,t as S}from"./thread-intent-CoKmpw2U.js";import{a as v,d as w}from"./session-runtime-CgVs5kAm.js";const D=1e4,P="true",l=2;function c(t,e){return b.chatAutosend(t,e)}function T(t){return t==="pending"||t==="sending"}function E(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object")return null;const n=e;let a=0;n.status==="sending"?a=n.retryAt===void 0?1:l:n.retryAt!==void 0&&(a=1);const r=n.attempt===void 0?a:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!T(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>l?null:{...e,attempt:r}}function U(t,e,n,a,r=Date.now()){const i={message:a,createdAt:r,status:"pending",attempt:0};return t.setItem(c(e,n),JSON.stringify(i)),i}function N(t,e,n){const a=c(e,n),r=E(t.getItem(a));return r||(t.removeItem(a),null)}function k(t,e,n,a=Date.now()){const r=c(e,n),i=N(t,e,n);if(!i||i.status!=="pending")return null;if(i.attempt>=l)return t.removeItem(r),null;const s=i.retryAt??i.createdAt;if(a-s>=D)return t.removeItem(r),null;const u={...i,status:"sending",attempt:i.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function M(t,e,n){t.removeItem(c(e,n))}const x=new Set(["site-editor","content","code","calendar","experiments"]);function _(t,e,n){return n?t==="blog"||t==="blog-post"?"blog":t==="monitoring"?e==="experiments"?"site":null:t&&x.has(t)?"site":null:null}function m(t){return o(t)?"blog":"site"}function j(t,e,n){return e===null?[...t]:t.filter(a=>m(a.branch)===e||a.branch===n)}function F(t,e,n,a){const r=t.filter(i=>i.branch!==e&&(n===null||m(i.branch)===n));return r.find(i=>(i.runtime??a)!=="sandbox")??r[0]}function J(t){return o(t)?"thread.branchPicker.blogDraftName":"thread.branchPicker.defaultVersionName"}function K(t,e,n){return t==="blog"?o(e.branch)||v(e.metadata,n)==="sandbox":t==="site"?!o(e.branch):!0}function C(t,e,n){return!e.partial&&t==="blog"===o(e.branch)&&S(e,w(n))}function Y(t,e){const n=t||f(e);return o(n)?{branch:n}:{branch:n,runtime:"sandbox"}}function O(t,e,n){return K(t,e,n)?null:t==="blog"?"site-editor":"blog"}function G(t,e,n){return n&&o(t)?f(e):d(e)}function Q(t){const e=t.viewKind==="blog"||t.blogView&&o(t.branch)?f(t.userLabel):d(t.userLabel);return t.projectDefault==="cms"?{kind:"new-thread",runtime:"cms",branch:e}:{kind:"repoint",branch:e}}function L(t){if(!t)return null;const e=g(t);return e.kind==="blog"?"blog":e.kind==="site-editor"||e.kind==="agent-section"&&(e.section==="calendar"||e.section==="experiments")?"site":null}function W(t,e,n){return!t||!e||!n?t:O(L(t),e,void 0)??t}function X(){const t=p.c(5),e=h(),n=y();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const r=A(a),i="view"in r&&typeof r.view=="string"?r.view:void 0;let s;return t[1]!==n||t[2]!==e||t[3]!==i?(s=_(e,i,n),t[1]=n,t[2]=e,t[3]=i,t[4]=s):s=t[4],s}export{P as A,M as a,Y as b,k as c,J as d,j as e,m as f,Q as g,C as i,G as n,F as s,W as t,X as u,K as v,U as w};
1
+ import{aw as b,cN as g,c as p,cO as h,u as A}from"./index-CaT4JsCE.js";import{u as y}from"./use-blog-view-BpUj7Xe1.js";import{e as f,i as o,g as d,t as S}from"./thread-intent-yju7EkUf.js";import{a as v,d as w}from"./session-runtime-C7lRk1bm.js";const D=1e4,P="true",l=2;function c(t,e){return b.chatAutosend(t,e)}function T(t){return t==="pending"||t==="sending"}function N(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object")return null;const n=e;let a=0;n.status==="sending"?a=n.retryAt===void 0?1:l:n.retryAt!==void 0&&(a=1);const r=n.attempt===void 0?a:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!T(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>l?null:{...e,attempt:r}}function U(t,e,n,a,r=Date.now()){const i={message:a,createdAt:r,status:"pending",attempt:0};return t.setItem(c(e,n),JSON.stringify(i)),i}function E(t,e,n){const a=c(e,n),r=N(t.getItem(a));return r||(t.removeItem(a),null)}function k(t,e,n,a=Date.now()){const r=c(e,n),i=E(t,e,n);if(!i||i.status!=="pending")return null;if(i.attempt>=l)return t.removeItem(r),null;const s=i.retryAt??i.createdAt;if(a-s>=D)return t.removeItem(r),null;const u={...i,status:"sending",attempt:i.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function M(t,e,n){t.removeItem(c(e,n))}const x=new Set(["site-editor","content","code","calendar","experiments"]);function _(t,e,n){return n?t==="blog"||t==="blog-post"?"blog":t==="monitoring"?e==="experiments"?"site":null:t&&x.has(t)?"site":null:null}function m(t){return o(t)?"blog":"site"}function j(t,e,n){return e===null?[...t]:t.filter(a=>m(a.branch)===e||a.branch===n)}function F(t,e,n,a){const r=t.filter(i=>i.branch!==e&&(n===null||m(i.branch)===n));return r.find(i=>(i.runtime??a)!=="sandbox")??r[0]}function J(t){return o(t)?"thread.branchPicker.blogDraftName":"thread.branchPicker.defaultVersionName"}function O(t,e,n){return t==="blog"?o(e.branch)||v(e.metadata,n)==="sandbox":t==="site"?!o(e.branch):!0}function C(t,e,n){return!e.partial&&t==="blog"===o(e.branch)&&S(e,w(n))}function Y(t,e){const n=t||f(e);return o(n)?{branch:n}:{branch:n,runtime:"sandbox"}}function K(t,e,n){return O(t,e,n)?null:t==="blog"?"site-editor":"blog"}function G(t,e,n){return n&&o(t)?f(e):d(e)}function Q(t){const e=t.viewKind==="blog"||t.blogView&&o(t.branch)?f(t.userLabel):d(t.userLabel);return t.projectDefault==="cms"?{kind:"new-thread",runtime:"cms",branch:e}:{kind:"repoint",branch:e}}function R(t){if(!t)return null;const e=g(t);return e.kind==="blog"?"blog":e.kind==="site-editor"||e.kind==="agent-section"&&(e.section==="calendar"||e.section==="experiments")?"site":null}function W(t,e,n){return!t||!e||!n?t:K(R(t),e,void 0)??t}function X(){const t=p.c(5),e=h(),n=y();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const r=A(a),i="view"in r&&typeof r.view=="string"?r.view:void 0;let s;return t[1]!==n||t[2]!==e||t[3]!==i?(s=_(e,i,n),t[1]=n,t[2]=e,t[3]=i,t[4]=s):s=t[4],s}export{P as A,M as a,Y as b,k as c,J as d,j as e,m as f,Q as g,C as i,G as n,F as s,W as t,X as u,O as v,U as w};
@@ -1 +1 @@
1
- import{c as L,b as V,r as N,j as r,m as q,B as Z,aY as ee}from"./index-C1ub_U1Q.js";import{a as te,d as re,r as se,p as ne}from"./session-runtime-CgVs5kAm.js";import{u as Y,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-DaK1Yrzk.js";import{b as ue}from"./repository-binding-DsR2HngX.js";import{a as H,b as Q,P as G}from"./popover-C8MTUbMP.js";import{d as de,b as fe,a as me,D as he}from"./drawer-9GUvyTNb.js";import{T as pe,a as xe,c as ge}from"./tooltip-BOLZbpj7.js";import{u as ve}from"./use-mobile-BcxOmK-J.js";import{g as ye,ab as be}from"./agent-icon-pvTjuJ6E.js";import{t as Se}from"./ChevronDown-HLxb8bS_.js";import{a as je}from"./UserCheck01-yDImsmrP.js";import{t as Te}from"./Tool01-BXWKt8NX.js";import{d as Re}from"./use-organization-settings-BUtsdGXi.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-CfgoSOxz.js";import{M as Ce,a as Ie}from"./index-BsX9UbFy.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-CACmQNFr.js";function mt(t){const e=L.c(14),o=ue(t),b=Y(),s=o?.metadata,a=b?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,S=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||S&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:b,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:S}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,b,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==S||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:S,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=S,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:b,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,S]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),S(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(Se,{size:12,className:"opacity-60 hidden @[480px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==b||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(H,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[b,m,c]})})})}),e[8]=b,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Q,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:S,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:b}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const S=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(je,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==b?(y=n&&b(S),e[17]=n,e[18]=b,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(H,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==b?(c=n&&b(S),e[29]=n,e[30]=b,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Q,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(be,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let b;e[0]!==t||e[1]!==o.tiers?(b=S=>{const l=o.tiers[S];return l?l.title??l.modelId:t.chat[S]?.title},e[0]=t,e[1]=o.tiers,e[2]=b):b=e[2];const s=b;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function ht(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:b}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:S}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=Y()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==b||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==S){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>b(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[S&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?Ye:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=b,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=S,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function Ye(t){return De(t.providerId,t.modelId)}const B=48;function pt(){const t=L.c(12),[e,o]=N.useState("idle"),[b,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),S=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Qe),g.current?.getTracks().forEach(He),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;S.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(S.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{S.current===I&&w.error!=="no-speech"&&(i.current=!1,S.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(S.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,S.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,S.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,S.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==b||t[10]!==u?(A={status:e,transcript:b,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=b,t[10]=u,t[11]=A):A=t[11],A}function He(t){return t.stop()}function Qe(){}function Ge(){return Array(B).fill(.05)}export{ht as T,pt as a,Pe as s,mt as u};
1
+ import{c as L,b as V,r as N,j as r,m as q,B as Z,a_ as ee}from"./index-CaT4JsCE.js";import{a as te,d as re,r as se,p as ne}from"./session-runtime-C7lRk1bm.js";import{u as H,i as oe,d as le,j as ie,k as ce,m as ae}from"./chat-context-CtXhrjSm.js";import{b as ue}from"./repository-binding-BVqJcY39.js";import{a as Q,b as Y,P as G}from"./popover-BSXUrcE6.js";import{d as de,b as fe,a as me,D as he}from"./drawer-BqcK626t.js";import{T as pe,a as xe,c as ge}from"./tooltip-C-37wWLH.js";import{u as ve}from"./use-mobile-CLhCB1ec.js";import{g as ye,ab as be}from"./agent-icon-CH_f-N3x.js";import{t as Se}from"./ChevronDown-D8DhHnMq.js";import{a as je}from"./UserCheck01-DYJoLz9O.js";import{t as Te}from"./Tool01-DOdYsq79.js";import{d as Re}from"./use-organization-settings-DsOm4fQ2.js";import{u as J,c as Me,d as ke}from"./use-ai-providers-bUEURX0w.js";import{M as Ce,a as Ie}from"./index-BSDvsLw1.js";import{d as we,e as Ne,b as _e}from"./use-entitlements-D7RtNoTI.js";function mt(t){const e=L.c(14),o=ue(t),b=H(),s=o?.metadata,a=b?.activeTask,n=a?.metadata?.runtime;let u;e[0]!==n?(u=ne(n),e[0]=n,e[1]=u):u=e[1];const x=u,S=!!a&&!a.partial,l=a?.metadata;let j;e[2]!==s||e[3]!==l?(j=te(l,s),e[2]=s,e[3]=l,e[4]=j):j=e[4];const g=!!x||S&&!!o;let f;e[5]!==s?(f=re(s),e[5]=s,e[6]=f):f=e[6];let i;e[7]!==s?(i=se(s),e[7]=s,e[8]=i):i=e[8];let v;return e[9]!==j||e[10]!==g||e[11]!==f||e[12]!==i?(v={runtime:j,resolved:g,projectDefault:f,previewServerUrl:i},e[9]=j,e[10]=g,e[11]=f,e[12]=i,e[13]=v):v=e[13],v}function Pe(t){return["openai-compatible","openrouter","deco"].includes(t)}function De(t,e){return Pe(t)&&$e(e)!==null}function $e(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const Ee={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Fe(t,e){return Ee[t]?.test(e)??!1}function Ae(t){return Me(t)&&Fe(t.providerId,t.modelId)}function ze(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const Le={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function Ue(t){const e=L.c(32),{tier:o,orgSlot:b,userSlot:s,autoSlot:a,filterModels:n,onPick:u,onReset:x,onClose:S}=t,l=V(),j=J(),g=new Set(j.map(Be)),f=oe([s,b,a],g),i=f?.keyId??null,[v,m]=N.useState(i??j[0]?.id??null),c=j.some(P=>P.id===v)?v:i??j[0]?.id??null,k=c?j.find(P=>P.id===c):null,M="flex h-[70vh] max-h-[460px] w-full flex-col",T=Le[o];let h;e[0]!==l||e[1]!==T?(h=l(T),e[0]=l,e[1]=T,e[2]=h):h=e[2];let p;e[3]!==h?(p=r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h}),e[3]=h,e[4]=p):p=e[4];let y;e[5]!==x||e[6]!==l||e[7]!==s?(y=s&&r.jsx("button",{type:"button",onClick:x,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:l("chat.modelPreferences.reset")}),e[5]=x,e[6]=l,e[7]=s,e[8]=y):y=e[8];let R;e[9]!==p||e[10]!==y?(R=r.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[p,y]}),e[9]=p,e[10]=y,e[11]=R):R=e[11];const d="flex-1 min-h-0",C=N.Suspense;let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(Ie,{}),e[12]=_):_=e[12];const z=Ce,A=!0,E=ze(i?f:null,k?.providerId??"deco");let D;e[13]!==c||e[14]!==u||e[15]!==m?(D=P=>{const F=P.keyId??c??"";m(F),u({keyId:F,modelId:P.modelId,title:P.title})},e[13]=c,e[14]=u,e[15]=m,e[16]=D):D=e[16];let I;e[17]!==z||e[18]!==c||e[19]!==n||e[20]!==S||e[21]!==m||e[22]!==E||e[23]!==D?(I=r.jsx(z,{compact:A,filterModels:n,onClose:S,credentialId:c,onCredentialChange:m,selectedModel:E,onModelChange:D}),e[17]=z,e[18]=c,e[19]=n,e[20]=S,e[21]=m,e[22]=E,e[23]=D,e[24]=I):I=e[24];let w;e[25]!==C||e[26]!==I||e[27]!==_?(w=r.jsx("div",{className:d,children:r.jsx(C,{fallback:_,children:I})}),e[25]=C,e[26]=I,e[27]=_,e[28]=w):w=e[28];let $;return e[29]!==w||e[30]!==R?($=r.jsxs("div",{className:M,children:[R,w]}),e[29]=w,e[30]=R,e[31]=$):$=e[31],$}function Be(t){return t.id}const Ke=["fast","smart","thinking"];function X(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const O={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function qe(t){const e=L.c(28),{tier:o,pillIcon:b,groups:s}=t,a=V();let n;e[0]!==a?(n=X(a),e[0]=a,e[1]=n):n=e[1];const u=n,[x,S]=N.useState(!1);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=R=>{R.onSelect(),S(!1)},e[2]=l):l=e[2];const j=l,g=u[o];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=q("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=q("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),e[4]=i):i=e[4];const v=u[o];let m;e[5]!==v?(m=r.jsx("span",{className:i,children:v}),e[5]=v,e[6]=m):m=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(Se,{size:12,className:"opacity-60 hidden @[480px]/chat-bottom:inline-block"}),e[7]=c):c=e[7];let k;e[8]!==b||e[9]!==g||e[10]!==m?(k=r.jsx(pe,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(Q,{asChild:!0,children:r.jsxs(Z,{type:"button",variant:"ghost",size:"default","aria-label":g,className:f,children:[b,m,c]})})})}),e[8]=b,e[9]=g,e[10]=m,e[11]=k):k=e[11];let M;e[12]!==g?(M=r.jsx(xe,{children:g}),e[12]=g,e[13]=M):M=e[13];let T;e[14]!==k||e[15]!==M?(T=r.jsxs(ge,{children:[k,M]}),e[14]=k,e[15]=M,e[16]=T):T=e[16];let h;if(e[17]!==s||e[18]!==a){let R;e[20]!==a?(R=d=>r.jsx("div",{className:"flex flex-col",children:d.rows.map(C=>r.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-accent",children:[r.jsxs("button",{type:"button",role:"menuitem","aria-label":C.title,onClick:()=>j(C),className:q("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",C.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[C.icon&&r.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:C.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm",children:C.title}),C.subtitle&&r.jsx("div",{className:"text-xs text-muted-foreground",children:C.subtitle})]}),C.active&&r.jsx("span",{title:a("chat.tierTrigger.selected"),children:r.jsx(ee,{size:14,className:"text-foreground mt-0.5"})})]}),C.modelOverride&&r.jsx(Oe,{label:C.title,render:C.modelOverride})]},C.key))},d.key),e[20]=a,e[21]=R):R=e[21],h=s.map(R),e[17]=s,e[18]=a,e[19]=h}else h=e[19];let p;e[22]!==h?(p=r.jsx(Y,{align:"end",className:"p-1 w-64",onOpenAutoFocus:Ve,children:r.jsx("div",{role:"menu",className:"flex flex-col",children:h})}),e[22]=h,e[23]=p):p=e[23];let y;return e[24]!==x||e[25]!==T||e[26]!==p?(y=r.jsxs(G,{open:x,onOpenChange:S,children:[T,p]}),e[24]=x,e[25]=T,e[26]=p,e[27]=y):y=e[27],y}function Ve(t){return t.preventDefault()}function Oe(t){const e=L.c(38),{label:o,render:b}=t,s=V(),a=ve(),[n,u]=N.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>u(!1),e[0]=x):x=e[0];const S=x;let l;e[1]!==o||e[2]!==s?(l=s("chat.modelPreferences.customizeModel",{tier:o}),e[1]=o,e[2]=s,e[3]=l):l=e[3];const j=n&&"opacity-100";let g;e[4]!==j?(g=q("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background shadow-edge","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",j),e[4]=j,e[5]=g):g=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(je,{size:14}),e[6]=f):f=e[6];let i;e[7]!==l||e[8]!==g?(i=r.jsx("button",{type:"button","aria-label":l,className:g,children:f}),e[7]=l,e[8]=g,e[9]=i):i=e[9];const v=i;if(a){let T;e[10]!==v?(T=r.jsx(de,{asChild:!0,children:v}),e[10]=v,e[11]=T):T=e[11];let h;e[12]!==o||e[13]!==s?(h=s("chat.modelPreferences.customizeModel",{tier:o}),e[12]=o,e[13]=s,e[14]=h):h=e[14];let p;e[15]!==h?(p=r.jsx(fe,{className:"sr-only",children:h}),e[15]=h,e[16]=p):p=e[16];let y;e[17]!==n||e[18]!==b?(y=n&&b(S),e[17]=n,e[18]=b,e[19]=y):y=e[19];let R;e[20]!==y||e[21]!==p?(R=r.jsxs(me,{className:"p-0 flex flex-col max-h-[95vh]",children:[p,y]}),e[20]=y,e[21]=p,e[22]=R):R=e[22];let d;return e[23]!==n||e[24]!==R||e[25]!==T?(d=r.jsxs(he,{open:n,onOpenChange:u,children:[T,R]}),e[23]=n,e[24]=R,e[25]=T,e[26]=d):d=e[26],d}let m;e[27]!==v?(m=r.jsx(Q,{asChild:!0,children:v}),e[27]=v,e[28]=m):m=e[28];let c;e[29]!==n||e[30]!==b?(c=n&&b(S),e[29]=n,e[30]=b,e[31]=c):c=e[31];let k;e[32]!==c?(k=r.jsx(Y,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:c}),e[32]=c,e[33]=k):k=e[33];let M;return e[34]!==n||e[35]!==m||e[36]!==k?(M=r.jsxs(G,{open:n,onOpenChange:u,children:[m,k]}),e[34]=n,e[35]=m,e[36]=k,e[37]=M):M=e[37],M}function W(t){return t==="fast"?r.jsx(ye,{size:16}):t==="thinking"?r.jsx(be,{size:16}):r.jsx(Te,{size:16})}function We(t){const e=L.c(13),o=ae();let b;e[0]!==t||e[1]!==o.tiers?(b=S=>{const l=o.tiers[S];return l?l.title??l.modelId:t.chat[S]?.title},e[0]=t,e[1]=o.tiers,e[2]=b):b=e[2];const s=b;let a;e[3]!==s?(a=s("fast"),e[3]=s,e[4]=a):a=e[4];let n;e[5]!==s?(n=s("smart"),e[5]=s,e[6]=n):n=e[6];let u;e[7]!==s?(u=s("thinking"),e[7]=s,e[8]=u):u=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==u?(x={fast:a,smart:n,thinking:u},e[9]=a,e[10]=n,e[11]=u,e[12]=x):x=e[12],x}function ht(){const t=L.c(25),e=V(),{simpleModeTier:o,setSimpleModeTier:b}=le(),s=Re(),a=J(),n=ke(a),u=We(n),{data:x,error:S}=ie();let l;t[0]!==x?(l=x===void 0?{tiers:{}}:x,t[0]=x,t[1]=l):l=t[1];const j=l,g=ce(),f=H()?.lockedHarness,i=f==="claude-code",v=we("model_choice"),m=Ne(),c=_e();if(!m||!v)return null;let k,M;if(t[2]!==n||t[3]!==c||t[4]!==i||t[5]!==f||t[6]!==s||t[7]!==b||t[8]!==e||t[9]!==o||t[10]!==u||t[11]!==g||t[12]!==j||t[13]!==S){const R=X(e);k="decopilot",M=Ke.map(d=>{const C=u[d],_=j.tiers[d];return{key:`decopilot-${d}`,icon:W(d),title:R[d],subtitle:c?C??e(O[d]):e(O[d]),active:o===d,onSelect:()=>b(d),modelOverride:c?z=>r.jsxs(r.Fragment,{children:[S&&r.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),r.jsx(Ue,{tier:d,orgSlot:s.tiers[d],userSlot:_,autoSlot:n.chat[d],filterModels:f==="codex"?He:i?Ae:void 0,onClose:z,onPick:A=>g.mutate({tier:d,slot:A}),onReset:()=>g.mutate({tier:d,slot:null})},`${d}:${_?.keyId??"org"}:${_?.modelId??""}`)]}):void 0}}),t[2]=n,t[3]=c,t[4]=i,t[5]=f,t[6]=s,t[7]=b,t[8]=e,t[9]=o,t[10]=u,t[11]=g,t[12]=j,t[13]=S,t[14]=k,t[15]=M}else k=t[14],M=t[15];let T;t[16]!==k||t[17]!==M?(T=[{key:k,rows:M}],t[16]=k,t[17]=M,t[18]=T):T=t[18];const h=T;let p;t[19]!==o?(p=W(o),t[19]=o,t[20]=p):p=t[20];let y;return t[21]!==h||t[22]!==p||t[23]!==o?(y=r.jsx(qe,{tier:o,pillIcon:p,groups:h}),t[21]=h,t[22]=p,t[23]=o,t[24]=y):y=t[24],y}function He(t){return De(t.providerId,t.modelId)}const B=48;function pt(){const t=L.c(12),[e,o]=N.useState("idle"),[b,s]=N.useState(""),[a,n]=N.useState(""),[u,x]=N.useState(Ge),S=N.useRef(null),l=N.useRef(null),j=N.useRef(null),g=N.useRef(null),f=N.useRef(0),i=N.useRef(!1),v=N.useRef(""),m=N.useRef(""),c=N.useRef(!1),k=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),l.current?.close().catch(Ye),g.current?.getTracks().forEach(Qe),j.current=null,l.current=null,g.current=null},t[0]=M):M=t[0];const T=M;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=E=>{g.current=E;const D=new AudioContext;l.current=D;const I=D.createMediaStreamSource(E),w=D.createAnalyser();w.fftSize=128,w.smoothingTimeConstant=.8,I.connect(w),j.current=w;const $=new Uint8Array(w.frequencyBinCount),P=()=>{if(!j.current)return;j.current.getByteFrequencyData($);const F=[];for(let U=0;U<B;U++){const K=Math.floor(U/B*$.length);F.push(Math.max(.04,($[K]??0)/255))}x(F),f.current=requestAnimationFrame(P)};P()},t[1]=h):h=t[1];const p=h;let y;t[2]!==e?(y=async()=>{if(c.current||i.current)return e;c.current=!0;const E=window.SpeechRecognition||window.webkitSpeechRecognition;if(!E)return c.current=!1,o("unsupported"),"unsupported";let D;try{D=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return c.current=!1,o("permission-denied"),"permission-denied"}c.current=!1,s(""),n(""),m.current="",v.current="",i.current=!0,o("recording"),p(D);const I=new E;S.current=I,I.interimResults=!0,I.continuous=!0,I.lang=navigator.language||"en-US",I.onresult=w=>{if(S.current!==I)return;let $="",P="";for(let F=w.resultIndex;F<w.results.length;F++){const U=w.results[F],K=U?.[0]?.transcript??"";U?.isFinal?P=P+K:$=$+K}P&&(v.current=v.current+P,s(v.current)),m.current=$,n($)},I.onerror=w=>{S.current===I&&w.error!=="no-speech"&&(i.current=!1,S.current=null,T(),o(w.error==="not-allowed"?"permission-denied":"idle"))},I.onend=()=>{if(S.current===I&&i.current)try{I.start()}catch{}};try{I.start()}catch{return i.current=!1,S.current=null,T(),o("idle"),"idle"}return"recording"},t[2]=e,t[3]=y):y=t[3];const R=y;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{i.current=!1,S.current?.stop(),T(),o("idle"),x(Array(B).fill(.05)),n("");const E=(v.current+(m.current?" "+m.current:"")).trim();return s(""),v.current="",m.current="",E},t[4]=d):d=t[4];const C=d;let _;t[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current=!1,S.current?.abort(),T(),o("idle"),s(""),n(""),x(Array(B).fill(.05)),v.current="",m.current=""},t[5]=_):_=t[5];const z=_;let A;return t[6]!==a||t[7]!==R||t[8]!==e||t[9]!==b||t[10]!==u?(A={status:e,transcript:b,interimTranscript:a,waveformData:u,isSupported:k,startRecording:R,stopRecording:C,cancelRecording:z},t[6]=a,t[7]=R,t[8]=e,t[9]=b,t[10]=u,t[11]=A):A=t[11],A}function Qe(t){return t.stop()}function Ye(){}function Ge(){return Array(B).fill(.05)}export{ht as T,pt as a,Pe as s,mt as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-DjmxTVn9.js";import{e6 as i}from"./index-CaT4JsCE.js";function t(e,r){return i(e,u,r)}export{t as u};