decocms 4.532.0 → 4.532.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-BwsFHzaV.js → ActiveShapeUtils-DenZ78VA.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-DtaztSud.js → AlertCircle-BWrNX7mN.js} +1 -1
  3. package/dist/client/assets/{AreaChart-DJGtjQAP.js → AreaChart-DNs2YwPE.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DmnRegLb.js → ArrowLeft-DHx5ko4s.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-KwZh_glX.js → ArrowUp-CyzDPNV4.js} +1 -1
  6. package/dist/client/assets/{BarChart-DQaObQAu.js → BarChart-CXwRHR1B.js} +1 -1
  7. package/dist/client/assets/{Building02-BeI22zso.js → Building02-DhL5SQYW.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-wzAyuumX.js → CartesianChart-bUujzX18.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-BEpkg4nV.js → CategoricalChart-hUgIZ_pD.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-C_ruRiGN.js → CheckCircle-BJwUqTIe.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-bUzEqfWd.js → ChevronSelectorVertical-BsFKOzFl.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DreW1_TB.js → ChevronUp-BsFnjeNK.js} +1 -1
  13. package/dist/client/assets/{Copy01--5lfgwG0.js → Copy01-BMtss9AJ.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-K0Qwgk3o.js → CreditCard01-DpJ5HaJ6.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-C68Q-BAS.js → DotsVertical-7Rm5ttPh.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-CYra1jMF.js → ErrorBarContext-B8n7TKqU.js} +1 -1
  17. package/dist/client/assets/{Globe04-BOflVjCh.js → Globe04-BJeMTkc9.js} +1 -1
  18. package/dist/client/assets/{Image01-vjhaiEAu.js → Image01-B1C03E_N.js} +1 -1
  19. package/dist/client/assets/{Key01-DpH9OVIT.js → Key01-AhMvx8Bf.js} +1 -1
  20. package/dist/client/assets/{Link01-D41TGySV.js → Link01-p8humFYG.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-BnY3fyy6.js → LinkBroken01-C5q0tEvS.js} +1 -1
  22. package/dist/client/assets/{Minus-CHN5Kpep.js → Minus-BMakGco3.js} +1 -1
  23. package/dist/client/assets/{Monitor01-e35w1jlr.js → Monitor01-CLwaIfNu.js} +1 -1
  24. package/dist/client/assets/{Play-D1B7OgmS.js → Play-BoOYKEkH.js} +1 -1
  25. package/dist/client/assets/{Plus-uAJwOYwM.js → Plus-D7X276kv.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-Dqn9rIuK.js → ReferenceLine-UiDLzqoj.js} +1 -1
  27. package/dist/client/assets/{SearchMd-B6NwptLV.js → SearchMd-BzDAUJSU.js} +1 -1
  28. package/dist/client/assets/{Sector-Bjn485EV.js → Sector-DZu8Iagq.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-I9tolWb2.js → ShoppingBag01-UnxomIP0.js} +1 -1
  30. package/dist/client/assets/{Sun-CrI4XUq_.js → Sun-B5QvK7X9.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DCpSydRk.js → SwitchHorizontal01-Dr_PPdbH.js} +1 -1
  32. package/dist/client/assets/{Tool01-vy7Izsxy.js → Tool01-OTauJJp3.js} +1 -1
  33. package/dist/client/assets/{Trash01-BVc7E-zT.js → Trash01-DzCXEeuM.js} +1 -1
  34. package/dist/client/assets/{Upload01-CbA0srCf.js → Upload01-2E_Vrojt.js} +1 -1
  35. package/dist/client/assets/{UserSquare-hT13OTGf.js → UserSquare-CmbcjiWL.js} +1 -1
  36. package/dist/client/assets/{Users01-DuFCVv-C.js → Users01-BFgiCQPh.js} +1 -1
  37. package/dist/client/assets/{XClose-Btox6E0t.js → XClose-BF4dTiHJ.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-LrGtO3ok.js → ZoomOut-BIPVG3Mi.js} +1 -1
  39. package/dist/client/assets/{access-gate-DGZVXonS.js → access-gate-BrHHSKUI.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-DPRdB-7o.js → add-connection-dialog-84lGCknH.js} +1 -1
  41. package/dist/client/assets/agent-analytics-CaqNBpQA.js +2 -0
  42. package/dist/client/assets/agent-app-DjBhUw5o.js +1 -0
  43. package/dist/client/assets/agent-assets-DkTI28JC.js +1 -0
  44. package/dist/client/assets/{agent-automation-BucrJFus.js → agent-automation-F0B4MP-_.js} +2 -2
  45. package/dist/client/assets/agent-automations-cb9A7zzk.js +1 -0
  46. package/dist/client/assets/agent-calendar-B3d7D0Bd.js +1 -0
  47. package/dist/client/assets/agent-connect-sources-D2B4_Vnn.js +1 -0
  48. package/dist/client/assets/agent-deck-5QYiPo7g.js +1 -0
  49. package/dist/client/assets/agent-e2e-COljZ8mH.js +1 -0
  50. package/dist/client/assets/agent-experiments-DbScA798.js +1 -0
  51. package/dist/client/assets/agent-file-BWUqgQfU.js +1 -0
  52. package/dist/client/assets/agent-hosting-DQRni5C3.js +1 -0
  53. package/dist/client/assets/{agent-icon-DU_klZzF.js → agent-icon-DMLbHyqZ.js} +1 -1
  54. package/dist/client/assets/agent-library-Dn9V9HRF.js +1 -0
  55. package/dist/client/assets/agent-library-file-DwvWIojZ.js +1 -0
  56. package/dist/client/assets/agent-monitor-BfOHieYM.js +1 -0
  57. package/dist/client/assets/agent-overview-DQfGfiWL.js +1 -0
  58. package/dist/client/assets/agent-releases-DmNYUENl.js +2 -0
  59. package/dist/client/assets/agent-settings-BBVQpT76.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-C_Hb6OuH.js → agent-site-editor-LiXNvVzd.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-DaRLEV5p.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content--qfnrcml.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-BUTGq7zp.js +1 -0
  64. package/dist/client/assets/agent-view-CsFo6WNW.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-DbvBrF0u.js → agent-view-guard-CIzLYG9Z.js} +1 -1
  66. package/dist/client/assets/{agents-list-Bu6ApeAs.js → agents-list-JqKBXhBb.js} +1 -1
  67. package/dist/client/assets/{ai-providers-CX0MNezq.js → ai-providers-BMdVqDyj.js} +1 -1
  68. package/dist/client/assets/{alert-DAT45VoU.js → alert-BAjsKun9.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-ta2rZOgT.js → analytics-sections-2r9JgnkF.js} +1 -1
  70. package/dist/client/assets/api-keys-DOllUAfq.js +1 -0
  71. package/dist/client/assets/{api-keys-ydOxTkFM.js → api-keys-D_a2AabQ.js} +1 -1
  72. package/dist/client/assets/app-editor-hGtjMe2U.js +1 -0
  73. package/dist/client/assets/{asset-utils-CNLu4ncG.js → asset-utils-BljmC-O4.js} +1 -1
  74. package/dist/client/assets/{auth-BrPPgu4r.js → auth-BawzvLgB.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-snzcHqzQ.js → auth-catchall-L4otHxQ4.js} +1 -1
  76. package/dist/client/assets/{auth-entry-CNvBXoES.js → auth-entry-DHl3Qa2p.js} +1 -1
  77. package/dist/client/assets/{auth-split-layout-BQ5peFQ8.js → auth-split-layout-Bpnft0WY.js} +1 -1
  78. package/dist/client/assets/{authenticate-and-persist-oauth-O0IrG3Sw.js → authenticate-and-persist-oauth-CL5vwYY0.js} +1 -1
  79. package/dist/client/assets/{automation-list-row-DVPOR6sy.js → automation-list-row-B1qIGbz-.js} +1 -1
  80. package/dist/client/assets/{automation-runs-CZ4Ynyjk.js → automation-runs-Dgzto0gK.js} +1 -1
  81. package/dist/client/assets/{automations-DFJ2R8Aq.js → automations-C5lyWSek.js} +1 -1
  82. package/dist/client/assets/{autosend-6P1IADfg.js → autosend-BSe8DnJN.js} +1 -1
  83. package/dist/client/assets/{badge-_4T6Jr1d.js → badge-Dk9QaMHv.js} +1 -1
  84. package/dist/client/assets/{block-document-4o0WYdTe.js → block-document-DlaqZi3o.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-Bz9GrXiv.js → blocks-preview-workspace-context-BzMwrhCE.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-MX6TAPcT.js → blocks-tab-states-B7iQVWp6.js} +1 -1
  87. package/dist/client/assets/{blog-schema-DRpnmDTv.js → blog-schema-BHmzvrMx.js} +1 -1
  88. package/dist/client/assets/{buckets-Dm5WDzLr.js → buckets-CVEqMqkM.js} +1 -1
  89. package/dist/client/assets/{build-improve-prompt-doc-CKhkT5-k.js → build-improve-prompt-doc-B6DMhmUe.js} +1 -1
  90. package/dist/client/assets/{calendar-2BS3l1pX.js → calendar-nGMQX5H2.js} +1 -1
  91. package/dist/client/assets/{capability-load-error-Ceg8IL6P.js → capability-load-error-BX1SCP0_.js} +1 -1
  92. package/dist/client/assets/category-editor-B4n2VHEp.js +1 -0
  93. package/dist/client/assets/{cdn-tab-BWEFzZ0D.js → cdn-tab-BPWLqXqs.js} +1 -1
  94. package/dist/client/assets/{chart-DHkCLdo5.js → chart-BOjeMD0e.js} +1 -1
  95. package/dist/client/assets/{chat-context-BPhmNX7K.js → chat-context-D2EaExW5.js} +1 -1
  96. package/dist/client/assets/{chat-draft-5-kbjuW7.js → chat-draft-C-EHUjTp.js} +1 -1
  97. package/dist/client/assets/{checkbox-B-dBQ4c_.js → checkbox--Oh7M1o0.js} +1 -1
  98. package/dist/client/assets/{choose-editor-CWeDgkwn.js → choose-editor-CHcjiEH4.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-BLV2TH4H.js → cli-auth-success-BfeyrT2F.js} +1 -1
  100. package/dist/client/assets/{client-icons-ff1hOdfW.js → client-icons-DQkGfKDh.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-DwJYbiAD.js +1 -0
  102. package/dist/client/assets/{collapsible-CTko-JTD.js → collapsible-DTK_WJix.js} +1 -1
  103. package/dist/client/assets/collection-detail-C0KsWIh2.js +1 -0
  104. package/dist/client/assets/{collection-display-button-BlJQajZP.js → collection-display-button-K6Znqj-g.js} +1 -1
  105. package/dist/client/assets/{collection-search-B_D1_L7e.js → collection-search-Qr0hkbHz.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-sn5_7qmL.js → collection-table-wrapper-D6zxNCnG.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-CKeKixSq.js → collection-tabs-Ma8F53u0.js} +1 -1
  108. package/dist/client/assets/{column-rules-D3LxXG3d.js → column-rules-IVYKsmdv.js} +1 -1
  109. package/dist/client/assets/{combobox-BuPlX0go.js → combobox-BDOw2yEp.js} +1 -1
  110. package/dist/client/assets/{command-C4G9SDjd.js → command-MDi6OAC1.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-D7Q1_FJ0.js → companion-mcps-section-CVi8OvfW.js} +1 -1
  112. package/dist/client/assets/{config-WCiNXzjt.js → config-Dym8HnZx.js} +1 -1
  113. package/dist/client/assets/{connect-DLGiSP8T.js → connect-fTG8J5lb.js} +1 -1
  114. package/dist/client/assets/{connect-layout-CNNNLoN2.js → connect-layout-CZZqsNI2.js} +1 -1
  115. package/dist/client/assets/{connect-source-dialog-Cg4v3gLs.js → connect-source-dialog-CncrwAT8.js} +1 -1
  116. package/dist/client/assets/{connection-CzlaCPJq.js → connection-O8PnXJZi.js} +1 -1
  117. package/dist/client/assets/{connection-card-CjGnO0Ri.js → connection-card-RdKzW886.js} +1 -1
  118. package/dist/client/assets/{connection-detail-D365Js6w.js → connection-detail-DnfNkGSf.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-CawPAK_n.js → connection-form-helpers-DVNTeSdC.js} +1 -1
  120. package/dist/client/assets/{connections-DbN9BdDL.js → connections-ByI0uD_U.js} +1 -1
  121. package/dist/client/assets/{content-tab-C1tQDTq7.js → content-tab-2K6f0sFB.js} +3 -3
  122. package/dist/client/assets/context-Dgv8u1kZ.js +1 -0
  123. package/dist/client/assets/{context-menu-Bd0pwq73.js → context-menu-_6aSLrNv.js} +1 -1
  124. package/dist/client/assets/{context-shell-C1Kw7dMX.js → context-shell-Dkh3MlNJ.js} +3 -3
  125. package/dist/client/assets/{core.esm-zhMGnPAC.js → core.esm-Co0itmj7.js} +1 -1
  126. package/dist/client/assets/{create-organization-dialog-DZOV2tdP.js → create-organization-dialog-QEydhapH.js} +1 -1
  127. package/dist/client/assets/{daily-pulse-CDcSWhDN.js → daily-pulse-D_SGGhIw.js} +1 -1
  128. package/dist/client/assets/discover-DmiBR0qW.js +1 -0
  129. package/dist/client/assets/{domain-settings-DxPYhNKL.js → domain-settings-Cf2W5c-a.js} +1 -1
  130. package/dist/client/assets/{drawer-DwHfH-sA.js → drawer-DgxlyKrC.js} +1 -1
  131. package/dist/client/assets/{editor-DXRzzVaI.js → editor-BlDtkpHT.js} +1 -1
  132. package/dist/client/assets/{editor-classes-B7ulbs0R.js → editor-classes-DHW6XsZP.js} +1 -1
  133. package/dist/client/assets/{empty-state-DqSsZioU.js → empty-state-CnCcC-8N.js} +1 -1
  134. package/dist/client/assets/{empty-state-B8Cr5koP.js → empty-state-DQH-DiCp.js} +1 -1
  135. package/dist/client/assets/{experiments-tab-DBTc5aio.js → experiments-tab-DN2DbmCx.js} +1 -1
  136. package/dist/client/assets/{experiments-tab-choice-CrG17v1a.js → experiments-tab-choice-B2cKHyhG.js} +1 -1
  137. package/dist/client/assets/{extract-connection-data-Dla-1nU5.js → extract-connection-data-BRZSg9CO.js} +1 -1
  138. package/dist/client/assets/{feature-gate-D5llTI9B.js → feature-gate-x6qhrhaG.js} +1 -1
  139. package/dist/client/assets/{feature-paywall-CtXPfbqb.js → feature-paywall-CypZbR93.js} +1 -1
  140. package/dist/client/assets/file-explorer-DG9-Rlc5.js +2 -0
  141. package/dist/client/assets/{file-preview-DPwUrUMN.js → file-preview-C4Z-YwH_.js} +1 -1
  142. package/dist/client/assets/{file-share-button-CjybY8Tm.js → file-share-button-DKZ7oEEn.js} +1 -1
  143. package/dist/client/assets/{file-type-icon-atKRN7rs.js → file-type-icon-BrZE8mnq.js} +1 -1
  144. package/dist/client/assets/{folder-icon-C8drmX0B.js → folder-icon-C8Dw6D6B.js} +1 -1
  145. package/dist/client/assets/{form-CvnFBQeW.js → form-DAT0TK1w.js} +1 -1
  146. package/dist/client/assets/{general-g7FZh5JJ.js → general-PUVNuDbw.js} +1 -1
  147. package/dist/client/assets/{held-block-view-DC6RQ2ea.js → held-block-view-rTOQRrzA.js} +3 -3
  148. package/dist/client/assets/home-B7Ic73m_.js +1 -0
  149. package/dist/client/assets/{hosted-publish-feedback-Bw27VuV1.js → hosted-publish-feedback-BYd2t20V.js} +1 -1
  150. package/dist/client/assets/{icon-button-tNw7Vtkn.js → icon-button-DIxoXQKV.js} +1 -1
  151. package/dist/client/assets/{index-B7Z9Kjbd.js → index-7SN0ucfq.js} +1 -1
  152. package/dist/client/assets/{index-DEnpRpne.js → index-BIIhX81I.js} +1 -1
  153. package/dist/client/assets/{index-CjaC6Nzi.js → index-BYpbKN34.js} +1 -1
  154. package/dist/client/assets/{index-6v-K5Cxc.js → index-BZRrEhsu.js} +1 -1
  155. package/dist/client/assets/{index-D-3p39v6.js → index-CQj5kSP7.js} +1 -1
  156. package/dist/client/assets/{index-eCzOjcqZ.js → index-Ca4Q75r_.js} +1 -1
  157. package/dist/client/assets/{index-DJ9iifq3.js → index-CjPh5dsm.js} +1 -1
  158. package/dist/client/assets/{index-BmrPuilw.js → index-CquZHSaS.js} +1 -1
  159. package/dist/client/assets/{index-CRRvfbCE.js → index-Cuqx2rXt.js} +1 -1
  160. package/dist/client/assets/{index-jw3DdvOr.js → index-Cxx5SZO5.js} +72 -72
  161. package/dist/client/assets/index-DJP2Tw2D.css +1 -0
  162. package/dist/client/assets/{index-CvUkMVxT.js → index-DZn-HYwc.js} +1 -1
  163. package/dist/client/assets/{index-dussYvC6.js → index-DbfDgKss.js} +1 -1
  164. package/dist/client/assets/{index-BcdLONw1.js → index-TAei2O9I.js} +2 -2
  165. package/dist/client/assets/{index-B8MW0sM8.js → index-qt5sLImf.js} +1 -1
  166. package/dist/client/assets/{index-redirect-54mWoDNH.js → index-redirect-C2mEcSuz.js} +1 -1
  167. package/dist/client/assets/{index-B94lWY4a.js → index-z9eosAhj.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-gBCPzHMW.js → infiniteQueryObserver-B9PBW4Q3.js} +1 -1
  169. package/dist/client/assets/{infra-billing-CXAOc9fj.js → infra-billing-Cdw4wy6i.js} +1 -1
  170. package/dist/client/assets/{input-BaD0fonC.js → input-BFXymFUo.js} +1 -1
  171. package/dist/client/assets/{input-B5josieU.js → input-dt9X0pvp.js} +3 -3
  172. package/dist/client/assets/{integration-icon-B9fBbTRM.js → integration-icon-DGyeG5wp.js} +1 -1
  173. package/dist/client/assets/{jira-icon-Bv5ageBy.js → jira-icon-aE2LRXUv.js} +1 -1
  174. package/dist/client/assets/{label-AxYpTX_1.js → label-Ctu3ACGH.js} +1 -1
  175. package/dist/client/assets/{layout-B5vknD3M.js → layout-BBi67rPP.js} +1 -1
  176. package/dist/client/assets/{legacy-agents-deep-BFbHZHpR.js → legacy-agents-deep-DXm2VUys.js} +1 -1
  177. package/dist/client/assets/{legacy-main-redirect-BJmOQ_Qr.js → legacy-main-redirect-xLzp4sos.js} +1 -1
  178. package/dist/client/assets/library-DXmyt1Gx.js +1 -0
  179. package/dist/client/assets/{login-Buyl7JH1.js → login-C4ik3KAa.js} +1 -1
  180. package/dist/client/assets/{markdown-BLdpFCyC.js → markdown-CWAWXi60.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-DRzRUUGp.js → mcp-app-renderer-C2UU8TPW.js} +1 -1
  182. package/dist/client/assets/{mcp-oauth-D7qBhGvW.js → mcp-oauth-BgczWCl7.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-GHz9sJ7e.js → mcp-oauth-DPnnrdpS.js} +1 -1
  184. package/dist/client/assets/{members-Bf_F_O6R.js → members-DYgO8xeR.js} +1 -1
  185. package/dist/client/assets/{memory-BcKxkoiN.js → memory-8RSHKutI.js} +1 -1
  186. package/dist/client/assets/{mini-report-page-sWiMdQYS.js → mini-report-page-Cok-AWQD.js} +1 -1
  187. package/dist/client/assets/{mock-board-B4kACMFO.js → mock-board-Nc8P3HCB.js} +3 -3
  188. package/dist/client/assets/{monaco-editor-VsGaeTlY.js → monaco-editor-D4Zh5ulV.js} +1 -1
  189. package/dist/client/assets/monitoring-00U9_JaZ.js +1 -0
  190. package/dist/client/assets/{monitoring-stats-row-Dgt34E1T.js → monitoring-stats-row-Bo4buMTd.js} +1 -1
  191. package/dist/client/assets/{multi-select-B_sjogy6.js → multi-select-Dgh7zCRl.js} +1 -1
  192. package/dist/client/assets/{mustache-yKDCM4Gl.js → mustache-BUKtJZnS.js} +1 -1
  193. package/dist/client/assets/{named-rule-uses-CX5osBfn.js → named-rule-uses-CILvps79.js} +1 -1
  194. package/dist/client/assets/{new-project-dialog-ClHa96hl.js → new-project-dialog-C8Z9rxsK.js} +1 -1
  195. package/dist/client/assets/{oauth-callback-AefR7v5s.js → oauth-callback-CE7Uxghr.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-ai-provider-D9A1qCvL.js → oauth-callback-ai-provider-CFmbF-CP.js} +1 -1
  197. package/dist/client/assets/{onboarding-DO2y_lRI.js → onboarding-mOv2Iyev.js} +1 -1
  198. package/dist/client/assets/{openai-conversation-CSJziSbn.js → openai-conversation-DziaKIXJ.js} +1 -1
  199. package/dist/client/assets/{optimistic-project-sidebar-views-DX1F54lH.js → optimistic-project-sidebar-views-BA4lpO5g.js} +1 -1
  200. package/dist/client/assets/{order-monitor-day-DIAgF4SE.js → order-monitor-day-BBlstwBq.js} +1 -1
  201. package/dist/client/assets/{organization-choice-BODVS_va.js → organization-choice--RODmYz9.js} +1 -1
  202. package/dist/client/assets/{orgs-CNLkPAm7.js → orgs-cjaXJmLi.js} +1 -1
  203. package/dist/client/assets/{page-seo-form-qY5CYRud.js → page-seo-form-EchOknJY.js} +1 -1
  204. package/dist/client/assets/{pair-OxCQAaus.js → pair-D81VUoh8.js} +1 -1
  205. package/dist/client/assets/{parse-sections-z_HKctjD.js → parse-sections-DqiKgsi7.js} +1 -1
  206. package/dist/client/assets/plan-D1zAf_A4.js +1 -0
  207. package/dist/client/assets/{plan-ladder-CKUbxlnA.js → plan-ladder-BM0vfuMg.js} +1 -1
  208. package/dist/client/assets/{popover-D_zqXHOI.js → popover-Cf5bE8mq.js} +1 -1
  209. package/dist/client/assets/post-calendar-YSAaYkEq.js +1 -0
  210. package/dist/client/assets/{post-editor-HGgKbrI4.js → post-editor-BhE1Cpdl.js} +2 -2
  211. package/dist/client/assets/{preview-content-CJ61-rUc.js → preview-content-CD6AbYC3.js} +1 -1
  212. package/dist/client/assets/{preview-dialog-BK9o5Sfr.js → preview-dialog-CDAUzIIz.js} +1 -1
  213. package/dist/client/assets/{preview-panel-BXi2z9ZS.js → preview-panel-CSWXyf1I.js} +1 -1
  214. package/dist/client/assets/{preview-tab-DcoTzGz1.js → preview-tab-C8fq_RoO.js} +3 -3
  215. package/dist/client/assets/{product-picker-dialog-C07nOSmf.js → product-picker-dialog-CxqpXPuE.js} +1 -1
  216. package/dist/client/assets/{profile-cTk6HZeq.js → profile-CqAQF01N.js} +1 -1
  217. package/dist/client/assets/project-app-view-D3SaQmET.js +1 -0
  218. package/dist/client/assets/{project-apps-CdmH-juT.js → project-apps-CcjoYUnG.js} +1 -1
  219. package/dist/client/assets/{project-feed-CccYGCuU.js → project-feed-BwJVQ7vC.js} +1 -1
  220. package/dist/client/assets/{project-icon-xQhHEp3k.js → project-icon-iIrZc685.js} +1 -1
  221. package/dist/client/assets/project-reports-BMuAb39w.js +1 -0
  222. package/dist/client/assets/project-tasks-DoKHGxuy.js +1 -0
  223. package/dist/client/assets/{projects-IW3VI19D.js → projects-B1CcZpiT.js} +1 -1
  224. package/dist/client/assets/{projects-empty-state-BEGBHesv.js → projects-empty-state-Bv5rWYhh.js} +1 -1
  225. package/dist/client/assets/{prompts-DsqH7xMN.js → prompts-Cf1xjNSu.js} +1 -1
  226. package/dist/client/assets/record-editor-AV1QHLlq.js +1 -0
  227. package/dist/client/assets/redirect-editor-DIiWED7H.js +1 -0
  228. package/dist/client/assets/{releases-api-CsaPRJw2.js → releases-api-DGvWHx7z.js} +1 -1
  229. package/dist/client/assets/reports-BNzwh8kk.js +1 -0
  230. package/dist/client/assets/{reports-CUlpuQ2Z.js → reports-DzSrMl4z.js} +1 -1
  231. package/dist/client/assets/{reports-onboarding-B2pSWrRV.js → reports-onboarding-BME_pd6z.js} +1 -1
  232. package/dist/client/assets/reports-tab-BXCeTXce.js +2 -0
  233. package/dist/client/assets/{repositories-CpN7bETs.js → repositories-Cfi5wijd.js} +1 -1
  234. package/dist/client/assets/repositories-yB6zWwua.js +1 -0
  235. package/dist/client/assets/{repository-binding-DtKjkNiS.js → repository-binding-CkScpIsb.js} +1 -1
  236. package/dist/client/assets/{repository-import-picker-T9uxw-6-.js → repository-import-picker-BS8H9PxV.js} +1 -1
  237. package/dist/client/assets/{repository-picker-BDi8y63n.js → repository-picker-l4M27wFx.js} +1 -1
  238. package/dist/client/assets/{require-capability-nIOBAh71.js → require-capability-DLhsbUyc.js} +1 -1
  239. package/dist/client/assets/{required-auth-layout-B_ag2iIH.js → required-auth-layout-CulRsSVA.js} +1 -1
  240. package/dist/client/assets/{reset-password-BtxS108c.js → reset-password-CfDFawIV.js} +1 -1
  241. package/dist/client/assets/{resizable-B3nlFFSB.js → resizable-BFC1GeuR.js} +1 -1
  242. package/dist/client/assets/{resolve-tab-icon-DXMIcSK3.js → resolve-tab-icon-BsW126zu.js} +1 -1
  243. package/dist/client/assets/{review-settings-BCmy9X9w.js → review-settings-BayMZpjl.js} +1 -1
  244. package/dist/client/assets/roles-DjGn6KVP.js +1 -0
  245. package/dist/client/assets/route-BR5FTjOO.js +1 -0
  246. package/dist/client/assets/route-EfequOdl.js +1 -0
  247. package/dist/client/assets/route-iXyqQPnW.js +1 -0
  248. package/dist/client/assets/{sandbox-lifecycle-context-Cr7WUuDz.js → sandbox-lifecycle-context-Dz_wNlv5.js} +1 -1
  249. package/dist/client/assets/{schema-wV4JUbYo.js → schema-B6wL-gff.js} +1 -1
  250. package/dist/client/assets/{schema-78fwu3zk.js → schema-WheR11j2.js} +1 -1
  251. package/dist/client/assets/{scroll-area-DfV0OgKi.js → scroll-area-rwjRqyfO.js} +1 -1
  252. package/dist/client/assets/{search-input-CPdh0iQL.js → search-input-CzCH_VIY.js} +1 -1
  253. package/dist/client/assets/{search-toggle-QzT5qdh_.js → search-toggle-BLa7geCi.js} +1 -1
  254. package/dist/client/assets/{secret-picker-D0FfmGN6.js → secret-picker-3QlkMO3w.js} +1 -1
  255. package/dist/client/assets/{secrets-L2yyTEJV.js → secrets-BhKAJ53J.js} +1 -1
  256. package/dist/client/assets/{section-array-field-Dr6WXwVQ.js → section-array-field-D9y7NMQM.js} +1 -1
  257. package/dist/client/assets/{sections-agVJaal8.js → sections-DvRVP9Dz.js} +1 -1
  258. package/dist/client/assets/sections-editor-Cy509EcE.js +1 -0
  259. package/dist/client/assets/{select-DQCVbj5T.js → select-UpCSfNOV.js} +1 -1
  260. package/dist/client/assets/{select-model-DmTLEUs6.js → select-model-xVaNPfcs.js} +1 -1
  261. package/dist/client/assets/seo-editor-BO3Jt0hb.js +1 -0
  262. package/dist/client/assets/{separator-B4y24369.js → separator-BPjv6lnz.js} +1 -1
  263. package/dist/client/assets/settings-tab-BFy7GozF.js +1 -0
  264. package/dist/client/assets/{sheet-CpISCuUN.js → sheet-COugYrjn.js} +1 -1
  265. package/dist/client/assets/shell-layout-e38uIahb.js +1 -0
  266. package/dist/client/assets/{site-draft-actions-D5J4u3-G.js → site-draft-actions-BXCMIWnV.js} +1 -1
  267. package/dist/client/assets/{site-draft-view-Dpvxra5M.js → site-draft-view-BfiVi6ch.js} +2 -2
  268. package/dist/client/assets/site-editor-BSPzYjtA.js +1 -0
  269. package/dist/client/assets/{site-editor-toast-DMNMCEOx.js → site-editor-toast-BafJU0kP.js} +1 -1
  270. package/dist/client/assets/{skills-BoFU4NLH.js → skills-Dw8G18Wk.js} +1 -1
  271. package/dist/client/assets/{slider-QCpv6LMm.js → slider-CW5CKPMF.js} +1 -1
  272. package/dist/client/assets/{sortable.esm-DEwGuCnL.js → sortable.esm-BfvWiQ7R.js} +1 -1
  273. package/dist/client/assets/{sso-CQ00JKfM.js → sso-C-6FjTmB.js} +1 -1
  274. package/dist/client/assets/{suggestion-BAlr69L-.js → suggestion-DmUPHSiw.js} +1 -1
  275. package/dist/client/assets/{switch-To5TyIkS.js → switch-C5GqEaZ9.js} +1 -1
  276. package/dist/client/assets/{symbol-DnfVmC0I.js → symbol-B_TAz0Ej.js} +1 -1
  277. package/dist/client/assets/{synced-repos-CW07ys29.js → synced-repos-BvOzTrqp.js} +1 -1
  278. package/dist/client/assets/{tab-icon-glyph-C3xAvHpF.js → tab-icon-glyph-CjnfHMM2.js} +1 -1
  279. package/dist/client/assets/{table-Cm1jH1V8.js → table-B203jObX.js} +1 -1
  280. package/dist/client/assets/{tabs-DgcKTFd2.js → tabs-DFO0cUd4.js} +1 -1
  281. package/dist/client/assets/{task-assignee-avatar-C9KHH6o7.js → task-assignee-avatar-Dcgi6zr9.js} +1 -1
  282. package/dist/client/assets/{task-board-BHxUa5hm.js → task-board-D0I9TrF7.js} +1 -1
  283. package/dist/client/assets/{task-route-BcKr-6il.js → task-route-F6hd-KVw.js} +1 -1
  284. package/dist/client/assets/{task-status-CihJb7N-.js → task-status-OQPi7i4V.js} +1 -1
  285. package/dist/client/assets/taskboard-analytics-eo8rY3BR.js +1 -0
  286. package/dist/client/assets/{tasks-DmkTP1d2.js → tasks-Bkp6Ztlp.js} +1 -1
  287. package/dist/client/assets/tasks-ofNfVL13.js +1 -0
  288. package/dist/client/assets/{textarea-B9s0J6-L.js → textarea-xiPVXzgn.js} +1 -1
  289. package/dist/client/assets/thread-analytics-D1pWKSrS.js +1 -0
  290. package/dist/client/assets/{thread-intent-Ccijo8FW.js → thread-intent-DJ7MUI-X.js} +1 -1
  291. package/dist/client/assets/{thread-route-BVfnsSUg.js → thread-route-DwUdsrkJ.js} +1 -1
  292. package/dist/client/assets/{thread-route-EFpj5Q3M.js → thread-route-p_tHH1KN.js} +1 -1
  293. package/dist/client/assets/{thread-sheet-body-CZDpkSjN.js → thread-sheet-body-B5yV21k9.js} +1 -1
  294. package/dist/client/assets/{time-range-picker--2ATryhW.js → time-range-picker-B9K0oYAh.js} +1 -1
  295. package/dist/client/assets/{toggle-group-DduyGFUi.js → toggle-group-epTzYWN_.js} +1 -1
  296. package/dist/client/assets/{tool-namespace-6L147wmT.js → tool-namespace-BnR-5HvH.js} +1 -1
  297. package/dist/client/assets/{toolbar-icon-button-CJNt4JSM.js → toolbar-icon-button-BtdQ071s.js} +1 -1
  298. package/dist/client/assets/{tooltip-DLcu2pQg.js → tooltip-BFWyx7Tu.js} +1 -1
  299. package/dist/client/assets/{tooltipContext-DCi7f8uY.js → tooltipContext-HIsDwgpv.js} +1 -1
  300. package/dist/client/assets/{track-Dy2j0QPi.js → track-D-nJPAhp.js} +1 -1
  301. package/dist/client/assets/{types-ulH2EtVa.js → types-Bg6xzMsU.js} +1 -1
  302. package/dist/client/assets/{url-slug-Dth3-7Lg.js → url-slug-CtldY3Fc.js} +1 -1
  303. package/dist/client/assets/{usage-stats-BsWORl3Y.js → usage-stats-BmyhY2hQ.js} +1 -1
  304. package/dist/client/assets/{use-ai-providers-CDuQs1Ba.js → use-ai-providers-D9fgOV9l.js} +1 -1
  305. package/dist/client/assets/{use-apply-named-rule-DX5HKcUc.js → use-apply-named-rule-IXYmBDIE.js} +1 -1
  306. package/dist/client/assets/{use-automations-BkQQphI-.js → use-automations-C69NPUwP.js} +1 -1
  307. package/dist/client/assets/{use-autosave-COKIMqY3.js → use-autosave-CTJSaQ0_.js} +1 -1
  308. package/dist/client/assets/{use-chat-layout-state-q8zIlEKg.js → use-chat-layout-state-CJZYxlgv.js} +1 -1
  309. package/dist/client/assets/{use-clock-tick-DvR_TVIp.js → use-clock-tick-DREB10jn.js} +1 -1
  310. package/dist/client/assets/{use-cms-publish-actions-CtPjI-ot.js → use-cms-publish-actions-DMKczmsK.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-Cp6JhT2N.js → use-connect-companion-BjwYn44-.js} +1 -1
  312. package/dist/client/assets/{use-connection-Db-d2gM4.js → use-connection-K2ZmGfOt.js} +1 -1
  313. package/dist/client/assets/{use-copy-CFaa1ury.js → use-copy-BaUwV4kr.js} +1 -1
  314. package/dist/client/assets/{use-create-virtual-mcp-2eMz1ync.js → use-create-virtual-mcp-BwVPiDjw.js} +1 -1
  315. package/dist/client/assets/{use-date-fns-locale-BHD_nJoW.js → use-date-fns-locale-DENjQBhy.js} +1 -1
  316. package/dist/client/assets/{use-debounced-autosave-D6U_Nh6G.js → use-debounced-autosave-dbZuRAQA.js} +1 -1
  317. package/dist/client/assets/{use-debounced-value-CG9ZLPPy.js → use-debounced-value-FWET2Ehv.js} +1 -1
  318. package/dist/client/assets/{use-deco-credits-BnbotBEA.js → use-deco-credits-1VNQ8RMw.js} +1 -1
  319. package/dist/client/assets/{use-decopilot-events-ksPa8i5N.js → use-decopilot-events-CUD4NK1e.js} +1 -1
  320. package/dist/client/assets/{use-delete-connection-oEmkyu4y.js → use-delete-connection-CgFangVs.js} +1 -1
  321. package/dist/client/assets/{use-deployment-admin-D3CEjNIr.js → use-deployment-admin-zH7DDGue.js} +1 -1
  322. package/dist/client/assets/{use-fast-preview-draft-url-ZoCxf2ZD.js → use-fast-preview-draft-url-DoiFL4L5.js} +1 -1
  323. package/dist/client/assets/{use-file-configs-B44eMCbV.js → use-file-configs-DUC_lmME.js} +1 -1
  324. package/dist/client/assets/{use-inbox-feed-BfLIAiPb.js → use-inbox-feed-CqYC-MvT.js} +1 -1
  325. package/dist/client/assets/{use-infinite-scroll-DBF3UBOd.js → use-infinite-scroll-Ch7Ei01m.js} +1 -1
  326. package/dist/client/assets/{use-join-requests-DkoaB_8d.js → use-join-requests-DErzm4wT.js} +1 -1
  327. package/dist/client/assets/{use-main-panel-tabs-CSwFtAqH.js → use-main-panel-tabs-BSyzNm2k.js} +1 -1
  328. package/dist/client/assets/{use-mcp-auth-status-IG57wBXS.js → use-mcp-auth-status-k4owDbnR.js} +1 -1
  329. package/dist/client/assets/{use-mcp-client-D6ElS18M.js → use-mcp-client-DogzcDtd.js} +1 -1
  330. package/dist/client/assets/{use-mcp-prompts-mpX7ubid.js → use-mcp-prompts-BWPx5MeN.js} +1 -1
  331. package/dist/client/assets/{use-mcp-tools-RoAM8bpH.js → use-mcp-tools-DdYwCCdP.js} +1 -1
  332. package/dist/client/assets/{use-mobile-BhX1NLy5.js → use-mobile-DcPhAAsp.js} +1 -1
  333. package/dist/client/assets/{use-move-blocks-Dh_gfkYv.js → use-move-blocks-DWaZEG7l.js} +1 -1
  334. package/dist/client/assets/{use-navigate-to-agent-DvIbqsvD.js → use-navigate-to-agent-IXTtvMGy.js} +1 -1
  335. package/dist/client/assets/{use-open-billing-url-BhG-chrX.js → use-open-billing-url-NkAi-AAT.js} +1 -1
  336. package/dist/client/assets/{use-org-fs-D0eNRBo9.js → use-org-fs-DjqN5PQk.js} +1 -1
  337. package/dist/client/assets/{use-org-repo-syncs-DsydKk88.js → use-org-repo-syncs-Cb1LW2ou.js} +1 -1
  338. package/dist/client/assets/{use-org-sso-UCXyI2OA.js → use-org-sso-C5KRT8Da.js} +1 -1
  339. package/dist/client/assets/{use-organization-roles-Bjl-mDvF.js → use-organization-roles-D7Za_lux.js} +1 -1
  340. package/dist/client/assets/{use-organization-settings-D8VzrTTn.js → use-organization-settings-DR7d93_z.js} +1 -1
  341. package/dist/client/assets/{use-panel-navigate-DEgeFNQE.js → use-panel-navigate-BCKq-TfH.js} +1 -1
  342. package/dist/client/assets/{use-project-native-view-presence-CaoNxrcp.js → use-project-native-view-presence-CJUNczNu.js} +1 -1
  343. package/dist/client/assets/{use-project-scope-CgFUZ469.js → use-project-scope-B0et_e8n.js} +1 -1
  344. package/dist/client/assets/{use-recent-apps-SJDHdi4L.js → use-recent-apps-4hKksVnL.js} +1 -1
  345. package/dist/client/assets/{use-releases-fWajfQaL.js → use-releases-Brxi4pIf.js} +1 -1
  346. package/dist/client/assets/{use-reports-diagnostic-D_npl6GZ.js → use-reports-diagnostic-BrQisY2f.js} +1 -1
  347. package/dist/client/assets/{use-sandbox-events-BMnvtQwc.js → use-sandbox-events-BY2iUkYN.js} +1 -1
  348. package/dist/client/assets/{use-secrets-JASayNqi.js → use-secrets-BadtzYAw.js} +1 -1
  349. package/dist/client/assets/{use-section-preview-base-ohDfhWi5.js → use-section-preview-base-dBughhn0.js} +1 -1
  350. package/dist/client/assets/{use-session-runtime-DryciBRX.js → use-session-runtime-B4KIbkK7.js} +1 -1
  351. package/dist/client/assets/{use-sidebar-collapsed-CQK6aXTW.js → use-sidebar-collapsed-cT1Flise.js} +1 -1
  352. package/dist/client/assets/{use-tags-o7wc3HiD.js → use-tags-TSeOGije.js} +1 -1
  353. package/dist/client/assets/{use-task-board-analytics-bsWF1h2C.js → use-task-board-analytics-DDlJfCk9.js} +1 -1
  354. package/dist/client/assets/{use-task-board-events-SAn8PfW_.js → use-task-board-events-DgTjbss7.js} +1 -1
  355. package/dist/client/assets/{use-task-board-item-prs-D-umSt3D.js → use-task-board-item-prs-JnKytEtF.js} +1 -1
  356. package/dist/client/assets/{use-task-metadata-DA-WZVqc.js → use-task-metadata-CqY7HgDo.js} +1 -1
  357. package/dist/client/assets/{use-thread-analytics-KDFFr__j.js → use-thread-analytics-BPVVv0U5.js} +1 -1
  358. package/dist/client/assets/{use-thread-outputs-B_UwhMzs.js → use-thread-outputs-CjJgHscq.js} +1 -1
  359. package/dist/client/assets/useInfiniteQuery-DocXgAgp.js +1 -0
  360. package/dist/client/assets/{useQueries-CosN8kAH.js → useQueries-BxI-y7oE.js} +1 -1
  361. package/dist/client/assets/useSuspenseInfiniteQuery-DfsNYX5W.js +1 -0
  362. package/dist/client/assets/{users-C_8K5Z80.js → users-DgL9fzoZ.js} +1 -1
  363. package/dist/client/assets/{utils-Bt7oFx0a.js → utils-CEKLHG87.js} +1 -1
  364. package/dist/client/assets/{variant-calendar-HAwNz-2g.js → variant-calendar-rECJW6F2.js} +1 -1
  365. package/dist/client/assets/{variant-matcher-override-Dr4jtjND.js → variant-matcher-override-B10eyFaR.js} +1 -1
  366. package/dist/client/assets/{view-header-BQwancqI.js → view-header-CnoXEZ6r.js} +1 -1
  367. package/dist/client/assets/{virtual-mcp-BBtFX4b6.js → virtual-mcp-skvwiaad.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-Br6EL-rz.js → watch-sse-pool-BD6-sAKH.js} +1 -1
  369. package/dist/client/index.html +2 -2
  370. package/dist/server/server.js +613 -613
  371. package/package.json +1 -1
  372. package/dist/client/assets/agent-analytics-DbjlHcVD.js +0 -2
  373. package/dist/client/assets/agent-app-DOt96j6b.js +0 -1
  374. package/dist/client/assets/agent-assets-nbJB8Oj2.js +0 -1
  375. package/dist/client/assets/agent-automations-D6sZ_uH1.js +0 -1
  376. package/dist/client/assets/agent-calendar-BeZfFvdy.js +0 -1
  377. package/dist/client/assets/agent-connect-sources-DPusFnZo.js +0 -1
  378. package/dist/client/assets/agent-deck-DHKRFst_.js +0 -1
  379. package/dist/client/assets/agent-e2e-R0CFT0l9.js +0 -1
  380. package/dist/client/assets/agent-experiments-CCB9X1v6.js +0 -1
  381. package/dist/client/assets/agent-file-CcNzA3hw.js +0 -1
  382. package/dist/client/assets/agent-hosting-DxbirQPV.js +0 -1
  383. package/dist/client/assets/agent-library-BEvE_-Ti.js +0 -1
  384. package/dist/client/assets/agent-library-file-CN9ZdgKY.js +0 -1
  385. package/dist/client/assets/agent-monitor-Bsotvv6A.js +0 -1
  386. package/dist/client/assets/agent-overview-Vo6g6VkH.js +0 -1
  387. package/dist/client/assets/agent-releases-ewE3U_5H.js +0 -2
  388. package/dist/client/assets/agent-settings-CLevnhNd.js +0 -1
  389. package/dist/client/assets/agent-site-editor-code-BSOZTg5X.js +0 -2
  390. package/dist/client/assets/agent-site-editor-content-ygftdw-u.js +0 -1
  391. package/dist/client/assets/agent-site-editor-preview-vZkvWMtS.js +0 -1
  392. package/dist/client/assets/agent-view-_KtaC3vc.js +0 -1
  393. package/dist/client/assets/api-keys-B2jnNbq9.js +0 -1
  394. package/dist/client/assets/app-editor-B-xgwIvk.js +0 -1
  395. package/dist/client/assets/category-editor-TaYKSOTk.js +0 -1
  396. package/dist/client/assets/cms-settings-editor-DdSslz-Q.js +0 -1
  397. package/dist/client/assets/collection-detail-D2cp8f3g.js +0 -1
  398. package/dist/client/assets/context-E79zhaXJ.js +0 -1
  399. package/dist/client/assets/discover-CFZrxFV0.js +0 -1
  400. package/dist/client/assets/file-explorer-rhDqu7jb.js +0 -2
  401. package/dist/client/assets/home-s82JYS5_.js +0 -1
  402. package/dist/client/assets/index-u-z_8GjU.css +0 -1
  403. package/dist/client/assets/library-DgTUGukD.js +0 -1
  404. package/dist/client/assets/monitoring-DMfNbo9x.js +0 -1
  405. package/dist/client/assets/plan-DKdj8O1S.js +0 -1
  406. package/dist/client/assets/post-calendar-BNad5FW9.js +0 -1
  407. package/dist/client/assets/project-app-view-BTP5n96V.js +0 -1
  408. package/dist/client/assets/project-reports-BpBTuHCJ.js +0 -1
  409. package/dist/client/assets/project-tasks-BWT7BsyY.js +0 -1
  410. package/dist/client/assets/record-editor-yA5vPrbM.js +0 -1
  411. package/dist/client/assets/redirect-editor-vrMsWLvF.js +0 -1
  412. package/dist/client/assets/reports-9FYZncTq.js +0 -1
  413. package/dist/client/assets/reports-tab-dQtRjvhB.js +0 -2
  414. package/dist/client/assets/repositories-qqa6gdmW.js +0 -1
  415. package/dist/client/assets/roles-CY77O_Rd.js +0 -1
  416. package/dist/client/assets/route-B9i-fUii.js +0 -1
  417. package/dist/client/assets/route-BpU761sd.js +0 -1
  418. package/dist/client/assets/route-DBRYZRDx.js +0 -1
  419. package/dist/client/assets/sections-editor-sY02MOga.js +0 -1
  420. package/dist/client/assets/seo-editor-BaTgHacI.js +0 -1
  421. package/dist/client/assets/settings-tab-CUKwi17R.js +0 -1
  422. package/dist/client/assets/shell-layout-DGAwwzx5.js +0 -1
  423. package/dist/client/assets/site-editor-BCqGKNmQ.js +0 -1
  424. package/dist/client/assets/taskboard-analytics-D_b8yWyw.js +0 -1
  425. package/dist/client/assets/tasks-DpdKZV3j.js +0 -1
  426. package/dist/client/assets/thread-analytics-B3XBAn3B.js +0 -1
  427. package/dist/client/assets/useInfiniteQuery-CcUhW7AW.js +0 -1
  428. package/dist/client/assets/useSuspenseInfiniteQuery-DCy5Ucgo.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{c as Se,b as ve,r as f,j as s,I as Je,h as fe,x as It,aY as Gt,w as Vt,B as Ce,y as Bt,v as qt,D as Ht,aM as Wt,aN as Qt,aO as Ut,aP as Yt,bm as Xt,aQ as Jt,aR as Zt,aS as _t,l as me,ay as en,q as tn,t as ee,K as Ze}from"./index-Cxx5SZO5.js";import{k as nn,M as rn,bO as sn,bP as ln}from"./agent-icon-DMLbHyqZ.js";import{s as on}from"./XClose-BF4dTiHJ.js";import{S as an}from"./scroll-area-rwjRqyfO.js";import{c as _e,T as et,a as tt}from"./tooltip-BFWyx7Tu.js";import{b as cn}from"./chat-context-D2EaExW5.js";import{F as dn}from"./editor-BlDtkpHT.js";import{a as fn}from"./shell-layout-e38uIahb.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{s as nt,f as un}from"./sandbox-git-api-DcqI6XE4.js";import{f as xn,C as de,d as rt,g as mn,e as pn}from"./context-menu-_6aSLrNv.js";import{t as hn}from"./ChevronUp-BsFnjeNK.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as yn,E as bn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Oe,o as En,s as Cn,v as Sn,p as Ae,q as Ee,r as ze,u as vn,w as Fn,x as Tn,y as kn}from"./utils-CEKLHG87.js";import"./AlertCircle-BWrNX7mN.js";import"./Tool01-OTauJJp3.js";import"./ArrowUp-CyzDPNV4.js";import"./ArrowLeft-DHx5ko4s.js";import"./LinkBroken01-C5q0tEvS.js";import"./ShoppingBag01-UnxomIP0.js";import"./ZoomOut-BIPVG3Mi.js";import"./Building02-DhL5SQYW.js";import"./CheckCircle-BJwUqTIe.js";import"./ChevronSelectorVertical-BsFKOzFl.js";import"./UserSquare-CmbcjiWL.js";import"./Copy01-BMtss9AJ.js";import"./CreditCard01-DpJ5HaJ6.js";import"./DotsVertical-7Rm5ttPh.js";import"./Image01-B1C03E_N.js";import"./Globe04-BJeMTkc9.js";import"./SwitchHorizontal01-Dr_PPdbH.js";import"./Key01-AhMvx8Bf.js";import"./Link01-p8humFYG.js";import"./Minus-BMakGco3.js";import"./Monitor01-CLwaIfNu.js";import"./Sun-B5QvK7X9.js";import"./Play-BoOYKEkH.js";import"./Plus-D7X276kv.js";import"./SearchMd-BzDAUJSU.js";import"./Trash01-DzCXEeuM.js";import"./Upload01-2E_Vrojt.js";import"./Users01-BFgiCQPh.js";import"./index-BdQq_4o_.js";import"./index-z9eosAhj.js";import"./use-panel-navigate-BCKq-TfH.js";import"./thread-route-p_tHH1KN.js";import"./use-project-scope-B0et_e8n.js";import"./repository-binding-CkScpIsb.js";import"./use-mcp-client-DogzcDtd.js";import"./auth-BawzvLgB.js";import"./autosend-BSe8DnJN.js";import"./thread-intent-DJ7MUI-X.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BD6-sAKH.js";import"./task-board-D0I9TrF7.js";import"./schema-WheR11j2.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-CUD4NK1e.js";import"./use-ai-providers-D9fgOV9l.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DR7d93_z.js";import"./use-deployment-admin-zH7DDGue.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-DREB10jn.js";import"./command-MDi6OAC1.js";import"./index-7SN0ucfq.js";import"./integration-icon-DGyeG5wp.js";import"./project-icon-iIrZc685.js";import"./new-project-dialog-C8Z9rxsK.js";import"./label-Ctu3ACGH.js";import"./repository-import-picker-BS8H9PxV.js";import"./use-navigate-to-agent-IXTtvMGy.js";import"./repository-picker-l4M27wFx.js";import"./useInfiniteQuery-DocXgAgp.js";import"./infiniteQueryObserver-B9PBW4Q3.js";import"./collection-search-Qr0hkbHz.js";import"./use-debounced-value-FWET2Ehv.js";import"./required-auth-layout-CulRsSVA.js";import"./use-org-sso-C5KRT8Da.js";const Rn={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function Ln(O){const e=Se.c(71),{open:x,mode:Y,initialName:b,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=O,A=b===void 0?"":b,m=L===void 0?!1:L,a=ve(),[o,P]=f.useState(A),[X,M]=f.useState(x),p=Rn[Y];x!==X&&(M(x),x&&P(A));let c;e[0]!==m||e[1]!==w?(c=U=>{!U&&!m&&w(!1)},e[0]=m,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==m||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||m||await d(te)},e[3]=m,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==p.titleKey||e[8]!==a?(S=a(p.titleKey),e[7]=p.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(It,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==p.descriptionKey||e[13]!==a?(D=a(p.descriptionKey),e[12]=p.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(Gt,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(Vt,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(Je,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let y;e[23]!==a?(y=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=y):y=e[24];let T;e[25]!==y?(T=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:y}),e[25]=y,e[26]=T):T=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==p.placeholderKey||e[29]!==a?($=a(p.placeholderKey),e[28]=p.placeholderKey,e[29]=a,e[30]=$):$=e[30];let J;e[31]!==m||e[32]!==o||e[33]!==$?(J=s.jsx(Je,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:m}),e[31]=m,e[32]=o,e[33]=$,e[34]=J):J=e[34];let Z;e[35]!==T||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[T,J]}),e[35]=T,e[36]=J,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let k;e[43]!==a?(k=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=k):k=e[44];let W;e[45]!==m||e[46]!==I||e[47]!==k?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:m,children:k}),e[45]=m,e[46]=I,e[47]=k,e[48]=W):W=e[48];let K;e[49]!==m||e[50]!==o?(K=!o.trim()||m,e[49]=m,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==p.submitKey||e[53]!==m||e[54]!==a?(Q=m?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(p.submitKey),e[52]=p.submitKey,e[53]=m,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(Bt,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let V;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(V=s.jsx(qt,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=V):V=e[66];let B;return e[67]!==C||e[68]!==x||e[69]!==V?(B=s.jsx(Ht,{open:x,onOpenChange:C,children:V}),e[67]=C,e[68]=x,e[69]=V,e[70]=B):B=e[70],B}function Pn(O){const e=Se.c(47),{deleteTarget:x,deleteDirtyPaths:Y,fsActionPending:b,onOpenChange:N,onConfirm:L}=O,d=ve(),w=x?.kind==="directory",A=x!==null,m=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==m?(a=d(m),e[0]=d,e[1]=m,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(Wt,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const X=x?.name;let M;e[7]!==X?(M=s.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=M):M=e[8];let p;e[9]!==w||e[10]!==d?(p=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=p):p=e[11];let c;e[12]!==Y.length||e[13]!==d?(c=Y.length>0&&s.jsxs(s.Fragment,{children:[" ",Y.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:Y.length})]}),e[12]=Y.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==p||e[18]!==c?(C=s.jsxs(Qt,{children:[P," ",M,p,c]}),e[15]=P,e[16]=M,e[17]=p,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(Ut,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==b||e[26]!==R?(S=s.jsx(Yt,{disabled:b,children:R}),e[25]=b,e[26]=R,e[27]=S):S=e[27];const v=b||!x;let D;e[28]!==x||e[29]!==L?(D=H=>{H.preventDefault(),x&&L(x)},e[28]=x,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(Xt,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(Jt,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let y;e[40]!==z||e[41]!==E?(y=s.jsxs(Zt,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=y):y=e[42];let T;return e[43]!==N||e[44]!==A||e[45]!==y?(T=s.jsx(_t,{open:A,onOpenChange:N,children:y}),e[43]=N,e[44]=A,e[45]=y,e[46]=T):T=e[46],T}const Mn="#d9a441";function Kn(O){const e=Se.c(63),{node:x,depth:Y,isExpanded:b,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:A,onNewFile:m,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:X,onDelete:M}=O,p=L===void 0?!1:L,c=ve(),C=x.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=me("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-sm hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${Y*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==A?(g=()=>{A(),w()},e[4]=w,e[5]=A,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==b||e[11]!==p?(E=C?s.jsxs(s.Fragment,{children:[p?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):b?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(en,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(nn,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=b,e[11]=p,e[12]=E):E=e[12];let y;e[13]!==x.name?(y=s.jsx("span",{className:"truncate",children:x.name}),e[13]=x.name,e[14]=y):y=e[14];let T;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==y?(T=s.jsx(xn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,y]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=y,e[20]=T):T=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==m||e[24]!==H?($=s.jsx(de,{onSelect:m,children:H}),e[23]=m,e[24]=H,e[25]=$):$=e[25];let J;e[26]!==c?(J=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=J):J=e[27];let Z;e[28]!==a||e[29]!==J?(Z=s.jsx(de,{onSelect:a,children:J}),e[28]=a,e[29]=J,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let k;e[34]!==o||e[35]!==I?(k=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=k):k=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=s.jsx(de,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let V;e[48]!==c?(V=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=V):V=e[49];let B;e[50]!==M||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:M,children:V}),e[50]=M,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==k||e[56]!==K||e[57]!==F||e[58]!==B?(U=s.jsxs(mn,{className:"w-52",children:[$,Z,_,k,K,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=k,e[56]=K,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==T?(te=s.jsxs(pn,{children:[T,U]}),e[60]=U,e[61]=T,e[62]=te):te=e[62],te}const st=200,On=2,An=250,it=200;function zn(O,e){return gn(O,e)}function $n(O){const e=Se.c(9),{text:x,query:Y}=O;let b,N,L;if(e[0]!==Y||e[1]!==x){const{leadingEllipsis:w,segments:A}=En(x,Y);b="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=A.map(In),e[0]=Y,e[1]=x,e[2]=b,e[3]=N,e[4]=L}else b=e[2],N=e[3],L=e[4];let d;return e[5]!==b||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:b,children:[N,L]}),e[5]=b,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(O,e){return O.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:O.text},e):s.jsx("span",{children:O.text},e)}function xs({orgSlug:O,virtualMcpId:e,branch:x,threadId:Y,openPath:b}){const N={orgSlug:O,virtualMcpId:e,branch:x,threadId:Y},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:A}=L,[m,a]=f.useState(new Set),[o,P]=f.useState(null),[X,M]=f.useState(null),[p,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,y]=f.useState(!1),[T,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),k=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),V=f.useRef(null),B=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,pe]=f.useState(null),{sendMessage:lt}=cn(),{openSidePanel:ot}=fn(),he=tn(),[q,re]=f.useState(null),[Te,ke]=f.useState(null),[ge,ye]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function be(){he.invalidateQueries({queryKey:nt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=Tn(t);if(!n)return;const r=`${O}/${e}/${x}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(O,e,x)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return p.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await be(),re(null),xe(r)}async function xt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await be(),re(null),a(l=>{const u=new Set(l);for(const le of Oe(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function mt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,A))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await be(),re(null)}async function pt(t,n){ye(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await be(),ke(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}ye(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await xt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await mt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,yt]=f.useState(null),h=ve();if(b&&b!==gt){yt(b);const t=b;queueMicrotask(()=>{yn(t)&&xe(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,r){if(r!==k.current)return!1;let i=!1;return d(l=>{const u=n?kn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function bt(t){const n=Q.current.get(t);if(n)return n;const r=k.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===k.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Be(t){if(!Ae(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await bt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Oe(n)){if(!Ae(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++k.current;V.current=null,B.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:bn});Ve(n,!1,t),J(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),y(!1)}async function Nt(){const t=k.current,n=V.current;if(n&&n.generation===t)return n.files;const r=B.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return k.current===t&&(V.current={generation:t,files:l.files}),l.files})();B.current={generation:t,promise:i};try{return await i}finally{B.current?.generation===t&&(B.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),y((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),y(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<On?(D(null),g(!1),y(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},An)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;xe(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:nt(N)});try{const r=await un(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function Tt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),pe(null),p.includes(t)||c(n=>[...n,t]),qe(t)}function kt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Ae(t,K.current))try{if(await Be(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Oe(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),Tt(t)}function xe(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return X?.kind==="directory"?X.path:X?.kind==="file"?De(X.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,A),Ue=jn(Kt,m),Le=R?.length??0,Ye=Nn(v??[]),Xe=v?.length??0,ce=o?oe.get(o):null,Ot=ce?.loaded&&ce.editorValue!==ce.savedContent,At=Te?dt(Te.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);pe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
2
+ `)}]}),pe(null)}return T&&!$?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[s.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[s.jsxs("div",{className:"relative min-w-0 flex-1",children:[s.jsx(rn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",value:C,onChange:t=>St(t.target.value),placeholder:h("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":h("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs placeholder:text-muted-foreground focus-ring"})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(sn,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFile")})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(ln,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(an,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[!C&&Ue.map(t=>{const{node:n,depth:r}=t,i=n.kind==="directory",l=m.has(n.path),u=X?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Kn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Me(n.name),onSelect:()=>M(n),onOpen:()=>{i?Lt(n.path,l):xe(n.path)},onNewFile:()=>re({mode:"new-file",node:n,parentDir:le}),onNewFolder:()=>re({mode:"new-folder",node:n,parentDir:le}),onCopyPath:()=>$e(h,"Path",Ne(n.path)),onCopyRelativePath:()=>$e(h,"Relative path",ne(n.path)),onRename:()=>re({mode:"rename",node:n,parentDir:le}),onDelete:()=>ke(n)},n.path)}),!C&&$&&Ue.length===0&&s.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFilesFound")}),C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.files")}),Le>0&&s.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=it?"+":""]})]}),R!==null&&R.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFileNamesMatch")}),R?.map(t=>{const n=t.split("/").pop()??t,r=De(t),{Icon:i,color:l}=Me(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>xe(t),title:t,className:me("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:me("shrink-0",l)}),s.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),r!=="/"&&s.jsx("span",{className:"truncate text-muted-foreground/60",children:r})]},t)})]}),C&&s.jsxs("div",{className:"mt-1 border-t pt-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Xe>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Ye.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Me(n);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[s.jsx(r,{size:14,className:me("shrink-0",i)}),s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(l=>s.jsxs("button",{type:"button",onClick:()=>vt(l),title:`${t.path}:${l.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[s.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:l.line}),s.jsx($n,{text:l.text,query:C})]},`${t.path}:${l.line}`))]},t.path)})]})]})})]}),s.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[p.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:p.map(t=>{const n=oe.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,i=o===t,l=t.split("/").pop()??t;return s.jsxs("div",{className:me("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",i?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{P(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":i,children:[s.jsx("span",{className:"truncate max-w-32",children:l}),r&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),s.jsx("button",{type:"button",className:"ml-1 p-0.5 hover:bg-accent-foreground/10 rounded-lg",onClick:u=>{u.stopPropagation(),kt(t)},children:s.jsx(on,{size:12})})]},t)})}),se&&s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:s.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&$t(r.value)},children:[s.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:h("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&pe(null)}}),s.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity",title:h("sandbox.fileExplorer.send"),children:s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[s.jsx("title",{children:h("sandbox.fileExplorer.send")}),s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:o&&ce?.loaded?s.jsx(dn,{language:Ke(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ce.editorValue,path:o,onChange:t=>{const n=o;n&&ae(r=>{const i=new Map(r),l=i.get(n);return l&&i.set(n,{...l,editorValue:t??""}),i})},onMount:zt,loading:s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!ce?.loaded?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:h("sandbox.fileExplorer.selectFileToEdit")})}),o&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-2xs text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(Ot?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(o)]})]})]}),s.jsx(Ln,{open:q!==null,mode:q?.mode??"new-file",initialName:q?.mode==="rename"?q.node.name:"",parentLabel:q&&q.mode!=="rename"?q.parentDir==="/"?"/":ne(q.parentDir):void 0,isPending:ge,onSubmit:t=>ht(h,t),onOpenChange:t=>{!t&&!ge&&re(null)}}),s.jsx(Pn,{deleteTarget:Te,deleteDirtyPaths:At,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&ke(null)},onConfirm:t=>{pt(h,t)}})]})}export{xs as FileExplorer};
@@ -1 +1 @@
1
- import{c as x,H as g,j as s,h as v,bB as w,B as y}from"./index-jw3DdvOr.js";import{n as N}from"./ZoomOut-LrGtO3ok.js";import{g as b}from"./use-org-fs-D0eNRBo9.js";import{g as S}from"./utils-Bt7oFx0a.js";import{F as _}from"./editor-DXRzzVaI.js";import{F as k}from"./file-type-icon-atKRN7rs.js";import{M as z}from"./markdown-BLdpFCyC.js";function U(n){const e=x.c(11),{value:l,filename:r}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=S(r),e[0]=r,e[1]=o):o=e[1];const f=c?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(v,{className:"size-5 text-muted-foreground"})}),e[2]=a):a=e[2];let i,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={enabled:!1},d={top:12,bottom:12},e[3]=i,e[4]=d):(i=e[3],d=e[4]);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:i,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=m):m=e[5];let u;return e[6]!==r||e[7]!==o||e[8]!==f||e[9]!==l?(u=s.jsx(_,{path:r,language:o,value:l,theme:f,loading:a,options:m},r),e[6]=r,e[7]=o,e[8]=f,e[9]=l,e[10]=u):u=e[10],u}function E(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const F=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),T=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),h=2*1024*1024;function $(n,e){const l=n.split(".").pop()?.toLowerCase()??"";return F.has(l)?"image":l==="pdf"?"pdf":l==="html"||l==="htm"?"html":l==="md"||l==="markdown"?e<=h?"markdown":"download":T.has(l)&&e<=h?"text":"download"}function B(){const n=x.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let l;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(w,{className:"h-3 w-full"}),s.jsx(w,{className:"h-3 w-5/6"}),s.jsx(w,{className:"h-3 w-2/3"})]})]})}),n[1]=l):l=n[1],l}function j(n){const e=x.c(20),{file:l,note:r}=n;let t;e[0]!==l.filename?(t=s.jsx(k,{filename:l.filename,className:"h-12 w-10"}),e[0]=l.filename,e[1]=t):t=e[1];let c;e[2]!==l.filename?(c=s.jsx("span",{className:"text-sm font-medium text-foreground",children:l.filename}),e[2]=l.filename,e[3]=c):c=e[3];let o;e[4]!==l.size?(o=E(l.size),e[4]=l.size,e[5]=o):o=e[5];const f=r?` · ${r}`:"";let a;e[6]!==o||e[7]!==f?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,f]}),e[6]=o,e[7]=f,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==a?(i=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=i):i=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(N,{size:14}),e[12]=d):d=e[12];let m;e[13]!==l.downloadUrl||e[14]!==l.filename?(m=s.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:l.downloadUrl,download:l.filename,children:[d,"Download"]})}),e[13]=l.downloadUrl,e[14]=l.filename,e[15]=m):m=e[15];let u;return e[16]!==t||e[17]!==i||e[18]!==m?(u=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 surface-inset px-10 py-8",children:[t,i,m]})}),e[16]=t,e[17]=i,e[18]=m,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:r}=n,{data:t,isPending:c,isError:o}=b(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(B,{}),e[0]=a):a=e[0],a}if(o||!t){let a;return e[1]!==l?(a=s.jsx(j,{file:l,note:"preview unavailable"}),e[1]=l,e[2]=a):a=e[2],a}if(r){const a=`file-preview-${l.key}`;let i;return e[3]!==t||e[4]!==a?(i=s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:s.jsx(z,{id:a,text:t})})}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}let f;return e[6]!==t||e[7]!==l.filename?(f=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=f):f=e[8],f}function I(n){const e=x.c(15),{file:l}=n;switch($(l.filename,l.size)){case"image":{let t;return e[0]!==l.downloadUrl||e[1]!==l.filename?(t=s.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:s.jsx("img",{src:l.downloadUrl,alt:l.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=l.downloadUrl,e[1]=l.filename,e[2]=t):t=e[2],t}case"pdf":{let t;return e[3]!==l.downloadUrl||e[4]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-same-origin allow-downloads",className:"block h-full w-full bg-white"}),e[3]=l.downloadUrl,e[4]=l.filename,e[5]=t):t=e[5],t}case"html":{let t;return e[6]!==l.downloadUrl||e[7]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=t):t=e[8],t}case"markdown":{let t;return e[9]!==l?(t=s.jsx(p,{file:l,markdown:!0}),e[9]=l,e[10]=t):t=e[10],t}case"text":{let t;return e[11]!==l?(t=s.jsx(p,{file:l,markdown:!1}),e[11]=l,e[12]=t):t=e[12],t}default:{let t;return e[13]!==l?(t=s.jsx(j,{file:l}),e[13]=l,e[14]=t):t=e[14],t}}}export{I as F,B as a,E as f};
1
+ import{c as x,H as g,j as s,h as v,bB as w,B as y}from"./index-Cxx5SZO5.js";import{n as N}from"./ZoomOut-BIPVG3Mi.js";import{g as b}from"./use-org-fs-DjqN5PQk.js";import{g as S}from"./utils-CEKLHG87.js";import{F as _}from"./editor-BlDtkpHT.js";import{F as k}from"./file-type-icon-BrZE8mnq.js";import{M as z}from"./markdown-CWAWXi60.js";function U(n){const e=x.c(11),{value:l,filename:r}=n,[t]=g(),c=t.theme==="dark"||t.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=S(r),e[0]=r,e[1]=o):o=e[1];const f=c?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(v,{className:"size-5 text-muted-foreground"})}),e[2]=a):a=e[2];let i,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={enabled:!1},d={top:12,bottom:12},e[3]=i,e[4]=d):(i=e[3],d=e[4]);let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:i,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=m):m=e[5];let u;return e[6]!==r||e[7]!==o||e[8]!==f||e[9]!==l?(u=s.jsx(_,{path:r,language:o,value:l,theme:f,loading:a,options:m},r),e[6]=r,e[7]=o,e[8]=f,e[9]=l,e[10]=u):u=e[10],u}function E(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const F=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),T=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),h=2*1024*1024;function $(n,e){const l=n.split(".").pop()?.toLowerCase()??"";return F.has(l)?"image":l==="pdf"?"pdf":l==="html"||l==="htm"?"html":l==="md"||l==="markdown"?e<=h?"markdown":"download":T.has(l)&&e<=h?"text":"download"}function B(){const n=x.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let l;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(w,{className:"h-3 w-full"}),s.jsx(w,{className:"h-3 w-5/6"}),s.jsx(w,{className:"h-3 w-2/3"})]})]})}),n[1]=l):l=n[1],l}function j(n){const e=x.c(20),{file:l,note:r}=n;let t;e[0]!==l.filename?(t=s.jsx(k,{filename:l.filename,className:"h-12 w-10"}),e[0]=l.filename,e[1]=t):t=e[1];let c;e[2]!==l.filename?(c=s.jsx("span",{className:"text-sm font-medium text-foreground",children:l.filename}),e[2]=l.filename,e[3]=c):c=e[3];let o;e[4]!==l.size?(o=E(l.size),e[4]=l.size,e[5]=o):o=e[5];const f=r?` · ${r}`:"";let a;e[6]!==o||e[7]!==f?(a=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,f]}),e[6]=o,e[7]=f,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==a?(i=s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[c,a]}),e[9]=c,e[10]=a,e[11]=i):i=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(N,{size:14}),e[12]=d):d=e[12];let m;e[13]!==l.downloadUrl||e[14]!==l.filename?(m=s.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:l.downloadUrl,download:l.filename,children:[d,"Download"]})}),e[13]=l.downloadUrl,e[14]=l.filename,e[15]=m):m=e[15];let u;return e[16]!==t||e[17]!==i||e[18]!==m?(u=s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 surface-inset px-10 py-8",children:[t,i,m]})}),e[16]=t,e[17]=i,e[18]=m,e[19]=u):u=e[19],u}function p(n){const e=x.c(9),{file:l,markdown:r}=n,{data:t,isPending:c,isError:o}=b(l.downloadUrl);if(c){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(B,{}),e[0]=a):a=e[0],a}if(o||!t){let a;return e[1]!==l?(a=s.jsx(j,{file:l,note:"preview unavailable"}),e[1]=l,e[2]=a):a=e[2],a}if(r){const a=`file-preview-${l.key}`;let i;return e[3]!==t||e[4]!==a?(i=s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:s.jsx(z,{id:a,text:t})})}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}let f;return e[6]!==t||e[7]!==l.filename?(f=s.jsx(U,{value:t,filename:l.filename}),e[6]=t,e[7]=l.filename,e[8]=f):f=e[8],f}function I(n){const e=x.c(15),{file:l}=n;switch($(l.filename,l.size)){case"image":{let t;return e[0]!==l.downloadUrl||e[1]!==l.filename?(t=s.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:s.jsx("img",{src:l.downloadUrl,alt:l.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=l.downloadUrl,e[1]=l.filename,e[2]=t):t=e[2],t}case"pdf":{let t;return e[3]!==l.downloadUrl||e[4]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-same-origin allow-downloads",className:"block h-full w-full bg-white"}),e[3]=l.downloadUrl,e[4]=l.filename,e[5]=t):t=e[5],t}case"html":{let t;return e[6]!==l.downloadUrl||e[7]!==l.filename?(t=s.jsx("iframe",{src:l.downloadUrl,title:l.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=t):t=e[8],t}case"markdown":{let t;return e[9]!==l?(t=s.jsx(p,{file:l,markdown:!0}),e[9]=l,e[10]=t):t=e[10],t}case"text":{let t;return e[11]!==l?(t=s.jsx(p,{file:l,markdown:!1}),e[11]=l,e[12]=t):t=e[12],t}default:{let t;return e[13]!==l?(t=s.jsx(j,{file:l}),e[13]=l,e[14]=t):t=e[14],t}}}export{I as F,B as a,E as f};
@@ -1,3 +1,3 @@
1
- import{c as te,b as se,j as t,B as q,b8 as fe,l as ee,Z as me,V as he,Y as pe,X as re,n as xe,a7 as be,a4 as ve,q as we,r as P,t as G,K as ie,ai as ke,ag as ge,I as ye,w as Se,x as je,v as Te,D as Me}from"./index-jw3DdvOr.js";import{c as Y,T as Q,a as X}from"./tooltip-DLcu2pQg.js";import{n as ae}from"./ZoomOut-LrGtO3ok.js";import{as as Ce,b2 as Pe,a as De,m as ze,b as oe,b3 as Ne}from"./agent-icon-DU_klZzF.js";import{c as Ee,e as Oe,d as $e,u as Be}from"./use-org-fs-D0eNRBo9.js";import{a as Re,b as Ae,P as Ue}from"./popover-D_zqXHOI.js";import{a as Le}from"./Copy01--5lfgwG0.js";import{i as Ie}from"./Key01-DpH9OVIT.js";function le(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function _e(n){const e=te.c(73),{readUrl:l,editor:a,downloadName:m,trailing:v,className:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==l?(p=new URL(l,window.location.origin).toString(),e[0]=l,e[1]=p):p=e[1];const o=p;let L;e[2]!==r?(L=le(r),e[2]=r,e[3]=L):L=e[3];const u=L;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",size:"sm",onClick:a.reload,children:[t.jsx(fe,{size:12}),s("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.agentRewriteWarning")})]}),e[4]=a.agentUpdated,e[5]=a.reload,e[6]=s,e[7]=x):x=e[7];let g;e[8]!==a.saving||e[9]!==s?(g=a.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:s("deck.deckToolbar.saving")}),e[8]=a.saving,e[9]=s,e[10]=g):g=e[10];let S;e[11]!==u.size||e[12]!==u.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.editMode?"secondary":u.variant,size:u.size,"aria-pressed":a.editMode,"aria-label":a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInline"),className:ee(a.editMode&&"text-primary"),onClick:()=>a.setEditMode(!a.editMode),children:t.jsx(Ce,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=u.size,e[12]=u.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==o||e[17]!==u.size||e[18]!==u.variant||e[19]!==m||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(me,{children:[t.jsx(he,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(pe,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[t.jsx(Pe,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:o,download:m,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:o,download:m,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=o,e[17]=u.size,e[18]=u.variant,e[19]=m,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=u.variant,D=u.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==o?(M=()=>window.open(o,"_blank","noopener"),e[25]=o,e[26]=M):M=e[26];let I;e[27]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(be,{size:14}),e[27]=I):I=e[27];let d;e[28]!==u.size||e[29]!==u.variant||e[30]!==T||e[31]!==M?(d=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:j,size:D,"aria-label":T,onClick:M,children:I})}),e[28]=u.size,e[29]=u.variant,e[30]=T,e[31]=M,e[32]=d):d=e[32];let B;e[33]!==s?(B=s("deck.deckToolbar.openInNewTab"),e[33]=s,e[34]=B):B=e[34];let R;e[35]!==B?(R=t.jsx(X,{side:"bottom",children:B}),e[35]=B,e[36]=R):R=e[36];let b;e[37]!==d||e[38]!==R?(b=t.jsxs(Y,{children:[d,R]}),e[37]=d,e[38]=R,e[39]=b):b=e[39];let O;e[40]!==b||e[41]!==x||e[42]!==g||e[43]!==S||e[44]!==w||e[45]!==v?(O=t.jsxs(t.Fragment,{children:[x,g,S,w,b,v]}),e[40]=b,e[41]=x,e[42]=g,e[43]=S,e[44]=w,e[45]=v,e[46]=O):O=e[46];const A=O;let _;e[47]!==a.railOpen||e[48]!==s?(_=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=_):_=e[49];const z=_;let $;e[50]!==u.size||e[51]!==u.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.railOpen?"secondary":u.variant,size:u.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(ze,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=u.size,e[51]=u.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let c;return e[55]!==A||e[56]!==C?(c=t.jsxs(xe.Actions,{children:[C,A]}),e[55]=A,e[56]=C,e[57]=c):c=e[57],c}let k;e[58]!==h?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",h),e[58]=h,e[59]=k):k=e[59];let N;e[60]!==o?(N=()=>window.open(o,"_blank","noopener"),e[60]=o,e[61]=N):N=e[61];let E;e[62]!==m?(E=t.jsx("span",{className:"truncate",children:m}),e[62]=m,e[63]=E):E=e[63];let U;e[64]!==o||e[65]!==N||e[66]!==E?(U=t.jsx("button",{type:"button",onClick:N,className:"flex min-w-0 flex-1 items-center rounded-lg px-2 py-1 text-left text-sm font-medium text-foreground transition-colors hover:bg-accent",title:o,children:E}),e[64]=o,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==A||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,A]}),e[68]=A,e[69]=C,e[70]=k,e[71]=U,e[72]=i):i=e[72],i}const Z=1;function Fe(n){if(typeof n!="object"||n===null||n.v!==Z||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}const qe=new Set(["script","style","iframe","object","embed","form","link","meta","base","animate","animatetransform","animatemotion","set"]),Ke=new Set(["href","src","xlink:href","action","formaction"]),He=new Set(["javascript:","vbscript:","data:"]);function Ve(n){let e;try{e=new URL(n,"https://deco.cx").protocol}catch{return!0}return e==="data:"?/^data:image\/(?!svg\+xml)[^;,]+[;,]/i.test(n.trim()):!He.has(e)}function ce(n,e){const l=n.toLowerCase();return l.startsWith("on")?!1:Ke.has(l)?Ve(e):!0}function We(n){for(const e of[...n.querySelectorAll(`${[...qe].join(",")}`)])e.remove();for(const e of[n,...n.querySelectorAll("*")])for(const l of[...e.attributes])ce(l.name,l.value)||e.removeAttribute(l.name)}class F extends Error{constructor(e,l){super(e),this.code=l,this.name="DeckOpError"}code}function de(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ye(n){const l=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return l?de(l).length:null}function Qe(n,e){const l=new DOMParser().parseFromString(n,"text/html"),a=l.querySelector("deck-viewer");if(!a)throw new F("no <deck-viewer> element in source","no-viewer");const m=de(a),v=e.kind==="move"?e.from:e.at,h=m[v];if(!h)throw new F(`slide index ${v} out of range (${m.length})`,"stale-index");switch(e.kind){case"remove":{if(m.length<=1)throw new F("cannot remove the last slide","bad-op");h.remove();break}case"duplicate":{const r=h.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");h.after(r);break}case"move":{if(e.to<0||e.to>=m.length)throw new F(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?m[e.to]:m[e.to].nextSibling;a.insertBefore(h,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new F(`invalid attribute name: ${e.name}`,"bad-op");if(!ce(e.name,e.value))throw new F(`unsafe attribute: ${e.name}`,"bad-op");h.setAttribute(e.name,e.value);break}case"remove-attr":{h.removeAttribute(e.name);break}case"replace":{const r=new DOMParser().parseFromString(e.html,"text/html");We(r.body);const s=r.body.firstElementChild;if(!s)throw new F("replace html has no root element","bad-op");h.replaceWith(l.importNode(s,!0));break}default:throw new F(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
1
+ import{c as te,b as se,j as t,B as q,b8 as fe,l as ee,Z as me,V as he,Y as pe,X as re,n as xe,a7 as be,a4 as ve,q as we,r as P,t as G,K as ie,ai as ke,ag as ge,I as ye,w as Se,x as je,v as Te,D as Me}from"./index-Cxx5SZO5.js";import{c as Y,T as Q,a as X}from"./tooltip-BFWyx7Tu.js";import{n as ae}from"./ZoomOut-BIPVG3Mi.js";import{as as Ce,b2 as Pe,a as De,m as ze,b as oe,b3 as Ne}from"./agent-icon-DMLbHyqZ.js";import{c as Ee,e as Oe,d as $e,u as Be}from"./use-org-fs-DjqN5PQk.js";import{a as Re,b as Ae,P as Ue}from"./popover-Cf5bE8mq.js";import{a as Le}from"./Copy01-BMtss9AJ.js";import{i as Ie}from"./Key01-AhMvx8Bf.js";function le(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function _e(n){const e=te.c(73),{readUrl:l,editor:a,downloadName:m,trailing:v,className:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==l?(p=new URL(l,window.location.origin).toString(),e[0]=l,e[1]=p):p=e[1];const o=p;let L;e[2]!==r?(L=le(r),e[2]=r,e[3]=L):L=e[3];const u=L;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",size:"sm",onClick:a.reload,children:[t.jsx(fe,{size:12}),s("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.agentRewriteWarning")})]}),e[4]=a.agentUpdated,e[5]=a.reload,e[6]=s,e[7]=x):x=e[7];let g;e[8]!==a.saving||e[9]!==s?(g=a.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:s("deck.deckToolbar.saving")}),e[8]=a.saving,e[9]=s,e[10]=g):g=e[10];let S;e[11]!==u.size||e[12]!==u.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.editMode?"secondary":u.variant,size:u.size,"aria-pressed":a.editMode,"aria-label":a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInline"),className:ee(a.editMode&&"text-primary"),onClick:()=>a.setEditMode(!a.editMode),children:t.jsx(Ce,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=u.size,e[12]=u.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==o||e[17]!==u.size||e[18]!==u.variant||e[19]!==m||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(me,{children:[t.jsx(he,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(pe,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[t.jsx(Pe,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:o,download:m,children:[t.jsx(De,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:u.variant,size:u.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:o,download:m,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=o,e[17]=u.size,e[18]=u.variant,e[19]=m,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=u.variant,D=u.size;let T;e[23]!==s?(T=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=T):T=e[24];let M;e[25]!==o?(M=()=>window.open(o,"_blank","noopener"),e[25]=o,e[26]=M):M=e[26];let I;e[27]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(be,{size:14}),e[27]=I):I=e[27];let d;e[28]!==u.size||e[29]!==u.variant||e[30]!==T||e[31]!==M?(d=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:j,size:D,"aria-label":T,onClick:M,children:I})}),e[28]=u.size,e[29]=u.variant,e[30]=T,e[31]=M,e[32]=d):d=e[32];let B;e[33]!==s?(B=s("deck.deckToolbar.openInNewTab"),e[33]=s,e[34]=B):B=e[34];let R;e[35]!==B?(R=t.jsx(X,{side:"bottom",children:B}),e[35]=B,e[36]=R):R=e[36];let b;e[37]!==d||e[38]!==R?(b=t.jsxs(Y,{children:[d,R]}),e[37]=d,e[38]=R,e[39]=b):b=e[39];let O;e[40]!==b||e[41]!==x||e[42]!==g||e[43]!==S||e[44]!==w||e[45]!==v?(O=t.jsxs(t.Fragment,{children:[x,g,S,w,b,v]}),e[40]=b,e[41]=x,e[42]=g,e[43]=S,e[44]=w,e[45]=v,e[46]=O):O=e[46];const A=O;let _;e[47]!==a.railOpen||e[48]!==s?(_=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=_):_=e[49];const z=_;let $;e[50]!==u.size||e[51]!==u.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Y,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:a.railOpen?"secondary":u.variant,size:u.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(ze,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=u.size,e[51]=u.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let c;return e[55]!==A||e[56]!==C?(c=t.jsxs(xe.Actions,{children:[C,A]}),e[55]=A,e[56]=C,e[57]=c):c=e[57],c}let k;e[58]!==h?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",h),e[58]=h,e[59]=k):k=e[59];let N;e[60]!==o?(N=()=>window.open(o,"_blank","noopener"),e[60]=o,e[61]=N):N=e[61];let E;e[62]!==m?(E=t.jsx("span",{className:"truncate",children:m}),e[62]=m,e[63]=E):E=e[63];let U;e[64]!==o||e[65]!==N||e[66]!==E?(U=t.jsx("button",{type:"button",onClick:N,className:"flex min-w-0 flex-1 items-center rounded-lg px-2 py-1 text-left text-sm font-medium text-foreground transition-colors hover:bg-accent",title:o,children:E}),e[64]=o,e[65]=N,e[66]=E,e[67]=U):U=e[67];let i;return e[68]!==A||e[69]!==C||e[70]!==k||e[71]!==U?(i=t.jsxs("div",{className:k,children:[C,U,A]}),e[68]=A,e[69]=C,e[70]=k,e[71]=U,e[72]=i):i=e[72],i}const Z=1;function Fe(n){if(typeof n!="object"||n===null||n.v!==Z||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}const qe=new Set(["script","style","iframe","object","embed","form","link","meta","base","animate","animatetransform","animatemotion","set"]),Ke=new Set(["href","src","xlink:href","action","formaction"]),He=new Set(["javascript:","vbscript:","data:"]);function Ve(n){let e;try{e=new URL(n,"https://deco.cx").protocol}catch{return!0}return e==="data:"?/^data:image\/(?!svg\+xml)[^;,]+[;,]/i.test(n.trim()):!He.has(e)}function ce(n,e){const l=n.toLowerCase();return l.startsWith("on")?!1:Ke.has(l)?Ve(e):!0}function We(n){for(const e of[...n.querySelectorAll(`${[...qe].join(",")}`)])e.remove();for(const e of[n,...n.querySelectorAll("*")])for(const l of[...e.attributes])ce(l.name,l.value)||e.removeAttribute(l.name)}class F extends Error{constructor(e,l){super(e),this.code=l,this.name="DeckOpError"}code}function de(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ye(n){const l=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return l?de(l).length:null}function Qe(n,e){const l=new DOMParser().parseFromString(n,"text/html"),a=l.querySelector("deck-viewer");if(!a)throw new F("no <deck-viewer> element in source","no-viewer");const m=de(a),v=e.kind==="move"?e.from:e.at,h=m[v];if(!h)throw new F(`slide index ${v} out of range (${m.length})`,"stale-index");switch(e.kind){case"remove":{if(m.length<=1)throw new F("cannot remove the last slide","bad-op");h.remove();break}case"duplicate":{const r=h.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");h.after(r);break}case"move":{if(e.to<0||e.to>=m.length)throw new F(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?m[e.to]:m[e.to].nextSibling;a.insertBefore(h,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new F(`invalid attribute name: ${e.name}`,"bad-op");if(!ce(e.name,e.value))throw new F(`unsafe attribute: ${e.name}`,"bad-op");h.setAttribute(e.name,e.value);break}case"remove-attr":{h.removeAttribute(e.name);break}case"replace":{const r=new DOMParser().parseFromString(e.html,"text/html");We(r.body);const s=r.body.firstElementChild;if(!s)throw new F("replace html has no root element","bad-op");h.replaceWith(l.importNode(s,!0));break}default:throw new F(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
2
2
  `:""}${l.documentElement.outerHTML}
3
3
  `}const ne="home",Xe=400,Ze=800;function Ge(n){const e=n.savePath!==void 0,{org:l}=ve(),a=we(),m=Ee(ne),[v,h]=P.useState(!1),[f,r]=P.useState(!1),[s,p]=P.useState(!1),[o,L]=P.useState(!1),[u,x]=P.useState(!1),[g,S]=P.useState(!1),[w,j]=P.useState(null),[D,T]=P.useState(null),[M,I]=P.useState(0),[d]=P.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),B=v||g||u,R=()=>{n.savePath!==void 0&&(a.invalidateQueries({queryKey:ie.orgFsStat(l.id,ne,n.savePath)}),a.invalidateQueries({queryKey:ie.orgFsRecent(l.id)}))},b=i=>{d.iframe?.contentWindow?.postMessage(i,"*")},O=()=>{d.source=null,L(!1),D&&j(D),I(i=>i+1),R()};n.statMarker!==D&&(T(n.statMarker),n.statMarker!==null&&(w===null?j(n.statMarker):d.selfMarkers.has(n.statMarker)||n.statMarker!==w&&(B?L(!0):(d.source=null,j(n.statMarker)))));const A=async()=>{d.saveTimer=null;const i=d.source;if(i===null){S(!1);return}x(!0);try{const c=await m.mutateAsync({path:n.savePath,body:i});d.selfMarkers.add(Oe(c)),R()}catch(c){console.error("[deck-editor] save failed",c),G.error("Couldn't save deck edits — reloading the preview."),k.current.reload()}finally{x(!1),S(!1)}},_=i=>{S(!0),d.saveTimer&&clearTimeout(d.saveTimer),d.saveTimer=setTimeout(()=>{k.current.flushSave()},i)},z=(i,c,y)=>{b({v:Z,type:"ack",opId:i,ok:c,error:y})},$=async i=>{if(!e){z(i.opId,!1,"read-only preview");return}try{if(d.source===null){const y=await fetch(n.readUrl,{credentials:"include"});if(!y.ok)throw new Error(`HTTP ${y.status}`);d.source=await y.text()}const c=Ye(d.source);if(c===null||c!==i.witness.childCount)throw new F(`slide count drifted (source ${c}, iframe ${i.witness.childCount})`,"stale-index");d.source=Qe(d.source,i.op),z(i.opId,!0),_(i.op.kind==="replace"?Ze:Xe)}catch(c){console.error("[deck-editor] op failed",i.op,c),z(i.opId,!1,c instanceof Error?c.message:String(c)),G.error("That edit couldn't be saved — reloading the preview."),k.current.reload()}},C=i=>{if(!d.iframe||i.source!==d.iframe.contentWindow)return;const c=Fe(i.data);if(c){if(c.type==="ready"){r(!0),k.current.editMode?b({v:Z,type:"set-edit-mode",enabled:!0}):k.current.railOpen&&b({v:Z,type:"set-rail",open:!0});return}c.type==="op"&&(d.queue=d.queue.then(()=>k.current.handleOp(c)).catch(()=>{}))}},k=P.useRef({onMessage:C,handleOp:$,flushSave:A,reload:O,editMode:v,railOpen:s});k.current={onMessage:C,handleOp:$,flushSave:A,reload:O,editMode:v,railOpen:s};const[N]=P.useState(()=>{let i=null;return c=>{if(c){d.iframe=c;const y=K=>k.current.onMessage(K);window.addEventListener("message",y),i=()=>window.removeEventListener("message",y)}else i?.(),i=null,d.iframe=null}}),E=i=>{p(i),b({v:Z,type:"set-rail",open:i})},U=i=>{h(i),b({v:Z,type:"set-edit-mode",enabled:i}),i&&p(!0),!i&&o&&!g&&!u&&O()};return{iframeRef:N,deckDetected:f,writable:e,displayedMarker:w===null?null:`${w}.${M}`,editMode:v,setEditMode:U,railOpen:s,setRailOpen:E,saving:u,agentUpdated:o,reload:O,postToIframe:b}}const Je=300;function ct({readUrl:n,marker:e,title:l,savePath:a,trailing:m,toolbarClassName:v,placement:h}){const f=Ge({readUrl:n,statMarker:e,savePath:a}),[r,s]=P.useState(null);if(f.displayedMarker===null)return null;const p=n.includes("?")?"&":"?",o=`${n}${p}v=${encodeURIComponent(f.displayedMarker)}`,L=r===o;return t.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[t.jsx(_e,{readUrl:n,editor:f,downloadName:l.split("/").pop()??l,trailing:m,className:v,placement:h}),t.jsx("div",{className:"relative flex-1",children:t.jsx("iframe",{ref:f.iframeRef,src:o,onLoad:()=>s(o),sandbox:"allow-scripts allow-downloads",className:ee("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",L?"opacity-100":"opacity-0"),style:{transitionDuration:`${Je}ms`},title:l},o)})]})}const et=[{mode:"private",labelKey:"library.fileShareButton.modeOrgOnly",Icon:ge},{mode:"public",labelKey:"library.fileShareButton.modePublic",Icon:oe},{mode:"password",labelKey:"library.fileShareButton.modePassword",Icon:Ie}];function ue(n){const e=te.c(56),{volume:l,path:a,kind:m,shareMode:v,effectivePublic:h,url:f}=n,r=se(),s=$e(l),{data:p}=Be(l,a),o=p?.shareMode??v,u=(p?.effectivePublic??h)&&o==="private",x=m==="dir",g=x?"folder":"file",[S,w]=P.useState(!1),[j,D]=P.useState(""),[T,M]=P.useState(!1);let I;e[0]!==a||e[1]!==s||e[2]!==g||e[3]!==r?(I=(i,c)=>{s.mutate({path:a,mode:i,password:c},{onSuccess:()=>{w(!1),D(""),G.success(i==="private"?r("library.fileShareButton.toastOrgOnly",{subject:g}):i==="public"?r("library.fileShareButton.toastPublic",{subject:g}):r("library.fileShareButton.toastPassword",{subject:g}))},onError:y=>G.error(y instanceof Error?y.message:r("library.fileShareButton.failedUpdateSharing"))})},e[0]=a,e[1]=s,e[2]=g,e[3]=r,e[4]=I):I=e[4];const d=I;let B;e[5]!==d?(B=i=>{if(i==="password"){w(!0);return}w(!1),d(i)},e[5]=d,e[6]=B):B=e[6];const R=B,b=S?"password":o;let O;e[7]!==r||e[8]!==f?(O=async()=>{f&&(await navigator.clipboard.writeText(f),M(!0),G.success(r("library.fileShareButton.linkCopied")),setTimeout(()=>M(!1),2e3))},e[7]=r,e[8]=f,e[9]=O):O=e[9];const A=O;let _;e[10]!==T||e[11]!==A||e[12]!==r||e[13]!==f?(_=f?t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[t.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f}),t.jsx(q,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:A,"aria-label":r("library.fileShareButton.copyLink"),children:T?t.jsx(ke,{size:12,className:"text-success"}):t.jsx(Le,{size:12})})]}):null,e[10]=T,e[11]=A,e[12]=r,e[13]=f,e[14]=_):_=e[14];const z=_;if(u){let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(oe,{size:16})}),e[15]=i):i=e[15];let c;e[16]!==r?(c=r("library.fileShareButton.sharedViaParent"),e[16]=r,e[17]=c):c=e[17];let y;e[18]!==c?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),e[18]=c,e[19]=y):y=e[19];const K=x?"files in this folder":"this file";let H;e[20]!==r||e[21]!==K?(H=r("library.fileShareButton.inheritedDescription",{target:K}),e[20]=r,e[21]=K,e[22]=H):H=e[22];let V;e[23]!==H?(V=t.jsx("span",{className:"text-xs text-muted-foreground",children:H}),e[23]=H,e[24]=V):V=e[24];let W;e[25]!==V||e[26]!==y?(W=t.jsxs("div",{className:"flex items-start gap-3",children:[i,t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[y,V]})]}),e[25]=V,e[26]=y,e[27]=W):W=e[27];let J;return e[28]!==z||e[29]!==W?(J=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[W,z]}),e[28]=z,e[29]=W,e[30]=J):J=e[30],J}let $;e[31]!==b||e[32]!==R||e[33]!==s.isPending||e[34]!==r?($=et.map(i=>{const{mode:c,labelKey:y,Icon:K}=i;return t.jsxs("button",{type:"button",disabled:s.isPending,onClick:()=>R(c),className:ee("flex flex-col items-center gap-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",b===c?"bg-background text-foreground shadow-edge":"text-muted-foreground hover:text-foreground"),children:[t.jsx(K,{size:15}),r(y)]},c)}),e[31]=b,e[32]=R,e[33]=s.isPending,e[34]=r,e[35]=$):$=e[35];let C;e[36]!==$?(C=t.jsx("div",{className:"surface-inset grid grid-cols-3 gap-1 p-1",children:$}),e[36]=$,e[37]=C):C=e[37];let k;e[38]!==b||e[39]!==x||e[40]!==r?(k=b==="private"?r("library.fileShareButton.privateDescription",{target:x?"these files":"this link"}):b==="public"?r(x?"library.fileShareButton.publicFolderDescription":"library.fileShareButton.publicFileDescription"):r("library.fileShareButton.passwordDescription",{target:x?"files in this folder":"this file"}),e[38]=b,e[39]=x,e[40]=r,e[41]=k):k=e[41];let N;e[42]!==k?(N=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[42]=k,e[43]=N):N=e[43];let E;e[44]!==b||e[45]!==d||e[46]!==o||e[47]!==j||e[48]!==s.isPending||e[49]!==r?(E=b==="password"&&t.jsxs("form",{className:"flex items-center gap-2",onSubmit:i=>{i.preventDefault(),j&&d("password",j)},children:[t.jsx(ye,{type:"password",value:j,onChange:i=>D(i.target.value),placeholder:r(o==="password"?"library.fileShareButton.newPasswordPlaceholder":"library.fileShareButton.passwordPlaceholder"),autoComplete:"new-password",className:"h-8 text-xs"}),t.jsx(q,{type:"submit",size:"sm",className:"shrink-0",disabled:!j||s.isPending,children:r(o==="password"?"library.fileShareButton.buttonUpdate":"library.fileShareButton.buttonSet")})]}),e[44]=b,e[45]=d,e[46]=o,e[47]=j,e[48]=s.isPending,e[49]=r,e[50]=E):E=e[50];let U;return e[51]!==z||e[52]!==C||e[53]!==N||e[54]!==E?(U=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[C,N,E,z]}),e[51]=z,e[52]=C,e[53]=N,e[54]=E,e[55]=U):U=e[55],U}function dt(n){const e=te.c(25),{volume:l,path:a,shareMode:m,effectivePublic:v,url:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==r?(p=le(r),e[0]=r,e[1]=p):p=e[1];const o=p,L=o.variant,u=o.size;let x;e[2]!==s?(x=s("library.fileShareButton.share"),e[2]=s,e[3]=x):x=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ne,{size:14}),e[4]=g):g=e[4];let S;e[5]!==o.size||e[6]!==o.variant||e[7]!==x?(S=t.jsx(Q,{asChild:!0,children:t.jsx(Re,{asChild:!0,children:t.jsx(q,{variant:L,size:u,"aria-label":x,children:g})})}),e[5]=o.size,e[6]=o.variant,e[7]=x,e[8]=S):S=e[8];let w;e[9]!==s?(w=s("library.fileShareButton.share"),e[9]=s,e[10]=w):w=e[10];let j;e[11]!==w?(j=t.jsx(X,{side:"bottom",children:w}),e[11]=w,e[12]=j):j=e[12];let D;e[13]!==S||e[14]!==j?(D=t.jsxs(Y,{children:[S,j]}),e[13]=S,e[14]=j,e[15]=D):D=e[15];let T;e[16]!==v||e[17]!==a||e[18]!==m||e[19]!==h||e[20]!==l?(T=t.jsx(Ae,{align:"end",className:"w-80 p-3",children:t.jsx(ue,{volume:l,path:a,kind:"file",shareMode:m,effectivePublic:v,url:h})}),e[16]=v,e[17]=a,e[18]=m,e[19]=h,e[20]=l,e[21]=T):T=e[21];let M;return e[22]!==D||e[23]!==T?(M=t.jsxs(Ue,{children:[D,T]}),e[22]=D,e[23]=T,e[24]=M):M=e[24],M}function ut(n){const e=te.c(14),{target:l,onOpenChange:a}=n,m=se(),v=!!l,h=l?.kind==="dir"?"folder":"file";let f;e[0]!==m||e[1]!==h?(f=m("library.fileShareButton.shareDialogTitle",{type:h}),e[0]=m,e[1]=h,e[2]=f):f=e[2];let r;e[3]!==f?(r=t.jsx(Se,{children:t.jsx(je,{children:f})}),e[3]=f,e[4]=r):r=e[4];let s;e[5]!==l?(s=l&&t.jsx(ue,{...l}),e[5]=l,e[6]=s):s=e[6];let p;e[7]!==r||e[8]!==s?(p=t.jsxs(Te,{className:"sm:max-w-md",children:[r,s]}),e[7]=r,e[8]=s,e[9]=p):p=e[9];let o;return e[10]!==a||e[11]!==v||e[12]!==p?(o=t.jsx(Me,{open:v,onOpenChange:a,children:p}),e[10]=a,e[11]=v,e[12]=p,e[13]=o):o=e[13],o}export{dt as F,ct as H,ut as S,le as t};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-jw3DdvOr.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-Cxx5SZO5.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,2 +1,2 @@
1
- import{c as L,j as t,v as W,D as G,r as _,bB as z,l as A,x as H,hh as K,B as I,b7 as U}from"./index-jw3DdvOr.js";import{i as R}from"./ZoomOut-LrGtO3ok.js";import{M as V}from"./markdown-BLdpFCyC.js";import{F as Z}from"./file-preview-DPwUrUMN.js";import{F as q}from"./file-type-icon-atKRN7rs.js";import{j as J,g as Q,o as X}from"./use-org-fs-D0eNRBo9.js";import{p as Y,b as $}from"./location-V0VwTJTt.js";import{s as ee}from"./Image01-vjhaiEAu.js";function te(o){const e={};for(const l of o.split(`
1
+ import{c as L,j as t,v as W,D as G,r as _,bB as z,l as A,x as H,hh as K,B as I,b7 as U}from"./index-Cxx5SZO5.js";import{i as R}from"./ZoomOut-BIPVG3Mi.js";import{M as V}from"./markdown-CWAWXi60.js";import{F as Z}from"./file-preview-C4Z-YwH_.js";import{F as q}from"./file-type-icon-BrZE8mnq.js";import{j as J,g as Q,o as X}from"./use-org-fs-DjqN5PQk.js";import{p as Y,b as $}from"./location-V0VwTJTt.js";import{s as ee}from"./Image01-B1C03E_N.js";function te(o){const e={};for(const l of o.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(o){for(const e of o.split(/\n\s*\n/)){const l=e.trim();if(!(!l||l.startsWith("#")))return l.replace(/\n/g," ")}return null}function se(o){const e=o.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:O(o),disableModelInvocation:!1,body:o};const l=te(e[1]),s=o.slice(e[0].length);return{name:l.name||null,description:l.description||O(s),disableModelInvocation:l["disable-model-invocation"]==="true",body:s}}function le(o){const e=L.c(18),{skillPath:l,onClose:s,variant:i}=o,n=Y(l),{volume:a,dirPath:v}=n,E=J(),r=E(a??"",`${v}/SKILL.md`),F=Q(r),D=X(a??"",v);let w;e[0]!==v?(w=$(v),e[0]=v,e[1]=w):w=e[1];const P=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=re;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(m,M)=>C(m.path)?-1:C(M.path)?1:$(m.path).localeCompare($(M.path)),e[4]=p):p=e[4];const B=(D.data??[]).filter(oe).sort(p),[k,S]=_.useState(null),c=k===null?null:B.find(m=>m.path===k)??null,u=x?.name??P;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(R,{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(K,{asChild:!0,children:t.jsx(I,{variant:"ghost",size:"icon",className:"shrink-0",children:t.jsx(U,{size:16})})}):t.jsx(I,{variant:"ghost",size:"icon",className:"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:E(a??"",c.path)}}):F.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(z,{className:"h-4 w-1/3"}),t.jsx(z,{className:"h-3 w-full"}),t.jsx(z,{className:"h-3 w-5/6"}),t.jsx(z,{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(V,{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(z,{className:"mx-2 h-4 w-24"}):B.map(m=>{const M=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",M?"bg-background shadow-edge":"hover:bg-accent"),children:[t.jsx(q,{filename:$(m.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:A("truncate text-sm",M?"text-foreground":"text-muted-foreground"),children:$(m.path)})]},m.path)})]}),N]})]})}function oe(o){return o.kind==="file"}function re(o){return $(o)==="SKILL.md"}function ge(o){const e=L.c(8),{skillPath:l,onClose:s}=o;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(o){const e=L.c(50);let l,s,i,n,a;e[0]!==o?({glyph:l,readOnly:i,tone:n,sheets:a,...s}=o,e[0]=o,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,E=a===void 0?0:a,r=ie[v],F=_.useId(),D=`${F}-back`,w=`${F}-front`,P=`url(#${D})`;let h;e[6]!==P?(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:P}),e[6]=P,e[7]=h):h=e[7];let x;e[8]!==E?(x=ne.slice(0,Math.min(Math.max(E,0),3)).map(ae),e[8]=E,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]!==r.stripe?(S=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:r.stripe}),k=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:r.stripe}),e[13]=r.stripe,e[14]=k,e[15]=S):(k=e[14],S=e[15]);let c;e[16]!==l||e[17]!==r.glyph?(c=l&&t.jsx(l,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:r.glyph,opacity:.55}}),e[16]=l,e[17]=r.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]!==r.backFrom?(g=t.jsx("stop",{offset:"0.3",stopColor:r.backFrom}),e[21]=r.backFrom,e[22]=g):g=e[22];let d;e[23]!==r.backTo?(d=t.jsx("stop",{offset:"1",stopColor:r.backTo}),e[23]=r.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]!==r.frontFrom?(j=t.jsx("stop",{stopColor:r.frontFrom}),e[29]=r.frontFrom,e[30]=j):j=e[30];let b;e[31]!==r.frontTo?(b=t.jsx("stop",{offset:"1",stopColor:r.frontTo}),e[31]=r.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(o){return t.jsx("rect",{x:"9",y:"3.4",width:"14",height:"12",rx:"1.2",fill:"#F4F6F9",stroke:"#C9D2DC",strokeWidth:"0.7",transform:`rotate(${o} 16 12)`},o)}export{je as F,ge as S,se as p};
@@ -1 +1 @@
1
- import{ev as C,c as f,j as c,c6 as j,r as d,l as x,cr as v,ew as b,ex as h}from"./index-jw3DdvOr.js";import{L as N}from"./label-AxYpTX_1.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},p=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function M(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=x("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=p(),a=!!n;let l;e[3]!==s?(l=x("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=p(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=p();let r;e[3]!==s?(r=x("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,D as a,M as b,L as c,P as d,y as e,R as f};
1
+ import{ev as C,c as f,j as c,c6 as j,r as d,l as x,cr as v,ew as b,ex as h}from"./index-Cxx5SZO5.js";import{L as N}from"./label-Ctu3ACGH.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},p=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function M(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=x("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=p(),a=!!n;let l;e[3]!==s?(l=x("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=p(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=p();let r;e[3]!==s?(r=x("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,D as a,M as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as M,a4 as te,gC as oe,q as re,aJ as le,aI as ce,e as ne,C as Y,t as K,K as H,j as n,fT as ie,fU as se,fV as G,c6 as ge,I as ae,aK as de,aL as X,c as J,r as Z,o as me,aq as ue,az as ee,cW as fe,cX as pe,J as he,B as xe,aM as je,aN as ze,aO as Se,aP as Oe,bm as ve,aQ as be,aR as Ce,aS as ye,ap as _e,n as $,hd as Fe,b2 as De}from"./index-jw3DdvOr.js";import{u as Ae}from"./use-debounced-autosave-D6U_Nh6G.js";import{C as we,B as Te,a as Ne}from"./review-settings-BCmy9X9w.js";import{D as Ee}from"./domain-settings-DxPYhNKL.js";import{C as Le}from"./capability-load-error-Ceg8IL6P.js";import"./switch-To5TyIkS.js";import"./UserSquare-hT13OTGf.js";import"./use-organization-settings-D8VzrTTn.js";import"./schema-78fwu3zk.js";import"./task-board-BHxUa5hm.js";import"./use-connection-Db-d2gM4.js";import"./use-mcp-client-D6ElS18M.js";import"./auth-BrPPgu4r.js";import"./badge-_4T6Jr1d.js";import"./select-DQCVbj5T.js";import"./index-BdQq_4o_.js";import"./index-B94lWY4a.js";import"./ChevronUp-DreW1_TB.js";const Pe=e=>de({name:X().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:X().optional()});function ke(e){const t=J.c(17),{value:s,onChange:f,name:g,disabled:l}=e,c=M(),d=Z.useRef(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>d.current?.click(),t[0]=r):r=t[0];const m=r;let i;t[1]!==f||t[2]!==c?(i=S=>{const z=S.target.files?.[0];if(!z)return;if(z.size>2097152){K.error(c("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>K.error(c("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&f(p.result),d.current&&(d.current.value="")},p.readAsDataURL(z)},t[1]=f,t[2]=c,t[3]=i):i=t[3];const a=i;let o;t[4]!==c?(o=c("settings.organizationForm.uploadLogoLabel"),t[4]=c,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==a?(u=n.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[6]=l,t[7]=a,t[8]=u):u=t[8];const x=s||void 0,j=g??"?";let h;t[9]!==x||t[10]!==j?(h=n.jsx(me,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=h):h=t[11];let v;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==h?(v=n.jsxs("button",{type:"button",onClick:m,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,h]}),t[12]=l,t[13]=o,t[14]=u,t[15]=h,t[16]=v):v=t[16],v}function Re(){const e=M(),{org:t}=te(),s=oe(),f=re(),g=le({resolver:ce(Pe(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async i=>{const a={name:i.name};i.logo&&(a.logo=i.logo);const o=await s.organization.update({data:a});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(i,a)=>{Y("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),f.invalidateQueries({queryKey:H.organizations()}),f.invalidateQueries({queryKey:H.activeOrganization(t.slug)}),K.success(e("settings.organizationForm.updateSuccess"))},onError:(i,a)=>{Y("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:i instanceof Error?i.message:String(i)}),K.error(i instanceof Error?i.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=Ae({save:async()=>{const i=g.control._formState.dirtyFields;if(Object.keys(i).length===0||!await g.trigger())return;const o=g.getValues(),u=g.control._defaultValues;g.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{g.reset(u,{keepValues:!0})}}}),r=g.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(ie,{children:n.jsxs(se,{children:[n.jsx(G,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:n.jsx(ke,{value:g.watch("logo"),onChange:i=>{g.setValue("logo",i??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),n.jsx(G,{title:e("settings.organizationForm.nameTitle"),action:n.jsx(ge,{control:g.control,name:"name",render:({field:i})=>n.jsx(ae,{id:"org-name",...i,onChange:a=>{i.onChange(a),c()},onBlur:()=>{i.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),n.jsx(G,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(r.name||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Ie(){const e=J.c(83),t=M(),{org:s}=te(),[f,g]=Z.useState(!1),[l,c]=Z.useState(""),d=ue();let r;e[0]!==s.id||e[1]!==d?(r=async()=>{await d.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=d,e[2]=r):r=e[2];let m;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(m=()=>{Y("organization_deleted",{organization_id:s.id}),localStorage.getItem(ee.lastOrgSlug())===s.slug&&localStorage.removeItem(ee.lastOrgSlug()),fe()?.org===s.slug&&pe(),he(),K.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=m):m=e[6];let i;e[7]!==t?(i=O=>{K.error(O instanceof Error?O.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=i):i=e[8];let a;e[9]!==r||e[10]!==m||e[11]!==i?(a={mutationFn:r,onSuccess:m,onError:i},e[9]=r,e[10]=m,e[11]=i,e[12]=a):a=e[12];const o=ne(a);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[17]=t,e[18]=j):j=e[18];let h;e[19]===Symbol.for("react.memo_cache_sentinel")?(h=()=>g(!0),e[19]=h):h=e[19];const v=o.isPending;let S;e[20]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[20]=t,e[21]=S):S=e[21];let z;e[22]!==o.isPending||e[23]!==S?(z=n.jsx(xe,{variant:"destructive",size:"sm",onClick:h,disabled:v,children:S}),e[22]=o.isPending,e[23]=S,e[24]=z):z=e[24];let p;e[25]!==z||e[26]!==x||e[27]!==j?(p=n.jsx(se,{className:"border-destructive/40",children:n.jsx(G,{title:x,description:j,action:z})}),e[25]=z,e[26]=x,e[27]=j,e[28]=p):p=e[28];let b;e[29]!==p||e[30]!==u?(b=n.jsx(ie,{title:u,children:p}),e[29]=p,e[30]=u,e[31]=b):b=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=O=>{g(O),O||c("")},e[32]=V):V=e[32];let C;e[33]!==t?(C=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[33]=t,e[34]=C):C=e[34];let y;e[35]!==C?(y=n.jsx(je,{children:C}),e[35]=C,e[36]=y):y=e[36];let _;e[37]!==s.name||e[38]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[37]=s.name,e[38]=t,e[39]=_):_=e[39];let F;e[40]!==_?(F=n.jsx("p",{children:_}),e[40]=_,e[41]=F):F=e[41];let D;e[42]!==s.name||e[43]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[42]=s.name,e[43]=t,e[44]=D):D=e[44];let A;e[45]!==D?(A=n.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[45]=D,e[46]=A):A=e[46];let Q;e[47]===Symbol.for("react.memo_cache_sentinel")?(Q=O=>c(O.target.value),e[47]=Q):Q=e[47];let w;e[48]!==l||e[49]!==s.name?(w=n.jsx(ae,{value:l,onChange:Q,placeholder:s.name,autoFocus:!0}),e[48]=l,e[49]=s.name,e[50]=w):w=e[50];let T;e[51]!==F||e[52]!==A||e[53]!==w?(T=n.jsx(ze,{asChild:!0,children:n.jsxs("div",{children:[F,A,w]})}),e[51]=F,e[52]=A,e[53]=w,e[54]=T):T=e[54];let N;e[55]!==y||e[56]!==T?(N=n.jsxs(Se,{children:[y,T]}),e[55]=y,e[56]=T,e[57]=N):N=e[57];let E;e[58]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[58]=t,e[59]=E):E=e[59];let L;e[60]!==E?(L=n.jsx(Oe,{children:E}),e[60]=E,e[61]=L):L=e[61];let P;e[62]!==o?(P=()=>o.mutate(),e[62]=o,e[63]=P):P=e[63];const W=l!==s.name||o.isPending;let k;e[64]!==o.isPending||e[65]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[64]=o.isPending,e[65]=t,e[66]=k):k=e[66];let R;e[67]!==P||e[68]!==W||e[69]!==k?(R=n.jsx(ve,{onClick:P,disabled:W,variant:"destructive",children:k}),e[67]=P,e[68]=W,e[69]=k,e[70]=R):R=e[70];let I;e[71]!==L||e[72]!==R?(I=n.jsxs(be,{children:[L,R]}),e[71]=L,e[72]=R,e[73]=I):I=e[73];let B;e[74]!==N||e[75]!==I?(B=n.jsxs(Ce,{children:[N,I]}),e[74]=N,e[75]=I,e[76]=B):B=e[76];let q;e[77]!==f||e[78]!==B?(q=n.jsx(ye,{open:f,onOpenChange:V,children:B}),e[77]=f,e[78]=B,e[79]=q):q=e[79];let U;return e[80]!==b||e[81]!==q?(U=n.jsxs(n.Fragment,{children:[b,q]}),e[80]=b,e[81]=q,e[82]=U):U=e[82],U}function Be(){const e=J.c(15),t=M(),{granted:s,loading:f,error:g}=_e("org:manage");if(f){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(De,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Le,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.nav.general"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=n.jsx($.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&n.jsxs(n.Fragment,{children:[n.jsx(Re,{}),n.jsx(we,{}),n.jsx(Te,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ne,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&n.jsxs(n.Fragment,{children:[n.jsx(Ee,{}),n.jsx(Ie,{})]}),e[9]=s,e[10]=m):m=e[10];let i;return e[11]!==c||e[12]!==d||e[13]!==m?(i=n.jsx($,{children:n.jsx($.Content,{children:n.jsx($.Container,{children:n.jsxs(Fe,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=i):i=e[14],i}function st(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Be,{}),e[0]=t):t=e[0],t}export{st as default};
1
+ import{b as M,a4 as te,gC as oe,q as re,aJ as le,aI as ce,e as ne,C as Y,t as K,K as H,j as n,fT as ie,fU as se,fV as G,c6 as ge,I as ae,aK as de,aL as X,c as J,r as Z,o as me,aq as ue,az as ee,cW as fe,cX as pe,J as he,B as xe,aM as je,aN as ze,aO as Se,aP as Oe,bm as ve,aQ as be,aR as Ce,aS as ye,ap as _e,n as $,hd as Fe,b2 as De}from"./index-Cxx5SZO5.js";import{u as Ae}from"./use-debounced-autosave-dbZuRAQA.js";import{C as we,B as Te,a as Ne}from"./review-settings-BayMZpjl.js";import{D as Ee}from"./domain-settings-Cf2W5c-a.js";import{C as Le}from"./capability-load-error-BX1SCP0_.js";import"./switch-C5GqEaZ9.js";import"./UserSquare-CmbcjiWL.js";import"./use-organization-settings-DR7d93_z.js";import"./schema-WheR11j2.js";import"./task-board-D0I9TrF7.js";import"./use-connection-K2ZmGfOt.js";import"./use-mcp-client-DogzcDtd.js";import"./auth-BawzvLgB.js";import"./badge-Dk9QaMHv.js";import"./select-UpCSfNOV.js";import"./index-BdQq_4o_.js";import"./index-z9eosAhj.js";import"./ChevronUp-BsFnjeNK.js";const Pe=e=>de({name:X().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:X().optional()});function ke(e){const t=J.c(17),{value:s,onChange:f,name:g,disabled:l}=e,c=M(),d=Z.useRef(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>d.current?.click(),t[0]=r):r=t[0];const m=r;let i;t[1]!==f||t[2]!==c?(i=S=>{const z=S.target.files?.[0];if(!z)return;if(z.size>2097152){K.error(c("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>K.error(c("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&f(p.result),d.current&&(d.current.value="")},p.readAsDataURL(z)},t[1]=f,t[2]=c,t[3]=i):i=t[3];const a=i;let o;t[4]!==c?(o=c("settings.organizationForm.uploadLogoLabel"),t[4]=c,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==a?(u=n.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[6]=l,t[7]=a,t[8]=u):u=t[8];const x=s||void 0,j=g??"?";let h;t[9]!==x||t[10]!==j?(h=n.jsx(me,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=h):h=t[11];let v;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==h?(v=n.jsxs("button",{type:"button",onClick:m,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,h]}),t[12]=l,t[13]=o,t[14]=u,t[15]=h,t[16]=v):v=t[16],v}function Re(){const e=M(),{org:t}=te(),s=oe(),f=re(),g=le({resolver:ce(Pe(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async i=>{const a={name:i.name};i.logo&&(a.logo=i.logo);const o=await s.organization.update({data:a});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(i,a)=>{Y("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a)}),f.invalidateQueries({queryKey:H.organizations()}),f.invalidateQueries({queryKey:H.activeOrganization(t.slug)}),K.success(e("settings.organizationForm.updateSuccess"))},onError:(i,a)=>{Y("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a),error:i instanceof Error?i.message:String(i)}),K.error(i instanceof Error?i.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=Ae({save:async()=>{const i=g.control._formState.dirtyFields;if(Object.keys(i).length===0||!await g.trigger())return;const o=g.getValues(),u=g.control._defaultValues;g.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{g.reset(u,{keepValues:!0})}}}),r=g.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(ie,{children:n.jsxs(se,{children:[n.jsx(G,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:n.jsx(ke,{value:g.watch("logo"),onChange:i=>{g.setValue("logo",i??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),n.jsx(G,{title:e("settings.organizationForm.nameTitle"),action:n.jsx(ge,{control:g.control,name:"name",render:({field:i})=>n.jsx(ae,{id:"org-name",...i,onChange:a=>{i.onChange(a),c()},onBlur:()=>{i.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),n.jsx(G,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(r.name||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Ie(){const e=J.c(83),t=M(),{org:s}=te(),[f,g]=Z.useState(!1),[l,c]=Z.useState(""),d=ue();let r;e[0]!==s.id||e[1]!==d?(r=async()=>{await d.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=d,e[2]=r):r=e[2];let m;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(m=()=>{Y("organization_deleted",{organization_id:s.id}),localStorage.getItem(ee.lastOrgSlug())===s.slug&&localStorage.removeItem(ee.lastOrgSlug()),fe()?.org===s.slug&&pe(),he(),K.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=m):m=e[6];let i;e[7]!==t?(i=O=>{K.error(O instanceof Error?O.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=i):i=e[8];let a;e[9]!==r||e[10]!==m||e[11]!==i?(a={mutationFn:r,onSuccess:m,onError:i},e[9]=r,e[10]=m,e[11]=i,e[12]=a):a=e[12];const o=ne(a);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[17]=t,e[18]=j):j=e[18];let h;e[19]===Symbol.for("react.memo_cache_sentinel")?(h=()=>g(!0),e[19]=h):h=e[19];const v=o.isPending;let S;e[20]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[20]=t,e[21]=S):S=e[21];let z;e[22]!==o.isPending||e[23]!==S?(z=n.jsx(xe,{variant:"destructive",size:"sm",onClick:h,disabled:v,children:S}),e[22]=o.isPending,e[23]=S,e[24]=z):z=e[24];let p;e[25]!==z||e[26]!==x||e[27]!==j?(p=n.jsx(se,{className:"border-destructive/40",children:n.jsx(G,{title:x,description:j,action:z})}),e[25]=z,e[26]=x,e[27]=j,e[28]=p):p=e[28];let b;e[29]!==p||e[30]!==u?(b=n.jsx(ie,{title:u,children:p}),e[29]=p,e[30]=u,e[31]=b):b=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=O=>{g(O),O||c("")},e[32]=V):V=e[32];let C;e[33]!==t?(C=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[33]=t,e[34]=C):C=e[34];let y;e[35]!==C?(y=n.jsx(je,{children:C}),e[35]=C,e[36]=y):y=e[36];let _;e[37]!==s.name||e[38]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[37]=s.name,e[38]=t,e[39]=_):_=e[39];let F;e[40]!==_?(F=n.jsx("p",{children:_}),e[40]=_,e[41]=F):F=e[41];let D;e[42]!==s.name||e[43]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[42]=s.name,e[43]=t,e[44]=D):D=e[44];let A;e[45]!==D?(A=n.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[45]=D,e[46]=A):A=e[46];let Q;e[47]===Symbol.for("react.memo_cache_sentinel")?(Q=O=>c(O.target.value),e[47]=Q):Q=e[47];let w;e[48]!==l||e[49]!==s.name?(w=n.jsx(ae,{value:l,onChange:Q,placeholder:s.name,autoFocus:!0}),e[48]=l,e[49]=s.name,e[50]=w):w=e[50];let T;e[51]!==F||e[52]!==A||e[53]!==w?(T=n.jsx(ze,{asChild:!0,children:n.jsxs("div",{children:[F,A,w]})}),e[51]=F,e[52]=A,e[53]=w,e[54]=T):T=e[54];let N;e[55]!==y||e[56]!==T?(N=n.jsxs(Se,{children:[y,T]}),e[55]=y,e[56]=T,e[57]=N):N=e[57];let E;e[58]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[58]=t,e[59]=E):E=e[59];let L;e[60]!==E?(L=n.jsx(Oe,{children:E}),e[60]=E,e[61]=L):L=e[61];let P;e[62]!==o?(P=()=>o.mutate(),e[62]=o,e[63]=P):P=e[63];const W=l!==s.name||o.isPending;let k;e[64]!==o.isPending||e[65]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[64]=o.isPending,e[65]=t,e[66]=k):k=e[66];let R;e[67]!==P||e[68]!==W||e[69]!==k?(R=n.jsx(ve,{onClick:P,disabled:W,variant:"destructive",children:k}),e[67]=P,e[68]=W,e[69]=k,e[70]=R):R=e[70];let I;e[71]!==L||e[72]!==R?(I=n.jsxs(be,{children:[L,R]}),e[71]=L,e[72]=R,e[73]=I):I=e[73];let B;e[74]!==N||e[75]!==I?(B=n.jsxs(Ce,{children:[N,I]}),e[74]=N,e[75]=I,e[76]=B):B=e[76];let q;e[77]!==f||e[78]!==B?(q=n.jsx(ye,{open:f,onOpenChange:V,children:B}),e[77]=f,e[78]=B,e[79]=q):q=e[79];let U;return e[80]!==b||e[81]!==q?(U=n.jsxs(n.Fragment,{children:[b,q]}),e[80]=b,e[81]=q,e[82]=U):U=e[82],U}function Be(){const e=J.c(15),t=M(),{granted:s,loading:f,error:g}=_e("org:manage");if(f){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(De,{}),e[0]=a):a=e[0],a}if(g){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Le,{}),e[1]=a):a=e[1],a}let l;e[2]!==t?(l=t("settings.nav.general"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=n.jsx($.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&n.jsxs(n.Fragment,{children:[n.jsx(Re,{}),n.jsx(we,{}),n.jsx(Te,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ne,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&n.jsxs(n.Fragment,{children:[n.jsx(Ee,{}),n.jsx(Ie,{})]}),e[9]=s,e[10]=m):m=e[10];let i;return e[11]!==c||e[12]!==d||e[13]!==m?(i=n.jsx($,{children:n.jsx($.Content,{children:n.jsx($.Container,{children:n.jsxs(Fe,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=i):i=e[14],i}function st(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Be,{}),e[0]=t):t=e[0],t}export{st as default};