decocms 3.36.3 → 3.36.4
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-BU9gj1Zb.js → AlertCircle-DU4Czymb.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D2O4sQl3.js → ArrowUpRight-jvt9_jPs.js} +1 -1
- package/dist/client/assets/{Check-BmF1hQRY.js → Check-CFZ7jofS.js} +1 -1
- package/dist/client/assets/{CheckCircle-C4XwcfjN.js → CheckCircle-B7_GaGqy.js} +1 -1
- package/dist/client/assets/{ChevronDown-BIO7wba7.js → ChevronDown-CMnvnfNH.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CW2G6JyB.js → ChevronLeft-BLmY09V7.js} +1 -1
- package/dist/client/assets/{ChevronRight-CwhL8zaw.js → ChevronRight-DtVYtVbK.js} +1 -1
- package/dist/client/assets/{ChevronUp-DdLEv_cl.js → ChevronUp-BYxSfj4f.js} +1 -1
- package/dist/client/assets/{Container-Dyf0TzBH.js → Container-CQcCiGBy.js} +1 -1
- package/dist/client/assets/{DotsVertical-DQMFAww2.js → DotsVertical-7ebFkKLD.js} +1 -1
- package/dist/client/assets/{Eye-Bi1ejTfS.js → Eye-CYtfD-C-.js} +1 -1
- package/dist/client/assets/{FilterLines-jWyOgIfr.js → FilterLines-BtiGzXwl.js} +1 -1
- package/dist/client/assets/{Globe01-DF9PUq9k.js → Globe01-bYDzICLJ.js} +1 -1
- package/dist/client/assets/{HardDrive-BIzpSh2R.js → HardDrive-gxQ66xi3.js} +1 -1
- package/dist/client/assets/{Key01-DJaxTkjl.js → Key01-CDcV65YU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C3u21iqS.js → LayoutLeft-Cy-bGbAH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D7mXn_q6.js → LinkExternal01-BDXPmxri.js} +1 -1
- package/dist/client/assets/{Monitor01-B2V0QJVA.js → Monitor01-6PVrucyX.js} +1 -1
- package/dist/client/assets/{Palette-CvjTgNao.js → Palette-8PqtgYqw.js} +1 -1
- package/dist/client/assets/{Play-6yxi-kVu.js → Play-B0CTz7-g.js} +1 -1
- package/dist/client/assets/{Plus-D-k489Hw.js → Plus-DW_pro4F.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-0Z7TeT1O.js → RefreshCcw01-B9XxpyTk.js} +1 -1
- package/dist/client/assets/{SearchMd-BdcI0VcO.js → SearchMd-BnZZ5mEU.js} +1 -1
- package/dist/client/assets/{Settings02-C6hr8Qy9.js → Settings02-BzBPnOVl.js} +1 -1
- package/dist/client/assets/{Shield01-DOB3vgca.js → Shield01-CUegYioy.js} +1 -1
- package/dist/client/assets/{Star01-Du_V1z61.js → Star01-CjQzvxTy.js} +1 -1
- package/dist/client/assets/{Stars01-BAC8f8eM.js → Stars01-BBldOY4r.js} +1 -1
- package/dist/client/assets/{Stars02-CpPe-VPg.js → Stars02-COgJsT25.js} +1 -1
- package/dist/client/assets/{Sun-C3Zhz8pG.js → Sun-BFeAvEQf.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BRvArA9H.js → SwitchHorizontal01-BQBOH6Au.js} +1 -1
- package/dist/client/assets/{Tool01-yFL5Dn59.js → Tool01-BKl-GVq3.js} +1 -1
- package/dist/client/assets/{Trash01-Br13J6pg.js → Trash01-BfygLm6s.js} +1 -1
- package/dist/client/assets/{Upload01-D4q_2hTt.js → Upload01-ClElEXYw.js} +1 -1
- package/dist/client/assets/{User01-BtejVxVG.js → User01-Bi6i4zOy.js} +1 -1
- package/dist/client/assets/{Users01-Dy4pn4ki.js → Users01-BXIkeJej.js} +1 -1
- package/dist/client/assets/{Users03-CmfKEZdY.js → Users03-DH-6SNzV.js} +1 -1
- package/dist/client/assets/{X-DcDNiBgo.js → X-BUzk9ZuQ.js} +1 -1
- package/dist/client/assets/{XCircle-e29W-Gcn.js → XCircle-8_cOsjUY.js} +1 -1
- package/dist/client/assets/{XClose-D4RzaaY5.js → XClose-CCKAliKU.js} +1 -1
- package/dist/client/assets/{Zap-Cp6OTaVi.js → Zap-DMSK7ZyR.js} +1 -1
- package/dist/client/assets/{ZapSquare-CvMxvmoA.js → ZapSquare-Dj9sWt3u.js} +1 -1
- package/dist/client/assets/{ZoomOut-m5WCE6Ow.js → ZoomOut-DfX9NmNO.js} +1 -1
- package/dist/client/assets/{access-gate-B7iLwSTn.js → access-gate-DuwCoW9u.js} +1 -1
- package/dist/client/assets/{accordion-DyJkloNK.js → accordion-x86xWE4B.js} +1 -1
- package/dist/client/assets/{add-section-modal-CRDse3LE.js → add-section-modal-CtMZ_X5l.js} +1 -1
- package/dist/client/assets/{agent-capabilities--0Cd735F.js → agent-capabilities-C3MTl0Im.js} +1 -1
- package/dist/client/assets/{agent-icon-MPxc_53p.js → agent-icon-CV7VKepg.js} +1 -1
- package/dist/client/assets/{agents-list-DvMDGpVE.js → agents-list-BT8i9CxI.js} +1 -1
- package/dist/client/assets/{ai-providers-BZpaXRIt.js → ai-providers-CAzPDdFJ.js} +1 -1
- package/dist/client/assets/{alert--QwThtUs.js → alert-Bi903p4n.js} +1 -1
- package/dist/client/assets/{alert-dialog-DAZnJbEa.js → alert-dialog-CjyXYSQZ.js} +1 -1
- package/dist/client/assets/app-editor-CCjHHUIp.js +1 -0
- package/dist/client/assets/{auth-Rhn0UUKX.js → auth-StjmYjna.js} +1 -1
- package/dist/client/assets/{auth-catchall-COEk5Dgt.js → auth-catchall-D86Q5OiL.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BU5p8xYF.js → auth-split-layout-BqxtOd31.js} +1 -1
- package/dist/client/assets/{automation-list-row-BkqsYOIc.js → automation-list-row-ZsMhYjFo.js} +1 -1
- package/dist/client/assets/{automation-runs-CfLYge75.js → automation-runs-CAE5s4jH.js} +1 -1
- package/dist/client/assets/{automations-E9ZspVSN.js → automations-DzhdRc4f.js} +1 -1
- package/dist/client/assets/{avatar-DgWkRz32.js → avatar-ItW7yKah.js} +1 -1
- package/dist/client/assets/{badge-Ckvq5EMT.js → badge-Bw9vN6fg.js} +1 -1
- package/dist/client/assets/{brand-context-Cm9JdTeG.js → brand-context-BCx3pSLc.js} +1 -1
- package/dist/client/assets/{buckets-Dja8qKdg.js → buckets-C-Dq8Vrb.js} +1 -1
- package/dist/client/assets/{calendar-C4NMm-GW.js → calendar-D0RqU72a.js} +1 -1
- package/dist/client/assets/{capability-load-error-DGtjMdu6.js → capability-load-error-B4z1cdIN.js} +1 -1
- package/dist/client/assets/{card-DV2a7ud0.js → card-B0-N4bpb.js} +1 -1
- package/dist/client/assets/{chat-context-CQJ83DKW.js → chat-context-BG_brbim.js} +1 -1
- package/dist/client/assets/{checkbox-Eb0jgSAR.js → checkbox-BjUgAWJu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C5I6pdNq.js → cli-auth-success-Cb5-OjdP.js} +1 -1
- package/dist/client/assets/{collection-detail-QmVn7T6P.js → collection-detail-DONQnGGW.js} +1 -1
- package/dist/client/assets/{collection-display-button-k6e_w5_8.js → collection-display-button-BpdgmXkn.js} +1 -1
- package/dist/client/assets/{collection-search-q3LrsDP0.js → collection-search-BEvxyUp1.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Wg4_kRAB.js → collection-table-wrapper-CeQ3Kj1L.js} +1 -1
- package/dist/client/assets/{collection-tabs-CvaARsvN.js → collection-tabs-DM_bzUmO.js} +1 -1
- package/dist/client/assets/{collections-DjlDVd1Q.js → collections-DGui_rw4.js} +1 -1
- package/dist/client/assets/{command--rBvALtU.js → command-CSF0stL5.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CkEEvZPz.js → connect-desktop-dialog-BHttcPxA.js} +1 -1
- package/dist/client/assets/{connection-card-DqPMpeMB.js → connection-card-DNd6JwtE.js} +1 -1
- package/dist/client/assets/{connection-detail-Ceck3IrK.js → connection-detail-DBBp6dEO.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B6xP1FXS.js → connection-form-helpers-C-CDw2oQ.js} +1 -1
- package/dist/client/assets/{connections-BvYO4I8Q.js → connections-BUntGfpQ.js} +1 -1
- package/dist/client/assets/{decopilot-DxHNnnUA.js → decopilot-kQEGsQqO.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-yovdq4PK.js +1 -0
- package/dist/client/assets/{dialog-pxIgcxdx.js → dialog-FBdtBd0W.js} +1 -1
- package/dist/client/assets/{domain-settings-CGcPdYTM.js → domain-settings-DmSveh8r.js} +1 -1
- package/dist/client/assets/{drawer-BrCENAAY.js → drawer-CSp117Rg.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BS4mK__m.js → dropdown-menu-BUlN28jb.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Cn1BTjpz.js → dynamic-plugin-layout-BxmZPwUZ.js} +1 -1
- package/dist/client/assets/{empty-state-Cp1JLYcR.js → empty-state-ByuwXjRC.js} +1 -1
- package/dist/client/assets/{empty-state-vCEwHb1v.js → empty-state-DZZ4TCiB.js} +1 -1
- package/dist/client/assets/{extract-connection-data-16MvAzOh.js → extract-connection-data-D9Xe4stq.js} +1 -1
- package/dist/client/assets/{features-Dc3bQW1I.js → features-DV5J5-hq.js} +1 -1
- package/dist/client/assets/{file-explorer-CelbZiCq.js → file-explorer-CkhSBrMW.js} +1 -1
- package/dist/client/assets/{file-type-icon-B3ZaCMP2.js → file-type-icon-BAmjNPBc.js} +1 -1
- package/dist/client/assets/{files-B5orgVDs.js → files-6d_tX66b.js} +1 -1
- package/dist/client/assets/{form-DsGRrH4I.js → form-BKRU3_f0.js} +1 -1
- package/dist/client/assets/{general-DvWuRP0a.js → general-Co2ymhtz.js} +1 -1
- package/dist/client/assets/{generate-id-B0UU4AyI.js → generate-id-CKNg3Kb_.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BciViNc8.js → github-repo-picker-BXMy0hpf.js} +1 -1
- package/dist/client/assets/{header-tab-button-elaOU0d9.js → header-tab-button-CRRaGYWH.js} +1 -1
- package/dist/client/assets/{hover-card-DfhDOin0.js → hover-card-dEUH7y9z.js} +1 -1
- package/dist/client/assets/{image-field-BIrSC9Gs.js → image-field-CgZHn_on.js} +1 -1
- package/dist/client/assets/{index-BMSOEHke.js → index-B6pSigm3.js} +1 -1
- package/dist/client/assets/{index-D4tq1hPm.js → index-C8c4nZI1.js} +1 -1
- package/dist/client/assets/{index-C8saI2Kn.js → index-CEk0yA7A.js} +21 -21
- package/dist/client/assets/{index-DNM2q8BY.js → index-CTVMK9LC.js} +1 -1
- package/dist/client/assets/{index-BLEyVrBm.js → index-C_iXtMNn.js} +1 -1
- package/dist/client/assets/{index-Dupl0DR-.js → index-CiklrCzm.js} +1 -1
- package/dist/client/assets/{index-L_0VXlrp.js → index-Ckn2ukzq.js} +1 -1
- package/dist/client/assets/{index-m-rxA9SC.js → index-CsGon0kW.js} +1 -1
- package/dist/client/assets/{index-DLRMbGKZ.js → index-CwjMi0Lt.js} +1 -1
- package/dist/client/assets/{index-3WWLSqtl.js → index-D5VHt2uj.js} +1 -1
- package/dist/client/assets/{index-ChdATVAA.js → index-DEUVODq9.js} +3 -3
- package/dist/client/assets/{index-xNHaP-xT.js → index-DGguhABr.js} +1 -1
- package/dist/client/assets/{index-DgyLJoal.js → index-DpgH-puy.js} +1 -1
- package/dist/client/assets/{index-CkV2wRTX.js → index-DwVG2P9Q.js} +1 -1
- package/dist/client/assets/{index-redirect-Cl16_UY5.js → index-redirect-FjuWd7yb.js} +1 -1
- package/dist/client/assets/{index-BKFf6V9A.js → index-wos7zFLb.js} +1 -1
- package/dist/client/assets/{input-BZ-4l6sv.js → input-CkGEzOB_.js} +1 -1
- package/dist/client/assets/{integration-icon-LHjd4NGc.js → integration-icon-D3LrOIav.js} +1 -1
- package/dist/client/assets/{label-CGY9toLT.js → label-CxhkSBar.js} +1 -1
- package/dist/client/assets/{layout-C8nv7dxR.js → layout-Bt0QDLtr.js} +1 -1
- package/dist/client/assets/{login-D5x6WUee.js → login-IwWNwbY4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BeZ96noC.js → mcp-oauth-ClRecFEf.js} +1 -1
- package/dist/client/assets/{members-0_y-hP8y.js → members-s0QyCnyJ.js} +1 -1
- package/dist/client/assets/{monaco-editor-C8DVCvK_.js → monaco-editor-CiwloXdm.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Dy60nPc4.js → monitoring-stats-row-TXNzfIxp.js} +1 -1
- package/dist/client/assets/{oauth-callback-rU6P6YYM.js → oauth-callback-DlXFbr-f.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CQlojnmt.js → oauth-callback-ai-provider-p8gLjM7e.js} +1 -1
- package/dist/client/assets/{onboarding-BsFG_79R.js → onboarding-8moQC7Cm.js} +1 -1
- package/dist/client/assets/{org-install-CGnSzU4n.js → org-install-C_oKg9PC.js} +1 -1
- package/dist/client/assets/{org-layout-ayqAcIyF.js → org-layout-B8BfjaU4.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-KLX9VenO.js → org-plugin-layout-DdUf_5AW.js} +1 -1
- package/dist/client/assets/{page-seo-form-DJemjXau.js → page-seo-form-B-I81VJI.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BTkQDLYa.js +1 -0
- package/dist/client/assets/{pair-BriGg-MY.js → pair-BGqqCdXk.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CKqj8hWW.js → plugin-empty-state-DoGTEgJq.js} +1 -1
- package/dist/client/assets/{plugin-header-Dg_-PVfV.js → plugin-header-DkXNWjlz.js} +1 -1
- package/dist/client/assets/{plugin-layout-CFCRHuug.js → plugin-layout-Dp7j6oj5.js} +1 -1
- package/dist/client/assets/{popover-hHdVOt7q.js → popover-D6gDvvex.js} +1 -1
- package/dist/client/assets/{post-editor-DZXsYKGZ.js → post-editor-HrWJufNf.js} +1 -1
- package/dist/client/assets/{primitives-CNx5bddX.js → primitives-BSpEXmPv.js} +1 -1
- package/dist/client/assets/{profile-B3k1aQmn.js → profile-DOJoyq1_.js} +1 -1
- package/dist/client/assets/project-app-view-DfsCN7aU.js +1 -0
- package/dist/client/assets/record-editor-5_5cQlbY.js +1 -0
- package/dist/client/assets/registry-BjxgsC2E.js +2 -0
- package/dist/client/assets/{registry-layout-C9QKLcDQ.js → registry-layout-_dcZP0XL.js} +1 -1
- package/dist/client/assets/{require-capability-D5XZoZnS.js → require-capability-CqCUzyTW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DhqvkBI0.js → required-auth-layout-9YYeY0t9.js} +1 -1
- package/dist/client/assets/{reset-password-D7s0P0GF.js → reset-password-BECGeSUl.js} +1 -1
- package/dist/client/assets/{resizable-BRT-qUaD.js → resizable-DV0pCXfQ.js} +1 -1
- package/dist/client/assets/{roles-CPQyhIdH.js → roles-D14mg7KI.js} +1 -1
- package/dist/client/assets/save-referenced-block-0RMjuyn4.js +1 -0
- package/dist/client/assets/{save-status-D1jAW4JE.js → save-status-DfBuYJH7.js} +1 -1
- package/dist/client/assets/{schema-form-D3MP878L.js → schema-form-CKIpZkBj.js} +1 -1
- package/dist/client/assets/{scroll-area-DKNnXldV.js → scroll-area-CHs0jTz4.js} +1 -1
- package/dist/client/assets/{search-input-BQKJCNNI.js → search-input-DLDVTOcp.js} +1 -1
- package/dist/client/assets/{secrets-J5Pwn3p4.js → secrets-B1ZULRnd.js} +1 -1
- package/dist/client/assets/{sections-editor-rePIiHP9.js → sections-editor-0pqboVrH.js} +1 -1
- package/dist/client/assets/{select-6yI1bUUl.js → select-Dyn5eJ76.js} +1 -1
- package/dist/client/assets/{select-model-z3ovXylT.js → select-model-BNZKyxON.js} +1 -1
- package/dist/client/assets/{seo-editor--9JZnrI6.js → seo-editor-7yhk21tn.js} +1 -1
- package/dist/client/assets/{settings-layout-BKOOm0iL.js → settings-layout-CCjX3a3N.js} +1 -1
- package/dist/client/assets/{settings-section-BDeKU196.js → settings-section-BsU7NnTR.js} +1 -1
- package/dist/client/assets/{sheet-l2LhhOCY.js → sheet-C2l8o7Li.js} +1 -1
- package/dist/client/assets/{shell-controls-BxC6c_cJ.js → shell-controls-Da9F6Uwi.js} +1 -1
- package/dist/client/assets/{shell-layout-DSzgNlpN.js → shell-layout-D-knukkt.js} +1 -1
- package/dist/client/assets/{shell-route-loading-D-NySFQN.js → shell-route-loading-BQnWeFBU.js} +1 -1
- package/dist/client/assets/{sidebar-ZxffB9i3.js → sidebar-DMarnfZA.js} +1 -1
- package/dist/client/assets/{skeleton-DsBtdATm.js → skeleton-CBG5UooE.js} +1 -1
- package/dist/client/assets/{sortable.esm-B7SCN4Iq.js → sortable.esm-B6mcz4jC.js} +1 -1
- package/dist/client/assets/{spinner-DynhmXJb.js → spinner-CZkJwfre.js} +1 -1
- package/dist/client/assets/{sso-Bya3BiB0.js → sso-DlGhVe9T.js} +1 -1
- package/dist/client/assets/{store-C4ZU4zXI.js → store-3PV6elmz.js} +1 -1
- package/dist/client/assets/store-registry-JGeWcmph.js +2 -0
- package/dist/client/assets/{studio-tools-tx_ynP6E.js → studio-tools-DnIG9YV2.js} +1 -1
- package/dist/client/assets/{switch-DWpVVt2b.js → switch-DZavAgGZ.js} +1 -1
- package/dist/client/assets/{tab-id-CGE8BPr3.js → tab-id-BxH9ETDC.js} +1 -1
- package/dist/client/assets/{table-1jrYsVvf.js → table-C6yf7crt.js} +1 -1
- package/dist/client/assets/{tabs-B9aEuz_5.js → tabs-Kstg5esT.js} +1 -1
- package/dist/client/assets/{task-status-BgRp2OfZ.js → task-status-Z_8flBXc.js} +1 -1
- package/dist/client/assets/{textarea-DbtEiAgf.js → textarea-D_FY-WF9.js} +1 -1
- package/dist/client/assets/{toggle-group-BCauVBxS.js → toggle-group-TV66K5Bs.js} +1 -1
- package/dist/client/assets/{toolbar-C9WpnxRP.js → toolbar-CCbum7s0.js} +1 -1
- package/dist/client/assets/{tools-list-C-j8gu56.js → tools-list-De2JTKaU.js} +1 -1
- package/dist/client/assets/{tooltip-CVKtA6h7.js → tooltip-CnO8IxhJ.js} +1 -1
- package/dist/client/assets/{types-Bik0zSxz.js → types-yqsHoQS8.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bf7NstiT.js → use-ai-providers-D41Ncdap.js} +1 -1
- package/dist/client/assets/{use-automations-DQhoL7n_.js → use-automations-Cjo8cUaV.js} +1 -1
- package/dist/client/assets/{use-capability-BekxNShN.js → use-capability-km64e2ng.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CQKT35Lf.js → use-clock-tick-C5MmRZ_O.js} +1 -1
- package/dist/client/assets/{use-collections-DYulUuYs.js → use-collections-Boao6GlT.js} +1 -1
- package/dist/client/assets/{use-connection-DpR6JQF5.js → use-connection-D0BF0adZ.js} +1 -1
- package/dist/client/assets/{use-copy-BhHE-xFV.js → use-copy-94yZW0qP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ZidK7zTv.js → use-create-virtual-mcp-qtUnoDxA.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-2ixaaEOx.js → use-debounced-autosave-Dj71wv9y.js} +1 -1
- package/dist/client/assets/{use-delete-connection-b1BC9mo1.js → use-delete-connection-C5suM6o1.js} +1 -1
- package/dist/client/assets/{use-file-configs-CvNjCdnD.js → use-file-configs-CwuLM8jQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BfpP7RsP.js → use-infinite-scroll-WoD-e-vZ.js} +1 -1
- package/dist/client/assets/{use-list-state-BvQ5j7vs.js → use-list-state-D--hQu1j.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DjqC1nd8.js → use-mcp-client-DnHVNKKy.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Drzzskll.js → use-mcp-prompts-B7lJiQ-b.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BUMls37h.js → use-mcp-tools-Dduxk9LO.js} +1 -1
- package/dist/client/assets/{use-members-BiyrTP5I.js → use-members-YdskzoCL.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B7_UOyHZ.js → use-navigate-to-agent-VVlSVZf7.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BrG8JDW1.js → use-org-auth-client-5GIyjJUc.js} +1 -1
- package/dist/client/assets/{use-org-sso-mx87uCVa.js → use-org-sso-DQRRc4kX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-_Z-_Ox1y.js → use-organization-roles-BJhlkkyb.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BWseGhxw.js → use-organization-settings-BRHmZDz1.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BFZcaU10.js → use-registry-connections-bQBnbYjF.js} +1 -1
- package/dist/client/assets/{use-secrets-C-XHa3-0.js → use-secrets-BYUtrbRD.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D1fVHGXs.js → use-status-sounds-Biot_m4f.js} +1 -1
- package/dist/client/assets/{use-view-mode-DjLpAg7F.js → use-view-mode-B-vBbI_P.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BldCtSoA.js → use-virtual-mcp-kNQ4Vk7l.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DG9NlZam.js +1 -0
- package/dist/client/assets/{useRouterState-BZKGSD2r.js → useRouterState-Clwac4xr.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D1V_0Wrc.js +1 -0
- package/dist/client/assets/{user-Coe1o0e6.js → user-D2dH1j5H.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-GEdPTd_M.js → view-mode-toggle-BVJSd33i.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-C_YrQqjE.js → watch-sse-pool-D12zGFzz.js} +1 -1
- package/dist/client/assets/{workflow-ZbQ4bKoz.js → workflow-B3YzgEYC.js} +1 -1
- package/dist/client/assets/workflow-detail-CXTSi8aj.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-DOKG-0MP.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-CKBDifRl.js +0 -1
- package/dist/client/assets/page-seo-sheet-CnqIZbrb.js +0 -1
- package/dist/client/assets/project-app-view-B-NllsZl.js +0 -1
- package/dist/client/assets/record-editor-DxhzZA73.js +0 -1
- package/dist/client/assets/registry-D_rElF24.js +0 -2
- package/dist/client/assets/save-referenced-block-VHJ6rXLi.js +0 -1
- package/dist/client/assets/store-registry-WPLrtDu9.js +0 -2
- package/dist/client/assets/useInfiniteQuery-aPUoKLwo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CuHxM8XU.js +0 -1
- package/dist/client/assets/workflow-detail-DEuNJrY-.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-DEUVODq9.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as o,o as T,r as N,O as D}from"./index-ChdATVAA.js";import{u as z,S as E,a as I,b as L}from"./sidebar-ZxffB9i3.js";import{T as M,a as O,b as A,u as P}from"./tooltip-CVKtA6h7.js";import{S as $,a as W,b as B}from"./shell-route-loading-D-NySFQN.js";import{u as X,C as H}from"./chat-context-CQJ83DKW.js";import{T as F}from"./tab-id-CGE8BPr3.js";import{i as q}from"./Monitor01-B2V0QJVA.js";import{v as G,C as K}from"./connect-desktop-dialog-CkEEvZPz.js";import{T as Y,a as b}from"./toolbar-C9WpnxRP.js";import{S as U,M as J}from"./shell-controls-BxC6c_cJ.js";import"./LayoutLeft-C3u21iqS.js";import"./sheet-l2LhhOCY.js";import"./X-DcDNiBgo.js";import"./useRouterState-BZKGSD2r.js";import"./ZoomOut-m5WCE6Ow.js";import"./skeleton-DsBtdATm.js";import"./popover-hHdVOt7q.js";import"./drawer-BrCENAAY.js";import"./SearchMd-BdcI0VcO.js";import"./Star01-Du_V1z61.js";import"./Plus-D-k489Hw.js";import"./use-mcp-client-DjqC1nd8.js";import"./auth-Rhn0UUKX.js";import"./use-virtual-mcp-BldCtSoA.js";import"./use-collections-DYulUuYs.js";import"./use-create-virtual-mcp-ZidK7zTv.js";import"./use-navigate-to-agent-B7_UOyHZ.js";import"./github-repo-picker-BciViNc8.js";import"./use-connection-DpR6JQF5.js";import"./dialog-pxIgcxdx.js";import"./RefreshCcw01-0Z7TeT1O.js";import"./collection-search-q3LrsDP0.js";import"./checkbox-Eb0jgSAR.js";import"./Check-BmF1hQRY.js";import"./agent-icon-MPxc_53p.js";import"./AlertCircle-BU9gj1Zb.js";import"./Tool01-yFL5Dn59.js";import"./SwitchHorizontal01-BRvArA9H.js";import"./XCircle-e29W-Gcn.js";import"./ArrowUpRight-D2O4sQl3.js";import"./ZapSquare-CvMxvmoA.js";import"./Users03-CmfKEZdY.js";import"./CheckCircle-C4XwcfjN.js";import"./ChevronDown-BIO7wba7.js";import"./ChevronLeft-CW2G6JyB.js";import"./ChevronRight-CwhL8zaw.js";import"./ChevronUp-DdLEv_cl.js";import"./DotsVertical-DQMFAww2.js";import"./Container-Dyf0TzBH.js";import"./Eye-Bi1ejTfS.js";import"./Globe01-DF9PUq9k.js";import"./FilterLines-jWyOgIfr.js";import"./Palette-CvjTgNao.js";import"./HardDrive-BIzpSh2R.js";import"./Stars02-CpPe-VPg.js";import"./Key01-DJaxTkjl.js";import"./LinkExternal01-D7mXn_q6.js";import"./Sun-C3Zhz8pG.js";import"./Play-6yxi-kVu.js";import"./Settings02-C6hr8Qy9.js";import"./Shield01-DOB3vgca.js";import"./Stars01-BAC8f8eM.js";import"./Trash01-Br13J6pg.js";import"./Upload01-D4q_2hTt.js";import"./User01-BtejVxVG.js";import"./Users01-Dy4pn4ki.js";import"./XClose-D4RzaaY5.js";import"./Zap-Cp6OTaVi.js";import"./mcp-oauth-BeZ96noC.js";import"./use-mcp-tools-BUMls37h.js";import"./extract-connection-data-16MvAzOh.js";import"./generate-id-B0UU4AyI.js";import"./collections-DjlDVd1Q.js";import"./shell-layout-DSzgNlpN.js";import"./avatar-DgWkRz32.js";import"./required-auth-layout-DhqvkBI0.js";import"./use-organization-settings-BWseGhxw.js";import"./use-org-sso-mx87uCVa.js";import"./alert-dialog-DAZnJbEa.js";import"./form-DsGRrH4I.js";import"./label-CGY9toLT.js";import"./input-BZ-4l6sv.js";import"./spinner-DynhmXJb.js";import"./index-xNHaP-xT.js";import"./sortable.esm-B7SCN4Iq.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DqPMpeMB.js";import"./use-registry-connections-BFZcaU10.js";import"./useInfiniteQuery-aPUoKLwo.js";import"./use-infinite-scroll-BfpP7RsP.js";import"./card-DV2a7ud0.js";import"./integration-icon-LHjd4NGc.js";import"./collection-tabs-CvaARsvN.js";import"./badge-Ckvq5EMT.js";import"./select-6yI1bUUl.js";import"./textarea-DbtEiAgf.js";import"./connection-form-helpers-B6xP1FXS.js";import"./useSuspenseInfiniteQuery-CuHxM8XU.js";import"./studio-tools-tx_ynP6E.js";import"./use-ai-providers-Bf7NstiT.js";import"./command--rBvALtU.js";import"./index-BKFf6V9A.js";import"./use-org-auth-client-BrG8JDW1.js";import"./hover-card-DfhDOin0.js";import"./task-status-BgRp2OfZ.js";import"./use-clock-tick-CQKT35Lf.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./watch-sse-pool-C_YrQqjE.js";import"./decopilot-sse-pool-CKBDifRl.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function lo(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{lo as default};
|
|
1
|
+
import{e as k,j as o,o as T,r as N,O as D}from"./index-DEUVODq9.js";import{u as z,S as E,a as I,b as L}from"./sidebar-DMarnfZA.js";import{T as M,a as O,b as A,u as P}from"./tooltip-CnO8IxhJ.js";import{S as $,a as W,b as B}from"./shell-route-loading-BQnWeFBU.js";import{u as X,C as H}from"./chat-context-BG_brbim.js";import{T as F}from"./tab-id-BxH9ETDC.js";import{i as q}from"./Monitor01-6PVrucyX.js";import{v as G,C as K}from"./connect-desktop-dialog-BHttcPxA.js";import{T as Y,a as b}from"./toolbar-CCbum7s0.js";import{S as U,M as J}from"./shell-controls-Da9F6Uwi.js";import"./LayoutLeft-Cy-bGbAH.js";import"./sheet-C2l8o7Li.js";import"./X-BUzk9ZuQ.js";import"./useRouterState-Clwac4xr.js";import"./ZoomOut-DfX9NmNO.js";import"./skeleton-CBG5UooE.js";import"./popover-D6gDvvex.js";import"./drawer-CSp117Rg.js";import"./SearchMd-BnZZ5mEU.js";import"./Star01-CjQzvxTy.js";import"./Plus-DW_pro4F.js";import"./use-mcp-client-DnHVNKKy.js";import"./auth-StjmYjna.js";import"./use-virtual-mcp-kNQ4Vk7l.js";import"./use-collections-Boao6GlT.js";import"./use-create-virtual-mcp-qtUnoDxA.js";import"./use-navigate-to-agent-VVlSVZf7.js";import"./github-repo-picker-BXMy0hpf.js";import"./use-connection-D0BF0adZ.js";import"./dialog-FBdtBd0W.js";import"./RefreshCcw01-B9XxpyTk.js";import"./collection-search-BEvxyUp1.js";import"./checkbox-BjUgAWJu.js";import"./Check-CFZ7jofS.js";import"./agent-icon-CV7VKepg.js";import"./AlertCircle-DU4Czymb.js";import"./Tool01-BKl-GVq3.js";import"./SwitchHorizontal01-BQBOH6Au.js";import"./XCircle-8_cOsjUY.js";import"./ArrowUpRight-jvt9_jPs.js";import"./ZapSquare-Dj9sWt3u.js";import"./Users03-DH-6SNzV.js";import"./CheckCircle-B7_GaGqy.js";import"./ChevronDown-CMnvnfNH.js";import"./ChevronLeft-BLmY09V7.js";import"./ChevronRight-DtVYtVbK.js";import"./ChevronUp-BYxSfj4f.js";import"./DotsVertical-7ebFkKLD.js";import"./Container-CQcCiGBy.js";import"./Eye-CYtfD-C-.js";import"./Globe01-bYDzICLJ.js";import"./FilterLines-BtiGzXwl.js";import"./Palette-8PqtgYqw.js";import"./HardDrive-gxQ66xi3.js";import"./Stars02-COgJsT25.js";import"./Key01-CDcV65YU.js";import"./LinkExternal01-BDXPmxri.js";import"./Sun-BFeAvEQf.js";import"./Play-B0CTz7-g.js";import"./Settings02-BzBPnOVl.js";import"./Shield01-CUegYioy.js";import"./Stars01-BBldOY4r.js";import"./Trash01-BfygLm6s.js";import"./Upload01-ClElEXYw.js";import"./User01-Bi6i4zOy.js";import"./Users01-BXIkeJej.js";import"./XClose-CCKAliKU.js";import"./Zap-DMSK7ZyR.js";import"./mcp-oauth-ClRecFEf.js";import"./use-mcp-tools-Dduxk9LO.js";import"./extract-connection-data-D9Xe4stq.js";import"./generate-id-CKNg3Kb_.js";import"./collections-DGui_rw4.js";import"./shell-layout-D-knukkt.js";import"./avatar-ItW7yKah.js";import"./required-auth-layout-9YYeY0t9.js";import"./use-organization-settings-BRHmZDz1.js";import"./use-org-sso-DQRRc4kX.js";import"./alert-dialog-CjyXYSQZ.js";import"./form-BKRU3_f0.js";import"./label-CxhkSBar.js";import"./input-CkGEzOB_.js";import"./spinner-CZkJwfre.js";import"./index-DGguhABr.js";import"./sortable.esm-B6mcz4jC.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DNd6JwtE.js";import"./use-registry-connections-bQBnbYjF.js";import"./useInfiniteQuery-DG9NlZam.js";import"./use-infinite-scroll-WoD-e-vZ.js";import"./card-B0-N4bpb.js";import"./integration-icon-D3LrOIav.js";import"./collection-tabs-DM_bzUmO.js";import"./badge-Bw9vN6fg.js";import"./select-Dyn5eJ76.js";import"./textarea-D_FY-WF9.js";import"./connection-form-helpers-C-CDw2oQ.js";import"./useSuspenseInfiniteQuery-D1V_0Wrc.js";import"./studio-tools-DnIG9YV2.js";import"./use-ai-providers-D41Ncdap.js";import"./command-CSF0stL5.js";import"./index-wos7zFLb.js";import"./use-org-auth-client-5GIyjJUc.js";import"./hover-card-dEUH7y9z.js";import"./task-status-Z_8flBXc.js";import"./use-clock-tick-C5MmRZ_O.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./watch-sse-pool-D12zGFzz.js";import"./decopilot-sse-pool-yovdq4PK.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function lo(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{lo as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as S,r as E,j as t,m as J,B as T,K as M,c as Y,f as Ce,d as Se,E as re,p as $e,F as Ge,z as Xe,n as I}from"./index-
|
|
1
|
+
import{e as S,r as E,j as t,m as J,B as T,K as M,c as Y,f as Ce,d as Se,E as re,p as $e,F as Ge,z as Xe,n as I}from"./index-DEUVODq9.js";import{i as Qe}from"./ChevronRight-DtVYtVbK.js";import{s as De}from"./Eye-CYtfD-C-.js";import{n as ae,i as We}from"./Globe01-bYDzICLJ.js";import{i as Ye,c as Ze}from"./ZoomOut-DfX9NmNO.js";import{s as Je}from"./Plus-DW_pro4F.js";import{t as et}from"./Stars01-BBldOY4r.js";import{i as ze}from"./Upload01-ClElEXYw.js";import{b as K,T as V,a as q,u as Fe}from"./tooltip-CnO8IxhJ.js";import{A as tt,a as lt,b as st,c as nt,d as it,e as rt,f as ot,g as at}from"./alert-dialog-CjyXYSQZ.js";import{c as Z,D as ce,a as de,f as ct,b as dt,e as ft,d as mt}from"./dialog-FBdtBd0W.js";import{I as ut}from"./input-CkGEzOB_.js";import{S as H}from"./skeleton-CBG5UooE.js";import{F as A,d as _e,M as ht}from"./file-type-icon-BAmjNPBc.js";import{a as xt}from"./toolbar-CCbum7s0.js";import{i as Oe,j as Pe,H as Te,k as Ue,h as Ae,f as fe,F as Ee,a as me,m as Me,l as pt,u as ye,b as jt,n as Le,o as gt}from"./header-tab-button-CRRaGYWH.js";import{i as ue}from"./DotsVertical-7ebFkKLD.js";import{s as he}from"./Trash01-BfygLm6s.js";import{i as Re}from"./Zap-DMSK7ZyR.js";import{a as xe,c as X,b as pe,D as je}from"./dropdown-menu-BUlN28jb.js";import{R as ve,a as bt,b as yt}from"./resizable-DV0pCXfQ.js";import{n as Be}from"./LinkExternal01-BDXPmxri.js";import{s as Ie}from"./XClose-CCKAliKU.js";import{i as vt}from"./X-BUzk9ZuQ.js";import"./Check-CFZ7jofS.js";import"./ChevronLeft-BLmY09V7.js";import"./index-CwjMi0Lt.js";import"./LayoutLeft-Cy-bGbAH.js";const wt=new Set(["output","upload","public","home"]),Nt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function kt(l){return wt.has(l)||!Nt.test(l)?"home":l}function Ct(l){const e=S.c(33);let s,i,o;e[0]!==l?({glyph:s,readOnly:o,...i}=l,e[0]=l,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);const c=E.useId(),r=`${c}-back`,a=`${c}-front`,n=`url(#${r})`;let d;e[4]!==n?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:n}),e[4]=n,e[5]=d):d=e[5];const m=`url(#${a})`;let f;e[6]!==m?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:m}),e[6]=m,e[7]=f):f=e[7];let u,g,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),g=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),b=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=u,e[9]=g,e[10]=b):(u=e[8],g=e[9],b=e[10]);let p;e[11]!==s?(p=s&&t.jsx(s,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=s,e[12]=p):p=e[12];let x;e[13]!==o?(x=o&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(De,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=o,e[14]=x):x=e[14];let h,N;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),N=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=h,e[16]=N):(h=e[15],N=e[16]);let v;e[17]!==r?(v=t.jsxs("linearGradient",{id:r,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[h,N]}),e[17]=r,e[18]=v):v=e[18];let w,j;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("stop",{stopColor:"#72B6FA"}),j=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=w,e[20]=j):(w=e[19],j=e[20]);let C;e[21]!==a?(C=t.jsxs("radialGradient",{id:a,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[w,j]}),e[21]=a,e[22]=C):C=e[22];let k;e[23]!==v||e[24]!==C?(k=t.jsxs("defs",{children:[v,C]}),e[23]=v,e[24]=C,e[25]=k):k=e[25];let $;return e[26]!==i||e[27]!==k||e[28]!==d||e[29]!==f||e[30]!==p||e[31]!==x?($=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,u,g,b,p,x,k]}),e[26]=i,e[27]=k,e[28]=d,e[29]=f,e[30]=p,e[31]=x,e[32]=$):$=e[32],$}function St(l){const e={};for(const s of l.split(`
|
|
2
2
|
`)){const i=s.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function we(l){for(const e of l.split(/\n\s*\n/)){const s=e.trim();if(!(!s||s.startsWith("#")))return s.replace(/\n/g," ")}return null}function He(l){const e=l.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:we(l),body:l};const s=St(e[1]),i=l.slice(e[0].length);return{name:s.name||null,description:s.description||we(i),body:i}}const $t=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Dt=new Set(["csv","tsv"]),zt=new Set(["mp4","webm","mov","m4v"]),Ft=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),_t=256*1024;function ee(l){const e=new Date(l);if(Number.isNaN(e.getTime()))return"";const s=Date.now()-e.getTime(),i=Math.floor(s/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const o=Math.floor(i/60);if(o<24)return`${o}h ago`;const c=Math.floor(o/24);return c<30?`${c}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ot(l){return l.split(".").pop()?.toLowerCase()??""}function Ke(l){const e=S.c(15),{downloadUrl:s,filename:i,onDelete:o}=l,c=`Actions for ${i}`;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ue,{size:14}),e[0]=r):r=e[0];let a;e[1]!==c?(a=t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Tt,"aria-label":c,children:r})}),e[1]=c,e[2]=a):a=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ae,{size:14}),e[3]=n):n=e[3];let d;e[4]!==s||e[5]!==i?(d=t.jsx(X,{asChild:!0,children:t.jsxs("a",{href:s,download:i,children:[n,"Download"]})}),e[4]=s,e[5]=i,e[6]=d):d=e[6];let m;e[7]!==o?(m=o&&t.jsxs(X,{variant:"destructive",onClick:o,children:[t.jsx(he,{size:14}),"Delete"]}),e[7]=o,e[8]=m):m=e[8];let f;e[9]!==d||e[10]!==m?(f=t.jsxs(pe,{align:"end",onClick:Pt,children:[d,m]}),e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==a||e[13]!==f?(u=t.jsxs(je,{children:[a,f]}),e[12]=a,e[13]=f,e[14]=u):u=e[14],u}function Pt(l){return l.stopPropagation()}function Tt(l){return l.stopPropagation()}function te(l){const e=S.c(9),{onOpen:s,children:i,className:o}=l;let c;e[0]!==s?(c=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),s())},e[0]=s,e[1]=c):c=e[1];let r;e[2]!==o?(r=Y("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",o),e[2]=o,e[3]=r):r=e[3];let a;return e[4]!==i||e[5]!==s||e[6]!==c||e[7]!==r?(a=t.jsx("div",{role:"button",tabIndex:0,onClick:s,onKeyDown:c,className:r,children:i}),e[4]=i,e[5]=s,e[6]=c,e[7]=r,e[8]=a):a=e[8],a}function le(l){const e=S.c(16),{icon:s,name:i,meta:o,subtitle:c,actions:r}=l;let a;e[0]!==i?(a=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==o?(n=o&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=n):n=e[3];let d;e[4]!==a||e[5]!==n?(d=t.jsxs("div",{className:"flex items-start gap-3",children:[a,n]}),e[4]=a,e[5]=n,e[6]=d):d=e[6];let m;e[7]!==c?(m=c&&t.jsx("span",{className:"text-xs text-muted-foreground",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==d||e[10]!==m?(f=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[d,m]}),e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==r||e[13]!==s||e[14]!==f?(u=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[s,f,r]}),e[12]=r,e[13]=s,e[14]=f,e[15]=u):u=e[15],u}function se(l){const e=S.c(15),{name:s,meta:i,subtitle:o,glyph:c,readOnly:r,onOpen:a,onDelete:n}=l;let d;e[0]!==c||e[1]!==r?(d=t.jsx(Ct,{glyph:c,readOnly:r,className:"size-8 shrink-0"}),e[0]=c,e[1]=r,e[2]=d):d=e[2];let m;e[3]!==s||e[4]!==n?(m=n?t.jsxs(je,{children:[t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:At,"aria-label":`Actions for ${s}`,children:t.jsx(ue,{size:14})})}),t.jsx(pe,{align:"end",onClick:Ut,children:t.jsxs(X,{variant:"destructive",onClick:n,children:[t.jsx(he,{size:14}),"Delete"]})})]}):void 0,e[3]=s,e[4]=n,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==m?(f=t.jsx(le,{icon:d,name:s,meta:i,subtitle:o,actions:m}),e[6]=i,e[7]=s,e[8]=o,e[9]=d,e[10]=m,e[11]=f):f=e[11];let u;return e[12]!==a||e[13]!==f?(u=t.jsx(te,{onOpen:a,children:f}),e[12]=a,e[13]=f,e[14]=u):u=e[14],u}function Ut(l){return l.stopPropagation()}function At(l){return l.stopPropagation()}function Ve(l){const e=S.c(19),{filename:s,updatedAt:i,downloadUrl:o,onOpen:c,onDelete:r}=l;let a;e[0]!==s?(a=t.jsx(A,{filename:s,className:"h-8 w-6.5 shrink-0"}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==i?(n=ee(i),e[2]=i,e[3]=n):n=e[3];let d;e[4]!==s?(d=_e(s),e[4]=s,e[5]=d):d=e[5];let m;e[6]!==o||e[7]!==s||e[8]!==r?(m=t.jsx(Ke,{downloadUrl:o,filename:s,onDelete:r}),e[6]=o,e[7]=s,e[8]=r,e[9]=m):m=e[9];let f;e[10]!==s||e[11]!==a||e[12]!==n||e[13]!==d||e[14]!==m?(f=t.jsx(le,{icon:a,name:s,meta:n,subtitle:d,actions:m}),e[10]=s,e[11]=a,e[12]=n,e[13]=d,e[14]=m,e[15]=f):f=e[15];let u;return e[16]!==c||e[17]!==f?(u=t.jsx(te,{onOpen:c,children:f}),e[16]=c,e[17]=f,e[18]=u):u=e[18],u}function Et(l){const e=S.c(36),{dirName:s,updatedAt:i,skillMdUrl:o,onOpen:c,onBrowse:r,onDelete:a}=l;let n;e[0]!==o?(n=M.fileText(o),e[0]=o,e[1]=n):n=e[1];let d;e[2]!==o?(d=async()=>{const F=await fetch(o,{credentials:"include"});if(!F.ok)throw new Error(`fetch failed: ${F.status}`);return F.text()},e[2]=o,e[3]=d):d=e[3];let m;e[4]!==n||e[5]!==d?(m={queryKey:n,queryFn:d,staleTime:6e4,retry:!1},e[4]=n,e[5]=d,e[6]=m):m=e[6];const{data:f}=J(m);let u;e[7]!==f?(u=f?He(f):null,e[7]=f,e[8]=u):u=e[8];const g=u;let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Re,{size:16})}),e[9]=b):b=e[9];const p=g?.name??s;let x;e[10]!==i?(x=ee(i),e[10]=i,e[11]=x):x=e[11];const h=`Actions for ${s}`;let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ue,{size:14}),e[12]=N):N=e[12];let v;e[13]!==h?(v=t.jsx(xe,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Lt,"aria-label":h,children:N})}),e[13]=h,e[14]=v):v=e[14];let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Ye,{size:14}),e[15]=w):w=e[15];let j;e[16]!==r?(j=t.jsxs(X,{onClick:r,children:[w,"Browse files"]}),e[16]=r,e[17]=j):j=e[17];let C;e[18]!==a?(C=a&&t.jsxs(X,{variant:"destructive",onClick:a,children:[t.jsx(he,{size:14}),"Delete"]}),e[18]=a,e[19]=C):C=e[19];let k;e[20]!==j||e[21]!==C?(k=t.jsxs(pe,{align:"end",onClick:Mt,children:[j,C]}),e[20]=j,e[21]=C,e[22]=k):k=e[22];let $;e[23]!==v||e[24]!==k?($=t.jsxs(je,{children:[v,k]}),e[23]=v,e[24]=k,e[25]=$):$=e[25];let z;e[26]!==$||e[27]!==p||e[28]!==x?(z=t.jsx(le,{icon:b,name:p,meta:x,subtitle:"Skill",actions:$}),e[26]=$,e[27]=p,e[28]=x,e[29]=z):z=e[29];const P=g?.description??"";let D;e[30]!==P?(D=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:P}),e[30]=P,e[31]=D):D=e[31];let y;return e[32]!==c||e[33]!==z||e[34]!==D?(y=t.jsxs(te,{onOpen:c,children:[z,D]}),e[32]=c,e[33]=z,e[34]=D,e[35]=y):y=e[35],y}function Mt(l){return l.stopPropagation()}function Lt(l){return l.stopPropagation()}function oe(l){const e=S.c(4),{children:s}=l,[i,o]=E.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n=>{if(!n)return;const d=new IntersectionObserver(m=>{const[f]=m;f?.isIntersecting&&(o(!0),d.disconnect())},{rootMargin:"200px"});d.observe(n)},e[0]=c):c=e[0];const[r]=E.useState(c);if(i){let n;return e[1]!==s?(n=t.jsx(t.Fragment,{children:s}),e[1]=s,e[2]=n):n=e[2],n}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{ref:r,className:"h-full w-full"}),e[3]=a):a=e[3],a}function Rt(l){const e=S.c(11),{url:s}=l;let i;e[0]!==s?(i=M.fileText(s),e[0]=s,e[1]=i):i=e[1];let o;e[2]!==s?(o=async()=>{const d=await fetch(s,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=s,e[3]=o):o=e[3];let c;e[4]!==i||e[5]!==o?(c={queryKey:i,queryFn:o,staleTime:6e4,retry:!1},e[4]=i,e[5]=o,e[6]=c):c=e[6];const{data:r}=J(c);if(!r)return null;let a;e[7]!==r?(a=r.slice(0,2e3),e[7]=r,e[8]=a):a=e[8];let n;return e[9]!==a?(n=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:a}),e[9]=a,e[10]=n):n=e[10],n}function Bt(l){const e=S.c(23),{url:s,ext:i}=l;let o;e[0]!==s?(o=M.csvThumb(s),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==s?(c=async()=>{const x=await fetch(s,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!x.ok)throw new Error(`fetch failed: ${x.status}`);return x.text()},e[2]=s,e[3]=c):c=e[3];let r;e[4]!==o||e[5]!==c?(r={queryKey:o,queryFn:c,staleTime:6e4,retry:!1},e[4]=o,e[5]=c,e[6]=r):r=e[6];const{data:a}=J(r);if(!a)return null;const n=i==="tsv"?" ":",";let d,m,f,u;if(e[7]!==a||e[8]!==n){u=Symbol.for("react.early_return_sentinel");e:{let x;e[13]!==n?(x=N=>N.split(n).slice(0,6).map(Kt),e[13]=n,e[14]=x):x=e[14];const h=a.split(`
|
|
3
3
|
`).filter(Boolean).slice(0,7).map(x);if(h.length===0){u=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",m="w-full border-collapse",d=h.map(It)}e[7]=a,e[8]=n,e[9]=d,e[10]=m,e[11]=f,e[12]=u}else d=e[9],m=e[10],f=e[11],u=e[12];if(u!==Symbol.for("react.early_return_sentinel"))return u;let g;e[15]!==d?(g=t.jsx("tbody",{children:d}),e[15]=d,e[16]=g):g=e[16];let b;e[17]!==m||e[18]!==g?(b=t.jsx("table",{className:m,children:g}),e[17]=m,e[18]=g,e[19]=b):b=e[19];let p;return e[20]!==f||e[21]!==b?(p=t.jsx("div",{className:f,children:b}),e[20]=f,e[21]=b,e[22]=p):p=e[22],p}function It(l,e){return t.jsx("tr",{className:Y(e===0&&"bg-muted/50 font-medium"),children:l.map(Ht)},e)}function Ht(l,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:l})},e)}function Kt(l){return l.trim().replace(/^"|"$/g,"")}function Vt(l){const e=S.c(14),{filename:s,size:i,downloadUrl:o}=l;let c;if(e[0]!==o||e[1]!==s||e[2]!==i){const r=Ot(s);let a;if($t.has(r)){let n;e[4]!==o?(n=t.jsx("img",{src:o,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=o,e[5]=n):n=e[5],a=n}else if(zt.has(r)){const n=`${o}#t=0.1`;let d;e[6]!==n?(d=t.jsx(oe,{children:t.jsx("video",{src:n,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=n,e[7]=d):d=e[7],a=d}else if(r==="pdf"){let n;e[8]!==s?(n=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(A,{filename:s,className:"h-14 w-11 opacity-60"})}),e[8]=s,e[9]=n):n=e[9],a=n}else if(Dt.has(r))a=t.jsx(oe,{children:t.jsx(Bt,{url:o,ext:r})});else if(Ft.has(r)&&i<=_t){let n;e[10]!==o?(n=t.jsx(oe,{children:t.jsx(Rt,{url:o})}),e[10]=o,e[11]=n):n=e[11],a=n}else{let n;e[12]!==s?(n=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(A,{filename:s,className:"h-14 w-11 opacity-60"})}),e[12]=s,e[13]=n):n=e[13],a=n}c=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:a}),e[0]=o,e[1]=s,e[2]=i,e[3]=c}else c=e[3];return c}function qt(l){const e=S.c(24),s=l.onOpen;let i;e[0]!==l.filename?(i=t.jsx(A,{filename:l.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=l.filename,e[1]=i):i=e[1];const o=l.filename;let c;e[2]!==l.updatedAt?(c=ee(l.updatedAt),e[2]=l.updatedAt,e[3]=c):c=e[3];let r;e[4]!==l.filename?(r=_e(l.filename),e[4]=l.filename,e[5]=r):r=e[5];let a;e[6]!==l.downloadUrl||e[7]!==l.filename||e[8]!==l.onDelete?(a=t.jsx(Ke,{downloadUrl:l.downloadUrl,filename:l.filename,onDelete:l.onDelete}),e[6]=l.downloadUrl,e[7]=l.filename,e[8]=l.onDelete,e[9]=a):a=e[9];let n;e[10]!==l.filename||e[11]!==i||e[12]!==c||e[13]!==r||e[14]!==a?(n=t.jsx(le,{icon:i,name:o,meta:c,subtitle:r,actions:a}),e[10]=l.filename,e[11]=i,e[12]=c,e[13]=r,e[14]=a,e[15]=n):n=e[15];let d;e[16]!==l.downloadUrl||e[17]!==l.filename||e[18]!==l.size?(d=t.jsx(Vt,{filename:l.filename,size:l.size,downloadUrl:l.downloadUrl}),e[16]=l.downloadUrl,e[17]=l.filename,e[18]=l.size,e[19]=d):d=e[19];let m;return e[20]!==l.onOpen||e[21]!==n||e[22]!==d?(m=t.jsxs(te,{onOpen:s,children:[n,d]}),e[20]=l.onOpen,e[21]=n,e[22]=d,e[23]=m):m=e[23],m}function ne(l){const e=l?l.split("/").filter(Boolean):[],s=e[0]==="public",i=s?e[1]??null:null,o=s?i?`public-${i}`:null:e[0]??null,c=(s?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:c,isPublic:s,publicSet:i,readOnly:s}}function W(l,e){return l.isPublic&&l.publicSet?`public/${l.publicSet}/${e}`:l.volume?`${l.volume}/${e}`:e}function O(l){const e=l.lastIndexOf("/");return e===-1?l:l.slice(e+1)}const Gt=l=>/\.html?$/i.test(l);function Xt(l){const e=S.c(26),{previewPath:s,onClose:i}=l;let o;e[0]!==s?(o=ne(s),e[0]=s,e[1]=o):o=e[1];const c=o,{volume:r,dirPath:a}=c,{data:n,isPending:d}=Oe(r,a),m=Pe(r??"");let f,u,g,b,p,x;if(e[2]!==m||e[3]!==n||e[4]!==a||e[5]!==d||e[6]!==i||e[7]!==s||e[8]!==r){const v=O(a),w=n&&n.kind==="file"?{key:s,filename:v,size:n.size,downloadUrl:m(n.path)}:null;u=ce,p=!0,e[15]!==i?(x=j=>{j||i()},e[15]=i,e[16]=x):x=e[16],f=de,g="flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",b=w&&n&&Gt(v)?t.jsxs(t.Fragment,{children:[t.jsx(Z,{className:"sr-only",children:v}),t.jsx(Te,{readUrl:w.downloadUrl,marker:Ue(n),title:v,savePath:r==="home"?a:void 0,trailing:t.jsx("div",{className:"w-8 shrink-0"})},s)]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border/60 py-1 pr-12 pl-2",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[t.jsx(A,{filename:v,className:"h-4.5 w-3.5 shrink-0"}),t.jsx(Z,{className:"truncate text-xs font-medium text-foreground",children:v}),w&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Ae(w.size)})]}),w&&t.jsxs(t.Fragment,{children:[t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:w.downloadUrl,download:w.filename,children:t.jsx(ae,{size:14})})})}),t.jsx(q,{side:"bottom",children:"Download"})]}),t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:()=>window.open(w.downloadUrl,"_blank","noopener"),children:t.jsx(Be,{size:14})})}),t.jsx(q,{side:"bottom",children:"Open in new tab"})]})]})]}),t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:w?t.jsx(fe,{file:w}):d?t.jsx(Ee,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(A,{filename:v,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})})]}),e[2]=m,e[3]=n,e[4]=a,e[5]=d,e[6]=i,e[7]=s,e[8]=r,e[9]=f,e[10]=u,e[11]=g,e[12]=b,e[13]=p,e[14]=x}else f=e[9],u=e[10],g=e[11],b=e[12],p=e[13],x=e[14];let h;e[17]!==f||e[18]!==g||e[19]!==b?(h=t.jsx(f,{className:g,children:b}),e[17]=f,e[18]=g,e[19]=b,e[20]=h):h=e[20];let N;return e[21]!==u||e[22]!==p||e[23]!==x||e[24]!==h?(N=t.jsx(u,{open:p,onOpenChange:x,children:h}),e[21]=u,e[22]=p,e[23]=x,e[24]=h,e[25]=N):N=e[25],N}const Qt=l=>/\.html?$/i.test(l);function Wt(l){const e=S.c(6),{onClose:s}=l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ie,{size:14}),e[0]=i):i=e[0];let o;e[1]!==s?(o=t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:s,children:i})}),e[1]=s,e[2]=o):o=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(q,{side:"bottom",children:"Close"}),e[3]=c):c=e[3];let r;return e[4]!==o?(r=t.jsxs(K,{children:[o,c]}),e[4]=o,e[5]=r):r=e[5],r}function Yt(l){const e=S.c(49),{previewPath:s,onClose:i}=l;let o;e[0]!==s?(o=ne(s),e[0]=s,e[1]=o):o=e[1];const c=o,{volume:r,dirPath:a}=c,{data:n,isPending:d}=Oe(r,a),m=Pe(r??"");let f,u,g,b,p,x,h,N,v;if(e[2]!==m||e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==s||e[7]!==r){v=Symbol.for("react.early_return_sentinel");e:{if(u=O(a),f=n&&n.kind==="file"?{key:s,filename:u,size:n.size,downloadUrl:m(n.path)}:null,f&&n&&Qt(u)){const F=f.downloadUrl;let U;e[17]!==n?(U=Ue(n),e[17]=n,e[18]=U):U=e[18];let B;e[19]!==i?(B=t.jsx(Wt,{onClose:i}),e[19]=i,e[20]=B):B=e[20],v=t.jsx(Te,{readUrl:F,marker:U,title:u,savePath:r==="home"?a:void 0,trailing:B},s);break e}N="flex h-full w-full flex-col bg-background",h="flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",g="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(A,{filename:u,className:"h-4.5 w-3.5 shrink-0"}),e[21]!==u?(p=t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:u}),e[21]=u,e[22]=p):p=e[22],x=f&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Ae(f.size)})}e[2]=m,e[3]=n,e[4]=a,e[5]=i,e[6]=s,e[7]=r,e[8]=f,e[9]=u,e[10]=g,e[11]=b,e[12]=p,e[13]=x,e[14]=h,e[15]=N,e[16]=v}else f=e[8],u=e[9],g=e[10],b=e[11],p=e[12],x=e[13],h=e[14],N=e[15],v=e[16];if(v!==Symbol.for("react.early_return_sentinel"))return v;let w;e[23]!==g||e[24]!==b||e[25]!==p||e[26]!==x?(w=t.jsxs("div",{className:g,children:[b,p,x]}),e[23]=g,e[24]=b,e[25]=p,e[26]=x,e[27]=w):w=e[27];let j;e[28]!==f?(j=f&&t.jsxs(t.Fragment,{children:[t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:f.downloadUrl,download:f.filename,children:t.jsx(ae,{size:14})})})}),t.jsx(q,{side:"bottom",children:"Download"})]}),t.jsxs(K,{children:[t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:()=>window.open(f.downloadUrl,"_blank","noopener"),children:t.jsx(Be,{size:14})})}),t.jsx(q,{side:"bottom",children:"Open in new tab"})]})]}),e[28]=f,e[29]=j):j=e[29];let C;e[30]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ie,{size:14}),e[30]=C):C=e[30];let k;e[31]!==i?(k=t.jsx(V,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",onClick:i,children:C})}),e[31]=i,e[32]=k):k=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(q,{side:"bottom",children:"Close"}),e[33]=$):$=e[33];let z;e[34]!==k?(z=t.jsxs(K,{children:[k,$]}),e[34]=k,e[35]=z):z=e[35];let P;e[36]!==j||e[37]!==z||e[38]!==h||e[39]!==w?(P=t.jsxs("div",{className:h,children:[w,j,z]}),e[36]=j,e[37]=z,e[38]=h,e[39]=w,e[40]=P):P=e[40];let D;e[41]!==f||e[42]!==u||e[43]!==d?(D=t.jsx("div",{className:"relative min-h-0 flex-1",children:f?t.jsx(fe,{file:f}):d?t.jsx(Ee,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(A,{filename:u,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[41]=f,e[42]=u,e[43]=d,e[44]=D):D=e[44];let y;return e[45]!==P||e[46]!==D||e[47]!==N?(y=t.jsxs("div",{className:N,children:[P,D]}),e[45]=P,e[46]=D,e[47]=N,e[48]=y):y=e[48],y}function Zt(l){const e=S.c(21),{skillPath:s,onClose:i}=l,o=ne(s),{volume:c,dirPath:r}=o,a=me(),n=a(c??"",`${r}/SKILL.md`),d=M.fileText(n);let m;e[0]!==n?(m=async()=>{const _=await fetch(n,{credentials:"include"});if(!_.ok)throw new Error(`fetch failed: ${_.status}`);return _.text()},e[0]=n,e[1]=m):m=e[1];let f;e[2]!==d||e[3]!==m?(f={queryKey:d,queryFn:m,staleTime:6e4,retry:!1},e[2]=d,e[3]=m,e[4]=f):f=e[4];const u=J(f),g=Me(c??"",r);let b;e[5]!==r?(b=O(r),e[5]=r,e[6]=b):b=e[6];const p=b;let x;e[7]!==u.data?(x=u.data?He(u.data):null,e[7]=u.data,e[8]=x):x=e[8];const h=x,N=el;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(_,G)=>N(_.path)?-1:N(G.path)?1:O(_.path).localeCompare(O(G.path)),e[9]=v):v=e[9];const w=(g.data??[]).filter(Jt).sort(v),[j,C]=E.useState(null),k=j===null?null:w.find(_=>_.path===j)??null;let $;e[10]!==i?($=_=>{_||i()},e[10]=i,e[11]=$):$=e[11];let z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Re,{size:18})}),e[12]=z):z=e[12];const P=h?.name??p;let D;e[13]!==P?(D=t.jsx(Z,{className:"flex-1 truncate text-base font-medium text-foreground",children:P}),e[13]=P,e[14]=D):D=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ct,{asChild:!0,children:t.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(vt,{size:16})})}),e[15]=y):y=e[15];let F;e[16]!==D?(F=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[z,D,y]}),e[16]=D,e[17]=F):F=e[17];let U;e[18]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[18]=U):U=e[18];const B="relative flex min-w-0 flex-1 flex-col overflow-y-auto",ie=k?t.jsx(fe,{file:{key:k.path,filename:O(k.path),size:k.size,downloadUrl:a(c??"",k.path)}}):u.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(H,{className:"h-4 w-1/3"}),t.jsx(H,{className:"h-3 w-full"}),t.jsx(H,{className:"h-3 w-5/6"}),t.jsx(H,{className:"h-3 w-2/3"})]}):u.isError||!h?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:h.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ht,{id:`skill-preview-${s}`,text:h.body})})]});let Q;return e[19]!==ie?(Q=t.jsx("div",{className:B,children:ie}),e[19]=ie,e[20]=Q):Q=e[20],t.jsx(ce,{open:!0,onOpenChange:$,children:t.jsxs(de,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:[F,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[U,g.isPending?t.jsx(H,{className:"mx-2 h-4 w-24"}):w.map(_=>{const G=N(_.path)?k===null:j===_.path;return t.jsxs("button",{type:"button",onClick:()=>C(N(_.path)?null:_.path),className:Y("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",G?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(A,{filename:O(_.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:Y("truncate text-sm",G?"text-foreground":"text-muted-foreground"),children:O(_.path)})]},_.path)})]}),Q]})]})})}function Jt(l){return l.kind==="file"}function el(l){return O(l)==="SKILL.md"}const qe=[{id:"home",description:"Your organization's home folder",glyph:Ze},{id:"uploads",description:"Files your team uploads",glyph:ze},{id:"outputs",description:"Agent run outputs",glyph:et}],Ne=3;function R(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=i):i=e[1],i}function L(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:s}),e[0]=s,e[1]=i):i=e[1],i}function ge(l){const e=S.c(2),{rows:s}=l,i=s===void 0?1:s;let o;return e[0]!==i?(o=t.jsx(L,{children:Array.from({length:i*3},tl)}),e[0]=i,e[1]=o):o=e[1],o}function tl(l,e){return t.jsx(H,{className:"h-16 rounded-2xl"},e)}function be(l){const e=S.c(2),{children:s}=l;let i;return e[0]!==s?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1],i}function ll(l){const e=S.c(6),{volume:s,displayName:i,description:o,glyph:c,onOpen:r}=l,a=gt(s),n=i??s,d=a.data?`${a.data.files} files`:void 0;let m;return e[0]!==o||e[1]!==c||e[2]!==r||e[3]!==n||e[4]!==d?(m=t.jsx(se,{name:n,meta:d,subtitle:o,glyph:c,onOpen:r}),e[0]=o,e[1]=c,e[2]=r,e[3]=n,e[4]=d,e[5]=m):m=e[5],m}function sl(l){const e=S.c(8),{segments:s,onNavigate:i}=l;let o;e[0]!==i?(o=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=o):o=e[1];let c;e[2]!==i||e[3]!==s?(c=s.map((a,n)=>{const d=s.slice(0,n+1).join("/"),m=n===s.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Qe,{size:12,className:"shrink-0 text-muted-foreground"}),m?t.jsx("span",{className:"truncate font-medium text-foreground",children:a}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:a})]},d)}),e[2]=i,e[3]=s,e[4]=c):c=e[4];let r;return e[5]!==o||e[6]!==c?(r=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[o,c]}),e[5]=o,e[6]=c,e[7]=r):r=e[7],r}function nl(l){const e=S.c(19),{onOpenDir:s,onOpenFile:i,onDelete:o}=l,{org:c}=$e(),r=jt(),a=Le(),n=me();let d;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==i||e[4]!==c||e[5]!==a.data?.length||e[6]!==r.data||e[7]!==r.isPending){const m=r.data??[],f=m.slice(0,Ne),u=m.slice(Ne);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(R,{children:"Folders"}),e[9]=g):g=e[9];let b;e[10]!==s||e[11]!==c?(b=qe.map(h=>t.jsx(ll,{volume:h.id,displayName:h.id==="home"?kt(c.slug):void 0,description:h.description,glyph:h.glyph,onOpen:()=>s(h.id)},h.id)),e[10]=s,e[11]=c,e[12]=b):b=e[12];let p;e[13]!==s||e[14]!==a.data?.length?(p=(a.data?.length??0)>0&&t.jsx(se,{name:"public",meta:`${a.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:We,readOnly:!0,onOpen:()=>s("public")}),e[13]=s,e[14]=a.data?.length,e[15]=p):p=e[15];let x;e[16]!==b||e[17]!==p?(x=t.jsxs("div",{className:"flex flex-col gap-3",children:[g,t.jsxs(L,{children:[b,p]})]}),e[16]=b,e[17]=p,e[18]=x):x=e[18],d=t.jsxs(t.Fragment,{children:[r.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Recently added"}),t.jsx(ge,{})]}):f.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Recently added"}),t.jsx(L,{children:f.map(h=>t.jsx(qt,{filename:O(h.path),updatedAt:h.updatedAt,size:h.size,downloadUrl:n(h.volume,h.path),onOpen:()=>i(`${h.volume}/${h.path}`),onDelete:()=>o({volume:h.volume,path:h.path,kind:"file"})},`${h.volume}/${h.path}`))})]}):t.jsx(be,{children:"No files yet — upload one, or ask an agent to produce something."}),x,u.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"All files"}),t.jsx(L,{children:u.map(h=>t.jsx(Ve,{filename:O(h.path),updatedAt:h.updatedAt,downloadUrl:n(h.volume,h.path),onOpen:()=>i(`${h.volume}/${h.path}`),onDelete:()=>o({volume:h.volume,path:h.path,kind:"file"})},`${h.volume}/${h.path}`))})]})]}),e[0]=n,e[1]=o,e[2]=s,e[3]=i,e[4]=c,e[5]=a.data?.length,e[6]=r.data,e[7]=r.isPending,e[8]=d}else d=e[8];return d}function il(l){const e=S.c(11),{onOpenDir:s}=l,i=Le();if(i.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ge,{}),e[0]=n):n=e[0],n}let o;e[1]!==i.data?(o=i.data??[],e[1]=i.data,e[2]=o):o=e[2];const c=o;if(c.length===0){let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(be,{children:"No public skill sets are configured."}),e[3]=n):n=e[3],n}let r;if(e[4]!==s||e[5]!==c){let n;e[7]!==s?(n=d=>t.jsx(se,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>s(`public/${d}`)},d),e[7]=s,e[8]=n):n=e[8],r=c.map(n),e[4]=s,e[5]=c,e[6]=r}else r=e[6];let a;return e[9]!==r?(a=t.jsx(L,{children:r}),e[9]=r,e[10]=a):a=e[10],a}function rl(l){const e=S.c(25),{location:s,onOpenDir:i,onOpenFile:o,onOpenSkill:c,onDelete:r}=l,a=s.volume??"",n=Me(a,s.dirPath),d=me();if(n.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ge,{rows:2}),e[0]=p):p=e[0],p}if(n.isError){const p=n.error instanceof Error?n.error.message:"Failed to load";let x;return e[1]!==p?(x=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[1]=p,e[2]=x):x=e[2],x}let m,f,u,g;if(e[3]!==d||e[4]!==n.data||e[5]!==s||e[6]!==r||e[7]!==i||e[8]!==o||e[9]!==c||e[10]!==a){g=Symbol.for("react.early_return_sentinel");e:{const p=n.data??[],x=p.filter(cl),h=p.filter(al),N=p.filter(ol);if(p.length===0){const j=s.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let C;e[15]!==j?(C=t.jsx(be,{children:j}),e[15]=j,e[16]=C):C=e[16],g=C;break e}let v;e[17]!==s.readOnly||e[18]!==r||e[19]!==a?(v=j=>s.readOnly?void 0:()=>r({volume:a,path:j.path,kind:j.kind}),e[17]=s.readOnly,e[18]=r,e[19]=a,e[20]=v):v=e[20];const w=v;m=x.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Skills"}),t.jsx(L,{children:x.map(j=>t.jsx(Et,{dirName:O(j.path),updatedAt:j.updatedAt,skillMdUrl:d(a,`${j.path}/SKILL.md`),onOpen:()=>c(W(s,j.path)),onBrowse:()=>i(W(s,j.path)),onDelete:w(j)},j.path))})]}),f=h.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Folders"}),t.jsx(L,{children:h.map(j=>t.jsx(se,{name:O(j.path),meta:ee(j.updatedAt),readOnly:s.readOnly,onOpen:()=>i(W(s,j.path)),onDelete:w(j)},j.path))})]}),u=N.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(R,{children:"Files"}),t.jsx(L,{children:N.map(j=>t.jsx(Ve,{filename:O(j.path),updatedAt:j.updatedAt,downloadUrl:d(a,j.path),onOpen:()=>o(W(s,j.path)),onDelete:w(j)},j.path))})]})}e[3]=d,e[4]=n.data,e[5]=s,e[6]=r,e[7]=i,e[8]=o,e[9]=c,e[10]=a,e[11]=m,e[12]=f,e[13]=u,e[14]=g}else m=e[11],f=e[12],u=e[13],g=e[14];if(g!==Symbol.for("react.early_return_sentinel"))return g;let b;return e[21]!==m||e[22]!==f||e[23]!==u?(b=t.jsxs(t.Fragment,{children:[m,f,u]}),e[21]=m,e[22]=f,e[23]=u,e[24]=b):b=e[24],b}function ol(l){return l.kind==="file"}function al(l){return l.kind==="dir"&&!l.hasSkill}function cl(l){return l.kind==="dir"&&l.hasSkill}function ke(){const{org:l}=$e(),e=Ge(),s=Ce(),i=Fe(),o=Se({strict:!1}),c=o.path??"",r=ne(c),a=r.segments.length===0,n=(y,F)=>s({to:".",search:U=>({...U,[y]:F||void 0})}),d=y=>n("path",y),m=y=>n("preview",y),f=y=>n("skill",y),[u,g]=E.useState(null),[b,p]=E.useState(!1),[x,h]=E.useState(""),N=E.useRef(null),v=r.readOnly?null:r.volume??"uploads",w=r.volume?r.dirPath:"",{upload:j,mkdir:C}=ye(v??"uploads"),{remove:k}=ye(u?.volume??"uploads");async function $(y){if(!(!v||!y||y.length===0))try{await j.mutateAsync({dir:w,files:[...y]}),I.success(y.length===1?`Uploaded ${y[0]?.name}`:`Uploaded ${y.length} files`)}catch(F){I.error(F instanceof Error?F.message:"Upload failed")}finally{N.current&&(N.current.value="")}}async function z(){const y=x.trim();if(!(!v||!y))try{await C.mutateAsync(w?`${w}/${y}`:y),I.success(`Folder "${y}" created`),p(!1),h("")}catch(F){I.error(F instanceof Error?F.message:"Failed to create folder")}}async function P(){if(!u)return;const y=u;try{await k.mutateAsync(y.path),I.success(`Deleted ${O(y.path)}`)}catch(F){I.error(F instanceof Error?F.message:"Delete failed")}finally{g(null)}}function D(){for(const y of qe)e.invalidateQueries({queryKey:M.orgFsVolume(l.id,y.id)});r.volume&&e.invalidateQueries({queryKey:M.orgFsVolume(l.id,r.volume)}),e.invalidateQueries({queryKey:M.orgFsRecent(l.id)}),e.invalidateQueries({queryKey:M.orgFsPublicSets(l.id)})}return t.jsxs("div",{className:"h-full overflow-y-auto",children:[t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[!a&&t.jsx(sl,{segments:r.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:a?"Library":r.segments.at(-1)??"Library"}),t.jsx(T,{variant:"ghost",size:"icon",onClick:D,"aria-label":"Refresh",children:t.jsx(Xe,{size:14})}),!a&&v&&t.jsxs(T,{variant:"outline",size:"sm",onClick:()=>p(!0),children:[t.jsx(Je,{size:14}),"New folder"]}),r.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(De,{size:12}),"Read-only"]}):t.jsxs(T,{size:"sm",disabled:j.isPending,onClick:()=>N.current?.click(),children:[t.jsx(ze,{size:14}),j.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:N,type:"file",multiple:!0,className:"hidden",onChange:y=>{$(y.target.files)}})]})]}),a?t.jsx(nl,{onOpenDir:d,onOpenFile:m,onDelete:g}):r.volume===null?t.jsx(il,{onOpenDir:d}):t.jsx(rl,{location:r,onOpenDir:d,onOpenFile:m,onOpenSkill:f,onDelete:g},r.volume)]}),o.preview?i&&t.jsx(Xt,{previewPath:o.preview,onClose:()=>n("preview",null)}):o.skill?t.jsx(Zt,{skillPath:o.skill,onClose:()=>n("skill",null)},o.skill):null,t.jsx(ce,{open:b,onOpenChange:p,children:t.jsxs(de,{children:[t.jsxs(dt,{children:[t.jsx(Z,{children:"New folder"}),t.jsxs(ft,{children:["Create a folder in ",c||"the library","."]})]}),t.jsx(ut,{autoFocus:!0,placeholder:"folder-name",value:x,onChange:y=>h(y.target.value),onKeyDown:y=>{y.key==="Enter"&&z()}}),t.jsxs(mt,{children:[t.jsx(T,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),t.jsx(T,{disabled:!x.trim()||C.isPending,onClick:()=>{z()},children:"Create"})]})]})}),t.jsx(tt,{open:u!==null,onOpenChange:y=>{y||g(null)},children:t.jsxs(lt,{children:[t.jsxs(st,{children:[t.jsxs(nt,{children:["Delete ",u?O(u.path):"","?"]}),t.jsx(it,{children:u?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(rt,{children:[t.jsx(ot,{children:"Cancel"}),t.jsx(at,{onClick:()=>{P()},children:"Delete"})]})]})})]})}function Ll(){const l=S.c(13),e=Fe(),s=Ce();let i;l[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},l[0]=i):i=l[0];const c=Se(i).preview;let r;l[1]!==c?(r=c?O(c):"",l[1]=c,l[2]=r):r=l[2];const a=r;let n;l[3]!==s?(n=()=>s({to:".",search:dl}),l[3]=s,l[4]=n):n=l[4];const d=n;if(e){let g;return l[5]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(re,{children:t.jsx(ke,{})})}),l[5]=g):g=l[5],g}let m;l[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ve,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(re,{children:t.jsx(ke,{})})})})}),l[6]=m):m=l[6];let f;l[7]!==d||l[8]!==a||l[9]!==c?(f=c&&t.jsxs(t.Fragment,{children:[t.jsx(xt.Tabs,{children:t.jsx(pt,{title:a,icon:{kind:"component",Component:g=>t.jsx(A,{filename:a,...g})},active:!0,onClick:d})}),t.jsx(bt,{className:"bg-sidebar"}),t.jsx(ve,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(re,{children:t.jsx(Yt,{previewPath:c,onClose:d})})})})})]}),l[7]=d,l[8]=a,l[9]=c,l[10]=f):f=l[10];let u;return l[11]!==f?(u=t.jsxs(yt,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[m,f]}),l[11]=f,l[12]=u):u=l[12],u}function dl(l){return{...l,preview:void 0}}export{Ll as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,g as p,j as s,l as u,N as a}from"./index-
|
|
1
|
+
import{e as c,g as p,j as s,l as u,N as a}from"./index-DEUVODq9.js";import{a as x}from"./use-capability-km64e2ng.js";import{C as j}from"./capability-load-error-B4z1cdIN.js";function v(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:g}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(g){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,bf as q,cv as R,cw as Ee,cx as ke,cy as Se,bB as xe,cz as j}from"./index-ChdATVAA.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
1
|
+
import{r as n,bf as q,cv as R,cw as Ee,cx as ke,cy as Se,bB as xe,cz as j}from"./index-DEUVODq9.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as s,c as a,j as d}from"./index-
|
|
1
|
+
import{e as s,c as a,j as d}from"./index-DEUVODq9.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as A,j as h,r as z,c as _}from"./index-
|
|
1
|
+
import{e as A,j as h,r as z,c as _}from"./index-DEUVODq9.js";import{n as L}from"./Container-CQcCiGBy.js";import{A as k}from"./agent-icon-CV7VKepg.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as r,j as i,bt as p}from"./index-
|
|
1
|
+
import{e as n,c as r,j as i,bt as p}from"./index-DEUVODq9.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,r as i,c as A,j as a,aR as V}from"./index-
|
|
1
|
+
import{e as C,r as i,c as A,j as a,aR as V}from"./index-DEUVODq9.js";import{P as E}from"./index-CiklrCzm.js";const H=i.createContext(null);function z(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const B=D;function F(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{F as V,B as a,z as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-ChdATVAA.js";import{I}from"./input-BZ-4l6sv.js";import{A as de}from"./auth-split-layout-BU5p8xYF.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
|
|
1
|
+
import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-DEUVODq9.js";import{I}from"./input-CkGEzOB_.js";import{A as de}from"./auth-split-layout-BqxtOd31.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as x,a as N,e as z,b as D}from"./auth-
|
|
1
|
+
import{d as x,a as N,e as z,b as D}from"./auth-StjmYjna.js";function E(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}function H(){return window.location.origin}function C(){try{const t=window.location.hostname;return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}const M=new Map,R="mcp:oauth:callback:";class W{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${H()}/oauth/callback`,this._windowMode=e.windowMode??"popup";const n=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},M.set(E(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){if(this._windowMode==="tab"){if(!window.open(e.toString(),"_blank"))throw new Error("Tab was blocked")}else{const o=window.screenX+(window.outerWidth-600)/2,s=window.screenY+(window.outerHeight-700)/2;if(!window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${o},top=${s},popup=yes`)&&!window.open(e.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){M.delete(E(this.serverUrl))}}async function G(t){const e=t.meshUrl??window.location.origin,n=t.orgSlug?`/api/${encodeURIComponent(t.orgSlug)}/mcp/${t.connectionId}`:`/mcp/${t.connectionId}`,r=new URL(n,e),o=new W({serverUrl:r.href,clientName:t.clientName,clientUri:t.clientUri,callbackUrl:t.callbackUrl,scope:t.scope,windowMode:t.windowMode}),s={fn:null};try{const i=new Promise((l,d)=>{const k=t.timeout||12e4;let b,p=!1;const L=o.state(),A=`${R}${L}`,h=()=>{window.removeEventListener("message",v),window.removeEventListener("storage",O),clearTimeout(b);try{localStorage.removeItem(A)}catch{}};s.fn=u=>{p||(p=!0,h(),d(u))};const U=async u=>{if(p)return;if(p=!0,!u.success){h(),d(new Error(u.error||"OAuth authentication failed"));return}const{code:m,state:$}=u;if(!m){h(),d(new Error("Missing authorization code"));return}if(o.getStoredState()!==$){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const T=(await x(r))?.authorization_servers?.[0]||r,S=await N(T),g=o.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const P=o.codeVerifier(),V=await z(T,{metadata:S,clientInformation:g,authorizationCode:m,codeVerifier:P,redirectUri:o.redirectUrl,resource:new URL(r)});h(),l({tokens:V,clientId:g.client_id??null,clientSecret:"client_secret"in g?g.client_secret:null,tokenEndpoint:S?.token_endpoint??null,userinfoEndpoint:S?.userinfo_endpoint??null})}catch(I){h(),d(I)}},v=async u=>{!C()&&u.origin!==window.location.origin||u.data?.type==="mcp:oauth:callback"&&await U(u.data)},O=async u=>{if(!(u.key!==A||!u.newValue))try{const m=JSON.parse(u.newValue);await U(m)}catch{}};window.addEventListener("message",v),window.addEventListener("storage",O),b=setTimeout(()=>{p||(p=!0,h(),d(new Error("OAuth authentication timeout")))},k)});if(i.catch(()=>{}),await D(o,{serverUrl:r})==="REDIRECT"){const l=await i,d=l.tokens;return{token:l.tokens.access_token,tokenInfo:{accessToken:l.tokens.access_token,refreshToken:l.tokens.refresh_token??null,expiresIn:l.tokens.expires_in??null,scope:l.tokens.scope??null,clientId:l.clientId,clientSecret:l.clientSecret,tokenEndpoint:l.tokenEndpoint,userinfoEndpoint:l.userinfoEndpoint,idToken:typeof d.id_token=="string"?d.id_token:null},error:null}}const a=o.tokens(),w=o.clientInformation(),f=a;return{token:a?.access_token||null,tokenInfo:a?{accessToken:a.access_token,refreshToken:a.refresh_token??null,expiresIn:a.expires_in??null,scope:a.scope??null,clientId:w?.client_id??null,clientSecret:w&&"client_secret"in w?w.client_secret:null,tokenEndpoint:null,userinfoEndpoint:null,idToken:f&&typeof f.id_token=="string"?f.id_token:null}:null,error:null}}catch(i){return s.fn&&s.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{o.cleanup()}}function y(t,e){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(t,n),!0}if(e)try{const n=`${R}${e}`;return localStorage.setItem(n,JSON.stringify(t)),!0}catch{}return!1}async function X(){const t=new URLSearchParams(window.location.search),e=t.get("code");let n=t.get("state");const r=t.get("error"),o=t.get("error_description");let s=n;if(n)try{const c=atob(n),a=JSON.parse(c);a.clientState&&(s=a.clientState)}catch{}if(r){const c=o||r;return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}if(!e||!n){const c="Missing code or state parameter";return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}return n=s||n,y({type:"mcp:oauth:callback",success:!0,code:e,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(t){try{const e=_(),n=e?new URL(t,e):new URL(t),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function J(t){try{const e=_();return(e?new URL(t,e):new URL(t)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function K(t,e,n){try{const r=`/api/${encodeURIComponent(e)}/connections/${t}/oauth-token/status`,o=n?new URL(r,n).href:r,s=_(),i=!n||new URL(n).origin===s,c=await fetch(o,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function q({url:t,token:e,orgId:n,meshUrl:r}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const s=await fetch(t,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=j(t),c=J(t),a=_(),w=r??(a?new URL(t,a).origin:new URL(t).origin);if(s.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i&&c?await K(i,c,w):{hasToken:!1}).hasToken};let f;try{const k=await s.json();f=k.error||k.message}catch{}return s.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:f||`HTTP ${s.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!s.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:f||`HTTP ${s.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o.message}}}export{G as a,X as h,q as i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{R as zt,r as ce,p as fe,F as $e,b as $t,G as Dt,a as pe,t as ue,n as G,K as ie,j as s,B as Pe,e as Y,q as kt,m as Nt,c as ze,l as Ze,E as Ft}from"./index-
|
|
1
|
+
import{R as zt,r as ce,p as fe,F as $e,b as $t,G as Dt,a as pe,t as ue,n as G,K as ie,j as s,B as Pe,e as Y,q as kt,m as Nt,c as ze,l as Ze,E as Ft}from"./index-DEUVODq9.js";import{C as Ot}from"./collection-display-button-BpdgmXkn.js";import{S as Lt}from"./search-input-DLDVTOcp.js";import{P as Ee}from"./index-CiklrCzm.js";import{C as qt}from"./collection-table-wrapper-CeQ3Kj1L.js";import{E as He}from"./empty-state-DZZ4TCiB.js";import{D as Bt,i as Kt,a as Vt,b as Qt,c as Ut,d as Gt}from"./dialog-FBdtBd0W.js";import{a as Jt,F as ot,b as rt,c as Ht,d as ct,f as mt}from"./form-BKRU3_f0.js";import{d as Xe,S as et,a as tt,b as st,c as nt}from"./select-Dyn5eJ76.js";import{T as Wt}from"./textarea-D_FY-WF9.js";import{u as at}from"./use-org-auth-client-5GIyjJUc.js";import{u as Tt}from"./use-organization-roles-BJhlkkyb.js";import{u as Yt}from"./use-members-YdskzoCL.js";import{u as De}from"./studio-tools-DnIG9YV2.js";import{T as Zt,a as Xt,c as es,b as ts}from"./tooltip-CnO8IxhJ.js";import{a as dt,e as ut,g as ft,b as ht,c as gt,d as pt,f as xt,A as bt}from"./alert-dialog-CjyXYSQZ.js";import{A as Ke}from"./avatar-ItW7yKah.js";import{B as Qe}from"./badge-Bw9vN6fg.js";import{C as jt}from"./card-B0-N4bpb.js";import{D as It,a as At,b as Mt,d as ss,e as ns,f as is,c as it,g as as}from"./dropdown-menu-BUlN28jb.js";import{i as Et}from"./DotsVertical-7ebFkKLD.js";import{i as ls}from"./Key01-CDcV65YU.js";import{i as os}from"./Shield01-CUegYioy.js";import{a as rs}from"./SwitchHorizontal01-BQBOH6Au.js";import{s as cs}from"./Trash01-BfygLm6s.js";import{s as Pt}from"./XClose-CCKAliKU.js";import{C as vt}from"./checkbox-BjUgAWJu.js";import{a as We,e as Ye,f as Ct,C as ms,d as ds,b as us,c as fs}from"./command-CSF0stL5.js";import{b as hs,P as gs,a as ps}from"./popover-D6gDvvex.js";import{t as xs}from"./ChevronDown-CMnvnfNH.js";import{s as bs}from"./Plus-DW_pro4F.js";import{R as js}from"./require-capability-CqCUzyTW.js";import"./Check-CFZ7jofS.js";import"./view-mode-toggle-BVJSd33i.js";import"./SearchMd-BnZZ5mEU.js";import"./sidebar-DMarnfZA.js";import"./LayoutLeft-Cy-bGbAH.js";import"./sheet-C2l8o7Li.js";import"./X-BUzk9ZuQ.js";import"./table-C6yf7crt.js";import"./label-CxhkSBar.js";import"./ChevronUp-BYxSfj4f.js";import"./User01-Bi6i4zOy.js";import"./ChevronRight-DtVYtVbK.js";import"./index-wos7zFLb.js";import"./use-capability-km64e2ng.js";import"./access-gate-DuwCoW9u.js";import"./capability-load-error-B4z1cdIN.js";const vs=zt().email("Invalid email address");function Cs(t){if(!t.trim())return[];const e=t.split(/[,;\n]/).map(n=>n.trim().toLowerCase()).filter(n=>n.length>0);return Array.from(new Set(e))}function ys({trigger:t}){const[e,n]=ce.useState(!1),{locator:l}=fe(),a=at(),i=$e(),{data:o}=$t.useSession(),c=o?.user?.email,{roles:p,isLoading:x}=Tt(),j=p.filter(m=>m.role!=="owner"),g=Dt({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),b=g.watch("emailsText"),M=g.watch("role"),v=Cs(b).filter(m=>{const r=vs.safeParse(m).success,f=!c||m!==c.toLowerCase();return r&&f}),N=pe({mutationFn:async({emails:m,role:r})=>{if(!r)throw new Error("Please select a role");const f=await Promise.allSettled(m.map(async w=>{const A=await a.organization.inviteMember({email:w,role:r});if(A.error)throw new Error(A.error.message);return A.data})),I=f.filter(w=>w.status==="rejected");if(I.length>0)throw new Error(`Failed to invite ${I.length} member${I.length>1?"s":""}`);return f},onSuccess:(m,{emails:r,role:f})=>{ue("member_invited",{count:r.length,role:f}),i.invalidateQueries({queryKey:ie.members(l)}),i.invalidateQueries({queryKey:ie.invitations(l)}),G.success(r.length===1?"Member invited successfully!":`${r.length} members invited successfully!`),g.reset({emailsText:"",role:"user"}),n(!1)},onError:(m,{emails:r,role:f})=>{ue("member_invite_failed",{count:r.length,role:f,error:m instanceof Error?m.message:String(m)}),G.error(m instanceof Error?m.message:"Failed to invite members")}}),y=m=>{if(v.length===0){G.error("Please enter at least one valid email address");return}if(!m.role){G.error("Please select a role");return}N.mutate({emails:v,role:m.role})},$=v.length>0&&!!M;return s.jsxs(Bt,{open:e,onOpenChange:n,children:[s.jsx(Kt,{asChild:!0,children:t}),s.jsxs(Vt,{className:"sm:max-w-lg",children:[s.jsx(Qt,{children:s.jsx(Ut,{children:"Invite members"})}),s.jsx(Jt,{...g,children:s.jsxs("form",{onSubmit:g.handleSubmit(y),className:"space-y-4",children:[s.jsx(ot,{control:g.control,name:"emailsText",render:({field:m})=>s.jsxs(rt,{children:[s.jsx(Ht,{children:"Email addresses"}),s.jsx(ct,{children:s.jsx(Wt,{...m,disabled:N.isPending,placeholder:`Enter email addresses separated by commas or new lines
|
|
2
2
|
e.g. user1@example.com, user2@example.com
|
|
3
3
|
or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(mt,{})]})}),s.jsx(ot,{control:g.control,name:"role",render:({field:m})=>s.jsxs(rt,{children:[s.jsx(ct,{children:s.jsxs(Xe,{value:m.value,onValueChange:m.onChange,disabled:N.isPending||x,children:[s.jsx(et,{className:"w-full",children:s.jsx(tt,{placeholder:"Select a role"})}),s.jsx(st,{children:j.map(r=>{const f=[];return r.isBuiltin||(r.allowsAllStaticPermissions?f.push("Full org access"):r.staticPermissionCount&&r.staticPermissionCount>0&&f.push(`${r.staticPermissionCount} org perm${r.staticPermissionCount!==1?"s":""}`),r.allowsAllConnections?f.push("All connections"):r.connectionCount&&r.connectionCount>0&&f.push(`${r.connectionCount} connection${r.connectionCount!==1?"s":""}`),(r.connectionCount!==0||r.allowsAllConnections)&&(r.allowsAllTools?f.push("all tools"):r.toolCount&&r.toolCount>0&&f.push(`${r.toolCount} tool${r.toolCount!==1?"s":""}`))),s.jsx(nt,{value:r.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:r.label}),!r.isBuiltin&&f.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:f.join(", ")})]})},r.role)})})]})}),s.jsx(mt,{})]})}),s.jsxs(Gt,{children:[s.jsx(Pe,{variant:"outline",onClick:()=>{g.reset({emailsText:"",role:"user"}),n(!1)},type:"button",disabled:N.isPending,children:"Cancel"}),s.jsx(Pe,{type:"submit",disabled:N.isPending||!$,children:N.isPending?"Inviting...":`Invite ${v.length||0} Member${v.length!==1?"s":""}`})]})]})})]})]})}function Ss(){const t=Y.c(7),{locator:e}=fe(),n=De();let l;t[0]!==e?(l=ie.invitations(e),t[0]=e,t[1]=l):l=t[1];let a;t[2]!==n?(a=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=a):a=t[3];let i;return t[4]!==l||t[5]!==a?(i={queryKey:l,queryFn:a},t[4]=l,t[5]=a,t[6]=i):i=t[6],kt(i)}function ws(){const t=Y.c(10),{locator:e}=fe(),n=at(),l=$e();let a;t[0]!==n?(a=async x=>{const j=await n.organization.cancelInvitation({invitationId:x});if(j?.error)throw new Error(j.error.message);return j.data},t[0]=n,t[1]=a):a=t[1];let i;t[2]!==e||t[3]!==l?(i=()=>{l.invalidateQueries({queryKey:ie.invitations(e)}),G.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=i):i=t[4];let o;t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:Ns},t[5]=a,t[6]=i,t[7]=o):o=t[7];const c=pe(o);let p;return t[8]!==c?(p={cancel:c},t[8]=c,t[9]=p):p=t[9],p}function Ns(t){G.error(t instanceof Error?t.message:"Failed to cancel invitation")}function Ts(){const t=Y.c(7),{locator:e}=fe(),n=De();let l;t[0]!==e?(l=ie.tags(e),t[0]=e,t[1]=l):l=t[1];let a;t[2]!==n?(a=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=a):a=t[3];let i;return t[4]!==l||t[5]!==a?(i={queryKey:l,queryFn:a,staleTime:3e4},t[4]=l,t[5]=a,t[6]=i):i=t[6],Nt(i)}function Is(){const t=Y.c(8),e=$e(),{locator:n}=fe(),l=De();let a;t[0]!==l?(a=async c=>{const{tag:p}=await l.call("TAGS_CREATE",{name:c});return p},t[0]=l,t[1]=a):a=t[1];let i;t[2]!==n||t[3]!==e?(i=()=>{e.invalidateQueries({queryKey:ie.tags(n)})},t[2]=n,t[3]=e,t[4]=i):i=t[4];let o;return t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:As},t[5]=a,t[6]=i,t[7]=o):o=t[7],pe(o)}function As(t){G.error(t instanceof Error?t.message:"Failed to create tag")}function Ms(t){const e=Y.c(10),{locator:n}=fe(),l=De();let a;e[0]!==n||e[1]!==t?(a=ie.memberTags(n,t),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>{const{tags:p}=await l.call("MEMBER_TAGS_GET",{memberId:t});return p},e[3]=t,e[4]=l,e[5]=i):i=e[5];const o=!!t;let c;return e[6]!==a||e[7]!==i||e[8]!==o?(c={queryKey:a,queryFn:i,staleTime:3e4,enabled:o},e[6]=a,e[7]=i,e[8]=o,e[9]=c):c=e[9],Nt(c)}function Es(){const t=Y.c(8),e=$e(),{locator:n}=fe(),l=De();let a;t[0]!==l?(a=async c=>{const{memberId:p,tagIds:x}=c;return await l.call("MEMBER_TAGS_SET",{memberId:p,tagIds:x})},t[0]=l,t[1]=a):a=t[1];let i;t[2]!==n||t[3]!==e?(i=(c,p)=>{e.invalidateQueries({queryKey:ie.memberTags(n,p.memberId)})},t[2]=n,t[3]=e,t[4]=i):i=t[4];let o;return t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:Ps},t[5]=a,t[6]=i,t[7]=o):o=t[7],pe(o)}function Ps(t){G.error(t instanceof Error?t.message:"Failed to update member tags")}function _t(t){const e=Y.c(44),{memberId:n,className:l,disabled:a,placeholder:i,maxDisplay:o}=t,c=a===void 0?!1:a,p=i===void 0?"Add tags...":i,x=o===void 0?2:o,[j,g]=ce.useState(!1),[b,M]=ce.useState(""),{data:R,isLoading:v}=Ts(),N=R===void 0?[]:R,{data:y,isLoading:$}=Ms(n),m=y===void 0?[]:y,r=Is(),f=Es(),I=v||$,w=m.map(Rs);let A;e[0]!==b?(A=S=>S.name.toLowerCase().includes(b.toLowerCase()),e[0]=b,e[1]=A):A=e[1];const z=N.filter(A);let T;e[2]!==b?(T=S=>S.name.toLowerCase()===b.toLowerCase(),e[2]=b,e[3]=T):T=e[3];const K=N.find(T),E=b.trim()&&!K,k=async S=>{const ge=w.includes(S.id)?w.filter(je=>je!==S.id):[...w,S.id];await f.mutateAsync({memberId:n,tagIds:ge})},P=async()=>{if(!b.trim())return;const S=await r.mutateAsync(b.trim());await f.mutateAsync({memberId:n,tagIds:[...w,S.id]}),M("")},d=async S=>{const ne=w.filter(ge=>ge!==S);await f.mutateAsync({memberId:n,tagIds:ne})},C=r.isPending||f.isPending,L=gs;let D;e[4]!==j?(D=()=>g(!j),e[4]=j,e[5]=D):D=e[5];let F;e[6]!==l?(F=ze("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=F):F=e[7];const V=c||I,O=I?s.jsx(Ze,{size:14,className:"animate-spin text-muted-foreground"}):m.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.slice(0,x).map(_s),m.length>x&&s.jsxs(Qe,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",m.length-x]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:p});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(xs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let q;e[9]!==V||e[10]!==O||e[11]!==D||e[12]!==F?(q=s.jsx(ps,{asChild:!0,children:s.jsxs(Pe,{variant:"ghost",size:"sm",onClick:D,className:F,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=D,e[12]=F,e[13]=q):q=e[13];const U=hs,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>g(!1),e[14]=W):W=e[14];const ae=us,xe=!1;let Z;e[15]!==b?(Z=s.jsx(fs,{placeholder:"Search or create...",value:b,onValueChange:M,className:"h-9"}),e[15]=b,e[16]=Z):Z=e[16];const le=ds,me=m.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(We,{heading:"Selected",children:m.map(S=>s.jsx(Ye,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]}),s.jsx("button",{onClick:ne=>{ne.stopPropagation(),d(S.id)},className:"opacity-50 hover:opacity-100",disabled:C,children:s.jsx(Pt,{size:14})})]})},S.id))}),s.jsx(Ct,{})]}),_e=We,be="Available",Re=z.length===0&&!E&&s.jsx(ms,{children:"No tags found."}),he=z.filter(S=>!w.includes(S.id)).map(S=>s.jsx(Ye,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]})},S.id));let oe;e[17]!==_e||e[18]!==Re||e[19]!==he?(oe=s.jsxs(_e,{heading:be,children:[Re,he]}),e[17]=_e,e[18]=Re,e[19]=he,e[20]=oe):oe=e[20];let re;e[21]!==P||e[22]!==C||e[23]!==b||e[24]!==E?(re=E&&s.jsxs(s.Fragment,{children:[s.jsx(Ct,{}),s.jsx(We,{children:s.jsx(Ye,{onSelect:P,className:"cursor-pointer",disabled:C,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[C?s.jsx(Ze,{size:14,className:"animate-spin"}):s.jsx(bs,{size:14}),s.jsxs("span",{children:['Create "',b.trim(),'"']})]})})})]}),e[21]=P,e[22]=C,e[23]=b,e[24]=E,e[25]=re):re=e[25];let X;e[26]!==le||e[27]!==me||e[28]!==oe||e[29]!==re?(X=s.jsxs(le,{children:[me,oe,re]}),e[26]=le,e[27]=me,e[28]=oe,e[29]=re,e[30]=X):X=e[30];let ee;e[31]!==ae||e[32]!==Z||e[33]!==X?(ee=s.jsxs(ae,{shouldFilter:xe,children:[Z,X]}),e[31]=ae,e[32]=Z,e[33]=X,e[34]=ee):ee=e[34];let te;e[35]!==U||e[36]!==W||e[37]!==ee?(te=s.jsx(U,{className:J,align:H,onEscapeKeyDown:W,children:ee}),e[35]=U,e[36]=W,e[37]=ee,e[38]=te):te=e[38];let se;return e[39]!==L||e[40]!==j||e[41]!==q||e[42]!==te?(se=s.jsxs(L,{open:j,onOpenChange:g,children:[q,te]}),e[39]=L,e[40]=j,e[41]=q,e[42]=te,e[43]=se):se=e[43],se}function _s(t){return s.jsx(Qe,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Rs(t){return t.id}const yt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],zs={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ve(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function $s(t){const e=new Map;for(const[n,l]of Object.entries(zs))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,yt[n%yt.length]??"bg-neutral-400")}return e}function Ds(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Be(t){const e=Y.c(79),{role:n,memberId:l,isOwner:a,roleColorMap:i,selectableRoles:o,onRoleChange:c,size:p,className:x}=t,j=p===void 0?"xs":p;let g,b,M,R,v,N,y,$,m,r,f;if(e[0]!==x||e[1]!==a||e[2]!==l||e[3]!==c||e[4]!==n||e[5]!==i||e[6]!==o||e[7]!==j){f=Symbol.for("react.early_return_sentinel");e:{const P=i.get(n)??"bg-neutral-400";if(a){let d;e[19]!==l||e[20]!==c?(d=J=>c(l,J),e[19]=l,e[20]=c,e[21]=d):d=e[21];let C;e[22]!==n?(C=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=C):C=e[23];const L=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ze("size-2 rounded-full shrink-0",P)}),C]});let D;e[24]!==L?(D=s.jsx(tt,{children:L}),e[24]=L,e[25]=D):D=e[25];let F;e[26]!==x||e[27]!==j||e[28]!==D?(F=s.jsx(et,{size:j,className:x,children:D}),e[26]=x,e[27]=j,e[28]=D,e[29]=F):F=e[29];let V;if(e[30]!==i||e[31]!==o){let J;e[33]!==i?(J=H=>{const W=i.get(H.role)??"bg-neutral-400";return s.jsx(nt,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ze("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=i,e[34]=J):J=e[34],V=o.map(J),e[30]=i,e[31]=o,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(st,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==a||e[38]!==n||e[39]!==d||e[40]!==F||e[41]!==O?(Q=s.jsx(Zt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(Xe,{value:n,onValueChange:d,disabled:a,children:[F,O]})})}),e[37]=a,e[38]=n,e[39]=d,e[40]=F,e[41]=O,e[42]=Q):Q=e[42];let q;e[43]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Xt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=q):q=e[43];let U;e[44]!==Q?(U=s.jsx(es,{children:s.jsxs(ts,{children:[Q,q]})}),e[44]=Q,e[45]=U):U=e[45],f=U;break e}M=Xe,$=n,e[46]!==l||e[47]!==c?(m=d=>c(l,d),e[46]=l,e[47]=c,e[48]=m):m=e[48],r=a,b=et,N=j,y=x,g=tt,v="flex items-center gap-2 min-w-0",R=ze("size-2 rounded-full shrink-0",P)}e[0]=x,e[1]=a,e[2]=l,e[3]=c,e[4]=n,e[5]=i,e[6]=o,e[7]=j,e[8]=g,e[9]=b,e[10]=M,e[11]=R,e[12]=v,e[13]=N,e[14]=y,e[15]=$,e[16]=m,e[17]=r,e[18]=f}else g=e[8],b=e[9],M=e[10],R=e[11],v=e[12],N=e[13],y=e[14],$=e[15],m=e[16],r=e[17],f=e[18];if(f!==Symbol.for("react.early_return_sentinel"))return f;let I;e[49]!==R?(I=s.jsx("div",{className:R}),e[49]=R,e[50]=I):I=e[50];let w;e[51]!==n?(w=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=w):w=e[52];let A;e[53]!==I||e[54]!==w||e[55]!==v?(A=s.jsxs("div",{className:v,children:[I,w]}),e[53]=I,e[54]=w,e[55]=v,e[56]=A):A=e[56];let z;e[57]!==g||e[58]!==A?(z=s.jsx(g,{children:A}),e[57]=g,e[58]=A,e[59]=z):z=e[59];let T;e[60]!==b||e[61]!==z||e[62]!==N||e[63]!==y?(T=s.jsx(b,{size:N,className:y,children:z}),e[60]=b,e[61]=z,e[62]=N,e[63]=y,e[64]=T):T=e[64];let K;if(e[65]!==i||e[66]!==o){let P;e[68]!==i?(P=d=>{const C=i.get(d.role)??"bg-neutral-400";return s.jsx(nt,{value:d.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ze("size-3 rounded-full",C)}),s.jsx("span",{className:"capitalize",children:d.label})]})},d.role)},e[68]=i,e[69]=P):P=e[69],K=o.map(P),e[65]=i,e[66]=o,e[67]=K}else K=e[67];let E;e[70]!==K?(E=s.jsx(st,{children:K}),e[70]=K,e[71]=E):E=e[71];let k;return e[72]!==M||e[73]!==T||e[74]!==E||e[75]!==$||e[76]!==m||e[77]!==r?(k=s.jsxs(M,{value:$,onValueChange:m,disabled:r,children:[T,E]}),e[72]=M,e[73]=T,e[74]=E,e[75]=$,e[76]=m,e[77]=r,e[78]=k):k=e[78],k}function St(t){const e=Y.c(51),{member:n,roles:l,onChangeRole:a,onRemove:i,isUpdating:o}=t,c=o===void 0?!1:o,p=n.role==="owner";let x,j,g,b,M,R,v,N,y;if(e[0]!==p||e[1]!==c||e[2]!==n.id||e[3]!==n.role||e[4]!==a||e[5]!==l){let T;e[15]!==n.role?(T=d=>d.role!==n.role&&d.role!=="owner",e[15]=n.role,e[16]=T):T=e[16];const K=l.filter(T);b=It;let E;e[17]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Et,{size:20}),e[17]=E):E=e[17],e[18]!==p?(y=s.jsx(At,{asChild:!0,children:s.jsx(Pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:p,onClick:Fs,children:E})}),e[18]=p,e[19]=y):y=e[19],g=Mt,v="end",N=ks,j=ss;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(rs,{size:16}),e[20]=k):k=e[20],e[21]!==c?(R=s.jsxs(ns,{disabled:c,children:[k,"Change Role"]}),e[21]=c,e[22]=R):R=e[22],x=is;let P;e[23]!==c||e[24]!==n.id||e[25]!==a?(P=d=>{const C=[];return d.isBuiltin||(d.allowsAllStaticPermissions?C.push("Full org access"):d.staticPermissionCount&&d.staticPermissionCount>0&&C.push(`${d.staticPermissionCount} org perm${d.staticPermissionCount!==1?"s":""}`),d.allowsAllConnections?C.push("All connections"):d.connectionCount&&d.connectionCount>0&&C.push(`${d.connectionCount} connection${d.connectionCount!==1?"s":""}`),(d.connectionCount!==0||d.allowsAllConnections)&&(d.allowsAllTools?C.push("all tools"):d.toolCount&&d.toolCount>0&&C.push(`${d.toolCount} tool${d.toolCount!==1?"s":""}`))),s.jsxs(it,{onClick:L=>{L.stopPropagation(),a(n.id,d.role)},disabled:c,children:[d.isBuiltin?s.jsx(os,{size:16}):s.jsx(ls,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:d.label}),!d.isBuiltin&&C.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:C.join(", ")})]})]},d.role)},e[23]=c,e[24]=n.id,e[25]=a,e[26]=P):P=e[26],M=K.map(P),e[0]=p,e[1]=c,e[2]=n.id,e[3]=n.role,e[4]=a,e[5]=l,e[6]=x,e[7]=j,e[8]=g,e[9]=b,e[10]=M,e[11]=R,e[12]=v,e[13]=N,e[14]=y}else x=e[6],j=e[7],g=e[8],b=e[9],M=e[10],R=e[11],v=e[12],N=e[13],y=e[14];let $;e[27]!==x||e[28]!==M?($=s.jsx(x,{children:M}),e[27]=x,e[28]=M,e[29]=$):$=e[29];let m;e[30]!==j||e[31]!==R||e[32]!==$?(m=s.jsxs(j,{children:[R,$]}),e[30]=j,e[31]=R,e[32]=$,e[33]=m):m=e[33];let r;e[34]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(as,{}),e[34]=r):r=e[34];let f;e[35]!==n.id||e[36]!==i?(f=T=>{T.stopPropagation(),i(n.id)},e[35]=n.id,e[36]=i,e[37]=f):f=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(cs,{size:16}),e[38]=I):I=e[38];let w;e[39]!==f?(w=s.jsxs(it,{variant:"destructive",onClick:f,children:[I,"Remove Member"]}),e[39]=f,e[40]=w):w=e[40];let A;e[41]!==g||e[42]!==w||e[43]!==v||e[44]!==N||e[45]!==m?(A=s.jsxs(g,{align:v,onClick:N,children:[m,r,w]}),e[41]=g,e[42]=w,e[43]=v,e[44]=N,e[45]=m,e[46]=A):A=e[46];let z;return e[47]!==b||e[48]!==A||e[49]!==y?(z=s.jsxs(b,{children:[y,A]}),e[47]=b,e[48]=A,e[49]=y,e[50]=z):z=e[50],z}function ks(t){return t.stopPropagation()}function Fs(t){return t.stopPropagation()}function wt(t){const e=Y.c(8),{invitationId:n,onCancel:l,isCancelling:a}=t,i=a===void 0?!1:a;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(At,{asChild:!0,children:s.jsx(Pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ls,children:s.jsx(Et,{size:20})})}),e[0]=o):o=e[0];let c;e[1]!==n||e[2]!==l?(c=j=>{j.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=c):c=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Pt,{size:16}),e[4]=p):p=e[4];let x;return e[5]!==i||e[6]!==c?(x=s.jsxs(It,{children:[o,s.jsx(Mt,{align:"end",onClick:Os,children:s.jsxs(it,{variant:"destructive",onClick:c,disabled:i,children:[p,"Cancel Invitation"]})})]}),e[5]=i,e[6]=c,e[7]=x):x=e[7],x}function Os(t){return t.stopPropagation()}function Ls(t){return t.stopPropagation()}function qs(){const t=Y.c(101),{data:e}=Yt(),{data:n}=Ss(),l=ws(),a=$e(),{locator:i}=fe(),o=at(),[c,p]=ce.useState(null),[x,j]=ce.useState(null),[g,b]=ce.useState(""),[M,R]=ce.useState("table"),[v,N]=ce.useState("member"),[y,$]=ce.useState("asc"),m=e?.data?.members;let r;t[0]!==v?(r=u=>{v===u?$(Zs):(N(u),$("asc"))},t[0]=v,t[1]=r):r=t[1];const f=r;let I=m??[],w=n??[];if(g){const u=g.toLowerCase();I=I.filter(h=>h.user?.name?.toLowerCase().includes(u)||h.user?.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u)),w=w.filter(h=>h.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u))}if(v&&y){let u;t[2]!==y||t[3]!==v?(u=(h,_)=>{let B,de;e:switch(v){case"member":{B=h.user?.name||"",de=_.user?.name||"";break e}case"role":{B=h.role||"",de=_.role||"";break e}case"joined":{B=h.createdAt?typeof h.createdAt=="string"?h.createdAt:h.createdAt.toISOString():"",de=_.createdAt?typeof _.createdAt=="string"?_.createdAt:_.createdAt.toISOString():"";break e}default:return 0}return y==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=y,t[3]=v,t[4]=u):u=t[4],I=[...I].sort(u)}const A=I;let z;t[5]!==o?(z=async u=>{const h=await o.organization.removeMember({memberIdOrEmail:u});if(h?.error)throw new Error(h.error.message)},t[5]=o,t[6]=z):z=t[6];let T;t[7]!==i||t[8]!==a?(T=()=>{ue("member_removed"),a.invalidateQueries({queryKey:ie.members(i)}),G.success("Member has been removed from the organization"),p(null)},t[7]=i,t[8]=a,t[9]=T):T=t[9];let K;t[10]!==z||t[11]!==T?(K={mutationFn:z,onSuccess:T,onError:Ys},t[10]=z,t[11]=T,t[12]=K):K=t[12];const E=pe(K);let k;t[13]!==o?(k=async u=>{const{memberId:h,role:_}=u,B=await o.organization.updateMemberRole({memberId:h,role:[_]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let P;t[15]!==i||t[16]!==a?(P=(u,h)=>{ue("member_role_updated",{new_role:h.role}),a.invalidateQueries({queryKey:ie.members(i)}),G.success("Member's role has been updated")},t[15]=i,t[16]=a,t[17]=P):P=t[17];let d;t[18]!==k||t[19]!==P?(d={mutationFn:k,onSuccess:P,onError:Ws},t[18]=k,t[19]=P,t[20]=d):d=t[20];const C=pe(d);let L;t[21]!==o?(L=async u=>{const{invitationId:h,role:_,email:B}=u,de=await o.organization.cancelInvitation({invitationId:h});if(de?.error)throw new Error(de.error.message);const lt=await o.organization.inviteMember({email:B,role:_});if(lt?.error)throw new Error(lt.error.message)},t[21]=o,t[22]=L):L=t[22];let D;t[23]!==i||t[24]!==a?(D=(u,h)=>{ue("invitation_role_updated",{new_role:h.role}),a.invalidateQueries({queryKey:ie.invitations(i)}),G.success("Invitation role has been updated")},t[23]=i,t[24]=a,t[25]=D):D=t[25];let F;t[26]!==L||t[27]!==D?(F={mutationFn:L,onSuccess:D,onError:Hs},t[26]=L,t[27]=D,t[28]=F):F=t[28];const V=pe(F),{roles:O,customRoles:Q}=Tt();let q;t[29]!==Q?(q=$s(Q),t[29]=Q,t[30]=q):q=t[30];const U=q;let J;t[31]!==O?(J=O.filter(Js),t[31]=O,t[32]=J):J=t[32];const H=J;let W;t[33]===Symbol.for("react.memo_cache_sentinel")?(W={id:"member",header:"Member",render:Gs,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ae;t[34]!==U||t[35]!==H||t[36]!==V||t[37]!==C?(ae={id:"role",header:"Role",render:u=>u.type==="member"?s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:u.data.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(h,_)=>C.mutate({memberId:h,role:_}),className:"w-36"}):s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(h,_)=>V.mutate({invitationId:h,role:_,email:u.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=U,t[35]=H,t[36]=V,t[37]=C,t[38]=ae):ae=t[38];let xe,Z;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"tags",header:"Tags",render:Us,cellClassName:"w-40 shrink-0"},Z={id:"joined",header:"Joined",render:Qs,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=xe,t[40]=Z):(xe=t[39],Z=t[40]);let le;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==C?(le={id:"actions",header:"",render:u=>u.type==="member"?s.jsx(St,{member:u.data,roles:O,onChangeRole:(h,_)=>C.mutate({memberId:h,role:_}),onRemove:p,isUpdating:C.isPending}):s.jsx(wt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=C,t[44]=le):le=t[44];let me;t[45]!==ae||t[46]!==le?(me=[W,ae,xe,Z,le],t[45]=ae,t[46]=le,t[47]=me):me=t[47];const _e=me;let be;t[48]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ys,{trigger:s.jsx(Pe,{children:"Invite Member"})})}),t[48]=be):be=t[48];const Re=be,he=[...A.map(Vs),...w.filter(Ks).map(Bs)],oe=Ee,re=!!x;let X;t[49]===Symbol.for("react.memo_cache_sentinel")?(X=()=>j(null),t[49]=X):X=t[49];let ee;t[50]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsxs(ht,{children:[s.jsx(gt,{children:"Cancel Invitation"}),s.jsx(pt,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=ee):ee=t[50];let te;t[51]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(xt,{children:"Keep Invitation"}),t[51]=te):te=t[51];let se;t[52]!==l.cancel||t[53]!==x?(se=()=>{x&&(l.cancel.mutate(x),j(null))},t[52]=l.cancel,t[53]=x,t[54]=se):se=t[54];let S;t[55]!==l.cancel.isPending||t[56]!==se?(S=s.jsxs(dt,{children:[ee,s.jsxs(ut,{children:[te,s.jsx(ft,{onClick:se,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=se,t[57]=S):S=t[57];let ne;t[58]!==re||t[59]!==S?(ne=s.jsx(bt,{open:re,onOpenChange:X,children:S}),t[58]=re,t[59]=S,t[60]=ne):ne=t[60];const ge=!!c;let je;t[61]===Symbol.for("react.memo_cache_sentinel")?(je=()=>p(null),t[61]=je):je=t[61];let ke;t[62]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsxs(ht,{children:[s.jsx(gt,{children:"Remove Member"}),s.jsx(pt,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=ke):ke=t[62];let Fe;t[63]===Symbol.for("react.memo_cache_sentinel")?(Fe=s.jsx(xt,{children:"Cancel"}),t[63]=Fe):Fe=t[63];let ve;t[64]!==c||t[65]!==E?(ve=()=>c&&E.mutate(c),t[64]=c,t[65]=E,t[66]=ve):ve=t[66];let Ce;t[67]!==E.isPending||t[68]!==ve?(Ce=s.jsxs(dt,{children:[ke,s.jsxs(ut,{children:[Fe,s.jsx(ft,{onClick:ve,disabled:E.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=E.isPending,t[68]=ve,t[69]=Ce):Ce=t[69];let ye;t[70]!==ge||t[71]!==Ce?(ye=s.jsx(bt,{open:ge,onOpenChange:je,children:Ce}),t[70]=ge,t[71]=Ce,t[72]=ye):ye=t[72];const Ue=Ee,Ge=Ee,Rt="flex flex-col gap-6";let Se;t[73]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Ee.Title,{children:"Members"}),t[73]=Se):Se=t[73];let Oe;t[74]===Symbol.for("react.memo_cache_sentinel")?(Oe=u=>{u.key==="Escape"&&(b(""),u.target.blur())},t[74]=Oe):Oe=t[74];let we;t[75]!==g?(we=s.jsx(Lt,{value:g,onChange:b,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Oe}),t[75]=g,t[76]=we):we=t[76];let Le;t[77]===Symbol.for("react.memo_cache_sentinel")?(Le=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[77]=Le):Le=t[77];let Ne;t[78]!==f||t[79]!==y||t[80]!==v||t[81]!==M?(Ne=s.jsx(Ot,{viewMode:M,onViewModeChange:R,sortKey:v,sortDirection:y,onSort:f,sortOptions:Le}),t[78]=f,t[79]=y,t[80]=v,t[81]=M,t[82]=Ne):Ne=t[82];let Te;t[83]!==we||t[84]!==Ne?(Te=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[we,Ne]}),Re]}),t[83]=we,t[84]=Ne,t[85]=Te):Te=t[85];const Je=M==="cards"?s.jsx("div",{children:he.length===0?s.jsx(He,{title:"No members found",description:g?`No members match "${g}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:he.map(u=>{if(u.type==="invitation")return s.jsxs(jt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(wt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(Ke,{fallback:Ve(u.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:u.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Qe,{variant:"outline",className:"w-fit text-amber-600 border-amber-400",children:"Pending"})}),s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(_,B)=>V.mutate({invitationId:_,role:B,email:u.data.email}),className:"w-fit"})]})]})]},`inv-${u.data.id}`);const h=u.data;return s.jsxs(jt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(St,{member:h,roles:O,onChangeRole:(_,B)=>C.mutate({memberId:_,role:B}),onRemove:p,isUpdating:C.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(Ke,{url:h.user?.image??void 0,fallback:Ve(h.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:h.user?.email}),s.jsx(Be,{role:h.role,memberId:h.id,isOwner:h.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(_,B)=>C.mutate({memberId:_,role:B}),className:"w-fit"}),s.jsx(_t,{memberId:h.id,maxDisplay:3})]})]})]},h.id)})})}):s.jsx(qt,{columns:_e,data:he,isLoading:!1,sortKey:v,sortDirection:y,onSort:f,emptyState:g?s.jsx(He,{title:"No members found",description:`No members match "${g}"`}):s.jsx(He,{title:"No members found",description:"Invite members to get started."})});let Ie;t[86]!==Se||t[87]!==Te||t[88]!==Je?(Ie=s.jsxs("div",{className:Rt,children:[Se,Te,Je]}),t[86]=Se,t[87]=Te,t[88]=Je,t[89]=Ie):Ie=t[89];let Ae;t[90]!==Ge.Body||t[91]!==Ie?(Ae=s.jsx(Ge.Body,{children:Ie}),t[90]=Ge.Body,t[91]=Ie,t[92]=Ae):Ae=t[92];let Me;t[93]!==Ue.Content||t[94]!==Ae?(Me=s.jsx(Ue.Content,{children:Ae}),t[93]=Ue.Content,t[94]=Ae,t[95]=Me):Me=t[95];let qe;return t[96]!==oe||t[97]!==ne||t[98]!==ye||t[99]!==Me?(qe=s.jsxs(oe,{children:[ne,ye,Me]}),t[96]=oe,t[97]=ne,t[98]=ye,t[99]=Me,t[100]=qe):qe=t[100],qe}function Bs(t){return{type:"invitation",data:t}}function Ks(t){return t.status==="pending"}function Vs(t){return{type:"member",data:t}}function Qs(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ds(t.data.createdAt):"N/A"}):s.jsx(Qe,{variant:"outline",children:"Pending"})}function Us(t){return t.type==="member"?s.jsx(_t,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Gs(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ke,{url:t.data.user?.image??void 0,fallback:Ve(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ke,{fallback:Ve(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function Js(t){return t.role!=="owner"}function Hs(t,e){ue("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update invitation role")}function Ws(t,e){ue("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update role")}function Ys(t){ue("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to remove member")}function Zs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Xs(){const t=Y.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ee,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ft,{fallback:e,children:s.jsx(ce.Suspense,{fallback:s.jsx(Ee,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Ze,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(qs,{})})}),t[1]=n):n=t[1],n}function Hn(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(js,{capability:"members:manage",area:"members",children:s.jsx(Xs,{})}),t[0]=e):e=t[0],e}export{Hn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as L,j as f,r as p,_ as O}from"./index-
|
|
1
|
+
import{e as L,j as f,r as p,_ as O}from"./index-DEUVODq9.js";import{l as I,F as $}from"./index-CwjMi0Lt.js";import{S as N}from"./spinner-CZkJwfre.js";async function K(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const n=t.getValue(),i=n.replace(/export default (async )?function/,"export default $1function __default")+`
|
|
2
2
|
type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
|
|
3
3
|
? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
|
|
4
4
|
: T extends object
|