decocms 4.500.5 → 4.500.7

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 (389) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-B7OXPrvi.js → ActiveShapeUtils-DHLjYBHG.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-DWGeVbRZ.js → AlertCircle-BILwGqjV.js} +1 -1
  3. package/dist/client/assets/{AreaChart-EU8uhxm4.js → AreaChart-MBaQ2sXA.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DKZiHtC9.js → ArrowLeft-DlRqrbst.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BmS2ipPe.js → ArrowUp-CFc2wNu3.js} +1 -1
  6. package/dist/client/assets/{BarChart-C5BexF1_.js → BarChart-ip63zVKP.js} +1 -1
  7. package/dist/client/assets/{Building02-CmZEvaAI.js → Building02-QB_UI3sB.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-N0xPZGNf.js → CategoricalChart-CD4E_XC5.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-Cxvlb0-w.js → CheckCircle-CG1RvCMD.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-Cz_mr8Ub.js → ChevronSelectorVertical-23OZgHQl.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-BXbTXhXZ.js → ChevronUp-BrMcnDd0.js} +1 -1
  12. package/dist/client/assets/{Copy01-Daz7AFYE.js → Copy01-QpufVNbj.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BFLArPt1.js → CreditCard01-W1zS1W7o.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-B5WoSbKn.js → DotsVertical-E-CAHxZx.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-QrHgjTMs.js → ErrorBarContext-DoXCMhKl.js} +1 -1
  16. package/dist/client/assets/{Globe04-CHujm8Rh.js → Globe04-C2IFbCwJ.js} +1 -1
  17. package/dist/client/assets/{Image01-6k6QI1dX.js → Image01-D8Dg78Ju.js} +1 -1
  18. package/dist/client/assets/{Key01-BCUfWyre.js → Key01-CCpcNn9J.js} +1 -1
  19. package/dist/client/assets/{Link01-B2ZUVqeX.js → Link01-Dw-VkUVV.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-Shxg1MDA.js → LinkBroken01-BBYM52IU.js} +1 -1
  21. package/dist/client/assets/{Monitor01-C6hS1MDr.js → Monitor01-596xyLh3.js} +1 -1
  22. package/dist/client/assets/{Play-C5HXiIgy.js → Play-CIe1tupB.js} +1 -1
  23. package/dist/client/assets/{Plus-BGNNWymV.js → Plus-DTyq8wfJ.js} +1 -1
  24. package/dist/client/assets/{SearchMd-CMyj3n9E.js → SearchMd-DnZ_sK_U.js} +1 -1
  25. package/dist/client/assets/{Sector-BIfxElqq.js → Sector-iSjEHRg-.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-DhBZJiPR.js → ShoppingBag01-Brrt7Bh6.js} +1 -1
  27. package/dist/client/assets/{Sun-BZz5Ay79.js → Sun-BmhcFIJl.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-CDaKlB_n.js → SwitchHorizontal01-B5sfCWHV.js} +1 -1
  29. package/dist/client/assets/{Tool01-CIRW7kd4.js → Tool01-BSpg9N8Q.js} +1 -1
  30. package/dist/client/assets/{Trash01-BJZRU-Yu.js → Trash01-uPItCfKQ.js} +1 -1
  31. package/dist/client/assets/{Upload01-CdF0U1Ox.js → Upload01-ClSeM0gf.js} +1 -1
  32. package/dist/client/assets/{User01-Swj6Wyaw.js → User01-DabbLHAZ.js} +1 -1
  33. package/dist/client/assets/{UserSquare--AVOLLKT.js → UserSquare-BXjBRbTF.js} +1 -1
  34. package/dist/client/assets/{Users01-BguvMR-H.js → Users01-Dt36FENA.js} +1 -1
  35. package/dist/client/assets/{XAxis-CVekAfnj.js → XAxis-BQtU7n4v.js} +1 -1
  36. package/dist/client/assets/{XClose-CxTFVFLs.js → XClose-BMDlg-34.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-C7vMH9KG.js → ZoomOut-Bnst3wtU.js} +1 -1
  38. package/dist/client/assets/{access-gate-BifQwyWv.js → access-gate-BnarIuC9.js} +1 -1
  39. package/dist/client/assets/add-connection-dialog-BB_zBu7s.js +1 -0
  40. package/dist/client/assets/agent-analytics-DJ6OqUua.js +2 -0
  41. package/dist/client/assets/agent-app-6ZZFFR6d.js +1 -0
  42. package/dist/client/assets/agent-assets-BHKSbhmH.js +1 -0
  43. package/dist/client/assets/{agent-automation-o2OSd9jI.js → agent-automation-BEmy5bSr.js} +1 -1
  44. package/dist/client/assets/{agent-automations-CSVjvgdr.js → agent-automations-p8P_f3PC.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-BZpypWKp.js → agent-connect-sources-DHxXXvzx.js} +1 -1
  46. package/dist/client/assets/agent-deck-kxbwQZGK.js +1 -0
  47. package/dist/client/assets/agent-e2e-BPE2bY36.js +1 -0
  48. package/dist/client/assets/agent-experiments-ChC-SJXX.js +1 -0
  49. package/dist/client/assets/agent-file-BFxmR6QX.js +1 -0
  50. package/dist/client/assets/agent-hosting-BV7C2pVl.js +1 -0
  51. package/dist/client/assets/{agent-icon-CvfPq7BK.js → agent-icon-BdZdLCky.js} +1 -1
  52. package/dist/client/assets/agent-library-dgFnuWrg.js +1 -0
  53. package/dist/client/assets/agent-library-file-LGRVpT_Z.js +1 -0
  54. package/dist/client/assets/agent-monitor-CbF33zT0.js +1 -0
  55. package/dist/client/assets/{agent-overview-CsT5BzSM.js → agent-overview-CiiRxzYe.js} +1 -1
  56. package/dist/client/assets/agent-settings-CFC23BeV.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-DekWNKPY.js → agent-site-editor-Dq16bHz8.js} +2 -2
  58. package/dist/client/assets/agent-site-editor-code-B3URMZgm.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-CKfeDMKr.js → agent-site-editor-content-CbMNndHb.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-Oi61j7xj.js → agent-site-editor-preview-Dy_HN_0a.js} +3 -3
  61. package/dist/client/assets/agent-view-AaYNRrLl.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-DF_nEERP.js → agent-view-guard-CShYlKBB.js} +1 -1
  63. package/dist/client/assets/{agents-list-LRAFnay6.js → agents-list-qSpN3sGU.js} +1 -1
  64. package/dist/client/assets/{ai-providers-BgUnArjx.js → ai-providers-DwrXOrzh.js} +1 -1
  65. package/dist/client/assets/{alert-Ds8Pbd5J.js → alert-Tk2m0Iz_.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-BoGCVrZa.js → alert-dialog-By0HRTrM.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-BOYksc63.js → analytics-sections-BjYHHt7V.js} +1 -1
  68. package/dist/client/assets/api-keys-CvurWoww.js +1 -0
  69. package/dist/client/assets/{api-keys-uNOKnF25.js → api-keys-DaMqNdv1.js} +1 -1
  70. package/dist/client/assets/app-editor-Dtvslmpt.js +1 -0
  71. package/dist/client/assets/{asset-utils-C0JplDix.js → asset-utils-Cne_zeGQ.js} +1 -1
  72. package/dist/client/assets/{auth-CtdecWhn.js → auth-CTn9OsYL.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-CGU8Tb_2.js → auth-catchall-CMbAfThb.js} +1 -1
  74. package/dist/client/assets/{auth-entry-DIyt51AK.js → auth-entry-CcnG-745.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-CXs4JEXj.js → auth-split-layout--aU7QLNo.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-Cs8htcLH.js → authenticate-and-persist-oauth-bcqFV5Ih.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-BtyEuPas.js → automation-list-row-3u6JAmgN.js} +1 -1
  78. package/dist/client/assets/{automation-runs-fZgz2Hqj.js → automation-runs-Cy2qWf8T.js} +1 -1
  79. package/dist/client/assets/{automations-n2079ZKl.js → automations-B06cv6_Q.js} +1 -1
  80. package/dist/client/assets/{autosend-Bed_2rHW.js → autosend-Cr5TlS-x.js} +1 -1
  81. package/dist/client/assets/{avatar-BWSDv40I.js → avatar-DNs314ny.js} +1 -1
  82. package/dist/client/assets/{badge-BZ6ZWtlL.js → badge-BDMYkxf_.js} +1 -1
  83. package/dist/client/assets/{block-document-C_IW_573.js → block-document-BkfPgGlg.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-CyLjsfnh.js → blocks-preview-workspace-context-D5JWaTS4.js} +1 -1
  85. package/dist/client/assets/{blog-schema-DTGd3Oxs.js → blog-schema-Qz918NIm.js} +1 -1
  86. package/dist/client/assets/{board-analytics-BypUwbOK.js → board-analytics-B8AHF8AB.js} +1 -1
  87. package/dist/client/assets/{buckets-DBWKw8M4.js → buckets-CUa7QjX3.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-ClJ1Tfl6.js → build-improve-prompt-doc-l6jHAadC.js} +1 -1
  89. package/dist/client/assets/{calendar-CUQ5339S.js → calendar-9HE_r4Hw.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-BglSkYA0.js → capability-load-error-DVDKy7cm.js} +1 -1
  91. package/dist/client/assets/category-editor-w7_HM15g.js +1 -0
  92. package/dist/client/assets/{chart-DmxPBeeD.js → chart-n7qVLeZu.js} +1 -1
  93. package/dist/client/assets/{chat-context-CQm-6egv.js → chat-context-DszOftwV.js} +5 -5
  94. package/dist/client/assets/{chat-draft-CLRrKKYW.js → chat-draft-Bi-CpEK_.js} +1 -1
  95. package/dist/client/assets/{checkbox-cJ0fZWJo.js → checkbox-jukyyas4.js} +1 -1
  96. package/dist/client/assets/{choose-editor-Cc1TcbHd.js → choose-editor-BpukaXWx.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-DgYG3gXQ.js → claim-phase-copy-gKkPnPW4.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-DhKKsoxy.js → cli-auth-success-ZwkiiHM_.js} +1 -1
  99. package/dist/client/assets/{client-icons-BGVAhs-F.js → client-icons-CI6qGlDq.js} +1 -1
  100. package/dist/client/assets/{collapsible-Di8zO8dv.js → collapsible-CSMgVqT4.js} +1 -1
  101. package/dist/client/assets/collection-detail-D7Eq0q0A.js +1 -0
  102. package/dist/client/assets/{collection-display-button-Bxb7HpiP.js → collection-display-button-DfzaspAg.js} +1 -1
  103. package/dist/client/assets/{collection-search-BqrF-OSq.js → collection-search-q0ogFMFh.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-CkgGqLXV.js → collection-table-wrapper-Dnaf2KFs.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-B9w_j2Q-.js → collection-tabs-CYgVG041.js} +1 -1
  106. package/dist/client/assets/{column-rules-CDlfxJ7f.js → column-rules-BDs9HTxP.js} +1 -1
  107. package/dist/client/assets/{combobox-C7W7K3yr.js → combobox-BTfHieW4.js} +1 -1
  108. package/dist/client/assets/{command-psdI3Avp.js → command-DFd1c5Z5.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-Cx2dp9En.js → companion-mcps-section-4lkaw_O0.js} +1 -1
  110. package/dist/client/assets/{config-BuMB0HyT.js → config-CtmGoERx.js} +1 -1
  111. package/dist/client/assets/{connect-vKaaPSQ-.js → connect-CmDZNw9R.js} +1 -1
  112. package/dist/client/assets/{connect-layout-BAsVrzyq.js → connect-layout-CC9olkOl.js} +1 -1
  113. package/dist/client/assets/{connection-DsYXyfMO.js → connection-DSkv8Cg1.js} +1 -1
  114. package/dist/client/assets/{connection-card-KKabYrZM.js → connection-card-C7Yq5GHs.js} +1 -1
  115. package/dist/client/assets/connection-detail-DVH9ilyh.js +1 -0
  116. package/dist/client/assets/connection-form-helpers-BsU6F-s_.js +1 -0
  117. package/dist/client/assets/connections-BMBv6B3A.js +1 -0
  118. package/dist/client/assets/context-B_2GuX3F.js +1 -0
  119. package/dist/client/assets/{context-menu-CcSwK895.js → context-menu-CYa4PKRJ.js} +1 -1
  120. package/dist/client/assets/{core.esm-BBQ2k6X-.js → core.esm-lZvNzlYc.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-ryb_Yr7s.js → create-organization-dialog-D-9YlOhY.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-R_HfqfjY.js → daily-pulse-CSM9zceR.js} +1 -1
  123. package/dist/client/assets/{device-hint-yLpMwsWD.js → device-hint-DPN31B5L.js} +1 -1
  124. package/dist/client/assets/{discover-DBy_h90B.js → discover-DvrfCZMt.js} +1 -1
  125. package/dist/client/assets/{domain-settings-DahhbaOZ.js → domain-settings-BDouaDKh.js} +1 -1
  126. package/dist/client/assets/{drawer-Z6WGmFEd.js → drawer-UzGeZrmC.js} +1 -1
  127. package/dist/client/assets/{editor-ZVt04ZDu.js → editor-KeKsFC14.js} +1 -1
  128. package/dist/client/assets/{empty-state-BIpjMV0P.js → empty-state-CvDYWxOG.js} +1 -1
  129. package/dist/client/assets/{empty-state-C38COFK9.js → empty-state-DdJZ_leg.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-R_HCwhv9.js → extract-connection-data-CJhjAx3s.js} +1 -1
  131. package/dist/client/assets/{feature-gate-BBs-YK_1.js → feature-gate-D5KGpIQ3.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-K9l_m1PM.js → feature-paywall-nTUHasXJ.js} +1 -1
  133. package/dist/client/assets/{file-explorer-B4mkdePV.js → file-explorer-CcZkMQK3.js} +1 -1
  134. package/dist/client/assets/{file-preview-CbjoA-y-.js → file-preview-Ct2165jc.js} +1 -1
  135. package/dist/client/assets/{file-share-button-3fAFZqo4.js → file-share-button-DnzCcmZ2.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-DQJBqcjt.js → file-type-icon-C-_1hLql.js} +1 -1
  137. package/dist/client/assets/flat-project-Dhd407Mb.js +1 -0
  138. package/dist/client/assets/{folder-icon-C0bBbW6a.js → folder-icon-CksigScx.js} +1 -1
  139. package/dist/client/assets/{form-C0Gw14kB.js → form-D6DHFxsw.js} +1 -1
  140. package/dist/client/assets/{general-CAvBksuG.js → general-CeTNWbSz.js} +1 -1
  141. package/dist/client/assets/home-B3luwcfX.js +1 -0
  142. package/dist/client/assets/{icon-button-DJ3FH_vW.js → icon-button-d9uOvdxM.js} +1 -1
  143. package/dist/client/assets/{index-o_6CQvLG.js → index-B0rouRMk.js} +1 -1
  144. package/dist/client/assets/{index-CIf_Fy0-.js → index-B5IA1qMq.js} +1 -1
  145. package/dist/client/assets/{index-DLA0mZnP.js → index-BGz-w6Gg.js} +1 -1
  146. package/dist/client/assets/{index-Y3iKbmDC.js → index-COV2t6Wc.js} +1 -1
  147. package/dist/client/assets/{index-yN6Vji_x.js → index-Cw6J2Hl5.js} +3 -3
  148. package/dist/client/assets/{index-CpSJczgV.js → index-DCmQGiOV.js} +1 -1
  149. package/dist/client/assets/{index-BYsz2IG8.js → index-DHd9v6HB.js} +1 -1
  150. package/dist/client/assets/{index-zHK7QZ16.js → index-Dhdyv2s0.js} +1 -1
  151. package/dist/client/assets/{index-Csd6BEC_.js → index-DyaBZBxm.js} +1 -1
  152. package/dist/client/assets/{index-oBLJEYM1.js → index-JuyO8Sz3.js} +1 -1
  153. package/dist/client/assets/index-MZuRM-ap.js +26 -0
  154. package/dist/client/assets/{index-CL22V9cU.js → index-bl_DQ3mH.js} +2 -2
  155. package/dist/client/assets/{index-redirect-D-avw8NV.js → index-redirect-CdLcLUA4.js} +1 -1
  156. package/dist/client/assets/{index-aYlc7W7n.js → index-zYf8hP69.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-CkQRrcdR.js → infiniteQueryObserver-rUCOtzeA.js} +1 -1
  158. package/dist/client/assets/{infra-billing-DYbiV_uv.js → infra-billing-CNFpdYUt.js} +1 -1
  159. package/dist/client/assets/{input-qyM35152.js → input-B6YAOx07.js} +3 -3
  160. package/dist/client/assets/{input-CFfgp0Tw.js → input-C1msyAUz.js} +1 -1
  161. package/dist/client/assets/{integration-icon-DO5tWS-C.js → integration-icon-DogZfPWq.js} +1 -1
  162. package/dist/client/assets/{jira-icon-CLirt27c.js → jira-icon-Bkx-ixmo.js} +1 -1
  163. package/dist/client/assets/{label-CMx6o6z4.js → label-Bqj_xjz9.js} +1 -1
  164. package/dist/client/assets/{layout-BOmiV94e.js → layout-z7Pz7phr.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-CNCjp9-J.js → legacy-agents-deep-fygb-JNd.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-B7q15OBR.js → legacy-main-redirect-BKIEGtd4.js} +1 -1
  167. package/dist/client/assets/library-BgLLAz_1.js +1 -0
  168. package/dist/client/assets/{library-tab-BNFZabUZ.js → library-tab-0FXiesZx.js} +1 -1
  169. package/dist/client/assets/{login-Emu6BYEQ.js → login-B4wTb5ls.js} +1 -1
  170. package/dist/client/assets/{markdown-BpBIe-s5.js → markdown-5DzLzA6E.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-ucNfuWrt.js → mcp-app-renderer-DuGbCe-D.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-tUb5Ku4P.js → mcp-oauth-D_oaXY6E.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-HEDfQLbt.js → mcp-oauth-tCidCN-u.js} +1 -1
  174. package/dist/client/assets/{members-5DGaxXGU.js → members-CDM-83p9.js} +1 -1
  175. package/dist/client/assets/{memory-BU6JoH4_.js → memory-0faJ-8hP.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-BnvillTw.js → mini-report-page-CrKZ4okq.js} +1 -1
  177. package/dist/client/assets/{mock-board-CL5PjuNr.js → mock-board-N392Vku2.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-CQ53ujnX.js → monaco-editor-2Ci5R71u.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-CeE5cdl8.js → monitoring-stats-row-BbxkYAB2.js} +1 -1
  180. package/dist/client/assets/{multi-select-Bb_75Kq_.js → multi-select-CNHwKIXn.js} +1 -1
  181. package/dist/client/assets/{mustache-CQikKf57.js → mustache-B7TZyK91.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-CIdD-M5h.js → new-project-dialog-C5lJfUJ3.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-D5OtWQot.js → oauth-callback-DGtqmz9D.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-mYrYVnqt.js → oauth-callback-ai-provider-Bhuh08e8.js} +1 -1
  185. package/dist/client/assets/{onboarding-s-Aq6pC0.js → onboarding-D55kfuiq.js} +1 -1
  186. package/dist/client/assets/openai-conversation-C4Qt6S-l.js +3 -0
  187. package/dist/client/assets/{optimistic-project-sidebar-views-DfaNoant.js → optimistic-project-sidebar-views-CoZosNmn.js} +1 -1
  188. package/dist/client/assets/{organization-choice-DUpINEOM.js → organization-choice-CUxHZSL3.js} +1 -1
  189. package/dist/client/assets/{orgs-NyCttTtW.js → orgs-CPCdS87I.js} +1 -1
  190. package/dist/client/assets/{page-seo-form-BcwaLsu1.js → page-seo-form-DdXyS1MG.js} +1 -1
  191. package/dist/client/assets/{pair-C-wmghxs.js → pair-DjM6V7aG.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-Dz96Ryba.js → plan-ladder-gwROOTzi.js} +1 -1
  193. package/dist/client/assets/{popover-BJjSe4oX.js → popover-MLSOZysn.js} +1 -1
  194. package/dist/client/assets/post-calendar-Dr7XWigd.js +1 -0
  195. package/dist/client/assets/{post-editor-DUzLhnjz.js → post-editor-CKCVg_my.js} +2 -2
  196. package/dist/client/assets/{preview-content-DLzimxeU.js → preview-content-Cuq13S1x.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-feNNzmyD.js → preview-dialog-CP7wwQxY.js} +1 -1
  198. package/dist/client/assets/{preview-panel-CYRzCG9l.js → preview-panel-DFRYD57I.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-DCoADulv.js → product-picker-dialog-DuFOtAE-.js} +1 -1
  200. package/dist/client/assets/{profile-C4WMC8IX.js → profile-E9E7lNqo.js} +1 -1
  201. package/dist/client/assets/{project-app-view-CLP8CgRj.js → project-app-view-CqnnpjCc.js} +1 -1
  202. package/dist/client/assets/{project-feed-o8j1clyL.js → project-feed-DI26nV5j.js} +1 -1
  203. package/dist/client/assets/{project-icon-DyrKdiRe.js → project-icon-DsUbDdQC.js} +1 -1
  204. package/dist/client/assets/project-reports-UVwSbHHJ.js +1 -0
  205. package/dist/client/assets/project-tasks-DuMsfpY5.js +1 -0
  206. package/dist/client/assets/{projects-DEh_o8C9.js → projects-CdLu99l3.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-Cdl4kOQ1.js → projects-empty-state-CO-mNXLv.js} +1 -1
  208. package/dist/client/assets/{prompts-Bc9FLvmN.js → prompts-CGIibyOn.js} +1 -1
  209. package/dist/client/assets/record-editor-ceYt0p4C.js +1 -0
  210. package/dist/client/assets/redirect-editor-Ca575ToY.js +1 -0
  211. package/dist/client/assets/{reports-oNZDdjI5.js → reports-CKJQ8Zdg.js} +1 -1
  212. package/dist/client/assets/{reports-onboarding-DetN93z1.js → reports-onboarding-UAs51Fs-.js} +1 -1
  213. package/dist/client/assets/{reports-tab-ChGluXDr.js → reports-tab-D-UL6Cu0.js} +2 -2
  214. package/dist/client/assets/reports-y_yDpDn4.js +1 -0
  215. package/dist/client/assets/{repositories-CiOfBaLB.js → repositories-8LjwXVAZ.js} +1 -1
  216. package/dist/client/assets/{repository-binding-BGLfNZVf.js → repository-binding-BTsmo_dA.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-CglAAV-N.js → repository-import-picker-D5xDiyD_.js} +1 -1
  218. package/dist/client/assets/{repository-picker-Cn86nava.js → repository-picker-DExxlkis.js} +1 -1
  219. package/dist/client/assets/{require-capability-DvSGwHTo.js → require-capability-DJr1iBd_.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-YTpcWMST.js → required-auth-layout-Dzef4Ao1.js} +1 -1
  221. package/dist/client/assets/{reset-password-oN8mFGBD.js → reset-password-CWozFngH.js} +1 -1
  222. package/dist/client/assets/{resizable-BGEY0EFD.js → resizable-UTJFKDGm.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-voZLivWv.js → resolve-tab-icon-DqCiaIA7.js} +1 -1
  224. package/dist/client/assets/{review-settings-DetXY7FI.js → review-settings-THwrc5M3.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-CI2Op3JZ.js → rich-text-link-control-CNQ92nZ4.js} +1 -1
  226. package/dist/client/assets/{roles-DUajMmJL.js → roles-D_wIHL0X.js} +1 -1
  227. package/dist/client/assets/route-CfEJDbbT.js +1 -0
  228. package/dist/client/assets/{route-DJLRE8ic.js → route-DD4978oF.js} +1 -1
  229. package/dist/client/assets/route-e2YuR4Xl.js +1 -0
  230. package/dist/client/assets/{runnable-block-editor-4vBz623-.js → runnable-block-editor-fWbFWGvz.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-C_3fMqSf.js → sandbox-lifecycle-context-C25F7mSK.js} +1 -1
  232. package/dist/client/assets/schema-BKM3gR2B.js +1 -0
  233. package/dist/client/assets/{schema-DAiRf49Q.js → schema-kVE-1hbs.js} +1 -1
  234. package/dist/client/assets/{scroll-area-D8pwM87R.js → scroll-area-1S72VGW0.js} +1 -1
  235. package/dist/client/assets/{search-input-BADdEzRB.js → search-input-pTAwOtCG.js} +1 -1
  236. package/dist/client/assets/{search-toggle-BXsTAhJH.js → search-toggle-DAU6nVmU.js} +1 -1
  237. package/dist/client/assets/{secret-picker-DYQ3Y0hB.js → secret-picker-CDYFp1fc.js} +1 -1
  238. package/dist/client/assets/{secrets-DkldztQE.js → secrets-B0srIKJq.js} +1 -1
  239. package/dist/client/assets/{sections-editor-C-qAs9t3.js → sections-editor-B5MFR1yl.js} +2 -2
  240. package/dist/client/assets/{select-DoctMyOC.js → select-WviNHwZD.js} +1 -1
  241. package/dist/client/assets/{select-model-Coln0RuO.js → select-model-cTObTD6V.js} +1 -1
  242. package/dist/client/assets/seo-editor-DCKDCOQr.js +1 -0
  243. package/dist/client/assets/{separator-B4WfBd40.js → separator-DHqK6uc1.js} +1 -1
  244. package/dist/client/assets/{settings-tab-DFn-ybRc.js → settings-tab-fdKZYnq9.js} +1 -1
  245. package/dist/client/assets/{sheet-B6SnxCii.js → sheet-CZiDNUQZ.js} +1 -1
  246. package/dist/client/assets/{shell-layout-_gLI3g1W.js → shell-layout-Bk6uPKMe.js} +1 -1
  247. package/dist/client/assets/{skills-gj8cVLsz.js → skills-Bhf5PJUl.js} +1 -1
  248. package/dist/client/assets/{slider-DN1_RJ5Y.js → slider-gvEbcdOp.js} +1 -1
  249. package/dist/client/assets/{sortable.esm-39sGMg0A.js → sortable.esm-h3AYG-u7.js} +1 -1
  250. package/dist/client/assets/{sso-CMGxfocU.js → sso-B6q4MTEL.js} +1 -1
  251. package/dist/client/assets/{suggestion-DPIiudVw.js → suggestion-C591DFAx.js} +1 -1
  252. package/dist/client/assets/{switch-CXuIYT9e.js → switch-CUK4V52q.js} +1 -1
  253. package/dist/client/assets/{symbol-CTW82RbO.js → symbol-BQaHJ_MF.js} +1 -1
  254. package/dist/client/assets/{synced-repos-DAtDW7FL.js → synced-repos-BbxE1rvi.js} +1 -1
  255. package/dist/client/assets/{tab-icon-glyph-BkQvbqzH.js → tab-icon-glyph-D8Um0oDf.js} +1 -1
  256. package/dist/client/assets/{table-1p2TxQNp.js → table-Dsl6wBVe.js} +1 -1
  257. package/dist/client/assets/{tabs-CpwN-luG.js → tabs-BXhvcQgN.js} +1 -1
  258. package/dist/client/assets/{task-board-BR1DvBwF.js → task-board-kbcRVMI1.js} +1 -1
  259. package/dist/client/assets/{task-route-C_DvpiOV.js → task-route-BPrIj9mX.js} +1 -1
  260. package/dist/client/assets/{task-status-edWeKF1d.js → task-status-codqNsI7.js} +1 -1
  261. package/dist/client/assets/taskboard-analytics-xeHAgwnO.js +1 -0
  262. package/dist/client/assets/tasks-Ba-oyyIK.js +1 -0
  263. package/dist/client/assets/{tasks-0Nq-zOga.js → tasks-J75byAMf.js} +1 -1
  264. package/dist/client/assets/{textarea-BfwTTa-d.js → textarea-DvoMwt1e.js} +1 -1
  265. package/dist/client/assets/{thread-analytics-CopoUn-p.js → thread-analytics-C0BM4p9K.js} +1 -1
  266. package/dist/client/assets/{thread-button-D0jo5h0y.js → thread-button-DKjUerzt.js} +1 -1
  267. package/dist/client/assets/{thread-intent-CgK6_lx2.js → thread-intent-CG-CCDLs.js} +1 -1
  268. package/dist/client/assets/{thread-route-CgdmmioO.js → thread-route-CR0TIP8s.js} +1 -1
  269. package/dist/client/assets/{thread-route-B6Fc_RFE.js → thread-route-DvTW6luy.js} +1 -1
  270. package/dist/client/assets/{thread-sheet-body-BK4lUe-W.js → thread-sheet-body-BAmHmw0m.js} +1 -1
  271. package/dist/client/assets/{time-range-picker-_BVYixos.js → time-range-picker-CPMdzMas.js} +1 -1
  272. package/dist/client/assets/{toggle-group-DLHDaWVo.js → toggle-group-Q9SREgL7.js} +1 -1
  273. package/dist/client/assets/{tool-namespace-BPLgX6r-.js → tool-namespace-uRsPbj-p.js} +1 -1
  274. package/dist/client/assets/{toolbar-icon-button-C_OqF99U.js → toolbar-icon-button-Djr5zvaV.js} +1 -1
  275. package/dist/client/assets/{tooltip-Dz-qpzYY.js → tooltip-COqLwkid.js} +1 -1
  276. package/dist/client/assets/{tooltipContext-C5rFwURT.js → tooltipContext-DDD6cP5q.js} +1 -1
  277. package/dist/client/assets/{track-D8_YlvuV.js → track-DG4JP_WA.js} +1 -1
  278. package/dist/client/assets/{types-C-bGWQ4N.js → types-C5SQt0XZ.js} +1 -1
  279. package/dist/client/assets/{url-slug-DnJTGqgD.js → url-slug-CUhgOgGc.js} +1 -1
  280. package/dist/client/assets/{usage-stats-Dskh866S.js → usage-stats-CAukzrpg.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-BAXvzpWI.js → use-ai-providers-IjG3zzka.js} +1 -1
  282. package/dist/client/assets/{use-automations-jtpzDfwI.js → use-automations-Dt8Ypk0g.js} +1 -1
  283. package/dist/client/assets/{use-autosave-SKFoSjPt.js → use-autosave-CiBl7wSO.js} +1 -1
  284. package/dist/client/assets/{use-chat-layout-state-CA9xW2qA.js → use-chat-layout-state-CVkPEEUs.js} +1 -1
  285. package/dist/client/assets/{use-chat-navigation-BYokh2PZ.js → use-chat-navigation-DLnmXNT9.js} +1 -1
  286. package/dist/client/assets/{use-clock-tick-D_sbvWIH.js → use-clock-tick-zaL95TTy.js} +1 -1
  287. package/dist/client/assets/{use-connect-companion-5bDO4jQu.js → use-connect-companion-CRI0nNcp.js} +1 -1
  288. package/dist/client/assets/{use-connection-BIx1BUIM.js → use-connection-gMb_8zEe.js} +1 -1
  289. package/dist/client/assets/{use-copy-Da7eNVy9.js → use-copy-2j0k06rN.js} +1 -1
  290. package/dist/client/assets/{use-create-virtual-mcp-ejJy1cdv.js → use-create-virtual-mcp-Bz6TE2Qz.js} +1 -1
  291. package/dist/client/assets/{use-date-fns-locale-CaWCAmJI.js → use-date-fns-locale-BPq8VLDt.js} +1 -1
  292. package/dist/client/assets/{use-debounced-autosave-DugSqk23.js → use-debounced-autosave-CMA_1eXM.js} +1 -1
  293. package/dist/client/assets/{use-debounced-value-DpRvXYf_.js → use-debounced-value-Dju-tMu1.js} +1 -1
  294. package/dist/client/assets/{use-deco-credits-rm4q7hjq.js → use-deco-credits-BtvhFk4m.js} +1 -1
  295. package/dist/client/assets/{use-decopilot-events-DzS1GTJA.js → use-decopilot-events-D8zpT0sX.js} +1 -1
  296. package/dist/client/assets/{use-delete-connection-CveANzdS.js → use-delete-connection-BXDiC_mk.js} +1 -1
  297. package/dist/client/assets/{use-deployment-admin-Dtf1f6in.js → use-deployment-admin-CXT7CFHy.js} +1 -1
  298. package/dist/client/assets/{use-ensure-project-folder-DnwLT6n2.js → use-ensure-project-folder-CqaPdVz-.js} +1 -1
  299. package/dist/client/assets/{use-fast-preview-draft-url-gddbB98r.js → use-fast-preview-draft-url-DlLnA8PJ.js} +1 -1
  300. package/dist/client/assets/{use-file-configs-Cs5X6vH_.js → use-file-configs-BSnoYr1R.js} +1 -1
  301. package/dist/client/assets/{use-infinite-scroll-DzEoSjmb.js → use-infinite-scroll-CtScOz_h.js} +1 -1
  302. package/dist/client/assets/{use-join-requests-BFtEcuZ5.js → use-join-requests-CccLwL3-.js} +1 -1
  303. package/dist/client/assets/{use-main-panel-tabs-D3i-CtUA.js → use-main-panel-tabs-O3Jy3Qh8.js} +1 -1
  304. package/dist/client/assets/{use-mcp-auth-status-DBZY5zBR.js → use-mcp-auth-status-Is2pR00q.js} +1 -1
  305. package/dist/client/assets/{use-mcp-client-Dii6HKbn.js → use-mcp-client-DuTNn1dc.js} +1 -1
  306. package/dist/client/assets/{use-mcp-prompts-BrfI-bT0.js → use-mcp-prompts-3vLSpQqZ.js} +1 -1
  307. package/dist/client/assets/{use-mcp-tools-DvCI3rin.js → use-mcp-tools-CA6Ri5UK.js} +1 -1
  308. package/dist/client/assets/{use-members-Clb4I0WG.js → use-members-BqWTpMNp.js} +1 -1
  309. package/dist/client/assets/{use-mobile-H9hGbUdK.js → use-mobile-Di3PCVWm.js} +1 -1
  310. package/dist/client/assets/{use-navigate-to-agent-C_Bk-WTy.js → use-navigate-to-agent-Cu9cZhs8.js} +1 -1
  311. package/dist/client/assets/use-new-blocks-editor-D9sV9o2T.js +1 -0
  312. package/dist/client/assets/{use-open-billing-url-CsVJpAR8.js → use-open-billing-url-sjDwQSEM.js} +1 -1
  313. package/dist/client/assets/{use-org-auth-client-CGnpmIwt.js → use-org-auth-client-DIUzAE5u.js} +1 -1
  314. package/dist/client/assets/{use-org-fs-090kBeGb.js → use-org-fs-DOu4nQSr.js} +1 -1
  315. package/dist/client/assets/{use-org-repo-syncs-CXYmF8vW.js → use-org-repo-syncs-BhJEcVcm.js} +1 -1
  316. package/dist/client/assets/{use-org-sso-D0pRb0h2.js → use-org-sso-B57pfGVG.js} +1 -1
  317. package/dist/client/assets/{use-organization-roles-2XHDK9nW.js → use-organization-roles-DDnFx_jd.js} +1 -1
  318. package/dist/client/assets/{use-organization-settings-BCnCWSM4.js → use-organization-settings-BOGRgJjV.js} +1 -1
  319. package/dist/client/assets/{use-panel-navigate-CzmyA3PY.js → use-panel-navigate-c5H4a21L.js} +1 -1
  320. package/dist/client/assets/{use-project-scope-0DIp_prZ.js → use-project-scope-A4YCdR4N.js} +1 -1
  321. package/dist/client/assets/{use-releases-CA_rM0y-.js → use-releases-BmeSCMgM.js} +1 -1
  322. package/dist/client/assets/{use-reports-diagnostic-Nc7WKzHO.js → use-reports-diagnostic-Dw_QzpEb.js} +1 -1
  323. package/dist/client/assets/{use-sandbox-events-CUG13fIj.js → use-sandbox-events-hhwp2IWJ.js} +1 -1
  324. package/dist/client/assets/{use-secrets-CAgjCyZi.js → use-secrets-BwPjhWC0.js} +1 -1
  325. package/dist/client/assets/{use-section-preview-base-nZ_rR067.js → use-section-preview-base-B7bjCuOw.js} +1 -1
  326. package/dist/client/assets/{use-tags-Cx_sTi85.js → use-tags-Ce3D-sM7.js} +1 -1
  327. package/dist/client/assets/{use-task-board-analytics-HMQ395Ct.js → use-task-board-analytics-BR7NSR26.js} +1 -1
  328. package/dist/client/assets/{use-task-board-events-BIxyvwMu.js → use-task-board-events-BBlz-cBe.js} +1 -1
  329. package/dist/client/assets/{use-task-board-item-prs-C-ZolRBO.js → use-task-board-item-prs-BzAFAQp8.js} +1 -1
  330. package/dist/client/assets/{use-task-board-items-fJTXcazL.js → use-task-board-items-DTbT7rEp.js} +1 -1
  331. package/dist/client/assets/{use-task-metadata-BGRg9gqV.js → use-task-metadata-CBQ5Muu5.js} +1 -1
  332. package/dist/client/assets/{use-thread-analytics-CNHU0H7W.js → use-thread-analytics-CeuE3odS.js} +1 -1
  333. package/dist/client/assets/{use-thread-outputs-BdDJ85ic.js → use-thread-outputs-c6b1HaAz.js} +1 -1
  334. package/dist/client/assets/useInfiniteQuery-DeMEFTdd.js +1 -0
  335. package/dist/client/assets/{useQueries-SbEnc9zP.js → useQueries-BliyNTtT.js} +1 -1
  336. package/dist/client/assets/useSuspenseInfiniteQuery-CUkGf5w6.js +1 -0
  337. package/dist/client/assets/{users-DAar6oNb.js → users-CsvLtEUJ.js} +1 -1
  338. package/dist/client/assets/{utils-B82E0qSP.js → utils-DHYRJNUn.js} +1 -1
  339. package/dist/client/assets/variant-calendar-CKqGYdH4.js +1 -0
  340. package/dist/client/assets/{variant-matcher-override-CUEPR4IO.js → variant-matcher-override-uklREcGs.js} +1 -1
  341. package/dist/client/assets/{view-mode-toggle-0buE2kLD.js → view-mode-toggle-B55pxnK_.js} +1 -1
  342. package/dist/client/assets/{virtual-mcp-IOrpgzuz.js → virtual-mcp-DFjD0qBz.js} +1 -1
  343. package/dist/client/assets/{watch-sse-pool-BFh4zrHL.js → watch-sse-pool-B66Eygyb.js} +1 -1
  344. package/dist/client/index.html +1 -1
  345. package/dist/server/server.js +1 -1
  346. package/package.json +1 -1
  347. package/dist/client/assets/add-connection-dialog-C99-KIxD.js +0 -1
  348. package/dist/client/assets/agent-analytics-DezOg4iq.js +0 -2
  349. package/dist/client/assets/agent-app-OwJ0X9iQ.js +0 -1
  350. package/dist/client/assets/agent-assets-DtBwQzpc.js +0 -1
  351. package/dist/client/assets/agent-deck-CVQI0IJ8.js +0 -1
  352. package/dist/client/assets/agent-e2e-Cf-7o5JH.js +0 -1
  353. package/dist/client/assets/agent-experiments-BjOexOgL.js +0 -1
  354. package/dist/client/assets/agent-file-CVJUPUB9.js +0 -1
  355. package/dist/client/assets/agent-hosting-DJ5loXp1.js +0 -1
  356. package/dist/client/assets/agent-library-DMvAbH9s.js +0 -1
  357. package/dist/client/assets/agent-library-file-B-EjZyU3.js +0 -1
  358. package/dist/client/assets/agent-monitor-CwvDQf-0.js +0 -1
  359. package/dist/client/assets/agent-settings-S4roascd.js +0 -1
  360. package/dist/client/assets/agent-site-editor-code-DsF3btqi.js +0 -2
  361. package/dist/client/assets/agent-view-DNsQvn8c.js +0 -1
  362. package/dist/client/assets/api-keys-BFo2F8un.js +0 -1
  363. package/dist/client/assets/app-editor-CLedpfSA.js +0 -1
  364. package/dist/client/assets/category-editor-Dh4k-2za.js +0 -1
  365. package/dist/client/assets/collection-detail-BVfokcci.js +0 -1
  366. package/dist/client/assets/connection-detail-Cx1TsCEV.js +0 -1
  367. package/dist/client/assets/connection-form-helpers-D5AT-OBk.js +0 -1
  368. package/dist/client/assets/connections-DEMu2UYi.js +0 -1
  369. package/dist/client/assets/context-B4AjxGVI.js +0 -1
  370. package/dist/client/assets/flat-project-C0OkliLB.js +0 -1
  371. package/dist/client/assets/home-DNlj1vDz.js +0 -1
  372. package/dist/client/assets/index-DC6iJbGF.js +0 -26
  373. package/dist/client/assets/library-DUvGua8d.js +0 -1
  374. package/dist/client/assets/openai-conversation-D0sRUrnM.js +0 -3
  375. package/dist/client/assets/post-calendar-Dd7Rx0Y2.js +0 -1
  376. package/dist/client/assets/project-reports-5Kg7yDsr.js +0 -1
  377. package/dist/client/assets/project-tasks-C93fh75m.js +0 -1
  378. package/dist/client/assets/record-editor-B_D1bdnj.js +0 -1
  379. package/dist/client/assets/redirect-editor-CwqE3fJt.js +0 -1
  380. package/dist/client/assets/reports-Bmm0luQ2.js +0 -1
  381. package/dist/client/assets/route-Frsbu1bb.js +0 -1
  382. package/dist/client/assets/route-JSQmVwkK.js +0 -1
  383. package/dist/client/assets/seo-editor-AS6vQaHK.js +0 -1
  384. package/dist/client/assets/taskboard-analytics-BKAHiV-A.js +0 -1
  385. package/dist/client/assets/tasks-CbEmZqW6.js +0 -1
  386. package/dist/client/assets/use-new-blocks-editor-ZHXdwaTL.js +0 -1
  387. package/dist/client/assets/useInfiniteQuery-DhuK1n82.js +0 -1
  388. package/dist/client/assets/useSuspenseInfiniteQuery-DmpJFLm-.js +0 -1
  389. package/dist/client/assets/variant-calendar-C_pGmhST.js +0 -1
@@ -1 +1 @@
1
- import{c as _,l as $,j as t,v as B,aK as R,s as O,q as M,D as q,b as H,d as K,a2 as W,F as G,af as I,ah as J,B as S}from"./index-CL22V9cU.js";import{u as Q,a as V,i as X,p as Y,b as Z,P as ee,f as te}from"./plan-ladder-Dz96Ryba.js";import{a as se}from"./use-decopilot-events-DzS1GTJA.js";function le(N){const e=_.c(37),{open:a,onDismiss:n,accentClassName:i,icon:E,title:s,description:P,highlights:D,price:v,action:k,dismissAction:A}=N,T=a===void 0?!0:a,y=i??"text-muted-foreground";let l;e[0]!==n?(l=w=>!w&&n?.(),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==y?(c=$("pointer-events-none",y),e[2]=y,e[3]=c):c=e[3];let h,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"absolute inset-x-0 top-0 h-60 opacity-60 dark:opacity-30",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, currentColor 0%, transparent 72%)"}}),b=t.jsx("div",{className:"absolute inset-x-8 top-0 h-px bg-gradient-to-r from-transparent via-current to-transparent opacity-80 dark:opacity-60"}),e[4]=h,e[5]=b):(h=e[4],b=e[5]);let o;e[6]!==c?(o=t.jsxs("div",{"aria-hidden":"true",className:c,children:[h,b]}),e[6]=c,e[7]=o):o=e[7];let r;e[8]!==E?(r=t.jsx("div",{className:"mb-7",children:E}),e[8]=E,e[9]=r):r=e[9];let p;e[10]!==s?(p=t.jsx(B,{className:"text-2xl font-semibold leading-tight tracking-tight text-balance",children:s}),e[10]=s,e[11]=p):p=e[11];let d;e[12]!==P?(d=P&&t.jsx(R,{className:"mx-auto max-w-[32ch] text-sm leading-relaxed text-pretty",children:P}),e[12]=P,e[13]=d):d=e[13];let m;e[14]!==p||e[15]!==d?(m=t.jsxs(O,{className:"gap-2",children:[p,d]}),e[14]=p,e[15]=d,e[16]=m):m=e[16];let g;e[17]!==D?(g=D&&t.jsx("div",{className:"mt-6 w-fit",children:D}),e[17]=D,e[18]=g):g=e[18];let u;e[19]!==v?(u=v&&t.jsx("div",{className:"mt-7",children:v}),e[19]=v,e[20]=u):u=e[20];let x;e[21]!==k||e[22]!==A?(x=t.jsxs("div",{className:"mt-8 flex w-full flex-col items-center gap-2",children:[k,A]}),e[21]=k,e[22]=A,e[23]=x):x=e[23];let f;e[24]!==m||e[25]!==g||e[26]!==u||e[27]!==x||e[28]!==r?(f=t.jsxs("div",{className:"flex flex-col items-center px-8 pt-10 pb-8 text-center",children:[r,m,g,u,x]}),e[24]=m,e[25]=g,e[26]=u,e[27]=x,e[28]=r,e[29]=f):f=e[29];let j;e[30]!==f||e[31]!==o?(j=t.jsxs(M,{className:"gap-0 overflow-hidden p-0 sm:max-w-[480px]",onOpenAutoFocus:ae,children:[o,f]}),e[30]=f,e[31]=o,e[32]=j):j=e[32];let C;return e[33]!==T||e[34]!==j||e[35]!==l?(C=t.jsx(q,{open:T,onOpenChange:l,children:j}),e[33]=T,e[34]=j,e[35]=l,e[36]=C):C=e[36],C}function ae(N){return N.preventDefault()}function ne(N,e){if(!N||!e)return null;const a=N.findIndex(i=>i.id===e)+1,n=a>0?N[a]:void 0;return n?{plan:n,index:a}:null}const U={kanban:["settings.paywall.bullets.kanban.1","settings.paywall.bullets.kanban.2","settings.paywall.bullets.kanban.3"],cms:["settings.paywall.bullets.cms.1","settings.paywall.bullets.cms.2","settings.paywall.bullets.cms.3"],monitoring:["settings.paywall.bullets.monitoring.1","settings.paywall.bullets.monitoring.2","settings.paywall.bullets.monitoring.3"]},ie=["settings.paywall.bullets.allowance.1","settings.paywall.bullets.allowance.2","settings.paywall.bullets.allowance.3"];function pe(N){const e=_.c(45),{feature:a,copy:n,onDismiss:i,onSeePlans:E}=N,s=H(),P=K(),{org:D}=W(),{data:v}=Q(),{data:k}=se(),{data:A}=V(),[T]=G();let y,l,c,h,b,o,r,p;if(e[0]!==n||e[1]!==k?.plan.id||e[2]!==a||e[3]!==i||e[4]!==v||e[5]!==A||e[6]!==s){const C=s(`settings.planUsage.feature.${a}`),w=X(k?.plan.id)?null:n?ne(v,k?.plan.id):Y(v,a),z=w?Z(w.index):void 0;l=w?A?.[w.plan.id]:void 0;const L=n?ie:a in U?U[a]:null;y=le,c=i,h=z,b=w?t.jsx(ee,{index:w.index,className:"size-20"}):t.jsx(I,{className:"size-12 text-muted-foreground"}),o=n?.title??(w?s("settings.paywall.upgradeTitle",{plan:w.plan.name,feature:C}):C),r=n?.description??(L?void 0:w?s("settings.paywall.upgradeDescription"):s("settings.paywall.description",{feature:C})),p=L&&t.jsx("ul",{className:"flex flex-col gap-2.5 text-left",children:L.map(F=>t.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[t.jsx(J,{size:16,className:$("shrink-0",z)}),t.jsx("span",{children:s(F)})]},F))}),e[0]=n,e[1]=k?.plan.id,e[2]=a,e[3]=i,e[4]=v,e[5]=A,e[6]=s,e[7]=y,e[8]=l,e[9]=c,e[10]=h,e[11]=b,e[12]=o,e[13]=r,e[14]=p}else y=e[7],l=e[8],c=e[9],h=e[10],b=e[11],o=e[12],r=e[13],p=e[14];let d;e[15]!==T||e[16]!==l||e[17]!==s?(d=l!==void 0?t.jsxs("span",{className:"flex items-baseline justify-center gap-1.5",children:[t.jsx("span",{className:"text-2xl font-semibold tabular-nums tracking-tight",children:te(l,T.language)}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("settings.plans.perMonth")})]}):void 0,e[15]=T,e[16]=l,e[17]=s,e[18]=d):d=e[18];let m;e[19]!==P||e[20]!==i||e[21]!==E||e[22]!==D.slug?(m=()=>{P({to:"/$org/settings/ai-providers",params:{org:D.slug}}),(E??i)?.()},e[19]=P,e[20]=i,e[21]=E,e[22]=D.slug,e[23]=m):m=e[23];let g;e[24]!==s?(g=s("settings.paywall.seePlans"),e[24]=s,e[25]=g):g=e[25];let u;e[26]!==m||e[27]!==g?(u=t.jsx(S,{size:"lg",className:"w-full",onClick:m,children:g}),e[26]=m,e[27]=g,e[28]=u):u=e[28];let x;e[29]!==s?(x=s("settings.paywall.dismiss"),e[29]=s,e[30]=x):x=e[30];let f;e[31]!==i||e[32]!==x?(f=t.jsx(S,{variant:"ghost",size:"lg",className:"w-full",onClick:i,children:x}),e[31]=i,e[32]=x,e[33]=f):f=e[33];let j;return e[34]!==y||e[35]!==c||e[36]!==u||e[37]!==f||e[38]!==h||e[39]!==b||e[40]!==o||e[41]!==r||e[42]!==p||e[43]!==d?(j=t.jsx(y,{onDismiss:c,accentClassName:h,icon:b,title:o,description:r,highlights:p,price:d,action:u,dismissAction:f}),e[34]=y,e[35]=c,e[36]=u,e[37]=f,e[38]=h,e[39]=b,e[40]=o,e[41]=r,e[42]=p,e[43]=d,e[44]=j):j=e[44],j}export{pe as F};
1
+ import{c as _,l as $,j as t,v as B,aK as R,s as O,q as M,D as q,b as H,d as K,a2 as W,F as G,af as I,ah as J,B as S}from"./index-bl_DQ3mH.js";import{u as Q,a as V,i as X,p as Y,b as Z,P as ee,f as te}from"./plan-ladder-gwROOTzi.js";import{a as se}from"./use-decopilot-events-D8zpT0sX.js";function le(N){const e=_.c(37),{open:a,onDismiss:n,accentClassName:i,icon:E,title:s,description:P,highlights:D,price:v,action:k,dismissAction:A}=N,T=a===void 0?!0:a,y=i??"text-muted-foreground";let l;e[0]!==n?(l=w=>!w&&n?.(),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==y?(c=$("pointer-events-none",y),e[2]=y,e[3]=c):c=e[3];let h,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"absolute inset-x-0 top-0 h-60 opacity-60 dark:opacity-30",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, currentColor 0%, transparent 72%)"}}),b=t.jsx("div",{className:"absolute inset-x-8 top-0 h-px bg-gradient-to-r from-transparent via-current to-transparent opacity-80 dark:opacity-60"}),e[4]=h,e[5]=b):(h=e[4],b=e[5]);let o;e[6]!==c?(o=t.jsxs("div",{"aria-hidden":"true",className:c,children:[h,b]}),e[6]=c,e[7]=o):o=e[7];let r;e[8]!==E?(r=t.jsx("div",{className:"mb-7",children:E}),e[8]=E,e[9]=r):r=e[9];let p;e[10]!==s?(p=t.jsx(B,{className:"text-2xl font-semibold leading-tight tracking-tight text-balance",children:s}),e[10]=s,e[11]=p):p=e[11];let d;e[12]!==P?(d=P&&t.jsx(R,{className:"mx-auto max-w-[32ch] text-sm leading-relaxed text-pretty",children:P}),e[12]=P,e[13]=d):d=e[13];let m;e[14]!==p||e[15]!==d?(m=t.jsxs(O,{className:"gap-2",children:[p,d]}),e[14]=p,e[15]=d,e[16]=m):m=e[16];let g;e[17]!==D?(g=D&&t.jsx("div",{className:"mt-6 w-fit",children:D}),e[17]=D,e[18]=g):g=e[18];let u;e[19]!==v?(u=v&&t.jsx("div",{className:"mt-7",children:v}),e[19]=v,e[20]=u):u=e[20];let x;e[21]!==k||e[22]!==A?(x=t.jsxs("div",{className:"mt-8 flex w-full flex-col items-center gap-2",children:[k,A]}),e[21]=k,e[22]=A,e[23]=x):x=e[23];let f;e[24]!==m||e[25]!==g||e[26]!==u||e[27]!==x||e[28]!==r?(f=t.jsxs("div",{className:"flex flex-col items-center px-8 pt-10 pb-8 text-center",children:[r,m,g,u,x]}),e[24]=m,e[25]=g,e[26]=u,e[27]=x,e[28]=r,e[29]=f):f=e[29];let j;e[30]!==f||e[31]!==o?(j=t.jsxs(M,{className:"gap-0 overflow-hidden p-0 sm:max-w-[480px]",onOpenAutoFocus:ae,children:[o,f]}),e[30]=f,e[31]=o,e[32]=j):j=e[32];let C;return e[33]!==T||e[34]!==j||e[35]!==l?(C=t.jsx(q,{open:T,onOpenChange:l,children:j}),e[33]=T,e[34]=j,e[35]=l,e[36]=C):C=e[36],C}function ae(N){return N.preventDefault()}function ne(N,e){if(!N||!e)return null;const a=N.findIndex(i=>i.id===e)+1,n=a>0?N[a]:void 0;return n?{plan:n,index:a}:null}const U={kanban:["settings.paywall.bullets.kanban.1","settings.paywall.bullets.kanban.2","settings.paywall.bullets.kanban.3"],cms:["settings.paywall.bullets.cms.1","settings.paywall.bullets.cms.2","settings.paywall.bullets.cms.3"],monitoring:["settings.paywall.bullets.monitoring.1","settings.paywall.bullets.monitoring.2","settings.paywall.bullets.monitoring.3"]},ie=["settings.paywall.bullets.allowance.1","settings.paywall.bullets.allowance.2","settings.paywall.bullets.allowance.3"];function pe(N){const e=_.c(45),{feature:a,copy:n,onDismiss:i,onSeePlans:E}=N,s=H(),P=K(),{org:D}=W(),{data:v}=Q(),{data:k}=se(),{data:A}=V(),[T]=G();let y,l,c,h,b,o,r,p;if(e[0]!==n||e[1]!==k?.plan.id||e[2]!==a||e[3]!==i||e[4]!==v||e[5]!==A||e[6]!==s){const C=s(`settings.planUsage.feature.${a}`),w=X(k?.plan.id)?null:n?ne(v,k?.plan.id):Y(v,a),z=w?Z(w.index):void 0;l=w?A?.[w.plan.id]:void 0;const L=n?ie:a in U?U[a]:null;y=le,c=i,h=z,b=w?t.jsx(ee,{index:w.index,className:"size-20"}):t.jsx(I,{className:"size-12 text-muted-foreground"}),o=n?.title??(w?s("settings.paywall.upgradeTitle",{plan:w.plan.name,feature:C}):C),r=n?.description??(L?void 0:w?s("settings.paywall.upgradeDescription"):s("settings.paywall.description",{feature:C})),p=L&&t.jsx("ul",{className:"flex flex-col gap-2.5 text-left",children:L.map(F=>t.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[t.jsx(J,{size:16,className:$("shrink-0",z)}),t.jsx("span",{children:s(F)})]},F))}),e[0]=n,e[1]=k?.plan.id,e[2]=a,e[3]=i,e[4]=v,e[5]=A,e[6]=s,e[7]=y,e[8]=l,e[9]=c,e[10]=h,e[11]=b,e[12]=o,e[13]=r,e[14]=p}else y=e[7],l=e[8],c=e[9],h=e[10],b=e[11],o=e[12],r=e[13],p=e[14];let d;e[15]!==T||e[16]!==l||e[17]!==s?(d=l!==void 0?t.jsxs("span",{className:"flex items-baseline justify-center gap-1.5",children:[t.jsx("span",{className:"text-2xl font-semibold tabular-nums tracking-tight",children:te(l,T.language)}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("settings.plans.perMonth")})]}):void 0,e[15]=T,e[16]=l,e[17]=s,e[18]=d):d=e[18];let m;e[19]!==P||e[20]!==i||e[21]!==E||e[22]!==D.slug?(m=()=>{P({to:"/$org/settings/ai-providers",params:{org:D.slug}}),(E??i)?.()},e[19]=P,e[20]=i,e[21]=E,e[22]=D.slug,e[23]=m):m=e[23];let g;e[24]!==s?(g=s("settings.paywall.seePlans"),e[24]=s,e[25]=g):g=e[25];let u;e[26]!==m||e[27]!==g?(u=t.jsx(S,{size:"lg",className:"w-full",onClick:m,children:g}),e[26]=m,e[27]=g,e[28]=u):u=e[28];let x;e[29]!==s?(x=s("settings.paywall.dismiss"),e[29]=s,e[30]=x):x=e[30];let f;e[31]!==i||e[32]!==x?(f=t.jsx(S,{variant:"ghost",size:"lg",className:"w-full",onClick:i,children:x}),e[31]=i,e[32]=x,e[33]=f):f=e[33];let j;return e[34]!==y||e[35]!==c||e[36]!==u||e[37]!==f||e[38]!==h||e[39]!==b||e[40]!==o||e[41]!==r||e[42]!==p||e[43]!==d?(j=t.jsx(y,{onDismiss:c,accentClassName:h,icon:b,title:o,description:r,highlights:p,price:d,action:u,dismissAction:f}),e[34]=y,e[35]=c,e[36]=u,e[37]=f,e[38]=h,e[39]=b,e[40]=o,e[41]=r,e[42]=p,e[43]=d,e[44]=j):j=e[44],j}export{pe as F};
@@ -1,2 +1,2 @@
1
- import{c as Se,b as ve,r as f,j as s,I as Je,h as fe,v as It,aK as Gt,s as Vt,B as Ce,w as Bt,q as qt,D as Ht,l as xe,at as Wt,o as Qt,t as ee,K as Ze}from"./index-CL22V9cU.js";import{k as Ut,I as Xt,bE as Yt,bF as Jt}from"./agent-icon-CvfPq7BK.js";import{s as Zt}from"./XClose-CxTFVFLs.js";import{S as _t}from"./scroll-area-D8pwM87R.js";import{b as _e,T as et,a as tt}from"./tooltip-Dz-qpzYY.js";import{a as en}from"./chat-context-CQm-6egv.js";import{F as tn}from"./editor-ZVt04ZDu.js";import{a as nn}from"./shell-layout-_gLI3g1W.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{t as nt,f as rn}from"./sandbox-git-api-C7JbVL7R.js";import{A as sn,a as ln,b as on,c as an,g as cn,d as dn,e as fn,f as un}from"./alert-dialog-BoGCVrZa.js";import{a as pn,C as de,g as rt,b as xn,c as mn}from"./context-menu-CcSwK895.js";import{t as hn}from"./ChevronUp-BXbTXhXZ.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as bn,E as yn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Ke,m as De,g as Me,n as Ae,o as En,s as Cn,v as Sn,p as Oe,q as Ee,r as ze,u as vn,w as Fn,x as kn,y as Tn}from"./utils-B82E0qSP.js";import"./AlertCircle-DWGeVbRZ.js";import"./Tool01-CIRW7kd4.js";import"./ArrowUp-BmS2ipPe.js";import"./ArrowLeft-DKZiHtC9.js";import"./LinkBroken01-Shxg1MDA.js";import"./ShoppingBag01-DhBZJiPR.js";import"./ZoomOut-C7vMH9KG.js";import"./Building02-CmZEvaAI.js";import"./CheckCircle-Cxvlb0-w.js";import"./ChevronSelectorVertical-Cz_mr8Ub.js";import"./UserSquare--AVOLLKT.js";import"./Copy01-Daz7AFYE.js";import"./CreditCard01-BFLArPt1.js";import"./DotsVertical-B5WoSbKn.js";import"./Image01-6k6QI1dX.js";import"./Globe04-CHujm8Rh.js";import"./SwitchHorizontal01-CDaKlB_n.js";import"./Key01-BCUfWyre.js";import"./Link01-B2ZUVqeX.js";import"./Monitor01-C6hS1MDr.js";import"./Sun-BZz5Ay79.js";import"./Play-C5HXiIgy.js";import"./Plus-BGNNWymV.js";import"./SearchMd-CMyj3n9E.js";import"./Trash01-BJZRU-Yu.js";import"./Upload01-CdF0U1Ox.js";import"./User01-Swj6Wyaw.js";import"./Users01-BguvMR-H.js";import"./index-BdQq_4o_.js";import"./index-CIf_Fy0-.js";import"./use-panel-navigate-CzmyA3PY.js";import"./thread-route-CgdmmioO.js";import"./use-project-scope-0DIp_prZ.js";import"./repository-binding-BGLfNZVf.js";import"./use-mcp-client-Dii6HKbn.js";import"./auth-CtdecWhn.js";import"./autosend-Bed_2rHW.js";import"./thread-intent-CgK6_lx2.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BFh4zrHL.js";import"./task-board-BR1DvBwF.js";import"./schema-DAiRf49Q.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-DzS1GTJA.js";import"./use-ai-providers-BAXvzpWI.js";import"./use-chat-navigation-BYokh2PZ.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BCnCWSM4.js";import"./avatar-BWSDv40I.js";import"./use-clock-tick-D_sbvWIH.js";import"./command-psdI3Avp.js";import"./index-zHK7QZ16.js";import"./integration-icon-DO5tWS-C.js";import"./project-icon-DyrKdiRe.js";import"./new-project-dialog-CIdD-M5h.js";import"./label-CMx6o6z4.js";import"./repository-import-picker-CglAAV-N.js";import"./use-navigate-to-agent-C_Bk-WTy.js";import"./repository-picker-Cn86nava.js";import"./useInfiniteQuery-DhuK1n82.js";import"./infiniteQueryObserver-CkQRrcdR.js";import"./collection-search-BqrF-OSq.js";import"./use-debounced-value-DpRvXYf_.js";import"./required-auth-layout-YTpcWMST.js";import"./use-org-sso-D0pRb0h2.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(A){const e=Se.c(71),{open:p,mode:X,initialName:y,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=A,O=y===void 0?"":y,x=L===void 0?!1:L,a=ve(),[o,P]=f.useState(O),[Y,K]=f.useState(p),m=Rn[X];p!==Y&&(K(p),p&&P(O));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]!==m.titleKey||e[8]!==a?(S=a(m.titleKey),e[7]=m.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]!==m.descriptionKey||e[13]!==a?(D=a(m.descriptionKey),e[12]=m.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 b;e[23]!==a?(b=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=b):b=e[24];let k;e[25]!==b?(k=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:b}),e[25]=b,e[26]=k):k=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]!==m.placeholderKey||e[29]!==a?($=a(m.placeholderKey),e[28]=m.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]!==k||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[k,J]}),e[35]=k,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 T;e[43]!==a?(T=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=T):T=e[44];let W;e[45]!==x||e[46]!==I||e[47]!==T?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:x,children:T}),e[45]=x,e[46]=I,e[47]=T,e[48]=W):W=e[48];let M;e[49]!==x||e[50]!==o?(M=!o.trim()||x,e[49]=x,e[50]=o,e[51]=M):M=e[51];let Q;e[52]!==m.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(m.submitKey),e[52]=m.submitKey,e[53]=x,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==M||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:M,children:Q}),e[56]=M,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]!==p||e[69]!==V?(B=s.jsx(Ht,{open:p,onOpenChange:C,children:V}),e[67]=C,e[68]=p,e[69]=V,e[70]=B):B=e[70],B}function Pn(A){const e=Se.c(47),{deleteTarget:p,deleteDirtyPaths:X,fsActionPending:y,onOpenChange:N,onConfirm:L}=A,d=ve(),w=p?.kind==="directory",O=p!==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(sn,{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 Y=p?.name;let K;e[7]!==Y?(K=s.jsx("span",{className:"font-mono",children:Y}),e[7]=Y,e[8]=K):K=e[8];let m;e[9]!==w||e[10]!==d?(m=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=m):m=e[11];let c;e[12]!==X.length||e[13]!==d?(c=X.length>0&&s.jsxs(s.Fragment,{children:[" ",X.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:X.length})]}),e[12]=X.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==K||e[17]!==m||e[18]!==c?(C=s.jsxs(ln,{children:[P," ",K,m,c]}),e[15]=P,e[16]=K,e[17]=m,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(on,{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]!==y||e[26]!==R?(S=s.jsx(an,{disabled:y,children:R}),e[25]=y,e[26]=R,e[27]=S):S=e[27];const v=y||!p;let D;e[28]!==p||e[29]!==L?(D=H=>{H.preventDefault(),p&&L(p)},e[28]=p,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(cn,{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(dn,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let b;e[40]!==z||e[41]!==E?(b=s.jsxs(fn,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=b):b=e[42];let k;return e[43]!==N||e[44]!==O||e[45]!==b?(k=s.jsx(un,{open:O,onOpenChange:N,children:b}),e[43]=N,e[44]=O,e[45]=b,e[46]=k):k=e[46],k}const Kn="#d9a441";function Mn(A){const e=Se.c(63),{node:p,depth:X,isExpanded:y,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:O,onNewFile:x,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:Y,onDelete:K}=A,m=L===void 0?!1:L,c=ve(),C=p.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-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${X*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]!==O?(g=()=>{O(),w()},e[4]=w,e[5]=O,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==y||e[11]!==m?(E=C?s.jsxs(s.Fragment,{children:[m?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):y?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(Wt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(Ut,{size:16,className:"shrink-0",style:{color:Kn}})]}):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]=y,e[11]=m,e[12]=E):E=e[12];let b;e[13]!==p.name?(b=s.jsx("span",{className:"truncate",children:p.name}),e[13]=p.name,e[14]=b):b=e[14];let k;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==b?(k=s.jsx(pn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,b]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=b,e[20]=k):k=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 T;e[34]!==o||e[35]!==I?(T=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=T):T=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let M;e[39]!==P||e[40]!==W?(M=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=M):M=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]!==Y||e[46]!==G?(F=s.jsx(de,{onSelect:Y,children:G}),e[45]=Y,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]!==K||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:K,children:V}),e[50]=K,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==T||e[56]!==M||e[57]!==F||e[58]!==B?(U=s.jsxs(xn,{className:"w-52",children:[$,Z,_,T,M,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=T,e[56]=M,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==k?(te=s.jsxs(mn,{children:[k,U]}),e[60]=U,e[61]=k,e[62]=te):te=e[62],te}const st=200,An=2,On=250,it=200;function zn(A,e){return gn(A,e)}function $n(A){const e=Se.c(9),{text:p,query:X}=A;let y,N,L;if(e[0]!==X||e[1]!==p){const{leadingEllipsis:w,segments:O}=En(p,X);y="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=O.map(In),e[0]=X,e[1]=p,e[2]=y,e[3]=N,e[4]=L}else y=e[2],N=e[3],L=e[4];let d;return e[5]!==y||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:y,children:[N,L]}),e[5]=y,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(A,e){return A.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:A.text},e):s.jsx("span",{children:A.text},e)}function xs({orgSlug:A,virtualMcpId:e,branch:p,threadId:X,openPath:y}){const N={orgSlug:A,virtualMcpId:e,branch:p,threadId:X},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:O}=L,[x,a]=f.useState(new Set),[o,P]=f.useState(null),[Y,K]=f.useState(null),[m,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,b]=f.useState(!1),[k,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),T=f.useRef(0),W=f.useRef(null),M=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 M.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,me]=f.useState(null),{sendMessage:lt}=en(),{openSidePanel:ot}=nn(),he=Qt(),[q,re]=f.useState(null),[ke,Te]=f.useState(null),[ge,be]=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 ye(){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=kn(t);if(!n)return;const r=`${A}/${e}/${p}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(A,e,p)})}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 m.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}),K(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);K(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,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await ye(),re(null),pe(r)}async function pt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))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 ye(),re(null),a(l=>{const u=new Set(l);for(const le of Ae(r))u.add(le);return u.add(r),u}),K({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,O))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 ye(),re(null)}async function mt(t,n){be(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await ye(),Te(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{be(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}be(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await pt(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{be(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,bt]=f.useState(null),h=ve();if(y&&y!==gt){bt(y);const t=y;queueMicrotask(()=>{bn(t)&&pe(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!==T.current)return!1;let i=!1;return d(l=>{const u=n?Tn(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 yt(t){const n=Q.current.get(t);if(n)return n;const r=T.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===T.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(!Oe(t,M.current))return!1;I(n=>new Set(n).add(t));try{return await yt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(M.current);for(const i of Ae(n)){if(!Oe(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++T.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:yn});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),b(!1)}async function Nt(){const t=T.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 T.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??"")),b((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),b(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<An?(D(null),g(!1),b(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},On)}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;pe(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 rn(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 kt(t){P(t),K({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),me(null),m.includes(t)||c(n=>[...n,t]),qe(t)}function Tt(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(Oe(t,M.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=Ae(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),kt(t)}function pe(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Kt(){return Y?.kind==="directory"?Y.path:Y?.kind==="file"?De(Y.path):o?De(o):"/"}function Qe(t){const n=Kt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Mt=wn(w,O),Ue=jn(Mt,x),Le=R?.length??0,Xe=Nn(v??[]),Ye=v?.length??0,ce=o?oe.get(o):null,At=ce?.loaded&&ce.editorValue!==ce.savedContent,Ot=ke?dt(ke.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);me({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=Me(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,v as It,aK as Gt,s as Vt,B as Ce,w as Bt,q as qt,D as Ht,l as xe,at as Wt,o as Qt,t as ee,K as Ze}from"./index-bl_DQ3mH.js";import{k as Ut,I as Xt,bE as Yt,bF as Jt}from"./agent-icon-BdZdLCky.js";import{s as Zt}from"./XClose-BMDlg-34.js";import{S as _t}from"./scroll-area-1S72VGW0.js";import{b as _e,T as et,a as tt}from"./tooltip-COqLwkid.js";import{a as en}from"./chat-context-DszOftwV.js";import{F as tn}from"./editor-KeKsFC14.js";import{a as nn}from"./shell-layout-Bk6uPKMe.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{t as nt,f as rn}from"./sandbox-git-api-C7JbVL7R.js";import{A as sn,a as ln,b as on,c as an,g as cn,d as dn,e as fn,f as un}from"./alert-dialog-By0HRTrM.js";import{a as pn,C as de,g as rt,b as xn,c as mn}from"./context-menu-CYa4PKRJ.js";import{t as hn}from"./ChevronUp-BrMcnDd0.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as bn,E as yn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Ke,m as De,g as Me,n as Ae,o as En,s as Cn,v as Sn,p as Oe,q as Ee,r as ze,u as vn,w as Fn,x as kn,y as Tn}from"./utils-DHYRJNUn.js";import"./AlertCircle-BILwGqjV.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./LinkBroken01-BBYM52IU.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./UserSquare-BXjBRbTF.js";import"./Copy01-QpufVNbj.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Image01-D8Dg78Ju.js";import"./Globe04-C2IFbCwJ.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./Key01-CCpcNn9J.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Play-CIe1tupB.js";import"./Plus-DTyq8wfJ.js";import"./SearchMd-DnZ_sK_U.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./index-BdQq_4o_.js";import"./index-B5IA1qMq.js";import"./use-panel-navigate-c5H4a21L.js";import"./thread-route-CR0TIP8s.js";import"./use-project-scope-A4YCdR4N.js";import"./repository-binding-BTsmo_dA.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./autosend-Cr5TlS-x.js";import"./thread-intent-CG-CCDLs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B66Eygyb.js";import"./task-board-kbcRVMI1.js";import"./schema-kVE-1hbs.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-D8zpT0sX.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BOGRgJjV.js";import"./avatar-DNs314ny.js";import"./use-clock-tick-zaL95TTy.js";import"./command-DFd1c5Z5.js";import"./index-Dhdyv2s0.js";import"./integration-icon-DogZfPWq.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./label-Bqj_xjz9.js";import"./repository-import-picker-D5xDiyD_.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./repository-picker-DExxlkis.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./collection-search-q0ogFMFh.js";import"./use-debounced-value-Dju-tMu1.js";import"./required-auth-layout-Dzef4Ao1.js";import"./use-org-sso-B57pfGVG.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(A){const e=Se.c(71),{open:p,mode:X,initialName:y,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=A,O=y===void 0?"":y,x=L===void 0?!1:L,a=ve(),[o,P]=f.useState(O),[Y,K]=f.useState(p),m=Rn[X];p!==Y&&(K(p),p&&P(O));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]!==m.titleKey||e[8]!==a?(S=a(m.titleKey),e[7]=m.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]!==m.descriptionKey||e[13]!==a?(D=a(m.descriptionKey),e[12]=m.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 b;e[23]!==a?(b=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=b):b=e[24];let k;e[25]!==b?(k=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:b}),e[25]=b,e[26]=k):k=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]!==m.placeholderKey||e[29]!==a?($=a(m.placeholderKey),e[28]=m.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]!==k||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[k,J]}),e[35]=k,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 T;e[43]!==a?(T=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=T):T=e[44];let W;e[45]!==x||e[46]!==I||e[47]!==T?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:x,children:T}),e[45]=x,e[46]=I,e[47]=T,e[48]=W):W=e[48];let M;e[49]!==x||e[50]!==o?(M=!o.trim()||x,e[49]=x,e[50]=o,e[51]=M):M=e[51];let Q;e[52]!==m.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(m.submitKey),e[52]=m.submitKey,e[53]=x,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==M||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:M,children:Q}),e[56]=M,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]!==p||e[69]!==V?(B=s.jsx(Ht,{open:p,onOpenChange:C,children:V}),e[67]=C,e[68]=p,e[69]=V,e[70]=B):B=e[70],B}function Pn(A){const e=Se.c(47),{deleteTarget:p,deleteDirtyPaths:X,fsActionPending:y,onOpenChange:N,onConfirm:L}=A,d=ve(),w=p?.kind==="directory",O=p!==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(sn,{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 Y=p?.name;let K;e[7]!==Y?(K=s.jsx("span",{className:"font-mono",children:Y}),e[7]=Y,e[8]=K):K=e[8];let m;e[9]!==w||e[10]!==d?(m=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=m):m=e[11];let c;e[12]!==X.length||e[13]!==d?(c=X.length>0&&s.jsxs(s.Fragment,{children:[" ",X.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:X.length})]}),e[12]=X.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==K||e[17]!==m||e[18]!==c?(C=s.jsxs(ln,{children:[P," ",K,m,c]}),e[15]=P,e[16]=K,e[17]=m,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(on,{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]!==y||e[26]!==R?(S=s.jsx(an,{disabled:y,children:R}),e[25]=y,e[26]=R,e[27]=S):S=e[27];const v=y||!p;let D;e[28]!==p||e[29]!==L?(D=H=>{H.preventDefault(),p&&L(p)},e[28]=p,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(cn,{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(dn,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let b;e[40]!==z||e[41]!==E?(b=s.jsxs(fn,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=b):b=e[42];let k;return e[43]!==N||e[44]!==O||e[45]!==b?(k=s.jsx(un,{open:O,onOpenChange:N,children:b}),e[43]=N,e[44]=O,e[45]=b,e[46]=k):k=e[46],k}const Kn="#d9a441";function Mn(A){const e=Se.c(63),{node:p,depth:X,isExpanded:y,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:O,onNewFile:x,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:Y,onDelete:K}=A,m=L===void 0?!1:L,c=ve(),C=p.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-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${X*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]!==O?(g=()=>{O(),w()},e[4]=w,e[5]=O,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==y||e[11]!==m?(E=C?s.jsxs(s.Fragment,{children:[m?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):y?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(Wt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(Ut,{size:16,className:"shrink-0",style:{color:Kn}})]}):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]=y,e[11]=m,e[12]=E):E=e[12];let b;e[13]!==p.name?(b=s.jsx("span",{className:"truncate",children:p.name}),e[13]=p.name,e[14]=b):b=e[14];let k;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==b?(k=s.jsx(pn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,b]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=b,e[20]=k):k=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 T;e[34]!==o||e[35]!==I?(T=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=T):T=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let M;e[39]!==P||e[40]!==W?(M=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=M):M=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]!==Y||e[46]!==G?(F=s.jsx(de,{onSelect:Y,children:G}),e[45]=Y,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]!==K||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:K,children:V}),e[50]=K,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==T||e[56]!==M||e[57]!==F||e[58]!==B?(U=s.jsxs(xn,{className:"w-52",children:[$,Z,_,T,M,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=T,e[56]=M,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==k?(te=s.jsxs(mn,{children:[k,U]}),e[60]=U,e[61]=k,e[62]=te):te=e[62],te}const st=200,An=2,On=250,it=200;function zn(A,e){return gn(A,e)}function $n(A){const e=Se.c(9),{text:p,query:X}=A;let y,N,L;if(e[0]!==X||e[1]!==p){const{leadingEllipsis:w,segments:O}=En(p,X);y="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=O.map(In),e[0]=X,e[1]=p,e[2]=y,e[3]=N,e[4]=L}else y=e[2],N=e[3],L=e[4];let d;return e[5]!==y||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:y,children:[N,L]}),e[5]=y,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(A,e){return A.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:A.text},e):s.jsx("span",{children:A.text},e)}function xs({orgSlug:A,virtualMcpId:e,branch:p,threadId:X,openPath:y}){const N={orgSlug:A,virtualMcpId:e,branch:p,threadId:X},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:O}=L,[x,a]=f.useState(new Set),[o,P]=f.useState(null),[Y,K]=f.useState(null),[m,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,b]=f.useState(!1),[k,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),T=f.useRef(0),W=f.useRef(null),M=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 M.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,me]=f.useState(null),{sendMessage:lt}=en(),{openSidePanel:ot}=nn(),he=Qt(),[q,re]=f.useState(null),[ke,Te]=f.useState(null),[ge,be]=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 ye(){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=kn(t);if(!n)return;const r=`${A}/${e}/${p}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(A,e,p)})}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 m.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}),K(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);K(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,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await ye(),re(null),pe(r)}async function pt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))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 ye(),re(null),a(l=>{const u=new Set(l);for(const le of Ae(r))u.add(le);return u.add(r),u}),K({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,O))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 ye(),re(null)}async function mt(t,n){be(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await ye(),Te(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{be(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}be(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await pt(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{be(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,bt]=f.useState(null),h=ve();if(y&&y!==gt){bt(y);const t=y;queueMicrotask(()=>{bn(t)&&pe(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!==T.current)return!1;let i=!1;return d(l=>{const u=n?Tn(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 yt(t){const n=Q.current.get(t);if(n)return n;const r=T.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===T.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(!Oe(t,M.current))return!1;I(n=>new Set(n).add(t));try{return await yt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(M.current);for(const i of Ae(n)){if(!Oe(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++T.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:yn});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),b(!1)}async function Nt(){const t=T.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 T.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??"")),b((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),b(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<An?(D(null),g(!1),b(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},On)}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;pe(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 rn(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 kt(t){P(t),K({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),me(null),m.includes(t)||c(n=>[...n,t]),qe(t)}function Tt(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(Oe(t,M.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=Ae(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),kt(t)}function pe(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Kt(){return Y?.kind==="directory"?Y.path:Y?.kind==="file"?De(Y.path):o?De(o):"/"}function Qe(t){const n=Kt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Mt=wn(w,O),Ue=jn(Mt,x),Le=R?.length??0,Xe=Nn(v??[]),Ye=v?.length??0,ce=o?oe.get(o):null,At=ce?.loaded&&ce.editorValue!==ce.savedContent,Ot=ke?dt(ke.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);me({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=Me(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
  `)}]}),me(null)}return k&&!$?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(Xt,{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 outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(Yt,{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",className:"size-7 shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(Jt,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(_t,{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=Y?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Mn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Ke(n.name),onSelect:()=>K(n),onOpen:()=>{i?Lt(n.path,l):pe(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:()=>Te(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-[10px] font-medium uppercase tracking-wide 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}=Ke(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>pe(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-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Ye>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Ye,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Xe.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Xe.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Ke(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:[m.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:m.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(),Tt(t)},children:s.jsx(Zt,{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 border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",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"&&me(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(tn,{language:Me(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-[11px] text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(At?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Me(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:ke,deleteDirtyPaths:Ot,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&Te(null)},onConfirm:t=>{mt(h,t)}})]})}export{xs as FileExplorer};
@@ -1 +1 @@
1
- import{c as x,F as g,j as s,h as v,b2 as w,B as b}from"./index-CL22V9cU.js";import{n as y}from"./ZoomOut-C7vMH9KG.js";import{g as N}from"./use-org-fs-090kBeGb.js";import{g as S}from"./utils-B82E0qSP.js";import{F as _}from"./editor-ZVt04ZDu.js";import{F as k}from"./file-type-icon-DQJBqcjt.js";import{M as z}from"./markdown-BpBIe-s5.js";function U(n){const e=x.c(11),{value:l,filename:i}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==i?(o=S(i),e[0]=i,e[1]=o):o=e[1];const m=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 r,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(r={enabled:!1},d={top:12,bottom:12},e[3]=r,e[4]=d):(r=e[3],d=e[4]);let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:r,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=f):f=e[5];let u;return e[6]!==i||e[7]!==o||e[8]!==m||e[9]!==l?(u=s.jsx(_,{path:i,language:o,value:l,theme:m,loading:a,options:f},i),e[6]=i,e[7]=o,e[8]=m,e[9]=l,e[10]=u):u=e[10],u}function F(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const E=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 E.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 M(){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:i}=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=F(l.size),e[4]=l.size,e[5]=o):o=e[5];const m=i?` · ${i}`:"";let a;e[6]!==o||e[7]!==m?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,m]}),e[6]=o,e[7]=m,e[8]=a):a=e[8];let r;e[9]!==c||e[10]!==a?(r=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=r):r=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(y,{size:14}),e[12]=d):d=e[12];let f;e[13]!==l.downloadUrl||e[14]!==l.filename?(f=s.jsx(b,{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]=f):f=e[15];let u;return e[16]!==t||e[17]!==r||e[18]!==f?(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 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[t,r,f]})}),e[16]=t,e[17]=r,e[18]=f,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:i}=n,{data:t,isPending:c,isError:o}=N(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(M,{}),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(i){const a=`file-preview-${l.key}`;let r;return e[3]!==t||e[4]!==a?(r=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]=r):r=e[5],r}let m;return e[6]!==t||e[7]!==l.filename?(m=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=m):m=e[8],m}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,M as a,F as f};
1
+ import{c as x,F as g,j as s,h as v,b2 as w,B as b}from"./index-bl_DQ3mH.js";import{n as y}from"./ZoomOut-Bnst3wtU.js";import{g as N}from"./use-org-fs-DOu4nQSr.js";import{g as S}from"./utils-DHYRJNUn.js";import{F as _}from"./editor-KeKsFC14.js";import{F as k}from"./file-type-icon-C-_1hLql.js";import{M as z}from"./markdown-5DzLzA6E.js";function U(n){const e=x.c(11),{value:l,filename:i}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==i?(o=S(i),e[0]=i,e[1]=o):o=e[1];const m=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 r,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(r={enabled:!1},d={top:12,bottom:12},e[3]=r,e[4]=d):(r=e[3],d=e[4]);let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:r,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=f):f=e[5];let u;return e[6]!==i||e[7]!==o||e[8]!==m||e[9]!==l?(u=s.jsx(_,{path:i,language:o,value:l,theme:m,loading:a,options:f},i),e[6]=i,e[7]=o,e[8]=m,e[9]=l,e[10]=u):u=e[10],u}function F(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const E=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 E.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 M(){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:i}=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=F(l.size),e[4]=l.size,e[5]=o):o=e[5];const m=i?` · ${i}`:"";let a;e[6]!==o||e[7]!==m?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,m]}),e[6]=o,e[7]=m,e[8]=a):a=e[8];let r;e[9]!==c||e[10]!==a?(r=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=r):r=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(y,{size:14}),e[12]=d):d=e[12];let f;e[13]!==l.downloadUrl||e[14]!==l.filename?(f=s.jsx(b,{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]=f):f=e[15];let u;return e[16]!==t||e[17]!==r||e[18]!==f?(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 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[t,r,f]})}),e[16]=t,e[17]=r,e[18]=f,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:i}=n,{data:t,isPending:c,isError:o}=N(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(M,{}),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(i){const a=`file-preview-${l.key}`;let r;return e[3]!==t||e[4]!==a?(r=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]=r):r=e[5],r}let m;return e[6]!==t||e[7]!==l.filename?(m=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=m):m=e[8],m}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,M as a,F as f};
@@ -1,3 +1,3 @@
1
- import{c as te,b as se,j as t,B as _,aU as ue,l as ee,X as fe,T as he,V as me,U as re,n as pe,a6 as xe,a2 as be,o as ve,r as D,t as G,K as ie,ah as we,af as ke,I as ge,s as ye,v as Se,q as je,D as Te}from"./index-CL22V9cU.js";import{b as Q,T as Y,a as X}from"./tooltip-Dz-qpzYY.js";import{n as ae}from"./ZoomOut-C7vMH9KG.js";import{ap as Me,a$ as Ce,b as De,m as Pe,d as le,b0 as ze}from"./agent-icon-CvfPq7BK.js";import{c as Ne,e as Ee,d as Oe,u as $e}from"./use-org-fs-090kBeGb.js";import{a as Be,b as Re,P as Ie}from"./popover-BJjSe4oX.js";import{a as Ue}from"./Copy01-Daz7AFYE.js";import{i as Ae}from"./Key01-BCUfWyre.js";function oe(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function Le(n){const e=te.c(73),{readUrl:u,editor:a,downloadName:h,trailing:v,className:m,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==u?(p=new URL(u,window.location.origin).toString(),e[0]=u,e[1]=p):p=e[1];const l=p;let A;e[2]!==r?(A=oe(r),e[2]=r,e[3]=A):A=e[3];const d=A;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsxs(_,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:a.reload,children:[t.jsx(ue,{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]!==d.size||e[12]!==d.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.editMode?"secondary":d.variant,size:d.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(Me,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=d.size,e[12]=d.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==l||e[17]!==d.size||e[18]!==d.variant||e[19]!==h||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(fe,{children:[t.jsx(he,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(me,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[t.jsx(Ce,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:l,download:h,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:l,download:h,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=l,e[17]=d.size,e[18]=d.variant,e[19]=h,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=d.variant,P=d.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==l?(M=()=>window.open(l,"_blank","noopener"),e[25]=l,e[26]=M):M=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(xe,{size:14}),e[27]=L):L=e[27];let c;e[28]!==d.size||e[29]!==d.variant||e[30]!==T||e[31]!==M?(c=t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:j,size:P,"aria-label":T,onClick:M,children:L})}),e[28]=d.size,e[29]=d.variant,e[30]=T,e[31]=M,e[32]=c):c=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]!==c||e[38]!==R?(b=t.jsxs(Q,{children:[c,R]}),e[37]=c,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 I=O;let F;e[47]!==a.railOpen||e[48]!==s?(F=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=F):F=e[49];const z=F;let $;e[50]!==d.size||e[51]!==d.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.railOpen?"secondary":d.variant,size:d.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(Pe,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=d.size,e[51]=d.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let o;return e[55]!==I||e[56]!==C?(o=t.jsxs(pe.Actions,{children:[C,I]}),e[55]=I,e[56]=C,e[57]=o):o=e[57],o}let k;e[58]!==m?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",m),e[58]=m,e[59]=k):k=e[59];let N;e[60]!==l?(N=()=>window.open(l,"_blank","noopener"),e[60]=l,e[61]=N):N=e[61];let E;e[62]!==h?(E=t.jsx("span",{className:"truncate",children:h}),e[62]=h,e[63]=E):E=e[63];let U;e[64]!==l||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-muted",title:l,children:E}),e[64]=l,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==I||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,I]}),e[68]=I,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}class q extends Error{constructor(e,u){super(e),this.code=u,this.name="DeckOpError"}code}function ce(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function _e(n){const u=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return u?ce(u).length:null}function qe(n,e){const u=new DOMParser().parseFromString(n,"text/html"),a=u.querySelector("deck-viewer");if(!a)throw new q("no <deck-viewer> element in source","no-viewer");const h=ce(a),v=e.kind==="move"?e.from:e.at,m=h[v];if(!m)throw new q(`slide index ${v} out of range (${h.length})`,"stale-index");switch(e.kind){case"remove":{if(h.length<=1)throw new q("cannot remove the last slide","bad-op");m.remove();break}case"duplicate":{const r=m.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");m.after(r);break}case"move":{if(e.to<0||e.to>=h.length)throw new q(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?h[e.to]:h[e.to].nextSibling;a.insertBefore(m,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new q(`invalid attribute name: ${e.name}`,"bad-op");m.setAttribute(e.name,e.value);break}case"remove-attr":{m.removeAttribute(e.name);break}case"replace":{const s=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!s)throw new q("replace html has no root element","bad-op");m.replaceWith(u.importNode(s,!0));break}default:throw new q(`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 _,aU as ue,l as ee,X as fe,T as he,V as me,U as re,n as pe,a6 as xe,a2 as be,o as ve,r as D,t as G,K as ie,ah as we,af as ke,I as ge,s as ye,v as Se,q as je,D as Te}from"./index-bl_DQ3mH.js";import{b as Q,T as Y,a as X}from"./tooltip-COqLwkid.js";import{n as ae}from"./ZoomOut-Bnst3wtU.js";import{ap as Me,a$ as Ce,b as De,m as Pe,d as le,b0 as ze}from"./agent-icon-BdZdLCky.js";import{c as Ne,e as Ee,d as Oe,u as $e}from"./use-org-fs-DOu4nQSr.js";import{a as Be,b as Re,P as Ie}from"./popover-MLSOZysn.js";import{a as Ue}from"./Copy01-QpufVNbj.js";import{i as Ae}from"./Key01-CCpcNn9J.js";function oe(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function Le(n){const e=te.c(73),{readUrl:u,editor:a,downloadName:h,trailing:v,className:m,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==u?(p=new URL(u,window.location.origin).toString(),e[0]=u,e[1]=p):p=e[1];const l=p;let A;e[2]!==r?(A=oe(r),e[2]=r,e[3]=A):A=e[3];const d=A;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsxs(_,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:a.reload,children:[t.jsx(ue,{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]!==d.size||e[12]!==d.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.editMode?"secondary":d.variant,size:d.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(Me,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=d.size,e[12]=d.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==l||e[17]!==d.size||e[18]!==d.variant||e[19]!==h||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(fe,{children:[t.jsx(he,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(me,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[t.jsx(Ce,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:l,download:h,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:l,download:h,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=l,e[17]=d.size,e[18]=d.variant,e[19]=h,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=d.variant,P=d.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==l?(M=()=>window.open(l,"_blank","noopener"),e[25]=l,e[26]=M):M=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(xe,{size:14}),e[27]=L):L=e[27];let c;e[28]!==d.size||e[29]!==d.variant||e[30]!==T||e[31]!==M?(c=t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:j,size:P,"aria-label":T,onClick:M,children:L})}),e[28]=d.size,e[29]=d.variant,e[30]=T,e[31]=M,e[32]=c):c=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]!==c||e[38]!==R?(b=t.jsxs(Q,{children:[c,R]}),e[37]=c,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 I=O;let F;e[47]!==a.railOpen||e[48]!==s?(F=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=F):F=e[49];const z=F;let $;e[50]!==d.size||e[51]!==d.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.railOpen?"secondary":d.variant,size:d.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(Pe,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=d.size,e[51]=d.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let o;return e[55]!==I||e[56]!==C?(o=t.jsxs(pe.Actions,{children:[C,I]}),e[55]=I,e[56]=C,e[57]=o):o=e[57],o}let k;e[58]!==m?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",m),e[58]=m,e[59]=k):k=e[59];let N;e[60]!==l?(N=()=>window.open(l,"_blank","noopener"),e[60]=l,e[61]=N):N=e[61];let E;e[62]!==h?(E=t.jsx("span",{className:"truncate",children:h}),e[62]=h,e[63]=E):E=e[63];let U;e[64]!==l||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-muted",title:l,children:E}),e[64]=l,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==I||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,I]}),e[68]=I,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}class q extends Error{constructor(e,u){super(e),this.code=u,this.name="DeckOpError"}code}function ce(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function _e(n){const u=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return u?ce(u).length:null}function qe(n,e){const u=new DOMParser().parseFromString(n,"text/html"),a=u.querySelector("deck-viewer");if(!a)throw new q("no <deck-viewer> element in source","no-viewer");const h=ce(a),v=e.kind==="move"?e.from:e.at,m=h[v];if(!m)throw new q(`slide index ${v} out of range (${h.length})`,"stale-index");switch(e.kind){case"remove":{if(h.length<=1)throw new q("cannot remove the last slide","bad-op");m.remove();break}case"duplicate":{const r=m.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");m.after(r);break}case"move":{if(e.to<0||e.to>=h.length)throw new q(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?h[e.to]:h[e.to].nextSibling;a.insertBefore(m,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new q(`invalid attribute name: ${e.name}`,"bad-op");m.setAttribute(e.name,e.value);break}case"remove-attr":{m.removeAttribute(e.name);break}case"replace":{const s=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!s)throw new q("replace html has no root element","bad-op");m.replaceWith(u.importNode(s,!0));break}default:throw new q(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
2
2
  `:""}${u.documentElement.outerHTML}
3
3
  `}const ne="home",Ke=400,He=800;function Ve(n){const e=n.savePath!==void 0,{org:u}=be(),a=ve(),h=Ne(ne),[v,m]=D.useState(!1),[f,r]=D.useState(!1),[s,p]=D.useState(!1),[l,A]=D.useState(!1),[d,x]=D.useState(!1),[g,S]=D.useState(!1),[w,j]=D.useState(null),[P,T]=D.useState(null),[M,L]=D.useState(0),[c]=D.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),B=v||g||d,R=()=>{n.savePath!==void 0&&(a.invalidateQueries({queryKey:ie.orgFsStat(u.id,ne,n.savePath)}),a.invalidateQueries({queryKey:ie.orgFsRecent(u.id)}))},b=i=>{c.iframe?.contentWindow?.postMessage(i,"*")},O=()=>{c.source=null,A(!1),P&&j(P),L(i=>i+1),R()};n.statMarker!==P&&(T(n.statMarker),n.statMarker!==null&&(w===null?j(n.statMarker):c.selfMarkers.has(n.statMarker)||n.statMarker!==w&&(B?A(!0):(c.source=null,j(n.statMarker)))));const I=async()=>{c.saveTimer=null;const i=c.source;if(i===null){S(!1);return}x(!0);try{const o=await h.mutateAsync({path:n.savePath,body:i});c.selfMarkers.add(Ee(o)),R()}catch(o){console.error("[deck-editor] save failed",o),G.error("Couldn't save deck edits — reloading the preview."),k.current.reload()}finally{x(!1),S(!1)}},F=i=>{S(!0),c.saveTimer&&clearTimeout(c.saveTimer),c.saveTimer=setTimeout(()=>{k.current.flushSave()},i)},z=(i,o,y)=>{b({v:Z,type:"ack",opId:i,ok:o,error:y})},$=async i=>{if(!e){z(i.opId,!1,"read-only preview");return}try{if(c.source===null){const y=await fetch(n.readUrl,{credentials:"include"});if(!y.ok)throw new Error(`HTTP ${y.status}`);c.source=await y.text()}const o=_e(c.source);if(o===null||o!==i.witness.childCount)throw new q(`slide count drifted (source ${o}, iframe ${i.witness.childCount})`,"stale-index");c.source=qe(c.source,i.op),z(i.opId,!0),F(i.op.kind==="replace"?He:Ke)}catch(o){console.error("[deck-editor] op failed",i.op,o),z(i.opId,!1,o instanceof Error?o.message:String(o)),G.error("That edit couldn't be saved — reloading the preview."),k.current.reload()}},C=i=>{if(!c.iframe||i.source!==c.iframe.contentWindow)return;const o=Fe(i.data);if(o){if(o.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}o.type==="op"&&(c.queue=c.queue.then(()=>k.current.handleOp(o)).catch(()=>{}))}},k=D.useRef({onMessage:C,handleOp:$,flushSave:I,reload:O,editMode:v,railOpen:s});k.current={onMessage:C,handleOp:$,flushSave:I,reload:O,editMode:v,railOpen:s};const[N]=D.useState(()=>{let i=null;return o=>{if(o){c.iframe=o;const y=K=>k.current.onMessage(K);window.addEventListener("message",y),i=()=>window.removeEventListener("message",y)}else i?.(),i=null,c.iframe=null}}),E=i=>{p(i),b({v:Z,type:"set-rail",open:i})},U=i=>{m(i),b({v:Z,type:"set-edit-mode",enabled:i}),i&&p(!0),!i&&l&&!g&&!d&&O()};return{iframeRef:N,deckDetected:f,writable:e,displayedMarker:w===null?null:`${w}.${M}`,editMode:v,setEditMode:U,railOpen:s,setRailOpen:E,saving:d,agentUpdated:l,reload:O,postToIframe:b}}const We=300;function rt({readUrl:n,marker:e,title:u,savePath:a,trailing:h,toolbarClassName:v,placement:m}){const f=Ve({readUrl:n,statMarker:e,savePath:a}),[r,s]=D.useState(null);if(f.displayedMarker===null)return null;const p=n.includes("?")?"&":"?",l=`${n}${p}v=${encodeURIComponent(f.displayedMarker)}`,A=r===l;return t.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[t.jsx(Le,{readUrl:n,editor:f,downloadName:u.split("/").pop()??u,trailing:h,className:v,placement:m}),t.jsx("div",{className:"relative flex-1",children:t.jsx("iframe",{ref:f.iframeRef,src:l,onLoad:()=>s(l),sandbox:"allow-scripts allow-downloads",className:ee("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",A?"opacity-100":"opacity-0"),style:{transitionDuration:`${We}ms`},title:u},l)})]})}const Qe=[{mode:"private",labelKey:"library.fileShareButton.modeOrgOnly",Icon:ke},{mode:"public",labelKey:"library.fileShareButton.modePublic",Icon:le},{mode:"password",labelKey:"library.fileShareButton.modePassword",Icon:Ae}];function de(n){const e=te.c(56),{volume:u,path:a,kind:h,shareMode:v,effectivePublic:m,url:f}=n,r=se(),s=Oe(u),{data:p}=$e(u,a),l=p?.shareMode??v,d=(p?.effectivePublic??m)&&l==="private",x=h==="dir",g=x?"folder":"file",[S,w]=D.useState(!1),[j,P]=D.useState(""),[T,M]=D.useState(!1);let L;e[0]!==a||e[1]!==s||e[2]!==g||e[3]!==r?(L=(i,o)=>{s.mutate({path:a,mode:i,password:o},{onSuccess:()=>{w(!1),P(""),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]=L):L=e[4];const c=L;let B;e[5]!==c?(B=i=>{if(i==="password"){w(!0);return}w(!1),c(i)},e[5]=c,e[6]=B):B=e[6];const R=B,b=S?"password":l;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 I=O;let F;e[10]!==T||e[11]!==I||e[12]!==r||e[13]!==f?(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(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:I,"aria-label":r("library.fileShareButton.copyLink"),children:T?t.jsx(we,{size:12,className:"text-success"}):t.jsx(Ue,{size:12})})]}):null,e[10]=T,e[11]=I,e[12]=r,e[13]=f,e[14]=F):F=e[14];const z=F;if(d){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(le,{size:16})}),e[15]=i):i=e[15];let o;e[16]!==r?(o=r("library.fileShareButton.sharedViaParent"),e[16]=r,e[17]=o):o=e[17];let y;e[18]!==o?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:o}),e[18]=o,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?($=Qe.map(i=>{const{mode:o,labelKey:y,Icon:K}=i;return t.jsxs("button",{type:"button",disabled:s.isPending,onClick:()=>R(o),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===o?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[t.jsx(K,{size:15}),r(y)]},o)}),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:"grid grid-cols-3 gap-1 rounded-lg bg-muted 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]!==c||e[46]!==l||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&&c("password",j)},children:[t.jsx(ge,{type:"password",value:j,onChange:i=>P(i.target.value),placeholder:r(l==="password"?"library.fileShareButton.newPasswordPlaceholder":"library.fileShareButton.passwordPlaceholder"),autoComplete:"new-password",className:"h-8 text-xs"}),t.jsx(_,{type:"submit",size:"sm",className:"shrink-0",disabled:!j||s.isPending,children:r(l==="password"?"library.fileShareButton.buttonUpdate":"library.fileShareButton.buttonSet")})]}),e[44]=b,e[45]=c,e[46]=l,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 it(n){const e=te.c(25),{volume:u,path:a,shareMode:h,effectivePublic:v,url:m,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==r?(p=oe(r),e[0]=r,e[1]=p):p=e[1];const l=p,A=l.variant,d=l.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(ze,{size:14}),e[4]=g):g=e[4];let S;e[5]!==l.size||e[6]!==l.variant||e[7]!==x?(S=t.jsx(Y,{asChild:!0,children:t.jsx(Be,{asChild:!0,children:t.jsx(_,{variant:A,size:d,"aria-label":x,children:g})})}),e[5]=l.size,e[6]=l.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 P;e[13]!==S||e[14]!==j?(P=t.jsxs(Q,{children:[S,j]}),e[13]=S,e[14]=j,e[15]=P):P=e[15];let T;e[16]!==v||e[17]!==a||e[18]!==h||e[19]!==m||e[20]!==u?(T=t.jsx(Re,{align:"end",className:"w-80 p-3",children:t.jsx(de,{volume:u,path:a,kind:"file",shareMode:h,effectivePublic:v,url:m})}),e[16]=v,e[17]=a,e[18]=h,e[19]=m,e[20]=u,e[21]=T):T=e[21];let M;return e[22]!==P||e[23]!==T?(M=t.jsxs(Ie,{children:[P,T]}),e[22]=P,e[23]=T,e[24]=M):M=e[24],M}function at(n){const e=te.c(14),{target:u,onOpenChange:a}=n,h=se(),v=!!u,m=u?.kind==="dir"?"folder":"file";let f;e[0]!==h||e[1]!==m?(f=h("library.fileShareButton.shareDialogTitle",{type:m}),e[0]=h,e[1]=m,e[2]=f):f=e[2];let r;e[3]!==f?(r=t.jsx(ye,{children:t.jsx(Se,{children:f})}),e[3]=f,e[4]=r):r=e[4];let s;e[5]!==u?(s=u&&t.jsx(de,{...u}),e[5]=u,e[6]=s):s=e[6];let p;e[7]!==r||e[8]!==s?(p=t.jsxs(je,{className:"sm:max-w-md",children:[r,s]}),e[7]=r,e[8]=s,e[9]=p):p=e[9];let l;return e[10]!==a||e[11]!==v||e[12]!==p?(l=t.jsx(Te,{open:v,onOpenChange:a,children:p}),e[10]=a,e[11]=v,e[12]=p,e[13]=l):l=e[13],l}export{it as F,rt as H,at as S,oe as t};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-CL22V9cU.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-bl_DQ3mH.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};
@@ -0,0 +1 @@
1
+ import{c as g,u as _,j as o,r as S,h as k,a2 as w,am as C,n as y,b as N,d as T,P as F}from"./index-bl_DQ3mH.js";import{k as $,p as R}from"./agent-icon-BdZdLCky.js";import{c as E}from"./SwitchHorizontal01-B5sfCWHV.js";import{V as I}from"./view-mode-toggle-B55pxnK_.js";import{C as V}from"./index-zYf8hP69.js";import{s as B}from"./thread-button-DKjUerzt.js";import{P as L}from"./projects-empty-state-CO-mNXLv.js";import{T as A}from"./index-Cw6J2Hl5.js";import{B as M}from"./board-analytics-B8AHF8AB.js";import{L as z}from"./library-tab-0FXiesZx.js";import{p as O}from"./location-BjlyegC2.js";import{u as U}from"./use-ensure-project-folder-CqaPdVz-.js";import{s as H}from"./use-project-scope-A4YCdR4N.js";import{b as q}from"./repository-binding-BTsmo_dA.js";import"./AlertCircle-BILwGqjV.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./LinkBroken01-BBYM52IU.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronUp-BrMcnDd0.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./UserSquare-BXjBRbTF.js";import"./Copy01-QpufVNbj.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Image01-D8Dg78Ju.js";import"./Globe04-C2IFbCwJ.js";import"./Key01-CCpcNn9J.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Play-CIe1tupB.js";import"./Plus-DTyq8wfJ.js";import"./SearchMd-DnZ_sK_U.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./XClose-BMDlg-34.js";import"./tooltip-COqLwkid.js";import"./index-B5IA1qMq.js";import"./use-mobile-Di3PCVWm.js";import"./resizable-UTJFKDGm.js";import"./use-chat-layout-state-CVkPEEUs.js";import"./use-file-configs-BSnoYr1R.js";import"./use-organization-settings-BOGRgJjV.js";import"./schema-kVE-1hbs.js";import"./task-board-kbcRVMI1.js";import"./site-slug-DebpOoQq.js";import"./thread-route-CR0TIP8s.js";import"./use-panel-navigate-c5H4a21L.js";import"./thread-intent-CG-CCDLs.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B66Eygyb.js";import"./slugify-CEUa2lfQ.js";import"./icon-button-d9uOvdxM.js";import"./toolbar-icon-button-Djr5zvaV.js";import"./sheet-CZiDNUQZ.js";import"./shell-layout-Bk6uPKMe.js";import"./avatar-DNs314ny.js";import"./use-clock-tick-zaL95TTy.js";import"./command-DFd1c5Z5.js";import"./index-Dhdyv2s0.js";import"./integration-icon-DogZfPWq.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./label-Bqj_xjz9.js";import"./repository-import-picker-D5xDiyD_.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./repository-picker-DExxlkis.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./collection-search-q0ogFMFh.js";import"./use-debounced-value-Dju-tMu1.js";import"./required-auth-layout-Dzef4Ao1.js";import"./autosend-Cr5TlS-x.js";import"./use-org-sso-B57pfGVG.js";import"./core.esm-lZvNzlYc.js";import"./sortable.esm-h3AYG-u7.js";import"./use-task-board-analytics-BR7NSR26.js";import"./combobox-BTfHieW4.js";import"./popover-MLSOZysn.js";import"./usage-stats-CAukzrpg.js";import"./tool-namespace-uRsPbj-p.js";import"./form-D6DHFxsw.js";import"./utils-CVEq3hMx.js";import"./markdown-5DzLzA6E.js";import"./use-copy-2j0k06rN.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-D8zpT0sX.js";import"./chat-context-DszOftwV.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./suggestion-C591DFAx.js";import"./column-rules-BDs9HTxP.js";import"./badge-BDMYkxf_.js";import"./switch-CUK4V52q.js";import"./textarea-DvoMwt1e.js";import"./use-org-fs-DOu4nQSr.js";import"./use-automations-Dt8Ypk0g.js";import"./get-initials-D-f_fDFw.js";import"./search-toggle-DAU6nVmU.js";import"./use-task-board-items-DTbT7rEp.js";import"./use-task-board-events-BBlz-cBe.js";import"./use-members-BqWTpMNp.js";import"./use-org-auth-client-DIUzAE5u.js";import"./select-WviNHwZD.js";import"./index-BdQq_4o_.js";import"./task-route-BPrIj9mX.js";import"./config-CtmGoERx.js";import"./use-tags-Ce3D-sM7.js";import"./calendar-9HE_r4Hw.js";import"./alert-Tk2m0Iz_.js";import"./collapsible-CSMgVqT4.js";import"./index-DyaBZBxm.js";import"./rich-text-link-control-CNQ92nZ4.js";import"./index-JuyO8Sz3.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-BzAFAQp8.js";import"./use-connection-gMb_8zEe.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-BAmHmw0m.js";import"./useSuspenseInfiniteQuery-CUkGf5w6.js";import"./pair-DjM6V7aG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DuGbCe-D.js";import"./types-C5SQt0XZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-3vLSpQqZ.js";import"./use-thread-outputs-c6b1HaAz.js";import"./file-type-icon-C-_1hLql.js";import"./use-infinite-scroll-CtScOz_h.js";import"./task-status-codqNsI7.js";import"./use-open-billing-url-sjDwQSEM.js";import"./chat-draft-Bi-CpEK_.js";import"./separator-DHqK6uc1.js";import"./collection-tabs-CYgVG041.js";import"./time-range-picker-CPMdzMas.js";import"./scroll-area-1S72VGW0.js";import"./analytics-sections-BjYHHt7V.js";import"./chart-n7qVLeZu.js";import"./index-B0rouRMk.js";import"./symbol-BQaHJ_MF.js";import"./CategoricalChart-CD4E_XC5.js";import"./table-Dsl6wBVe.js";import"./BarChart-ip63zVKP.js";import"./tooltipContext-DDD6cP5q.js";import"./ActiveShapeUtils-DHLjYBHG.js";import"./Sector-iSjEHRg-.js";import"./ErrorBarContext-DoXCMhKl.js";import"./AreaChart-MBaQ2sXA.js";import"./XAxis-BQtU7n4v.js";import"./alert-dialog-By0HRTrM.js";import"./use-org-repo-syncs-BhJEcVcm.js";import"./file-share-button-DnzCcmZ2.js";import"./preview-dialog-CP7wwQxY.js";import"./preview-content-Cuq13S1x.js";import"./file-preview-Ct2165jc.js";import"./utils-DHYRJNUn.js";import"./editor-KeKsFC14.js";import"./folder-icon-CksigScx.js";import"./empty-state-DdJZ_leg.js";function D(i){const t=g.c(25),{view:r}=i,p=N(),e=T();let m;t[0]!==e?(m=v=>e({to:".",search:P=>({...P,files:v==="files"||void 0,analytics:v==="analytics"||void 0,...v!=="project"?{task:void 0}:{}})}),t[0]=e,t[1]=m):m=t[1];const s=m;let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(E,{}),t[2]=b):b=t[2];let x;t[3]!==p?(x=p("projects.flat.viewProject"),t[3]=p,t[4]=x):x=t[4];let f;t[5]!==x?(f={value:"project",icon:b,label:x},t[5]=x,t[6]=f):f=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx($,{}),t[7]=d):d=t[7];let l;t[8]!==p?(l=p("projects.flat.viewFiles"),t[8]=p,t[9]=l):l=t[9];let a;t[10]!==l?(a={value:"files",icon:d,label:l},t[10]=l,t[11]=a):a=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(R,{}),t[12]=j):j=t[12];let u;t[13]!==p?(u=p("projects.flat.viewAnalytics"),t[13]=p,t[14]=u):u=t[14];let c;t[15]!==u?(c={value:"analytics",icon:j,label:u},t[15]=u,t[16]=c):c=t[16];let h;t[17]!==c||t[18]!==f||t[19]!==a?(h=[f,a,c],t[17]=c,t[18]=f,t[19]=a,t[20]=h):h=t[20];let n;return t[21]!==s||t[22]!==h||t[23]!==r?(n=o.jsx(F.Topbar.Right.Portal,{children:o.jsx("div",{className:"shrink-0",children:o.jsx(I,{value:r,onValueChange:s,options:h})})}),t[21]=s,t[22]=h,t[23]=r,t[24]=n):n=t[24],n}function G(i){const t=g.c(6),{project:r}=i;U(r);const p=r.id;let e;t[0]!==r?(e=O(r),t[0]=r,t[1]=e):e=t[1];const m=r.title??void 0;let s;return t[2]!==r.id||t[3]!==e||t[4]!==m?(s=o.jsx(z,{root:e,rootLabel:m,filePreview:"dialog"},p),t[2]=r.id,t[3]=e,t[4]=m,t[5]=s):s=t[5],s}function J(i){const t=g.c(21),{projectId:r,taskOpen:p,view:e}=i,{org:m}=w(),{granted:s}=C("agents:manage");let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b={pageSize:1e3},t[0]=b):b=t[0];const x=q(b);let f,d;if(t[1]!==x||t[2]!==s||t[3]!==m||t[4]!==r){d=Symbol.for("react.early_return_sentinel");t:{let c;t[7]!==m?(c=n=>n.id!==m.id,t[7]=m,t[8]=c):c=t[8];const h=H(x).filter(c);if(h.length===0){let n;t[9]!==s?(n=o.jsx(L,{canCreate:s}),t[9]=s,t[10]=n):n=t[10],d=n;break t}f=h.find(n=>n.id===r)??[...h].sort(K)[0]}t[1]=x,t[2]=s,t[3]=m,t[4]=r,t[5]=f,t[6]=d}else f=t[5],d=t[6];if(d!==Symbol.for("react.early_return_sentinel"))return d;const l=f;if(!l)return null;let a;t[11]!==e?(a=o.jsx(D,{view:e}),t[11]=e,t[12]=a):a=t[12];let j;t[13]!==m||t[14]!==l||t[15]!==p||t[16]!==e?(j=e==="files"?o.jsx(G,{project:l}):e==="analytics"?o.jsxs(o.Fragment,{children:[o.jsx(y.Title,{children:l.title}),o.jsx(M,{project:l.id,taskHref:c=>`/${m.slug}/projects?project=${encodeURIComponent(l.id)}&task=${encodeURIComponent(c)}`},l.id)]}):o.jsxs(o.Fragment,{children:[!p&&o.jsx("div",{className:"hidden shrink-0 border-b border-border has-[a]:block",children:o.jsx(y.Container,{className:"flex max-w-[1680px] flex-col gap-4 pb-6",children:o.jsx(B,{project:l,orgSlug:m.slug})})}),o.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:o.jsx(A,{scopeProject:l,inlineTabs:!0,taskInSearch:!0})})]}),t[13]=m,t[14]=l,t[15]=p,t[16]=e,t[17]=j):j=t[17];let u;return t[18]!==a||t[19]!==j?(u=o.jsxs("div",{className:"@container flex h-full min-h-0 min-w-0 flex-col",children:[a,j]}),t[18]=a,t[19]=j,t[20]=u):u=t[20],u}function K(i,t){return(t.updated_at??"").localeCompare(i.updated_at??"")}function ei(){const i=g.c(6);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=_(t);let p;i[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(k,{className:"size-5 text-muted-foreground"})}),i[1]=p):p=i[1];const e=!!r.task,m=r.files?"files":r.analytics?"analytics":"project";let s;return i[2]!==r.project||i[3]!==e||i[4]!==m?(s=o.jsx(V.Content,{children:o.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:o.jsx(S.Suspense,{fallback:p,children:o.jsx(J,{projectId:r.project,taskOpen:e,view:m})})})}),i[2]=r.project,i[3]=e,i[4]=m,i[5]=s):s=i[5],s}export{ei as default};
@@ -1,2 +1,2 @@
1
- import{c as L,j as t,q as W,D as G,r as _,b2 as M,l as A,v as H,fm as V,B as I,aV as U}from"./index-CL22V9cU.js";import{i as K}from"./ZoomOut-C7vMH9KG.js";import{M as R}from"./markdown-BpBIe-s5.js";import{F as Z}from"./file-preview-CbjoA-y-.js";import{F as q}from"./file-type-icon-DQJBqcjt.js";import{h as J,g as Q,j as X}from"./use-org-fs-090kBeGb.js";import{c as Y,b as $}from"./location-BjlyegC2.js";import{s as ee}from"./Image01-6k6QI1dX.js";function te(r){const e={};for(const l of r.split(`
1
+ import{c as L,j as t,q as W,D as G,r as _,b2 as M,l as A,v as H,fm as V,B as I,aV as U}from"./index-bl_DQ3mH.js";import{i as K}from"./ZoomOut-Bnst3wtU.js";import{M as R}from"./markdown-5DzLzA6E.js";import{F as Z}from"./file-preview-Ct2165jc.js";import{F as q}from"./file-type-icon-C-_1hLql.js";import{h as J,g as Q,j as X}from"./use-org-fs-DOu4nQSr.js";import{c as Y,b as $}from"./location-BjlyegC2.js";import{s as ee}from"./Image01-D8Dg78Ju.js";function te(r){const e={};for(const l of r.split(`
2
2
  `)){const s=l.match(/^([A-Za-z][\w-]*):\s*(.*)$/);s?.[1]&&s[2]!==void 0&&(e[s[1].toLowerCase()]=s[2].trim())}return e}function O(r){for(const e of r.split(/\n\s*\n/)){const l=e.trim();if(!(!l||l.startsWith("#")))return l.replace(/\n/g," ")}return null}function se(r){const e=r.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:O(r),disableModelInvocation:!1,body:r};const l=te(e[1]),s=r.slice(e[0].length);return{name:l.name||null,description:l.description||O(s),disableModelInvocation:l["disable-model-invocation"]==="true",body:s}}function le(r){const e=L.c(18),{skillPath:l,onClose:s,variant:i}=r,n=Y(l),{volume:a,dirPath:v}=n,z=J(),o=z(a??"",`${v}/SKILL.md`),F=Q(o),D=X(a??"",v);let w;e[0]!==v?(w=$(v),e[0]=v,e[1]=w):w=e[1];const E=w;let h;e[2]!==F.data?(h=F.data?se(F.data):null,e[2]=F.data,e[3]=h):h=e[3];const x=h,C=oe;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(m,P)=>C(m.path)?-1:C(P.path)?1:$(m.path).localeCompare($(P.path)),e[4]=p):p=e[4];const B=(D.data??[]).filter(re).sort(p),[k,S]=_.useState(null),c=k===null?null:B.find(m=>m.path===k)??null,u=x?.name??E;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]!==i?(d=i==="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]=i,e[8]=d):d=e[8];let f;e[9]!==s||e[10]!==i?(f=i==="dialog"?t.jsx(V,{asChild:!0,children:t.jsx(I,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(U,{size:16})})}):t.jsx(I,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:s,children:t.jsx(U,{size:16})}),e[9]=s,e[10]=i,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(Z,{file:{key:c.path,filename:$(c.path),size:c.size,downloadUrl:z(a??"",c.path)}}):F.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(M,{className:"h-4 w-1/3"}),t.jsx(M,{className:"h-3 w-full"}),t.jsx(M,{className:"h-3 w-5/6"}),t.jsx(M,{className:"h-3 w-2/3"})]}):F.isError||!x?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:x.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-${l}`,text:x.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(M,{className:"mx-2 h-4 w-24"}):B.map(m=>{const P=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",P?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(q,{filename:$(m.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:A("truncate text-sm",P?"text-foreground":"text-muted-foreground"),children:$(m.path)})]},m.path)})]}),N]})]})}function re(r){return r.kind==="file"}function oe(r){return $(r)==="SKILL.md"}function ge(r){const e=L.c(8),{skillPath:l,onClose:s}=r;let i;e[0]!==s?(i=v=>{v||s()},e[0]=s,e[1]=i):i=e[1];let n;e[2]!==s||e[3]!==l?(n=t.jsx(W,{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(le,{skillPath:l,onClose:s,variant:"dialog"})}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let a;return e[5]!==i||e[6]!==n?(a=t.jsx(G,{open:!0,onOpenChange:i,children:n}),e[5]=i,e[6]=n,e[7]=a):a=e[7],a}const ie={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"}},ne=[-7,0,7];function je(r){const e=L.c(50);let l,s,i,n,a;e[0]!==r?({glyph:l,readOnly:i,tone:n,sheets:a,...s}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=i,e[4]=n,e[5]=a):(l=e[1],s=e[2],i=e[3],n=e[4],a=e[5]);const v=n===void 0?"default":n,z=a===void 0?0:a,o=ie[v],F=_.useId(),D=`${F}-back`,w=`${F}-front`,E=`url(#${D})`;let h;e[6]!==E?(h=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:E}),e[6]=E,e[7]=h):h=e[7];let x;e[8]!==z?(x=ne.slice(0,Math.min(Math.max(z,0),3)).map(ae),e[8]=z,e[9]=x):x=e[9];const C=`url(#${w})`;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]!==o.stripe?(S=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:o.stripe}),k=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:o.stripe}),e[13]=o.stripe,e[14]=k,e[15]=S):(k=e[14],S=e[15]);let c;e[16]!==l||e[17]!==o.glyph?(c=l&&t.jsx(l,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:o.glyph,opacity:.55}}),e[16]=l,e[17]=o.glyph,e[18]=c):c=e[18];let u;e[19]!==i?(u=i&&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]=i,e[20]=u):u=e[20];let g;e[21]!==o.backFrom?(g=t.jsx("stop",{offset:"0.3",stopColor:o.backFrom}),e[21]=o.backFrom,e[22]=g):g=e[22];let d;e[23]!==o.backTo?(d=t.jsx("stop",{offset:"1",stopColor:o.backTo}),e[23]=o.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]!==o.frontFrom?(j=t.jsx("stop",{stopColor:o.frontFrom}),e[29]=o.frontFrom,e[30]=j):j=e[30];let b;e[31]!==o.frontTo?(b=t.jsx("stop",{offset:"1",stopColor:o.frontTo}),e[31]=o.frontTo,e[32]=b):b=e[32];let T;e[33]!==w||e[34]!==j||e[35]!==b?(T=t.jsxs("radialGradient",{id:w,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[j,b]}),e[33]=w,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]!==s||e[41]!==k||e[42]!==c||e[43]!==u||e[44]!==y||e[45]!==h||e[46]!==x||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",...s,children:[h,x,p,B,S,k,c,u,y]}),e[40]=s,e[41]=k,e[42]=c,e[43]=u,e[44]=y,e[45]=h,e[46]=x,e[47]=p,e[48]=S,e[49]=N):N=e[49],N}function ae(r){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(${r} 16 12)`},r)}export{je as F,ge as S,se as p};
@@ -1 +1 @@
1
- import{dz as C,c as d,j as c,b7 as b,r as f,l as p,bs as j,dA as v,dB as h}from"./index-CL22V9cU.js";import{L as N}from"./label-CMx6o6z4.js";const E=C,g=f.createContext({}),M=t=>{const e=d.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(b,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=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},$=f.createContext({});function w(t){const e=d.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=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(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=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"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=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dz as C,c as d,j as c,b7 as b,r as f,l as p,bs as j,dA as v,dB as h}from"./index-bl_DQ3mH.js";import{L as N}from"./label-Bqj_xjz9.js";const E=C,g=f.createContext({}),M=t=>{const e=d.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(b,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=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},$=f.createContext({});function w(t){const e=d.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=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(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=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"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=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as U,a2 as ie,o as re,aC as le,aB as ce,e as ne,y as H,t as V,K as J,j as i,et as se,eu as ae,ev as Q,b7 as ge,I as oe,aD as de,aE as ee,c as Y,r as X,aa as me,a1 as te,bW as ue,bX as fe,G as pe,B as xe,am as he,n as M,fG as je,aY as Se}from"./index-CL22V9cU.js";import{u as ze}from"./use-org-auth-client-CGnpmIwt.js";import{u as be}from"./use-debounced-autosave-DugSqk23.js";import{A as ve}from"./avatar-BWSDv40I.js";import{C as Oe,a as ye,V as Ce,B as _e,b as Fe}from"./review-settings-DetXY7FI.js";import{D as De}from"./domain-settings-DahhbaOZ.js";import{A as Ae,a as we,b as Ee,c as Ne,g as Te,d as Le,e as Pe,f as ke}from"./alert-dialog-BoGCVrZa.js";import{C as Re}from"./capability-load-error-BglSkYA0.js";import"./User01-Swj6Wyaw.js";import"./switch-CXuIYT9e.js";import"./UserSquare--AVOLLKT.js";import"./use-organization-settings-BCnCWSM4.js";import"./schema-DAiRf49Q.js";import"./task-board-BR1DvBwF.js";import"./use-new-blocks-editor-ZHXdwaTL.js";import"./use-connection-BIx1BUIM.js";import"./use-mcp-client-Dii6HKbn.js";import"./auth-CtdecWhn.js";import"./badge-BZ6ZWtlL.js";import"./select-DoctMyOC.js";import"./index-BdQq_4o_.js";import"./index-CIf_Fy0-.js";import"./ChevronUp-BXbTXhXZ.js";const Be=e=>de({name:ee().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:ee().optional()});function Ie(e){const t=Y.c(17),{value:s,onChange:p,name:g,disabled:l}=e,c=U(),d=X.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 n;t[1]!==p||t[2]!==c?(n=W=>{const S=W.target.files?.[0];if(!S)return;if(S.size>2097152){V.error(c("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>V.error(c("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&p(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=p,t[2]=c,t[3]=n):n=t[3];const a=n;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=i.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 h=s||void 0,j=g??"?";let f;t[9]!==h||t[10]!==j?(f=i.jsx(ve,{url:h,fallback:j,shape:"square",size:"base"}),t[9]=h,t[10]=j,t[11]=f):f=t[11];let z;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(z=i.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,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=z):z=t[16],z}function Ge(){const e=U(),{org:t}=ie(),s=ze(),p=re(),g=le({resolver:ce(Be(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async n=>{const a={name:n.name};n.logo&&(a.logo=n.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:(n,a)=>{H("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),p.invalidateQueries({queryKey:J.organizations()}),p.invalidateQueries({queryKey:J.activeOrganization(t.slug)}),V.success(e("settings.organizationForm.updateSuccess"))},onError:(n,a)=>{H("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:n instanceof Error?n.message:String(n)}),V.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=be({save:async()=>{const n=g.control._formState.dirtyFields;if(Object.keys(n).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 i.jsx(se,{children:i.jsxs(ae,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ie,{value:g.watch("logo"),onChange:n=>{g.setValue("logo",n??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(ge,{control:g.control,name:"name",render:({field:n})=>i.jsx(oe,{id:"org-name",...n,onChange:a=>{n.onChange(a),c()},onBlur:()=>{n.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.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)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&i.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&i.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Ve(){const e=Y.c(86),t=U(),{org:s}=ie(),[p,g]=X.useState(!1),[l,c]=X.useState(""),d=me();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=()=>{H("organization_deleted",{organization_id:s.id}),localStorage.getItem(te.lastOrgSlug())===s.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===s.slug&&fe(),pe(),V.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 n;e[7]!==t?(n=b=>{V.error(b instanceof Error?b.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let a;e[9]!==r||e[10]!==m||e[11]!==n?(a={mutationFn:r,onSuccess:m,onError:n},e[9]=r,e[10]=m,e[11]=n,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 h;e[15]!==t?(h=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=h):h=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>g(!0),e[21]=z):z=e[21];const W=o.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==o.isPending||e[25]!==S?(x=i.jsx(xe,{variant:"destructive",size:"sm",onClick:z,disabled:W,children:S}),e[24]=o.isPending,e[25]=S,e[26]=x):x=e[26];let v;e[27]!==x||e[28]!==j||e[29]!==f?(v=i.jsx(ae,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:x})}),e[27]=x,e[28]=j,e[29]=f,e[30]=v):v=e[30];let O;e[31]!==v||e[32]!==u||e[33]!==h?(O=i.jsx(se,{title:u,description:h,children:v}),e[31]=v,e[32]=u,e[33]=h,e[34]=O):O=e[34];let q;e[35]===Symbol.for("react.memo_cache_sentinel")?(q=b=>{g(b),b||c("")},e[35]=q):q=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(Ae,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==s.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=_):_=e[42];let F;e[43]!==_?(F=i.jsx("p",{children:_}),e[43]=_,e[44]=F):F=e[44];let D;e[45]!==s.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=D):D=e[47];let A;e[48]!==D?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=A):A=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=b=>c(b.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==s.name?(w=i.jsx(oe,{value:l,onChange:K,placeholder:s.name,autoFocus:!0}),e[51]=l,e[52]=s.name,e[53]=w):w=e[53];let E;e[54]!==F||e[55]!==A||e[56]!==w?(E=i.jsx(we,{asChild:!0,children:i.jsxs("div",{children:[F,A,w]})}),e[54]=F,e[55]=A,e[56]=w,e[57]=E):E=e[57];let N;e[58]!==C||e[59]!==E?(N=i.jsxs(Ee,{children:[C,E]}),e[58]=C,e[59]=E,e[60]=N):N=e[60];let T;e[61]!==t?(T=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=T):T=e[62];let L;e[63]!==T?(L=i.jsx(Ne,{children:T}),e[63]=T,e[64]=L):L=e[64];let P;e[65]!==o?(P=()=>o.mutate(),e[65]=o,e[66]=P):P=e[66];const Z=l!==s.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==P||e[71]!==Z||e[72]!==k?(R=i.jsx(Te,{onClick:P,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=P,e[71]=Z,e[72]=k,e[73]=R):R=e[73];let B;e[74]!==L||e[75]!==R?(B=i.jsxs(Le,{children:[L,R]}),e[74]=L,e[75]=R,e[76]=B):B=e[76];let I;e[77]!==N||e[78]!==B?(I=i.jsxs(Pe,{children:[N,B]}),e[77]=N,e[78]=B,e[79]=I):I=e[79];let G;e[80]!==p||e[81]!==I?(G=i.jsx(ke,{open:p,onOpenChange:q,children:I}),e[80]=p,e[81]=I,e[82]=G):G=e[82];let $;return e[83]!==O||e[84]!==G?($=i.jsxs(i.Fragment,{children:[O,G]}),e[83]=O,e[84]=G,e[85]=$):$=e[85],$}function qe(){const e=Y.c(15),t=U(),{granted:s,loading:p,error:g}=he("org:manage");if(p){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Se,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Re,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.orgGeneral.organization"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=i.jsx(M.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&i.jsxs(i.Fragment,{children:[i.jsx(Ge,{}),i.jsx(Oe,{}),i.jsx(ye,{}),i.jsx(Ce,{}),i.jsx(_e,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Fe,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&i.jsxs(i.Fragment,{children:[i.jsx(De,{}),i.jsx(Ve,{})]}),e[9]=s,e[10]=m):m=e[10];let n;return e[11]!==c||e[12]!==d||e[13]!==m?(n=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Container,{children:i.jsxs(je,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=n):n=e[14],n}function mt(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(qe,{}),e[0]=t):t=e[0],t}export{mt as default};
1
+ import{b as U,a2 as ie,o as re,aC as le,aB as ce,e as ne,y as H,t as V,K as J,j as i,et as se,eu as ae,ev as Q,b7 as ge,I as oe,aD as de,aE as ee,c as Y,r as X,aa as me,a1 as te,bW as ue,bX as fe,G as pe,B as xe,am as he,n as M,fG as je,aY as Se}from"./index-bl_DQ3mH.js";import{u as ze}from"./use-org-auth-client-DIUzAE5u.js";import{u as be}from"./use-debounced-autosave-CMA_1eXM.js";import{A as ve}from"./avatar-DNs314ny.js";import{C as Oe,a as ye,V as Ce,B as _e,b as Fe}from"./review-settings-THwrc5M3.js";import{D as De}from"./domain-settings-BDouaDKh.js";import{A as Ae,a as we,b as Ee,c as Ne,g as Te,d as Le,e as Pe,f as ke}from"./alert-dialog-By0HRTrM.js";import{C as Re}from"./capability-load-error-DVDKy7cm.js";import"./User01-DabbLHAZ.js";import"./switch-CUK4V52q.js";import"./UserSquare-BXjBRbTF.js";import"./use-organization-settings-BOGRgJjV.js";import"./schema-kVE-1hbs.js";import"./task-board-kbcRVMI1.js";import"./use-new-blocks-editor-D9sV9o2T.js";import"./use-connection-gMb_8zEe.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./badge-BDMYkxf_.js";import"./select-WviNHwZD.js";import"./index-BdQq_4o_.js";import"./index-B5IA1qMq.js";import"./ChevronUp-BrMcnDd0.js";const Be=e=>de({name:ee().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:ee().optional()});function Ie(e){const t=Y.c(17),{value:s,onChange:p,name:g,disabled:l}=e,c=U(),d=X.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 n;t[1]!==p||t[2]!==c?(n=W=>{const S=W.target.files?.[0];if(!S)return;if(S.size>2097152){V.error(c("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>V.error(c("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&p(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=p,t[2]=c,t[3]=n):n=t[3];const a=n;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=i.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 h=s||void 0,j=g??"?";let f;t[9]!==h||t[10]!==j?(f=i.jsx(ve,{url:h,fallback:j,shape:"square",size:"base"}),t[9]=h,t[10]=j,t[11]=f):f=t[11];let z;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(z=i.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,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=z):z=t[16],z}function Ge(){const e=U(),{org:t}=ie(),s=ze(),p=re(),g=le({resolver:ce(Be(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async n=>{const a={name:n.name};n.logo&&(a.logo=n.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:(n,a)=>{H("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),p.invalidateQueries({queryKey:J.organizations()}),p.invalidateQueries({queryKey:J.activeOrganization(t.slug)}),V.success(e("settings.organizationForm.updateSuccess"))},onError:(n,a)=>{H("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:n instanceof Error?n.message:String(n)}),V.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=be({save:async()=>{const n=g.control._formState.dirtyFields;if(Object.keys(n).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 i.jsx(se,{children:i.jsxs(ae,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ie,{value:g.watch("logo"),onChange:n=>{g.setValue("logo",n??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(ge,{control:g.control,name:"name",render:({field:n})=>i.jsx(oe,{id:"org-name",...n,onChange:a=>{n.onChange(a),c()},onBlur:()=>{n.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.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)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&i.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&i.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Ve(){const e=Y.c(86),t=U(),{org:s}=ie(),[p,g]=X.useState(!1),[l,c]=X.useState(""),d=me();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=()=>{H("organization_deleted",{organization_id:s.id}),localStorage.getItem(te.lastOrgSlug())===s.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===s.slug&&fe(),pe(),V.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 n;e[7]!==t?(n=b=>{V.error(b instanceof Error?b.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let a;e[9]!==r||e[10]!==m||e[11]!==n?(a={mutationFn:r,onSuccess:m,onError:n},e[9]=r,e[10]=m,e[11]=n,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 h;e[15]!==t?(h=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=h):h=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>g(!0),e[21]=z):z=e[21];const W=o.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==o.isPending||e[25]!==S?(x=i.jsx(xe,{variant:"destructive",size:"sm",onClick:z,disabled:W,children:S}),e[24]=o.isPending,e[25]=S,e[26]=x):x=e[26];let v;e[27]!==x||e[28]!==j||e[29]!==f?(v=i.jsx(ae,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:x})}),e[27]=x,e[28]=j,e[29]=f,e[30]=v):v=e[30];let O;e[31]!==v||e[32]!==u||e[33]!==h?(O=i.jsx(se,{title:u,description:h,children:v}),e[31]=v,e[32]=u,e[33]=h,e[34]=O):O=e[34];let q;e[35]===Symbol.for("react.memo_cache_sentinel")?(q=b=>{g(b),b||c("")},e[35]=q):q=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(Ae,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==s.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=_):_=e[42];let F;e[43]!==_?(F=i.jsx("p",{children:_}),e[43]=_,e[44]=F):F=e[44];let D;e[45]!==s.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=D):D=e[47];let A;e[48]!==D?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=A):A=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=b=>c(b.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==s.name?(w=i.jsx(oe,{value:l,onChange:K,placeholder:s.name,autoFocus:!0}),e[51]=l,e[52]=s.name,e[53]=w):w=e[53];let E;e[54]!==F||e[55]!==A||e[56]!==w?(E=i.jsx(we,{asChild:!0,children:i.jsxs("div",{children:[F,A,w]})}),e[54]=F,e[55]=A,e[56]=w,e[57]=E):E=e[57];let N;e[58]!==C||e[59]!==E?(N=i.jsxs(Ee,{children:[C,E]}),e[58]=C,e[59]=E,e[60]=N):N=e[60];let T;e[61]!==t?(T=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=T):T=e[62];let L;e[63]!==T?(L=i.jsx(Ne,{children:T}),e[63]=T,e[64]=L):L=e[64];let P;e[65]!==o?(P=()=>o.mutate(),e[65]=o,e[66]=P):P=e[66];const Z=l!==s.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==P||e[71]!==Z||e[72]!==k?(R=i.jsx(Te,{onClick:P,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=P,e[71]=Z,e[72]=k,e[73]=R):R=e[73];let B;e[74]!==L||e[75]!==R?(B=i.jsxs(Le,{children:[L,R]}),e[74]=L,e[75]=R,e[76]=B):B=e[76];let I;e[77]!==N||e[78]!==B?(I=i.jsxs(Pe,{children:[N,B]}),e[77]=N,e[78]=B,e[79]=I):I=e[79];let G;e[80]!==p||e[81]!==I?(G=i.jsx(ke,{open:p,onOpenChange:q,children:I}),e[80]=p,e[81]=I,e[82]=G):G=e[82];let $;return e[83]!==O||e[84]!==G?($=i.jsxs(i.Fragment,{children:[O,G]}),e[83]=O,e[84]=G,e[85]=$):$=e[85],$}function qe(){const e=Y.c(15),t=U(),{granted:s,loading:p,error:g}=he("org:manage");if(p){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Se,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Re,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.orgGeneral.organization"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=i.jsx(M.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&i.jsxs(i.Fragment,{children:[i.jsx(Ge,{}),i.jsx(Oe,{}),i.jsx(ye,{}),i.jsx(Ce,{}),i.jsx(_e,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Fe,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&i.jsxs(i.Fragment,{children:[i.jsx(De,{}),i.jsx(Ve,{})]}),e[9]=s,e[10]=m):m=e[10];let n;return e[11]!==c||e[12]!==d||e[13]!==m?(n=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Container,{children:i.jsxs(je,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=n):n=e[14],n}function mt(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(qe,{}),e[0]=t):t=e[0],t}export{mt as default};