decocms 4.76.3 → 4.76.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Cli5PskO.js → AlertCircle-Cpw2xdjW.js} +1 -1
- package/dist/client/assets/{AreaChart-BIFZReng.js → AreaChart-BiEfXrB3.js} +1 -1
- package/dist/client/assets/{ArrowUp-C0vzLNhX.js → ArrowUp-CRp2gZcc.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C-l3cwVO.js → ArrowUpRight-CTdGk_U7.js} +1 -1
- package/dist/client/assets/{Check-DCKTEkRg.js → Check-DfOcgGYy.js} +1 -1
- package/dist/client/assets/{CheckCircle-uCnOMaNX.js → CheckCircle-CJyl3nb8.js} +1 -1
- package/dist/client/assets/{ChevronDown-D-pBM3ET.js → ChevronDown-Dy3pWkd8.js} +1 -1
- package/dist/client/assets/{ChevronRight-DXIIFmBg.js → ChevronRight-BY42SeOE.js} +1 -1
- package/dist/client/assets/{ChevronUp-BJGZQ9kN.js → ChevronUp-BKo4p_ly.js} +1 -1
- package/dist/client/assets/{Circle-Inr8edCw.js → Circle-CXkLF8Vz.js} +1 -1
- package/dist/client/assets/{Copy01-B5xEncXo.js → Copy01-C5HOYVXI.js} +1 -1
- package/dist/client/assets/{DotsVertical-DQ_iKhVK.js → DotsVertical-CTp3xq3f.js} +1 -1
- package/dist/client/assets/{Eye-Dt8pFFfD.js → Eye-BWybLdIc.js} +1 -1
- package/dist/client/assets/{FilterLines-BspEl0lE.js → FilterLines-BHez54Cq.js} +1 -1
- package/dist/client/assets/{Flag01-DlePvVco.js → Flag01-BxHDS_gZ.js} +1 -1
- package/dist/client/assets/{Globe01-CuK8H_XR.js → Globe01-CPhoxklb.js} +1 -1
- package/dist/client/assets/{Globe04-Dl00LNhM.js → Globe04-U0_hML-7.js} +1 -1
- package/dist/client/assets/{HardDrive-Z_ST_sca.js → HardDrive-CTggVRBH.js} +1 -1
- package/dist/client/assets/{Key01-B58HPrCI.js → Key01-gNzzvNaH.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BN6kWZIo.js → LayoutLeft-44rMNm78.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BqlZDbaR.js → LinkExternal01-C5cujxhm.js} +1 -1
- package/dist/client/assets/{List-BjJgF_JP.js → List-BxXVqbMS.js} +1 -1
- package/dist/client/assets/{Monitor01-BMaqmilJ.js → Monitor01-DkPn-3sD.js} +1 -1
- package/dist/client/assets/{Package-CmyFJl8-.js → Package-BkozezKZ.js} +1 -1
- package/dist/client/assets/{Palette-CUEfLrEe.js → Palette-BCjrMSpk.js} +1 -1
- package/dist/client/assets/{Play-CYEE8bjk.js → Play-CyYrzLun.js} +1 -1
- package/dist/client/assets/{Plus-CutoTCrK.js → Plus-CS-gIx_N.js} +1 -1
- package/dist/client/assets/{SearchLg-D6d46mS2.js → SearchLg-8eogezzo.js} +1 -1
- package/dist/client/assets/{SearchMd--_3tUNf9.js → SearchMd-Bi1fzAnS.js} +1 -1
- package/dist/client/assets/{Settings02-Cr1hvKII.js → Settings02-k_KW48mm.js} +1 -1
- package/dist/client/assets/{Shield01-BN_UAgeu.js → Shield01-CAiVeYnH.js} +1 -1
- package/dist/client/assets/{Star01-CS--_i54.js → Star01-L3ghadII.js} +1 -1
- package/dist/client/assets/{Stars01-DUU1n1Nv.js → Stars01-DtAaE6rw.js} +1 -1
- package/dist/client/assets/{Stars02-DFvFYAI1.js → Stars02-F3qph5oy.js} +1 -1
- package/dist/client/assets/{Sun-_WztSALf.js → Sun-D-H5MCON.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CnJlnhMh.js → SwitchHorizontal01-COngPqMD.js} +1 -1
- package/dist/client/assets/{Tool01-BYdC3nRO.js → Tool01-B274Ckdj.js} +1 -1
- package/dist/client/assets/{Tool02-DCPUxtfR.js → Tool02-CjUl46sF.js} +1 -1
- package/dist/client/assets/{Trash01-Dp-rAKVF.js → Trash01-wHqD53Ri.js} +1 -1
- package/dist/client/assets/{TrendUp01-BzXlUM6h.js → TrendUp01-DhPHcJeR.js} +1 -1
- package/dist/client/assets/{Upload01-CfTeOXY1.js → Upload01-BBaK_ImV.js} +1 -1
- package/dist/client/assets/{User01-Dibhogeo.js → User01-DgUNDIBy.js} +1 -1
- package/dist/client/assets/{UserPlus01-B83sVraS.js → UserPlus01-BKUaNQ1x.js} +1 -1
- package/dist/client/assets/{Users01-DlfEoeT5.js → Users01-DJEsSuRY.js} +1 -1
- package/dist/client/assets/{Users03-BB9aPnNp.js → Users03-I2Zl4gPZ.js} +1 -1
- package/dist/client/assets/{X-BL96oBM1.js → X-CbHFsbX4.js} +1 -1
- package/dist/client/assets/{XCircle-DWvf7QSs.js → XCircle-BUBP7T66.js} +1 -1
- package/dist/client/assets/{XClose-CN859N5i.js → XClose-DkRVhv6F.js} +1 -1
- package/dist/client/assets/{Zap-BepKBP7M.js → Zap-BoB-apgn.js} +1 -1
- package/dist/client/assets/{ZapSquare-ButPNiw5.js → ZapSquare-CdBGneCn.js} +1 -1
- package/dist/client/assets/{ZoomOut-CCWxzT6n.js → ZoomOut-CSTlILg0.js} +1 -1
- package/dist/client/assets/{access-gate-BtEx0VGE.js → access-gate-ijx7nnmo.js} +1 -1
- package/dist/client/assets/{add-section-modal-D4WVwOps.js → add-section-modal-CaTBPGIc.js} +1 -1
- package/dist/client/assets/{agent-icon-CiOlp36b.js → agent-icon-BZMuuGrm.js} +1 -1
- package/dist/client/assets/{agents-list-BSpKFVFh.js → agents-list-B3bz5Gh-.js} +1 -1
- package/dist/client/assets/{ai-providers-BGo24b1-.js → ai-providers-CIyYFhHa.js} +1 -1
- package/dist/client/assets/{alert-BugRywMQ.js → alert-EkiLtXUz.js} +1 -1
- package/dist/client/assets/{alert-dialog-B7kOcoq-.js → alert-dialog-DFeYw7pS.js} +1 -1
- package/dist/client/assets/app-editor-D4j3pjRH.js +1 -0
- package/dist/client/assets/{auth-BzMkNFeu.js → auth-CpLB0qsK.js} +1 -1
- package/dist/client/assets/{auth-catchall-BGXWgqN8.js → auth-catchall-Cyrk5r8Y.js} +1 -1
- package/dist/client/assets/{auth-entry-cA7CeOxA.js → auth-entry-lLRQbwA1.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CKLRIlFs.js → auth-split-layout-CceIE6gi.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DBbPX692.js → authenticate-and-persist-oauth-DS8Ewc6r.js} +1 -1
- package/dist/client/assets/{automation-list-row-DugteKgZ.js → automation-list-row-28YFQ7Y3.js} +1 -1
- package/dist/client/assets/{automation-runs-zkajlrTP.js → automation-runs-0Pt8hDgO.js} +1 -1
- package/dist/client/assets/automations-DTzfxZMJ.js +1 -0
- package/dist/client/assets/{autosend-B2uxGcva.js → autosend-DESvxxVu.js} +1 -1
- package/dist/client/assets/{avatar-BWxcNNYZ.js → avatar-WsbcmL2q.js} +1 -1
- package/dist/client/assets/{badge-C7D3HL5R.js → badge-CHssn3To.js} +1 -1
- package/dist/client/assets/{block-document-CF-0dT30.js → block-document-CKjZX3EH.js} +1 -1
- package/dist/client/assets/{brand-context-C2xluIhQ.js → brand-context-DQszQaix.js} +1 -1
- package/dist/client/assets/{buckets-CgJ3BSJB.js → buckets-16Czdnl7.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DU7rkwIu.js → bulk-category-panel-ftOAzulq.js} +1 -1
- package/dist/client/assets/{calendar-Bg2_ut5x.js → calendar-DKUCO8ed.js} +1 -1
- package/dist/client/assets/{capability-load-error-DTF3aPct.js → capability-load-error-3ciLes_0.js} +1 -1
- package/dist/client/assets/{card-egSs4wi8.js → card-Du8bybpP.js} +1 -1
- package/dist/client/assets/{category-editor-BR_oh6q_.js → category-editor-IXZJcfn7.js} +1 -1
- package/dist/client/assets/{chat-context-P2AI-plu.js → chat-context-FtuAOwFp.js} +1 -1
- package/dist/client/assets/{checkbox-wyU6pRV7.js → checkbox-B1316slT.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C20BmITJ.js → cli-auth-success-yD0RrUpp.js} +1 -1
- package/dist/client/assets/{collection-detail-B14Z3rP4.js → collection-detail-Ri-nfuFd.js} +1 -1
- package/dist/client/assets/{collection-display-button-DfRw_rnI.js → collection-display-button-B-BcuXum.js} +1 -1
- package/dist/client/assets/{collection-search-CmOrzydq.js → collection-search-Dh_Xc-7S.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-A9dH2lEu.js → collection-table-wrapper-A-wLGiWs.js} +1 -1
- package/dist/client/assets/{collection-tabs-CiM6HynJ.js → collection-tabs-1jPRIcHp.js} +1 -1
- package/dist/client/assets/{command-B3vCmzDb.js → command-Ct2XSC2N.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BtGfei72.js → commerce-onboarding-C_tJQSoe.js} +1 -1
- package/dist/client/assets/{companions-core-D2vff6V8.js → companions-core-D_IFJTvU.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-ClCroTYj.js → connect-desktop-dialog-BqLwdotR.js} +1 -1
- package/dist/client/assets/{connection-card-D8HqUS1c.js → connection-card-DOlzEpTz.js} +1 -1
- package/dist/client/assets/{connection-detail-DtmKovao.js → connection-detail-CNbwKa_X.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B3SnfBCf.js → connection-form-helpers-BtCVGeJy.js} +1 -1
- package/dist/client/assets/{connections-hFvVbnjN.js → connections-BBf4cmxW.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DVfnMBsd.js → decopilot-sse-pool-Bu4HWaVm.js} +1 -1
- package/dist/client/assets/{dialog-DvLcZqYO.js → dialog-uugioT_S.js} +1 -1
- package/dist/client/assets/{domain-settings-1V84jJC4.js → domain-settings-CrToSwnt.js} +1 -1
- package/dist/client/assets/{drawer-CftUvxXP.js → drawer-BT_D6Dv6.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D8MhN8DL.js → dropdown-menu-awm8LXzl.js} +1 -1
- package/dist/client/assets/{empty-state-BXA9hCOD.js → empty-state-zKWz7J06.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BxORPF_W.js → extract-connection-data-D3zAvTO5.js} +1 -1
- package/dist/client/assets/{file-explorer-DCUgjkgO.js → file-explorer-CrSX2Ppj.js} +1 -1
- package/dist/client/assets/{file-type-icon-BDKEps7_.js → file-type-icon-BLZHlOTx.js} +1 -1
- package/dist/client/assets/{files-0HSbc1js.js → files-CsW30rdG.js} +1 -1
- package/dist/client/assets/{form-Ce46CfNA.js → form-D3SpyqUh.js} +1 -1
- package/dist/client/assets/{general-LpUFcjNo.js → general-BJBU5h4A.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CFSqstPF.js → github-repo-picker-ULAtxzGV.js} +1 -1
- package/dist/client/assets/{hooks-vj-9786r.js → hooks-DxbuShpq.js} +1 -1
- package/dist/client/assets/{index-DpP9OWI_.js → index-83vO-_Lt.js} +1 -1
- package/dist/client/assets/{index-7aBM6QXe.js → index-B2d_-L3i.js} +2 -2
- package/dist/client/assets/index-B3-QJQ_a.css +1 -0
- package/dist/client/assets/{index-BavrEkCx.js → index-BGGyvj1T.js} +1 -1
- package/dist/client/assets/{index-CNLL6gV8.js → index-BrW5L5Qk.js} +1 -1
- package/dist/client/assets/{index-DujHTe8W.js → index-BsFVgyHQ.js} +1 -1
- package/dist/client/assets/{index-s-NnvTd9.js → index-ByYkRyrv.js} +1 -1
- package/dist/client/assets/{index-DIP4gC8s.js → index-CaIXiQZG.js} +1 -1
- package/dist/client/assets/{index-DnkTyoln.js → index-CfbjvoNc.js} +1 -1
- package/dist/client/assets/{index-CO4xoq2y.js → index-CmK3-TPk.js} +1 -1
- package/dist/client/assets/{index-iOyUYSVc.js → index-FZzEc8er.js} +1 -1
- package/dist/client/assets/{index-BWTolbU-.js → index-T8P2-f5w.js} +5 -5
- package/dist/client/assets/{index-BPrYxmj0.js → index-W2bGpF1P.js} +3 -3
- package/dist/client/assets/{index-sz5lZWPJ.js → index-elb_-cq8.js} +1 -1
- package/dist/client/assets/{index-redirect-C3J4DhZe.js → index-redirect-DYrgWpJe.js} +1 -1
- package/dist/client/assets/{index-jipgL0s_.js → index-uWw4qA_y.js} +1 -1
- package/dist/client/assets/{input-BtmxD9BG.js → input-TTUiKHLQ.js} +1 -1
- package/dist/client/assets/{integration-icon-DqVRbxyE.js → integration-icon-Qtc3HKJR.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CNi9v43c.js → invite-member-dialog-CO9y_zRf.js} +1 -1
- package/dist/client/assets/{label-C2yLGsHl.js → label-SeMoO7P9.js} +1 -1
- package/dist/client/assets/{layout-CM480BQY.js → layout-BmaKqAGv.js} +1 -1
- package/dist/client/assets/{login-BiO5iWQC.js → login-WcihN59m.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B5LeHowH.js → mcp-oauth-CChisjOy.js} +1 -1
- package/dist/client/assets/{members-C0hEX0F9.js → members-BbvX_-J4.js} +1 -1
- package/dist/client/assets/{monaco-editor-CzgkSDjW.js → monaco-editor-LXgoG5Xr.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DWDQ6FaX.js → monitoring-stats-row-CwucBnrC.js} +1 -1
- package/dist/client/assets/{oauth-callback-Ds-HauWj.js → oauth-callback-SSM1IP7E.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DiNCqR5K.js → oauth-callback-ai-provider-5ElugBWz.js} +1 -1
- package/dist/client/assets/{onboarding-CXPgbVzu.js → onboarding-BbnTDF6w.js} +1 -1
- package/dist/client/assets/{org-install-CaLssGXD.js → org-install-Cliqjnbs.js} +1 -1
- package/dist/client/assets/{org-layout-B0LaFXt0.js → org-layout-DIfr3ngA.js} +1 -1
- package/dist/client/assets/{organization-choice-B6a22BtP.js → organization-choice-DN9z99do.js} +1 -1
- package/dist/client/assets/{orgs-DWsEyVZ0.js → orgs-BSfF9jKJ.js} +1 -1
- package/dist/client/assets/{page-seo-form-BKw2or4U.js → page-seo-form-b7HOE7sj.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bpkkx9WE.js +1 -0
- package/dist/client/assets/{popover-Dz1cZ1HZ.js → popover-DpOK_Gv1.js} +1 -1
- package/dist/client/assets/{post-editor-DP8N23EA.js → post-editor-BTFZG3Hc.js} +1 -1
- package/dist/client/assets/{primitives-B5kbA15D.js → primitives-C6sxvAo2.js} +1 -1
- package/dist/client/assets/{profile-Cq-NChRf.js → profile-BfY51V0g.js} +1 -1
- package/dist/client/assets/project-app-view-CXvmaDqq.js +1 -0
- package/dist/client/assets/record-editor-rzCTEVAR.js +1 -0
- package/dist/client/assets/redirect-editor-ByvBZjBJ.js +1 -0
- package/dist/client/assets/registry-Bf3j9pqm.js +2 -0
- package/dist/client/assets/{registry-layout-BSWSvLYf.js → registry-layout-CDncryDc.js} +1 -1
- package/dist/client/assets/{reports-ClMxFWgi.js → reports-Cbwre3N-.js} +1 -1
- package/dist/client/assets/{require-capability-pcgHtjPn.js → require-capability-Bdo_KZNi.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DPJLJBEh.js → required-auth-layout-BnH4wru7.js} +1 -1
- package/dist/client/assets/{reset-password-BgYAPoXA.js → reset-password-CcGXR-gI.js} +1 -1
- package/dist/client/assets/{roles-RlnxPjpq.js → roles-ZaDzD7Aw.js} +1 -1
- package/dist/client/assets/{search-input-BoYYSHTq.js → search-input-DIY_JEQm.js} +1 -1
- package/dist/client/assets/{secrets-BMVFUgKP.js → secrets-JV_O-mE6.js} +1 -1
- package/dist/client/assets/{sections-editor-mf2NCSPA.js → sections-editor-DTgr1wVF.js} +1 -1
- package/dist/client/assets/{select-NxJDd92q.js → select-BJnt6jrF.js} +1 -1
- package/dist/client/assets/{select-model-CiFmHjEx.js → select-model-qvzFeUWE.js} +1 -1
- package/dist/client/assets/{self-tool-result-Ca-ZwGLT.js → self-tool-result-iBOa5mEi.js} +1 -1
- package/dist/client/assets/{seo-editor-BYrc4HvY.js → seo-editor-C_wX4VXX.js} +1 -1
- package/dist/client/assets/{settings-layout-C1QkG71M.js → settings-layout-DVmawmxt.js} +1 -1
- package/dist/client/assets/{settings-section-BbBTKu1F.js → settings-section-CTgo_hbF.js} +1 -1
- package/dist/client/assets/{shell-controls-jCYi-a0e.js → shell-controls-ytJ7QjRU.js} +1 -1
- package/dist/client/assets/{shell-layout-DiaMz6Ej.js → shell-layout-Cl62xINW.js} +1 -1
- package/dist/client/assets/{sidebar-BCuT50hr.js → sidebar-DBU9GQTi.js} +1 -1
- package/dist/client/assets/{skeleton-CqpGlOHT.js → skeleton-BCn4CrjA.js} +1 -1
- package/dist/client/assets/{sso-3cdREi4c.js → sso-Btpwt4lL.js} +1 -1
- package/dist/client/assets/{store-Dxju6X0t.js → store-C3TSEo1y.js} +1 -1
- package/dist/client/assets/store-registry-CO2SMs1p.js +2 -0
- package/dist/client/assets/{studio-tools-DLDLyDRj.js → studio-tools-BK49S508.js} +1 -1
- package/dist/client/assets/{switch-DFRxEmMQ.js → switch-em55FZ0s.js} +1 -1
- package/dist/client/assets/{table-BC1-KAni.js → table-iOEyS7-z.js} +1 -1
- package/dist/client/assets/{tabs-C7P4YmG-.js → tabs-D9TkyUD7.js} +1 -1
- package/dist/client/assets/{textarea-Cf62y2Mq.js → textarea-C6EDEyJ3.js} +1 -1
- package/dist/client/assets/{toggle-group-DT099lyO.js → toggle-group-DMcymULQ.js} +1 -1
- package/dist/client/assets/{toolbar-DSwBN5x7.js → toolbar-DzZdZAbq.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-C8WF2PX6.js → toolbar-icon-button-BJV6NyGu.js} +1 -1
- package/dist/client/assets/{tools-list-DLNChqRD.js → tools-list-JMkpPk3b.js} +1 -1
- package/dist/client/assets/{tooltip-De9_dCD6.js → tooltip-BLwI4tF3.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BnRvCj0l.js → use-ai-providers-C5LDvo-I.js} +1 -1
- package/dist/client/assets/{use-automations-DsAdes3l.js → use-automations-CFUPKnXS.js} +1 -1
- package/dist/client/assets/{use-autosave-QS1EZr00.js → use-autosave-BRvw9ciz.js} +1 -1
- package/dist/client/assets/{use-capability-DqZniXl1.js → use-capability-DOXUJZQ2.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Dcd6c9Cq.js → use-clock-tick-c-oqaExW.js} +1 -1
- package/dist/client/assets/{use-collections-DUzZ2yTO.js → use-collections-ZkF3cyPE.js} +1 -1
- package/dist/client/assets/{use-connection-CcSjWiKt.js → use-connection-Do5SMptP.js} +1 -1
- package/dist/client/assets/{use-copy-sxIC4y9v.js → use-copy-dTd4yYvX.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CtkPTogp.js → use-create-virtual-mcp-j4XDob7P.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C3gAKZHZ.js → use-debounced-autosave-BFwEhqOJ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DNr6sR8f.js → use-debounced-value-Qb0Xj4kK.js} +1 -1
- package/dist/client/assets/{use-deco-credits-C5WgmSab.js → use-deco-credits-D29pwTLe.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-v6euVGBA.js → use-decopilot-events-BUEeEPjm.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BLxCcv5x.js → use-delete-connection-ymCiZq2i.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Y6VXzYfQ.js → use-deployment-admin-DddDNfKW.js} +1 -1
- package/dist/client/assets/{use-file-configs-JNWpZgpJ.js → use-file-configs-mdAGEquq.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DTXqP818.js → use-infinite-scroll-C8qQvf1g.js} +1 -1
- package/dist/client/assets/{use-join-requests-DvIfYotM.js → use-join-requests-Ds5NwsG2.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DFU45kki.js → use-mcp-client-BkYQ3M2O.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BjF8qF6a.js → use-mcp-tools-CrQKW8_a.js} +1 -1
- package/dist/client/assets/{use-members-DPFs-QAN.js → use-members-yW8M2qQM.js} +1 -1
- package/dist/client/assets/{use-mobile-C1OuAVzU.js → use-mobile-C3dEkzJn.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bx28wqhb.js → use-navigate-to-agent-DYdqrR4v.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-OVtaqLXf.js → use-org-auth-client-Bra3oAHu.js} +1 -1
- package/dist/client/assets/{use-org-sso-X8FW-RHa.js → use-org-sso-kdv28AgC.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cw0wHVfK.js → use-organization-roles-Blof9CZn.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BlyZVRWi.js → use-organization-settings-CFE1zF2u.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Kd9ZRAmK.js → use-registry-connections-BL5x_n_W.js} +1 -1
- package/dist/client/assets/{use-secrets-C9kElg_K.js → use-secrets-MyAqK6of.js} +1 -1
- package/dist/client/assets/{use-status-sounds-aFCqZbKW.js → use-status-sounds-Cl6wCHb2.js} +1 -1
- package/dist/client/assets/{use-view-mode-DLamm5NR.js → use-view-mode-C9YTMXAq.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CF7Al2pk.js → use-virtual-mcp-LqBQJllo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CwRajsXX.js +1 -0
- package/dist/client/assets/{useRouterState-Zt1bK3RO.js → useRouterState-CcFc-AZM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DVe2Lv05.js +1 -0
- package/dist/client/assets/{users-BDaA7Xom.js → users-3y-V95Ra.js} +1 -1
- package/dist/client/assets/{variant-calendar-C8laLZAF.js → variant-calendar-IzRhXdfd.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C_FBvc48.js → view-mode-toggle-CzGdjJnL.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-nSdDcTWa.js +0 -1
- package/dist/client/assets/automations-mSKXvy8S.js +0 -1
- package/dist/client/assets/index-ytojouFl.css +0 -1
- package/dist/client/assets/page-seo-sheet-CPXtJRf1.js +0 -1
- package/dist/client/assets/project-app-view-CMihVMFh.js +0 -1
- package/dist/client/assets/record-editor-DAdcsD4T.js +0 -1
- package/dist/client/assets/redirect-editor-zX_aU0Jm.js +0 -1
- package/dist/client/assets/registry-BKm48nKo.js +0 -2
- package/dist/client/assets/store-registry-B5a_5a9a.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DJrtHMw3.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dw2YB4He.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,r as K,b as yt,C as Be,j as t,B as Z,t as Se,l as de,K as it,m as wt,x as rs,u as os,p as xt,E as ls}from"./index-
|
|
1
|
+
import{c as oe,r as K,b as yt,C as Be,j as t,B as Z,t as Se,l as de,K as it,m as wt,x as rs,u as os,p as xt,E as ls}from"./index-W2bGpF1P.js";import{S as as}from"./search-input-DIY_JEQm.js";import{P as De}from"./index-CmK3-TPk.js";import{E as St}from"./empty-state-zKWz7J06.js";import{R as ns}from"./require-capability-Bdo_KZNi.js";import{N as Tt,A as is,Q as cs,U as Mt,V as Ze,W as At,X as ft,Y as ds,Z as _t,_ as Pt,L as ms,$ as us,a0 as xs,a1 as pt}from"./automation-runs-0Pt8hDgO.js";import{u as vt}from"./use-connection-Do5SMptP.js";import{g as Ut}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-CHssn3To.js";import{b as ct,P as dt,a as mt}from"./popover-DpOK_Gv1.js";import{b as et,T as tt,a as st}from"./tooltip-BLwI4tF3.js";import{i as ht}from"./Check-DfOcgGYy.js";import{a as Xe}from"./Copy01-C5HOYVXI.js";import{n as Dt}from"./Globe01-CPhoxklb.js";import{i as Vt}from"./FilterLines-BHez54Cq.js";import{i as fs}from"./Key01-gNzzvNaH.js";import{i as ps}from"./Play-CyYrzLun.js";import{ao as hs,U as gs}from"./agent-icon-BZMuuGrm.js";import{M as Lt}from"./monaco-editor-LXgoG5Xr.js";import{u as js}from"./use-members-yW8M2qQM.js";import{u as vs}from"./use-mcp-client-BkYQ3M2O.js";import{u as Ns}from"./use-virtual-mcp-LqBQJllo.js";import{S as bs,W as ys}from"./constants-D_FQAPnt.js";import{n as Ge}from"./Tool02-CjUl46sF.js";import{c as ws}from"./SwitchHorizontal01-COngPqMD.js";import{s as Ss}from"./Plus-CS-gIx_N.js";import{s as Is}from"./Trash01-wHqD53Ri.js";import{I as Qe}from"./input-TTUiKHLQ.js";import{a as ot,b as lt,c as at,d as $e,S as nt}from"./select-BJnt6jrF.js";import{t as Kt}from"./ChevronDown-Dy3pWkd8.js";import{s as Cs}from"./Stars02-F3qph5oy.js";import{C as ks}from"./calendar-DKUCO8ed.js";import{b as Ts}from"./UserPlus01-BKUaNQ1x.js";import{T as Ms}from"./textarea-C6EDEyJ3.js";import{C as qt}from"./collection-tabs-1jPRIcHp.js";import{S as _s}from"./switch-em55FZ0s.js";import{L as Ds}from"./label-SeMoO7P9.js";import{I as qe}from"./integration-icon-Qtc3HKJR.js";import{A as Bt}from"./avatar-WsbcmL2q.js";import{A as Ls,a as Fs,b as Rs}from"./alert-EkiLtXUz.js";import{C as Ht}from"./card-Du8bybpP.js";import{K as Me}from"./monitoring-stats-row-CwucBnrC.js";import{u as Jt}from"./studio-tools-BK49S508.js";import{u as $s}from"./useSuspenseInfiniteQuery-DVe2Lv05.js";import{o as zs,m as Os,p as Es,q as As}from"./sidebar-DBU9GQTi.js";import{T as Fe,a as ut,b as Qt,c as Gt,d as Wt,e as ae}from"./table-iOEyS7-z.js";import{n as Ps}from"./ChevronUp-BKo4p_ly.js";import{u as Us}from"./use-infinite-scroll-C8qQvf1g.js";import{c as Vs,b as Ks}from"./use-automations-CFUPKnXS.js";import"./SearchMd-Bi1fzAnS.js";import"./use-capability-DOXUJZQ2.js";import"./access-gate-ijx7nnmo.js";import"./capability-load-error-3ciLes_0.js";import"./useInfiniteQuery-CwRajsXX.js";import"./use-clock-tick-c-oqaExW.js";import"./AlertCircle-Cpw2xdjW.js";import"./CheckCircle-CJyl3nb8.js";import"./Circle-CXkLF8Vz.js";import"./XCircle-BUBP7T66.js";import"./checkbox-B1316slT.js";import"./command-Ct2XSC2N.js";import"./index-BGGyvj1T.js";import"./dialog-uugioT_S.js";import"./X-CbHFsbX4.js";import"./Stars01-DtAaE6rw.js";import"./ChevronRight-BY42SeOE.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-dTd4yYvX.js";import"./file-type-icon-BLZHlOTx.js";import"./ZoomOut-CSTlILg0.js";import"./use-mobile-C3dEkzJn.js";import"./tab-id-BijBBRwE.js";import"./index-BsFVgyHQ.js";import"./chat-context-FtuAOwFp.js";import"./autosend-DESvxxVu.js";import"./hooks-DxbuShpq.js";import"./decopilot-sse-pool-Bu4HWaVm.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-C5LDvo-I.js";import"./use-decopilot-events-BUEeEPjm.js";import"./use-organization-settings-CFE1zF2u.js";import"./Eye-BWybLdIc.js";import"./Star01-L3ghadII.js";import"./XClose-DkRVhv6F.js";import"./ZapSquare-CdBGneCn.js";import"./Tool01-B274Ckdj.js";import"./Monitor01-DkPn-3sD.js";import"./Upload01-BBaK_ImV.js";import"./shell-layout-Cl62xINW.js";import"./Users03-I2Zl4gPZ.js";import"./SearchLg-8eogezzo.js";import"./Zap-BoB-apgn.js";import"./alert-dialog-DFeYw7pS.js";import"./required-auth-layout-BnH4wru7.js";import"./use-org-sso-kdv28AgC.js";import"./LinkExternal01-C5cujxhm.js";import"./ArrowUpRight-CTdGk_U7.js";import"./Palette-BCjrMSpk.js";import"./use-navigate-to-agent-DYdqrR4v.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BiEfXrB3.js";import"./form-D3SpyqUh.js";import"./use-collections-ZkF3cyPE.js";import"./ArrowUp-CRp2gZcc.js";import"./Settings02-k_KW48mm.js";import"./TrendUp01-DhPHcJeR.js";import"./DotsVertical-CTp3xq3f.js";import"./Flag01-BxHDS_gZ.js";import"./Globe04-U0_hML-7.js";import"./HardDrive-CTggVRBH.js";import"./LayoutLeft-44rMNm78.js";import"./List-BxXVqbMS.js";import"./Sun-D-H5MCON.js";import"./Package-BkozezKZ.js";import"./Shield01-CAiVeYnH.js";import"./User01-DgUNDIBy.js";import"./Users01-DJEsSuRY.js";import"./index-83vO-_Lt.js";import"./use-org-auth-client-Bra3oAHu.js";import"./auth-CpLB0qsK.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Ft(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...o]=e.split("=");return{key:r||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[r,...o]=e.split("~");return{key:r||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[r,...o]=e.split("@");return{key:r||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},o=[],a={};for(const l of s)if(l.key.trim())switch(l.operator){case"eq":l.value&&(e[l.key]=l.value);break;case"contains":l.value&&(r[l.key]=`%${l.value}%`);break;case"exists":o.push(l.key);break;case"in":l.value&&(a[l.key]=l.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -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-W2bGpF1P.js";import{a as x}from"./use-capability-DOXUJZQ2.js";import{C as j}from"./capability-load-error-3ciLes_0.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{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-
|
|
1
|
+
import{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-W2bGpF1P.js";var I="Radio",[H,P]=w(I),[z,Q]=H(I),k=s.forwardRef((a,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:t,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:C(a.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((a,c)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=Q(S,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=S;var W="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:a,control:c,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=W;function A(a){return a?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),j=_(),N=P(),[J,Z]=Y(y),D=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(J,{scope:o,name:n,required:t,disabled:l,value:b,onValueChange:h,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!t,active:p,children:d.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae 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-W2bGpF1P.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-W2bGpF1P.js";import{n as Z}from"./Tool02-CjUl46sF.js";import{A as y}from"./agent-icon-BZMuuGrm.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-CNi9v43c.js → invite-member-dialog-CO9y_zRf.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-W2bGpF1P.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-uugioT_S.js";import{a as U,F as b,b as v,c as Y,d as w,f as S}from"./form-D3SpyqUh.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-BJnt6jrF.js";import{T as _}from"./textarea-C6EDEyJ3.js";import{u as ee}from"./use-org-auth-client-Bra3oAHu.js";import{u as se}from"./use-organization-roles-Blof9CZn.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-W2bGpF1P.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-W2bGpF1P.js";import{u as j}from"./useRouterState-CcFc-AZM.js";import{R as _}from"./required-auth-layout-BnH4wru7.js";import{u as y}from"./use-deployment-admin-DddDNfKW.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-W2bGpF1P.js";import{A as x}from"./auth-entry-lLRQbwA1.js";import{A as S}from"./auth-split-layout-CceIE6gi.js";import"./input-TTUiKHLQ.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 L(){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{L 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-CpLB0qsK.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 Mt,n as Qe,d as Me,K as ce,t as oe,m as Ct,r as re,l as ke,i as Xe,E as Rt,p as Re}from"./index-BPrYxmj0.js";import{C as zt}from"./collection-display-button-DfRw_rnI.js";import{S as Pt}from"./search-input-BoYYSHTq.js";import{P as Ae}from"./index-CO4xoq2y.js";import{C as Et}from"./collection-table-wrapper-A9dH2lEu.js";import{E as We}from"./empty-state-BXA9hCOD.js";import{I as kt}from"./invite-member-dialog-CNi9v43c.js";import{b as Dt,S as $t,a as Ot}from"./settings-section-BbBTKu1F.js";import{u as qt,a as Lt}from"./use-join-requests-DvIfYotM.js";import{A as De}from"./avatar-BWxcNNYZ.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Bt}from"./use-members-DPFs-QAN.js";import{u as $e}from"./studio-tools-DLDLyDRj.js";import{u as yt}from"./use-org-auth-client-OVtaqLXf.js";import{u as Kt}from"./use-organization-roles-Cw0wHVfK.js";import{T as Vt,a as Qt,c as Gt,b as Ut}from"./tooltip-De9_dCD6.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-B7kOcoq-.js";import{B as Ge}from"./badge-C7D3HL5R.js";import{C as mt}from"./card-egSs4wi8.js";import{D as St,a as Nt,c as wt,e as Jt,f as Ht,g as Wt,d as et,j as Yt}from"./dropdown-menu-D8MhN8DL.js";import{i as _t}from"./DotsVertical-DQ_iKhVK.js";import{i as Zt}from"./Key01-B58HPrCI.js";import{i as Xt}from"./Shield01-BN_UAgeu.js";import{a as es}from"./SwitchHorizontal01-CnJlnhMh.js";import{s as ts}from"./Trash01-Dp-rAKVF.js";import{s as Tt}from"./XClose-CN859N5i.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-NxJDd92q.js";import{C as gt}from"./checkbox-wyU6pRV7.js";import{e as Ye,a as Ze,f as xt,C as ss,c as ns,d as is,b as as}from"./command-B3vCmzDb.js";import{a as ls,b as os,P as rs}from"./popover-Dz1cZ1HZ.js";import{t as cs}from"./ChevronDown-D-pBM3ET.js";import{s as ms}from"./Plus-CutoTCrK.js";import{R as ds}from"./require-capability-pcgHtjPn.js";import"./ArrowUp-C0vzLNhX.js";import"./Check-DCKTEkRg.js";import"./List-BjJgF_JP.js";import"./view-mode-toggle-C_FBvc48.js";import"./SearchMd--_3tUNf9.js";import"./sidebar-BCuT50hr.js";import"./LayoutLeft-BN6kWZIo.js";import"./use-mobile-C1OuAVzU.js";import"./X-BL96oBM1.js";import"./table-BC1-KAni.js";import"./dialog-DvLcZqYO.js";import"./form-Ce46CfNA.js";import"./label-C2yLGsHl.js";import"./textarea-Cf62y2Mq.js";import"./ArrowUpRight-C-l3cwVO.js";import"./use-capability-DqZniXl1.js";import"./User01-Dibhogeo.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-DXIIFmBg.js";import"./Circle-Inr8edCw.js";import"./ChevronUp-BJGZQ9kN.js";import"./index-BavrEkCx.js";import"./access-gate-BtEx0VGE.js";import"./capability-load-error-DTF3aPct.js";function us(){const t=U.c(9),e=qt(),{approve:n,deny:l}=Lt();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(Dt,{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($t,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx(Ot,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function fs(){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],Mt(a)}function ps(){const t=U.c(10),{locator:e}=pe(),n=yt(),l=Qe();let i;t[0]!==n?(i=async f=>{const g=await n.organization.cancelInvitation({invitationId:f});if(g?.error)throw new Error(g.error.message);return g.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:hs},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 hs(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],Ct(a)}function xs(){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 js(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],Ct(r)}function vs(){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:Cs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function Cs(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function It(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,[g,b]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:j}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=js(n),C=v===void 0?[]:v,E=xs(),N=vs(),R=j||$,S=C.map(Ss);let z;e[0]!==p?(z=x=>x.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=x=>x.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async x=>{const fe=S.includes(x.id)?S.filter(xe=>xe!==x.id):[...S,x.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const x=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,x.id]}),I("")},c=async x=>{const se=S.filter(fe=>fe!==x);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,L=os;let P;e[4]!==g?(P=()=>b(!g),e[4]=g,e[5]=P):P=e[5];let O;e[6]!==l?(O=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=O):O=e[7];const V=r||R,q=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(ys),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(cs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let F;e[9]!==V||e[10]!==q||e[11]!==P||e[12]!==O?(F=s.jsx(rs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:O,disabled:V,children:[q,Q]})}),e[9]=V,e[10]=q,e[11]=P,e[12]=O,e[13]=F):F=e[13];const G=ls,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>b(!1),e[14]=W):W=e[14];const ne=is,he=!1;let Y;e[15]!==p?(Y=s.jsx(as,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=ns,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(x=>s.jsx(Ze,{onSelect:()=>k(x),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(gt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(x.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(Tt,{size:14})})]})},x.id))}),s.jsx(xt,{})]}),Pe=Ye,ge="Available",Ee=A.length===0&&!w&&s.jsx(ss,{children:"No tags found."}),ue=A.filter(x=>!S.includes(x.id)).map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]})},x.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:ge,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(xt,{}),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(ms,{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]!==L||e[40]!==g||e[41]!==F||e[42]!==ee?(te=s.jsxs(L,{open:g,onOpenChange:b,children:[F,ee]}),e[39]=L,e[40]=g,e[41]=F,e[42]=ee,e[43]=te):te=e[43],te}function ys(t){return s.jsx(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ss(t){return t.id}const bt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],Ns={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function ws(t){const e=new Map;for(const[n,l]of Object.entries(Ns))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,bt[n%bt.length]??"bg-neutral-400")}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,g=u===void 0?"xs":u;let b,p,I,M,j,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]!==g){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 L=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]!==L?(P=s.jsx(dt,{children:L}),e[24]=L,e[25]=P):P=e[25];let O;e[26]!==f||e[27]!==g||e[28]!==P?(O=s.jsx(ut,{size:g,className:f,children:P}),e[26]=f,e[27]=g,e[28]=P,e[29]=O):O=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 q;e[35]!==V?(q=s.jsx(pt,{children:V}),e[35]=V,e[36]=q):q=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==O||e[41]!==q?(Q=s.jsx(Vt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[O,q]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=O,e[41]=q,e[42]=Q):Q=e[42];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Qt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=F):F=e[43];let G;e[44]!==Q?(G=s.jsx(Gt,{children:s.jsxs(Ut,{children:[Q,F]})}),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=g,v=f,b=dt,j="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]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else b=e[8],p=e[9],I=e[10],M=e[11],j=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]!==j?(z=s.jsxs("div",{className:j,children:[R,S]}),e[53]=R,e[54]=S,e[55]=j,e[56]=z):z=e[56];let A;e[57]!==b||e[58]!==z?(A=s.jsx(b,{children:z}),e[57]=b,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,g,b,p,I,M,j,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=St;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(_t,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Ts,children:w})}),e[18]=u,e[19]=v):v=e[19],b=wt,j="end",D=_s,g=Jt;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(es,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Ht,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Wt;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:L=>{L.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(Xt,{size:16}):s.jsx(Zt,{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]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v}else f=e[6],g=e[7],b=e[8],p=e[9],I=e[10],M=e[11],j=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]!==g||e[31]!==M||e[32]!==$?(C=s.jsxs(g,{children:[M,$]}),e[30]=g,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Yt,{}),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(ts,{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]!==b||e[42]!==S||e[43]!==j||e[44]!==D||e[45]!==C?(z=s.jsxs(b,{align:j,onClick:D,children:[C,E,S]}),e[41]=b,e[42]=S,e[43]=j,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 _s(t){return t.stopPropagation()}function Ts(t){return t.stopPropagation()}function vt(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(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:As,children:s.jsx(_t,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=g=>{g.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(Tt,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(St,{children:[o,s.jsx(wt,{align:"end",onClick:Is,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 Is(t){return t.stopPropagation()}function As(t){return t.stopPropagation()}function Ms(){const t=U.c(103),{data:e}=Bt(),{data:n}=fs(),l=ps(),i=Qe(),{locator:a}=pe(),o=yt(),[r,u]=re.useState(null),[f,g]=re.useState(null),[b,p]=re.useState(""),[I,M]=re.useState("table"),[j,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==j?(E=m=>{j===m?$(Fs):(D(m),$("asc"))},t[0]=j,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(b){const m=b.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(j&&v){let m;t[2]!==v||t[3]!==j?(m=(d,T)=>{let B,de;e:switch(j){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]=j,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:qs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let L;t[21]!==o?(L=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]=L):L=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 O;t[26]!==L||t[27]!==P?(O={mutationFn:L,onSuccess:P,onError:Os},t[26]=L,t[27]=P,t[28]=O):O=t[28];const V=Me(O),{roles:q,customRoles:Q}=Kt();let F;t[29]!==Q?(F=ws(Q),t[29]=Q,t[30]=F):F=t[30];const G=F;let J;t[31]!==q?(J=q.filter($s),t[31]=q,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:Ds,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:ks,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:Es,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]!==q||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:q,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=q,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 ge;t[48]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(kt,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=ge):ge=t[48];const Ee=ge,ue=[...z.map(Ps),...S.filter(zs).map(Rs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g(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),g(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let x;t[55]!==l.cancel.isPending||t[56]!==te?(x=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]=x):x=t[57];let se;t[58]!==le||t[59]!==x?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:x}),t[58]=le,t[59]=x,t[60]=se):se=t[60];const fe=!!r;let xe;t[61]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>u(null),t[61]=xe):xe=t[61];let Oe;t[62]===Symbol.for("react.memo_cache_sentinel")?(Oe=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]=Oe):Oe=t[62];let qe;t[63]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx(rt,{children:"Cancel"}),t[63]=qe):qe=t[63];let be;t[64]!==r||t[65]!==w?(be=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=be):be=t[66];let je;t[67]!==w.isPending||t[68]!==be?(je=s.jsxs(st,{children:[Oe,s.jsxs(nt,{children:[qe,s.jsx(it,{onClick:be,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=be,t[69]=je):je=t[69];let ve;t[70]!==fe||t[71]!==je?(ve=s.jsx(ct,{open:fe,onOpenChange:xe,children:je}),t[70]=fe,t[71]=je,t[72]=ve):ve=t[72];const Ue=Ae,Je=Ae,At="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(us,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Le;t[75]===Symbol.for("react.memo_cache_sentinel")?(Le=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Le):Le=t[75];let Se;t[76]!==b?(Se=s.jsx(Pt,{value:b,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Le}),t[76]=b,t[77]=Se):Se=t[77];let Fe;t[78]===Symbol.for("react.memo_cache_sentinel")?(Fe=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Fe):Fe=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==j||t[82]!==I?(Ne=s.jsx(zt,{viewMode:I,onViewModeChange:M,sortKey:j,sortDirection:v,onSort:N,sortOptions:Fe}),t[79]=N,t[80]=v,t[81]=j,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:b?`No members match "${b}"`:"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(vt,{invitationId:m.data.id,onCancel:g,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-amber-600 border-amber-400",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:q,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(It,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Et,{columns:Pe,data:ue,isLoading:!1,sortKey:j,sortDirection:v,onSort:N,emptyState:b?s.jsx(We,{title:"No members found",description:`No members match "${b}"`}):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:At,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 Rs(t){return{type:"invitation",data:t}}function zs(t){return t.status==="pending"}function Ps(t){return{type:"member",data:t}}function Es(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 ks(t){return t.type==="member"?s.jsx(It,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Ds(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 $s(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 qs(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 Fs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Bs(){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(Rt,{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(Ms,{})})}),t[1]=n):n=t[1],n}function Jn(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ds,{capability:"members:manage",area:"members",children:s.jsx(Bs,{})}),t[0]=e):e=t[0],e}export{Jn as default};
|
|
1
|
+
import{c as U,j as s,B as ze,C as pe,v as Mt,n as Qe,d as Me,K as ce,t as oe,m as Ct,r as re,l as ke,i as Xe,E as Rt,p as Re}from"./index-W2bGpF1P.js";import{C as zt}from"./collection-display-button-B-BcuXum.js";import{S as Pt}from"./search-input-DIY_JEQm.js";import{P as Ae}from"./index-CmK3-TPk.js";import{C as Et}from"./collection-table-wrapper-A-wLGiWs.js";import{E as We}from"./empty-state-zKWz7J06.js";import{I as kt}from"./invite-member-dialog-CO9y_zRf.js";import{b as Dt,S as $t,a as Ot}from"./settings-section-CTgo_hbF.js";import{u as qt,a as Lt}from"./use-join-requests-Ds5NwsG2.js";import{A as De}from"./avatar-WsbcmL2q.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Bt}from"./use-members-yW8M2qQM.js";import{u as $e}from"./studio-tools-BK49S508.js";import{u as yt}from"./use-org-auth-client-Bra3oAHu.js";import{u as Kt}from"./use-organization-roles-Blof9CZn.js";import{T as Vt,a as Qt,c as Gt,b as Ut}from"./tooltip-BLwI4tF3.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-DFeYw7pS.js";import{B as Ge}from"./badge-CHssn3To.js";import{C as mt}from"./card-Du8bybpP.js";import{D as St,a as Nt,c as wt,e as Jt,f as Ht,g as Wt,d as et,j as Yt}from"./dropdown-menu-awm8LXzl.js";import{i as _t}from"./DotsVertical-CTp3xq3f.js";import{i as Zt}from"./Key01-gNzzvNaH.js";import{i as Xt}from"./Shield01-CAiVeYnH.js";import{a as es}from"./SwitchHorizontal01-COngPqMD.js";import{s as ts}from"./Trash01-wHqD53Ri.js";import{s as Tt}from"./XClose-DkRVhv6F.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-BJnt6jrF.js";import{C as gt}from"./checkbox-B1316slT.js";import{e as Ye,a as Ze,f as xt,C as ss,c as ns,d as is,b as as}from"./command-Ct2XSC2N.js";import{a as ls,b as os,P as rs}from"./popover-DpOK_Gv1.js";import{t as cs}from"./ChevronDown-Dy3pWkd8.js";import{s as ms}from"./Plus-CS-gIx_N.js";import{R as ds}from"./require-capability-Bdo_KZNi.js";import"./ArrowUp-CRp2gZcc.js";import"./Check-DfOcgGYy.js";import"./List-BxXVqbMS.js";import"./view-mode-toggle-CzGdjJnL.js";import"./SearchMd-Bi1fzAnS.js";import"./sidebar-DBU9GQTi.js";import"./LayoutLeft-44rMNm78.js";import"./use-mobile-C3dEkzJn.js";import"./X-CbHFsbX4.js";import"./table-iOEyS7-z.js";import"./dialog-uugioT_S.js";import"./form-D3SpyqUh.js";import"./label-SeMoO7P9.js";import"./textarea-C6EDEyJ3.js";import"./ArrowUpRight-CTdGk_U7.js";import"./use-capability-DOXUJZQ2.js";import"./User01-DgUNDIBy.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-BY42SeOE.js";import"./Circle-CXkLF8Vz.js";import"./ChevronUp-BKo4p_ly.js";import"./index-BGGyvj1T.js";import"./access-gate-ijx7nnmo.js";import"./capability-load-error-3ciLes_0.js";function us(){const t=U.c(9),e=qt(),{approve:n,deny:l}=Lt();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(Dt,{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($t,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx(Ot,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function fs(){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],Mt(a)}function ps(){const t=U.c(10),{locator:e}=pe(),n=yt(),l=Qe();let i;t[0]!==n?(i=async f=>{const g=await n.organization.cancelInvitation({invitationId:f});if(g?.error)throw new Error(g.error.message);return g.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:hs},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 hs(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],Ct(a)}function xs(){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 js(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],Ct(r)}function vs(){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:Cs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function Cs(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function It(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,[g,b]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:j}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=js(n),C=v===void 0?[]:v,E=xs(),N=vs(),R=j||$,S=C.map(Ss);let z;e[0]!==p?(z=x=>x.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=x=>x.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async x=>{const fe=S.includes(x.id)?S.filter(xe=>xe!==x.id):[...S,x.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const x=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,x.id]}),I("")},c=async x=>{const se=S.filter(fe=>fe!==x);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,L=os;let P;e[4]!==g?(P=()=>b(!g),e[4]=g,e[5]=P):P=e[5];let O;e[6]!==l?(O=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=O):O=e[7];const V=r||R,q=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(ys),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(cs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let F;e[9]!==V||e[10]!==q||e[11]!==P||e[12]!==O?(F=s.jsx(rs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:O,disabled:V,children:[q,Q]})}),e[9]=V,e[10]=q,e[11]=P,e[12]=O,e[13]=F):F=e[13];const G=ls,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>b(!1),e[14]=W):W=e[14];const ne=is,he=!1;let Y;e[15]!==p?(Y=s.jsx(as,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=ns,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(x=>s.jsx(Ze,{onSelect:()=>k(x),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(gt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(x.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(Tt,{size:14})})]})},x.id))}),s.jsx(xt,{})]}),Pe=Ye,ge="Available",Ee=A.length===0&&!w&&s.jsx(ss,{children:"No tags found."}),ue=A.filter(x=>!S.includes(x.id)).map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]})},x.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:ge,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(xt,{}),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(ms,{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]!==L||e[40]!==g||e[41]!==F||e[42]!==ee?(te=s.jsxs(L,{open:g,onOpenChange:b,children:[F,ee]}),e[39]=L,e[40]=g,e[41]=F,e[42]=ee,e[43]=te):te=e[43],te}function ys(t){return s.jsx(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ss(t){return t.id}const bt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],Ns={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function ws(t){const e=new Map;for(const[n,l]of Object.entries(Ns))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,bt[n%bt.length]??"bg-neutral-400")}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,g=u===void 0?"xs":u;let b,p,I,M,j,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]!==g){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 L=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]!==L?(P=s.jsx(dt,{children:L}),e[24]=L,e[25]=P):P=e[25];let O;e[26]!==f||e[27]!==g||e[28]!==P?(O=s.jsx(ut,{size:g,className:f,children:P}),e[26]=f,e[27]=g,e[28]=P,e[29]=O):O=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 q;e[35]!==V?(q=s.jsx(pt,{children:V}),e[35]=V,e[36]=q):q=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==O||e[41]!==q?(Q=s.jsx(Vt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[O,q]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=O,e[41]=q,e[42]=Q):Q=e[42];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Qt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=F):F=e[43];let G;e[44]!==Q?(G=s.jsx(Gt,{children:s.jsxs(Ut,{children:[Q,F]})}),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=g,v=f,b=dt,j="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]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else b=e[8],p=e[9],I=e[10],M=e[11],j=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]!==j?(z=s.jsxs("div",{className:j,children:[R,S]}),e[53]=R,e[54]=S,e[55]=j,e[56]=z):z=e[56];let A;e[57]!==b||e[58]!==z?(A=s.jsx(b,{children:z}),e[57]=b,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,g,b,p,I,M,j,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=St;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(_t,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Ts,children:w})}),e[18]=u,e[19]=v):v=e[19],b=wt,j="end",D=_s,g=Jt;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(es,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Ht,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Wt;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:L=>{L.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(Xt,{size:16}):s.jsx(Zt,{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]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v}else f=e[6],g=e[7],b=e[8],p=e[9],I=e[10],M=e[11],j=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]!==g||e[31]!==M||e[32]!==$?(C=s.jsxs(g,{children:[M,$]}),e[30]=g,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Yt,{}),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(ts,{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]!==b||e[42]!==S||e[43]!==j||e[44]!==D||e[45]!==C?(z=s.jsxs(b,{align:j,onClick:D,children:[C,E,S]}),e[41]=b,e[42]=S,e[43]=j,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 _s(t){return t.stopPropagation()}function Ts(t){return t.stopPropagation()}function vt(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(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:As,children:s.jsx(_t,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=g=>{g.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(Tt,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(St,{children:[o,s.jsx(wt,{align:"end",onClick:Is,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 Is(t){return t.stopPropagation()}function As(t){return t.stopPropagation()}function Ms(){const t=U.c(103),{data:e}=Bt(),{data:n}=fs(),l=ps(),i=Qe(),{locator:a}=pe(),o=yt(),[r,u]=re.useState(null),[f,g]=re.useState(null),[b,p]=re.useState(""),[I,M]=re.useState("table"),[j,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==j?(E=m=>{j===m?$(Fs):(D(m),$("asc"))},t[0]=j,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(b){const m=b.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(j&&v){let m;t[2]!==v||t[3]!==j?(m=(d,T)=>{let B,de;e:switch(j){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]=j,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:qs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let L;t[21]!==o?(L=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]=L):L=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 O;t[26]!==L||t[27]!==P?(O={mutationFn:L,onSuccess:P,onError:Os},t[26]=L,t[27]=P,t[28]=O):O=t[28];const V=Me(O),{roles:q,customRoles:Q}=Kt();let F;t[29]!==Q?(F=ws(Q),t[29]=Q,t[30]=F):F=t[30];const G=F;let J;t[31]!==q?(J=q.filter($s),t[31]=q,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:Ds,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:ks,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:Es,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]!==q||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:q,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=q,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 ge;t[48]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(kt,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=ge):ge=t[48];const Ee=ge,ue=[...z.map(Ps),...S.filter(zs).map(Rs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g(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),g(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let x;t[55]!==l.cancel.isPending||t[56]!==te?(x=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]=x):x=t[57];let se;t[58]!==le||t[59]!==x?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:x}),t[58]=le,t[59]=x,t[60]=se):se=t[60];const fe=!!r;let xe;t[61]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>u(null),t[61]=xe):xe=t[61];let Oe;t[62]===Symbol.for("react.memo_cache_sentinel")?(Oe=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]=Oe):Oe=t[62];let qe;t[63]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx(rt,{children:"Cancel"}),t[63]=qe):qe=t[63];let be;t[64]!==r||t[65]!==w?(be=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=be):be=t[66];let je;t[67]!==w.isPending||t[68]!==be?(je=s.jsxs(st,{children:[Oe,s.jsxs(nt,{children:[qe,s.jsx(it,{onClick:be,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=be,t[69]=je):je=t[69];let ve;t[70]!==fe||t[71]!==je?(ve=s.jsx(ct,{open:fe,onOpenChange:xe,children:je}),t[70]=fe,t[71]=je,t[72]=ve):ve=t[72];const Ue=Ae,Je=Ae,At="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(us,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Le;t[75]===Symbol.for("react.memo_cache_sentinel")?(Le=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Le):Le=t[75];let Se;t[76]!==b?(Se=s.jsx(Pt,{value:b,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Le}),t[76]=b,t[77]=Se):Se=t[77];let Fe;t[78]===Symbol.for("react.memo_cache_sentinel")?(Fe=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Fe):Fe=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==j||t[82]!==I?(Ne=s.jsx(zt,{viewMode:I,onViewModeChange:M,sortKey:j,sortDirection:v,onSort:N,sortOptions:Fe}),t[79]=N,t[80]=v,t[81]=j,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:b?`No members match "${b}"`:"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(vt,{invitationId:m.data.id,onCancel:g,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:q,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(It,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Et,{columns:Pe,data:ue,isLoading:!1,sortKey:j,sortDirection:v,onSort:N,emptyState:b?s.jsx(We,{title:"No members found",description:`No members match "${b}"`}):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:At,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 Rs(t){return{type:"invitation",data:t}}function zs(t){return t.status==="pending"}function Ps(t){return{type:"member",data:t}}function Es(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 ks(t){return t.type==="member"?s.jsx(It,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Ds(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 $s(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 qs(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 Fs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Bs(){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(Rt,{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(Ms,{})})}),t[1]=n):n=t[1],n}function Jn(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ds,{capability:"members:manage",area:"members",children:s.jsx(Bs,{})}),t[0]=e):e=t[0],e}export{Jn 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-W2bGpF1P.js";import{l as I,F as L}from"./index-83vO-_Lt.js";import{S as N}from"./chat-context-FtuAOwFp.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-DWDQ6FaX.js → monitoring-stats-row-CwucBnrC.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-W2bGpF1P.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-BiEfXrB3.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{r,j as e,i as n}from"./index-
|
|
1
|
+
import{r,j as e,i as n}from"./index-W2bGpF1P.js";import{h as l}from"./mcp-oauth-CChisjOy.js";import"./auth-CpLB0qsK.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-W2bGpF1P.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 I,j as t,a as re,i as X,r as O,m as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-BPrYxmj0.js";import{R as xe}from"./required-auth-layout-DPJLJBEh.js";import{A as G}from"./auth-split-layout-CKLRIlFs.js";import{O as be}from"./organization-choice-B6a22BtP.js";import{A as me}from"./avatar-BWxcNNYZ.js";import{I as je}from"./input-BtmxD9BG.js";import{L as ye}from"./label-C2yLGsHl.js";import{S as ve}from"./switch-DFRxEmMQ.js";import{t as Ne,a as Se}from"./Users03-BB9aPnNp.js";import{i as we}from"./CheckCircle-uCnOMaNX.js";import{t as ze}from"./Globe04-Dl00LNhM.js";import{a as _e}from"./Palette-CUEfLrEe.js";import{i as Ce}from"./Upload01-CfTeOXY1.js";import"./User01-Dibhogeo.js";const ke=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=I.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=I.c(13),{title:g,description:r,logoUrl:m,logoFallback:o}=i;let a;e[0]!==o||e[1]!==m?(a=t.jsx("div",{children:m?t.jsx(me,{url:m,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]=m,e[2]=a):a=e[2];let l;e[3]!==g?(l=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=l):l=e[4];let n;e[5]!==r?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:r}),e[5]=r,e[6]=n):n=e[6];let f;e[7]!==l||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[l,n]}),e[7]=l,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=I.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{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 r=e?.user?.email??"",m=e?.user?.name;let o;return i[1]!==m||i[2]!==r?(o=t.jsx(Ee,{email:r,userName:m}),i[1]=m,i[2]=r,i[3]=o):o=i[3],o}function Ee(i){const e=I.c(47),{email:g,userName:r}=i;let m,o,a,l,n,f;if(e[0]!==g||e[1]!==r){a=g.split("@")[1]?.toLowerCase()??"",l=!!a&&!ke.has(a);const d=a.split(".")[0]??"";o=d.charAt(0).toUpperCase()+d.slice(1);let u;e[8]!==o||e[9]!==l||e[10]!==r?(u=l?o:r?.split(" ")[0]??"",e[8]=o,e[9]=l,e[10]=r,e[11]=u):u=e[11],m=u,f=ge,n=pe.domainLookup(a),e[0]=g,e[1]=r,e[2]=m,e[3]=o,e[4]=a,e[5]=l,e[6]=n,e[7]=f}else m=e[2],o=e[3],a=e[4],l=e[5],n=e[6],f=e[7];let s;e[12]!==l||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:l},e[12]=l,e[13]=n,e[14]=s):s=e[14];const{data:y,isLoading:c}=f(s);let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[15]=v):v=e[15];const[p,B]=O.useState(v),[E,z]=O.useState(!1);if(c){let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=d):d=e[16];let u;return e[17]!==a?(u=t.jsx(G,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[d,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=u):u=e[18],u}let j,S;e[19]!==y?.organizations?(j=(y?.organizations??[]).flatMap(Pe),S=j.some(Ae),e[19]=y?.organizations,e[20]=j,e[21]=S):(j=e[20],S=e[21]);const L=S;if(E){let d;e[22]!==r?(d=r?.split(" ")[0]??"",e[22]=r,e[23]=d):d=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=()=>z(!1),e[24]=u):u=e[24];let h;return e[25]!==o||e[26]!==a||e[27]!==l||e[28]!==d?(h=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:d,allowDomainClaim:!1,onBack:u}),e[25]=o,e[26]=a,e[27]=l,e[28]=d,e[29]=h):h=e[29],h}if(j.length>0){const d=L?j.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",u=L?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[30]!==d||e[31]!==u?(h=t.jsx(ie,{title:d,description:u}),e[30]=d,e[31]=u,e[32]=h):h=e[32];let C;e[33]===Symbol.for("react.memo_cache_sentinel")?(C=Y=>B(A=>new Set(A).add(Y)),e[33]=C):C=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:C,onJoined:Le}),e[34]=j,e[35]=a,e[36]=p,e[37]=w):w=e[37];let _;e[38]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>z(!0),children:"Create a new organization instead"}),e[38]=_):_=e[38];let k;return e[39]!==w||e[40]!==h?(k=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=k):k=e[41],k}let b;return e[42]!==m||e[43]!==o||e[44]!==a||e[45]!==l?(b=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:m}),e[42]=m,e[43]=o,e[44]=a,e[45]=l,e[46]=b):b=e[46],b}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(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function ne(i){const e=I.c(70),{isCorporateEmail:g,emailDomain:r,domainLabel:m,defaultName:o,allowDomainClaim:a,onBack:l}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${r}&sz=128`:null,[s,y]=O.useState(o),[c,v]=O.useState(f),[p,B]=O.useState(!0),[E,z]=O.useState(null);let j;e[0]!==p||e[1]!==c||e[2]!==s?(j=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:c??void 0,claimDomain:p})}),N=await x.json();if(!x.ok||!N.success)throw new Error(N.error||"Failed to set up organization");return N},e[0]=p,e[1]=c,e[2]=s,e[3]=j):j=e[3];let S;e[4]!==p?(S=x=>{if(!x.slug)return;const N=de.filter(fe=>p||!fe.claimOnly).length,J=ue*(N-1)+800;z(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},J)},e[4]=p,e[5]=S):S=e[5];let L;e[6]!==j||e[7]!==S?(L={mutationFn:j,onSuccess:S},e[6]=j,e[7]=S,e[8]=L):L=e[8];const b=oe(L);let d;e[9]!==c||e[10]!==s?(d={mutationFn:async()=>{const x=s.trim(),N=se(x);if(!N)throw new Error("Invalid organization name");const J=await re.organization.create({name:x,slug:N,...c?{logo:c}:{}});if(J?.error)throw new Error(J.error.message||"Failed to create organization");window.location.href=`/${J?.data?.slug??N}`}},e[9]=c,e[10]=s,e[11]=d):d=e[11];const u=oe(d);if(b.isPending||E){let x;e[12]!==m||e[13]!==s?(x=s.trim()||m,e[12]=m,e[13]=s,e[14]=x):x=e[14];let N;return e[15]!==p||e[16]!==r||e[17]!==c||e[18]!==x?(N=t.jsx(G,{children:t.jsx(Fe,{orgName:x,domain:r,claimDomain:p,logoUrl:c})}),e[15]=p,e[16]=r,e[17]=c,e[18]=x,e[19]=N):N=e[19],N}const h=u.isPending;let C;e[20]!==s?(C=se(s.trim()),e[20]=s,e[21]=C):C=e[21];const w=!!C,_=b.error||u.error||null;let k;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(k=x=>{x.preventDefault(),w&&(g&&n?b.mutate():u.mutate())},e[22]=n,e[23]=w,e[24]=u,e[25]=b,e[26]=g,e[27]=k):k=e[27];const Y=k;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=A):A=e[28];let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=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]=W):W=e[29];let P;e[30]!==o||e[31]!==s?(P=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=P):P=e[32];const Z=h||b.isPending;let R;e[33]!==c||e[34]!==P||e[35]!==Z?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[W,t.jsx($e,{value:c,fallback:P,onChange:v,disabled:Z})]}),e[33]=c,e[34]=P,e[35]=Z,e[36]=R):R=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=>y(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=h||b.isPending;let $;e[39]!==s||e[40]!==ee||e[41]!==te?($=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]=$):$=e[42];let D;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==r||e[47]!==g||e[48]!==h?(D=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 @",r," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",r," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:B,disabled:h||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=r,e[47]=g,e[48]=h,e[49]=D):D=e[49];let F;e[50]!==R||e[51]!==$||e[52]!==D?(F=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,$,D]}),e[50]=R,e[51]=$,e[52]=D,e[53]=F):F=e[53];let M;e[54]!==_?(M=_&&t.jsx("p",{className:"text-xs text-destructive",children:_ instanceof Error?_.message:"Failed to create organization"}),e[54]=_,e[55]=M):M=e[55];const ae=!w||h||b.isPending;let q;e[56]!==b.isPending||e[57]!==h?(q=h||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]=h,e[58]=q):q=e[58];let U;e[59]!==ae||e[60]!==q?(U=t.jsx(he,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:q}),e[59]=ae,e[60]=q,e[61]=U):U=e[61];let T;e[62]!==l?(T=l&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:l,children:"See available organizations"}),e[62]=l,e[63]=T):T=e[63];let V;return e[64]!==Y||e[65]!==F||e[66]!==M||e[67]!==U||e[68]!==T?(V=t.jsx(G,{children:t.jsxs("form",{onSubmit:Y,className:"grid gap-10",children:[A,F,M,U,T]})}),e[64]=Y,e[65]=F,e[66]=M,e[67]=U,e[68]=T,e[69]=V):V=e[69],V}function $e(i){const e=I.c(14),{value:g,fallback:r,onChange:m,disabled:o}=i,a=O.useRef(null);let l;e[0]!==m?(l=B=>{const E=B.target.files?.[0];if(!E)return;if(E.size>2097152){ce.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const z=new FileReader;z.onerror=De,z.onloadend=()=>{z.result&&m(z.result),a.current&&(a.current.value="")},z.readAsDataURL(E)},e[0]=m,e[1]=l):l=e[1];const n=l;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 y=g??void 0;let c;e[6]!==r||e[7]!==y?(c=t.jsx(me,{url:y,fallback:r,shape:"square",size:"base"}),e[6]=r,e[7]=y,e[8]=c):c=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=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]=v):v=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==c?(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,c,v]}),e[10]=o,e[11]=s,e[12]=c,e[13]=p):p=e[13],p}function De(){return ce.error("Failed to read image")}const de=[{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:_e,label:"Extracting brand context",claimOnly:!1}],ue=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:r}){const m=de.filter(n=>g||!n.claimOnly),[o,a]=O.useState(0),l=O.useRef(!1);if(!l.current){l.current=!0;for(let n=1;n<m.length;n++)setTimeout(()=>a(n),ue*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:r??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:m.map((n,f)=>{const s=n.icon,y=f===o,c=f<o,v=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:c||y?1:.4},children:[t.jsxs("span",{className:K("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!c&&(y?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:c?{backgroundColor:v.bg,color:v.fg}:void 0,children:[t.jsx(we,{size:16,className:K("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",c?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:K("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",y?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:K("absolute motion-safe:transition-opacity motion-safe:duration-200",!c&&!y?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:K("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",y||c?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|
|
1
|
+
import{c as I,j as t,a as re,i as X,r as O,m as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-W2bGpF1P.js";import{R as xe}from"./required-auth-layout-BnH4wru7.js";import{A as G}from"./auth-split-layout-CceIE6gi.js";import{O as be}from"./organization-choice-DN9z99do.js";import{A as me}from"./avatar-WsbcmL2q.js";import{I as je}from"./input-TTUiKHLQ.js";import{L as ye}from"./label-SeMoO7P9.js";import{S as ve}from"./switch-em55FZ0s.js";import{t as Ne,a as Se}from"./Users03-I2Zl4gPZ.js";import{i as we}from"./CheckCircle-CJyl3nb8.js";import{t as ze}from"./Globe04-U0_hML-7.js";import{a as _e}from"./Palette-BCjrMSpk.js";import{i as Ce}from"./Upload01-BBaK_ImV.js";import"./User01-DgUNDIBy.js";const ke=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=I.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=I.c(13),{title:g,description:r,logoUrl:m,logoFallback:o}=i;let a;e[0]!==o||e[1]!==m?(a=t.jsx("div",{children:m?t.jsx(me,{url:m,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]=m,e[2]=a):a=e[2];let l;e[3]!==g?(l=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=l):l=e[4];let n;e[5]!==r?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:r}),e[5]=r,e[6]=n):n=e[6];let f;e[7]!==l||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[l,n]}),e[7]=l,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=I.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{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 r=e?.user?.email??"",m=e?.user?.name;let o;return i[1]!==m||i[2]!==r?(o=t.jsx(Ee,{email:r,userName:m}),i[1]=m,i[2]=r,i[3]=o):o=i[3],o}function Ee(i){const e=I.c(47),{email:g,userName:r}=i;let m,o,a,l,n,f;if(e[0]!==g||e[1]!==r){a=g.split("@")[1]?.toLowerCase()??"",l=!!a&&!ke.has(a);const d=a.split(".")[0]??"";o=d.charAt(0).toUpperCase()+d.slice(1);let u;e[8]!==o||e[9]!==l||e[10]!==r?(u=l?o:r?.split(" ")[0]??"",e[8]=o,e[9]=l,e[10]=r,e[11]=u):u=e[11],m=u,f=ge,n=pe.domainLookup(a),e[0]=g,e[1]=r,e[2]=m,e[3]=o,e[4]=a,e[5]=l,e[6]=n,e[7]=f}else m=e[2],o=e[3],a=e[4],l=e[5],n=e[6],f=e[7];let s;e[12]!==l||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:l},e[12]=l,e[13]=n,e[14]=s):s=e[14];const{data:y,isLoading:c}=f(s);let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[15]=v):v=e[15];const[p,B]=O.useState(v),[E,z]=O.useState(!1);if(c){let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=d):d=e[16];let u;return e[17]!==a?(u=t.jsx(G,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[d,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=u):u=e[18],u}let j,S;e[19]!==y?.organizations?(j=(y?.organizations??[]).flatMap(Pe),S=j.some(Ae),e[19]=y?.organizations,e[20]=j,e[21]=S):(j=e[20],S=e[21]);const L=S;if(E){let d;e[22]!==r?(d=r?.split(" ")[0]??"",e[22]=r,e[23]=d):d=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=()=>z(!1),e[24]=u):u=e[24];let h;return e[25]!==o||e[26]!==a||e[27]!==l||e[28]!==d?(h=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:d,allowDomainClaim:!1,onBack:u}),e[25]=o,e[26]=a,e[27]=l,e[28]=d,e[29]=h):h=e[29],h}if(j.length>0){const d=L?j.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",u=L?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[30]!==d||e[31]!==u?(h=t.jsx(ie,{title:d,description:u}),e[30]=d,e[31]=u,e[32]=h):h=e[32];let C;e[33]===Symbol.for("react.memo_cache_sentinel")?(C=Y=>B(A=>new Set(A).add(Y)),e[33]=C):C=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:C,onJoined:Le}),e[34]=j,e[35]=a,e[36]=p,e[37]=w):w=e[37];let _;e[38]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>z(!0),children:"Create a new organization instead"}),e[38]=_):_=e[38];let k;return e[39]!==w||e[40]!==h?(k=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=k):k=e[41],k}let b;return e[42]!==m||e[43]!==o||e[44]!==a||e[45]!==l?(b=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:m}),e[42]=m,e[43]=o,e[44]=a,e[45]=l,e[46]=b):b=e[46],b}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(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function ne(i){const e=I.c(70),{isCorporateEmail:g,emailDomain:r,domainLabel:m,defaultName:o,allowDomainClaim:a,onBack:l}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${r}&sz=128`:null,[s,y]=O.useState(o),[c,v]=O.useState(f),[p,B]=O.useState(!0),[E,z]=O.useState(null);let j;e[0]!==p||e[1]!==c||e[2]!==s?(j=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:c??void 0,claimDomain:p})}),N=await x.json();if(!x.ok||!N.success)throw new Error(N.error||"Failed to set up organization");return N},e[0]=p,e[1]=c,e[2]=s,e[3]=j):j=e[3];let S;e[4]!==p?(S=x=>{if(!x.slug)return;const N=de.filter(fe=>p||!fe.claimOnly).length,J=ue*(N-1)+800;z(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},J)},e[4]=p,e[5]=S):S=e[5];let L;e[6]!==j||e[7]!==S?(L={mutationFn:j,onSuccess:S},e[6]=j,e[7]=S,e[8]=L):L=e[8];const b=oe(L);let d;e[9]!==c||e[10]!==s?(d={mutationFn:async()=>{const x=s.trim(),N=se(x);if(!N)throw new Error("Invalid organization name");const J=await re.organization.create({name:x,slug:N,...c?{logo:c}:{}});if(J?.error)throw new Error(J.error.message||"Failed to create organization");window.location.href=`/${J?.data?.slug??N}`}},e[9]=c,e[10]=s,e[11]=d):d=e[11];const u=oe(d);if(b.isPending||E){let x;e[12]!==m||e[13]!==s?(x=s.trim()||m,e[12]=m,e[13]=s,e[14]=x):x=e[14];let N;return e[15]!==p||e[16]!==r||e[17]!==c||e[18]!==x?(N=t.jsx(G,{children:t.jsx(Fe,{orgName:x,domain:r,claimDomain:p,logoUrl:c})}),e[15]=p,e[16]=r,e[17]=c,e[18]=x,e[19]=N):N=e[19],N}const h=u.isPending;let C;e[20]!==s?(C=se(s.trim()),e[20]=s,e[21]=C):C=e[21];const w=!!C,_=b.error||u.error||null;let k;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(k=x=>{x.preventDefault(),w&&(g&&n?b.mutate():u.mutate())},e[22]=n,e[23]=w,e[24]=u,e[25]=b,e[26]=g,e[27]=k):k=e[27];const Y=k;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=A):A=e[28];let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=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]=W):W=e[29];let P;e[30]!==o||e[31]!==s?(P=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=P):P=e[32];const Z=h||b.isPending;let R;e[33]!==c||e[34]!==P||e[35]!==Z?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[W,t.jsx($e,{value:c,fallback:P,onChange:v,disabled:Z})]}),e[33]=c,e[34]=P,e[35]=Z,e[36]=R):R=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=>y(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=h||b.isPending;let $;e[39]!==s||e[40]!==ee||e[41]!==te?($=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]=$):$=e[42];let D;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==r||e[47]!==g||e[48]!==h?(D=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 @",r," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",r," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:B,disabled:h||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=r,e[47]=g,e[48]=h,e[49]=D):D=e[49];let F;e[50]!==R||e[51]!==$||e[52]!==D?(F=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,$,D]}),e[50]=R,e[51]=$,e[52]=D,e[53]=F):F=e[53];let M;e[54]!==_?(M=_&&t.jsx("p",{className:"text-xs text-destructive",children:_ instanceof Error?_.message:"Failed to create organization"}),e[54]=_,e[55]=M):M=e[55];const ae=!w||h||b.isPending;let q;e[56]!==b.isPending||e[57]!==h?(q=h||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]=h,e[58]=q):q=e[58];let U;e[59]!==ae||e[60]!==q?(U=t.jsx(he,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:q}),e[59]=ae,e[60]=q,e[61]=U):U=e[61];let T;e[62]!==l?(T=l&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:l,children:"See available organizations"}),e[62]=l,e[63]=T):T=e[63];let V;return e[64]!==Y||e[65]!==F||e[66]!==M||e[67]!==U||e[68]!==T?(V=t.jsx(G,{children:t.jsxs("form",{onSubmit:Y,className:"grid gap-10",children:[A,F,M,U,T]})}),e[64]=Y,e[65]=F,e[66]=M,e[67]=U,e[68]=T,e[69]=V):V=e[69],V}function $e(i){const e=I.c(14),{value:g,fallback:r,onChange:m,disabled:o}=i,a=O.useRef(null);let l;e[0]!==m?(l=B=>{const E=B.target.files?.[0];if(!E)return;if(E.size>2097152){ce.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const z=new FileReader;z.onerror=De,z.onloadend=()=>{z.result&&m(z.result),a.current&&(a.current.value="")},z.readAsDataURL(E)},e[0]=m,e[1]=l):l=e[1];const n=l;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 y=g??void 0;let c;e[6]!==r||e[7]!==y?(c=t.jsx(me,{url:y,fallback:r,shape:"square",size:"base"}),e[6]=r,e[7]=y,e[8]=c):c=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=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]=v):v=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==c?(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,c,v]}),e[10]=o,e[11]=s,e[12]=c,e[13]=p):p=e[13],p}function De(){return ce.error("Failed to read image")}const de=[{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:_e,label:"Extracting brand context",claimOnly:!1}],ue=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:r}){const m=de.filter(n=>g||!n.claimOnly),[o,a]=O.useState(0),l=O.useRef(!1);if(!l.current){l.current=!0;for(let n=1;n<m.length;n++)setTimeout(()=>a(n),ue*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:r??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:m.map((n,f)=>{const s=n.icon,y=f===o,c=f<o,v=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:c||y?1:.4},children:[t.jsxs("span",{className:K("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!c&&(y?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:c?{backgroundColor:v.bg,color:v.fg}:void 0,children:[t.jsx(we,{size:16,className:K("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",c?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:K("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",y?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:K("absolute motion-safe:transition-opacity motion-safe:duration-200",!c&&!y?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:K("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",y||c?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|