decocms 4.76.65 → 4.76.67
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-CSlLDjVl.js → AlertCircle-DsNnXxlG.js} +1 -1
- package/dist/client/assets/{AreaChart-BFXZ-Tz2.js → AreaChart-DNQH4zZ9.js} +1 -1
- package/dist/client/assets/{ArrowUp-n6socSje.js → ArrowUp-BeIfqPX3.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DB_wxAjZ.js → ArrowUpRight-VnVntsfP.js} +1 -1
- package/dist/client/assets/{Check-6H8MzQ8B.js → Check-b8JPx69Q.js} +1 -1
- package/dist/client/assets/{CheckCircle-DGzuiiIH.js → CheckCircle-Q0XPjh3b.js} +1 -1
- package/dist/client/assets/{ChevronDown-1aKwXRuP.js → ChevronDown-DogWDo8R.js} +1 -1
- package/dist/client/assets/{ChevronRight-MsqQ3q-h.js → ChevronRight-CLLwxuIR.js} +1 -1
- package/dist/client/assets/{ChevronUp-B5fWCbfR.js → ChevronUp-Yw2Z5-Ig.js} +1 -1
- package/dist/client/assets/{Circle-B8tMsDAl.js → Circle-Vl1Ed5w9.js} +1 -1
- package/dist/client/assets/{Copy01-CHPPVu96.js → Copy01-XxnVHFKO.js} +1 -1
- package/dist/client/assets/{DotsVertical-D50LJhaD.js → DotsVertical-BnlxGwof.js} +1 -1
- package/dist/client/assets/{Eye-JRLxw6Qv.js → Eye-q0KnLFa5.js} +1 -1
- package/dist/client/assets/{FilterLines-BNhpXbRL.js → FilterLines-C87JX8_Y.js} +1 -1
- package/dist/client/assets/{Flag01-BlO8AJzd.js → Flag01-zqhgV37Z.js} +1 -1
- package/dist/client/assets/{Globe01-CNFIXriF.js → Globe01-WFJopxRd.js} +1 -1
- package/dist/client/assets/{Globe04-B50PHw6Y.js → Globe04-hfCQ11Ph.js} +1 -1
- package/dist/client/assets/{HardDrive-CBVDl6oT.js → HardDrive-Cn9nLA27.js} +1 -1
- package/dist/client/assets/{Key01-D0j1zJZy.js → Key01-B6H3uINt.js} +1 -1
- package/dist/client/assets/{LayoutLeft-52oWt_G_.js → LayoutLeft-BAf1BB19.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CdBB9htY.js → LinkExternal01-Brda4GUF.js} +1 -1
- package/dist/client/assets/{List-UI5nTDe1.js → List-ygMYp0lM.js} +1 -1
- package/dist/client/assets/{Monitor01-BopNKJvL.js → Monitor01-G0jf2lMg.js} +1 -1
- package/dist/client/assets/{Package-CY4fIjZB.js → Package-DRHrDsV1.js} +1 -1
- package/dist/client/assets/{Palette-Dfx05hI-.js → Palette-DHgoVymS.js} +1 -1
- package/dist/client/assets/{Play-BM8C0pAX.js → Play-C0jQIgcf.js} +1 -1
- package/dist/client/assets/{Plus-CBUwDXnC.js → Plus-BbxfSt4x.js} +1 -1
- package/dist/client/assets/{SearchLg-Bb555Qka.js → SearchLg-xCaE1HiW.js} +1 -1
- package/dist/client/assets/{SearchMd-D6r_RTbP.js → SearchMd-yzhg2WsZ.js} +1 -1
- package/dist/client/assets/{Settings02-BdT0Z0Ie.js → Settings02-DhNYCwNd.js} +1 -1
- package/dist/client/assets/{Shield01-BZ-3NWPV.js → Shield01-BYeFRP7n.js} +1 -1
- package/dist/client/assets/{Star01-TcxG5y7j.js → Star01-DMqwAo1y.js} +1 -1
- package/dist/client/assets/{Stars01-D-dC3HtA.js → Stars01-76dizxvE.js} +1 -1
- package/dist/client/assets/{Stars02-DGHWWAh6.js → Stars02-D8Ip0ZAP.js} +1 -1
- package/dist/client/assets/{Sun-BL7S9IXe.js → Sun-DQ1K1SkZ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DMNeIFuz.js → SwitchHorizontal01-B0O4eLcp.js} +1 -1
- package/dist/client/assets/{Tool01-DNv1k5XE.js → Tool01-Bbbvg81B.js} +1 -1
- package/dist/client/assets/{Tool02-Djmr3cBc.js → Tool02-CzB8Pd-e.js} +1 -1
- package/dist/client/assets/{Trash01-DQUgZ9rz.js → Trash01-BQlWFbGQ.js} +1 -1
- package/dist/client/assets/{TrendUp01-C8zwyWAN.js → TrendUp01-D09a8--S.js} +1 -1
- package/dist/client/assets/{Upload01-pCQ1y-m7.js → Upload01-B7Ts0Xt0.js} +1 -1
- package/dist/client/assets/{User01-B_HZ77z7.js → User01-vA9RYEmY.js} +1 -1
- package/dist/client/assets/{UserPlus01-D6kfVsnr.js → UserPlus01-zuXCvSfS.js} +1 -1
- package/dist/client/assets/{Users01-Bv3vo4Zo.js → Users01-BkJU3pYf.js} +1 -1
- package/dist/client/assets/{Users03-BSoeQmT1.js → Users03-B01odJ5H.js} +1 -1
- package/dist/client/assets/{X-RHDLsGP-.js → X-DS2ILiqE.js} +1 -1
- package/dist/client/assets/{XCircle-kixeUG52.js → XCircle-G0hZIjUw.js} +1 -1
- package/dist/client/assets/{XClose-soZZczeb.js → XClose-BuIIOE6w.js} +1 -1
- package/dist/client/assets/{Zap-DxJA0Sbs.js → Zap-BvLJR-mb.js} +1 -1
- package/dist/client/assets/{ZapSquare-vcJUcLuE.js → ZapSquare-BOI16ThE.js} +1 -1
- package/dist/client/assets/{ZoomOut-qyVzizsK.js → ZoomOut-ajuSWwhL.js} +1 -1
- package/dist/client/assets/{access-gate-CvMF7uj0.js → access-gate-CSEWtf-p.js} +1 -1
- package/dist/client/assets/{add-section-modal-Clm8S_aK.js → add-section-modal-CZVj-GQp.js} +1 -1
- package/dist/client/assets/{agent-icon-evdXr2NN.js → agent-icon-1KlpC6DP.js} +1 -1
- package/dist/client/assets/{agents-list-zWG6U6hD.js → agents-list-HO_TL_iU.js} +1 -1
- package/dist/client/assets/{ai-providers-BwN48nZv.js → ai-providers-pO6YIi5D.js} +1 -1
- package/dist/client/assets/{alert-C8veuY89.js → alert-O5dcKRxl.js} +1 -1
- package/dist/client/assets/{alert-dialog-DFaMDF7X.js → alert-dialog-BxbGoANG.js} +1 -1
- package/dist/client/assets/{app-editor-CLFic6ol.js → app-editor--QRCm-kX.js} +1 -1
- package/dist/client/assets/{auth-_x7vT1Bj.js → auth-BK0iVXFl.js} +1 -1
- package/dist/client/assets/{auth-catchall-BcmX6S2R.js → auth-catchall-Mx27KV68.js} +1 -1
- package/dist/client/assets/{auth-entry-BrUCt24E.js → auth-entry-1r2Dk-YX.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BAnH0KzJ.js → auth-split-layout-pk8lfpOJ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cs2T2r6K.js → authenticate-and-persist-oauth-BJ-3FIhP.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dx3ICZtD.js → automation-list-row-eKBt84VS.js} +1 -1
- package/dist/client/assets/{automation-runs-DaqgLKcW.js → automation-runs-CTSES-QH.js} +1 -1
- package/dist/client/assets/automations-DbSgoLDU.js +1 -0
- package/dist/client/assets/{autosend-_fBY05Xc.js → autosend-BEu7jiv8.js} +1 -1
- package/dist/client/assets/{avatar-BctcMz-W.js → avatar-YXhA4ULu.js} +1 -1
- package/dist/client/assets/{badge-RKj1zMKo.js → badge-DloWAsWi.js} +1 -1
- package/dist/client/assets/{block-document-VWQp0rvn.js → block-document-TagmIJOB.js} +1 -1
- package/dist/client/assets/{brand-context-Dz6G83Xg.js → brand-context-D3OynBGS.js} +1 -1
- package/dist/client/assets/{buckets-F5eSTW4u.js → buckets-DDCplP2x.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BOAZJprn.js → bulk-category-panel-Apz3HbMm.js} +1 -1
- package/dist/client/assets/{calendar-D_CjWUJH.js → calendar-BB3EXs2W.js} +1 -1
- package/dist/client/assets/{capability-load-error-nFVikmM2.js → capability-load-error-B7nBP8x3.js} +1 -1
- package/dist/client/assets/{card-BTGxMnfM.js → card-DIJ_fcwi.js} +1 -1
- package/dist/client/assets/{category-editor-CCxbLtlo.js → category-editor-CHRslHAI.js} +1 -1
- package/dist/client/assets/{chat-context-csuWvRrc.js → chat-context-BF1A-xsV.js} +1 -1
- package/dist/client/assets/{checkbox-cLyf1ifn.js → checkbox-vwl7w0Pc.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CJ1NK3F5.js → cli-auth-success-iwjqGFJG.js} +1 -1
- package/dist/client/assets/{collection-detail-DC6_OaI6.js → collection-detail-Ct1Zj8G5.js} +1 -1
- package/dist/client/assets/{collection-display-button-C2pGMKtu.js → collection-display-button-DN44yKf7.js} +1 -1
- package/dist/client/assets/{collection-search-DWQDzm3u.js → collection-search-CFi-v0VM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C-0GRtjQ.js → collection-table-wrapper-Bt1hyeft.js} +1 -1
- package/dist/client/assets/{collection-tabs-i3paW9sa.js → collection-tabs-9Wp7bYDd.js} +1 -1
- package/dist/client/assets/{command-SUeovi7y.js → command-BVqkHUqa.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-aQY4OBBe.js → commerce-onboarding-Blzw_JQb.js} +1 -1
- package/dist/client/assets/{companions-core-B8GVx57H.js → companions-core-BbYYN9AY.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BNXi8Pm-.js → connect-desktop-dialog-CBYlEQdL.js} +1 -1
- package/dist/client/assets/{connection-card-CpshBnXN.js → connection-card-CXZwD1XR.js} +1 -1
- package/dist/client/assets/{connection-detail-DfSyzdkU.js → connection-detail-Xk9JtV_h.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-ST0pmPEu.js → connection-form-helpers-CkZ2iyVQ.js} +1 -1
- package/dist/client/assets/{connections-CvxF-kPS.js → connections-B9tDBXjS.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DWE99MvD.js → decopilot-sse-pool-Dq-bfwTg.js} +1 -1
- package/dist/client/assets/{dialog-gQf3w6Lt.js → dialog-gq7Ep-9q.js} +1 -1
- package/dist/client/assets/{domain-settings-B_X8FsvU.js → domain-settings-97aWlADs.js} +1 -1
- package/dist/client/assets/{drawer-D-Rcxcuv.js → drawer-CVk71aOd.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BTca8TW5.js → dropdown-menu-CJpvUzy-.js} +1 -1
- package/dist/client/assets/{empty-state-DKxWyNjo.js → empty-state-m64BYhfO.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DhkH-_u5.js → extract-connection-data-CBqlnXFJ.js} +1 -1
- package/dist/client/assets/{file-explorer-D-jCeTVI.js → file-explorer-DrXEWGhc.js} +1 -1
- package/dist/client/assets/{file-type-icon-BdFCf1U8.js → file-type-icon-B3_94ZCj.js} +1 -1
- package/dist/client/assets/{files-CRng6m5a.js → files-tcYgC__M.js} +1 -1
- package/dist/client/assets/{form-BtbkERbP.js → form-BU_AP4iS.js} +1 -1
- package/dist/client/assets/{general-BIBc2qxP.js → general-DdIZNTxu.js} +1 -1
- package/dist/client/assets/{github-repo-picker-lisipgk1.js → github-repo-picker-11h3h1Zg.js} +1 -1
- package/dist/client/assets/{hooks-Co_Mdy74.js → hooks-DEyK611q.js} +1 -1
- package/dist/client/assets/{index-CXZ6ea9j.js → index-B4gRtexE.js} +1 -1
- package/dist/client/assets/{index-NIx2v3Vq.js → index-BKaapCoG.js} +1 -1
- package/dist/client/assets/{index-BQvihndx.js → index-BN2iUJzO.js} +1 -1
- package/dist/client/assets/{index-DIvUWEiM.js → index-BpMS0q8S.js} +1 -1
- package/dist/client/assets/{index-Cl3SYnR9.js → index-BpP-k_EF.js} +1 -1
- package/dist/client/assets/{index-DTvlf0HU.js → index-COHyFwNP.js} +1 -1
- package/dist/client/assets/{index-DyHiCM0X.js → index-CbXIUtWN.js} +2 -2
- package/dist/client/assets/{index-BnnQUNFw.js → index-CfPc1J12.js} +1 -1
- package/dist/client/assets/{index-CzPS_mKq.js → index-D1RLRVAk.js} +1 -1
- package/dist/client/assets/{index-s_a3ZfGO.js → index-D3O0-Aa7.js} +7 -7
- package/dist/client/assets/{index-CZq4WG7W.js → index-DwBnjisR.js} +1 -1
- package/dist/client/assets/{index-C180z1IT.js → index-Iv0BKwOS.js} +1 -1
- package/dist/client/assets/{index-D66JKmS1.js → index-oc_rN11o.js} +3 -3
- package/dist/client/assets/{index-redirect-ClorhD4B.js → index-redirect-BCmPoyk_.js} +1 -1
- package/dist/client/assets/{index-BfA9BY5h.js → index-zfvBHIuW.js} +1 -1
- package/dist/client/assets/{input-CLQMe2qE.js → input-B4slPD4S.js} +1 -1
- package/dist/client/assets/{integration-icon-D66rbaoP.js → integration-icon-qVQlRz_y.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Dvg6g7i1.js → invite-member-dialog-DTOU0Zb-.js} +1 -1
- package/dist/client/assets/{label-BDmNI4-u.js → label-CTumOLkJ.js} +1 -1
- package/dist/client/assets/{layout-BjnlDct8.js → layout-CoB7POGr.js} +1 -1
- package/dist/client/assets/{login-BLbz34Hz.js → login-B5YrV5kl.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Ch3q5__c.js → mcp-oauth-BEx3ehCv.js} +1 -1
- package/dist/client/assets/{members-B-NFJT9-.js → members-DvKgneQo.js} +1 -1
- package/dist/client/assets/{monaco-editor-MG1Wht5y.js → monaco-editor-x1VemRhU.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BcK7HCzn.js → monitoring-stats-row-C-qu7rCw.js} +1 -1
- package/dist/client/assets/{multi-select-C07lJ16E.js → multi-select-6GrLCIz3.js} +1 -1
- package/dist/client/assets/{oauth-callback-DHZXT0Tp.js → oauth-callback-BOw4JGhC.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-AkOLihj-.js → oauth-callback-ai-provider-DsJAvuhu.js} +1 -1
- package/dist/client/assets/{onboarding-VRXU880E.js → onboarding-CjYcjJHF.js} +1 -1
- package/dist/client/assets/{org-install-Ck373eHo.js → org-install-CgM6RCv4.js} +1 -1
- package/dist/client/assets/{org-layout-DuyJnrYd.js → org-layout-B1miD1Gy.js} +1 -1
- package/dist/client/assets/{organization-choice-CEio_AKI.js → organization-choice-B3h9Mz0m.js} +1 -1
- package/dist/client/assets/{orgs-B2HZI4pm.js → orgs-BrlDxtvR.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cl3Rjs2T.js → page-seo-form-BQN5fF6z.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CyhWzLvw.js +1 -0
- package/dist/client/assets/{popover-jU0RlUZ1.js → popover-BCSPCOls.js} +1 -1
- package/dist/client/assets/{post-editor-B3ZgMosV.js → post-editor-DpfeDcXG.js} +1 -1
- package/dist/client/assets/{primitives-B4SWeH79.js → primitives-DXpOHeGI.js} +1 -1
- package/dist/client/assets/{profile-CTpMHwdv.js → profile-CgyV81dL.js} +1 -1
- package/dist/client/assets/project-app-view-B9uahIh0.js +1 -0
- package/dist/client/assets/record-editor-CZ9ABVFP.js +1 -0
- package/dist/client/assets/redirect-editor-CMC81C1g.js +1 -0
- package/dist/client/assets/registry-DJZngwyt.js +2 -0
- package/dist/client/assets/{registry-layout-CZyzRxQv.js → registry-layout-DzEKxAZc.js} +1 -1
- package/dist/client/assets/{reports-BDBNjpuQ.js → reports-CneTSLCD.js} +1 -1
- package/dist/client/assets/{require-capability-Cct-8tpj.js → require-capability-Dg5DNxOq.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CN62MbMw.js → required-auth-layout-BrN9muvX.js} +1 -1
- package/dist/client/assets/{reset-password-uYdrf8hB.js → reset-password-CvZA5MJk.js} +1 -1
- package/dist/client/assets/{roles-H1sn5pvL.js → roles-CP-663T9.js} +1 -1
- package/dist/client/assets/{search-input-xFeMFa4u.js → search-input-DrnK--wa.js} +1 -1
- package/dist/client/assets/{secrets-DBQo9cMC.js → secrets-DRcDQqAe.js} +1 -1
- package/dist/client/assets/{sections-editor-C2veKgqE.js → sections-editor-CCP1kFpV.js} +1 -1
- package/dist/client/assets/{select-D3aU1MPe.js → select-CNsEYIFu.js} +1 -1
- package/dist/client/assets/{select-model-BvE04AWN.js → select-model-B54NqOVp.js} +1 -1
- package/dist/client/assets/{self-tool-result-Dr0KvxtW.js → self-tool-result-BLAzyGzs.js} +1 -1
- package/dist/client/assets/{seo-editor-DtrKOCp9.js → seo-editor-BMAE6Q6b.js} +1 -1
- package/dist/client/assets/{settings-layout-CEEb75VZ.js → settings-layout-CSeoij1Z.js} +1 -1
- package/dist/client/assets/{settings-section-Tn6A8MKv.js → settings-section-CiB1bNdk.js} +1 -1
- package/dist/client/assets/{shell-controls-CbjKrhnn.js → shell-controls-CEIf64Y4.js} +1 -1
- package/dist/client/assets/{shell-layout-B5rqHhSn.js → shell-layout-ChryuWf7.js} +1 -1
- package/dist/client/assets/{sidebar-cEMyuA4R.js → sidebar-CR5QPyYz.js} +1 -1
- package/dist/client/assets/{skeleton-DOwUQ6KF.js → skeleton-DR7kywkC.js} +1 -1
- package/dist/client/assets/{sso-C9lM6RME.js → sso-CVbh1-UO.js} +1 -1
- package/dist/client/assets/{store-OgoPG6I7.js → store-CUn3cpqa.js} +1 -1
- package/dist/client/assets/store-registry-DO2TaPIL.js +2 -0
- package/dist/client/assets/{studio-tools-C7zePB_Y.js → studio-tools-Bhqja8-P.js} +1 -1
- package/dist/client/assets/{switch-BeLSaLnY.js → switch-DVfF4nF1.js} +1 -1
- package/dist/client/assets/{table-Dpo14C-4.js → table-C2Aw2EEt.js} +1 -1
- package/dist/client/assets/{tabs-CTLYRGZc.js → tabs-C_lfmz7k.js} +1 -1
- package/dist/client/assets/{textarea-Db8SbW88.js → textarea-CNuzuKIF.js} +1 -1
- package/dist/client/assets/{toggle-group-Lpl8B-G_.js → toggle-group-B4o6jvfj.js} +1 -1
- package/dist/client/assets/{toolbar-CrhGXwNx.js → toolbar-Qw7tvQAb.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DCjQdjLd.js → toolbar-icon-button-CYA18JsR.js} +1 -1
- package/dist/client/assets/{tooltip-DmpAo3sc.js → tooltip-B9mflsA-.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DP9TXB-2.js → use-ai-providers-lTB33oHs.js} +1 -1
- package/dist/client/assets/{use-automations-DE38qYkm.js → use-automations-pLJ_zXUY.js} +1 -1
- package/dist/client/assets/{use-autosave-Bd_6nQNp.js → use-autosave-DmVpgfW5.js} +1 -1
- package/dist/client/assets/{use-capability-CyyP3WX6.js → use-capability-DDxNF4sV.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CF7d3glr.js → use-clock-tick-B6gStxTg.js} +1 -1
- package/dist/client/assets/{use-collections-k892Z9fJ.js → use-collections-D5eJ8QN7.js} +1 -1
- package/dist/client/assets/{use-connection-_Sc4uLcl.js → use-connection-BjOIRJif.js} +1 -1
- package/dist/client/assets/{use-copy-BcK-qmBt.js → use-copy-DayrEDg_.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BvO4l07G.js → use-create-virtual-mcp-_HyPWpEb.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CV6KA1uO.js → use-debounced-autosave-waJp8rYU.js} +1 -1
- package/dist/client/assets/{use-debounced-value-1LfKQ73F.js → use-debounced-value-c7vL7Mrv.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DA3yDvD2.js → use-deco-credits-5lVeokY5.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-sOqNrnad.js → use-decopilot-events-Y87a78wj.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BnBo_WaX.js → use-delete-connection-CyZgvPbh.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D3gymKAS.js → use-deployment-admin-CVKTUN-9.js} +1 -1
- package/dist/client/assets/{use-file-configs-CSoqD80F.js → use-file-configs-ChMLq3oF.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BZnGLGkk.js → use-infinite-scroll-CdhdMrEM.js} +1 -1
- package/dist/client/assets/{use-join-requests-wfz-iPrR.js → use-join-requests-D5mR0aS9.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DcSN8Lby.js → use-mcp-auth-status-CWJiM_Fy.js} +1 -1
- package/dist/client/assets/{use-mcp-client-QIuAMSRe.js → use-mcp-client-R6MqGXiS.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-f9RGo3kZ.js → use-mcp-tools-Dekk67sC.js} +1 -1
- package/dist/client/assets/{use-members-8OmpnvQU.js → use-members-CckCgG28.js} +1 -1
- package/dist/client/assets/{use-mobile-Bt8t6kto.js → use-mobile-Dam1x1Ak.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-nbeVeqcC.js → use-navigate-to-agent-BMOlwTsz.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D58aH-of.js → use-org-auth-client-9RD0DuFO.js} +1 -1
- package/dist/client/assets/{use-org-sso-B7N8f70Z.js → use-org-sso-CaPIl75M.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DAa6Wx7g.js → use-organization-roles-DHIXf7EJ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DE5Ux26s.js → use-organization-settings-yqx8Q332.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BQSlf_K6.js → use-registry-connections-CsmCjv4-.js} +1 -1
- package/dist/client/assets/{use-secrets-Duaw_l_T.js → use-secrets-Dw5MWwDH.js} +1 -1
- package/dist/client/assets/{use-status-sounds-hsSZcyQz.js → use-status-sounds-Bf3TrKe7.js} +1 -1
- package/dist/client/assets/{use-view-mode-BVi5q-qq.js → use-view-mode-p-KXoG7u.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-q8ZwDxHd.js → use-virtual-mcp-B9REsFOg.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C5xp-e2E.js +1 -0
- package/dist/client/assets/{useRouterState-eMxmCtHe.js → useRouterState-BayGibUe.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DgzxlpCH.js +1 -0
- package/dist/client/assets/{users-C20rByc1.js → users-BQJU-jJG.js} +1 -1
- package/dist/client/assets/{variant-calendar-CsE9Ftbk.js → variant-calendar-D8Nra45T.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BhpJPXOn.js → view-mode-toggle-DR4gvHM2.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/automations-B0uve0nh.js +0 -1
- package/dist/client/assets/page-seo-sheet-AebqWhFg.js +0 -1
- package/dist/client/assets/project-app-view-BKHASLQu.js +0 -1
- package/dist/client/assets/record-editor-sh8Zyver.js +0 -1
- package/dist/client/assets/redirect-editor-DGIbLKLZ.js +0 -1
- package/dist/client/assets/registry-DOp8PqFu.js +0 -2
- package/dist/client/assets/store-registry-B8tKS8cM.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CnWbGhgE.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C5gNsE2J.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,e as p,j as s,i as u,N as a}from"./index-
|
|
1
|
+
import{c as g,e as p,j as s,i as u,N as a}from"./index-oc_rN11o.js";import{a as x}from"./use-capability-DDxNF4sV.js";import{C as j}from"./capability-load-error-B7nBP8x3.js";function v(){const t=g.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:c,error:f}=x();if(c){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(f){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{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-oc_rN11o.js";import{r as w}from"./sidebar-CR5QPyYz.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,l as a,j as d}from"./index-
|
|
1
|
+
import{c as s,l as a,j as d}from"./index-oc_rN11o.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{c as k,j as h,r as C,l as L}from"./index-
|
|
1
|
+
import{c as k,j as h,r as C,l as L}from"./index-oc_rN11o.js";import{n as Z}from"./Tool02-CzB8Pd-e.js";import{A as y}from"./agent-icon-1KlpC6DP.js";const M={"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"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
|
package/dist/client/assets/{invite-member-dialog-Dvg6g7i1.js → invite-member-dialog-DTOU0Zb-.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{I as M,r as N,C as R,n as L,a as V,M as B,d as K,p,t as c,K as j,j as s,B as C}from"./index-
|
|
1
|
+
import{I as M,r as N,C as R,n as L,a as V,M as B,d as K,p,t as c,K as j,j as s,B as C}from"./index-oc_rN11o.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-gq7Ep-9q.js";import{a as U,F as b,b as v,c as Y,d as w,f as S}from"./form-BU_AP4iS.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-CNsEYIFu.js";import{T as _}from"./textarea-CNuzuKIF.js";import{u as ee}from"./use-org-auth-client-9RD0DuFO.js";import{u as se}from"./use-organization-roles-DHIXf7EJ.js";const te=M().email("Invalid email address");function ne(r){if(!r.trim())return[];const m=r.split(/[,;\n]/).map(a=>a.trim().toLowerCase()).filter(a=>a.length>0);return Array.from(new Set(m))}function de({trigger:r}){const[m,a]=N.useState(!1),{locator:g}=R(),E=ee(),x=L(),{data:F}=V.useSession(),f=F?.user?.email,{roles:P,isLoading:y}=se(),T=P.filter(t=>t.role!=="owner"),i=B({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),$=i.watch("emailsText"),I=i.watch("role"),l=ne($).filter(t=>{const e=te.safeParse(t).success,n=!f||t!==f.toLowerCase();return e&&n}),o=K({mutationFn:async({emails:t,role:e})=>{if(!e)throw new Error("Please select a role");const n=await Promise.allSettled(t.map(async d=>{const h=await E.organization.inviteMember({email:d,role:e});if(h.error)throw new Error(h.error.message);return h.data})),u=n.filter(d=>d.status==="rejected");if(u.length>0)throw new Error(`Failed to invite ${u.length} member${u.length>1?"s":""}`);return n},onSuccess:(t,{emails:e,role:n})=>{p("member_invited",{count:e.length,role:n}),x.invalidateQueries({queryKey:j.members(g)}),x.invalidateQueries({queryKey:j.invitations(g)}),c.success(e.length===1?"Member invited successfully!":`${e.length} members invited successfully!`),i.reset({emailsText:"",role:"user"}),a(!1)},onError:(t,{emails:e,role:n})=>{p("member_invite_failed",{count:e.length,role:n,error:t instanceof Error?t.message:String(t)}),c.error(t instanceof Error?t.message:"Failed to invite members")}}),A=t=>{if(l.length===0){c.error("Please enter at least one valid email address");return}if(!t.role){c.error("Please select a role");return}o.mutate({emails:l,role:t.role})},D=l.length>0&&!!I;return s.jsxs(O,{open:m,onOpenChange:a,children:[s.jsx(q,{asChild:!0,children:r}),s.jsxs(z,{className:"sm:max-w-lg",children:[s.jsx(Q,{children:s.jsx(k,{children:"Invite members"})}),s.jsx(U,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(A),className:"space-y-4",children:[s.jsx(b,{control:i.control,name:"emailsText",render:({field:t})=>s.jsxs(v,{children:[s.jsx(Y,{children:"Email addresses"}),s.jsx(w,{children:s.jsx(_,{...t,disabled:o.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(S,{})]})}),s.jsx(b,{control:i.control,name:"role",render:({field:t})=>s.jsxs(v,{children:[s.jsx(w,{children:s.jsxs(G,{value:t.value,onValueChange:t.onChange,disabled:o.isPending||y,children:[s.jsx(J,{className:"w-full",children:s.jsx(W,{placeholder:"Select a role"})}),s.jsx(X,{children:T.map(e=>{const n=[];return e.isBuiltin||(e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),(e.connectionCount!==0||e.allowsAllConnections)&&(e.allowsAllTools?n.push("all tools"):e.toolCount&&e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount!==1?"s":""}`))),s.jsx(Z,{value:e.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.label}),!e.isBuiltin&&n.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:n.join(", ")})]})},e.role)})})]})}),s.jsx(S,{})]})}),s.jsxs(H,{children:[s.jsx(C,{variant:"outline",onClick:()=>{i.reset({emailsText:"",role:"user"}),a(!1)},type:"button",disabled:o.isPending,children:"Cancel"}),s.jsx(C,{type:"submit",disabled:o.isPending||!D,children:o.isPending?"Inviting...":`Invite ${l.length||0} Member${l.length!==1?"s":""}`})]})]})})]})]})}export{de as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as r,j as i,bG as p}from"./index-
|
|
1
|
+
import{c as n,l as r,j as i,bG as p}from"./index-oc_rN11o.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,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 l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as t,i as u,B as h,L as f,k as x,O as p,l as b}from"./index-
|
|
1
|
+
import{c as d,j as t,i as u,B as h,L as f,k as x,O as p,l as b}from"./index-oc_rN11o.js";import{u as j}from"./useRouterState-BayGibUe.js";import{R as _}from"./required-auth-layout-BrN9muvX.js";import{u as y}from"./use-deployment-admin-CVKTUN-9.js";const g=[{to:"/_admin/users",label:"Users"},{to:"/_admin/orgs",label:"Organizations"}];function v(){const e=d.c(5);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:N},e[0]=s):s=e[0];const a=j(s);let n;e[1]!==a?(n=g.map(r=>t.jsx(f,{to:r.to,className:b("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",a.startsWith(r.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r.label},r.to)),e[1]=a,e[2]=n):n=e[2];let o;return e[3]!==n?(o=t.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:n}),e[3]=n,e[4]=o):o=e[4],o}function N(e){return e.location.pathname}function S(){const e=d.c(7),{isAdmin:s,loading:a,needsEmailVerification:n}=y();if(a){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:t.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!s){const i=n?"Verify your email address to access the admin dashboard.":"This dashboard is restricted to deployment admins.";let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(h,{variant:"outline",size:"sm",asChild:!0,children:t.jsx(f,{to:"/",children:"Go home"})}),e[1]=m):m=e[1];let c;return e[2]!==i?(c=t.jsx(x,{area:"the admin dashboard",description:i,action:m}),e[2]=i,e[3]=c):c=e[3],c}let o,r;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:t.jsx("h1",{className:"pb-4 text-xl font-medium",children:"Admin Dashboard"})}),r=t.jsx(v,{}),e[4]=o,e[5]=r):(o=e[4],r=e[5]);let l;return e[6]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[o,r,t.jsx("div",{className:"flex-1 overflow-hidden",children:t.jsx(p,{})})]}),e[6]=l):l=e[6],l}function z(){const e=d.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(_,{children:t.jsx(S,{})}),e[0]=s):s=e[0],s}export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,u as f,j as o,S as g,N as p}from"./index-
|
|
1
|
+
import{a,u as f,j as o,S as g,N as p}from"./index-oc_rN11o.js";import{A as x}from"./auth-entry-1r2Dk-YX.js";import{A as S}from"./auth-split-layout-pk8lfpOJ.js";import"./input-B4slPD4S.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function y(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function N(){const e=a.useSession(),t=f({from:"/login"}),{next:i="/",client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_}=t,n=i.startsWith("/")&&!i.startsWith("//")?i:"/",c=y({client_id:r,redirect_uri:s,response_type:l,state:h,scope:u,code_challenge:d,code_challenge_method:_});return e.data?c?(window.location.href=c,o.jsx(g,{})):o.jsx(p,{to:n}):o.jsx(S,{children:o.jsx(x,{callbackUrl:n,redirectUrl:c})})}export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as x,b as N,c as z,a as D}from"./auth-
|
|
1
|
+
import{d as x,b as N,c as z,a as D}from"./auth-BK0iVXFl.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 +1 @@
|
|
|
1
|
-
import{c as U,j as s,B as ze,C as pe,v as At,n as Qe,d as Me,K as ce,t as oe,m as vt,r as re,l as ke,i as Xe,E as Mt,p as Re}from"./index-D66JKmS1.js";import{C as Rt}from"./collection-display-button-C2pGMKtu.js";import{S as zt}from"./search-input-xFeMFa4u.js";import{P as Ae}from"./index-BfA9BY5h.js";import{C as Pt}from"./collection-table-wrapper-C-0GRtjQ.js";import{E as We}from"./empty-state-DKxWyNjo.js";import{I as Et}from"./invite-member-dialog-Dvg6g7i1.js";import{b as kt,S as Dt,a as $t}from"./settings-section-Tn6A8MKv.js";import{u as qt,a as Ot}from"./use-join-requests-wfz-iPrR.js";import{A as De}from"./avatar-BctcMz-W.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Lt}from"./use-members-8OmpnvQU.js";import{u as $e}from"./studio-tools-C7zePB_Y.js";import{u as Ct}from"./use-org-auth-client-D58aH-of.js";import{u as Bt}from"./use-organization-roles-DAa6Wx7g.js";import{g as Kt,a as Vt}from"./role-color-DVw_ATb1.js";import{T as Qt,a as Gt,c as Ut,b as Jt}from"./tooltip-DmpAo3sc.js";import{a as st,e as nt,g as it,b as at,c as lt,d as ot,A as rt,f as ct}from"./alert-dialog-DFaMDF7X.js";import{B as Ge}from"./badge-RKj1zMKo.js";import{C as mt}from"./card-BTGxMnfM.js";import{D as yt,a as St,c as Nt,e as Ht,f as Wt,g as Yt,d as et,j as Zt}from"./dropdown-menu-BTca8TW5.js";import{i as wt}from"./DotsVertical-D50LJhaD.js";import{i as Xt}from"./Key01-D0j1zJZy.js";import{i as es}from"./Shield01-BZ-3NWPV.js";import{a as ts}from"./SwitchHorizontal01-DMNeIFuz.js";import{s as ss}from"./Trash01-DQUgZ9rz.js";import{s as _t}from"./XClose-soZZczeb.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-D3aU1MPe.js";import{C as xt}from"./checkbox-cLyf1ifn.js";import{e as Ye,a as Ze,f as gt,C as ns,c as is,d as as,b as ls}from"./command-SUeovi7y.js";import{a as os,b as rs,P as cs}from"./popover-jU0RlUZ1.js";import{t as ms}from"./ChevronDown-1aKwXRuP.js";import{s as ds}from"./Plus-CBUwDXnC.js";import{R as us}from"./require-capability-Cct-8tpj.js";import"./ArrowUp-n6socSje.js";import"./Check-6H8MzQ8B.js";import"./List-UI5nTDe1.js";import"./view-mode-toggle-BhpJPXOn.js";import"./SearchMd-D6r_RTbP.js";import"./sidebar-cEMyuA4R.js";import"./LayoutLeft-52oWt_G_.js";import"./use-mobile-Bt8t6kto.js";import"./X-RHDLsGP-.js";import"./table-Dpo14C-4.js";import"./dialog-gQf3w6Lt.js";import"./form-BtbkERbP.js";import"./label-BDmNI4-u.js";import"./textarea-Db8SbW88.js";import"./ArrowUpRight-DB_wxAjZ.js";import"./use-capability-CyyP3WX6.js";import"./User01-B_HZ77z7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-MsqQ3q-h.js";import"./Circle-B8tMsDAl.js";import"./ChevronUp-B5fWCbfR.js";import"./index-Cl3SYnR9.js";import"./access-gate-CvMF7uj0.js";import"./capability-load-error-nFVikmM2.js";function fs(){const t=U.c(9),e=qt(),{approve:n,deny:l}=Ot();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let o;t[4]!==n||t[5]!==l?(o=r=>s.jsx(kt,{icon:s.jsx(De,{url:r.user?.image??void 0,fallback:(r.user?.name??r.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:r.user?.name??r.user?.email??r.userId,description:r.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{size:"sm",variant:"outline",onClick:()=>l.mutate(r.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(ze,{size:"sm",onClick:()=>n.mutate(r.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},r.id),t[4]=n,t[5]=l,t[6]=o):o=t[6],i=e.map(o),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx(Dt,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx($t,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function ps(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],At(a)}function hs(){const t=U.c(10),{locator:e}=pe(),n=Ct(),l=Qe();let i;t[0]!==n?(i=async f=>{const x=await n.organization.cancelInvitation({invitationId:f});if(x?.error)throw new Error(x.error.message);return x.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ce.invitations(e)}),oe.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let o;t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:xs},t[5]=i,t[6]=a,t[7]=o):o=t[7];const r=Me(o);let u;return t[8]!==r?(u={cancel:r},t[8]=r,t[9]=u):u=t[9],u}function xs(t){oe.error(t instanceof Error?t.message:"Failed to cancel invitation")}function gs(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],vt(a)}function js(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{tag:u}=await l.call("TAGS_CREATE",{name:r});return u},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ce.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:bs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function bs(t){oe.error(t instanceof Error?t.message:"Failed to create tag")}function vs(t){const e=U.c(10),{locator:n}=pe(),l=$e();let i;e[0]!==n||e[1]!==t?(i=ce.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:u}=await l.call("MEMBER_TAGS_GET",{memberId:t});return u},e[3]=t,e[4]=l,e[5]=a):a=e[5];const o=!!t;let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,queryFn:a,staleTime:3e4,enabled:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],vt(r)}function Cs(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{memberId:u,tagIds:f}=r;return await l.call("MEMBER_TAGS_SET",{memberId:u,tagIds:f})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(r,u)=>{e.invalidateQueries({queryKey:ce.memberTags(n,u.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:ys},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function ys(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function Tt(t){const e=U.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:o}=t,r=i===void 0?!1:i,u=a===void 0?"Add tags...":a,f=o===void 0?2:o,[x,j]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:b}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=vs(n),C=v===void 0?[]:v,E=js(),N=Cs(),R=b||$,S=C.map(Ns);let z;e[0]!==p?(z=g=>g.name.toLowerCase().includes(p.toLowerCase()),e[0]=p,e[1]=z):z=e[1];const A=D.filter(z);let y;e[2]!==p?(y=g=>g.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async g=>{const fe=S.includes(g.id)?S.filter(ge=>ge!==g.id):[...S,g.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const g=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,g.id]}),I("")},c=async g=>{const se=S.filter(fe=>fe!==g);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,F=rs;let P;e[4]!==x?(P=()=>j(!x),e[4]=x,e[5]=P):P=e[5];let q;e[6]!==l?(q=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=q):q=e[7];const V=r||R,O=R?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):C.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[C.slice(0,f).map(Ss),C.length>f&&s.jsxs(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",C.length-f]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:u});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(ms,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let L;e[9]!==V||e[10]!==O||e[11]!==P||e[12]!==q?(L=s.jsx(cs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:q,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=P,e[12]=q,e[13]=L):L=e[13];const G=os,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>j(!1),e[14]=W):W=e[14];const ne=as,he=!1;let Y;e[15]!==p?(Y=s.jsx(ls,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=is,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(g=>s.jsx(Ze,{onSelect:()=>k(g),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(xt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(g.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(_t,{size:14})})]})},g.id))}),s.jsx(gt,{})]}),Pe=Ye,xe="Available",Ee=A.length===0&&!w&&s.jsx(ns,{children:"No tags found."}),ue=A.filter(g=>!S.includes(g.id)).map(g=>s.jsx(Ze,{onSelect:()=>k(g),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]})},g.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:xe,children:[Ee,ue]}),e[17]=Pe,e[18]=Ee,e[19]=ue,e[20]=ae):ae=e[20];let le;e[21]!==_||e[22]!==h||e[23]!==p||e[24]!==w?(le=w&&s.jsxs(s.Fragment,{children:[s.jsx(gt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:_,className:"cursor-pointer",disabled:h,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[h?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ds,{size:14}),s.jsxs("span",{children:['Create "',p.trim(),'"']})]})})})]}),e[21]=_,e[22]=h,e[23]=p,e[24]=w,e[25]=le):le=e[25];let Z;e[26]!==ie||e[27]!==me||e[28]!==ae||e[29]!==le?(Z=s.jsxs(ie,{children:[me,ae,le]}),e[26]=ie,e[27]=me,e[28]=ae,e[29]=le,e[30]=Z):Z=e[30];let X;e[31]!==ne||e[32]!==Y||e[33]!==Z?(X=s.jsxs(ne,{shouldFilter:he,children:[Y,Z]}),e[31]=ne,e[32]=Y,e[33]=Z,e[34]=X):X=e[34];let ee;e[35]!==G||e[36]!==W||e[37]!==X?(ee=s.jsx(G,{className:J,align:H,onEscapeKeyDown:W,children:X}),e[35]=G,e[36]=W,e[37]=X,e[38]=ee):ee=e[38];let te;return e[39]!==F||e[40]!==x||e[41]!==L||e[42]!==ee?(te=s.jsxs(F,{open:x,onOpenChange:j,children:[L,ee]}),e[39]=F,e[40]=x,e[41]=L,e[42]=ee,e[43]=te):te=e[43],te}function Ss(t){return s.jsx(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ns(t){return t.id}const ws=["owner","admin","user"];function _s(t){const e=new Map;for(const n of ws)e.set(n,Kt(n,!0));for(const n of t)n&&!e.has(n.role)&&e.set(n.role,Vt(n.role));return e}function Ke(t){const e=U.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:o,onRoleChange:r,size:u,className:f}=t,x=u===void 0?"xs":u;let j,p,I,M,b,D,v,$,C,E,N;if(e[0]!==f||e[1]!==i||e[2]!==l||e[3]!==r||e[4]!==n||e[5]!==a||e[6]!==o||e[7]!==x){N=Symbol.for("react.early_return_sentinel");e:{const _=a.get(n)??"bg-neutral-400";if(i){let c;e[19]!==l||e[20]!==r?(c=J=>r(l,J),e[19]=l,e[20]=r,e[21]=c):c=e[21];let h;e[22]!==n?(h=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=h):h=e[23];const F=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ke("size-2 rounded-full shrink-0",_)}),h]});let P;e[24]!==F?(P=s.jsx(dt,{children:F}),e[24]=F,e[25]=P):P=e[25];let q;e[26]!==f||e[27]!==x||e[28]!==P?(q=s.jsx(ut,{size:x,className:f,children:P}),e[26]=f,e[27]=x,e[28]=P,e[29]=q):q=e[29];let V;if(e[30]!==a||e[31]!==o){let J;e[33]!==a?(J=H=>{const W=a.get(H.role)??"bg-neutral-400";return s.jsx(ft,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=a,e[34]=J):J=e[34],V=o.map(J),e[30]=a,e[31]=o,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(pt,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==q||e[41]!==O?(Q=s.jsx(Qt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[q,O]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=q,e[41]=O,e[42]=Q):Q=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Gt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=L):L=e[43];let G;e[44]!==Q?(G=s.jsx(Ut,{children:s.jsxs(Jt,{children:[Q,L]})}),e[44]=Q,e[45]=G):G=e[45],N=G;break e}I=ht,$=n,e[46]!==l||e[47]!==r?(C=c=>r(l,c),e[46]=l,e[47]=r,e[48]=C):C=e[48],E=i,p=ut,D=x,v=f,j=dt,b="flex items-center gap-2 min-w-0",M=ke("size-2 rounded-full shrink-0",_)}e[0]=f,e[1]=i,e[2]=l,e[3]=r,e[4]=n,e[5]=a,e[6]=o,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14],$=e[15],C=e[16],E=e[17],N=e[18];if(N!==Symbol.for("react.early_return_sentinel"))return N;let R;e[49]!==M?(R=s.jsx("div",{className:M}),e[49]=M,e[50]=R):R=e[50];let S;e[51]!==n?(S=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=S):S=e[52];let z;e[53]!==R||e[54]!==S||e[55]!==b?(z=s.jsxs("div",{className:b,children:[R,S]}),e[53]=R,e[54]=S,e[55]=b,e[56]=z):z=e[56];let A;e[57]!==j||e[58]!==z?(A=s.jsx(j,{children:z}),e[57]=j,e[58]=z,e[59]=A):A=e[59];let y;e[60]!==p||e[61]!==A||e[62]!==D||e[63]!==v?(y=s.jsx(p,{size:D,className:v,children:A}),e[60]=p,e[61]=A,e[62]=D,e[63]=v,e[64]=y):y=e[64];let K;if(e[65]!==a||e[66]!==o){let _;e[68]!==a?(_=c=>{const h=a.get(c.role)??"bg-neutral-400";return s.jsx(ft,{value:c.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",h)}),s.jsx("span",{className:"capitalize",children:c.label})]})},c.role)},e[68]=a,e[69]=_):_=e[69],K=o.map(_),e[65]=a,e[66]=o,e[67]=K}else K=e[67];let w;e[70]!==K?(w=s.jsx(pt,{children:K}),e[70]=K,e[71]=w):w=e[71];let k;return e[72]!==I||e[73]!==y||e[74]!==w||e[75]!==$||e[76]!==C||e[77]!==E?(k=s.jsxs(I,{value:$,onValueChange:C,disabled:E,children:[y,w]}),e[72]=I,e[73]=y,e[74]=w,e[75]=$,e[76]=C,e[77]=E,e[78]=k):k=e[78],k}function jt(t){const e=U.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:o}=t,r=o===void 0?!1:o,u=n.role==="owner";let f,x,j,p,I,M,b,D,v;if(e[0]!==u||e[1]!==r||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let y;e[15]!==n.role?(y=c=>c.role!==n.role&&c.role!=="owner",e[15]=n.role,e[16]=y):y=e[16];const K=l.filter(y);p=yt;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(wt,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Is,children:w})}),e[18]=u,e[19]=v):v=e[19],j=Nt,b="end",D=Ts,x=Ht;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ts,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Wt,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Yt;let _;e[23]!==r||e[24]!==n.id||e[25]!==i?(_=c=>{const h=[];return c.isBuiltin||(c.allowsAllStaticPermissions?h.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&h.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?h.push("All connections"):c.connectionCount&&c.connectionCount>0&&h.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?h.push("all tools"):c.toolCount&&c.toolCount>0&&h.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsxs(et,{onClick:F=>{F.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(es,{size:16}):s.jsx(Xt,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&h.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h.join(", ")})]})]},c.role)},e[23]=r,e[24]=n.id,e[25]=i,e[26]=_):_=e[26],I=K.map(_),e[0]=u,e[1]=r,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=f,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v}else f=e[6],x=e[7],j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14];let $;e[27]!==f||e[28]!==I?($=s.jsx(f,{children:I}),e[27]=f,e[28]=I,e[29]=$):$=e[29];let C;e[30]!==x||e[31]!==M||e[32]!==$?(C=s.jsxs(x,{children:[M,$]}),e[30]=x,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Zt,{}),e[34]=E):E=e[34];let N;e[35]!==n.id||e[36]!==a?(N=y=>{y.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=N):N=e[37];let R;e[38]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ss,{size:16}),e[38]=R):R=e[38];let S;e[39]!==N?(S=s.jsxs(et,{variant:"destructive",onClick:N,children:[R,"Remove Member"]}),e[39]=N,e[40]=S):S=e[40];let z;e[41]!==j||e[42]!==S||e[43]!==b||e[44]!==D||e[45]!==C?(z=s.jsxs(j,{align:b,onClick:D,children:[C,E,S]}),e[41]=j,e[42]=S,e[43]=b,e[44]=D,e[45]=C,e[46]=z):z=e[46];let A;return e[47]!==p||e[48]!==z||e[49]!==v?(A=s.jsxs(p,{children:[v,z]}),e[47]=p,e[48]=z,e[49]=v,e[50]=A):A=e[50],A}function Ts(t){return t.stopPropagation()}function Is(t){return t.stopPropagation()}function bt(t){const e=U.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ms,children:s.jsx(wt,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=x=>{x.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(_t,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(yt,{children:[o,s.jsx(Nt,{align:"end",onClick:As,children:s.jsxs(et,{variant:"destructive",onClick:r,disabled:a,children:[u,"Cancel Invitation"]})})]}),e[5]=a,e[6]=r,e[7]=f):f=e[7],f}function As(t){return t.stopPropagation()}function Ms(t){return t.stopPropagation()}function Rs(){const t=U.c(103),{data:e}=Lt(),{data:n}=ps(),l=hs(),i=Qe(),{locator:a}=pe(),o=Ct(),[r,u]=re.useState(null),[f,x]=re.useState(null),[j,p]=re.useState(""),[I,M]=re.useState("table"),[b,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==b?(E=m=>{b===m?$(Bs):(D(m),$("asc"))},t[0]=b,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(j){const m=j.toLowerCase();R=R.filter(d=>d.user?.name?.toLowerCase().includes(m)||d.user?.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m)),S=S.filter(d=>d.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m))}if(b&&v){let m;t[2]!==v||t[3]!==b?(m=(d,T)=>{let B,de;e:switch(b){case"member":{B=d.user?.name||"",de=T.user?.name||"";break e}case"role":{B=d.role||"",de=T.role||"";break e}case"joined":{B=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",de=T.createdAt?typeof T.createdAt=="string"?T.createdAt:T.createdAt.toISOString():"";break e}default:return 0}return v==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=v,t[3]=b,t[4]=m):m=t[4],R=[...R].sort(m)}const z=R;let A;t[5]!==o?(A=async m=>{const d=await o.organization.removeMember({memberIdOrEmail:m});if(d?.error)throw new Error(d.error.message)},t[5]=o,t[6]=A):A=t[6];let y;t[7]!==a||t[8]!==i?(y=()=>{Re("member_removed"),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member has been removed from the organization"),u(null)},t[7]=a,t[8]=i,t[9]=y):y=t[9];let K;t[10]!==A||t[11]!==y?(K={mutationFn:A,onSuccess:y,onError:Ls},t[10]=A,t[11]=y,t[12]=K):K=t[12];const w=Me(K);let k;t[13]!==o?(k=async m=>{const{memberId:d,role:T}=m,B=await o.organization.updateMemberRole({memberId:d,role:[T]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let _;t[15]!==a||t[16]!==i?(_=(m,d)=>{Re("member_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=_):_=t[17];let c;t[18]!==k||t[19]!==_?(c={mutationFn:k,onSuccess:_,onError:Fs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let F;t[21]!==o?(F=async m=>{const{invitationId:d,role:T,email:B}=m,de=await o.organization.cancelInvitation({invitationId:d});if(de?.error)throw new Error(de.error.message);const tt=await o.organization.inviteMember({email:B,role:T});if(tt?.error)throw new Error(tt.error.message)},t[21]=o,t[22]=F):F=t[22];let P;t[23]!==a||t[24]!==i?(P=(m,d)=>{Re("invitation_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.invitations(a)}),oe.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=P):P=t[25];let q;t[26]!==F||t[27]!==P?(q={mutationFn:F,onSuccess:P,onError:Os},t[26]=F,t[27]=P,t[28]=q):q=t[28];const V=Me(q),{roles:O,customRoles:Q}=Bt();let L;t[29]!==Q?(L=_s(Q),t[29]=Q,t[30]=L):L=t[30];const G=L;let J;t[31]!==O?(J=O.filter(qs),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:$s,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ne;t[34]!==G||t[35]!==H||t[36]!==V||t[37]!==h?(ne={id:"role",header:"Role",render:m=>m.type==="member"?s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:m.data.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>h.mutate({memberId:d,role:T}),className:"w-36"}):s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>V.mutate({invitationId:d,role:T,email:m.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=G,t[35]=H,t[36]=V,t[37]=h,t[38]=ne):ne=t[38];let he,Y;t[39]===Symbol.for("react.memo_cache_sentinel")?(he={id:"tags",header:"Tags",render:Ds,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:ks,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=he,t[40]=Y):(he=t[39],Y=t[40]);let ie;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:O,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=h,t[44]=ie):ie=t[44];let me;t[45]!==ne||t[46]!==ie?(me=[W,ne,he,Y,ie],t[45]=ne,t[46]=ie,t[47]=me):me=t[47];const Pe=me;let xe;t[48]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Et,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=xe):xe=t[48];const Ee=xe,ue=[...z.map(Es),...S.filter(Ps).map(zs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>x(null),t[49]=Z):Z=t[49];let X;t[50]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(at,{children:[s.jsx(lt,{children:"Cancel Invitation"}),s.jsx(ot,{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]=X):X=t[50];let ee;t[51]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(rt,{children:"Keep Invitation"}),t[51]=ee):ee=t[51];let te;t[52]!==l.cancel||t[53]!==f?(te=()=>{f&&(l.cancel.mutate(f),x(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let g;t[55]!==l.cancel.isPending||t[56]!==te?(g=s.jsxs(st,{children:[X,s.jsxs(nt,{children:[ee,s.jsx(it,{onClick:te,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=te,t[57]=g):g=t[57];let se;t[58]!==le||t[59]!==g?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:g}),t[58]=le,t[59]=g,t[60]=se):se=t[60];const fe=!!r;let ge;t[61]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>u(null),t[61]=ge):ge=t[61];let qe;t[62]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsxs(at,{children:[s.jsx(lt,{children:"Remove Member"}),s.jsx(ot,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=qe):qe=t[62];let Oe;t[63]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(rt,{children:"Cancel"}),t[63]=Oe):Oe=t[63];let je;t[64]!==r||t[65]!==w?(je=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=je):je=t[66];let be;t[67]!==w.isPending||t[68]!==je?(be=s.jsxs(st,{children:[qe,s.jsxs(nt,{children:[Oe,s.jsx(it,{onClick:je,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=je,t[69]=be):be=t[69];let ve;t[70]!==fe||t[71]!==be?(ve=s.jsx(ct,{open:fe,onOpenChange:ge,children:be}),t[70]=fe,t[71]=be,t[72]=ve):ve=t[72];const Ue=Ae,Je=Ae,It="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(fs,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Fe;t[75]===Symbol.for("react.memo_cache_sentinel")?(Fe=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Fe):Fe=t[75];let Se;t[76]!==j?(Se=s.jsx(zt,{value:j,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Fe}),t[76]=j,t[77]=Se):Se=t[77];let Le;t[78]===Symbol.for("react.memo_cache_sentinel")?(Le=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Le):Le=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==b||t[82]!==I?(Ne=s.jsx(Rt,{viewMode:I,onViewModeChange:M,sortKey:b,sortDirection:v,onSort:N,sortOptions:Le}),t[79]=N,t[80]=v,t[81]=b,t[82]=I,t[83]=Ne):Ne=t[83];let we;t[84]!==Se||t[85]!==Ne?(we=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Se,Ne]}),Ee]}),t[84]=Se,t[85]=Ne,t[86]=we):we=t[86];const He=I==="cards"?s.jsx("div",{children:ue.length===0?s.jsx(We,{title:"No members found",description:j?`No members match "${j}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:ue.map(m=>{if(m.type==="invitation")return s.jsxs(mt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Ve(m.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:m.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ge,{variant:"outline",className:"w-fit text-warning border-warning/40",children:"Pending"})}),s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>V.mutate({invitationId:T,role:B,email:m.data.email}),className:"w-fit"})]})]})]},`inv-${m.data.id}`);const d=m.data;return s.jsxs(mt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(jt,{member:d,roles:O,onChangeRole:(T,B)=>h.mutate({memberId:T,role:B}),onRemove:u,isUpdating:h.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:d.user?.image??void 0,fallback:Ve(d.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:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(Ke,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>h.mutate({memberId:T,role:B}),className:"w-fit"}),s.jsx(Tt,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Pt,{columns:Pe,data:ue,isLoading:!1,sortKey:b,sortDirection:v,onSort:N,emptyState:j?s.jsx(We,{title:"No members found",description:`No members match "${j}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let _e;t[87]!==Ce||t[88]!==ye||t[89]!==we||t[90]!==He?(_e=s.jsxs("div",{className:It,children:[Ce,ye,we,He]}),t[87]=Ce,t[88]=ye,t[89]=we,t[90]=He,t[91]=_e):_e=t[91];let Te;t[92]!==Je.Body||t[93]!==_e?(Te=s.jsx(Je.Body,{children:_e}),t[92]=Je.Body,t[93]=_e,t[94]=Te):Te=t[94];let Ie;t[95]!==Ue.Content||t[96]!==Te?(Ie=s.jsx(Ue.Content,{children:Te}),t[95]=Ue.Content,t[96]=Te,t[97]=Ie):Ie=t[97];let Be;return t[98]!==ae||t[99]!==se||t[100]!==ve||t[101]!==Ie?(Be=s.jsxs(ae,{children:[se,ve,Ie]}),t[98]=ae,t[99]=se,t[100]=ve,t[101]=Ie,t[102]=Be):Be=t[102],Be}function zs(t){return{type:"invitation",data:t}}function Ps(t){return t.status==="pending"}function Es(t){return{type:"member",data:t}}function ks(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ft(t.data.createdAt):"N/A"}):s.jsx(Ge,{variant:"outline",children:"Pending"})}function Ds(t){return t.type==="member"?s.jsx(Tt,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function $s(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{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(De,{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 qs(t){return t.role!=="owner"}function Os(t,e){Re("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update invitation role")}function Fs(t,e){Re("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update role")}function Ls(t){Re("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to remove member")}function Bs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Ks(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ae,{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(Mt,{fallback:e,children:s.jsx(re.Suspense,{fallback:s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Rs,{})})}),t[1]=n):n=t[1],n}function Wn(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(us,{capability:"members:manage",area:"members",children:s.jsx(Ks,{})}),t[0]=e):e=t[0],e}export{Wn as default};
|
|
1
|
+
import{c as U,j as s,B as ze,C as pe,v as At,n as Qe,d as Me,K as ce,t as oe,m as vt,r as re,l as ke,i as Xe,E as Mt,p as Re}from"./index-oc_rN11o.js";import{C as Rt}from"./collection-display-button-DN44yKf7.js";import{S as zt}from"./search-input-DrnK--wa.js";import{P as Ae}from"./index-zfvBHIuW.js";import{C as Pt}from"./collection-table-wrapper-Bt1hyeft.js";import{E as We}from"./empty-state-m64BYhfO.js";import{I as Et}from"./invite-member-dialog-DTOU0Zb-.js";import{b as kt,S as Dt,a as $t}from"./settings-section-CiB1bNdk.js";import{u as qt,a as Ot}from"./use-join-requests-D5mR0aS9.js";import{A as De}from"./avatar-YXhA4ULu.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Lt}from"./use-members-CckCgG28.js";import{u as $e}from"./studio-tools-Bhqja8-P.js";import{u as Ct}from"./use-org-auth-client-9RD0DuFO.js";import{u as Bt}from"./use-organization-roles-DHIXf7EJ.js";import{g as Kt,a as Vt}from"./role-color-DVw_ATb1.js";import{T as Qt,a as Gt,c as Ut,b as Jt}from"./tooltip-B9mflsA-.js";import{a as st,e as nt,g as it,b as at,c as lt,d as ot,A as rt,f as ct}from"./alert-dialog-BxbGoANG.js";import{B as Ge}from"./badge-DloWAsWi.js";import{C as mt}from"./card-DIJ_fcwi.js";import{D as yt,a as St,c as Nt,e as Ht,f as Wt,g as Yt,d as et,j as Zt}from"./dropdown-menu-CJpvUzy-.js";import{i as wt}from"./DotsVertical-BnlxGwof.js";import{i as Xt}from"./Key01-B6H3uINt.js";import{i as es}from"./Shield01-BYeFRP7n.js";import{a as ts}from"./SwitchHorizontal01-B0O4eLcp.js";import{s as ss}from"./Trash01-BQlWFbGQ.js";import{s as _t}from"./XClose-BuIIOE6w.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-CNsEYIFu.js";import{C as xt}from"./checkbox-vwl7w0Pc.js";import{e as Ye,a as Ze,f as gt,C as ns,c as is,d as as,b as ls}from"./command-BVqkHUqa.js";import{a as os,b as rs,P as cs}from"./popover-BCSPCOls.js";import{t as ms}from"./ChevronDown-DogWDo8R.js";import{s as ds}from"./Plus-BbxfSt4x.js";import{R as us}from"./require-capability-Dg5DNxOq.js";import"./ArrowUp-BeIfqPX3.js";import"./Check-b8JPx69Q.js";import"./List-ygMYp0lM.js";import"./view-mode-toggle-DR4gvHM2.js";import"./SearchMd-yzhg2WsZ.js";import"./sidebar-CR5QPyYz.js";import"./LayoutLeft-BAf1BB19.js";import"./use-mobile-Dam1x1Ak.js";import"./X-DS2ILiqE.js";import"./table-C2Aw2EEt.js";import"./dialog-gq7Ep-9q.js";import"./form-BU_AP4iS.js";import"./label-CTumOLkJ.js";import"./textarea-CNuzuKIF.js";import"./ArrowUpRight-VnVntsfP.js";import"./use-capability-DDxNF4sV.js";import"./User01-vA9RYEmY.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-CLLwxuIR.js";import"./Circle-Vl1Ed5w9.js";import"./ChevronUp-Yw2Z5-Ig.js";import"./index-BpP-k_EF.js";import"./access-gate-CSEWtf-p.js";import"./capability-load-error-B7nBP8x3.js";function fs(){const t=U.c(9),e=qt(),{approve:n,deny:l}=Ot();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let o;t[4]!==n||t[5]!==l?(o=r=>s.jsx(kt,{icon:s.jsx(De,{url:r.user?.image??void 0,fallback:(r.user?.name??r.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:r.user?.name??r.user?.email??r.userId,description:r.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{size:"sm",variant:"outline",onClick:()=>l.mutate(r.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(ze,{size:"sm",onClick:()=>n.mutate(r.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},r.id),t[4]=n,t[5]=l,t[6]=o):o=t[6],i=e.map(o),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx(Dt,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx($t,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function ps(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],At(a)}function hs(){const t=U.c(10),{locator:e}=pe(),n=Ct(),l=Qe();let i;t[0]!==n?(i=async f=>{const x=await n.organization.cancelInvitation({invitationId:f});if(x?.error)throw new Error(x.error.message);return x.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ce.invitations(e)}),oe.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let o;t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:xs},t[5]=i,t[6]=a,t[7]=o):o=t[7];const r=Me(o);let u;return t[8]!==r?(u={cancel:r},t[8]=r,t[9]=u):u=t[9],u}function xs(t){oe.error(t instanceof Error?t.message:"Failed to cancel invitation")}function gs(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],vt(a)}function js(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{tag:u}=await l.call("TAGS_CREATE",{name:r});return u},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ce.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:bs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function bs(t){oe.error(t instanceof Error?t.message:"Failed to create tag")}function vs(t){const e=U.c(10),{locator:n}=pe(),l=$e();let i;e[0]!==n||e[1]!==t?(i=ce.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:u}=await l.call("MEMBER_TAGS_GET",{memberId:t});return u},e[3]=t,e[4]=l,e[5]=a):a=e[5];const o=!!t;let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,queryFn:a,staleTime:3e4,enabled:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],vt(r)}function Cs(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{memberId:u,tagIds:f}=r;return await l.call("MEMBER_TAGS_SET",{memberId:u,tagIds:f})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(r,u)=>{e.invalidateQueries({queryKey:ce.memberTags(n,u.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:ys},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function ys(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function Tt(t){const e=U.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:o}=t,r=i===void 0?!1:i,u=a===void 0?"Add tags...":a,f=o===void 0?2:o,[x,j]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:b}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=vs(n),C=v===void 0?[]:v,E=js(),N=Cs(),R=b||$,S=C.map(Ns);let z;e[0]!==p?(z=g=>g.name.toLowerCase().includes(p.toLowerCase()),e[0]=p,e[1]=z):z=e[1];const A=D.filter(z);let y;e[2]!==p?(y=g=>g.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async g=>{const fe=S.includes(g.id)?S.filter(ge=>ge!==g.id):[...S,g.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const g=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,g.id]}),I("")},c=async g=>{const se=S.filter(fe=>fe!==g);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,F=rs;let P;e[4]!==x?(P=()=>j(!x),e[4]=x,e[5]=P):P=e[5];let q;e[6]!==l?(q=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=q):q=e[7];const V=r||R,O=R?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):C.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[C.slice(0,f).map(Ss),C.length>f&&s.jsxs(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",C.length-f]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:u});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(ms,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let L;e[9]!==V||e[10]!==O||e[11]!==P||e[12]!==q?(L=s.jsx(cs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:q,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=P,e[12]=q,e[13]=L):L=e[13];const G=os,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>j(!1),e[14]=W):W=e[14];const ne=as,he=!1;let Y;e[15]!==p?(Y=s.jsx(ls,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=is,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(g=>s.jsx(Ze,{onSelect:()=>k(g),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(xt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(g.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(_t,{size:14})})]})},g.id))}),s.jsx(gt,{})]}),Pe=Ye,xe="Available",Ee=A.length===0&&!w&&s.jsx(ns,{children:"No tags found."}),ue=A.filter(g=>!S.includes(g.id)).map(g=>s.jsx(Ze,{onSelect:()=>k(g),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]})},g.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:xe,children:[Ee,ue]}),e[17]=Pe,e[18]=Ee,e[19]=ue,e[20]=ae):ae=e[20];let le;e[21]!==_||e[22]!==h||e[23]!==p||e[24]!==w?(le=w&&s.jsxs(s.Fragment,{children:[s.jsx(gt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:_,className:"cursor-pointer",disabled:h,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[h?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ds,{size:14}),s.jsxs("span",{children:['Create "',p.trim(),'"']})]})})})]}),e[21]=_,e[22]=h,e[23]=p,e[24]=w,e[25]=le):le=e[25];let Z;e[26]!==ie||e[27]!==me||e[28]!==ae||e[29]!==le?(Z=s.jsxs(ie,{children:[me,ae,le]}),e[26]=ie,e[27]=me,e[28]=ae,e[29]=le,e[30]=Z):Z=e[30];let X;e[31]!==ne||e[32]!==Y||e[33]!==Z?(X=s.jsxs(ne,{shouldFilter:he,children:[Y,Z]}),e[31]=ne,e[32]=Y,e[33]=Z,e[34]=X):X=e[34];let ee;e[35]!==G||e[36]!==W||e[37]!==X?(ee=s.jsx(G,{className:J,align:H,onEscapeKeyDown:W,children:X}),e[35]=G,e[36]=W,e[37]=X,e[38]=ee):ee=e[38];let te;return e[39]!==F||e[40]!==x||e[41]!==L||e[42]!==ee?(te=s.jsxs(F,{open:x,onOpenChange:j,children:[L,ee]}),e[39]=F,e[40]=x,e[41]=L,e[42]=ee,e[43]=te):te=e[43],te}function Ss(t){return s.jsx(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ns(t){return t.id}const ws=["owner","admin","user"];function _s(t){const e=new Map;for(const n of ws)e.set(n,Kt(n,!0));for(const n of t)n&&!e.has(n.role)&&e.set(n.role,Vt(n.role));return e}function Ke(t){const e=U.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:o,onRoleChange:r,size:u,className:f}=t,x=u===void 0?"xs":u;let j,p,I,M,b,D,v,$,C,E,N;if(e[0]!==f||e[1]!==i||e[2]!==l||e[3]!==r||e[4]!==n||e[5]!==a||e[6]!==o||e[7]!==x){N=Symbol.for("react.early_return_sentinel");e:{const _=a.get(n)??"bg-neutral-400";if(i){let c;e[19]!==l||e[20]!==r?(c=J=>r(l,J),e[19]=l,e[20]=r,e[21]=c):c=e[21];let h;e[22]!==n?(h=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=h):h=e[23];const F=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ke("size-2 rounded-full shrink-0",_)}),h]});let P;e[24]!==F?(P=s.jsx(dt,{children:F}),e[24]=F,e[25]=P):P=e[25];let q;e[26]!==f||e[27]!==x||e[28]!==P?(q=s.jsx(ut,{size:x,className:f,children:P}),e[26]=f,e[27]=x,e[28]=P,e[29]=q):q=e[29];let V;if(e[30]!==a||e[31]!==o){let J;e[33]!==a?(J=H=>{const W=a.get(H.role)??"bg-neutral-400";return s.jsx(ft,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=a,e[34]=J):J=e[34],V=o.map(J),e[30]=a,e[31]=o,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(pt,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==q||e[41]!==O?(Q=s.jsx(Qt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[q,O]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=q,e[41]=O,e[42]=Q):Q=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Gt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=L):L=e[43];let G;e[44]!==Q?(G=s.jsx(Ut,{children:s.jsxs(Jt,{children:[Q,L]})}),e[44]=Q,e[45]=G):G=e[45],N=G;break e}I=ht,$=n,e[46]!==l||e[47]!==r?(C=c=>r(l,c),e[46]=l,e[47]=r,e[48]=C):C=e[48],E=i,p=ut,D=x,v=f,j=dt,b="flex items-center gap-2 min-w-0",M=ke("size-2 rounded-full shrink-0",_)}e[0]=f,e[1]=i,e[2]=l,e[3]=r,e[4]=n,e[5]=a,e[6]=o,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14],$=e[15],C=e[16],E=e[17],N=e[18];if(N!==Symbol.for("react.early_return_sentinel"))return N;let R;e[49]!==M?(R=s.jsx("div",{className:M}),e[49]=M,e[50]=R):R=e[50];let S;e[51]!==n?(S=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=S):S=e[52];let z;e[53]!==R||e[54]!==S||e[55]!==b?(z=s.jsxs("div",{className:b,children:[R,S]}),e[53]=R,e[54]=S,e[55]=b,e[56]=z):z=e[56];let A;e[57]!==j||e[58]!==z?(A=s.jsx(j,{children:z}),e[57]=j,e[58]=z,e[59]=A):A=e[59];let y;e[60]!==p||e[61]!==A||e[62]!==D||e[63]!==v?(y=s.jsx(p,{size:D,className:v,children:A}),e[60]=p,e[61]=A,e[62]=D,e[63]=v,e[64]=y):y=e[64];let K;if(e[65]!==a||e[66]!==o){let _;e[68]!==a?(_=c=>{const h=a.get(c.role)??"bg-neutral-400";return s.jsx(ft,{value:c.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",h)}),s.jsx("span",{className:"capitalize",children:c.label})]})},c.role)},e[68]=a,e[69]=_):_=e[69],K=o.map(_),e[65]=a,e[66]=o,e[67]=K}else K=e[67];let w;e[70]!==K?(w=s.jsx(pt,{children:K}),e[70]=K,e[71]=w):w=e[71];let k;return e[72]!==I||e[73]!==y||e[74]!==w||e[75]!==$||e[76]!==C||e[77]!==E?(k=s.jsxs(I,{value:$,onValueChange:C,disabled:E,children:[y,w]}),e[72]=I,e[73]=y,e[74]=w,e[75]=$,e[76]=C,e[77]=E,e[78]=k):k=e[78],k}function jt(t){const e=U.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:o}=t,r=o===void 0?!1:o,u=n.role==="owner";let f,x,j,p,I,M,b,D,v;if(e[0]!==u||e[1]!==r||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let y;e[15]!==n.role?(y=c=>c.role!==n.role&&c.role!=="owner",e[15]=n.role,e[16]=y):y=e[16];const K=l.filter(y);p=yt;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(wt,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Is,children:w})}),e[18]=u,e[19]=v):v=e[19],j=Nt,b="end",D=Ts,x=Ht;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ts,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Wt,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Yt;let _;e[23]!==r||e[24]!==n.id||e[25]!==i?(_=c=>{const h=[];return c.isBuiltin||(c.allowsAllStaticPermissions?h.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&h.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?h.push("All connections"):c.connectionCount&&c.connectionCount>0&&h.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?h.push("all tools"):c.toolCount&&c.toolCount>0&&h.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsxs(et,{onClick:F=>{F.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(es,{size:16}):s.jsx(Xt,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&h.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h.join(", ")})]})]},c.role)},e[23]=r,e[24]=n.id,e[25]=i,e[26]=_):_=e[26],I=K.map(_),e[0]=u,e[1]=r,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=f,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v}else f=e[6],x=e[7],j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14];let $;e[27]!==f||e[28]!==I?($=s.jsx(f,{children:I}),e[27]=f,e[28]=I,e[29]=$):$=e[29];let C;e[30]!==x||e[31]!==M||e[32]!==$?(C=s.jsxs(x,{children:[M,$]}),e[30]=x,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Zt,{}),e[34]=E):E=e[34];let N;e[35]!==n.id||e[36]!==a?(N=y=>{y.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=N):N=e[37];let R;e[38]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ss,{size:16}),e[38]=R):R=e[38];let S;e[39]!==N?(S=s.jsxs(et,{variant:"destructive",onClick:N,children:[R,"Remove Member"]}),e[39]=N,e[40]=S):S=e[40];let z;e[41]!==j||e[42]!==S||e[43]!==b||e[44]!==D||e[45]!==C?(z=s.jsxs(j,{align:b,onClick:D,children:[C,E,S]}),e[41]=j,e[42]=S,e[43]=b,e[44]=D,e[45]=C,e[46]=z):z=e[46];let A;return e[47]!==p||e[48]!==z||e[49]!==v?(A=s.jsxs(p,{children:[v,z]}),e[47]=p,e[48]=z,e[49]=v,e[50]=A):A=e[50],A}function Ts(t){return t.stopPropagation()}function Is(t){return t.stopPropagation()}function bt(t){const e=U.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ms,children:s.jsx(wt,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=x=>{x.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(_t,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(yt,{children:[o,s.jsx(Nt,{align:"end",onClick:As,children:s.jsxs(et,{variant:"destructive",onClick:r,disabled:a,children:[u,"Cancel Invitation"]})})]}),e[5]=a,e[6]=r,e[7]=f):f=e[7],f}function As(t){return t.stopPropagation()}function Ms(t){return t.stopPropagation()}function Rs(){const t=U.c(103),{data:e}=Lt(),{data:n}=ps(),l=hs(),i=Qe(),{locator:a}=pe(),o=Ct(),[r,u]=re.useState(null),[f,x]=re.useState(null),[j,p]=re.useState(""),[I,M]=re.useState("table"),[b,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==b?(E=m=>{b===m?$(Bs):(D(m),$("asc"))},t[0]=b,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(j){const m=j.toLowerCase();R=R.filter(d=>d.user?.name?.toLowerCase().includes(m)||d.user?.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m)),S=S.filter(d=>d.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m))}if(b&&v){let m;t[2]!==v||t[3]!==b?(m=(d,T)=>{let B,de;e:switch(b){case"member":{B=d.user?.name||"",de=T.user?.name||"";break e}case"role":{B=d.role||"",de=T.role||"";break e}case"joined":{B=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",de=T.createdAt?typeof T.createdAt=="string"?T.createdAt:T.createdAt.toISOString():"";break e}default:return 0}return v==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=v,t[3]=b,t[4]=m):m=t[4],R=[...R].sort(m)}const z=R;let A;t[5]!==o?(A=async m=>{const d=await o.organization.removeMember({memberIdOrEmail:m});if(d?.error)throw new Error(d.error.message)},t[5]=o,t[6]=A):A=t[6];let y;t[7]!==a||t[8]!==i?(y=()=>{Re("member_removed"),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member has been removed from the organization"),u(null)},t[7]=a,t[8]=i,t[9]=y):y=t[9];let K;t[10]!==A||t[11]!==y?(K={mutationFn:A,onSuccess:y,onError:Ls},t[10]=A,t[11]=y,t[12]=K):K=t[12];const w=Me(K);let k;t[13]!==o?(k=async m=>{const{memberId:d,role:T}=m,B=await o.organization.updateMemberRole({memberId:d,role:[T]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let _;t[15]!==a||t[16]!==i?(_=(m,d)=>{Re("member_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=_):_=t[17];let c;t[18]!==k||t[19]!==_?(c={mutationFn:k,onSuccess:_,onError:Fs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let F;t[21]!==o?(F=async m=>{const{invitationId:d,role:T,email:B}=m,de=await o.organization.cancelInvitation({invitationId:d});if(de?.error)throw new Error(de.error.message);const tt=await o.organization.inviteMember({email:B,role:T});if(tt?.error)throw new Error(tt.error.message)},t[21]=o,t[22]=F):F=t[22];let P;t[23]!==a||t[24]!==i?(P=(m,d)=>{Re("invitation_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.invitations(a)}),oe.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=P):P=t[25];let q;t[26]!==F||t[27]!==P?(q={mutationFn:F,onSuccess:P,onError:Os},t[26]=F,t[27]=P,t[28]=q):q=t[28];const V=Me(q),{roles:O,customRoles:Q}=Bt();let L;t[29]!==Q?(L=_s(Q),t[29]=Q,t[30]=L):L=t[30];const G=L;let J;t[31]!==O?(J=O.filter(qs),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:$s,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ne;t[34]!==G||t[35]!==H||t[36]!==V||t[37]!==h?(ne={id:"role",header:"Role",render:m=>m.type==="member"?s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:m.data.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>h.mutate({memberId:d,role:T}),className:"w-36"}):s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>V.mutate({invitationId:d,role:T,email:m.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=G,t[35]=H,t[36]=V,t[37]=h,t[38]=ne):ne=t[38];let he,Y;t[39]===Symbol.for("react.memo_cache_sentinel")?(he={id:"tags",header:"Tags",render:Ds,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:ks,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=he,t[40]=Y):(he=t[39],Y=t[40]);let ie;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:O,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=h,t[44]=ie):ie=t[44];let me;t[45]!==ne||t[46]!==ie?(me=[W,ne,he,Y,ie],t[45]=ne,t[46]=ie,t[47]=me):me=t[47];const Pe=me;let xe;t[48]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Et,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=xe):xe=t[48];const Ee=xe,ue=[...z.map(Es),...S.filter(Ps).map(zs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>x(null),t[49]=Z):Z=t[49];let X;t[50]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(at,{children:[s.jsx(lt,{children:"Cancel Invitation"}),s.jsx(ot,{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]=X):X=t[50];let ee;t[51]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(rt,{children:"Keep Invitation"}),t[51]=ee):ee=t[51];let te;t[52]!==l.cancel||t[53]!==f?(te=()=>{f&&(l.cancel.mutate(f),x(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let g;t[55]!==l.cancel.isPending||t[56]!==te?(g=s.jsxs(st,{children:[X,s.jsxs(nt,{children:[ee,s.jsx(it,{onClick:te,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=te,t[57]=g):g=t[57];let se;t[58]!==le||t[59]!==g?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:g}),t[58]=le,t[59]=g,t[60]=se):se=t[60];const fe=!!r;let ge;t[61]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>u(null),t[61]=ge):ge=t[61];let qe;t[62]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsxs(at,{children:[s.jsx(lt,{children:"Remove Member"}),s.jsx(ot,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=qe):qe=t[62];let Oe;t[63]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(rt,{children:"Cancel"}),t[63]=Oe):Oe=t[63];let je;t[64]!==r||t[65]!==w?(je=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=je):je=t[66];let be;t[67]!==w.isPending||t[68]!==je?(be=s.jsxs(st,{children:[qe,s.jsxs(nt,{children:[Oe,s.jsx(it,{onClick:je,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=je,t[69]=be):be=t[69];let ve;t[70]!==fe||t[71]!==be?(ve=s.jsx(ct,{open:fe,onOpenChange:ge,children:be}),t[70]=fe,t[71]=be,t[72]=ve):ve=t[72];const Ue=Ae,Je=Ae,It="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(fs,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Fe;t[75]===Symbol.for("react.memo_cache_sentinel")?(Fe=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Fe):Fe=t[75];let Se;t[76]!==j?(Se=s.jsx(zt,{value:j,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Fe}),t[76]=j,t[77]=Se):Se=t[77];let Le;t[78]===Symbol.for("react.memo_cache_sentinel")?(Le=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Le):Le=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==b||t[82]!==I?(Ne=s.jsx(Rt,{viewMode:I,onViewModeChange:M,sortKey:b,sortDirection:v,onSort:N,sortOptions:Le}),t[79]=N,t[80]=v,t[81]=b,t[82]=I,t[83]=Ne):Ne=t[83];let we;t[84]!==Se||t[85]!==Ne?(we=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Se,Ne]}),Ee]}),t[84]=Se,t[85]=Ne,t[86]=we):we=t[86];const He=I==="cards"?s.jsx("div",{children:ue.length===0?s.jsx(We,{title:"No members found",description:j?`No members match "${j}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:ue.map(m=>{if(m.type==="invitation")return s.jsxs(mt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Ve(m.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:m.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ge,{variant:"outline",className:"w-fit text-warning border-warning/40",children:"Pending"})}),s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>V.mutate({invitationId:T,role:B,email:m.data.email}),className:"w-fit"})]})]})]},`inv-${m.data.id}`);const d=m.data;return s.jsxs(mt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(jt,{member:d,roles:O,onChangeRole:(T,B)=>h.mutate({memberId:T,role:B}),onRemove:u,isUpdating:h.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:d.user?.image??void 0,fallback:Ve(d.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:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(Ke,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>h.mutate({memberId:T,role:B}),className:"w-fit"}),s.jsx(Tt,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Pt,{columns:Pe,data:ue,isLoading:!1,sortKey:b,sortDirection:v,onSort:N,emptyState:j?s.jsx(We,{title:"No members found",description:`No members match "${j}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let _e;t[87]!==Ce||t[88]!==ye||t[89]!==we||t[90]!==He?(_e=s.jsxs("div",{className:It,children:[Ce,ye,we,He]}),t[87]=Ce,t[88]=ye,t[89]=we,t[90]=He,t[91]=_e):_e=t[91];let Te;t[92]!==Je.Body||t[93]!==_e?(Te=s.jsx(Je.Body,{children:_e}),t[92]=Je.Body,t[93]=_e,t[94]=Te):Te=t[94];let Ie;t[95]!==Ue.Content||t[96]!==Te?(Ie=s.jsx(Ue.Content,{children:Te}),t[95]=Ue.Content,t[96]=Te,t[97]=Ie):Ie=t[97];let Be;return t[98]!==ae||t[99]!==se||t[100]!==ve||t[101]!==Ie?(Be=s.jsxs(ae,{children:[se,ve,Ie]}),t[98]=ae,t[99]=se,t[100]=ve,t[101]=Ie,t[102]=Be):Be=t[102],Be}function zs(t){return{type:"invitation",data:t}}function Ps(t){return t.status==="pending"}function Es(t){return{type:"member",data:t}}function ks(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ft(t.data.createdAt):"N/A"}):s.jsx(Ge,{variant:"outline",children:"Pending"})}function Ds(t){return t.type==="member"?s.jsx(Tt,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function $s(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{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(De,{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 qs(t){return t.role!=="owner"}function Os(t,e){Re("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update invitation role")}function Fs(t,e){Re("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update role")}function Ls(t){Re("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to remove member")}function Bs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Ks(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ae,{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(Mt,{fallback:e,children:s.jsx(re.Suspense,{fallback:s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Rs,{})})}),t[1]=n):n=t[1],n}function Wn(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(us,{capability:"members:manage",area:"members",children:s.jsx(Ks,{})}),t[0]=e):e=t[0],e}export{Wn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as D,j as p,r as d,aX as O}from"./index-
|
|
1
|
+
import{c as D,j as p,r as d,aX as O}from"./index-oc_rN11o.js";import{l as I,F as L}from"./index-D1RLRVAk.js";import{S as N}from"./chat-context-BF1A-xsV.js";import{d as K}from"./delay-CnY5UFtP.js";function C(t){return Math.ceil(t.length*3/4)}function Y(t){const e=[];for(const r of t)switch(r.type){case"text":r.text?.trim()&&e.push({type:"paragraph",content:[{type:"text",text:r.text}]});break;case"image":case"audio":r.data&&r.mimeType&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:`${r.type}.${r.mimeType.split("/")[1]??"bin"}`,mimeType:r.mimeType,size:C(r.data),data:r.data}}]});break;case"resource":{const n=r.resource;"text"in n&&n.text?e.push({type:"paragraph",content:[{type:"text",text:n.text}]}):"blob"in n&&n.blob&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:String(n.uri),mimeType:n.mimeType??"application/octet-stream",size:C(n.blob),data:n.blob}}]});break}case"resource_link":e.push({type:"paragraph",content:[{type:"text",text:r.name??r.uri}]});break}return{type:"doc",content:e}}async function z(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.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
|
package/dist/client/assets/{monitoring-stats-row-BcK7HCzn.js → monitoring-stats-row-C-qu7rCw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-
|
|
1
|
+
import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-oc_rN11o.js";import{w as Yr,e as Ae,s as fe,i as V,f as ur,r as ye,h as at,j as fr,J as nt,k as D,m as _,n as ue,o as we,p as Se,q as re,R as ct,L as de,t as Hr,v as Oe,x as Vr,y as qr,z as Ur,B as Zr,D as Le,E as He,F as Xr,G as Jr,H as Qr,I as ea,K as Ne,M as ze,N as q,O as ut,P as ft,Z as Ke,Q as dr,S as vr,T as pr,U as xe,V as mr,W as te,Y as ta,_ as yr,$ as he,a0 as ra,a1 as ie,a2 as ve,a3 as oe,a4 as pe,a5 as hr,a6 as gr,a7 as br,a8 as aa,a9 as na,aa as dt,ab as ia,ac as vt,ad as oa,ae as la,af as sa,ag as ca,ah as ua,ai as xr,aj as fa,ak as da,al as va,am as pa,an as ma,ao as Or,ap as ya,aq as Pr,ar as ha,as as jr,at as ga,au as ba,av as pt,aw as xa,ax as Oa,ay as Pa,az as ja,aA as $,aB as Aa,aC as ka,aD as Ia,aE as wa,aF as Sa,aG as Ea,aH as Ta,aI as Ca,aJ as Da,aK as Ma,aL as Ba,aM as $a,aN as _a,aO as La,aP as Na,X as mt,C as yt,A as za,b as Ka,c as ht}from"./AreaChart-DNQH4zZ9.js";const Ar=Math.cos,Ee=Math.sin,U=Math.sqrt,Te=Math.PI,We=2*Te,it={draw(t,e){const r=U(e/Te);t.moveTo(r,0),t.arc(0,0,r,0,We)}},Wa={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},kr=U(1/3),Ra=kr*2,Fa={draw(t,e){const r=U(e/Ra),a=r*kr;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ga={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ya=.8908130915292852,Ir=Ee(Te/10)/Ee(7*Te/10),Ha=Ee(We/10)*Ir,Va=-Ar(We/10)*Ir,qa={draw(t,e){const r=U(e*Ya),a=Ha*r,n=Va*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=We*i/5,f=Ar(l),o=Ee(l);t.lineTo(o*r,-f*r),t.lineTo(f*a-o*n,o*a+f*n)}t.closePath()}},Fe=U(3),Ua={draw(t,e){const r=-U(e/(Fe*3));t.moveTo(0,r*2),t.lineTo(-Fe*r,-r),t.lineTo(Fe*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,Ve=1/U(12),Za=(Ve/2+1)*3,Xa={draw(t,e){const r=U(e/Za),a=r/2,n=r*Ve,i=a,l=r*Ve+r,f=-i,o=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(f,o),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*f-Y*o,Y*f+G*o),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*f+Y*o,G*o-Y*f),t.closePath()}};function Ja(t,e){let r=null,a=Yr(n);t=typeof t=="function"?t:Ae(t||it),e=typeof e=="function"?e:Ae(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ae(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ae(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var Qa="Invariant failed";function en(t,e){throw new Error(Qa)}var tn=["type","size","sizeType"];function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(null,arguments)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(a){rn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rn(t,e,r){return(e=an(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(t){var e=nn(t,"string");return typeof e=="symbol"?e:e+""}function nn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(t,e){if(t==null)return{};var r,a,n=ln(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ln(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var wr={symbolCircle:it,symbolCross:Wa,symbolDiamond:Fa,symbolSquare:Ga,symbolStar:qa,symbolTriangle:Ua,symbolWye:Xa},sn=Math.PI/180,cn=t=>{var e="symbol".concat(ur(t));return wr[e]||it},un=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*sn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},fn=(t,e)=>{wr["symbol".concat(ur(t))]=e},Sr=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=on(t,tn),i=bt(bt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var f=()=>{var v=cn(l),m=Ja().type(v).size(un(r,a,l)),y=m();if(y!==null)return y},{className:o,cx:s,cy:c}=i,u=fe(i);return V(s)&&V(c)&&V(r)?d.createElement("path",qe({},u,{className:me("recharts-symbols",o),transform:"translate(".concat(s,", ").concat(c,")"),d:f()})):null};Sr.registerSymbol=fn;var xt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},dn=["radius"],vn=["radius"],Ot,Pt,jt,At,kt,It,wt,St,Et,Tt;function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(a){pn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function pn(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=yn(t,"string");return typeof e=="symbol"?e:e+""}function yn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ce.apply(null,arguments)}function Mt(t,e){if(t==null)return{};var r,a,n=hn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function J(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Bt=(t,e,r,a,n)=>{var i=ue(r),l=ue(a),f=Math.min(Math.abs(i)/2,Math.abs(l)/2),o=l>=0?1:-1,s=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(f>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>f?f:b}u=D(Ot||(Ot=J(["M",",",""])),t,e+o*v[0]),v[0]>0&&(u+=D(Pt||(Pt=J(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+s*v[0],e)),u+=D(jt||(jt=J(["L ",",",""])),t+r-s*v[1],e),v[1]>0&&(u+=D(At||(At=J(["A ",",",",0,0,",`,
|
|
2
2
|
`,",",""])),v[1],v[1],c,t+r,e+o*v[1])),u+=D(kt||(kt=J(["L ",",",""])),t+r,e+a-o*v[2]),v[2]>0&&(u+=D(It||(It=J(["A ",",",",0,0,",`,
|
|
3
3
|
`,",",""])),v[2],v[2],c,t+r-s*v[2],e+a)),u+=D(wt||(wt=J(["L ",",",""])),t+s*v[3],e+a),v[3]>0&&(u+=D(St||(St=J(["A ",",",",0,0,",`,
|
|
4
4
|
`,",",""])),v[3],v[3],c,t,e+a-o*v[3])),u+="Z"}else if(f>0&&n===+n&&n>0){var p=Math.min(f,n);u=D(Et||(Et=J(["M ",",",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as he,r as te,l as xe,j as t,B as pe}from"./index-
|
|
1
|
+
import{c as he,r as te,l as xe,j as t,B as pe}from"./index-oc_rN11o.js";import{B as ce}from"./badge-DloWAsWi.js";import{C as de}from"./checkbox-vwl7w0Pc.js";import{t as me}from"./ChevronDown-DogWDo8R.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-BVqkHUqa.js";import{P as Ne,a as ye,b as we}from"./popover-BCSPCOls.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,i as n}from"./index-
|
|
1
|
+
import{r,j as e,i as n}from"./index-oc_rN11o.js";import{h as l}from"./mcp-oauth-BEx3ehCv.js";import"./auth-BK0iVXFl.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,i as d}from"./index-
|
|
1
|
+
import{r,j as e,i as d}from"./index-oc_rN11o.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-D66JKmS1.js";import{R as xe}from"./required-auth-layout-CN62MbMw.js";import{A as J}from"./auth-split-layout-BAnH0KzJ.js";import{O as be}from"./organization-choice-CEio_AKI.js";import{A as de}from"./avatar-BctcMz-W.js";import{I as je}from"./input-CLQMe2qE.js";import{L as ye}from"./label-BDmNI4-u.js";import{S as ve}from"./switch-BeLSaLnY.js";import{t as Ne,a as Se}from"./Users03-BSoeQmT1.js";import{i as we}from"./CheckCircle-DGzuiiIH.js";import{t as ze}from"./Globe04-B50PHw6Y.js";import{a as ke}from"./Palette-Dfx05hI-.js";import{i as Ce}from"./Upload01-pCQ1y-m7.js";import"./User01-B_HZ77z7.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|
|
1
|
+
import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-oc_rN11o.js";import{R as xe}from"./required-auth-layout-BrN9muvX.js";import{A as J}from"./auth-split-layout-pk8lfpOJ.js";import{O as be}from"./organization-choice-B3h9Mz0m.js";import{A as de}from"./avatar-YXhA4ULu.js";import{I as je}from"./input-B4slPD4S.js";import{L as ye}from"./label-CTumOLkJ.js";import{S as ve}from"./switch-DVfF4nF1.js";import{t as Ne,a as Se}from"./Users03-B01odJ5H.js";import{i as we}from"./CheckCircle-Q0XPjh3b.js";import{t as ze}from"./Globe04-hfCQ11Ph.js";import{a as ke}from"./Palette-DHgoVymS.js";import{i as Ce}from"./Upload01-B7Ts0Xt0.js";import"./User01-vA9RYEmY.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-
|
|
1
|
+
import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-oc_rN11o.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as r,O as s}from"./index-
|
|
1
|
+
import{c as o,j as r,O as s}from"./index-oc_rN11o.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
|