decocms 4.542.0 → 4.542.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-ppN64tl0.js → ActiveShapeUtils-xwm7xTvz.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-RV4AM_8y.js → AlertCircle-BjT7_GFq.js} +1 -1
  3. package/dist/client/assets/{AreaChart-B5eHYCMZ.js → AreaChart-jT3sTbub.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-XO66B9Td.js → ArrowLeft-Par1IdOs.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DpQ-09y4.js → ArrowUp-At9MqVhB.js} +1 -1
  6. package/dist/client/assets/{BarChart-rvb3yNLn.js → BarChart-BI0I1ki0.js} +1 -1
  7. package/dist/client/assets/{Building02-NRzC_IEp.js → Building02-BV_I3UuJ.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-BVsrzbFJ.js → CartesianChart-CHwcVvKV.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-64zykerQ.js → CategoricalChart-CF0oZQqp.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-CfYD_Bi6.js → CheckCircle-D6xmTIXf.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-C5MARPJN.js → ChevronSelectorVertical-CeHSyaSD.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-xR4eZngE.js → ChevronUp-CNyARDGk.js} +1 -1
  13. package/dist/client/assets/{Copy01-Dy1KrWO0.js → Copy01-DisW4JMo.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-DVN26JVZ.js → CreditCard01-QvSfBZzn.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-CncVW4wJ.js → DotsVertical-wJ46YU2V.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-C5dp8Quc.js → ErrorBarContext-DteLj0IZ.js} +1 -1
  17. package/dist/client/assets/{Globe04-BxFc3HLH.js → Globe04-DK5qhUMj.js} +1 -1
  18. package/dist/client/assets/{Image01-CaawlkVR.js → Image01-CO8HhoHi.js} +1 -1
  19. package/dist/client/assets/{Key01-FaGRi3tG.js → Key01-BDwjIsdK.js} +1 -1
  20. package/dist/client/assets/{Link01-B_YWUHoH.js → Link01-BHgTruNE.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-z_Mm0CSf.js → LinkBroken01-CdMsJVgm.js} +1 -1
  22. package/dist/client/assets/{Minus-yAYwM_Ty.js → Minus-CJDvXjFo.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Bl7f7T5L.js → Monitor01-B3thg2Rr.js} +1 -1
  24. package/dist/client/assets/{Play-OByKGnTy.js → Play-BhU5Ns8x.js} +1 -1
  25. package/dist/client/assets/{Plus-Ccck99Do.js → Plus-BaWg3Fda.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-BxNBuCjR.js → ReferenceLine-NAOdXR_M.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BAGHgvYw.js → SearchMd-B541ufOQ.js} +1 -1
  28. package/dist/client/assets/{Sector-BCmuavOw.js → Sector-DWc-NOYF.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BhoOjVkp.js → ShoppingBag01-d7aE6vty.js} +1 -1
  30. package/dist/client/assets/{Sun-CZRF_565.js → Sun-wY_Z9VGm.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-Ce37vA9c.js → SwitchHorizontal01-7qdaOYVu.js} +1 -1
  32. package/dist/client/assets/{Tool01-CHLDtlIL.js → Tool01-DwTqd_Nj.js} +1 -1
  33. package/dist/client/assets/{Trash01-BQBP0tUM.js → Trash01-B5_r6iLm.js} +1 -1
  34. package/dist/client/assets/{Upload01-D_q00M49.js → Upload01-BP49pNql.js} +1 -1
  35. package/dist/client/assets/UserSquare-D1neGXtF.js +1 -0
  36. package/dist/client/assets/{Users01-C6bE7RDt.js → Users01-CrLtxwQA.js} +1 -1
  37. package/dist/client/assets/{XClose-BjZnEBvF.js → XClose-DsiXpG7_.js} +1 -1
  38. package/dist/client/assets/{Zap-CHuT8W6R.js → Zap-BB-vOERw.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-CBOWQYet.js → ZoomOut-ZB7MeGmK.js} +1 -1
  40. package/dist/client/assets/{access-gate-BU0Til0A.js → access-gate-BMPZzaLe.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-BB5lDWHR.js → add-connection-dialog-DkTbkwZe.js} +1 -1
  42. package/dist/client/assets/{agent-analytics-DvRSJxx0.js → agent-analytics-DFuVpyFS.js} +1 -1
  43. package/dist/client/assets/agent-app-BI0E5_7n.js +1 -0
  44. package/dist/client/assets/{agent-assets-DtVY4a5g.js → agent-assets-mt6-RxoQ.js} +1 -1
  45. package/dist/client/assets/{agent-automation-DcUA7Zto.js → agent-automation-DPJINZ67.js} +1 -1
  46. package/dist/client/assets/{agent-automations-C9tGxGRj.js → agent-automations-Cl5cbuK-.js} +1 -1
  47. package/dist/client/assets/{agent-calendar-D4_LWZH3.js → agent-calendar-CMljpTSo.js} +1 -1
  48. package/dist/client/assets/{agent-connect-sources-BJ3ZDaf3.js → agent-connect-sources-Ck7orXzL.js} +1 -1
  49. package/dist/client/assets/agent-deck-Nw66gXDM.js +1 -0
  50. package/dist/client/assets/{agent-e2e-Cn5SS6MS.js → agent-e2e-BLatnPC9.js} +1 -1
  51. package/dist/client/assets/agent-experiments-BslAK98v.js +1 -0
  52. package/dist/client/assets/{agent-file-W_Lb3P1H.js → agent-file-cyUqJo5U.js} +1 -1
  53. package/dist/client/assets/{agent-hosting-CP_GZV0j.js → agent-hosting-DFO1UQwH.js} +1 -1
  54. package/dist/client/assets/agent-icon-D-0GvNzG.js +1 -0
  55. package/dist/client/assets/agent-library-BXKmMOCL.js +1 -0
  56. package/dist/client/assets/agent-library-file-D8BDKfA2.js +1 -0
  57. package/dist/client/assets/agent-monitor-D6kjNFa-.js +1 -0
  58. package/dist/client/assets/{agent-overview-BlaBQIjD.js → agent-overview-CckXDLIM.js} +1 -1
  59. package/dist/client/assets/{agent-releases-CAYqdnuz.js → agent-releases-Bfo75_fu.js} +1 -1
  60. package/dist/client/assets/agent-settings-DM6gu80D.js +1 -0
  61. package/dist/client/assets/{agent-site-editor-dBOL06nH.js → agent-site-editor-DEMYd53f.js} +1 -1
  62. package/dist/client/assets/agent-site-editor-code-B7Ja4k0e.js +2 -0
  63. package/dist/client/assets/agent-site-editor-content-BgxmK1MQ.js +1 -0
  64. package/dist/client/assets/agent-site-editor-preview-BxfSe8hZ.js +1 -0
  65. package/dist/client/assets/agent-view-Di5xXloU.js +1 -0
  66. package/dist/client/assets/{agent-view-guard-B4NqxjMv.js → agent-view-guard-BVgIccGF.js} +1 -1
  67. package/dist/client/assets/{agents-list-DYMJQcr6.js → agents-list-Bhp-wRRW.js} +1 -1
  68. package/dist/client/assets/{ai-providers-Ci2k4cWf.js → ai-providers-BZ346tRe.js} +1 -1
  69. package/dist/client/assets/{alert-Bsjmz-OK.js → alert-l5j64Qp_.js} +1 -1
  70. package/dist/client/assets/{analytics-sections-Nw_65a4t.js → analytics-sections-C7Wvx5is.js} +1 -1
  71. package/dist/client/assets/{api-keys-D4BF_tKg.js → api-keys-D1eJSOy-.js} +1 -1
  72. package/dist/client/assets/api-keys-Duet-lJP.js +1 -0
  73. package/dist/client/assets/app-editor-BdTBcszA.js +1 -0
  74. package/dist/client/assets/{asset-utils-BSDCnt-j.js → asset-utils-Cwse7TzX.js} +1 -1
  75. package/dist/client/assets/{auth-CK6AyRu5.js → auth-BZPkjT4-.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-CJTrtQsq.js → auth-catchall-CorB5tw4.js} +1 -1
  77. package/dist/client/assets/{auth-entry-CPeTN7o5.js → auth-entry-iQvrZCC2.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-BGf8-EnP.js → auth-split-layout-BlKheOJZ.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-Bb8BBbsA.js → authenticate-and-persist-oauth-DercrMMu.js} +1 -1
  80. package/dist/client/assets/{automation-list-row-B9IR9kWn.js → automation-list-row-g_Vn0fLf.js} +1 -1
  81. package/dist/client/assets/{automation-runs-DnR9pxm5.js → automation-runs-B-xMEZBF.js} +1 -1
  82. package/dist/client/assets/{automations-Bxg30h3H.js → automations-CXl5dDVa.js} +1 -1
  83. package/dist/client/assets/{autosend-DTWIjCgK.js → autosend-Ci815qQG.js} +1 -1
  84. package/dist/client/assets/{badge-BV7rxTvN.js → badge-iQ-KRbWv.js} +1 -1
  85. package/dist/client/assets/{block-document-CQARMaA2.js → block-document-DLTjHmMQ.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-C2nnj0H9.js → blocks-preview-workspace-context-Cr4NHNVG.js} +1 -1
  87. package/dist/client/assets/blocks-tab-states-Cs7bIWnm.js +1 -0
  88. package/dist/client/assets/{blog-schema-YJUL-tEX.js → blog-schema-UfoKLAgi.js} +1 -1
  89. package/dist/client/assets/{buckets-C4JU-8qW.js → buckets-0IbVUkQA.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-Bv3kayMV.js → build-improve-prompt-doc-RrLnbLYj.js} +1 -1
  91. package/dist/client/assets/{calendar-ym6zGcEl.js → calendar-CjBfTyns.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-7V5aWr5c.js → capability-load-error-BciHzJb0.js} +1 -1
  93. package/dist/client/assets/{category-editor-CdId4wR5.js → category-editor-2zcLZItm.js} +1 -1
  94. package/dist/client/assets/{cdn-tab-2DyF7VRR.js → cdn-tab-OEVXJsgd.js} +1 -1
  95. package/dist/client/assets/{chart-eh3rIFzp.js → chart-D-nB-Kvb.js} +1 -1
  96. package/dist/client/assets/{chat-context-kqrW-XPR.js → chat-context-0CZgd-Gr.js} +1 -1
  97. package/dist/client/assets/{chat-draft-CRTo5XoS.js → chat-draft-DM7nVCQ-.js} +1 -1
  98. package/dist/client/assets/{checkbox-aDQexY19.js → checkbox-DVUVqeGQ.js} +1 -1
  99. package/dist/client/assets/{choose-editor-D9t0sU_N.js → choose-editor-D4MptH6S.js} +1 -1
  100. package/dist/client/assets/{cli-auth-success-BSvz1123.js → cli-auth-success-CcaewW77.js} +1 -1
  101. package/dist/client/assets/{client-icons-DGnfsAP4.js → client-icons-CYPommua.js} +1 -1
  102. package/dist/client/assets/{cms-settings-editor-BCSWQ-Po.js → cms-settings-editor-CnyCQ0VY.js} +1 -1
  103. package/dist/client/assets/{collapsible-Cx6KFD5C.js → collapsible-VIsV7VNH.js} +1 -1
  104. package/dist/client/assets/{collection-detail-ZxhaHEpw.js → collection-detail-DWJ8AxJZ.js} +1 -1
  105. package/dist/client/assets/{collection-display-button-Bswg3uCR.js → collection-display-button-DM4HtPM4.js} +1 -1
  106. package/dist/client/assets/{collection-search-B3vfcK1n.js → collection-search-Dg61rOFc.js} +1 -1
  107. package/dist/client/assets/{collection-table-wrapper-Cs4FMkXQ.js → collection-table-wrapper-Tom29l37.js} +1 -1
  108. package/dist/client/assets/{collection-tabs-BdhCjBRd.js → collection-tabs-Dgf5t1P2.js} +1 -1
  109. package/dist/client/assets/{combobox-DXDZmm8e.js → combobox-BxlWJcmj.js} +1 -1
  110. package/dist/client/assets/{command-De9pJLwH.js → command-DELHBruW.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-B-ueLE1c.js → companion-mcps-section-DplrUpp5.js} +1 -1
  112. package/dist/client/assets/{companions-core-DzyeM-yJ.js → companions-core-PpXpxfgQ.js} +1 -1
  113. package/dist/client/assets/{config-Bakd4Y8w.js → config-C7l46kfh.js} +1 -1
  114. package/dist/client/assets/{connect-BMYdSTT8.js → connect-DMjCcT3A.js} +1 -1
  115. package/dist/client/assets/{connect-layout-BpMetD5F.js → connect-layout-BPsq801z.js} +1 -1
  116. package/dist/client/assets/{connect-source-dialog-BkUskMwn.js → connect-source-dialog-C2D2IgRk.js} +1 -1
  117. package/dist/client/assets/{connection-C-NllGni.js → connection-OneH_KYb.js} +1 -1
  118. package/dist/client/assets/{connection-card-DZD_rAWh.js → connection-card-Cn0XDJp5.js} +1 -1
  119. package/dist/client/assets/{connection-detail-BRz9FZ83.js → connection-detail-DviNqCvu.js} +1 -1
  120. package/dist/client/assets/{connection-form-helpers-DmavsUyJ.js → connection-form-helpers-Bky3pLkI.js} +1 -1
  121. package/dist/client/assets/{connections-Cj6HJEn1.js → connections-CnCDDLW4.js} +1 -1
  122. package/dist/client/assets/content-tab-ChaQz5Cw.js +25 -0
  123. package/dist/client/assets/context-Z72cw_0L.js +1 -0
  124. package/dist/client/assets/{context-menu-CiH3Gj0R.js → context-menu-BVx2zw6F.js} +1 -1
  125. package/dist/client/assets/{context-shell-BwT70eIn.js → context-shell-4OlOuHkx.js} +3 -3
  126. package/dist/client/assets/{core.esm-DQyn-kJS.js → core.esm-DtwNC1S6.js} +1 -1
  127. package/dist/client/assets/{create-organization-dialog-CiZys2Ku.js → create-organization-dialog-Bud6wRZH.js} +1 -1
  128. package/dist/client/assets/{daily-pulse-CMy69HGI.js → daily-pulse-CZ6S1sQA.js} +1 -1
  129. package/dist/client/assets/{discover-DQ9dXI7n.js → discover-DTCouleE.js} +1 -1
  130. package/dist/client/assets/{domain-settings-5g_MWfwe.js → domain-settings-CMqaHhTL.js} +1 -1
  131. package/dist/client/assets/{drawer-DDmudFbW.js → drawer-DV7RfSOm.js} +1 -1
  132. package/dist/client/assets/{editor-BqqnxL88.js → editor-C97Kf5Du.js} +1 -1
  133. package/dist/client/assets/{editor-classes-D-ez-qBv.js → editor-classes-Cpizi6Gd.js} +1 -1
  134. package/dist/client/assets/{empty-state-iEpXVBwd.js → empty-state-BaG0Q4po.js} +1 -1
  135. package/dist/client/assets/{empty-state-C7LII3ZM.js → empty-state-DN5hGWOA.js} +1 -1
  136. package/dist/client/assets/{experiments-tab-DGo_lvyv.js → experiments-tab-CaSjZfNk.js} +1 -1
  137. package/dist/client/assets/{experiments-tab-choice-B_rL9_Nx.js → experiments-tab-choice-D7HK8muj.js} +1 -1
  138. package/dist/client/assets/{extract-connection-data-DYwFbKkm.js → extract-connection-data-CMDKUW-r.js} +1 -1
  139. package/dist/client/assets/{feature-gate-E1LoWMx3.js → feature-gate-BCs7uS6R.js} +1 -1
  140. package/dist/client/assets/{feature-paywall-CDMJv8wq.js → feature-paywall-BkfFWoMQ.js} +1 -1
  141. package/dist/client/assets/{file-explorer-CsD267WS.js → file-explorer-D9mAz812.js} +1 -1
  142. package/dist/client/assets/{file-preview-Cj5pBQv2.js → file-preview-BIWzBCIQ.js} +1 -1
  143. package/dist/client/assets/{file-share-button-DOup2WzD.js → file-share-button-Yp1hPdth.js} +1 -1
  144. package/dist/client/assets/{file-type-icon-BgzyV542.js → file-type-icon-BzoA5jiZ.js} +1 -1
  145. package/dist/client/assets/{folder-icon-DY3kBxQc.js → folder-icon-3OVJ0C3s.js} +1 -1
  146. package/dist/client/assets/{form-gDNfP07W.js → form-BeydREbm.js} +1 -1
  147. package/dist/client/assets/{general-CWpdg4Hl.js → general-TShdY8k6.js} +1 -1
  148. package/dist/client/assets/{github-icon-DAxkwypb.js → github-icon-BAVg06aG.js} +1 -1
  149. package/dist/client/assets/github-repo-scope-CiKlF-H0.js +1 -0
  150. package/dist/client/assets/{held-block-view-C3Ird9F-.js → held-block-view-C-gX7MJV.js} +3 -3
  151. package/dist/client/assets/{home-TaMnsEq5.js → home-CaunCGhV.js} +1 -1
  152. package/dist/client/assets/{hosted-publish-feedback-CVQKURab.js → hosted-publish-feedback-DBuxeNUI.js} +1 -1
  153. package/dist/client/assets/{icon-button-CTmBGRaQ.js → icon-button-Dvr6r3yU.js} +1 -1
  154. package/dist/client/assets/{index-Qn_AZuwz.js → index-3W95YvR0.js} +1 -1
  155. package/dist/client/assets/{index-Cjtut9JA.js → index-APWCNDjQ.js} +1 -1
  156. package/dist/client/assets/{index-CXhEXTV0.js → index-B84NhyjS.js} +1 -1
  157. package/dist/client/assets/{index-Cbe7caeT.js → index-Bi4PycPz.js} +1 -1
  158. package/dist/client/assets/{index-DGoeX32I.js → index-C6hJbAJT.js} +1 -1
  159. package/dist/client/assets/{index-CzqNFJgA.js → index-CG3hHrir.js} +1 -1
  160. package/dist/client/assets/{index-15xKR9ar.js → index-CP1LLlUE.js} +1 -1
  161. package/dist/client/assets/{index-ylByMMZI.js → index-Co_Y2KRI.js} +1 -1
  162. package/dist/client/assets/{index-G8_ivZDF.js → index-CvcioybL.js} +1 -1
  163. package/dist/client/assets/{index-lchr3O79.js → index-CzKs4Djn.js} +1 -1
  164. package/dist/client/assets/{index-C-GH7ZUH.js → index-DJkEjMHv.js} +1 -1
  165. package/dist/client/assets/{index-DKRm_nGH.js → index-DXbJEWCl.js} +1 -1
  166. package/dist/client/assets/{index-D3fuewCp.js → index-DslCcy2A.js} +2 -2
  167. package/dist/client/assets/{index-CFDA2Gyk.js → index-Gy88raZj.js} +1 -1
  168. package/dist/client/assets/{index-BWpKrclg.js → index-WgfN4QVP.js} +7 -7
  169. package/dist/client/assets/{index-redirect-COc2iMJs.js → index-redirect-BuSCUFK5.js} +1 -1
  170. package/dist/client/assets/{infiniteQueryObserver-CbIPWgZj.js → infiniteQueryObserver-AJwWz1b5.js} +1 -1
  171. package/dist/client/assets/{infra-billing-gMBDswwS.js → infra-billing-CSDR5i1g.js} +1 -1
  172. package/dist/client/assets/{input-Cf50b9sU.js → input-BqbNJGML.js} +3 -3
  173. package/dist/client/assets/{input-CgS5sNmj.js → input-C9nmuHHZ.js} +1 -1
  174. package/dist/client/assets/{integration-icon-BQ9jVlvt.js → integration-icon-UvPKDtTh.js} +1 -1
  175. package/dist/client/assets/{jira-icon-CzGOnWKo.js → jira-icon-Bmh7OVT1.js} +1 -1
  176. package/dist/client/assets/{label-DzRNwB_s.js → label-Dxzmqh4L.js} +1 -1
  177. package/dist/client/assets/{layout-d2_2jbV9.js → layout-C4nyDmIH.js} +1 -1
  178. package/dist/client/assets/{legacy-agents-deep-CyFzwt79.js → legacy-agents-deep-aq4ok2ss.js} +1 -1
  179. package/dist/client/assets/{legacy-main-redirect-B0hY-Z0B.js → legacy-main-redirect-IAdI4U7x.js} +1 -1
  180. package/dist/client/assets/library-Da5YKyoM.js +1 -0
  181. package/dist/client/assets/{library-tab-cQd24fFO.js → library-tab-CSUDGppR.js} +1 -1
  182. package/dist/client/assets/{login-BB7FreRC.js → login-4UMFaQqs.js} +1 -1
  183. package/dist/client/assets/{markdown-CkZaCBow.js → markdown-NHGOJDhi.js} +1 -1
  184. package/dist/client/assets/{mcp-app-renderer-BVLr3WK6.js → mcp-app-renderer-CGhEZS_Z.js} +1 -1
  185. package/dist/client/assets/{mcp-oauth-KJGfGjkD.js → mcp-oauth-D0k2-sPR.js} +1 -1
  186. package/dist/client/assets/{mcp-oauth-DWlxkjKx.js → mcp-oauth-Due6wImr.js} +1 -1
  187. package/dist/client/assets/{members-BvQ1xqU5.js → members-CNgezQXU.js} +1 -1
  188. package/dist/client/assets/{memory-_Oguj4if.js → memory-BmjdKRyH.js} +1 -1
  189. package/dist/client/assets/{mini-report-page-BC7L0ipE.js → mini-report-page-C4ZquL_-.js} +1 -1
  190. package/dist/client/assets/{mock-board-BC3rEvaU.js → mock-board-CSzfjmM9.js} +3 -3
  191. package/dist/client/assets/{monaco-editor-zzUPRyBn.js → monaco-editor-BDiq_2v4.js} +1 -1
  192. package/dist/client/assets/{monitoring-ilB7hU6H.js → monitoring-DDlo0E0z.js} +1 -1
  193. package/dist/client/assets/{monitoring-stats-row-DZ9HvRuy.js → monitoring-stats-row-BIUtkx4G.js} +1 -1
  194. package/dist/client/assets/{multi-select-D2pKycte.js → multi-select-BzEGbWV5.js} +1 -1
  195. package/dist/client/assets/{mustache-BBgPaDqo.js → mustache-CDuMzcYJ.js} +1 -1
  196. package/dist/client/assets/{named-rule-uses-8PEXqP7W.js → named-rule-uses-BBO-qGhe.js} +1 -1
  197. package/dist/client/assets/{new-project-dialog-Dd5pVssc.js → new-project-dialog-DePwIx8r.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-DIj2YLwh.js → oauth-callback-MEfOlRUI.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-zp6PPNfP.js → oauth-callback-ai-provider-CmQYTORU.js} +1 -1
  200. package/dist/client/assets/{onboarding-CSUeJ8OK.js → onboarding-D-XW6Ll4.js} +1 -1
  201. package/dist/client/assets/{openai-conversation-CT9LWWrS.js → openai-conversation-f0QT3g0s.js} +1 -1
  202. package/dist/client/assets/{optimistic-project-sidebar-views-BhoNMrVo.js → optimistic-project-sidebar-views-BLuXu9p7.js} +1 -1
  203. package/dist/client/assets/{order-monitor-day-D-Ti4NDE.js → order-monitor-day-CUhalAkv.js} +1 -1
  204. package/dist/client/assets/{organization-choice-Bs2Llr3r.js → organization-choice-C88DHbpi.js} +1 -1
  205. package/dist/client/assets/{orgs-Bs_15YVG.js → orgs-BqSj6zly.js} +1 -1
  206. package/dist/client/assets/{page-seo-form-DizfAl8r.js → page-seo-form-bsmuSaAw.js} +1 -1
  207. package/dist/client/assets/{pair-BFVxcKKp.js → pair-Cz07PNwj.js} +1 -1
  208. package/dist/client/assets/parse-sections-CNEwf5xY.js +1 -0
  209. package/dist/client/assets/{plan-_57doTJd.js → plan-BaxzxsmN.js} +1 -1
  210. package/dist/client/assets/{plan-ladder-DVSwNgR2.js → plan-ladder-CPUSwIwK.js} +1 -1
  211. package/dist/client/assets/{plan-usage-card-B64WjIMI.js → plan-usage-card-C2rK33eA.js} +1 -1
  212. package/dist/client/assets/{popover-ClEv7Zyf.js → popover-DqVLkXUD.js} +1 -1
  213. package/dist/client/assets/{post-calendar-CMHuZuip.js → post-calendar-D-B-o5Sk.js} +1 -1
  214. package/dist/client/assets/{post-editor-CqgW2_fW.js → post-editor-wYAwFgD6.js} +1 -1
  215. package/dist/client/assets/{preview-content-BSsfQ6ZE.js → preview-content-SmC2ClvS.js} +1 -1
  216. package/dist/client/assets/{preview-dialog-DBnDC8gE.js → preview-dialog-CKYpQv_g.js} +1 -1
  217. package/dist/client/assets/{preview-panel-DQBuS4_f.js → preview-panel-CUIawUFr.js} +1 -1
  218. package/dist/client/assets/{preview-tab-_86kIh0E.js → preview-tab-gJ-NI33V.js} +3 -3
  219. package/dist/client/assets/{product-picker-dialog-C8oMVTn6.js → product-picker-dialog-BfM9NW4L.js} +1 -1
  220. package/dist/client/assets/{profile-Bsx5sLNH.js → profile-BAzM4QDZ.js} +1 -1
  221. package/dist/client/assets/{project-app-view-C5QghQe6.js → project-app-view-D4za2-JY.js} +1 -1
  222. package/dist/client/assets/{project-apps-oe6VMb11.js → project-apps-B3VLUQHR.js} +1 -1
  223. package/dist/client/assets/{project-feed-DAjFP_Ib.js → project-feed-BMuYP0mY.js} +1 -1
  224. package/dist/client/assets/{project-icon-BKeF243f.js → project-icon-BIzg7YUA.js} +1 -1
  225. package/dist/client/assets/project-reports-DJoAVemp.js +1 -0
  226. package/dist/client/assets/project-tasks-Db93bOVr.js +1 -0
  227. package/dist/client/assets/{projects-BaKJExhs.js → projects-BsvG5EZk.js} +1 -1
  228. package/dist/client/assets/{projects-empty-state-B_kHw_MZ.js → projects-empty-state-BuGy3TU-.js} +1 -1
  229. package/dist/client/assets/{prompts-Br3MvaH9.js → prompts-C_3bA9AB.js} +1 -1
  230. package/dist/client/assets/{provision-repo-scoped-github-connection-lckxpDHD.js → provision-repo-scoped-github-connection-DoOuHltS.js} +1 -1
  231. package/dist/client/assets/record-editor-DavD_m_0.js +1 -0
  232. package/dist/client/assets/redirect-editor-DoeEK1iC.js +1 -0
  233. package/dist/client/assets/{releases-api-DwHPczFb.js → releases-api-DaYlp5Yo.js} +1 -1
  234. package/dist/client/assets/reports-5EubtE8r.js +1 -0
  235. package/dist/client/assets/{reports-iqRQlH1z.js → reports-D9rwlh0Z.js} +1 -1
  236. package/dist/client/assets/{reports-onboarding-Bm9Wvkaq.js → reports-onboarding-CI5-svnj.js} +1 -1
  237. package/dist/client/assets/{reports-tab-DesQ1SQx.js → reports-tab-Dqp0OnYz.js} +2 -2
  238. package/dist/client/assets/repositories-BaY0RDK6.js +1 -0
  239. package/dist/client/assets/{repositories-DUBWep32.js → repositories-pCQtYygJ.js} +1 -1
  240. package/dist/client/assets/{repository-binding-Bpq6heaQ.js → repository-binding-DF6YCWsj.js} +1 -1
  241. package/dist/client/assets/{repository-import-picker-DxJJpcCz.js → repository-import-picker-bneKFCuv.js} +1 -1
  242. package/dist/client/assets/{repository-picker-P8Asvsk4.js → repository-picker-CGoSX3oi.js} +1 -1
  243. package/dist/client/assets/{require-capability-B-uxpRvL.js → require-capability-DbotB2TQ.js} +1 -1
  244. package/dist/client/assets/{required-auth-layout-DYZU5vk_.js → required-auth-layout-BLLWaY3S.js} +1 -1
  245. package/dist/client/assets/{reset-password-Bs_JmNWK.js → reset-password-CYfdP8lX.js} +1 -1
  246. package/dist/client/assets/{resizable-vbjrp9Su.js → resizable-DcAx-gSp.js} +1 -1
  247. package/dist/client/assets/{resolve-tab-icon-CzFxm7IQ.js → resolve-tab-icon-CEtcjh_A.js} +1 -1
  248. package/dist/client/assets/review-settings-BtTYlHnB.js +1 -0
  249. package/dist/client/assets/{roles-C-6Op6OQ.js → roles-wWNA46at.js} +1 -1
  250. package/dist/client/assets/{route-Cr42SuLO.js → route-8T5e9Ewx.js} +1 -1
  251. package/dist/client/assets/{route-Bdui6QXz.js → route-CGePI1fo.js} +1 -1
  252. package/dist/client/assets/route-D_1NyYgH.js +1 -0
  253. package/dist/client/assets/{sandbox-lifecycle-context-D9eDp86x.js → sandbox-lifecycle-context-Bwi5LES5.js} +1 -1
  254. package/dist/client/assets/{schema-DzZBw0EW.js → schema-BUPJBVf-.js} +1 -1
  255. package/dist/client/assets/{schema-Cd1llToh.js → schema-DiDerRAC.js} +1 -1
  256. package/dist/client/assets/{scroll-area-CwuazZb5.js → scroll-area-CiASyTMh.js} +1 -1
  257. package/dist/client/assets/{search-input-D2iQ_3lu.js → search-input-BB0pLu50.js} +1 -1
  258. package/dist/client/assets/{search-toggle-Cw7hl_Xx.js → search-toggle-Ct5urmf5.js} +1 -1
  259. package/dist/client/assets/{secret-picker-Ct1DoTR9.js → secret-picker-DeqIjavS.js} +1 -1
  260. package/dist/client/assets/{secrets-CBPyw7ba.js → secrets-CXa42ggH.js} +1 -1
  261. package/dist/client/assets/{section-array-field-BXLl3jB0.js → section-array-field-DENveGph.js} +1 -1
  262. package/dist/client/assets/{sections-DRD1aU5D.js → sections-Czi5N-nx.js} +1 -1
  263. package/dist/client/assets/sections-editor-CJWiHP8t.js +1 -0
  264. package/dist/client/assets/{select-BMteQTWS.js → select-CFg3KEOq.js} +1 -1
  265. package/dist/client/assets/{select-model-ujDDmA_R.js → select-model-DkYaqcwE.js} +1 -1
  266. package/dist/client/assets/{seo-editor-nXgc_X38.js → seo-editor-C18LAsg1.js} +1 -1
  267. package/dist/client/assets/{separator-l2LsOpLi.js → separator-DlxWQ5-B.js} +1 -1
  268. package/dist/client/assets/settings-tab-CGA_nTpk.js +1 -0
  269. package/dist/client/assets/{sheet-BW-FxyJZ.js → sheet-CA3M7bQp.js} +1 -1
  270. package/dist/client/assets/{shell-layout-BbFvnpcf.js → shell-layout-pSWumg64.js} +1 -1
  271. package/dist/client/assets/{site-draft-actions-9GNFURGo.js → site-draft-actions-B9N3leLY.js} +1 -1
  272. package/dist/client/assets/{site-draft-view-DhCorNAk.js → site-draft-view-Byvdlyo6.js} +2 -2
  273. package/dist/client/assets/site-editor-CqHgEJnK.js +1 -0
  274. package/dist/client/assets/{site-editor-toast-QHleRFN5.js → site-editor-toast-Bz-6LR6r.js} +1 -1
  275. package/dist/client/assets/{skills-ApZ_uT4M.js → skills-DcoNLVNg.js} +1 -1
  276. package/dist/client/assets/{slider-DtzvJZ1j.js → slider-CdizOZzU.js} +1 -1
  277. package/dist/client/assets/{sortable.esm-DNzjY6xb.js → sortable.esm-D_24nW2P.js} +1 -1
  278. package/dist/client/assets/{sso-Con6Y9JD.js → sso-BX8AqSlx.js} +1 -1
  279. package/dist/client/assets/{suggestion-BgdlUdcB.js → suggestion-hz2N0L4f.js} +1 -1
  280. package/dist/client/assets/{switch-Bv0wLEBx.js → switch-nJxNuRWR.js} +1 -1
  281. package/dist/client/assets/{symbol-CJoI4vsX.js → symbol-DnjOGl1B.js} +1 -1
  282. package/dist/client/assets/{synced-repos-Bdx0Lzti.js → synced-repos-CwsMzHsk.js} +1 -1
  283. package/dist/client/assets/{tab-icon-glyph-CSlj-TVq.js → tab-icon-glyph-CyteS_dF.js} +1 -1
  284. package/dist/client/assets/{table-CheWM6KL.js → table-D3Xss2p0.js} +1 -1
  285. package/dist/client/assets/{tabs-CjWwohzM.js → tabs-j1z3THwl.js} +1 -1
  286. package/dist/client/assets/{task-assignee-avatar-DwSiTsoy.js → task-assignee-avatar-ClZ-7JIA.js} +1 -1
  287. package/dist/client/assets/{task-board-L6ZGzY-s.js → task-board-M_qS1rzf.js} +1 -1
  288. package/dist/client/assets/{task-route-D7Tzzgt_.js → task-route-CWCfzbE3.js} +1 -1
  289. package/dist/client/assets/{task-status-FHJjKh4u.js → task-status-CC96IwX7.js} +1 -1
  290. package/dist/client/assets/{taskboard-analytics-kV8i_37N.js → taskboard-analytics-XMzxqkpx.js} +1 -1
  291. package/dist/client/assets/tasks-C8psxVdc.js +1 -0
  292. package/dist/client/assets/{tasks-3fvPlwxK.js → tasks-fO-z4dp1.js} +1 -1
  293. package/dist/client/assets/{textarea-BNvvIWSZ.js → textarea-D-MP0s12.js} +1 -1
  294. package/dist/client/assets/{thread-analytics-DOn_63z0.js → thread-analytics-DZ3xDtzM.js} +1 -1
  295. package/dist/client/assets/{thread-intent-DjvP3GsU.js → thread-intent-DSKhfvxP.js} +1 -1
  296. package/dist/client/assets/{thread-route-BOOkt7de.js → thread-route-D2HAbtZo.js} +1 -1
  297. package/dist/client/assets/{thread-route-B3uNqVbb.js → thread-route-DJFRjF24.js} +1 -1
  298. package/dist/client/assets/{thread-sheet-body-sjcfE700.js → thread-sheet-body-uGXl8WDp.js} +1 -1
  299. package/dist/client/assets/{time-range-picker-BostqQTB.js → time-range-picker-DE6cxBjq.js} +1 -1
  300. package/dist/client/assets/{toggle-group-BAFBdL9F.js → toggle-group-BUfjArPT.js} +1 -1
  301. package/dist/client/assets/{tool-namespace-CG1Oreso.js → tool-namespace-CGxHGKW_.js} +1 -1
  302. package/dist/client/assets/{toolbar-icon-button-CnXJyVJt.js → toolbar-icon-button-B1loXRWd.js} +1 -1
  303. package/dist/client/assets/{tooltip-D2ANqV2w.js → tooltip-CUsEGqy_.js} +1 -1
  304. package/dist/client/assets/{tooltipContext-DvKfbID4.js → tooltipContext-Bj1ILd8M.js} +1 -1
  305. package/dist/client/assets/{track-BA-6upge.js → track-CkX_aW1n.js} +1 -1
  306. package/dist/client/assets/{types-BNmsSext.js → types-D9PXVqqG.js} +1 -1
  307. package/dist/client/assets/{url-slug-DcB6_J0W.js → url-slug-B4ugcdZY.js} +1 -1
  308. package/dist/client/assets/{usage-stats-I2nqy87E.js → usage-stats-qowelp13.js} +1 -1
  309. package/dist/client/assets/{use-ai-providers-BcLfhqAn.js → use-ai-providers-BcdAb8qD.js} +1 -1
  310. package/dist/client/assets/{use-apply-named-rule-CdtINk0A.js → use-apply-named-rule-ByoZP5j7.js} +1 -1
  311. package/dist/client/assets/{use-automations-DX8SlLEI.js → use-automations-BVNZ6rjm.js} +1 -1
  312. package/dist/client/assets/{use-autosave-c4cGzjJa.js → use-autosave-ysdD2930.js} +1 -1
  313. package/dist/client/assets/{use-chat-layout-state-CyqukwDV.js → use-chat-layout-state-B5aaDvob.js} +1 -1
  314. package/dist/client/assets/{use-clock-tick-CXtcWsca.js → use-clock-tick-Cfukw61c.js} +1 -1
  315. package/dist/client/assets/{use-cms-publish-actions-BDOdjoX5.js → use-cms-publish-actions-DZ9irs8o.js} +1 -1
  316. package/dist/client/assets/{use-connect-companion-pjD5dMZl.js → use-connect-companion-BO5TLspT.js} +1 -1
  317. package/dist/client/assets/{use-connection-CZNQu-z2.js → use-connection-FqHna8PS.js} +1 -1
  318. package/dist/client/assets/{use-copy-Bq-mz0ld.js → use-copy-CXZDMarr.js} +1 -1
  319. package/dist/client/assets/{use-create-virtual-mcp-BVwiobb2.js → use-create-virtual-mcp-Dzh7EwRz.js} +1 -1
  320. package/dist/client/assets/{use-date-fns-locale-CLYhNSnw.js → use-date-fns-locale-DDFXCn-E.js} +1 -1
  321. package/dist/client/assets/{use-debounced-autosave-Cxe8yde_.js → use-debounced-autosave-DnB6ruCU.js} +1 -1
  322. package/dist/client/assets/{use-debounced-value-CqLWq6L2.js → use-debounced-value-QixculIP.js} +1 -1
  323. package/dist/client/assets/{use-deco-credits-C26dK60_.js → use-deco-credits-CvKHRGmx.js} +1 -1
  324. package/dist/client/assets/{use-decopilot-events-Dg011Qgn.js → use-decopilot-events-fL28TEHC.js} +1 -1
  325. package/dist/client/assets/{use-delete-connection-DzeFDNj4.js → use-delete-connection-DmHzYgl9.js} +1 -1
  326. package/dist/client/assets/{use-deployment-admin-COukxauw.js → use-deployment-admin-DIOIJKFZ.js} +1 -1
  327. package/dist/client/assets/{use-entitlements-Bxptpo8e.js → use-entitlements-BkqxE18N.js} +1 -1
  328. package/dist/client/assets/{use-fast-preview-draft-url-DWrGmO4E.js → use-fast-preview-draft-url-BRikkUIY.js} +1 -1
  329. package/dist/client/assets/{use-file-configs-DAoix9gu.js → use-file-configs-hWnpGnBU.js} +1 -1
  330. package/dist/client/assets/{use-inbox-feed-CEHyMhUC.js → use-inbox-feed-DIzfN-6Y.js} +1 -1
  331. package/dist/client/assets/{use-infinite-scroll-CojsIRJO.js → use-infinite-scroll-B2Dxfw4r.js} +1 -1
  332. package/dist/client/assets/{use-join-requests-GMVGPaSk.js → use-join-requests-D7tVSsO6.js} +1 -1
  333. package/dist/client/assets/{use-main-panel-tabs-DXx3VvH2.js → use-main-panel-tabs-Dtx52M7M.js} +1 -1
  334. package/dist/client/assets/{use-mcp-auth-status-CvV54_ol.js → use-mcp-auth-status-DT-19LwX.js} +1 -1
  335. package/dist/client/assets/{use-mcp-client-zIBQco5Q.js → use-mcp-client-DXdlNn5q.js} +1 -1
  336. package/dist/client/assets/{use-mcp-prompts-XayY9yfQ.js → use-mcp-prompts-ClNBkSao.js} +1 -1
  337. package/dist/client/assets/{use-mcp-tools-BmZF8fTN.js → use-mcp-tools-DgRM7NRr.js} +1 -1
  338. package/dist/client/assets/{use-mobile-CoPLJ8cu.js → use-mobile-BRzk8D-v.js} +1 -1
  339. package/dist/client/assets/{use-move-blocks-Ck5rS_vn.js → use-move-blocks-BwtieMWH.js} +1 -1
  340. package/dist/client/assets/{use-navigate-to-agent-DqWY18b4.js → use-navigate-to-agent-Mx6A78it.js} +1 -1
  341. package/dist/client/assets/{use-org-fs-B4wvUwJj.js → use-org-fs-DRPPAr_0.js} +1 -1
  342. package/dist/client/assets/{use-org-repo-syncs-D-0WnIj6.js → use-org-repo-syncs-zLVhA-m3.js} +1 -1
  343. package/dist/client/assets/{use-org-sso-sTi3oL5_.js → use-org-sso-CK8bP20u.js} +1 -1
  344. package/dist/client/assets/{use-organization-roles-DXXkhsvq.js → use-organization-roles-BFEFwfPv.js} +1 -1
  345. package/dist/client/assets/{use-organization-settings-D_5fr-OI.js → use-organization-settings-CHtyXny0.js} +1 -1
  346. package/dist/client/assets/{use-panel-navigate-nriEb2Qz.js → use-panel-navigate-BrmvjTvw.js} +1 -1
  347. package/dist/client/assets/{use-project-native-view-presence-Bdl4n5BM.js → use-project-native-view-presence-fZL342dS.js} +1 -1
  348. package/dist/client/assets/{use-project-scope-CdqclLu1.js → use-project-scope-5fuCx2a_.js} +1 -1
  349. package/dist/client/assets/{use-recent-apps-6oU0G5sy.js → use-recent-apps-DIC3oGRR.js} +1 -1
  350. package/dist/client/assets/{use-releases-CjPNvHz7.js → use-releases-DMLz_29m.js} +1 -1
  351. package/dist/client/assets/{use-reports-diagnostic-CbLn3JeW.js → use-reports-diagnostic-CDXaLKrf.js} +1 -1
  352. package/dist/client/assets/use-sandbox-events-CcwyGMD7.js +2 -0
  353. package/dist/client/assets/{use-secrets-DMgYR7J2.js → use-secrets-B0fPW93u.js} +1 -1
  354. package/dist/client/assets/{use-section-preview-base-CJSLbEeV.js → use-section-preview-base-BLJOom-F.js} +1 -1
  355. package/dist/client/assets/{use-session-runtime-HJpkQoy0.js → use-session-runtime-BIoEtecA.js} +1 -1
  356. package/dist/client/assets/{use-sidebar-collapsed-DGKLEITN.js → use-sidebar-collapsed-BToAgS1l.js} +1 -1
  357. package/dist/client/assets/{use-tags-C5S50qhF.js → use-tags-BBUfpZ3Q.js} +1 -1
  358. package/dist/client/assets/{use-task-board-analytics-BhLHNvA-.js → use-task-board-analytics-CP7ZTaMB.js} +1 -1
  359. package/dist/client/assets/{use-task-board-events-CWQQpnEy.js → use-task-board-events-CyzOoXYa.js} +1 -1
  360. package/dist/client/assets/{use-task-board-item-prs-a7ezuDRL.js → use-task-board-item-prs-xIRkPDuE.js} +1 -1
  361. package/dist/client/assets/{use-task-board-prompts-DonCfR5m.js → use-task-board-prompts-Hjgi7ATn.js} +1 -1
  362. package/dist/client/assets/{use-task-metadata-MAOPH7xT.js → use-task-metadata-DVialv3C.js} +1 -1
  363. package/dist/client/assets/{use-thread-analytics-B2fKyMxQ.js → use-thread-analytics-DKL46-sK.js} +1 -1
  364. package/dist/client/assets/{use-thread-outputs-vH0sJUqm.js → use-thread-outputs-CuLm_Mfb.js} +1 -1
  365. package/dist/client/assets/useInfiniteQuery-CrT95xA_.js +1 -0
  366. package/dist/client/assets/{useQueries-Qve4MUYw.js → useQueries-Ddak2P0w.js} +1 -1
  367. package/dist/client/assets/useSuspenseInfiniteQuery-Cy44049I.js +1 -0
  368. package/dist/client/assets/{users-DHtbHEKw.js → users-wgAbpnD0.js} +1 -1
  369. package/dist/client/assets/{utils-BoR7m7ir.js → utils-DdcTGJDK.js} +1 -1
  370. package/dist/client/assets/{variant-calendar-DSZCP6Sl.js → variant-calendar-DkBZGo-3.js} +1 -1
  371. package/dist/client/assets/{variant-matcher-override-Cvh79vYa.js → variant-matcher-override-D8SSg_Q7.js} +1 -1
  372. package/dist/client/assets/{view-header-DTW0kjf6.js → view-header-CAPGAS4q.js} +1 -1
  373. package/dist/client/assets/{virtual-mcp-RiqyMxQd.js → virtual-mcp-a8UorXJw.js} +1 -1
  374. package/dist/client/assets/{watch-sse-pool-6veZzsu7.js → watch-sse-pool-CH4G2Sl-.js} +1 -1
  375. package/dist/client/index.html +1 -1
  376. package/dist/server/server.js +41 -41
  377. package/package.json +1 -1
  378. package/dist/client/assets/UserSquare-BSsT3MHy.js +0 -1
  379. package/dist/client/assets/agent-app-B0uhmcWv.js +0 -1
  380. package/dist/client/assets/agent-deck-CACa1iZR.js +0 -1
  381. package/dist/client/assets/agent-experiments-TwOhraCy.js +0 -1
  382. package/dist/client/assets/agent-icon-nQ1AH9dU.js +0 -1
  383. package/dist/client/assets/agent-library-BvH-Q75b.js +0 -1
  384. package/dist/client/assets/agent-library-file-BC8zk1Dl.js +0 -1
  385. package/dist/client/assets/agent-monitor-UYQNblqG.js +0 -1
  386. package/dist/client/assets/agent-settings-Lu1EqGNe.js +0 -1
  387. package/dist/client/assets/agent-site-editor-code-BAyfkSPu.js +0 -2
  388. package/dist/client/assets/agent-site-editor-content-CKgCOX3-.js +0 -1
  389. package/dist/client/assets/agent-site-editor-preview-B9oFLAt2.js +0 -1
  390. package/dist/client/assets/agent-view-D-sscasX.js +0 -1
  391. package/dist/client/assets/api-keys-D_tuzPJP.js +0 -1
  392. package/dist/client/assets/app-editor-hRLD7Ehq.js +0 -1
  393. package/dist/client/assets/blocks-tab-states-DhR3pyff.js +0 -1
  394. package/dist/client/assets/content-tab-DkKuIDyy.js +0 -22
  395. package/dist/client/assets/context-C2r290S4.js +0 -1
  396. package/dist/client/assets/github-repo-scope-ByTYKy_L.js +0 -1
  397. package/dist/client/assets/library-CS74d8fl.js +0 -1
  398. package/dist/client/assets/parse-sections-BVn3AvAz.js +0 -1
  399. package/dist/client/assets/project-reports-uzkOMqSE.js +0 -1
  400. package/dist/client/assets/project-tasks-jNTlksUk.js +0 -1
  401. package/dist/client/assets/record-editor-B5oAS_5D.js +0 -1
  402. package/dist/client/assets/redirect-editor-CSg_SJ3I.js +0 -1
  403. package/dist/client/assets/reports-CL4pYm69.js +0 -1
  404. package/dist/client/assets/repositories-C-WO-gxz.js +0 -1
  405. package/dist/client/assets/review-settings-CsHCgNLm.js +0 -1
  406. package/dist/client/assets/route-BlJ-TDEK.js +0 -1
  407. package/dist/client/assets/sections-editor-B628EbZ4.js +0 -1
  408. package/dist/client/assets/settings-tab-Cj4D3Abl.js +0 -1
  409. package/dist/client/assets/site-editor-8rMP2pUf.js +0 -1
  410. package/dist/client/assets/tasks-BImUOCfZ.js +0 -1
  411. package/dist/client/assets/use-sandbox-events-C3mgE5Ut.js +0 -2
  412. package/dist/client/assets/useInfiniteQuery-CFafSHXd.js +0 -1
  413. package/dist/client/assets/useSuspenseInfiniteQuery-D_oVQ9bL.js +0 -1
@@ -1,2 +1,2 @@
1
- import{c as Se,b as ve,r as f,j as s,I as Je,h as fe,x as It,aY as Gt,w as Vt,B as Ce,y as Bt,v as qt,D as Ht,aM as Wt,aN as Qt,aO as Ut,aP as Yt,bm as Xt,aQ as Jt,aR as Zt,aS as _t,l as xe,ax as en,q as tn,t as ee,K as Ze}from"./index-BWpKrclg.js";import{l as nn,M as rn,bO as sn,bP as ln}from"./agent-icon-nQ1AH9dU.js";import{s as on}from"./XClose-BjZnEBvF.js";import{S as an}from"./scroll-area-CwuazZb5.js";import{c as _e,T as et,a as tt}from"./tooltip-D2ANqV2w.js";import{b as cn}from"./chat-context-kqrW-XPR.js";import{F as dn}from"./editor-BqqnxL88.js";import{a as fn}from"./shell-layout-BbFvnpcf.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{s as nt,f as un}from"./sandbox-git-api-DcqI6XE4.js";import{f as mn,C as de,d as rt,g as xn,e as pn}from"./context-menu-CiH3Gj0R.js";import{t as hn}from"./ChevronUp-xR4eZngE.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as yn,E as bn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Oe,o as En,s as Cn,v as Sn,p as Ae,q as Ee,r as ze,u as vn,w as Fn,x as Tn,y as kn}from"./utils-BoR7m7ir.js";import"./AlertCircle-RV4AM_8y.js";import"./Tool01-CHLDtlIL.js";import"./ArrowUp-DpQ-09y4.js";import"./ArrowLeft-XO66B9Td.js";import"./LinkBroken01-z_Mm0CSf.js";import"./ShoppingBag01-BhoOjVkp.js";import"./ZoomOut-CBOWQYet.js";import"./Building02-NRzC_IEp.js";import"./CheckCircle-CfYD_Bi6.js";import"./ChevronSelectorVertical-C5MARPJN.js";import"./UserSquare-BSsT3MHy.js";import"./Copy01-Dy1KrWO0.js";import"./CreditCard01-DVN26JVZ.js";import"./DotsVertical-CncVW4wJ.js";import"./Image01-CaawlkVR.js";import"./Globe04-BxFc3HLH.js";import"./SwitchHorizontal01-Ce37vA9c.js";import"./Key01-FaGRi3tG.js";import"./Link01-B_YWUHoH.js";import"./Minus-yAYwM_Ty.js";import"./Monitor01-Bl7f7T5L.js";import"./Sun-CZRF_565.js";import"./Play-OByKGnTy.js";import"./Plus-Ccck99Do.js";import"./SearchMd-BAGHgvYw.js";import"./Trash01-BQBP0tUM.js";import"./Upload01-D_q00M49.js";import"./Users01-C6bE7RDt.js";import"./Zap-CHuT8W6R.js";import"./index-BdQq_4o_.js";import"./index-lchr3O79.js";import"./use-panel-navigate-nriEb2Qz.js";import"./thread-route-BOOkt7de.js";import"./use-project-scope-CdqclLu1.js";import"./repository-binding-Bpq6heaQ.js";import"./use-mcp-client-zIBQco5Q.js";import"./auth-CK6AyRu5.js";import"./autosend-DTWIjCgK.js";import"./thread-intent-DjvP3GsU.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-6veZzsu7.js";import"./task-board-L6ZGzY-s.js";import"./schema-DzZBw0EW.js";import"./slugify-CEUa2lfQ.js";import"./use-entitlements-Bxptpo8e.js";import"./use-ai-providers-BcLfhqAn.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-Dg011Qgn.js";import"./use-organization-settings-D_5fr-OI.js";import"./use-deployment-admin-COukxauw.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-CXtcWsca.js";import"./command-De9pJLwH.js";import"./index-C-GH7ZUH.js";import"./integration-icon-BQ9jVlvt.js";import"./project-icon-BKeF243f.js";import"./new-project-dialog-Dd5pVssc.js";import"./label-DzRNwB_s.js";import"./repository-import-picker-DxJJpcCz.js";import"./use-navigate-to-agent-DqWY18b4.js";import"./repository-picker-P8Asvsk4.js";import"./github-icon-DAxkwypb.js";import"./useInfiniteQuery-CFafSHXd.js";import"./infiniteQueryObserver-CbIPWgZj.js";import"./collection-search-B3vfcK1n.js";import"./use-debounced-value-CqLWq6L2.js";import"./required-auth-layout-DYZU5vk_.js";import"./use-org-sso-sTi3oL5_.js";const Rn={"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 Ln(O){const e=Se.c(71),{open:m,mode:Y,initialName:b,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=O,A=b===void 0?"":b,x=L===void 0?!1:L,a=ve(),[o,P]=f.useState(A),[X,M]=f.useState(m),p=Rn[Y];m!==X&&(M(m),m&&P(A));let c;e[0]!==x||e[1]!==w?(c=U=>{!U&&!x&&w(!1)},e[0]=x,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==x||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||x||await d(te)},e[3]=x,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==p.titleKey||e[8]!==a?(S=a(p.titleKey),e[7]=p.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(It,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==p.descriptionKey||e[13]!==a?(D=a(p.descriptionKey),e[12]=p.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(Gt,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(Vt,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(Je,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let y;e[23]!==a?(y=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=y):y=e[24];let T;e[25]!==y?(T=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:y}),e[25]=y,e[26]=T):T=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==p.placeholderKey||e[29]!==a?($=a(p.placeholderKey),e[28]=p.placeholderKey,e[29]=a,e[30]=$):$=e[30];let J;e[31]!==x||e[32]!==o||e[33]!==$?(J=s.jsx(Je,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:x}),e[31]=x,e[32]=o,e[33]=$,e[34]=J):J=e[34];let Z;e[35]!==T||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[T,J]}),e[35]=T,e[36]=J,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let k;e[43]!==a?(k=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=k):k=e[44];let W;e[45]!==x||e[46]!==I||e[47]!==k?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:x,children:k}),e[45]=x,e[46]=I,e[47]=k,e[48]=W):W=e[48];let K;e[49]!==x||e[50]!==o?(K=!o.trim()||x,e[49]=x,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==p.submitKey||e[53]!==x||e[54]!==a?(Q=x?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(p.submitKey),e[52]=p.submitKey,e[53]=x,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(Bt,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let V;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(V=s.jsx(qt,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=V):V=e[66];let B;return e[67]!==C||e[68]!==m||e[69]!==V?(B=s.jsx(Ht,{open:m,onOpenChange:C,children:V}),e[67]=C,e[68]=m,e[69]=V,e[70]=B):B=e[70],B}function Pn(O){const e=Se.c(47),{deleteTarget:m,deleteDirtyPaths:Y,fsActionPending:b,onOpenChange:N,onConfirm:L}=O,d=ve(),w=m?.kind==="directory",A=m!==null,x=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==x?(a=d(x),e[0]=d,e[1]=x,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(Wt,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const X=m?.name;let M;e[7]!==X?(M=s.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=M):M=e[8];let p;e[9]!==w||e[10]!==d?(p=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=p):p=e[11];let c;e[12]!==Y.length||e[13]!==d?(c=Y.length>0&&s.jsxs(s.Fragment,{children:[" ",Y.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:Y.length})]}),e[12]=Y.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==p||e[18]!==c?(C=s.jsxs(Qt,{children:[P," ",M,p,c]}),e[15]=P,e[16]=M,e[17]=p,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(Ut,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==b||e[26]!==R?(S=s.jsx(Yt,{disabled:b,children:R}),e[25]=b,e[26]=R,e[27]=S):S=e[27];const v=b||!m;let D;e[28]!==m||e[29]!==L?(D=H=>{H.preventDefault(),m&&L(m)},e[28]=m,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(Xt,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(Jt,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let y;e[40]!==z||e[41]!==E?(y=s.jsxs(Zt,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=y):y=e[42];let T;return e[43]!==N||e[44]!==A||e[45]!==y?(T=s.jsx(_t,{open:A,onOpenChange:N,children:y}),e[43]=N,e[44]=A,e[45]=y,e[46]=T):T=e[46],T}const Mn="#d9a441";function Kn(O){const e=Se.c(63),{node:m,depth:Y,isExpanded:b,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:A,onNewFile:x,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:X,onDelete:M}=O,p=L===void 0?!1:L,c=ve(),C=m.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=xe("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-sm hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${Y*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==A?(g=()=>{A(),w()},e[4]=w,e[5]=A,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==b||e[11]!==p?(E=C?s.jsxs(s.Fragment,{children:[p?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):b?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(en,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(nn,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=b,e[11]=p,e[12]=E):E=e[12];let y;e[13]!==m.name?(y=s.jsx("span",{className:"truncate",children:m.name}),e[13]=m.name,e[14]=y):y=e[14];let T;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==y?(T=s.jsx(mn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,y]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=y,e[20]=T):T=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==x||e[24]!==H?($=s.jsx(de,{onSelect:x,children:H}),e[23]=x,e[24]=H,e[25]=$):$=e[25];let J;e[26]!==c?(J=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=J):J=e[27];let Z;e[28]!==a||e[29]!==J?(Z=s.jsx(de,{onSelect:a,children:J}),e[28]=a,e[29]=J,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let k;e[34]!==o||e[35]!==I?(k=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=k):k=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=s.jsx(de,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let V;e[48]!==c?(V=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=V):V=e[49];let B;e[50]!==M||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:M,children:V}),e[50]=M,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==k||e[56]!==K||e[57]!==F||e[58]!==B?(U=s.jsxs(xn,{className:"w-52",children:[$,Z,_,k,K,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=k,e[56]=K,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==T?(te=s.jsxs(pn,{children:[T,U]}),e[60]=U,e[61]=T,e[62]=te):te=e[62],te}const st=200,On=2,An=250,it=200;function zn(O,e){return gn(O,e)}function $n(O){const e=Se.c(9),{text:m,query:Y}=O;let b,N,L;if(e[0]!==Y||e[1]!==m){const{leadingEllipsis:w,segments:A}=En(m,Y);b="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=A.map(In),e[0]=Y,e[1]=m,e[2]=b,e[3]=N,e[4]=L}else b=e[2],N=e[3],L=e[4];let d;return e[5]!==b||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:b,children:[N,L]}),e[5]=b,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(O,e){return O.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:O.text},e):s.jsx("span",{children:O.text},e)}function hs({orgSlug:O,virtualMcpId:e,branch:m,threadId:Y,openPath:b}){const N={orgSlug:O,virtualMcpId:e,branch:m,threadId:Y},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:A}=L,[x,a]=f.useState(new Set),[o,P]=f.useState(null),[X,M]=f.useState(null),[p,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,y]=f.useState(!1),[T,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),k=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),V=f.useRef(null),B=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,pe]=f.useState(null),{sendMessage:lt}=cn(),{openSidePanel:ot}=fn(),he=tn(),[q,re]=f.useState(null),[Te,ke]=f.useState(null),[ge,ye]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function be(){he.invalidateQueries({queryKey:nt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=Tn(t);if(!n)return;const r=`${O}/${e}/${m}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(O,e,m)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return p.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await be(),re(null),me(r)}async function mt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await be(),re(null),a(l=>{const u=new Set(l);for(const le of Oe(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function xt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await be(),re(null)}async function pt(t,n){ye(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await be(),ke(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}ye(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await mt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await xt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,yt]=f.useState(null),h=ve();if(b&&b!==gt){yt(b);const t=b;queueMicrotask(()=>{yn(t)&&me(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,r){if(r!==k.current)return!1;let i=!1;return d(l=>{const u=n?kn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function bt(t){const n=Q.current.get(t);if(n)return n;const r=k.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===k.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Be(t){if(!Ae(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await bt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Oe(n)){if(!Ae(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++k.current;V.current=null,B.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:bn});Ve(n,!1,t),J(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),y(!1)}async function Nt(){const t=k.current,n=V.current;if(n&&n.generation===t)return n.files;const r=B.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return k.current===t&&(V.current={generation:t,files:l.files}),l.files})();B.current={generation:t,promise:i};try{return await i}finally{B.current?.generation===t&&(B.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),y((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),y(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<On?(D(null),g(!1),y(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},An)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;me(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:nt(N)});try{const r=await un(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function Tt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),pe(null),p.includes(t)||c(n=>[...n,t]),qe(t)}function kt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Ae(t,K.current))try{if(await Be(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Oe(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),Tt(t)}function me(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return X?.kind==="directory"?X.path:X?.kind==="file"?De(X.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,A),Ue=jn(Kt,x),Le=R?.length??0,Ye=Nn(v??[]),Xe=v?.length??0,ce=o?oe.get(o):null,Ot=ce?.loaded&&ce.editorValue!==ce.savedContent,At=Te?dt(Te.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);pe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
1
+ import{c as Se,b as ve,r as f,j as s,I as Je,h as fe,x as It,aY as Gt,w as Vt,B as Ce,y as Bt,v as qt,D as Ht,aM as Wt,aN as Qt,aO as Ut,aP as Yt,bm as Xt,aQ as Jt,aR as Zt,aS as _t,l as xe,ax as en,q as tn,t as ee,K as Ze}from"./index-WgfN4QVP.js";import{l as nn,M as rn,bO as sn,bP as ln}from"./agent-icon-D-0GvNzG.js";import{s as on}from"./XClose-DsiXpG7_.js";import{S as an}from"./scroll-area-CiASyTMh.js";import{c as _e,T as et,a as tt}from"./tooltip-CUsEGqy_.js";import{b as cn}from"./chat-context-0CZgd-Gr.js";import{F as dn}from"./editor-C97Kf5Du.js";import{a as fn}from"./shell-layout-pSWumg64.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{s as nt,f as un}from"./sandbox-git-api-DcqI6XE4.js";import{f as mn,C as de,d as rt,g as xn,e as pn}from"./context-menu-BVx2zw6F.js";import{t as hn}from"./ChevronUp-CNyARDGk.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as yn,E as bn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Oe,o as En,s as Cn,v as Sn,p as Ae,q as Ee,r as ze,u as vn,w as Fn,x as Tn,y as kn}from"./utils-DdcTGJDK.js";import"./AlertCircle-BjT7_GFq.js";import"./Tool01-DwTqd_Nj.js";import"./ArrowUp-At9MqVhB.js";import"./ArrowLeft-Par1IdOs.js";import"./LinkBroken01-CdMsJVgm.js";import"./ShoppingBag01-d7aE6vty.js";import"./ZoomOut-ZB7MeGmK.js";import"./Building02-BV_I3UuJ.js";import"./CheckCircle-D6xmTIXf.js";import"./ChevronSelectorVertical-CeHSyaSD.js";import"./UserSquare-D1neGXtF.js";import"./Copy01-DisW4JMo.js";import"./CreditCard01-QvSfBZzn.js";import"./DotsVertical-wJ46YU2V.js";import"./Image01-CO8HhoHi.js";import"./Globe04-DK5qhUMj.js";import"./SwitchHorizontal01-7qdaOYVu.js";import"./Key01-BDwjIsdK.js";import"./Link01-BHgTruNE.js";import"./Minus-CJDvXjFo.js";import"./Monitor01-B3thg2Rr.js";import"./Sun-wY_Z9VGm.js";import"./Play-BhU5Ns8x.js";import"./Plus-BaWg3Fda.js";import"./SearchMd-B541ufOQ.js";import"./Trash01-B5_r6iLm.js";import"./Upload01-BP49pNql.js";import"./Users01-CrLtxwQA.js";import"./Zap-BB-vOERw.js";import"./index-BdQq_4o_.js";import"./index-CzKs4Djn.js";import"./use-panel-navigate-BrmvjTvw.js";import"./thread-route-D2HAbtZo.js";import"./use-project-scope-5fuCx2a_.js";import"./repository-binding-DF6YCWsj.js";import"./use-mcp-client-DXdlNn5q.js";import"./auth-BZPkjT4-.js";import"./autosend-Ci815qQG.js";import"./thread-intent-DSKhfvxP.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CH4G2Sl-.js";import"./task-board-M_qS1rzf.js";import"./schema-BUPJBVf-.js";import"./slugify-CEUa2lfQ.js";import"./use-entitlements-BkqxE18N.js";import"./use-ai-providers-BcdAb8qD.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-fL28TEHC.js";import"./use-organization-settings-CHtyXny0.js";import"./use-deployment-admin-DIOIJKFZ.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-Cfukw61c.js";import"./command-DELHBruW.js";import"./index-DJkEjMHv.js";import"./integration-icon-UvPKDtTh.js";import"./project-icon-BIzg7YUA.js";import"./new-project-dialog-DePwIx8r.js";import"./label-Dxzmqh4L.js";import"./repository-import-picker-bneKFCuv.js";import"./use-navigate-to-agent-Mx6A78it.js";import"./repository-picker-CGoSX3oi.js";import"./github-icon-BAVg06aG.js";import"./useInfiniteQuery-CrT95xA_.js";import"./infiniteQueryObserver-AJwWz1b5.js";import"./collection-search-Dg61rOFc.js";import"./use-debounced-value-QixculIP.js";import"./required-auth-layout-BLLWaY3S.js";import"./use-org-sso-CK8bP20u.js";const Rn={"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 Ln(O){const e=Se.c(71),{open:m,mode:Y,initialName:b,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=O,A=b===void 0?"":b,x=L===void 0?!1:L,a=ve(),[o,P]=f.useState(A),[X,M]=f.useState(m),p=Rn[Y];m!==X&&(M(m),m&&P(A));let c;e[0]!==x||e[1]!==w?(c=U=>{!U&&!x&&w(!1)},e[0]=x,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==x||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||x||await d(te)},e[3]=x,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==p.titleKey||e[8]!==a?(S=a(p.titleKey),e[7]=p.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(It,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==p.descriptionKey||e[13]!==a?(D=a(p.descriptionKey),e[12]=p.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(Gt,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(Vt,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(Je,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let y;e[23]!==a?(y=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=y):y=e[24];let T;e[25]!==y?(T=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:y}),e[25]=y,e[26]=T):T=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==p.placeholderKey||e[29]!==a?($=a(p.placeholderKey),e[28]=p.placeholderKey,e[29]=a,e[30]=$):$=e[30];let J;e[31]!==x||e[32]!==o||e[33]!==$?(J=s.jsx(Je,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:x}),e[31]=x,e[32]=o,e[33]=$,e[34]=J):J=e[34];let Z;e[35]!==T||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[T,J]}),e[35]=T,e[36]=J,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let k;e[43]!==a?(k=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=k):k=e[44];let W;e[45]!==x||e[46]!==I||e[47]!==k?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:x,children:k}),e[45]=x,e[46]=I,e[47]=k,e[48]=W):W=e[48];let K;e[49]!==x||e[50]!==o?(K=!o.trim()||x,e[49]=x,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==p.submitKey||e[53]!==x||e[54]!==a?(Q=x?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(p.submitKey),e[52]=p.submitKey,e[53]=x,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(Bt,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let V;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(V=s.jsx(qt,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=V):V=e[66];let B;return e[67]!==C||e[68]!==m||e[69]!==V?(B=s.jsx(Ht,{open:m,onOpenChange:C,children:V}),e[67]=C,e[68]=m,e[69]=V,e[70]=B):B=e[70],B}function Pn(O){const e=Se.c(47),{deleteTarget:m,deleteDirtyPaths:Y,fsActionPending:b,onOpenChange:N,onConfirm:L}=O,d=ve(),w=m?.kind==="directory",A=m!==null,x=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==x?(a=d(x),e[0]=d,e[1]=x,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(Wt,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const X=m?.name;let M;e[7]!==X?(M=s.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=M):M=e[8];let p;e[9]!==w||e[10]!==d?(p=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=p):p=e[11];let c;e[12]!==Y.length||e[13]!==d?(c=Y.length>0&&s.jsxs(s.Fragment,{children:[" ",Y.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:Y.length})]}),e[12]=Y.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==p||e[18]!==c?(C=s.jsxs(Qt,{children:[P," ",M,p,c]}),e[15]=P,e[16]=M,e[17]=p,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(Ut,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==b||e[26]!==R?(S=s.jsx(Yt,{disabled:b,children:R}),e[25]=b,e[26]=R,e[27]=S):S=e[27];const v=b||!m;let D;e[28]!==m||e[29]!==L?(D=H=>{H.preventDefault(),m&&L(m)},e[28]=m,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(Xt,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(Jt,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let y;e[40]!==z||e[41]!==E?(y=s.jsxs(Zt,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=y):y=e[42];let T;return e[43]!==N||e[44]!==A||e[45]!==y?(T=s.jsx(_t,{open:A,onOpenChange:N,children:y}),e[43]=N,e[44]=A,e[45]=y,e[46]=T):T=e[46],T}const Mn="#d9a441";function Kn(O){const e=Se.c(63),{node:m,depth:Y,isExpanded:b,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:A,onNewFile:x,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:X,onDelete:M}=O,p=L===void 0?!1:L,c=ve(),C=m.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=xe("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-sm hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${Y*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==A?(g=()=>{A(),w()},e[4]=w,e[5]=A,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==b||e[11]!==p?(E=C?s.jsxs(s.Fragment,{children:[p?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):b?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(en,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(nn,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=b,e[11]=p,e[12]=E):E=e[12];let y;e[13]!==m.name?(y=s.jsx("span",{className:"truncate",children:m.name}),e[13]=m.name,e[14]=y):y=e[14];let T;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==y?(T=s.jsx(mn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,y]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=y,e[20]=T):T=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==x||e[24]!==H?($=s.jsx(de,{onSelect:x,children:H}),e[23]=x,e[24]=H,e[25]=$):$=e[25];let J;e[26]!==c?(J=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=J):J=e[27];let Z;e[28]!==a||e[29]!==J?(Z=s.jsx(de,{onSelect:a,children:J}),e[28]=a,e[29]=J,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let k;e[34]!==o||e[35]!==I?(k=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=k):k=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=s.jsx(de,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let V;e[48]!==c?(V=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=V):V=e[49];let B;e[50]!==M||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:M,children:V}),e[50]=M,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==k||e[56]!==K||e[57]!==F||e[58]!==B?(U=s.jsxs(xn,{className:"w-52",children:[$,Z,_,k,K,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=k,e[56]=K,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==T?(te=s.jsxs(pn,{children:[T,U]}),e[60]=U,e[61]=T,e[62]=te):te=e[62],te}const st=200,On=2,An=250,it=200;function zn(O,e){return gn(O,e)}function $n(O){const e=Se.c(9),{text:m,query:Y}=O;let b,N,L;if(e[0]!==Y||e[1]!==m){const{leadingEllipsis:w,segments:A}=En(m,Y);b="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=A.map(In),e[0]=Y,e[1]=m,e[2]=b,e[3]=N,e[4]=L}else b=e[2],N=e[3],L=e[4];let d;return e[5]!==b||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:b,children:[N,L]}),e[5]=b,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(O,e){return O.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:O.text},e):s.jsx("span",{children:O.text},e)}function hs({orgSlug:O,virtualMcpId:e,branch:m,threadId:Y,openPath:b}){const N={orgSlug:O,virtualMcpId:e,branch:m,threadId:Y},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:A}=L,[x,a]=f.useState(new Set),[o,P]=f.useState(null),[X,M]=f.useState(null),[p,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,y]=f.useState(!1),[T,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),k=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),V=f.useRef(null),B=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,pe]=f.useState(null),{sendMessage:lt}=cn(),{openSidePanel:ot}=fn(),he=tn(),[q,re]=f.useState(null),[Te,ke]=f.useState(null),[ge,ye]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function be(){he.invalidateQueries({queryKey:nt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=Tn(t);if(!n)return;const r=`${O}/${e}/${m}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(O,e,m)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return p.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await be(),re(null),me(r)}async function mt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await be(),re(null),a(l=>{const u=new Set(l);for(const le of Oe(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function xt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await be(),re(null)}async function pt(t,n){ye(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await be(),ke(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}ye(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await mt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await xt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,yt]=f.useState(null),h=ve();if(b&&b!==gt){yt(b);const t=b;queueMicrotask(()=>{yn(t)&&me(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,r){if(r!==k.current)return!1;let i=!1;return d(l=>{const u=n?kn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function bt(t){const n=Q.current.get(t);if(n)return n;const r=k.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===k.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Be(t){if(!Ae(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await bt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Oe(n)){if(!Ae(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++k.current;V.current=null,B.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:bn});Ve(n,!1,t),J(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),y(!1)}async function Nt(){const t=k.current,n=V.current;if(n&&n.generation===t)return n.files;const r=B.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return k.current===t&&(V.current={generation:t,files:l.files}),l.files})();B.current={generation:t,promise:i};try{return await i}finally{B.current?.generation===t&&(B.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),y((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),y(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<On?(D(null),g(!1),y(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},An)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;me(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:nt(N)});try{const r=await un(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function Tt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),pe(null),p.includes(t)||c(n=>[...n,t]),qe(t)}function kt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Ae(t,K.current))try{if(await Be(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Oe(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),Tt(t)}function me(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return X?.kind==="directory"?X.path:X?.kind==="file"?De(X.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,A),Ue=jn(Kt,x),Le=R?.length??0,Ye=Nn(v??[]),Xe=v?.length??0,ce=o?oe.get(o):null,Ot=ce?.loaded&&ce.editorValue!==ce.savedContent,At=Te?dt(Te.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);pe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
2
2
  `)}]}),pe(null)}return T&&!$?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[s.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[s.jsxs("div",{className:"relative min-w-0 flex-1",children:[s.jsx(rn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",value:C,onChange:t=>St(t.target.value),placeholder:h("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":h("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs placeholder:text-muted-foreground focus-ring"})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(sn,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFile")})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(ln,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(an,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[!C&&Ue.map(t=>{const{node:n,depth:r}=t,i=n.kind==="directory",l=x.has(n.path),u=X?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Kn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Me(n.name),onSelect:()=>M(n),onOpen:()=>{i?Lt(n.path,l):me(n.path)},onNewFile:()=>re({mode:"new-file",node:n,parentDir:le}),onNewFolder:()=>re({mode:"new-folder",node:n,parentDir:le}),onCopyPath:()=>$e(h,"Path",Ne(n.path)),onCopyRelativePath:()=>$e(h,"Relative path",ne(n.path)),onRename:()=>re({mode:"rename",node:n,parentDir:le}),onDelete:()=>ke(n)},n.path)}),!C&&$&&Ue.length===0&&s.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFilesFound")}),C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.files")}),Le>0&&s.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=it?"+":""]})]}),R!==null&&R.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFileNamesMatch")}),R?.map(t=>{const n=t.split("/").pop()??t,r=De(t),{Icon:i,color:l}=Me(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:xe("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",u&&"bg-accent"),children:[s.jsx(i,{size:14,className:xe("shrink-0",l)}),s.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),r!=="/"&&s.jsx("span",{className:"truncate text-muted-foreground/60",children:r})]},t)})]}),C&&s.jsxs("div",{className:"mt-1 border-t pt-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Xe>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Ye.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Me(n);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[s.jsx(r,{size:14,className:xe("shrink-0",i)}),s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(l=>s.jsxs("button",{type:"button",onClick:()=>vt(l),title:`${t.path}:${l.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[s.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:l.line}),s.jsx($n,{text:l.text,query:C})]},`${t.path}:${l.line}`))]},t.path)})]})]})})]}),s.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[p.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:p.map(t=>{const n=oe.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,i=o===t,l=t.split("/").pop()??t;return s.jsxs("div",{className:xe("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",i?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{P(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":i,children:[s.jsx("span",{className:"truncate max-w-32",children:l}),r&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),s.jsx("button",{type:"button",className:"ml-1 p-0.5 hover:bg-accent-foreground/10 rounded-lg",onClick:u=>{u.stopPropagation(),kt(t)},children:s.jsx(on,{size:12})})]},t)})}),se&&s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:s.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&$t(r.value)},children:[s.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:h("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"&&pe(null)}}),s.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity",title:h("sandbox.fileExplorer.send"),children:s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[s.jsx("title",{children:h("sandbox.fileExplorer.send")}),s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:o&&ce?.loaded?s.jsx(dn,{language:Ke(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ce.editorValue,path:o,onChange:t=>{const n=o;n&&ae(r=>{const i=new Map(r),l=i.get(n);return l&&i.set(n,{...l,editorValue:t??""}),i})},onMount:zt,loading:s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 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}}},o):o&&!ce?.loaded?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:h("sandbox.fileExplorer.selectFileToEdit")})}),o&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-2xs text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(Ot?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(o)]})]})]}),s.jsx(Ln,{open:q!==null,mode:q?.mode??"new-file",initialName:q?.mode==="rename"?q.node.name:"",parentLabel:q&&q.mode!=="rename"?q.parentDir==="/"?"/":ne(q.parentDir):void 0,isPending:ge,onSubmit:t=>ht(h,t),onOpenChange:t=>{!t&&!ge&&re(null)}}),s.jsx(Pn,{deleteTarget:Te,deleteDirtyPaths:At,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&ke(null)},onConfirm:t=>{pt(h,t)}})]})}export{hs as FileExplorer};
@@ -1 +1 @@
1
- import{c as x,H as g,j as s,h as v,bB as w,B as y}from"./index-BWpKrclg.js";import{n as N}from"./ZoomOut-CBOWQYet.js";import{h as b}from"./use-org-fs-B4wvUwJj.js";import{g as S}from"./utils-BoR7m7ir.js";import{F as _}from"./editor-BqqnxL88.js";import{F as k}from"./file-type-icon-BgzyV542.js";import{M as z}from"./markdown-CkZaCBow.js";function U(n){const e=x.c(11),{value:l,filename:r}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=S(r),e[0]=r,e[1]=o):o=e[1];const f=c?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(v,{className:"size-5 text-muted-foreground"})}),e[2]=a):a=e[2];let i,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={enabled:!1},d={top:12,bottom:12},e[3]=i,e[4]=d):(i=e[3],d=e[4]);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:i,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=m):m=e[5];let u;return e[6]!==r||e[7]!==o||e[8]!==f||e[9]!==l?(u=s.jsx(_,{path:r,language:o,value:l,theme:f,loading:a,options:m},r),e[6]=r,e[7]=o,e[8]=f,e[9]=l,e[10]=u):u=e[10],u}function E(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const F=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),T=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),h=2*1024*1024;function $(n,e){const l=n.split(".").pop()?.toLowerCase()??"";return F.has(l)?"image":l==="pdf"?"pdf":l==="html"||l==="htm"?"html":l==="md"||l==="markdown"?e<=h?"markdown":"download":T.has(l)&&e<=h?"text":"download"}function B(){const n=x.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let l;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(w,{className:"h-3 w-full"}),s.jsx(w,{className:"h-3 w-5/6"}),s.jsx(w,{className:"h-3 w-2/3"})]})]})}),n[1]=l):l=n[1],l}function j(n){const e=x.c(20),{file:l,note:r}=n;let t;e[0]!==l.filename?(t=s.jsx(k,{filename:l.filename,className:"h-12 w-10"}),e[0]=l.filename,e[1]=t):t=e[1];let c;e[2]!==l.filename?(c=s.jsx("span",{className:"text-sm font-medium text-foreground",children:l.filename}),e[2]=l.filename,e[3]=c):c=e[3];let o;e[4]!==l.size?(o=E(l.size),e[4]=l.size,e[5]=o):o=e[5];const f=r?` · ${r}`:"";let a;e[6]!==o||e[7]!==f?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,f]}),e[6]=o,e[7]=f,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==a?(i=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=i):i=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(N,{size:14}),e[12]=d):d=e[12];let m;e[13]!==l.downloadUrl||e[14]!==l.filename?(m=s.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:l.downloadUrl,download:l.filename,children:[d,"Download"]})}),e[13]=l.downloadUrl,e[14]=l.filename,e[15]=m):m=e[15];let u;return e[16]!==t||e[17]!==i||e[18]!==m?(u=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 surface-inset px-10 py-8",children:[t,i,m]})}),e[16]=t,e[17]=i,e[18]=m,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:r}=n,{data:t,isPending:c,isError:o}=b(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(B,{}),e[0]=a):a=e[0],a}if(o||!t){let a;return e[1]!==l?(a=s.jsx(j,{file:l,note:"preview unavailable"}),e[1]=l,e[2]=a):a=e[2],a}if(r){const a=`file-preview-${l.key}`;let i;return e[3]!==t||e[4]!==a?(i=s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:s.jsx(z,{id:a,text:t})})}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}let f;return e[6]!==t||e[7]!==l.filename?(f=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=f):f=e[8],f}function I(n){const e=x.c(15),{file:l}=n;switch($(l.filename,l.size)){case"image":{let t;return e[0]!==l.downloadUrl||e[1]!==l.filename?(t=s.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:s.jsx("img",{src:l.downloadUrl,alt:l.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=l.downloadUrl,e[1]=l.filename,e[2]=t):t=e[2],t}case"pdf":{let t;return e[3]!==l.downloadUrl||e[4]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-same-origin allow-downloads",className:"block h-full w-full bg-white"}),e[3]=l.downloadUrl,e[4]=l.filename,e[5]=t):t=e[5],t}case"html":{let t;return e[6]!==l.downloadUrl||e[7]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=t):t=e[8],t}case"markdown":{let t;return e[9]!==l?(t=s.jsx(p,{file:l,markdown:!0}),e[9]=l,e[10]=t):t=e[10],t}case"text":{let t;return e[11]!==l?(t=s.jsx(p,{file:l,markdown:!1}),e[11]=l,e[12]=t):t=e[12],t}default:{let t;return e[13]!==l?(t=s.jsx(j,{file:l}),e[13]=l,e[14]=t):t=e[14],t}}}export{I as F,B as a,E as f};
1
+ import{c as x,H as g,j as s,h as v,bB as w,B as y}from"./index-WgfN4QVP.js";import{n as N}from"./ZoomOut-ZB7MeGmK.js";import{h as b}from"./use-org-fs-DRPPAr_0.js";import{g as S}from"./utils-DdcTGJDK.js";import{F as _}from"./editor-C97Kf5Du.js";import{F as k}from"./file-type-icon-BzoA5jiZ.js";import{M as z}from"./markdown-NHGOJDhi.js";function U(n){const e=x.c(11),{value:l,filename:r}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=S(r),e[0]=r,e[1]=o):o=e[1];const f=c?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(v,{className:"size-5 text-muted-foreground"})}),e[2]=a):a=e[2];let i,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={enabled:!1},d={top:12,bottom:12},e[3]=i,e[4]=d):(i=e[3],d=e[4]);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:i,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=m):m=e[5];let u;return e[6]!==r||e[7]!==o||e[8]!==f||e[9]!==l?(u=s.jsx(_,{path:r,language:o,value:l,theme:f,loading:a,options:m},r),e[6]=r,e[7]=o,e[8]=f,e[9]=l,e[10]=u):u=e[10],u}function E(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const F=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),T=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),h=2*1024*1024;function $(n,e){const l=n.split(".").pop()?.toLowerCase()??"";return F.has(l)?"image":l==="pdf"?"pdf":l==="html"||l==="htm"?"html":l==="md"||l==="markdown"?e<=h?"markdown":"download":T.has(l)&&e<=h?"text":"download"}function B(){const n=x.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let l;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(w,{className:"h-3 w-full"}),s.jsx(w,{className:"h-3 w-5/6"}),s.jsx(w,{className:"h-3 w-2/3"})]})]})}),n[1]=l):l=n[1],l}function j(n){const e=x.c(20),{file:l,note:r}=n;let t;e[0]!==l.filename?(t=s.jsx(k,{filename:l.filename,className:"h-12 w-10"}),e[0]=l.filename,e[1]=t):t=e[1];let c;e[2]!==l.filename?(c=s.jsx("span",{className:"text-sm font-medium text-foreground",children:l.filename}),e[2]=l.filename,e[3]=c):c=e[3];let o;e[4]!==l.size?(o=E(l.size),e[4]=l.size,e[5]=o):o=e[5];const f=r?` · ${r}`:"";let a;e[6]!==o||e[7]!==f?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,f]}),e[6]=o,e[7]=f,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==a?(i=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=i):i=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(N,{size:14}),e[12]=d):d=e[12];let m;e[13]!==l.downloadUrl||e[14]!==l.filename?(m=s.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:l.downloadUrl,download:l.filename,children:[d,"Download"]})}),e[13]=l.downloadUrl,e[14]=l.filename,e[15]=m):m=e[15];let u;return e[16]!==t||e[17]!==i||e[18]!==m?(u=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 surface-inset px-10 py-8",children:[t,i,m]})}),e[16]=t,e[17]=i,e[18]=m,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:r}=n,{data:t,isPending:c,isError:o}=b(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(B,{}),e[0]=a):a=e[0],a}if(o||!t){let a;return e[1]!==l?(a=s.jsx(j,{file:l,note:"preview unavailable"}),e[1]=l,e[2]=a):a=e[2],a}if(r){const a=`file-preview-${l.key}`;let i;return e[3]!==t||e[4]!==a?(i=s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:s.jsx(z,{id:a,text:t})})}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}let f;return e[6]!==t||e[7]!==l.filename?(f=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=f):f=e[8],f}function I(n){const e=x.c(15),{file:l}=n;switch($(l.filename,l.size)){case"image":{let t;return e[0]!==l.downloadUrl||e[1]!==l.filename?(t=s.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:s.jsx("img",{src:l.downloadUrl,alt:l.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=l.downloadUrl,e[1]=l.filename,e[2]=t):t=e[2],t}case"pdf":{let t;return e[3]!==l.downloadUrl||e[4]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-same-origin allow-downloads",className:"block h-full w-full bg-white"}),e[3]=l.downloadUrl,e[4]=l.filename,e[5]=t):t=e[5],t}case"html":{let t;return e[6]!==l.downloadUrl||e[7]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=t):t=e[8],t}case"markdown":{let t;return e[9]!==l?(t=s.jsx(p,{file:l,markdown:!0}),e[9]=l,e[10]=t):t=e[10],t}case"text":{let t;return e[11]!==l?(t=s.jsx(p,{file:l,markdown:!1}),e[11]=l,e[12]=t):t=e[12],t}default:{let t;return e[13]!==l?(t=s.jsx(j,{file:l}),e[13]=l,e[14]=t):t=e[14],t}}}export{I as F,B as a,E as f};
@@ -1,3 +1,3 @@
1
- import{c as te,b as se,j as t,B as q,b8 as fe,l as ee,Z as me,V as he,Y as pe,X as re,n as xe,a7 as be,a4 as ve,q as we,r as P,t as G,K as ie,ai as ke,ag as ge,I as ye,w as Se,x as je,v as Te,D as Me}from"./index-BWpKrclg.js";import{c as Y,T as Q,a as X}from"./tooltip-D2ANqV2w.js";import{n as ae}from"./ZoomOut-CBOWQYet.js";import{at as Ce,b2 as Pe,a as De,o as ze,b as oe,b3 as Ne}from"./agent-icon-nQ1AH9dU.js";import{d as Ee,e as Oe,g as $e,c as Be}from"./use-org-fs-B4wvUwJj.js";import{a as Re,b as Ae,P as Ue}from"./popover-ClEv7Zyf.js";import{a as Le}from"./Copy01-Dy1KrWO0.js";import{i as Ie}from"./Key01-FaGRi3tG.js";function le(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function _e(n){const e=te.c(73),{readUrl:l,editor:a,downloadName:m,trailing:v,className:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==l?(p=new URL(l,window.location.origin).toString(),e[0]=l,e[1]=p):p=e[1];const o=p;let L;e[2]!==r?(L=le(r),e[2]=r,e[3]=L):L=e[3];const u=L;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",size:"sm",onClick:a.reload,children:[t.jsx(fe,{size:12}),s("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.agentRewriteWarning")})]}),e[4]=a.agentUpdated,e[5]=a.reload,e[6]=s,e[7]=x):x=e[7];let g;e[8]!==a.saving||e[9]!==s?(g=a.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:s("deck.deckToolbar.saving")}),e[8]=a.saving,e[9]=s,e[10]=g):g=e[10];let S;e[11]!==u.size||e[12]!==u.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.editMode?"secondary":u.variant,size:u.size,"aria-pressed":a.editMode,"aria-label":a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInline"),className:ee(a.editMode&&"text-primary"),onClick:()=>a.setEditMode(!a.editMode),children:t.jsx(Ce,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=u.size,e[12]=u.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==o||e[17]!==u.size||e[18]!==u.variant||e[19]!==m||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(me,{children:[t.jsx(he,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(pe,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[t.jsx(Pe,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:o,download:m,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:o,download:m,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=o,e[17]=u.size,e[18]=u.variant,e[19]=m,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=u.variant,D=u.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==o?(M=()=>window.open(o,"_blank","noopener"),e[25]=o,e[26]=M):M=e[26];let I;e[27]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(be,{size:14}),e[27]=I):I=e[27];let d;e[28]!==u.size||e[29]!==u.variant||e[30]!==T||e[31]!==M?(d=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:j,size:D,"aria-label":T,onClick:M,children:I})}),e[28]=u.size,e[29]=u.variant,e[30]=T,e[31]=M,e[32]=d):d=e[32];let B;e[33]!==s?(B=s("deck.deckToolbar.openInNewTab"),e[33]=s,e[34]=B):B=e[34];let R;e[35]!==B?(R=t.jsx(X,{side:"bottom",children:B}),e[35]=B,e[36]=R):R=e[36];let b;e[37]!==d||e[38]!==R?(b=t.jsxs(Y,{children:[d,R]}),e[37]=d,e[38]=R,e[39]=b):b=e[39];let O;e[40]!==b||e[41]!==x||e[42]!==g||e[43]!==S||e[44]!==w||e[45]!==v?(O=t.jsxs(t.Fragment,{children:[x,g,S,w,b,v]}),e[40]=b,e[41]=x,e[42]=g,e[43]=S,e[44]=w,e[45]=v,e[46]=O):O=e[46];const A=O;let _;e[47]!==a.railOpen||e[48]!==s?(_=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=_):_=e[49];const z=_;let $;e[50]!==u.size||e[51]!==u.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.railOpen?"secondary":u.variant,size:u.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(ze,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=u.size,e[51]=u.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let c;return e[55]!==A||e[56]!==C?(c=t.jsxs(xe.Actions,{children:[C,A]}),e[55]=A,e[56]=C,e[57]=c):c=e[57],c}let k;e[58]!==h?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",h),e[58]=h,e[59]=k):k=e[59];let N;e[60]!==o?(N=()=>window.open(o,"_blank","noopener"),e[60]=o,e[61]=N):N=e[61];let E;e[62]!==m?(E=t.jsx("span",{className:"truncate",children:m}),e[62]=m,e[63]=E):E=e[63];let U;e[64]!==o||e[65]!==N||e[66]!==E?(U=t.jsx("button",{type:"button",onClick:N,className:"flex min-w-0 flex-1 items-center rounded-lg px-2 py-1 text-left text-sm font-medium text-foreground transition-colors hover:bg-accent",title:o,children:E}),e[64]=o,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==A||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,A]}),e[68]=A,e[69]=C,e[70]=k,e[71]=U,e[72]=i):i=e[72],i}const Z=1;function Fe(n){if(typeof n!="object"||n===null||n.v!==Z||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}const qe=new Set(["script","style","iframe","object","embed","form","link","meta","base","animate","animatetransform","animatemotion","set"]),Ke=new Set(["href","src","xlink:href","action","formaction"]),He=new Set(["javascript:","vbscript:","data:"]);function Ve(n){let e;try{e=new URL(n,"https://deco.cx").protocol}catch{return!0}return e==="data:"?/^data:image\/(?!svg\+xml)[^;,]+[;,]/i.test(n.trim()):!He.has(e)}function ce(n,e){const l=n.toLowerCase();return l.startsWith("on")?!1:Ke.has(l)?Ve(e):!0}function We(n){for(const e of[...n.querySelectorAll(`${[...qe].join(",")}`)])e.remove();for(const e of[n,...n.querySelectorAll("*")])for(const l of[...e.attributes])ce(l.name,l.value)||e.removeAttribute(l.name)}class F extends Error{constructor(e,l){super(e),this.code=l,this.name="DeckOpError"}code}function de(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ye(n){const l=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return l?de(l).length:null}function Qe(n,e){const l=new DOMParser().parseFromString(n,"text/html"),a=l.querySelector("deck-viewer");if(!a)throw new F("no <deck-viewer> element in source","no-viewer");const m=de(a),v=e.kind==="move"?e.from:e.at,h=m[v];if(!h)throw new F(`slide index ${v} out of range (${m.length})`,"stale-index");switch(e.kind){case"remove":{if(m.length<=1)throw new F("cannot remove the last slide","bad-op");h.remove();break}case"duplicate":{const r=h.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");h.after(r);break}case"move":{if(e.to<0||e.to>=m.length)throw new F(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?m[e.to]:m[e.to].nextSibling;a.insertBefore(h,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new F(`invalid attribute name: ${e.name}`,"bad-op");if(!ce(e.name,e.value))throw new F(`unsafe attribute: ${e.name}`,"bad-op");h.setAttribute(e.name,e.value);break}case"remove-attr":{h.removeAttribute(e.name);break}case"replace":{const r=new DOMParser().parseFromString(e.html,"text/html");We(r.body);const s=r.body.firstElementChild;if(!s)throw new F("replace html has no root element","bad-op");h.replaceWith(l.importNode(s,!0));break}default:throw new F(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
1
+ import{c as te,b as se,j as t,B as q,b8 as fe,l as ee,Z as me,V as he,Y as pe,X as re,n as xe,a7 as be,a4 as ve,q as we,r as P,t as G,K as ie,ai as ke,ag as ge,I as ye,w as Se,x as je,v as Te,D as Me}from"./index-WgfN4QVP.js";import{c as Y,T as Q,a as X}from"./tooltip-CUsEGqy_.js";import{n as ae}from"./ZoomOut-ZB7MeGmK.js";import{at as Ce,b2 as Pe,a as De,o as ze,b as oe,b3 as Ne}from"./agent-icon-D-0GvNzG.js";import{d as Ee,e as Oe,g as $e,c as Be}from"./use-org-fs-DRPPAr_0.js";import{a as Re,b as Ae,P as Ue}from"./popover-DqVLkXUD.js";import{a as Le}from"./Copy01-DisW4JMo.js";import{i as Ie}from"./Key01-BDwjIsdK.js";function le(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function _e(n){const e=te.c(73),{readUrl:l,editor:a,downloadName:m,trailing:v,className:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==l?(p=new URL(l,window.location.origin).toString(),e[0]=l,e[1]=p):p=e[1];const o=p;let L;e[2]!==r?(L=le(r),e[2]=r,e[3]=L):L=e[3];const u=L;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",size:"sm",onClick:a.reload,children:[t.jsx(fe,{size:12}),s("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.agentRewriteWarning")})]}),e[4]=a.agentUpdated,e[5]=a.reload,e[6]=s,e[7]=x):x=e[7];let g;e[8]!==a.saving||e[9]!==s?(g=a.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:s("deck.deckToolbar.saving")}),e[8]=a.saving,e[9]=s,e[10]=g):g=e[10];let S;e[11]!==u.size||e[12]!==u.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.editMode?"secondary":u.variant,size:u.size,"aria-pressed":a.editMode,"aria-label":a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInline"),className:ee(a.editMode&&"text-primary"),onClick:()=>a.setEditMode(!a.editMode),children:t.jsx(Ce,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=u.size,e[12]=u.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==o||e[17]!==u.size||e[18]!==u.variant||e[19]!==m||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(me,{children:[t.jsx(he,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(pe,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[t.jsx(Pe,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:o,download:m,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:o,download:m,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=o,e[17]=u.size,e[18]=u.variant,e[19]=m,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=u.variant,D=u.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==o?(M=()=>window.open(o,"_blank","noopener"),e[25]=o,e[26]=M):M=e[26];let I;e[27]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(be,{size:14}),e[27]=I):I=e[27];let d;e[28]!==u.size||e[29]!==u.variant||e[30]!==T||e[31]!==M?(d=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:j,size:D,"aria-label":T,onClick:M,children:I})}),e[28]=u.size,e[29]=u.variant,e[30]=T,e[31]=M,e[32]=d):d=e[32];let B;e[33]!==s?(B=s("deck.deckToolbar.openInNewTab"),e[33]=s,e[34]=B):B=e[34];let R;e[35]!==B?(R=t.jsx(X,{side:"bottom",children:B}),e[35]=B,e[36]=R):R=e[36];let b;e[37]!==d||e[38]!==R?(b=t.jsxs(Y,{children:[d,R]}),e[37]=d,e[38]=R,e[39]=b):b=e[39];let O;e[40]!==b||e[41]!==x||e[42]!==g||e[43]!==S||e[44]!==w||e[45]!==v?(O=t.jsxs(t.Fragment,{children:[x,g,S,w,b,v]}),e[40]=b,e[41]=x,e[42]=g,e[43]=S,e[44]=w,e[45]=v,e[46]=O):O=e[46];const A=O;let _;e[47]!==a.railOpen||e[48]!==s?(_=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=_):_=e[49];const z=_;let $;e[50]!==u.size||e[51]!==u.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.railOpen?"secondary":u.variant,size:u.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(ze,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=u.size,e[51]=u.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let c;return e[55]!==A||e[56]!==C?(c=t.jsxs(xe.Actions,{children:[C,A]}),e[55]=A,e[56]=C,e[57]=c):c=e[57],c}let k;e[58]!==h?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",h),e[58]=h,e[59]=k):k=e[59];let N;e[60]!==o?(N=()=>window.open(o,"_blank","noopener"),e[60]=o,e[61]=N):N=e[61];let E;e[62]!==m?(E=t.jsx("span",{className:"truncate",children:m}),e[62]=m,e[63]=E):E=e[63];let U;e[64]!==o||e[65]!==N||e[66]!==E?(U=t.jsx("button",{type:"button",onClick:N,className:"flex min-w-0 flex-1 items-center rounded-lg px-2 py-1 text-left text-sm font-medium text-foreground transition-colors hover:bg-accent",title:o,children:E}),e[64]=o,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==A||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,A]}),e[68]=A,e[69]=C,e[70]=k,e[71]=U,e[72]=i):i=e[72],i}const Z=1;function Fe(n){if(typeof n!="object"||n===null||n.v!==Z||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}const qe=new Set(["script","style","iframe","object","embed","form","link","meta","base","animate","animatetransform","animatemotion","set"]),Ke=new Set(["href","src","xlink:href","action","formaction"]),He=new Set(["javascript:","vbscript:","data:"]);function Ve(n){let e;try{e=new URL(n,"https://deco.cx").protocol}catch{return!0}return e==="data:"?/^data:image\/(?!svg\+xml)[^;,]+[;,]/i.test(n.trim()):!He.has(e)}function ce(n,e){const l=n.toLowerCase();return l.startsWith("on")?!1:Ke.has(l)?Ve(e):!0}function We(n){for(const e of[...n.querySelectorAll(`${[...qe].join(",")}`)])e.remove();for(const e of[n,...n.querySelectorAll("*")])for(const l of[...e.attributes])ce(l.name,l.value)||e.removeAttribute(l.name)}class F extends Error{constructor(e,l){super(e),this.code=l,this.name="DeckOpError"}code}function de(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ye(n){const l=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return l?de(l).length:null}function Qe(n,e){const l=new DOMParser().parseFromString(n,"text/html"),a=l.querySelector("deck-viewer");if(!a)throw new F("no <deck-viewer> element in source","no-viewer");const m=de(a),v=e.kind==="move"?e.from:e.at,h=m[v];if(!h)throw new F(`slide index ${v} out of range (${m.length})`,"stale-index");switch(e.kind){case"remove":{if(m.length<=1)throw new F("cannot remove the last slide","bad-op");h.remove();break}case"duplicate":{const r=h.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");h.after(r);break}case"move":{if(e.to<0||e.to>=m.length)throw new F(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?m[e.to]:m[e.to].nextSibling;a.insertBefore(h,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new F(`invalid attribute name: ${e.name}`,"bad-op");if(!ce(e.name,e.value))throw new F(`unsafe attribute: ${e.name}`,"bad-op");h.setAttribute(e.name,e.value);break}case"remove-attr":{h.removeAttribute(e.name);break}case"replace":{const r=new DOMParser().parseFromString(e.html,"text/html");We(r.body);const s=r.body.firstElementChild;if(!s)throw new F("replace html has no root element","bad-op");h.replaceWith(l.importNode(s,!0));break}default:throw new F(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
2
2
  `:""}${l.documentElement.outerHTML}
3
3
  `}const ne="home",Xe=400,Ze=800;function Ge(n){const e=n.savePath!==void 0,{org:l}=ve(),a=we(),m=Ee(ne),[v,h]=P.useState(!1),[f,r]=P.useState(!1),[s,p]=P.useState(!1),[o,L]=P.useState(!1),[u,x]=P.useState(!1),[g,S]=P.useState(!1),[w,j]=P.useState(null),[D,T]=P.useState(null),[M,I]=P.useState(0),[d]=P.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),B=v||g||u,R=()=>{n.savePath!==void 0&&(a.invalidateQueries({queryKey:ie.orgFsStat(l.id,ne,n.savePath)}),a.invalidateQueries({queryKey:ie.orgFsRecent(l.id)}))},b=i=>{d.iframe?.contentWindow?.postMessage(i,"*")},O=()=>{d.source=null,L(!1),D&&j(D),I(i=>i+1),R()};n.statMarker!==D&&(T(n.statMarker),n.statMarker!==null&&(w===null?j(n.statMarker):d.selfMarkers.has(n.statMarker)||n.statMarker!==w&&(B?L(!0):(d.source=null,j(n.statMarker)))));const A=async()=>{d.saveTimer=null;const i=d.source;if(i===null){S(!1);return}x(!0);try{const c=await m.mutateAsync({path:n.savePath,body:i});d.selfMarkers.add(Oe(c)),R()}catch(c){console.error("[deck-editor] save failed",c),G.error("Couldn't save deck edits — reloading the preview."),k.current.reload()}finally{x(!1),S(!1)}},_=i=>{S(!0),d.saveTimer&&clearTimeout(d.saveTimer),d.saveTimer=setTimeout(()=>{k.current.flushSave()},i)},z=(i,c,y)=>{b({v:Z,type:"ack",opId:i,ok:c,error:y})},$=async i=>{if(!e){z(i.opId,!1,"read-only preview");return}try{if(d.source===null){const y=await fetch(n.readUrl,{credentials:"include"});if(!y.ok)throw new Error(`HTTP ${y.status}`);d.source=await y.text()}const c=Ye(d.source);if(c===null||c!==i.witness.childCount)throw new F(`slide count drifted (source ${c}, iframe ${i.witness.childCount})`,"stale-index");d.source=Qe(d.source,i.op),z(i.opId,!0),_(i.op.kind==="replace"?Ze:Xe)}catch(c){console.error("[deck-editor] op failed",i.op,c),z(i.opId,!1,c instanceof Error?c.message:String(c)),G.error("That edit couldn't be saved — reloading the preview."),k.current.reload()}},C=i=>{if(!d.iframe||i.source!==d.iframe.contentWindow)return;const c=Fe(i.data);if(c){if(c.type==="ready"){r(!0),k.current.editMode?b({v:Z,type:"set-edit-mode",enabled:!0}):k.current.railOpen&&b({v:Z,type:"set-rail",open:!0});return}c.type==="op"&&(d.queue=d.queue.then(()=>k.current.handleOp(c)).catch(()=>{}))}},k=P.useRef({onMessage:C,handleOp:$,flushSave:A,reload:O,editMode:v,railOpen:s});k.current={onMessage:C,handleOp:$,flushSave:A,reload:O,editMode:v,railOpen:s};const[N]=P.useState(()=>{let i=null;return c=>{if(c){d.iframe=c;const y=K=>k.current.onMessage(K);window.addEventListener("message",y),i=()=>window.removeEventListener("message",y)}else i?.(),i=null,d.iframe=null}}),E=i=>{p(i),b({v:Z,type:"set-rail",open:i})},U=i=>{h(i),b({v:Z,type:"set-edit-mode",enabled:i}),i&&p(!0),!i&&o&&!g&&!u&&O()};return{iframeRef:N,deckDetected:f,writable:e,displayedMarker:w===null?null:`${w}.${M}`,editMode:v,setEditMode:U,railOpen:s,setRailOpen:E,saving:u,agentUpdated:o,reload:O,postToIframe:b}}const Je=300;function ct({readUrl:n,marker:e,title:l,savePath:a,trailing:m,toolbarClassName:v,placement:h}){const f=Ge({readUrl:n,statMarker:e,savePath:a}),[r,s]=P.useState(null);if(f.displayedMarker===null)return null;const p=n.includes("?")?"&":"?",o=`${n}${p}v=${encodeURIComponent(f.displayedMarker)}`,L=r===o;return t.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[t.jsx(_e,{readUrl:n,editor:f,downloadName:l.split("/").pop()??l,trailing:m,className:v,placement:h}),t.jsx("div",{className:"relative flex-1",children:t.jsx("iframe",{ref:f.iframeRef,src:o,onLoad:()=>s(o),sandbox:"allow-scripts allow-downloads",className:ee("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",L?"opacity-100":"opacity-0"),style:{transitionDuration:`${Je}ms`},title:l},o)})]})}const et=[{mode:"private",labelKey:"library.fileShareButton.modeOrgOnly",Icon:ge},{mode:"public",labelKey:"library.fileShareButton.modePublic",Icon:oe},{mode:"password",labelKey:"library.fileShareButton.modePassword",Icon:Ie}];function ue(n){const e=te.c(56),{volume:l,path:a,kind:m,shareMode:v,effectivePublic:h,url:f}=n,r=se(),s=$e(l),{data:p}=Be(l,a),o=p?.shareMode??v,u=(p?.effectivePublic??h)&&o==="private",x=m==="dir",g=x?"folder":"file",[S,w]=P.useState(!1),[j,D]=P.useState(""),[T,M]=P.useState(!1);let I;e[0]!==a||e[1]!==s||e[2]!==g||e[3]!==r?(I=(i,c)=>{s.mutate({path:a,mode:i,password:c},{onSuccess:()=>{w(!1),D(""),G.success(i==="private"?r("library.fileShareButton.toastOrgOnly",{subject:g}):i==="public"?r("library.fileShareButton.toastPublic",{subject:g}):r("library.fileShareButton.toastPassword",{subject:g}))},onError:y=>G.error(y instanceof Error?y.message:r("library.fileShareButton.failedUpdateSharing"))})},e[0]=a,e[1]=s,e[2]=g,e[3]=r,e[4]=I):I=e[4];const d=I;let B;e[5]!==d?(B=i=>{if(i==="password"){w(!0);return}w(!1),d(i)},e[5]=d,e[6]=B):B=e[6];const R=B,b=S?"password":o;let O;e[7]!==r||e[8]!==f?(O=async()=>{f&&(await navigator.clipboard.writeText(f),M(!0),G.success(r("library.fileShareButton.linkCopied")),setTimeout(()=>M(!1),2e3))},e[7]=r,e[8]=f,e[9]=O):O=e[9];const A=O;let _;e[10]!==T||e[11]!==A||e[12]!==r||e[13]!==f?(_=f?t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[t.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f}),t.jsx(q,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:A,"aria-label":r("library.fileShareButton.copyLink"),children:T?t.jsx(ke,{size:12,className:"text-success"}):t.jsx(Le,{size:12})})]}):null,e[10]=T,e[11]=A,e[12]=r,e[13]=f,e[14]=_):_=e[14];const z=_;if(u){let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(oe,{size:16})}),e[15]=i):i=e[15];let c;e[16]!==r?(c=r("library.fileShareButton.sharedViaParent"),e[16]=r,e[17]=c):c=e[17];let y;e[18]!==c?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),e[18]=c,e[19]=y):y=e[19];const K=x?"files in this folder":"this file";let H;e[20]!==r||e[21]!==K?(H=r("library.fileShareButton.inheritedDescription",{target:K}),e[20]=r,e[21]=K,e[22]=H):H=e[22];let V;e[23]!==H?(V=t.jsx("span",{className:"text-xs text-muted-foreground",children:H}),e[23]=H,e[24]=V):V=e[24];let W;e[25]!==V||e[26]!==y?(W=t.jsxs("div",{className:"flex items-start gap-3",children:[i,t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[y,V]})]}),e[25]=V,e[26]=y,e[27]=W):W=e[27];let J;return e[28]!==z||e[29]!==W?(J=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[W,z]}),e[28]=z,e[29]=W,e[30]=J):J=e[30],J}let $;e[31]!==b||e[32]!==R||e[33]!==s.isPending||e[34]!==r?($=et.map(i=>{const{mode:c,labelKey:y,Icon:K}=i;return t.jsxs("button",{type:"button",disabled:s.isPending,onClick:()=>R(c),className:ee("flex flex-col items-center gap-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",b===c?"bg-background text-foreground shadow-edge":"text-muted-foreground hover:text-foreground"),children:[t.jsx(K,{size:15}),r(y)]},c)}),e[31]=b,e[32]=R,e[33]=s.isPending,e[34]=r,e[35]=$):$=e[35];let C;e[36]!==$?(C=t.jsx("div",{className:"surface-inset grid grid-cols-3 gap-1 p-1",children:$}),e[36]=$,e[37]=C):C=e[37];let k;e[38]!==b||e[39]!==x||e[40]!==r?(k=b==="private"?r("library.fileShareButton.privateDescription",{target:x?"these files":"this link"}):b==="public"?r(x?"library.fileShareButton.publicFolderDescription":"library.fileShareButton.publicFileDescription"):r("library.fileShareButton.passwordDescription",{target:x?"files in this folder":"this file"}),e[38]=b,e[39]=x,e[40]=r,e[41]=k):k=e[41];let N;e[42]!==k?(N=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[42]=k,e[43]=N):N=e[43];let E;e[44]!==b||e[45]!==d||e[46]!==o||e[47]!==j||e[48]!==s.isPending||e[49]!==r?(E=b==="password"&&t.jsxs("form",{className:"flex items-center gap-2",onSubmit:i=>{i.preventDefault(),j&&d("password",j)},children:[t.jsx(ye,{type:"password",value:j,onChange:i=>D(i.target.value),placeholder:r(o==="password"?"library.fileShareButton.newPasswordPlaceholder":"library.fileShareButton.passwordPlaceholder"),autoComplete:"new-password",className:"h-8 text-xs"}),t.jsx(q,{type:"submit",size:"sm",className:"shrink-0",disabled:!j||s.isPending,children:r(o==="password"?"library.fileShareButton.buttonUpdate":"library.fileShareButton.buttonSet")})]}),e[44]=b,e[45]=d,e[46]=o,e[47]=j,e[48]=s.isPending,e[49]=r,e[50]=E):E=e[50];let U;return e[51]!==z||e[52]!==C||e[53]!==N||e[54]!==E?(U=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[C,N,E,z]}),e[51]=z,e[52]=C,e[53]=N,e[54]=E,e[55]=U):U=e[55],U}function dt(n){const e=te.c(25),{volume:l,path:a,shareMode:m,effectivePublic:v,url:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==r?(p=le(r),e[0]=r,e[1]=p):p=e[1];const o=p,L=o.variant,u=o.size;let x;e[2]!==s?(x=s("library.fileShareButton.share"),e[2]=s,e[3]=x):x=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ne,{size:14}),e[4]=g):g=e[4];let S;e[5]!==o.size||e[6]!==o.variant||e[7]!==x?(S=t.jsx(Q,{asChild:!0,children:t.jsx(Re,{asChild:!0,children:t.jsx(q,{variant:L,size:u,"aria-label":x,children:g})})}),e[5]=o.size,e[6]=o.variant,e[7]=x,e[8]=S):S=e[8];let w;e[9]!==s?(w=s("library.fileShareButton.share"),e[9]=s,e[10]=w):w=e[10];let j;e[11]!==w?(j=t.jsx(X,{side:"bottom",children:w}),e[11]=w,e[12]=j):j=e[12];let D;e[13]!==S||e[14]!==j?(D=t.jsxs(Y,{children:[S,j]}),e[13]=S,e[14]=j,e[15]=D):D=e[15];let T;e[16]!==v||e[17]!==a||e[18]!==m||e[19]!==h||e[20]!==l?(T=t.jsx(Ae,{align:"end",className:"w-80 p-3",children:t.jsx(ue,{volume:l,path:a,kind:"file",shareMode:m,effectivePublic:v,url:h})}),e[16]=v,e[17]=a,e[18]=m,e[19]=h,e[20]=l,e[21]=T):T=e[21];let M;return e[22]!==D||e[23]!==T?(M=t.jsxs(Ue,{children:[D,T]}),e[22]=D,e[23]=T,e[24]=M):M=e[24],M}function ut(n){const e=te.c(14),{target:l,onOpenChange:a}=n,m=se(),v=!!l,h=l?.kind==="dir"?"folder":"file";let f;e[0]!==m||e[1]!==h?(f=m("library.fileShareButton.shareDialogTitle",{type:h}),e[0]=m,e[1]=h,e[2]=f):f=e[2];let r;e[3]!==f?(r=t.jsx(Se,{children:t.jsx(je,{children:f})}),e[3]=f,e[4]=r):r=e[4];let s;e[5]!==l?(s=l&&t.jsx(ue,{...l}),e[5]=l,e[6]=s):s=e[6];let p;e[7]!==r||e[8]!==s?(p=t.jsxs(Te,{className:"sm:max-w-md",children:[r,s]}),e[7]=r,e[8]=s,e[9]=p):p=e[9];let o;return e[10]!==a||e[11]!==v||e[12]!==p?(o=t.jsx(Me,{open:v,onOpenChange:a,children:p}),e[10]=a,e[11]=v,e[12]=p,e[13]=o):o=e[13],o}export{dt as F,ct as H,ut as S,le as t};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-BWpKrclg.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-WgfN4QVP.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{c as M,j as t,v as _,D as G,r as O,bB as L,l as A,x as H,hi as W,B as U,b7 as I}from"./index-BWpKrclg.js";import{i as K}from"./Zap-CHuT8W6R.js";import{M as R}from"./markdown-CkZaCBow.js";import{F as V}from"./file-preview-Cj5pBQv2.js";import{F as Z}from"./file-type-icon-BgzyV542.js";import{k as q,h as J,u as Q}from"./use-org-fs-B4wvUwJj.js";import{p as X,b as E}from"./location-V0VwTJTt.js";import{p as Y}from"./skill-md-ChfVs4uF.js";import{s as ee}from"./Image01-CaawlkVR.js";function te(o){const e=M.c(18),{skillPath:i,onClose:r,variant:l}=o,a=X(i),{volume:n,dirPath:F}=a,$=q(),s=$(n??"",`${F}/SKILL.md`),w=J(s),D=Q(n??"",F);let v;e[0]!==F?(v=E(F),e[0]=F,e[1]=v):v=e[1];const P=v;let x;e[2]!==w.data?(x=w.data?Y(w.data):null,e[2]=w.data,e[3]=x):x=e[3];const h=x,C=le;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(m,z)=>C(m.path)?-1:C(z.path)?1:E(m.path).localeCompare(E(z.path)),e[4]=p):p=e[4];const B=(D.data??[]).filter(se).sort(p),[k,S]=O.useState(null),c=k===null?null:B.find(m=>m.path===k)??null,u=h?.name??P;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(K,{size:18})}),e[5]=g):g=e[5];let d;e[6]!==u||e[7]!==l?(d=l==="dialog"?t.jsx(H,{className:"flex-1 truncate text-base font-medium text-foreground",children:u}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:u}),e[6]=u,e[7]=l,e[8]=d):d=e[8];let f;e[9]!==r||e[10]!==l?(f=l==="dialog"?t.jsx(W,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0",children:t.jsx(I,{size:16})})}):t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0",onClick:r,children:t.jsx(I,{size:16})}),e[9]=r,e[10]=l,e[11]=f):f=e[11];let j;e[12]!==d||e[13]!==f?(j=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[g,d,f]}),e[12]=d,e[13]=f,e[14]=j):j=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=b):b=e[15];const T="relative flex min-w-0 flex-1 flex-col overflow-y-auto",y=c?t.jsx(V,{file:{key:c.path,filename:E(c.path),size:c.size,downloadUrl:$(n??"",c.path)}}):w.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(L,{className:"h-4 w-1/3"}),t.jsx(L,{className:"h-3 w-full"}),t.jsx(L,{className:"h-3 w-5/6"}),t.jsx(L,{className:"h-3 w-2/3"})]}):w.isError||!h?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:h.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(R,{id:`skill-preview-${i}`,text:h.body})})]});let N;return e[16]!==y?(N=t.jsx("div",{className:T,children:y}),e[16]=y,e[17]=N):N=e[17],t.jsxs(t.Fragment,{children:[j,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[b,D.isPending?t.jsx(L,{className:"mx-2 h-4 w-24"}):B.map(m=>{const z=C(m.path)?c===null:k===m.path;return t.jsxs("button",{type:"button",onClick:()=>S(C(m.path)?null:m.path),className:A("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",z?"bg-background shadow-edge":"hover:bg-accent"),children:[t.jsx(Z,{filename:E(m.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:A("truncate text-sm",z?"text-foreground":"text-muted-foreground"),children:E(m.path)})]},m.path)})]}),N]})]})}function se(o){return o.kind==="file"}function le(o){return E(o)==="SKILL.md"}function ue(o){const e=M.c(8),{skillPath:i,onClose:r}=o;let l;e[0]!==r?(l=F=>{F||r()},e[0]=r,e[1]=l):l=e[1];let a;e[2]!==r||e[3]!==i?(a=t.jsx(_,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:t.jsx(te,{skillPath:i,onClose:r,variant:"dialog"})}),e[2]=r,e[3]=i,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=t.jsx(G,{open:!0,onOpenChange:l,children:a}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}const re={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}},oe=[-7,0,7];function ge(o){const e=M.c(50);let i,r,l,a,n;e[0]!==o?({glyph:i,readOnly:l,tone:a,sheets:n,...r}=o,e[0]=o,e[1]=i,e[2]=r,e[3]=l,e[4]=a,e[5]=n):(i=e[1],r=e[2],l=e[3],a=e[4],n=e[5]);const F=a===void 0?"default":a,$=n===void 0?0:n,s=re[F],w=O.useId(),D=`${w}-back`,v=`${w}-front`,P=`url(#${D})`;let x;e[6]!==P?(x=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:P}),e[6]=P,e[7]=x):x=e[7];let h;e[8]!==$?(h=oe.slice(0,Math.min(Math.max($,0),3)).map(ie),e[8]=$,e[9]=h):h=e[9];const C=`url(#${v})`;let p;e[10]!==C?(p=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:C}),e[10]=C,e[11]=p):p=e[11];let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),e[12]=B):B=e[12];let k,S;e[13]!==s.stripe?(S=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:s.stripe}),k=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:s.stripe}),e[13]=s.stripe,e[14]=k,e[15]=S):(k=e[14],S=e[15]);let c;e[16]!==i||e[17]!==s.glyph?(c=i&&t.jsx(i,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:s.glyph,opacity:.55}}),e[16]=i,e[17]=s.glyph,e[18]=c):c=e[18];let u;e[19]!==l?(u=l&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(ee,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[19]=l,e[20]=u):u=e[20];let g;e[21]!==s.backFrom?(g=t.jsx("stop",{offset:"0.3",stopColor:s.backFrom}),e[21]=s.backFrom,e[22]=g):g=e[22];let d;e[23]!==s.backTo?(d=t.jsx("stop",{offset:"1",stopColor:s.backTo}),e[23]=s.backTo,e[24]=d):d=e[24];let f;e[25]!==D||e[26]!==g||e[27]!==d?(f=t.jsxs("linearGradient",{id:D,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[g,d]}),e[25]=D,e[26]=g,e[27]=d,e[28]=f):f=e[28];let j;e[29]!==s.frontFrom?(j=t.jsx("stop",{stopColor:s.frontFrom}),e[29]=s.frontFrom,e[30]=j):j=e[30];let b;e[31]!==s.frontTo?(b=t.jsx("stop",{offset:"1",stopColor:s.frontTo}),e[31]=s.frontTo,e[32]=b):b=e[32];let T;e[33]!==v||e[34]!==j||e[35]!==b?(T=t.jsxs("radialGradient",{id:v,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[j,b]}),e[33]=v,e[34]=j,e[35]=b,e[36]=T):T=e[36];let y;e[37]!==f||e[38]!==T?(y=t.jsxs("defs",{children:[f,T]}),e[37]=f,e[38]=T,e[39]=y):y=e[39];let N;return e[40]!==r||e[41]!==k||e[42]!==c||e[43]!==u||e[44]!==y||e[45]!==x||e[46]!==h||e[47]!==p||e[48]!==S?(N=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...r,children:[x,h,p,B,S,k,c,u,y]}),e[40]=r,e[41]=k,e[42]=c,e[43]=u,e[44]=y,e[45]=x,e[46]=h,e[47]=p,e[48]=S,e[49]=N):N=e[49],N}function ie(o){return t.jsx("rect",{x:"9",y:"3.4",width:"14",height:"12",rx:"1.2",fill:"#F4F6F9",stroke:"#C9D2DC",strokeWidth:"0.7",transform:`rotate(${o} 16 12)`},o)}export{ge as F,ue as S};
1
+ import{c as M,j as t,v as _,D as G,r as O,bB as L,l as A,x as H,hi as W,B as U,b7 as I}from"./index-WgfN4QVP.js";import{i as K}from"./Zap-BB-vOERw.js";import{M as R}from"./markdown-NHGOJDhi.js";import{F as V}from"./file-preview-BIWzBCIQ.js";import{F as Z}from"./file-type-icon-BzoA5jiZ.js";import{k as q,h as J,u as Q}from"./use-org-fs-DRPPAr_0.js";import{p as X,b as E}from"./location-V0VwTJTt.js";import{p as Y}from"./skill-md-ChfVs4uF.js";import{s as ee}from"./Image01-CO8HhoHi.js";function te(o){const e=M.c(18),{skillPath:i,onClose:r,variant:l}=o,a=X(i),{volume:n,dirPath:F}=a,$=q(),s=$(n??"",`${F}/SKILL.md`),w=J(s),D=Q(n??"",F);let v;e[0]!==F?(v=E(F),e[0]=F,e[1]=v):v=e[1];const P=v;let x;e[2]!==w.data?(x=w.data?Y(w.data):null,e[2]=w.data,e[3]=x):x=e[3];const h=x,C=le;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(m,z)=>C(m.path)?-1:C(z.path)?1:E(m.path).localeCompare(E(z.path)),e[4]=p):p=e[4];const B=(D.data??[]).filter(se).sort(p),[k,S]=O.useState(null),c=k===null?null:B.find(m=>m.path===k)??null,u=h?.name??P;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(K,{size:18})}),e[5]=g):g=e[5];let d;e[6]!==u||e[7]!==l?(d=l==="dialog"?t.jsx(H,{className:"flex-1 truncate text-base font-medium text-foreground",children:u}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:u}),e[6]=u,e[7]=l,e[8]=d):d=e[8];let f;e[9]!==r||e[10]!==l?(f=l==="dialog"?t.jsx(W,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0",children:t.jsx(I,{size:16})})}):t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0",onClick:r,children:t.jsx(I,{size:16})}),e[9]=r,e[10]=l,e[11]=f):f=e[11];let j;e[12]!==d||e[13]!==f?(j=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[g,d,f]}),e[12]=d,e[13]=f,e[14]=j):j=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=b):b=e[15];const T="relative flex min-w-0 flex-1 flex-col overflow-y-auto",y=c?t.jsx(V,{file:{key:c.path,filename:E(c.path),size:c.size,downloadUrl:$(n??"",c.path)}}):w.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(L,{className:"h-4 w-1/3"}),t.jsx(L,{className:"h-3 w-full"}),t.jsx(L,{className:"h-3 w-5/6"}),t.jsx(L,{className:"h-3 w-2/3"})]}):w.isError||!h?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:h.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(R,{id:`skill-preview-${i}`,text:h.body})})]});let N;return e[16]!==y?(N=t.jsx("div",{className:T,children:y}),e[16]=y,e[17]=N):N=e[17],t.jsxs(t.Fragment,{children:[j,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[b,D.isPending?t.jsx(L,{className:"mx-2 h-4 w-24"}):B.map(m=>{const z=C(m.path)?c===null:k===m.path;return t.jsxs("button",{type:"button",onClick:()=>S(C(m.path)?null:m.path),className:A("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",z?"bg-background shadow-edge":"hover:bg-accent"),children:[t.jsx(Z,{filename:E(m.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:A("truncate text-sm",z?"text-foreground":"text-muted-foreground"),children:E(m.path)})]},m.path)})]}),N]})]})}function se(o){return o.kind==="file"}function le(o){return E(o)==="SKILL.md"}function ue(o){const e=M.c(8),{skillPath:i,onClose:r}=o;let l;e[0]!==r?(l=F=>{F||r()},e[0]=r,e[1]=l):l=e[1];let a;e[2]!==r||e[3]!==i?(a=t.jsx(_,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:t.jsx(te,{skillPath:i,onClose:r,variant:"dialog"})}),e[2]=r,e[3]=i,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=t.jsx(G,{open:!0,onOpenChange:l,children:a}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}const re={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}},oe=[-7,0,7];function ge(o){const e=M.c(50);let i,r,l,a,n;e[0]!==o?({glyph:i,readOnly:l,tone:a,sheets:n,...r}=o,e[0]=o,e[1]=i,e[2]=r,e[3]=l,e[4]=a,e[5]=n):(i=e[1],r=e[2],l=e[3],a=e[4],n=e[5]);const F=a===void 0?"default":a,$=n===void 0?0:n,s=re[F],w=O.useId(),D=`${w}-back`,v=`${w}-front`,P=`url(#${D})`;let x;e[6]!==P?(x=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:P}),e[6]=P,e[7]=x):x=e[7];let h;e[8]!==$?(h=oe.slice(0,Math.min(Math.max($,0),3)).map(ie),e[8]=$,e[9]=h):h=e[9];const C=`url(#${v})`;let p;e[10]!==C?(p=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:C}),e[10]=C,e[11]=p):p=e[11];let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),e[12]=B):B=e[12];let k,S;e[13]!==s.stripe?(S=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:s.stripe}),k=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:s.stripe}),e[13]=s.stripe,e[14]=k,e[15]=S):(k=e[14],S=e[15]);let c;e[16]!==i||e[17]!==s.glyph?(c=i&&t.jsx(i,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:s.glyph,opacity:.55}}),e[16]=i,e[17]=s.glyph,e[18]=c):c=e[18];let u;e[19]!==l?(u=l&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(ee,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[19]=l,e[20]=u):u=e[20];let g;e[21]!==s.backFrom?(g=t.jsx("stop",{offset:"0.3",stopColor:s.backFrom}),e[21]=s.backFrom,e[22]=g):g=e[22];let d;e[23]!==s.backTo?(d=t.jsx("stop",{offset:"1",stopColor:s.backTo}),e[23]=s.backTo,e[24]=d):d=e[24];let f;e[25]!==D||e[26]!==g||e[27]!==d?(f=t.jsxs("linearGradient",{id:D,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[g,d]}),e[25]=D,e[26]=g,e[27]=d,e[28]=f):f=e[28];let j;e[29]!==s.frontFrom?(j=t.jsx("stop",{stopColor:s.frontFrom}),e[29]=s.frontFrom,e[30]=j):j=e[30];let b;e[31]!==s.frontTo?(b=t.jsx("stop",{offset:"1",stopColor:s.frontTo}),e[31]=s.frontTo,e[32]=b):b=e[32];let T;e[33]!==v||e[34]!==j||e[35]!==b?(T=t.jsxs("radialGradient",{id:v,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[j,b]}),e[33]=v,e[34]=j,e[35]=b,e[36]=T):T=e[36];let y;e[37]!==f||e[38]!==T?(y=t.jsxs("defs",{children:[f,T]}),e[37]=f,e[38]=T,e[39]=y):y=e[39];let N;return e[40]!==r||e[41]!==k||e[42]!==c||e[43]!==u||e[44]!==y||e[45]!==x||e[46]!==h||e[47]!==p||e[48]!==S?(N=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...r,children:[x,h,p,B,S,k,c,u,y]}),e[40]=r,e[41]=k,e[42]=c,e[43]=u,e[44]=y,e[45]=x,e[46]=h,e[47]=p,e[48]=S,e[49]=N):N=e[49],N}function ie(o){return t.jsx("rect",{x:"9",y:"3.4",width:"14",height:"12",rx:"1.2",fill:"#F4F6F9",stroke:"#C9D2DC",strokeWidth:"0.7",transform:`rotate(${o} 16 12)`},o)}export{ge as F,ue as S};
@@ -1 +1 @@
1
- import{ev as C,c as f,j as c,c6 as j,r as d,l as x,cr as v,ew as b,ex as h}from"./index-BWpKrclg.js";import{L as N}from"./label-DzRNwB_s.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},p=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(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 M(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=x("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 L(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}=p(),a=!!n;let l;e[3]!==s?(l=x("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(N,{"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 P(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}=p(),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(v,{"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 y(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}=p();let r;e[3]!==s?(r=x("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}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("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{E as F,D as a,M as b,L as c,P as d,y as e,R as f};
1
+ import{ev as C,c as f,j as c,c6 as j,r as d,l as x,cr as v,ew as b,ex as h}from"./index-WgfN4QVP.js";import{L as N}from"./label-Dxzmqh4L.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},p=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(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 M(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=x("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 L(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}=p(),a=!!n;let l;e[3]!==s?(l=x("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(N,{"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 P(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}=p(),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(v,{"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 y(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}=p();let r;e[3]!==s?(r=x("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}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("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{E as F,D as a,M as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as M,a4 as te,gB as oe,q as re,aJ as le,aI as ce,e as ne,C as Y,t as K,K as H,j as n,h8 as ie,fT as se,fU as G,c6 as ge,I as ae,aK as de,aL as X,c as J,r as Z,o as me,ap as ue,ay as ee,cW as fe,cX as pe,J as he,B as xe,aM as je,aN as Se,aO as ze,aP as Oe,bm as ve,aQ as be,aR as ye,aS as Ce,ao as _e,n as $,h2 as Fe,b2 as De}from"./index-BWpKrclg.js";import{u as Ae}from"./use-debounced-autosave-Cxe8yde_.js";import{C as we,B as Te,a as Ne}from"./review-settings-CsHCgNLm.js";import{D as Ee}from"./domain-settings-5g_MWfwe.js";import{C as Le}from"./capability-load-error-7V5aWr5c.js";import"./switch-Bv0wLEBx.js";import"./UserSquare-BSsT3MHy.js";import"./use-organization-settings-D_5fr-OI.js";import"./schema-DzZBw0EW.js";import"./task-board-L6ZGzY-s.js";import"./use-connection-CZNQu-z2.js";import"./use-mcp-client-zIBQco5Q.js";import"./auth-CK6AyRu5.js";import"./badge-BV7rxTvN.js";import"./select-BMteQTWS.js";import"./index-BdQq_4o_.js";import"./index-lchr3O79.js";import"./ChevronUp-xR4eZngE.js";const Pe=e=>de({name:X().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:X().optional()});function ke(e){const t=J.c(17),{value:s,onChange:f,name:g,disabled:l}=e,c=M(),d=Z.useRef(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>d.current?.click(),t[0]=r):r=t[0];const m=r;let i;t[1]!==f||t[2]!==c?(i=z=>{const S=z.target.files?.[0];if(!S)return;if(S.size>2097152){K.error(c("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>K.error(c("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&f(p.result),d.current&&(d.current.value="")},p.readAsDataURL(S)},t[1]=f,t[2]=c,t[3]=i):i=t[3];const a=i;let o;t[4]!==c?(o=c("settings.organizationForm.uploadLogoLabel"),t[4]=c,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==a?(u=n.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[6]=l,t[7]=a,t[8]=u):u=t[8];const x=s||void 0,j=g??"?";let h;t[9]!==x||t[10]!==j?(h=n.jsx(me,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=h):h=t[11];let v;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==h?(v=n.jsxs("button",{type:"button",onClick:m,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,h]}),t[12]=l,t[13]=o,t[14]=u,t[15]=h,t[16]=v):v=t[16],v}function Re(){const e=M(),{org:t}=te(),s=oe(),f=re(),g=le({resolver:ce(Pe(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async i=>{const a={name:i.name};i.logo&&(a.logo=i.logo);const o=await s.organization.update({data:a});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(i,a)=>{Y("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),f.invalidateQueries({queryKey:H.organizations()}),f.invalidateQueries({queryKey:H.activeOrganization(t.slug)}),K.success(e("settings.organizationForm.updateSuccess"))},onError:(i,a)=>{Y("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:i instanceof Error?i.message:String(i)}),K.error(i instanceof Error?i.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=Ae({save:async()=>{const i=g.control._formState.dirtyFields;if(Object.keys(i).length===0||!await g.trigger())return;const o=g.getValues(),u=g.control._defaultValues;g.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{g.reset(u,{keepValues:!0})}}}),r=g.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(ie,{children:n.jsxs(se,{children:[n.jsx(G,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:n.jsx(ke,{value:g.watch("logo"),onChange:i=>{g.setValue("logo",i??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),n.jsx(G,{title:e("settings.organizationForm.nameTitle"),action:n.jsx(ge,{control:g.control,name:"name",render:({field:i})=>n.jsx(ae,{id:"org-name",...i,onChange:a=>{i.onChange(a),c()},onBlur:()=>{i.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),n.jsx(G,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(r.name||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Be(){const e=J.c(83),t=M(),{org:s}=te(),[f,g]=Z.useState(!1),[l,c]=Z.useState(""),d=ue();let r;e[0]!==s.id||e[1]!==d?(r=async()=>{await d.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=d,e[2]=r):r=e[2];let m;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(m=()=>{Y("organization_deleted",{organization_id:s.id}),localStorage.getItem(ee.lastOrgSlug())===s.slug&&localStorage.removeItem(ee.lastOrgSlug()),fe()?.org===s.slug&&pe(),he(),K.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=m):m=e[6];let i;e[7]!==t?(i=O=>{K.error(O instanceof Error?O.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=i):i=e[8];let a;e[9]!==r||e[10]!==m||e[11]!==i?(a={mutationFn:r,onSuccess:m,onError:i},e[9]=r,e[10]=m,e[11]=i,e[12]=a):a=e[12];const o=ne(a);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[17]=t,e[18]=j):j=e[18];let h;e[19]===Symbol.for("react.memo_cache_sentinel")?(h=()=>g(!0),e[19]=h):h=e[19];const v=o.isPending;let z;e[20]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[20]=t,e[21]=z):z=e[21];let S;e[22]!==o.isPending||e[23]!==z?(S=n.jsx(xe,{variant:"destructive",size:"sm",onClick:h,disabled:v,children:z}),e[22]=o.isPending,e[23]=z,e[24]=S):S=e[24];let p;e[25]!==S||e[26]!==x||e[27]!==j?(p=n.jsx(se,{className:"border-destructive/40",children:n.jsx(G,{title:x,description:j,action:S})}),e[25]=S,e[26]=x,e[27]=j,e[28]=p):p=e[28];let b;e[29]!==p||e[30]!==u?(b=n.jsx(ie,{title:u,children:p}),e[29]=p,e[30]=u,e[31]=b):b=e[31];let Q;e[32]===Symbol.for("react.memo_cache_sentinel")?(Q=O=>{g(O),O||c("")},e[32]=Q):Q=e[32];let y;e[33]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[33]=t,e[34]=y):y=e[34];let C;e[35]!==y?(C=n.jsx(je,{children:y}),e[35]=y,e[36]=C):C=e[36];let _;e[37]!==s.name||e[38]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[37]=s.name,e[38]=t,e[39]=_):_=e[39];let F;e[40]!==_?(F=n.jsx("p",{children:_}),e[40]=_,e[41]=F):F=e[41];let D;e[42]!==s.name||e[43]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[42]=s.name,e[43]=t,e[44]=D):D=e[44];let A;e[45]!==D?(A=n.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[45]=D,e[46]=A):A=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=O=>c(O.target.value),e[47]=U):U=e[47];let w;e[48]!==l||e[49]!==s.name?(w=n.jsx(ae,{value:l,onChange:U,placeholder:s.name,autoFocus:!0}),e[48]=l,e[49]=s.name,e[50]=w):w=e[50];let T;e[51]!==F||e[52]!==A||e[53]!==w?(T=n.jsx(Se,{asChild:!0,children:n.jsxs("div",{children:[F,A,w]})}),e[51]=F,e[52]=A,e[53]=w,e[54]=T):T=e[54];let N;e[55]!==C||e[56]!==T?(N=n.jsxs(ze,{children:[C,T]}),e[55]=C,e[56]=T,e[57]=N):N=e[57];let E;e[58]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[58]=t,e[59]=E):E=e[59];let L;e[60]!==E?(L=n.jsx(Oe,{children:E}),e[60]=E,e[61]=L):L=e[61];let P;e[62]!==o?(P=()=>o.mutate(),e[62]=o,e[63]=P):P=e[63];const W=l!==s.name||o.isPending;let k;e[64]!==o.isPending||e[65]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[64]=o.isPending,e[65]=t,e[66]=k):k=e[66];let R;e[67]!==P||e[68]!==W||e[69]!==k?(R=n.jsx(ve,{onClick:P,disabled:W,variant:"destructive",children:k}),e[67]=P,e[68]=W,e[69]=k,e[70]=R):R=e[70];let B;e[71]!==L||e[72]!==R?(B=n.jsxs(be,{children:[L,R]}),e[71]=L,e[72]=R,e[73]=B):B=e[73];let I;e[74]!==N||e[75]!==B?(I=n.jsxs(ye,{children:[N,B]}),e[74]=N,e[75]=B,e[76]=I):I=e[76];let q;e[77]!==f||e[78]!==I?(q=n.jsx(Ce,{open:f,onOpenChange:Q,children:I}),e[77]=f,e[78]=I,e[79]=q):q=e[79];let V;return e[80]!==b||e[81]!==q?(V=n.jsxs(n.Fragment,{children:[b,q]}),e[80]=b,e[81]=q,e[82]=V):V=e[82],V}function Ie(){const e=J.c(15),t=M(),{granted:s,loading:f,error:g}=_e("org:manage");if(f){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(De,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Le,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.nav.general"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=n.jsx($.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&n.jsxs(n.Fragment,{children:[n.jsx(Re,{}),n.jsx(we,{}),n.jsx(Te,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ne,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&n.jsxs(n.Fragment,{children:[n.jsx(Ee,{}),n.jsx(Be,{})]}),e[9]=s,e[10]=m):m=e[10];let i;return e[11]!==c||e[12]!==d||e[13]!==m?(i=n.jsx($,{children:n.jsx($.Content,{children:n.jsx($.Container,{children:n.jsxs(Fe,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=i):i=e[14],i}function st(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Ie,{}),e[0]=t):t=e[0],t}export{st as default};
1
+ import{b as M,a4 as te,gB as oe,q as re,aJ as le,aI as ce,e as ne,C as Y,t as K,K as H,j as n,h8 as ie,fT as se,fU as G,c6 as ge,I as ae,aK as de,aL as X,c as J,r as Z,o as me,ap as ue,ay as ee,cW as fe,cX as pe,J as he,B as xe,aM as je,aN as ze,aO as Se,aP as Oe,bm as ve,aQ as be,aR as Ce,aS as ye,ao as _e,n as $,h2 as Fe,b2 as De}from"./index-WgfN4QVP.js";import{u as Ae}from"./use-debounced-autosave-DnB6ruCU.js";import{C as we,B as Te,a as Ne}from"./review-settings-BtTYlHnB.js";import{D as Ee}from"./domain-settings-CMqaHhTL.js";import{C as Le}from"./capability-load-error-BciHzJb0.js";import"./switch-nJxNuRWR.js";import"./UserSquare-D1neGXtF.js";import"./use-organization-settings-CHtyXny0.js";import"./schema-BUPJBVf-.js";import"./task-board-M_qS1rzf.js";import"./use-connection-FqHna8PS.js";import"./use-mcp-client-DXdlNn5q.js";import"./auth-BZPkjT4-.js";import"./badge-iQ-KRbWv.js";import"./select-CFg3KEOq.js";import"./index-BdQq_4o_.js";import"./index-CzKs4Djn.js";import"./ChevronUp-CNyARDGk.js";const Pe=e=>de({name:X().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:X().optional()});function ke(e){const t=J.c(17),{value:s,onChange:f,name:g,disabled:l}=e,c=M(),d=Z.useRef(null);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d.current?.click(),t[0]=o):o=t[0];const m=o;let i;t[1]!==f||t[2]!==c?(i=S=>{const z=S.target.files?.[0];if(!z)return;if(z.size>2097152){K.error(c("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>K.error(c("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&f(p.result),d.current&&(d.current.value="")},p.readAsDataURL(z)},t[1]=f,t[2]=c,t[3]=i):i=t[3];const a=i;let r;t[4]!==c?(r=c("settings.organizationForm.uploadLogoLabel"),t[4]=c,t[5]=r):r=t[5];let u;t[6]!==l||t[7]!==a?(u=n.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[6]=l,t[7]=a,t[8]=u):u=t[8];const x=s||void 0,j=g??"?";let h;t[9]!==x||t[10]!==j?(h=n.jsx(me,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=h):h=t[11];let v;return t[12]!==l||t[13]!==r||t[14]!==u||t[15]!==h?(v=n.jsxs("button",{type:"button",onClick:m,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":r,children:[u,h]}),t[12]=l,t[13]=r,t[14]=u,t[15]=h,t[16]=v):v=t[16],v}function Re(){const e=M(),{org:t}=te(),s=oe(),f=re(),g=le({resolver:ce(Pe(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async i=>{const a={name:i.name};i.logo&&(a.logo=i.logo);const r=await s.organization.update({data:a});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(i,a)=>{Y("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),f.invalidateQueries({queryKey:H.organizations()}),f.invalidateQueries({queryKey:H.activeOrganization(t.slug)}),K.success(e("settings.organizationForm.updateSuccess"))},onError:(i,a)=>{Y("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:i instanceof Error?i.message:String(i)}),K.error(i instanceof Error?i.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=Ae({save:async()=>{const i=g.control._formState.dirtyFields;if(Object.keys(i).length===0||!await g.trigger())return;const r=g.getValues(),u=g.control._defaultValues;g.reset(r,{keepValues:!0});try{await l.mutateAsync(r)}catch{g.reset(u,{keepValues:!0})}}}),o=g.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(ie,{children:n.jsxs(se,{children:[n.jsx(G,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:n.jsx(ke,{value:g.watch("logo"),onChange:i=>{g.setValue("logo",i??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),n.jsx(G,{title:e("settings.organizationForm.nameTitle"),action:n.jsx(ge,{control:g.control,name:"name",render:({field:i})=>n.jsx(ae,{id:"org-name",...i,onChange:a=>{i.onChange(a),c()},onBlur:()=>{i.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),n.jsx(G,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(o.name||o.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[o.name&&n.jsx("p",{className:"text-xs text-destructive",children:o.name.message}),o.logo&&n.jsx("p",{className:"text-xs text-destructive",children:o.logo.message})]})]})})}function Be(){const e=J.c(83),t=M(),{org:s}=te(),[f,g]=Z.useState(!1),[l,c]=Z.useState(""),d=ue();let o;e[0]!==s.id||e[1]!==d?(o=async()=>{await d.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=d,e[2]=o):o=e[2];let m;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(m=()=>{Y("organization_deleted",{organization_id:s.id}),localStorage.getItem(ee.lastOrgSlug())===s.slug&&localStorage.removeItem(ee.lastOrgSlug()),fe()?.org===s.slug&&pe(),he(),K.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=m):m=e[6];let i;e[7]!==t?(i=O=>{K.error(O instanceof Error?O.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=i):i=e[8];let a;e[9]!==o||e[10]!==m||e[11]!==i?(a={mutationFn:o,onSuccess:m,onError:i},e[9]=o,e[10]=m,e[11]=i,e[12]=a):a=e[12];const r=ne(a);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[17]=t,e[18]=j):j=e[18];let h;e[19]===Symbol.for("react.memo_cache_sentinel")?(h=()=>g(!0),e[19]=h):h=e[19];const v=r.isPending;let S;e[20]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[20]=t,e[21]=S):S=e[21];let z;e[22]!==r.isPending||e[23]!==S?(z=n.jsx(xe,{variant:"destructive",size:"sm",onClick:h,disabled:v,children:S}),e[22]=r.isPending,e[23]=S,e[24]=z):z=e[24];let p;e[25]!==z||e[26]!==x||e[27]!==j?(p=n.jsx(se,{className:"border-destructive/40",children:n.jsx(G,{title:x,description:j,action:z})}),e[25]=z,e[26]=x,e[27]=j,e[28]=p):p=e[28];let b;e[29]!==p||e[30]!==u?(b=n.jsx(ie,{title:u,children:p}),e[29]=p,e[30]=u,e[31]=b):b=e[31];let Q;e[32]===Symbol.for("react.memo_cache_sentinel")?(Q=O=>{g(O),O||c("")},e[32]=Q):Q=e[32];let C;e[33]!==t?(C=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[33]=t,e[34]=C):C=e[34];let y;e[35]!==C?(y=n.jsx(je,{children:C}),e[35]=C,e[36]=y):y=e[36];let _;e[37]!==s.name||e[38]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[37]=s.name,e[38]=t,e[39]=_):_=e[39];let F;e[40]!==_?(F=n.jsx("p",{children:_}),e[40]=_,e[41]=F):F=e[41];let D;e[42]!==s.name||e[43]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[42]=s.name,e[43]=t,e[44]=D):D=e[44];let A;e[45]!==D?(A=n.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[45]=D,e[46]=A):A=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=O=>c(O.target.value),e[47]=U):U=e[47];let w;e[48]!==l||e[49]!==s.name?(w=n.jsx(ae,{value:l,onChange:U,placeholder:s.name,autoFocus:!0}),e[48]=l,e[49]=s.name,e[50]=w):w=e[50];let T;e[51]!==F||e[52]!==A||e[53]!==w?(T=n.jsx(ze,{asChild:!0,children:n.jsxs("div",{children:[F,A,w]})}),e[51]=F,e[52]=A,e[53]=w,e[54]=T):T=e[54];let N;e[55]!==y||e[56]!==T?(N=n.jsxs(Se,{children:[y,T]}),e[55]=y,e[56]=T,e[57]=N):N=e[57];let E;e[58]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[58]=t,e[59]=E):E=e[59];let L;e[60]!==E?(L=n.jsx(Oe,{children:E}),e[60]=E,e[61]=L):L=e[61];let P;e[62]!==r?(P=()=>r.mutate(),e[62]=r,e[63]=P):P=e[63];const W=l!==s.name||r.isPending;let k;e[64]!==r.isPending||e[65]!==t?(k=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[64]=r.isPending,e[65]=t,e[66]=k):k=e[66];let R;e[67]!==P||e[68]!==W||e[69]!==k?(R=n.jsx(ve,{onClick:P,disabled:W,variant:"destructive",children:k}),e[67]=P,e[68]=W,e[69]=k,e[70]=R):R=e[70];let B;e[71]!==L||e[72]!==R?(B=n.jsxs(be,{children:[L,R]}),e[71]=L,e[72]=R,e[73]=B):B=e[73];let I;e[74]!==N||e[75]!==B?(I=n.jsxs(Ce,{children:[N,B]}),e[74]=N,e[75]=B,e[76]=I):I=e[76];let q;e[77]!==f||e[78]!==I?(q=n.jsx(ye,{open:f,onOpenChange:Q,children:I}),e[77]=f,e[78]=I,e[79]=q):q=e[79];let V;return e[80]!==b||e[81]!==q?(V=n.jsxs(n.Fragment,{children:[b,q]}),e[80]=b,e[81]=q,e[82]=V):V=e[82],V}function Ie(){const e=J.c(16),t=M(),{granted:s,loading:f,error:g}=_e("org:manage");if(f){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(De,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Le,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.nav.general"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=n.jsx($.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&n.jsxs(n.Fragment,{children:[n.jsx(Re,{}),n.jsx(we,{}),n.jsx(Te,{})]}),e[6]=s,e[7]=d):d=e[7];let o,m;e[8]!==s?(o=n.jsx(Ne,{manageable:s}),m=s&&n.jsxs(n.Fragment,{children:[n.jsx(Ee,{}),n.jsx(Be,{})]}),e[8]=s,e[9]=o,e[10]=m):(o=e[9],m=e[10]);let i;return e[11]!==c||e[12]!==d||e[13]!==o||e[14]!==m?(i=n.jsx($,{children:n.jsx($.Content,{children:n.jsx($.Container,{children:n.jsxs(Fe,{children:[c,d,o,m]})})})}),e[11]=c,e[12]=d,e[13]=o,e[14]=m,e[15]=i):i=e[15],i}function st(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Ie,{}),e[0]=t):t=e[0],t}export{st as default};
@@ -1 +1 @@
1
- import{c as n,j as o}from"./index-BWpKrclg.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
1
+ import{c as n,j as o}from"./index-WgfN4QVP.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
@@ -0,0 +1 @@
1
+ const p={contents:"write",metadata:"read",pull_requests:"write",issues:"write",checks:"read",deployments:"read",statuses:"read"},l=["statuses","deployments","checks"];function f(t){if(!t)return!1;const e=l.join("|");return new RegExp(`permission\\s+"?(?:${e})"?\\s+is not allowed`,"i").test(t)||/permissions exceed what the github app|permissions requested are not granted to this installation/i.test(t)}async function b(t,e){let n={...e};for(;;){const s=await t(n);if(!s.isError)return{result:s,grantedPermissions:n};const o=s.content?.find(a=>a.type==="text")?.text,r=l.find(a=>a in n);if(!r||!f(o))return{result:s,grantedPermissions:n};const{[r]:i,...d}=n;n=d}}function m(t){if(!t||typeof t!="object"||Array.isArray(t))return p;const e=t;return Object.values(e).some(n=>typeof n!="string")?p:e}function g(t){if(!(typeof t!="number"||!Number.isFinite(t)||!Number.isInteger(t)||t<=0))return t}function c(t){const e=t.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=g(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:m(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function h(t){return(t??[]).filter(e=>c(e)===null)}function I(t){return t.metadata?.orgShared===!0}const u=(t,e)=>`${t}/${e}`.toLowerCase();function y(t){const e=new Set,n=[];for(const s of t??[]){if(s.status!=="active")continue;const o=c(s);if(o===null)continue;const r=u(o.owner,o.repo);e.has(r)||(e.add(r),n.push(`${o.owner}/${o.repo}`))}return n}function S(t,e,n){const s=u(e,n),o=(t??[]).filter(r=>{if(r.status&&r.status!=="active")return!1;const i=c(r);return i!==null&&u(i.owner,i.repo)===s});return o.find(I)??o[0]??null}export{p as G,h as a,S as f,c as g,I as i,y as l,b as m};