decocms 4.285.0 → 4.286.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 (238) hide show
  1. package/dist/client/assets/{AlertCircle-Dh-7gjAb.js → AlertCircle-BGw3XlXk.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BDhwnWiq.js → AreaChart-BmadQ3iU.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-u4Z_ZEIA.js → ArrowLeft-C_gfx94q.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-OL-jZKct.js → ArrowUp-Be3wdSNr.js} +1 -1
  5. package/dist/client/assets/{Check-7NzkCgMX.js → Check-DiujM3Bc.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Dshptf1P.js → CheckCircle-DcWCuiei.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Cq83UavT.js → ChevronDown-B9H-gqPt.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BYfzjVa9.js → ChevronRight-zk3hjjG0.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-DBGHPnq7.js → ChevronSelectorVertical-CiZklIQA.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-bumhqOl2.js → ChevronUp-BzNZuBSL.js} +1 -1
  11. package/dist/client/assets/{Copy01-D7QEOuO-.js → Copy01-Ce6E_Ifo.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-C_k5ADvU.js → CreditCard01-BNnQurqN.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DtVYgEvK.js → DotsVertical-CuaVjEFE.js} +1 -1
  14. package/dist/client/assets/{Download01-D4OkE-EC.js → Download01-CLn3maXy.js} +1 -1
  15. package/dist/client/assets/{Eye-CUsQm8N_.js → Eye-DlNcBFBo.js} +1 -1
  16. package/dist/client/assets/{FilterLines-CqhY3DF8.js → FilterLines-DEGFannV.js} +1 -1
  17. package/dist/client/assets/{Globe01-hx5sMqeq.js → Globe01-B23V2Joo.js} +1 -1
  18. package/dist/client/assets/{Globe04-nj2uQFze.js → Globe04-Bo3nBCKm.js} +1 -1
  19. package/dist/client/assets/{HardDrive-CD-r2Q93.js → HardDrive-CS0V7I_b.js} +1 -1
  20. package/dist/client/assets/{Key01-xlS_KWo0.js → Key01-Cl-G8wdQ.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-vwahOhRy.js → LinkExternal01-6Eva3_re.js} +1 -1
  22. package/dist/client/assets/{LockUnlocked01-IFXnzckZ.js → LockUnlocked01-CN11iIqE.js} +1 -1
  23. package/dist/client/assets/{LogOut01-B9lIo2F_.js → LogOut01-JOlIpVYg.js} +1 -1
  24. package/dist/client/assets/{Monitor01-BJ9QIRPS.js → Monitor01-1s1dhhgC.js} +1 -1
  25. package/dist/client/assets/{Palette-BnaP_29I.js → Palette-Cutx8lDK.js} +1 -1
  26. package/dist/client/assets/{Play-D0ByOD8C.js → Play-D2y6v2GO.js} +1 -1
  27. package/dist/client/assets/{Plus-CcEdjxja.js → Plus-C6RnBW-5.js} +1 -1
  28. package/dist/client/assets/{SearchLg-D8g5Kgbo.js → SearchLg-vQ4mWmFa.js} +1 -1
  29. package/dist/client/assets/{SearchMd-BBajIKav.js → SearchMd-Cme8xHxY.js} +1 -1
  30. package/dist/client/assets/{Settings02-DUzoPIwN.js → Settings02-xVDbAjw7.js} +1 -1
  31. package/dist/client/assets/{Share07-BDaDw7G6.js → Share07-CgIIbXvb.js} +1 -1
  32. package/dist/client/assets/{Shield01-B-BJfu7d.js → Shield01-DWzLUFLj.js} +1 -1
  33. package/dist/client/assets/{Stars01-B1UsLz2z.js → Stars01-C0ceIy5a.js} +1 -1
  34. package/dist/client/assets/{Stars02-DfUQGOxC.js → Stars02-D3wWSFvd.js} +1 -1
  35. package/dist/client/assets/{Sun-B6HQumVJ.js → Sun-1LLuEmlt.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-kEJ7zR_z.js → SwitchHorizontal01-LE5pNn35.js} +1 -1
  37. package/dist/client/assets/{Tool01-D4z-9IyH.js → Tool01-BOA3Hhno.js} +1 -1
  38. package/dist/client/assets/{Tool02-poIXBn7K.js → Tool02-qepgblpf.js} +1 -1
  39. package/dist/client/assets/{Trash01-Du6l42eB.js → Trash01-DbU5lEn8.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-FHrvViJx.js → TrendUp01-BG3C69eq.js} +1 -1
  41. package/dist/client/assets/{Upload01-CwF6sGbA.js → Upload01-CZRgQZHh.js} +1 -1
  42. package/dist/client/assets/{User01-CZwTOyNO.js → User01-gcsNuBlu.js} +1 -1
  43. package/dist/client/assets/{UserSquare-CH3Ukoit.js → UserSquare-BnCNQ7NG.js} +1 -1
  44. package/dist/client/assets/{Users01-JQgg7RR7.js → Users01-1L3hBTBq.js} +1 -1
  45. package/dist/client/assets/{Users03-C3m1xGvF.js → Users03-GR2oALJt.js} +1 -1
  46. package/dist/client/assets/{XCircle-CkDL-6sY.js → XCircle-DHXzS_UE.js} +1 -1
  47. package/dist/client/assets/{XClose--TM9coN5.js → XClose-DN7n2l1K.js} +1 -1
  48. package/dist/client/assets/{YAxis-CB2o3UPr.js → YAxis-IIZkm6Pd.js} +1 -1
  49. package/dist/client/assets/{Zap-qaW4N8Xw.js → Zap-BzSAmKbo.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-QOO_mGaz.js → ZapSquare-zh5y12_O.js} +1 -1
  51. package/dist/client/assets/{access-gate-CE6VufKS.js → access-gate-CBhluzKR.js} +1 -1
  52. package/dist/client/assets/{agent-icon-BsIxgFhP.js → agent-icon-D6UFUEyp.js} +1 -1
  53. package/dist/client/assets/{agents-list-bwOmphFn.js → agents-list-kv_vJJBq.js} +1 -1
  54. package/dist/client/assets/{ai-providers-DR5SMjNU.js → ai-providers-WMBiWVB1.js} +1 -1
  55. package/dist/client/assets/{alert-D5uiqJgi.js → alert-DRLJF3VA.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CQ58w2vU.js → alert-dialog-CJ6HPz9N.js} +1 -1
  57. package/dist/client/assets/{api-keys-CX0D5xjR.js → api-keys-bD_OqpgF.js} +1 -1
  58. package/dist/client/assets/{app-editor-B1XDPINZ.js → app-editor-DDia3knP.js} +1 -1
  59. package/dist/client/assets/{auth-1gDWBUqm.js → auth-LNmB6-r8.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-B8PVyUGR.js → auth-catchall-Bj_OOHwi.js} +1 -1
  61. package/dist/client/assets/{auth-entry-Bi9dJKcm.js → auth-entry-DrGIwQE7.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-jC3SBvIk.js → auth-split-layout-t5lVTlh8.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CQXkpjM6.js → authenticate-and-persist-oauth-abE4nlr8.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-7IeAec2Y.js → automation-list-row-DEBz1PZ5.js} +1 -1
  65. package/dist/client/assets/{automation-runs-BZF73Twv.js → automation-runs-DvmtKa8G.js} +1 -1
  66. package/dist/client/assets/automations-BQ1zE1lw.js +1 -0
  67. package/dist/client/assets/{avatar-BX6Wn7ad.js → avatar-Bk95B5w8.js} +1 -1
  68. package/dist/client/assets/{badge-DHzlDsyN.js → badge-B2Zf6qZN.js} +1 -1
  69. package/dist/client/assets/{block-document-BuMszw-3.js → block-document-Dfh-563r.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-NJrA-Ryq.js → breadcrumb-D-a6INvq.js} +1 -1
  71. package/dist/client/assets/{buckets-ClF6GhdJ.js → buckets-AcGnhT8r.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-W4D8fxEj.js → bulk-category-panel-p3TNvbhg.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-DxVvA5t-.js → capability-load-error-UIZj-j0m.js} +1 -1
  74. package/dist/client/assets/{cards-DPxlZ9hi.js → cards-Dzy79ZMy.js} +1 -1
  75. package/dist/client/assets/{category-editor-aOON_XzN.js → category-editor-6z-ynKee.js} +1 -1
  76. package/dist/client/assets/{chart-Bp736SCd.js → chart-CzT1O9dt.js} +1 -1
  77. package/dist/client/assets/{chat-context-BCk9ESt8.js → chat-context-CTjB2DFv.js} +1 -1
  78. package/dist/client/assets/{checkbox-CxWyyA9g.js → checkbox-CwLuHRXz.js} +1 -1
  79. package/dist/client/assets/{choose-editor-BlUWIO1O.js → choose-editor-0h8LisJM.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-B3fm_ACo.js → cli-auth-success-C63ZUYMU.js} +1 -1
  81. package/dist/client/assets/{collection-detail-C-G2UcWN.js → collection-detail-DyuXWD9X.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-B0rozt4m.js → collection-display-button-WkkTdQiO.js} +1 -1
  83. package/dist/client/assets/{collection-search-C1aquL6N.js → collection-search-BZ-Q3I-u.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-W3HwUcY8.js → collection-table-wrapper-jDt3a0l0.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-CmguGFdF.js → collection-tabs-DPjZex-Z.js} +1 -1
  86. package/dist/client/assets/{command-BVNULuVP.js → command-DfkgcKu8.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-BoNpvYR1.js → commerce-onboarding-BdqD65r9.js} +1 -1
  88. package/dist/client/assets/{config-Bh_MXGvd.js → config-C053AB8T.js} +1 -1
  89. package/dist/client/assets/{connect-BH66Tqeg.js → connect-BSiXRQhd.js} +1 -1
  90. package/dist/client/assets/{connection-zOmDe8BP.js → connection-BQsZLYHP.js} +1 -1
  91. package/dist/client/assets/{connection-card-Clkgit0t.js → connection-card-C7MobTIK.js} +1 -1
  92. package/dist/client/assets/{connection-detail-O0UXTpsm.js → connection-detail-MU6BsxU6.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-jW5lefOY.js → connection-form-helpers-DC83nWwS.js} +1 -1
  94. package/dist/client/assets/connections-BGS1paTU.js +1 -0
  95. package/dist/client/assets/constants-dLUUoWH7.js +1 -0
  96. package/dist/client/assets/{decopilot-sse-pool-CPW9JvWP.js → decopilot-sse-pool-A07DOCGf.js} +1 -1
  97. package/dist/client/assets/{dialog-DIhMaaGw.js → dialog-DveHs0kp.js} +1 -1
  98. package/dist/client/assets/{domain-settings-xHdX1pCD.js → domain-settings-C8ucuxUh.js} +1 -1
  99. package/dist/client/assets/{drawer-BVwqIJC7.js → drawer-CRhVZ0X7.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-BEARFG_o.js → dropdown-menu-BR_cSQLm.js} +1 -1
  101. package/dist/client/assets/{empty-state-CEA2FeJG.js → empty-state-CSneS9BU.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-DKX2cVxu.js → extract-connection-data-Dai3fHMk.js} +1 -1
  103. package/dist/client/assets/{file-explorer-BsHJqUke.js → file-explorer-Dlt8T-eE.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-DUnETOmw.js → file-type-icon-CTS2wX2I.js} +1 -1
  105. package/dist/client/assets/{form-CTyArXLS.js → form-DPY4ZjEn.js} +1 -1
  106. package/dist/client/assets/general-D25Ymmu9.js +1 -0
  107. package/dist/client/assets/{github-repo-picker-CMXxBGYJ.js → github-repo-picker-DzT6Zs-M.js} +1 -1
  108. package/dist/client/assets/{hooks-B_kyLtT_.js → hooks-BBTWuwj0.js} +1 -1
  109. package/dist/client/assets/{index-BTEwT9kt.js → index-Bo3ENa71.js} +1 -1
  110. package/dist/client/assets/{index-wl6jNPYS.js → index-CUUhrBmX.js} +1 -1
  111. package/dist/client/assets/{index-oUYXP9Sz.js → index-Cwc5OUhn.js} +6 -6
  112. package/dist/client/assets/{index-CBtTXVkq.js → index-CwhEUWmk.js} +1 -1
  113. package/dist/client/assets/{index-BdNJPt0F.js → index-Cxlyb4Tg.js} +1 -1
  114. package/dist/client/assets/{index-DDB_h1yS.js → index-D08DKujt.js} +1 -1
  115. package/dist/client/assets/{index-VgfiW2a1.js → index-Dfnot3bs.js} +1 -1
  116. package/dist/client/assets/{index-BOXgq-jF.js → index-IhD4MlVw.js} +1 -1
  117. package/dist/client/assets/{index-EO6-2ljI.js → index-LPzaT2sc.js} +61 -61
  118. package/dist/client/assets/{index-redirect-CgjKizBW.js → index-redirect-CdiWvESd.js} +1 -1
  119. package/dist/client/assets/{index-BCOVXIKy.js → index-tJJOgsq4.js} +1 -1
  120. package/dist/client/assets/{infra-billing-B1ocD3OQ.js → infra-billing-C2F2Qt-N.js} +1 -1
  121. package/dist/client/assets/{input-CS1CqwLF.js → input-H1AQT31Q.js} +1 -1
  122. package/dist/client/assets/{integration-icon-CZyw67Zl.js → integration-icon-DnxesxSu.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-DNrkWwG-.js → invite-member-dialog-kiZFlDTJ.js} +1 -1
  124. package/dist/client/assets/{label-CLQvZ6qi.js → label-CH7Mz6MF.js} +1 -1
  125. package/dist/client/assets/{layout-DheiUNwK.js → layout-CJs037de.js} +1 -1
  126. package/dist/client/assets/{login-CVxhk0lS.js → login-CrkMX2vj.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-DHOYyPCC.js → mcp-oauth-C4AEx9Qj.js} +1 -1
  128. package/dist/client/assets/{members-DqF4jmbK.js → members-nVR0C66u.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-DbqpyEZF.js → monaco-editor-BBhZuVQY.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-Bj8UaSFz.js → monitoring-stats-row-CrhBPyxd.js} +1 -1
  131. package/dist/client/assets/{multi-select-Bh-s6f3z.js → multi-select--GOxbZFW.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-BS2v1wnp.js → oauth-callback-BYMpBx-b.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-XlQxKlZB.js → oauth-callback-ai-provider-Btw8m4Pw.js} +1 -1
  134. package/dist/client/assets/{onboarding-CjJxtlj7.js → onboarding-Cusp2Kco.js} +1 -1
  135. package/dist/client/assets/{org-layout-DETBZ-XV.js → org-layout-DYEMsp-k.js} +1 -1
  136. package/dist/client/assets/{organization-choice-BhToMU6s.js → organization-choice-H0x2yplX.js} +1 -1
  137. package/dist/client/assets/{orgs-DR3Q7yFh.js → orgs-C_TsjzsU.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-HPf1gm3L.js → page-seo-form-BRpzwi34.js} +1 -1
  139. package/dist/client/assets/{popover-Du70JJ8v.js → popover-Kt90GgHN.js} +1 -1
  140. package/dist/client/assets/{post-calendar-C64gv1i6.js → post-calendar-Q7egXydN.js} +1 -1
  141. package/dist/client/assets/{post-editor-BbnabTmr.js → post-editor-3W4nlw2D.js} +1 -1
  142. package/dist/client/assets/{primitives-BVOE8_5e.js → primitives-Uy3Dn3l5.js} +1 -1
  143. package/dist/client/assets/{profile-C2inPAUQ.js → profile-BpnLekw3.js} +1 -1
  144. package/dist/client/assets/{project-app-view-DZLmYAmn.js → project-app-view-Bl_hd5Qi.js} +1 -1
  145. package/dist/client/assets/{prompts-4OH9DFq6.js → prompts-s5jy6ei-.js} +1 -1
  146. package/dist/client/assets/record-editor-rWc6R365.js +1 -0
  147. package/dist/client/assets/{redirect-editor-DMbkOVru.js → redirect-editor-DB6qYMS7.js} +1 -1
  148. package/dist/client/assets/registry-Dy5jw2xM.js +2 -0
  149. package/dist/client/assets/{registry-layout-BoHE-GY5.js → registry-layout-Bh_qys_B.js} +1 -1
  150. package/dist/client/assets/{reports-CT7V1DAL.js → reports-SCSdTqAq.js} +1 -1
  151. package/dist/client/assets/{require-capability-CMUdQk_S.js → require-capability-DkLXZoIE.js} +1 -1
  152. package/dist/client/assets/{required-auth-layout-QyxSrfmH.js → required-auth-layout-TicOmrWu.js} +1 -1
  153. package/dist/client/assets/{reset-password-BPxgK4yL.js → reset-password-CH0TbZtk.js} +1 -1
  154. package/dist/client/assets/review-settings-DTxUaKsw.js +1 -0
  155. package/dist/client/assets/{roles-B9ji1pZ6.js → roles-B_pshoUl.js} +1 -1
  156. package/dist/client/assets/{scroll-area-BsC8fs3Z.js → scroll-area-B4y7Uc4_.js} +1 -1
  157. package/dist/client/assets/{search-input-BBW-BSQq.js → search-input-ByGGbbuH.js} +1 -1
  158. package/dist/client/assets/{secrets-MglRXBRP.js → secrets-_ieMj3TA.js} +1 -1
  159. package/dist/client/assets/{sections-editor-X_aigLCX.js → sections-editor-DPLCdotd.js} +1 -1
  160. package/dist/client/assets/{select-model-Tfm7PXhx.js → select-model-BjrzakQK.js} +1 -1
  161. package/dist/client/assets/{select-CJGWFkMz.js → select-nNkfzHSn.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-DUJsg9jD.js → self-tool-result-BCjIfrHl.js} +1 -1
  163. package/dist/client/assets/{seo-editor-BRFFTSFq.js → seo-editor-D0U1KWjh.js} +1 -1
  164. package/dist/client/assets/{settings-layout-RgK7-q1p.js → settings-layout-QoXDdekp.js} +1 -1
  165. package/dist/client/assets/{shell-controls-BXl-iO2Y.js → shell-controls-srlxCIc-.js} +1 -1
  166. package/dist/client/assets/{shell-layout-B5FYG03K.js → shell-layout-y0pc6Ps_.js} +1 -1
  167. package/dist/client/assets/{spinner-C8JJHaJh.js → spinner-BxT2-RQL.js} +1 -1
  168. package/dist/client/assets/{sso-Dc1JBx0y.js → sso-DMw9bkMB.js} +1 -1
  169. package/dist/client/assets/store-CwG7oz8f.js +1 -0
  170. package/dist/client/assets/store-registry-CaCvkkvW.js +2 -0
  171. package/dist/client/assets/{switch-CmT7vd5I.js → switch-FVvEKs7w.js} +1 -1
  172. package/dist/client/assets/{synced-repos-B313d08r.js → synced-repos-BWqJ5BRx.js} +1 -1
  173. package/dist/client/assets/{tab-id-BuzpcvG1.js → tab-id-B-MuWZyB.js} +1 -1
  174. package/dist/client/assets/{table-D8xezqnz.js → table-DPeHBel0.js} +1 -1
  175. package/dist/client/assets/{tabs-MK0MXP-i.js → tabs-ClBY3Swc.js} +1 -1
  176. package/dist/client/assets/task-board-Cc9n4YDI.js +1 -0
  177. package/dist/client/assets/{tasks-Bc1J7sns.js → tasks-B24sGOdi.js} +1 -1
  178. package/dist/client/assets/{textarea-BWuuXli5.js → textarea-5UXjbrfA.js} +1 -1
  179. package/dist/client/assets/{toggle-group-B-or7VaV.js → toggle-group-BRrB6fNL.js} +1 -1
  180. package/dist/client/assets/{toolbar-D87bPhTv.js → toolbar-CtyPj6Jz.js} +1 -1
  181. package/dist/client/assets/{track-D0LLsFKs.js → track-Baz2c1uX.js} +1 -1
  182. package/dist/client/assets/{types-CHJM6oAY.js → types-D-eDMOji.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-r2nELlbF.js → use-ai-providers-C5pRAYMe.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-Cb_lTzxG.js → use-api-keys-CZgi0Ffw.js} +1 -1
  185. package/dist/client/assets/{use-automations-CP79GEVT.js → use-automations-DgdPB5W5.js} +1 -1
  186. package/dist/client/assets/{use-autosave-gGr-Dml_.js → use-autosave-CKwEOpyw.js} +1 -1
  187. package/dist/client/assets/{use-commerce-diagnostic-1YPXhdLe.js → use-commerce-diagnostic-C-6WH25O.js} +1 -1
  188. package/dist/client/assets/{use-connection-C4rbYT9U.js → use-connection-09ezQVmp.js} +1 -1
  189. package/dist/client/assets/{use-copy-DDgWyrmF.js → use-copy-3AwQB8Iu.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-CDH376MU.js → use-create-virtual-mcp-DBiwi9ad.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-BJLjZv1Y.js → use-debounced-autosave-W2VmKoU8.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-CsoIynGe.js → use-debounced-value-DRya_SIM.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-NJyKRVI4.js → use-decopilot-events-KsVmeo4N.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-BSiNhmb5.js → use-delete-connection-BMflGo_0.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-5nvEGW4f.js → use-deployment-admin-CqaCx9zD.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-CmZnnBdt.js → use-file-configs-B34ZlHyv.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-DhoN_tOr.js → use-infinite-scroll-CXfjhv8u.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-DoFMvuLM.js → use-join-requests-BQMQ0atp.js} +1 -1
  199. package/dist/client/assets/{use-mcp-auth-status-AP-IvVj7.js → use-mcp-auth-status-BbOwCYFJ.js} +1 -1
  200. package/dist/client/assets/{use-mcp-client-C6aEVcPT.js → use-mcp-client-DDri_uok.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-B0tnIykD.js → use-mcp-tools-D39UBufk.js} +1 -1
  202. package/dist/client/assets/{use-members-Cs_3dQbg.js → use-members-CBxZJhy7.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-CkkcsB_L.js → use-navigate-to-agent-Bf4VINKK.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-BmwDaxX4.js → use-org-auth-client-CNZVyny3.js} +1 -1
  205. package/dist/client/assets/{use-org-repo-syncs-B6ZzK2Kw.js → use-org-repo-syncs-BsKGoRHN.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-Bk_7LXrK.js → use-org-sso-CrDXOfve.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-CBDualiz.js → use-organization-roles-C97DSxT9.js} +1 -1
  208. package/dist/client/assets/use-organization-settings-CU8oKGH8.js +1 -0
  209. package/dist/client/assets/{use-registry-connections-Dju1XIn5.js → use-registry-connections-DXDW9BVj.js} +1 -1
  210. package/dist/client/assets/{use-secrets-BG54EwWa.js → use-secrets-DfX3lo5B.js} +1 -1
  211. package/dist/client/assets/{use-section-preview-base-F4LJDDsL.js → use-section-preview-base-B1_SCJCR.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-DXLkLFUb.js → use-status-sounds-BSLKT5kS.js} +1 -1
  213. package/dist/client/assets/{use-tags-B44sl-p2.js → use-tags-zhNtgkm6.js} +1 -1
  214. package/dist/client/assets/{use-task-board-items-BhAKhQpA.js → use-task-board-items-DMavIjbd.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-D3hc6eU8.js → use-view-mode-Bnd5pIZB.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-C9_zCPTA.js → use-virtual-mcp-CQghEz4m.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-zd1aocsL.js +1 -0
  218. package/dist/client/assets/useSuspenseInfiniteQuery-yqcuCGQU.js +1 -0
  219. package/dist/client/assets/{users-CYx0galZ.js → users-Dw_ixjEP.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-BMAnShva.js → variant-calendar-x0ITYFPs.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-CG3OVBS9.js → view-mode-toggle-BuC5FO49.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +533 -531
  224. package/dist/server/server.js +360 -358
  225. package/package.json +1 -1
  226. package/dist/client/assets/automations-CSa6XJ0r.js +0 -1
  227. package/dist/client/assets/connections-CrvJ-jbj.js +0 -1
  228. package/dist/client/assets/constants-BiE_kVyZ.js +0 -1
  229. package/dist/client/assets/general-DYRvk4ev.js +0 -1
  230. package/dist/client/assets/record-editor-MRYcq7Py.js +0 -1
  231. package/dist/client/assets/registry-_vfcdlun.js +0 -2
  232. package/dist/client/assets/review-settings-Jkf4LZC_.js +0 -1
  233. package/dist/client/assets/store-CtOn056h.js +0 -1
  234. package/dist/client/assets/store-registry-W3Jn--X1.js +0 -2
  235. package/dist/client/assets/task-board-BHpLFUa-.js +0 -1
  236. package/dist/client/assets/use-organization-settings-DmQrCvCR.js +0 -1
  237. package/dist/client/assets/useInfiniteQuery-BuAzVT7P.js +0 -1
  238. package/dist/client/assets/useSuspenseInfiniteQuery-jTqM94Cv.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as B,c as ae,b as de,j as t,B as G,k as pe,q as re,n as je,E as Ye,H as Ne,d as ke,u as Ze,a as Te,G as et,a5 as tt,bO as Ce,R as nt,I as st,aw as ot,ax as it,P as fe,p as ct,ac as lt,t as Y,K as rt}from"./index-Cwc5OUhn.js";import{a as Ae,b as at,g as dt,e as ut}from"./extract-connection-data-Dai3fHMk.js";import{C as mt}from"./collection-display-button-WkkTdQiO.js";import{S as gt}from"./search-input-ByGGbbuH.js";import{C as pt}from"./collection-tabs-DPjZex-Z.js";import{C as ve,u as ft,a as we,g as ht}from"./connection-card-C7MobTIK.js";import{E as xt}from"./empty-state-CSneS9BU.js";import{u as jt,D as yt}from"./use-delete-connection-BMflGo_0.js";import{u as St}from"./use-infinite-scroll-CXfjhv8u.js";import{u as Ct}from"./use-view-mode-Bnd5pIZB.js";import{g as xe}from"./connection-slug-eyAPH6o3.js";import{c as Ie,d as Pe,b as Le,f as Oe,g as Me,e as Fe,a as $e,A as Ue}from"./alert-dialog-CJ6HPz9N.js";import{n as ye}from"./Tool02-qepgblpf.js";import{g as vt}from"./metadata-dUsYcpuu.js";import{b as Ve,h as ze,a as Ee,c as Be,d as Ke,e as He}from"./dialog-DveHs0kp.js";import{D as bt,a as _t,c as Dt,b as Nt,g as kt,e as Tt,f as At}from"./drawer-CRhVZ0X7.js";import{d as se,a as oe,e as ie,b as ce,c as le,F as _e}from"./form-DPY4ZjEn.js";import{I as ue}from"./input-H1AQT31Q.js";import{S as wt,a as It,b as Pt,c as Lt,d as ge}from"./select-nNkfzHSn.js";import{T as Ot}from"./textarea-5UXjbrfA.js";import{b as Re,u as Mt}from"./use-connection-09ezQVmp.js";import{u as Ft}from"./use-virtual-mcp-CQghEz4m.js";import{aL as $t,Q as Ut,P as Vt,s as Se}from"./agent-icon-D6UFUEyp.js";import{s as We}from"./Plus-C6RnBW-5.js";import{e as zt}from"./UserSquare-BnCNQ7NG.js";import{s as Xe}from"./XClose-DN7n2l1K.js";import{i as he,a as De,E as Et,c as Bt,p as Kt,b as Ht,d as Rt}from"./connection-form-helpers-DC83nWwS.js";import{a as Wt}from"./authenticate-and-persist-oauth-abE4nlr8.js";import{I as Xt}from"./integration-icon-DnxesxSu.js";import{C as Ge}from"./checkbox-CwLuHRXz.js";import{a as me,D as Gt,c as qt,b as Qt}from"./dropdown-menu-BR_cSQLm.js";import{i as Jt}from"./DotsVertical-CuaVjEFE.js";import{s as qe}from"./Eye-DlNcBFBo.js";import{s as Qe}from"./Trash01-DbU5lEn8.js";import"./use-mcp-client-DDri_uok.js";import"./constants-dLUUoWH7.js";import"./auth-LNmB6-r8.js";import"./ArrowUp-Be3wdSNr.js";import"./Check-DiujM3Bc.js";import"./SwitchHorizontal01-LE5pNn35.js";import"./view-mode-toggle-BuC5FO49.js";import"./badge-B2Zf6qZN.js";import"./SearchMd-Cme8xHxY.js";import"./use-registry-connections-DXDW9BVj.js";import"./use-organization-settings-CU8oKGH8.js";import"./task-board-Cc9n4YDI.js";import"./useInfiniteQuery-zd1aocsL.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./label-CH7Mz6MF.js";import"./ChevronDown-B9H-gqPt.js";import"./ChevronUp-BzNZuBSL.js";import"./AlertCircle-BGw3XlXk.js";import"./Tool01-BOA3Hhno.js";import"./ArrowLeft-C_gfx94q.js";import"./XCircle-DHXzS_UE.js";import"./TrendUp01-BG3C69eq.js";import"./ZapSquare-zh5y12_O.js";import"./Users03-GR2oALJt.js";import"./CheckCircle-DcWCuiei.js";import"./ChevronRight-zk3hjjG0.js";import"./ChevronSelectorVertical-CiZklIQA.js";import"./Stars02-D3wWSFvd.js";import"./Copy01-Ce6E_Ifo.js";import"./CreditCard01-BNnQurqN.js";import"./Download01-CLn3maXy.js";import"./Settings02-xVDbAjw7.js";import"./FilterLines-DEGFannV.js";import"./Share07-CgIIbXvb.js";import"./Globe01-B23V2Joo.js";import"./Globe04-Bo3nBCKm.js";import"./HardDrive-CS0V7I_b.js";import"./Key01-Cl-G8wdQ.js";import"./LinkExternal01-6Eva3_re.js";import"./LockUnlocked01-CN11iIqE.js";import"./LogOut01-JOlIpVYg.js";import"./Monitor01-1s1dhhgC.js";import"./Sun-1LLuEmlt.js";import"./Palette-Cutx8lDK.js";import"./Play-D2y6v2GO.js";import"./SearchLg-vQ4mWmFa.js";import"./Shield01-DWzLUFLj.js";import"./Stars01-C0ceIy5a.js";import"./Upload01-CZRgQZHh.js";import"./User01-gcsNuBlu.js";import"./Users01-1L3hBTBq.js";import"./Zap-BzSAmKbo.js";import"./mcp-oauth-C4AEx9Qj.js";function Yt(s){const e=`deco-filters-${s}`,[n,p]=B.useState(()=>{try{const c=globalThis.localStorage?.getItem(e);if(c)return JSON.parse(c)}catch(c){console.error("Failed to parse stored filters:",c)}return[]});return[n,c=>{p(c);try{globalThis.localStorage?.setItem(e,JSON.stringify(c))}catch(o){console.error("Failed to save filters:",o)}}]}function Zt(s){const e=ae.c(7),[n,p]=B.useState(s),[r,c]=B.useState(s?"desc":null);let o;e[0]!==r||e[1]!==n?(o=a=>{n!==a?(p(a),c("asc")):r==="asc"?c("desc"):r==="desc"&&(p(void 0),c(null))},e[0]=r,e[1]=n,e[2]=o):o=e[2];const l=o;let d;return e[3]!==l||e[4]!==r||e[5]!==n?(d={sortKey:n,sortDirection:r,handleSort:l},e[3]=l,e[4]=r,e[5]=n,e[6]=d):d=e[6],d}function en(s){const e=ae.c(20),{namespace:n,resource:p,defaultSortKey:r,defaultViewMode:c}=s,o=r===void 0?"title":r,l=c===void 0?"table":c,[d,a]=B.useState(""),N=B.useDeferredValue(d),f=`${n}-${p}`,[g,v]=Yt(f),x=`studio-${p}-filter-visible-${n}`;let _;e[0]!==x?(_=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=_):_=e[1];const[u,y]=B.useState(_);let j;e[2]!==x?(j=O=>{y(O),globalThis.localStorage?.setItem(x,String(O))},e[2]=x,e[3]=j):j=e[3];const D=j;let b;e[4]!==u||e[5]!==D?(b=()=>{D(!u)},e[4]=u,e[5]=D,e[6]=b):b=e[6];const k=b,[i,T]=Ct(`studio-${p}-${n}`,l),{sortKey:L,sortDirection:M,handleSort:A}=Zt(o),K=L;let U;return e[7]!==u||e[8]!==g||e[9]!==A||e[10]!==d||e[11]!==N||e[12]!==D||e[13]!==v||e[14]!==T||e[15]!==M||e[16]!==K||e[17]!==k||e[18]!==i?(U={search:d,searchTerm:N,setSearch:a,filters:g,setFilters:v,filterBarVisible:u,setFilterBarVisible:D,toggleFilterBar:k,viewMode:i,setViewMode:T,sortKey:K,sortDirection:M,handleSort:A},e[7]=u,e[8]=g,e[9]=A,e[10]=d,e[11]=N,e[12]=D,e[13]=v,e[14]=T,e[15]=M,e[16]=K,e[17]=k,e[18]=i,e[19]=U):U=e[19],U}function tn(s){const e=ae.c(35),{open:n,onOpenChange:p,count:r,onConfirm:c}=s,o=de(),l=r===1?"orgs.bulkDeleteDialog.deleteTitleSingular":"orgs.bulkDeleteDialog.deleteTitlePlural";let d;e[0]!==r||e[1]!==o||e[2]!==l?(d=o(l,{count:r}),e[0]=r,e[1]=o,e[2]=l,e[3]=d):d=e[3];let a;e[4]!==d?(a=t.jsx(Ie,{children:d}),e[4]=d,e[5]=a):a=e[5];const N=r===1?"orgs.bulkDeleteDialog.deleteDescriptionSingular":"orgs.bulkDeleteDialog.deleteDescriptionPlural";let f;e[6]!==o||e[7]!==N?(f=o(N),e[6]=o,e[7]=N,e[8]=f):f=e[8];let g;e[9]!==f?(g=t.jsx(Pe,{children:f}),e[9]=f,e[10]=g):g=e[10];let v;e[11]!==a||e[12]!==g?(v=t.jsxs(Le,{children:[a,g]}),e[11]=a,e[12]=g,e[13]=v):v=e[13];let x;e[14]!==o?(x=o("orgs.bulkDeleteDialog.cancelButton"),e[14]=o,e[15]=x):x=e[15];let _;e[16]!==x?(_=t.jsx(Oe,{children:x}),e[16]=x,e[17]=_):_=e[17];const u=r===1?"orgs.bulkDeleteDialog.deleteButtonSingular":"orgs.bulkDeleteDialog.deleteButtonPlural";let y;e[18]!==r||e[19]!==o||e[20]!==u?(y=o(u,{count:r}),e[18]=r,e[19]=o,e[20]=u,e[21]=y):y=e[21];let j;e[22]!==c||e[23]!==y?(j=t.jsx(Me,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:y}),e[22]=c,e[23]=y,e[24]=j):j=e[24];let D;e[25]!==j||e[26]!==_?(D=t.jsxs(Fe,{children:[_,j]}),e[25]=j,e[26]=_,e[27]=D):D=e[27];let b;e[28]!==D||e[29]!==v?(b=t.jsxs($e,{children:[v,D]}),e[28]=D,e[29]=v,e[30]=b):b=e[30];let k;return e[31]!==p||e[32]!==n||e[33]!==b?(k=t.jsx(Ue,{open:n,onOpenChange:p,children:b}),e[31]=p,e[32]=n,e[33]=b,e[34]=k):k=e[34],k}function nn(s){return s._registryId?.includes("community-registry")===!0}function sn(s){const e=ae.c(82),{item:n,canManage:p,allConnections:r,connectedAppNames:c,connectingItemId:o,onNavigateConnected:l,onConnect:d}=s,a=de(),[N,f]=B.useState(!1),[g,v]=B.useState(null);let x,_;e[0]!==c||e[1]!==n?(x=Ae(n)??"",_=c.has(x),e[0]=c,e[1]=n,e[2]=x,e[3]=_):(x=e[2],_=e[3]);const u=_;let y;e[4]!==n._meta?(y=vt(n._meta),e[4]=n._meta,e[5]=y):y=e[5];const j=y,D=j?.friendlyName||j?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",b=n.server?.description||n.description||null;let k;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(k=n.server?.icons?.[0]?.src||at(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=k):k=e[8];const i=k;let T;if(e[9]!==r||e[10]!==x){let J;e[12]!==x?(J=be=>be.connection_type!=="VIRTUAL"&&be.app_name===x,e[12]=x,e[13]=J):J=e[13],T=r.filter(J),e[9]=r,e[10]=x,e[11]=T}else T=e[11];const L=T;let M;e[14]!==n?(M=nn(n),e[14]=n,e[15]=M):M=e[15];const A=M,K=u||p;let U,O;e[16]!==L||e[17]!==A||e[18]!==u||e[19]!==n||e[20]!==d||e[21]!==l?(U=()=>{if(u){const J=L[0];J&&l(J);return}O()},O=()=>{A?(v("connect"),f(!0)):d(n)},e[16]=L,e[17]=A,e[18]=u,e[19]=n,e[20]=d,e[21]=l,e[22]=U,e[23]=O):(U=e[22],O=e[23]);let V;e[24]!==n||e[25]!==d||e[26]!==g?(V=()=>{re("connections_community_warning_confirmed",{registry_item_id:n.id}),f(!1),g==="connect"&&d(n),v(null)},e[24]=n,e[25]=d,e[26]=g,e[27]=V):V=e[27];const q=V;let I;e[28]!==b||e[29]!==i||e[30]!==D?(I={title:D,description:b,icon:i},e[28]=b,e[29]=i,e[30]=D,e[31]=I):I=e[31];let Q;e[32]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(ye,{}),e[32]=Q):Q=e[32];const S=K?U:void 0;let w;e[33]!==A||e[34]!==n._sourceIcon?(w=A&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[33]=A,e[34]=n._sourceIcon,e[35]=w):w=e[35];let z;e[36]!==p||e[37]!==o||e[38]!==O||e[39]!==u||e[40]!==n.id||e[41]!==a?(z=u?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:a("orgs.catalogItemCard.connected")}):p&&t.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:o!==null,onClick:J=>{J.stopPropagation(),O()},children:o===n.id?t.jsx(pe,{size:14,className:"animate-spin"}):a("orgs.catalogItemCard.connect")}),e[36]=p,e[37]=o,e[38]=O,e[39]=u,e[40]=n.id,e[41]=a,e[42]=z):z=e[42];let R;e[43]!==w||e[44]!==z?(R=t.jsxs("div",{className:"flex items-center gap-2",children:[w,z]}),e[43]=w,e[44]=z,e[45]=R):R=e[45];let H;e[46]!==R||e[47]!==I||e[48]!==S?(H=t.jsx(ve,{connection:I,fallbackIcon:Q,onClick:S,headerActionsAlwaysVisible:!0,headerActions:R}),e[46]=R,e[47]=I,e[48]=S,e[49]=H):H=e[49];let C;e[50]!==a?(C=a("orgs.catalogItemCard.communityMcpServerTitle"),e[50]=a,e[51]=C):C=e[51];let F;e[52]!==C?(F=t.jsx(Ie,{children:C}),e[52]=C,e[53]=F):F=e[53];let P;e[54]!==a?(P=a("orgs.catalogItemCard.communityMcpServerDescription"),e[54]=a,e[55]=P):P=e[55];let Z;e[56]!==P?(Z=t.jsx(Pe,{children:P}),e[56]=P,e[57]=Z):Z=e[57];let te;e[58]!==F||e[59]!==Z?(te=t.jsxs(Le,{children:[F,Z]}),e[58]=F,e[59]=Z,e[60]=te):te=e[60];let ee;e[61]!==a?(ee=a("orgs.catalogItemCard.cancel"),e[61]=a,e[62]=ee):ee=e[62];let m;e[63]!==ee?(m=t.jsx(Oe,{children:ee}),e[63]=ee,e[64]=m):m=e[64];let h;e[65]!==a?(h=a("orgs.catalogItemCard.continue"),e[65]=a,e[66]=h):h=e[66];let $;e[67]!==q||e[68]!==h?($=t.jsx(Me,{onClick:q,children:h}),e[67]=q,e[68]=h,e[69]=$):$=e[69];let W;e[70]!==m||e[71]!==$?(W=t.jsxs(Fe,{children:[m,$]}),e[70]=m,e[71]=$,e[72]=W):W=e[72];let E;e[73]!==te||e[74]!==W?(E=t.jsxs($e,{children:[te,W]}),e[73]=te,e[74]=W,e[75]=E):E=e[75];let X;e[76]!==N||e[77]!==E?(X=t.jsx(Ue,{open:N,onOpenChange:f,children:E}),e[76]=N,e[77]=E,e[78]=X):X=e[78];let ne;return e[79]!==H||e[80]!==X?(ne=t.jsxs(t.Fragment,{children:[H,X]}),e[79]=H,e[80]=X,e[81]=ne):ne=e[81],ne}function Je(s){const e=ae.c(8),{selectionMode:n,children:p}=s,r=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let c;e[0]!==r?(c=je("overflow-hidden transition-all duration-150 ease-out",r),e[0]=r,e[1]=c):c=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Gt,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:cn,children:t.jsx(Jt,{size:20})})}),e[2]=o):o=e[2];let l;e[3]!==p?(l=t.jsxs(qt,{children:[o,t.jsx(Qt,{align:"end",onClick:on,children:p})]}),e[3]=p,e[4]=l):l=e[4];let d;return e[5]!==c||e[6]!==l?(d=t.jsx("div",{className:c,children:l}),e[5]=c,e[6]=l,e[7]=d):d=e[7],d}function on(s){return s.stopPropagation()}function cn(s){return s.stopPropagation()}function ln(s){const e=ae.c(57),{group:n,onOpen:p,selectionMode:r,selectedIds:c,onToggleSelect:o}=s,l=de();let d;if(e[0]!==n.connections||e[1]!==c){let I;e[3]!==c?(I=Q=>c.has(Q.id),e[3]=c,e[4]=I):I=e[4],d=n.connections.every(I),e[0]=n.connections,e[1]=c,e[2]=d}else d=e[2];const a=d;let N;if(e[5]!==n.connections||e[6]!==c){let I;e[8]!==c?(I=Q=>c.has(Q.id),e[8]=c,e[9]=I):I=e[9],N=n.connections.some(I),e[5]=n.connections,e[6]=c,e[7]=N}else N=e[7];const f=N;let g;e[10]!==a||e[11]!==n.connections||e[12]!==o||e[13]!==c?(g=()=>{for(const I of n.connections)a?c.has(I.id)&&o(I.id):c.has(I.id)||o(I.id)},e[10]=a,e[11]=n.connections,e[12]=o,e[13]=c,e[14]=g):g=e[14];const v=g,x=n.title,_=n.icon;let u;e[15]!==n.connections.length||e[16]!==l?(u=l("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=l,e[17]=u):u=e[17];let y;e[18]!==n.icon||e[19]!==n.title||e[20]!==u?(y={title:x,icon:_,description:u},e[18]=n.icon,e[19]=n.title,e[20]=u,e[21]=y):y=e[21];let j;e[22]!==p||e[23]!==r||e[24]!==v?(j=()=>r?v():p(),e[22]=p,e[23]=r,e[24]=v,e[25]=j):j=e[25];const D=r&&a&&"ring-2 ring-primary",b=r&&f&&!a&&"ring-1 ring-primary/50";let k;e[26]!==b||e[27]!==D?(k=je(D,b),e[26]=b,e[27]=D,e[28]=k):k=e[28];const i=r?a?!0:f&&"mixed":void 0;let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ye,{}),e[29]=T):T=e[29];let L;e[30]!==a||e[31]!==n.connections.length||e[32]!==r||e[33]!==f||e[34]!==l||e[35]!==v?(L=r?t.jsx(Ge,{checked:a?!0:f?"indeterminate":!1,onCheckedChange:v}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:l("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=a,e[31]=n.connections.length,e[32]=r,e[33]=f,e[34]=l,e[35]=v,e[36]=L):L=e[36];let M;e[37]!==p?(M=I=>{I.stopPropagation(),p()},e[37]=p,e[38]=M):M=e[38];let A;e[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(qe,{size:16}),e[39]=A):A=e[39];let K;e[40]!==l?(K=l("orgs.connectionSelectionUi.open"),e[40]=l,e[41]=K):K=e[41];let U;e[42]!==M||e[43]!==K?(U=t.jsxs(me,{onClick:M,children:[A,K]}),e[42]=M,e[43]=K,e[44]=U):U=e[44];let O;e[45]!==r||e[46]!==U?(O=t.jsx(Je,{selectionMode:r,children:U}),e[45]=r,e[46]=U,e[47]=O):O=e[47];let V;e[48]!==L||e[49]!==O?(V=t.jsxs("div",{className:"flex items-center gap-1",children:[L,O]}),e[48]=L,e[49]=O,e[50]=V):V=e[50];let q;return e[51]!==k||e[52]!==i||e[53]!==V||e[54]!==y||e[55]!==j?(q=t.jsx(t.Fragment,{children:t.jsx(ve,{connection:y,onClick:j,className:k,selected:i,fallbackIcon:T,headerActionsAlwaysVisible:!0,headerActions:V})}),e[51]=k,e[52]=i,e[53]=V,e[54]=y,e[55]=j,e[56]=q):q=e[56],q}function rn(s){const e=ae.c(36),{connection:n,isSelected:p,selectionMode:r,canManage:c,canManageAgents:o,onToggleSelect:l,onOpen:d,onToggleStatus:a,onDelete:N}=s,f=de();let g;e[0]!==p||e[1]!==l||e[2]!==r||e[3]!==f?(g=r?t.jsx(Ge,{checked:p,onCheckedChange:l,onClick:an}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:f("orgs.connectionSelectionUi.connected")}),e[0]=p,e[1]=l,e[2]=r,e[3]=f,e[4]=g):g=e[4];let v;e[5]!==d?(v=i=>{i.stopPropagation(),d()},e[5]=d,e[6]=v):v=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(qe,{size:16}),e[7]=x):x=e[7];let _;e[8]!==f?(_=f("orgs.connectionSelectionUi.open"),e[8]=f,e[9]=_):_=e[9];let u;e[10]!==v||e[11]!==_?(u=t.jsxs(me,{onClick:v,children:[x,_]}),e[10]=v,e[11]=_,e[12]=u):u=e[12];let y;e[13]!==c||e[14]!==o||e[15]!==l||e[16]!==f?(y=(c||o)&&t.jsxs(me,{onClick:i=>{i.stopPropagation(),l()},children:[t.jsx($t,{size:16}),f("orgs.connectionSelectionUi.select")]}),e[13]=c,e[14]=o,e[15]=l,e[16]=f,e[17]=y):y=e[17];let j;e[18]!==c||e[19]!==n||e[20]!==a||e[21]!==f?(j=c&&(n.status==="active"?t.jsxs(me,{onClick:i=>{i.stopPropagation(),a("inactive")},children:[t.jsx(Ut,{size:16}),f("orgs.connectionSelectionUi.disable")]}):t.jsxs(me,{onClick:i=>{i.stopPropagation(),a("active")},children:[t.jsx(Vt,{size:16}),f("orgs.connectionSelectionUi.enable")]})),e[18]=c,e[19]=n,e[20]=a,e[21]=f,e[22]=j):j=e[22];let D;e[23]!==c||e[24]!==N||e[25]!==f?(D=c&&t.jsxs(me,{variant:"destructive",onClick:i=>{i.stopPropagation(),N()},children:[t.jsx(Qe,{size:16}),f("orgs.connectionSelectionUi.delete")]}),e[23]=c,e[24]=N,e[25]=f,e[26]=D):D=e[26];let b;e[27]!==r||e[28]!==u||e[29]!==y||e[30]!==j||e[31]!==D?(b=t.jsxs(Je,{selectionMode:r,children:[u,y,j,D]}),e[27]=r,e[28]=u,e[29]=y,e[30]=j,e[31]=D,e[32]=b):b=e[32];let k;return e[33]!==g||e[34]!==b?(k=t.jsxs("div",{className:"flex items-center gap-1",children:[g,b]}),e[33]=g,e[34]=b,e[35]=k):k=e[35],k}function an(s){return s.stopPropagation()}function dn(s){const e=ae.c(29),{count:n,total:p,canManage:r,canManageAgents:c,onSelectAll:o,onDeselectAll:l,onDelete:d,onAddToAgent:a,onToggleStatus:N,onCancel:f}=s,g=de();if(n===0)return null;let v;e[0]!==n||e[1]!==g?(v=g("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=g,e[2]=v):v=e[2];let x;e[3]!==v?(x=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:v}),e[3]=v,e[4]=x):x=e[4];let _;e[5]!==n||e[6]!==l||e[7]!==o||e[8]!==g||e[9]!==p?(_=n<p?t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:o,children:g("orgs.connectionSelectionUi.selectAll",{total:p})}):t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:l,children:g("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=l,e[7]=o,e[8]=g,e[9]=p,e[10]=_):_=e[10];let u;e[11]!==c||e[12]!==a||e[13]!==g?(u=c&&t.jsxs(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:a,children:[t.jsx(We,{size:13}),g("orgs.connectionSelectionUi.addToAgent")]}),e[11]=c,e[12]=a,e[13]=g,e[14]=u):u=e[14];let y;e[15]!==r||e[16]!==d||e[17]!==N||e[18]!==g?(y=r&&t.jsxs(t.Fragment,{children:[t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("active"),children:g("orgs.connectionSelectionUi.enable")}),t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("inactive"),children:g("orgs.connectionSelectionUi.disable")}),t.jsxs(G,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(Qe,{size:13}),g("orgs.connectionSelectionUi.delete")]})]}),e[15]=r,e[16]=d,e[17]=N,e[18]=g,e[19]=y):y=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Xe,{size:13}),e[20]=j):j=e[20];let D;e[21]!==f?(D=t.jsx(G,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:f,children:j}),e[21]=f,e[22]=D):D=e[22];let b;return e[23]!==x||e[24]!==_||e[25]!==u||e[26]!==y||e[27]!==D?(b=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[x,_,u,y,D]})}),e[23]=x,e[24]=_,e[25]=u,e[26]=y,e[27]=D,e[28]=b):b=e[28],b}function un(s){const e=ae.c(45),{open:n,onOpenChange:p,agents:r,onConfirm:c}=s,o=de(),[l,d]=B.useState(null);let a;e[0]!==o?(a=o("orgs.connectionSelectionUi.addToAgentTitle"),e[0]=o,e[1]=a):a=e[1];let N;e[2]!==a?(N=t.jsx(Ve,{children:a}),e[2]=a,e[3]=N):N=e[3];let f;e[4]!==o?(f=o("orgs.connectionSelectionUi.addToAgentDescription"),e[4]=o,e[5]=f):f=e[5];let g;e[6]!==f?(g=t.jsx(ze,{children:f}),e[6]=f,e[7]=g):g=e[7];let v;e[8]!==N||e[9]!==g?(v=t.jsxs(Ee,{children:[N,g]}),e[8]=N,e[9]=g,e[10]=v):v=e[10];let x;e[11]!==r||e[12]!==l||e[13]!==o?(x=r.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:o("orgs.connectionSelectionUi.noAgentsFound")}):r.map(A=>t.jsxs("button",{type:"button",onClick:()=>d(A.id),className:je("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",l===A.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(Xt,{icon:A.icon,name:A.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:A.title}),A.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:A.description})]})]},A.id)),e[11]=r,e[12]=l,e[13]=o,e[14]=x):x=e[14];let _;e[15]!==x?(_=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:x}),e[15]=x,e[16]=_):_=e[16];let u;e[17]!==p?(u=()=>p(!1),e[17]=p,e[18]=u):u=e[18];let y;e[19]!==o?(y=o("orgs.connectionSelectionUi.cancel"),e[19]=o,e[20]=y):y=e[20];let j;e[21]!==u||e[22]!==y?(j=t.jsx(G,{variant:"outline",onClick:u,children:y}),e[21]=u,e[22]=y,e[23]=j):j=e[23];const D=!l;let b;e[24]!==c||e[25]!==p||e[26]!==l?(b=()=>{l&&(c(l),p(!1),d(null))},e[24]=c,e[25]=p,e[26]=l,e[27]=b):b=e[27];let k;e[28]!==o?(k=o("orgs.connectionSelectionUi.add"),e[28]=o,e[29]=k):k=e[29];let i;e[30]!==D||e[31]!==b||e[32]!==k?(i=t.jsx(G,{disabled:D,onClick:b,children:k}),e[30]=D,e[31]=b,e[32]=k,e[33]=i):i=e[33];let T;e[34]!==j||e[35]!==i?(T=t.jsxs(Be,{children:[j,i]}),e[34]=j,e[35]=i,e[36]=T):T=e[36];let L;e[37]!==T||e[38]!==v||e[39]!==_?(L=t.jsxs(Ke,{className:"sm:max-w-[400px]",children:[v,_,T]}),e[37]=T,e[38]=v,e[39]=_,e[40]=L):L=e[40];let M;return e[41]!==p||e[42]!==n||e[43]!==L?(M=t.jsx(He,{open:n,onOpenChange:p,children:L}),e[41]=p,e[42]=n,e[43]=L,e[44]=M):M=e[44],M}function mn({listState:s,activeTab:e,typeFilter:n,statusFilter:p,registryFilter:r,enabledRegistries:c}){const o=de(),{org:l}=Ne(),d=ct(),a=ke(),{data:N}=Te.useSession(),f=Re(),g=Mt(s),v=jt(),{granted:x}=Ce("connections:manage"),{granted:_}=Ce("agents:manage"),[u,y]=B.useState(new Set),j=u.size>0,[D,b]=B.useState(!1),[k,i]=B.useState(!1),[T,L]=B.useState(null),M=Ft(),A=g.filter(m=>!(n!=="ALL"&&m.connection_type!==n||p!=="ALL"&&m.status!==p)),K=ht(A),U=m=>{y(h=>{const $=new Set(h);return $.has(m)?$.delete(m):$.add(m),$})},O=()=>{y(new Set)},V=we(c,s.searchTerm),q=V.items,I=St(V.loadMore,V.hasMore,V.isLoadingMore),Q=new Set(g.filter(m=>m.app_name).map(m=>m.app_name)),S=r==="ALL"||c.some(m=>m.id===r)?r:"ALL",w=s.search.length>0,z=e==="all"||w?q.filter(m=>{if(S!=="ALL"&&m._registryId!==S)return!1;if(w){const h=Ae(m);if(h&&Q.has(h))return!1}return!0}):[],R=e==="connected"||w?K:[],H=async m=>{if(!(!l||!N?.user?.id)){re("connection_add_clicked",{action:"connect_new",registry_item_id:m.id,source:"connections_page"}),L(m.id);try{const h=ut(m,l.id,N.user.id,{remoteIndex:0}),$=h.connection_type==="STDIO",W=!!h.connection_url,E=$&&h.connection_headers&&typeof h.connection_headers=="object"&&"command"in h.connection_headers;if(!W&&!E){Y.error(o("orgs.connections.cannotConnectNoMethod")),L(null);return}const{id:X}=await f.create.mutateAsync(h),ne=await Wt({connectionId:X,orgId:l.id,orgSlug:l.slug,persistFallback:J=>f.update.mutateAsync({id:X,data:{connection_token:J}}).then(()=>{})});if(ne.ran&&!ne.ok){re("connection_oauth_failed",{connection_id:X,flow:"connections_page_connect",error:ne.error??"no_token"}),Y.error(o("orgs.connections.authenticationFailed",{error:ne.error??"no token received"}));return}if(ne.ran){re("connection_oauth_succeeded",{connection_id:X,flow:"connections_page_connect"});const J=new URL(`/api/${l.slug}/mcp/${X}`,window.location.origin);await d.invalidateQueries({queryKey:rt.isMCPAuthenticated(J.href,null)}),F(),Y.success(o("orgs.connections.authenticationSuccessful"))}Y.success(o("orgs.connections.connectedSuccessfully"))}catch(h){Y.error(o("orgs.connections.failedToConnect",{error:h instanceof Error?h.message:String(h)}))}finally{L(null)}}},C=lt(),F=()=>{d.invalidateQueries({predicate:m=>{const h=m.queryKey;return h[1]===l.id&&h[3]==="collection"&&h[4]==="CONNECTIONS"}})},P=async()=>{b(!1);const m=[...u];re("connections_bulk_delete",{count:m.length});let h=0;for(const $ of m)try{await C.call("COLLECTION_CONNECTIONS_DELETE",{id:$,force:!0}),h++}catch{}F(),Y.success(o("orgs.connections.deletedConnections",{count:h})),O()},Z=async(m,h)=>{try{await f.update.mutateAsync({id:m,data:{status:h}}),F(),Y.success(o(h==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{Y.error(o("orgs.connections.failedToUpdateConnection"))}},te=async m=>{const h=[...u];re("connections_bulk_status_toggled",{count:h.length,to_status:m});let $=0;for(const W of h)try{await f.update.mutateAsync({id:W,data:{status:m}}),$++}catch{}F(),Y.success(m==="active"?o("orgs.connections.enabledConnections",{count:$}):o("orgs.connections.disabledConnections",{count:$})),O()},ee=async m=>{const h=M.find(E=>E.id===m);if(!h)return;re("connections_bulk_add_to_agent",{agent_id:m,count:u.size});const $=new Set(h.connections.map(E=>E.connection_id)),W=[...u].filter(E=>!$.has(E)).map(E=>({connection_id:E,selected_tools:null,selected_resources:null,selected_prompts:null}));if(W.length===0){Y.info(o("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await C.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:m,data:{connections:[...h.connections,...W]}}),d.invalidateQueries({predicate:E=>{const X=E.queryKey;return X[1]===l.id&&X[3]==="collection"&&X[4]==="VIRTUAL_MCP"}}),Y.success(o("orgs.connections.addedConnectionsToAgent",{count:W.length,agentTitle:h.title})),O()}catch{Y.error(o("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(yt,{...v}),t.jsx(tn,{open:D,onOpenChange:b,count:u.size,onConfirm:P}),t.jsx(un,{open:k,onOpenChange:i,agents:M,onConfirm:ee}),V.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(pe,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(w?z.length===0&&A.length===0:e==="all"?z.length===0:A.length===0)?t.jsx(xt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:o("orgs.connections.noConnectionsFound"),description:s.search?o("orgs.connections.noConnectionsMatchSearch",{search:s.search}):o(x?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[R.map(m=>{if(m.type==="group")return t.jsx(ln,{group:m,onOpen:()=>{a({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:m.key}})},selectionMode:j,selectedIds:u,onToggleSelect:U},m.key);const h=m.connection,$=u.has(h.id);return t.jsx(ve,{connection:h,fallbackIcon:t.jsx(ye,{}),onClick:()=>j?U(h.id):a({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:xe(h)}}),className:je($&&"ring-2 ring-primary bg-primary/5"),selected:j?$:void 0,headerActionsAlwaysVisible:!0,headerActions:t.jsx(rn,{connection:h,isSelected:$,selectionMode:j,canManage:x,canManageAgents:_,onToggleSelect:()=>U(h.id),onOpen:()=>a({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:xe(h)}}),onToggleStatus:W=>Z(h.id,W),onDelete:()=>v.requestDelete(h)})},h.id)}),z.map(m=>t.jsx(sn,{item:m,canManage:x,allConnections:g,connectedAppNames:Q,connectingItemId:T,onNavigateConnected:h=>a({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:xe(h)}}),onConnect:H},`catalog-${m._registryId}:${m.id}`)),(e==="all"||w)&&c.length>0&&t.jsx("div",{ref:I,className:"col-span-full h-4"}),(e==="all"||w)&&V.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(pe,{size:24,className:"animate-spin text-muted-foreground"})})]})}),j&&t.jsx(dn,{count:u.size,total:A.length,canManage:x,canManageAgents:_,onSelectAll:()=>{y(new Set(A.map(m=>m.id)))},onDeselectAll:()=>y(new Set),onDelete:()=>b(!0),onAddToAgent:()=>i(!0),onToggleStatus:te,onCancel:O})]})}function gn(){const s=de(),{org:e}=Ne(),n=ke(),p=Ze({strict:!1}),{data:r}=Te.useSession(),{stdioEnabled:c}=et(),o=tt(),{granted:l}=Ce("connections:manage"),d=en({namespace:e.slug,resource:"connections"}),a=Re(),[N,f]=nt(st.connectionsTab(e.slug),S=>p.tab==="all"||p.tab==="connected"?p.tab:S??"all"),[g,v]=B.useState("ALL"),[x,_]=B.useState("ALL"),[u,y]=B.useState("ALL"),j=ft(),b=we(j,d.searchTerm).items,k=d.search!==d.searchTerm,i=ot({resolver:it(Bt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),T=i.watch("ui_type"),L=i.watch("connection_url"),M=i.watch("npx_package"),A=he({uiType:T,connectionUrl:L??"",npxPackage:M??""})??De({uiType:T,connectionUrl:L??"",registryItems:b}),K=l&&p.action==="create",U=()=>{re("connections_custom_dialog_opened",{source:"connections_page"}),n({to:"/$org/settings/connections",params:{org:e.slug},search:{action:"create"}})},O=()=>{n({to:"/$org/settings/connections",params:{org:e.slug},search:{}})},V=async S=>{let w,z=null,R=null,H=null;S.ui_type==="NPX"?(w="STDIO",z="",H=Ht(S.npx_package||"",S.env_vars||[])):S.ui_type==="STDIO"?(w="STDIO",z="",H=Rt(S.stdio_command||"",S.stdio_args||"",S.stdio_cwd,S.env_vars||[])):(w=S.ui_type,z=S.connection_url||"",R=S.connection_token||null);const C=dt("conn");re("connection_custom_created",{connection_type:w,ui_type:S.ui_type}),await a.create.mutateAsync({id:C,title:S.title,description:S.description||null,connection_type:w,connection_url:z,connection_token:R,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:e.id,icon:S.icon??null,app_name:null,app_id:null,connection_headers:H,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),O(),i.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:xe({app_name:null,connection_url:z,title:S.title,id:C})}})},q=S=>{S||(K&&O(),i.reset())},I=S=>{const w=S.trim();if(!w)return;const z=!!i.formState.dirtyFields.title,R=!!i.formState.dirtyFields.description,H=!!i.formState.dirtyFields.env_vars,C=P=>{if(P&&(!z&&!i.getValues("title").trim()&&P.title&&i.setValue("title",P.title,{shouldDirty:!1}),!R&&!(i.getValues("description")??"").trim()&&P.description&&i.setValue("description",P.description,{shouldDirty:!1}),!H&&P.envVarKeys?.length)){const Z=i.getValues("env_vars")??[],te=new Set(Z.map(m=>m.key)),ee=P.envVarKeys.filter(m=>!te.has(m));ee.length>0&&i.setValue("env_vars",[...Z,...ee.map(m=>({key:m,value:""}))],{shouldDirty:!0})}},F=Kt(w);if(F&&c){i.setValue("ui_type","NPX",{shouldDirty:!0}),i.setValue("npx_package",F.packageName,{shouldDirty:!0}),i.setValue("connection_url","",{shouldDirty:!0}),i.setValue("connection_token",null,{shouldDirty:!0}),C(he({uiType:"NPX",npxPackage:F.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const P=T==="HTTP"||T==="SSE"||T==="Websocket"?T:"HTTP";i.setValue("ui_type",P,{shouldDirty:!0}),i.setValue("connection_url",w,{shouldDirty:!0}),C(he({uiType:P,connectionUrl:w})??De({uiType:P,connectionUrl:w,registryItems:b}));return}T==="NPX"&&C(he({uiType:"NPX",npxPackage:w}))},Q=l?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(G,{variant:"outline",onClick:U,children:[t.jsx(We,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:s("orgs.connections.customConnection")})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(fe,{children:[(()=>{const S=s("orgs.connections.createConnection"),w=s("orgs.connections.createConnectionDescription"),z=i.formState.isSubmitting?s("orgs.connections.saving"):s("orgs.connections.createConnection"),R=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(se,{control:i.control,name:"ui_type",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.type")}),t.jsxs(wt,{value:C.value,onValueChange:C.onChange,children:[t.jsx(ce,{children:t.jsx(It,{children:t.jsx(Pt,{})})}),t.jsxs(Lt,{children:[t.jsx(ge,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ge,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ge,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),c&&t.jsxs(t.Fragment,{children:[t.jsx(ge,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ye,{className:"w-4 h-4"}),s("orgs.connections.npxPackage")]})}),t.jsx(ge,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(zt,{className:"w-4 h-4"}),s("orgs.connections.customCommand")]})})]})]})]}),t.jsx(le,{})]})}),T==="NPX"&&t.jsx(se,{control:i.control,name:"npx_package",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.npmPackage")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.npmPackagePlaceholder"),...C,value:C.value??"",onPaste:F=>{const P=F.clipboardData.getData("text");P&&(F.preventDefault(),i.setValue("npx_package",P.trim(),{shouldDirty:!0}),I(P))},onBlur:F=>{I(F.target.value),C.onBlur()}})}),t.jsx(le,{})]})}),T==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(se,{control:i.control,name:"stdio_command",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.command")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.commandPlaceholder"),...C,value:C.value??""})}),t.jsx(le,{})]})}),t.jsx(se,{control:i.control,name:"stdio_args",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.arguments")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.argumentsPlaceholder"),...C,value:C.value??""})}),t.jsx(le,{})]})})]}),t.jsx(se,{control:i.control,name:"stdio_cwd",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.workingDirectory")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.workingDirectoryPlaceholder"),...C,value:C.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("orgs.connections.directoryExecutionNote")}),t.jsx(le,{})]})})]}),(T==="NPX"||T==="STDIO")&&t.jsx(se,{control:i.control,name:"env_vars",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.environmentVariables")}),t.jsx(ce,{children:t.jsx(Et,{value:C.value??[],onChange:C.onChange})}),t.jsx(le,{})]})}),T!=="NPX"&&T!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(se,{control:i.control,name:"connection_url",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.url")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.urlPlaceholder"),...C,value:C.value??"",onPaste:F=>{const P=F.clipboardData.getData("text");P&&(F.preventDefault(),i.setValue("connection_url",P.trim(),{shouldDirty:!0}),I(P))},onBlur:F=>{I(F.target.value),C.onBlur()}})}),t.jsx(le,{})]})}),t.jsx(se,{control:i.control,name:"connection_token",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:A?.token?.label??s("orgs.connections.tokenOptional")}),t.jsx(ce,{children:t.jsx(ue,{type:"password",placeholder:A?.token?.placeholder??s("orgs.connections.tokenPlaceholder"),...C,value:C.value??""})}),A?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[A.token.helperText,A.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.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:s("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(le,{})]})})]}),t.jsx(se,{control:i.control,name:"title",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.name")}),t.jsx(ce,{children:t.jsx(ue,{placeholder:s("orgs.connections.namePlaceholder"),...C})}),t.jsx(le,{})]})}),t.jsx(se,{control:i.control,name:"description",render:({field:C})=>t.jsxs(oe,{children:[t.jsx(ie,{children:s("orgs.connections.description")}),t.jsx(ce,{children:t.jsx(Ot,{placeholder:s("orgs.connections.descriptionPlaceholder"),rows:3,...C,value:C.value??""})}),t.jsx(le,{})]})})]}),H=K;return o?t.jsx(bt,{open:H,onOpenChange:q,children:t.jsxs(_t,{className:"max-h-[90vh]",children:[t.jsx(Dt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Nt,{children:S}),t.jsx(kt,{className:"mt-1",children:w})]}),t.jsx(Tt,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":s("orgs.connections.close"),children:t.jsx(Xe,{size:16})})})]})}),t.jsx(_e,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(V),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:R}),t.jsx(At,{children:t.jsx(G,{type:"submit",disabled:i.formState.isSubmitting,className:"w-full",children:z})})]})})]})}):t.jsx(He,{open:H,onOpenChange:q,children:t.jsxs(Ke,{className:"sm:max-w-[525px]",children:[t.jsxs(Ee,{children:[t.jsx(Ve,{children:S}),t.jsx(ze,{children:w})]}),t.jsx(_e,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(V),children:[t.jsx("div",{className:"py-4",children:R}),t.jsxs(Be,{children:[t.jsx(G,{type:"button",variant:"outline",onClick:()=>q(!1),children:s("orgs.connections.cancel")}),t.jsx(G,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:z})]})]})})]})})})(),t.jsx(fe.Content,{children:t.jsx(fe.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(fe.Title,{children:s("orgs.connections.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(gt,{value:d.search,onChange:d.setSearch,placeholder:s("orgs.connections.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:S=>{S.key==="Escape"&&(d.setSearch(""),S.target.blur())}}),t.jsx(mt,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:s("orgs.connections.sortName")},{id:"description",label:s("orgs.connections.sortDescription")},{id:"connection_type",label:s("orgs.connections.sortType")},{id:"updated_by",label:s("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:s("orgs.connections.sortUpdated")}],filters:[{label:s("orgs.connections.filterType"),value:g,onChange:S=>v(S||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:s("orgs.connections.filterStatus"),value:x,onChange:S=>_(S||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"active",label:s("orgs.connections.filterActive")},{id:"inactive",label:s("orgs.connections.filterInactive")},{id:"error",label:s("orgs.connections.filterError")}]},...j.length>1?[{label:s("orgs.connections.filterRegistry"),value:u,onChange:S=>y(S||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAllRegistries")},...j.map(S=>({id:S.id,label:S.id.includes("community-registry")?s("orgs.connections.communityMcpRegistry"):S.title}))]}]:[]]})]}),Q]}),t.jsx(pt,{tabs:[{id:"all",label:s("orgs.connections.tabAll")},{id:"connected",label:s("orgs.connections.tabConnected")}],activeTab:N,onTabChange:S=>{const w=S;w!==N&&re("connections_page_tab_changed",{to_tab:w}),f(w)}}),t.jsx(B.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(pe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:k?.5:1,transition:k?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:k?"none":"auto"},children:t.jsx(mn,{listState:d,activeTab:N,typeFilter:g,statusFilter:x,registryFilter:u,enabledRegistries:j})})})]})})})]})})}function qs(){const s=ae.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(B.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(pe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(gn,{})})}),s[0]=e):e=s[0],e}export{qs as default};
@@ -0,0 +1 @@
1
+ const E={SELF:e=>`${e}_self`,REGISTRY:e=>`${e}_registry`,COMMUNITY_REGISTRY:e=>`${e}_community-registry`,DEV_ASSETS:e=>`${e}_dev-assets`,SITE_DIAGNOSTICS:e=>`site-diagnostics_${e}`,COMMERCE_DISCOVERY:e=>`${e}_commerce-discovery`},d="get_my_diagnostic",g="self";function t(e){return{is(i){return!i||!i.startsWith(e)?null:i.slice(e.length)||null},get(i){return`${e}${i}`}}}function s(e){return{id:e.id,organization_id:e.organizationId,title:e.title,description:e.description,icon:e.icon,status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:e.instructions??null,...e.ui?{ui:e.ui}:{}},pinned:!1,connections:[]}}const o=t("decopilot_"),u=o.is,c=o.get,a=t("dev_"),R=a.get,N=a.is,A="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",r="#6366f1",l=`https://api.iconify.design/lucide:file-search.svg?color=${encodeURIComponent(r)}`;function M(e){return s({id:c(e),organizationId:e,title:"Super Agent",description:"Default agent that aggregates all organization connections",icon:A,ui:{layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}})}const _=t("commerce-discovery_"),O=_.get,n={AGENT_MANAGER:t("studio-agent-manager_"),AUTOMATION_MANAGER:t("studio-automation-manager_"),CONNECTION_MANAGER:t("studio-connection-manager_"),API_KEY_MANAGER:t("studio-api-key-manager_"),STORE_MANAGER:t("studio-store-manager_"),BRAND_MANAGER:t("studio-brand-manager_"),USAGE_MANAGER:t("studio-usage-manager_")},I={AGENT_MANAGER:n.AGENT_MANAGER.get,AUTOMATION_MANAGER:n.AUTOMATION_MANAGER.get,CONNECTION_MANAGER:n.CONNECTION_MANAGER.get,API_KEY_MANAGER:n.API_KEY_MANAGER.get,STORE_MANAGER:n.STORE_MANAGER.get,BRAND_MANAGER:n.BRAND_MANAGER.get,USAGE_MANAGER:n.USAGE_MANAGER.get};function G(e){return e?Object.values(n).some(i=>i.is(e)!==null):!1}export{d as C,r as R,g as S,E as W,M as a,R as b,I as c,G as d,l as e,A as f,O as g,c as h,u as i,N as p};
@@ -1 +1 @@
1
- import"./index-oUYXP9Sz.js";import{c as A,T as C}from"./task-board-BHpLFUa-.js";import{e as O}from"./backoff-CrEUbyZT.js";const k={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},_=Object.values(k),m="notification.created",g=3e4,I=1e3;function M(o){const{buildUrl:u,eventTypes:d,name:i,crossTab:f=!1}=o,a=new Map,c=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(c&&!i)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const r of e.handlers)try{r(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function h(e){const t=new EventSource(u(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&L(e)};const r=n=>{e.channel?.postMessage({kind:"event",type:n.type,data:n.data}),l(e,n)};for(const n of d)t.addEventListener(n,r)}function L(e){if(e.refCount<=0||e.reconnectTimer)return;const t=O(g,I,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),h(e))},t)}function S(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,h(e)}function D(e){if(!c){S(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${i}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,S(e)})).catch(()=>{})}function y(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function v(e){const t=a.get(e);if(t)return t;const r={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(a.set(e,r),c){const n=new BroadcastChannel(`sse:${i}:${e}`);n.onmessage=s=>y(r,s.data),r.channel=n}return r}function N(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,a.delete(e.key)}return{subscribe(e,t,r){const n=!a.has(e),s=v(e);s.refCount++,s.handlers.add(t),r&&s.reconnectHandlers.add(r),n&&D(s);let b=!1;return()=>{b||(b=!0,s.handlers.delete(t),r&&s.reconnectHandlers.delete(r),s.refCount--,s.refCount<=0&&N(s))}}}}function E(o,u){const d=new Set(u);return{subscribe(i,f,a){const c=l=>{d.has(l.type)&&f(l)};return o.subscribe(i,c,a)}}}const w=[..._,A,C,m],H=w,P=w,T=M({name:"watch",buildUrl:o=>`/api/${encodeURIComponent(o)}/watch?types=${H.join(",")}`,eventTypes:P,crossTab:!0}),V=E(T,[..._]),U=E(T,[A,C]),Y=E(T,[m]),$=V;export{k as D,$ as d,Y as n,U as t};
1
+ import"./index-Cwc5OUhn.js";import{e as A,T as C}from"./task-board-Cc9n4YDI.js";import{e as O}from"./backoff-CrEUbyZT.js";const k={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},_=Object.values(k),m="notification.created",g=3e4,I=1e3;function M(o){const{buildUrl:u,eventTypes:d,name:i,crossTab:f=!1}=o,a=new Map,c=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(c&&!i)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const r of e.handlers)try{r(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function h(e){const t=new EventSource(u(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&L(e)};const r=n=>{e.channel?.postMessage({kind:"event",type:n.type,data:n.data}),l(e,n)};for(const n of d)t.addEventListener(n,r)}function L(e){if(e.refCount<=0||e.reconnectTimer)return;const t=O(g,I,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),h(e))},t)}function S(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,h(e)}function D(e){if(!c){S(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${i}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,S(e)})).catch(()=>{})}function y(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function v(e){const t=a.get(e);if(t)return t;const r={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(a.set(e,r),c){const n=new BroadcastChannel(`sse:${i}:${e}`);n.onmessage=s=>y(r,s.data),r.channel=n}return r}function N(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,a.delete(e.key)}return{subscribe(e,t,r){const n=!a.has(e),s=v(e);s.refCount++,s.handlers.add(t),r&&s.reconnectHandlers.add(r),n&&D(s);let b=!1;return()=>{b||(b=!0,s.handlers.delete(t),r&&s.reconnectHandlers.delete(r),s.refCount--,s.refCount<=0&&N(s))}}}}function E(o,u){const d=new Set(u);return{subscribe(i,f,a){const c=l=>{d.has(l.type)&&f(l)};return o.subscribe(i,c,a)}}}const w=[..._,A,C,m],H=w,P=w,T=M({name:"watch",buildUrl:o=>`/api/${encodeURIComponent(o)}/watch?types=${H.join(",")}`,eventTypes:P,crossTab:!0}),V=E(T,[..._]),U=E(T,[A,C]),Y=E(T,[m]),$=V;export{k as D,$ as d,Y as n,U as t};
@@ -1 +1 @@
1
- import{c as n,j as i,dF as u,n as c,J as m,dG as x,dH as j,dI as N,dJ as b,dK as D,av as h,dL as p}from"./index-oUYXP9Sz.js";function _(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(p,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(p,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let g;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(g=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=g):g=e[14],g}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{z as D,T as a,B as b,R as c,w as d,_ as e,y as f,v as g,E as h,k as i};
1
+ import{c as n,j as i,dF as u,n as c,J as m,dG as x,dH as j,dI as N,dJ as b,dK as D,av as h,dL as p}from"./index-Cwc5OUhn.js";function _(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(p,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(p,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let g;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(g=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=g):g=e[14],g}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{z as D,T as a,B as b,R as c,w as d,_ as e,y as f,v as g,E as h,k as i};
@@ -1 +1 @@
1
- import{c as oe,b as ae,H as de,p as re,ac as ce,r as me,K as ie,o as ge,e as X,q as ue,t as N,j as s,d8 as fe,B as te,d7 as xe,d6 as Se}from"./index-oUYXP9Sz.js";import{B as ne}from"./badge-DHzlDsyN.js";import{I as je}from"./input-CS1CqwLF.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-CJGWFkMz.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function ye(){const e=oe.c(101),t=ae(),{org:o}=de(),p=re(),i=ce(),[d,v]=me.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=ge(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ue("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const r=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let k;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],k=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=k}else k=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==d||e[76]!==z?(F=s.jsx(je,{value:d,onChange:J,placeholder:z,className:"max-w-xs"}),e[75]=d,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==r||e[79]!==d?(w=()=>r.mutate(d.trim()),e[78]=r,e[79]=d,e[80]=w):w=e[80];let G;e[81]!==r.isPending||e[82]!==d?(G=!d.trim()||r.isPending,e[81]=r.isPending,e[82]=d,e[83]=G):G=e[83];let H;e[84]!==r.isPending||e[85]!==t?(H=r.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=r.isPending,e[85]=t,e[86]=H):H=e[86];let Z;e[87]!==w||e[88]!==G||e[89]!==H?(Z=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:H}),e[87]=w,e[88]=G,e[89]=H,e[90]=Z):Z=e[90];let B;e[91]!==F||e[92]!==Z?(B=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,Z]}),e[91]=F,e[92]=Z,e[93]=B):B=e[93];let K;e[94]!==k||e[95]!==B?(K=s.jsxs(xe,{children:[k,B]}),e[94]=k,e[95]=B,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let d;t[0]!==i?(d=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=d):d=t[1];const v=d;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let r;return t[31]!==j||t[32]!==m?(r=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=r):r=t[33],r}export{ye as D};
1
+ import{c as oe,b as ae,H as de,p as re,ac as ce,r as me,K as ie,o as ge,e as X,q as ue,t as N,j as s,d8 as fe,B as te,d7 as xe,d6 as Se}from"./index-Cwc5OUhn.js";import{B as ne}from"./badge-B2Zf6qZN.js";import{I as je}from"./input-H1AQT31Q.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-nNkfzHSn.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function ye(){const e=oe.c(101),t=ae(),{org:o}=de(),p=re(),i=ce(),[d,v]=me.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=ge(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ue("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const r=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let k;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],k=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=k}else k=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==d||e[76]!==z?(F=s.jsx(je,{value:d,onChange:J,placeholder:z,className:"max-w-xs"}),e[75]=d,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==r||e[79]!==d?(w=()=>r.mutate(d.trim()),e[78]=r,e[79]=d,e[80]=w):w=e[80];let G;e[81]!==r.isPending||e[82]!==d?(G=!d.trim()||r.isPending,e[81]=r.isPending,e[82]=d,e[83]=G):G=e[83];let H;e[84]!==r.isPending||e[85]!==t?(H=r.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=r.isPending,e[85]=t,e[86]=H):H=e[86];let Z;e[87]!==w||e[88]!==G||e[89]!==H?(Z=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:H}),e[87]=w,e[88]=G,e[89]=H,e[90]=Z):Z=e[90];let B;e[91]!==F||e[92]!==Z?(B=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,Z]}),e[91]=F,e[92]=Z,e[93]=B):B=e[93];let K;e[94]!==k||e[95]!==B?(K=s.jsxs(xe,{children:[k,B]}),e[94]=k,e[95]=B,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let d;t[0]!==i?(d=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=d):d=t[1];const v=d;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let r;return t[31]!==j||t[32]!==m?(r=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=r):r=t[33],r}export{ye as D};
@@ -1 +1 @@
1
- import{c as d,j as s,dg as i,n as c}from"./index-oUYXP9Sz.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function g(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function b(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,b as a,D as b,h as c,v as d,g as e,j as f,N as g};
1
+ import{c as d,j as s,dg as i,n as c}from"./index-Cwc5OUhn.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function g(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function b(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,b as a,D as b,h as c,v as d,g as e,j as f,N as g};
@@ -1 +1 @@
1
- import{c,j as l,ev as f,ew as m,n as u,ex as g,ey as x,ez as v,eA as b,eB as h,eC as w,eD as j,eE as N,eF as z,eG as y,eH as _,eI as p}from"./index-oUYXP9Sz.js";import{i as D}from"./Check-7NzkCgMX.js";import{i as $}from"./ChevronRight-BYfzjVa9.js";import{a as M}from"./DotsVertical-DtVYgEvK.js";function R(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(x,{children:l.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,translate:"no",className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function G(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==o||e[9]!==i||e[10]!==r?(d=l.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...o}),e[7]=s,e[8]=o,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function L(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(D,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function O(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(y,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function A(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==o||e[9]!==n?(i=l.jsxs(_,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function B(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=l.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function F(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function H(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx($,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(d=l.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,i]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function q(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(z,{"data-slot":"dropdown-menu-sub-content",translate:"no",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,G as a,E as b,R as c,H as d,P as e,q as f,O as g,A as h,F as i,B as j,L as k};
1
+ import{c,j as l,ev as f,ew as m,n as u,ex as g,ey as x,ez as v,eA as b,eB as h,eC as w,eD as j,eE as N,eF as z,eG as y,eH as _,eI as p}from"./index-Cwc5OUhn.js";import{i as D}from"./Check-DiujM3Bc.js";import{i as $}from"./ChevronRight-zk3hjjG0.js";import{a as M}from"./DotsVertical-CuaVjEFE.js";function R(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(x,{children:l.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,translate:"no",className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function G(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==o||e[9]!==i||e[10]!==r?(d=l.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...o}),e[7]=s,e[8]=o,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function L(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(D,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function O(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(y,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function A(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==o||e[9]!==n?(i=l.jsxs(_,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function B(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=l.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function F(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function H(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx($,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(d=l.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,i]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function q(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(z,{"data-slot":"dropdown-menu-sub-content",translate:"no",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,G as a,E as b,R as c,H as d,P as e,q as f,O as g,A as h,F as i,B as j,L as k};
@@ -1 +1 @@
1
- import{c as v,n as N,j as t}from"./index-oUYXP9Sz.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,n as N,j as t}from"./index-Cwc5OUhn.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import{g as I}from"./metadata-dUsYcpuu.js";import"./index-oUYXP9Sz.js";import{c as E}from"./use-mcp-client-C6aEVcPT.js";import{W as T}from"./constants-BiE_kVyZ.js";function U(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function H(t){const e=U(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function L(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function J(t,e){return L(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function Q(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(t){return t?D[t]??t.toUpperCase():null}function X(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Z(t,e,n,a,r){const o=await E({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}let Y="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Y[n[t]&63];return e};function j(t){return`${t}_${$()}`}function V(t){return I(t._meta)?.appName||t.server?.name||null}function K(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function tt(t,e,n,a){const r=t.server,o=I(t._meta),s=new Date().toISOString(),R=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,w=r?.icons?.[0]?.src||H(r?.repository)||null,i=o?.oauth_config,A=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,C=o?.configuration_state,v=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,N=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[N];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,O=p.length>1;let d="";c&&O?d=` (${W(c)})`:l&&M&&(d=` (${K(l)})`);const x=R+d;return{id:j("conn"),title:x,description:k,icon:w,app_name:V(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:A,configuration_state:C??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{V as a,H as b,Z as c,X as d,tt as e,Q as f,j as g,J as i};
1
+ import{g as I}from"./metadata-dUsYcpuu.js";import"./index-Cwc5OUhn.js";import{c as E}from"./use-mcp-client-DDri_uok.js";import{W as T}from"./constants-dLUUoWH7.js";function U(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function H(t){const e=U(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function L(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function J(t,e){return L(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function Q(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(t){return t?D[t]??t.toUpperCase():null}function X(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Z(t,e,n,a,r){const o=await E({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}let Y="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Y[n[t]&63];return e};function j(t){return`${t}_${$()}`}function V(t){return I(t._meta)?.appName||t.server?.name||null}function K(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function tt(t,e,n,a){const r=t.server,o=I(t._meta),s=new Date().toISOString(),R=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,w=r?.icons?.[0]?.src||H(r?.repository)||null,i=o?.oauth_config,A=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,C=o?.configuration_state,v=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,N=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[N];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,O=p.length>1;let d="";c&&O?d=` (${W(c)})`:l&&M&&(d=` (${K(l)})`);const x=R+d;return{id:j("conn"),title:x,description:k,icon:w,app_name:V(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:A,configuration_state:C??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{V as a,H as b,Z as c,X as d,tt as e,Q as f,j as g,J as i};
@@ -1,2 +1,2 @@
1
- import{c as se,b as Te,r as d,j as r,k as pe,B as Re,eY as en,bi as tn,bo as ge,eZ as nn,e_ as rn,e$ as on,f0 as sn,cu as an,f1 as ln,f2 as dt,bk as cn,f3 as dn,f4 as un,f5 as fn,f6 as pn,f7 as mn,f8 as xn,f9 as hn,fa as gn,fb as bn,n as le,p as yn,t as te,ab as tt,a8 as nt,a9 as rt,K as ot}from"./index-oUYXP9Sz.js";import{W as vn,b1 as Cn,b2 as wn}from"./agent-icon-BsIxgFhP.js";import{s as Nn}from"./XClose--TM9coN5.js";import{S as jn}from"./scroll-area-BsC8fs3Z.js";import{a as En}from"./chat-context-BCk9ESt8.js";import{F as Sn}from"./monaco-editor-DbqpyEZF.js";import{u as Dn}from"./shell-layout-B5FYG03K.js";import{i as Mn,E as Rn,a as Oe,b as Tn,f as Pn,g as kn,c as Fn,t as re,d as je,e as Ie,h as Ee,j as Ke,k as $e,l as An,s as Ln,v as On,m as ze,n as Se,o as st,p as In,q as De,r as _e,w as Kn,x as $n,y as zn,z as _n,A as Gn}from"./index-EO6-2ljI.js";import{b as Bn,h as Vn,a as Un,c as Hn,d as Wn,e as qn}from"./dialog-DIhMaaGw.js";import{I as at}from"./input-CS1CqwLF.js";import{c as Qn,d as Xn,b as Yn,f as Jn,g as Zn,e as er,a as tr,A as nr}from"./alert-dialog-CQ58w2vU.js";import{t as rr}from"./ChevronDown-Cq83UavT.js";import{i as or}from"./ChevronRight-BYfzjVa9.js";import{i as sr}from"./Share07-BDaDw7G6.js";import"./AlertCircle-Dh-7gjAb.js";import"./UserSquare-CH3Ukoit.js";import"./Tool01-D4z-9IyH.js";import"./ArrowUp-OL-jZKct.js";import"./ArrowLeft-u4Z_ZEIA.js";import"./Tool02-poIXBn7K.js";import"./XCircle-CkDL-6sY.js";import"./TrendUp01-FHrvViJx.js";import"./ZapSquare-QOO_mGaz.js";import"./Users03-C3m1xGvF.js";import"./CheckCircle-Dshptf1P.js";import"./Check-7NzkCgMX.js";import"./ChevronSelectorVertical-DBGHPnq7.js";import"./ChevronUp-bumhqOl2.js";import"./DotsVertical-DtVYgEvK.js";import"./Stars02-DfUQGOxC.js";import"./Copy01-D7QEOuO-.js";import"./CreditCard01-C_k5ADvU.js";import"./Download01-D4OkE-EC.js";import"./Settings02-DUzoPIwN.js";import"./Eye-CUsQm8N_.js";import"./FilterLines-CqhY3DF8.js";import"./Globe01-hx5sMqeq.js";import"./Globe04-nj2uQFze.js";import"./SwitchHorizontal01-kEJ7zR_z.js";import"./HardDrive-CD-r2Q93.js";import"./Key01-xlS_KWo0.js";import"./LinkExternal01-vwahOhRy.js";import"./LockUnlocked01-IFXnzckZ.js";import"./LogOut01-B9lIo2F_.js";import"./Monitor01-BJ9QIRPS.js";import"./Sun-B6HQumVJ.js";import"./Palette-BnaP_29I.js";import"./Play-D0ByOD8C.js";import"./Plus-CcEdjxja.js";import"./SearchLg-D8g5Kgbo.js";import"./SearchMd-BBajIKav.js";import"./Shield01-B-BJfu7d.js";import"./Stars01-B1UsLz2z.js";import"./Trash01-Du6l42eB.js";import"./Upload01-CwF6sGbA.js";import"./User01-CZwTOyNO.js";import"./Users01-JQgg7RR7.js";import"./Zap-qaW4N8Xw.js";import"./select-CJGWFkMz.js";import"./tab-id-BuzpcvG1.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-B_kyLtT_.js";import"./use-mcp-client-C6aEVcPT.js";import"./constants-BiE_kVyZ.js";import"./auth-1gDWBUqm.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CPW9JvWP.js";import"./task-board-BHpLFUa-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-C9_zCPTA.js";import"./use-ai-providers-r2nELlbF.js";import"./use-decopilot-events-NJyKRVI4.js";import"./use-organization-settings-DmQrCvCR.js";import"./spinner-C8JJHaJh.js";import"./avatar-BX6Wn7ad.js";import"./required-auth-layout-QyxSrfmH.js";import"./use-org-sso-Bk_7LXrK.js";import"./automation-runs-BZF73Twv.js";import"./useInfiniteQuery-BuAzVT7P.js";import"./use-infinite-scroll-DhoN_tOr.js";import"./use-connection-C4rbYT9U.js";import"./table-D8xezqnz.js";import"./empty-state-CEA2FeJG.js";import"./use-members-Cs_3dQbg.js";import"./use-org-auth-client-BmwDaxX4.js";import"./use-automations-CP79GEVT.js";import"./useSuspenseInfiniteQuery-jTqM94Cv.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DDgWyrmF.js";import"./types-CHJM6oAY.js";import"./integration-icon-CZyw67Zl.js";import"./use-navigate-to-agent-CkkcsB_L.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-Bp736SCd.js";import"./index-BOXgq-jF.js";import"./form-CTyArXLS.js";import"./label-CLQvZ6qi.js";import"./file-type-icon-DUnETOmw.js";import"./drawer-BVwqIJC7.js";import"./collection-search-C1aquL6N.js";import"./tabs-MK0MXP-i.js";import"./toggle-group-B-or7VaV.js";import"./use-commerce-diagnostic-1YPXhdLe.js";import"./popover-Du70JJ8v.js";import"./self-tool-result-DUJsg9jD.js";import"./extract-connection-data-DKX2cVxu.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-CsoIynGe.js";import"./authenticate-and-persist-oauth-CQXkpjM6.js";import"./mcp-oauth-DHOYyPCC.js";import"./track-D0LLsFKs.js";import"./toolbar-D87bPhTv.js";import"./github-repo-picker-CMXxBGYJ.js";import"./use-mcp-tools-B0tnIykD.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-Clkgit0t.js";import"./use-registry-connections-Dju1XIn5.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BWuuXli5.js";import"./connection-form-helpers-jW5lefOY.js";import"./collection-tabs-CmguGFdF.js";import"./badge-DHzlDsyN.js";import"./select-model-Tfm7PXhx.js";import"./checkbox-CxWyyA9g.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-DPxlZ9hi.js";import"./dropdown-menu-BEARFG_o.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DXLkLFUb.js";import"./use-file-configs-CmZnnBdt.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BJLjZv1Y.js";import"./search-input-BBW-BSQq.js";import"./use-mcp-auth-status-AP-IvVj7.js";import"./switch-CmT7vd5I.js";import"./use-secrets-BG54EwWa.js";import"./AreaChart-BDhwnWiq.js";import"./use-task-board-items-BhAKhQpA.js";import"./config-Bh_MXGvd.js";import"./breadcrumb-NJrA-Ryq.js";import"./command-BVNULuVP.js";import"./index-CBtTXVkq.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-B44sl-p2.js";import"./task-key-n93QwSK2.js";import"./automation-list-row-7IeAec2Y.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-B6ZzK2Kw.js";const ar={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function ir(a){const e=se.c(71),{open:s,mode:i,initialName:l,parentLabel:m,isPending:y,onSubmit:u,onOpenChange:b}=a,E=l===void 0?"":l,h=y===void 0?!1:y,x=Te(),[f,O]=d.useState(E),[X,I]=d.useState(s),C=ar[i];s!==X&&(I(s),s&&O(E));let g;e[0]!==h||e[1]!==b?(g=Q=>{!Q&&!h&&b(!1)},e[0]=h,e[1]=b,e[2]=g):g=e[2];const R=g;let $;e[3]!==h||e[4]!==f||e[5]!==u?($=async Q=>{Q.preventDefault();const ne=f.trim();!ne||h||await u(ne)},e[3]=h,e[4]=f,e[5]=u,e[6]=$):$=e[6];const L=$;let T;e[7]!==C.titleKey||e[8]!==x?(T=x(C.titleKey),e[7]=C.titleKey,e[8]=x,e[9]=T):T=e[9];let P;e[10]!==T?(P=r.jsx(Bn,{children:T}),e[10]=T,e[11]=P):P=e[11];let D;e[12]!==C.descriptionKey||e[13]!==x?(D=x(C.descriptionKey),e[12]=C.descriptionKey,e[13]=x,e[14]=D):D=e[14];let S;e[15]!==D?(S=r.jsx(Vn,{children:D}),e[15]=D,e[16]=S):S=e[16];let N;e[17]!==P||e[18]!==S?(N=r.jsxs(Un,{children:[P,S]}),e[17]=P,e[18]=S,e[19]=N):N=e[19];let M;e[20]!==m||e[21]!==x?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(at,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=M):M=e[22];let j;e[23]!==x?(j=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=j):j=e[24];let F;e[25]!==j?(F=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:j}),e[25]=j,e[26]=F):F=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=Q=>O(Q.target.value),e[27]=H):H=e[27];let z;e[28]!==C.placeholderKey||e[29]!==x?(z=x(C.placeholderKey),e[28]=C.placeholderKey,e[29]=x,e[30]=z):z=e[30];let Y;e[31]!==h||e[32]!==f||e[33]!==z?(Y=r.jsx(at,{id:"file-explorer-name",value:f,onChange:H,placeholder:z,autoFocus:!0,disabled:h}),e[31]=h,e[32]=f,e[33]=z,e[34]=Y):Y=e[34];let J;e[35]!==F||e[36]!==Y?(J=r.jsxs("div",{className:"space-y-1.5",children:[F,Y]}),e[35]=F,e[36]=Y,e[37]=J):J=e[37];let ee;e[38]!==M||e[39]!==J?(ee=r.jsxs("div",{className:"space-y-4 py-4",children:[M,J]}),e[38]=M,e[39]=J,e[40]=ee):ee=e[40];let _;e[41]!==b?(_=()=>b(!1),e[41]=b,e[42]=_):_=e[42];let A;e[43]!==x?(A=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=A):A=e[44];let W;e[45]!==h||e[46]!==_||e[47]!==A?(W=r.jsx(Re,{type:"button",variant:"outline",onClick:_,disabled:h,children:A}),e[45]=h,e[46]=_,e[47]=A,e[48]=W):W=e[48];let K;e[49]!==h||e[50]!==f?(K=!f.trim()||h,e[49]=h,e[50]=f,e[51]=K):K=e[51];let q;e[52]!==C.submitKey||e[53]!==h||e[54]!==x?(q=h?r.jsxs(r.Fragment,{children:[r.jsx(pe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(C.submitKey),e[52]=C.submitKey,e[53]=h,e[54]=x,e[55]=q):q=e[55];let G;e[56]!==K||e[57]!==q?(G=r.jsx(Re,{type:"submit",disabled:K,children:q}),e[56]=K,e[57]=q,e[58]=G):G=e[58];let k;e[59]!==W||e[60]!==G?(k=r.jsxs(Hn,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=k):k=e[61];let B;e[62]!==L||e[63]!==ee||e[64]!==k||e[65]!==N?(B=r.jsx(Wn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:L,children:[N,ee,k]})}),e[62]=L,e[63]=ee,e[64]=k,e[65]=N,e[66]=B):B=e[66];let V;return e[67]!==R||e[68]!==s||e[69]!==B?(V=r.jsx(qn,{open:s,onOpenChange:R,children:B}),e[67]=R,e[68]=s,e[69]=B,e[70]=V):V=e[70],V}function lr(a){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:i,fsActionPending:l,onOpenChange:m,onConfirm:y}=a,u=Te(),b=s?.kind==="directory",E=s!==null,h=b?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==u||e[1]!==h?(x=u(h),e[0]=u,e[1]=h,e[2]=x):x=e[2];let f;e[3]!==x?(f=r.jsx(Qn,{children:x}),e[3]=x,e[4]=f):f=e[4];let O;e[5]!==u?(O=u("sandbox.fileExplorerDeleteDialog.description"),e[5]=u,e[6]=O):O=e[6];const X=s?.name;let I;e[7]!==X?(I=r.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=I):I=e[8];let C;e[9]!==b||e[10]!==u?(C=b?u("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=b,e[10]=u,e[11]=C):C=e[11];let g;e[12]!==i.length||e[13]!==u?(g=i.length>0&&r.jsxs(r.Fragment,{children:[" ",i.length===1?u("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):u("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:i.length})]}),e[12]=i.length,e[13]=u,e[14]=g):g=e[14];let R;e[15]!==O||e[16]!==I||e[17]!==C||e[18]!==g?(R=r.jsxs(Xn,{children:[O," ",I,C,g]}),e[15]=O,e[16]=I,e[17]=C,e[18]=g,e[19]=R):R=e[19];let $;e[20]!==R||e[21]!==f?($=r.jsxs(Yn,{children:[f,R]}),e[20]=R,e[21]=f,e[22]=$):$=e[22];let L;e[23]!==u?(L=u("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=u,e[24]=L):L=e[24];let T;e[25]!==l||e[26]!==L?(T=r.jsx(Jn,{disabled:l,children:L}),e[25]=l,e[26]=L,e[27]=T):T=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==y?(D=H=>{H.preventDefault(),s&&y(s)},e[28]=s,e[29]=y,e[30]=D):D=e[30];let S;e[31]!==u?(S=u("sandbox.fileExplorerDeleteDialog.delete"),e[31]=u,e[32]=S):S=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==S?(N=r.jsx(Zn,{disabled:P,onClick:D,children:S}),e[33]=P,e[34]=D,e[35]=S,e[36]=N):N=e[36];let M;e[37]!==T||e[38]!==N?(M=r.jsxs(er,{children:[T,N]}),e[37]=T,e[38]=N,e[39]=M):M=e[39];let j;e[40]!==$||e[41]!==M?(j=r.jsxs(tr,{children:[$,M]}),e[40]=$,e[41]=M,e[42]=j):j=e[42];let F;return e[43]!==m||e[44]!==E||e[45]!==j?(F=r.jsx(nr,{open:E,onOpenChange:m,children:j}),e[43]=m,e[44]=E,e[45]=j,e[46]=F):F=e[46],F}var Ge="ContextMenu",[cr]=cn(Ge,[dt]),Z=dt(),[dr,ut]=cr(Ge),ft=a=>{const{__scopeContextMenu:e,children:s,onOpenChange:i,dir:l,modal:m=!0}=a,[y,u]=d.useState(!1),b=Z(e),E=an(i),h=d.useCallback(x=>{u(x),E(x)},[E]);return r.jsx(dr,{scope:e,open:y,onOpenChange:h,modal:m,children:r.jsx(ln,{...b,dir:l,open:y,onOpenChange:h,modal:m,children:s})})};ft.displayName=Ge;var pt="ContextMenuTrigger",mt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,disabled:i=!1,...l}=a,m=ut(pt,s),y=Z(s),u=d.useRef({x:0,y:0}),b=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),E=d.useRef(0),h=d.useCallback(()=>window.clearTimeout(E.current),[]),x=f=>{u.current={x:f.clientX,y:f.clientY},m.onOpenChange(!0)};return d.useEffect(()=>h,[h]),d.useEffect(()=>{i&&h()},[i,h]),r.jsxs(r.Fragment,{children:[r.jsx(en,{...y,virtualRef:b}),r.jsx(tn.span,{"data-state":m.open?"open":"closed","data-disabled":i?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...a.style},onContextMenu:i?a.onContextMenu:ge(a.onContextMenu,f=>{h(),x(f),f.preventDefault()}),onPointerDown:i?a.onPointerDown:ge(a.onPointerDown,Me(f=>{h(),E.current=window.setTimeout(()=>x(f),700)})),onPointerMove:i?a.onPointerMove:ge(a.onPointerMove,Me(h)),onPointerCancel:i?a.onPointerCancel:ge(a.onPointerCancel,Me(h)),onPointerUp:i?a.onPointerUp:ge(a.onPointerUp,Me(h))})]})});mt.displayName=pt;var ur="ContextMenuPortal",xt=a=>{const{__scopeContextMenu:e,...s}=a,i=Z(e);return r.jsx(on,{...i,...s})};xt.displayName=ur;var ht="ContextMenuContent",gt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=ut(ht,s),m=Z(s),y=d.useRef(!1);return r.jsx(sn,{...m,...i,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{a.onCloseAutoFocus?.(u),!u.defaultPrevented&&y.current&&u.preventDefault(),y.current=!1},onInteractOutside:u=>{a.onInteractOutside?.(u),!u.defaultPrevented&&!l.modal&&(y.current=!0)},style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gt.displayName=ht;var fr="ContextMenuGroup",pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(dn,{...l,...i,ref:e})});pr.displayName=fr;var mr="ContextMenuLabel",xr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(un,{...l,...i,ref:e})});xr.displayName=mr;var hr="ContextMenuItem",bt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(nn,{...l,...i,ref:e})});bt.displayName=hr;var gr="ContextMenuCheckboxItem",br=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(fn,{...l,...i,ref:e})});br.displayName=gr;var yr="ContextMenuRadioGroup",vr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(pn,{...l,...i,ref:e})});vr.displayName=yr;var Cr="ContextMenuRadioItem",wr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(mn,{...l,...i,ref:e})});wr.displayName=Cr;var Nr="ContextMenuItemIndicator",jr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(xn,{...l,...i,ref:e})});jr.displayName=Nr;var Er="ContextMenuSeparator",yt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(rn,{...l,...i,ref:e})});yt.displayName=Er;var Sr="ContextMenuArrow",Dr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(hn,{...l,...i,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubTrigger",Rr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(gn,{...l,...i,ref:e})});Rr.displayName=Mr;var Tr="ContextMenuSubContent",Pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(bn,{...l,...i,ref:e,style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pr.displayName=Tr;function Me(a){return e=>e.pointerType!=="mouse"?a(e):void 0}var kr=ft,Fr=mt,Ar=xt,Lr=gt,Or=bt,Ir=yt;function Kr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(kr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=i):i=e[3],i}function $r(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Fr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=i):i=e[3],i}function zr(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Ar,{children:r.jsx(Lr,{"data-slot":"context-menu-content",translate:"no",className:l,...i})}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}function fe(a){const e=se.c(12);let s,i,l,m;e[0]!==a?({className:s,inset:i,variant:m,...l}=a,e[0]=a,e[1]=s,e[2]=i,e[3]=l,e[4]=m):(s=e[1],i=e[2],l=e[3],m=e[4]);const y=m===void 0?"default":m;let u;e[5]!==s?(u=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=u):u=e[6];let b;return e[7]!==i||e[8]!==l||e[9]!==u||e[10]!==y?(b=r.jsx(Or,{"data-slot":"context-menu-item","data-inset":i,"data-variant":y,className:u,...l}),e[7]=i,e[8]=l,e[9]=u,e[10]=y,e[11]=b):b=e[11],b}function it(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Ir,{"data-slot":"context-menu-separator",className:l,...i}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}const _r="#d9a441";function Gr(a){const e=se.c(63),{node:s,depth:i,isExpanded:l,isSelected:m,isLoading:y,fileVisual:u,onOpen:b,onSelect:E,onNewFile:h,onNewFolder:x,onCopyPath:f,onCopyRelativePath:O,onRename:X,onDelete:I}=a,C=y===void 0?!1:y,g=Te(),R=s.kind==="directory",{Icon:$,color:L}=u,T=m&&"bg-accent";let P;e[0]!==T?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",T),e[0]=T,e[1]=P):P=e[1];const D=`${i*14+8}px`;let S;e[2]!==D?(S={paddingLeft:D},e[2]=D,e[3]=S):S=e[3];let N;e[4]!==b||e[5]!==E?(N=()=>{E(),b()},e[4]=b,e[5]=E,e[6]=N):N=e[6];let M;e[7]!==$||e[8]!==L||e[9]!==R||e[10]!==l||e[11]!==C?(M=R?r.jsxs(r.Fragment,{children:[C?r.jsx(pe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(rr,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(or,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(sr,{size:16,className:"shrink-0",style:{color:_r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx($,{size:16,className:"shrink-0",style:{color:L}})]}),e[7]=$,e[8]=L,e[9]=R,e[10]=l,e[11]=C,e[12]=M):M=e[12];let j;e[13]!==s.name?(j=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=j):j=e[14];let F;e[15]!==P||e[16]!==S||e[17]!==N||e[18]!==M||e[19]!==j?(F=r.jsx($r,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:S,onClick:N,children:[M,j]})}),e[15]=P,e[16]=S,e[17]=N,e[18]=M,e[19]=j,e[20]=F):F=e[20];let H;e[21]!==g?(H=g("sandbox.fileTreeRow.newFile"),e[21]=g,e[22]=H):H=e[22];let z;e[23]!==h||e[24]!==H?(z=r.jsx(fe,{onSelect:h,children:H}),e[23]=h,e[24]=H,e[25]=z):z=e[25];let Y;e[26]!==g?(Y=g("sandbox.fileTreeRow.newFolder"),e[26]=g,e[27]=Y):Y=e[27];let J;e[28]!==x||e[29]!==Y?(J=r.jsx(fe,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=J):J=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(it,{}),e[31]=ee):ee=e[31];let _;e[32]!==g?(_=g("sandbox.fileTreeRow.copyPath"),e[32]=g,e[33]=_):_=e[33];let A;e[34]!==f||e[35]!==_?(A=r.jsx(fe,{onSelect:f,children:_}),e[34]=f,e[35]=_,e[36]=A):A=e[36];let W;e[37]!==g?(W=g("sandbox.fileTreeRow.copyRelativePath"),e[37]=g,e[38]=W):W=e[38];let K;e[39]!==O||e[40]!==W?(K=r.jsx(fe,{onSelect:O,children:W}),e[39]=O,e[40]=W,e[41]=K):K=e[41];let q;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=r.jsx(it,{}),e[42]=q):q=e[42];let G;e[43]!==g?(G=g("sandbox.fileTreeRow.rename"),e[43]=g,e[44]=G):G=e[44];let k;e[45]!==X||e[46]!==G?(k=r.jsx(fe,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=k):k=e[47];let B;e[48]!==g?(B=g("sandbox.fileTreeRow.delete"),e[48]=g,e[49]=B):B=e[49];let V;e[50]!==I||e[51]!==B?(V=r.jsx(fe,{variant:"destructive",onSelect:I,children:B}),e[50]=I,e[51]=B,e[52]=V):V=e[52];let Q;e[53]!==z||e[54]!==J||e[55]!==A||e[56]!==K||e[57]!==k||e[58]!==V?(Q=r.jsxs(zr,{className:"w-52",children:[z,J,ee,A,K,q,k,V]}),e[53]=z,e[54]=J,e[55]=A,e[56]=K,e[57]=k,e[58]=V,e[59]=Q):Q=e[59];let ne;return e[60]!==Q||e[61]!==F?(ne=r.jsxs(Kr,{children:[F,Q]}),e[60]=Q,e[61]=F,e[62]=ne):ne=e[62],ne}const lt=200,Br=2,Vr=250,ct=200;function Ur(a,e){return Kn(a,e)}function Hr(a){const e=se.c(9),{text:s,query:i}=a;let l,m,y;if(e[0]!==i||e[1]!==s){const{leadingEllipsis:b,segments:E}=An(s,i);l="truncate font-mono text-muted-foreground",m=b&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),y=E.map(Wr),e[0]=i,e[1]=s,e[2]=l,e[3]=m,e[4]=y}else l=e[2],m=e[3],y=e[4];let u;return e[5]!==l||e[6]!==m||e[7]!==y?(u=r.jsxs("span",{className:l,children:[m,y]}),e[5]=l,e[6]=m,e[7]=y,e[8]=u):u=e[8],u}function Wr(a,e){return a.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:a.text},e):r.jsx("span",{children:a.text},e)}function $a({orgSlug:a,virtualMcpId:e,branch:s,threadId:i,openPath:l}){const m={orgSlug:a,virtualMcpId:e,branch:s,threadId:i},[y,u]=d.useState({files:[],directories:[],truncated:!1}),{files:b,directories:E}=y,[h,x]=d.useState(new Set),[f,O]=d.useState(null),[X,I]=d.useState(null),[C,g]=d.useState([]),[R,$]=d.useState(""),[L,T]=d.useState(null),[P,D]=d.useState(null),[S,N]=d.useState(!1),[M,j]=d.useState(!1),[F,H]=d.useState(!1),[z,Y]=d.useState(!1),[,J]=d.useState(new Set),[ee,_]=d.useState(new Set),A=d.useRef(0),W=d.useRef(null),K=d.useRef(new Set),q=d.useRef(new Map),G=d.useRef(null),k=d.useRef(0),B=d.useRef(null),V=d.useRef(null),Q=d.useRef(null);function ne(t){J(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[me,de]=d.useState(new Map),Pe=d.useRef(null),[ae,be]=d.useState(null),{sendMessage:vt}=En(),{openSidePanel:Ct}=Dn(),ye=yn(),[U,oe]=d.useState(null),[ke,Fe]=d.useState(null),[ve,Ce]=d.useState(!1);async function ie(t,n){const o=await fetch(Ur(m,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function we(){ye.invalidateQueries({queryKey:st(m)})}function Be(t,n,o){navigator.clipboard.writeText(o).then(()=>te.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>te.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function wt(t){const n=_n(t);if(!n)return;const o=`${a}/${e}/${s}`;ye.setQueryData(ot.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ye.invalidateQueries({queryKey:ot.liveMeta(a,e,s)})}function Nt(t){const n=t.kind==="file"?[t.path]:b.filter(o=>o.startsWith(".deco/blocks/")).map(o=>je(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)wt(o)}function jt(t){const n=je(t);return C.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=me.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ve(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),O(n=>n&&t(n)),de(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),I(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Et(t){const n=je(t);I(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ve(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function St(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await xe(),await we(),oe(null),he(o)}async function Dt(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),u(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await xe(),await we(),oe(null),x(p=>{const v=new Set(p);for(const ce of $e(o))v.add(ce);return v.add(o),v}),I({name:n,path:o,kind:"directory",children:[]})}async function Mt(t,n){if(!U)return;const o=U.node.path,c=Ee(o),p=De(c,n);if(p===o){oe(null);return}if(_e(p,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ve(v=>v===o?p:v.startsWith(`${o}/`)?De(p,v.slice(o.length+1)):v),await xe(),await we(),oe(null)}async function Rt(t,n){Ce(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Nt(n),Et(n.path),await xe(),await we(),Fe(null),te.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){te.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{Ce(!1)}}async function Tt(t,n){const o=On(n);if(o){te.error(o);return}Ce(!0);try{U?.mode==="new-file"?(await St(t,n),te.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):U?.mode==="new-folder"?(await Dt(t,n),te.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):U?.mode==="rename"&&(await Mt(t,n),te.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){te.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{Ce(!1)}}const Ue=d.useRef(!1);Ue.current||(Ue.current=!0,W.current=xe());const[Pt,kt]=d.useState(null),w=Te();if(l&&l!==Pt){kt(l);const t=l;queueMicrotask(()=>{Mn(t)&&he(t)})}async function Ae(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function He(t,n,o){if(o!==A.current)return!1;let c=!1;return u(p=>{const v=n?Gn(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&te.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Ft(t){const n=q.current.get(t);if(n)return n;const o=A.current,c=(async()=>{const p=await Ae({pattern:"**/*",path:re(t),limit:Oe}),v=He(p,!0,o);return!v&&o===A.current&&ne(ce=>{const Ne=new Set(ce);return Ne.add(t),Ne}),v})();q.current.set(t,c);try{return await c}finally{q.current.delete(t)}}async function We(t){if(!ze(t,K.current))return!1;_(n=>new Set(n).add(t));try{return await Ft(t)}finally{_(n=>{const o=new Set(n);return o.delete(t),o})}}async function At(t,n){const o=new Set(K.current);for(const c of $e(n)){if(!ze(c,o))continue;if(await We(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function xe(){const t=++A.current;B.current=null,V.current=null,q.current.clear(),H(!0),ne(new Set),x(new Set),_(new Set);try{const n=await Ae({pattern:"**/*",limit:Oe,maxDepth:Rn});He(n,!1,t),Y(!0)}catch{z&&te.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!me.get(t)?.loaded){de(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Ln(o.content??"");de(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Lt(){k.current++,T(null),D(null),N(!1),j(!1)}async function Ot(){const t=A.current,n=B.current;if(n&&n.generation===t)return n.files;const o=V.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Ae({pattern:"**/*",limit:Oe});return A.current===t&&(B.current={generation:t,files:p.files}),p.files})();V.current={generation:t,promise:c};try{return await c}finally{V.current?.generation===t&&(V.current=null)}}async function It(t,n){try{const o=await Ot();if(n!==k.current)return;T($n(o,t,ct))}catch{if(n!==k.current)return;T([])}}async function Kt(t,n){N(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:lt});if(n!==k.current)return;D(zn(o.results??"")),j((o.matchCount??0)>=lt)}catch{if(n!==k.current)return;D([]),j(!1)}finally{n===k.current&&N(!1)}}function $t(t){const n=t.trim(),o=++k.current;It(n,o),n.length<Br?(D(null),N(!1),j(!1)):Kt(n,o)}function zt(t){if($(t),G.current&&clearTimeout(G.current),!t.trim()){Lt();return}G.current=setTimeout(()=>{$t(t)},Vr)}function Qe(t){const n=Q.current;if(!n||n.path!==f)return;Q.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function _t(t){Q.current={path:t.path,line:t.line};const n=f===t.path&&me.get(t.path)?.loaded;he(t.path),n&&Pe.current&&Qe(Pe.current)}async function Gt(t,n){try{await ie("write",{path:re(t),content:n}),Se("file saved via sandbox /write",{path:t}),ye.invalidateQueries({queryKey:st(m)});try{const o=await In(m);Se("git status after save",o)}catch(o){Se("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}de(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){Se("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function Bt(t){O(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),be(null),C.includes(t)||g(n=>[...n,t]),qe(t)}function Vt(t){g(n=>{const o=n.filter(c=>c!==t);return f===t&&O(o[o.length-1]??null),o}),de(n=>{const o=new Map(n);return o.delete(t),o})}function Xe(t){x(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Ut(t){if(ze(t,K.current))try{if(await We(t))return}catch(n){te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}Xe(t)}async function Ht(t,n){if(n){Xe(t);return}await Ut(t)}async function Wt(t){await W.current,await At(w,t);const n=$e(t);x(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),Bt(t)}function he(t){Wt(t).catch(n=>{te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function qt(){return X?.kind==="directory"?X.path:X?.kind==="file"?Ee(X.path):f?Ee(f):"/"}function Ye(t){const n=qt();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Qt=Tn(b,E),Je=Pn(Qt,h),Le=L?.length??0,Ze=kn(P??[]),et=P?.length??0,ue=f?me.get(f):null,Xt=ue?.loaded&&ue.editorValue!==ue.savedContent,Yt=ke?jt(ke.path):[],Jt=(t,n)=>{Pe.current=t,Qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!f)return;const o=t.getValue();await Gt(f,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!f)return;const p=c.getValueInRange(o);be({filePath:f,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Zt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Ke(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),Ct("chat"),vt({parts:[{type:"text",text:n.join(`
1
+ import{c as se,b as Te,r as d,j as r,k as pe,B as Re,eY as en,bi as tn,bo as ge,eZ as nn,e_ as rn,e$ as on,f0 as sn,cu as an,f1 as ln,f2 as dt,bk as cn,f3 as dn,f4 as un,f5 as fn,f6 as pn,f7 as mn,f8 as xn,f9 as hn,fa as gn,fb as bn,n as le,p as yn,t as te,ab as tt,a8 as nt,a9 as rt,K as ot}from"./index-Cwc5OUhn.js";import{W as vn,b1 as Cn,b2 as wn}from"./agent-icon-D6UFUEyp.js";import{s as Nn}from"./XClose-DN7n2l1K.js";import{S as jn}from"./scroll-area-B4y7Uc4_.js";import{a as En}from"./chat-context-CTjB2DFv.js";import{F as Sn}from"./monaco-editor-BBhZuVQY.js";import{u as Dn}from"./shell-layout-y0pc6Ps_.js";import{i as Mn,E as Rn,a as Oe,b as Tn,f as Pn,g as kn,c as Fn,t as re,d as je,e as Ie,h as Ee,j as Ke,k as $e,l as An,s as Ln,v as On,m as ze,n as Se,o as st,p as In,q as De,r as _e,w as Kn,x as $n,y as zn,z as _n,A as Gn}from"./index-LPzaT2sc.js";import{b as Bn,h as Vn,a as Un,c as Hn,d as Wn,e as qn}from"./dialog-DveHs0kp.js";import{I as at}from"./input-H1AQT31Q.js";import{c as Qn,d as Xn,b as Yn,f as Jn,g as Zn,e as er,a as tr,A as nr}from"./alert-dialog-CJ6HPz9N.js";import{t as rr}from"./ChevronDown-B9H-gqPt.js";import{i as or}from"./ChevronRight-zk3hjjG0.js";import{i as sr}from"./Share07-CgIIbXvb.js";import"./AlertCircle-BGw3XlXk.js";import"./UserSquare-BnCNQ7NG.js";import"./Tool01-BOA3Hhno.js";import"./ArrowUp-Be3wdSNr.js";import"./ArrowLeft-C_gfx94q.js";import"./Tool02-qepgblpf.js";import"./XCircle-DHXzS_UE.js";import"./TrendUp01-BG3C69eq.js";import"./ZapSquare-zh5y12_O.js";import"./Users03-GR2oALJt.js";import"./CheckCircle-DcWCuiei.js";import"./Check-DiujM3Bc.js";import"./ChevronSelectorVertical-CiZklIQA.js";import"./ChevronUp-BzNZuBSL.js";import"./DotsVertical-CuaVjEFE.js";import"./Stars02-D3wWSFvd.js";import"./Copy01-Ce6E_Ifo.js";import"./CreditCard01-BNnQurqN.js";import"./Download01-CLn3maXy.js";import"./Settings02-xVDbAjw7.js";import"./Eye-DlNcBFBo.js";import"./FilterLines-DEGFannV.js";import"./Globe01-B23V2Joo.js";import"./Globe04-Bo3nBCKm.js";import"./SwitchHorizontal01-LE5pNn35.js";import"./HardDrive-CS0V7I_b.js";import"./Key01-Cl-G8wdQ.js";import"./LinkExternal01-6Eva3_re.js";import"./LockUnlocked01-CN11iIqE.js";import"./LogOut01-JOlIpVYg.js";import"./Monitor01-1s1dhhgC.js";import"./Sun-1LLuEmlt.js";import"./Palette-Cutx8lDK.js";import"./Play-D2y6v2GO.js";import"./Plus-C6RnBW-5.js";import"./SearchLg-vQ4mWmFa.js";import"./SearchMd-Cme8xHxY.js";import"./Shield01-DWzLUFLj.js";import"./Stars01-C0ceIy5a.js";import"./Trash01-DbU5lEn8.js";import"./Upload01-CZRgQZHh.js";import"./User01-gcsNuBlu.js";import"./Users01-1L3hBTBq.js";import"./Zap-BzSAmKbo.js";import"./select-nNkfzHSn.js";import"./tab-id-B-MuWZyB.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-BBTWuwj0.js";import"./use-mcp-client-DDri_uok.js";import"./constants-dLUUoWH7.js";import"./auth-LNmB6-r8.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-A07DOCGf.js";import"./task-board-Cc9n4YDI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-CQghEz4m.js";import"./use-ai-providers-C5pRAYMe.js";import"./use-decopilot-events-KsVmeo4N.js";import"./use-organization-settings-CU8oKGH8.js";import"./spinner-BxT2-RQL.js";import"./avatar-Bk95B5w8.js";import"./required-auth-layout-TicOmrWu.js";import"./use-org-sso-CrDXOfve.js";import"./automation-runs-DvmtKa8G.js";import"./useInfiniteQuery-zd1aocsL.js";import"./use-infinite-scroll-CXfjhv8u.js";import"./use-connection-09ezQVmp.js";import"./table-DPeHBel0.js";import"./empty-state-CSneS9BU.js";import"./use-members-CBxZJhy7.js";import"./use-org-auth-client-CNZVyny3.js";import"./use-automations-DgdPB5W5.js";import"./useSuspenseInfiniteQuery-yqcuCGQU.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-3AwQB8Iu.js";import"./types-D-eDMOji.js";import"./integration-icon-DnxesxSu.js";import"./use-navigate-to-agent-Bf4VINKK.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-CzT1O9dt.js";import"./index-IhD4MlVw.js";import"./form-DPY4ZjEn.js";import"./label-CH7Mz6MF.js";import"./file-type-icon-CTS2wX2I.js";import"./drawer-CRhVZ0X7.js";import"./collection-search-BZ-Q3I-u.js";import"./tabs-ClBY3Swc.js";import"./toggle-group-BRrB6fNL.js";import"./use-commerce-diagnostic-C-6WH25O.js";import"./popover-Kt90GgHN.js";import"./self-tool-result-BCjIfrHl.js";import"./extract-connection-data-Dai3fHMk.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DRya_SIM.js";import"./authenticate-and-persist-oauth-abE4nlr8.js";import"./mcp-oauth-C4AEx9Qj.js";import"./track-Baz2c1uX.js";import"./toolbar-CtyPj6Jz.js";import"./github-repo-picker-DzT6Zs-M.js";import"./use-mcp-tools-D39UBufk.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-C7MobTIK.js";import"./use-registry-connections-DXDW9BVj.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-5UXjbrfA.js";import"./connection-form-helpers-DC83nWwS.js";import"./collection-tabs-DPjZex-Z.js";import"./badge-B2Zf6qZN.js";import"./select-model-BjrzakQK.js";import"./checkbox-CwLuHRXz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-Dzy79ZMy.js";import"./dropdown-menu-BR_cSQLm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BSLKT5kS.js";import"./use-file-configs-B34ZlHyv.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-W2VmKoU8.js";import"./search-input-ByGGbbuH.js";import"./use-mcp-auth-status-BbOwCYFJ.js";import"./switch-FVvEKs7w.js";import"./use-secrets-DfX3lo5B.js";import"./AreaChart-BmadQ3iU.js";import"./use-task-board-items-DMavIjbd.js";import"./config-C053AB8T.js";import"./breadcrumb-D-a6INvq.js";import"./command-DfkgcKu8.js";import"./index-CwhEUWmk.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-zhNtgkm6.js";import"./task-key-n93QwSK2.js";import"./automation-list-row-DEBz1PZ5.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-BsKGoRHN.js";const ar={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function ir(a){const e=se.c(71),{open:s,mode:i,initialName:l,parentLabel:m,isPending:y,onSubmit:u,onOpenChange:b}=a,E=l===void 0?"":l,h=y===void 0?!1:y,x=Te(),[f,O]=d.useState(E),[X,I]=d.useState(s),C=ar[i];s!==X&&(I(s),s&&O(E));let g;e[0]!==h||e[1]!==b?(g=Q=>{!Q&&!h&&b(!1)},e[0]=h,e[1]=b,e[2]=g):g=e[2];const R=g;let $;e[3]!==h||e[4]!==f||e[5]!==u?($=async Q=>{Q.preventDefault();const ne=f.trim();!ne||h||await u(ne)},e[3]=h,e[4]=f,e[5]=u,e[6]=$):$=e[6];const L=$;let T;e[7]!==C.titleKey||e[8]!==x?(T=x(C.titleKey),e[7]=C.titleKey,e[8]=x,e[9]=T):T=e[9];let P;e[10]!==T?(P=r.jsx(Bn,{children:T}),e[10]=T,e[11]=P):P=e[11];let D;e[12]!==C.descriptionKey||e[13]!==x?(D=x(C.descriptionKey),e[12]=C.descriptionKey,e[13]=x,e[14]=D):D=e[14];let S;e[15]!==D?(S=r.jsx(Vn,{children:D}),e[15]=D,e[16]=S):S=e[16];let N;e[17]!==P||e[18]!==S?(N=r.jsxs(Un,{children:[P,S]}),e[17]=P,e[18]=S,e[19]=N):N=e[19];let M;e[20]!==m||e[21]!==x?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(at,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=M):M=e[22];let j;e[23]!==x?(j=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=j):j=e[24];let F;e[25]!==j?(F=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:j}),e[25]=j,e[26]=F):F=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=Q=>O(Q.target.value),e[27]=H):H=e[27];let z;e[28]!==C.placeholderKey||e[29]!==x?(z=x(C.placeholderKey),e[28]=C.placeholderKey,e[29]=x,e[30]=z):z=e[30];let Y;e[31]!==h||e[32]!==f||e[33]!==z?(Y=r.jsx(at,{id:"file-explorer-name",value:f,onChange:H,placeholder:z,autoFocus:!0,disabled:h}),e[31]=h,e[32]=f,e[33]=z,e[34]=Y):Y=e[34];let J;e[35]!==F||e[36]!==Y?(J=r.jsxs("div",{className:"space-y-1.5",children:[F,Y]}),e[35]=F,e[36]=Y,e[37]=J):J=e[37];let ee;e[38]!==M||e[39]!==J?(ee=r.jsxs("div",{className:"space-y-4 py-4",children:[M,J]}),e[38]=M,e[39]=J,e[40]=ee):ee=e[40];let _;e[41]!==b?(_=()=>b(!1),e[41]=b,e[42]=_):_=e[42];let A;e[43]!==x?(A=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=A):A=e[44];let W;e[45]!==h||e[46]!==_||e[47]!==A?(W=r.jsx(Re,{type:"button",variant:"outline",onClick:_,disabled:h,children:A}),e[45]=h,e[46]=_,e[47]=A,e[48]=W):W=e[48];let K;e[49]!==h||e[50]!==f?(K=!f.trim()||h,e[49]=h,e[50]=f,e[51]=K):K=e[51];let q;e[52]!==C.submitKey||e[53]!==h||e[54]!==x?(q=h?r.jsxs(r.Fragment,{children:[r.jsx(pe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(C.submitKey),e[52]=C.submitKey,e[53]=h,e[54]=x,e[55]=q):q=e[55];let G;e[56]!==K||e[57]!==q?(G=r.jsx(Re,{type:"submit",disabled:K,children:q}),e[56]=K,e[57]=q,e[58]=G):G=e[58];let k;e[59]!==W||e[60]!==G?(k=r.jsxs(Hn,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=k):k=e[61];let B;e[62]!==L||e[63]!==ee||e[64]!==k||e[65]!==N?(B=r.jsx(Wn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:L,children:[N,ee,k]})}),e[62]=L,e[63]=ee,e[64]=k,e[65]=N,e[66]=B):B=e[66];let V;return e[67]!==R||e[68]!==s||e[69]!==B?(V=r.jsx(qn,{open:s,onOpenChange:R,children:B}),e[67]=R,e[68]=s,e[69]=B,e[70]=V):V=e[70],V}function lr(a){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:i,fsActionPending:l,onOpenChange:m,onConfirm:y}=a,u=Te(),b=s?.kind==="directory",E=s!==null,h=b?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==u||e[1]!==h?(x=u(h),e[0]=u,e[1]=h,e[2]=x):x=e[2];let f;e[3]!==x?(f=r.jsx(Qn,{children:x}),e[3]=x,e[4]=f):f=e[4];let O;e[5]!==u?(O=u("sandbox.fileExplorerDeleteDialog.description"),e[5]=u,e[6]=O):O=e[6];const X=s?.name;let I;e[7]!==X?(I=r.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=I):I=e[8];let C;e[9]!==b||e[10]!==u?(C=b?u("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=b,e[10]=u,e[11]=C):C=e[11];let g;e[12]!==i.length||e[13]!==u?(g=i.length>0&&r.jsxs(r.Fragment,{children:[" ",i.length===1?u("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):u("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:i.length})]}),e[12]=i.length,e[13]=u,e[14]=g):g=e[14];let R;e[15]!==O||e[16]!==I||e[17]!==C||e[18]!==g?(R=r.jsxs(Xn,{children:[O," ",I,C,g]}),e[15]=O,e[16]=I,e[17]=C,e[18]=g,e[19]=R):R=e[19];let $;e[20]!==R||e[21]!==f?($=r.jsxs(Yn,{children:[f,R]}),e[20]=R,e[21]=f,e[22]=$):$=e[22];let L;e[23]!==u?(L=u("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=u,e[24]=L):L=e[24];let T;e[25]!==l||e[26]!==L?(T=r.jsx(Jn,{disabled:l,children:L}),e[25]=l,e[26]=L,e[27]=T):T=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==y?(D=H=>{H.preventDefault(),s&&y(s)},e[28]=s,e[29]=y,e[30]=D):D=e[30];let S;e[31]!==u?(S=u("sandbox.fileExplorerDeleteDialog.delete"),e[31]=u,e[32]=S):S=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==S?(N=r.jsx(Zn,{disabled:P,onClick:D,children:S}),e[33]=P,e[34]=D,e[35]=S,e[36]=N):N=e[36];let M;e[37]!==T||e[38]!==N?(M=r.jsxs(er,{children:[T,N]}),e[37]=T,e[38]=N,e[39]=M):M=e[39];let j;e[40]!==$||e[41]!==M?(j=r.jsxs(tr,{children:[$,M]}),e[40]=$,e[41]=M,e[42]=j):j=e[42];let F;return e[43]!==m||e[44]!==E||e[45]!==j?(F=r.jsx(nr,{open:E,onOpenChange:m,children:j}),e[43]=m,e[44]=E,e[45]=j,e[46]=F):F=e[46],F}var Ge="ContextMenu",[cr]=cn(Ge,[dt]),Z=dt(),[dr,ut]=cr(Ge),ft=a=>{const{__scopeContextMenu:e,children:s,onOpenChange:i,dir:l,modal:m=!0}=a,[y,u]=d.useState(!1),b=Z(e),E=an(i),h=d.useCallback(x=>{u(x),E(x)},[E]);return r.jsx(dr,{scope:e,open:y,onOpenChange:h,modal:m,children:r.jsx(ln,{...b,dir:l,open:y,onOpenChange:h,modal:m,children:s})})};ft.displayName=Ge;var pt="ContextMenuTrigger",mt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,disabled:i=!1,...l}=a,m=ut(pt,s),y=Z(s),u=d.useRef({x:0,y:0}),b=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),E=d.useRef(0),h=d.useCallback(()=>window.clearTimeout(E.current),[]),x=f=>{u.current={x:f.clientX,y:f.clientY},m.onOpenChange(!0)};return d.useEffect(()=>h,[h]),d.useEffect(()=>{i&&h()},[i,h]),r.jsxs(r.Fragment,{children:[r.jsx(en,{...y,virtualRef:b}),r.jsx(tn.span,{"data-state":m.open?"open":"closed","data-disabled":i?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...a.style},onContextMenu:i?a.onContextMenu:ge(a.onContextMenu,f=>{h(),x(f),f.preventDefault()}),onPointerDown:i?a.onPointerDown:ge(a.onPointerDown,Me(f=>{h(),E.current=window.setTimeout(()=>x(f),700)})),onPointerMove:i?a.onPointerMove:ge(a.onPointerMove,Me(h)),onPointerCancel:i?a.onPointerCancel:ge(a.onPointerCancel,Me(h)),onPointerUp:i?a.onPointerUp:ge(a.onPointerUp,Me(h))})]})});mt.displayName=pt;var ur="ContextMenuPortal",xt=a=>{const{__scopeContextMenu:e,...s}=a,i=Z(e);return r.jsx(on,{...i,...s})};xt.displayName=ur;var ht="ContextMenuContent",gt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=ut(ht,s),m=Z(s),y=d.useRef(!1);return r.jsx(sn,{...m,...i,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{a.onCloseAutoFocus?.(u),!u.defaultPrevented&&y.current&&u.preventDefault(),y.current=!1},onInteractOutside:u=>{a.onInteractOutside?.(u),!u.defaultPrevented&&!l.modal&&(y.current=!0)},style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gt.displayName=ht;var fr="ContextMenuGroup",pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(dn,{...l,...i,ref:e})});pr.displayName=fr;var mr="ContextMenuLabel",xr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(un,{...l,...i,ref:e})});xr.displayName=mr;var hr="ContextMenuItem",bt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(nn,{...l,...i,ref:e})});bt.displayName=hr;var gr="ContextMenuCheckboxItem",br=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(fn,{...l,...i,ref:e})});br.displayName=gr;var yr="ContextMenuRadioGroup",vr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(pn,{...l,...i,ref:e})});vr.displayName=yr;var Cr="ContextMenuRadioItem",wr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(mn,{...l,...i,ref:e})});wr.displayName=Cr;var Nr="ContextMenuItemIndicator",jr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(xn,{...l,...i,ref:e})});jr.displayName=Nr;var Er="ContextMenuSeparator",yt=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(rn,{...l,...i,ref:e})});yt.displayName=Er;var Sr="ContextMenuArrow",Dr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(hn,{...l,...i,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubTrigger",Rr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(gn,{...l,...i,ref:e})});Rr.displayName=Mr;var Tr="ContextMenuSubContent",Pr=d.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=Z(s);return r.jsx(bn,{...l,...i,ref:e,style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pr.displayName=Tr;function Me(a){return e=>e.pointerType!=="mouse"?a(e):void 0}var kr=ft,Fr=mt,Ar=xt,Lr=gt,Or=bt,Ir=yt;function Kr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(kr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=i):i=e[3],i}function $r(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Fr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=i):i=e[3],i}function zr(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Ar,{children:r.jsx(Lr,{"data-slot":"context-menu-content",translate:"no",className:l,...i})}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}function fe(a){const e=se.c(12);let s,i,l,m;e[0]!==a?({className:s,inset:i,variant:m,...l}=a,e[0]=a,e[1]=s,e[2]=i,e[3]=l,e[4]=m):(s=e[1],i=e[2],l=e[3],m=e[4]);const y=m===void 0?"default":m;let u;e[5]!==s?(u=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=u):u=e[6];let b;return e[7]!==i||e[8]!==l||e[9]!==u||e[10]!==y?(b=r.jsx(Or,{"data-slot":"context-menu-item","data-inset":i,"data-variant":y,className:u,...l}),e[7]=i,e[8]=l,e[9]=u,e[10]=y,e[11]=b):b=e[11],b}function it(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Ir,{"data-slot":"context-menu-separator",className:l,...i}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}const _r="#d9a441";function Gr(a){const e=se.c(63),{node:s,depth:i,isExpanded:l,isSelected:m,isLoading:y,fileVisual:u,onOpen:b,onSelect:E,onNewFile:h,onNewFolder:x,onCopyPath:f,onCopyRelativePath:O,onRename:X,onDelete:I}=a,C=y===void 0?!1:y,g=Te(),R=s.kind==="directory",{Icon:$,color:L}=u,T=m&&"bg-accent";let P;e[0]!==T?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",T),e[0]=T,e[1]=P):P=e[1];const D=`${i*14+8}px`;let S;e[2]!==D?(S={paddingLeft:D},e[2]=D,e[3]=S):S=e[3];let N;e[4]!==b||e[5]!==E?(N=()=>{E(),b()},e[4]=b,e[5]=E,e[6]=N):N=e[6];let M;e[7]!==$||e[8]!==L||e[9]!==R||e[10]!==l||e[11]!==C?(M=R?r.jsxs(r.Fragment,{children:[C?r.jsx(pe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(rr,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(or,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(sr,{size:16,className:"shrink-0",style:{color:_r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx($,{size:16,className:"shrink-0",style:{color:L}})]}),e[7]=$,e[8]=L,e[9]=R,e[10]=l,e[11]=C,e[12]=M):M=e[12];let j;e[13]!==s.name?(j=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=j):j=e[14];let F;e[15]!==P||e[16]!==S||e[17]!==N||e[18]!==M||e[19]!==j?(F=r.jsx($r,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:S,onClick:N,children:[M,j]})}),e[15]=P,e[16]=S,e[17]=N,e[18]=M,e[19]=j,e[20]=F):F=e[20];let H;e[21]!==g?(H=g("sandbox.fileTreeRow.newFile"),e[21]=g,e[22]=H):H=e[22];let z;e[23]!==h||e[24]!==H?(z=r.jsx(fe,{onSelect:h,children:H}),e[23]=h,e[24]=H,e[25]=z):z=e[25];let Y;e[26]!==g?(Y=g("sandbox.fileTreeRow.newFolder"),e[26]=g,e[27]=Y):Y=e[27];let J;e[28]!==x||e[29]!==Y?(J=r.jsx(fe,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=J):J=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(it,{}),e[31]=ee):ee=e[31];let _;e[32]!==g?(_=g("sandbox.fileTreeRow.copyPath"),e[32]=g,e[33]=_):_=e[33];let A;e[34]!==f||e[35]!==_?(A=r.jsx(fe,{onSelect:f,children:_}),e[34]=f,e[35]=_,e[36]=A):A=e[36];let W;e[37]!==g?(W=g("sandbox.fileTreeRow.copyRelativePath"),e[37]=g,e[38]=W):W=e[38];let K;e[39]!==O||e[40]!==W?(K=r.jsx(fe,{onSelect:O,children:W}),e[39]=O,e[40]=W,e[41]=K):K=e[41];let q;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=r.jsx(it,{}),e[42]=q):q=e[42];let G;e[43]!==g?(G=g("sandbox.fileTreeRow.rename"),e[43]=g,e[44]=G):G=e[44];let k;e[45]!==X||e[46]!==G?(k=r.jsx(fe,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=k):k=e[47];let B;e[48]!==g?(B=g("sandbox.fileTreeRow.delete"),e[48]=g,e[49]=B):B=e[49];let V;e[50]!==I||e[51]!==B?(V=r.jsx(fe,{variant:"destructive",onSelect:I,children:B}),e[50]=I,e[51]=B,e[52]=V):V=e[52];let Q;e[53]!==z||e[54]!==J||e[55]!==A||e[56]!==K||e[57]!==k||e[58]!==V?(Q=r.jsxs(zr,{className:"w-52",children:[z,J,ee,A,K,q,k,V]}),e[53]=z,e[54]=J,e[55]=A,e[56]=K,e[57]=k,e[58]=V,e[59]=Q):Q=e[59];let ne;return e[60]!==Q||e[61]!==F?(ne=r.jsxs(Kr,{children:[F,Q]}),e[60]=Q,e[61]=F,e[62]=ne):ne=e[62],ne}const lt=200,Br=2,Vr=250,ct=200;function Ur(a,e){return Kn(a,e)}function Hr(a){const e=se.c(9),{text:s,query:i}=a;let l,m,y;if(e[0]!==i||e[1]!==s){const{leadingEllipsis:b,segments:E}=An(s,i);l="truncate font-mono text-muted-foreground",m=b&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),y=E.map(Wr),e[0]=i,e[1]=s,e[2]=l,e[3]=m,e[4]=y}else l=e[2],m=e[3],y=e[4];let u;return e[5]!==l||e[6]!==m||e[7]!==y?(u=r.jsxs("span",{className:l,children:[m,y]}),e[5]=l,e[6]=m,e[7]=y,e[8]=u):u=e[8],u}function Wr(a,e){return a.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:a.text},e):r.jsx("span",{children:a.text},e)}function $a({orgSlug:a,virtualMcpId:e,branch:s,threadId:i,openPath:l}){const m={orgSlug:a,virtualMcpId:e,branch:s,threadId:i},[y,u]=d.useState({files:[],directories:[],truncated:!1}),{files:b,directories:E}=y,[h,x]=d.useState(new Set),[f,O]=d.useState(null),[X,I]=d.useState(null),[C,g]=d.useState([]),[R,$]=d.useState(""),[L,T]=d.useState(null),[P,D]=d.useState(null),[S,N]=d.useState(!1),[M,j]=d.useState(!1),[F,H]=d.useState(!1),[z,Y]=d.useState(!1),[,J]=d.useState(new Set),[ee,_]=d.useState(new Set),A=d.useRef(0),W=d.useRef(null),K=d.useRef(new Set),q=d.useRef(new Map),G=d.useRef(null),k=d.useRef(0),B=d.useRef(null),V=d.useRef(null),Q=d.useRef(null);function ne(t){J(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[me,de]=d.useState(new Map),Pe=d.useRef(null),[ae,be]=d.useState(null),{sendMessage:vt}=En(),{openSidePanel:Ct}=Dn(),ye=yn(),[U,oe]=d.useState(null),[ke,Fe]=d.useState(null),[ve,Ce]=d.useState(!1);async function ie(t,n){const o=await fetch(Ur(m,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function we(){ye.invalidateQueries({queryKey:st(m)})}function Be(t,n,o){navigator.clipboard.writeText(o).then(()=>te.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>te.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function wt(t){const n=_n(t);if(!n)return;const o=`${a}/${e}/${s}`;ye.setQueryData(ot.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ye.invalidateQueries({queryKey:ot.liveMeta(a,e,s)})}function Nt(t){const n=t.kind==="file"?[t.path]:b.filter(o=>o.startsWith(".deco/blocks/")).map(o=>je(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)wt(o)}function jt(t){const n=je(t);return C.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=me.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ve(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),O(n=>n&&t(n)),de(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),I(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Et(t){const n=je(t);I(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ve(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function St(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await xe(),await we(),oe(null),he(o)}async function Dt(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),u(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await xe(),await we(),oe(null),x(p=>{const v=new Set(p);for(const ce of $e(o))v.add(ce);return v.add(o),v}),I({name:n,path:o,kind:"directory",children:[]})}async function Mt(t,n){if(!U)return;const o=U.node.path,c=Ee(o),p=De(c,n);if(p===o){oe(null);return}if(_e(p,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ve(v=>v===o?p:v.startsWith(`${o}/`)?De(p,v.slice(o.length+1)):v),await xe(),await we(),oe(null)}async function Rt(t,n){Ce(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Nt(n),Et(n.path),await xe(),await we(),Fe(null),te.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){te.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{Ce(!1)}}async function Tt(t,n){const o=On(n);if(o){te.error(o);return}Ce(!0);try{U?.mode==="new-file"?(await St(t,n),te.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):U?.mode==="new-folder"?(await Dt(t,n),te.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):U?.mode==="rename"&&(await Mt(t,n),te.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){te.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{Ce(!1)}}const Ue=d.useRef(!1);Ue.current||(Ue.current=!0,W.current=xe());const[Pt,kt]=d.useState(null),w=Te();if(l&&l!==Pt){kt(l);const t=l;queueMicrotask(()=>{Mn(t)&&he(t)})}async function Ae(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function He(t,n,o){if(o!==A.current)return!1;let c=!1;return u(p=>{const v=n?Gn(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&te.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Ft(t){const n=q.current.get(t);if(n)return n;const o=A.current,c=(async()=>{const p=await Ae({pattern:"**/*",path:re(t),limit:Oe}),v=He(p,!0,o);return!v&&o===A.current&&ne(ce=>{const Ne=new Set(ce);return Ne.add(t),Ne}),v})();q.current.set(t,c);try{return await c}finally{q.current.delete(t)}}async function We(t){if(!ze(t,K.current))return!1;_(n=>new Set(n).add(t));try{return await Ft(t)}finally{_(n=>{const o=new Set(n);return o.delete(t),o})}}async function At(t,n){const o=new Set(K.current);for(const c of $e(n)){if(!ze(c,o))continue;if(await We(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function xe(){const t=++A.current;B.current=null,V.current=null,q.current.clear(),H(!0),ne(new Set),x(new Set),_(new Set);try{const n=await Ae({pattern:"**/*",limit:Oe,maxDepth:Rn});He(n,!1,t),Y(!0)}catch{z&&te.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!me.get(t)?.loaded){de(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Ln(o.content??"");de(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Lt(){k.current++,T(null),D(null),N(!1),j(!1)}async function Ot(){const t=A.current,n=B.current;if(n&&n.generation===t)return n.files;const o=V.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Ae({pattern:"**/*",limit:Oe});return A.current===t&&(B.current={generation:t,files:p.files}),p.files})();V.current={generation:t,promise:c};try{return await c}finally{V.current?.generation===t&&(V.current=null)}}async function It(t,n){try{const o=await Ot();if(n!==k.current)return;T($n(o,t,ct))}catch{if(n!==k.current)return;T([])}}async function Kt(t,n){N(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:lt});if(n!==k.current)return;D(zn(o.results??"")),j((o.matchCount??0)>=lt)}catch{if(n!==k.current)return;D([]),j(!1)}finally{n===k.current&&N(!1)}}function $t(t){const n=t.trim(),o=++k.current;It(n,o),n.length<Br?(D(null),N(!1),j(!1)):Kt(n,o)}function zt(t){if($(t),G.current&&clearTimeout(G.current),!t.trim()){Lt();return}G.current=setTimeout(()=>{$t(t)},Vr)}function Qe(t){const n=Q.current;if(!n||n.path!==f)return;Q.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function _t(t){Q.current={path:t.path,line:t.line};const n=f===t.path&&me.get(t.path)?.loaded;he(t.path),n&&Pe.current&&Qe(Pe.current)}async function Gt(t,n){try{await ie("write",{path:re(t),content:n}),Se("file saved via sandbox /write",{path:t}),ye.invalidateQueries({queryKey:st(m)});try{const o=await In(m);Se("git status after save",o)}catch(o){Se("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}de(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){Se("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function Bt(t){O(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),be(null),C.includes(t)||g(n=>[...n,t]),qe(t)}function Vt(t){g(n=>{const o=n.filter(c=>c!==t);return f===t&&O(o[o.length-1]??null),o}),de(n=>{const o=new Map(n);return o.delete(t),o})}function Xe(t){x(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Ut(t){if(ze(t,K.current))try{if(await We(t))return}catch(n){te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}Xe(t)}async function Ht(t,n){if(n){Xe(t);return}await Ut(t)}async function Wt(t){await W.current,await At(w,t);const n=$e(t);x(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),Bt(t)}function he(t){Wt(t).catch(n=>{te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function qt(){return X?.kind==="directory"?X.path:X?.kind==="file"?Ee(X.path):f?Ee(f):"/"}function Ye(t){const n=qt();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Qt=Tn(b,E),Je=Pn(Qt,h),Le=L?.length??0,Ze=kn(P??[]),et=P?.length??0,ue=f?me.get(f):null,Xt=ue?.loaded&&ue.editorValue!==ue.savedContent,Yt=ke?jt(ke.path):[],Jt=(t,n)=>{Pe.current=t,Qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!f)return;const o=t.getValue();await Gt(f,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!f)return;const p=c.getValueInRange(o);be({filePath:f,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Zt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Ke(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),Ct("chat"),vt({parts:[{type:"text",text:n.join(`
2
2
  `)}]}),be(null)}return F&&!z?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:R,onChange:t=>zt(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Ye("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Ye("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!R&&Je.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=h.has(n.path),v=X?.path===n.path,ce=Fn(n.path,n.kind),Ne=c&&ee.has(n.path);return r.jsx(Gr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:Ne,fileVisual:Ie(n.name),onSelect:()=>I(n),onOpen:()=>{c?Ht(n.path,p):he(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>Be(w,"Path",je(n.path)),onCopyRelativePath:()=>Be(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Fe(n)},n.path)}),!R&&z&&Je.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),R&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Le>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=ct?"+":""]})]}),L!==null&&L.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),L?.map(t=>{const n=t.split("/").pop()??t,o=Ee(t),{Icon:c,color:p}=Ie(n),v=f===t;return r.jsxs("button",{type:"button",onClick:()=>he(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),R&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),et>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[et,M?"+":""]}),S&&r.jsx(pe,{size:10,className:"animate-spin"})]}),!S&&P!==null&&Ze.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ze.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Ie(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>_t(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Hr,{text:p.text,query:R})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[C.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:C.map(t=>{const n=me.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=f===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{O(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Vt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Zt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&be(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:f&&ue?.loaded?r.jsx(Sn,{language:Ke(f),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ue.editorValue,path:f,onChange:t=>{const n=f;n&&de(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},f):f&&!ue?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),f&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:f}),r.jsxs("span",{children:[w(Xt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(f)]})]})]}),r.jsx(ir,{open:U!==null,mode:U?.mode??"new-file",initialName:U?.mode==="rename"?U.node.name:"",parentLabel:U&&U.mode!=="rename"?U.parentDir==="/"?"/":re(U.parentDir):void 0,isPending:ve,onSubmit:t=>Tt(w,t),onOpenChange:t=>{!t&&!ve&&oe(null)}}),r.jsx(lr,{deleteTarget:ke,deleteDirtyPaths:Yt,fsActionPending:ve,onOpenChange:t=>{!t&&!ve&&Fe(null)},onConfirm:t=>{Rt(w,t)}})]})}export{$a as FileExplorer};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-oUYXP9Sz.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
1
+ import{c as g,j as o}from"./index-Cwc5OUhn.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
@@ -1 +1 @@
1
- import{eM as C,c as f,j as c,ay as j,r as d,n as p,bW as b,eN as v,eO as N}from"./index-oUYXP9Sz.js";import{L as h}from"./label-CLQvZ6qi.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=N(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function y(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(h,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function L(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function P(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{D as F,w as a,L as b,R as c,E as d,y as e,P as f};
1
+ import{eM as C,c as f,j as c,ay as j,r as d,n as p,bW as b,eN as v,eO as N}from"./index-Cwc5OUhn.js";import{L as h}from"./label-CH7Mz6MF.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=N(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function y(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(h,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function L(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function P(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{D as F,w as a,L as b,R as c,E as d,y as e,P as f};