decocms 3.89.0 → 3.89.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 (246) hide show
  1. package/dist/client/assets/{AlertCircle-BMCh3ayd.js → AlertCircle-flSoo6uw.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CwVMUp5O.js → ArrowUpRight-BeOMO89N.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-BP2lb3AX.js → CheckCircle-B9ekAAw-.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CkcGr2qp.js → ChevronDown-BWfuTI7r.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-Cgw9JZYG.js → ChevronLeft-BNcg18cx.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DYe9AFXl.js → ChevronRight-ChYOVgWd.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-CiXD4kQk.js → ChevronUp-BhWz3ylT.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-Z_h1bSB3.js → DotsVertical-C0YWb9xq.js} +1 -1
  9. package/dist/client/assets/{Eye-B92Ff4dY.js → Eye-DWTUBTZ_.js} +1 -1
  10. package/dist/client/assets/{FilterLines-CMHeCbJ1.js → FilterLines-Djqj6uj_.js} +1 -1
  11. package/dist/client/assets/{Form-GDlYmtQN.js → Form-Czxo_N56.js} +1 -1
  12. package/dist/client/assets/{Globe01-MZlo2_34.js → Globe01-BgRW2EiE.js} +1 -1
  13. package/dist/client/assets/{Globe04-BPWbnzx0.js → Globe04-XITcP2mp.js} +1 -1
  14. package/dist/client/assets/{HardDrive-D8FSpDtM.js → HardDrive-DS3VxDtU.js} +1 -1
  15. package/dist/client/assets/{Key01-CZVV-ceU.js → Key01-DX7L8s0Z.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-CuTI_WR9.js → LayoutLeft-BqtFvEWV.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-DekFjc9P.js → LinkExternal01-Cf-6A1_h.js} +1 -1
  18. package/dist/client/assets/{Monitor01-BxGhRsUq.js → Monitor01-CZ30bS8J.js} +1 -1
  19. package/dist/client/assets/{Palette-BDlA8RUr.js → Palette-Dy2dQgqx.js} +1 -1
  20. package/dist/client/assets/{Play-BGGUeSDd.js → Play-DvFnuZIO.js} +1 -1
  21. package/dist/client/assets/{Plus-CQOl41pg.js → Plus-jFajoMCA.js} +1 -1
  22. package/dist/client/assets/{SearchMd-Da504yGV.js → SearchMd-uzKFlzQB.js} +1 -1
  23. package/dist/client/assets/{Settings02-ozrzAwut.js → Settings02-47eDNk4K.js} +1 -1
  24. package/dist/client/assets/{Shield01-CYPtC_lA.js → Shield01-BgRa80OR.js} +1 -1
  25. package/dist/client/assets/{Star01-BoZIiKCL.js → Star01-BrkbxV-A.js} +1 -1
  26. package/dist/client/assets/{Stars01-BJuGXG_N.js → Stars01-Daq_eW6a.js} +1 -1
  27. package/dist/client/assets/{Stars02-C4CXFnp9.js → Stars02-DlImJz_z.js} +1 -1
  28. package/dist/client/assets/{Sun-2eUdoD8j.js → Sun-9FxiCes3.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-DXdcIz27.js → SwitchHorizontal01-CB5mOBIf.js} +1 -1
  30. package/dist/client/assets/{Tool01-WsqNh4er.js → Tool01-rx0lKYM8.js} +1 -1
  31. package/dist/client/assets/{Trash01-z6De146C.js → Trash01-DI7qV1ow.js} +1 -1
  32. package/dist/client/assets/{Upload01-C4sYhZ0M.js → Upload01-Boqk1hvA.js} +1 -1
  33. package/dist/client/assets/{User01-Cvp121NC.js → User01-B3UbdHmL.js} +1 -1
  34. package/dist/client/assets/{Users01-DcrlsWI1.js → Users01-BUyczaeV.js} +1 -1
  35. package/dist/client/assets/{Users03-CJuVy8Iz.js → Users03-gvBLUtvG.js} +1 -1
  36. package/dist/client/assets/{X-DgKWdqZ1.js → X-B-cRV-7d.js} +1 -1
  37. package/dist/client/assets/{XCircle-DFBcUexW.js → XCircle-CkhBWURn.js} +1 -1
  38. package/dist/client/assets/{XClose-BKWXOZkj.js → XClose-Doj89HqF.js} +1 -1
  39. package/dist/client/assets/{Zap-Cxu6aoRs.js → Zap-BCqTHl-x.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-DOK7F1oe.js → ZapSquare-DdgE8vy-.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-ryBmf3S4.js → ZoomOut-BdBjpsIq.js} +1 -1
  42. package/dist/client/assets/{access-gate-DvuwS2Bs.js → access-gate-BXDE0rsJ.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-CEyStjwy.js → add-section-modal-7a6BUncs.js} +1 -1
  44. package/dist/client/assets/{agent-icon-pz8iT5cD.js → agent-icon-C6bJxQ04.js} +1 -1
  45. package/dist/client/assets/agents-list-sjsqj6Ot.js +1 -0
  46. package/dist/client/assets/ai-providers-6xIkfdtm.js +1 -0
  47. package/dist/client/assets/{alert-BwNlkWBE.js → alert-C81LnOX9.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-CkCCiKt9.js → alert-dialog-HmiP05XU.js} +1 -1
  49. package/dist/client/assets/app-editor-k7Nl_uKp.js +1 -0
  50. package/dist/client/assets/{auth-xlfJjVrK.js → auth-B9Q1UUsp.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-HTDRVC4_.js → auth-catchall-ClOrr_P8.js} +1 -1
  52. package/dist/client/assets/{auth-entry-BNYZmdvo.js → auth-entry-B7DIloAw.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-DuCP9Fwl.js → auth-split-layout-dWTaQKch.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-DPn6Vk96.js → authenticate-and-persist-oauth-xCkDryiA.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-CCZ8TAPg.js → automation-list-row-CLUMzxuG.js} +1 -1
  56. package/dist/client/assets/{automation-runs-DBQv8Uvp.js → automation-runs-DxPUfxy1.js} +1 -1
  57. package/dist/client/assets/automations-TTHh4EuE.js +1 -0
  58. package/dist/client/assets/{avatar-Bh53txVX.js → avatar-oAcdiJ9v.js} +1 -1
  59. package/dist/client/assets/{badge-CdirlPdy.js → badge-CpKEkIGn.js} +1 -1
  60. package/dist/client/assets/{block-document-D978uGtK.js → block-document-BVHsyU-9.js} +1 -1
  61. package/dist/client/assets/brand-context-CwjLKTtp.js +1 -0
  62. package/dist/client/assets/buckets-CM0nkgpJ.js +1 -0
  63. package/dist/client/assets/{capability-load-error-DgQyDsKl.js → capability-load-error-CG-hWPTN.js} +1 -1
  64. package/dist/client/assets/{card-D_tApM0k.js → card-BIwENur_.js} +1 -1
  65. package/dist/client/assets/category-editor-Bx9oTK3B.js +1 -0
  66. package/dist/client/assets/{chat-context-Dz9rhizY.js → chat-context-DN0_9Gee.js} +1 -1
  67. package/dist/client/assets/{checkbox-OtNKSART.js → checkbox-Bi39v4Qa.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-BsGnTz93.js → cli-auth-success-pdfiwdy1.js} +1 -1
  69. package/dist/client/assets/collection-detail-BcWtgoUr.js +1 -0
  70. package/dist/client/assets/{collection-display-button-BgYBCk8T.js → collection-display-button-Bzf7YHNy.js} +1 -1
  71. package/dist/client/assets/{collection-search-JfLpXbmD.js → collection-search-DbQr2iji.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-B5YA_dM5.js → collection-tabs-D77_So6e.js} +1 -1
  73. package/dist/client/assets/command-DyJgh8wP.js +1 -0
  74. package/dist/client/assets/commerce-onboarding-CJHzpHob.js +1 -0
  75. package/dist/client/assets/connect-desktop-dialog-ByWaevjw.js +1 -0
  76. package/dist/client/assets/{connection-card--7NnoNLM.js → connection-card-DehsL0Sf.js} +1 -1
  77. package/dist/client/assets/connection-detail-CCaFPgvC.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-BW7AB-E3.js → connection-form-helpers-CASdXQaW.js} +1 -1
  79. package/dist/client/assets/connections-DZYmLj7X.js +1 -0
  80. package/dist/client/assets/{context-menu-3RQyDKF5.js → context-menu-Bt-E5y3C.js} +1 -1
  81. package/dist/client/assets/{decopilot-CiHv6XGE.js → decopilot-BXlT8NLf.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-DXv2T192.js → decopilot-sse-pool-CKTJhrtc.js} +1 -1
  83. package/dist/client/assets/{dialog-BFjL_my-.js → dialog-BLvz2lK8.js} +1 -1
  84. package/dist/client/assets/{domain-settings-CuN5wwNc.js → domain-settings-ed9WclHg.js} +1 -1
  85. package/dist/client/assets/{drawer-DZMXZPMN.js → drawer-C4RJ4_GY.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-B1DaP6vk.js → dropdown-menu-CRyIPZil.js} +1 -1
  87. package/dist/client/assets/{empty-state-Lmcbk0Zv.js → empty-state-CmZpGujH.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-Bau_aQvM.js → extract-connection-data-iACc8UZO.js} +1 -1
  89. package/dist/client/assets/file-explorer-BveBp463.js +2 -0
  90. package/dist/client/assets/{file-type-icon-CWgZWEkL.js → file-type-icon-Db262N7w.js} +1 -1
  91. package/dist/client/assets/{files-C6shWZY2.js → files-BwDocccC.js} +1 -1
  92. package/dist/client/assets/{form-B6Nf7hvD.js → form-CPJbrMq5.js} +1 -1
  93. package/dist/client/assets/general-FW5Wth3b.js +1 -0
  94. package/dist/client/assets/{github-repo-picker-CThHTj5h.js → github-repo-picker-Db_ehY6e.js} +1 -1
  95. package/dist/client/assets/{hooks-CFfc1t5D.js → hooks-chgqRyLj.js} +1 -1
  96. package/dist/client/assets/{import-from-deco-dialog-DnC_H8Us.js → import-from-deco-dialog-Nrpq_g30.js} +1 -1
  97. package/dist/client/assets/{index-C2QgbLxn.js → index-1ECwD4fs.js} +12 -12
  98. package/dist/client/assets/{index-CjtDPqlj.js → index-4GXqE9fp.js} +2 -2
  99. package/dist/client/assets/{index-CurNB2HG.js → index-BkSIY6JJ.js} +3 -3
  100. package/dist/client/assets/index-D5RW_4sI.js +1 -0
  101. package/dist/client/assets/{index-BVXtRunj.js → index-D7a1JQHt.js} +2 -2
  102. package/dist/client/assets/{index-ovnDLwrg.js → index-DAWoaMpc.js} +1 -1
  103. package/dist/client/assets/{index-BDyN-RAN.js → index-DAmj773w.js} +1 -1
  104. package/dist/client/assets/{index-BK0DpA7w.js → index-DC36sAC_.js} +2 -2
  105. package/dist/client/assets/{index-ZANilAX7.js → index-DFNABgCe.js} +1 -1
  106. package/dist/client/assets/index-DoculpR5.js +1 -0
  107. package/dist/client/assets/{index-C0_iRWcE.js → index-K-17SMjl.js} +1 -1
  108. package/dist/client/assets/{index-C_XJPG8Z.js → index-QdluHxPe.js} +1 -1
  109. package/dist/client/assets/{index-qZ5-LmpP.js → index-RkQpccOp.js} +1 -1
  110. package/dist/client/assets/index-UgEhsCuR.js +1 -0
  111. package/dist/client/assets/{index-BzszuDGF.css → index-rS_HhTdz.css} +1 -1
  112. package/dist/client/assets/{index-redirect-Cc9Y9Kn-.js → index-redirect-DO0D1qdv.js} +1 -1
  113. package/dist/client/assets/{input-RRjvrcUF.js → input-jkT1z5r1.js} +1 -1
  114. package/dist/client/assets/{integration-icon-Dpj2NSXY.js → integration-icon-CZDEviNI.js} +1 -1
  115. package/dist/client/assets/{label-DrXdAtn0.js → label-CETsHBZ0.js} +1 -1
  116. package/dist/client/assets/{login-CdGM36BM.js → login-eY2xl_Qt.js} +1 -1
  117. package/dist/client/assets/{mcp-oauth-B5dnAc7V.js → mcp-oauth-BIBzZgcE.js} +1 -1
  118. package/dist/client/assets/{members-C-wG0rnC.js → members-BAHTTEXJ.js} +2 -2
  119. package/dist/client/assets/{monaco-editor-zMbhl8rq.js → monaco-editor-tVsx1Jkl.js} +1 -1
  120. package/dist/client/assets/{monitoring-stats-row-BnDnFbz0.js → monitoring-stats-row-CivwdnUP.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-Dkf89E49.js → oauth-callback-BnrL3BsC.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-ai-provider-BzTdkWaI.js → oauth-callback-ai-provider-D3_UsvKg.js} +1 -1
  123. package/dist/client/assets/{onboarding-CK9ke2oh.js → onboarding-Cde-ZfY9.js} +1 -1
  124. package/dist/client/assets/{org-install-CyaR-8_i.js → org-install-Cri2HTyv.js} +1 -1
  125. package/dist/client/assets/{org-layout-BDwAg4pd.js → org-layout-DH1oGgfN.js} +1 -1
  126. package/dist/client/assets/{organization-choice-BcGxKG4I.js → organization-choice-BZIXFBHd.js} +1 -1
  127. package/dist/client/assets/{page-seo-form-CvCtyrxH.js → page-seo-form-DCgyqE3q.js} +1 -1
  128. package/dist/client/assets/page-seo-sheet-o3dCAhA-.js +1 -0
  129. package/dist/client/assets/{popover-D7BamlkK.js → popover-1pFpRX6s.js} +1 -1
  130. package/dist/client/assets/post-editor-CWr-_gb_.js +1 -0
  131. package/dist/client/assets/{preview-dialog-C9Rx0Dtg.js → preview-dialog-DRmrGWbh.js} +1 -1
  132. package/dist/client/assets/{primitives-BmW50XTY.js → primitives-C06Pn9p4.js} +1 -1
  133. package/dist/client/assets/profile-62y90jm_.js +1 -0
  134. package/dist/client/assets/project-app-view-BeZFUwcQ.js +1 -0
  135. package/dist/client/assets/record-editor-BsdzrkRD.js +1 -0
  136. package/dist/client/assets/registry-DpNbpkzg.js +2 -0
  137. package/dist/client/assets/{registry-layout-D86NULga.js → registry-layout-Dww7dssY.js} +2 -2
  138. package/dist/client/assets/{require-capability-CBJ6cwe3.js → require-capability-BC8YsasG.js} +1 -1
  139. package/dist/client/assets/{required-auth-layout-Be__d9RH.js → required-auth-layout-DjRtF3m8.js} +1 -1
  140. package/dist/client/assets/{reset-password-CFeeThio.js → reset-password-DNWeSy4_.js} +1 -1
  141. package/dist/client/assets/roles-Cyz3Z1vr.js +1 -0
  142. package/dist/client/assets/{save-status-C9pT75mA.js → save-status-BsQDaUlP.js} +1 -1
  143. package/dist/client/assets/{scroll-area-CbWYdgRA.js → scroll-area-D51A_KQ5.js} +1 -1
  144. package/dist/client/assets/{search-input-CeqwXCv0.js → search-input-CEqRaXj6.js} +1 -1
  145. package/dist/client/assets/secrets-C6bKEzDN.js +1 -0
  146. package/dist/client/assets/{sections-editor-uxePiNCk.js → sections-editor-331tz7B6.js} +2 -2
  147. package/dist/client/assets/{select-BePf1IJF.js → select-Ct-_FhWe.js} +1 -1
  148. package/dist/client/assets/select-model-DJ7vH3M2.js +1 -0
  149. package/dist/client/assets/seo-editor-Ad8X__jc.js +1 -0
  150. package/dist/client/assets/settings-layout-CSyEHpma.js +1 -0
  151. package/dist/client/assets/{settings-section-ELYurXQx.js → settings-section-D6f1v8Lb.js} +1 -1
  152. package/dist/client/assets/{sheet-Djk8ol5s.js → sheet-CUfjkNRy.js} +1 -1
  153. package/dist/client/assets/{shell-controls-CqOBDieU.js → shell-controls-C6FYdYnB.js} +1 -1
  154. package/dist/client/assets/{shell-layout-BkVrkYmb.js → shell-layout-CR4YIb2n.js} +1 -1
  155. package/dist/client/assets/{shell-route-loading-gKBpXu2h.js → shell-route-loading-fK7OWXny.js} +1 -1
  156. package/dist/client/assets/sidebar-C45GjVmp.js +1 -0
  157. package/dist/client/assets/{skeleton-DrM35KBr.js → skeleton-h95MLET_.js} +1 -1
  158. package/dist/client/assets/{sortable.esm-BN6bAoSL.js → sortable.esm-CbeYFn14.js} +2 -2
  159. package/dist/client/assets/sso-DGooE6a8.js +1 -0
  160. package/dist/client/assets/store-O5BcQA2t.js +1 -0
  161. package/dist/client/assets/store-registry-BPQHh-y5.js +2 -0
  162. package/dist/client/assets/{studio-tools-BvQ8Bli1.js → studio-tools-BgUSKeCY.js} +1 -1
  163. package/dist/client/assets/{switch-dEe0am9a.js → switch-Cf_WUos9.js} +1 -1
  164. package/dist/client/assets/{table-D_zHkpnq.js → table-tHeeUiY0.js} +1 -1
  165. package/dist/client/assets/{tabs-DOJ7e6Z7.js → tabs-CNnqe_sK.js} +1 -1
  166. package/dist/client/assets/{task-status-DLHF9SZS.js → task-status-DzLkYYrk.js} +1 -1
  167. package/dist/client/assets/{textarea-C7j7_npp.js → textarea-BzYVaGJ0.js} +1 -1
  168. package/dist/client/assets/{toggle-group-CSO_yZKm.js → toggle-group-BE1kDwdz.js} +1 -1
  169. package/dist/client/assets/{toolbar-D9CfLhAB.js → toolbar-D5FkjLVB.js} +1 -1
  170. package/dist/client/assets/{tools-list-DC6csFT2.js → tools-list-BKN97Z6h.js} +1 -1
  171. package/dist/client/assets/tooltip-CAEDbADy.js +1 -0
  172. package/dist/client/assets/{types-CDn4NSje.js → types-Dw2dcWcn.js} +1 -1
  173. package/dist/client/assets/{use-ai-providers-D-XhQ6_q.js → use-ai-providers-BcLob6tS.js} +1 -1
  174. package/dist/client/assets/{use-automations-BllXXW29.js → use-automations-CfP4AmpB.js} +1 -1
  175. package/dist/client/assets/{use-capability-DfdnXTfH.js → use-capability-CbeJheXW.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-DmUrmEeM.js → use-clock-tick-DHvuEFIJ.js} +1 -1
  177. package/dist/client/assets/{use-collections-w44ZyJ1t.js → use-collections-yHRKnSEt.js} +1 -1
  178. package/dist/client/assets/{use-connection-Cvfufzsw.js → use-connection-BPcAXa47.js} +1 -1
  179. package/dist/client/assets/{use-copy-BWQBaWRC.js → use-copy-DOTEBoID.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-CGofqNOQ.js → use-create-virtual-mcp-C88JBuQM.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-CaTQp8tz.js → use-debounced-autosave-BnfFXRc0.js} +1 -1
  182. package/dist/client/assets/{use-delete-connection-CNA7qawq.js → use-delete-connection-D1yU7B0G.js} +1 -1
  183. package/dist/client/assets/{use-file-configs-Bg9S5WW4.js → use-file-configs-C8z3zSDD.js} +1 -1
  184. package/dist/client/assets/{use-infinite-scroll-BlkXRVRw.js → use-infinite-scroll-V4l3DQJD.js} +1 -1
  185. package/dist/client/assets/{use-join-requests-ByqDno7o.js → use-join-requests-Duz0LeuZ.js} +1 -1
  186. package/dist/client/assets/{use-mcp-client-BbOUwA1H.js → use-mcp-client-DYpZuPPA.js} +1 -1
  187. package/dist/client/assets/{use-mcp-prompts-Y5le4syR.js → use-mcp-prompts-BxOgLeZF.js} +1 -1
  188. package/dist/client/assets/{use-mcp-tools-xGr1pN0n.js → use-mcp-tools-xhV-ENX5.js} +1 -1
  189. package/dist/client/assets/{use-members-blURElyD.js → use-members-CJKZdynB.js} +1 -1
  190. package/dist/client/assets/use-mobile-CPyq18pe.js +1 -0
  191. package/dist/client/assets/{use-navigate-to-agent-CidcWwFC.js → use-navigate-to-agent-Bhu6dr_a.js} +1 -1
  192. package/dist/client/assets/{use-org-auth-client-oMz0ubhe.js → use-org-auth-client-Tiq6Yt9b.js} +1 -1
  193. package/dist/client/assets/{use-org-sso-CIoYIaj1.js → use-org-sso-DGBv3Hvc.js} +1 -1
  194. package/dist/client/assets/{use-organization-roles-tA96x-8d.js → use-organization-roles-1exN43Rd.js} +1 -1
  195. package/dist/client/assets/{use-organization-settings-B5L78CqV.js → use-organization-settings-DFnXSR7Z.js} +1 -1
  196. package/dist/client/assets/{use-registry-connections-3CHe_VwJ.js → use-registry-connections-Czx1u2H6.js} +1 -1
  197. package/dist/client/assets/{use-secrets-DlUSWVTu.js → use-secrets-DqgJI3yC.js} +1 -1
  198. package/dist/client/assets/{use-status-sounds-Bbu_XWuO.js → use-status-sounds-DRhhwMt0.js} +1 -1
  199. package/dist/client/assets/use-view-mode-BB9Jcv_5.js +1 -0
  200. package/dist/client/assets/{use-virtual-mcp-CLJ6qnG1.js → use-virtual-mcp-DnY7c9gE.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-DlRMWoIP.js +1 -0
  202. package/dist/client/assets/{useQueries-BqFctUi9.js → useQueries-D96G2W1b.js} +1 -1
  203. package/dist/client/assets/useSuspenseInfiniteQuery-BjlxN-DZ.js +1 -0
  204. package/dist/client/assets/variant-calendar-BlIkgRxn.js +1 -0
  205. package/dist/client/assets/{view-mode-toggle-CIiu6iGh.js → view-mode-toggle-ncGR_sPB.js} +1 -1
  206. package/dist/client/index.html +2 -2
  207. package/dist/server/cli.js +1 -1
  208. package/package.json +1 -1
  209. package/dist/client/assets/agents-list-C2TIIavL.js +0 -1
  210. package/dist/client/assets/ai-providers-bb2flxno.js +0 -1
  211. package/dist/client/assets/app-editor-mcTFLJlr.js +0 -1
  212. package/dist/client/assets/automations-D1p0mjNs.js +0 -1
  213. package/dist/client/assets/brand-context-Ds48Bazs.js +0 -1
  214. package/dist/client/assets/buckets-C6_Hhy5c.js +0 -1
  215. package/dist/client/assets/category-editor-DMZmSuPk.js +0 -1
  216. package/dist/client/assets/collection-detail-8pBdQXs6.js +0 -1
  217. package/dist/client/assets/command-iFNWkWs6.js +0 -1
  218. package/dist/client/assets/commerce-onboarding-CjPSY7Rg.js +0 -1
  219. package/dist/client/assets/connect-desktop-dialog-BxJ3X8re.js +0 -1
  220. package/dist/client/assets/connection-detail-Bak6_MXj.js +0 -1
  221. package/dist/client/assets/connections-MxbhAMWj.js +0 -1
  222. package/dist/client/assets/file-explorer-CdToudqs.js +0 -2
  223. package/dist/client/assets/general-BRjdlS0B.js +0 -1
  224. package/dist/client/assets/index-BtmyrH9L.js +0 -1
  225. package/dist/client/assets/index-DqUFDG_W.js +0 -1
  226. package/dist/client/assets/index-EwbYDv-_.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-lBchETUb.js +0 -1
  228. package/dist/client/assets/post-editor-CJXGoikN.js +0 -1
  229. package/dist/client/assets/profile-CzQbXboe.js +0 -1
  230. package/dist/client/assets/project-app-view-CMzykg6f.js +0 -1
  231. package/dist/client/assets/record-editor-B__3b7h2.js +0 -1
  232. package/dist/client/assets/registry-DpRLil7D.js +0 -2
  233. package/dist/client/assets/roles-P1-HY2OT.js +0 -1
  234. package/dist/client/assets/secrets-EVcWk0yc.js +0 -1
  235. package/dist/client/assets/select-model-CgXZFBIr.js +0 -1
  236. package/dist/client/assets/seo-editor-BpqPSu1k.js +0 -1
  237. package/dist/client/assets/settings-layout-ljEOwxAc.js +0 -1
  238. package/dist/client/assets/sidebar-DLCPSSnc.js +0 -1
  239. package/dist/client/assets/sso-By4pryNN.js +0 -1
  240. package/dist/client/assets/store-BSz8T3hr.js +0 -1
  241. package/dist/client/assets/store-registry-mttn5AI8.js +0 -2
  242. package/dist/client/assets/tooltip-CUlMaf5E.js +0 -1
  243. package/dist/client/assets/use-view-mode-Dff0V9fY.js +0 -1
  244. package/dist/client/assets/useInfiniteQuery-BAIT4yxs.js +0 -1
  245. package/dist/client/assets/useSuspenseInfiniteQuery-DpmGs3CS.js +0 -1
  246. package/dist/client/assets/variant-calendar-CUrfAk6h.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as S,r as U,j as t,k as Y,B as _,K as B,l as ee,w as Fe,m as Je,t as W,b as et,u as tt,E as Te,ad as Tt}from"./index-CurNB2HG.js";import{i as zt}from"./ChevronRight-DYe9AFXl.js";import{s as st}from"./Eye-B92Ff4dY.js";import{n as Pt,i as nt}from"./Globe01-MZlo2_34.js";import{b as lt,e as Ft,f as Ot,a as Et}from"./ZoomOut-ryBmf3S4.js";import{a as pe}from"./Palette-BDlA8RUr.js";import{s as At}from"./Plus-CQOl41pg.js";import{t as Mt}from"./Stars01-BJuGXG_N.js";import{i as xe}from"./Upload01-C4sYhZ0M.js";import{i as Oe}from"./Zap-Cxu6aoRs.js";import{u as it}from"./tooltip-CUlMaf5E.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-CkCCiKt9.js";import{c as Ee,d as Ae,a as Me,f as rt,D as Ht,b as Vt,e as Gt}from"./dialog-BFjL_my-.js";import{I as Ue}from"./input-RRjvrcUF.js";import{S as K}from"./skeleton-DrM35KBr.js";import{F as ie,d as at,M as ot}from"./file-type-icon-CWgZWEkL.js";import{a as Qt}from"./toolbar-D9CfLhAB.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-C9Rx0Dtg.js";import{a as ve}from"./DotsVertical-Z_h1bSB3.js";import{i as is}from"./Key01-CZVV-ceU.js";import{s as je}from"./Trash01-z6De146C.js";import{a as ye,c as te,b as we,D as ke}from"./dropdown-menu-B1DaP6vk.js";import{T as rs}from"./textarea-C7j7_npp.js";import{t as as}from"./ChevronDown-CkcGr2qp.js";import{n as os}from"./ChevronUp-CiXD4kQk.js";import{i as ge}from"./X-DgKWdqZ1.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-Cgw9JZYG.js";import"./LinkExternal01-DekFjc9P.js";import"./XClose-BKWXOZkj.js";import"./index-ZANilAX7.js";import"./LayoutLeft-CuTI_WR9.js";import"./popover-D7BamlkK.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)}
1
+ import{c as S,r as U,j as t,k as Y,B as _,K as B,l as ee,w as Fe,m as Je,t as W,b as et,u as tt,E as Te,ad as Tt}from"./index-BkSIY6JJ.js";import{i as zt}from"./ChevronRight-ChYOVgWd.js";import{s as st}from"./Eye-DWTUBTZ_.js";import{n as Pt,i as nt}from"./Globe01-BgRW2EiE.js";import{b as lt,e as Ft,f as Ot,a as Et}from"./ZoomOut-BdBjpsIq.js";import{a as pe}from"./Palette-Dy2dQgqx.js";import{s as At}from"./Plus-jFajoMCA.js";import{t as Mt}from"./Stars01-Daq_eW6a.js";import{i as xe}from"./Upload01-Boqk1hvA.js";import{i as Oe}from"./Zap-BCqTHl-x.js";import{u as it}from"./use-mobile-CPyq18pe.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-HmiP05XU.js";import{d as Ee,e as Ae,D as Me,f as rt,b as Ht,a as Vt,c as Gt}from"./dialog-BLvz2lK8.js";import{I as Ue}from"./input-jkT1z5r1.js";import{S as K}from"./skeleton-h95MLET_.js";import{F as ie,d as at,M as ot}from"./file-type-icon-Db262N7w.js";import{a as Qt}from"./toolbar-D5FkjLVB.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-DRmrGWbh.js";import{a as ve}from"./DotsVertical-C0YWb9xq.js";import{i as is}from"./Key01-DX7L8s0Z.js";import{s as je}from"./Trash01-DI7qV1ow.js";import{a as ye,c as te,b as we,D as ke}from"./dropdown-menu-CRyIPZil.js";import{T as rs}from"./textarea-BzYVaGJ0.js";import{t as as}from"./ChevronDown-BWfuTI7r.js";import{n as os}from"./ChevronUp-BhWz3ylT.js";import{i as ge}from"./X-B-cRV-7d.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-BNcg18cx.js";import"./tooltip-CAEDbADy.js";import"./LinkExternal01-Cf-6A1_h.js";import"./XClose-Doj89HqF.js";import"./index-DFNABgCe.js";import"./LayoutLeft-BqtFvEWV.js";import"./popover-1pFpRX6s.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
2
  ${e}: ${n};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
3
3
  `)?`
4
4
  `:"";return`${s}${r}:root {
@@ -166,4 +166,4 @@ import{c as S,r as U,j as t,k as Y,B as _,K as B,l as ee,w as Fe,m as Je,t as W,
166
166
  <p class="cta">slides-create --theme &hellip;</p>
167
167
  </section>`].join(`
168
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:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg: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 il(){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{il as default};
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:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg: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};