decocms 3.35.6 → 3.35.8
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.
- package/dist/client/assets/{AlertCircle-BdxdLfMZ.js → AlertCircle-BhiQLzAa.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D4WTYONo.js → ArrowUpRight-zWQi9yeG.js} +1 -1
- package/dist/client/assets/{Check-ByG0nAY6.js → Check-BE5llaCo.js} +1 -1
- package/dist/client/assets/{CheckCircle-C-upsPdg.js → CheckCircle-BZzInqah.js} +1 -1
- package/dist/client/assets/{ChevronDown-BnRC7SrH.js → ChevronDown-igtaXLHI.js} +1 -1
- package/dist/client/assets/{ChevronLeft-C70Azurf.js → ChevronLeft-D7ypV5AW.js} +1 -1
- package/dist/client/assets/{ChevronRight--j_9x5Si.js → ChevronRight-B2MPJG0Y.js} +1 -1
- package/dist/client/assets/{ChevronUp-BQorkh2i.js → ChevronUp-CEzo-UYH.js} +1 -1
- package/dist/client/assets/{Container-DxN5v3U8.js → Container-DxPsYKnX.js} +1 -1
- package/dist/client/assets/{DotsVertical-C3W2s3WW.js → DotsVertical-Bqz0rpkg.js} +1 -1
- package/dist/client/assets/{Eye-i6HoqOn_.js → Eye-DeAUvKsB.js} +1 -1
- package/dist/client/assets/{FilterLines-D6io39CJ.js → FilterLines-LorPzSpm.js} +1 -1
- package/dist/client/assets/{Globe01-BoP8H_NZ.js → Globe01-9a7DzMR4.js} +1 -1
- package/dist/client/assets/{HardDrive-DQcSGPZL.js → HardDrive-D6xAeAT3.js} +1 -1
- package/dist/client/assets/{Key01-BY8TiIH_.js → Key01-z4ZY9P3F.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dk1audj-.js → LayoutLeft-BlcyI03M.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cv2RkpjT.js → LinkExternal01-wGfNOyG-.js} +1 -1
- package/dist/client/assets/{Monitor01-CoO9QmCK.js → Monitor01-Bz9bsY6F.js} +1 -1
- package/dist/client/assets/{Palette-deno1eEN.js → Palette-cOZdFvCP.js} +1 -1
- package/dist/client/assets/{Play-pWfjHR9I.js → Play-DUFgIaEa.js} +1 -1
- package/dist/client/assets/{Plus-Ca-boKc-.js → Plus-C9BCwyU7.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-m0oFG4br.js → RefreshCcw01-DcRdM_Fc.js} +1 -1
- package/dist/client/assets/{SearchMd-BTjnXp3X.js → SearchMd-DL_JjGfK.js} +1 -1
- package/dist/client/assets/{Settings02-DQ3JZYho.js → Settings02-B67J_b-Z.js} +1 -1
- package/dist/client/assets/{Shield01-BqgQ6O-B.js → Shield01-12NhwCwh.js} +1 -1
- package/dist/client/assets/{Star01-BI7rxnuz.js → Star01-DVJ2VIkN.js} +1 -1
- package/dist/client/assets/{Stars01-CbPlZD94.js → Stars01-Csutpvum.js} +1 -1
- package/dist/client/assets/{Stars02-Ba384PUK.js → Stars02-EFTlH55e.js} +1 -1
- package/dist/client/assets/{Sun-BB5ryFYp.js → Sun-C4ItnLzg.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C2a9MjMN.js → SwitchHorizontal01-iSGzLP3G.js} +1 -1
- package/dist/client/assets/{Tool01-DiJPRujJ.js → Tool01-DnoUjwuW.js} +1 -1
- package/dist/client/assets/{Trash01-hWwpO1I_.js → Trash01-HFZG34bv.js} +1 -1
- package/dist/client/assets/{Upload01-tMokiVUz.js → Upload01-D0zblu1D.js} +1 -1
- package/dist/client/assets/{User01-qxhPSUm_.js → User01-GmyJVsk_.js} +1 -1
- package/dist/client/assets/{Users01-DgDkNrBR.js → Users01-D_irbv8j.js} +1 -1
- package/dist/client/assets/{Users03-dk6WdPnC.js → Users03-CsJCzoB9.js} +1 -1
- package/dist/client/assets/{X-BgQLDqpQ.js → X-Dz8XfAUE.js} +1 -1
- package/dist/client/assets/{XCircle-Dz_GlHY5.js → XCircle-THthyWG1.js} +1 -1
- package/dist/client/assets/{XClose-C4uc8l11.js → XClose-9eaBHjn_.js} +1 -1
- package/dist/client/assets/{Zap-BAnl3IBe.js → Zap-4WoTcb5S.js} +1 -1
- package/dist/client/assets/{ZapSquare-CSP4r4PP.js → ZapSquare-C-w_2LWP.js} +1 -1
- package/dist/client/assets/{ZoomOut-BANb87-i.js → ZoomOut-DC7naWv-.js} +1 -1
- package/dist/client/assets/{access-gate-D8GfJliw.js → access-gate-XBdT3iPT.js} +1 -1
- package/dist/client/assets/{accordion-CvUJVGp7.js → accordion-B2o3m3ys.js} +1 -1
- package/dist/client/assets/{add-section-modal-C8zkVp8O.js → add-section-modal-BOfJx4s8.js} +1 -1
- package/dist/client/assets/{agent-capabilities-C4o9Cucl.js → agent-capabilities-CX7B9V1k.js} +1 -1
- package/dist/client/assets/{agent-icon-BZpQDAZU.js → agent-icon-iCRxqonQ.js} +1 -1
- package/dist/client/assets/{agents-list-Cy5LjlS-.js → agents-list-Dddtvx5O.js} +1 -1
- package/dist/client/assets/{ai-providers-C40CpsyS.js → ai-providers-DOw3qbxO.js} +1 -1
- package/dist/client/assets/{alert-DOmmOyvz.js → alert-Cb2hF1jc.js} +1 -1
- package/dist/client/assets/{alert-dialog-RhxX9i57.js → alert-dialog-DQCfLTeL.js} +1 -1
- package/dist/client/assets/app-editor-CRIIKlDH.js +1 -0
- package/dist/client/assets/{auth-BnAEjx9j.js → auth-BR3kunRm.js} +1 -1
- package/dist/client/assets/{auth-catchall-DHkZ39dF.js → auth-catchall-BMkEHnr7.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B2Ec4bNy.js → auth-split-layout-CKdvz2MS.js} +1 -1
- package/dist/client/assets/{automation-list-row-CwvON8r0.js → automation-list-row-D0LrxtQM.js} +1 -1
- package/dist/client/assets/{automation-runs-BqzjGjNJ.js → automation-runs-sZhsYDdn.js} +1 -1
- package/dist/client/assets/{automations-D_H0Rurs.js → automations-Cjr8mJZr.js} +1 -1
- package/dist/client/assets/{avatar-B05K9npJ.js → avatar-I3WwYEoT.js} +1 -1
- package/dist/client/assets/{badge-DepW8zMP.js → badge-B0F_sgaz.js} +1 -1
- package/dist/client/assets/{brand-context-Ded1_fcJ.js → brand-context-AsrwXDeK.js} +1 -1
- package/dist/client/assets/{buckets-C_lb2aFH.js → buckets-D9xOFAgF.js} +1 -1
- package/dist/client/assets/{calendar-cx7Wk4XQ.js → calendar-5jwZC3XX.js} +1 -1
- package/dist/client/assets/{capability-load-error-CXftmPyi.js → capability-load-error-vjCbAJOq.js} +1 -1
- package/dist/client/assets/{card-Dzpiviva.js → card-BFRGLx6P.js} +1 -1
- package/dist/client/assets/{chat-context-XxWcMKnK.js → chat-context-DZNmbrat.js} +1 -1
- package/dist/client/assets/{checkbox-CiQiAC_1.js → checkbox-DInBbeSC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CEKtx_Vg.js → cli-auth-success-Cu93Pf3C.js} +1 -1
- package/dist/client/assets/{collection-detail-BQk4HFTt.js → collection-detail-BlvXfl8F.js} +1 -1
- package/dist/client/assets/{collection-display-button-D3ZkpQKX.js → collection-display-button-CcexmhB5.js} +1 -1
- package/dist/client/assets/{collection-search-DGxm46jw.js → collection-search-ykImYcNC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-NdiTX7ev.js → collection-table-wrapper-ubGqDv-6.js} +1 -1
- package/dist/client/assets/{collection-tabs-D8b9Fop0.js → collection-tabs-BlMNH4hh.js} +1 -1
- package/dist/client/assets/{collections-DQTIJ43Y.js → collections-C6Af1Q9d.js} +1 -1
- package/dist/client/assets/{command-Dw0cdU7u.js → command-CVb7Xyz-.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DaREkv_h.js → connect-desktop-dialog-BFdzqeA3.js} +1 -1
- package/dist/client/assets/{connection-card-BFSKgi5D.js → connection-card-Dpl0Au98.js} +1 -1
- package/dist/client/assets/{connection-detail-DBWKbL6I.js → connection-detail-GZegjuob.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CxYh53Ie.js → connection-form-helpers-CQ-0zB3Z.js} +1 -1
- package/dist/client/assets/{connections-BN1ltLel.js → connections-CLnO7l3E.js} +1 -1
- package/dist/client/assets/{decopilot-CauvA-RH.js → decopilot-IEJmKYNS.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-BTIZKXdE.js +1 -0
- package/dist/client/assets/{dialog-NbvuzXZV.js → dialog-BNTma1n7.js} +1 -1
- package/dist/client/assets/{domain-settings-9eHrDjOq.js → domain-settings-qDqN6DsU.js} +1 -1
- package/dist/client/assets/{drawer-5hzhUed3.js → drawer-BFu_Vykr.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DDfjivGs.js → dropdown-menu-BPajkRHT.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Dj2EKcNP.js → dynamic-plugin-layout-CxYTTzo3.js} +1 -1
- package/dist/client/assets/{empty-state-DgV0_vqZ.js → empty-state-DQQwJkAH.js} +1 -1
- package/dist/client/assets/{empty-state-DMm5rF2F.js → empty-state-pMCkbkbn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-EC8TuVkD.js → extract-connection-data-EpMFgcjc.js} +1 -1
- package/dist/client/assets/{features-sC0fOIy5.js → features-BZKr28L7.js} +1 -1
- package/dist/client/assets/{file-explorer-DQiHabun.js → file-explorer-BuBL2stT.js} +1 -1
- package/dist/client/assets/{file-type-icon-evaVS-14.js → file-type-icon-CjY-L87B.js} +1 -1
- package/dist/client/assets/{files-DwL8E8iE.js → files-CgSwSC5P.js} +1 -1
- package/dist/client/assets/{form-W67eg754.js → form-D08b7dFe.js} +1 -1
- package/dist/client/assets/{general-B8hG16F1.js → general-HwaMhz2i.js} +1 -1
- package/dist/client/assets/{generate-id-CtRf6mq5.js → generate-id-BPoX5AZG.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C38g29Tm.js → github-repo-picker-Bv5u83FS.js} +1 -1
- package/dist/client/assets/{header-tab-button-Dj8caQW7.js → header-tab-button-DWUYKjvd.js} +1 -1
- package/dist/client/assets/{hover-card-CaSThHdV.js → hover-card-CM7471N3.js} +1 -1
- package/dist/client/assets/{image-field-C_iu9B-F.js → image-field-DRWjALOn.js} +1 -1
- package/dist/client/assets/{index-BV8QivMR.js → index-BCN4LBSr.js} +4 -4
- package/dist/client/assets/{index-k0w22874.js → index-Bu0ZznB2.js} +1 -1
- package/dist/client/assets/{index-BZnUBmmZ.js → index-C2WXOm5m.js} +1 -1
- package/dist/client/assets/{index-BkuSFeLL.js → index-CRu4VNhf.js} +1 -1
- package/dist/client/assets/{index-Cdks9-wg.js → index-CYfMTPm6.js} +1 -1
- package/dist/client/assets/{index-CBGRBCyz.js → index-C_5MF2Y3.js} +1 -1
- package/dist/client/assets/{index-DcqdobGw.js → index-CxFf1mIw.js} +1 -1
- package/dist/client/assets/{index-C4vgVevj.js → index-D-XyK333.js} +1 -1
- package/dist/client/assets/{index-Uxmxa28N.js → index-DJxRbue6.js} +3 -3
- package/dist/client/assets/{index-qMRY8iiO.js → index-DcLhl-5Q.js} +1 -1
- package/dist/client/assets/{index-Dhab5IT3.js → index-SEyWzaM3.js} +1 -1
- package/dist/client/assets/{index-DxsS1HLy.js → index-UEt8s5KD.js} +1 -1
- package/dist/client/assets/{index-01Gl_fY8.js → index-UuGgKIpr.js} +1 -1
- package/dist/client/assets/{index-DfRR0hsi.js → index-dgPRflW5.js} +1 -1
- package/dist/client/assets/{index-B6xiIBRQ.js → index-qpz1aTWR.js} +1 -1
- package/dist/client/assets/{index-redirect-1lsM3-Qy.js → index-redirect-Bgc0AzrY.js} +1 -1
- package/dist/client/assets/{input-DV0lJPfu.js → input-DrBjEN1K.js} +1 -1
- package/dist/client/assets/{integration-icon-DOyf0ghu.js → integration-icon-CBmdz72e.js} +1 -1
- package/dist/client/assets/{label-DsPCNyuh.js → label-DPtACVyH.js} +1 -1
- package/dist/client/assets/{layout-UVx5jDOd.js → layout-ChSwM-QK.js} +1 -1
- package/dist/client/assets/{login-Bdct1Ii1.js → login-lrwL4f_O.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DPpOCiR5.js → mcp-oauth-COFe1Qcp.js} +1 -1
- package/dist/client/assets/{members-XFuvp9my.js → members-BaLik2bf.js} +1 -1
- package/dist/client/assets/{monaco-editor-CZjzwq84.js → monaco-editor-D9q3BMcP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-fqGAHQb8.js → monitoring-stats-row-DK9_KPle.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bi8QWPMB.js → oauth-callback-D8hDCZsz.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-YEsxF-8E.js → oauth-callback-ai-provider-ClG2kZkP.js} +1 -1
- package/dist/client/assets/{onboarding-DGKgKbZG.js → onboarding-D-nWMG3s.js} +1 -1
- package/dist/client/assets/{org-install-_XxJ_9mS.js → org-install-CSh2gL1g.js} +1 -1
- package/dist/client/assets/{org-layout-Bi6c2nSE.js → org-layout-BzdyjBgb.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Bu5yRNW-.js → org-plugin-layout-hz3PdzSx.js} +1 -1
- package/dist/client/assets/{page-seo-form-C2Ov8d3q.js → page-seo-form-o10VY06i.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DQlXJBao.js +1 -0
- package/dist/client/assets/{pair-QRwOdDMh.js → pair-B3JvusRD.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CeoKe0Wm.js → plugin-empty-state-qUc9EE_w.js} +1 -1
- package/dist/client/assets/{plugin-header-DZRx90au.js → plugin-header-Wee2-vBE.js} +1 -1
- package/dist/client/assets/{plugin-layout-Bao487f4.js → plugin-layout-DQH5MxMz.js} +1 -1
- package/dist/client/assets/{popover-Jfd2eq_a.js → popover-CxSOgrnQ.js} +1 -1
- package/dist/client/assets/{post-editor-V4KLdisO.js → post-editor-49rnCC5W.js} +1 -1
- package/dist/client/assets/{primitives-DP2nN7Dh.js → primitives-DIR4NDi7.js} +1 -1
- package/dist/client/assets/{profile-BCp6U0hU.js → profile-CnzeSYsG.js} +1 -1
- package/dist/client/assets/project-app-view-D4KDZyfT.js +1 -0
- package/dist/client/assets/record-editor-U1lNDcKg.js +1 -0
- package/dist/client/assets/registry-C-XSpMct.js +2 -0
- package/dist/client/assets/{registry-layout-DAbeFTO4.js → registry-layout-BbZF87a1.js} +1 -1
- package/dist/client/assets/{require-capability-5Ip6utE2.js → require-capability-CP41TlGl.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DwO_xi24.js → required-auth-layout-Bakgp2v2.js} +1 -1
- package/dist/client/assets/{reset-password-BuhZ5TrW.js → reset-password-ZxK_LvZM.js} +1 -1
- package/dist/client/assets/{resizable-BWgnQBO-.js → resizable-C-hPk_F_.js} +1 -1
- package/dist/client/assets/{roles-tdagbMJT.js → roles-D7m3YYSg.js} +1 -1
- package/dist/client/assets/save-referenced-block-DXNQX0iw.js +1 -0
- package/dist/client/assets/{save-status-4ua9-mbv.js → save-status-CLNRCBUu.js} +1 -1
- package/dist/client/assets/{schema-form-DaHWFhOC.js → schema-form-B2H-b_em.js} +1 -1
- package/dist/client/assets/{scroll-area-B2oPO2DK.js → scroll-area-KSI08Bdg.js} +1 -1
- package/dist/client/assets/{search-input-BZZZVgMK.js → search-input-LClJsC0R.js} +1 -1
- package/dist/client/assets/{secrets-ChCzyWyE.js → secrets-DakIQ3h4.js} +1 -1
- package/dist/client/assets/{sections-editor-CDpSixQy.js → sections-editor-BlwTeLMB.js} +1 -1
- package/dist/client/assets/{select-DV1FwAD4.js → select-BD3-KIUg.js} +1 -1
- package/dist/client/assets/{select-model-DSDBCN6l.js → select-model-Dbbl0Ax5.js} +1 -1
- package/dist/client/assets/{seo-editor-DRHmtRWo.js → seo-editor-CRarakJm.js} +1 -1
- package/dist/client/assets/{settings-layout-ZDFB-szy.js → settings-layout-C6Td3mdo.js} +1 -1
- package/dist/client/assets/{settings-section-BKgS_iJ4.js → settings-section-ooondd_C.js} +1 -1
- package/dist/client/assets/{sheet-6C3p1ZVN.js → sheet-BB5BvZRD.js} +1 -1
- package/dist/client/assets/{shell-controls-CqpbaRS4.js → shell-controls-BYqwKGk9.js} +1 -1
- package/dist/client/assets/{shell-layout-OG_nqUcJ.js → shell-layout-C11kPZct.js} +1 -1
- package/dist/client/assets/{shell-route-loading-sAXWvXuw.js → shell-route-loading-D23tu6UU.js} +1 -1
- package/dist/client/assets/{sidebar-BThc8k1X.js → sidebar-DQGireBE.js} +1 -1
- package/dist/client/assets/{skeleton-7xZf6qTy.js → skeleton-C_PdNCnO.js} +1 -1
- package/dist/client/assets/{sortable.esm-D9tZZic5.js → sortable.esm-DATKg__i.js} +1 -1
- package/dist/client/assets/{spinner-B4TZJa4Y.js → spinner-ph9V8K3G.js} +1 -1
- package/dist/client/assets/{sso-BDMNdqrW.js → sso-CVFsn2i8.js} +1 -1
- package/dist/client/assets/{store-DH5SX4uX.js → store-C6H7hDrQ.js} +1 -1
- package/dist/client/assets/store-registry-B9IEgjs2.js +2 -0
- package/dist/client/assets/{studio-tools-DUggrN6-.js → studio-tools-CyXwEskA.js} +1 -1
- package/dist/client/assets/{switch-BSvxJWjO.js → switch-BwW6aBRl.js} +1 -1
- package/dist/client/assets/{tab-id-C8mEsBYo.js → tab-id-DBFKLiy5.js} +1 -1
- package/dist/client/assets/{table-BzJvNvEf.js → table-DRZq5QeC.js} +1 -1
- package/dist/client/assets/{tabs-C6WaEkjB.js → tabs-DS796tVx.js} +1 -1
- package/dist/client/assets/{task-status-BbAuY8YH.js → task-status-Rw4KZiD7.js} +1 -1
- package/dist/client/assets/{textarea-CnNOCR0A.js → textarea-H9HcvvO3.js} +1 -1
- package/dist/client/assets/{toggle-group-DLEgMfd4.js → toggle-group-DEp8BrmP.js} +1 -1
- package/dist/client/assets/{toolbar-B_2b5mvX.js → toolbar-CGZIlwHR.js} +1 -1
- package/dist/client/assets/{tools-list-Dmw1yj09.js → tools-list-2oZSXDvR.js} +1 -1
- package/dist/client/assets/{tooltip-DIuu50IU.js → tooltip-BsiBfMRx.js} +1 -1
- package/dist/client/assets/{types-CKeTg986.js → types-BDYvGU56.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BRyts0Gz.js → use-ai-providers-CLGsHtDy.js} +1 -1
- package/dist/client/assets/{use-automations-BNu4-eYB.js → use-automations-BFkAWLBs.js} +1 -1
- package/dist/client/assets/{use-capability-CRoCvU0G.js → use-capability-BgmZSEFV.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DwZ4ZWpf.js → use-clock-tick-CaCQW7f3.js} +1 -1
- package/dist/client/assets/{use-collections-DfWTtTs9.js → use-collections-LXN6LFio.js} +1 -1
- package/dist/client/assets/{use-connection-DYCEDRZX.js → use-connection-DBT-O2Ot.js} +1 -1
- package/dist/client/assets/{use-copy-CJfFxS8w.js → use-copy-Be1923zu.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-mUufoSEk.js → use-create-virtual-mcp-CUFB7E50.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C3pwZJGN.js → use-debounced-autosave-Dl4w5-6p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dhw4ztJ-.js → use-delete-connection-BgQev1Df.js} +1 -1
- package/dist/client/assets/{use-file-configs-DjBhVOXm.js → use-file-configs-D8QyTqtG.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B_947odd.js → use-infinite-scroll-DmcTgb_Z.js} +1 -1
- package/dist/client/assets/{use-list-state-CP1Tc7ip.js → use-list-state-COdpgZQx.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BcxxumZr.js → use-mcp-client-DEVh0wrA.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Cy0GX04y.js → use-mcp-prompts-wVJtCACz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BIoKMuS8.js → use-mcp-tools-Do5DPz0G.js} +1 -1
- package/dist/client/assets/{use-members-CIJZJNZj.js → use-members-Dyv5s6Ln.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BlAYOqxb.js → use-navigate-to-agent-em-bmKWL.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D8P8BtbO.js → use-org-auth-client-RfCN5nxl.js} +1 -1
- package/dist/client/assets/{use-org-sso-1XMjAhdy.js → use-org-sso-Dn-IiDHF.js} +1 -1
- package/dist/client/assets/{use-organization-roles-gt8o0u0P.js → use-organization-roles-BsAcGhUy.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BehduVMv.js → use-organization-settings-BmyIHq31.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D2zEHIac.js → use-registry-connections-R7xxuxMJ.js} +1 -1
- package/dist/client/assets/{use-secrets-CdGKuher.js → use-secrets-a1pHbRuq.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B5sE5rmz.js → use-status-sounds-jx0BT_gy.js} +1 -1
- package/dist/client/assets/{use-view-mode-RJKP2uKb.js → use-view-mode-BORPaXws.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Baf8z8om.js → use-virtual-mcp-CsBEf_ak.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-e_b9pntx.js +1 -0
- package/dist/client/assets/{useRouterState-CajLqzv1.js → useRouterState-CpJi3eeH.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CAwDmp_D.js +1 -0
- package/dist/client/assets/{user-BkGqIjD6.js → user-CBCnDRYu.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DsfhMQhu.js → view-mode-toggle-CI6odJEz.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-B9jIyDHD.js → watch-sse-pool-LhxM1ddy.js} +1 -1
- package/dist/client/assets/{workflow-DcrLJw-M.js → workflow-BgPeOS0D.js} +1 -1
- package/dist/client/assets/workflow-detail-CWUm2dJS.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +554 -487
- package/dist/server/server.js +281 -281
- package/package.json +1 -1
- package/dist/client/assets/app-editor-B8xTj7FL.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-sjWpsyX0.js +0 -1
- package/dist/client/assets/page-seo-sheet-C6vH6UJp.js +0 -1
- package/dist/client/assets/project-app-view-ovTBsThp.js +0 -1
- package/dist/client/assets/record-editor-Chg9OiEH.js +0 -1
- package/dist/client/assets/registry-DKSgHOjT.js +0 -2
- package/dist/client/assets/save-referenced-block-CHATKao2.js +0 -1
- package/dist/client/assets/store-registry-DMx_57j5.js +0 -2
- package/dist/client/assets/useInfiniteQuery-2xSwq_xW.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CGWm3R_U.js +0 -1
- package/dist/client/assets/workflow-detail-juad0-Hx.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,F as ut,n as $,K as Te}from"./index-Uxmxa28N.js";import{F as mt,l as pt}from"./index-Cdks9-wg.js";import{_ as ht,as as xt,at as gt,au as ae,av as yt,H as $e}from"./agent-icon-BZpQDAZU.js";import{a as wt}from"./Tool01-DiJPRujJ.js";import{s as jt}from"./XClose-C4uc8l11.js";import{S as bt}from"./scroll-area-B2oPO2DK.js";import{b as Re,T as Oe,a as ze}from"./tooltip-DIuu50IU.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-RhxX9i57.js";import{a as Et}from"./chat-context-XxWcMKnK.js";import{u as Pt}from"./shell-layout-OG_nqUcJ.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-BV8QivMR.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-NbvuzXZV.js";import{I as We}from"./input-DV0lJPfu.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-sAXWvXuw.js";import{t as Vt}from"./ChevronDown-BnRC7SrH.js";import{i as Bt}from"./ChevronRight--j_9x5Si.js";import{i as Gt}from"./ZoomOut-BANb87-i.js";import{E as qt,q as Me,r as he,s as Qt,t as Ut,v as Ht,w as M,x as ce,g as xe,y as ge,z as Jt,A as Xt,B as ye,C as de,D as we,G as Yt,I as Zt}from"./header-tab-button-Dj8caQW7.js";import"./AlertCircle-BdxdLfMZ.js";import"./SwitchHorizontal01-C2a9MjMN.js";import"./RefreshCcw01-m0oFG4br.js";import"./XCircle-Dz_GlHY5.js";import"./ArrowUpRight-D4WTYONo.js";import"./ZapSquare-CSP4r4PP.js";import"./Users03-dk6WdPnC.js";import"./CheckCircle-C-upsPdg.js";import"./Check-ByG0nAY6.js";import"./ChevronLeft-C70Azurf.js";import"./ChevronUp-BQorkh2i.js";import"./DotsVertical-C3W2s3WW.js";import"./Container-DxN5v3U8.js";import"./Eye-i6HoqOn_.js";import"./Globe01-BoP8H_NZ.js";import"./FilterLines-D6io39CJ.js";import"./Star01-BI7rxnuz.js";import"./Palette-deno1eEN.js";import"./HardDrive-DQcSGPZL.js";import"./Stars02-Ba384PUK.js";import"./Key01-BY8TiIH_.js";import"./LayoutLeft-Dk1audj-.js";import"./LinkExternal01-Cv2RkpjT.js";import"./Monitor01-CoO9QmCK.js";import"./Sun-BB5ryFYp.js";import"./Play-pWfjHR9I.js";import"./Plus-Ca-boKc-.js";import"./SearchMd-BTjnXp3X.js";import"./Settings02-DQ3JZYho.js";import"./Shield01-BqgQ6O-B.js";import"./Stars01-CbPlZD94.js";import"./Trash01-hWwpO1I_.js";import"./Upload01-tMokiVUz.js";import"./User01-qxhPSUm_.js";import"./Users01-DgDkNrBR.js";import"./X-BgQLDqpQ.js";import"./Zap-BAnl3IBe.js";import"./select-DV1FwAD4.js";import"./tab-id-C8mEsBYo.js";import"./use-mcp-client-BcxxumZr.js";import"./auth-BnAEjx9j.js";import"./watch-sse-pool-B9jIyDHD.js";import"./decopilot-sse-pool-sjWpsyX0.js";import"./use-virtual-mcp-Baf8z8om.js";import"./use-collections-DfWTtTs9.js";import"./use-ai-providers-BRyts0Gz.js";import"./use-organization-settings-BehduVMv.js";import"./avatar-B05K9npJ.js";import"./required-auth-layout-DwO_xi24.js";import"./useRouterState-CajLqzv1.js";import"./use-org-sso-1XMjAhdy.js";import"./agent-capabilities-C4o9Cucl.js";import"./pair-QRwOdDMh.js";import"./use-clock-tick-DwZ4ZWpf.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CJfFxS8w.js";import"./file-type-icon-evaVS-14.js";import"./content-blocks-o63cs2vh.js";import"./types-CKeTg986.js";import"./studio-tools-DUggrN6-.js";import"./integration-icon-DOyf0ghu.js";import"./use-navigate-to-agent-BlAYOqxb.js";import"./use-connection-DYCEDRZX.js";import"./use-mcp-prompts-Cy0GX04y.js";import"./form-W67eg754.js";import"./label-DsPCNyuh.js";import"./spinner-B4TZJa4Y.js";import"./drawer-5hzhUed3.js";import"./collection-search-DGxm46jw.js";import"./tabs-C6WaEkjB.js";import"./toggle-group-DLEgMfd4.js";import"./sortable.esm-D9tZZic5.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BFSKgi5D.js";import"./use-registry-connections-D2zEHIac.js";import"./useInfiniteQuery-2xSwq_xW.js";import"./use-infinite-scroll-B_947odd.js";import"./extract-connection-data-EC8TuVkD.js";import"./generate-id-CtRf6mq5.js";import"./collections-DQTIJ43Y.js";import"./card-Dzpiviva.js";import"./collection-tabs-D8b9Fop0.js";import"./badge-DepW8zMP.js";import"./textarea-CnNOCR0A.js";import"./connection-form-helpers-CxYh53Ie.js";import"./useSuspenseInfiniteQuery-CGWm3R_U.js";import"./mcp-oauth-DPpOCiR5.js";import"./connect-desktop-dialog-DaREkv_h.js";import"./decopilot-CauvA-RH.js";import"./checkbox-CiQiAC_1.js";import"./skeleton-7xZf6qTy.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BKgS_iJ4.js";import"./popover-Jfd2eq_a.js";import"./command-Dw0cdU7u.js";import"./index-DcqdobGw.js";import"./index-01Gl_fY8.js";import"./dropdown-menu-DDfjivGs.js";import"./question-004-sINsf4GQ.js";import"./sidebar-BThc8k1X.js";import"./sheet-6C3p1ZVN.js";import"./use-status-sounds-B5sE5rmz.js";import"./empty-state-DMm5rF2F.js";import"./toolbar-B_2b5mvX.js";import"./resizable-BWgnQBO-.js";import"./use-mcp-tools-BIoKMuS8.js";import"./use-capability-CRoCvU0G.js";import"./user-BkGqIjD6.js";import"./tools-list-Dmw1yj09.js";import"./switch-BSvxJWjO.js";import"./use-debounced-autosave-C3pwZJGN.js";import"./index-B6xiIBRQ.js";import"./search-input-BZZZVgMK.js";import"./use-secrets-CdGKuher.js";import"./github-repo-picker-C38g29Tm.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CvUJVGp7.js";import"./view-mode-toggle-DsfhMQhu.js";import"./select-model-DSDBCN6l.js";import"./use-automations-BNu4-eYB.js";import"./monaco-editor-CZjzwq84.js";import"./automation-runs-BqzjGjNJ.js";import"./table-BzJvNvEf.js";import"./use-members-CIJZJNZj.js";import"./use-org-auth-client-D8P8BtbO.js";import"./task-status-BbAuY8YH.js";import"./automation-list-row-CwvON8r0.js";import"./use-create-virtual-mcp-mUufoSEk.js";import"./index-CBGRBCyz.js";import"./hover-card-CaSThHdV.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Ui({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
1
|
+
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,F as ut,n as $,K as Te}from"./index-DJxRbue6.js";import{F as mt,l as pt}from"./index-CYfMTPm6.js";import{_ as ht,as as xt,at as gt,au as ae,av as yt,H as $e}from"./agent-icon-iCRxqonQ.js";import{a as wt}from"./Tool01-DnoUjwuW.js";import{s as jt}from"./XClose-9eaBHjn_.js";import{S as bt}from"./scroll-area-KSI08Bdg.js";import{b as Re,T as Oe,a as ze}from"./tooltip-BsiBfMRx.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-DQCfLTeL.js";import{a as Et}from"./chat-context-DZNmbrat.js";import{u as Pt}from"./shell-layout-C11kPZct.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-BCN4LBSr.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-BNTma1n7.js";import{I as We}from"./input-DrBjEN1K.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-D23tu6UU.js";import{t as Vt}from"./ChevronDown-igtaXLHI.js";import{i as Bt}from"./ChevronRight-B2MPJG0Y.js";import{i as Gt}from"./ZoomOut-DC7naWv-.js";import{E as qt,q as Me,r as he,s as Qt,t as Ut,v as Ht,w as M,x as ce,g as xe,y as ge,z as Jt,A as Xt,B as ye,C as de,D as we,G as Yt,I as Zt}from"./header-tab-button-DWUYKjvd.js";import"./AlertCircle-BhiQLzAa.js";import"./SwitchHorizontal01-iSGzLP3G.js";import"./RefreshCcw01-DcRdM_Fc.js";import"./XCircle-THthyWG1.js";import"./ArrowUpRight-zWQi9yeG.js";import"./ZapSquare-C-w_2LWP.js";import"./Users03-CsJCzoB9.js";import"./CheckCircle-BZzInqah.js";import"./Check-BE5llaCo.js";import"./ChevronLeft-D7ypV5AW.js";import"./ChevronUp-CEzo-UYH.js";import"./DotsVertical-Bqz0rpkg.js";import"./Container-DxPsYKnX.js";import"./Eye-DeAUvKsB.js";import"./Globe01-9a7DzMR4.js";import"./FilterLines-LorPzSpm.js";import"./Star01-DVJ2VIkN.js";import"./Palette-cOZdFvCP.js";import"./HardDrive-D6xAeAT3.js";import"./Stars02-EFTlH55e.js";import"./Key01-z4ZY9P3F.js";import"./LayoutLeft-BlcyI03M.js";import"./LinkExternal01-wGfNOyG-.js";import"./Monitor01-Bz9bsY6F.js";import"./Sun-C4ItnLzg.js";import"./Play-DUFgIaEa.js";import"./Plus-C9BCwyU7.js";import"./SearchMd-DL_JjGfK.js";import"./Settings02-B67J_b-Z.js";import"./Shield01-12NhwCwh.js";import"./Stars01-Csutpvum.js";import"./Trash01-HFZG34bv.js";import"./Upload01-D0zblu1D.js";import"./User01-GmyJVsk_.js";import"./Users01-D_irbv8j.js";import"./X-Dz8XfAUE.js";import"./Zap-4WoTcb5S.js";import"./select-BD3-KIUg.js";import"./tab-id-DBFKLiy5.js";import"./use-mcp-client-DEVh0wrA.js";import"./auth-BR3kunRm.js";import"./watch-sse-pool-LhxM1ddy.js";import"./decopilot-sse-pool-BTIZKXdE.js";import"./use-virtual-mcp-CsBEf_ak.js";import"./use-collections-LXN6LFio.js";import"./use-ai-providers-CLGsHtDy.js";import"./use-organization-settings-BmyIHq31.js";import"./avatar-I3WwYEoT.js";import"./required-auth-layout-Bakgp2v2.js";import"./useRouterState-CpJi3eeH.js";import"./use-org-sso-Dn-IiDHF.js";import"./agent-capabilities-CX7B9V1k.js";import"./pair-B3JvusRD.js";import"./use-clock-tick-CaCQW7f3.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Be1923zu.js";import"./file-type-icon-CjY-L87B.js";import"./content-blocks-o63cs2vh.js";import"./types-BDYvGU56.js";import"./studio-tools-CyXwEskA.js";import"./integration-icon-CBmdz72e.js";import"./use-navigate-to-agent-em-bmKWL.js";import"./use-connection-DBT-O2Ot.js";import"./use-mcp-prompts-wVJtCACz.js";import"./form-D08b7dFe.js";import"./label-DPtACVyH.js";import"./spinner-ph9V8K3G.js";import"./drawer-BFu_Vykr.js";import"./collection-search-ykImYcNC.js";import"./tabs-DS796tVx.js";import"./toggle-group-DEp8BrmP.js";import"./sortable.esm-DATKg__i.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dpl0Au98.js";import"./use-registry-connections-R7xxuxMJ.js";import"./useInfiniteQuery-e_b9pntx.js";import"./use-infinite-scroll-DmcTgb_Z.js";import"./extract-connection-data-EpMFgcjc.js";import"./generate-id-BPoX5AZG.js";import"./collections-C6Af1Q9d.js";import"./card-BFRGLx6P.js";import"./collection-tabs-BlMNH4hh.js";import"./badge-B0F_sgaz.js";import"./textarea-H9HcvvO3.js";import"./connection-form-helpers-CQ-0zB3Z.js";import"./useSuspenseInfiniteQuery-CAwDmp_D.js";import"./mcp-oauth-COFe1Qcp.js";import"./connect-desktop-dialog-BFdzqeA3.js";import"./decopilot-IEJmKYNS.js";import"./checkbox-DInBbeSC.js";import"./skeleton-C_PdNCnO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-ooondd_C.js";import"./popover-CxSOgrnQ.js";import"./command-CVb7Xyz-.js";import"./index-CxFf1mIw.js";import"./index-UuGgKIpr.js";import"./dropdown-menu-BPajkRHT.js";import"./question-004-sINsf4GQ.js";import"./sidebar-DQGireBE.js";import"./sheet-BB5BvZRD.js";import"./use-status-sounds-jx0BT_gy.js";import"./empty-state-pMCkbkbn.js";import"./toolbar-CGZIlwHR.js";import"./resizable-C-hPk_F_.js";import"./use-mcp-tools-Do5DPz0G.js";import"./use-capability-BgmZSEFV.js";import"./user-CBCnDRYu.js";import"./tools-list-2oZSXDvR.js";import"./switch-BwW6aBRl.js";import"./use-debounced-autosave-Dl4w5-6p.js";import"./index-qpz1aTWR.js";import"./search-input-LClJsC0R.js";import"./use-secrets-a1pHbRuq.js";import"./github-repo-picker-Bv5u83FS.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B2o3m3ys.js";import"./view-mode-toggle-CI6odJEz.js";import"./select-model-Dbbl0Ax5.js";import"./use-automations-BFkAWLBs.js";import"./monaco-editor-D9q3BMcP.js";import"./automation-runs-sZhsYDdn.js";import"./table-DRZq5QeC.js";import"./use-members-Dyv5s6Ln.js";import"./use-org-auth-client-RfCN5nxl.js";import"./task-status-Rw4KZiD7.js";import"./automation-list-row-D0LrxtQM.js";import"./use-create-virtual-mcp-CUFB7E50.js";import"./index-C_5MF2Y3.js";import"./hover-card-CM7471N3.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Ui({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
2
2
|
`)}]}),g(null)}return G&&!L?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[i.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[i.jsxs("div",{className:"relative min-w-0 flex-1",children:[i.jsx(ht,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:F,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:i.jsx(xt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New file"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:i.jsx(gt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New folder"})]})]}),i.jsx(bt,{className:"flex-1",children:i.jsxs("div",{className:"py-1",children:[Pe.map(t=>{const{node:n,depth:r}=t,s=n.kind==="directory",a=P.has(n.path),d=R?.path===n.path,Y=Ht(n.path,n.kind),oe=s&&S.has(n.path);return i.jsx(nn,{node:n,depth:r,isExpanded:a,isSelected:d,isLoading:oe,fileVisual:on(n.name),onSelect:()=>I(n),onOpen:()=>{s?ot(n.path,a):me(n.path)},onNewFile:()=>H({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>H({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>be("Path",ce(n.path)),onCopyRelativePath:()=>be("Relative path",M(n.path)),onRename:()=>H({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ue(n)},n.path)}),L&&Pe.length===0&&i.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),i.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[B.length>0&&i.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:B.map(t=>{const n=C.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,s=o===t,a=t.split("/").pop()??t;return i.jsxs("div",{className:Ve("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",s?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{p(t),ke(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":s,children:[i.jsx("span",{className:"truncate max-w-32",children:a}),r&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),i.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:d=>{d.stopPropagation(),it(t)},children:i.jsx(jt,{size:12})})]},t)})}),m&&i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:i.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&ft(r.value)},children:[i.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&g(null)}}),i.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[i.jsx("title",{children:"Send"}),i.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),i.jsx("div",{className:"flex-1 overflow-hidden",children:o&&Z?.loaded?i.jsx(mt,{language:xe(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:o,onChange:t=>{const n=o;n&&u(r=>{const s=new Map(r),a=s.get(n);return a&&s.set(n,{...a,editorValue:t??""}),s})},onMount:dt,loading:i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!Z?.loaded?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),o&&i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[i.jsx("span",{className:"truncate",children:o}),i.jsxs("span",{children:[ct?"Modified":"Saved"," ·"," ",xe(o)]})]})]}),i.jsx(en,{open:w!==null,mode:w?.mode??"new-file",initialName:w?.mode==="rename"?w.node.name:"",parentLabel:w&&w.mode!=="rename"?w.parentDir==="/"?"/":M(w.parentDir):void 0,isPending:ee,onSubmit:Ye,onOpenChange:t=>{!t&&!ee&&H(null)}}),i.jsx(vt,{open:J!==null,onOpenChange:t=>{!t&&!ee&&ue(null)},children:i.jsxs(Ct,{children:[i.jsxs(Nt,{children:[i.jsxs(St,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),i.jsxs(Dt,{children:["This will permanently delete"," ",i.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",pe.length>0&&i.jsxs(i.Fragment,{children:[" ",pe.length===1?"One open file has unsaved changes that will be lost.":`${pe.length} open files have unsaved changes that will be lost.`]})]})]}),i.jsxs(kt,{children:[i.jsx(Ft,{disabled:ee,children:"Cancel"}),i.jsx(Lt,{disabled:ee||!J,onClick:t=>{t.preventDefault(),J&&Xe(J)},children:"Delete"})]})]})})]})}export{Ui as FileExplorer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bz as zl,j as $,b2 as st,bA as zn,r as ut,bB as p0,c as f0,e as Tt,B as Hb}from"./index-
|
|
1
|
+
import{bz as zl,j as $,b2 as st,bA as zn,r as ut,bB as p0,c as f0,e as Tt,B as Hb}from"./index-DJxRbue6.js";import{i as qb}from"./Check-BE5llaCo.js";import{a as Gb}from"./Eye-DeAUvKsB.js";import{D as g0,g as m0,h as h0,c as b0}from"./dialog-BNTma1n7.js";import{n as E0}from"./Globe01-9a7DzMR4.js";import{g as T0,n as S0}from"./ZoomOut-DC7naWv-.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function $b(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},y0=/^(?:[ \t]*(?:\n|$))+/,A0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,I0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,zb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jb=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),k0=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,N0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),C0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,v0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),w0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vb).getRegex(),Xl={blockquote:w0,code:A0,def:N0,fences:_0,heading:I0,hr:_n,html:v0,lheading:jb,list:C0,newline:y0,paragraph:Vb,table:ln,text:R0},Dc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),x0={...Xl,lheading:k0,table:Dc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},O0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",jb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},L0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yb=/^( {2,}|\\)\n(?!\s*$)/,M0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Wb=/[^\s\p{P}\p{S}]/u,P0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Kb=/(?!~)[\p{P}\p{S}]/u,F0=/(?!~)[\s\p{P}\p{S}]/u,B0=/(?:[^\s\p{P}\p{S}]|~)/u,U0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,H0=le(Xb,"u").replace(/punct/g,tr).getRegex(),q0=le(Xb,"u").replace(/punct/g,Kb).getRegex(),Zb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G0=le(Zb,"gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),$0=le(Zb,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,F0).replace(/punct/g,Kb).getRegex(),z0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),j0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),V0=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y0=le(Kl).replace("(?:-->|$)","-->").getRegex(),W0=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K0=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qb=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),Jb=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),X0=le("reflink|nolink(?!\\()","g").replace("reflink",Qb).replace("nolink",Jb).getRegex(),Ql={_backpedal:ln,anyPunctuation:j0,autolink:V0,blockSkip:U0,br:Yb,code:D0,del:ln,emStrongLDelim:H0,emStrongRDelimAst:G0,emStrongRDelimUnd:z0,escape:L0,link:K0,nolink:Jb,punctuation:P0,reflink:Qb,reflinkSearch:X0,tag:W0,text:M0,url:ln},Z0={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:$0,emStrongLDelim:q0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Q0={..._l,br:le(Yb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:x0,pedantic:O0},Jt={normal:Ql,gfm:_l,breaks:Q0,pedantic:Z0},J0={"&":"&","<":"<",">":">",'"':""","'":"'"},Mc=e=>J0[e];function Ze(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Mc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Mc);return e}function Pc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Fc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function eS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Bc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function tS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
|
|
3
3
|
`).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,g as o,j as i,N as l}from"./index-
|
|
1
|
+
import{e as a,g as o,j as i,N as l}from"./index-DJxRbue6.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cA as $,e as f,j as c,C as j,r as d,c as p,bk as b,cB as v,cC as h}from"./index-
|
|
1
|
+
import{cA as $,e as f,j as c,C as j,r as d,c as p,bk as b,cB as v,cC as h}from"./index-DJxRbue6.js";import{L as N}from"./label-DPtACVyH.js";const E=$,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext(C),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},C=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx(C.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as M,p as $,F as U,G as Q,H,a as q,t as k,n as w,K as L,j as n,C as I,P as Y,R as P,e as F,r as T,B as Z,L as B,a1 as J}from"./index-
|
|
1
|
+
import{f as M,p as $,F as U,G as Q,H,a as q,t as k,n as w,K as L,j as n,C as I,P as Y,R as P,e as F,r as T,B as Z,L as B,a1 as J}from"./index-DJxRbue6.js";import{P as N}from"./index-qpz1aTWR.js";import{u as W}from"./use-org-auth-client-RfCN5nxl.js";import{u as X}from"./use-debounced-autosave-Dl4w5-6p.js";import{A as ee}from"./avatar-I3WwYEoT.js";import{I as V}from"./input-DrBjEN1K.js";import{S as G,a as K,b as A,c as te}from"./settings-section-ooondd_C.js";import{D as ne}from"./domain-settings-qDqN6DsU.js";import{u as ae}from"./studio-tools-CyXwEskA.js";import{c as se,b as oe,d as ie,f as re,e as le,g as ce,a as ue,A as de}from"./alert-dialog-DQCfLTeL.js";import{R as me}from"./require-capability-CP41TlGl.js";import"./sidebar-DQGireBE.js";import"./LayoutLeft-BlcyI03M.js";import"./tooltip-BsiBfMRx.js";import"./sheet-BB5BvZRD.js";import"./X-Dz8XfAUE.js";import"./User01-GmyJVsk_.js";import"./card-BFRGLx6P.js";import"./ArrowUpRight-zWQi9yeG.js";import"./switch-BwW6aBRl.js";import"./use-capability-BgmZSEFV.js";import"./access-gate-XBdT3iPT.js";import"./capability-load-error-vjCbAJOq.js";const ge=Y({name:P().min(1,"Name is required").max(255,"Name is too long"),slug:P().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:P().optional()});function fe(e){const t=F.c(13),{value:v,onChange:h,name:o,disabled:d}=e,m=T.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>m.current?.click(),t[0]=l):l=t[0];const r=l;let c;t[1]!==h?(c=x=>{const j=x.target.files?.[0];if(!j)return;if(j.size>2097152){w.error("Image must be smaller than 2MB");return}const u=new FileReader;u.onerror=pe,u.onloadend=()=>{u.result&&h(u.result),m.current&&(m.current.value="")},u.readAsDataURL(j)},t[1]=h,t[2]=c):c=t[2];const a=c;let s;t[3]!==d||t[4]!==a?(s=n.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:d}),t[3]=d,t[4]=a,t[5]=s):s=t[5];const i=v||void 0,p=o??"?";let g;t[6]!==i||t[7]!==p?(g=n.jsx(ee,{url:i,fallback:p,shape:"square",size:"base"}),t[6]=i,t[7]=p,t[8]=g):g=t[8];let f;return t[9]!==d||t[10]!==s||t[11]!==g?(f=n.jsxs("button",{type:"button",onClick:r,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[s,g]}),t[9]=d,t[10]=s,t[11]=g,t[12]=f):f=t[12],f}function pe(){return w.error("Failed to read image")}function he(){const e=M(),{org:t}=$(),v=W(),h=U(),o=Q({resolver:H(ge),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),d=q({mutationFn:async a=>{const s={name:a.name,slug:a.slug};a.logo&&(s.logo=a.logo);const i=await v.organization.update({data:s});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,s)=>{k("organization_settings_updated",{organization_id:t.id,fields:Object.keys(s)}),h.invalidateQueries({queryKey:L.organizations()}),h.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,s)=>{k("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(s),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:m,flush:l}=X({save:async()=>{const a=o.control._formState.dirtyFields;if(Object.keys(a).length===0||!await o.trigger())return;const i=o.getValues(),p=o.control._defaultValues;o.reset(i,{keepValues:!0});try{await d.mutateAsync(i)}catch{o.reset(p,{keepValues:!0})}}}),r=o.formState.errors,c=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(G,{children:n.jsxs(K,{children:[n.jsx(A,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(fe,{value:o.watch("logo"),onChange:a=>{o.setValue("logo",a??"",{shouldDirty:!0}),l()},name:o.watch("name")})}),n.jsx(A,{title:"Name",action:n.jsx(I,{control:o.control,name:"name",render:({field:a})=>n.jsx(V,{id:"org-name",...a,onChange:s=>{a.onChange(s),m()},onBlur:()=>{a.onBlur(),l()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(A,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[c&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:c}),n.jsx(I,{control:o.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:s=>{const i=s.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{a.onBlur(),l()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function xe(){const e=F.c(42),{org:t}=$(),[v,h]=T.useState(!1),[o,d]=T.useState(""),m=ae();let l;e[0]!==t.id||e[1]!==m?(l=async()=>{await m.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=m,e[2]=l):l=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{k("organization_deleted",{organization_id:t.id}),localStorage.getItem(B.lastOrgSlug())===t.slug&&localStorage.removeItem(B.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let c;e[6]!==l||e[7]!==r?(c={mutationFn:l,onSuccess:r,onError:je},e[6]=l,e[7]=r,e[8]=c):c=e[8];const a=q(c);let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=()=>h(!0),e[9]=s):s=e[9];let i;e[10]!==a.isPending?(i=n.jsx(G,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(K,{className:"border-destructive/40",children:n.jsx(A,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Z,{variant:"destructive",size:"sm",onClick:s,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=O=>{h(O),O||d("")},e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(se,{children:"Delete Organization?"}),e[13]=g):g=e[13];let f;e[14]!==t.name?(f=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=f):f=e[15];let x;e[16]!==t.name?(x=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=O=>d(O.target.value),e[18]=j):j=e[18];let u;e[19]!==o||e[20]!==t.name?(u=n.jsx(V,{value:o,onChange:j,placeholder:t.name,autoFocus:!0}),e[19]=o,e[20]=t.name,e[21]=u):u=e[21];let y;e[22]!==u||e[23]!==f||e[24]!==x?(y=n.jsxs(oe,{children:[g,n.jsx(ie,{asChild:!0,children:n.jsxs("div",{children:[f,x,u]})})]}),e[22]=u,e[23]=f,e[24]=x,e[25]=y):y=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(re,{children:"Cancel"}),e[26]=D):D=e[26];let b;e[27]!==a?(b=()=>a.mutate(),e[27]=a,e[28]=b):b=e[28];const E=o!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==b||e[30]!==E||e[31]!==R?(S=n.jsxs(le,{children:[D,n.jsx(ce,{onClick:b,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=b,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ue,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==v||e[37]!==z?(C=n.jsx(de,{open:v,onOpenChange:p,children:z}),e[36]=v,e[37]=z,e[38]=C):C=e[38];let _;return e[39]!==C||e[40]!==i?(_=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=_):_=e[41],_}function je(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function ve(){const e=F.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(N.Content,{children:n.jsx(N.Body,{children:n.jsxs(te,{children:[n.jsx(N.Title,{children:"Organization"}),n.jsx(he,{}),n.jsx(ne,{}),n.jsx(xe,{})]})})})}),e[0]=t):t=e[0],t}function Ge(){const e=F.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(me,{capability:"org:manage",area:"general settings",children:n.jsx(ve,{})}),e[0]=t):t=e[0],t}export{Ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o}from"./collections-
|
|
1
|
+
import{B as o}from"./collections-C6Af1Q9d.js";import{co as r}from"./index-DJxRbue6.js";const m=r(o,{target:"draft-7"});let n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",l=(t=21)=>{let e="",a=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=n[a[t]&63];return e};function s(t){return`${t}_${l()}`}export{m as B,s as g};
|
package/dist/client/assets/{github-repo-picker-C38g29Tm.js → github-repo-picker-Bv5u83FS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as $,j as t,p as J,b as he,F as ae,r as G,M as ie,m as xe,K as U,a as be,t as oe,n as D,B as se,c as V,l as Y,q as ke,D as Re}from"./index-
|
|
1
|
+
import{e as $,j as t,p as J,b as he,F as ae,r as G,M as ie,m as xe,K as U,a as be,t as oe,n as D,B as se,c as V,l as Y,q as ke,D as Re}from"./index-DJxRbue6.js";import{b as Ae}from"./use-virtual-mcp-CsBEf_ak.js";import{l as le}from"./use-navigate-to-agent-em-bmKWL.js";import{b as Oe,u as ye}from"./use-connection-DBT-O2Ot.js";import{W as Le,u as H,a as ce}from"./use-mcp-client-DEVh0wrA.js";import{D as we,a as Ce,b as Ie,c as Ne,d as Ge}from"./dialog-BNTma1n7.js";import{i as ue}from"./RefreshCcw01-DcRdM_Fc.js";import{C as je}from"./collection-search-ykImYcNC.js";import{C as pe}from"./checkbox-DInBbeSC.js";import{n as Pe}from"./agent-icon-iCRxqonQ.js";import{i as $e,a as He}from"./mcp-oauth-COFe1Qcp.js";import{u as Me}from"./use-mcp-tools-Do5DPz0G.js";import{e as De}from"./extract-connection-data-EpMFgcjc.js";const Ue=`<svg width="74" height="84" viewBox="0 0 74 84" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M63.4462 15.3005C63.1414 15.2764 57.2333 15.1845 57.2333 15.1845C57.2333 15.1845 52.2906 10.3849 51.8019 9.89426C51.6127 9.71981 51.3729 9.60981 51.1172 9.58008V83.0253L73.2664 77.5175C73.2664 77.5175 64.2277 16.3953 64.1696 15.9772C64.1417 15.7997 64.055 15.6366 63.9235 15.5139C63.7919 15.3913 63.6255 15.3162 63.4462 15.3005Z" fill="#171717"/>
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.748 0.00356357C34.8334 -0.0568526 36.5759 0.651298 37.9307 2.10122C38.0276 2.20613 38.1209 2.31463 38.2109 2.42544L38.2354 2.42349C38.4434 2.40657 38.6494 2.38638 38.8574 2.38638H38.8672C41.9831 2.3913 44.5571 4.16796 46.3184 7.527C46.8023 8.4621 47.2004 9.43976 47.5068 10.4469L49.9883 9.67837C50.3609 9.56961 51.315 9.42163 51.8037 9.90981L51.9922 82.3883L51.1162 83.0387L0 74.1979C0.0195597 74.0466 6.09952 27.0238 6.3291 25.3629C6.63636 23.1661 6.70922 23.0933 9.03906 22.361L16.957 19.9079C17.4531 16.377 19.1884 11.8165 21.4746 8.18423C24.7237 3.02487 28.7273 0.119714 32.748 0.00356357ZM38.8408 26.7077C38.8133 26.694 36.5926 25.6009 32.2842 25.8747C21.032 26.5853 15.9341 34.4515 16.4229 42.2213C17.0059 51.4485 26.2283 51.1199 26.584 56.734C26.6686 58.0922 25.8271 60.0114 23.4658 60.1588C19.8562 60.3883 15.3438 56.9831 15.3438 56.9831L13.6191 64.3249C13.6191 64.3249 18.1021 69.1296 26.2432 68.6149C33.027 68.1895 37.7351 62.759 37.2344 54.8249C36.5981 44.7397 25.2729 43.7966 25.002 39.4948C24.9512 38.7038 25.0055 35.556 29.9932 35.2418C33.3786 35.0279 36.2354 36.3195 36.2666 36.3336L38.8408 26.7077ZM32.8262 2.6813C26.6181 2.86014 21.2028 12.5587 19.8213 19.0211L26.8311 16.8512C27.6101 12.7476 29.5648 8.48928 32.1221 5.74868C33.0162 4.76667 34.0719 3.94401 35.2432 3.31704H35.2451C34.5654 2.87005 33.7695 2.66203 32.8262 2.6813ZM36.9775 5.46548C35.7921 5.95366 34.7952 6.80972 34.0791 7.57583C32.1608 9.63716 30.5951 12.7807 29.7725 15.9391L38.3057 13.2956C38.3322 11.0721 38.0904 7.7854 36.9775 5.46548ZM39.7568 5.14907C40.7052 7.59721 40.9505 10.4321 40.9795 12.4694L44.9473 11.2389C44.3133 9.17981 42.8075 5.72907 39.7568 5.14907Z" fill="#393939"/>
|
|
4
4
|
</svg>`,Fe=`data:image/svg+xml,${encodeURIComponent(Ue)}`,jt={title:"New Website",description:"Website cloned from a public template",url:"https://github.com/decocms/webapp-template",owner:"decocms",name:"webapp-template"},St={title:"Shopify Headless Store",description:"Shopify Headless Store cloned from a public template",url:"https://github.com/Shopify/hydrogen-demo-store",owner:"Shopify",name:"hydrogen-demo-store",icon:Fe};function vt(){const o=$.c(6),e=Ae(),n=le();let s;o[0]!==e.create||o[1]!==n?(s=async r=>{const f=await e.create.mutateAsync({title:r.title,description:r.description,icon:r.icon??null,status:"active",pinned:!1,connections:[],metadata:{githubRepo:{url:r.url,owner:r.owner,name:r.name},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}});return f.id&&n(f.id),f},o[0]=e.create,o[1]=n,o[2]=s):s=o[2];const l=s;let i;return o[3]!==e.create.isPending||o[4]!==l?(i={createFromTemplate:l,isCreating:e.create.isPending},o[3]=e.create.isPending,o[4]=l,o[5]=i):i=o[5],i}function F(o){const e=$.c(4),{size:n,className:s}=o;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let i;return e[1]!==s||e[2]!==n?(i=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:s,children:l}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function ze(o,e){const n=$.c(12),{org:s}=J();let l;n[0]!==s.id?(l=Le.REGISTRY(s.id),n[0]=s.id,n[1]=l):l=n[1];const i=l;let r;n[2]!==s.id||n[3]!==s.slug||n[4]!==i?(r={connectionId:i,orgId:s.id,orgSlug:s.slug},n[2]=s.id,n[3]=s.slug,n[4]=i,n[5]=r):r=n[5];const f=H(r);let b;n[6]!==o?(b={name:o},n[6]=o,n[7]=b):b=n[7];const a=e?.enabled??!0;let C;return n[8]!==f||n[9]!==b||n[10]!==a?(C={client:f,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:b,enabled:a,staleTime:3e5,select:qe},n[8]=f,n[9]=b,n[10]=a,n[11]=C):C=n[11],Me(C)}function qe(o){return o.structuredContent?.item??null}const Be="deco/mcp-github";function Se(o){const{org:e}=J(),{data:n}=he.useSession(),s=Oe(),l=ae(),[i,r]=G.useState("idle"),[f,b]=G.useState(null),[a,C]=G.useState(null),{data:h,isLoading:m}=ze(Be,{enabled:o.enabled}),x=G.useRef(!1);o.enabled&&h&&!m&&!x.current&&n?.user?.id&&i==="idle"&&(x.current=!0,N());async function N(){if(!(!h||!n?.user?.id||!e))try{r("installing"),b(null);const p=De(h,e.id,n.user.id,{remoteIndex:0});if(!p.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:w}=await s.create.mutateAsync(p);r("authenticating");const j=new URL(`/api/${e.slug}/mcp/${w}`,window.location.origin),d=await $e({url:j.href,token:null,orgId:e.id});if(d.supportsOAuth&&!d.isAuthenticated){const{token:S,tokenInfo:c,error:v}=await He({connectionId:w,orgSlug:e.slug,scope:"offline_access"});if(v||!S){try{await s.delete.mutateAsync(w)}catch{}throw new Error(v??"No token received from GitHub")}if(c)try{(await fetch(`/api/${e.slug}/connections/${w}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:c.accessToken,refreshToken:c.refreshToken,expiresIn:c.expiresIn,scope:c.scope,clientId:c.clientId,clientSecret:c.clientSecret,tokenEndpoint:c.tokenEndpoint})})).ok||await s.update.mutateAsync({id:w,data:{connection_token:S}})}catch{await s.update.mutateAsync({id:w,data:{connection_token:S}})}}ie(l,e.id),C(p),r("ready")}catch(p){b(p instanceof Error?p.message:String(p)),r("error")}}function y(){r("idle"),b(null),C(null),x.current=!1}return o.enabled&&m&&i==="idle"?{status:"installing",error:null,connection:null,retry:y}:{status:i,error:f,connection:a,retry:y}}const Ve="deco-sites";function Ke(o){if(!o||typeof o!="object")return null;const e=o.github;if(!e||typeof e!="object")return null;const n=e.owner,s=e.repo;return typeof n!="string"||typeof s!="string"||n.length===0||s.length===0?null:{owner:n,repo:s}}function Qe(o,e){const n=e?Ke(e):null,s=n?.owner??Ve,l=n?.repo??o;return{owner:s,name:l,url:`https://github.com/${s}/${l}`}}const K={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Je(o){if(!o||typeof o!="object"||Array.isArray(o))return K;const e=o;return Object.values(e).some(n=>typeof n!="string")?K:e}function Ye(o){if(!(typeof o!="number"||!Number.isFinite(o)||!Number.isInteger(o)||o<=0))return o}function We(o){const e=o.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=Ye(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Je(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function ve(o){return(o??[]).filter(e=>We(e)===null)}async function Ee(o,e){const s=(await o({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:e}})).content?.[0]?.text;if(!s)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(s)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function Ze(o,e){const n=e.toLowerCase();return o.find(s=>s.login.toLowerCase()===n)}const ge="GitHub MCP did not return refreshable repo grant metadata";function q(o){if(typeof o!="string")return null;const e=o.trim();return e.length>0?e:null}function Xe(o){try{const e=new URL(o);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function et(o){return typeof o=="number"&&Number.isFinite(o)&&Number.isInteger(o)&&o>0?o:void 0}async function Te(o){const{orgSlug:e,sourceConnection:n,installationId:s,owner:l,repo:i,githubCallTool:r,selfCallTool:f}=o,b=await r({name:"MINT_REPO_TOKEN",arguments:{installationId:s,owner:l,repo:i,permissions:K}}),a=b.structuredContent;if(b.isError||!a?.token){const A=b.content?.find(T=>T.type==="text")?.text;throw new Error(A?`Failed to mint a repo-scoped GitHub token: ${A}`:"Failed to mint a repo-scoped GitHub token")}const C=q(a.refreshToken),h=q(a.tokenEndpoint),m=q(a.clientId);if(!C||!h||!m)throw new Error(ge);if(!Xe(h))throw new Error(ge);const x=q(a.repository?.owner),N=q(a.repository?.name),y="GitHub MCP returned refresh metadata for a different repository";if(a.repository?.owner!==void 0&&(!x||x.toLowerCase()!==l.toLowerCase()))throw new Error(y);if(a.repository?.name!==void 0&&(!N||N.toLowerCase()!==i.toLowerCase()))throw new Error(y);const p=et(a.repository?.id),I=a.expiresAt?Date.parse(a.expiresAt):NaN,w=Number.isFinite(I)?Math.max(0,Math.floor((I-Date.now())/1e3)):null,d=(typeof a.expiresIn=="number"&&Number.isFinite(a.expiresIn)&&Number.isInteger(a.expiresIn)&&a.expiresIn>0?a.expiresIn:null)??w,S=await f({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${i}`,description:`Repo-scoped GitHub access for ${l}/${i}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{repoScope:{installationId:s,repositoryId:p,owner:l,repo:i,permissions:K,grantProvider:"github-mcp"}}}}}),c=S.structuredContent??S,v=c.item?.id??c.id;if(!v)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:a.token,refreshToken:C,expiresIn:d,scope:a.scope??null,clientId:m,tokenEndpoint:h})})).ok)throw await f({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:v}}function tt(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function nt(o){const e=await fetch(`/api/${o}/deco-sites`);if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to load sites (${e.status})`)}return e.json()}function Et({open:o,onOpenChange:e,onBack:n}){const{org:s}=J(),l=le(),i=ae(),{data:r}=he.useSession(),[f,b]=G.useState(null),[a,C]=G.useState(null),[h,m]=G.useState(""),x=H({connectionId:ce,orgId:s.id,orgSlug:s.slug}),N=ye({slug:"mcp-github"}),y=ve(N),p=Se({enabled:o&&y.length===0}),I=y.length===1?y[0]??null:a,w=y.length>1&&!I,j=H({connectionId:I?.id??"",orgId:s.id,orgSlug:s.slug}),d=o&&y.length===0&&(p.status==="installing"||p.status==="authenticating"||p.status==="idle"),{data:S,isLoading:c,error:v}=xe({queryKey:U.decoSites(r?.user?.email),queryFn:()=>nt(s.slug),enabled:o&&!!r?.user?.email,staleTime:6e4,retry:!1}),O=S?.sites??[],A=u=>{u||(b(null),C(null),m("")),e(u)},T=O.filter(u=>u.name.toLowerCase().includes(h.toLowerCase())||(u.domains?.[0]?.domain?.toLowerCase().includes(h.toLowerCase())??!1)),g=!f||T.some(u=>u.name===f),k=be({mutationFn:async u=>{if(!I)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");oe("deco_site_import_started",{site_name:u});const{installations:R,appSlug:_}=await Ee(P=>x.callTool(P),I.id),L=O.find(P=>P.name===u);if(!L)throw new Error("Selected site is no longer available");const E=Qe(u,L.metadata),z=Ze(R,E.owner);if(!z){const P=_?`https://github.com/apps/${_}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${E.owner}" organization to import this site. ${P}`)}let W=null,Z=null,X=null;const _e=async()=>{X&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:X}}).catch(()=>{}),Z&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Z,force:!0}}).catch(()=>{}),W&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:W,force:!0}}).catch(()=>{})};try{const P=await fetch(`/api/${s.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:u})}),ee=await P.json().catch(()=>({}));if(!P.ok)throw new Error(ee.error??`Failed to create connection (${P.status})`);const M=ee.connId;if(!M)throw new Error("Server did not return a connection ID");W=M;const{childConnectionId:te}=await Te({orgSlug:s.slug,sourceConnection:I,installationId:z.installationId,owner:E.owner,repo:E.name,githubCallTool:ne=>j.callTool(ne),selfCallTool:ne=>x.callTool(ne)});Z=te;const de=ee.icon??null,me=tt(u),fe=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:u,description:"Imported from deco.cx",pinned:!1,icon:de??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],githubRepo:{owner:E.owner,name:E.name,url:E.url,installationId:z.installationId,connectionId:te},ui:{banner:null,bannerColor:"#22C55E",icon:de,themeColor:"#22C55E",slug:me,pinnedViews:[{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:M},{connection_id:te}]}}}),B=fe.structuredContent??fe;if(!B.item?.id)throw new Error("Failed to create the imported agent");return X=B.item.id,{slug:me,virtualMcpId:B.item.id,connId:M,item:B.item}}catch(P){throw await _e(),P}},onSuccess:({slug:u,virtualMcpId:R,item:_})=>{oe("deco_site_import_succeeded",{site_name:_.title,virtual_mcp_id:R,slug:u}),i.setQueryData(U.collectionItem(x,s.id,"","VIRTUAL_MCP",R),{item:_}),i.invalidateQueries({predicate:L=>{const E=L.queryKey;return E[1]===s.id&&E[3]==="collection"&&E[4]==="VIRTUAL_MCP"}}),i.invalidateQueries({queryKey:U.projects(s.id)}),D.success(`Imported ${u} from deco.cx`),A(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(R)},onError:u=>{oe("deco_site_import_failed",{error:u instanceof Error?u.message:"Unknown error"}),D.error("Import failed: "+(u instanceof Error?u.message:"Unknown error"))}});return t.jsx(we,{open:o,onOpenChange:A,children:t.jsxs(Ce,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:"Import from deco.cx"})}),t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[n&&t.jsx("button",{type:"button",onClick:n,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(ue,{size:18})}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),t.jsx("div",{children:t.jsx(je,{value:h,onChange:m,placeholder:"Search sites...",onKeyDown:u=>{u.key==="Escape"&&m("")}})}),t.jsxs("div",{className:"pb-0 min-h-[300px]",children:[p.status==="error"&&t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[t.jsx("p",{className:"text-sm text-destructive",children:p.error??"Failed to connect GitHub"}),t.jsx(se,{variant:"outline",size:"sm",onClick:p.retry,children:"Retry GitHub setup"})]}),d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),w&&!d&&p.status!=="error"&&t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-8 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),y.map(u=>t.jsxs("button",{type:"button",onClick:()=>C(u),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[u.icon?t.jsx("img",{src:u.icon,alt:u.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:u.title})]},u.id))]}),c&&!d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!c&&!d&&!w&&p.status!=="error"&&!v&&O.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!c&&!d&&!w&&p.status!=="error"&&O.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[T.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),T.map(u=>{const R=u.domains?.find(L=>L.production)?.domain??u.domains?.[0]?.domain,_=f===u.name;return t.jsxs("button",{type:"button",onClick:()=>b(u.name),className:V("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",_?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:u.thumb_url?t.jsx("img",{src:u.thumb_url,alt:u.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:u.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},u.name)})]})]}),t.jsxs(Ge,{className:"px-8 py-5 border-t border-border",children:[t.jsx(se,{variant:"outline",onClick:()=>A(!1),disabled:k.isPending,children:"Cancel"}),t.jsx(se,{disabled:!f||!g||k.isPending||c||d||w||!I||p.status==="error",onClick:()=>f&&k.mutate(f),children:k.isPending?"Importing...":"Import"})]})]})})}function ot(o,e){const n=$.c(4),[s,l]=G.useState(o);let i,r;return n[0]!==e||n[1]!==o?(i=()=>{const f=setTimeout(()=>l(o),e);return()=>clearTimeout(f)},r=[o,e],n[0]=e,n[1]=o,n[2]=i,n[3]=r):(i=n[2],r=n[3]),G.useEffect(i,r),s}const Q=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A new GitHub issue has been opened in ${o}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A pull request was opened in ${o}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:o,name:e})=>`A pull request was closed in ${o}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function st(o,e){const n=new Set;if(o.paramsSchema)for(const l of Object.keys(o.paramsSchema))n.add(l);if(Array.isArray(o.params))for(const l of o.params)n.add(l.name);else if(o.params&&typeof o.params=="object")for(const l of Object.keys(o.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const s={};return n.has("owner")&&(s.owner=e.owner),n.has("name")&&(s.name=e.name),n.has("repository")&&(s.repository=`${e.owner}/${e.name}`),s}async function rt({githubCallTool:o,selfCallTool:e,virtualMcpId:n,repo:s,connectionId:l,selectedKeys:i}){const r=await o({name:"TRIGGER_LIST",arguments:{}}),f=r.structuredContent??r,b=new Map((f.triggers??[]).map(m=>[m.type,m])),a=Q.filter(m=>i.has(m.key)),C=await Promise.allSettled(a.map(async m=>{const x=b.get(m.triggerType);if(!x)throw new Error(`Trigger ${m.triggerType} not exposed`);const N=await e({name:"AUTOMATION_CREATE",arguments:{name:`${s.name}: ${m.nameSuffix}`,virtual_mcp_id:n,messages:m.instructions(s),active:!0}}),y=(N.structuredContent??N).id;if(!y)throw new Error(`AUTOMATION_CREATE returned no id for ${m.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:y,type:"event",connection_id:l,event_type:m.triggerType,params:st(x,s)}})})),h=C.filter(m=>m.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",C.filter(m=>m.status==="rejected")),{total:C.length,failed:h}}function Tt(o){const e=$.c(22),{open:n,onOpenChange:s,title:l,hideAutoRespondCheckbox:i,onImportComplete:r}=o,f=l===void 0?"Import from GitHub":l,b=i===void 0?!1:i,[a,C]=G.useState(null);let h;e[0]!==f?(h=t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:f})}),e[0]=f,e[1]=h):h=e[1];let m;e[2]!==a||e[3]!==f?(m=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(ue,{size:16})}),t.jsx("img",{src:a.avatarUrl,alt:a.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:a.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(F,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:f})]})}),e[2]=a,e[3]=f,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=x):x=e[5];let N;e[6]!==s?(N=()=>s(!1),e[6]=s,e[7]=N):N=e[7];let y;e[8]!==b||e[9]!==r||e[10]!==n||e[11]!==a||e[12]!==N?(y=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(G.Suspense,{fallback:x,children:t.jsx(it,{open:n,onComplete:N,selectedInstallation:a,onSelectInstallation:C,hideAutoRespondCheckbox:b,onImportComplete:r})})}),e[8]=b,e[9]=r,e[10]=n,e[11]=a,e[12]=N,e[13]=y):y=e[13];let p;e[14]!==h||e[15]!==m||e[16]!==y?(p=t.jsxs(Ce,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[h,m,y]}),e[14]=h,e[15]=m,e[16]=y,e[17]=p):p=e[17];let I;return e[18]!==s||e[19]!==n||e[20]!==p?(I=t.jsx(we,{open:n,onOpenChange:s,children:p}),e[18]=s,e[19]=n,e[20]=p,e[21]=I):I=e[21],I}function it({open:o,onComplete:e,selectedInstallation:n,onSelectInstallation:s,hideAutoRespondCheckbox:l,onImportComplete:i}){const{org:r}=J(),f=ae(),b=le(),[a,C]=G.useState(null),[h,m]=G.useState(!0),[x,N]=G.useState(()=>new Set(Q.filter(g=>g.defaultEnabled).map(g=>g.key))),y=Q.filter(g=>g.defaultEnabled).map(g=>g.key),p=l?new Set(y):h?x:new Set,I=ye({slug:"mcp-github"}),w=ve(I),j=Se({enabled:o&&w.length===0}),d=w.length===1?w[0]??null:a,S=H({connectionId:d?.id??"",orgId:r.id,orgSlug:r.slug}),c=H({connectionId:ce,orgId:r.id,orgSlug:r.slug}),v=async(g,k)=>{try{const R=await S.callTool({name:"get_file_contents",arguments:{owner:g.owner,repo:g.name,path:k}});if(R.isError)return null;const L=R.content?.find(E=>E.type==="resource")?.resource?.text;if(!L)return null;try{const E=JSON.parse(L);return typeof E=="string"?E:JSON.stringify(E)}catch{return L}}catch{return null}},O=(g,k)=>{Promise.all([v(k,"AGENTS.md"),v(k,"CLAUDE.md")]).then(async([u,R])=>{const _=u??R??null;_&&(await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:g,data:{metadata:{instructions:_}}}}),ie(f,r.id))}).catch(u=>{console.error("GitHub instructions fetch failed:",u)})},A=async({virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R})=>{const{total:_,failed:L}=await rt({githubCallTool:E=>S.callTool(E),selfCallTool:E=>c.callTool(E),virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R});L>0&&D.warning(`Set up ${_-L}/${_} GitHub automations. Add the rest from the automations view.`)},T=be({mutationFn:async g=>{if(!d||!n)throw new Error("No GitHub connection or installation");const k=n.installationId,{childConnectionId:u}=await Te({orgSlug:r.slug,sourceConnection:d,installationId:k,owner:g.owner,repo:g.name,githubCallTool:_=>S.callTool(_),selfCallTool:_=>c.callTool(_)});let R=null;try{const _=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:g.name,description:g.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:g.owner,name:g.name,url:g.url,installationId:k,connectionId:u},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:u}]}}}),L=_.structuredContent??_,E=L.item?.id;if(!L.item||!E)throw new Error("Failed to create the imported agent");return R=E,p.size>0&&await A({virtualMcpId:E,repo:g,connectionId:u,selectedKeys:p}).catch(z=>{console.error("Failed to set up GitHub automations:",z),D.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:E,repo:g,connectionId:u,item:L.item}}catch(_){throw R&&await c.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:R}}).catch(()=>{}),await c.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:u,force:!0}}).catch(()=>{}),_}},onSuccess:({virtualMcpId:g,repo:k,connectionId:u,item:R})=>{if(f.setQueryData(U.collectionItem(c,r.id,"","VIRTUAL_MCP",g),{item:R}),ie(f,r.id),O(g,k),i){i({virtualMcpId:g,repo:k,connectionId:u});return}D.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(g)},onError:g=>{D.error("Failed to import repo: "+(g instanceof Error?g.message:"Unknown error"))}});return j.status==="installing"||j.status==="authenticating"?t.jsx(re,{status:j.status,error:null,retry:j.retry}):j.status==="error"?t.jsx(re,{status:"error",error:j.error,retry:j.retry}):w.length===0&&j.status==="idle"?t.jsx(re,{status:"installing",error:null,retry:j.retry}):w.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),w.map(g=>t.jsxs("button",{type:"button",onClick:()=>C(g),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[g.icon?t.jsx("img",{src:g.icon,alt:g.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:g.title})]},g.id))]}):d?n?t.jsx(lt,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:g=>T.mutate(g),isSaving:T.isPending,autoRespondEnabled:h,onAutoRespondChange:m,selectedAutomationKeys:x,onAutomationKeysChange:N,hideAutoRespondCheckbox:l}):t.jsx(at,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,onSelect:s,showBackButton:w.length>1,onBack:()=>C(null)}):null}function at(o){const e=$.c(31),{connectionId:n,orgId:s,orgSlug:l,onSelect:i,showBackButton:r,onBack:f}=o;let b;e[0]!==s||e[1]!==l?(b={connectionId:ce,orgId:s,orgSlug:l},e[0]=s,e[1]=l,e[2]=b):b=e[2];const a=H(b);let C;e[3]!==n||e[4]!==s?(C=U.githubUserOrgs(s,n),e[3]=n,e[4]=s,e[5]=C):C=e[5];let h;e[6]!==n||e[7]!==a?(h=()=>Ee(c=>a.callTool(c),n),e[6]=n,e[7]=a,e[8]=h):h=e[8];let m;e[9]!==C||e[10]!==h?(m={queryKey:C,queryFn:h},e[9]=C,e[10]=h,e[11]=m):m=e[11];const x=xe(m);if(x.isLoading){let c;return e[12]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=c):c=e[12],c}if(x.isError){let c;return e[13]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=c):c=e[13],c}const N=x.data;if(!N)return null;let y;e[14]!==f||e[15]!==r?(y=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:f,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),"Change connection"]})}),e[14]=f,e[15]=r,e[16]=y):y=e[16];let p;if(e[17]!==N.installations||e[18]!==i){let c;e[20]!==i?(c=v=>t.jsxs("button",{type:"button",onClick:()=>i(v),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:v.login}),v.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},v.installationId),e[20]=i,e[21]=c):c=e[21],p=N.installations.map(c),e[17]=N.installations,e[18]=i,e[19]=p}else p=e[19];let I;e[22]!==p?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[22]=p,e[23]=I):I=e[23];const w=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=j):j=e[24];let d;e[25]!==w?(d=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",j]})}),e[25]=w,e[26]=d):d=e[26];let S;return e[27]!==d||e[28]!==y||e[29]!==I?(S=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,d]}),e[27]=d,e[28]=y,e[29]=I,e[30]=S):S=e[30],S}function lt(o){const e=$.c(27),{connectionId:n,orgId:s,orgSlug:l,installation:i,onSelectRepo:r,isSaving:f,autoRespondEnabled:b,onAutoRespondChange:a,selectedAutomationKeys:C,onAutomationKeysChange:h,hideAutoRespondCheckbox:m}=o,[x,N]=G.useState(""),y=ot(x,300),p=G.useDeferredValue(y),I=x!==p;let w;e[0]!==I||e[1]!==x?(w=t.jsx(je,{placeholder:"Search repositories...",value:x,onChange:N,isSearching:I}),e[0]=I,e[1]=x,e[2]=w):w=e[2];const j=I?"opacity-40":"opacity-100";let d;e[3]!==j?(d=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",j),e[3]=j,e[4]=d):d=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=S):S=e[5];let c;e[6]!==n||e[7]!==p||e[8]!==i||e[9]!==f||e[10]!==r||e[11]!==s||e[12]!==l?(c=t.jsx(G.Suspense,{fallback:S,children:t.jsx(ct,{connectionId:n,orgId:s,orgSlug:l,installation:i,query:p,onSelectRepo:r,isSaving:f})}),e[6]=n,e[7]=p,e[8]=i,e[9]=f,e[10]=r,e[11]=s,e[12]=l,e[13]=c):c=e[13];let v;e[14]!==d||e[15]!==c?(v=t.jsx("div",{className:d,children:c}),e[14]=d,e[15]=c,e[16]=v):v=e[16];let O;e[17]!==b||e[18]!==m||e[19]!==a||e[20]!==h||e[21]!==C?(O=!m&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(pe,{checked:b,onCheckedChange:T=>a(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),b&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:Q.map(T=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(pe,{checked:C.has(T.key),onCheckedChange:g=>{const k=new Set(C);g===!0?k.add(T.key):k.delete(T.key),h(k)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:T.label})]},T.key))})]}),e[17]=b,e[18]=m,e[19]=a,e[20]=h,e[21]=C,e[22]=O):O=e[22];let A;return e[23]!==w||e[24]!==v||e[25]!==O?(A=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[w,v,O]}),e[23]=w,e[24]=v,e[25]=O,e[26]=A):A=e[26],A}function ct(o){const e=$.c(29),{connectionId:n,orgId:s,orgSlug:l,installation:i,query:r,onSelectRepo:f,isSaving:b}=o;let a;e[0]!==n||e[1]!==s||e[2]!==l?(a={connectionId:n,orgId:s,orgSlug:l},e[0]=n,e[1]=s,e[2]=l,e[3]=a):a=e[3];const C=H(a),h=i.type==="User"?"user":"org",m=r?`${h}:${i.login} ${r} in:name`:`${h}:${i.login}`;let x;e[4]!==n||e[5]!==i.login||e[6]!==s||e[7]!==r?(x=U.githubOrgRepos(s,n,i.login,r),e[4]=n,e[5]=i.login,e[6]=s,e[7]=r,e[8]=x):x=e[8];let N;e[9]!==C||e[10]!==m?(N=async j=>{const{signal:d}=j,c=(await C.callTool({name:"search_repositories",arguments:{query:m,page:1,perPage:30}},void 0,{signal:d})).content?.[0]?.text;if(!c)throw new Error("No response from search_repositories");return(JSON.parse(c).items??[]).map(ut)},e[9]=C,e[10]=m,e[11]=N):N=e[11];let y;e[12]!==x||e[13]!==N?(y={queryKey:x,queryFn:N},e[12]=x,e[13]=N,e[14]=y):y=e[14];const{data:p}=ke(y);if(p.length===0){let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=j):j=e[15];let d;e[16]!==r?(d=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=d):d=e[17];let S;return e[18]!==d?(S=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[j,d]}),e[18]=d,e[19]=S):S=e[19],S}let I;if(e[20]!==b||e[21]!==f||e[22]!==p){let j;e[24]!==b||e[25]!==f?(j=d=>t.jsxs("button",{type:"button",onClick:()=>f(d),disabled:b,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(F,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:d.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[d.private?t.jsx(Re,{size:10}):t.jsx(Pe,{size:10}),d.private?"Private":"Public"]})]},d.fullName),e[24]=b,e[25]=f,e[26]=j):j=e[26],I=p.map(j),e[20]=b,e[21]=f,e[22]=p,e[23]=I}else I=e[23];let w;return e[27]!==I?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:I}),e[27]=I,e[28]=w):w=e[28],w}function ut(o){return{name:o.name,fullName:o.full_name,owner:o.full_name.split("/")[0]??"",url:o.html_url,private:o.private,description:o.description,updatedAt:o.updated_at}}function re(o){const e=$.c(33),{status:n,error:s,retry:l}=o;if(n==="error"){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-destructive"})}),e[0]=c):c=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=v):v=e[1];const O=s??"Something went wrong while connecting to GitHub.";let A;e[2]!==O?(A=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:O})]}),e[2]=O,e[3]=A):A=e[3];let T;e[4]!==l?(T=t.jsx("button",{type:"button",onClick:l,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=l,e[5]=T):T=e[5];let g;return e[6]!==A||e[7]!==T?(g=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[c,A,T]}),e[6]=A,e[7]=T,e[8]=g):g=e[8],g}const i=n==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Y,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=f):f=e[10];const b=i?"Authenticating with GitHub":"Setting up GitHub";let a;e[11]!==b?(a=t.jsx("p",{className:"text-sm font-medium",children:b}),e[11]=b,e[12]=a):a=e[12];const C=i?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==C?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=h):h=e[14];let m;e[15]!==a||e[16]!==h?(m=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[a,h]}),e[15]=a,e[16]=h,e[17]=m):m=e[17];const x=i?"bg-muted-foreground/30":"bg-foreground animate-pulse";let N;e[18]!==x?(N=V("size-1.5 rounded-full",x),e[18]=x,e[19]=N):N=e[19];let y;e[20]!==N?(y=t.jsx("span",{className:N}),e[20]=N,e[21]=y):y=e[21];const p=i?"bg-foreground animate-pulse":"bg-muted-foreground/30";let I;e[22]!==p?(I=V("size-1.5 rounded-full",p),e[22]=p,e[23]=I):I=e[23];let w;e[24]!==I?(w=t.jsx("span",{className:I}),e[24]=I,e[25]=w):w=e[25];let j;e[26]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=j):j=e[26];let d;e[27]!==y||e[28]!==w?(d=t.jsxs("div",{className:"flex items-center gap-1.5",children:[y,w,j]}),e[27]=y,e[28]=w,e[29]=d):d=e[29];let S;return e[30]!==d||e[31]!==m?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[f,m,d]}),e[30]=d,e[31]=m,e[32]=S):S=e[32],S}export{F as G,St as H,Et as I,Fe as S,jt as W,Tt as a,vt as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as y,p as C,F as ce,a as G,K as E,m as B,b3 as we,Y as xe,j as o,l as ge,B as q,r as v,z as ye,c as ee,n as re}from"./index-
|
|
1
|
+
import{e as y,p as C,F as ce,a as G,K as E,m as B,b3 as we,Y as xe,j as o,l as ge,B as q,r as v,z as ye,c as ee,n as re}from"./index-DJxRbue6.js";import{S as Q}from"./skeleton-C_PdNCnO.js";import{n as Z}from"./Globe01-9a7DzMR4.js";import{l as je,F as ke}from"./index-CYfMTPm6.js";import{F as be,M as ve}from"./file-type-icon-CjY-L87B.js";import{D as Se,a as $e,b as Te,c as ie}from"./dropdown-menu-BPajkRHT.js";import{b as A,T as K,a as H}from"./tooltip-BsiBfMRx.js";import{i as Ee}from"./Check-BE5llaCo.js";import{a as Ce}from"./Eye-DeAUvKsB.js";import{e as Fe,f as Me,a as Ne,b as De}from"./ZoomOut-DC7naWv-.js";import{i as Pe}from"./LayoutLeft-BlcyI03M.js";import{n as Ue}from"./LinkExternal01-wGfNOyG-.js";function ze(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function M(s,e,t,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function N(s,e){const t=await fetch(s,e);if(!t.ok){let n="";try{n=(await t.json()).error??""}catch{}throw new Error(n||`HTTP ${t.status}`)}return t}function vt(s,e){const t=y.c(11),{org:n}=C();let r;t[0]!==n.id||t[1]!==e||t[2]!==s?(r=E.orgFsList(n.id,s,e),t[0]=n.id,t[1]=e,t[2]=s,t[3]=r):r=t[3];let i;t[4]!==n.slug||t[5]!==e||t[6]!==s?(i=async()=>(await(await N(M(n.slug,s,"list",{path:e}))).json()).entries.toSorted(Oe),t[4]=n.slug,t[5]=e,t[6]=s,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:we,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],B(a)}function Oe(s,e){return s.kind!==e.kind?s.kind==="dir"?-1:1:s.path.localeCompare(e.path)}function St(s,e,t){const n=y.c(15),{org:r}=C();let i;n[0]!==r.id||n[1]!==e||n[2]!==s?(i=E.orgFsStat(r.id,s??"",e),n[0]=r.id,n[1]=e,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let d;n[4]!==t?(d=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,n[4]=t,n[5]=d):d=n[5];let c;n[6]!==r.slug||n[7]!==e||n[8]!==s?(c=async()=>{const f=await fetch(M(r.slug,s??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},n[6]=r.slug,n[7]=e,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==d||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:d,queryFn:c},n[10]=i,n[11]=a,n[12]=d,n[13]=c,n[14]=l):l=n[14],B(l)}function $t(s){const e=y.c(9),{org:t}=C();let n;e[0]!==t.id||e[1]!==s?(n=E.orgFsUsage(t.id,s),e[0]=t.id,e[1]=s,e[2]=n):n=e[2];let r;e[3]!==t.slug||e[4]!==s?(r=async()=>await(await N(M(t.slug,s,"usage"))).json(),e[3]=t.slug,e[4]=s,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r?(i={queryKey:n,queryFn:r},e[6]=n,e[7]=r,e[8]=i):i=e[8],B(i)}function Tt(s,e){const t=y.c(9),n=s===void 0?60:s,{org:r}=C();let i;t[0]!==r.id?(i=E.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let d;t[2]!==n||t[3]!==r.slug?(d=async()=>(await(await N(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,t[2]=n,t[3]=r.slug,t[4]=d):d=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==d?(c={queryKey:i,enabled:a,queryFn:d},t[5]=i,t[6]=a,t[7]=d,t[8]=c):c=t[8],B(c)}function Et(s){const e=y.c(8),{org:t}=C();let n;e[0]!==t.id?(n=E.orgFsSkills(t.id),e[0]=t.id,e[1]=n):n=e[1];const r=s?.enabled;let i;e[2]!==t.slug?(i=async()=>{const d=await N(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`),{sets:c}=await d.json(),l=["home",...c.map(_e)];return(await Promise.all(l.map(async u=>{const m=await N(M(t.slug,u,"list",{path:""})),{entries:w}=await m.json();return w.filter(Re).map(j=>({volume:u,path:j.path}))}))).flat()},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],B(a)}function Re(s){return s.kind==="dir"&&s.hasSkill}function _e(s){return`public-${s}`}function Ct(){const s=y.c(7),{org:e}=C();let t;s[0]!==e.id?(t=E.orgFsPublicSets(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=async()=>(await(await N(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,s[2]=e.slug,s[3]=n):n=s[3];let r;return s[4]!==t||s[5]!==n?(r={queryKey:t,staleTime:3e5,queryFn:n},s[4]=t,s[5]=n,s[6]=r):r=s[6],B(r)}function Ft(s){const e=y.c(3),{org:t}=C();let n;return e[0]!==t.slug||e[1]!==s?(n=r=>M(t.slug,s,"read",{path:r}),e[0]=t.slug,e[1]=s,e[2]=n):n=e[2],n}function Mt(){const s=y.c(2),{org:e}=C();let t;return s[0]!==e.slug?(t=(n,r)=>M(e.slug,n,"read",{path:r}),s[0]=e.slug,s[1]=t):t=s[1],t}function We(s){const e=y.c(3),{org:t}=C();let n;return e[0]!==t||e[1]!==s?(n={mutationFn:async r=>(await(await N(M(t.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=s,e[2]=n):n=e[2],G(n)}function Nt(s){const e=y.c(26),{org:t}=C(),n=ce();let r;e[0]!==t||e[1]!==n||e[2]!==s?(r=()=>{n.invalidateQueries({queryKey:E.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:E.orgFsRecent(t.id)})},e[0]=t,e[1]=n,e[2]=s,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==s?(a=async g=>{for(const k of g.files){const S=g.dir?`${g.dir}/${k.name}`:k.name;await N(M(t.slug,s,"file",{path:S}),{method:"PUT",headers:{"content-type":k.type||"application/octet-stream"},body:k})}},e[4]=t,e[5]=s,e[6]=a):a=e[6];let d;e[7]!==i||e[8]!==a?(d={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=d):d=e[9];const c=G(d);let l;e[10]!==t||e[11]!==s?(l=async g=>{await N(M(t.slug,s,"dir",{path:g}),{method:"POST"})},e[10]=t,e[11]=s,e[12]=l):l=e[12];let f;e[13]!==i||e[14]!==l?(f={mutationFn:l,onSuccess:i},e[13]=i,e[14]=l,e[15]=f):f=e[15];const u=G(f);let m;e[16]!==t||e[17]!==s?(m=async g=>{await N(M(t.slug,s,"file",{path:g}),{method:"DELETE"})},e[16]=t,e[17]=s,e[18]=m):m=e[18];let w;e[19]!==i||e[20]!==m?(w={mutationFn:m,onSuccess:i},e[19]=i,e[20]=m,e[21]=w):w=e[21];const j=G(w);let b;return e[22]!==u||e[23]!==j||e[24]!==c?(b={upload:c,mkdir:u,remove:j},e[22]=u,e[23]=j,e[24]=c,e[25]=b):b=e[25],b}function qe(s){if(!s||s.includes("\\")||s.includes("..")||s.includes("\0"))return!0;try{const e=decodeURIComponent(s);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==s&&e.includes("/")){const t=(s.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function Le(s){if(qe(s))throw new Error(`Invalid block key: ${s||"(empty)"}`)}function Ie(s){try{return decodeURIComponent(s)}catch{return s}}function Be(s){return Le(s),encodeURIComponent(s)}function Ae(s){return`.deco/blocks/${Be(s)}.json`}function Dt(s){return`/${Ae(s)}`}const Pt=1e4,Ke=3;function J(s){return s.trim()?(s.startsWith("/")?s:`/${s}`).replace(/\/+/g,"/"):"/"}function te(s){return s.startsWith("/")?s.slice(1):s}function Y(s){return s.trim()?s.startsWith("/")?s:`/${s}`:"/"}function He(s){const e=Y(s);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ut(s,e){const t=e.replace(/^\/+|\/+$/g,"");return Y(t?`${s==="/"?"":s}/${t}`:s)}function zt(s,e){return e==="directory"?s:He(s)}function Ot(s){const e=s.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":e.startsWith(".")?"Name cannot start with a dot":null:"Name is required"}function Ve(s){const e=te(s);return e?e.split("/").filter(Boolean).length:0}function Rt(s,e,t,n=!1){return{files:[...new Set([...s,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:n||!!t.truncated}}function _t(s,e){return Ve(s)>Ke&&!e.has(s)}function Wt(s,e,t=[]){const n=te(s);if(e.includes(n)||t.includes(n))return!0;if(!n)return!1;const r=`${n}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qt(s){const e=te(s),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const n=e.slice(t.length,-5);return Ie(n)}function Xe(s){if(!s)return"plaintext";const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Lt(s){const e=J(s).split("/").filter(Boolean),t=["/"];let n="";for(const r of e.slice(0,-1))n+=`/${r}`,t.push(n);return t}function It(s,e=[]){const t={children:[]},n=i=>{const d=J(i).split("/").filter(Boolean);let c=t,l="";for(const f of d){l+=`/${f}`;let u=c.children.find(m=>m.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:l,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of s){const d=J(i).split("/").filter(Boolean);let c=t,l="";d.forEach((f,u)=>{l+=`/${f}`;const m=u===d.length-1;let w=c.children.find(j=>j.name===f);w||(w={name:f,path:l,kind:m?"file":"directory",children:[]},c.children.push(w)),c=w})}for(const i of e)n(Y(i));const r=i=>{i.sort((a,d)=>a.kind!==d.kind?a.kind==="directory"?-1:1:a.name.localeCompare(d.name));for(const a of i)a.children.length>0&&r(a.children)};return r(t.children),t.children}function Qe(s,e,t=0){const n=[];for(const r of s)r.name!==".gitkeep"&&(n.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&n.push(...Qe(r.children,e,t+1)));return n}function Bt(s){return s.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}je.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function Ge(s){const e=y.c(11),{value:t,filename:n}=s,[r]=xe(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let a;e[0]!==n?(a=Xe(n),e[0]=n,e[1]=a):a=e[1];const d=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(ge,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(l={enabled:!1},f={top:12,bottom:12},e[3]=l,e[4]=f):(l=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:l,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let m;return e[6]!==n||e[7]!==a||e[8]!==d||e[9]!==t?(m=o.jsx(ke,{path:n,language:a,value:t,theme:d,loading:c,options:u},n),e[6]=n,e[7]=a,e[8]=d,e[9]=t,e[10]=m):m=e[10],m}function Ye(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}const Ze=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Je=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),oe=2*1024*1024;function et(s,e){const t=s.split(".").pop()?.toLowerCase()??"";return Ze.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=oe?"markdown":"download":Je.has(t)&&e<=oe?"text":"download"}function tt(){const s=y.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Q,{className:"h-6 w-2/3"}),s[0]=e):e=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx(Q,{className:"h-3 w-full"}),o.jsx(Q,{className:"h-3 w-5/6"}),o.jsx(Q,{className:"h-3 w-2/3"})]})]})}),s[1]=t):t=s[1],t}function de(s){const e=y.c(20),{file:t,note:n}=s;let r;e[0]!==t.filename?(r=o.jsx(be,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let a;e[4]!==t.size?(a=Ye(t.size),e[4]=t.size,e[5]=a):a=e[5];const d=n?` · ${n}`:"";let c;e[6]!==a||e[7]!==d?(c=o.jsxs("span",{className:"text-xs text-muted-foreground",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8];let l;e[9]!==i||e[10]!==c?(l=o.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=l):l=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Z,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=o.jsx(q,{asChild:!0,variant:"outline",size:"sm",children:o.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let m;return e[16]!==r||e[17]!==l||e[18]!==u?(m=o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,l,u]})}),e[16]=r,e[17]=l,e[18]=u,e[19]=m):m=e[19],m}function le(s){const e=y.c(16),{file:t,markdown:n}=s;let r;e[0]!==t.downloadUrl?(r=E.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let a;e[4]!==r||e[5]!==i?(a={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=a):a=e[6];const{data:d,isPending:c,isError:l}=B(a);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(tt,{}),e[7]=u):u=e[7],u}if(l||d===void 0){let u;return e[8]!==t?(u=o.jsx(de,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(n){const u=`file-preview-${t.key}`;let m;return e[10]!==d||e[11]!==u?(m=o.jsx("div",{className:"h-full overflow-y-auto",children:o.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:o.jsx(ve,{id:u,text:d})})}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}let f;return e[13]!==d||e[14]!==t.filename?(f=o.jsx(Ge,{value:d,filename:t.filename}),e[13]=d,e[14]=t.filename,e[15]=f):f=e[15],f}function At(s){const e=y.c(15),{file:t}=s;switch(et(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=o.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:o.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=o.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=o.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=o.jsx(le,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=o.jsx(le,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=o.jsx(de,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function st(s){const e=y.c(53),{readUrl:t,editor:n,downloadName:r,trailing:i}=s,[a,d]=v.useState(!1);let c;e[0]!==t?(c=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=c):c=e[1];const l=c;let f;e[2]!==l?(f=()=>{navigator.clipboard.writeText(l),d(!0),window.setTimeout(()=>d(!1),1500)},e[2]=l,e[3]=f):f=e[3];const u=f;let m;e[4]!==n?(m=n.deckDetected&&o.jsxs(A,{children:[o.jsx(K,{asChild:!0,children:o.jsx(q,{variant:n.railOpen?"secondary":"ghost",size:"icon","aria-label":n.railOpen?"Hide slide list":"Show slide list",onClick:()=>n.setRailOpen(!n.railOpen),children:o.jsx(Pe,{size:14})})}),o.jsx(H,{side:"bottom",children:n.railOpen?"Hide slide list":"Show slide list"})]}),e[4]=n,e[5]=m):m=e[5];let w;e[6]!==l?(w=()=>window.open(l,"_blank","noopener"),e[6]=l,e[7]=w):w=e[7];let j;e[8]!==l?(j=o.jsx("span",{className:"truncate",children:l}),e[8]=l,e[9]=j):j=e[9];let b;e[10]!==l||e[11]!==w||e[12]!==j?(b=o.jsx("button",{type:"button",onClick:w,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:l,children:j}),e[10]=l,e[11]=w,e[12]=j,e[13]=b):b=e[13];let g;e[14]!==n.agentUpdated||e[15]!==n.reload?(g=n.agentUpdated&&o.jsxs(A,{children:[o.jsx(K,{asChild:!0,children:o.jsxs(q,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:n.reload,children:[o.jsx(ye,{size:12}),"Agent updated — reload"]})}),o.jsx(H,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[14]=n.agentUpdated,e[15]=n.reload,e[16]=g):g=e[16];let k;e[17]!==n.saving?(k=n.saving&&o.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[17]=n.saving,e[18]=k):k=e[18];let S;e[19]!==n?(S=n.deckDetected&&n.writable&&o.jsxs(A,{children:[o.jsx(K,{asChild:!0,children:o.jsx(q,{variant:n.editMode?"secondary":"ghost",size:"icon","aria-label":n.editMode?"Done editing":"Edit inline",className:ee(n.editMode&&"text-primary"),onClick:()=>n.setEditMode(!n.editMode),children:o.jsx(Fe,{size:14})})}),o.jsx(H,{side:"bottom",children:n.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[19]=n,e[20]=S):S=e[20];let F;e[21]!==l||e[22]!==r||e[23]!==n.deckDetected?(F=n.deckDetected?o.jsxs(Se,{children:[o.jsx($e,{asChild:!0,children:o.jsx(q,{variant:"ghost",size:"icon","aria-label":"Download",children:o.jsx(Z,{size:14})})}),o.jsxs(Te,{align:"end",children:[o.jsxs(ie,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[o.jsx(Me,{size:14}),"Export as PDF"]}),o.jsx(ie,{asChild:!0,children:o.jsxs("a",{href:l,download:r,children:[o.jsx(Ne,{size:14}),"Download HTML"]})})]})]}):o.jsxs(A,{children:[o.jsx(K,{asChild:!0,children:o.jsx(q,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:o.jsx("a",{href:l,download:r,children:o.jsx(Z,{size:14})})})}),o.jsx(H,{side:"bottom",children:"Download"})]}),e[21]=l,e[22]=r,e[23]=n.deckDetected,e[24]=F):F=e[24];let P;e[25]!==a?(P=a?o.jsx(Ee,{size:14}):o.jsx(Ce,{size:14}),e[25]=a,e[26]=P):P=e[26];let U;e[27]!==u||e[28]!==P?(U=o.jsx(K,{asChild:!0,children:o.jsx(q,{variant:"ghost",size:"icon","aria-label":"Copy URL",onClick:u,children:P})}),e[27]=u,e[28]=P,e[29]=U):U=e[29];const X=a?"Copied":"Copy URL";let p;e[30]!==X?(p=o.jsx(H,{side:"bottom",children:X}),e[30]=X,e[31]=p):p=e[31];let z;e[32]!==U||e[33]!==p?(z=o.jsxs(A,{children:[U,p]}),e[32]=U,e[33]=p,e[34]=z):z=e[34];let D;e[35]!==l?(D=()=>window.open(l,"_blank","noopener"),e[35]=l,e[36]=D):D=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=o.jsx(Ue,{size:14}),e[37]=$):$=e[37];let T;e[38]!==D?(T=o.jsx(K,{asChild:!0,children:o.jsx(q,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:D,children:$})}),e[38]=D,e[39]=T):T=e[39];let I;e[40]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(H,{side:"bottom",children:"Open in new tab"}),e[40]=I):I=e[40];let O;e[41]!==T?(O=o.jsxs(A,{children:[T,I]}),e[41]=T,e[42]=O):O=e[42];let R;return e[43]!==F||e[44]!==z||e[45]!==O||e[46]!==m||e[47]!==b||e[48]!==g||e[49]!==k||e[50]!==S||e[51]!==i?(R=o.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[m,b,g,k,S,F,z,O,i]}),e[43]=F,e[44]=z,e[45]=O,e[46]=m,e[47]=b,e[48]=g,e[49]=k,e[50]=S,e[51]=i,e[52]=R):R=e[52],R}const V=1;function nt(s){if(typeof s!="object"||s===null||s.v!==V||s.source!=="deck-viewer")return null;const e=s;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class L extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function ue(s){return[...s.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function rt(s){const t=new DOMParser().parseFromString(s,"text/html").querySelector("deck-viewer");return t?ue(t).length:null}function it(s,e){const t=new DOMParser().parseFromString(s,"text/html"),n=t.querySelector("deck-viewer");if(!n)throw new L("no <deck-viewer> element in source","no-viewer");const r=ue(n),i=e.kind==="move"?e.from:e.at,a=r[i];if(!a)throw new L(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new L("cannot remove the last slide","bad-op");a.remove();break}case"duplicate":{const c=a.cloneNode(!0);c.removeAttribute("id");for(const l of c.querySelectorAll("[id]"))l.removeAttribute("id");a.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new L(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;n.insertBefore(a,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new L(`invalid attribute name: ${e.name}`,"bad-op");a.setAttribute(e.name,e.value);break}case"remove-attr":{a.removeAttribute(e.name);break}case"replace":{const l=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!l)throw new L("replace html has no root element","bad-op");a.replaceWith(t.importNode(l,!0));break}default:throw new L(`unknown op kind: ${e.kind}`,"bad-op")}return`${s.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as d,dv as k,a4 as F,a5 as f,dx as T,ad as $,bh as O,bu as I,dy as U,dz as z,dB as B,dw as W,be as G,du as K,e as E,c as V}from"./index-
|
|
1
|
+
import{r as c,j as d,dv as k,a4 as F,a5 as f,dx as T,ad as $,bh as O,bu as I,dy as U,dz as z,dB as B,dw as W,be as G,du as K,e as E,c as V}from"./index-DJxRbue6.js";var S,b="HoverCard",[y]=$(b,[T]),R=T(),[q,w]=y(b),N=o=>{const{__scopeHoverCard:e,children:t,open:r,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:u=300}=o,i=R(e),p=c.useRef(0),v=c.useRef(0),C=c.useRef(!1),h=c.useRef(!1),[m,n]=G({prop:r,defaultProp:a??!1,onChange:s,caller:b}),x=c.useCallback(()=>{clearTimeout(v.current),p.current=window.setTimeout(()=>n(!0),l)},[l,n]),L=c.useCallback(()=>{clearTimeout(p.current),!C.current&&!h.current&&(v.current=window.setTimeout(()=>n(!1),u))},[u,n]),M=c.useCallback(()=>n(!1),[n]);return c.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(v.current)},[]),d.jsx(q,{scope:e,open:m,onOpenChange:n,onOpen:x,onClose:L,onDismiss:M,hasSelectionRef:C,isPointerDownOnContentRef:h,children:d.jsx(K,{...i,children:t})})};N.displayName=b;var _="HoverCardTrigger",D=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=w(_,t),s=R(t);return d.jsx(k,{asChild:!0,...s,children:d.jsx(F.a,{"data-state":a.open?"open":"closed",...r,ref:e,onPointerEnter:f(o.onPointerEnter,P(a.onOpen)),onPointerLeave:f(o.onPointerLeave,P(a.onClose)),onFocus:f(o.onFocus,a.onOpen),onBlur:f(o.onBlur,a.onClose),onTouchStart:f(o.onTouchStart,l=>l.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=o=>{const{__scopeHoverCard:e,forceMount:t,children:r,container:a}=o,s=w(H,e);return d.jsx(J,{scope:e,forceMount:t,children:d.jsx(O,{present:t||s.open,children:d.jsx(W,{asChild:!0,container:a,children:r})})})};j.displayName=H;var g="HoverCardContent",A=c.forwardRef((o,e)=>{const t=Q(g,o.__scopeHoverCard),{forceMount:r=t.forceMount,...a}=o,s=w(g,o.__scopeHoverCard);return d.jsx(O,{present:r||s.open,children:d.jsx(X,{"data-state":s.open?"open":"closed",...a,onPointerEnter:f(o.onPointerEnter,P(s.onOpen)),onPointerLeave:f(o.onPointerLeave,P(s.onClose)),ref:e})})});A.displayName=g;var X=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...u}=o,i=w(g,t),p=R(t),v=c.useRef(null),C=I(e,v),[h,m]=c.useState(!1);return c.useEffect(()=>{if(h){const n=document.body;return S=n.style.userSelect||n.style.webkitUserSelect,n.style.userSelect="none",n.style.webkitUserSelect="none",()=>{n.style.userSelect=S,n.style.webkitUserSelect=S}}},[h]),c.useEffect(()=>{if(v.current){const n=()=>{m(!1),i.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(i.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",n),()=>{document.removeEventListener("pointerup",n),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!1}}},[i.isPointerDownOnContentRef,i.hasSelectionRef]),c.useEffect(()=>{v.current&&ee(v.current).forEach(x=>x.setAttribute("tabindex","-1"))}),d.jsx(U,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:f(s,n=>{n.preventDefault()}),onDismiss:i.onDismiss,children:d.jsx(z,{...p,...u,onPointerDown:f(u.onPointerDown,n=>{n.currentTarget.contains(n.target)&&m(!0),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!0}),ref:C,style:{...u.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=R(t);return d.jsx(B,{...a,...r,ref:e})});Z.displayName=Y;function P(o){return e=>e.pointerType==="touch"?void 0:o()}function ee(o){const e=[],t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var te=N,oe=D,re=j,ne=A;function se(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(te,{"data-slot":"hover-card",...t}),e[2]=t,e[3]=r):r=e[3],r}function ie(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(oe,{"data-slot":"hover-card-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ce(o){const e=E.c(12);let t,r,a,s;e[0]!==o?({className:t,align:a,sideOffset:s,...r}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=a,e[4]=s):(t=e[1],r=e[2],a=e[3],s=e[4]);const l=a===void 0?"center":a,u=s===void 0?4:s;let i;e[5]!==t?(i=V("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),e[5]=t,e[6]=i):i=e[6];let p;return e[7]!==l||e[8]!==r||e[9]!==u||e[10]!==i?(p=d.jsx(re,{"data-slot":"hover-card-portal",children:d.jsx(ne,{"data-slot":"hover-card-content",align:l,sideOffset:u,className:i,...r})}),e[7]=l,e[8]=r,e[9]=u,e[10]=i,e[11]=p):p=e[11],p}export{ie as H,ce as a,se as b};
|