decocms 4.16.0 → 4.17.0

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 (251) hide show
  1. package/dist/client/assets/{AlertCircle--rPujN3Y.js → AlertCircle-D8gnDqwf.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-6nYdIeA_.js → ArrowUpRight-BlXghneM.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-uEcNv3oG.js → CheckCircle-DCCFCHyS.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-DZjF3Thv.js → ChevronDown-BLALKRGM.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-Z0q9tr5K.js → ChevronRight-Gacf5_E2.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-D4D_9neM.js → ChevronUp-DBXbYduj.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-BXAKlKX4.js → DotsVertical-D7ryssxp.js} +1 -1
  8. package/dist/client/assets/{Eye-Cov1iekv.js → Eye-BFLaa-Ve.js} +1 -1
  9. package/dist/client/assets/{FilterLines-CemhGOOA.js → FilterLines-CK4jmUMp.js} +1 -1
  10. package/dist/client/assets/{Globe01-C05BMTjz.js → Globe01-Bx-hz-as.js} +1 -1
  11. package/dist/client/assets/{Globe04-BRwKw7PX.js → Globe04-u6eY2Kop.js} +1 -1
  12. package/dist/client/assets/{HardDrive-DH-7bfsp.js → HardDrive-B06hZ2KP.js} +1 -1
  13. package/dist/client/assets/{Key01-Zbo9TQ6M.js → Key01-D0oVN5CX.js} +1 -1
  14. package/dist/client/assets/{LayoutLeft-DLmY-nUd.js → LayoutLeft-1bN-FR8E.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-DI4shoup.js → LinkExternal01-D4vA-I3a.js} +1 -1
  16. package/dist/client/assets/{Monitor01-qwfVoWYX.js → Monitor01-DrJKeSJ4.js} +1 -1
  17. package/dist/client/assets/{Palette-BrKsv6mu.js → Palette-CvuWqoBi.js} +1 -1
  18. package/dist/client/assets/{Play-D612TCCW.js → Play-DuOwU6E2.js} +1 -1
  19. package/dist/client/assets/{Plus-DK07_JoD.js → Plus-Bz2JwGOE.js} +1 -1
  20. package/dist/client/assets/{SearchLg-Bn8rNJBm.js → SearchLg-CfwbHNr5.js} +1 -1
  21. package/dist/client/assets/{SearchMd-CF0EzaSp.js → SearchMd-Bn2Kbs9E.js} +1 -1
  22. package/dist/client/assets/{Settings02-CMY7mFtN.js → Settings02-N32UBNZq.js} +1 -1
  23. package/dist/client/assets/{Shield01-TkrC5hLh.js → Shield01-BztOm8mA.js} +1 -1
  24. package/dist/client/assets/{Star01-D_WMzpkz.js → Star01-GFElhP7X.js} +1 -1
  25. package/dist/client/assets/{Stars01-Dgo6ZeEq.js → Stars01-CK-XatBt.js} +1 -1
  26. package/dist/client/assets/{Stars02-D0TDGrAi.js → Stars02-BpRz9194.js} +1 -1
  27. package/dist/client/assets/{Sun-CyYaDPq3.js → Sun-CRJdfBLT.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-CY8rL9G2.js → SwitchHorizontal01-Bcp8nSOf.js} +1 -1
  29. package/dist/client/assets/{Tool01-93CsHV7z.js → Tool01-DrE6CqtR.js} +1 -1
  30. package/dist/client/assets/{Trash01-pwMDa2Co.js → Trash01-kVRWRMat.js} +1 -1
  31. package/dist/client/assets/{Upload01-BIfi-RBp.js → Upload01-TiHLQTwG.js} +1 -1
  32. package/dist/client/assets/{User01-Ck187G2K.js → User01-9o9EbE3X.js} +1 -1
  33. package/dist/client/assets/{Users01-B4dXvjnK.js → Users01-CMbqiB_R.js} +1 -1
  34. package/dist/client/assets/{Users03-DgL-nSvI.js → Users03-K1B4uaw7.js} +1 -1
  35. package/dist/client/assets/{X-BC75c88P.js → X-BQZZQdg0.js} +1 -1
  36. package/dist/client/assets/{XCircle-C30_UXd3.js → XCircle-BOFvuFHl.js} +1 -1
  37. package/dist/client/assets/{XClose-BnLOhLbC.js → XClose-ChRyc7zA.js} +1 -1
  38. package/dist/client/assets/{Zap-CwhZlKhU.js → Zap-RN8PAcZE.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-CiXrDW73.js → ZapSquare-D4RqdrSL.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-CgUBbs0k.js → ZoomOut-CwXzA7X6.js} +1 -1
  41. package/dist/client/assets/{access-gate-Ddakg94Z.js → access-gate-DayZt2qh.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-BEvvmMxn.js → add-section-modal-BgsTQi1S.js} +1 -1
  43. package/dist/client/assets/agent-capabilities-C8WZk9re.js +1 -0
  44. package/dist/client/assets/agent-icon-BRuLsBYY.js +1 -0
  45. package/dist/client/assets/{agents-list-BNcLGGdI.js → agents-list-Bb32bFe0.js} +1 -1
  46. package/dist/client/assets/ai-providers-CtFbvrBB.js +1 -0
  47. package/dist/client/assets/{alert-DQEgpj3F.js → alert-DGlfAxXY.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-B4gO4yN5.js → alert-dialog-D87-BKea.js} +2 -2
  49. package/dist/client/assets/app-editor-BTeZcD9G.js +1 -0
  50. package/dist/client/assets/{auth-catchall-D3JzAW-k.js → auth-catchall-CDZHIENi.js} +1 -1
  51. package/dist/client/assets/{auth-entry-Bwc-RALg.js → auth-entry--IJuST3G.js} +1 -1
  52. package/dist/client/assets/{auth-DLMAAdjO.js → auth-pLLkIszG.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-BLTOjOLB.js → auth-split-layout-Cm8DpBZy.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-DakefadM.js → authenticate-and-persist-oauth-VdmVLbtW.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-ipQdiSSm.js → automation-list-row-DJcYtMaz.js} +1 -1
  56. package/dist/client/assets/{automation-runs-C74R9g0x.js → automation-runs-BQZ05VJM.js} +1 -1
  57. package/dist/client/assets/automations-DXzG8kgd.js +1 -0
  58. package/dist/client/assets/{avatar-DS9aYjJt.js → avatar-DxH3BnSs.js} +1 -1
  59. package/dist/client/assets/{badge-wSwvHa02.js → badge-wh5eWpb9.js} +1 -1
  60. package/dist/client/assets/{block-document-BEmcXKPE.js → block-document-OYJ-kskh.js} +2 -2
  61. package/dist/client/assets/{brand-context-DoLXR5-x.js → brand-context-Dkhy-emW.js} +1 -1
  62. package/dist/client/assets/breadcrumb-DZbB5tzN.js +1 -0
  63. package/dist/client/assets/{buckets-B1pMqHCa.js → buckets-DWf7-mkQ.js} +1 -1
  64. package/dist/client/assets/{bulk-category-panel-K9RKoTBZ.js → bulk-category-panel-BfqGc7PR.js} +1 -1
  65. package/dist/client/assets/capability-load-error-B0knfbbl.js +1 -0
  66. package/dist/client/assets/{card-C45fkaVO.js → card-D-LCVQQb.js} +1 -1
  67. package/dist/client/assets/category-editor-dubEmgpx.js +1 -0
  68. package/dist/client/assets/{chat-context-TTwf8MAP.js → chat-context-CIKFBD8u.js} +4 -4
  69. package/dist/client/assets/{checkbox-TzOn0Djh.js → checkbox-CFdij7Ei.js} +1 -1
  70. package/dist/client/assets/{cli-auth-success--q8-44bB.js → cli-auth-success-BJWjcvwa.js} +1 -1
  71. package/dist/client/assets/collection-detail-C8jnHEZw.js +1 -0
  72. package/dist/client/assets/{collection-display-button-DAd8Da4w.js → collection-display-button-DDEI8eBI.js} +1 -1
  73. package/dist/client/assets/{collection-search-DvBi3Q2M.js → collection-search-B0gYtEWh.js} +1 -1
  74. package/dist/client/assets/{collection-tabs-B4wJfJxi.js → collection-tabs-DGDRpyxJ.js} +1 -1
  75. package/dist/client/assets/{command-CCTW1Ytf.js → command-VE4J0WmB.js} +1 -1
  76. package/dist/client/assets/{commerce-onboarding-jLm6p03A.js → commerce-onboarding-DtwhvPKV.js} +1 -1
  77. package/dist/client/assets/{connect-desktop-dialog-B-Qjl-2m.js → connect-desktop-dialog-DRNK5Zqx.js} +1 -1
  78. package/dist/client/assets/{connection-card-B_S6LeLq.js → connection-card-Dzp4nWAC.js} +1 -1
  79. package/dist/client/assets/connection-detail-BnRE6ILz.js +1 -0
  80. package/dist/client/assets/{connection-form-helpers-0vbutknj.js → connection-form-helpers-BKzMCiDP.js} +1 -1
  81. package/dist/client/assets/{connections-CrVC5c7D.js → connections-BPohRO-Z.js} +1 -1
  82. package/dist/client/assets/{decopilot-ByyydzKl.js → decopilot-D_-94MU_.js} +1 -1
  83. package/dist/client/assets/{decopilot-sse-pool-DbAPLrBY.js → decopilot-sse-pool-DA88fFcW.js} +1 -1
  84. package/dist/client/assets/{dialog-Ql8kdDTa.js → dialog-BdIjDk0G.js} +1 -1
  85. package/dist/client/assets/{domain-settings-D1WiqXBP.js → domain-settings-CTC9j3wY.js} +1 -1
  86. package/dist/client/assets/{drawer-CBX0QEUx.js → drawer-D1X6O6Aa.js} +1 -1
  87. package/dist/client/assets/{dropdown-menu-CIAjydh3.js → dropdown-menu-8PMbgM0q.js} +1 -1
  88. package/dist/client/assets/{empty-state-BzX7YwgA.js → empty-state-y_scHUYK.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-CFrqNmH9.js → extract-connection-data-BhI39RpO.js} +1 -1
  90. package/dist/client/assets/file-explorer-BD0vY2dd.js +2 -0
  91. package/dist/client/assets/{file-type-icon-fjgLfwGj.js → file-type-icon-Bx1NX_Gy.js} +1 -1
  92. package/dist/client/assets/{files-B7cjcKYB.js → files-BFgu7BJp.js} +1 -1
  93. package/dist/client/assets/{form-hBMUZ-LI.js → form-P-LOMg0X.js} +1 -1
  94. package/dist/client/assets/{general-SCBmH2JA.js → general-DaU6Yz-f.js} +1 -1
  95. package/dist/client/assets/github-repo-picker-CmustdLW.js +1 -0
  96. package/dist/client/assets/{hooks-wJ9L2q1Z.js → hooks-UY6BFV6z.js} +4 -4
  97. package/dist/client/assets/{import-from-deco-dialog-rnwM3BUn.js → import-from-deco-dialog-CopvXqdM.js} +1 -1
  98. package/dist/client/assets/{index-DbVMhyOM.js → index-BZCHEyhA.js} +1 -1
  99. package/dist/client/assets/{index-D57sxBgv.js → index-BbFfuuHN.js} +1 -1
  100. package/dist/client/assets/{index-DPqZ0lBB.js → index-BgCyOgdF.js} +25 -25
  101. package/dist/client/assets/{index-CRIhXX57.js → index-BrtU3HWl.js} +3 -3
  102. package/dist/client/assets/{index-D7be0Dd5.js → index-BwaOBBZ-.js} +1 -1
  103. package/dist/client/assets/{index-Bl9dJ0nD.js → index-CAQVV5KO.js} +1 -1
  104. package/dist/client/assets/index-Cgz2WBho.js +173 -0
  105. package/dist/client/assets/index-D4EP6iY-.js +1 -0
  106. package/dist/client/assets/{index-B6CxQrCo.js → index-DHTICC_v.js} +12 -12
  107. package/dist/client/assets/{index-9wbmkYIt.js → index-DJMmArQj.js} +1 -1
  108. package/dist/client/assets/index-DStyXwbT.js +1 -0
  109. package/dist/client/assets/index-DTpadbju.js +1 -0
  110. package/dist/client/assets/index-DmMZ0-sF.css +1 -0
  111. package/dist/client/assets/{index-B3lyyZoz.js → index-Dq2Ts3Yi.js} +1 -1
  112. package/dist/client/assets/{index-redirect-JCm2yIgz.js → index-redirect-YHMCgUs4.js} +1 -1
  113. package/dist/client/assets/{input-92IYvOwC.js → input-DgsFOGyM.js} +1 -1
  114. package/dist/client/assets/{integration-icon-BO-UF1BS.js → integration-icon-m6Sa_hcd.js} +1 -1
  115. package/dist/client/assets/{label-ClPdqpUd.js → label-CwMsBEmc.js} +1 -1
  116. package/dist/client/assets/library-tab-DZNwBek9.js +7 -0
  117. package/dist/client/assets/{login-DgOPYAOM.js → login-DDPQBbDq.js} +1 -1
  118. package/dist/client/assets/{mcp-oauth-DTOnM3tW.js → mcp-oauth-SxDhA9AX.js} +1 -1
  119. package/dist/client/assets/{members-DIJN_e3F.js → members-DiR3wVIq.js} +2 -2
  120. package/dist/client/assets/{monaco-editor-Bmt-pGiV.js → monaco-editor-iFVtSMuF.js} +2 -2
  121. package/dist/client/assets/{monitoring-stats-row-5ex8aBKD.js → monitoring-stats-row-D6W0tudn.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-BxJL43IL.js → oauth-callback-Cj-8kU65.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-ai-provider-T3ZxDraC.js → oauth-callback-ai-provider-Dc1dGP3j.js} +1 -1
  124. package/dist/client/assets/{onboarding-CrwoKUAN.js → onboarding-DF_zbux6.js} +1 -1
  125. package/dist/client/assets/{org-install-RobmE1uK.js → org-install-CEMN6R-y.js} +1 -1
  126. package/dist/client/assets/{org-layout-DmAiWQnF.js → org-layout-bk5Xtfa_.js} +1 -1
  127. package/dist/client/assets/{organization-choice-Crc0nA8E.js → organization-choice-CE_aU8pP.js} +1 -1
  128. package/dist/client/assets/{page-seo-form-BEyx98K-.js → page-seo-form-Derb8U-C.js} +1 -1
  129. package/dist/client/assets/page-seo-sheet-BoNARuVh.js +1 -0
  130. package/dist/client/assets/popover-4-S-2t4S.js +1 -0
  131. package/dist/client/assets/post-editor-CHJjQHP8.js +1 -0
  132. package/dist/client/assets/{primitives-Cs1JxLBO.js → primitives-DFOak6EH.js} +1 -1
  133. package/dist/client/assets/{profile--fDEth4Y.js → profile-BNOuWcgq.js} +1 -1
  134. package/dist/client/assets/project-app-view-ChmoDNv-.js +1 -0
  135. package/dist/client/assets/record-editor-CS39Vomm.js +1 -0
  136. package/dist/client/assets/registry-D4tm3ZFm.js +2 -0
  137. package/dist/client/assets/{registry-layout-DmIz6dSp.js → registry-layout-BPKVzNcW.js} +4 -4
  138. package/dist/client/assets/{require-capability-BaKHYhiM.js → require-capability-BJprrccL.js} +1 -1
  139. package/dist/client/assets/{required-auth-layout-BaYXJW0b.js → required-auth-layout-B0YEEBld.js} +1 -1
  140. package/dist/client/assets/{reset-password-AxTehpVn.js → reset-password-CkXuGUs6.js} +1 -1
  141. package/dist/client/assets/roles-lfwag5Tp.js +1 -0
  142. package/dist/client/assets/{scroll-area-CH-368qd.js → scroll-area-C8YtCymQ.js} +54 -54
  143. package/dist/client/assets/{search-input-DZumeAoO.js → search-input-Du_36cRj.js} +1 -1
  144. package/dist/client/assets/{secrets-BPAq0_qo.js → secrets-CnPg0qON.js} +1 -1
  145. package/dist/client/assets/{sections-editor-Crz16gyQ.js → sections-editor-BR6KfAKE.js} +2 -2
  146. package/dist/client/assets/select-DzzBmNmo.js +1 -0
  147. package/dist/client/assets/{select-model-CGEu5pyd.js → select-model-F8Y_Cf3t.js} +1 -1
  148. package/dist/client/assets/seo-editor-gJ1HxoCF.js +1 -0
  149. package/dist/client/assets/settings-layout-CGT7LCro.js +1 -0
  150. package/dist/client/assets/{settings-section-EyCuv06A.js → settings-section-rq7s23q-.js} +1 -1
  151. package/dist/client/assets/{sheet-CTWseyLj.js → sheet-B3q7nz8B.js} +1 -1
  152. package/dist/client/assets/shell-controls-mi9y4ySh.js +1 -0
  153. package/dist/client/assets/{shell-layout-u7hzXt3K.js → shell-layout-QzfqSuxf.js} +1 -1
  154. package/dist/client/assets/shell-route-loading-Bpj8AlnX.js +1 -0
  155. package/dist/client/assets/{sidebar-BaLCxwAl.js → sidebar-D2BmctMK.js} +1 -1
  156. package/dist/client/assets/{skeleton-BpxeXqnd.js → skeleton-f0d6RrIL.js} +1 -1
  157. package/dist/client/assets/{sso-DvvStBWC.js → sso-D4e1TwT3.js} +1 -1
  158. package/dist/client/assets/{store-D8QMJIIY.js → store-DxI78Zhs.js} +1 -1
  159. package/dist/client/assets/store-registry-DKwI23vv.js +2 -0
  160. package/dist/client/assets/{studio-tools-zOdwK0zh.js → studio-tools-D6ANxpFE.js} +1 -1
  161. package/dist/client/assets/switch-BRlkUTqX.js +1 -0
  162. package/dist/client/assets/{tab-id-AX1D_RMI.js → tab-id-DPNwWMUY.js} +1 -1
  163. package/dist/client/assets/{table-BpbB_kJT.js → table-65-g1dd8.js} +1 -1
  164. package/dist/client/assets/tabs-ByVhqny2.js +1 -0
  165. package/dist/client/assets/{task-status-DNPwSqe7.js → task-status-BMnLETgS.js} +1 -1
  166. package/dist/client/assets/{textarea-tv37zNgD.js → textarea-Dp78LmPE.js} +1 -1
  167. package/dist/client/assets/toggle-group-BIoy7tOG.js +1 -0
  168. package/dist/client/assets/{toolbar-NyfHrEzE.js → toolbar-C1WgDWOZ.js} +1 -1
  169. package/dist/client/assets/{toolbar-icon-button-ePdMhfbx.js → toolbar-icon-button-DdAIuoK2.js} +1 -1
  170. package/dist/client/assets/tools-list-BrZf2-sc.js +1 -0
  171. package/dist/client/assets/tooltip-CWNyrHYY.js +1 -0
  172. package/dist/client/assets/{types-DMnh_mjG.js → types-BHL4d6ji.js} +6 -6
  173. package/dist/client/assets/{use-ai-providers-D3giib4c.js → use-ai-providers-CVS8EjHf.js} +1 -1
  174. package/dist/client/assets/{use-automations-DIPQb7eg.js → use-automations-DJ1_UqKB.js} +1 -1
  175. package/dist/client/assets/{use-capability-JneQ7Vlv.js → use-capability-BmznXR_9.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-CcOZ6R_w.js → use-clock-tick-BXZK-6ig.js} +1 -1
  177. package/dist/client/assets/{use-collections-B43Sol5V.js → use-collections-BnOL5hT8.js} +1 -1
  178. package/dist/client/assets/{use-connection-u7lGziaM.js → use-connection-CRsO-Bab.js} +1 -1
  179. package/dist/client/assets/{use-copy-BHyTm1ci.js → use-copy-DK8lBdjB.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-DHdZYJVG.js → use-create-virtual-mcp-C50juX43.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-NW1w5qmo.js → use-debounced-autosave-Q8tZcL7-.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-DW3gYKw6.js → use-debounced-value-C2hJqHIV.js} +1 -1
  183. package/dist/client/assets/{use-decopilot-events-DMfVXUJv.js → use-decopilot-events-BB7o7ets.js} +1 -1
  184. package/dist/client/assets/{use-delete-connection-TXFJhj7J.js → use-delete-connection-D7WMNDAi.js} +1 -1
  185. package/dist/client/assets/{use-file-configs-D5Wy46KQ.js → use-file-configs-Bxsm4MXe.js} +1 -1
  186. package/dist/client/assets/{use-infinite-scroll-pt1aYNB9.js → use-infinite-scroll-DFBavgZf.js} +1 -1
  187. package/dist/client/assets/{use-join-requests-DmwWk_kt.js → use-join-requests-CNT469hS.js} +1 -1
  188. package/dist/client/assets/{use-mcp-client-BKmxEbDP.js → use-mcp-client-DAJmDOVO.js} +2 -2
  189. package/dist/client/assets/{use-mcp-prompts-C9PuaVPO.js → use-mcp-prompts-D3eulxzR.js} +1 -1
  190. package/dist/client/assets/{use-mcp-tools-C821Tleh.js → use-mcp-tools-AjHzJbIQ.js} +1 -1
  191. package/dist/client/assets/{use-members-CcA5-SWw.js → use-members-BZroloWO.js} +1 -1
  192. package/dist/client/assets/{use-mobile-C77wgjj_.js → use-mobile-BkWraisf.js} +1 -1
  193. package/dist/client/assets/use-navigate-to-agent-Dlhjy-0a.js +1 -0
  194. package/dist/client/assets/{use-org-auth-client-C5YzOJMC.js → use-org-auth-client-BG_aw3vg.js} +1 -1
  195. package/dist/client/assets/{use-org-sso-IHoKz-Sw.js → use-org-sso-CEETlaem.js} +1 -1
  196. package/dist/client/assets/{use-organization-roles-DZZfJv7z.js → use-organization-roles-BrhJCA0y.js} +1 -1
  197. package/dist/client/assets/{use-organization-settings-D4bmJmDV.js → use-organization-settings-D9G2tGsW.js} +1 -1
  198. package/dist/client/assets/{use-registry-connections-zNHTAa1f.js → use-registry-connections-CTTYiKTQ.js} +1 -1
  199. package/dist/client/assets/{use-secrets-DuaBuygY.js → use-secrets-sB7thdOD.js} +1 -1
  200. package/dist/client/assets/{use-status-sounds-BChPDpHE.js → use-status-sounds-DuOBmrHo.js} +1 -1
  201. package/dist/client/assets/{use-view-mode-Bkt4wZfz.js → use-view-mode-CFXBQhh0.js} +1 -1
  202. package/dist/client/assets/{use-virtual-mcp-CsOrbTV4.js → use-virtual-mcp-CJycW-Qv.js} +1 -1
  203. package/dist/client/assets/useInfiniteQuery-Bl42Nudd.js +1 -0
  204. package/dist/client/assets/useSuspenseInfiniteQuery-uA0LQwFa.js +1 -0
  205. package/dist/client/assets/{useSuspenseQueries-DSwCaH3D.js → useSuspenseQueries-DohIOUYY.js} +1 -1
  206. package/dist/client/assets/{variant-calendar-DjuUZNmE.js → variant-calendar-DxXS9CiZ.js} +1 -1
  207. package/dist/client/assets/{view-mode-toggle-zxXxzJo1.js → view-mode-toggle-D2SvIjQW.js} +1 -1
  208. package/dist/client/index.html +2 -2
  209. package/dist/server/cli.js +24 -18
  210. package/dist/server/server.js +12 -12
  211. package/package.json +1 -1
  212. package/dist/client/assets/agent-icon-BvWwsV9-.js +0 -1
  213. package/dist/client/assets/ai-providers-Cc-Qaitu.js +0 -1
  214. package/dist/client/assets/app-editor-b3ZDQT3y.js +0 -1
  215. package/dist/client/assets/automations-DHGV1vHN.js +0 -1
  216. package/dist/client/assets/capability-load-error-ocuq5X52.js +0 -1
  217. package/dist/client/assets/category-editor-BnbZ-tzO.js +0 -1
  218. package/dist/client/assets/collection-detail-DJv60Khn.js +0 -1
  219. package/dist/client/assets/connection-detail-CkHKK3hC.js +0 -1
  220. package/dist/client/assets/context-menu-BukQHkkX.js +0 -1
  221. package/dist/client/assets/file-explorer-CE7vUpn6.js +0 -2
  222. package/dist/client/assets/github-repo-picker-BS2-yyCb.js +0 -1
  223. package/dist/client/assets/index-BpE19-ck.js +0 -1
  224. package/dist/client/assets/index-BvU5lMjs.js +0 -1
  225. package/dist/client/assets/index-D9mYZCKV.css +0 -1
  226. package/dist/client/assets/index-DVXwW1US.js +0 -173
  227. package/dist/client/assets/index-DsqZHRRi.js +0 -3
  228. package/dist/client/assets/index-lxZN2uXp.js +0 -1
  229. package/dist/client/assets/page-seo-sheet-CRRHJ6vi.js +0 -1
  230. package/dist/client/assets/popover-BIbjLTCp.js +0 -1
  231. package/dist/client/assets/post-editor-DeJ4iIDf.js +0 -1
  232. package/dist/client/assets/project-app-view-Bw4pBi_7.js +0 -1
  233. package/dist/client/assets/record-editor-BMbdlgjH.js +0 -1
  234. package/dist/client/assets/registry-D7x-icQ2.js +0 -2
  235. package/dist/client/assets/roles-BOurXkap.js +0 -1
  236. package/dist/client/assets/select-DtrgZFUN.js +0 -1
  237. package/dist/client/assets/seo-editor-D3daX9h9.js +0 -1
  238. package/dist/client/assets/settings-layout-CmO92Idf.js +0 -1
  239. package/dist/client/assets/shell-controls-C3e2T-jB.js +0 -1
  240. package/dist/client/assets/shell-route-loading-COjyAVLN.js +0 -1
  241. package/dist/client/assets/sortable.esm-D3HJ-J2L.js +0 -5
  242. package/dist/client/assets/store-registry-CVCe-t3Q.js +0 -2
  243. package/dist/client/assets/switch-CxpAoaO8.js +0 -1
  244. package/dist/client/assets/tabs-B2YmTAz6.js +0 -1
  245. package/dist/client/assets/toggle-group-B-GnyMpd.js +0 -1
  246. package/dist/client/assets/tools-list-D5fafb0R.js +0 -1
  247. package/dist/client/assets/tooltip-BN4g0v-x.js +0 -1
  248. package/dist/client/assets/use-navigate-to-agent-C9zrAPJx.js +0 -1
  249. package/dist/client/assets/use-org-fs-BToe7wyo.js +0 -1
  250. package/dist/client/assets/useInfiniteQuery-DnUFt-2J.js +0 -1
  251. package/dist/client/assets/useSuspenseInfiniteQuery-CPNNqGjW.js +0 -1
@@ -1,5 +0,0 @@
1
- import{D as Lt,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as It,v as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,af as z,al as ft}from"./index-B6CxQrCo.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as Rr,C as Ut}from"./connection-card-B_S6LeLq.js";import{C as Nr}from"./collection-search-DvBi3Q2M.js";import{C as Ir}from"./collection-tabs-B4wJfJxi.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-CFrqNmH9.js";import{e as Mn,d as On,c as Pn,a as Ln,b as kr,D as Mr}from"./dialog-Ql8kdDTa.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-CBX0QEUx.js";import{u as Vr}from"./use-mobile-C77wgjj_.js";import{F as De,b as je,c as Re,d as Ne,e as Ie,a as fn}from"./form-hBMUZ-LI.js";import{I as He}from"./input-92IYvOwC.js";import{S as Kr,a as Xr,b as Ur,c as Hr,d as ut}from"./select-DtrgZFUN.js";import{T as Yr}from"./textarea-tv37zNgD.js";import{b as Fn}from"./use-connection-u7lGziaM.js";import{n as At,c as Ht}from"./XCircle-C30_UXd3.js";import{s as Yt}from"./Star01-D_WMzpkz.js";import{ab as Wr}from"./agent-icon-BvWwsV9-.js";import{s as qr}from"./XClose-BnLOhLbC.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-0vbutknj.js";import{u as gn}from"./use-infinite-scroll-pt1aYNB9.js";import{a as Wt}from"./authenticate-and-persist-oauth-DakefadM.js";import{B as jt}from"./badge-wSwvHa02.js";import{T as qt,a as Gt,b as Jt}from"./tooltip-BN4g0v-x.js";import{u as to}from"./useSuspenseInfiniteQuery-CPNNqGjW.js";import{S as no,u as ro}from"./use-mcp-client-BKmxEbDP.js";import{i as pn}from"./ChevronUp-D4D_9neM.js";import{s as oo}from"./Plus-DK07_JoD.js";import{u as so}from"./studio-tools-zOdwK0zh.js";import{u as io}from"./use-ai-providers-D3giib4c.js";function sn(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function ki(t){const e=sn(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Mi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Oi(t){return sn(t).status==="attached"}function Pi(t){const e=sn(t).status;return e==="attached"||e==="detached"}function Li(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Fi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function zi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Bi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function ao({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Lt(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),K=E.envVarKeys.filter(Y=>!ae.has(Y));K.length>0&&d.setValue("env_vars",[...B,...K.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},j=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",R="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Xr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(At,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:j,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:R})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:j,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:R})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function co(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Lt(),v=u.useDeferredValue(f),j=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[R,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==R||e[3]!==T?(A=D=>{D!==R&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=R,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:po,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:K,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(go)??[],xe=Rr(ce),qe=new Set(ce.filter(ho).map(fo)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,K??!1,Y),L=R==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(uo),W=Ue.filter(lo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ut,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ut,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ut,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Jt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:R,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=j&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Ht,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==R||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:R==="connected"?"No connections yet":"No connections available"}),e[60]=R,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function lo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function uo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function fo(t){return t.app_name}function ho(t){return t.app_name}function go(t){return t?.items??[]}function po(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function $i({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Lt(),{data:j}=Tn.useSession(),C=Fn(),S=br(),R=xr(),T=b=>{e(!1),R({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await Wt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!j?.user?.id)){d(b.id);try{const w=Tr(b,v.id,j.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await Wt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(co,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(ao,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await Wt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Vi(){const{org:t}=Lt(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function mo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=Ft?u.useLayoutEffect:u.useEffect;function zt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function bo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=zt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Qt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Qt[t]==null?0:Qt[t]+1;return Qt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function xo(t){return"clientX"in t&&"clientY"in t}function Bt(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function yo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function kt(t){if(yo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return xo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wo(t){return t.matches(mn)?t:t.querySelector(mn)}const Co={display:"none"};function So(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Co},n)}function Do(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Ro(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function No(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Io={draggable:`
2
- To pick up a draggable item, press the space bar.
3
- While dragging, use the arrow keys to move the item.
4
- Press space again to drop the item in its new position, or press escape to cancel.
5
- `},Ao={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Eo(t){let{announcements:e=Ao,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Io}=t;const{announce:s,announcement:a}=jo(),c=Ct("DndLiveRegion"),[l,f]=u.useState(!1);if(u.useEffect(()=>{f(!0)},[]),Ro(u.useMemo(()=>({onDragStart(d){let{active:g}=d;s(e.onDragStart({active:g}))},onDragMove(d){let{active:g,over:m}=d;e.onDragMove&&s(e.onDragMove({active:g,over:m}))},onDragOver(d){let{active:g,over:m}=d;s(e.onDragOver({active:g,over:m}))},onDragEnd(d){let{active:g,over:m}=d;s(e.onDragEnd({active:g,over:m}))},onDragCancel(d){let{active:g,over:m}=d;s(e.onDragCancel({active:g,over:m}))}}),[s,e])),!l)return null;const h=z.createElement(z.Fragment,null,z.createElement(So,{id:r,value:o.draggable}),z.createElement(Do,{id:c,announcement:a}));return n?ft.createPortal(h,n):h}var V;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(V||(V={}));function Mt(){}function Ki(t,e){return u.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Xi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const be=Object.freeze({x:0,y:0});function Vn(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function To(t,e){const n=kt(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function Kn(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function _o(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function bn(t){let{left:e,top:n,height:r,width:o}=t;return[{x:e,y:n},{x:e+o,y:n},{x:e,y:n+r},{x:e+o,y:n+r}]}function Xn(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function xn(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Ui=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=xn(e,e.left,e.top),s=[];for(const a of r){const{id:c}=a,l=n.get(c);if(l){const f=Vn(xn(l),o);s.push({id:c,data:{droppableContainer:a,value:f}})}}return s.sort(Kn)},ko=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=bn(e),s=[];for(const a of r){const{id:c}=a,l=n.get(c);if(l){const f=bn(l),h=o.reduce((g,m,N)=>g+Vn(f[N],m),0),d=Number((h/4).toFixed(4));s.push({id:c,data:{droppableContainer:a,value:d}})}}return s.sort(Kn)};function Mo(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),o=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),a=o-r,c=s-n;if(r<o&&n<s){const l=e.width*e.height,f=t.width*t.height,h=a*c,d=h/(l+f-h);return Number(d.toFixed(4))}return 0}const Oo=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=[];for(const s of r){const{id:a}=s,c=n.get(a);if(c){const l=Mo(c,e);l>0&&o.push({id:a,data:{droppableContainer:s,value:l}})}}return o.sort(_o)};function Po(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Un(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:be}function Lo(t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((a,c)=>({...a,top:a.top+t*c.y,bottom:a.bottom+t*c.y,left:a.left+t*c.x,right:a.right+t*c.x}),{...n})}}const Fo=Lo(1);function Hn(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function zo(t,e,n){const r=Hn(e);if(!r)return t;const{scaleX:o,scaleY:s,x:a,y:c}=r,l=t.left-a-(1-o)*parseFloat(n),f=t.top-c-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),h=o?t.width/o:t.width,d=s?t.height/s:t.height;return{width:h,height:d,top:f,right:l+h,bottom:f+d,left:l}}const Bo={ignoreTransform:!1};function ot(t,e){e===void 0&&(e=Bo);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:h}=Q(t).getComputedStyle(t);f&&(n=zo(n,f,h))}const{top:r,left:o,width:s,height:a,bottom:c,right:l}=n;return{top:r,left:o,width:s,height:a,bottom:c,right:l}}function yn(t){return ot(t,{ignoreTransform:!0})}function $o(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function Vo(t,e){return e===void 0&&(e=Q(t).getComputedStyle(t)),e.position==="fixed"}function Ko(t,e){e===void 0&&(e=Q(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=e[o];return typeof s=="string"?n.test(s):!1})}function $t(t,e){const n=[];function r(o){if(e!=null&&n.length>=e||!o)return n;if(cn(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!yt(o)||zn(o)||n.includes(o))return n;const s=Q(t).getComputedStyle(o);return o!==t&&Ko(o,s)&&n.push(o),Vo(o,s)?n:r(o.parentNode)}return t?r(t):n}function Yn(t){const[e]=$t(t,1);return e??null}function Zt(t){return!Ft||!t?null:nt(t)?t:an(t)?cn(t)||t===rt(t).scrollingElement?window:yt(t)?t:null:null}function Wn(t){return nt(t)?t.scrollX:t.scrollLeft}function qn(t){return nt(t)?t.scrollY:t.scrollTop}function nn(t){return{x:Wn(t),y:qn(t)}}var X;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(X||(X={}));function Gn(t){return!Ft||!t?!1:t===document.scrollingElement}function Jn(t){const e={x:0,y:0},n=Gn(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},o=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,a=t.scrollTop>=r.y,c=t.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:a,isRight:c,maxScroll:r,minScroll:e}}const Xo={x:.2,y:.2};function Uo(t,e,n,r,o){let{top:s,left:a,right:c,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=Xo);const{isTop:f,isBottom:h,isLeft:d,isRight:g}=Jn(t),m={x:0,y:0},N={x:0,y:0},x={height:e.height*o.y,width:e.width*o.x};return!f&&s<=e.top+x.height?(m.y=X.Backward,N.y=r*Math.abs((e.top+x.height-s)/x.height)):!h&&l>=e.bottom-x.height&&(m.y=X.Forward,N.y=r*Math.abs((e.bottom-x.height-l)/x.height)),!g&&c>=e.right-x.width?(m.x=X.Forward,N.x=r*Math.abs((e.right-x.width-c)/x.width)):!d&&a<=e.left+x.width&&(m.x=X.Backward,N.x=r*Math.abs((e.left+x.width-a)/x.width)),{direction:m,speed:N}}function Ho(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:e,left:n,right:r,bottom:o}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:o,width:t.clientWidth,height:t.clientHeight}}function Qn(t){return t.reduce((e,n)=>tt(e,nn(n)),be)}function Yo(t){return t.reduce((e,n)=>e+Wn(n),0)}function Wo(t){return t.reduce((e,n)=>e+qn(n),0)}function Zn(t,e){if(e===void 0&&(e=ot),!t)return;const{top:n,left:r,bottom:o,right:s}=e(t);Yn(t)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const qo=[["x",["left","right"],Yo],["y",["top","bottom"],Wo]];class ln{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=$t(n),o=Qn(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,a,c]of qo)for(const l of a)Object.defineProperty(this,l,{get:()=>{const f=c(r),h=o[s]-f;return this.rect[l]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var o;(o=this.target)==null||o.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function Go(t){const{EventTarget:e}=Q(t);return t instanceof e?t:rt(t)}function en(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var fe;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(fe||(fe={}));function wn(t){t.preventDefault()}function Jo(t){t.stopPropagation()}var _;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(_||(_={}));const er={start:[_.Space,_.Enter],cancel:[_.Esc],end:[_.Space,_.Enter,_.Tab]},Qo=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case _.Right:return{...n,x:n.x+25};case _.Left:return{...n,x:n.x-25};case _.Down:return{...n,y:n.y+25};case _.Up:return{...n,y:n.y-25}}};class tr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new gt(rt(n)),this.windowListeners=new gt(Q(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&Zn(r),n(be)}handleKeyDown(e){if(Bt(e)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=er,coordinateGetter:a=Qo,scrollBehavior:c="smooth"}=o,{code:l}=e;if(s.end.includes(l)){this.handleEnd(e);return}if(s.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:f}=r.current,h=f?{x:f.left,y:f.top}:be;this.referenceCoordinates||(this.referenceCoordinates=h);const d=a(e,{active:n,context:r.current,currentCoordinates:h});if(d){const g=bt(d,h),m={x:0,y:0},{scrollableAncestors:N}=r.current;for(const x of N){const v=e.code,{isTop:j,isRight:C,isLeft:S,isBottom:R,maxScroll:T,minScroll:A}=Jn(x),p=Ho(x),y={x:Math.min(v===_.Right?p.right-p.width/2:p.right,Math.max(v===_.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(v===_.Down?p.bottom-p.height/2:p.bottom,Math.max(v===_.Down?p.top:p.top+p.height/2,d.y))},b=v===_.Right&&!C||v===_.Left&&!S,w=v===_.Down&&!R||v===_.Up&&!j;if(b&&y.x!==d.x){const I=x.scrollLeft+g.x,O=v===_.Right&&I<=T.x||v===_.Left&&I>=A.x;if(O&&!g.y){x.scrollTo({left:I,behavior:c});return}O?m.x=x.scrollLeft-I:m.x=v===_.Right?x.scrollLeft-T.x:x.scrollLeft-A.x,m.x&&x.scrollBy({left:-m.x,behavior:c});break}else if(w&&y.y!==d.y){const I=x.scrollTop+g.y,O=v===_.Down&&I<=T.y||v===_.Up&&I>=A.y;if(O&&!g.x){x.scrollTo({top:I,behavior:c});return}O?m.y=x.scrollTop-I:m.y=v===_.Down?x.scrollTop-T.y:x.scrollTop-A.y,m.y&&x.scrollBy({top:-m.y,behavior:c});break}}this.handleMove(e,tt(bt(d,this.referenceCoordinates),m))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}tr.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=er,onActivation:o}=e,{active:s}=n;const{code:a}=t.nativeEvent;if(r.start.includes(a)){const c=s.activatorNode.current;return c&&t.target!==c?!1:(t.preventDefault(),o?.({event:t.nativeEvent}),!0)}return!1}}];function Cn(t){return!!(t&&"distance"in t)}function Sn(t){return!!(t&&"delay"in t)}class dn{constructor(e,n,r){var o;r===void 0&&(r=Go(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:a}=s;this.props=e,this.events=n,this.document=rt(a),this.documentListeners=new gt(this.document),this.listeners=new gt(r),this.windowListeners=new gt(Q(a)),this.initialCoordinates=(o=kt(s))!=null?o:be,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.DragStart,wn),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),this.windowListeners.add(fe.ContextMenu,wn),this.documentListeners.add(fe.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Sn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Cn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:o}=this.props;o(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(fe.Click,Jo,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fe.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:a,options:{activationConstraint:c}}=s;if(!o)return;const l=(n=kt(e))!=null?n:be,f=bt(o,l);if(!r&&c){if(Cn(c)){if(c.tolerance!=null&&en(f,c.tolerance))return this.handleCancel();if(en(f,c.distance))return this.handleStart()}if(Sn(c)&&en(f,c.tolerance))return this.handleCancel();this.handlePending(c,f);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===_.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const Zo={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class nr extends dn{constructor(e){const{event:n}=e,r=rt(n.target);super(e,Zo,r)}}nr.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const es={move:{name:"mousemove"},end:{name:"mouseup"}};var rn;(function(t){t[t.RightClick=2]="RightClick"})(rn||(rn={}));class ts extends dn{constructor(e){super(e,es,rt(e.event.target))}}ts.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===rn.RightClick?!1:(r?.({event:n}),!0)}}];const tn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ns extends dn{constructor(e){super(e,tn)}static setup(){return window.addEventListener(tn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(tn.move.name,e)};function e(){}}}ns.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var pt;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(pt||(pt={}));var Ot;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ot||(Ot={}));function rs(t){let{acceleration:e,activator:n=pt.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:a=5,order:c=Ot.TreeOrder,pointerCoordinates:l,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:g}=t;const m=ss({delta:d,disabled:!s}),[N,x]=bo(),v=u.useRef({x:0,y:0}),j=u.useRef({x:0,y:0}),C=u.useMemo(()=>{switch(n){case pt.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case pt.DraggableRect:return o}},[n,o,l]),S=u.useRef(null),R=u.useCallback(()=>{const A=S.current;if(!A)return;const p=v.current.x*j.current.x,y=v.current.y*j.current.y;A.scrollBy(p,y)},[]),T=u.useMemo(()=>c===Ot.TreeOrder?[...f].reverse():f,[c,f]);u.useEffect(()=>{if(!s||!f.length||!C){x();return}for(const A of T){if(r?.(A)===!1)continue;const p=f.indexOf(A),y=h[p];if(!y)continue;const{direction:b,speed:w}=Uo(A,y,C,e,g);for(const I of["x","y"])m[I][b[I]]||(w[I]=0,b[I]=0);if(w.x>0||w.y>0){x(),S.current=A,N(R,a),v.current=w,j.current=b;return}}v.current={x:0,y:0},j.current={x:0,y:0},x()},[e,R,r,x,s,a,JSON.stringify(C),JSON.stringify(m),N,f,T,h,JSON.stringify(g)])}const os={x:{[X.Backward]:!1,[X.Forward]:!1},y:{[X.Backward]:!1,[X.Forward]:!1}};function ss(t){let{delta:e,disabled:n}=t;const r=_t(e);return wt(o=>{if(n||!r||!o)return os;const s={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[X.Backward]:o.x[X.Backward]||s.x===-1,[X.Forward]:o.x[X.Forward]||s.x===1},y:{[X.Backward]:o.y[X.Backward]||s.y===-1,[X.Forward]:o.y[X.Forward]||s.y===1}}},[n,e,r])}function is(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return wt(o=>{var s;return e==null?null:(s=r??o)!=null?s:null},[r,e])}function as(t,e){return u.useMemo(()=>t.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,r)}));return[...n,...s]},[]),[t,e])}var xt;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(xt||(xt={}));var on;(function(t){t.Optimized="optimized"})(on||(on={}));const Dn=new Map;function cs(t,e){let{dragging:n,dependencies:r,config:o}=e;const[s,a]=u.useState(null),{frequency:c,measure:l,strategy:f}=o,h=u.useRef(t),d=v(),g=mt(d),m=u.useCallback(function(j){j===void 0&&(j=[]),!g.current&&a(C=>C===null?j:C.concat(j.filter(S=>!C.includes(S))))},[g]),N=u.useRef(null),x=wt(j=>{if(d&&!n)return Dn;if(!j||j===Dn||h.current!==t||s!=null){const C=new Map;for(let S of t){if(!S)continue;if(s&&s.length>0&&!s.includes(S.id)&&S.rect.current){C.set(S.id,S.rect.current);continue}const R=S.node.current,T=R?new ln(l(R),R):null;S.rect.current=T,T&&C.set(S.id,T)}return C}return j},[t,s,n,d,l]);return u.useEffect(()=>{h.current=t},[t]),u.useEffect(()=>{d||m()},[n,d]),u.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),u.useEffect(()=>{d||typeof c!="number"||N.current!==null||(N.current=setTimeout(()=>{m(),N.current=null},c))},[c,d,m,...r]),{droppableRects:x,measureDroppableContainers:m,measuringScheduled:s!=null};function v(){switch(f){case xt.Always:return!1;case xt.BeforeDragging:return n;default:return!n}}}function un(t,e){return wt(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function ls(t,e){return un(t,e)}function ds(t){let{callback:e,disabled:n}=t;const r=zt(e),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function Vt(t){let{callback:e,disabled:n}=t;const r=zt(e),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function us(t){return new ln(ot(t),t)}function jn(t,e,n){e===void 0&&(e=us);const[r,o]=u.useState(null);function s(){o(l=>{if(!t)return null;if(t.isConnected===!1){var f;return(f=l??n)!=null?f:null}const h=e(t);return JSON.stringify(l)===JSON.stringify(h)?l:h})}const a=ds({callback(l){if(t)for(const f of l){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(t)){s();break}}}}),c=Vt({callback:s});return me(()=>{s(),t?(c?.observe(t),a?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),a?.disconnect())},[t]),r}function fs(t){const e=un(t);return Un(t,e)}const Rn=[];function hs(t){const e=u.useRef(t),n=wt(r=>t?r&&r!==Rn&&t&&e.current&&t.parentNode===e.current.parentNode?r:$t(t):Rn,[t]);return u.useEffect(()=>{e.current=t},[t]),n}function gs(t){const[e,n]=u.useState(null),r=u.useRef(t),o=u.useCallback(s=>{const a=Zt(s.target);a&&n(c=>c?(c.set(a,nn(a)),new Map(c)):null)},[]);return u.useEffect(()=>{const s=r.current;if(t!==s){a(s);const c=t.map(l=>{const f=Zt(l);return f?(f.addEventListener("scroll",o,{passive:!0}),[f,nn(f)]):null}).filter(l=>l!=null);n(c.length?new Map(c):null),r.current=t}return()=>{a(t),a(s)};function a(c){c.forEach(l=>{const f=Zt(l);f?.removeEventListener("scroll",o)})}},[o,t]),u.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,a)=>tt(s,a),be):Qn(t):be,[t,e])}function Nn(t,e){e===void 0&&(e=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},e),u.useEffect(()=>{const r=t!==be;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?bt(t,n.current):be}function ps(t){u.useEffect(()=>{if(!Ft)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function vs(t,e){return u.useMemo(()=>t.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=a=>{s(a,e)},n},{}),[t,e])}function rr(t){return u.useMemo(()=>t?$o(t):null,[t])}const In=[];function ms(t,e){e===void 0&&(e=ot);const[n]=t,r=rr(n?Q(n):null),[o,s]=u.useState(In);function a(){s(()=>t.length?t.map(l=>Gn(l)?r:new ln(e(l),l)):In)}const c=Vt({callback:a});return me(()=>{c?.disconnect(),a(),t.forEach(l=>c?.observe(l))},[t]),o}function or(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return yt(e)?e:t}function bs(t){let{measure:e}=t;const[n,r]=u.useState(null),o=u.useCallback(f=>{for(const{target:h}of f)if(yt(h)){r(d=>{const g=e(h);return d?{...d,width:g.width,height:g.height}:g});break}},[e]),s=Vt({callback:o}),a=u.useCallback(f=>{const h=or(f);s?.disconnect(),h&&s?.observe(h),r(h?e(h):null)},[e,s]),[c,l]=Tt(a);return u.useMemo(()=>({nodeRef:c,rect:n,setRef:l}),[n,c,l])}const xs=[{sensor:nr,options:{}},{sensor:tr,options:{}}],ys={current:{}},Et={draggable:{measure:yn},droppable:{measure:yn,strategy:xt.WhileDragging,frequency:on.Optimized},dragOverlay:{measure:ot}};class vt extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const ws={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Mt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Et,measureDroppableContainers:Mt,windowRect:null,measuringScheduled:!1},sr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Mt,draggableNodes:new Map,over:null,measureDroppableContainers:Mt},St=u.createContext(sr),ir=u.createContext(ws);function Cs(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vt}}}function Ss(t,e){switch(e.type){case V.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case V.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case V.DragEnd:case V.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case V.RegisterDroppable:{const{element:n}=e,{id:r}=n,o=new vt(t.droppable.containers);return o.set(r,n),{...t,droppable:{...t.droppable,containers:o}}}case V.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const a=new vt(t.droppable.containers);return a.set(n,{...s,disabled:o}),{...t,droppable:{...t.droppable,containers:a}}}case V.UnregisterDroppable:{const{id:n,key:r}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const s=new vt(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function Ds(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:o}=u.useContext(St),s=_t(r),a=_t(n?.id);return u.useEffect(()=>{if(!e&&!r&&s&&a!=null){if(!Bt(s)||document.activeElement===s.target)return;const c=o.get(a);if(!c)return;const{activatorNode:l,node:f}=c;if(!l.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[l.current,f.current]){if(!h)continue;const d=wo(h);if(d){d.focus();break}}})}},[r,e,o,a,s]),null}function ar(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((o,s)=>s({transform:o,...r}),n):n}function js(t){return u.useMemo(()=>({draggable:{...Et.draggable,...t?.draggable},droppable:{...Et.droppable,...t?.droppable},dragOverlay:{...Et.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function Rs(t){let{activeNode:e,measure:n,initialRect:r,config:o=!0}=t;const s=u.useRef(!1),{x:a,y:c}=typeof o=="boolean"?{x:o,y:o}:o;me(()=>{if(!a&&!c||!e){s.current=!1;return}if(s.current||!r)return;const f=e?.node.current;if(!f||f.isConnected===!1)return;const h=n(f),d=Un(h,r);if(a||(d.x=0),c||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=Yn(f);g&&g.scrollBy({top:d.y,left:d.x})}},[e,a,c,r,n])}const Kt=u.createContext({...be,scaleX:1,scaleY:1});var Xe;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Xe||(Xe={}));const Hi=u.memo(function(e){var n,r,o,s;let{id:a,accessibility:c,autoScroll:l=!0,children:f,sensors:h=xs,collisionDetection:d=Oo,measuring:g,modifiers:m,...N}=e;const x=u.useReducer(Ss,void 0,Cs),[v,j]=x,[C,S]=No(),[R,T]=u.useState(Xe.Uninitialized),A=R===Xe.Initialized,{draggable:{active:p,nodes:y,translate:b},droppable:{containers:w}}=v,I=p!=null?y.get(p):null,O=u.useRef({initial:null,translated:null}),k=u.useMemo(()=>{var F;return p!=null?{id:p,data:(F=I?.data)!=null?F:ys,rect:O}:null},[p,I]),E=u.useRef(null),[B,ae]=u.useState(null),[K,Y]=u.useState(null),ce=mt(N,Object.values(N)),xe=Ct("DndDescribedBy",a),qe=u.useMemo(()=>w.getEnabled(),[w]),$=js(g),{droppableRects:U,measureDroppableContainers:he,measuringScheduled:Ae}=cs(qe,{dragging:A,dependencies:[b.x,b.y],config:$.droppable}),L=is(y,p),Ue=u.useMemo(()=>K?kt(K):null,[K]),Z=te(),W=ls(L,$.draggable.measure);Rs({activeNode:p!=null?y.get(p):null,config:Z.layoutShiftCompensation,initialRect:W,measure:$.draggable.measure});const M=jn(L,$.draggable.measure,W),Ee=jn(L?L.parentElement:null),q=u.useRef({activatorEvent:null,active:null,activeNode:L,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:w,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=w.getNodeFor((n=q.current.over)==null?void 0:n.id),ee=bs({measure:$.dragOverlay.measure}),Te=(r=ee.nodeRef.current)!=null?r:L,ye=A?(o=ee.rect)!=null?o:M:null,Ge=!!(ee.nodeRef.current&&ee.rect),_e=fs(Ge?null:M),st=rr(Te?Q(Te):null),ne=hs(A?ge??L:null),Fe=ms(ne),pe=ar(m,{transform:{x:b.x-_e.x,y:b.y-_e.y,scaleX:1,scaleY:1},activatorEvent:K,active:k,activeNodeRect:M,containerNodeRect:Ee,draggingNodeRect:ye,over:q.current.over,overlayNodeRect:ee.rect,scrollableAncestors:ne,scrollableAncestorRects:Fe,windowRect:st}),ke=Ue?tt(Ue,b):null,Je=gs(ne),it=Nn(Je),at=Nn(Je,[M]),we=tt(pe,it),re=ye?Fo(ye,pe):null,le=k&&re?d({active:k,collisionRect:re,droppableRects:U,droppableContainers:qe,pointerCoordinates:ke}):null,Me=Xn(le,"id"),[G,Oe]=u.useState(null),Qe=Ge?pe:tt(pe,at),D=Po(Qe,(s=G?.rect)!=null?s:null,M),P=u.useRef(null),de=u.useCallback((F,oe)=>{let{sensor:se,options:$e}=oe;if(E.current==null)return;const ue=y.get(E.current);if(!ue)return;const ie=F.nativeEvent,Ce=new se({active:E.current,activeNode:ue,event:ie,options:$e,context:q,onAbort(H){if(!y.get(H))return;const{onDragAbort:Se}=ce.current,Pe={id:H};Se?.(Pe),C({type:"onDragAbort",event:Pe})},onPending(H,Ve,Se,Pe){if(!y.get(H))return;const{onDragPending:lt}=ce.current,Ke={id:H,constraint:Ve,initialCoordinates:Se,offset:Pe};lt?.(Ke),C({type:"onDragPending",event:Ke})},onStart(H){const Ve=E.current;if(Ve==null)return;const Se=y.get(Ve);if(!Se)return;const{onDragStart:Pe}=ce.current,ct={activatorEvent:ie,active:{id:Ve,data:Se.data,rect:O}};ft.unstable_batchedUpdates(()=>{Pe?.(ct),T(Xe.Initializing),j({type:V.DragStart,initialCoordinates:H,active:Ve}),C({type:"onDragStart",event:ct}),ae(P.current),Y(ie)})},onMove(H){j({type:V.DragMove,coordinates:H})},onEnd:et(V.DragEnd),onCancel:et(V.DragCancel)});P.current=Ce;function et(H){return async function(){const{active:Se,collisions:Pe,over:ct,scrollAdjustedTranslate:lt}=q.current;let Ke=null;if(Se&&lt){const{cancelDrop:dt}=ce.current;Ke={activatorEvent:ie,active:Se,collisions:Pe,delta:lt,over:ct},H===V.DragEnd&&typeof dt=="function"&&await Promise.resolve(dt(Ke))&&(H=V.DragCancel)}E.current=null,ft.unstable_batchedUpdates(()=>{j({type:H}),T(Xe.Uninitialized),Oe(null),ae(null),Y(null),P.current=null;const dt=H===V.DragEnd?"onDragEnd":"onDragCancel";if(Ke){const Xt=ce.current[dt];Xt?.(Ke),C({type:dt,event:Ke})}})}}},[y]),ze=u.useCallback((F,oe)=>(se,$e)=>{const ue=se.nativeEvent,ie=y.get($e);if(E.current!==null||!ie||ue.dndKit||ue.defaultPrevented)return;const Ce={active:ie};F(se,oe.options,Ce)===!0&&(ue.dndKit={capturedBy:oe.sensor},E.current=$e,de(se,oe))},[y,de]),ve=as(h,ze);ps(h),me(()=>{M&&R===Xe.Initializing&&T(Xe.Initialized)},[M,R]),u.useEffect(()=>{const{onDragMove:F}=ce.current,{active:oe,activatorEvent:se,collisions:$e,over:ue}=q.current;if(!oe||!se)return;const ie={active:oe,activatorEvent:se,collisions:$e,delta:{x:we.x,y:we.y},over:ue};ft.unstable_batchedUpdates(()=>{F?.(ie),C({type:"onDragMove",event:ie})})},[we.x,we.y]),u.useEffect(()=>{const{active:F,activatorEvent:oe,collisions:se,droppableContainers:$e,scrollAdjustedTranslate:ue}=q.current;if(!F||E.current==null||!oe||!ue)return;const{onDragOver:ie}=ce.current,Ce=$e.get(Me),et=Ce&&Ce.rect.current?{id:Ce.id,rect:Ce.rect.current,data:Ce.data,disabled:Ce.disabled}:null,H={active:F,activatorEvent:oe,collisions:se,delta:{x:ue.x,y:ue.y},over:et};ft.unstable_batchedUpdates(()=>{Oe(et),ie?.(H),C({type:"onDragOver",event:H})})},[Me]),me(()=>{q.current={activatorEvent:K,active:k,activeNode:L,collisionRect:re,collisions:le,droppableRects:U,draggableNodes:y,draggingNode:Te,draggingNodeRect:ye,droppableContainers:w,over:G,scrollableAncestors:ne,scrollAdjustedTranslate:we},O.current={initial:ye,translated:re}},[k,L,le,re,y,Te,ye,U,w,G,ne,we]),rs({...Z,delta:b,draggingRect:re,pointerCoordinates:ke,scrollableAncestors:ne,scrollableAncestorRects:Fe});const Ze=u.useMemo(()=>({active:k,activeNode:L,activeNodeRect:M,activatorEvent:K,collisions:le,containerNodeRect:Ee,dragOverlay:ee,draggableNodes:y,droppableContainers:w,droppableRects:U,over:G,measureDroppableContainers:he,scrollableAncestors:ne,scrollableAncestorRects:Fe,measuringConfiguration:$,measuringScheduled:Ae,windowRect:st}),[k,L,M,K,le,Ee,ee,y,w,U,G,he,ne,Fe,$,Ae,st]),Be=u.useMemo(()=>({activatorEvent:K,activators:ve,active:k,activeNodeRect:M,ariaDescribedById:{draggable:xe},dispatch:j,draggableNodes:y,over:G,measureDroppableContainers:he}),[K,ve,k,M,j,xe,y,G,he]);return z.createElement($n.Provider,{value:S},z.createElement(St.Provider,{value:Be},z.createElement(ir.Provider,{value:Ze},z.createElement(Kt.Provider,{value:D},f)),z.createElement(Ds,{disabled:c?.restoreFocus===!1})),z.createElement(Eo,{...c,hiddenTextDescribedById:xe}));function te(){const F=B?.autoScrollEnabled===!1,oe=typeof l=="object"?l.enabled===!1:l===!1,se=A&&!F&&!oe;return typeof l=="object"?{...l,enabled:se}:{enabled:se}}}),Ns=u.createContext(null),An="button",Is="Draggable";function As(t){let{id:e,data:n,disabled:r=!1,attributes:o}=t;const s=Ct(Is),{activators:a,activatorEvent:c,active:l,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:g}=u.useContext(St),{role:m=An,roleDescription:N="draggable",tabIndex:x=0}=o??{},v=l?.id===e,j=u.useContext(v?Kt:Ns),[C,S]=Tt(),[R,T]=Tt(),A=vs(a,e),p=mt(n);me(()=>(d.set(e,{id:e,key:s,node:C,activatorNode:R,data:p}),()=>{const b=d.get(e);b&&b.key===s&&d.delete(e)}),[d,e]);const y=u.useMemo(()=>({role:m,tabIndex:x,"aria-disabled":r,"aria-pressed":v&&m===An?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[r,m,x,v,N,h.draggable]);return{active:l,activatorEvent:c,activeNodeRect:f,attributes:y,isDragging:v,listeners:r?void 0:A,node:C,over:g,setNodeRef:S,setActivatorNodeRef:T,transform:j}}function cr(){return u.useContext(ir)}const Es="Droppable",Ts={timeout:25};function _s(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:o}=t;const s=Ct(Es),{active:a,dispatch:c,over:l,measureDroppableContainers:f}=u.useContext(St),h=u.useRef({disabled:n}),d=u.useRef(!1),g=u.useRef(null),m=u.useRef(null),{disabled:N,updateMeasurementsFor:x,timeout:v}={...Ts,...o},j=mt(x??r),C=u.useCallback(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{f(Array.isArray(j.current)?j.current:[j.current]),m.current=null},v)},[v]),S=Vt({callback:C,disabled:N||!a}),R=u.useCallback((y,b)=>{S&&(b&&(S.unobserve(b),d.current=!1),y&&S.observe(y))},[S]),[T,A]=Tt(R),p=mt(e);return u.useEffect(()=>{!S||!T.current||(S.disconnect(),d.current=!1,S.observe(T.current))},[T,S]),u.useEffect(()=>(c({type:V.RegisterDroppable,element:{id:r,key:s,disabled:n,node:T,rect:g,data:p}}),()=>c({type:V.UnregisterDroppable,key:s,id:r})),[r]),u.useEffect(()=>{n!==h.current.disabled&&(c({type:V.SetDroppableDisabled,id:r,key:s,disabled:n}),h.current.disabled=n)},[r,s,n,c]),{active:a,rect:g,isOver:l?.id===r,node:T,over:l,setNodeRef:A}}function ks(t){let{animation:e,children:n}=t;const[r,o]=u.useState(null),[s,a]=u.useState(null),c=_t(n);return!n&&!r&&c&&o(c),me(()=>{if(!s)return;const l=r?.key,f=r?.props.id;if(l==null||f==null){o(null);return}Promise.resolve(e(f,s)).then(()=>{o(null)})},[e,r,s]),z.createElement(z.Fragment,null,n,r?u.cloneElement(r,{ref:a}):null)}const Ms={x:0,y:0,scaleX:1,scaleY:1};function Os(t){let{children:e}=t;return z.createElement(St.Provider,{value:sr},z.createElement(Kt.Provider,{value:Ms},e))}const Ps={position:"fixed",touchAction:"none"},Ls=t=>Bt(t)?"transform 250ms ease":void 0,Fs=u.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:a,rect:c,style:l,transform:f,transition:h=Ls}=t;if(!c)return null;const d=o?f:{...f,scaleX:1,scaleY:1},g={...Ps,width:c.width,height:c.height,top:c.top,left:c.left,transform:We.Transform.toString(d),transformOrigin:o&&r?To(r,c):void 0,transition:typeof h=="function"?h(r):h,...l};return z.createElement(n,{className:a,style:g,ref:e},s)}),zs=t=>e=>{let{active:n,dragOverlay:r}=e;const o={},{styles:s,className:a}=t;if(s!=null&&s.active)for(const[c,l]of Object.entries(s.active))l!==void 0&&(o[c]=n.node.style.getPropertyValue(c),n.node.style.setProperty(c,l));if(s!=null&&s.dragOverlay)for(const[c,l]of Object.entries(s.dragOverlay))l!==void 0&&r.node.style.setProperty(c,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,f]of Object.entries(o))n.node.style.setProperty(l,f);a!=null&&a.active&&n.node.classList.remove(a.active)}},Bs=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:We.Transform.toString(e)},{transform:We.Transform.toString(n)}]},$s={duration:250,easing:"ease",keyframes:Bs,sideEffects:zs({styles:{active:{opacity:"0"}}})};function Vs(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=t;return zt((s,a)=>{if(e===null)return;const c=n.get(s);if(!c)return;const l=c.node.current;if(!l)return;const f=or(a);if(!f)return;const{transform:h}=Q(a).getComputedStyle(a),d=Hn(h);if(!d)return;const g=typeof e=="function"?e:Ks(e);return Zn(l,o.draggable.measure),g({active:{id:s,data:c.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(f)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function Ks(t){const{duration:e,easing:n,sideEffects:r,keyframes:o}={...$s,...t};return s=>{let{active:a,dragOverlay:c,transform:l,...f}=s;if(!e)return;const h={x:c.rect.left-a.rect.left,y:c.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/c.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/c.rect.height:1},g={x:l.x-h.x,y:l.y-h.y,...d},m=o({...f,active:a,dragOverlay:c,transform:{initial:l,final:g}}),[N]=m,x=m[m.length-1];if(JSON.stringify(N)===JSON.stringify(x))return;const v=r?.({active:a,dragOverlay:c,...f}),j=c.node.animate(m,{duration:e,easing:n,fill:"forwards"});return new Promise(C=>{j.onfinish=()=>{v?.(),C()}})}}let En=0;function Xs(t){return u.useMemo(()=>{if(t!=null)return En++,En},[t])}const Yi=z.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:a,wrapperElement:c="div",className:l,zIndex:f=999}=t;const{activatorEvent:h,active:d,activeNodeRect:g,containerNodeRect:m,draggableNodes:N,droppableContainers:x,dragOverlay:v,over:j,measuringConfiguration:C,scrollableAncestors:S,scrollableAncestorRects:R,windowRect:T}=cr(),A=u.useContext(Kt),p=Xs(d?.id),y=ar(a,{activatorEvent:h,active:d,activeNodeRect:g,containerNodeRect:m,draggingNodeRect:v.rect,over:j,overlayNodeRect:v.rect,scrollableAncestors:S,scrollableAncestorRects:R,transform:A,windowRect:T}),b=un(g),w=Vs({config:r,draggableNodes:N,droppableContainers:x,measuringConfiguration:C}),I=b?v.setRef:void 0;return z.createElement(Os,null,z.createElement(ks,{animation:w},d&&p?z.createElement(Fs,{key:p,id:d.id,ref:I,as:c,activatorEvent:h,adjustScale:e,className:l,transition:s,rect:b,style:{zIndex:f,...o},transform:y},n):null))});function lr(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function Us(t,e){return t.reduce((n,r,o)=>{const s=e.get(r);return s&&(n[o]=s),n},Array(t.length))}function Rt(t){return t!==null&&t>=0}function Hs(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ys(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const dr=t=>{let{rects:e,activeIndex:n,overIndex:r,index:o}=t;const s=lr(e,r,n),a=e[o],c=s[o];return!c||!a?null:{x:c.left-a.left,y:c.top-a.top,scaleX:c.width/a.width,scaleY:c.height/a.height}},Nt={scaleX:1,scaleY:1},Wi=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:a}=t;const c=(e=s[n])!=null?e:r;if(!c)return null;if(o===n){const f=s[a];return f?{x:0,y:n<a?f.top+f.height-(c.top+c.height):f.top-c.top,...Nt}:null}const l=Ws(s,o,n);return o>n&&o<=a?{x:0,y:-c.height-l,...Nt}:o<n&&o>=a?{x:0,y:c.height+l,...Nt}:{x:0,y:0,...Nt}};function Ws(t,e,n){const r=t[e],o=t[e-1],s=t[e+1];return r?n<e?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const ur="Sortable",fr=z.createContext({activeIndex:-1,containerId:ur,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:dr,disabled:{draggable:!1,droppable:!1}});function qi(t){let{children:e,id:n,items:r,strategy:o=dr,disabled:s=!1}=t;const{active:a,dragOverlay:c,droppableRects:l,over:f,measureDroppableContainers:h}=cr(),d=Ct(ur,n),g=c.rect!==null,m=u.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),N=a!=null,x=a?m.indexOf(a.id):-1,v=f?m.indexOf(f.id):-1,j=u.useRef(m),C=!Hs(m,j.current),S=v!==-1&&x===-1||C,R=Ys(s);me(()=>{C&&N&&h(m)},[C,m,N,h]),u.useEffect(()=>{j.current=m},[m]);const T=u.useMemo(()=>({activeIndex:x,containerId:d,disabled:R,disableTransforms:S,items:m,overIndex:v,useDragOverlay:g,sortedRects:Us(m,l),strategy:o}),[x,d,R.draggable,R.droppable,S,m,v,l,g,o]);return z.createElement(fr.Provider,{value:T},e)}const qs=t=>{let{id:e,items:n,activeIndex:r,overIndex:o}=t;return lr(n,r,o).indexOf(e)},Gs=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:o,items:s,newIndex:a,previousItems:c,previousContainerId:l,transition:f}=t;return!f||!r||c!==s&&o===a?!1:n?!0:a!==o&&e===l},Js={duration:200,easing:"ease"},hr="transform",Qs=We.Transition.toString({property:hr,duration:0,easing:"linear"}),Zs={roleDescription:"sortable"};function ei(t){let{disabled:e,index:n,node:r,rect:o}=t;const[s,a]=u.useState(null),c=u.useRef(n);return me(()=>{if(!e&&n!==c.current&&r.current){const l=o.current;if(l){const f=ot(r.current,{ignoreTransform:!0}),h={x:l.left-f.left,y:l.top-f.top,scaleX:l.width/f.width,scaleY:l.height/f.height};(h.x||h.y)&&a(h)}}n!==c.current&&(c.current=n)},[e,n,r,o]),u.useEffect(()=>{s&&a(null)},[s]),s}function Gi(t){let{animateLayoutChanges:e=Gs,attributes:n,disabled:r,data:o,getNewIndex:s=qs,id:a,strategy:c,resizeObserverConfig:l,transition:f=Js}=t;const{items:h,containerId:d,activeIndex:g,disabled:m,disableTransforms:N,sortedRects:x,overIndex:v,useDragOverlay:j,strategy:C}=u.useContext(fr),S=ti(r,m),R=h.indexOf(a),T=u.useMemo(()=>({sortable:{containerId:d,index:R,items:h},...o}),[d,o,R,h]),A=u.useMemo(()=>h.slice(h.indexOf(a)),[h,a]),{rect:p,node:y,isOver:b,setNodeRef:w}=_s({id:a,data:T,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...l}}),{active:I,activatorEvent:O,activeNodeRect:k,attributes:E,setNodeRef:B,listeners:ae,isDragging:K,over:Y,setActivatorNodeRef:ce,transform:xe}=As({id:a,data:T,attributes:{...Zs,...n},disabled:S.draggable}),qe=mo(w,B),$=!!I,U=$&&!N&&Rt(g)&&Rt(v),he=!j&&K,Ae=he&&U?xe:null,Ue=U?Ae??(c??C)({rects:x,activeNodeRect:k,activeIndex:g,overIndex:v,index:R}):null,Z=Rt(g)&&Rt(v)?s({id:a,items:h,activeIndex:g,overIndex:v}):R,W=I?.id,M=u.useRef({activeId:W,items:h,newIndex:Z,containerId:d}),Ee=h!==M.current.items,q=e({active:I,containerId:d,isDragging:K,isSorting:$,id:a,index:R,items:h,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:f,wasDragging:M.current.activeId!=null}),ge=ei({disabled:!q,index:R,node:y,rect:p});return u.useEffect(()=>{$&&M.current.newIndex!==Z&&(M.current.newIndex=Z),d!==M.current.containerId&&(M.current.containerId=d),h!==M.current.items&&(M.current.items=h)},[$,Z,d,h]),u.useEffect(()=>{if(W===M.current.activeId)return;if(W!=null&&M.current.activeId==null){M.current.activeId=W;return}const Te=setTimeout(()=>{M.current.activeId=W},50);return()=>clearTimeout(Te)},[W]),{active:I,activeIndex:g,attributes:E,data:T,rect:p,index:R,newIndex:Z,items:h,isOver:b,isSorting:$,isDragging:K,listeners:ae,node:y,overIndex:v,over:Y,setNodeRef:qe,setActivatorNodeRef:ce,setDroppableNodeRef:w,setDraggableNodeRef:B,transform:ge??Ue,transition:ee()};function ee(){if(ge||Ee&&M.current.newIndex===R)return Qs;if(!(he&&!Bt(O)||!f)&&($||q))return We.Transition.toString({...f,property:hr})}}function ti(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function Pt(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const ni=[_.Down,_.Right,_.Up,_.Left],Ji=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:a,scrollableAncestors:c}}=e;if(ni.includes(t.code)){if(t.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const g=o.get(d.id);if(g)switch(t.code){case _.Down:r.top<g.top&&l.push(d);break;case _.Up:r.top>g.top&&l.push(d);break;case _.Left:r.left>g.left&&l.push(d);break;case _.Right:r.left<g.left&&l.push(d);break}});const f=ko({collisionRect:r,droppableRects:o,droppableContainers:l});let h=Xn(f,"id");if(h===a?.id&&f.length>1&&(h=f[1].id),h!=null){const d=s.get(n.id),g=s.get(h),m=g?o.get(g.id):null,N=g?.node.current;if(N&&m&&d&&g){const v=$t(N).some((A,p)=>c[p]!==A),j=gr(d,g),C=ri(d,g),S=v||!j?{x:0,y:0}:{x:C?r.width-m.width:0,y:C?r.height-m.height:0},R={x:m.left,y:m.top};return S.x&&S.y?R:bt(R,S)}}}};function gr(t,e){return!Pt(t)||!Pt(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function ri(t,e){return!Pt(t)||!Pt(e)||!gr(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}export{$i as A,We as C,Hi as D,tr as K,nr as P,qi as S,Xi as a,Ki as b,Ui as c,Gi as d,Fi as e,ki as f,Li as g,Bi as h,Oi as i,Mi as j,Yi as k,lr as l,zi as m,Pi as n,As as o,sn as r,Ji as s,Vi as u,Wi as v};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DmIz6dSp.js","assets/index-B6CxQrCo.js","assets/index-D9mYZCKV.css","assets/XCircle-C30_UXd3.js","assets/CheckCircle-uEcNv3oG.js","assets/Settings02-CMY7mFtN.js","assets/use-mcp-client-BKmxEbDP.js","assets/auth-DLMAAdjO.js","assets/useInfiniteQuery-DnUFt-2J.js","assets/use-infinite-scroll-pt1aYNB9.js","assets/studio-tools-zOdwK0zh.js","assets/badge-wSwvHa02.js","assets/input-92IYvOwC.js","assets/dropdown-menu-CIAjydh3.js","assets/ChevronUp-D4D_9neM.js","assets/ChevronRight-Z0q9tr5K.js","assets/DotsVertical-BXAKlKX4.js","assets/table-BpbB_kJT.js","assets/toggle-group-B-GnyMpd.js","assets/use-view-mode-Bkt4wZfz.js","assets/use-mobile-C77wgjj_.js","assets/FilterLines-CemhGOOA.js","assets/Globe01-C05BMTjz.js","assets/SearchMd-CF0EzaSp.js","assets/dialog-Ql8kdDTa.js","assets/X-BC75c88P.js","assets/AlertCircle--rPujN3Y.js","assets/Upload01-BIfi-RBp.js","assets/alert-dialog-B4gO4yN5.js","assets/card-C45fkaVO.js","assets/Trash01-pwMDa2Co.js","assets/label-ClPdqpUd.js","assets/select-DtrgZFUN.js","assets/tooltip-BN4g0v-x.js","assets/ChevronDown-DZjF3Thv.js","assets/switch-CxpAoaO8.js","assets/textarea-tv37zNgD.js","assets/checkbox-TzOn0Djh.js","assets/Eye-Cov1iekv.js","assets/LinkExternal01-DI4shoup.js","assets/use-copy-BHyTm1ci.js","assets/Key01-Zbo9TQ6M.js","assets/Plus-DK07_JoD.js","assets/mcp-oauth-DTOnM3tW.js","assets/Play-D612TCCW.js"])))=>i.map(i=>d[i]);
2
- import{c as m,b as n,e as c,j as t,i as p,r as l,ak as f}from"./index-B6CxQrCo.js";import{R as u}from"./require-capability-BaKHYhiM.js";import"./use-capability-JneQ7Vlv.js";import"./access-gate-Ddakg94Z.js";import"./capability-load-error-ocuq5X52.js";const g=l.lazy(()=>f(()=>import("./registry-layout-DmIz6dSp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{r as c,j as i,U as C,Z as y,a2 as T,V as I,bK as M,bJ as H,X as U,c as z,l as g}from"./index-B6CxQrCo.js";var m="Switch",[A]=U(m),[q,L]=A(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(a){return a?"checked":"unchecked"}var X=E,$=R;function F(a){const e=z.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(X,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{F as S};
@@ -1 +0,0 @@
1
- import{r as v,j as d,ba as k,U as p,V as h,bb as y,X as M,ah as P,a2 as S,ai as V,bc as F,Y as D,c as x,l as g}from"./index-B6CxQrCo.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,T]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=T(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=T(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:h(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:h(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:h(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=T(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function U(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function X(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Y(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{O as T,U as a,X as b,Y as c};
@@ -1 +0,0 @@
1
- import{r as x,a2 as b,j as c,U as m,V as k,af as p,ba as M,bb as T,ah as S,bc as A,X as F,bE as $,c as P,l as C}from"./index-B6CxQrCo.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,U]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",E=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=U(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});E.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=h,L=E;const X=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),N=x.createContext({size:"default",variant:"default"});function J(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(N.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function K(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(N),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(X({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{J as T,K as a};
@@ -1 +0,0 @@
1
- import{c as h,D as I,K as T,q as b,a6 as C,ac as k,j as o}from"./index-B6CxQrCo.js";import{i as N}from"./mcp-oauth-DTOnM3tW.js";import{B as x}from"./badge-wSwvHa02.js";import{T as y,a as j,b as g,c as S}from"./tooltip-BN4g0v-x.js";import{g as _}from"./types-DMnh_mjG.js";import{s as $}from"./Eye-Cov1iekv.js";import{s as A}from"./Star01-D_WMzpkz.js";import{ap as w}from"./agent-icon-BvWwsV9-.js";function D(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=b,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>N({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const H=[{key:"readOnlyHint",label:"Read-only",Icon:$,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function M(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=_(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?H.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=S,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(P)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function P(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{M as T,D as u};
@@ -1 +0,0 @@
1
- import{r as a,j as c,U as S,ai as Z,a2 as J,a3 as Q,Z as H,T as ee,V as C,Y as $,a1 as te,W as G,_ as oe,$ as re,X as ne,dx as se,a0 as ae,c as j,l as ie}from"./index-B6CxQrCo.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[y,m]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},m=ye(y,g.getBoundingClientRect()),w=Ce(y,m),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,y={x:T.clientX,y:T.clientY},m=i?.contains(g)||u?.contains(g),w=!we(y,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),me=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(me,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=U,Oe=B,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ne as T,le as V,Ie as a,Me as b,Ae as c};
@@ -1 +0,0 @@
1
- import{L as v,r as f,c as C,j as K,b as j,D as M,a as N}from"./index-B6CxQrCo.js";import{u as F}from"./use-virtual-mcp-CsOrbTV4.js";const h="__tool_call_runs__",R=["requires_action","in_progress","failed","expired","completed"];function tt(t){const e=new Map(R.map(r=>[r,[]]));for(const r of t){const n=r.status??"completed";(e.get(n)??e.get("completed")).push(r)}return R.map(r=>({status:r,threads:e.get(r)}))}function et(t,e){const r=new Map;for(const a of t){if(a.id.startsWith("thrd_welcome_"))continue;const u=a.virtual_mcp_id??h,d=r.get(u);d?(d.threads.push(a),(a.updated_at??"")>d.latestUpdatedAt&&(d.latestUpdatedAt=a.updated_at??"")):r.set(u,{virtualMcpId:u,threads:[a],latestUpdatedAt:a.updated_at??""})}const n=e!==null?r.get(e):void 0;n&&e&&r.delete(e);const s=r.get(h);s&&r.delete(h);const o=[...r.values()].sort((a,u)=>u.latestUpdatedAt.localeCompare(a.latestUpdatedAt)),i=[];return e&&i.push(n??{virtualMcpId:e,threads:[],latestUpdatedAt:""}),i.push(...o),s&&s.threads.length>0&&i.push(s),i}function rt(t,e){if(e.size===0)return t;const r=[],n=new Map;for(const s of t){const o=e.get(s.virtualMcpId);if(o){const a=n.get(o);if(a)a.threads=[...a.threads,...s.threads],s.latestUpdatedAt>a.latestUpdatedAt&&(a.latestUpdatedAt=s.latestUpdatedAt);else{const u={virtualMcpId:o,threads:[...s.threads],latestUpdatedAt:s.latestUpdatedAt};n.set(o,u),r.push(u)}continue}const i=n.get(s.virtualMcpId);if(i)i.threads=[...s.threads,...i.threads],s.latestUpdatedAt>i.latestUpdatedAt&&(i.latestUpdatedAt=s.latestUpdatedAt);else{const a={...s,threads:[...s.threads]};n.set(s.virtualMcpId,a),r.push(a)}}return r}const x=new Map,I=new Map;function P(t){return`${t.orgId}:${t.userId}`}function E(t){return`sidebar.group-order.${t}`}function O(t){try{const e=localStorage.getItem(t),r=e?JSON.parse(e):[];return Array.isArray(r)?r.filter(n=>typeof n=="string"):[]}catch{return[]}}function T(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function L(t){const e=P(t),r=x.get(e);if(r)return r;const n=v.sidebarGroupOrder(t.orgId,t.userId);let s=!1;try{s=localStorage.getItem(n)!==null}catch{}let o=O(n);if(!s&&o.length===0&&t.userId!=="anon"){const i=O(E(t.orgId));i.length>0&&(o=i)}return x.set(e,o),o}function p(t,e){const r=new Set(e);return L(t).filter(n=>!r.has(n))}function g(t,e){x.set(P(t),e),T(v.sidebarGroupOrder(t.orgId,t.userId),e)}function m(t){const e=I.get(t);if(e)return e;const r=O(v.sidebarOrgPinnedOrder(t));return I.set(t,r),r}function S(t,e){I.set(t,e),T(v.sidebarOrgPinnedOrder(t),e)}function nt(t,e){g(t,e)}function st(t,e){S(t,e)}function k(t,e){return t===e||t===h}function w(t,e){return e.includes(t)}function q(t,e){return t.map(r=>r.virtualMcpId).filter(r=>!k(r,e))}function ot(t,e,r,n){const s=new Set(n);return q(t,r).filter(o=>e==="org"?s.has(o):!s.has(o))}function B(t,e){const r=new Set(t),n=e.filter(s=>!r.has(s));return n.length===0?t:[...t,...n]}function at(t,e,r){const n=new Set(r),s=[],o=[];let i,a;for(const u of t){const d=u.virtualMcpId;if(e&&d===e){i=u;continue}if(d===h){a=u;continue}if(n.has(d)){s.push(u);continue}o.push(u)}return{decopilot:i,orgPinned:s,user:o,toolCallRuns:a}}function $(t,e,r,n=[],s=[]){const o=r?t.find(c=>c.virtualMcpId===r):void 0,i=t.find(c=>c.virtualMcpId===h),a=new Set(n),u=n.filter(c=>!k(c,r)),d=B(s,u),l=e.filter(c=>!a.has(c)),b=new Map(t.map(c=>[c.virtualMcpId,c])),A=c=>{const G=b.get(c);return G||{virtualMcpId:c,threads:[],latestUpdatedAt:""}},_=d.filter(c=>a.has(c)).map(A),D=l.map(A),U=[];return o&&U.push(o),U.push(..._,...D),i&&U.push(i),{groups:U,userOrder:l,orgOrder:_.map(c=>c.virtualMcpId)}}function J(t,e){const r=new Set(e);m(t.orgId).length===0&&e.length>0&&S(t.orgId,[...e]);const s=v.sidebarGroupOrder(t.orgId,t.userId);if(O(s).length>0)return;const o=O(E(t.orgId));if(o.length===0)return;const i=o.filter(a=>!r.has(a));g(t,i)}function Y(t,e){const r=new Set(e),n=L(t),s=n.filter(o=>!r.has(o));s.length!==n.length&&g(t,s)}function it(t,e,r,n=[]){J(t,n),Y(t,n);const s=p(t,n),o=m(t.orgId),{userOrder:i,orgOrder:a}=$(e,s,r,n,o);(i.length!==s.length||i.some((u,d)=>u!==s[d]))&&g(t,i),(a.length!==o.length||a.some((u,d)=>u!==o[d]))&&S(t.orgId,a)}function ut(t,e,r,n=[]){const s=p(t,n),o=m(t.orgId);return $(e,s,r,n,o).groups}function dt(t,e,r){if(r){const o=p(t,[e]).filter(a=>a!==e);g(t,o);const i=m(t.orgId);i.includes(e)||S(t.orgId,[...i,e]);return}const n=m(t.orgId).filter(o=>o!==e);S(t.orgId,n);const s=p(t,[]);s.includes(e)||g(t,[...s,e])}function z(t,e,r=[]){if(r.includes(e))return;const n=p(t,r);n.includes(e)||g(t,[e,...n])}function ct(t,e,r=[]){const n=p(t,r),s=n.filter(o=>o!==e);s.length!==n.length&&g(t,s)}function lt(t,e,r){const n=t.indexOf(e),s=t.indexOf(r);if(n===-1||s===-1||n===s)return t;const o=[...t],[i]=o.splice(n,1);return i===void 0?t:(o.splice(s,0,i),o)}function ft(t,e,r,n){if(t==="org")return n;const s=p(e,r),o=new Set(n),i=s.filter(a=>!o.has(a));return[...n,...i]}function gt(t,e,r){const n=w(t,r),s=w(e,r);return n===s}const y=f.createContext(null);function pt(t){const e=C.c(7),{children:r}=t,[n,s]=f.useState(!1),[o,i]=f.useState(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>i(W),e[0]=a):a=e[0];const u=a;let d;e[1]!==n||e[2]!==o?(d={empty:n,setEmpty:s,orderRevision:o,bumpOrderRevision:u},e[1]=n,e[2]=o,e[3]=d):d=e[3];let l;return e[4]!==r||e[5]!==d?(l=K.jsx(y.Provider,{value:d,children:r}),e[4]=r,e[5]=d,e[6]=l):l=e[6],l}function W(t){return t+1}function ht(){return f.useContext(y)?.empty??!1}function Ot(){return f.useContext(y)?.orderRevision??0}function H(){return f.useContext(y)?.bumpOrderRevision??Q}function Q(){}function mt(t){const{value:e}=t,r=f.useContext(y),[n,s]=f.useState(null);return r&&n!==e&&(r.setEmpty(e),s(e)),null}function X(t){return(t??[]).filter(e=>!!e.pinned).map(e=>e.id)}function St(){const t=C.c(9),e=j(),{org:r}=M(),n=F(),{data:s}=N.useSession(),o=s?.user?.id??"anon";let i;t[0]!==n?(i=X(n),t[0]=n,t[1]=i):i=t[1];const a=i,u=H();let d;return t[2]!==u||t[3]!==e||t[4]!==r.id||t[5]!==r.slug||t[6]!==a||t[7]!==o?(d=(l,b)=>{z({orgId:r.id,userId:o},l,a),u();const A=crypto.randomUUID();e({to:"/$org/$taskId",params:{org:r.slug,taskId:A},search:{...b?.search??{},virtualmcpid:l}})},t[2]=u,t[3]=e,t[4]=r.id,t[5]=r.slug,t[6]=a,t[7]=o,t[8]=d):d=t[8],d}export{mt as S,h as T,H as a,z as b,gt as c,ft as d,st as e,nt as f,X as g,tt as h,it as i,ut as j,St as k,Ot as l,rt as m,et as n,ct as o,at as p,dt as q,lt as r,ot as s,pt as t,ht as u};
@@ -1 +0,0 @@
1
- import{c as F,D as w,m as b,d as k,K as h,k as $,b0 as q}from"./index-B6CxQrCo.js";function x(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function p(s,e,t,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function y(s,e){const t=await fetch(s,e);if(!t.ok){let n="";try{n=(await t.json()).error??""}catch{}throw new Error(n||`HTTP ${t.status}`)}return t}function D(s,e){const t=F.c(11),{org:n}=w();let r;t[0]!==n.id||t[1]!==e||t[2]!==s?(r=h.orgFsList(n.id,s,e),t[0]=n.id,t[1]=e,t[2]=s,t[3]=r):r=t[3];let i;t[4]!==n.slug||t[5]!==e||t[6]!==s?(i=async()=>(await(await y(p(n.slug,s,"list",{path:e}))).json()).entries.toSorted(P),t[4]=n.slug,t[5]=e,t[6]=s,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:q,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],$(a)}function P(s,e){return s.kind!==e.kind?s.kind==="dir"?-1:1:s.path.localeCompare(e.path)}function M(s,e,t){const n=F.c(15),{org:r}=w();let i;n[0]!==r.id||n[1]!==e||n[2]!==s?(i=h.orgFsStat(r.id,s??"",e),n[0]=r.id,n[1]=e,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==t?(o=t?.refetchIntervalWhenAbsent?d=>d.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,n[4]=t,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==e||n[8]!==s?(c=async()=>{const d=await fetch(p(r.slug,s??"","stat",{path:e}));if(d.status===404)return null;if(!d.ok)throw new Error(`HTTP ${d.status}`);return(await d.json()).entry},n[6]=r.slug,n[7]=e,n[8]=s,n[9]=c):c=n[9];let u;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(u={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=u):u=n[14],$(u)}function A(s){const e=F.c(9),{org:t}=w();let n;e[0]!==t.id||e[1]!==s?(n=h.orgFsUsage(t.id,s),e[0]=t.id,e[1]=s,e[2]=n):n=e[2];let r;e[3]!==t.slug||e[4]!==s?(r=async()=>await(await y(p(t.slug,s,"usage"))).json(),e[3]=t.slug,e[4]=s,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r?(i={queryKey:n,queryFn:r},e[6]=n,e[7]=r,e[8]=i):i=e[8],$(i)}function N(s,e){const t=F.c(9),n=s===void 0?60:s,{org:r}=w();let i;t[0]!==r.id?(i=h.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let o;t[2]!==n||t[3]!==r.slug?(o=async()=>(await(await y(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,t[2]=n,t[3]=r.slug,t[4]=o):o=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},t[5]=i,t[6]=a,t[7]=o,t[8]=c):c=t[8],$(c)}function X(s,e){const t=F.c(11),n=50,{org:r}=w();let i;t[0]!==r.id||t[1]!==s?(i=h.orgFsSearch(r.id,s),t[0]=r.id,t[1]=s,t[2]=i):i=t[2];const a=s.length>0;let o;t[3]!==n||t[4]!==r.slug||t[5]!==s?(o=async()=>(await(await y(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(s)}&limit=${n}`)).json()).entries,t[3]=n,t[4]=r.slug,t[5]=s,t[6]=o):o=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c={queryKey:i,enabled:a,placeholderData:q,queryFn:o},t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],$(c)}function H(s){const e=F.c(8),{org:t}=w();let n;e[0]!==t.id?(n=h.orgFsSkills(t.id),e[0]=t.id,e[1]=n):n=e[1];const r=s?.enabled;let i;e[2]!==t.slug?(i=async()=>{const o=await y(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(T)},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],$(a)}function T(s){return{volume:s.volume,path:s.path}}async function W(s){const e=await y(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:t}=await e.json();return t}async function C(s,e,t){return(await y(p(s,e,"read",{path:t}))).text()}const m=new Set(["md","mdx","markdown","txt","text"]),E=25,_=64*1024,R=256*1024,U=4;function j(s){const e=s.lastIndexOf(".");return e===-1?!1:m.has(s.slice(e+1).toLowerCase())}async function Y(s,e,t){const n=t?`${t}/`:"",r=l=>l.startsWith(n)?l.slice(n.length):l,i=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const l=o.shift();if(!l)break;let g;try{g=(await(await y(p(s,e,"list",{path:l.path}))).json()).entries}catch{continue}for(const f of[...g].sort((K,I)=>K.path.localeCompare(I.path))){if(f.kind==="dir"){l.depth<U&&o.push({path:f.path,depth:l.depth+1});continue}j(f.path)&&f.size<=_&&i.length<E?i.push(f.path):a.push(r(f.path))}}const c=await Promise.all(i.map(l=>C(s,e,l).catch(()=>null))),u=[];let d=0;return i.forEach((l,g)=>{const f=c[g];if(f==null||d+f.length>R){a.push(r(l));return}d+=f.length,u.push({relPath:r(l),content:f})}),u.sort((l,g)=>l.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:l.relPath.localeCompare(g.relPath)),a.sort(),{files:u,omittedPaths:a}}function z(){const s=F.c(7),{org:e}=w();let t;s[0]!==e.id?(t=h.orgFsPublicSets(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=async()=>(await(await y(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,s[2]=e.slug,s[3]=n):n=s[3];let r;return s[4]!==t||s[5]!==n?(r={queryKey:t,staleTime:3e5,queryFn:n},s[4]=t,s[5]=n,s[6]=r):r=s[6],$(r)}function B(s){const e=F.c(3),{org:t}=w();let n;return e[0]!==t.slug||e[1]!==s?(n=r=>p(t.slug,s,"read",{path:r}),e[0]=t.slug,e[1]=s,e[2]=n):n=e[2],n}function V(){const s=F.c(2),{org:e}=w();let t;return s[0]!==e.slug?(t=(n,r)=>p(e.slug,n,"read",{path:r}),s[0]=e.slug,s[1]=t):t=s[1],t}function J(s){const e=F.c(3),{org:t}=w();let n;return e[0]!==t||e[1]!==s?(n={mutationFn:async r=>(await(await y(p(t.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=s,e[2]=n):n=e[2],k(n)}function G(s){const e=F.c(18),{org:t}=w(),n=b();let r;e[0]!==t||e[1]!==s?(r=async u=>(await(await y(p(t.slug,s,"public",{path:u.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:u.mode,password:u.password})})).json()).entry,e[0]=t,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==n||e[5]!==s?(i=async u=>{const d=h.orgFsStat(t.id,s,u.path);await n.cancelQueries({queryKey:d});const l=n.getQueryData(d),g=u.mode!=="private";return n.setQueryData(d,f=>f&&{...f,readPublic:g,effectivePublic:g,shareMode:u.mode}),{key:d,previous:l}},e[3]=t,e[4]=n,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n?(a=(u,d,l)=>{l&&n.setQueryData(l.key,l.previous)},e[7]=n,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==n||e[11]!==s?(o=(u,d,l)=>{n.invalidateQueries({queryKey:h.orgFsStat(t.id,s,l.path)}),n.invalidateQueries({queryKey:h.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:h.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:h.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=n,e[11]=s,e[12]=o):o=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=c):c=e[17],k(c)}function Z(s){const e=F.c(26),{org:t}=w(),n=b();let r;e[0]!==t||e[1]!==n||e[2]!==s?(r=()=>{n.invalidateQueries({queryKey:h.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:h.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:h.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=n,e[2]=s,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==s?(a=async S=>{for(const L of S.files){const O=S.dir?`${S.dir}/${L.name}`:L.name;await y(p(t.slug,s,"file",{path:O}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}},e[4]=t,e[5]=s,e[6]=a):a=e[6];let o;e[7]!==i||e[8]!==a?(o={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=o):o=e[9];const c=k(o);let u;e[10]!==t||e[11]!==s?(u=async S=>{await y(p(t.slug,s,"dir",{path:S}),{method:"POST"})},e[10]=t,e[11]=s,e[12]=u):u=e[12];let d;e[13]!==i||e[14]!==u?(d={mutationFn:u,onSuccess:i},e[13]=i,e[14]=u,e[15]=d):d=e[15];const l=k(d);let g;e[16]!==t||e[17]!==s?(g=async S=>{await y(p(t.slug,s,"file",{path:S}),{method:"DELETE"})},e[16]=t,e[17]=s,e[18]=g):g=e[18];let f;e[19]!==i||e[20]!==g?(f={mutationFn:g,onSuccess:i},e[19]=i,e[20]=g,e[21]=f):f=e[21];const K=k(f);let I;return e[22]!==l||e[23]!==K||e[24]!==c?(I={upload:c,mkdir:l,remove:K},e[22]=l,e[23]=K,e[24]=c,e[25]=I):I=e[25],I}export{V as a,N as b,H as c,M as d,B as e,x as f,Y as g,W as h,J as i,G as j,D as k,X as l,z as m,A as n,Z as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-pt1aYNB9.js";import{cJ as i}from"./index-B6CxQrCo.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-pt1aYNB9.js";import{cJ as u,aC as n}from"./index-B6CxQrCo.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};