decocms 3.99.3 → 3.100.1

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 (239) hide show
  1. package/dist/client/assets/{AlertCircle-Bgopcarv.js → AlertCircle-qsmFLzIS.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-7XR-z7Ge.js → ArrowUpRight-yJehGCq_.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-DsdDhP4L.js → CheckCircle-B6MW1yw_.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CpzTl0cf.js → ChevronDown-C6GKFdlz.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-BuOnLJw9.js → ChevronLeft-B_g3Odoj.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DqDeYsel.js → ChevronRight-_T91Ki1i.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-Cr2g1GDa.js → ChevronUp-C73sdCjg.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-BGprjE03.js → DotsVertical-BOTJmIm_.js} +1 -1
  9. package/dist/client/assets/{Eye-B9uHZVsM.js → Eye-CmIsbgje.js} +1 -1
  10. package/dist/client/assets/{FilterLines-DgCFEQWk.js → FilterLines-Br0k3Gt9.js} +1 -1
  11. package/dist/client/assets/{Globe01-H40eMg8D.js → Globe01-jb99gJfY.js} +1 -1
  12. package/dist/client/assets/{Globe04-BNaAcUBp.js → Globe04-BoJpZpky.js} +1 -1
  13. package/dist/client/assets/{HardDrive-l0WQMFU9.js → HardDrive-tK8cadSs.js} +1 -1
  14. package/dist/client/assets/{Key01-BDd1iQS4.js → Key01--rf2r0q7.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-DQOl0C9j.js → LayoutLeft-Dpq1l3Cs.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-BAME6PCB.js → LinkExternal01-DgKre-XN.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CaJkUXyc.js → Monitor01-DLOF_NPZ.js} +1 -1
  18. package/dist/client/assets/{Palette-C1u1Sxuh.js → Palette-B13aA9KG.js} +1 -1
  19. package/dist/client/assets/{Play-DSjj50Z1.js → Play-CAoWwsoA.js} +1 -1
  20. package/dist/client/assets/{Plus-rHk0VScG.js → Plus-DaRhyqSH.js} +1 -1
  21. package/dist/client/assets/SearchLg-C7PlcyS-.js +1 -0
  22. package/dist/client/assets/{SearchMd-Bc8RVvtx.js → SearchMd-TIrNRuOw.js} +1 -1
  23. package/dist/client/assets/{Settings02-bfgJ4jKJ.js → Settings02-B1ys_QsX.js} +1 -1
  24. package/dist/client/assets/{Shield01-C0erkp7L.js → Shield01-cnNeKMKA.js} +1 -1
  25. package/dist/client/assets/{Star01-DnRxcrb2.js → Star01-DPd1XEvi.js} +1 -1
  26. package/dist/client/assets/{Stars01-DN0i_OuW.js → Stars01-CFQgPhA5.js} +1 -1
  27. package/dist/client/assets/{Stars02-DXKYKZ_y.js → Stars02-BBfjmRkO.js} +1 -1
  28. package/dist/client/assets/{Sun-BvgQbAIe.js → Sun-D1BAkaT6.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CTCDUfta.js → SwitchHorizontal01-BPwURr_K.js} +1 -1
  30. package/dist/client/assets/{Tool01-Dvmkyh1g.js → Tool01-UFRB7Gn8.js} +1 -1
  31. package/dist/client/assets/{Trash01-BrvLbqQk.js → Trash01-2mnBLeel.js} +1 -1
  32. package/dist/client/assets/{Upload01-Cghimx9V.js → Upload01-BxxwdIAZ.js} +1 -1
  33. package/dist/client/assets/{User01-BPjc8LiD.js → User01-D61Pj0Jp.js} +1 -1
  34. package/dist/client/assets/{Users01-DKr-dGyn.js → Users01-enhuFvLY.js} +1 -1
  35. package/dist/client/assets/{Users03-CBNK0aq-.js → Users03-CsRyhHB5.js} +1 -1
  36. package/dist/client/assets/{X-BZf8Ua-f.js → X-D_jt_5zi.js} +1 -1
  37. package/dist/client/assets/{XCircle-CxfDN97v.js → XCircle-Cr_Uaxeq.js} +1 -1
  38. package/dist/client/assets/{XClose-Ca4NBXw9.js → XClose-C6a8uvfS.js} +1 -1
  39. package/dist/client/assets/{Zap-D8ndRUQT.js → Zap-CkUSEY1J.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-BY_c_0SN.js → ZapSquare-CwzduoBx.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-C9_8nvys.js → ZoomOut-N-7VqfhT.js} +1 -1
  42. package/dist/client/assets/{access-gate-CCm9ALRG.js → access-gate-CKBNVhhp.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-BsBYigCm.js → add-section-modal-DCuBNkTr.js} +1 -1
  44. package/dist/client/assets/agent-icon-CDWUrKO6.js +1 -0
  45. package/dist/client/assets/agents-list-ulDX0H44.js +1 -0
  46. package/dist/client/assets/{ai-providers-P6gTuznf.js → ai-providers-DEa83FLl.js} +1 -1
  47. package/dist/client/assets/{alert-DpnpKBfm.js → alert-DXQz40c2.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-CWTgvZp_.js → alert-dialog-DwrOZyIa.js} +1 -1
  49. package/dist/client/assets/app-editor-tXdvtxk6.js +1 -0
  50. package/dist/client/assets/{auth-DtR4b91D.js → auth-DnFlop4R.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-BfgSkxA3.js → auth-catchall-CLwyMXPx.js} +1 -1
  52. package/dist/client/assets/{auth-entry-DiMotG9E.js → auth-entry-DxRJaJWz.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-Bithe63j.js → auth-split-layout-CrmHdTXS.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-BYDKbSTj.js → authenticate-and-persist-oauth-7MZHsMGS.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-DmMT-Lmk.js → automation-list-row-D88Ulzbg.js} +1 -1
  56. package/dist/client/assets/{automation-runs-CglgtIyd.js → automation-runs-BJ__6yJz.js} +1 -1
  57. package/dist/client/assets/automations-DrzVSDDD.js +1 -0
  58. package/dist/client/assets/{avatar-DosbYSVo.js → avatar-C765fdJ7.js} +1 -1
  59. package/dist/client/assets/{badge-7eW-Y90w.js → badge-CgUoAb0G.js} +1 -1
  60. package/dist/client/assets/{block-document-CU1UWO2l.js → block-document-DMH0RbkS.js} +1 -1
  61. package/dist/client/assets/{brand-context-Bc4eOtey.js → brand-context-CE1MWp0U.js} +1 -1
  62. package/dist/client/assets/{buckets-C0c0s9n9.js → buckets-DoNYdWNk.js} +1 -1
  63. package/dist/client/assets/{capability-load-error-BQe9cGJ_.js → capability-load-error-Cr5M8jid.js} +1 -1
  64. package/dist/client/assets/{card-ChgC15JC.js → card-CYYTvdp-.js} +1 -1
  65. package/dist/client/assets/category-editor-Cz0M4CjQ.js +1 -0
  66. package/dist/client/assets/{chat-context-C7e3nmPB.js → chat-context-CcIPgTva.js} +1 -1
  67. package/dist/client/assets/{checkbox-D1J6-HGS.js → checkbox-D9k8y94F.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-Biv357Zc.js → cli-auth-success-BEhGmeMb.js} +1 -1
  69. package/dist/client/assets/collection-detail-DwEhzsQm.js +1 -0
  70. package/dist/client/assets/{collection-display-button-zkui4HfF.js → collection-display-button-D-VHSw0A.js} +1 -1
  71. package/dist/client/assets/{collection-search-SCB2wfQm.js → collection-search-OPVOwF6w.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-CasRXW3s.js → collection-tabs-CRf8Ijmq.js} +1 -1
  73. package/dist/client/assets/{command-BP2NK5GV.js → command-gl-L1UMo.js} +1 -1
  74. package/dist/client/assets/commerce-onboarding-D-kTt4mI.js +1 -0
  75. package/dist/client/assets/{connect-desktop-dialog-CUoIMZ9P.js → connect-desktop-dialog-C95eK0uT.js} +1 -1
  76. package/dist/client/assets/{connection-card-Cw-v3-1B.js → connection-card-DQuoMZlF.js} +1 -1
  77. package/dist/client/assets/connection-detail-BTmjhXSR.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-BE_9JHz-.js → connection-form-helpers-Bjlqqa5J.js} +1 -1
  79. package/dist/client/assets/connections-kvdl_r4C.js +1 -0
  80. package/dist/client/assets/{context-menu-Cbyc6J5M.js → context-menu-DqNcAhnr.js} +1 -1
  81. package/dist/client/assets/{decopilot-D1XiRpB_.js → decopilot-CdQeVtVh.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-DsG4E7i_.js → decopilot-sse-pool-BxlWS7lz.js} +1 -1
  83. package/dist/client/assets/{dialog-DKiQlf0Y.js → dialog-Hh5ovGLY.js} +1 -1
  84. package/dist/client/assets/{domain-settings-DZg105GS.js → domain-settings-D0sFUhGm.js} +1 -1
  85. package/dist/client/assets/{drawer-UishvVn_.js → drawer-SgGGijSm.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-B_TYOovI.js → dropdown-menu-CVNL6sbF.js} +1 -1
  87. package/dist/client/assets/{empty-state-BVh7wBPS.js → empty-state-C5ufqcxL.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-C9MdxGy0.js → extract-connection-data-Dl7BC58q.js} +1 -1
  89. package/dist/client/assets/file-explorer-DBztAiIo.js +2 -0
  90. package/dist/client/assets/{file-type-icon-DouhlgA1.js → file-type-icon-b6CTHv4I.js} +1 -1
  91. package/dist/client/assets/{files-pYWmrODj.js → files-vqgO8Hmh.js} +1 -1
  92. package/dist/client/assets/{form-B4g755Hl.js → form-vkZSNPAt.js} +1 -1
  93. package/dist/client/assets/{general-5Yc9vnsv.js → general-VCh3bTjA.js} +1 -1
  94. package/dist/client/assets/github-repo-picker-DjgoP8zv.js +1 -0
  95. package/dist/client/assets/{hooks-DWc2KmvK.js → hooks-Cm8G1vlN.js} +1 -1
  96. package/dist/client/assets/{import-from-deco-dialog-Bih2Fm5A.js → import-from-deco-dialog-lvJBG1l4.js} +1 -1
  97. package/dist/client/assets/{index-BSPCA2yy.js → index-5EogW27n.js} +1 -1
  98. package/dist/client/assets/{index-BgnTiSnU.js → index-BA1nWkqk.js} +1 -1
  99. package/dist/client/assets/{index-tHbNbVHJ.js → index-BEjmlKPl.js} +4 -4
  100. package/dist/client/assets/index-BQrms0i2.js +1 -0
  101. package/dist/client/assets/index-BgeHuUkH.js +169 -0
  102. package/dist/client/assets/{index-GbBrtIUx.js → index-C5C-UKU4.js} +1 -1
  103. package/dist/client/assets/{index-Blw_ez7B.js → index-CYNIQ2LP.js} +1 -1
  104. package/dist/client/assets/{index-DJGRW9ro.js → index-DMwgNM3s.js} +1 -1
  105. package/dist/client/assets/{index-DZqx_Cnp.js → index-DVWXva_V.js} +1 -1
  106. package/dist/client/assets/index-DcwF1_eH.js +1 -0
  107. package/dist/client/assets/{index-V36Mlak_.js → index-Dg4__lD-.js} +2 -2
  108. package/dist/client/assets/{index-CQ5sDlCR.js → index-b3uLeNQ7.js} +1 -1
  109. package/dist/client/assets/index-h9qXUa58.css +1 -0
  110. package/dist/client/assets/{index-87hVDe9f.js → index-kmrmjjsI.js} +1 -1
  111. package/dist/client/assets/{index-redirect-DwYyA5dK.js → index-redirect-BgY_k9Gz.js} +1 -1
  112. package/dist/client/assets/index-xtrjWgZh.js +503 -0
  113. package/dist/client/assets/{input-C1uF2dQ1.js → input-Csk5e2yH.js} +1 -1
  114. package/dist/client/assets/{integration-icon-DOeD9Yy1.js → integration-icon-BubYo_JB.js} +1 -1
  115. package/dist/client/assets/{label-Bg0TZhOq.js → label-P9D2uSqZ.js} +1 -1
  116. package/dist/client/assets/{login-C4tPjUdy.js → login-Cl-Vlxwz.js} +1 -1
  117. package/dist/client/assets/{mcp-oauth-DxJiJ187.js → mcp-oauth-C9EbOVQM.js} +1 -1
  118. package/dist/client/assets/{members-DwE4NR-t.js → members-TxM32jPh.js} +1 -1
  119. package/dist/client/assets/{monaco-editor-C6tm250p.js → monaco-editor-Bk0ouh6L.js} +1 -1
  120. package/dist/client/assets/{monitoring-stats-row-BF3MVgko.js → monitoring-stats-row-ytgPYn-j.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-DDvAz-C3.js → oauth-callback-D6v0ajK5.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-ai-provider-PWS5W0qh.js → oauth-callback-ai-provider-CDDtW8tk.js} +1 -1
  123. package/dist/client/assets/{onboarding-BfXFCDPk.js → onboarding-J4ivY9wp.js} +1 -1
  124. package/dist/client/assets/{org-install-CRksScXH.js → org-install-R5bN1TE2.js} +1 -1
  125. package/dist/client/assets/{org-layout-D3Fm0DP7.js → org-layout-PPkGFokn.js} +1 -1
  126. package/dist/client/assets/{organization-choice-D0-tUZZw.js → organization-choice-CD_4VGlb.js} +1 -1
  127. package/dist/client/assets/{page-seo-form-BvkRv9HV.js → page-seo-form-B2_5Qimo.js} +1 -1
  128. package/dist/client/assets/page-seo-sheet-DDlWrFZb.js +1 -0
  129. package/dist/client/assets/{popover-eHXpDYJ1.js → popover-CXYDmYeq.js} +1 -1
  130. package/dist/client/assets/post-editor-B1H7keyM.js +1 -0
  131. package/dist/client/assets/preview-dialog-DPmt4gXJ.js +5 -0
  132. package/dist/client/assets/{primitives-CkRAfBR-.js → primitives-FsBU_d9l.js} +1 -1
  133. package/dist/client/assets/{profile-CEx7RbYh.js → profile-Bb6W32P_.js} +1 -1
  134. package/dist/client/assets/project-app-view-9qSeXqiM.js +1 -0
  135. package/dist/client/assets/record-editor-CeITAW1G.js +1 -0
  136. package/dist/client/assets/registry-BjqN-pIh.js +2 -0
  137. package/dist/client/assets/{registry-layout-BlqjOMOH.js → registry-layout-CgN5p_12.js} +1 -1
  138. package/dist/client/assets/{require-capability-BOr4zKTd.js → require-capability-BaWVSsgq.js} +1 -1
  139. package/dist/client/assets/{required-auth-layout-DCkraGAX.js → required-auth-layout-BfuMObCG.js} +1 -1
  140. package/dist/client/assets/{reset-password-BJpJyj5W.js → reset-password-DGoLN-pp.js} +1 -1
  141. package/dist/client/assets/roles-BLgs8rry.js +1 -0
  142. package/dist/client/assets/{scroll-area-IfNZ394n.js → scroll-area-DCf9FU8S.js} +1 -1
  143. package/dist/client/assets/{search-input-DWWTgewM.js → search-input-Cec8OPCx.js} +1 -1
  144. package/dist/client/assets/{secrets-BKFEeATT.js → secrets-D78lmb-N.js} +1 -1
  145. package/dist/client/assets/{sections-editor-uQUAGEex.js → sections-editor-CVFa_v55.js} +2 -2
  146. package/dist/client/assets/{select-Ufh1328y.js → select-f-UK5_IH.js} +1 -1
  147. package/dist/client/assets/{select-model-CQ-f9ftL.js → select-model-DXfyq6oG.js} +1 -1
  148. package/dist/client/assets/seo-editor-8EgzsFKu.js +1 -0
  149. package/dist/client/assets/settings-layout-D8fkj6t7.js +1 -0
  150. package/dist/client/assets/{settings-section-B4a4SAqB.js → settings-section-LAhWYbh9.js} +1 -1
  151. package/dist/client/assets/{sheet-DW12PvFQ.js → sheet-Dz5C6OGo.js} +1 -1
  152. package/dist/client/assets/{shell-controls-xlIGzcZ3.js → shell-controls-CEhcbJHE.js} +1 -1
  153. package/dist/client/assets/shell-layout-R4zDjERM.js +1 -0
  154. package/dist/client/assets/{shell-route-loading-B_CHvxTG.js → shell-route-loading-DHNvhkbM.js} +1 -1
  155. package/dist/client/assets/{sidebar-Cy5GVw74.js → sidebar-CFbvOGM6.js} +1 -1
  156. package/dist/client/assets/{skeleton-CpSca80L.js → skeleton-DLjQYeS_.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-CoB59DXJ.js → sortable.esm-DHABQEKH.js} +1 -1
  158. package/dist/client/assets/{sso-DMV0Y_YX.js → sso-lZztM25h.js} +1 -1
  159. package/dist/client/assets/{store-B6JtITOy.js → store-CY1YTiO_.js} +1 -1
  160. package/dist/client/assets/store-registry-Cq3I32Lc.js +2 -0
  161. package/dist/client/assets/{studio-tools-Dd7dXWQL.js → studio-tools-E6eV6Arx.js} +1 -1
  162. package/dist/client/assets/{switch-CuKs1fR0.js → switch-CIDHMPBy.js} +1 -1
  163. package/dist/client/assets/{table-BfyoFEgz.js → table-FWIaAi69.js} +1 -1
  164. package/dist/client/assets/{tabs-C3buIvx_.js → tabs-DCWgt9U2.js} +1 -1
  165. package/dist/client/assets/{task-status-DXhUoFwL.js → task-status-CBSgsj9C.js} +1 -1
  166. package/dist/client/assets/{textarea-BiYr__3G.js → textarea-cMx1Sjw5.js} +1 -1
  167. package/dist/client/assets/{toggle-group-DFSFo_vP.js → toggle-group-DqYtGmOf.js} +1 -1
  168. package/dist/client/assets/{toolbar-DMYgRw5l.js → toolbar-C5mHjU06.js} +1 -1
  169. package/dist/client/assets/{tooltip-DW1HpudV.js → tooltip-vrtDbf-F.js} +1 -1
  170. package/dist/client/assets/{types-BpY6lzqy.js → types-Cpxi5nja.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-DS_7m4pz.js → use-ai-providers-SEySB86N.js} +1 -1
  172. package/dist/client/assets/{use-automations-BOSdn9Us.js → use-automations-BWMuOB-g.js} +1 -1
  173. package/dist/client/assets/{use-capability-CeF0OpPy.js → use-capability-BF81OxAF.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-DLGdZmyk.js → use-clock-tick-v8inwCL3.js} +1 -1
  175. package/dist/client/assets/{use-collections-GNpTGYUv.js → use-collections-DkNJNG6n.js} +1 -1
  176. package/dist/client/assets/{use-connection-B65sInnd.js → use-connection-DUBWvt9B.js} +1 -1
  177. package/dist/client/assets/{use-copy-I4sZTiJp.js → use-copy-BGZ8Ttn0.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-mtRixRQv.js → use-create-virtual-mcp-hBSqW_CF.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-Hw4VW15I.js → use-debounced-autosave-BwLKL-15.js} +1 -1
  180. package/dist/client/assets/use-debounced-value-BMcX8uyD.js +1 -0
  181. package/dist/client/assets/{use-delete-connection-DV4DJUaY.js → use-delete-connection-oIOCPNow.js} +1 -1
  182. package/dist/client/assets/{use-file-configs-DObQhPxD.js → use-file-configs-BLZ83KSj.js} +1 -1
  183. package/dist/client/assets/{use-infinite-scroll-Bk__8TxT.js → use-infinite-scroll-DUbloeNA.js} +1 -1
  184. package/dist/client/assets/{use-join-requests-D-QyHVW_.js → use-join-requests-DABqJWZf.js} +1 -1
  185. package/dist/client/assets/{use-mcp-client-0BRd9S75.js → use-mcp-client-DdEyuuWo.js} +1 -1
  186. package/dist/client/assets/{use-mcp-prompts-D4ll_rda.js → use-mcp-prompts-DqUyy9S8.js} +1 -1
  187. package/dist/client/assets/{use-mcp-tools-UJVs9gTs.js → use-mcp-tools-CgsqmnJG.js} +1 -1
  188. package/dist/client/assets/{use-members-BAva2zEC.js → use-members-BhBptkRX.js} +1 -1
  189. package/dist/client/assets/{use-mobile-BD2-gXK-.js → use-mobile-C7loFyQ0.js} +1 -1
  190. package/dist/client/assets/{use-navigate-to-agent-CFNRRTVg.js → use-navigate-to-agent-C3I5i4Gg.js} +1 -1
  191. package/dist/client/assets/{use-org-auth-client-7sV0tnvK.js → use-org-auth-client-B9guhhqA.js} +1 -1
  192. package/dist/client/assets/{use-org-sso-CWJ7VJxn.js → use-org-sso-SRgmMZqR.js} +1 -1
  193. package/dist/client/assets/{use-organization-roles-GhUkwr8O.js → use-organization-roles-Aw74Iw_d.js} +1 -1
  194. package/dist/client/assets/{use-organization-settings-CLeV359D.js → use-organization-settings-CyhRZcil.js} +1 -1
  195. package/dist/client/assets/{use-registry-connections-D7ZBIfwl.js → use-registry-connections-JP-nn714.js} +1 -1
  196. package/dist/client/assets/{use-secrets-_avq30K6.js → use-secrets-f-qJA1xx.js} +1 -1
  197. package/dist/client/assets/{use-status-sounds-DAUtYLJA.js → use-status-sounds-D8xk5cTm.js} +1 -1
  198. package/dist/client/assets/{use-view-mode-DROl2yq4.js → use-view-mode-CsrgTSxk.js} +1 -1
  199. package/dist/client/assets/{use-virtual-mcp-CI9qouIO.js → use-virtual-mcp-CytuWVRm.js} +1 -1
  200. package/dist/client/assets/useInfiniteQuery-Cm9C_gzI.js +1 -0
  201. package/dist/client/assets/useSuspenseInfiniteQuery-Dl9xywRE.js +1 -0
  202. package/dist/client/assets/{useSuspenseQueries-DuDQjlvx.js → useSuspenseQueries-CGmxp5yX.js} +1 -1
  203. package/dist/client/assets/variant-calendar-cvUhqu-8.js +1 -0
  204. package/dist/client/assets/{view-mode-toggle-Del-VZlp.js → view-mode-toggle-B0C659uf.js} +1 -1
  205. package/dist/client/index.html +2 -2
  206. package/dist/server/cli.js +439 -429
  207. package/dist/server/server.js +268 -268
  208. package/package.json +1 -1
  209. package/dist/client/assets/agent-icon-BbjKuSxW.js +0 -1
  210. package/dist/client/assets/agents-list-g0HlqLD8.js +0 -1
  211. package/dist/client/assets/app-editor-CJVdYBr2.js +0 -1
  212. package/dist/client/assets/automations-DfhbzTi8.js +0 -1
  213. package/dist/client/assets/category-editor-BWGJADot.js +0 -1
  214. package/dist/client/assets/collection-detail-B-FYgzNz.js +0 -1
  215. package/dist/client/assets/commerce-onboarding-CCTWN0Dv.js +0 -1
  216. package/dist/client/assets/connection-detail-D66t6r8n.js +0 -1
  217. package/dist/client/assets/connections-B7dKDvRD.js +0 -1
  218. package/dist/client/assets/file-explorer-Dvmu_Dcb.js +0 -2
  219. package/dist/client/assets/github-repo-picker-DDcB4OPT.js +0 -1
  220. package/dist/client/assets/index-BQjoq239.js +0 -1
  221. package/dist/client/assets/index-C0RjSTYg.js +0 -169
  222. package/dist/client/assets/index-CkflryUu.js +0 -503
  223. package/dist/client/assets/index-Cl3nu1dQ.js +0 -1
  224. package/dist/client/assets/index-NVhaWgyE.css +0 -1
  225. package/dist/client/assets/page-seo-sheet-DTF7F_WK.js +0 -1
  226. package/dist/client/assets/post-editor-DOULNreh.js +0 -1
  227. package/dist/client/assets/preview-dialog-QbgIb_4T.js +0 -5
  228. package/dist/client/assets/project-app-view-DHWSkD1u.js +0 -1
  229. package/dist/client/assets/record-editor-Dq4SLOu9.js +0 -1
  230. package/dist/client/assets/registry-fpLTXF0f.js +0 -2
  231. package/dist/client/assets/roles-C6kCiv-A.js +0 -1
  232. package/dist/client/assets/save-status-DVA4IHRx.js +0 -1
  233. package/dist/client/assets/seo-editor-BuTMaAaQ.js +0 -1
  234. package/dist/client/assets/settings-layout-DZdRUGWz.js +0 -1
  235. package/dist/client/assets/shell-layout-C09jnc4C.js +0 -1
  236. package/dist/client/assets/store-registry-BoPJCgP8.js +0 -2
  237. package/dist/client/assets/useInfiniteQuery-jWCtindg.js +0 -1
  238. package/dist/client/assets/useSuspenseInfiniteQuery-CwejNwQJ.js +0 -1
  239. package/dist/client/assets/variant-calendar-2pJ_kR62.js +0 -1
@@ -1,169 +0,0 @@
1
- import{c as S,r as U,j as t,k as Y,B as _,K as B,l as ee,D as Fe,m as Je,t as W,b as et,u as tt,E as Te,ae as Tt}from"./index-tHbNbVHJ.js";import{i as zt}from"./ChevronRight-DqDeYsel.js";import{s as st}from"./Eye-B9uHZVsM.js";import{n as Pt,i as nt}from"./Globe01-H40eMg8D.js";import{b as lt,e as Ft,f as Ot,a as Et}from"./ZoomOut-C9_8nvys.js";import{a as pe}from"./Palette-C1u1Sxuh.js";import{s as At}from"./Plus-rHk0VScG.js";import{t as Mt}from"./Stars01-DN0i_OuW.js";import{i as xe}from"./Upload01-Cghimx9V.js";import{i as Oe}from"./Zap-D8ndRUQT.js";import{u as it}from"./use-mobile-BD2-gXK-.js";import{f as Ut,a as Bt,b as Lt,c as _t,d as Rt,e as qt,A as It,g as Kt}from"./alert-dialog-CWTgvZp_.js";import{b as Ee,a as Ae,d as Me,f as rt,c as Ht,e as Vt,D as Gt}from"./dialog-DKiQlf0Y.js";import{I as Ue}from"./input-C1uF2dQ1.js";import{S as K}from"./skeleton-CpSca80L.js";import{F as ie,d as at,M as ot}from"./file-type-icon-DouhlgA1.js";import{a as Qt}from"./toolbar-DMYgRw5l.js";import{r as Be,s as A,a as be,t as Wt,u as Pe,v as Le,h as Yt,L as Xt,o as Zt,p as Jt,n as es,R as Ve,q as ts,S as ss,b as ns,w as ct,x as le,y as ls}from"./preview-dialog-QbgIb_4T.js";import{a as ve}from"./DotsVertical-BGprjE03.js";import{i as is}from"./Key01-BDd1iQS4.js";import{s as je}from"./Trash01-BrvLbqQk.js";import{a as ye,c as te,b as we,D as ke}from"./dropdown-menu-B_TYOovI.js";import{T as rs}from"./textarea-BiYr__3G.js";import{t as as}from"./ChevronDown-CpzTl0cf.js";import{n as os}from"./ChevronUp-Cr2g1GDa.js";import{i as ge}from"./X-BZf8Ua-f.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-BuOnLJw9.js";import"./tooltip-DW1HpudV.js";import"./LinkExternal01-BAME6PCB.js";import"./XClose-Ca4NBXw9.js";import"./index-BSPCA2yy.js";import"./LayoutLeft-DQOl0C9j.js";import"./popover-eHXpDYJ1.js";const cs=new Set(["output","upload","public","home"]),ds=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function fs(s){return cs.has(s)||!ds.test(s)?"home":s}function us(s){const e=S.c(33);let n,i,l;e[0]!==s?({glyph:n,readOnly:l,...i}=s,e[0]=s,e[1]=n,e[2]=i,e[3]=l):(n=e[1],i=e[2],l=e[3]);const r=U.useId(),a=`${r}-back`,c=`${r}-front`,o=`url(#${a})`;let d;e[4]!==o?(d=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:o}),e[4]=o,e[5]=d):d=e[5];const u=`url(#${c})`;let f;e[6]!==u?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),e[6]=u,e[7]=f):f=e[7];let m,h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),h=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),x=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=m,e[9]=h,e[10]=x):(m=e[8],h=e[9],x=e[10]);let v;e[11]!==n?(v=n&&t.jsx(n,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=n,e[12]=v):v=e[12];let j;e[13]!==l?(j=l&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(st,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=l,e[14]=j):j=e[14];let y,k;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),k=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=y,e[16]=k):(y=e[15],k=e[16]);let N;e[17]!==a?(N=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[y,k]}),e[17]=a,e[18]=N):N=e[18];let g,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("stop",{stopColor:"#72B6FA"}),C=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=g,e[20]=C):(g=e[19],C=e[20]);let D;e[21]!==c?(D=t.jsxs("radialGradient",{id:c,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[g,C]}),e[21]=c,e[22]=D):D=e[22];let P;e[23]!==N||e[24]!==D?(P=t.jsxs("defs",{children:[N,D]}),e[23]=N,e[24]=D,e[25]=P):P=e[25];let $;return e[26]!==i||e[27]!==P||e[28]!==d||e[29]!==f||e[30]!==v||e[31]!==j?($=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,m,h,x,v,j,P]}),e[26]=i,e[27]=P,e[28]=d,e[29]=f,e[30]=v,e[31]=j,e[32]=$):$=e[32],$}function ms(s,e,n){return e?"color":n?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const hs=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,ps=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,xs=["svg","png","jpg","jpeg","webp","avif","gif"];function gs(s){return s.split(".").pop()?.toLowerCase()??""}function bs(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vs(s){const e=s.trim();return ps.test(e)||hs.test(e)}function js(s){const e=s.trim(),n=e.match(/^#([0-9a-f]{3})$/i);return n?.[1]?`#${[...n[1]].map(i=>i+i).join("")}`:e}function dt(s){const e=[],n=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let l;for(;(l=i.exec(s))!==null;){const r=l[1],a=l[2].trim();n.has(r)||e.push(r),n.set(r,a)}return e.map(r=>{const a=n.get(r),c=vs(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:ms(r,c,o)}})}const Ge=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function ys(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function ws(s){const e=[],n=new Map;for(const l of s){if(l.kind!=="color")continue;const r=ys(l.name);n.has(r)||(e.push(r),n.set(r,[])),n.get(r).push(l)}return e.map(l=>{const r=n.get(l);return{family:l,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((l,r)=>{const a=Ge.indexOf(l.family),c=Ge.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function ks(s,e,n){const i=new RegExp(`(${bs(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${n}${o}`);const l=s.search(/:root\s*\{/);if(l!==-1){const a=s.indexOf("{",l)+1;return`${s.slice(0,a)}
2
- ${e}: ${n};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
3
- `)?`
4
- `:"";return`${s}${r}:root {
5
- ${e}: ${n};
6
- }
7
- `}function Ns(s){const e=s.filter(i=>i.kind==="file"),n=e.find(i=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(i.path));return n?n.path:e.find(i=>xs.includes(gs(i.path)))?.path??null}function Ss(s){const e={};for(const n of s.split(`
8
- `)){const i=n.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Qe(s){for(const e of s.split(/\n\s*\n/)){const n=e.trim();if(!(!n||n.startsWith("#")))return n.replace(/\n/g," ")}return null}function ft(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Qe(s),body:s};const n=Ss(e[1]),i=s.slice(e[0].length);return{name:n.name||null,description:n.description||Qe(i),body:i}}const $s=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Cs=new Set(["csv","tsv"]),Ds=new Set(["mp4","webm","mov","m4v"]),Ts=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),zs=256*1024;function ce(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const n=Date.now()-e.getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const l=Math.floor(i/60);if(l<24)return`${l}h ago`;const r=Math.floor(l/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ps(s){return s.split(".").pop()?.toLowerCase()??""}function _e(s){const e=S.c(3),{onShare:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ft,{size:14}),e[0]=i):i=e[0];let l;return e[1]!==n?(l=t.jsxs(te,{onClick:n,children:[i,"Share"]}),e[1]=n,e[2]=l):l=e[2],l}function Fs(s){const e=S.c(9),{state:n}=s,i=n==="password"?"Password-protected — link + password to view":n==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",l=n==="password"?is:nt,r=n==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=ee(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==i||e[4]!==a?(c=t.jsx(l,{size:12,className:a,"aria-label":i}),e[2]=l,e[3]=i,e[4]=a,e[5]=c):c=e[5];let o;return e[6]!==i||e[7]!==c?(o=t.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[6]=i,e[7]=c,e[8]=o):o=e[8],o}function ut(s){const e=S.c(18),{downloadUrl:n,filename:i,onShare:l,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ve,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Es,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==l?(d=l&&t.jsx(_e,{onShare:l}),e[3]=l,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Pt,{size:14}),e[5]=u):u=e[5];let f;e[6]!==n||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:n,download:i,children:[u,"Download"]})}),e[6]=n,e[7]=i,e[8]=f):f=e[8];let m;e[9]!==r?(m=r&&t.jsxs(te,{variant:"destructive",onClick:r,children:[t.jsx(je,{size:14}),"Delete"]}),e[9]=r,e[10]=m):m=e[10];let h;e[11]!==d||e[12]!==f||e[13]!==m?(h=t.jsxs(we,{align:"end",onClick:Os,children:[d,f,m]}),e[11]=d,e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==o||e[16]!==h?(x=t.jsxs(ke,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Os(s){return s.stopPropagation()}function Es(s){return s.stopPropagation()}function de(s){const e=S.c(9),{onOpen:n,children:i,className:l}=s;let r;e[0]!==n?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n())},e[0]=n,e[1]=r):r=e[1];let a;e[2]!==l?(a=ee("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",l),e[2]=l,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==n||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=n,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function fe(s){const e=S.c(19),{icon:n,name:i,meta:l,subtitle:r,publicState:a,actions:c}=s;let o;e[0]!==i?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=o):o=e[1];let d;e[2]!==a?(d=a&&t.jsx(Fs,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==l?(u=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:l}),e[4]=l,e[5]=u):u=e[5];let f;e[6]!==o||e[7]!==d||e[8]!==u?(f=t.jsxs("div",{className:"flex items-start gap-3",children:[o,d,u]}),e[6]=o,e[7]=d,e[8]=u,e[9]=f):f=e[9];let m;e[10]!==r?(m=r&&t.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[10]=r,e[11]=m):m=e[11];let h;e[12]!==f||e[13]!==m?(h=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[f,m]}),e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==c||e[16]!==n||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[n,h,c]}),e[15]=c,e[16]=n,e[17]=h,e[18]=x):x=e[18],x}function Ne(s){const e=S.c(17),{name:n,meta:i,subtitle:l,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(us,{glyph:r,readOnly:a,className:"size-8 shrink-0"}),e[0]=r,e[1]=a,e[2]=f):f=e[2];let m;e[3]!==n||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(ke,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ms,"aria-label":`Actions for ${n}`,children:t.jsx(ve,{size:14})})}),t.jsxs(we,{align:"end",onClick:As,children:[d&&t.jsx(_e,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx(je,{size:14}),"Delete"]})]})]}):void 0,e[3]=n,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==n||e[9]!==c||e[10]!==l||e[11]!==f||e[12]!==m?(h=t.jsx(fe,{icon:f,name:n,meta:i,subtitle:l,publicState:c,actions:m}),e[7]=i,e[8]=n,e[9]=c,e[10]=l,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(de,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function As(s){return s.stopPropagation()}function Ms(s){return s.stopPropagation()}function mt(s){const e=S.c(21),{filename:n,updatedAt:i,downloadUrl:l,publicState:r,onOpen:a,onShare:c,onDelete:o}=s;let d;e[0]!==n?(d=t.jsx(ie,{filename:n,className:"h-8 w-6.5 shrink-0"}),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==i?(u=ce(i),e[2]=i,e[3]=u):u=e[3];let f;e[4]!==n?(f=at(n),e[4]=n,e[5]=f):f=e[5];let m;e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==c?(m=t.jsx(ut,{downloadUrl:l,filename:n,onShare:c,onDelete:o}),e[6]=l,e[7]=n,e[8]=o,e[9]=c,e[10]=m):m=e[10];let h;e[11]!==n||e[12]!==r||e[13]!==d||e[14]!==u||e[15]!==f||e[16]!==m?(h=t.jsx(fe,{icon:d,name:n,meta:u,subtitle:f,publicState:r,actions:m}),e[11]=n,e[12]=r,e[13]=d,e[14]=u,e[15]=f,e[16]=m,e[17]=h):h=e[17];let x;return e[18]!==a||e[19]!==h?(x=t.jsx(de,{onOpen:a,children:h}),e[18]=a,e[19]=h,e[20]=x):x=e[20],x}function Us(s){const e=S.c(40),{dirName:n,updatedAt:i,skillMdUrl:l,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=B.fileText(l),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==l?(f=async()=>{const R=await fetch(l,{credentials:"include"});if(!R.ok)throw new Error(`fetch failed: ${R.status}`);return R.text()},e[2]=l,e[3]=f):f=e[3];let m;e[4]!==u||e[5]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[4]=u,e[5]=f,e[6]=m):m=e[6];const{data:h}=Y(m);let x;e[7]!==h?(x=h?ft(h):null,e[7]=h,e[8]=x):x=e[8];const v=x;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Oe,{size:16})}),e[9]=j):j=e[9];const y=v?.name??n;let k;e[10]!==i?(k=ce(i),e[10]=i,e[11]=k):k=e[11];const N=`Actions for ${n}`;let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(ve,{size:14}),e[12]=g):g=e[12];let C;e[13]!==N?(C=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ls,"aria-label":N,children:g})}),e[13]=N,e[14]=C):C=e[14];let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(lt,{size:14}),e[15]=D):D=e[15];let P;e[16]!==c?(P=t.jsxs(te,{onClick:c,children:[D,"Browse files"]}),e[16]=c,e[17]=P):P=e[17];let $;e[18]!==o?($=o&&t.jsx(_e,{onShare:o}),e[18]=o,e[19]=$):$=e[19];let F;e[20]!==d?(F=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx(je,{size:14}),"Delete"]}),e[20]=d,e[21]=F):F=e[21];let z;e[22]!==P||e[23]!==$||e[24]!==F?(z=t.jsxs(we,{align:"end",onClick:Bs,children:[P,$,F]}),e[22]=P,e[23]=$,e[24]=F,e[25]=z):z=e[25];let p;e[26]!==C||e[27]!==z?(p=t.jsxs(ke,{children:[C,z]}),e[26]=C,e[27]=z,e[28]=p):p=e[28];let T;e[29]!==r||e[30]!==p||e[31]!==y||e[32]!==k?(T=t.jsx(fe,{icon:j,name:y,meta:k,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=y,e[32]=k,e[33]=T):T=e[33];const E=v?.description??"";let L;e[34]!==E?(L=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:E}),e[34]=E,e[35]=L):L=e[35];let q;return e[36]!==a||e[37]!==T||e[38]!==L?(q=t.jsxs(de,{onOpen:a,children:[T,L]}),e[36]=a,e[37]=T,e[38]=L,e[39]=q):q=e[39],q}function Bs(s){return s.stopPropagation()}function Ls(s){return s.stopPropagation()}function _s(s){const e=S.c(47),{dirName:n,updatedAt:i,tokensUrl:l,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==l?(o=B.fileText(l),e[0]=l,e[1]=o):o=e[1];let d;e[2]!==l?(d=async()=>{const N=await fetch(l,{credentials:"include"});if(!N.ok)throw new Error(`fetch failed: ${N.status}`);return N.text()},e[2]=l,e[3]=d):d=e[3];let u;e[4]!==o||e[5]!==d?(u={queryKey:o,queryFn:d,staleTime:6e4,retry:!1},e[4]=o,e[5]=d,e[6]=u):u=e[6];const{data:f}=Y(u);let m,h,x,v,j;if(e[7]!==f||e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const N=f?dt(f).filter(Ks).slice(0,6):[];m=de,v=r;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(pe,{size:16})}),e[18]=g):g=e[18];let C;e[19]!==i?(C=ce(i),e[19]=i,e[20]=C):C=e[20];const D=`Actions for ${n}`;let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ve,{size:14}),e[21]=P):P=e[21];let $;e[22]!==D?($=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Is,"aria-label":D,children:P})}),e[22]=D,e[23]=$):$=e[23];let F;e[24]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(lt,{size:14}),e[24]=F):F=e[24];let z;e[25]!==a?(z=t.jsxs(te,{onClick:a,children:[F,"Browse files"]}),e[25]=a,e[26]=z):z=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx(je,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let T;e[29]!==z||e[30]!==p?(T=t.jsxs(we,{align:"end",onClick:qs,children:[z,p]}),e[29]=z,e[30]=p,e[31]=T):T=e[31];let E;e[32]!==$||e[33]!==T?(E=t.jsxs(ke,{children:[$,T]}),e[32]=$,e[33]=T,e[34]=E):E=e[34],e[35]!==n||e[36]!==E||e[37]!==C?(j=t.jsx(fe,{icon:g,name:n,meta:C,subtitle:"Brand",actions:E}),e[35]=n,e[36]=E,e[37]=C,e[38]=j):j=e[38],h="flex min-h-5 items-center gap-1.5",x=N.map(Rs),e[7]=f,e[8]=n,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];let y;e[39]!==h||e[40]!==x?(y=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=y):y=e[41];let k;return e[42]!==m||e[43]!==v||e[44]!==j||e[45]!==y?(k=t.jsxs(m,{onOpen:v,children:[j,y]}),e[42]=m,e[43]=v,e[44]=j,e[45]=y,e[46]=k):k=e[46],k}function Rs(s){return t.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function qs(s){return s.stopPropagation()}function Is(s){return s.stopPropagation()}function Ks(s){return s.isColor}function ze(s){const e=S.c(4),{children:n}=s,[i,l]=U.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>o=>{if(!o)return;const d=new IntersectionObserver(u=>{const[f]=u;f?.isIntersecting&&(l(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=U.useState(r);if(i){let o;return e[1]!==n?(o=t.jsx(t.Fragment,{children:n}),e[1]=n,e[2]=o):o=e[2],o}let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{ref:a,className:"h-full w-full"}),e[3]=c):c=e[3],c}function Hs(s){const e=S.c(11),{url:n}=s;let i;e[0]!==n?(i=B.fileText(n),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==n?(l=async()=>{const d=await fetch(n,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=n,e[3]=l):l=e[3];let r;e[4]!==i||e[5]!==l?(r={queryKey:i,queryFn:l,staleTime:6e4,retry:!1},e[4]=i,e[5]=l,e[6]=r):r=e[6];const{data:a}=Y(r);if(!a)return null;let c;e[7]!==a?(c=a.slice(0,2e3),e[7]=a,e[8]=c):c=e[8];let o;return e[9]!==c?(o=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:c}),e[9]=c,e[10]=o):o=e[10],o}function Vs(s){const e=S.c(23),{url:n,ext:i}=s;let l;e[0]!==n?(l=B.csvThumb(n),e[0]=n,e[1]=l):l=e[1];let r;e[2]!==n?(r=async()=>{const j=await fetch(n,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.text()},e[2]=n,e[3]=r):r=e[3];let a;e[4]!==l||e[5]!==r?(a={queryKey:l,queryFn:r,staleTime:6e4,retry:!1},e[4]=l,e[5]=r,e[6]=a):a=e[6];const{data:c}=Y(a);if(!c)return null;const o=i==="tsv"?" ":",";let d,u,f,m;if(e[7]!==c||e[8]!==o){m=Symbol.for("react.early_return_sentinel");e:{let j;e[13]!==o?(j=k=>k.split(o).slice(0,6).map(Ws),e[13]=o,e[14]=j):j=e[14];const y=c.split(`
9
- `).filter(Boolean).slice(0,7).map(j);if(y.length===0){m=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",d=y.map(Gs)}e[7]=c,e[8]=o,e[9]=d,e[10]=u,e[11]=f,e[12]=m}else d=e[9],u=e[10],f=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let h;e[15]!==d?(h=t.jsx("tbody",{children:d}),e[15]=d,e[16]=h):h=e[16];let x;e[17]!==u||e[18]!==h?(x=t.jsx("table",{className:u,children:h}),e[17]=u,e[18]=h,e[19]=x):x=e[19];let v;return e[20]!==f||e[21]!==x?(v=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=v):v=e[22],v}function Gs(s,e){return t.jsx("tr",{className:ee(e===0&&"bg-muted/50 font-medium"),children:s.map(Qs)},e)}function Qs(s,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:s})},e)}function Ws(s){return s.trim().replace(/^"|"$/g,"")}function Ys(s){const e=S.c(14),{filename:n,size:i,downloadUrl:l}=s;let r;if(e[0]!==l||e[1]!==n||e[2]!==i){const a=Ps(n);let c;if($s.has(a)){let o;e[4]!==l?(o=t.jsx("img",{src:l,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=l,e[5]=o):o=e[5],c=o}else if(Ds.has(a)){const o=`${l}#t=0.1`;let d;e[6]!==o?(d=t.jsx(ze,{children:t.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=d):d=e[7],c=d}else if(a==="pdf"){let o;e[8]!==n?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ie,{filename:n,className:"h-14 w-11 opacity-60"})}),e[8]=n,e[9]=o):o=e[9],c=o}else if(Cs.has(a))c=t.jsx(ze,{children:t.jsx(Vs,{url:l,ext:a})});else if(Ts.has(a)&&i<=zs){let o;e[10]!==l?(o=t.jsx(ze,{children:t.jsx(Hs,{url:l})}),e[10]=l,e[11]=o):o=e[11],c=o}else{let o;e[12]!==n?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ie,{filename:n,className:"h-14 w-11 opacity-60"})}),e[12]=n,e[13]=o):o=e[13],c=o}r=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:c}),e[0]=l,e[1]=n,e[2]=i,e[3]=r}else r=e[3];return r}function Xs(s){const e=S.c(26),n=s.onOpen;let i;e[0]!==s.filename?(i=t.jsx(ie,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=i):i=e[1];const l=s.filename;let r;e[2]!==s.updatedAt?(r=ce(s.updatedAt),e[2]=s.updatedAt,e[3]=r):r=e[3];let a;e[4]!==s.filename?(a=at(s.filename),e[4]=s.filename,e[5]=a):a=e[5];let c;e[6]!==s.downloadUrl||e[7]!==s.filename||e[8]!==s.onDelete||e[9]!==s.onShare?(c=t.jsx(ut,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete}),e[6]=s.downloadUrl,e[7]=s.filename,e[8]=s.onDelete,e[9]=s.onShare,e[10]=c):c=e[10];let o;e[11]!==s.filename||e[12]!==s.publicState||e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==c?(o=t.jsx(fe,{icon:i,name:l,meta:r,subtitle:a,publicState:s.publicState,actions:c}),e[11]=s.filename,e[12]=s.publicState,e[13]=i,e[14]=r,e[15]=a,e[16]=c,e[17]=o):o=e[17];let d;e[18]!==s.downloadUrl||e[19]!==s.filename||e[20]!==s.size?(d=t.jsx(Ys,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[18]=s.downloadUrl,e[19]=s.filename,e[20]=s.size,e[21]=d):d=e[21];let u;return e[22]!==s.onOpen||e[23]!==o||e[24]!==d?(u=t.jsxs(de,{onOpen:n,children:[o,d]}),e[22]=s.onOpen,e[23]=o,e[24]=d,e[25]=u):u=e[25],u}async function Zs(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}const Js=`
10
- *{box-sizing:border-box}
11
- body{margin:0;padding:24px;background:var(--brand-bg,#0b0f1a);color:var(--brand-fg,#f5f7ff);font-family:var(--brand-font-body,system-ui,sans-serif);font-size:14px;line-height:1.5}
12
- .stack{display:flex;flex-direction:column;gap:18px;max-width:760px}
13
- .row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
14
- h1{font-family:var(--brand-font-display,inherit);font-size:28px;font-weight:700;letter-spacing:-0.02em;margin:0}
15
- .muted{color:var(--brand-fg-muted,#9fb0c9)}
16
- .btn{border:0;border-radius:var(--brand-radius,12px);padding:10px 16px;font:inherit;font-weight:600;cursor:pointer}
17
- .btn-primary{background:var(--brand-primary,#0a84ff);color:#fff}
18
- .btn-secondary{background:transparent;color:var(--brand-fg,#f5f7ff);border:1.5px solid var(--brand-border-strong,rgba(255,255,255,.22))}
19
- .btn-ghost{background:transparent;color:var(--brand-fg-muted,#9fb0c9)}
20
- .card{background:var(--brand-bg-subtle,#121826);border:1px solid var(--brand-border,rgba(255,255,255,.1));border-radius:var(--brand-radius-lg,16px);padding:20px;box-shadow:var(--brand-shadow-md,0 6px 16px rgba(8,12,22,.45))}
21
- .kpi{font-family:var(--brand-font-display,inherit);font-size:44px;font-weight:700;color:var(--brand-primary,#0a84ff);line-height:1;letter-spacing:-0.02em}
22
- .input{width:100%;background:var(--brand-bg-elevated,#1a2233);border:1.5px solid var(--brand-border,rgba(255,255,255,.12));border-radius:var(--brand-radius,12px);padding:10px 12px;color:inherit;font:inherit}
23
- .badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600}
24
- .badge-success{background:var(--brand-success-bg,#e7f6ec);color:var(--brand-success-fg,#0f7a37)}
25
- .badge-warning{background:var(--brand-warning-bg,#fdf3d6);color:var(--brand-warning-fg,#8a6500)}
26
- .badge-error{background:var(--brand-error-bg,#fde7e8);color:var(--brand-error-fg,#b01319)}
27
- .badge-info{background:var(--brand-info-bg,#e8f1ff);color:var(--brand-info-fg,#0b54a8)}
28
- .chip{border:1.5px solid var(--brand-border-strong,rgba(255,255,255,.22));border-radius:999px;padding:6px 14px;font-size:13px}
29
- .chip-active{background:var(--brand-primary,#0a84ff);border-color:transparent;color:#fff}
30
- `,en=`
31
- <div class="stack">
32
- <div>
33
- <h1>Your brand, applied</h1>
34
- <p class="muted" style="margin:6px 0 0">Buttons, cards, inputs and badges in your tokens.</p>
35
- </div>
36
- <div class="row">
37
- <button class="btn btn-primary">Primary</button>
38
- <button class="btn btn-secondary">Secondary</button>
39
- <button class="btn btn-ghost">Ghost</button>
40
- </div>
41
- <div class="card">
42
- <p class="muted" style="margin:0 0 6px">Monthly savings</p>
43
- <div class="kpi">$240</div>
44
- </div>
45
- <input class="input" placeholder="you@example.com" />
46
- <div class="row">
47
- <span class="badge badge-success">Success</span>
48
- <span class="badge badge-warning">Warning</span>
49
- <span class="badge badge-error">Error</span>
50
- <span class="badge badge-info">Info</span>
51
- </div>
52
- <div class="row">
53
- <span class="chip chip-active">All</span>
54
- <span class="chip">Income</span>
55
- <span class="chip">Spending</span>
56
- </div>
57
- </div>
58
- `;function tn(s){return`<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><style>${s??""}</style><style>${Js}</style></head><body>${en}</body></html>`}function sn(s){const e=S.c(13),{tokensUrl:n}=s;let i;e[0]!==n?(i=B.fileText(n??""),e[0]=n,e[1]=i):i=e[1];const l=!!n;let r;e[2]!==n?(r=()=>Zs(n??""),e[2]=n,e[3]=r):r=e[3];let a;e[4]!==i||e[5]!==l||e[6]!==r?(a={queryKey:i,enabled:l,queryFn:r,staleTime:6e4,retry:!1},e[4]=i,e[5]=l,e[6]=r,e[7]=a):a=e[7];const c=Y(a);if(n&&c.isPending){let f;return e[8]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(K,{className:"h-full w-full rounded-xl"})}),e[8]=f):f=e[8],f}const o=c.data??null;let d;e[9]!==o?(d=tn(o),e[9]=o,e[10]=d):d=e[10];let u;return e[11]!==d?(u=t.jsx("iframe",{title:"Brand components",srcDoc:d,sandbox:"",className:"block h-full w-full border-0 bg-white"}),e[11]=d,e[12]=u):u=e[12],u}const nn="Theme preview",ln=[`<section class="slide-center">
59
- <p class="eyebrow">Brand deck</p>
60
- <h1 class="deck-h1">Your brand, on every slide</h1>
61
- <p class="deck-sub">A live preview of each slide layout in your brand style.</p>
62
- <p class="deck-meta">Theme preview</p>
63
- </section>`,`<section>
64
- <p class="eyebrow">Agenda</p>
65
- <h2 class="deck-h2">What's in this theme</h2>
66
- <ol class="agenda">
67
- <li>Title &amp; section dividers</li>
68
- <li>Bulleted content</li>
69
- <li>Side-by-side columns</li>
70
- <li>Metrics &amp; timelines</li>
71
- <li>Quotes &amp; closing</li>
72
- </ol>
73
- </section>`,`<section class="slide-center divider">
74
- <p class="giant-number">01</p>
75
- <h2 class="deck-h1">Content layouts</h2>
76
- <p class="deck-sub">How text-heavy slides look.</p>
77
- </section>`,`<section>
78
- <p class="eyebrow">Bullets</p>
79
- <h2 class="deck-h2">Key points land cleanly</h2>
80
- <p class="deck-body intro">Short, scannable lines with the brand accent marker.</p>
81
- <ul class="bullets">
82
- <li>Each point is one idea</li>
83
- <li>Accent color draws the eye</li>
84
- <li>Plenty of breathing room</li>
85
- </ul>
86
- </section>`,`<section>
87
- <p class="eyebrow">Two column</p>
88
- <h2 class="deck-h2">Compare side by side</h2>
89
- <div class="cols">
90
- <div class="card grow">
91
- <h3 class="col-title">Before</h3>
92
- <div class="deck-body"><p>Generic slides that ignore your brand.</p></div>
93
- </div>
94
- <div class="card grow">
95
- <h3 class="col-title">After</h3>
96
- <div class="deck-body"><p>Every deck on-brand, automatically.</p></div>
97
- </div>
98
- </div>
99
- </section>`,`<section>
100
- <p class="eyebrow">Metrics</p>
101
- <h2 class="deck-h2">Numbers that matter</h2>
102
- <div class="cols kpis">
103
- <div class="card kpi grow">
104
- <p class="kpi-value">3&times;</p>
105
- <p class="kpi-label">Faster deck creation</p>
106
- <p class="kpi-delta">since adopting the theme</p>
107
- </div>
108
- <div class="card kpi grow">
109
- <p class="kpi-value">100%</p>
110
- <p class="kpi-label">On-brand slides</p>
111
- <p class="kpi-delta">no manual restyling</p>
112
- </div>
113
- <div class="card kpi grow">
114
- <p class="kpi-value">1</p>
115
- <p class="kpi-label">Source of truth</p>
116
- <p class="kpi-delta">tokens.css</p>
117
- </div>
118
- </div>
119
- </section>`,`<section>
120
- <p class="eyebrow">Timeline</p>
121
- <h2 class="deck-h2">How it unfolds</h2>
122
- <div class="cols timeline">
123
- <div class="step grow">
124
- <p class="step-label">Step 1</p>
125
- <h3 class="col-title">Define</h3>
126
- <p class="deck-body">Set brand tokens once.</p>
127
- </div>
128
- <div class="step grow">
129
- <p class="step-label">Step 2</p>
130
- <h3 class="col-title">Generate</h3>
131
- <p class="deck-body">Create decks from data.</p>
132
- </div>
133
- <div class="step grow">
134
- <p class="step-label">Step 3</p>
135
- <h3 class="col-title">Present</h3>
136
- <p class="deck-body">Ship, always on-brand.</p>
137
- </div>
138
- </div>
139
- </section>`,`<section>
140
- <p class="eyebrow">Comparison</p>
141
- <h2 class="deck-h2">Plans at a glance</h2>
142
- <div class="cols">
143
- <div class="card grow">
144
- <h3 class="col-title">Starter</h3>
145
- <ul class="bullets compact">
146
- <li>Core layouts</li>
147
- <li>Brand colors</li>
148
- <li>Logo</li>
149
- </ul>
150
- </div>
151
- <div class="card grow">
152
- <h3 class="col-title">Pro</h3>
153
- <ul class="bullets compact">
154
- <li>Everything in Starter</li>
155
- <li>Custom fonts</li>
156
- <li>Theme shell</li>
157
- </ul>
158
- </div>
159
- </div>
160
- </section>`,`<section class="slide-center">
161
- <blockquote class="deck-quote">&ldquo;Design once, stay on-brand everywhere.&rdquo;</blockquote>
162
- <p class="attribution">Brand system &middot; Studio</p>
163
- </section>`,`<section class="slide-center">
164
- <h2 class="deck-h1">Ready to present</h2>
165
- <p class="deck-sub">Generate a deck with this theme via the slides skill.</p>
166
- <p class="cta">slides-create --theme &hellip;</p>
167
- </section>`].join(`
168
-
169
- `);async function We(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function rn(s,e){const n=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",ln).replaceAll("{{title}}",nn).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${n}</head>`)}function an(s){const e=S.c(23),{readUrl:n,title:i,tokensUrl:l}=s;let r;e[0]!==n?(r=B.fileText(n),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==n?(a=()=>We(n),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==r||e[5]!==a?(c={queryKey:r,queryFn:a,staleTime:6e4,retry:!1},e[4]=r,e[5]=a,e[6]=c):c=e[6];const o=Y(c);let d;e[7]!==l?(d=B.fileText(l??""),e[7]=l,e[8]=d):d=e[8];const u=!!l;let f;e[9]!==l?(f=()=>We(l??""),e[9]=l,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==u||e[13]!==f?(m={queryKey:d,enabled:u,queryFn:f,staleTime:6e4,retry:!1},e[11]=d,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=Y(m);if(o.isPending||l&&h.isPending){let y;return e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(K,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=y):y=e[15],y}if(o.isError||!o.data){let y;return e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[16]=y):y=e[16],y}const x=h.data??null;let v;e[17]!==x||e[18]!==o.data?(v=rn(o.data,x),e[17]=x,e[18]=o.data,e[19]=v):v=e[19];let j;return e[20]!==v||e[21]!==i?(j=t.jsx("iframe",{title:i,srcDoc:v,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=v,e[21]=i,e[22]=j):j=e[22],j}async function Ye(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function ae(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function on(s){const e=S.c(16),{family:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;let c;e[0]!==n?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return l&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:js(h),onChange:v=>a(m.name,v.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:h}},m.name)},e[7]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-wrap gap-1",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function cn(s){const e=S.c(9),{token:n,value:i}=s;if(n.kind==="space"){let r;return e[0]!==i?(r=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:i,maxWidth:"100%"}})}),e[0]=i,e[1]=r):r=e[1],r}if(n.kind==="radius"){let r;return e[2]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:i}}),e[2]=i,e[3]=r):r=e[3],r}if(n.kind==="shadow"){let r;return e[4]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:i}}),e[4]=i,e[5]=r):r=e[5],r}if(n.kind==="type"&&/^--brand-text-/.test(n.name)){const r=`min(${i}, 22px)`;let a;return e[6]!==r?(a=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:r},children:"Ag"}),e[6]=r,e[7]=a):a=e[7],a}let l;return e[8]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=l):l=e[8],l}function ht(s){const e=S.c(17),{token:n,value:i,editing:l,onEdit:r}=s;let a;e[0]!==n||e[1]!==i?(a=t.jsx(cn,{token:n,value:i}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==n.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=n.name.replace(f,""),e[3]=n.name,e[4]=c}else c=e[4];let o;e[6]!==c?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==r||e[10]!==n.name||e[11]!==i?(d=l?t.jsx(Ue,{value:i,onChange:f=>r(n.name,f.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:i}),e[8]=l,e[9]=r,e[10]=n.name,e[11]=i,e[12]=d):d=e[12];let u;return e[13]!==a||e[14]!==o||e[15]!==d?(u=t.jsxs("div",{className:"flex items-center gap-3",children:[a,o,d]}),e[13]=a,e[14]=o,e[15]=d,e[16]=u):u=e[16],u}function re(s){const e=S.c(16),{label:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==n?(c=t.jsx(ae,{children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>t.jsx(ht,{token:m,value:r(m),editing:l,onEdit:a},m.name),e[7]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-col gap-2.5",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-3",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function pt({brandPath:s,onClose:e,variant:n}){const{org:i}=Fe(),l=Be(s),r=l.volume??"",a=l.dirPath,c=A(a),o=l.readOnly,d=Je(),u=be(),f=Wt(r),{upload:m,remove:h}=Pe(r),x=U.useRef(null),v=Le(r,a),j=v.data??[],y=b=>j.some(M=>M.kind==="file"&&A(M.path)===b),k=y("tokens.css"),N=y("brand.md"),g=y("slides-theme.html"),C=Ns(j),D=u(r,`${a}/tokens.css`),P=u(r,`${a}/brand.md`),$=u(r,`${a}/slides-theme.html`),F=Y({queryKey:B.fileText(D),enabled:k,queryFn:()=>Ye(D),staleTime:6e4,retry:!1}),z=Y({queryKey:B.fileText(P),enabled:N,queryFn:()=>Ye(P),staleTime:6e4,retry:!1}),[p,T]=U.useState(!1),[E,L]=U.useState({}),[q,R]=U.useState(null),[Q,O]=U.useState(!1),[G,se]=U.useState(!1),[Se,ue]=U.useState("deck"),H=F.data?dt(F.data):[],$e=b=>H.find(M=>M.name===b)?.value,V=b=>E[b.name]??b.value,w=ws(H),I=H.filter(b=>b.kind==="font"),ne=H.filter(b=>b.kind==="type"),vt=H.filter(b=>b.kind==="space"),jt=H.filter(b=>b.kind==="radius"),yt=H.filter(b=>b.kind==="shadow"),wt=H.filter(b=>b.kind==="motion"),kt=H.filter(b=>b.kind==="other"),Z=(b,M)=>L(he=>({...he,[b]:M})),me=g&&Se==="deck",Ce=q??z.data??"",De=Object.entries(E).filter(([b,M])=>$e(b)!==M),Ie=q!==null&&q!==(z.data??""),Nt=De.length>0||Ie;function St(){L({}),R(null),T(!1)}async function $t(){O(!0);try{if(De.length>0){let b=F.data??"";for(const[M,he]of De)b=ks(b,M,he);await f.mutateAsync({path:`${a}/tokens.css`,body:b,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(D)})}Ie&&q!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:q,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(P)})),d.invalidateQueries({queryKey:B.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:B.orgFsRecent(i.id)}),L({}),R(null),T(!1),W.success("Brand saved")}catch(b){W.error(b instanceof Error?b.message:"Failed to save brand")}finally{O(!1)}}async function Ct(b){const M=b?.[0];if(!M)return;const Ke=`logo.${(M.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([M],Ke,{type:M.type})]}),C&&A(C)!==Ke&&await h.mutateAsync(C),W.success("Logo updated")}catch(He){W.error(He instanceof Error?He.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const Dt=!v.isPending&&!k&&!N&&!C;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(pe,{size:18})}),n==="dialog"?t.jsx(Me,{className:"flex-1 truncate text-base font-medium text-foreground",children:c}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:c}),!o&&(p?t.jsxs(t.Fragment,{children:[t.jsx(_,{variant:"ghost",size:"sm",onClick:St,disabled:Q,children:"Cancel"}),t.jsx(_,{size:"sm",disabled:!Nt||Q,onClick:()=>{$t()},children:Q?"Saving…":"Save"})]}):t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>T(!0),children:[t.jsx(Ot,{size:14}),"Edit"]})),n==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ge,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:v.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(K,{className:"h-40 w-full rounded-xl"}),t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-4 w-2/3"})]}):Dt?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This brand is no longer available."}):t.jsxs(t.Fragment,{children:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":G?"Show preview":"Hide preview",onClick:()=>se(b=>!b),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),se(M=>!M))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:b=>b.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{ue("deck"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{ue("components"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),G?t.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(os,{size:16,className:"shrink-0 text-muted-foreground"})]}),!G&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:ee("w-full overflow-hidden rounded-xl border border-border bg-muted/30",me?"aspect-[16/9]":"h-96"),children:me?t.jsx(an,{readUrl:$,title:`${c} deck theme`,tokensUrl:D}):t.jsx(sn,{tokensUrl:D})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Logo"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:C?t.jsx("img",{src:u(r,C),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(pe,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(_,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(xe,{size:14}),C?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:b=>{Ct(b.target.files)}})]})]})]}),w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Colors"}),w.map(b=>t.jsx(on,{family:b.family,tokens:b.tokens,editing:p,valueOf:V,onEdit:Z},b.family))]}),(I.length>0||ne.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Typography"}),I.map(b=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:b.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(Ue,{value:V(b),onChange:M=>Z(b.name,M.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:V(b)},children:V(b)})]},b.name)),ne.map(b=>t.jsx(ht,{token:b,value:V(b),editing:p,onEdit:Z},b.name))]}),t.jsx(re,{label:"Spacing",tokens:vt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Radius",tokens:jt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Shadows",tokens:yt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Motion",tokens:wt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Tokens",tokens:kt,editing:p,valueOf:V,onEdit:Z}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Voice & guidelines"}),p?t.jsx(rs,{value:Ce,onChange:b=>R(b.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):z.isPending&&N?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"})]}):Ce.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ot,{id:`brand-preview-${s}`,text:Ce})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function dn(s){const e=S.c(8),{brandPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=t.jsx(Ee,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(pt,{brandPath:n,onClose:i,variant:"dialog"})}),e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function fn(s){const e=S.c(3),{brandPath:n,onClose:i}=s;let l;return e[0]!==n||e[1]!==i?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(pt,{brandPath:n,onClose:i,variant:"panel"})}),e[0]=n,e[1]=i,e[2]=l):l=e[2],l}function xt(s){const e=S.c(23),{skillPath:n,onClose:i,variant:l}=s,r=Be(n),{volume:a,dirPath:c}=r,o=be(),d=o(a??"",`${c}/SKILL.md`),u=B.fileText(d);let f;e[0]!==d?(f=async()=>{const O=await fetch(d,{credentials:"include"});if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.text()},e[0]=d,e[1]=f):f=e[1];let m;e[2]!==u||e[3]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[2]=u,e[3]=f,e[4]=m):m=e[4];const h=Y(m),x=Le(a??"",c);let v;e[5]!==c?(v=A(c),e[5]=c,e[6]=v):v=e[6];const j=v;let y;e[7]!==h.data?(y=h.data?ft(h.data):null,e[7]=h.data,e[8]=y):y=e[8];const k=y,N=mn;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=(O,G)=>N(O.path)?-1:N(G.path)?1:A(O.path).localeCompare(A(G.path)),e[9]=g):g=e[9];const C=(x.data??[]).filter(un).sort(g),[D,P]=U.useState(null),$=D===null?null:C.find(O=>O.path===D)??null,F=k?.name??j;let z;e[10]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Oe,{size:18})}),e[10]=z):z=e[10];let p;e[11]!==F||e[12]!==l?(p=l==="dialog"?t.jsx(Me,{className:"flex-1 truncate text-base font-medium text-foreground",children:F}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:F}),e[11]=F,e[12]=l,e[13]=p):p=e[13];let T;e[14]!==i||e[15]!==l?(T=l==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ge,{size:16})}),e[14]=i,e[15]=l,e[16]=T):T=e[16];let E;e[17]!==p||e[18]!==T?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[z,p,T]}),e[17]=p,e[18]=T,e[19]=E):E=e[19];let L;e[20]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=L):L=e[20];const q="relative flex min-w-0 flex-1 flex-col overflow-y-auto",R=$?t.jsx(Yt,{file:{key:$.path,filename:A($.path),size:$.size,downloadUrl:o(a??"",$.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"}),t.jsx(K,{className:"h-3 w-2/3"})]}):h.isError||!k?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:k.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ot,{id:`skill-preview-${n}`,text:k.body})})]});let Q;return e[21]!==R?(Q=t.jsx("div",{className:q,children:R}),e[21]=R,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[E,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:[L,x.isPending?t.jsx(K,{className:"mx-2 h-4 w-24"}):C.map(O=>{const G=N(O.path)?$===null:D===O.path;return t.jsxs("button",{type:"button",onClick:()=>P(N(O.path)?null:O.path),className:ee("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",G?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ie,{filename:A(O.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:ee("truncate text-sm",G?"text-foreground":"text-muted-foreground"),children:A(O.path)})]},O.path)})]}),Q]})]})}function un(s){return s.kind==="file"}function mn(s){return A(s)==="SKILL.md"}function hn(s){const e=S.c(8),{skillPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=t.jsx(Ee,{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(xt,{skillPath:n,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function pn(s){const e=S.c(3),{skillPath:n,onClose:i}=s;let l;return e[0]!==i||e[1]!==n?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(xt,{skillPath:n,onClose:i,variant:"panel"})}),e[0]=i,e[1]=n,e[2]=l):l=e[2],l}function gt(s){return`${window.location.origin}${s}`}function oe(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const bt=[{id:"home",description:"Your organization's home folder",glyph:Et},{id:"uploads",description:"Files your team uploads",glyph:xe},{id:"outputs",description:"Agent run outputs",glyph:Mt}],Xe=3;function J(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function X(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:n})}),e[0]=n,e[1]=i):i=e[1],i}function Re(s){const e=S.c(2),{rows:n}=s,i=n===void 0?1:n;let l;return e[0]!==i?(l=t.jsx(X,{children:Array.from({length:i*3},xn)}),e[0]=i,e[1]=l):l=e[1],l}function xn(s,e){return t.jsx(K,{className:"h-16 rounded-2xl"},e)}function qe(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function gn(s){const e=S.c(6),{volume:n,displayName:i,description:l,glyph:r,onOpen:a}=s,c=ls(n),o=i??n,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(Ne,{name:o,meta:d,subtitle:l,glyph:r,onOpen:a}),e[0]=l,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function bn(s){const e=S.c(8),{segments:n,onNavigate:i}=s;let l;e[0]!==i?(l=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=n.map((c,o)=>{const d=n.slice(0,o+1).join("/"),u=o===n.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(zt,{size:12,className:"shrink-0 text-muted-foreground"}),u?t.jsx("span",{className:"truncate font-medium text-foreground",children:c}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:c})]},d)}),e[2]=i,e[3]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function vn(s){const e=S.c(23),{onOpenDir:n,onOpenFile:i,onShare:l,onDelete:r}=s,{org:a}=Fe(),c=ns(),o=ct(),d=be();let u;e[0]!==d||e[1]!==l?(u=h=>l({volume:h.volume,path:h.path,kind:"file",shareMode:h.shareMode??"private",effectivePublic:h.effectivePublic??!1,url:gt(d(h.volume,h.path))}),e[0]=d,e[1]=l,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==n||e[6]!==i||e[7]!==a||e[8]!==o.data?.length||e[9]!==c.data||e[10]!==c.isPending||e[11]!==f){const h=c.data??[],x=h.slice(0,Xe),v=h.slice(Xe);let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(J,{children:"Folders"}),e[13]=j):j=e[13];let y;e[14]!==n||e[15]!==a?(y=bt.map(g=>t.jsx(gn,{volume:g.id,displayName:g.id==="home"?fs(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>n(g.id)},g.id)),e[14]=n,e[15]=a,e[16]=y):y=e[16];let k;e[17]!==n||e[18]!==o.data?.length?(k=(o.data?.length??0)>0&&t.jsx(Ne,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:nt,readOnly:!0,onOpen:()=>n("public")}),e[17]=n,e[18]=o.data?.length,e[19]=k):k=e[19];let N;e[20]!==y||e[21]!==k?(N=t.jsxs("div",{className:"flex flex-col gap-3",children:[j,t.jsxs(X,{children:[y,k]})]}),e[20]=y,e[21]=k,e[22]=N):N=e[22],m=t.jsxs(t.Fragment,{children:[c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(Re,{})]}):x.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(X,{children:x.map(g=>t.jsx(Xs,{filename:A(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]}):t.jsx(qe,{children:"No files yet — upload one, or ask an agent to produce something."}),N,v.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"All files"}),t.jsx(X,{children:v.map(g=>t.jsx(mt,{filename:A(g.path),updatedAt:g.updatedAt,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]})]}),e[3]=d,e[4]=r,e[5]=n,e[6]=i,e[7]=a,e[8]=o.data?.length,e[9]=c.data,e[10]=c.isPending,e[11]=f,e[12]=m}else m=e[12];return m}function jn(s){const e=S.c(11),{onOpenDir:n}=s,i=ct();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Re,{}),e[0]=o):o=e[0],o}let l;e[1]!==i.data?(l=i.data??[],e[1]=i.data,e[2]=l):l=e[2];const r=l;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(qe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==n||e[5]!==r){let o;e[7]!==n?(o=d=>t.jsx(Ne,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>n(`public/${d}`)},d),e[7]=n,e[8]=o):o=e[8],a=r.map(o),e[4]=n,e[5]=r,e[6]=a}else a=e[6];let c;return e[9]!==a?(c=t.jsx(X,{children:a}),e[9]=a,e[10]=c):c=e[10],c}function yn(s){const e=S.c(34),{location:n,onOpenDir:i,onOpenFile:l,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=n.volume??"",u=Le(d,n.dirPath),f=be();if(u.isPending){let k;return e[0]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Re,{rows:2}),e[0]=k):k=e[0],k}if(u.isError){const k=u.error instanceof Error?u.error.message:"Failed to load";let N;return e[1]!==k?(N=t.jsx("p",{className:"text-sm text-destructive",children:k}),e[1]=k,e[2]=N):N=e[2],N}let m,h,x,v,j;if(e[3]!==f||e[4]!==u.data||e[5]!==n||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==d){j=Symbol.for("react.early_return_sentinel");e:{const k=u.data??[],N=k.filter(Sn),g=k.filter(Nn),C=k.filter(kn),D=k.filter(wn);if(k.length===0){const p=n.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let T;e[18]!==p?(T=t.jsx(qe,{children:p}),e[18]=p,e[19]=T):T=e[19],j=T;break e}let P;e[20]!==n.readOnly||e[21]!==o||e[22]!==d?(P=p=>n.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=n.readOnly,e[21]=o,e[22]=d,e[23]=P):P=e[23];const $=P;let F;e[24]!==f||e[25]!==n.readOnly||e[26]!==c||e[27]!==d?(F=p=>n.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?gt(f(d,p.path)):void 0}),e[24]=f,e[25]=n.readOnly,e[26]=c,e[27]=d,e[28]=F):F=e[28];const z=F;m=N.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Skills"}),t.jsx(X,{children:N.map(p=>t.jsx(Us,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:oe(p),onOpen:()=>r(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),h=g.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Brands"}),t.jsx(X,{children:g.map(p=>t.jsx(_s,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onDelete:$(p)},p.path))})]}),x=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Folders"}),t.jsx(X,{children:C.map(p=>t.jsx(Ne,{name:A(p.path),meta:ce(p.updatedAt),readOnly:n.readOnly,publicState:oe(p),onOpen:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),v=D.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Files"}),t.jsx(X,{children:D.map(p=>t.jsx(mt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:oe(p),onOpen:()=>l(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=n,e[6]=o,e[7]=a,e[8]=i,e[9]=l,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];if(j!==Symbol.for("react.early_return_sentinel"))return j;let y;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==v?(y=t.jsxs(t.Fragment,{children:[m,h,x,v]}),e[29]=m,e[30]=h,e[31]=x,e[32]=v,e[33]=y):y=e[33],y}function wn(s){return s.kind==="file"}function kn(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Nn(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Sn(s){return s.kind==="dir"&&s.hasSkill}function Ze(){const{org:s}=Fe(),e=Je(),n=et(),i=it(),l=tt({strict:!1}),r=l.path??"",a=Be(r),c=a.segments.length===0,o=(w,I)=>n({to:".",search:ne=>({...ne,[w]:I||void 0})}),d=w=>o("path",w),u=(w,I)=>n({to:".",search:ne=>({...ne,preview:void 0,skill:void 0,brand:void 0,[w]:I})}),f=w=>u("preview",w),m=w=>u("skill",w),h=w=>u("brand",w),[x,v]=U.useState(null),[j,y]=U.useState(null),[k,N]=U.useState(!1),[g,C]=U.useState(""),D=U.useRef(null),[P,$]=U.useState(!1),F=U.useRef(0),z=a.readOnly?null:a.volume??"uploads",p=a.volume?a.dirPath:"",{upload:T,mkdir:E}=Pe(z??"uploads"),{remove:L}=Pe(x?.volume??"uploads");async function q(w){if(!(!z||!w||w.length===0))try{await T.mutateAsync({dir:p,files:[...w]}),W.success(w.length===1?`Uploaded ${w[0]?.name}`:`Uploaded ${w.length} files`)}catch(I){W.error(I instanceof Error?I.message:"Upload failed")}finally{D.current&&(D.current.value="")}}const R=z!==null,Q=c?"uploads":a.segments.at(-1)??"this folder";function O(w){return w.dataTransfer.types.includes("Files")}function G(w){!R||!O(w)||(w.preventDefault(),F.current+=1,$(!0))}function se(w){!R||!O(w)||w.preventDefault()}function Se(){R&&(F.current=Math.max(0,F.current-1),F.current===0&&$(!1))}function ue(w){R&&(w.preventDefault(),F.current=0,$(!1),w.dataTransfer.files.length>0&&q(w.dataTransfer.files))}async function H(){const w=g.trim();if(!(!z||!w))try{await E.mutateAsync(p?`${p}/${w}`:w),W.success(`Folder "${w}" created`),N(!1),C("")}catch(I){W.error(I instanceof Error?I.message:"Failed to create folder")}}async function $e(){if(!x)return;const w=x;try{await L.mutateAsync(w.path),W.success(`Deleted ${A(w.path)}`)}catch(I){W.error(I instanceof Error?I.message:"Delete failed")}finally{v(null)}}function V(){for(const w of bt)e.invalidateQueries({queryKey:B.orgFsVolume(s.id,w.id)});a.volume&&e.invalidateQueries({queryKey:B.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:B.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:B.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:G,onDragOver:se,onDragLeave:Se,onDrop:ue,children:[P&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx(xe,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",Q]})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[!c&&t.jsx(bn,{segments:a.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:c?"Library":a.segments.at(-1)??"Library"}),t.jsx(_,{variant:"ghost",size:"icon",onClick:V,"aria-label":"Refresh",children:t.jsx(Tt,{size:14})}),!c&&z&&t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>N(!0),children:[t.jsx(At,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(st,{size:12}),"Read-only"]}):t.jsxs(_,{size:"sm",disabled:T.isPending,onClick:()=>D.current?.click(),children:[t.jsx(xe,{size:14}),T.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:D,type:"file",multiple:!0,className:"hidden",onChange:w=>{q(w.target.files)}})]})]}),c?t.jsx(vn,{onOpenDir:d,onOpenFile:f,onShare:y,onDelete:v}):a.volume===null?t.jsx(jn,{onOpenDir:d}):t.jsx(yn,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:y,onDelete:v},a.volume)]})}),i&&(l.preview?t.jsx(ts,{previewPath:l.preview,onClose:()=>o("preview",null)}):l.skill?t.jsx(hn,{skillPath:l.skill,onClose:()=>o("skill",null)},l.skill):l.brand?t.jsx(dn,{brandPath:l.brand,onClose:()=>o("brand",null)},l.brand):null),t.jsx(Ae,{open:k,onOpenChange:N,children:t.jsxs(Ee,{children:[t.jsxs(Ht,{children:[t.jsx(Me,{children:"New folder"}),t.jsxs(Vt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(Ue,{autoFocus:!0,placeholder:"folder-name",value:g,onChange:w=>C(w.target.value),onKeyDown:w=>{w.key==="Enter"&&H()}}),t.jsxs(Gt,{children:[t.jsx(_,{variant:"outline",onClick:()=>N(!1),children:"Cancel"}),t.jsx(_,{disabled:!g.trim()||E.isPending,onClick:()=>{H()},children:"Create"})]})]})}),t.jsx(ss,{target:j,onOpenChange:w=>{w||y(null)}}),t.jsx(Ut,{open:x!==null,onOpenChange:w=>{w||v(null)},children:t.jsxs(Bt,{children:[t.jsxs(Lt,{children:[t.jsxs(_t,{children:["Delete ",x?A(x.path):"","?"]}),t.jsx(Rt,{children:x?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(qt,{children:[t.jsx(It,{children:"Cancel"}),t.jsx(Kt,{onClick:()=>{$e()},children:"Delete"})]})]})})]})}function rl(){const s=S.c(12),e=it(),n=et();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const l=tt(i);let r;s[1]!==n?(r=d=>n({to:".",search:u=>({...u,[d]:void 0})}),s[1]=n,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==l.brand||s[6]!==l.preview||s[7]!==l.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=l.preview?{key:"preview",path:l.preview,panel:t.jsx(Xt,{previewPath:l.preview,onClose:()=>a("preview")})}:l.skill?{key:"skill",path:l.skill,panel:t.jsx(pn,{skillPath:l.skill,onClose:()=>a("skill")},l.skill)}:l.brand?{key:"brand",path:l.brand,panel:t.jsx(fn,{brandPath:l.brand,onClose:()=>a("brand")},l.brand)}:null;if(e){let f;s[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(Te,{children:t.jsx(Ze,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ve,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Te,{children:t.jsx(Ze,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(Zt,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[u,d&&t.jsxs(t.Fragment,{children:[t.jsx(Qt.Tabs,{children:t.jsx(Jt,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ie,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Oe,{...f}):t.jsx(pe,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(es,{className:"bg-sidebar"}),t.jsx(Ve,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Te,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=l.brand,s[6]=l.preview,s[7]=l.skill,s[8]=c,s[9]=o}else c=s[8],o=s[9];return o!==Symbol.for("react.early_return_sentinel")?o:c}export{rl as default};