decocms 4.288.0 → 4.288.1
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-BMR28DhI.js → AlertCircle-CKu7rmZX.js} +1 -1
- package/dist/client/assets/{AreaChart-CFuHNkgo.js → AreaChart-Dn_40JcY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cx79RC0X.js → ArrowLeft-DDNvps6v.js} +1 -1
- package/dist/client/assets/{ArrowUp-DrKUKFNk.js → ArrowUp-YS7GP0iu.js} +1 -1
- package/dist/client/assets/{Check-BBxuvI_9.js → Check-CL6ebCfa.js} +1 -1
- package/dist/client/assets/{CheckCircle-G2Fd8xWg.js → CheckCircle-DJ846ZMO.js} +1 -1
- package/dist/client/assets/{ChevronDown-BJN3W9Sh.js → ChevronDown-l75044nb.js} +1 -1
- package/dist/client/assets/{ChevronRight-C38kGvxd.js → ChevronRight-CR3Q1H21.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cl3XRu54.js → ChevronSelectorVertical-B6IPuZDr.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dy0ufKDy.js → ChevronUp-DEAzOQPQ.js} +1 -1
- package/dist/client/assets/{Circle-CG_w7vfz.js → Circle-D62eqZQf.js} +1 -1
- package/dist/client/assets/{Copy01-NdgC0tMp.js → Copy01-Cxf_1PnK.js} +1 -1
- package/dist/client/assets/{CreditCard01-CMuo-q9l.js → CreditCard01-DBh9qZf5.js} +1 -1
- package/dist/client/assets/{DotsVertical-BE8b1vSO.js → DotsVertical-BT_U-x52.js} +1 -1
- package/dist/client/assets/{Download01-sWgIRR3y.js → Download01-DEBgX1Vz.js} +1 -1
- package/dist/client/assets/{Eye-Cwfj0X1t.js → Eye-BrD5V0CN.js} +1 -1
- package/dist/client/assets/{FilterLines-DV2sFbYz.js → FilterLines-CePwcX86.js} +1 -1
- package/dist/client/assets/{Flag01-Dar8g-a5.js → Flag01-ce6Hx6Sd.js} +1 -1
- package/dist/client/assets/{Globe01-GDZxOG4-.js → Globe01-Dudxmov2.js} +1 -1
- package/dist/client/assets/{Globe04-CShMEsQ3.js → Globe04-DtgB6D89.js} +1 -1
- package/dist/client/assets/{HardDrive-BZzMYlWU.js → HardDrive-ot3a-Nzo.js} +1 -1
- package/dist/client/assets/{Key01-DVO_Y8wK.js → Key01-CsQEsjC9.js} +1 -1
- package/dist/client/assets/{LinkExternal01-De0pVRwg.js → LinkExternal01-BMIZ5tUs.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-eAVx0FNq.js → LockUnlocked01-CV-wm-DI.js} +1 -1
- package/dist/client/assets/{LogOut01-BgADnfEe.js → LogOut01-BRN-e96O.js} +1 -1
- package/dist/client/assets/{Monitor01-B7GZSrKA.js → Monitor01-BcVrphiW.js} +1 -1
- package/dist/client/assets/{Palette-D9xv93RD.js → Palette-CE96jZVd.js} +1 -1
- package/dist/client/assets/{Play-DU5U6W3O.js → Play-CS8MeC3I.js} +1 -1
- package/dist/client/assets/{Plus-DVig7kjO.js → Plus-CroEHl-V.js} +1 -1
- package/dist/client/assets/{SearchLg-BizYXwwj.js → SearchLg-CVqx93Y_.js} +1 -1
- package/dist/client/assets/{SearchMd-D2P_M_eM.js → SearchMd-B1mFsJUG.js} +1 -1
- package/dist/client/assets/{Settings02-zcgW9zvM.js → Settings02-By6ST3EB.js} +1 -1
- package/dist/client/assets/{Share07-Ck9NROvP.js → Share07-DY_FaN6b.js} +1 -1
- package/dist/client/assets/{Shield01-DSc32g_4.js → Shield01-C2DSkqtR.js} +1 -1
- package/dist/client/assets/{Stars01-JIm15VhT.js → Stars01-6-4BZRs0.js} +1 -1
- package/dist/client/assets/{Stars02-DeEJhQu_.js → Stars02-Bn0UVscJ.js} +1 -1
- package/dist/client/assets/{Sun-DUBODnAJ.js → Sun-DYOiR6u2.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CPK_-5Wf.js → SwitchHorizontal01-BHNzjJNL.js} +1 -1
- package/dist/client/assets/{Tag01-C5H_HSv_.js → Tag01-i8fexBmt.js} +1 -1
- package/dist/client/assets/{ThumbsUp-DI3WuXha.js → ThumbsUp-C7UuQfpb.js} +1 -1
- package/dist/client/assets/{Tool01-CZCPcxLc.js → Tool01-DY1usWj5.js} +1 -1
- package/dist/client/assets/{Tool02-Ct-zQpWK.js → Tool02-DWppGdVf.js} +1 -1
- package/dist/client/assets/{Trash01-D2YtOZ2m.js → Trash01-DHruTUXA.js} +1 -1
- package/dist/client/assets/{TrendUp01-CEly_omr.js → TrendUp01-CGJ2AZa0.js} +1 -1
- package/dist/client/assets/{Upload01-B_DH6cS5.js → Upload01-DRWaG5l9.js} +1 -1
- package/dist/client/assets/{User01-DfRq2LOk.js → User01-DoHHiReT.js} +1 -1
- package/dist/client/assets/{UserSquare-DjD8sNag.js → UserSquare-mEZg6QDw.js} +1 -1
- package/dist/client/assets/{Users01-XMO8kMmJ.js → Users01-B8XWYCw5.js} +1 -1
- package/dist/client/assets/{Users03-CPCauxiP.js → Users03-BaRNWusq.js} +1 -1
- package/dist/client/assets/{XCircle-DfRhbX5A.js → XCircle-BjqVtcre.js} +1 -1
- package/dist/client/assets/{XClose-BQr7cdvX.js → XClose-DYg8Y0jz.js} +1 -1
- package/dist/client/assets/{YAxis-DZV0ZS--.js → YAxis-Boo9yhf_.js} +1 -1
- package/dist/client/assets/{Zap-D7KfLj7b.js → Zap-hw3tSe7n.js} +1 -1
- package/dist/client/assets/{ZapSquare-CKe-D0nj.js → ZapSquare-DOAULR1K.js} +1 -1
- package/dist/client/assets/{access-gate-BQ7q7LTI.js → access-gate-BatKatsk.js} +1 -1
- package/dist/client/assets/{agent-icon-DaK2y4rn.js → agent-icon-BcyWOSOE.js} +1 -1
- package/dist/client/assets/{agents-list-QdSeq6EZ.js → agents-list-DFVvhDls.js} +1 -1
- package/dist/client/assets/{ai-providers-B_bdiFZW.js → ai-providers-C4rWGvyH.js} +1 -1
- package/dist/client/assets/{alert-BX0Kdq-E.js → alert-DazqiOtI.js} +1 -1
- package/dist/client/assets/{alert-dialog-Cv-jGdEr.js → alert-dialog-BE43dtd2.js} +1 -1
- package/dist/client/assets/{api-keys-DhfmqX_G.js → api-keys-DtIgbMBy.js} +1 -1
- package/dist/client/assets/{app-editor-BOsUO3Ur.js → app-editor-QXu8uAC1.js} +1 -1
- package/dist/client/assets/{auth-catchall-T9J68GdO.js → auth-catchall-C_QRalUf.js} +1 -1
- package/dist/client/assets/{auth-entry-Bgcu5NQF.js → auth-entry-X9YULYEP.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CsEGSaR7.js → auth-split-layout-CER4BgkB.js} +1 -1
- package/dist/client/assets/{auth-Cx4wOC-p.js → auth-thjU26aE.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B6I8t-sq.js → authenticate-and-persist-oauth-BqQ8VoH9.js} +1 -1
- package/dist/client/assets/{automation-list-row-SKWLyUHv.js → automation-list-row-CXYo5AFd.js} +1 -1
- package/dist/client/assets/{automation-runs-DMyzVmIr.js → automation-runs-DrI_PUVf.js} +74 -74
- package/dist/client/assets/{automations-CMzUTVR0.js → automations-CCScLpvf.js} +1 -1
- package/dist/client/assets/{avatar-CfhIc7rM.js → avatar-Baa-d9gN.js} +1 -1
- package/dist/client/assets/{badge-BH4yac20.js → badge-DaTevZ40.js} +1 -1
- package/dist/client/assets/{block-document-CrfAh81C.js → block-document-1G4TpKRx.js} +1 -1
- package/dist/client/assets/{breadcrumb-BMYNzhXF.js → breadcrumb-BAQAr8-p.js} +1 -1
- package/dist/client/assets/{buckets-CQ8I9gj9.js → buckets-DWnjZaBQ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CcSnXWKc.js → bulk-category-panel-SfhBe-m4.js} +1 -1
- package/dist/client/assets/{capability-load-error-ChOg48Yv.js → capability-load-error-C65vdzuW.js} +1 -1
- package/dist/client/assets/{cards-BI30rYwr.js → cards-D8ORAqB9.js} +1 -1
- package/dist/client/assets/{category-editor-DfXBwcZU.js → category-editor-D3cBwen5.js} +1 -1
- package/dist/client/assets/{chart-dbHddM19.js → chart-BldhBGoU.js} +1 -1
- package/dist/client/assets/{chat-context-C5ygSrXi.js → chat-context-BDGNuHNR.js} +1 -1
- package/dist/client/assets/{checkbox-CHYWUr__.js → checkbox-BPiioo8F.js} +1 -1
- package/dist/client/assets/{choose-editor-Ci6AnRjU.js → choose-editor-DGFPC3Yh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cvsnpxf9.js → cli-auth-success-Bj7KK1ke.js} +1 -1
- package/dist/client/assets/{collection-detail-ZfdRUaUS.js → collection-detail-CEm1yeP4.js} +1 -1
- package/dist/client/assets/{collection-display-button-BOn9H-qW.js → collection-display-button-D2orbmRN.js} +1 -1
- package/dist/client/assets/{collection-search-CpWofIrI.js → collection-search-9SeZBqqM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-zRp4UyJ8.js → collection-table-wrapper-DKE4dh5k.js} +1 -1
- package/dist/client/assets/{collection-tabs-CxApWZ3A.js → collection-tabs-CPzc34Qk.js} +1 -1
- package/dist/client/assets/{command-BhfSALae.js → command-zlhMx9IK.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BCBE_1GA.js → commerce-onboarding-CCfunGQE.js} +1 -1
- package/dist/client/assets/{config-BTFp6YAN.js → config-BlYsX2Rz.js} +1 -1
- package/dist/client/assets/{connect-0e9zaPDN.js → connect-coP9n7Zr.js} +1 -1
- package/dist/client/assets/{connection-DZmNkvbI.js → connection-CSyySDdu.js} +1 -1
- package/dist/client/assets/{connection-card-nla2Pp8O.js → connection-card-DfH45sFu.js} +1 -1
- package/dist/client/assets/{connection-detail-Rvg960sW.js → connection-detail-qjYNFpYJ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-8DhsKJkT.js → connection-form-helpers-DLhQCdyV.js} +1 -1
- package/dist/client/assets/{connections-D7hTcn8F.js → connections-DpKSA8LZ.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-jb4FyQ2Z.js → decopilot-sse-pool-BnQ-KPvR.js} +1 -1
- package/dist/client/assets/{dialog-BcsLE0vq.js → dialog-B6sc6uug.js} +1 -1
- package/dist/client/assets/{domain-settings-CP7nwTKl.js → domain-settings-CT6xWjdc.js} +1 -1
- package/dist/client/assets/{drawer-DICGlyMS.js → drawer--puFaS4-.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Clfat4l0.js → dropdown-menu-CsFaZsN1.js} +1 -1
- package/dist/client/assets/{empty-state-C-r24EXR.js → empty-state-CDWbCKiN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-aGTalbsT.js → extract-connection-data-BzlqmVgL.js} +1 -1
- package/dist/client/assets/{file-explorer-qv6c0s27.js → file-explorer-B1XSBqVg.js} +1 -1
- package/dist/client/assets/{file-type-icon-B6WReaPL.js → file-type-icon-BDbKoZhS.js} +1 -1
- package/dist/client/assets/{form-DbkqY3Pb.js → form-BPo1UTrE.js} +1 -1
- package/dist/client/assets/{general-Fw4wYs-y.js → general-yJhnFst-.js} +1 -1
- package/dist/client/assets/{github-icon-DA75YzLM.js → github-icon-CMLnVUWU.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BMpeSUhf.js → github-repo-picker-Ndprxq7w.js} +1 -1
- package/dist/client/assets/{hooks-D4xLDs6T.js → hooks-2fGeLPS1.js} +1 -1
- package/dist/client/assets/index-BVar3Gid.js +1 -0
- package/dist/client/assets/{index-CQEcN2Kg.js → index-BVuVsTD0.js} +1 -1
- package/dist/client/assets/{index-D7JDPzRl.js → index-BviMzbMY.js} +1 -1
- package/dist/client/assets/{index-COKWG0tU.js → index-CWxBJ8hK.js} +1 -1
- package/dist/client/assets/{index-CUrzbP3I.js → index-CxvOFEwI.js} +1 -1
- package/dist/client/assets/{index-CFQ5AKDg.js → index-Dlx65OrW.js} +5 -5
- package/dist/client/assets/{index-BehL1Ui6.js → index-Dwr4Nhsh.js} +5 -5
- package/dist/client/assets/{index-DoqKrQHW.js → index-Dx5FhPzS.js} +1 -1
- package/dist/client/assets/{index-Chck3zm-.js → index-HHSYMOOI.js} +1 -1
- package/dist/client/assets/{index-redirect-DCvRSMkE.js → index-redirect-CgGgZQK1.js} +1 -1
- package/dist/client/assets/{index-CMOQO6cz.js → index-wUSYKwsO.js} +1 -1
- package/dist/client/assets/{infra-billing-BSWL2J24.js → infra-billing-G63BpVpE.js} +1 -1
- package/dist/client/assets/{input-WCHZ4FBH.js → input-BEfJnYXv.js} +1 -1
- package/dist/client/assets/{integration-icon-Bmx5TPf-.js → integration-icon-B5IEO10M.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DujILoP3.js → invite-member-dialog-CKYzs1sf.js} +1 -1
- package/dist/client/assets/{label-DFoRWBpY.js → label-CpgYdDkV.js} +1 -1
- package/dist/client/assets/{layout-Bl0I0D_c.js → layout-DnFzD3VW.js} +1 -1
- package/dist/client/assets/{login-7BrdFfP0.js → login-BBOmoYTp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DQHfy9-4.js → mcp-oauth-BOPNzBqf.js} +1 -1
- package/dist/client/assets/{members-By6DlHRq.js → members-CUfybT1X.js} +1 -1
- package/dist/client/assets/{monaco-editor-sJQ0dZlL.js → monaco-editor-DAeNum_I.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CpqD89P4.js → monitoring-stats-row-CF1UYCrI.js} +1 -1
- package/dist/client/assets/{multi-select-D39lDDSR.js → multi-select-DP0Raoeg.js} +1 -1
- package/dist/client/assets/{oauth-callback-Zzzo4GfS.js → oauth-callback-Bl25_89P.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-8eulgf5Z.js → oauth-callback-ai-provider-C9nnxqLm.js} +1 -1
- package/dist/client/assets/{onboarding-CFwE1X5t.js → onboarding-CclKqF21.js} +1 -1
- package/dist/client/assets/{org-layout-91phX5u0.js → org-layout-DHY2KE8V.js} +1 -1
- package/dist/client/assets/{organization-choice-BwjLnnK1.js → organization-choice-C2Di8FHy.js} +1 -1
- package/dist/client/assets/{orgs-D0Qd0KI6.js → orgs-CR8JDCF4.js} +1 -1
- package/dist/client/assets/{page-seo-form-D09NDw2E.js → page-seo-form-DkksaAFx.js} +1 -1
- package/dist/client/assets/{popover-fQtREfKl.js → popover-JEDDUTGf.js} +1 -1
- package/dist/client/assets/{post-calendar-CJrQBYZy.js → post-calendar-BKlMKo26.js} +1 -1
- package/dist/client/assets/{post-editor-DiODLDuV.js → post-editor-D5Sg5eKA.js} +1 -1
- package/dist/client/assets/{primitives-1NqTSHxL.js → primitives-Ycko-_eQ.js} +1 -1
- package/dist/client/assets/{profile-BZlzRQc4.js → profile-DTNHrv9F.js} +1 -1
- package/dist/client/assets/{project-app-view-D3IHmd4x.js → project-app-view-DQ22klm2.js} +1 -1
- package/dist/client/assets/{prompts-ClBdnvS8.js → prompts-CcuahoVB.js} +1 -1
- package/dist/client/assets/record-editor-D42nUm5M.js +1 -0
- package/dist/client/assets/redirect-editor-JEpwz0ky.js +1 -0
- package/dist/client/assets/registry-C58ofKwJ.js +2 -0
- package/dist/client/assets/{registry-layout-DU9Ogkqk.js → registry-layout-DAqPcvhc.js} +1 -1
- package/dist/client/assets/{reports-DhpVhcqw.js → reports-CPYi5hPr.js} +1 -1
- package/dist/client/assets/{require-capability-3RMt2pVR.js → require-capability-Dt6UZIEx.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BcLMPph9.js → required-auth-layout-DOvWb2NB.js} +1 -1
- package/dist/client/assets/{reset-password-vf7t6jKp.js → reset-password-Zhs37k2U.js} +1 -1
- package/dist/client/assets/{review-settings-WJyEuOix.js → review-settings-c5W-t1YC.js} +1 -1
- package/dist/client/assets/{roles-DoEA3oYX.js → roles-k3QDVkwP.js} +1 -1
- package/dist/client/assets/{scroll-area-ZnuMhKZl.js → scroll-area-DlRbnTs4.js} +1 -1
- package/dist/client/assets/{search-input-D7itnEPl.js → search-input-B_2M8GyN.js} +1 -1
- package/dist/client/assets/{secrets-P_WxidPZ.js → secrets-8Lq-ml6R.js} +1 -1
- package/dist/client/assets/{sections-editor-lTo3gWhW.js → sections-editor-DXkHo2gv.js} +1 -1
- package/dist/client/assets/{select-D9uoOezw.js → select-D1ry5e3F.js} +1 -1
- package/dist/client/assets/{select-model-BD3_L4Uw.js → select-model-BF4z0bz6.js} +1 -1
- package/dist/client/assets/{self-tool-result-EuGJx6yl.js → self-tool-result-Ypo_4iL7.js} +1 -1
- package/dist/client/assets/{seo-editor-B5MHSQox.js → seo-editor-NWBYff4y.js} +1 -1
- package/dist/client/assets/{settings-layout-Do2nPAtF.js → settings-layout-Ca18KcQn.js} +1 -1
- package/dist/client/assets/{shell-controls-UJ_nndtT.js → shell-controls-C1YmS9Uq.js} +1 -1
- package/dist/client/assets/{shell-layout-oILH4mdJ.js → shell-layout-CxH2J_vH.js} +1 -1
- package/dist/client/assets/{spinner-B3DjYo5q.js → spinner-D9Eg33KA.js} +1 -1
- package/dist/client/assets/{sso-BmvpYHfk.js → sso-DzcCmTEk.js} +1 -1
- package/dist/client/assets/{store-CW0oSOYo.js → store-BS7LkR8E.js} +1 -1
- package/dist/client/assets/store-registry-5eK4vb5u.js +2 -0
- package/dist/client/assets/{super-agent-icon-C-trF5xX.js → super-agent-icon-C6ccgsJT.js} +1 -1
- package/dist/client/assets/{switch-B_VudbXM.js → switch-Dq-73Yt4.js} +1 -1
- package/dist/client/assets/{synced-repos-C9kM_7MQ.js → synced-repos-EuwzwxrI.js} +1 -1
- package/dist/client/assets/{tab-id-1ldlIGPj.js → tab-id-CZBFoDxP.js} +1 -1
- package/dist/client/assets/{table-D9o9FjLU.js → table-Ynkd1BRe.js} +1 -1
- package/dist/client/assets/{tabs-DF42pKM5.js → tabs-Dqmmxcqu.js} +1 -1
- package/dist/client/assets/{task-board-B83_AQCp.js → task-board-BGs0UCx6.js} +1 -1
- package/dist/client/assets/{task-filters-DrNWpQVW.js → task-filters-DdOS8MRZ.js} +1 -1
- package/dist/client/assets/{tasks-CzEUkeBf.js → tasks-BcHyY9gk.js} +1 -1
- package/dist/client/assets/{textarea-Cp8Eq1ti.js → textarea-W-Pw3ZSR.js} +1 -1
- package/dist/client/assets/{toggle-group-YULQPwBQ.js → toggle-group-DB6H58VS.js} +1 -1
- package/dist/client/assets/{toolbar-C1n7lJzJ.js → toolbar-DfMecULI.js} +1 -1
- package/dist/client/assets/{track-Ca8yXWoh.js → track-DohnTwcV.js} +1 -1
- package/dist/client/assets/{types-C2YLTg6W.js → types-DVuVQ_uh.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BDP6N84H.js → use-ai-providers-CSCBxSuB.js} +1 -1
- package/dist/client/assets/{use-api-keys-CG6HuSEW.js → use-api-keys-DTgGDtrP.js} +1 -1
- package/dist/client/assets/{use-automations-CqRyMJvl.js → use-automations-62psMDPp.js} +1 -1
- package/dist/client/assets/{use-autosave-DKU_lQP1.js → use-autosave-wRZF_6Aa.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-DZHqlRfF.js → use-commerce-diagnostic-k58W6UeT.js} +1 -1
- package/dist/client/assets/{use-connection-jlaP8K-d.js → use-connection-CMtyb9Em.js} +1 -1
- package/dist/client/assets/{use-copy-CP1uqs46.js → use-copy-6z7AM21W.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dw9R7BGY.js → use-create-virtual-mcp-D3BWE7fm.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CDw9qIVO.js → use-debounced-autosave-C17Tnj4g.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DQst3d7C.js → use-debounced-value-CilHT6wx.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bk1ELArA.js → use-decopilot-events-DcBkOY-J.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CQ-p8X-h.js → use-delete-connection-DvfMJt1c.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DTNFycUx.js → use-deployment-admin-EHULG4pt.js} +1 -1
- package/dist/client/assets/{use-file-configs-0EuXA__T.js → use-file-configs-DD1Ys6-g.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-zr0btYT2.js → use-infinite-scroll-Bss_Jte9.js} +1 -1
- package/dist/client/assets/{use-join-requests-ztV-AEes.js → use-join-requests-Dp-PL8bB.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BhSgSgoG.js → use-mcp-auth-status-s9ye_maE.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CcuHf8Y7.js → use-mcp-client-CJOz5swM.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BX08KfDF.js → use-mcp-tools-w2Y_OSOn.js} +1 -1
- package/dist/client/assets/{use-members-cdZbQqR_.js → use-members-XxAeZW0f.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DZizNgOR.js → use-navigate-to-agent-BhdYi4BU.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DBhLc0Pb.js → use-org-auth-client-ClpqbJHb.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DxPB1S5d.js → use-org-repo-syncs-7zdIo91H.js} +1 -1
- package/dist/client/assets/{use-org-sso-Cvq_q6vZ.js → use-org-sso-D1uxZjqL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BaFZ7sol.js → use-organization-roles-DcMNueen.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DxTO9WYp.js → use-organization-settings-0k-gkFLC.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Dxh7Bwmh.js → use-registry-connections-Dpp4JwcH.js} +1 -1
- package/dist/client/assets/{use-secrets-yseOh7F-.js → use-secrets-D9f9CoLe.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BW1rVvhG.js → use-section-preview-base-BWUIUdFV.js} +1 -1
- package/dist/client/assets/{use-status-sounds-P9nsNRWc.js → use-status-sounds-DGfUgRwU.js} +1 -1
- package/dist/client/assets/{use-tags-Di4WoVaN.js → use-tags-BhrT3HSD.js} +1 -1
- package/dist/client/assets/{use-view-mode-CSiygF4A.js → use-view-mode-CnE08rRP.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CE8JQnZF.js → use-virtual-mcp-CebUZNLQ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BQmY7yDH.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-D8oahGA1.js +1 -0
- package/dist/client/assets/{users-BR_AfVaQ.js → users-Dc_bFPFm.js} +1 -1
- package/dist/client/assets/{variant-calendar-B4c93Pd5.js → variant-calendar-ByYWwEWJ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BgGF5cxA.js → view-mode-toggle-Ly1Xi8K8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-hA4DpQI7.js +0 -1
- package/dist/client/assets/record-editor-Bc2lhZ4r.js +0 -1
- package/dist/client/assets/redirect-editor-D2Mw2IJw.js +0 -1
- package/dist/client/assets/registry-DGRsgAn4.js +0 -2
- package/dist/client/assets/store-registry-Bhju_B2m.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DPtopEBG.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BuEfbFty.js +0 -1
package/dist/client/assets/{github-repo-picker-BMpeSUhf.js → github-repo-picker-Ndprxq7w.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Z,H as de,a as ye,p as me,r as H,aX as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-BehL1Ui6.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-BcsLE0vq.js";import{C as Te}from"./collection-search-CpWofIrI.js";import{u as _e}from"./use-debounced-value-DQst3d7C.js";import{b as he,u as Ee}from"./use-connection-jlaP8K-d.js";import{u as se}from"./use-mcp-client-CcuHf8Y7.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-B6I8t-sq.js";import{i as ue}from"./ArrowLeft-Cx79RC0X.js";import{n as ze}from"./LinkExternal01-De0pVRwg.js";import{n as Le}from"./LockUnlocked01-eAVx0FNq.js";import{u as Ge}from"./use-mcp-tools-BX08KfDF.js";import{e as Oe}from"./extract-connection-data-aGTalbsT.js";import{c as Fe}from"./use-navigate-to-agent-DZizNgOR.js";import{G as $}from"./github-icon-DA75YzLM.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
|
|
1
|
+
import{c as Z,H as de,a as ye,p as me,r as H,aX as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-Dwr4Nhsh.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-B6sc6uug.js";import{C as Te}from"./collection-search-9SeZBqqM.js";import{u as _e}from"./use-debounced-value-CilHT6wx.js";import{b as he,u as Ee}from"./use-connection-CMtyb9Em.js";import{u as se}from"./use-mcp-client-CJOz5swM.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-BqQ8VoH9.js";import{i as ue}from"./ArrowLeft-DDNvps6v.js";import{n as ze}from"./LinkExternal01-BMIZ5tUs.js";import{n as Le}from"./LockUnlocked01-CV-wm-DI.js";import{u as Ge}from"./use-mcp-tools-w2Y_OSOn.js";import{e as Oe}from"./extract-connection-data-BzlqmVgL.js";import{c as Fe}from"./use-navigate-to-agent-BhdYi4BU.js";import{G as $}from"./github-icon-CMLnVUWU.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-
|
|
1
|
+
import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-Dwr4Nhsh.js";import{u as Nt}from"./use-mcp-client-CJOz5swM.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-BnQ-KPvR.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as d,H as y,f as g,j as c,ah as j,N as k}from"./index-Dwr4Nhsh.js";import{m as x,a as h}from"./task-filters-DdOS8MRZ.js";import"./task-board-BGs0UCx6.js";import"./decopilot-sse-pool-BnQ-KPvR.js";import"./backoff-CrEUbyZT.js";import"./use-decopilot-events-DcBkOY-J.js";import"./super-agent-icon-C6ccgsJT.js";import"./constants-dLUUoWH7.js";import"./avatar-Baa-d9gN.js";import"./User01-DoHHiReT.js";import"./drawer--puFaS4-.js";import"./dropdown-menu-CsFaZsN1.js";import"./Check-CL6ebCfa.js";import"./ChevronRight-CR3Q1H21.js";import"./Circle-D62eqZQf.js";import"./popover-JEDDUTGf.js";import"./command-zlhMx9IK.js";import"./index-Dx5FhPzS.js";import"./dialog-B6sc6uug.js";import"./SearchMd-B1mFsJUG.js";import"./Tag01-i8fexBmt.js";import"./ChevronDown-l75044nb.js";import"./FilterLines-CePwcX86.js";import"./Flag01-ce6Hx6Sd.js";import"./github-icon-CMLnVUWU.js";import"./get-initials-D-f_fDFw.js";import"./config-BlYsX2Rz.js";import"./AlertCircle-CKu7rmZX.js";import"./ThumbsUp-C7UuQfpb.js";import"./CheckCircle-DJ846ZMO.js";import"./Eye-BrD5V0CN.js";import"./Shield01-C2DSkqtR.js";function K(t,s){const o=s?.trim();if(!o)return;const m=o.toLowerCase();return t.find(r=>r.jiraIssueKey?.trim().toLowerCase()===m)??t.find(r=>x(o,r.keySeq,r.jiraIssueKey))??t.find(r=>r.id===o)}function tt(){const t=d.c(12),{org:s}=y();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{taskKey:m}=g(o),{items:r,isLoading:f}=h();if(f){let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(j,{}),t[1]=n):n=t[1],n}let a;t[2]!==r||t[3]!==m?(a=K(r,m),t[2]=r,t[3]=m,t[4]=a):a=t[4];const u=a;let e;t[5]!==s.slug?(e={org:s.slug},t[5]=s.slug,t[6]=e):e=t[6];const l=u?.id;let i;t[7]!==l?(i={main:"board",task:l},t[7]=l,t[8]=i):i=t[8];let p;return t[9]!==e||t[10]!==i?(p=c.jsx(k,{to:"/$org",params:e,search:i,replace:!0}),t[9]=e,t[10]=i,t[11]=p):p=t[11],p}export{tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,d as L,H as T,b as A,I as Rt,j as n,B as Ie,r as P,E as tt,J as Dt,z as Tt,K as st,e as Re,q as E,M as U,R as nt,U as Ee,W as Fe,X as D,Y as F,n as M,Z as R,_ as z,$ as ot,a0 as Et,a1 as it,a2 as Ft,a3 as lt,a as ce,a4 as Lt,x as rt,a5 as at,t as ct,a6 as Ut,a7 as Bt,a8 as Kt,a9 as qt,aa as Wt,ab as Gt,ac as Ht,p as Qt,ad as De,u as Le,ae as Vt,O as Yt,af as Xt,ag as Jt,ah as Zt}from"./index-BehL1Ui6.js";import{a as es,p as ze,s as ts,b as ss,n as ns}from"./self-tool-result-EuGJx6yl.js";import{f as os,b as is,e as ls,g as rs}from"./dialog-BcsLE0vq.js";import{f as mt,i as as,a as We,D as cs}from"./tab-id-1ldlIGPj.js";import{u as ms}from"./use-mcp-client-CcuHf8Y7.js";import{C as dt,W as ft,g as ds,S as fs,a as us}from"./constants-dLUUoWH7.js";import{i as ut}from"./XCircle-DfRhbX5A.js";import{u as ps,a as xs}from"./use-organization-settings-DxTO9WYp.js";import{C as hs,a as bs,O as pt,A as gs,u as js,b as vs,c as ys,d as Ss,e as _s,f as Ns}from"./use-commerce-diagnostic-DZHqlRfF.js";import{T as xt,a as re}from"./toolbar-C1n7lJzJ.js";import{P as ht,a as Ue,b as bt}from"./popover-fQtREfKl.js";import{D as Cs,a as ks,b as ws}from"./drawer-DICGlyMS.js";import{A as $e}from"./avatar-CfhIc7rM.js";import{a as $s}from"./Copy01-NdgC0tMp.js";import{n as Is}from"./Download01-sWgIRR3y.js";import{i as As,a as Ms,b as Os,c as Ps,t as gt,d as zs,e as Rs,A as Ds}from"./agent-icon-DaK2y4rn.js";import{i as Ts}from"./Globe01-GDZxOG4-.js";import{n as Es}from"./LinkExternal01-De0pVRwg.js";import{i as Ge}from"./LogOut01-BgADnfEe.js";import{i as Fs}from"./Monitor01-B7GZSrKA.js";import{n as Ls,a as Us}from"./Sun-DUBODnAJ.js";import{a as de}from"./Settings02-zcgW9zvM.js";import{i as Bs}from"./Shield01-DSc32g_4.js";import{t as Ks}from"./ThumbsUp-DI3WuXha.js";import{a as qs}from"./Users03-CPCauxiP.js";import{u as Ws}from"./use-deployment-admin-DTNFycUx.js";import{u as Gs}from"./use-is-desktop-app-BNujXJc_.js";import{a as Hs,n as Qs}from"./ZapSquare-CKe-D0nj.js";import{I as jt}from"./invite-member-dialog-DujILoP3.js";import{n as Be}from"./Stars02-DeEJhQu_.js";import{S as Vs}from"./scroll-area-ZnuMhKZl.js";import{u as Ys}from"./useInfiniteQuery-DPtopEBG.js";import{n as Xs}from"./decopilot-sse-pool-jb4FyQ2Z.js";import{t as vt,S as Js}from"./super-agent-icon-C-trF5xX.js";import{i as Zs}from"./ChevronRight-C38kGvxd.js";import{g as en}from"./get-initials-D-f_fDFw.js";import{a as tn}from"./format-time-BnbuEtat.js";import{i as sn}from"./Share07-Ck9NROvP.js";import{u as nn}from"./use-virtual-mcp-CE8JQnZF.js";import{g as on,a as ln,b as rn,c as an}from"./agent-capabilities-B52k7xCe.js";import{u as yt,T as cn}from"./hooks-D4xLDs6T.js";import{u as St}from"./shell-layout-oILH4mdJ.js";import{f as _t}from"./reusable-new-chat-CzvRy4Pe.js";import{d as mn}from"./session-runtime-wVXsCwcJ.js";import{S as Nt}from"./use-navigate-to-agent-DZizNgOR.js";import{S as Ct,M as dn}from"./shell-controls-UJ_nndtT.js";import{C as fn}from"./chat-context-C5ygSrXi.js";import"./alert-dialog-Cv-jGdEr.js";import"./form-DbkqY3Pb.js";import"./label-DFoRWBpY.js";import"./input-WCHZ4FBH.js";import"./spinner-B3DjYo5q.js";import"./integration-icon-Bmx5TPf-.js";import"./Tool02-Ct-zQpWK.js";import"./extract-connection-data-aGTalbsT.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-G2Fd8xWg.js";import"./Check-BBxuvI_9.js";import"./Eye-Cwfj0X1t.js";import"./Tag01-C5H_HSv_.js";import"./use-debounced-value-DQst3d7C.js";import"./authenticate-and-persist-oauth-B6I8t-sq.js";import"./mcp-oauth-DQHfy9-4.js";import"./auth-Cx4wOC-p.js";import"./track-Ca8yXWoh.js";import"./task-board-B83_AQCp.js";import"./ChevronDown-BJN3W9Sh.js";import"./Plus-DVig7kjO.js";import"./SearchMd-D2P_M_eM.js";import"./XClose-BQr7cdvX.js";import"./github-icon-DA75YzLM.js";import"./github-repo-picker-BMpeSUhf.js";import"./collection-search-CpWofIrI.js";import"./use-connection-jlaP8K-d.js";import"./ArrowLeft-Cx79RC0X.js";import"./LockUnlocked01-eAVx0FNq.js";import"./use-mcp-tools-BX08KfDF.js";import"./connection-card-nla2Pp8O.js";import"./use-registry-connections-Dxh7Bwmh.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./select-D9uoOezw.js";import"./ChevronUp-Dy0ufKDy.js";import"./textarea-Cp8Eq1ti.js";import"./UserSquare-DjD8sNag.js";import"./connection-form-helpers-8DhsKJkT.js";import"./Trash01-D2YtOZ2m.js";import"./collection-tabs-CxApWZ3A.js";import"./badge-BH4yac20.js";import"./use-infinite-scroll-zr0btYT2.js";import"./useSuspenseInfiniteQuery-BuEfbFty.js";import"./use-ai-providers-BDP6N84H.js";import"./User01-DfRq2LOk.js";import"./AlertCircle-BMR28DhI.js";import"./Tool01-CZCPcxLc.js";import"./ArrowUp-DrKUKFNk.js";import"./TrendUp01-CEly_omr.js";import"./ChevronSelectorVertical-Cl3XRu54.js";import"./Circle-CG_w7vfz.js";import"./CreditCard01-CMuo-q9l.js";import"./DotsVertical-BE8b1vSO.js";import"./FilterLines-DV2sFbYz.js";import"./Flag01-Dar8g-a5.js";import"./Globe04-CShMEsQ3.js";import"./SwitchHorizontal01-CPK_-5Wf.js";import"./HardDrive-BZzMYlWU.js";import"./Key01-DVO_Y8wK.js";import"./Palette-D9xv93RD.js";import"./Play-DU5U6W3O.js";import"./SearchLg-BizYXwwj.js";import"./Stars01-JIm15VhT.js";import"./Upload01-B_DH6cS5.js";import"./Users01-XMO8kMmJ.js";import"./Zap-D7KfLj7b.js";import"./use-org-auth-client-DBhLc0Pb.js";import"./use-organization-roles-BaFZ7sol.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./required-auth-layout-BcLMPph9.js";import"./use-org-sso-Cvq_q6vZ.js";import"./use-decopilot-events-Bk1ELArA.js";function un(t){const e=k.c(22),{siteUrl:s}=t,i=L(),{org:o}=T(),l=A();let r;e[0]!==i||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(Rt.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:ds(o.id),main:mt(ft.COMMERCE_DISCOVERY(o.id),dt),sidepanel:0}})},e[0]=i,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(os,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=m):m=e[4];let c;e[5]!==l?(c=l("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=l,e[6]=c):c=e[6];let d;e[7]!==c?(d=n.jsx(is,{className:"sr-only",children:c}),e[7]=c,e[8]=d):d=e[8];let f;e[9]!==a||e[10]!==l?(f=()=>n.jsxs("div",{className:"grid gap-4 p-6",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:l("routes.commerceOnboarding.connectModal.loadError")}),n.jsxs(Ie,{type:"button",size:"xl",className:"w-full",onClick:a,children:[l("routes.commerceOnboarding.connectModal.continueButton"),n.jsx(ut,{size:18})]})]}),e[9]=a,e[10]=l,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(es,{}),e[12]=p):p=e[12];let u;e[13]!==a||e[14]!==s?(u=n.jsx(P.Suspense,{fallback:p,children:n.jsx(bn,{siteUrlFromUrl:s,onComplete:a})}),e[13]=a,e[14]=s,e[15]=u):u=e[15];let x;e[16]!==f||e[17]!==u?(x=n.jsx(tt,{fallback:f,children:u}),e[16]=f,e[17]=u,e[18]=x):x=e[18];let b;return e[19]!==d||e[20]!==x?(b=n.jsx(ls,{open:!0,children:n.jsxs(rs,{children:[m,n.jsxs(Dt,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:hn,onPointerDownOutside:xn,onInteractOutside:pn,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[d,x]})]})}),e[19]=d,e[20]=x,e[21]=b):b=e[21],b}function pn(t){return t.preventDefault()}function xn(t){return t.preventDefault()}function hn(t){return t.preventDefault()}function bn({siteUrlFromUrl:t,onComplete:e}){const s=A(),{org:i}=T(),o=ft.COMMERCE_DISCOVERY(i.id),l=ms({connectionId:fs,orgId:i.id,orgSlug:i.slug}),a=Tt({queryKey:st.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const v=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(v)},retry:!1}).data.item,m=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||m,d=ts(c),[f,p]=P.useState(!0),[u,x]=P.useState(null),b=Re({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=Re({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),h=async()=>{x(null),E("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:i.id});const v=c?ns(c):null;if(v?.ok)try{let y=await g.mutateAsync(v.value);if(y.triggered||(E("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:i.id,reason:y.reason??"not_upgraded"}),await b.mutateAsync(v.value),y=await g.mutateAsync(v.value)),!y.triggered){E("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:y.reason??"not_triggered"}),x(s("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(y){E("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),x(s("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=ps("demo_mode"),_=f||j;return n.jsx(hs,{siteHost:d,footer:n.jsxs(n.Fragment,{children:[u?n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,n.jsxs("div",{className:"flex gap-3",children:[n.jsx("div",{className:"min-w-0 flex-1",children:n.jsx(bs,{ready:_,pending:g.isPending,label:g.isPending?s("routes.commerceOnboarding.connectModal.openingReport"):s("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{h()},children:n.jsx(ut,{size:18})})}),_?null:n.jsx(Ie,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:g.isPending,onClick:()=>{h()},children:s("routes.commerceOnboarding.connectModal.skip")})]})]}),children:n.jsx(ss,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function gn(t){const e=k.c(11),{onPointerDown:s,onDoubleClick:i}=t,o=A(),{state:l,isMobile:r}=U();if(r||l==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},d=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let f;return e[6]!==i||e[7]!==s||e[8]!==a||e[9]!==m?(f=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:m,onPointerDown:s,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:d}),e[6]=i,e[7]=s,e[8]=a,e[9]=m,e[10]=f):f=e[10],f}const Ke=240,jn=400,vn="sidebar.width";function me(t){return Math.max(Ke,Math.min(jn,t))}function yn(){const t=k.c(11),[e,s]=nt(vn,Sn),i=P.useRef(null);let o;t[0]!==s||t[1]!==e?(o=d=>{d.preventDefault();const f=d.clientX,p=me(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const h of x)h.style.transition="none";const b=h=>{const j=me(p+(h.clientX-f));u?.style.setProperty("--sidebar-width",`${j}px`)},g=h=>{const j=me(p+(h.clientX-f));s(j);for(const _ of x)_.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",g)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const l=o;let r;t[3]!==s?(r=()=>{s(Ke)},t[3]=s,t[4]=r):r=t[4];const a=r;let m;t[5]!==e?(m=me(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==l||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:i,onStartResize:l,resetWidth:a},t[7]=l,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function Sn(t){return typeof t=="number"?me(t):Ke}function kt(){return[]}function wt(t){const e=k.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex h-6 items-center",children:n.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsxs(Ee,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,n.jsx(Fe,{children:n.jsx(D,{className:"gap-0.5",children:s})})]}),e[1]=s,e[2]=o):o=e[2],o}function $t(t){const e=k.c(18),{item:s}=t,{isMobile:i,setOpenMobile:o}=U();let l;e[0]!==i||e[1]!==s||e[2]!==o?(l=()=>{E("nav_item_clicked",{nav_key:s.key,nav_label:s.label,is_active:!!s.isActive,is_mobile:i}),s.onClick?.(),i&&o(!1)},e[0]=i,e[1]=s,e[2]=o,e[3]=l):l=e[3];const r=l,a=s.key,m=s.isActive&&"z-10";let c;e[4]!==m?(c=M(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==s.label?(d=n.jsx("span",{children:s.label}),e[6]=s.label,e[7]=d):d=e[7];let f;e[8]!==r||e[9]!==s.icon||e[10]!==s.isActive||e[11]!==s.label||e[12]!==d?(f=n.jsxs(R,{onClick:r,isActive:s.isActive,tooltip:s.label,children:[s.icon,d]}),e[8]=r,e[9]=s.icon,e[10]=s.isActive,e[11]=s.label,e[12]=d,e[13]=f):f=e[13];let p;return e[14]!==s.key||e[15]!==c||e[16]!==f?(p=n.jsx(z,{className:c,children:f},a),e[14]=s.key,e[15]=c,e[16]=f,e[17]=p):p=e[17],p}function _n(t){const e=k.c(12),{section:s}=t;switch(s.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ot,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=s.group.label,o=s.group.defaultExpanded;let l;e[2]!==s.group.items?(l=s.group.items.map(Cn),e[2]=s.group.items,e[3]=l):l=e[3];let r;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==l?(r=n.jsx(wt,{label:i,defaultExpanded:o,children:l}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=l,e[7]=r):r=e[7],r}case"items":{let i;e[8]!==s.items?(i=s.items.map(Nn),e[8]=s.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=n.jsx(Ee,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Fe,{children:n.jsx(D,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return s.content}}function Nn(t){return n.jsx($t,{item:t},t.key)}function Cn(t){return n.jsx($t,{item:t},t.key)}function kn(t){const e=k.c(17),{sections:s,footer:i,additionalContent:o,header:l,variant:r,contentClassName:a}=t,m=r===void 0?"sidebar":r;let c;e[0]!==l?(c=l&&n.jsx(Et,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:l}),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==a?(d=M("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=d):d=e[3];let f;e[4]!==s?(f=s.map(wn),e[4]=s,e[5]=f):f=e[5];let p;e[6]!==o?(p=o&&n.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==d||e[9]!==f||e[10]!==p?(u=n.jsxs(it,{className:d,children:[f,p]}),e[8]=d,e[9]=f,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==m?(x=n.jsxs(Ft,{variant:m,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=m,e[16]=x):x=e[16],x}function wn(t,e){return n.jsx(_n,{section:t},e)}function It(t){const e=k.c(2);let s;return e[0]!==t?(s=n.jsx(kn,{...t}),e[0]=t,e[1]=s):s=e[1],s}It.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(F,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function He(t){const e=k.c(18),{item:s,onClose:i}=t,o=s.isActive&&"z-10";let l;e[0]!==o?(l=M(o),e[0]=o,e[1]=l):l=e[1];let r;e[2]!==s||e[3]!==i?(r=()=>{s.onClick?.(),i()},e[2]=s,e[3]=i,e[4]=r):r=e[4];let a;e[5]!==s.icon?(a=n.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:s.icon}),e[5]=s.icon,e[6]=a):a=e[6];let m;e[7]!==s.label?(m=n.jsx("span",{children:s.label}),e[7]=s.label,e[8]=m):m=e[8];let c;e[9]!==s.isActive||e[10]!==s.label||e[11]!==r||e[12]!==a||e[13]!==m?(c=n.jsxs(R,{onClick:r,isActive:s.isActive,tooltip:s.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=s.isActive,e[10]=s.label,e[11]=r,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==l||e[16]!==c?(d=n.jsx(z,{className:l,children:c}),e[15]=l,e[16]=c,e[17]=d):d=e[17],d}function $n(t){const e=k.c(18),{section:s,onClose:i}=t;switch(s.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ot,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=s.group.label,l=s.group.defaultExpanded;let r;if(e[2]!==i||e[3]!==s.group.items){let m;e[5]!==i?(m=c=>n.jsx(He,{item:c,onClose:i},c.key),e[5]=i,e[6]=m):m=e[6],r=s.group.items.map(m),e[2]=i,e[3]=s.group.items,e[4]=r}else r=e[4];let a;return e[7]!==s.group.defaultExpanded||e[8]!==s.group.label||e[9]!==r?(a=n.jsx(wt,{label:o,defaultExpanded:l,children:r}),e[7]=s.group.defaultExpanded,e[8]=s.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==i||e[12]!==s.items){let r;e[14]!==i?(r=a=>n.jsx(He,{item:a,onClose:i},a.key),e[14]=i,e[15]=r):r=e[15],o=s.items.map(r),e[11]=i,e[12]=s.items,e[13]=o}else o=e[13];let l;return e[16]!==o?(l=n.jsx(Ee,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Fe,{children:n.jsx(D,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=l):l=e[17],l}case"custom":return s.content}}function In(t){const e=k.c(27),{sections:s,onClose:i,footer:o,additionalContent:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(pt,{}),e[0]=r):r=e[0];let a;e[1]!==i?(a=n.jsx(gs,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"flex-1"}),e[3]=m):m=e[3];const c=A();let d;e[4]!==c?(d=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=d):d=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(lt,{size:16}),e[6]=f):f=e[6];let p;e[7]!==i||e[8]!==d?(p=n.jsx(xt,{onClick:i,"aria-label":d,children:f}),e[7]=i,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==a||e[11]!==p?(u=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,m,p]}),e[10]=a,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==s){let j;e[16]!==i?(j=(_,v)=>n.jsx($n,{section:_,onClose:i},v),e[16]=i,e[17]=j):j=e[17],x=s.map(j),e[13]=i,e[14]=s,e[15]=x}else x=e[15];let b;e[18]!==l?(b=l&&n.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:l}),e[18]=l,e[19]=b):b=e[19];let g;e[20]!==b||e[21]!==x?(g=n.jsxs(it,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,b]}),e[20]=b,e[21]=x,e[22]=g):g=e[22];let h;return e[23]!==o||e[24]!==g||e[25]!==u?(h=n.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,g,o]}),e[23]=o,e[24]=g,e[25]=u,e[26]=h):h=e[26],h}function ae(t){const e=k.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=M("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const l=o;if(s.href){const d=s.external?"_blank":void 0,f=s.external?"noopener noreferrer":void 0;let p;e[2]!==s.icon?(p=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=p):p=e[3];let u;e[4]!==s.label?(u=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==s.href||e[8]!==i||e[9]!==d||e[10]!==f||e[11]!==p||e[12]!==u?(x=n.jsxs("a",{href:s.href,target:d,rel:f,className:l,onClick:i,children:[p,u]}),e[6]=l,e[7]=s.href,e[8]=i,e[9]=d,e[10]=f,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==i?(r=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=r):r=e[16];let a;e[17]!==s.icon?(a=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=a):a=e[18];let m;e[19]!==s.label?(m=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=m):m=e[20];let c;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==m?(c=n.jsxs("button",{type:"button",onClick:r,className:l,children:[a,m]}),e[21]=l,e[22]=r,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function An(){const t=k.c(4),e=A();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function Qe(t){const e=k.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:l}=t,r=A(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let m;e[0]!==a?(m=M("flex items-center gap-3 px-4",a),e[0]=a,e[1]=m):m=e[1];const c=s?.name??"U";let d;e[2]!==c||e[3]!==i?(d=n.jsx($e,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=d):d=e[4];let f;e[5]!==r||e[6]!==s?.name?(f=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=f):f=e[7];let p;e[8]!==f?(p=n.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&n.jsx(An,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=s?.email;let g;e[15]!==b?(g=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=g):g=e[16];let h;e[17]!==g||e[18]!==x?(h=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,g]}),e[17]=g,e[18]=x,e[19]=h):h=e[19];let j;e[20]!==r||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{ct.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx($s,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=n.jsx(Kt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let N;e[28]!==y?(N=n.jsx(qt,{side:"right",children:n.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=N):N=e[29];let C;e[30]!==v||e[31]!==N?(C=n.jsx(Wt,{delayDuration:300,children:n.jsxs(Gt,{children:[v,N]})}),e[30]=v,e[31]=N,e[32]=C):C=e[32];let S;return e[33]!==h||e[34]!==C||e[35]!==m||e[36]!==d?(S=n.jsxs("div",{className:m,children:[d,h,C]}),e[33]=h,e[34]=C,e[35]=m,e[36]=d,e[37]=S):S=e[37],S}function Ve(t){const e=k.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:l}=t,r=A(),a=l?"size-8":"size-7",m=l?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==m?(c=M("flex items-center justify-between border-t border-border/50",m),e[0]=m,e[1]=c):c=e[1];let d;if(e[2]!==a||e[3]!==i.theme||e[4]!==o||e[5]!==s){let y;e[7]!==a||e[8]!==i.theme||e[9]!==o?(y=N=>{const{value:C,icon:S,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o($=>({...$,theme:C})),className:M(a,"rounded-md flex items-center justify-center transition-colors",i.theme===C?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},C)},e[7]=a,e[8]=i.theme,e[9]=o,e[10]=y):y=e[10],d=s.map(y),e[2]=a,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=d}else d=e[6];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center gap-0.5",children:d}),e[11]=d,e[12]=f):f=e[12];let p;e[13]!==i.enableSounds||e[14]!==r?(p=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(Mn),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==x?(b=M(a,"rounded-md flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=b):b=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?n.jsx(Ms,{size:14}):n.jsx(Os,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let h;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==g?(h=n.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:g}),e[23]=p,e[24]=u,e[25]=b,e[26]=g,e[27]=h):h=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.288.0"]}),e[28]=j):j=e[28];let _;e[29]!==h?(_=n.jsxs("div",{className:"flex items-center gap-2",children:[h,j]}),e[29]=h,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==f?(v=n.jsxs("div",{className:c,children:[f,_]}),e[31]=_,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function Mn(t){return{...t,enableSounds:!t.enableSounds}}function Ye(t){const e=k.c(54),{user:s,userImage:i,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:f,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==s||e[2]!==i?(v=n.jsx(Qe,{user:s,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=s,e[2]=i,e[3]=v):v=e[3];let y;if(e[4]!==f||e[5]!==o){let I;e[7]!==f?(I=O=>n.jsx(ae,{item:O,onClose:f},O.key),e[7]=f,e[8]=I):I=e[8],y=o.map(I),e[4]=f,e[5]=o,e[6]=y}else y=e[6];let N;e[9]!==f||e[10]!==r?(N=r&&n.jsx(ae,{item:r,onClose:f}),e[9]=f,e[10]=r,e[11]=N):N=e[11];let C;e[12]!==f||e[13]!==l?(C=n.jsx(ae,{item:l,onClose:f}),e[12]=f,e[13]=l,e[14]=C):C=e[14];let S;e[15]!==y||e[16]!==N||e[17]!==C?(S=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,N,C]})}),e[15]=y,e[16]=N,e[17]=C,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==d||e[21]!==m?(w=n.jsx(Ve,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=m,e[22]=w):w=e[22];let $;return e[23]!==v||e[24]!==S||e[25]!==w?($=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,S,w]}),e[23]=v,e[24]=S,e[25]=w,e[26]=$):$=e[26],$}let u;e[27]!==a||e[28]!==s||e[29]!==i?(u=n.jsx(Qe,{user:s,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=s,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==f||e[32]!==o){let v;e[34]!==f?(v=y=>n.jsx(ae,{item:y,onClose:f},y.key),e[34]=f,e[35]=v):v=e[35],x=o.map(v),e[31]=f,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==f||e[37]!==r?(b=r&&n.jsx(ae,{item:r,onClose:f}),e[36]=f,e[37]=r,e[38]=b):b=e[38];let g;e[39]!==f||e[40]!==l?(g=n.jsx(ae,{item:l,onClose:f}),e[39]=f,e[40]=l,e[41]=g):g=e[41];let h;e[42]!==x||e[43]!==b||e[44]!==g?(h=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,g]}),e[42]=x,e[43]=b,e[44]=g,e[45]=h):h=e[45];let j;e[46]!==c||e[47]!==d||e[48]!==m?(j=n.jsx(Ve,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=m,e[49]=j):j=e[49];let _;return e[50]!==u||e[51]!==h||e[52]!==j?(_=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[u,h,j]})}),e[50]=u,e[51]=h,e[52]=j,e[53]=_):_=e[53],_}function Te(){const t=k.c(107),e=A(),{data:s}=ce.useSession(),{org:i}=T(),o=L();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=Lt(l)?.params.org,[m,c]=rt(),d=at(),{isAdmin:f}=Ws(),p=Gs(),[u,x]=P.useState(!1),[b,g]=P.useState(!1),h=s?.user,j=h?.image,_=!!s?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>x(!1),t[1]=v):v=t[1];const y=v;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let C;t[4]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(de,{size:16}),t[4]=C):C=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let w;t[8]!==N||t[9]!==S?(w={key:"preferences",label:N,icon:C,onClick:S},t[8]=N,t[9]=S,t[10]=w):w=t[10];let $;t[11]!==i||t[12]!==o?($=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(Es,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=$):$=t[13];let I;t[14]!==p||t[15]!==e?(I=(as()||We())&&!p?[{key:"install-desktop-app",label:We()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Is,{size:16}),onClick:()=>g(!0)}]:[],t[14]=p,t[15]=e,t[16]=I):I=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let fe;t[19]===Symbol.for("react.memo_cache_sentinel")?(fe=n.jsx(As,{size:16}),t[19]=fe):fe=t[19];let B;t[20]!==O?(B={key:"terms",label:O,icon:fe,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=B):B=t[21];let K;t[22]!==e?(K=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=K):K=t[23];let ue;t[24]===Symbol.for("react.memo_cache_sentinel")?(ue=n.jsx(Bs,{size:16}),t[24]=ue):ue=t[24];let q;t[25]!==K?(q={key:"privacy",label:K,icon:ue,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=K,t[26]=q):q=t[26];let W;t[27]!==e?(W=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=W):W=t[28];let pe;t[29]===Symbol.for("react.memo_cache_sentinel")?(pe=n.jsx(Ut,{className:"w-4 h-4"}),t[29]=pe):pe=t[29];let G;t[30]!==W?(G={key:"github",label:W,icon:pe,href:"https://github.com/decocms/studio",external:!0},t[30]=W,t[31]=G):G=t[31];let H;t[32]!==e?(H=e("common.accountPopover.community"),t[32]=e,t[33]=H):H=t[33];let xe;t[34]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(qs,{size:16}),t[34]=xe):xe=t[34];let Q;t[35]!==H?(Q={key:"community",label:H,icon:xe,href:"https://decocms.com/discord",external:!0},t[35]=H,t[36]=Q):Q=t[36];let V;t[37]!==e?(V=e("common.accountPopover.homepage"),t[37]=e,t[38]=V):V=t[38];let he;t[39]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(Ts,{size:16}),t[39]=he):he=t[39];let Y;t[40]!==V?(Y={key:"homepage",label:V,icon:he,href:"https://decocms.com",external:!0},t[40]=V,t[41]=Y):Y=t[41];let X;t[42]!==f||t[43]!==o||t[44]!==e?(X=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(Ks,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=f,t[43]=o,t[44]=e,t[45]=X):X=t[45];let be;t[46]!==B||t[47]!==q||t[48]!==G||t[49]!==Q||t[50]!==Y||t[51]!==X||t[52]!==w||t[53]!==$||t[54]!==I?(be=[w,...$,...I,B,q,G,Q,Y,...X],t[46]=B,t[47]=q,t[48]=G,t[49]=Q,t[50]=Y,t[51]=X,t[52]=w,t[53]=$,t[54]=I,t[55]=be):be=t[55];const Ae=be;let J;t[56]!==e?(J=e("common.accountPopover.signOut"),t[56]=e,t[57]=J):J=t[57];let ge;t[58]===Symbol.for("react.memo_cache_sentinel")?(ge=n.jsx(Ge,{size:16}),t[58]=ge):ge=t[58];let je;t[59]!==J?(je={key:"logout",label:J,icon:ge,onClick:Pn},t[59]=J,t[60]=je):je=t[60];const Me=je;let ve;t[61]!==_||t[62]!==e?(ve=_?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ge,{size:16}),onClick:async()=>{const{error:qe}=await ce.admin.stopImpersonating();if(qe){ct.error(qe.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=_,t[62]=e,t[63]=ve):ve=t[63];const Oe=ve;let ye;t[64]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(Ls,{size:14}),t[64]=ye):ye=t[64];let Z;t[65]!==e?(Z=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=Z):Z=t[66];let ee;t[67]!==Z?(ee={value:"light",icon:ye,label:Z},t[67]=Z,t[68]=ee):ee=t[68];let Se;t[69]===Symbol.for("react.memo_cache_sentinel")?(Se=n.jsx(Us,{size:14}),t[69]=Se):Se=t[69];let te;t[70]!==e?(te=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=te):te=t[71];let se;t[72]!==te?(se={value:"dark",icon:Se,label:te},t[72]=te,t[73]=se):se=t[73];let _e;t[74]===Symbol.for("react.memo_cache_sentinel")?(_e=n.jsx(Fs,{size:14}),t[74]=_e):_e=t[74];let ne;t[75]!==e?(ne=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=ne):ne=t[76];let oe;t[77]!==ne?(oe={value:"system",icon:_e,label:ne},t[77]=ne,t[78]=oe):oe=t[78];let Ne;t[79]!==ee||t[80]!==se||t[81]!==oe?(Ne=[ee,se,oe],t[79]=ee,t[80]=se,t[81]=oe,t[82]=Ne):Ne=t[82];const Pe=Ne;let Ce;t[83]!==_||t[84]!==d||t[85]!==Ae||t[86]!==m||t[87]!==c||t[88]!==Me||t[89]!==Oe||t[90]!==Pe||t[91]!==h||t[92]!==j?(Ce={user:h,userImage:j,menuItems:Ae,signOutItem:Me,stopImpersonatingItem:Oe,isImpersonating:_,themeOptions:Pe,preferences:m,setPreferences:c,close:y,isMobile:d},t[83]=_,t[84]=d,t[85]=Ae,t[86]=m,t[87]=c,t[88]=Me,t[89]=Oe,t[90]=Pe,t[91]=h,t[92]=j,t[93]=Ce):Ce=t[93];const ke=Ce;let ie;t[94]!==_||t[95]!==d||t[96]!==u||t[97]!==ke||t[98]!==e||t[99]!==h?.name||t[100]!==j?(ie=d?n.jsxs(Cs,{open:u,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:M("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",_&&"border-2 border-dashed border-warning"),children:[n.jsx($e,{url:j,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(ks,{className:"h-[80dvh] p-0",children:[n.jsx(ws,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Ye,{...ke})]})]}):n.jsxs(ht,{open:u,onOpenChange:x,children:[n.jsx(Ue,{asChild:!0,children:n.jsxs(R,{tooltip:h?.name??e("common.accountPopover.defaultAccountLabel"),className:M("rounded-md",_&&"border-2 border-dashed border-warning"),children:[n.jsx($e,{url:j,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:On,children:n.jsx(Ye,{...ke})})]}),t[94]=_,t[95]=d,t[96]=u,t[97]=ke,t[98]=e,t[99]=h?.name,t[100]=j,t[101]=ie):ie=t[101];let le;t[102]!==b?(le=n.jsx(cs,{open:b,onOpenChange:g}),t[102]=b,t[103]=le):le=t[103];let we;return t[104]!==ie||t[105]!==le?(we=n.jsxs(n.Fragment,{children:[ie,le]}),t[104]=ie,t[105]=le,t[106]=we):we=t[106],we}function On(t){return t.preventDefault()}function Pn(){E("signed_out",{source:"account_popover"}),Bt(),ce.signOut()}class zn extends P.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Rn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Dn(){const t=k.c(17),e=L(),{org:s}=T(),{hasDecoKey:i,balanceDollars:o}=js();if(!i)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=M(o!=null&&Rn(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==s.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ps,{}),t[7]=m):m=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let d;t[10]!==c?(d=n.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let f;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==d?(f=n.jsx(D,{children:n.jsx(z,{children:n.jsxs(R,{tooltip:l,className:r,onClick:a,children:[m,d]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=d,t[16]=f):f=t[16],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zn,{children:n.jsx(P.Suspense,{fallback:null,children:n.jsx(Dn,{})})}),t[0]=e):e=t[0],e}const Tn=6e4;function En(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Fn(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const a=r.notifications.filter(m=>s&&!s.has(m.id)?!0:(i++,!1));return{...r,notifications:a}}),l=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:l}))}}function Ln(t,e){const s=k.c(4),{data:i}=ce.useSession(),o=i?.user?.id;let l;s[0]!==e||s[1]!==t||s[2]!==o?(l=r=>!t||!o?Kn:Xs.subscribe(t,m=>{try{if(JSON.parse(m.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=l):l=s[3],P.useSyncExternalStore(l,Bn,Un)}function Un(){return 0}function Bn(){return 0}function Kn(){}function At(){const t=k.c(37),{locator:e,org:s}=T(),i=Ht(),o=Qt();let l;t[0]!==e?(l=st.notifications(e),t[0]=e,t[1]=l):l=t[1];const r=l;let a;t[2]!==i?(a=S=>{const{pageParam:w}=S;return En(i,w)},t[2]=i,t[3]=a):a=t[3];let m;t[4]!==r||t[5]!==a?(m={queryKey:r,queryFn:a,initialPageParam:void 0,getNextPageParam:Gn,refetchInterval:Tn},t[4]=r,t[5]=a,t[6]=m):m=t[6];const c=Ys(m);let d;t[7]!==o||t[8]!==r?(d=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=d):d=t[9],Ln(s.slug,d);let f;t[10]!==i?(f=S=>i.call("NOTIFICATION_MARK_READ",S?{ids:S}:{}),t[10]=i,t[11]=f):f=t[11];let p,u;t[12]!==o||t[13]!==r?(p=async S=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,w=>Fn(w,S))},u=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=p,t[15]=u):(p=t[14],u=t[15]);let x;t[16]!==f||t[17]!==p||t[18]!==u?(x={mutationFn:f,onMutate:p,onSettled:u},t[16]=f,t[17]=p,t[18]=u,t[19]=x):x=t[19];const b=Re(x);let g;t[20]!==c.data?.pages?(g=c.data?.pages??[],t[20]=c.data?.pages,t[21]=g):g=t[21];const h=g;let j;t[22]!==h?(j=h.flatMap(qn),t[22]=h,t[23]=j):j=t[23];const _=h[0]?.unreadCount??0;let v;t[24]!==c?(v=()=>{c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},t[24]=c,t[25]=v):v=t[25];let y,N;t[26]!==b?(y=()=>b.mutate(null),N=S=>b.mutate([S]),t[26]=b,t[27]=y,t[28]=N):(y=t[27],N=t[28]);let C;return t[29]!==c.hasNextPage||t[30]!==c.isFetchingNextPage||t[31]!==_||t[32]!==v||t[33]!==y||t[34]!==N||t[35]!==j?(C={updates:j,redDotCount:_,hasMore:c.hasNextPage,isFetchingMore:c.isFetchingNextPage,fetchMore:v,markAllRead:y,markRead:N},t[29]=c.hasNextPage,t[30]=c.isFetchingNextPage,t[31]=_,t[32]=v,t[33]=y,t[34]=N,t[35]=j,t[36]=C):C=t[36],C}function qn(t){return t.notifications.map(Wn)}function Wn(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Gn(t){return t.nextCursor??void 0}function Hn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function Qn(t){const e=k.c(28),{update:s,orgSlug:i,onSelect:o}=t,l=A();let r;e[0]!==i||e[1]!==s.taskKeySeq?(r=vt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const a=r,m=!s.actorName;let c;e[3]!==m||e[4]!==s.actorImage||e[5]!==s.actorName?(c=m?n.jsx(Js,{size:24,className:"shrink-0"}):n.jsx($e,{url:s.actorImage??void 0,fallback:en(s.actorName??void 0),shape:"circle",size:"xs",className:"shrink-0"}),e[3]=m,e[4]=s.actorImage,e[5]=s.actorName,e[6]=c):c=e[6];const d=a?`${a} · `:"";let f;e[7]!==d||e[8]!==s.taskTitle?(f=n.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[d,s.taskTitle]}),e[7]=d,e[8]=s.taskTitle,e[9]=f):f=e[9];let p;e[10]!==l||e[11]!==s?(p=Hn(s,l),e[10]=l,e[11]=s,e[12]=p):p=e[12];let u;e[13]!==p?(u=n.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:p}),e[13]=p,e[14]=u):u=e[14];let x;e[15]!==f||e[16]!==u?(x=n.jsxs("div",{className:"min-w-0 flex-1",children:[f,u]}),e[15]=f,e[16]=u,e[17]=x):x=e[17];let b;e[18]!==s.occurredAt?(b=tn(new Date(s.occurredAt)),e[18]=s.occurredAt,e[19]=b):b=e[19];let g;e[20]!==b?(g=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:b}),e[20]=b,e[21]=g):g=e[21];let h;e[22]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Zs,{size:16,className:"shrink-0 text-muted-foreground"}),e[22]=h):h=e[22];let j;return e[23]!==o||e[24]!==c||e[25]!==x||e[26]!==g?(j=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[c,x,g,h]}),e[23]=o,e[24]=c,e[25]=x,e[26]=g,e[27]=j):j=e[27],j}function Vn(t){const e=k.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Yn)&&s()});return l.observe(o),()=>l.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function Yn(t){return t.isIntersecting}function Xn(t){const e=k.c(23),{onClose:s}=t,i=A(),o=L(),{org:l}=T(),{updates:r,markAllRead:a,markRead:m,hasMore:c,fetchMore:d}=At();let f;e[0]!==i?(f=i("sidebar.inbox.title"),e[0]=i,e[1]=f):f=e[1];let p;e[2]!==f?(p=n.jsx("h3",{className:"text-sm font-medium",children:f}),e[2]=f,e[3]=p):p=e[3];let u;e[4]!==a||e[5]!==i||e[6]!==r.length?(u=r.length>0&&n.jsx(Ie,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:a,children:i("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=i,e[6]=r.length,e[7]=u):u=e[7];let x;e[8]!==p||e[9]!==u?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[p,u]}),e[8]=p,e[9]=u,e[10]=x):x=e[10];let b;e[11]!==d||e[12]!==c||e[13]!==m||e[14]!==o||e[15]!==s||e[16]!==l||e[17]!==i||e[18]!==r?(b=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(Be,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Vs,{className:"min-h-0 flex-1",children:[r.map(h=>{const j=vt(l.slug,h.taskKeySeq);return n.jsx(Qn,{update:h,orgSlug:l.slug,onSelect:()=>{m(h.id),s(),j&&o({to:"/$org/t/$taskKey",params:{org:l.slug,taskKey:j}})}},h.id)}),c&&n.jsx(Vn,{onReach:d})]}),e[11]=d,e[12]=c,e[13]=m,e[14]=o,e[15]=s,e[16]=l,e[17]=i,e[18]=r,e[19]=b):b=e[19];let g;return e[20]!==x||e[21]!==b?(g=n.jsxs(n.Fragment,{children:[x,b]}),e[20]=x,e[21]=b,e[22]=g):g=e[22],g}function Mt(){const t=k.c(1),{redDotCount:e}=At();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Ot(t){const e=k.c(11),{open:s,onOpenChange:i,side:o,children:l}=t;let r;e[0]!==i||e[1]!==s?(r=s&&n.jsx(Xn,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==r?(a=n.jsx(bt,{side:o,align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5];let m;return e[6]!==l||e[7]!==i||e[8]!==s||e[9]!==a?(m=n.jsxs(ht,{open:s,onOpenChange:i,children:[l,a]}),e[6]=l,e[7]=i,e[8]=s,e[9]=a,e[10]=m):m=e[10],m}function Pt(){const t=k.c(9),e=A(),[s,i]=P.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Be,{size:15}),r=n.jsx(Mt,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let m;return t[6]!==s||t[7]!==a?(m=n.jsx(Ot,{open:s,onOpenChange:i,side:"top",children:a}),t[6]=s,t[7]=a,t[8]=m):m=t[8],m}function Jn(){const t=k.c(15),e=A(),[s,i]=P.useState(!1),{state:o}=U();let l;t[0]!==o||t[1]!==e?(l=o==="collapsed"?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=l):l=t[2];let r,a;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Be,{}),a=n.jsx(Mt,{}),t[3]=r,t[4]=a):(r=t[3],a=t[4]);let m;t[5]!==e?(m=e("sidebar.inbox.title"),t[5]=e,t[6]=m):m=t[6];let c;t[7]!==m?(c=n.jsx("span",{className:"truncate",children:m}),t[7]=m,t[8]=c):c=t[8];let d;t[9]!==l||t[10]!==c?(d=n.jsx(Ue,{asChild:!0,children:n.jsxs(R,{tooltip:l,className:"relative",children:[r,a,c]})}),t[9]=l,t[10]=c,t[11]=d):d=t[11];let f;return t[12]!==s||t[13]!==d?(f=n.jsx(Ot,{open:s,onOpenChange:i,side:"right",children:d}),t[12]=s,t[13]=d,t[14]=f):f=t[14],f}function Zn(){const t=k.c(14),e=A(),s=L(),{org:i}=T();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==s||t[3]!==i.slug?(l=()=>s({to:"/$org/settings",params:{org:i.slug}}),t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let m;t[8]!==a?(m=n.jsx("span",{children:a}),t[8]=a,t[9]=m):m=t[9];let c;return t[10]!==o||t[11]!==l||t[12]!==m?(c=n.jsxs(R,{tooltip:o,onClick:l,children:[r,m]}),t[10]=o,t[11]=l,t[12]=m,t[13]=c):c=t[13],c}function eo(){const t=k.c(9),e=A(),s=L(),{org:i}=T();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==s||t[3]!==i.slug?(l=()=>s({to:"/$org/settings",params:{org:i.slug}}),t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==l?(a=n.jsx("button",{type:"button","aria-label":o,onClick:l,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=l,t[8]=a):a=t[8],a}function Je(){const t=k.c(29),e=A(),[s,i]=P.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(gt,{}),t[2]=l):l=t[2];let r;t[3]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=r):r=t[4];let a;t[5]!==r?(a=n.jsx("span",{children:r}),t[5]=r,t[6]=a):a=t[6];let m;t[7]!==o||t[8]!==a?(m=n.jsx(z,{children:n.jsx(jt,{trigger:n.jsxs(R,{tooltip:o,children:[l,a]})})}),t[7]=o,t[8]=a,t[9]=m):m=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let d,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(!0),f=n.jsx(Hs,{}),t[12]=d,t[13]=f):(d=t[12],f=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=n.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=n.jsx(z,{children:n.jsxs(R,{tooltip:c,onClick:d,children:[f,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let b;t[21]!==x||t[22]!==m?(b=n.jsxs(D,{className:"gap-0.5",children:[m,x]}),t[21]=x,t[22]=m,t[23]=b):b=t[23];let g;t[24]!==s?(g=n.jsx(vs,{open:s,onOpenChange:i,mode:"browse"}),t[24]=s,t[25]=g):g=t[25];let h;return t[26]!==b||t[27]!==g?(h=n.jsxs(n.Fragment,{children:[b,g]}),t[26]=b,t[27]=g,t[28]=h):h=t[28],h}function Ze(){const t=k.c(10),e=A();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(gt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let l;t[5]!==o?(l=n.jsx("span",{children:o}),t[5]=o,t[6]=l):l=t[6];let r;return t[7]!==s||t[8]!==l?(r=n.jsx(D,{className:"gap-0.5",children:n.jsx(z,{children:n.jsx(jt,{trigger:n.jsxs(R,{tooltip:s,children:[i,l]})})})}),t[7]=s,t[8]=l,t[9]=r):r=t[9],r}function to(){const t=k.c(18),{state:e}=U(),s=e==="collapsed",i=xs(),o=!i;if(s){let c;t[0]!==o?(c=o&&n.jsx(Xe,{}),t[0]=o,t[1]=c):c=t[1];let d;t[2]!==i?(d=i?n.jsx(Ze,{}):n.jsx(Je,{}),t[2]=i,t[3]=d):d=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(z,{children:n.jsx(Jn,{})}),t[4]=f):f=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(z,{children:n.jsx(Zn,{})}),t[5]=p):p=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(D,{children:[f,p,n.jsx(z,{children:n.jsx(Te,{})})]}),t[6]=u):u=t[6];let x;return t[7]!==c||t[8]!==d?(x=n.jsxs(De,{className:"px-2 pb-3 gap-1",children:[c,d,u]}),t[7]=c,t[8]=d,t[9]=x):x=t[9],x}let l;t[10]!==o?(l=o&&n.jsx(Xe,{}),t[10]=o,t[11]=l):l=t[11];let r;t[12]!==i?(r=i?n.jsx(Ze,{}):n.jsx(Je,{}),t[12]=i,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(D,{className:"gap-0.5",children:n.jsx(z,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Te,{})}),n.jsx(Pt,{}),n.jsx(eo,{})]})})}),t[14]=a):a=t[14];let m;return t[15]!==l||t[16]!==r?(m=n.jsxs(De,{className:"px-2 pb-3 gap-0.5",children:[l,r,a]}),t[15]=l,t[16]=r,t[17]=m):m=t[17],m}function so(){const t=k.c(12),e=A(),s=L(),{org:i}=T(),{setOpenMobile:o}=U();let l,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(D,{children:n.jsx(z,{children:n.jsx(Te,{})})})}),r=n.jsx(Pt,{}),t[0]=l,t[1]=r):(l=t[0],r=t[1]);let a;t[2]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==s||t[5]!==i.slug||t[6]!==o?(m=()=>{s({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[4]=s,t[5]=i.slug,t[6]=o,t[7]=m):m=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(de,{className:"size-4"}),t[8]=c):c=t[8];let d;return t[9]!==a||t[10]!==m?(d=n.jsx(De,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[l,r,n.jsx(xt,{"aria-label":a,onClick:m,children:c})]})}),t[9]=a,t[10]=m,t[11]=d):d=t[11],d}const no=5,oo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function io(){const t=k.c(3),{state:e}=U();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:no}).map(ao)}),t[0]=o):o=t[0],o}let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(F,{className:"size-6 rounded-md"}),n.jsx(F,{className:"size-6 rounded-md"}),n.jsx(F,{className:"size-6 rounded-md"})]}),n.jsx(F,{className:"h-6 w-20 rounded-md"})]}),t[1]=s):s=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,n.jsx("div",{className:"flex flex-col gap-0.5",children:oo.map(lo)})]}),t[2]=i):i=t[2],i}function lo(t,e){return n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[n.jsx(F,{className:"size-5 rounded-full shrink-0"}),n.jsx(F,{className:M("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(ro)})]},e)}function ro(t,e){return n.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:n.jsx(F,{className:"h-3 flex-1 rounded-sm"})},e)}function ao(t,e){return n.jsx(F,{className:"size-10 rounded-lg mx-auto"},e)}function co(){const t=k.c(2),{org:e}=T();let s;return t[0]!==e.id?(s=us(e.id),t[0]=e.id,t[1]=s):s=t[1],s.id}function mo(t){const e=k.c(38);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:i}=s,o=A(),l=L();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[2]=r):r=e[2];const a=Le(r),{diagnostic:m,connectionId:c}=ys(),d=co(),{threads:f}=yt(),{data:p}=ce.useSession(),{setTaskId:u,createNewTask:x}=St(),b=Ss(),g=!a.virtualmcpid||a.virtualmcpid===d;let h;e[3]!==x||e[4]!==d||e[5]!==l||e[6]!==i||e[7]!==g||e[8]!==b||e[9]!==p?.user?.id||e[10]!==u||e[11]!==f?(h=S=>{if(E("nav_destination_clicked",{destination:S}),i?.(),g){l({to:".",search:$=>({...$,main:S}),replace:!0});return}const w=_t(f,d,p?.user?.id,b(d));w?u(w.id,d,{main:S}):x(d,void 0,{main:S})},e[3]=x,e[4]=d,e[5]=l,e[6]=i,e[7]=g,e[8]=b,e[9]=p?.user?.id,e[10]=u,e[11]=f,e[12]=h):h=e[12];const j=h,_=a.main===0||!a.main?g?"overview":null:a.main;let v;e[13]!==_||e[14]!==j?(v=(S,w,$)=>({key:S,label:w,icon:$,isActive:_===S,onSelect:()=>j(S)}),e[13]=_,e[14]=j,e[15]=v):v=e[15];const y=v;let N;if(e[16]!==y||e[17]!==o){let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(zs,{size:16}),e[19]=S):S=e[19],N=y("overview",o("sidebar.navDestinations.home"),S),e[16]=y,e[17]=o,e[18]=N}else N=e[18];let C;if(e[20]!==c||e[21]!==y||e[22]!==m||e[23]!==o||e[24]!==N){C=[N];let S;if(e[26]!==c||e[27]!==y||e[28]!==m||e[29]!==o){let I;e[31]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Rs,{size:16}),e[31]=I):I=e[31],S=y(m?mt(c,dt):"reports",o("sidebar.navDestinations.reports"),I),e[26]=c,e[27]=y,e[28]=m,e[29]=o,e[30]=S}else S=e[30];C.push(S);let w,$;if(e[32]!==y||e[33]!==o){let I;e[36]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Qs,{size:16}),e[36]=I):I=e[36],w=y("board",o("sidebar.navDestinations.tasks"),I);let O;e[37]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(sn,{size:16}),e[37]=O):O=e[37],$=y("files",o("sidebar.navDestinations.library"),O),e[32]=y,e[33]=o,e[34]=w,e[35]=$}else w=e[34],$=e[35];C.push(w,$),e[20]=c,e[21]=y,e[22]=m,e[23]=o,e[24]=N,e[25]=C}else C=e[25];return C}function et(t,e){const s=k.c(14);let i;s[0]!==e?(i=e===void 0?{}:e,s[0]=e,s[1]=i):i=s[1];const{onNavigate:o}=i;let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},s[2]=l):l=s[2];const r=Le(l),a=nn()??[],m=on(a),{threads:c}=yt(),{data:d}=ce.useSession(),{setTaskId:f,createNewTask:p,openTab:u}=St();let x;s[3]!==p||s[4]!==o||s[5]!==d?.user?.id||s[6]!==f||s[7]!==c?(x=(h,j)=>{o?.();const _=_t(c,h.id,d?.user?.id,mn(h.metadata));_?f(_.id,h.id,j):p(h.id,void 0,j)},s[3]=p,s[4]=o,s[5]=d?.user?.id,s[6]=f,s[7]=c,s[8]=x):x=s[8];const b=x;let g;return s[9]!==o||s[10]!==b||s[11]!==u||s[12]!==r?(g=h=>{const j=an(h),_=r.virtualmcpid===h.id;return{key:h.id,label:h.title||j?.name||"",icon:n.jsx(Ds,{icon:h.icon,name:h.title,size:"2xs",className:"shrink-0"}),isActive:_,onSelect:()=>{E("nav_destination_clicked",{destination:"coding_agent"}),b(h)},onOpenSettings:()=>{E("nav_destination_clicked",{destination:"coding_agent_settings"}),_?(o?.(),u("settings")):b(h,{main:"settings"})}}},s[9]=o,s[10]=b,s[11]=u,s[12]=r,s[13]=g):g=s[13],a.filter(h=>t(h,m)).map(g)}function fo(t){const e=k.c(19),{onNavigate:s}=t,i=A();let o;e[0]!==s?(o={onNavigate:s},e[0]=s,e[1]=o):o=e[1];const l=mo(o);let r;e[2]!==s?(r={onNavigate:s},e[2]=s,e[3]=r):r=e[3];const a=et(po,r);let m;e[4]!==s?(m={onNavigate:s},e[4]=s,e[5]=m):m=e[5];const c=et(uo,m),d=[...a,...c],[f]=rt(),{showProjectSettingsGear:p}=f,{state:u,isMobile:x}=U(),b=u==="collapsed"&&!x;let g;e[6]!==b||e[7]!==x||e[8]!==p||e[9]!==i?(g=S=>{const w=S.onOpenSettings&&p&&!b;return n.jsxs(z,{children:[n.jsxs(R,{onClick:S.onSelect,isActive:S.isActive,"aria-current":S.isActive?"page":void 0,tooltip:b?S.label:void 0,className:M(w&&"group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground"),children:[S.icon,n.jsx("span",{className:M("truncate",w&&"pr-7"),children:S.label})]}),w&&n.jsx(Ie,{variant:"ghost",size:"icon-sm","aria-label":i("sidebar.navDestinations.projectSettings",{name:S.label}),onClick:S.onOpenSettings,className:M("absolute right-1 top-1/2 -translate-y-1/2 text-sidebar-foreground/60 hover:text-sidebar-foreground/60",x?"opacity-100":"opacity-0 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100"),children:n.jsx(de,{})})]},S.key)},e[6]=b,e[7]=x,e[8]=p,e[9]=i,e[10]=g):g=e[10];const h=g,j=D,_="gap-1";let v;e[11]!==l||e[12]!==h?(v=l.map(h),e[11]=l,e[12]=h,e[13]=v):v=e[13];const y=d.length>0&&n.jsx("li",{"aria-hidden":!0,className:"h-2"}),N=d.map(h);let C;return e[14]!==j||e[15]!==v||e[16]!==y||e[17]!==N?(C=n.jsxs(j,{className:_,children:[v,y,N]}),e[14]=j,e[15]=v,e[16]=y,e[17]=N,e[18]=C):C=e[18],C}function uo(t,e){return rn(t)&&!e.has(t.id)}function po(t){return ln(t.metadata)}function xo(t){const e=k.c(29);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:i}=s,o=A(),{org:l}=T(),{state:r,isMobile:a,toggleSidebar:m}=U(),c=r==="collapsed"&&!a;let d;e[2]!==i?(d=n.jsx(fo,{onNavigate:i}),e[2]=i,e[3]=d):d=e[3];const f=d;if(c){let u;e[4]!==l?(u=n.jsx(Ns,{org:l,size:"sm"}),e[4]=l,e[5]=u):u=e[5];let x;e[6]!==l.name||e[7]!==u?(x=n.jsx(R,{tooltip:l.name,children:u}),e[6]=l.name,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==l.slug||e[10]!==x?(b=n.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:n.jsx(_s,{orgParam:l.slug,side:"right",align:"start",trigger:x})}),e[9]=l.slug,e[10]=x,e[11]=b):b=e[11];let g;e[12]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=g):g=e[13];let h;e[14]!==o?(h=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=h):h=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(lt,{size:16}),e[16]=j):j=e[16];let _;e[17]!==g||e[18]!==h||e[19]!==m?(_=n.jsx(D,{className:"mt-2 gap-1.5",children:n.jsx(z,{children:n.jsx(R,{"aria-label":g,tooltip:h,onClick:m,children:j})})}),e[17]=g,e[18]=h,e[19]=m,e[20]=_):_=e[20];let v;e[21]!==f?(v=n.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:f}),e[21]=f,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==b||e[25]!==_?(y=n.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[b,_,v]}),e[23]=v,e[24]=b,e[25]=_,e[26]=y):y=e[26],y}let p;return e[27]!==f?(p=n.jsx("div",{className:"flex flex-col h-full min-h-0",children:n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:f})}),e[27]=f,e[28]=p):p=e[28],p}function ho(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs(n.Fragment,{children:[n.jsx(pt,{showName:!0}),n.jsx(Ct,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=e):e=t[0],e}function zt(t){const e=k.c(3),{onNavigate:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(io,{}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsx(tt,{children:n.jsx(P.Suspense,{fallback:i,children:n.jsx(xo,{onNavigate:s})})}),e[1]=s,e[2]=o):o=e[2],o}function bo(){const t=k.c(5),e=kt();let s,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(to,{}),i=n.jsx(ho,{}),o=n.jsx(zt,{}),t[0]=s,t[1]=i,t[2]=o):(s=t[0],i=t[1],o=t[2]);let l;return t[3]!==e?(l=n.jsx(Nt,{children:n.jsx(It,{sections:e,footer:s,header:i,additionalContent:o})}),t[3]=e,t[4]=l):l=t[4],l}function go(t){const e=k.c(7),{onClose:s}=t,i=kt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(so,{}),e[0]=o):o=e[0];let l;e[1]!==s?(l=n.jsx(zt,{onNavigate:s}),e[1]=s,e[2]=l):l=e[2];let r;return e[3]!==s||e[4]!==i||e[5]!==l?(r=n.jsx(Nt,{children:n.jsx(In,{sections:i,onClose:s,footer:o,additionalContent:l})}),e[3]=s,e[4]=i,e[5]=l,e[6]=r):r=e[6],r}const jo="sidebar.open";function vo(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Zt,{}),t[0]=e):e=t[0],e}function Tl(){const t=k.c(28),e=at();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const{connect:i,siteUrl:o}=Le(s),l=i==="1",[r,a]=nt(jo,!1),{width:m,wrapperRef:c,onStartResize:d,resetWidth:f}=yn(),p=e;let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(re.Header,{className:"grid-cols-1 px-1",children:n.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[n.jsx(Ct,{}),n.jsx(re.TogglesSlot,{}),n.jsx(re.TabsSlot,{className:"shrink-0"}),n.jsx(re.CenterSlot,{}),n.jsx(re.RightSlot,{})]})}),t[1]=u):u=t[1];const x=u;let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={background:"transparent",containerType:"inline-size"},t[2]=b):b=t[2];let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Vt,{className:"flex flex-col min-h-0",style:b,children:n.jsx("div",{className:"flex flex-col h-full min-h-0",children:n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n.jsx(P.Suspense,{fallback:n.jsx(vo,{}),children:n.jsx(Yt,{})})})})}),t[3]=g):g=t[3];const h=g,j=p&&x,_=`${m}px`;let v;t[4]!==_?(v={"--sidebar-width":_,"--sidebar-width-icon":"3.125rem"},t[4]=_,t[5]=v):v=t[5];const y=v;let N;t[6]!==e||t[7]!==d||t[8]!==f?(N=!e&&n.jsxs(n.Fragment,{children:[n.jsx(bo,{}),n.jsx(gn,{onPointerDown:d,onDoubleClick:f})]}),t[6]=e,t[7]=d,t[8]=f,t[9]=N):N=t[9];let C;t[10]!==y||t[11]!==N||t[12]!==c?(C=n.jsxs(Xt,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:y,children:[N,h]}),t[10]=y,t[11]=N,t[12]=c,t[13]=C):C=t[13];let S;t[14]!==e?(S=e&&n.jsx(dn,{renderSidebar:yo}),t[14]=e,t[15]=S):S=t[15];let w;t[16]!==o||t[17]!==l?(w=l&&n.jsx(un,{siteUrl:o}),t[16]=o,t[17]=l,t[18]=w):w=t[18];let $;t[19]!==S||t[20]!==w||t[21]!==j||t[22]!==C?($=n.jsx(fn,{children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[j,C,S,w]})}),t[19]=S,t[20]=w,t[21]=j,t[22]=C,t[23]=$):$=t[23];let I;return t[24]!==a||t[25]!==r||t[26]!==$?(I=n.jsx(cn,{children:n.jsx(re.Provider,{children:n.jsx(Jt,{open:r,onOpenChange:a,children:$})})}),t[24]=a,t[25]=r,t[26]=$,t[27]=I):I=t[27],I}function yo(t){const{onClose:e}=t;return n.jsx("div",{className:"flex h-full",children:n.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:n.jsx(go,{onClose:e})})})}export{Tl as default};
|
|
1
|
+
import{c as k,d as L,H as T,b as A,I as Rt,j as n,B as Ie,r as P,E as tt,J as Dt,z as Tt,K as st,e as Re,q as E,M as U,R as nt,U as Ee,W as Fe,X as D,Y as F,n as M,Z as R,_ as z,$ as ot,a0 as Et,a1 as it,a2 as Ft,a3 as lt,a as ce,a4 as Lt,x as rt,a5 as at,t as ct,a6 as Ut,a7 as Bt,a8 as Kt,a9 as qt,aa as Wt,ab as Gt,ac as Ht,p as Qt,ad as De,u as Le,ae as Vt,O as Yt,af as Xt,ag as Jt,ah as Zt}from"./index-Dwr4Nhsh.js";import{a as es,p as ze,s as ts,b as ss,n as ns}from"./self-tool-result-Ypo_4iL7.js";import{f as os,b as is,e as ls,g as rs}from"./dialog-B6sc6uug.js";import{f as mt,i as as,a as We,D as cs}from"./tab-id-CZBFoDxP.js";import{u as ms}from"./use-mcp-client-CJOz5swM.js";import{C as dt,W as ft,g as ds,S as fs,a as us}from"./constants-dLUUoWH7.js";import{i as ut}from"./XCircle-BjqVtcre.js";import{u as ps,a as xs}from"./use-organization-settings-0k-gkFLC.js";import{C as hs,a as bs,O as pt,A as gs,u as js,b as vs,c as ys,d as Ss,e as _s,f as Ns}from"./use-commerce-diagnostic-k58W6UeT.js";import{T as xt,a as re}from"./toolbar-DfMecULI.js";import{P as ht,a as Ue,b as bt}from"./popover-JEDDUTGf.js";import{D as Cs,a as ks,b as ws}from"./drawer--puFaS4-.js";import{A as $e}from"./avatar-Baa-d9gN.js";import{a as $s}from"./Copy01-Cxf_1PnK.js";import{n as Is}from"./Download01-DEBgX1Vz.js";import{i as As,a as Ms,b as Os,c as Ps,t as gt,d as zs,e as Rs,A as Ds}from"./agent-icon-BcyWOSOE.js";import{i as Ts}from"./Globe01-Dudxmov2.js";import{n as Es}from"./LinkExternal01-BMIZ5tUs.js";import{i as Ge}from"./LogOut01-BRN-e96O.js";import{i as Fs}from"./Monitor01-BcVrphiW.js";import{n as Ls,a as Us}from"./Sun-DYOiR6u2.js";import{a as de}from"./Settings02-By6ST3EB.js";import{i as Bs}from"./Shield01-C2DSkqtR.js";import{t as Ks}from"./ThumbsUp-C7UuQfpb.js";import{a as qs}from"./Users03-BaRNWusq.js";import{u as Ws}from"./use-deployment-admin-EHULG4pt.js";import{u as Gs}from"./use-is-desktop-app-BNujXJc_.js";import{a as Hs,n as Qs}from"./ZapSquare-DOAULR1K.js";import{I as jt}from"./invite-member-dialog-CKYzs1sf.js";import{n as Be}from"./Stars02-Bn0UVscJ.js";import{S as Vs}from"./scroll-area-DlRbnTs4.js";import{u as Ys}from"./useInfiniteQuery-BQmY7yDH.js";import{n as Xs}from"./decopilot-sse-pool-BnQ-KPvR.js";import{t as vt,S as Js}from"./super-agent-icon-C6ccgsJT.js";import{i as Zs}from"./ChevronRight-CR3Q1H21.js";import{g as en}from"./get-initials-D-f_fDFw.js";import{a as tn}from"./format-time-BnbuEtat.js";import{i as sn}from"./Share07-DY_FaN6b.js";import{u as nn}from"./use-virtual-mcp-CebUZNLQ.js";import{g as on,a as ln,b as rn,c as an}from"./agent-capabilities-B52k7xCe.js";import{u as yt,T as cn}from"./hooks-2fGeLPS1.js";import{u as St}from"./shell-layout-CxH2J_vH.js";import{f as _t}from"./reusable-new-chat-CzvRy4Pe.js";import{d as mn}from"./session-runtime-wVXsCwcJ.js";import{S as Nt}from"./use-navigate-to-agent-BhdYi4BU.js";import{S as Ct,M as dn}from"./shell-controls-C1YmS9Uq.js";import{C as fn}from"./chat-context-BDGNuHNR.js";import"./alert-dialog-BE43dtd2.js";import"./form-BPo1UTrE.js";import"./label-CpgYdDkV.js";import"./input-BEfJnYXv.js";import"./spinner-D9Eg33KA.js";import"./integration-icon-B5IEO10M.js";import"./Tool02-DWppGdVf.js";import"./extract-connection-data-BzlqmVgL.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-DJ846ZMO.js";import"./Check-CL6ebCfa.js";import"./Eye-BrD5V0CN.js";import"./Tag01-i8fexBmt.js";import"./use-debounced-value-CilHT6wx.js";import"./authenticate-and-persist-oauth-BqQ8VoH9.js";import"./mcp-oauth-BOPNzBqf.js";import"./auth-thjU26aE.js";import"./track-DohnTwcV.js";import"./task-board-BGs0UCx6.js";import"./ChevronDown-l75044nb.js";import"./Plus-CroEHl-V.js";import"./SearchMd-B1mFsJUG.js";import"./XClose-DYg8Y0jz.js";import"./github-icon-CMLnVUWU.js";import"./github-repo-picker-Ndprxq7w.js";import"./collection-search-9SeZBqqM.js";import"./use-connection-CMtyb9Em.js";import"./ArrowLeft-DDNvps6v.js";import"./LockUnlocked01-CV-wm-DI.js";import"./use-mcp-tools-w2Y_OSOn.js";import"./connection-card-DfH45sFu.js";import"./use-registry-connections-Dpp4JwcH.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./select-D1ry5e3F.js";import"./ChevronUp-DEAzOQPQ.js";import"./textarea-W-Pw3ZSR.js";import"./UserSquare-mEZg6QDw.js";import"./connection-form-helpers-DLhQCdyV.js";import"./Trash01-DHruTUXA.js";import"./collection-tabs-CPzc34Qk.js";import"./badge-DaTevZ40.js";import"./use-infinite-scroll-Bss_Jte9.js";import"./useSuspenseInfiniteQuery-D8oahGA1.js";import"./use-ai-providers-CSCBxSuB.js";import"./User01-DoHHiReT.js";import"./AlertCircle-CKu7rmZX.js";import"./Tool01-DY1usWj5.js";import"./ArrowUp-YS7GP0iu.js";import"./TrendUp01-CGJ2AZa0.js";import"./ChevronSelectorVertical-B6IPuZDr.js";import"./Circle-D62eqZQf.js";import"./CreditCard01-DBh9qZf5.js";import"./DotsVertical-BT_U-x52.js";import"./FilterLines-CePwcX86.js";import"./Flag01-ce6Hx6Sd.js";import"./Globe04-DtgB6D89.js";import"./SwitchHorizontal01-BHNzjJNL.js";import"./HardDrive-ot3a-Nzo.js";import"./Key01-CsQEsjC9.js";import"./Palette-CE96jZVd.js";import"./Play-CS8MeC3I.js";import"./SearchLg-CVqx93Y_.js";import"./Stars01-6-4BZRs0.js";import"./Upload01-DRWaG5l9.js";import"./Users01-B8XWYCw5.js";import"./Zap-hw3tSe7n.js";import"./use-org-auth-client-ClpqbJHb.js";import"./use-organization-roles-DcMNueen.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./required-auth-layout-DOvWb2NB.js";import"./use-org-sso-D1uxZjqL.js";import"./use-decopilot-events-DcBkOY-J.js";function un(t){const e=k.c(22),{siteUrl:s}=t,i=L(),{org:o}=T(),l=A();let r;e[0]!==i||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(Rt.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:ds(o.id),main:mt(ft.COMMERCE_DISCOVERY(o.id),dt),sidepanel:0}})},e[0]=i,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(os,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=m):m=e[4];let c;e[5]!==l?(c=l("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=l,e[6]=c):c=e[6];let d;e[7]!==c?(d=n.jsx(is,{className:"sr-only",children:c}),e[7]=c,e[8]=d):d=e[8];let f;e[9]!==a||e[10]!==l?(f=()=>n.jsxs("div",{className:"grid gap-4 p-6",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:l("routes.commerceOnboarding.connectModal.loadError")}),n.jsxs(Ie,{type:"button",size:"xl",className:"w-full",onClick:a,children:[l("routes.commerceOnboarding.connectModal.continueButton"),n.jsx(ut,{size:18})]})]}),e[9]=a,e[10]=l,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(es,{}),e[12]=p):p=e[12];let u;e[13]!==a||e[14]!==s?(u=n.jsx(P.Suspense,{fallback:p,children:n.jsx(bn,{siteUrlFromUrl:s,onComplete:a})}),e[13]=a,e[14]=s,e[15]=u):u=e[15];let x;e[16]!==f||e[17]!==u?(x=n.jsx(tt,{fallback:f,children:u}),e[16]=f,e[17]=u,e[18]=x):x=e[18];let b;return e[19]!==d||e[20]!==x?(b=n.jsx(ls,{open:!0,children:n.jsxs(rs,{children:[m,n.jsxs(Dt,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:hn,onPointerDownOutside:xn,onInteractOutside:pn,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[d,x]})]})}),e[19]=d,e[20]=x,e[21]=b):b=e[21],b}function pn(t){return t.preventDefault()}function xn(t){return t.preventDefault()}function hn(t){return t.preventDefault()}function bn({siteUrlFromUrl:t,onComplete:e}){const s=A(),{org:i}=T(),o=ft.COMMERCE_DISCOVERY(i.id),l=ms({connectionId:fs,orgId:i.id,orgSlug:i.slug}),a=Tt({queryKey:st.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const v=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(v)},retry:!1}).data.item,m=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||m,d=ts(c),[f,p]=P.useState(!0),[u,x]=P.useState(null),b=Re({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=Re({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),h=async()=>{x(null),E("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:i.id});const v=c?ns(c):null;if(v?.ok)try{let y=await g.mutateAsync(v.value);if(y.triggered||(E("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:i.id,reason:y.reason??"not_upgraded"}),await b.mutateAsync(v.value),y=await g.mutateAsync(v.value)),!y.triggered){E("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:y.reason??"not_triggered"}),x(s("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(y){E("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),x(s("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=ps("demo_mode"),_=f||j;return n.jsx(hs,{siteHost:d,footer:n.jsxs(n.Fragment,{children:[u?n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,n.jsxs("div",{className:"flex gap-3",children:[n.jsx("div",{className:"min-w-0 flex-1",children:n.jsx(bs,{ready:_,pending:g.isPending,label:g.isPending?s("routes.commerceOnboarding.connectModal.openingReport"):s("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{h()},children:n.jsx(ut,{size:18})})}),_?null:n.jsx(Ie,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:g.isPending,onClick:()=>{h()},children:s("routes.commerceOnboarding.connectModal.skip")})]})]}),children:n.jsx(ss,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function gn(t){const e=k.c(11),{onPointerDown:s,onDoubleClick:i}=t,o=A(),{state:l,isMobile:r}=U();if(r||l==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},d=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let f;return e[6]!==i||e[7]!==s||e[8]!==a||e[9]!==m?(f=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:m,onPointerDown:s,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:d}),e[6]=i,e[7]=s,e[8]=a,e[9]=m,e[10]=f):f=e[10],f}const Ke=240,jn=400,vn="sidebar.width";function me(t){return Math.max(Ke,Math.min(jn,t))}function yn(){const t=k.c(11),[e,s]=nt(vn,Sn),i=P.useRef(null);let o;t[0]!==s||t[1]!==e?(o=d=>{d.preventDefault();const f=d.clientX,p=me(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const h of x)h.style.transition="none";const b=h=>{const j=me(p+(h.clientX-f));u?.style.setProperty("--sidebar-width",`${j}px`)},g=h=>{const j=me(p+(h.clientX-f));s(j);for(const _ of x)_.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",g)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const l=o;let r;t[3]!==s?(r=()=>{s(Ke)},t[3]=s,t[4]=r):r=t[4];const a=r;let m;t[5]!==e?(m=me(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==l||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:i,onStartResize:l,resetWidth:a},t[7]=l,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function Sn(t){return typeof t=="number"?me(t):Ke}function kt(){return[]}function wt(t){const e=k.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex h-6 items-center",children:n.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsxs(Ee,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,n.jsx(Fe,{children:n.jsx(D,{className:"gap-0.5",children:s})})]}),e[1]=s,e[2]=o):o=e[2],o}function $t(t){const e=k.c(18),{item:s}=t,{isMobile:i,setOpenMobile:o}=U();let l;e[0]!==i||e[1]!==s||e[2]!==o?(l=()=>{E("nav_item_clicked",{nav_key:s.key,nav_label:s.label,is_active:!!s.isActive,is_mobile:i}),s.onClick?.(),i&&o(!1)},e[0]=i,e[1]=s,e[2]=o,e[3]=l):l=e[3];const r=l,a=s.key,m=s.isActive&&"z-10";let c;e[4]!==m?(c=M(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==s.label?(d=n.jsx("span",{children:s.label}),e[6]=s.label,e[7]=d):d=e[7];let f;e[8]!==r||e[9]!==s.icon||e[10]!==s.isActive||e[11]!==s.label||e[12]!==d?(f=n.jsxs(R,{onClick:r,isActive:s.isActive,tooltip:s.label,children:[s.icon,d]}),e[8]=r,e[9]=s.icon,e[10]=s.isActive,e[11]=s.label,e[12]=d,e[13]=f):f=e[13];let p;return e[14]!==s.key||e[15]!==c||e[16]!==f?(p=n.jsx(z,{className:c,children:f},a),e[14]=s.key,e[15]=c,e[16]=f,e[17]=p):p=e[17],p}function _n(t){const e=k.c(12),{section:s}=t;switch(s.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ot,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=s.group.label,o=s.group.defaultExpanded;let l;e[2]!==s.group.items?(l=s.group.items.map(Cn),e[2]=s.group.items,e[3]=l):l=e[3];let r;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==l?(r=n.jsx(wt,{label:i,defaultExpanded:o,children:l}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=l,e[7]=r):r=e[7],r}case"items":{let i;e[8]!==s.items?(i=s.items.map(Nn),e[8]=s.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=n.jsx(Ee,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Fe,{children:n.jsx(D,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return s.content}}function Nn(t){return n.jsx($t,{item:t},t.key)}function Cn(t){return n.jsx($t,{item:t},t.key)}function kn(t){const e=k.c(17),{sections:s,footer:i,additionalContent:o,header:l,variant:r,contentClassName:a}=t,m=r===void 0?"sidebar":r;let c;e[0]!==l?(c=l&&n.jsx(Et,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:l}),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==a?(d=M("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=d):d=e[3];let f;e[4]!==s?(f=s.map(wn),e[4]=s,e[5]=f):f=e[5];let p;e[6]!==o?(p=o&&n.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==d||e[9]!==f||e[10]!==p?(u=n.jsxs(it,{className:d,children:[f,p]}),e[8]=d,e[9]=f,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==m?(x=n.jsxs(Ft,{variant:m,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=m,e[16]=x):x=e[16],x}function wn(t,e){return n.jsx(_n,{section:t},e)}function It(t){const e=k.c(2);let s;return e[0]!==t?(s=n.jsx(kn,{...t}),e[0]=t,e[1]=s):s=e[1],s}It.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(F,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function He(t){const e=k.c(18),{item:s,onClose:i}=t,o=s.isActive&&"z-10";let l;e[0]!==o?(l=M(o),e[0]=o,e[1]=l):l=e[1];let r;e[2]!==s||e[3]!==i?(r=()=>{s.onClick?.(),i()},e[2]=s,e[3]=i,e[4]=r):r=e[4];let a;e[5]!==s.icon?(a=n.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:s.icon}),e[5]=s.icon,e[6]=a):a=e[6];let m;e[7]!==s.label?(m=n.jsx("span",{children:s.label}),e[7]=s.label,e[8]=m):m=e[8];let c;e[9]!==s.isActive||e[10]!==s.label||e[11]!==r||e[12]!==a||e[13]!==m?(c=n.jsxs(R,{onClick:r,isActive:s.isActive,tooltip:s.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=s.isActive,e[10]=s.label,e[11]=r,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==l||e[16]!==c?(d=n.jsx(z,{className:l,children:c}),e[15]=l,e[16]=c,e[17]=d):d=e[17],d}function $n(t){const e=k.c(18),{section:s,onClose:i}=t;switch(s.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ot,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=s.group.label,l=s.group.defaultExpanded;let r;if(e[2]!==i||e[3]!==s.group.items){let m;e[5]!==i?(m=c=>n.jsx(He,{item:c,onClose:i},c.key),e[5]=i,e[6]=m):m=e[6],r=s.group.items.map(m),e[2]=i,e[3]=s.group.items,e[4]=r}else r=e[4];let a;return e[7]!==s.group.defaultExpanded||e[8]!==s.group.label||e[9]!==r?(a=n.jsx(wt,{label:o,defaultExpanded:l,children:r}),e[7]=s.group.defaultExpanded,e[8]=s.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==i||e[12]!==s.items){let r;e[14]!==i?(r=a=>n.jsx(He,{item:a,onClose:i},a.key),e[14]=i,e[15]=r):r=e[15],o=s.items.map(r),e[11]=i,e[12]=s.items,e[13]=o}else o=e[13];let l;return e[16]!==o?(l=n.jsx(Ee,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Fe,{children:n.jsx(D,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=l):l=e[17],l}case"custom":return s.content}}function In(t){const e=k.c(27),{sections:s,onClose:i,footer:o,additionalContent:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(pt,{}),e[0]=r):r=e[0];let a;e[1]!==i?(a=n.jsx(gs,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"flex-1"}),e[3]=m):m=e[3];const c=A();let d;e[4]!==c?(d=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=d):d=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(lt,{size:16}),e[6]=f):f=e[6];let p;e[7]!==i||e[8]!==d?(p=n.jsx(xt,{onClick:i,"aria-label":d,children:f}),e[7]=i,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==a||e[11]!==p?(u=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,m,p]}),e[10]=a,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==s){let j;e[16]!==i?(j=(_,v)=>n.jsx($n,{section:_,onClose:i},v),e[16]=i,e[17]=j):j=e[17],x=s.map(j),e[13]=i,e[14]=s,e[15]=x}else x=e[15];let b;e[18]!==l?(b=l&&n.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:l}),e[18]=l,e[19]=b):b=e[19];let g;e[20]!==b||e[21]!==x?(g=n.jsxs(it,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,b]}),e[20]=b,e[21]=x,e[22]=g):g=e[22];let h;return e[23]!==o||e[24]!==g||e[25]!==u?(h=n.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,g,o]}),e[23]=o,e[24]=g,e[25]=u,e[26]=h):h=e[26],h}function ae(t){const e=k.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=M("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const l=o;if(s.href){const d=s.external?"_blank":void 0,f=s.external?"noopener noreferrer":void 0;let p;e[2]!==s.icon?(p=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=p):p=e[3];let u;e[4]!==s.label?(u=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==s.href||e[8]!==i||e[9]!==d||e[10]!==f||e[11]!==p||e[12]!==u?(x=n.jsxs("a",{href:s.href,target:d,rel:f,className:l,onClick:i,children:[p,u]}),e[6]=l,e[7]=s.href,e[8]=i,e[9]=d,e[10]=f,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==i?(r=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=r):r=e[16];let a;e[17]!==s.icon?(a=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=a):a=e[18];let m;e[19]!==s.label?(m=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=m):m=e[20];let c;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==m?(c=n.jsxs("button",{type:"button",onClick:r,className:l,children:[a,m]}),e[21]=l,e[22]=r,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function An(){const t=k.c(4),e=A();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function Qe(t){const e=k.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:l}=t,r=A(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let m;e[0]!==a?(m=M("flex items-center gap-3 px-4",a),e[0]=a,e[1]=m):m=e[1];const c=s?.name??"U";let d;e[2]!==c||e[3]!==i?(d=n.jsx($e,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=d):d=e[4];let f;e[5]!==r||e[6]!==s?.name?(f=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=f):f=e[7];let p;e[8]!==f?(p=n.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&n.jsx(An,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=s?.email;let g;e[15]!==b?(g=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=g):g=e[16];let h;e[17]!==g||e[18]!==x?(h=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,g]}),e[17]=g,e[18]=x,e[19]=h):h=e[19];let j;e[20]!==r||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{ct.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx($s,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=n.jsx(Kt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let N;e[28]!==y?(N=n.jsx(qt,{side:"right",children:n.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=N):N=e[29];let C;e[30]!==v||e[31]!==N?(C=n.jsx(Wt,{delayDuration:300,children:n.jsxs(Gt,{children:[v,N]})}),e[30]=v,e[31]=N,e[32]=C):C=e[32];let S;return e[33]!==h||e[34]!==C||e[35]!==m||e[36]!==d?(S=n.jsxs("div",{className:m,children:[d,h,C]}),e[33]=h,e[34]=C,e[35]=m,e[36]=d,e[37]=S):S=e[37],S}function Ve(t){const e=k.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:l}=t,r=A(),a=l?"size-8":"size-7",m=l?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==m?(c=M("flex items-center justify-between border-t border-border/50",m),e[0]=m,e[1]=c):c=e[1];let d;if(e[2]!==a||e[3]!==i.theme||e[4]!==o||e[5]!==s){let y;e[7]!==a||e[8]!==i.theme||e[9]!==o?(y=N=>{const{value:C,icon:S,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o($=>({...$,theme:C})),className:M(a,"rounded-md flex items-center justify-center transition-colors",i.theme===C?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},C)},e[7]=a,e[8]=i.theme,e[9]=o,e[10]=y):y=e[10],d=s.map(y),e[2]=a,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=d}else d=e[6];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center gap-0.5",children:d}),e[11]=d,e[12]=f):f=e[12];let p;e[13]!==i.enableSounds||e[14]!==r?(p=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(Mn),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==x?(b=M(a,"rounded-md flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=b):b=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?n.jsx(Ms,{size:14}):n.jsx(Os,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let h;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==g?(h=n.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:g}),e[23]=p,e[24]=u,e[25]=b,e[26]=g,e[27]=h):h=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.288.1"]}),e[28]=j):j=e[28];let _;e[29]!==h?(_=n.jsxs("div",{className:"flex items-center gap-2",children:[h,j]}),e[29]=h,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==f?(v=n.jsxs("div",{className:c,children:[f,_]}),e[31]=_,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function Mn(t){return{...t,enableSounds:!t.enableSounds}}function Ye(t){const e=k.c(54),{user:s,userImage:i,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:f,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==s||e[2]!==i?(v=n.jsx(Qe,{user:s,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=s,e[2]=i,e[3]=v):v=e[3];let y;if(e[4]!==f||e[5]!==o){let I;e[7]!==f?(I=O=>n.jsx(ae,{item:O,onClose:f},O.key),e[7]=f,e[8]=I):I=e[8],y=o.map(I),e[4]=f,e[5]=o,e[6]=y}else y=e[6];let N;e[9]!==f||e[10]!==r?(N=r&&n.jsx(ae,{item:r,onClose:f}),e[9]=f,e[10]=r,e[11]=N):N=e[11];let C;e[12]!==f||e[13]!==l?(C=n.jsx(ae,{item:l,onClose:f}),e[12]=f,e[13]=l,e[14]=C):C=e[14];let S;e[15]!==y||e[16]!==N||e[17]!==C?(S=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,N,C]})}),e[15]=y,e[16]=N,e[17]=C,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==d||e[21]!==m?(w=n.jsx(Ve,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=m,e[22]=w):w=e[22];let $;return e[23]!==v||e[24]!==S||e[25]!==w?($=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,S,w]}),e[23]=v,e[24]=S,e[25]=w,e[26]=$):$=e[26],$}let u;e[27]!==a||e[28]!==s||e[29]!==i?(u=n.jsx(Qe,{user:s,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=s,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==f||e[32]!==o){let v;e[34]!==f?(v=y=>n.jsx(ae,{item:y,onClose:f},y.key),e[34]=f,e[35]=v):v=e[35],x=o.map(v),e[31]=f,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==f||e[37]!==r?(b=r&&n.jsx(ae,{item:r,onClose:f}),e[36]=f,e[37]=r,e[38]=b):b=e[38];let g;e[39]!==f||e[40]!==l?(g=n.jsx(ae,{item:l,onClose:f}),e[39]=f,e[40]=l,e[41]=g):g=e[41];let h;e[42]!==x||e[43]!==b||e[44]!==g?(h=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,g]}),e[42]=x,e[43]=b,e[44]=g,e[45]=h):h=e[45];let j;e[46]!==c||e[47]!==d||e[48]!==m?(j=n.jsx(Ve,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=m,e[49]=j):j=e[49];let _;return e[50]!==u||e[51]!==h||e[52]!==j?(_=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[u,h,j]})}),e[50]=u,e[51]=h,e[52]=j,e[53]=_):_=e[53],_}function Te(){const t=k.c(107),e=A(),{data:s}=ce.useSession(),{org:i}=T(),o=L();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=Lt(l)?.params.org,[m,c]=rt(),d=at(),{isAdmin:f}=Ws(),p=Gs(),[u,x]=P.useState(!1),[b,g]=P.useState(!1),h=s?.user,j=h?.image,_=!!s?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>x(!1),t[1]=v):v=t[1];const y=v;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let C;t[4]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(de,{size:16}),t[4]=C):C=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let w;t[8]!==N||t[9]!==S?(w={key:"preferences",label:N,icon:C,onClick:S},t[8]=N,t[9]=S,t[10]=w):w=t[10];let $;t[11]!==i||t[12]!==o?($=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(Es,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=$):$=t[13];let I;t[14]!==p||t[15]!==e?(I=(as()||We())&&!p?[{key:"install-desktop-app",label:We()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Is,{size:16}),onClick:()=>g(!0)}]:[],t[14]=p,t[15]=e,t[16]=I):I=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let fe;t[19]===Symbol.for("react.memo_cache_sentinel")?(fe=n.jsx(As,{size:16}),t[19]=fe):fe=t[19];let B;t[20]!==O?(B={key:"terms",label:O,icon:fe,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=B):B=t[21];let K;t[22]!==e?(K=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=K):K=t[23];let ue;t[24]===Symbol.for("react.memo_cache_sentinel")?(ue=n.jsx(Bs,{size:16}),t[24]=ue):ue=t[24];let q;t[25]!==K?(q={key:"privacy",label:K,icon:ue,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=K,t[26]=q):q=t[26];let W;t[27]!==e?(W=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=W):W=t[28];let pe;t[29]===Symbol.for("react.memo_cache_sentinel")?(pe=n.jsx(Ut,{className:"w-4 h-4"}),t[29]=pe):pe=t[29];let G;t[30]!==W?(G={key:"github",label:W,icon:pe,href:"https://github.com/decocms/studio",external:!0},t[30]=W,t[31]=G):G=t[31];let H;t[32]!==e?(H=e("common.accountPopover.community"),t[32]=e,t[33]=H):H=t[33];let xe;t[34]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(qs,{size:16}),t[34]=xe):xe=t[34];let Q;t[35]!==H?(Q={key:"community",label:H,icon:xe,href:"https://decocms.com/discord",external:!0},t[35]=H,t[36]=Q):Q=t[36];let V;t[37]!==e?(V=e("common.accountPopover.homepage"),t[37]=e,t[38]=V):V=t[38];let he;t[39]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(Ts,{size:16}),t[39]=he):he=t[39];let Y;t[40]!==V?(Y={key:"homepage",label:V,icon:he,href:"https://decocms.com",external:!0},t[40]=V,t[41]=Y):Y=t[41];let X;t[42]!==f||t[43]!==o||t[44]!==e?(X=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(Ks,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=f,t[43]=o,t[44]=e,t[45]=X):X=t[45];let be;t[46]!==B||t[47]!==q||t[48]!==G||t[49]!==Q||t[50]!==Y||t[51]!==X||t[52]!==w||t[53]!==$||t[54]!==I?(be=[w,...$,...I,B,q,G,Q,Y,...X],t[46]=B,t[47]=q,t[48]=G,t[49]=Q,t[50]=Y,t[51]=X,t[52]=w,t[53]=$,t[54]=I,t[55]=be):be=t[55];const Ae=be;let J;t[56]!==e?(J=e("common.accountPopover.signOut"),t[56]=e,t[57]=J):J=t[57];let ge;t[58]===Symbol.for("react.memo_cache_sentinel")?(ge=n.jsx(Ge,{size:16}),t[58]=ge):ge=t[58];let je;t[59]!==J?(je={key:"logout",label:J,icon:ge,onClick:Pn},t[59]=J,t[60]=je):je=t[60];const Me=je;let ve;t[61]!==_||t[62]!==e?(ve=_?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ge,{size:16}),onClick:async()=>{const{error:qe}=await ce.admin.stopImpersonating();if(qe){ct.error(qe.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=_,t[62]=e,t[63]=ve):ve=t[63];const Oe=ve;let ye;t[64]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(Ls,{size:14}),t[64]=ye):ye=t[64];let Z;t[65]!==e?(Z=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=Z):Z=t[66];let ee;t[67]!==Z?(ee={value:"light",icon:ye,label:Z},t[67]=Z,t[68]=ee):ee=t[68];let Se;t[69]===Symbol.for("react.memo_cache_sentinel")?(Se=n.jsx(Us,{size:14}),t[69]=Se):Se=t[69];let te;t[70]!==e?(te=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=te):te=t[71];let se;t[72]!==te?(se={value:"dark",icon:Se,label:te},t[72]=te,t[73]=se):se=t[73];let _e;t[74]===Symbol.for("react.memo_cache_sentinel")?(_e=n.jsx(Fs,{size:14}),t[74]=_e):_e=t[74];let ne;t[75]!==e?(ne=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=ne):ne=t[76];let oe;t[77]!==ne?(oe={value:"system",icon:_e,label:ne},t[77]=ne,t[78]=oe):oe=t[78];let Ne;t[79]!==ee||t[80]!==se||t[81]!==oe?(Ne=[ee,se,oe],t[79]=ee,t[80]=se,t[81]=oe,t[82]=Ne):Ne=t[82];const Pe=Ne;let Ce;t[83]!==_||t[84]!==d||t[85]!==Ae||t[86]!==m||t[87]!==c||t[88]!==Me||t[89]!==Oe||t[90]!==Pe||t[91]!==h||t[92]!==j?(Ce={user:h,userImage:j,menuItems:Ae,signOutItem:Me,stopImpersonatingItem:Oe,isImpersonating:_,themeOptions:Pe,preferences:m,setPreferences:c,close:y,isMobile:d},t[83]=_,t[84]=d,t[85]=Ae,t[86]=m,t[87]=c,t[88]=Me,t[89]=Oe,t[90]=Pe,t[91]=h,t[92]=j,t[93]=Ce):Ce=t[93];const ke=Ce;let ie;t[94]!==_||t[95]!==d||t[96]!==u||t[97]!==ke||t[98]!==e||t[99]!==h?.name||t[100]!==j?(ie=d?n.jsxs(Cs,{open:u,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:M("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",_&&"border-2 border-dashed border-warning"),children:[n.jsx($e,{url:j,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(ks,{className:"h-[80dvh] p-0",children:[n.jsx(ws,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Ye,{...ke})]})]}):n.jsxs(ht,{open:u,onOpenChange:x,children:[n.jsx(Ue,{asChild:!0,children:n.jsxs(R,{tooltip:h?.name??e("common.accountPopover.defaultAccountLabel"),className:M("rounded-md",_&&"border-2 border-dashed border-warning"),children:[n.jsx($e,{url:j,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:On,children:n.jsx(Ye,{...ke})})]}),t[94]=_,t[95]=d,t[96]=u,t[97]=ke,t[98]=e,t[99]=h?.name,t[100]=j,t[101]=ie):ie=t[101];let le;t[102]!==b?(le=n.jsx(cs,{open:b,onOpenChange:g}),t[102]=b,t[103]=le):le=t[103];let we;return t[104]!==ie||t[105]!==le?(we=n.jsxs(n.Fragment,{children:[ie,le]}),t[104]=ie,t[105]=le,t[106]=we):we=t[106],we}function On(t){return t.preventDefault()}function Pn(){E("signed_out",{source:"account_popover"}),Bt(),ce.signOut()}class zn extends P.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Rn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Dn(){const t=k.c(17),e=L(),{org:s}=T(),{hasDecoKey:i,balanceDollars:o}=js();if(!i)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=M(o!=null&&Rn(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==s.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ps,{}),t[7]=m):m=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let d;t[10]!==c?(d=n.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let f;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==d?(f=n.jsx(D,{children:n.jsx(z,{children:n.jsxs(R,{tooltip:l,className:r,onClick:a,children:[m,d]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=d,t[16]=f):f=t[16],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zn,{children:n.jsx(P.Suspense,{fallback:null,children:n.jsx(Dn,{})})}),t[0]=e):e=t[0],e}const Tn=6e4;function En(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Fn(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const a=r.notifications.filter(m=>s&&!s.has(m.id)?!0:(i++,!1));return{...r,notifications:a}}),l=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:l}))}}function Ln(t,e){const s=k.c(4),{data:i}=ce.useSession(),o=i?.user?.id;let l;s[0]!==e||s[1]!==t||s[2]!==o?(l=r=>!t||!o?Kn:Xs.subscribe(t,m=>{try{if(JSON.parse(m.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=l):l=s[3],P.useSyncExternalStore(l,Bn,Un)}function Un(){return 0}function Bn(){return 0}function Kn(){}function At(){const t=k.c(37),{locator:e,org:s}=T(),i=Ht(),o=Qt();let l;t[0]!==e?(l=st.notifications(e),t[0]=e,t[1]=l):l=t[1];const r=l;let a;t[2]!==i?(a=S=>{const{pageParam:w}=S;return En(i,w)},t[2]=i,t[3]=a):a=t[3];let m;t[4]!==r||t[5]!==a?(m={queryKey:r,queryFn:a,initialPageParam:void 0,getNextPageParam:Gn,refetchInterval:Tn},t[4]=r,t[5]=a,t[6]=m):m=t[6];const c=Ys(m);let d;t[7]!==o||t[8]!==r?(d=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=d):d=t[9],Ln(s.slug,d);let f;t[10]!==i?(f=S=>i.call("NOTIFICATION_MARK_READ",S?{ids:S}:{}),t[10]=i,t[11]=f):f=t[11];let p,u;t[12]!==o||t[13]!==r?(p=async S=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,w=>Fn(w,S))},u=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=p,t[15]=u):(p=t[14],u=t[15]);let x;t[16]!==f||t[17]!==p||t[18]!==u?(x={mutationFn:f,onMutate:p,onSettled:u},t[16]=f,t[17]=p,t[18]=u,t[19]=x):x=t[19];const b=Re(x);let g;t[20]!==c.data?.pages?(g=c.data?.pages??[],t[20]=c.data?.pages,t[21]=g):g=t[21];const h=g;let j;t[22]!==h?(j=h.flatMap(qn),t[22]=h,t[23]=j):j=t[23];const _=h[0]?.unreadCount??0;let v;t[24]!==c?(v=()=>{c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},t[24]=c,t[25]=v):v=t[25];let y,N;t[26]!==b?(y=()=>b.mutate(null),N=S=>b.mutate([S]),t[26]=b,t[27]=y,t[28]=N):(y=t[27],N=t[28]);let C;return t[29]!==c.hasNextPage||t[30]!==c.isFetchingNextPage||t[31]!==_||t[32]!==v||t[33]!==y||t[34]!==N||t[35]!==j?(C={updates:j,redDotCount:_,hasMore:c.hasNextPage,isFetchingMore:c.isFetchingNextPage,fetchMore:v,markAllRead:y,markRead:N},t[29]=c.hasNextPage,t[30]=c.isFetchingNextPage,t[31]=_,t[32]=v,t[33]=y,t[34]=N,t[35]=j,t[36]=C):C=t[36],C}function qn(t){return t.notifications.map(Wn)}function Wn(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Gn(t){return t.nextCursor??void 0}function Hn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function Qn(t){const e=k.c(28),{update:s,orgSlug:i,onSelect:o}=t,l=A();let r;e[0]!==i||e[1]!==s.taskKeySeq?(r=vt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const a=r,m=!s.actorName;let c;e[3]!==m||e[4]!==s.actorImage||e[5]!==s.actorName?(c=m?n.jsx(Js,{size:24,className:"shrink-0"}):n.jsx($e,{url:s.actorImage??void 0,fallback:en(s.actorName??void 0),shape:"circle",size:"xs",className:"shrink-0"}),e[3]=m,e[4]=s.actorImage,e[5]=s.actorName,e[6]=c):c=e[6];const d=a?`${a} · `:"";let f;e[7]!==d||e[8]!==s.taskTitle?(f=n.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[d,s.taskTitle]}),e[7]=d,e[8]=s.taskTitle,e[9]=f):f=e[9];let p;e[10]!==l||e[11]!==s?(p=Hn(s,l),e[10]=l,e[11]=s,e[12]=p):p=e[12];let u;e[13]!==p?(u=n.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:p}),e[13]=p,e[14]=u):u=e[14];let x;e[15]!==f||e[16]!==u?(x=n.jsxs("div",{className:"min-w-0 flex-1",children:[f,u]}),e[15]=f,e[16]=u,e[17]=x):x=e[17];let b;e[18]!==s.occurredAt?(b=tn(new Date(s.occurredAt)),e[18]=s.occurredAt,e[19]=b):b=e[19];let g;e[20]!==b?(g=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:b}),e[20]=b,e[21]=g):g=e[21];let h;e[22]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Zs,{size:16,className:"shrink-0 text-muted-foreground"}),e[22]=h):h=e[22];let j;return e[23]!==o||e[24]!==c||e[25]!==x||e[26]!==g?(j=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[c,x,g,h]}),e[23]=o,e[24]=c,e[25]=x,e[26]=g,e[27]=j):j=e[27],j}function Vn(t){const e=k.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Yn)&&s()});return l.observe(o),()=>l.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function Yn(t){return t.isIntersecting}function Xn(t){const e=k.c(23),{onClose:s}=t,i=A(),o=L(),{org:l}=T(),{updates:r,markAllRead:a,markRead:m,hasMore:c,fetchMore:d}=At();let f;e[0]!==i?(f=i("sidebar.inbox.title"),e[0]=i,e[1]=f):f=e[1];let p;e[2]!==f?(p=n.jsx("h3",{className:"text-sm font-medium",children:f}),e[2]=f,e[3]=p):p=e[3];let u;e[4]!==a||e[5]!==i||e[6]!==r.length?(u=r.length>0&&n.jsx(Ie,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:a,children:i("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=i,e[6]=r.length,e[7]=u):u=e[7];let x;e[8]!==p||e[9]!==u?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[p,u]}),e[8]=p,e[9]=u,e[10]=x):x=e[10];let b;e[11]!==d||e[12]!==c||e[13]!==m||e[14]!==o||e[15]!==s||e[16]!==l||e[17]!==i||e[18]!==r?(b=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(Be,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Vs,{className:"min-h-0 flex-1",children:[r.map(h=>{const j=vt(l.slug,h.taskKeySeq);return n.jsx(Qn,{update:h,orgSlug:l.slug,onSelect:()=>{m(h.id),s(),j&&o({to:"/$org/t/$taskKey",params:{org:l.slug,taskKey:j}})}},h.id)}),c&&n.jsx(Vn,{onReach:d})]}),e[11]=d,e[12]=c,e[13]=m,e[14]=o,e[15]=s,e[16]=l,e[17]=i,e[18]=r,e[19]=b):b=e[19];let g;return e[20]!==x||e[21]!==b?(g=n.jsxs(n.Fragment,{children:[x,b]}),e[20]=x,e[21]=b,e[22]=g):g=e[22],g}function Mt(){const t=k.c(1),{redDotCount:e}=At();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Ot(t){const e=k.c(11),{open:s,onOpenChange:i,side:o,children:l}=t;let r;e[0]!==i||e[1]!==s?(r=s&&n.jsx(Xn,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==r?(a=n.jsx(bt,{side:o,align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5];let m;return e[6]!==l||e[7]!==i||e[8]!==s||e[9]!==a?(m=n.jsxs(ht,{open:s,onOpenChange:i,children:[l,a]}),e[6]=l,e[7]=i,e[8]=s,e[9]=a,e[10]=m):m=e[10],m}function Pt(){const t=k.c(9),e=A(),[s,i]=P.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Be,{size:15}),r=n.jsx(Mt,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let m;return t[6]!==s||t[7]!==a?(m=n.jsx(Ot,{open:s,onOpenChange:i,side:"top",children:a}),t[6]=s,t[7]=a,t[8]=m):m=t[8],m}function Jn(){const t=k.c(15),e=A(),[s,i]=P.useState(!1),{state:o}=U();let l;t[0]!==o||t[1]!==e?(l=o==="collapsed"?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=l):l=t[2];let r,a;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Be,{}),a=n.jsx(Mt,{}),t[3]=r,t[4]=a):(r=t[3],a=t[4]);let m;t[5]!==e?(m=e("sidebar.inbox.title"),t[5]=e,t[6]=m):m=t[6];let c;t[7]!==m?(c=n.jsx("span",{className:"truncate",children:m}),t[7]=m,t[8]=c):c=t[8];let d;t[9]!==l||t[10]!==c?(d=n.jsx(Ue,{asChild:!0,children:n.jsxs(R,{tooltip:l,className:"relative",children:[r,a,c]})}),t[9]=l,t[10]=c,t[11]=d):d=t[11];let f;return t[12]!==s||t[13]!==d?(f=n.jsx(Ot,{open:s,onOpenChange:i,side:"right",children:d}),t[12]=s,t[13]=d,t[14]=f):f=t[14],f}function Zn(){const t=k.c(14),e=A(),s=L(),{org:i}=T();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==s||t[3]!==i.slug?(l=()=>s({to:"/$org/settings",params:{org:i.slug}}),t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let m;t[8]!==a?(m=n.jsx("span",{children:a}),t[8]=a,t[9]=m):m=t[9];let c;return t[10]!==o||t[11]!==l||t[12]!==m?(c=n.jsxs(R,{tooltip:o,onClick:l,children:[r,m]}),t[10]=o,t[11]=l,t[12]=m,t[13]=c):c=t[13],c}function eo(){const t=k.c(9),e=A(),s=L(),{org:i}=T();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==s||t[3]!==i.slug?(l=()=>s({to:"/$org/settings",params:{org:i.slug}}),t[2]=s,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==l?(a=n.jsx("button",{type:"button","aria-label":o,onClick:l,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=l,t[8]=a):a=t[8],a}function Je(){const t=k.c(29),e=A(),[s,i]=P.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(gt,{}),t[2]=l):l=t[2];let r;t[3]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=r):r=t[4];let a;t[5]!==r?(a=n.jsx("span",{children:r}),t[5]=r,t[6]=a):a=t[6];let m;t[7]!==o||t[8]!==a?(m=n.jsx(z,{children:n.jsx(jt,{trigger:n.jsxs(R,{tooltip:o,children:[l,a]})})}),t[7]=o,t[8]=a,t[9]=m):m=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let d,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(!0),f=n.jsx(Hs,{}),t[12]=d,t[13]=f):(d=t[12],f=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=n.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=n.jsx(z,{children:n.jsxs(R,{tooltip:c,onClick:d,children:[f,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let b;t[21]!==x||t[22]!==m?(b=n.jsxs(D,{className:"gap-0.5",children:[m,x]}),t[21]=x,t[22]=m,t[23]=b):b=t[23];let g;t[24]!==s?(g=n.jsx(vs,{open:s,onOpenChange:i,mode:"browse"}),t[24]=s,t[25]=g):g=t[25];let h;return t[26]!==b||t[27]!==g?(h=n.jsxs(n.Fragment,{children:[b,g]}),t[26]=b,t[27]=g,t[28]=h):h=t[28],h}function Ze(){const t=k.c(10),e=A();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(gt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let l;t[5]!==o?(l=n.jsx("span",{children:o}),t[5]=o,t[6]=l):l=t[6];let r;return t[7]!==s||t[8]!==l?(r=n.jsx(D,{className:"gap-0.5",children:n.jsx(z,{children:n.jsx(jt,{trigger:n.jsxs(R,{tooltip:s,children:[i,l]})})})}),t[7]=s,t[8]=l,t[9]=r):r=t[9],r}function to(){const t=k.c(18),{state:e}=U(),s=e==="collapsed",i=xs(),o=!i;if(s){let c;t[0]!==o?(c=o&&n.jsx(Xe,{}),t[0]=o,t[1]=c):c=t[1];let d;t[2]!==i?(d=i?n.jsx(Ze,{}):n.jsx(Je,{}),t[2]=i,t[3]=d):d=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(z,{children:n.jsx(Jn,{})}),t[4]=f):f=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(z,{children:n.jsx(Zn,{})}),t[5]=p):p=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(D,{children:[f,p,n.jsx(z,{children:n.jsx(Te,{})})]}),t[6]=u):u=t[6];let x;return t[7]!==c||t[8]!==d?(x=n.jsxs(De,{className:"px-2 pb-3 gap-1",children:[c,d,u]}),t[7]=c,t[8]=d,t[9]=x):x=t[9],x}let l;t[10]!==o?(l=o&&n.jsx(Xe,{}),t[10]=o,t[11]=l):l=t[11];let r;t[12]!==i?(r=i?n.jsx(Ze,{}):n.jsx(Je,{}),t[12]=i,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(D,{className:"gap-0.5",children:n.jsx(z,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Te,{})}),n.jsx(Pt,{}),n.jsx(eo,{})]})})}),t[14]=a):a=t[14];let m;return t[15]!==l||t[16]!==r?(m=n.jsxs(De,{className:"px-2 pb-3 gap-0.5",children:[l,r,a]}),t[15]=l,t[16]=r,t[17]=m):m=t[17],m}function so(){const t=k.c(12),e=A(),s=L(),{org:i}=T(),{setOpenMobile:o}=U();let l,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(D,{children:n.jsx(z,{children:n.jsx(Te,{})})})}),r=n.jsx(Pt,{}),t[0]=l,t[1]=r):(l=t[0],r=t[1]);let a;t[2]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==s||t[5]!==i.slug||t[6]!==o?(m=()=>{s({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[4]=s,t[5]=i.slug,t[6]=o,t[7]=m):m=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(de,{className:"size-4"}),t[8]=c):c=t[8];let d;return t[9]!==a||t[10]!==m?(d=n.jsx(De,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[l,r,n.jsx(xt,{"aria-label":a,onClick:m,children:c})]})}),t[9]=a,t[10]=m,t[11]=d):d=t[11],d}const no=5,oo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function io(){const t=k.c(3),{state:e}=U();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:no}).map(ao)}),t[0]=o):o=t[0],o}let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(F,{className:"size-6 rounded-md"}),n.jsx(F,{className:"size-6 rounded-md"}),n.jsx(F,{className:"size-6 rounded-md"})]}),n.jsx(F,{className:"h-6 w-20 rounded-md"})]}),t[1]=s):s=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,n.jsx("div",{className:"flex flex-col gap-0.5",children:oo.map(lo)})]}),t[2]=i):i=t[2],i}function lo(t,e){return n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[n.jsx(F,{className:"size-5 rounded-full shrink-0"}),n.jsx(F,{className:M("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(ro)})]},e)}function ro(t,e){return n.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:n.jsx(F,{className:"h-3 flex-1 rounded-sm"})},e)}function ao(t,e){return n.jsx(F,{className:"size-10 rounded-lg mx-auto"},e)}function co(){const t=k.c(2),{org:e}=T();let s;return t[0]!==e.id?(s=us(e.id),t[0]=e.id,t[1]=s):s=t[1],s.id}function mo(t){const e=k.c(38);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:i}=s,o=A(),l=L();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[2]=r):r=e[2];const a=Le(r),{diagnostic:m,connectionId:c}=ys(),d=co(),{threads:f}=yt(),{data:p}=ce.useSession(),{setTaskId:u,createNewTask:x}=St(),b=Ss(),g=!a.virtualmcpid||a.virtualmcpid===d;let h;e[3]!==x||e[4]!==d||e[5]!==l||e[6]!==i||e[7]!==g||e[8]!==b||e[9]!==p?.user?.id||e[10]!==u||e[11]!==f?(h=S=>{if(E("nav_destination_clicked",{destination:S}),i?.(),g){l({to:".",search:$=>({...$,main:S}),replace:!0});return}const w=_t(f,d,p?.user?.id,b(d));w?u(w.id,d,{main:S}):x(d,void 0,{main:S})},e[3]=x,e[4]=d,e[5]=l,e[6]=i,e[7]=g,e[8]=b,e[9]=p?.user?.id,e[10]=u,e[11]=f,e[12]=h):h=e[12];const j=h,_=a.main===0||!a.main?g?"overview":null:a.main;let v;e[13]!==_||e[14]!==j?(v=(S,w,$)=>({key:S,label:w,icon:$,isActive:_===S,onSelect:()=>j(S)}),e[13]=_,e[14]=j,e[15]=v):v=e[15];const y=v;let N;if(e[16]!==y||e[17]!==o){let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(zs,{size:16}),e[19]=S):S=e[19],N=y("overview",o("sidebar.navDestinations.home"),S),e[16]=y,e[17]=o,e[18]=N}else N=e[18];let C;if(e[20]!==c||e[21]!==y||e[22]!==m||e[23]!==o||e[24]!==N){C=[N];let S;if(e[26]!==c||e[27]!==y||e[28]!==m||e[29]!==o){let I;e[31]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Rs,{size:16}),e[31]=I):I=e[31],S=y(m?mt(c,dt):"reports",o("sidebar.navDestinations.reports"),I),e[26]=c,e[27]=y,e[28]=m,e[29]=o,e[30]=S}else S=e[30];C.push(S);let w,$;if(e[32]!==y||e[33]!==o){let I;e[36]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Qs,{size:16}),e[36]=I):I=e[36],w=y("board",o("sidebar.navDestinations.tasks"),I);let O;e[37]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(sn,{size:16}),e[37]=O):O=e[37],$=y("files",o("sidebar.navDestinations.library"),O),e[32]=y,e[33]=o,e[34]=w,e[35]=$}else w=e[34],$=e[35];C.push(w,$),e[20]=c,e[21]=y,e[22]=m,e[23]=o,e[24]=N,e[25]=C}else C=e[25];return C}function et(t,e){const s=k.c(14);let i;s[0]!==e?(i=e===void 0?{}:e,s[0]=e,s[1]=i):i=s[1];const{onNavigate:o}=i;let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},s[2]=l):l=s[2];const r=Le(l),a=nn()??[],m=on(a),{threads:c}=yt(),{data:d}=ce.useSession(),{setTaskId:f,createNewTask:p,openTab:u}=St();let x;s[3]!==p||s[4]!==o||s[5]!==d?.user?.id||s[6]!==f||s[7]!==c?(x=(h,j)=>{o?.();const _=_t(c,h.id,d?.user?.id,mn(h.metadata));_?f(_.id,h.id,j):p(h.id,void 0,j)},s[3]=p,s[4]=o,s[5]=d?.user?.id,s[6]=f,s[7]=c,s[8]=x):x=s[8];const b=x;let g;return s[9]!==o||s[10]!==b||s[11]!==u||s[12]!==r?(g=h=>{const j=an(h),_=r.virtualmcpid===h.id;return{key:h.id,label:h.title||j?.name||"",icon:n.jsx(Ds,{icon:h.icon,name:h.title,size:"2xs",className:"shrink-0"}),isActive:_,onSelect:()=>{E("nav_destination_clicked",{destination:"coding_agent"}),b(h)},onOpenSettings:()=>{E("nav_destination_clicked",{destination:"coding_agent_settings"}),_?(o?.(),u("settings")):b(h,{main:"settings"})}}},s[9]=o,s[10]=b,s[11]=u,s[12]=r,s[13]=g):g=s[13],a.filter(h=>t(h,m)).map(g)}function fo(t){const e=k.c(19),{onNavigate:s}=t,i=A();let o;e[0]!==s?(o={onNavigate:s},e[0]=s,e[1]=o):o=e[1];const l=mo(o);let r;e[2]!==s?(r={onNavigate:s},e[2]=s,e[3]=r):r=e[3];const a=et(po,r);let m;e[4]!==s?(m={onNavigate:s},e[4]=s,e[5]=m):m=e[5];const c=et(uo,m),d=[...a,...c],[f]=rt(),{showProjectSettingsGear:p}=f,{state:u,isMobile:x}=U(),b=u==="collapsed"&&!x;let g;e[6]!==b||e[7]!==x||e[8]!==p||e[9]!==i?(g=S=>{const w=S.onOpenSettings&&p&&!b;return n.jsxs(z,{children:[n.jsxs(R,{onClick:S.onSelect,isActive:S.isActive,"aria-current":S.isActive?"page":void 0,tooltip:b?S.label:void 0,className:M(w&&"group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground"),children:[S.icon,n.jsx("span",{className:M("truncate",w&&"pr-7"),children:S.label})]}),w&&n.jsx(Ie,{variant:"ghost",size:"icon-sm","aria-label":i("sidebar.navDestinations.projectSettings",{name:S.label}),onClick:S.onOpenSettings,className:M("absolute right-1 top-1/2 -translate-y-1/2 text-sidebar-foreground/60 hover:text-sidebar-foreground/60",x?"opacity-100":"opacity-0 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100"),children:n.jsx(de,{})})]},S.key)},e[6]=b,e[7]=x,e[8]=p,e[9]=i,e[10]=g):g=e[10];const h=g,j=D,_="gap-1";let v;e[11]!==l||e[12]!==h?(v=l.map(h),e[11]=l,e[12]=h,e[13]=v):v=e[13];const y=d.length>0&&n.jsx("li",{"aria-hidden":!0,className:"h-2"}),N=d.map(h);let C;return e[14]!==j||e[15]!==v||e[16]!==y||e[17]!==N?(C=n.jsxs(j,{className:_,children:[v,y,N]}),e[14]=j,e[15]=v,e[16]=y,e[17]=N,e[18]=C):C=e[18],C}function uo(t,e){return rn(t)&&!e.has(t.id)}function po(t){return ln(t.metadata)}function xo(t){const e=k.c(29);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:i}=s,o=A(),{org:l}=T(),{state:r,isMobile:a,toggleSidebar:m}=U(),c=r==="collapsed"&&!a;let d;e[2]!==i?(d=n.jsx(fo,{onNavigate:i}),e[2]=i,e[3]=d):d=e[3];const f=d;if(c){let u;e[4]!==l?(u=n.jsx(Ns,{org:l,size:"sm"}),e[4]=l,e[5]=u):u=e[5];let x;e[6]!==l.name||e[7]!==u?(x=n.jsx(R,{tooltip:l.name,children:u}),e[6]=l.name,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==l.slug||e[10]!==x?(b=n.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:n.jsx(_s,{orgParam:l.slug,side:"right",align:"start",trigger:x})}),e[9]=l.slug,e[10]=x,e[11]=b):b=e[11];let g;e[12]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=g):g=e[13];let h;e[14]!==o?(h=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=h):h=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(lt,{size:16}),e[16]=j):j=e[16];let _;e[17]!==g||e[18]!==h||e[19]!==m?(_=n.jsx(D,{className:"mt-2 gap-1.5",children:n.jsx(z,{children:n.jsx(R,{"aria-label":g,tooltip:h,onClick:m,children:j})})}),e[17]=g,e[18]=h,e[19]=m,e[20]=_):_=e[20];let v;e[21]!==f?(v=n.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:f}),e[21]=f,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==b||e[25]!==_?(y=n.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[b,_,v]}),e[23]=v,e[24]=b,e[25]=_,e[26]=y):y=e[26],y}let p;return e[27]!==f?(p=n.jsx("div",{className:"flex flex-col h-full min-h-0",children:n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:f})}),e[27]=f,e[28]=p):p=e[28],p}function ho(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs(n.Fragment,{children:[n.jsx(pt,{showName:!0}),n.jsx(Ct,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=e):e=t[0],e}function zt(t){const e=k.c(3),{onNavigate:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(io,{}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsx(tt,{children:n.jsx(P.Suspense,{fallback:i,children:n.jsx(xo,{onNavigate:s})})}),e[1]=s,e[2]=o):o=e[2],o}function bo(){const t=k.c(5),e=kt();let s,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(to,{}),i=n.jsx(ho,{}),o=n.jsx(zt,{}),t[0]=s,t[1]=i,t[2]=o):(s=t[0],i=t[1],o=t[2]);let l;return t[3]!==e?(l=n.jsx(Nt,{children:n.jsx(It,{sections:e,footer:s,header:i,additionalContent:o})}),t[3]=e,t[4]=l):l=t[4],l}function go(t){const e=k.c(7),{onClose:s}=t,i=kt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(so,{}),e[0]=o):o=e[0];let l;e[1]!==s?(l=n.jsx(zt,{onNavigate:s}),e[1]=s,e[2]=l):l=e[2];let r;return e[3]!==s||e[4]!==i||e[5]!==l?(r=n.jsx(Nt,{children:n.jsx(In,{sections:i,onClose:s,footer:o,additionalContent:l})}),e[3]=s,e[4]=i,e[5]=l,e[6]=r):r=e[6],r}const jo="sidebar.open";function vo(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Zt,{}),t[0]=e):e=t[0],e}function Tl(){const t=k.c(28),e=at();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const{connect:i,siteUrl:o}=Le(s),l=i==="1",[r,a]=nt(jo,!1),{width:m,wrapperRef:c,onStartResize:d,resetWidth:f}=yn(),p=e;let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(re.Header,{className:"grid-cols-1 px-1",children:n.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[n.jsx(Ct,{}),n.jsx(re.TogglesSlot,{}),n.jsx(re.TabsSlot,{className:"shrink-0"}),n.jsx(re.CenterSlot,{}),n.jsx(re.RightSlot,{})]})}),t[1]=u):u=t[1];const x=u;let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={background:"transparent",containerType:"inline-size"},t[2]=b):b=t[2];let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Vt,{className:"flex flex-col min-h-0",style:b,children:n.jsx("div",{className:"flex flex-col h-full min-h-0",children:n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n.jsx(P.Suspense,{fallback:n.jsx(vo,{}),children:n.jsx(Yt,{})})})})}),t[3]=g):g=t[3];const h=g,j=p&&x,_=`${m}px`;let v;t[4]!==_?(v={"--sidebar-width":_,"--sidebar-width-icon":"3.125rem"},t[4]=_,t[5]=v):v=t[5];const y=v;let N;t[6]!==e||t[7]!==d||t[8]!==f?(N=!e&&n.jsxs(n.Fragment,{children:[n.jsx(bo,{}),n.jsx(gn,{onPointerDown:d,onDoubleClick:f})]}),t[6]=e,t[7]=d,t[8]=f,t[9]=N):N=t[9];let C;t[10]!==y||t[11]!==N||t[12]!==c?(C=n.jsxs(Xt,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:y,children:[N,h]}),t[10]=y,t[11]=N,t[12]=c,t[13]=C):C=t[13];let S;t[14]!==e?(S=e&&n.jsx(dn,{renderSidebar:yo}),t[14]=e,t[15]=S):S=t[15];let w;t[16]!==o||t[17]!==l?(w=l&&n.jsx(un,{siteUrl:o}),t[16]=o,t[17]=l,t[18]=w):w=t[18];let $;t[19]!==S||t[20]!==w||t[21]!==j||t[22]!==C?($=n.jsx(fn,{children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[j,C,S,w]})}),t[19]=S,t[20]=w,t[21]=j,t[22]=C,t[23]=$):$=t[23];let I;return t[24]!==a||t[25]!==r||t[26]!==$?(I=n.jsx(cn,{children:n.jsx(re.Provider,{children:n.jsx(Jt,{open:r,onOpenChange:a,children:$})})}),t[24]=a,t[25]=r,t[26]=$,t[27]=I):I=t[27],I}function yo(t){const{onClose:e}=t;return n.jsx("div",{className:"flex h-full",children:n.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:n.jsx(go,{onClose:e})})})}export{Tl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,H as R,a as _,u as k,r as V,j as h,ah as b,N as v}from"./index-
|
|
1
|
+
import{c as P,H as R,a as _,u as k,r as V,j as h,ah as b,N as v}from"./index-Dwr4Nhsh.js";import{a as y}from"./constants-dLUUoWH7.js";import{u as E}from"./use-virtual-mcp-CebUZNLQ.js";import{u as M}from"./hooks-2fGeLPS1.js";import{f as N}from"./use-organization-settings-0k-gkFLC.js";import{f as U}from"./reusable-new-chat-CzvRy4Pe.js";import{d as $}from"./session-runtime-wVXsCwcJ.js";import"./use-mcp-client-CJOz5swM.js";import"./auth-thjU26aE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BnQ-KPvR.js";import"./task-board-BGs0UCx6.js";function Y(){const t=P.c(14),{org:n}=R(),x=y(n.id).id,{data:I}=_.useSession(),{threads:A,status:S}=M(),{mainAgentId:l,isPending:j}=N(),g=E();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const{connect:m,siteUrl:c,main:d,task:u}=k(a),[C]=V.useState(w);if(j||S.kind==="loading"){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=h.jsx(b,{}),t[1]=e):e=t[1],e}const i=l!=null&&(g??[]).some(e=>e.id===l)?l:x,p=(g??[]).find(e=>e.id===i),f=U(A,i,I?.user?.id,p?$(p.metadata):void 0)?.id??C;let s;t[2]!==n.slug||t[3]!==f?(s={org:n.slug,taskId:f},t[2]=n.slug,t[3]=f,t[4]=s):s=t[4];let o;t[5]!==m||t[6]!==i||t[7]!==d||t[8]!==c||t[9]!==u?(o={virtualmcpid:i,connect:m,siteUrl:c,main:d,task:u},t[5]=m,t[6]=i,t[7]=d,t[8]=c,t[9]=u,t[10]=o):o=t[10];let r;return t[11]!==s||t[12]!==o?(r=h.jsx(v,{to:"/$org/$taskId",params:s,search:o,replace:!0}),t[11]=s,t[12]=o,t[13]=r):r=t[13],r}function w(){return crypto.randomUUID()}export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cc as _}from"./index-
|
|
1
|
+
import{cc as _}from"./index-Dwr4Nhsh.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|