decocms 4.66.0 → 4.66.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-SXoE8n-a.js → AlertCircle-CxUIdGYa.js} +1 -1
- package/dist/client/assets/{AreaChart-BGA3Q3ut.js → AreaChart-CDOsHUx3.js} +1 -1
- package/dist/client/assets/{ArrowUp-w_yrWzIl.js → ArrowUp-Biun7OjU.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B5fSryh2.js → ArrowUpRight-0sQdlxLA.js} +1 -1
- package/dist/client/assets/{Check-BLOgKImX.js → Check-CkfqPPZm.js} +1 -1
- package/dist/client/assets/{CheckCircle-DZfqbe7a.js → CheckCircle-CnqeZ0Hv.js} +1 -1
- package/dist/client/assets/{ChevronDown-BLT5HbhK.js → ChevronDown-DID-qhTJ.js} +1 -1
- package/dist/client/assets/{ChevronRight-DEa9SHrE.js → ChevronRight-EGynmJMX.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cb58zomx.js → ChevronUp-BNSEDwkr.js} +1 -1
- package/dist/client/assets/{Circle-xS-XNWbi.js → Circle-BU1erUD3.js} +1 -1
- package/dist/client/assets/{Copy01-B6iUzmfA.js → Copy01-c5HhQZTS.js} +1 -1
- package/dist/client/assets/{DotsVertical-COspjpCv.js → DotsVertical-MObJXDvx.js} +1 -1
- package/dist/client/assets/{Eye-qasAaBiw.js → Eye-BeYSBfk2.js} +1 -1
- package/dist/client/assets/{FilterLines-BAP0MMyO.js → FilterLines-BTxZy4nU.js} +1 -1
- package/dist/client/assets/{Flag01-DBGHCdmB.js → Flag01-CnkchImt.js} +1 -1
- package/dist/client/assets/{Globe01-DGz_d2fj.js → Globe01-CyCn7UBB.js} +1 -1
- package/dist/client/assets/{Globe04-BL47c47W.js → Globe04-DPSTxkiN.js} +1 -1
- package/dist/client/assets/{HardDrive-ChUv3ESw.js → HardDrive-CXIaZrBs.js} +1 -1
- package/dist/client/assets/{Key01-EmsKaBBE.js → Key01-BdzSN3AW.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BTJCUon_.js → LayoutLeft-CWq5IBJO.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DqvcDL0A.js → LinkExternal01-DGBbsUvZ.js} +1 -1
- package/dist/client/assets/{List-TrNC2jpp.js → List-t7XVCfEQ.js} +1 -1
- package/dist/client/assets/{Monitor01-DYFfuzgX.js → Monitor01-D4Hwyrg5.js} +1 -1
- package/dist/client/assets/{Package-CjF7Ia31.js → Package-CnHLqaRN.js} +1 -1
- package/dist/client/assets/{Palette-JZRU3oXS.js → Palette-DQKMNIPR.js} +1 -1
- package/dist/client/assets/{Play-C9Lmmw1O.js → Play-vfvkB2fW.js} +1 -1
- package/dist/client/assets/{Plus-Dk-fAJV_.js → Plus-BZk8wyMk.js} +1 -1
- package/dist/client/assets/{SearchLg-CgY6Dwp_.js → SearchLg-BQSfTodr.js} +1 -1
- package/dist/client/assets/{SearchMd-CL8C6iCG.js → SearchMd-D-j4ftM7.js} +1 -1
- package/dist/client/assets/{Settings02-DOGMCiCj.js → Settings02-puxbzUx6.js} +1 -1
- package/dist/client/assets/{Shield01-B-4Xl6E4.js → Shield01-BauXr6UE.js} +1 -1
- package/dist/client/assets/{Star01-Dxk41U9K.js → Star01-DorK2zjm.js} +1 -1
- package/dist/client/assets/{Stars01-C6xII_m0.js → Stars01-CDL68-ZS.js} +1 -1
- package/dist/client/assets/{Stars02-1PwE70zL.js → Stars02-ChI_Fy69.js} +1 -1
- package/dist/client/assets/{Sun-Dzth8R6o.js → Sun-BuOq-2sy.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BPHDsuu3.js → SwitchHorizontal01-BMIQQkV5.js} +1 -1
- package/dist/client/assets/{Tool01-zISQ4iTO.js → Tool01-DnUa_94Y.js} +1 -1
- package/dist/client/assets/{Tool02-unFaslqY.js → Tool02-COOTxAcQ.js} +1 -1
- package/dist/client/assets/{Trash01-C-BZvEfh.js → Trash01-DMuXTRwV.js} +1 -1
- package/dist/client/assets/{TrendUp01-Ci9aFQYK.js → TrendUp01-Dn28OxFx.js} +1 -1
- package/dist/client/assets/{Upload01-DtHS2sYU.js → Upload01-Dj2T6dOw.js} +1 -1
- package/dist/client/assets/{User01-bf0dyKkX.js → User01-ClQ1WfKr.js} +1 -1
- package/dist/client/assets/{UserPlus01-D3WaVhp_.js → UserPlus01-CUKF7g_W.js} +1 -1
- package/dist/client/assets/{Users01-FEt2FDyK.js → Users01-CfTDLPBI.js} +1 -1
- package/dist/client/assets/{Users03-kc-LsXQp.js → Users03-BDVEfWax.js} +1 -1
- package/dist/client/assets/{X-DNyzg7g8.js → X-BuCwuCXH.js} +1 -1
- package/dist/client/assets/{XCircle-BacveYlN.js → XCircle-Bo0ZQquh.js} +1 -1
- package/dist/client/assets/{XClose-DXkvSdei.js → XClose-BHWzJf5f.js} +1 -1
- package/dist/client/assets/{Zap-VsBSZpVz.js → Zap-DjbD6Tcl.js} +1 -1
- package/dist/client/assets/{ZapSquare-BE9hDUmr.js → ZapSquare-DPT2Ftch.js} +1 -1
- package/dist/client/assets/{ZoomOut-OJElVwKK.js → ZoomOut-DqVsDQ63.js} +1 -1
- package/dist/client/assets/{access-gate-C2BFH-iT.js → access-gate-BHDSj404.js} +1 -1
- package/dist/client/assets/{add-section-modal-BTqY-Wax.js → add-section-modal-0-cEfW7d.js} +1 -1
- package/dist/client/assets/{agent-icon-D3BNQt6X.js → agent-icon-C_c71WnF.js} +1 -1
- package/dist/client/assets/{agents-list-B2Hb0wQ7.js → agents-list-pH0sTM2b.js} +1 -1
- package/dist/client/assets/{ai-providers-B-jk-UmT.js → ai-providers-Cg2MfNRw.js} +1 -1
- package/dist/client/assets/{alert-B61Hqac_.js → alert-DKb-O2KJ.js} +1 -1
- package/dist/client/assets/{alert-dialog-BLch-gEk.js → alert-dialog-DGDTCOcW.js} +1 -1
- package/dist/client/assets/{app-editor-CVzo35yV.js → app-editor-PW6BI8r-.js} +1 -1
- package/dist/client/assets/{auth-CMYZJLr0.js → auth-CEQjtRom.js} +1 -1
- package/dist/client/assets/{auth-catchall-FS2ua_IU.js → auth-catchall-CEo7HfPS.js} +1 -1
- package/dist/client/assets/{auth-entry-RW5Guz9l.js → auth-entry-B3drn031.js} +1 -1
- package/dist/client/assets/{auth-split-layout-aq7YQlUW.js → auth-split-layout-CrrYrzE3.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BW4oChXI.js → authenticate-and-persist-oauth-C5jQlIF_.js} +1 -1
- package/dist/client/assets/{automation-list-row-DeF1Q5UJ.js → automation-list-row-CeWLSkFS.js} +1 -1
- package/dist/client/assets/{automation-runs-CHLxwox4.js → automation-runs-B6DhiSM6.js} +1 -1
- package/dist/client/assets/automations-Bh2qKT9C.js +1 -0
- package/dist/client/assets/{autosend-DxKasYkk.js → autosend-1l6nldHN.js} +1 -1
- package/dist/client/assets/{avatar-mRyNC44i.js → avatar-CXL8QjKQ.js} +1 -1
- package/dist/client/assets/{badge-Da03bbcH.js → badge-DoPNoVTb.js} +1 -1
- package/dist/client/assets/{block-document-QKzcLw67.js → block-document-DDY1eQMz.js} +1 -1
- package/dist/client/assets/{brand-context-CWdhiSUt.js → brand-context-_t0M8iRS.js} +1 -1
- package/dist/client/assets/{buckets-CBnb7zex.js → buckets-C9p3_hsM.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CfH1OntZ.js → bulk-category-panel-DE0irpcH.js} +1 -1
- package/dist/client/assets/{calendar-ufYgOcYh.js → calendar-DWEF227h.js} +1 -1
- package/dist/client/assets/{capability-load-error-5FA5_elC.js → capability-load-error-B0wZw73I.js} +1 -1
- package/dist/client/assets/{card-CReek_oi.js → card-C-duPybX.js} +1 -1
- package/dist/client/assets/{category-editor-CxTt3xP0.js → category-editor-WS7Nfhav.js} +1 -1
- package/dist/client/assets/{chat-context-BXa8kxo4.js → chat-context-CE5RL0TI.js} +1 -1
- package/dist/client/assets/{checkbox-Ci8LPgcQ.js → checkbox-CGYMXJY_.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B0PSRM-Y.js → cli-auth-success-BQHEnewx.js} +1 -1
- package/dist/client/assets/{collection-detail-CV1lSXJE.js → collection-detail-C94peeEb.js} +1 -1
- package/dist/client/assets/{collection-display-button-BTHNOx5v.js → collection-display-button-BaVCZfAg.js} +1 -1
- package/dist/client/assets/{collection-search-DjBc4Ak7.js → collection-search-Ciw2kerF.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DDWNubEI.js → collection-table-wrapper-DJkzWYYD.js} +1 -1
- package/dist/client/assets/{collection-tabs-BrdROQop.js → collection-tabs-Dxvc5qFv.js} +1 -1
- package/dist/client/assets/{command-nUAO4huV.js → command-B-0hb64v.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BqvAUS7K.js → commerce-onboarding-BOt5Fj8r.js} +1 -1
- package/dist/client/assets/{companions-core-DZbeLgy-.js → companions-core-CaarDNIl.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Cx-f-C5z.js → connect-desktop-dialog-ChyLZNxD.js} +1 -1
- package/dist/client/assets/{connection-card-D_314XFe.js → connection-card-CIgkDP--.js} +1 -1
- package/dist/client/assets/{connection-detail--IQiXk1v.js → connection-detail-BTuhp2BW.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BH8kqsbW.js → connection-form-helpers-DOmCHkxQ.js} +1 -1
- package/dist/client/assets/{connections-D4aeSlwU.js → connections-CsiIGlbj.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Cgyf9ioh.js → decopilot-sse-pool-BGBsFIDV.js} +1 -1
- package/dist/client/assets/{dialog-CmjMRZdy.js → dialog-DZHLtNSk.js} +1 -1
- package/dist/client/assets/{domain-settings-B8Ou9skY.js → domain-settings-DIlD2iwu.js} +1 -1
- package/dist/client/assets/{drawer-C497yCqp.js → drawer-gpIsP6Vd.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BD3SEa2f.js → dropdown-menu-D0RVgwCC.js} +1 -1
- package/dist/client/assets/{empty-state-ltR3B9lZ.js → empty-state-B0Q9Sw_h.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C7SjjzRd.js → extract-connection-data-Ccu_EvgF.js} +1 -1
- package/dist/client/assets/{file-explorer-D3fow199.js → file-explorer-CdHNqnZh.js} +1 -1
- package/dist/client/assets/{file-type-icon-yE5wYAcd.js → file-type-icon-dEEtwwgA.js} +1 -1
- package/dist/client/assets/{files-B6G9CQWo.js → files-BZ8R_Ma7.js} +1 -1
- package/dist/client/assets/{form-CWkHhTzY.js → form-Wdz-df4K.js} +1 -1
- package/dist/client/assets/{general-CNwuGRAT.js → general-Cqikwp8p.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Ch_J9f66.js → github-repo-picker-C0h5euE8.js} +1 -1
- package/dist/client/assets/{hooks-Bap4ZvBH.js → hooks-2CB6V02e.js} +1 -1
- package/dist/client/assets/{index-BvE_DXHw.js → index-5I8OZnJ0.js} +1 -1
- package/dist/client/assets/{index-BH91vBC9.js → index-B4FLr6sv.js} +1 -1
- package/dist/client/assets/{index-Crbx--SU.js → index-BBc09MIk.js} +1 -1
- package/dist/client/assets/{index-DS7H8pJT.js → index-BHTcQGu8.js} +1 -1
- package/dist/client/assets/{index-BbqantUe.js → index-BvwREqLj.js} +1 -1
- package/dist/client/assets/{index-CwtLGNNP.js → index-ByyaJ5q7.js} +1 -1
- package/dist/client/assets/{index-C7h-12Mf.js → index-CPdwLn4R.js} +1 -1
- package/dist/client/assets/{index-Cnahe_2A.js → index-DNrY1hx_.js} +1 -1
- package/dist/client/assets/{index-C9bD09Pg.js → index-DPDTDWH8.js} +1 -1
- package/dist/client/assets/{index-tSyqSpME.js → index-DxAcjTx0.js} +3 -3
- package/dist/client/assets/{index-5BfZbFkR.js → index-HR0Sb_s2.js} +1 -1
- package/dist/client/assets/{index-Dvzlmeil.js → index-ar4lR_UP.js} +1 -1
- package/dist/client/assets/{index-BGKuYAzI.js → index-b0qoJkDW.js} +5 -5
- package/dist/client/assets/{index-DRiXMUyR.js → index-fe5oZtpt.js} +1 -1
- package/dist/client/assets/{index-redirect-BIM9BDjV.js → index-redirect-Bs5S5lLV.js} +1 -1
- package/dist/client/assets/{input-BACGGISp.js → input-Dytbfzmb.js} +1 -1
- package/dist/client/assets/{integration-icon-CCoRcDhO.js → integration-icon-CyBf4R7y.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Djd1ZmeI.js → invite-member-dialog-DHPtTcJl.js} +1 -1
- package/dist/client/assets/{label-bOOhaDWd.js → label-DAS0D2r9.js} +1 -1
- package/dist/client/assets/{layout-1l3aGV2A.js → layout-CfAizUj2.js} +1 -1
- package/dist/client/assets/{login-syARuOsu.js → login-B4FsAoSX.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ClDuPBjh.js → mcp-oauth-CqpWFqA5.js} +1 -1
- package/dist/client/assets/{members-CTVPg0Vl.js → members-DuKlfu5m.js} +1 -1
- package/dist/client/assets/{monaco-editor-D_WocML5.js → monaco-editor-BX8Q3JVF.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-sT7myaaW.js → monitoring-stats-row-53jLYIib.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-M-CFp702.js → oauth-callback-ai-provider-DLUGTKEX.js} +1 -1
- package/dist/client/assets/{oauth-callback-DbqmYBhn.js → oauth-callback-jAV6UtoS.js} +1 -1
- package/dist/client/assets/{onboarding-CmgAYf7h.js → onboarding-D17yQJbl.js} +1 -1
- package/dist/client/assets/{org-install-1GxC2wxe.js → org-install-Dqp4Gx4x.js} +1 -1
- package/dist/client/assets/{org-layout-DxPsMinh.js → org-layout-X73nfjYQ.js} +1 -1
- package/dist/client/assets/{organization-choice-4pu3bvmW.js → organization-choice-Ynh3wiuS.js} +1 -1
- package/dist/client/assets/{orgs-DqxvN9TN.js → orgs-DRuwRMMa.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cz5RZ907.js → page-seo-form-BUPeHjZC.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CrjmDEZe.js +1 -0
- package/dist/client/assets/{popover--R4ocfGr.js → popover-D3w7_o8E.js} +1 -1
- package/dist/client/assets/{post-editor-D__Ka-FZ.js → post-editor-Caycxo-Q.js} +1 -1
- package/dist/client/assets/{primitives-CT2sx38-.js → primitives-DSV2h2rs.js} +1 -1
- package/dist/client/assets/{profile-Cm3bT_ge.js → profile-HBfzwxQN.js} +1 -1
- package/dist/client/assets/project-app-view-DaagN_zK.js +1 -0
- package/dist/client/assets/record-editor-D429uZ-8.js +1 -0
- package/dist/client/assets/registry-C9FVxOcv.js +2 -0
- package/dist/client/assets/{registry-layout-CCfmVbrW.js → registry-layout-CWA96paz.js} +1 -1
- package/dist/client/assets/{reports-C3tV63hj.js → reports-DPVPYSnJ.js} +1 -1
- package/dist/client/assets/{require-capability-Ctopsl17.js → require-capability-CwsBm8zW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C_Ju1Rse.js → required-auth-layout-CoYdqrN0.js} +1 -1
- package/dist/client/assets/{reset-password-C7dZX28S.js → reset-password-D9gAGuIZ.js} +1 -1
- package/dist/client/assets/{roles-D2-BodnG.js → roles-kDSV0H2N.js} +1 -1
- package/dist/client/assets/{search-input-B8Ge-iOu.js → search-input-Cj7lpr7E.js} +1 -1
- package/dist/client/assets/{secrets-DqwE0gFl.js → secrets-DgDOnFYs.js} +1 -1
- package/dist/client/assets/{sections-editor-DcvuRQY6.js → sections-editor-BaLZIE7U.js} +1 -1
- package/dist/client/assets/{select-kK-EHtkr.js → select-Cq329-JA.js} +1 -1
- package/dist/client/assets/{select-model-BoXnLPUc.js → select-model-Df4ilcAn.js} +1 -1
- package/dist/client/assets/{self-tool-result-CmL24h9K.js → self-tool-result-DjKoBoKY.js} +1 -1
- package/dist/client/assets/{seo-editor-DArzE3Ov.js → seo-editor-DWWsgxkV.js} +1 -1
- package/dist/client/assets/{settings-layout-BsjxzpYH.js → settings-layout--nMQaAju.js} +1 -1
- package/dist/client/assets/{settings-section-v1xlbTiq.js → settings-section-C_Et4jxW.js} +1 -1
- package/dist/client/assets/{shell-controls-DlLKHrRi.js → shell-controls-BMHvqWen.js} +1 -1
- package/dist/client/assets/{shell-layout-NtqohtXP.js → shell-layout-Bh-Jop8e.js} +1 -1
- package/dist/client/assets/{sidebar-BqdxrsQI.js → sidebar-DhC7DM0-.js} +1 -1
- package/dist/client/assets/{skeleton-CFjs0AnZ.js → skeleton-Cw8spwjl.js} +1 -1
- package/dist/client/assets/{sso-C-tkQpTW.js → sso-b6drcNr2.js} +1 -1
- package/dist/client/assets/{store-CDetgkab.js → store-D4dN1EtK.js} +1 -1
- package/dist/client/assets/store-registry-CJNoWs6B.js +2 -0
- package/dist/client/assets/{studio-tools-DbqCj_lz.js → studio-tools-CbxpaX2b.js} +1 -1
- package/dist/client/assets/{switch-kgNVvmjY.js → switch-pVyzfgY9.js} +1 -1
- package/dist/client/assets/{table-CKnBdk42.js → table-CS38YYvR.js} +1 -1
- package/dist/client/assets/{tabs-DIkha1un.js → tabs-DFxqaP-y.js} +1 -1
- package/dist/client/assets/{textarea-CqapeuUz.js → textarea-Btv6t0RD.js} +1 -1
- package/dist/client/assets/{toggle-group-DcjYm_kI.js → toggle-group-DfZ3bxcB.js} +1 -1
- package/dist/client/assets/{toolbar-ONP6kjeA.js → toolbar-BzvB0hUM.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-C8mL2rKr.js → toolbar-icon-button-D44w-X56.js} +1 -1
- package/dist/client/assets/{tools-list-Cj7lyTl0.js → tools-list-BLCJVEJ9.js} +1 -1
- package/dist/client/assets/{tooltip-ChlT6_lt.js → tooltip-BKUkm0cU.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CH2tRtMo.js → use-ai-providers-7pnEjs39.js} +1 -1
- package/dist/client/assets/{use-automations-CYbzDT4u.js → use-automations-Ccs1QC2e.js} +1 -1
- package/dist/client/assets/{use-capability-106h__YN.js → use-capability-PGrsboXU.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CcSc5sXm.js → use-clock-tick-BlqGorlq.js} +1 -1
- package/dist/client/assets/{use-collections-DzwE9z2Q.js → use-collections-fxsmuJWK.js} +1 -1
- package/dist/client/assets/{use-connection-rvwQ0Fgb.js → use-connection-7lwkO_C9.js} +1 -1
- package/dist/client/assets/{use-copy-CHohmoCa.js → use-copy-tJOr2zPF.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CK_OIQ5L.js → use-create-virtual-mcp-Bs8lwHS6.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-jAhM8m8l.js → use-debounced-autosave-D2YbmDV9.js} +1 -1
- package/dist/client/assets/{use-debounced-value-OA2R9lhv.js → use-debounced-value-DkIXkrnx.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Buq1vVC7.js → use-deco-credits-CrbPRo6_.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dqb_0ZxY.js → use-decopilot-events-BvTHiG6G.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DikeljPB.js → use-delete-connection-jp6lvMmZ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-B-yaBvMr.js → use-deployment-admin-hdTRnL-u.js} +1 -1
- package/dist/client/assets/{use-file-configs-dFDr0mnb.js → use-file-configs-U46-A7gS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DUHR60xP.js → use-infinite-scroll-8q7dE8CU.js} +1 -1
- package/dist/client/assets/{use-join-requests-COu9AVJo.js → use-join-requests-DnWrVAxo.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DoGJoc9f.js → use-mcp-client-8bA1TgWq.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CWi18Q1k.js → use-mcp-tools-DKVAiXN9.js} +1 -1
- package/dist/client/assets/{use-members-DvlBPbZV.js → use-members-BTERQmoW.js} +1 -1
- package/dist/client/assets/{use-mobile-DySFUw6-.js → use-mobile-CSWUbEj1.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-pvbSK0XI.js → use-navigate-to-agent-BmHaKYK6.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cea857-Z.js → use-org-auth-client-CQ5VQWY3.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dy9vIHAG.js → use-org-sso-Ddn9of3v.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CWlF5Ahz.js → use-organization-roles-m8hiV7Cw.js} +1 -1
- package/dist/client/assets/{use-organization-settings-A5Ico7Ep.js → use-organization-settings-CbJT_vd1.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bcu4wAMN.js → use-registry-connections-BWOS5VEa.js} +1 -1
- package/dist/client/assets/{use-secrets-B-Ttl8C8.js → use-secrets-DdVFxifN.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cok8Zy3K.js → use-status-sounds-DzNHM3gZ.js} +1 -1
- package/dist/client/assets/{use-view-mode-F64JKZer.js → use-view-mode-Ca3WKO7S.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DHgMLM9t.js → use-virtual-mcp-DC-YOyVz.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BPCSRb_e.js +1 -0
- package/dist/client/assets/{useRouterState-D8DgcOpl.js → useRouterState-BxrJW8Y9.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BwCx8DHi.js +1 -0
- package/dist/client/assets/{users-DhBmEN2O.js → users-D5Lqx_5g.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bape-jUB.js → variant-calendar-BMKj-Hoe.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D2-y6Vyu.js → view-mode-toggle-xV7kRcPw.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/automations-RAAWNXlu.js +0 -1
- package/dist/client/assets/page-seo-sheet-DPyXKohw.js +0 -1
- package/dist/client/assets/project-app-view-EOAYW5qO.js +0 -1
- package/dist/client/assets/record-editor-DZjrp-lZ.js +0 -1
- package/dist/client/assets/registry-BUMqKkw4.js +0 -2
- package/dist/client/assets/store-registry-Bb5nv7_x.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DS7AUFoi.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CAuCASvS.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-tSyqSpME.js";import{i as Es}from"./ChevronRight-DEa9SHrE.js";import{s as Cn}from"./Eye-qasAaBiw.js";import{n as Ve,i as yt}from"./Globe01-DGz_d2fj.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-OJElVwKK.js";import{a as ht}from"./Palette-JZRU3oXS.js";import{s as Os}from"./Plus-Dk-fAJV_.js";import{i as Rs}from"./SearchLg-CgY6Dwp_.js";import{t as As}from"./Stars01-C6xII_m0.js";import{i as mt}from"./Upload01-DtHS2sYU.js";import{s as Pn}from"./XClose-DXkvSdei.js";import{i as qt}from"./Zap-VsBSZpVz.js";import{u as En}from"./use-mobile-DySFUw6-.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-BLch-gEk.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-CmjMRZdy.js";import{I as Xe}from"./input-BACGGISp.js";import{S as ae}from"./skeleton-CFjs0AnZ.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-yE5wYAcd.js";import{T as Qs}from"./toolbar-ONP6kjeA.js";import{a as Ys}from"./Package-CjF7Ia31.js";import{u as Zs}from"./use-debounced-value-OA2R9lhv.js";import{i as vt}from"./DotsVertical-COspjpCv.js";import{i as Mn}from"./Key01-EmsKaBBE.js";import{s as wt}from"./Trash01-C-BZvEfh.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-BD3SEa2f.js";import{T as Js}from"./textarea-CqapeuUz.js";import{t as el}from"./ChevronDown-BLT5HbhK.js";import{n as tl}from"./ChevronUp-Cb58zomx.js";import{i as pt}from"./X-DNyzg7g8.js";import{P as nl,b as sl,a as ll}from"./popover--R4ocfGr.js";import{b as ye,T as ve,a as we}from"./tooltip-ChlT6_lt.js";import{i as rl}from"./Check-BLOgKImX.js";import{a as il}from"./Copy01-B6iUzmfA.js";import{n as In}from"./LinkExternal01-DqvcDL0A.js";import{l as ol,F as al}from"./index-C9bD09Pg.js";import{i as cl}from"./LayoutLeft-BTJCUon_.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
1
|
+
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-DxAcjTx0.js";import{i as Es}from"./ChevronRight-EGynmJMX.js";import{s as Cn}from"./Eye-BeYSBfk2.js";import{n as Ve,i as yt}from"./Globe01-CyCn7UBB.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-DqVsDQ63.js";import{a as ht}from"./Palette-DQKMNIPR.js";import{s as Os}from"./Plus-BZk8wyMk.js";import{i as Rs}from"./SearchLg-BQSfTodr.js";import{t as As}from"./Stars01-CDL68-ZS.js";import{i as mt}from"./Upload01-Dj2T6dOw.js";import{s as Pn}from"./XClose-BHWzJf5f.js";import{i as qt}from"./Zap-DjbD6Tcl.js";import{u as En}from"./use-mobile-CSWUbEj1.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-DGDTCOcW.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-DZHLtNSk.js";import{I as Xe}from"./input-Dytbfzmb.js";import{S as ae}from"./skeleton-Cw8spwjl.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-dEEtwwgA.js";import{T as Qs}from"./toolbar-BzvB0hUM.js";import{a as Ys}from"./Package-CnHLqaRN.js";import{u as Zs}from"./use-debounced-value-DkIXkrnx.js";import{i as vt}from"./DotsVertical-MObJXDvx.js";import{i as Mn}from"./Key01-BdzSN3AW.js";import{s as wt}from"./Trash01-DMuXTRwV.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-D0RVgwCC.js";import{T as Js}from"./textarea-Btv6t0RD.js";import{t as el}from"./ChevronDown-DID-qhTJ.js";import{n as tl}from"./ChevronUp-BNSEDwkr.js";import{i as pt}from"./X-BuCwuCXH.js";import{P as nl,b as sl,a as ll}from"./popover-D3w7_o8E.js";import{b as ye,T as ve,a as we}from"./tooltip-BKUkm0cU.js";import{i as rl}from"./Check-CkfqPPZm.js";import{a as il}from"./Copy01-c5HhQZTS.js";import{n as In}from"./LinkExternal01-DGBbsUvZ.js";import{l as ol,F as al}from"./index-DPDTDWH8.js";import{i as cl}from"./LayoutLeft-CWq5IBJO.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}ol.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=or(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=l.jsx(al,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function os(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function as(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ae,{className:"h-3 w-full"}),l.jsx(ae,{className:"h-3 w-5/6"}),l.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=os(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(as,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=l.jsx(cr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=l.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ve,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:a,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:a,download:r,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-DxAcjTx0.js";import{r as w}from"./sidebar-DhC7DM0-.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-
|
|
1
|
+
import{r as s,aT as L,aR as B,j as d,b9 as T,aO as x,aS as E,b7 as U,aU as C,b8 as _,ba as q,aQ as w,bI as K,bH as V}from"./index-DxAcjTx0.js";var I="Radio",[H,P]=w(I),[z,Q]=H(I),k=s.forwardRef((a,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:t,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:C(a.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((a,c)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=Q(S,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=S;var W="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:a,control:c,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=W;function A(a){return a?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=w(y,[_,P]),j=_(),N=P(),[J,Z]=Y(y),D=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(J,{scope:o,name:n,required:t,disabled:l,value:b,onValueChange:h,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!t,active:p,children:d.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,l as _,j as s,r as z,C as Ft,n as Bt,m as as,d as jt,K as Mt,B as Ue,i as rs}from"./index-tSyqSpME.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-mRyNC44i.js";import{d as Rt,i as is,t as os,a as Ke,s as cs,b as Pt,e as ds,c as ms}from"./UserPlus01-D3WaVhp_.js";import{i as us}from"./List-TrNC2jpp.js";import{s as Dt}from"./Plus-Dk-fAJV_.js";import{e as fs}from"./constants-D_FQAPnt.js";import{u as Lt}from"./use-members-DvlBPbZV.js";import{u as Ut}from"./studio-tools-DbqCj_lz.js";import{t as xs,S as Qe}from"./decopilot-sse-pool-Cgyf9ioh.js";import{u as gs}from"./use-decopilot-events-Dqb_0ZxY.js";import{a as ps}from"./format-time-BnbuEtat.js";import{i as qt}from"./AlertCircle-SXoE8n-a.js";import{i as Gt}from"./CheckCircle-DZfqbe7a.js";import{i as hs}from"./Circle-xS-XNWbi.js";import{s as bs}from"./Eye-qasAaBiw.js";import{a as js,d as Ns,e as ys}from"./dialog-CmjMRZdy.js";import{a as rt,c as it,d as qe,D as ot}from"./dropdown-menu-BD3SEa2f.js";import{P as Nt,a as yt,b as vt}from"./popover--R4ocfGr.js";import{b as Kt,C as Qt,a as ue,e as ct,d as Yt,c as Ht}from"./command-nUAO4huV.js";import{C as vs}from"./calendar-ufYgOcYh.js";import{i as Ss}from"./ChevronRight-DEa9SHrE.js";import{s as St}from"./User01-bf0dyKkX.js";import{i as It}from"./X-DNyzg7g8.js";import{g as Cs,b as ws,e as Ds,f as _s,a as ks,D as Is}from"./drawer-C497yCqp.js";import{t as _t}from"./ChevronDown-BLT5HbhK.js";import{i as Jt}from"./FilterLines-BAP0MMyO.js";import{s as Ts}from"./Flag01-DBGHCdmB.js";import{u as zs}from"./shell-layout-NtqohtXP.js";function me(t){const e=O.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==a?(o=_("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let c;return e[4]!==n||e[5]!==r||e[6]!==o?(c=s.jsx("img",{src:fs,alt:"Super Agent",width:n,height:n,style:r,className:o}),e[4]=n,e[5]=r,e[6]=o,e[7]=c):c=e[7],c}const Tt=()=>0;function As(t){const{orgSlug:e,enabled:l=!0,onUpdate:a}=t,n=z.useRef(a);n.current=a;const r=z.useRef(null),o=z.useRef(l),c=z.useRef(e);(!r.current||o.current!==l||c.current!==e)&&(o.current=l,c.current=e,r.current=f=>{if(!l||!e)return()=>{};const m=g=>{let i;try{i=JSON.parse(g.data)}catch{return}i.data&&n.current(i.data),f()};return xs.subscribe(e,m)}),z.useSyncExternalStore(r.current,Tt,Tt)}function Es(){const t=O.c(25),{org:e,locator:l}=Ft(),a=Ut(),n=Bt();let r;t[0]!==l?(r=Mt.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const o=r;let c;t[2]!==a?(c=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=c):c=t[3];let d;t[4]!==o||t[5]!==c?(d={queryKey:o,queryFn:c},t[4]=o,t[5]=c,t[6]=d):d=t[6];const f=as(d);let m;t[7]!==n||t[8]!==o?(m=p=>{n.setQueryData(o,N=>{const b=N??[],j=p;return b.some(y=>y.id===j.id)?b.map(y=>y.id===j.id?j:y):[j,...b]})},t[7]=n,t[8]=o,t[9]=m):m=t[9];let g;t[10]!==e.slug||t[11]!==m?(g={orgSlug:e.slug,onUpdate:m},t[10]=e.slug,t[11]=m,t[12]=g):g=t[12],As(g);let i;t[13]!==n||t[14]!==o?(i=p=>{const N=p.subject,b=p.data.status;n.setQueryData(o,j=>j?.map(y=>y.threads.some(S=>S.threadId===N)?{...y,threads:y.threads.map(S=>S.threadId===N?{...S,status:b}:S)}:y))},t[13]=n,t[14]=o,t[15]=i):i=t[15];let u;t[16]!==e.slug||t[17]!==i?(u={orgSlug:e.slug,onTaskStatus:i},t[16]=e.slug,t[17]=i,t[18]=u):u=t[18],gs(u);let x;t[19]!==f.data?(x=f.data??[],t[19]=f.data,t[20]=x):x=t[20];let h;return t[21]!==f.error||t[22]!==f.isLoading||t[23]!==x?(h={items:x,isLoading:f.isLoading,error:f.error},t[21]=f.error,t[22]=f.isLoading,t[23]=x,t[24]=h):h=t[24],h}function $s(){const t=O.c(30),{locator:e}=Ft(),l=Ut(),a=Bt();let n;t[0]!==e?(n=Mt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let o;t[2]!==a||t[3]!==r?(o=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=o):o=t[4];const c=o;let d;t[5]!==l?(d=y=>l.call("TASK_BOARD_ITEM_CREATE",y),t[5]=l,t[6]=d):d=t[6];let f;t[7]!==c||t[8]!==d?(f={mutationFn:d,onSuccess:c},t[7]=c,t[8]=d,t[9]=f):f=t[9];const m=jt(f);let g;t[10]!==l?(g=y=>l.call("TASK_BOARD_ITEM_UPDATE",y),t[10]=l,t[11]=g):g=t[11];let i,u;t[12]!==a||t[13]!==r?(i=async y=>{await a.cancelQueries({queryKey:r});const S=a.getQueryData(r);return a.setQueryData(r,D=>D?.map(A=>A.id===y.id?{...A,...y}:A)),{previous:S}},u=(y,S,D)=>{D?.previous&&a.setQueryData(r,D.previous)},t[12]=a,t[13]=r,t[14]=i,t[15]=u):(i=t[14],u=t[15]);let x;t[16]!==c||t[17]!==g||t[18]!==i||t[19]!==u?(x={mutationFn:g,onMutate:i,onError:u,onSettled:c},t[16]=c,t[17]=g,t[18]=i,t[19]=u,t[20]=x):x=t[20];const h=jt(x);let p;t[21]!==l?(p=y=>l.call("TASK_BOARD_ITEM_DELETE",{id:y}),t[21]=l,t[22]=p):p=t[22];let N;t[23]!==c||t[24]!==p?(N={mutationFn:p,onSuccess:c},t[23]=c,t[24]=p,t[25]=N):N=t[25];const b=jt(N);let j;return t[26]!==m||t[27]!==b||t[28]!==h?(j={create:m,update:h,remove:b},t[26]=m,t[27]=b,t[28]=h,t[29]=j):j=t[29],j}function Ct(t){return t.threads.some(e=>e.status==="requires_action")}function Vt(t){return t.threads[0]}const Wt=["triage","todo","in_progress","in_review","done"],ae={triage:{label:"Backlog",icon:qt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:hs,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Rt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:bs,iconClassName:"text-amber-500"},done:{label:"Done",icon:Gt,iconClassName:"text-green-600"}},Xt=["none","low","medium","high","urgent"],oe={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-orange-500",dotClassName:"bg-orange-500"},urgent:{label:"Urgent",flagClassName:"text-red-500",dotClassName:"bg-red-500"}};function Os(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function zt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Fs=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Ge="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Bs={failed:{label:"Error",className:"text-red-600",icon:ds},requires_action:{label:"Needs input",className:"text-amber-600",icon:Pt},in_progress:{label:"Running",className:"text-blue-600",icon:Rt,spin:!0},completed:{label:"Completed",className:"text-green-600",icon:Gt},expired:{label:"Expired",className:"text-muted-foreground",icon:qt}};function Ms(t){const e=O.c(154),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:o,onDelete:c,onOpenThread:d,isSaving:f}=t,{data:m}=Lt();let g;e[0]!==m?.data?.members?(g=m?.data?.members??[],e[0]=m?.data?.members,e[1]=g):g=e[1];const i=g,[u,x]=z.useState(n?.title??""),[h,p]=z.useState(n?.description??""),[N,b]=z.useState(n?.status??r??"triage"),[j,y]=z.useState(n?.priority??"medium"),[S,D]=z.useState(n?.assigneeId??null),A=n?.dueDate;let F;e[2]!==A?(F=zt(A),e[2]=A,e[3]=F):F=e[3];const[k,K]=z.useState(F),[q,P]=z.useState(!1),[L,B]=z.useState(!1);let M;e[4]!==r||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(M=()=>{x(n?.title??""),p(n?.description??""),b(n?.status??r??"triage"),y(n?.priority??"medium"),D(n?.assigneeId??null),K(zt(n?.dueDate))},e[4]=r,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=M):M=e[11];const U=M;let I;e[12]!==a||e[13]!==U?(I=()=>{a(),U()},e[12]=a,e[13]=U,e[14]=I):I=e[14];const R=I;let G;e[15]!==S||e[16]!==h||e[17]!==k||e[18]!==o||e[19]!==j||e[20]!==N||e[21]!==u?(G=()=>{const v=u.trim();v&&o({title:v,description:h.trim()||null,status:N,priority:j,assigneeId:S,dueDate:k?Os(k):null})},e[15]=S,e[16]=h,e[17]=k,e[18]=o,e[19]=j,e[20]=N,e[21]=u,e[22]=G):G=e[22];const T=G,C=S===Qe;let Q;if(e[23]!==S||e[24]!==i){let v;e[26]!==S?(v=H=>H.userId===S,e[26]=S,e[27]=v):v=e[27],Q=i.find(v),e[23]=S,e[24]=i,e[25]=Q}else Q=e[25];const $=Q;let ee;e[28]!==n||e[29]!==i?(ee=n?.assignedBy?i.find(v=>v.userId===n.assignedBy):void 0,e[28]=n,e[29]=i,e[30]=ee):ee=e[30];const E=ee,te=ae[N].icon;let J;e[31]!==n?(J=n?Vt(n):void 0,e[31]=n,e[32]=J):J=e[32];const ce=J;let V;e[33]!==R?(V=v=>!v&&R(),e[33]=R,e[34]=V):V=e[34];const se=n?"Edit task":"New task";let le;e[35]!==se?(le=s.jsx(js,{className:"sr-only",children:se}),e[35]=se,e[36]=le):le=e[36];let ne;e[37]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(It,{size:16}),e[37]=ne):ne=e[37];let Y;e[38]!==R?(Y=s.jsx("button",{type:"button","aria-label":"Close",onClick:R,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ne}),e[38]=R,e[39]=Y):Y=e[39];let W;e[40]===Symbol.for("react.memo_cache_sentinel")?(W=v=>x(v.target.value),e[40]=W):W=e[40];let X;e[41]!==u?(X=s.jsx("input",{value:u,onChange:W,placeholder:"Task title...",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-medium text-foreground outline-none placeholder:text-foreground/30"}),e[41]=u,e[42]=X):X=e[42];let Z;e[43]===Symbol.for("react.memo_cache_sentinel")?(Z=v=>p(v.target.value),e[43]=Z):Z=e[43];let w;e[44]!==h?(w=s.jsx("textarea",{value:h,onChange:Z,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=h,e[45]=w):w=e[45];let de;e[46]!==E||e[47]!==$||e[48]!==d||e[49]!==ce?(de=ce&&s.jsx(Rs,{thread:ce,startedBy:E??$,onOpen:d}),e[46]=E,e[47]=$,e[48]=d,e[49]=ce,e[50]=de):de=e[50];let fe;e[51]!==X||e[52]!==w||e[53]!==de?(fe=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[X,w,de]}),e[51]=X,e[52]=w,e[53]=de,e[54]=fe):fe=e[54];let Ye;e[55]===Symbol.for("react.memo_cache_sentinel")?(Ye=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[55]=Ye):Ye=e[55];const ut=ae[N];let xe;e[56]!==te||e[57]!==ut.iconClassName?(xe=s.jsx(te,{size:16,className:ut.iconClassName}),e[56]=te,e[57]=ut.iconClassName,e[58]=xe):xe=e[58];const ft=ae[N];let ge;e[59]!==xe||e[60]!==ft.label?(ge=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ge,children:[xe,ft.label]})}),e[59]=xe,e[60]=ft.label,e[61]=ge):ge=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsx(it,{align:"start",className:"w-44",children:Wt.map(v=>{const H=ae[v].icon;return s.jsxs(qe,{onSelect:()=>b(v),className:"gap-2",children:[s.jsx(H,{size:16,className:ae[v].iconClassName}),ae[v].label]},v)})}),e[62]=He):He=e[62];let pe;e[63]!==ge?(pe=s.jsxs(ot,{children:[ge,He]}),e[63]=ge,e[64]=pe):pe=e[64];const xt=j==="none"&&"text-muted-foreground";let he;e[65]!==xt?(he=_(Ge,xt),e[65]=xt,e[66]=he):he=e[66];let be;e[67]!==j?(be=j==="none"?s.jsxs(s.Fragment,{children:[s.jsx(is,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:_("size-2 rounded-full",oe[j].dotClassName)}),oe[j].label]}),e[67]=j,e[68]=be):be=e[68];let je;e[69]!==he||e[70]!==be?(je=s.jsx(rt,{asChild:!0,children:s.jsx("button",{type:"button",className:he,children:be})}),e[69]=he,e[70]=be,e[71]=je):je=e[71];let Je;e[72]===Symbol.for("react.memo_cache_sentinel")?(Je=s.jsx(it,{align:"start",className:"w-40",children:Xt.map(v=>s.jsxs(qe,{onSelect:()=>y(v),children:[s.jsx("span",{className:_("size-2 rounded-full",oe[v].dotClassName)}),oe[v].label]},v))}),e[72]=Je):Je=e[72];let Ne;e[73]!==je?(Ne=s.jsxs(ot,{children:[je,Je]}),e[73]=je,e[74]=Ne):Ne=e[74];const gt=!S&&"text-muted-foreground";let ye;e[75]!==gt?(ye=_(Ge,gt),e[75]=gt,e[76]=ye):ye=e[76];let ve;e[77]!==E||e[78]!==$||e[79]!==C?(ve=C&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(me,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):C?s.jsxs(s.Fragment,{children:[s.jsx(me,{size:16}),"Super Agent"]}):$?s.jsxs(s.Fragment,{children:[s.jsx(ie,{url:$.user?.image??void 0,fallback:re($.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:$.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(os,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[77]=E,e[78]=$,e[79]=C,e[80]=ve):ve=e[80];let Se;e[81]!==ye||e[82]!==ve?(Se=s.jsx(Nt,{asChild:!0,children:s.jsx("button",{type:"button",className:ye,children:ve})}),e[81]=ye,e[82]=ve,e[83]=Se):Se=e[83];let Ve;e[84]===Symbol.for("react.memo_cache_sentinel")?(Ve=s.jsx(Kt,{placeholder:"Assign to…",className:"h-9"}),e[84]=Ve):Ve=e[84];let We;e[85]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx(Qt,{children:"No members found."}),e[85]=We):We=e[85];let Xe;e[86]===Symbol.for("react.memo_cache_sentinel")?(Xe=()=>{D(Qe),B(!1)},e[86]=Xe):Xe=e[86];let Ze;e[87]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsxs(ue,{value:"Super Agent",onSelect:Xe,className:"gap-2",children:[s.jsx(me,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[87]=Ze):Ze=e[87];let et;e[88]===Symbol.for("react.memo_cache_sentinel")?(et=()=>{D(null),B(!1)},e[88]=et):et=e[88];let tt;e[89]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsxs(ct,{children:[Ze,s.jsxs(ue,{value:"Unassigned",onSelect:et,className:"gap-2",children:[s.jsx(St,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[89]=tt):tt=e[89];let Ce;if(e[90]!==i){let v;e[92]===Symbol.for("react.memo_cache_sentinel")?(v=H=>s.jsxs(ue,{value:H.user?.name??H.userId,onSelect:()=>{D(H.userId),B(!1)},className:"gap-2",children:[s.jsx(ie,{url:H.user?.image??void 0,fallback:re(H.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:H.user?.name??H.userId})]},H.userId),e[92]=v):v=e[92],Ce=i.map(v),e[90]=i,e[91]=Ce}else Ce=e[91];let we;e[93]!==Ce?(we=s.jsx(yt,{align:"start",className:"w-56 p-0",children:s.jsxs(Yt,{children:[Ve,s.jsxs(Ht,{children:[We,tt,s.jsx(ct,{heading:"Members",children:Ce})]})]})}),e[93]=Ce,e[94]=we):we=e[94];let De;e[95]!==L||e[96]!==Se||e[97]!==we?(De=s.jsxs(vt,{open:L,onOpenChange:B,children:[Se,we]}),e[95]=L,e[96]=Se,e[97]=we,e[98]=De):De=e[98];let _e;e[99]!==E||e[100]!==C?(_e=C&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:_(Ge,"pointer-events-none"),children:[s.jsx(me,{size:16}),"Super Agent"]})]}),e[99]=E,e[100]=C,e[101]=_e):_e=e[101];let ke;e[102]!==De||e[103]!==_e?(ke=s.jsxs("div",{className:"flex flex-col",children:[De,_e]}),e[102]=De,e[103]=_e,e[104]=ke):ke=e[104];const pt=!k&&"text-muted-foreground";let Ie;e[105]!==pt?(Ie=_(Ge,pt),e[105]=pt,e[106]=Ie):Ie=e[106];let st;e[107]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[107]=st):st=e[107];let Te;e[108]!==k?(Te=k?Fs.format(k):"Due date",e[108]=k,e[109]=Te):Te=e[109];let ze;e[110]!==k?(ze=k&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:v=>{v.stopPropagation(),K(null)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),K(null))},children:s.jsx(It,{size:12})}),e[110]=k,e[111]=ze):ze=e[111];let Ae;e[112]!==Ie||e[113]!==Te||e[114]!==ze?(Ae=s.jsx(Nt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ie,children:[st,Te,ze]})}),e[112]=Ie,e[113]=Te,e[114]=ze,e[115]=Ae):Ae=e[115];const ht=k??void 0;let lt;e[116]===Symbol.for("react.memo_cache_sentinel")?(lt=v=>{K(v??null),v&&P(!1)},e[116]=lt):lt=e[116];let Ee;e[117]!==ht?(Ee=s.jsx(yt,{className:"w-auto p-0",align:"start",children:s.jsx(vs,{mode:"single",selected:ht,onSelect:lt,initialFocus:!0})}),e[117]=ht,e[118]=Ee):Ee=e[118];let $e;e[119]!==q||e[120]!==Ae||e[121]!==Ee?($e=s.jsxs(vt,{open:q,onOpenChange:P,children:[Ae,Ee]}),e[119]=q,e[120]=Ae,e[121]=Ee,e[122]=$e):$e=e[122];let Oe;e[123]!==pe||e[124]!==Ne||e[125]!==ke||e[126]!==$e?(Oe=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[Ye,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[pe,Ne,ke,$e]})]}),e[123]=pe,e[124]=Ne,e[125]=ke,e[126]=$e,e[127]=Oe):Oe=e[127];let Fe;e[128]!==fe||e[129]!==Oe?(Fe=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[fe,Oe]}),e[128]=fe,e[129]=Oe,e[130]=Fe):Fe=e[130];let Be;e[131]!==n||e[132]!==c?(Be=n&&c?s.jsx(Ue,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(cs,{size:16})}):s.jsx("span",{}),e[131]=n,e[132]=c,e[133]=Be):Be=e[133];let Me;e[134]!==f||e[135]!==u?(Me=!u.trim()||f,e[134]=f,e[135]=u,e[136]=Me):Me=e[136];let nt;e[137]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsx(Dt,{size:16}),e[137]=nt):nt=e[137];const bt=n?"Save":"Create task";let Re;e[138]!==T||e[139]!==Me||e[140]!==bt?(Re=s.jsxs(Ue,{size:"sm",disabled:Me,onClick:T,children:[nt,bt]}),e[138]=T,e[139]=Me,e[140]=bt,e[141]=Re):Re=e[141];let Pe;e[142]!==Be||e[143]!==Re?(Pe=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[Be,Re]}),e[142]=Be,e[143]=Re,e[144]=Pe):Pe=e[144];let Le;e[145]!==le||e[146]!==Y||e[147]!==Fe||e[148]!==Pe?(Le=s.jsxs(Ns,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[le,Y,Fe,Pe]}),e[145]=le,e[146]=Y,e[147]=Fe,e[148]=Pe,e[149]=Le):Le=e[149];let at;return e[150]!==l||e[151]!==V||e[152]!==Le?(at=s.jsx(ys,{open:l,onOpenChange:V,children:Le}),e[150]=l,e[151]=V,e[152]=Le,e[153]=at):at=e[153],at}function Rs(t){const e=O.c(14),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Bs[l.status]:null,o=l.lastMessage??l.title;let c,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=c,e[1]=d):(c=e[0],d=e[1]);let f;e[2]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ie,{url:a.user?.image??void 0,fallback:re(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[c,d,f]}),e[4]=f,e[5]=m):m=e[5];let g;e[6]!==o||e[7]!==n||e[8]!==r||e[9]!==l?(g=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:_("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:_(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),o&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:o}),n&&s.jsx(Ss,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=o,e[7]=n,e[8]=r,e[9]=l,e[10]=g):g=e[10];let i;return e[11]!==m||e[12]!==g?(i=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[m,g]}),e[11]=m,e[12]=g,e[13]=i):i=e[13],i}const wt="__unassigned__",dt={assignee:null,priority:null,due:null};function Ps(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Ls(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Us=864e5;function qs(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function Gs(t,e){if(e.assignee!==null){if(e.assignee===wt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!qs(l,a)||e.due==="week"&&l>a+7*Us)return!1}return!0}const At=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function mt(t,e=!1){return _("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ks(t){const e=O.c(62),{value:l,members:a,onChange:n,block:r}=t,[o,c]=z.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(St,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let f=d,m="Assignee";if(l===wt)m="Unassigned";else if(l===Qe){let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(me,{size:14}),e[1]=T):T=e[1],f=T,m="Super Agent"}else if(l){let T,C,Q,$;if(e[2]!==a||e[3]!==l){let E;e[8]!==l?(E=te=>te.userId===l,e[8]=l,e[9]=E):E=e[9],C=a.find(E),T=ie,Q=C?.user?.image??void 0,$=re(C?.user?.name),e[2]=a,e[3]=l,e[4]=T,e[5]=C,e[6]=Q,e[7]=$}else T=e[4],C=e[5],Q=e[6],$=e[7];let ee;e[10]!==T||e[11]!==Q||e[12]!==$?(ee=s.jsx(T,{url:Q,fallback:$,shape:"circle",size:"2xs"}),e[10]=T,e[11]=Q,e[12]=$,e[13]=ee):ee=e[13],f=ee,m=C?.user?.name??"Member"}let g;e[14]!==n?(g=T=>{n(T),c(!1)},e[14]=n,e[15]=g):g=e[15];const i=g,u=l!==null;let x;e[16]!==r||e[17]!==u?(x=mt(u,r),e[16]=r,e[17]=u,e[18]=x):x=e[18];const h=x,p=r&&"ml-auto";let N;e[19]!==p?(N=_("shrink-0 opacity-60",p),e[19]=p,e[20]=N):N=e[20];const b=N;let j;e[21]!==m?(j=s.jsx("span",{className:"max-w-[10rem] truncate",children:m}),e[21]=m,e[22]=j):j=e[22];let y;e[23]!==b?(y=s.jsx(_t,{size:12,className:b}),e[23]=b,e[24]=y):y=e[24];let S;e[25]!==f||e[26]!==j||e[27]!==y||e[28]!==h?(S=s.jsx(Nt,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[f,j,y]})}),e[25]=f,e[26]=j,e[27]=y,e[28]=h,e[29]=S):S=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Kt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=D):D=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Qt,{children:"No members found."}),e[31]=A):A=e[31];let F;e[32]!==i?(F=s.jsx(ue,{value:"Anyone",onSelect:()=>i(null),children:"Anyone"}),e[32]=i,e[33]=F):F=e[33];let k;e[34]!==i?(k=()=>i(wt),e[34]=i,e[35]=k):k=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(St,{size:16,className:"text-muted-foreground"}),e[36]=K):K=e[36];let q;e[37]!==k?(q=s.jsxs(ue,{value:"Unassigned",onSelect:k,className:"gap-2",children:[K,"Unassigned"]}),e[37]=k,e[38]=q):q=e[38];let P;e[39]!==i?(P=()=>i(Qe),e[39]=i,e[40]=P):P=e[40];let L;e[41]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(me,{size:16}),e[41]=L):L=e[41];let B;e[42]!==P?(B=s.jsxs(ue,{value:"Super Agent",onSelect:P,className:"gap-2",children:[L,"Super Agent"]}),e[42]=P,e[43]=B):B=e[43];let M;e[44]!==F||e[45]!==q||e[46]!==B?(M=s.jsxs(ct,{children:[F,q,B]}),e[44]=F,e[45]=q,e[46]=B,e[47]=M):M=e[47];let U;if(e[48]!==a||e[49]!==i){let T;e[51]!==i?(T=C=>s.jsxs(ue,{value:C.user?.name??C.userId,onSelect:()=>i(C.userId),className:"gap-2",children:[s.jsx(ie,{url:C.user?.image??void 0,fallback:re(C.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:C.user?.name??C.userId})]},C.userId),e[51]=i,e[52]=T):T=e[52],U=a.map(T),e[48]=a,e[49]=i,e[50]=U}else U=e[50];let I;e[53]!==U?(I=s.jsx(ct,{heading:"Members",children:U}),e[53]=U,e[54]=I):I=e[54];let R;e[55]!==M||e[56]!==I?(R=s.jsx(yt,{align:"start",className:"w-56 p-0",children:s.jsxs(Yt,{children:[D,s.jsxs(Ht,{children:[A,M,I]})]})}),e[55]=M,e[56]=I,e[57]=R):R=e[57];let G;return e[58]!==o||e[59]!==R||e[60]!==S?(G=s.jsxs(vt,{open:o,onOpenChange:c,children:[S,R]}),e[58]=o,e[59]=R,e[60]=S,e[61]=G):G=e[61],G}function Qs(t){const e=O.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let o;e[0]!==n||e[1]!==r?(o=mt(r,n),e[0]=n,e[1]=r,e[2]=o):o=e[2];const c=o,d=n&&"ml-auto";let f;e[3]!==d?(f=_("shrink-0 opacity-60",d),e[3]=d,e[4]=f):f=e[4];const m=f;let g;e[5]!==l?(g=l?s.jsx("span",{className:_("size-2 shrink-0 rounded-full",oe[l].dotClassName)}):s.jsx(Ts,{size:14,className:"shrink-0"}),e[5]=l,e[6]=g):g=e[6];const i=l?oe[l].label:"Priority";let u;e[7]!==m?(u=s.jsx(_t,{size:12,className:m}),e[7]=m,e[8]=u):u=e[8];let x;e[9]!==g||e[10]!==i||e[11]!==u||e[12]!==c?(x=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[g,i,u]})}),e[9]=g,e[10]=i,e[11]=u,e[12]=c,e[13]=x):x=e[13];let h,p;e[14]!==a?(p=s.jsx(qe,{onSelect:()=>a(null),children:"Any priority"}),h=Xt.map(j=>s.jsxs(qe,{onSelect:()=>a(j),className:"gap-2",children:[s.jsx("span",{className:_("size-2 rounded-full",oe[j].dotClassName)}),oe[j].label]},j)),e[14]=a,e[15]=h,e[16]=p):(h=e[15],p=e[16]);let N;e[17]!==h||e[18]!==p?(N=s.jsxs(it,{align:"start",className:"w-40",children:[p,h]}),e[17]=h,e[18]=p,e[19]=N):N=e[19];let b;return e[20]!==N||e[21]!==x?(b=s.jsxs(ot,{children:[x,N]}),e[20]=N,e[21]=x,e[22]=b):b=e[22],b}function Ys(t){const e=O.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=At.find(A=>A.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const o=r,c=l!==null;let d;e[2]!==n||e[3]!==c?(d=mt(c,n),e[2]=n,e[3]=c,e[4]=d):d=e[4];const f=d,m=n&&"ml-auto";let g;e[5]!==m?(g=_("shrink-0 opacity-60",m),e[5]=m,e[6]=g):g=e[6];const i=g;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ke,{size:14,className:"shrink-0"}),e[7]=u):u=e[7];const x=o??"Due date";let h;e[8]!==i?(h=s.jsx(_t,{size:12,className:i}),e[8]=i,e[9]=h):h=e[9];let p;e[10]!==x||e[11]!==h||e[12]!==f?(p=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,x,h]})}),e[10]=x,e[11]=h,e[12]=f,e[13]=p):p=e[13];let N;e[14]!==a?(N=()=>a(null),e[14]=a,e[15]=N):N=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[16]=b):b=e[16];let j;e[17]!==N?(j=s.jsxs(qe,{onSelect:N,className:"gap-2",children:[b,"Any time"]}),e[17]=N,e[18]=j):j=e[18];let y;e[19]!==a?(y=At.map(A=>{const F=A.value==="overdue";return s.jsxs(qe,{onSelect:()=>a(A.value),className:_("gap-2",F&&"text-destructive"),children:[s.jsx(Ke,{size:16,className:_("shrink-0",F?"text-destructive":"text-muted-foreground")}),A.label]},A.value)}),e[19]=a,e[20]=y):y=e[20];let S;e[21]!==j||e[22]!==y?(S=s.jsxs(it,{align:"start",className:"w-44",children:[j,y]}),e[21]=j,e[22]=y,e[23]=S):S=e[23];let D;return e[24]!==S||e[25]!==p?(D=s.jsxs(ot,{children:[p,S]}),e[24]=S,e[25]=p,e[26]=D):D=e[26],D}function Zt(t){const e=O.c(26),{filters:l,members:a,onChange:n,block:r}=t;let o;e[0]!==l||e[1]!==n?(o=u=>n({...l,assignee:u}),e[0]=l,e[1]=n,e[2]=o):o=e[2];let c;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==o?(c=s.jsx(Ks,{block:r,value:l.assignee,members:a,onChange:o}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=o,e[7]=c):c=e[7];let d;e[8]!==l||e[9]!==n?(d=u=>n({...l,priority:u}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let f;e[11]!==r||e[12]!==l.priority||e[13]!==d?(f=s.jsx(Qs,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=f):f=e[14];let m;e[15]!==l||e[16]!==n?(m=u=>n({...l,due:u}),e[15]=l,e[16]=n,e[17]=m):m=e[17];let g;e[18]!==r||e[19]!==l.due||e[20]!==m?(g=s.jsx(Ys,{block:r,value:l.due,onChange:m}),e[18]=r,e[19]=l.due,e[20]=m,e[21]=g):g=e[21];let i;return e[22]!==c||e[23]!==f||e[24]!==g?(i=s.jsxs(s.Fragment,{children:[c,f,g]}),e[22]=c,e[23]=f,e[24]=g,e[25]=i):i=e[25],i}function Hs(t){const e=O.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Jt,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let o;e[1]!==l||e[2]!==a||e[3]!==n?(o=s.jsx(Zt,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=o):o=e[4];let c;e[5]!==l||e[6]!==n?(c=Ps(l)&&s.jsx("button",{type:"button",onClick:()=>n(dt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,o,c]}),e[8]=o,e[9]=c,e[10]=d):d=e[10],d}function Js(t){const e=O.c(26),{filters:l,members:a,onChange:n}=t,[r,o]=z.useState(!1),c=Ls(l),d=c>0;let f;e[0]!==d?(f=mt(d),e[0]=d,e[1]=f):f=e[1];const m=f;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Jt,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let i;e[3]!==c?(i=c>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:c}),e[3]=c,e[4]=i):i=e[4];let u;e[5]!==i||e[6]!==m?(u=s.jsx(Cs,{asChild:!0,children:s.jsxs("button",{type:"button",className:m,children:[g,"Filters",i]})}),e[5]=i,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ws,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==a||e[11]!==n?(h=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Zt,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=h):h=e[12];let p;e[13]!==c||e[14]!==n?(p=c>0&&s.jsx(Ue,{variant:"outline",className:"flex-1",onClick:()=>n(dt),children:"Clear all"}),e[13]=c,e[14]=n,e[15]=p):p=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ds,{asChild:!0,children:s.jsx(Ue,{className:"flex-1",children:"Done"})}),e[16]=N):N=e[16];let b;e[17]!==p?(b=s.jsxs(_s,{className:"flex-row gap-2",children:[p,N]}),e[17]=p,e[18]=b):b=e[18];let j;e[19]!==b||e[20]!==h?(j=s.jsxs(ks,{className:"p-0",children:[x,h,b]}),e[19]=b,e[20]=h,e[21]=j):j=e[21];let y;return e[22]!==r||e[23]!==j||e[24]!==u?(y=s.jsxs(Is,{open:r,onOpenChange:o,direction:"bottom",children:[u,j]}),e[22]=r,e[23]=j,e[24]=u,e[25]=y):y=e[25],y}const Et=380,Vs=90,$t=5,Ws="cubic-bezier(0.22, 0.61, 0.36, 1)",Xs=8;function Zs(t,e){const l=z.useRef(new Map);z.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,o=new Map,c=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const i of n){const u=i.dataset.flipId;if(!u)continue;const x=i.getBoundingClientRect();o.set(u,x);const h=r.get(u);if(!h)continue;const p=h.left-x.left,N=h.top-x.top;(p||N)&&d.push({el:i,dx:p,dy:N,lane:Math.abs(p)>Xs})}if(l.current=o,c||d.length===0)return;for(const i of d){const u=i.lane?` rotate(${i.dx>0?$t:-$t}deg)`:"";i.el.style.transition="none",i.el.style.transform=`translate(${i.dx}px, ${i.dy}px)${u}`,i.lane&&(i.el.style.zIndex="10")}let f=0;const m=[],g=requestAnimationFrame(()=>{for(const i of d){const u=i.lane?f++*Vs:0;i.el.style.transition=`transform ${Et}ms ${Ws} ${u}ms`,i.el.style.transform="",m.push(window.setTimeout(()=>{i.el.style.transition="",i.el.style.transform="",i.el.style.zIndex=""},Et+u+30))}});return()=>{cancelAnimationFrame(g);for(const i of m)clearTimeout(i)}},[e,t])}function el(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ns,{})})})}),t[0]=e):e=t[0],e}const tl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function sl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:tl.format(e),overdue:l}}const kt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function es(){const t=O.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_(kt,"border-amber-500/30 text-amber-600"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Pt,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function ts(t){const e=O.c(7),{priority:l}=t,a=oe[l];let n;e[0]!==a.dotClassName?(n=_("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a.label||e[5]!==r?(o=s.jsxs("span",{className:kt,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=o):o=e[6],o}function ss(t){const e=O.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:c,overdue:d}=sl(l);a=c,n=_(kt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{size:14}),e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==n?(o=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=o):o=e[6],o}function ls(t){const e=O.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===Qe){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let o;e[0]!==n?(o=n&&s.jsx(ie,{url:n.user?.image??void 0,fallback:re(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:16,className:"ring-2 ring-background"}),e[2]=c):c=e[2];let d;return e[3]!==r||e[4]!==o?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[o,c]}),e[3]=r,e[4]=o,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,o=a.user?.name;let c;e[6]!==o?(c=re(o),e[6]=o,e[7]=c):c=e[7];let d;return e[8]!==r||e[9]!==c?(d=s.jsx(ie,{url:r,fallback:c,shape:"circle",size:"2xs"}),e[8]=r,e[9]=c,e[10]=d):d=e[10],d}return null}function ns(){const t=O.c(64),{items:e,isLoading:l}=Es(),a=$s(),{data:n}=Lt();let r,o;t[0]!==n?.data?.members?(r=n?.data?.members??[],o=new Map(r.map(ll)),t[0]=n?.data?.members,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const c=o,[d,f]=z.useState("board"),[m,g]=z.useState(dt),[i,u]=z.useState(!1),[x,h]=z.useState(null),[p,N]=z.useState(null),{setTaskId:b}=zs();let j,y,S,D;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==d||t[8]!==c||t[9]!==r){D=Symbol.for("react.early_return_sentinel");e:{let I;t[14]!==m?(I=w=>Gs(w,m),t[14]=m,t[15]=I):I=t[15];const R=e.filter(I);let G;t[16]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{h(null),N(null),u(!0)},t[16]=G):G=t[16];const T=G;let C;t[17]===Symbol.for("react.memo_cache_sentinel")?(C=w=>{h(null),N(w),u(!0)},t[17]=C):C=t[17];const Q=C;let $;t[18]===Symbol.for("react.memo_cache_sentinel")?($=w=>{h(w),u(!0)},t[18]=$):$=t[18];const E=$;if(l&&e.length===0){let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(rs,{size:20,className:"animate-spin text-muted-foreground"})}),t[19]=w):w=t[19],D=w;break e}j="mx-auto flex min-h-0 w-full max-w-[1680px] flex-1 flex-col";let te;t[20]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[20]=te):te=t[20];let J;t[21]!==m||t[22]!==e.length||t[23]!==r?(J=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(Js,{filters:m,members:r,onChange:g})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(Hs,{filters:m,members:r,onChange:g})})]}),t[21]=m,t[22]=e.length,t[23]=r,t[24]=J):J=t[24];const ce=d==="list";let V;t[25]===Symbol.for("react.memo_cache_sentinel")?(V=()=>f("list"),t[25]=V):V=t[25];let se;t[26]!==ce?(se=s.jsx(Ot,{active:ce,onClick:V,icon:us,label:"List"}),t[26]=ce,t[27]=se):se=t[27];const le=d==="board";let ne;t[28]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f("board"),t[28]=ne):ne=t[28];let Y;t[29]!==le?(Y=s.jsx(Ot,{active:le,onClick:ne,icon:ms,label:"Board"}),t[29]=le,t[30]=Y):Y=t[30];let W;t[31]!==se||t[32]!==Y?(W=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[se,Y]}),t[31]=se,t[32]=Y,t[33]=W):W=t[33];let X;t[34]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(Ue,{size:"sm",onClick:T,children:[s.jsx(Dt,{size:16}),"New task"]}),t[34]=X):X=t[34];let Z;t[35]!==W?(Z=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[W,X]}),t[35]=W,t[36]=Z):Z=t[36],t[37]!==J||t[38]!==Z?(y=s.jsxs("div",{className:"flex flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[te,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[J,Z]})]}),t[37]=J,t[38]=Z,t[39]=y):y=t[39],S=e.length===0?s.jsx("div",{className:"px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):R.length===0?s.jsx("div",{className:"px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(Ue,{variant:"outline",size:"sm",onClick:()=>g(dt),children:"Clear filters"})]})}):d==="board"?s.jsx(nl,{items:R,memberByUserId:c,onOpen:E,onCreate:Q,onMove:(w,de)=>a.update.mutate({id:w,status:de})}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:R.map(w=>s.jsx(il,{item:w,assignee:w.assigneeId?c.get(w.assigneeId):void 0,assignedBy:w.assignedBy?c.get(w.assignedBy):void 0,onOpen:()=>E(w)},w.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=d,t[8]=c,t[9]=r,t[10]=j,t[11]=y,t[12]=S,t[13]=D}else j=t[10],y=t[11],S=t[12],D=t[13];if(D!==Symbol.for("react.early_return_sentinel"))return D;const A=i?x?.id??`new-${p??"default"}`:"closed";let F;t[40]===Symbol.for("react.memo_cache_sentinel")?(F=()=>u(!1),t[40]=F):F=t[40];const k=x??void 0,K=p??void 0,q=a.create.isPending||a.update.isPending;let P;t[41]!==a.create||t[42]!==a.update||t[43]!==x?(P=I=>{x?a.update.mutate({id:x.id,...I}):a.create.mutate(I),u(!1)},t[41]=a.create,t[42]=a.update,t[43]=x,t[44]=P):P=t[44];let L;t[45]!==a.remove||t[46]!==x?(L=x?()=>{a.remove.mutate(x.id),u(!1)}:void 0,t[45]=a.remove,t[46]=x,t[47]=L):L=t[47];let B;t[48]!==b?(B=I=>{I.virtualMcpId&&(u(!1),b(I.threadId,I.virtualMcpId,{main:I.hasPreview?"preview":"board"}))},t[48]=b,t[49]=B):B=t[49];let M;t[50]!==i||t[51]!==P||t[52]!==L||t[53]!==B||t[54]!==A||t[55]!==k||t[56]!==K||t[57]!==q?(M=s.jsx(Ms,{open:i,onClose:F,item:k,defaultStatus:K,isSaving:q,onSubmit:P,onDelete:L,onOpenThread:B},A),t[50]=i,t[51]=P,t[52]=L,t[53]=B,t[54]=A,t[55]=k,t[56]=K,t[57]=q,t[58]=M):M=t[58];let U;return t[59]!==j||t[60]!==M||t[61]!==y||t[62]!==S?(U=s.jsxs("div",{className:j,children:[y,S,M]}),t[59]=j,t[60]=M,t[61]=y,t[62]=S,t[63]=U):U=t[63],U}function ll(t){return[t.userId,t]}function Ot(t){const e=O.c(11),{active:l,onClick:a,icon:n,label:r}=t,o=`${r} view`,c=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==c?(d=_("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",c),e[0]=c,e[1]=d):d=e[1];let f;e[2]!==n?(f=s.jsx(n,{size:14}),e[2]=n,e[3]=f):f=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==d||e[9]!==f?(m=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,"aria-pressed":l,className:d,children:[f,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=o,e[8]=d,e[9]=f,e[10]=m):m=e[10],m}function nl(t){const e=O.c(11),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:o}=t,[c,d]=z.useState(null),f=z.useRef(null);let m;e[0]!==l?(m=l.map(al).join(","),e[0]=l,e[1]=m):m=e[1],Zs(f,m);let i;e[2]!==l||e[3]!==a||e[4]!==r||e[5]!==o||e[6]!==n||e[7]!==c?(i=Wt.map(x=>{const h=l.filter(b=>b.status===x),p=ae[x],N=p.icon;return s.jsxs("div",{onDragOver:b=>{b.preventDefault(),d(x)},onDragLeave:b=>{b.currentTarget.contains(b.relatedTarget)||d(null)},onDrop:b=>{b.preventDefault();const j=b.dataTransfer.getData("text/plain");j&&o(j,x),d(null)},className:_("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",c===x&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(N,{size:15,className:_("shrink-0",p.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:p.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:h.length}),s.jsx("button",{type:"button","aria-label":`New task in ${p.label}`,title:`New task in ${p.label}`,onClick:()=>r(x),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Dt,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:h.map(b=>s.jsx(rl,{item:b,assignee:b.assigneeId?a.get(b.assigneeId):void 0,assignedBy:b.assignedBy?a.get(b.assignedBy):void 0,onOpen:()=>n(b)},b.id))})]},x)}),e[2]=l,e[3]=a,e[4]=r,e[5]=o,e[6]=n,e[7]=c,e[8]=i):i=e[8];let u;return e[9]!==i?(u=s.jsx("div",{ref:f,className:"flex min-h-0 flex-1 gap-3 overflow-x-auto overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:i}),e[9]=i,e[10]=u):u=e[10],u}function al(t){return`${t.id}:${t.status}`}function rl(t){const e=O.c(29),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=ae[l.status],c=o.icon,d=Vt(l)?.lastMessage,f=l.id;let m;e[0]!==l.id?(m=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=m):m=e[1];const g=l.title;let i;e[2]!==o.iconClassName?(i=_("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=i):i=e[3];let u;e[4]!==c||e[5]!==i?(u=s.jsx(c,{size:16,className:i}),e[4]=c,e[5]=i,e[6]=u):u=e[6];let x;e[7]!==l.title?(x=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=x):x=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(ls,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let p;e[13]!==u||e[14]!==x||e[15]!==h?(p=s.jsxs("div",{className:"flex items-start gap-2",children:[u,x,h]}),e[13]=u,e[14]=x,e[15]=h,e[16]=p):p=e[16];let N;e[17]!==d?(N=d&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:d}),e[17]=d,e[18]=N):N=e[18];let b;e[19]!==l?(b=(Ct(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Ct(l)&&s.jsx(es,{}),l.priority!=="none"&&s.jsx(ts,{priority:l.priority}),l.dueDate&&s.jsx(ss,{iso:l.dueDate})]}),e[19]=l,e[20]=b):b=e[20];let j;return e[21]!==l.id||e[22]!==l.title||e[23]!==r||e[24]!==b||e[25]!==m||e[26]!==p||e[27]!==N?(j=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":f,onDragStart:m,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:g,children:[p,N,b]}),e[21]=l.id,e[22]=l.title,e[23]=r,e[24]=b,e[25]=m,e[26]=p,e[27]=N,e[28]=j):j=e[28],j}function il(t){const e=O.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=ae[l.status],c=o.icon;let d;e[0]!==o.iconClassName?(d=_("shrink-0",o.iconClassName),e[0]=o.iconClassName,e[1]=d):d=e[1];let f;e[2]!==c||e[3]!==d?(f=s.jsx(c,{size:16,className:d}),e[2]=c,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==l.title?(m=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=m):m=e[6];let g;e[7]!==l?(g=Ct(l)&&s.jsx(es,{}),e[7]=l,e[8]=g):g=e[8];let i;e[9]!==l.priority?(i=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(ts,{priority:l.priority})}),e[9]=l.priority,e[10]=i):i=e[10];let u;e[11]!==l.dueDate?(u=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(ss,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=u):u=e[12];let x;e[13]!==n||e[14]!==a||e[15]!==l?(x=s.jsx(ls,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=x):x=e[16];let h;e[17]!==l.createdAt?(h=ps(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=h):h=e[18];let p;e[19]!==h?(p=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:h}),e[19]=h,e[20]=p):p=e[20];let N;return e[21]!==r||e[22]!==f||e[23]!==m||e[24]!==g||e[25]!==i||e[26]!==u||e[27]!==x||e[28]!==p?(N=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[f,m,g,i,u,x,p]}),e[21]=r,e[22]=f,e[23]=m,e[24]=g,e[25]=i,e[26]=u,e[27]=x,e[28]=p,e[29]=N):N=e[29],N}const Bl=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ns,default:el},Symbol.toStringTag,{value:"Module"}));export{oe as P,ae as S,Ms as T,$s as a,me as b,ns as c,Bl as i,Es as u};
|
|
1
|
+
import{c as O,l as _,j as s,r as z,C as Ft,n as Bt,m as as,d as jt,K as Mt,B as Ue,i as rs}from"./index-DxAcjTx0.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-CXL8QjKQ.js";import{d as Rt,i as is,t as os,a as Ke,s as cs,b as Pt,e as ds,c as ms}from"./UserPlus01-CUKF7g_W.js";import{i as us}from"./List-t7XVCfEQ.js";import{s as Dt}from"./Plus-BZk8wyMk.js";import{e as fs}from"./constants-D_FQAPnt.js";import{u as Lt}from"./use-members-BTERQmoW.js";import{u as Ut}from"./studio-tools-CbxpaX2b.js";import{t as xs,S as Qe}from"./decopilot-sse-pool-BGBsFIDV.js";import{u as gs}from"./use-decopilot-events-BvTHiG6G.js";import{a as ps}from"./format-time-BnbuEtat.js";import{i as qt}from"./AlertCircle-CxUIdGYa.js";import{i as Gt}from"./CheckCircle-CnqeZ0Hv.js";import{i as hs}from"./Circle-BU1erUD3.js";import{s as bs}from"./Eye-BeYSBfk2.js";import{a as js,d as Ns,e as ys}from"./dialog-DZHLtNSk.js";import{a as rt,c as it,d as qe,D as ot}from"./dropdown-menu-D0RVgwCC.js";import{P as Nt,a as yt,b as vt}from"./popover-D3w7_o8E.js";import{b as Kt,C as Qt,a as ue,e as ct,d as Yt,c as Ht}from"./command-B-0hb64v.js";import{C as vs}from"./calendar-DWEF227h.js";import{i as Ss}from"./ChevronRight-EGynmJMX.js";import{s as St}from"./User01-ClQ1WfKr.js";import{i as It}from"./X-BuCwuCXH.js";import{g as Cs,b as ws,e as Ds,f as _s,a as ks,D as Is}from"./drawer-gpIsP6Vd.js";import{t as _t}from"./ChevronDown-DID-qhTJ.js";import{i as Jt}from"./FilterLines-BTxZy4nU.js";import{s as Ts}from"./Flag01-CnkchImt.js";import{u as zs}from"./shell-layout-Bh-Jop8e.js";function me(t){const e=O.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==a?(o=_("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let c;return e[4]!==n||e[5]!==r||e[6]!==o?(c=s.jsx("img",{src:fs,alt:"Super Agent",width:n,height:n,style:r,className:o}),e[4]=n,e[5]=r,e[6]=o,e[7]=c):c=e[7],c}const Tt=()=>0;function As(t){const{orgSlug:e,enabled:l=!0,onUpdate:a}=t,n=z.useRef(a);n.current=a;const r=z.useRef(null),o=z.useRef(l),c=z.useRef(e);(!r.current||o.current!==l||c.current!==e)&&(o.current=l,c.current=e,r.current=f=>{if(!l||!e)return()=>{};const m=g=>{let i;try{i=JSON.parse(g.data)}catch{return}i.data&&n.current(i.data),f()};return xs.subscribe(e,m)}),z.useSyncExternalStore(r.current,Tt,Tt)}function Es(){const t=O.c(25),{org:e,locator:l}=Ft(),a=Ut(),n=Bt();let r;t[0]!==l?(r=Mt.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const o=r;let c;t[2]!==a?(c=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=c):c=t[3];let d;t[4]!==o||t[5]!==c?(d={queryKey:o,queryFn:c},t[4]=o,t[5]=c,t[6]=d):d=t[6];const f=as(d);let m;t[7]!==n||t[8]!==o?(m=p=>{n.setQueryData(o,N=>{const b=N??[],j=p;return b.some(y=>y.id===j.id)?b.map(y=>y.id===j.id?j:y):[j,...b]})},t[7]=n,t[8]=o,t[9]=m):m=t[9];let g;t[10]!==e.slug||t[11]!==m?(g={orgSlug:e.slug,onUpdate:m},t[10]=e.slug,t[11]=m,t[12]=g):g=t[12],As(g);let i;t[13]!==n||t[14]!==o?(i=p=>{const N=p.subject,b=p.data.status;n.setQueryData(o,j=>j?.map(y=>y.threads.some(S=>S.threadId===N)?{...y,threads:y.threads.map(S=>S.threadId===N?{...S,status:b}:S)}:y))},t[13]=n,t[14]=o,t[15]=i):i=t[15];let u;t[16]!==e.slug||t[17]!==i?(u={orgSlug:e.slug,onTaskStatus:i},t[16]=e.slug,t[17]=i,t[18]=u):u=t[18],gs(u);let x;t[19]!==f.data?(x=f.data??[],t[19]=f.data,t[20]=x):x=t[20];let h;return t[21]!==f.error||t[22]!==f.isLoading||t[23]!==x?(h={items:x,isLoading:f.isLoading,error:f.error},t[21]=f.error,t[22]=f.isLoading,t[23]=x,t[24]=h):h=t[24],h}function $s(){const t=O.c(30),{locator:e}=Ft(),l=Ut(),a=Bt();let n;t[0]!==e?(n=Mt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let o;t[2]!==a||t[3]!==r?(o=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=o):o=t[4];const c=o;let d;t[5]!==l?(d=y=>l.call("TASK_BOARD_ITEM_CREATE",y),t[5]=l,t[6]=d):d=t[6];let f;t[7]!==c||t[8]!==d?(f={mutationFn:d,onSuccess:c},t[7]=c,t[8]=d,t[9]=f):f=t[9];const m=jt(f);let g;t[10]!==l?(g=y=>l.call("TASK_BOARD_ITEM_UPDATE",y),t[10]=l,t[11]=g):g=t[11];let i,u;t[12]!==a||t[13]!==r?(i=async y=>{await a.cancelQueries({queryKey:r});const S=a.getQueryData(r);return a.setQueryData(r,D=>D?.map(A=>A.id===y.id?{...A,...y}:A)),{previous:S}},u=(y,S,D)=>{D?.previous&&a.setQueryData(r,D.previous)},t[12]=a,t[13]=r,t[14]=i,t[15]=u):(i=t[14],u=t[15]);let x;t[16]!==c||t[17]!==g||t[18]!==i||t[19]!==u?(x={mutationFn:g,onMutate:i,onError:u,onSettled:c},t[16]=c,t[17]=g,t[18]=i,t[19]=u,t[20]=x):x=t[20];const h=jt(x);let p;t[21]!==l?(p=y=>l.call("TASK_BOARD_ITEM_DELETE",{id:y}),t[21]=l,t[22]=p):p=t[22];let N;t[23]!==c||t[24]!==p?(N={mutationFn:p,onSuccess:c},t[23]=c,t[24]=p,t[25]=N):N=t[25];const b=jt(N);let j;return t[26]!==m||t[27]!==b||t[28]!==h?(j={create:m,update:h,remove:b},t[26]=m,t[27]=b,t[28]=h,t[29]=j):j=t[29],j}function Ct(t){return t.threads.some(e=>e.status==="requires_action")}function Vt(t){return t.threads[0]}const Wt=["triage","todo","in_progress","in_review","done"],ae={triage:{label:"Backlog",icon:qt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:hs,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Rt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:bs,iconClassName:"text-amber-500"},done:{label:"Done",icon:Gt,iconClassName:"text-green-600"}},Xt=["none","low","medium","high","urgent"],oe={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-orange-500",dotClassName:"bg-orange-500"},urgent:{label:"Urgent",flagClassName:"text-red-500",dotClassName:"bg-red-500"}};function Os(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function zt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Fs=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Ge="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Bs={failed:{label:"Error",className:"text-red-600",icon:ds},requires_action:{label:"Needs input",className:"text-amber-600",icon:Pt},in_progress:{label:"Running",className:"text-blue-600",icon:Rt,spin:!0},completed:{label:"Completed",className:"text-green-600",icon:Gt},expired:{label:"Expired",className:"text-muted-foreground",icon:qt}};function Ms(t){const e=O.c(154),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:o,onDelete:c,onOpenThread:d,isSaving:f}=t,{data:m}=Lt();let g;e[0]!==m?.data?.members?(g=m?.data?.members??[],e[0]=m?.data?.members,e[1]=g):g=e[1];const i=g,[u,x]=z.useState(n?.title??""),[h,p]=z.useState(n?.description??""),[N,b]=z.useState(n?.status??r??"triage"),[j,y]=z.useState(n?.priority??"medium"),[S,D]=z.useState(n?.assigneeId??null),A=n?.dueDate;let F;e[2]!==A?(F=zt(A),e[2]=A,e[3]=F):F=e[3];const[k,K]=z.useState(F),[q,P]=z.useState(!1),[L,B]=z.useState(!1);let M;e[4]!==r||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(M=()=>{x(n?.title??""),p(n?.description??""),b(n?.status??r??"triage"),y(n?.priority??"medium"),D(n?.assigneeId??null),K(zt(n?.dueDate))},e[4]=r,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=M):M=e[11];const U=M;let I;e[12]!==a||e[13]!==U?(I=()=>{a(),U()},e[12]=a,e[13]=U,e[14]=I):I=e[14];const R=I;let G;e[15]!==S||e[16]!==h||e[17]!==k||e[18]!==o||e[19]!==j||e[20]!==N||e[21]!==u?(G=()=>{const v=u.trim();v&&o({title:v,description:h.trim()||null,status:N,priority:j,assigneeId:S,dueDate:k?Os(k):null})},e[15]=S,e[16]=h,e[17]=k,e[18]=o,e[19]=j,e[20]=N,e[21]=u,e[22]=G):G=e[22];const T=G,C=S===Qe;let Q;if(e[23]!==S||e[24]!==i){let v;e[26]!==S?(v=H=>H.userId===S,e[26]=S,e[27]=v):v=e[27],Q=i.find(v),e[23]=S,e[24]=i,e[25]=Q}else Q=e[25];const $=Q;let ee;e[28]!==n||e[29]!==i?(ee=n?.assignedBy?i.find(v=>v.userId===n.assignedBy):void 0,e[28]=n,e[29]=i,e[30]=ee):ee=e[30];const E=ee,te=ae[N].icon;let J;e[31]!==n?(J=n?Vt(n):void 0,e[31]=n,e[32]=J):J=e[32];const ce=J;let V;e[33]!==R?(V=v=>!v&&R(),e[33]=R,e[34]=V):V=e[34];const se=n?"Edit task":"New task";let le;e[35]!==se?(le=s.jsx(js,{className:"sr-only",children:se}),e[35]=se,e[36]=le):le=e[36];let ne;e[37]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(It,{size:16}),e[37]=ne):ne=e[37];let Y;e[38]!==R?(Y=s.jsx("button",{type:"button","aria-label":"Close",onClick:R,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ne}),e[38]=R,e[39]=Y):Y=e[39];let W;e[40]===Symbol.for("react.memo_cache_sentinel")?(W=v=>x(v.target.value),e[40]=W):W=e[40];let X;e[41]!==u?(X=s.jsx("input",{value:u,onChange:W,placeholder:"Task title...",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-medium text-foreground outline-none placeholder:text-foreground/30"}),e[41]=u,e[42]=X):X=e[42];let Z;e[43]===Symbol.for("react.memo_cache_sentinel")?(Z=v=>p(v.target.value),e[43]=Z):Z=e[43];let w;e[44]!==h?(w=s.jsx("textarea",{value:h,onChange:Z,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=h,e[45]=w):w=e[45];let de;e[46]!==E||e[47]!==$||e[48]!==d||e[49]!==ce?(de=ce&&s.jsx(Rs,{thread:ce,startedBy:E??$,onOpen:d}),e[46]=E,e[47]=$,e[48]=d,e[49]=ce,e[50]=de):de=e[50];let fe;e[51]!==X||e[52]!==w||e[53]!==de?(fe=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[X,w,de]}),e[51]=X,e[52]=w,e[53]=de,e[54]=fe):fe=e[54];let Ye;e[55]===Symbol.for("react.memo_cache_sentinel")?(Ye=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[55]=Ye):Ye=e[55];const ut=ae[N];let xe;e[56]!==te||e[57]!==ut.iconClassName?(xe=s.jsx(te,{size:16,className:ut.iconClassName}),e[56]=te,e[57]=ut.iconClassName,e[58]=xe):xe=e[58];const ft=ae[N];let ge;e[59]!==xe||e[60]!==ft.label?(ge=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ge,children:[xe,ft.label]})}),e[59]=xe,e[60]=ft.label,e[61]=ge):ge=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsx(it,{align:"start",className:"w-44",children:Wt.map(v=>{const H=ae[v].icon;return s.jsxs(qe,{onSelect:()=>b(v),className:"gap-2",children:[s.jsx(H,{size:16,className:ae[v].iconClassName}),ae[v].label]},v)})}),e[62]=He):He=e[62];let pe;e[63]!==ge?(pe=s.jsxs(ot,{children:[ge,He]}),e[63]=ge,e[64]=pe):pe=e[64];const xt=j==="none"&&"text-muted-foreground";let he;e[65]!==xt?(he=_(Ge,xt),e[65]=xt,e[66]=he):he=e[66];let be;e[67]!==j?(be=j==="none"?s.jsxs(s.Fragment,{children:[s.jsx(is,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:_("size-2 rounded-full",oe[j].dotClassName)}),oe[j].label]}),e[67]=j,e[68]=be):be=e[68];let je;e[69]!==he||e[70]!==be?(je=s.jsx(rt,{asChild:!0,children:s.jsx("button",{type:"button",className:he,children:be})}),e[69]=he,e[70]=be,e[71]=je):je=e[71];let Je;e[72]===Symbol.for("react.memo_cache_sentinel")?(Je=s.jsx(it,{align:"start",className:"w-40",children:Xt.map(v=>s.jsxs(qe,{onSelect:()=>y(v),children:[s.jsx("span",{className:_("size-2 rounded-full",oe[v].dotClassName)}),oe[v].label]},v))}),e[72]=Je):Je=e[72];let Ne;e[73]!==je?(Ne=s.jsxs(ot,{children:[je,Je]}),e[73]=je,e[74]=Ne):Ne=e[74];const gt=!S&&"text-muted-foreground";let ye;e[75]!==gt?(ye=_(Ge,gt),e[75]=gt,e[76]=ye):ye=e[76];let ve;e[77]!==E||e[78]!==$||e[79]!==C?(ve=C&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(me,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):C?s.jsxs(s.Fragment,{children:[s.jsx(me,{size:16}),"Super Agent"]}):$?s.jsxs(s.Fragment,{children:[s.jsx(ie,{url:$.user?.image??void 0,fallback:re($.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:$.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(os,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[77]=E,e[78]=$,e[79]=C,e[80]=ve):ve=e[80];let Se;e[81]!==ye||e[82]!==ve?(Se=s.jsx(Nt,{asChild:!0,children:s.jsx("button",{type:"button",className:ye,children:ve})}),e[81]=ye,e[82]=ve,e[83]=Se):Se=e[83];let Ve;e[84]===Symbol.for("react.memo_cache_sentinel")?(Ve=s.jsx(Kt,{placeholder:"Assign to…",className:"h-9"}),e[84]=Ve):Ve=e[84];let We;e[85]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx(Qt,{children:"No members found."}),e[85]=We):We=e[85];let Xe;e[86]===Symbol.for("react.memo_cache_sentinel")?(Xe=()=>{D(Qe),B(!1)},e[86]=Xe):Xe=e[86];let Ze;e[87]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsxs(ue,{value:"Super Agent",onSelect:Xe,className:"gap-2",children:[s.jsx(me,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[87]=Ze):Ze=e[87];let et;e[88]===Symbol.for("react.memo_cache_sentinel")?(et=()=>{D(null),B(!1)},e[88]=et):et=e[88];let tt;e[89]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsxs(ct,{children:[Ze,s.jsxs(ue,{value:"Unassigned",onSelect:et,className:"gap-2",children:[s.jsx(St,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[89]=tt):tt=e[89];let Ce;if(e[90]!==i){let v;e[92]===Symbol.for("react.memo_cache_sentinel")?(v=H=>s.jsxs(ue,{value:H.user?.name??H.userId,onSelect:()=>{D(H.userId),B(!1)},className:"gap-2",children:[s.jsx(ie,{url:H.user?.image??void 0,fallback:re(H.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:H.user?.name??H.userId})]},H.userId),e[92]=v):v=e[92],Ce=i.map(v),e[90]=i,e[91]=Ce}else Ce=e[91];let we;e[93]!==Ce?(we=s.jsx(yt,{align:"start",className:"w-56 p-0",children:s.jsxs(Yt,{children:[Ve,s.jsxs(Ht,{children:[We,tt,s.jsx(ct,{heading:"Members",children:Ce})]})]})}),e[93]=Ce,e[94]=we):we=e[94];let De;e[95]!==L||e[96]!==Se||e[97]!==we?(De=s.jsxs(vt,{open:L,onOpenChange:B,children:[Se,we]}),e[95]=L,e[96]=Se,e[97]=we,e[98]=De):De=e[98];let _e;e[99]!==E||e[100]!==C?(_e=C&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:_(Ge,"pointer-events-none"),children:[s.jsx(me,{size:16}),"Super Agent"]})]}),e[99]=E,e[100]=C,e[101]=_e):_e=e[101];let ke;e[102]!==De||e[103]!==_e?(ke=s.jsxs("div",{className:"flex flex-col",children:[De,_e]}),e[102]=De,e[103]=_e,e[104]=ke):ke=e[104];const pt=!k&&"text-muted-foreground";let Ie;e[105]!==pt?(Ie=_(Ge,pt),e[105]=pt,e[106]=Ie):Ie=e[106];let st;e[107]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[107]=st):st=e[107];let Te;e[108]!==k?(Te=k?Fs.format(k):"Due date",e[108]=k,e[109]=Te):Te=e[109];let ze;e[110]!==k?(ze=k&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:v=>{v.stopPropagation(),K(null)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),K(null))},children:s.jsx(It,{size:12})}),e[110]=k,e[111]=ze):ze=e[111];let Ae;e[112]!==Ie||e[113]!==Te||e[114]!==ze?(Ae=s.jsx(Nt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ie,children:[st,Te,ze]})}),e[112]=Ie,e[113]=Te,e[114]=ze,e[115]=Ae):Ae=e[115];const ht=k??void 0;let lt;e[116]===Symbol.for("react.memo_cache_sentinel")?(lt=v=>{K(v??null),v&&P(!1)},e[116]=lt):lt=e[116];let Ee;e[117]!==ht?(Ee=s.jsx(yt,{className:"w-auto p-0",align:"start",children:s.jsx(vs,{mode:"single",selected:ht,onSelect:lt,initialFocus:!0})}),e[117]=ht,e[118]=Ee):Ee=e[118];let $e;e[119]!==q||e[120]!==Ae||e[121]!==Ee?($e=s.jsxs(vt,{open:q,onOpenChange:P,children:[Ae,Ee]}),e[119]=q,e[120]=Ae,e[121]=Ee,e[122]=$e):$e=e[122];let Oe;e[123]!==pe||e[124]!==Ne||e[125]!==ke||e[126]!==$e?(Oe=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[Ye,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[pe,Ne,ke,$e]})]}),e[123]=pe,e[124]=Ne,e[125]=ke,e[126]=$e,e[127]=Oe):Oe=e[127];let Fe;e[128]!==fe||e[129]!==Oe?(Fe=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[fe,Oe]}),e[128]=fe,e[129]=Oe,e[130]=Fe):Fe=e[130];let Be;e[131]!==n||e[132]!==c?(Be=n&&c?s.jsx(Ue,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(cs,{size:16})}):s.jsx("span",{}),e[131]=n,e[132]=c,e[133]=Be):Be=e[133];let Me;e[134]!==f||e[135]!==u?(Me=!u.trim()||f,e[134]=f,e[135]=u,e[136]=Me):Me=e[136];let nt;e[137]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsx(Dt,{size:16}),e[137]=nt):nt=e[137];const bt=n?"Save":"Create task";let Re;e[138]!==T||e[139]!==Me||e[140]!==bt?(Re=s.jsxs(Ue,{size:"sm",disabled:Me,onClick:T,children:[nt,bt]}),e[138]=T,e[139]=Me,e[140]=bt,e[141]=Re):Re=e[141];let Pe;e[142]!==Be||e[143]!==Re?(Pe=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[Be,Re]}),e[142]=Be,e[143]=Re,e[144]=Pe):Pe=e[144];let Le;e[145]!==le||e[146]!==Y||e[147]!==Fe||e[148]!==Pe?(Le=s.jsxs(Ns,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[le,Y,Fe,Pe]}),e[145]=le,e[146]=Y,e[147]=Fe,e[148]=Pe,e[149]=Le):Le=e[149];let at;return e[150]!==l||e[151]!==V||e[152]!==Le?(at=s.jsx(ys,{open:l,onOpenChange:V,children:Le}),e[150]=l,e[151]=V,e[152]=Le,e[153]=at):at=e[153],at}function Rs(t){const e=O.c(14),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Bs[l.status]:null,o=l.lastMessage??l.title;let c,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=c,e[1]=d):(c=e[0],d=e[1]);let f;e[2]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ie,{url:a.user?.image??void 0,fallback:re(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[c,d,f]}),e[4]=f,e[5]=m):m=e[5];let g;e[6]!==o||e[7]!==n||e[8]!==r||e[9]!==l?(g=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:_("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:_(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),o&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:o}),n&&s.jsx(Ss,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=o,e[7]=n,e[8]=r,e[9]=l,e[10]=g):g=e[10];let i;return e[11]!==m||e[12]!==g?(i=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[m,g]}),e[11]=m,e[12]=g,e[13]=i):i=e[13],i}const wt="__unassigned__",dt={assignee:null,priority:null,due:null};function Ps(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Ls(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Us=864e5;function qs(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function Gs(t,e){if(e.assignee!==null){if(e.assignee===wt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!qs(l,a)||e.due==="week"&&l>a+7*Us)return!1}return!0}const At=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function mt(t,e=!1){return _("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ks(t){const e=O.c(62),{value:l,members:a,onChange:n,block:r}=t,[o,c]=z.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(St,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let f=d,m="Assignee";if(l===wt)m="Unassigned";else if(l===Qe){let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(me,{size:14}),e[1]=T):T=e[1],f=T,m="Super Agent"}else if(l){let T,C,Q,$;if(e[2]!==a||e[3]!==l){let E;e[8]!==l?(E=te=>te.userId===l,e[8]=l,e[9]=E):E=e[9],C=a.find(E),T=ie,Q=C?.user?.image??void 0,$=re(C?.user?.name),e[2]=a,e[3]=l,e[4]=T,e[5]=C,e[6]=Q,e[7]=$}else T=e[4],C=e[5],Q=e[6],$=e[7];let ee;e[10]!==T||e[11]!==Q||e[12]!==$?(ee=s.jsx(T,{url:Q,fallback:$,shape:"circle",size:"2xs"}),e[10]=T,e[11]=Q,e[12]=$,e[13]=ee):ee=e[13],f=ee,m=C?.user?.name??"Member"}let g;e[14]!==n?(g=T=>{n(T),c(!1)},e[14]=n,e[15]=g):g=e[15];const i=g,u=l!==null;let x;e[16]!==r||e[17]!==u?(x=mt(u,r),e[16]=r,e[17]=u,e[18]=x):x=e[18];const h=x,p=r&&"ml-auto";let N;e[19]!==p?(N=_("shrink-0 opacity-60",p),e[19]=p,e[20]=N):N=e[20];const b=N;let j;e[21]!==m?(j=s.jsx("span",{className:"max-w-[10rem] truncate",children:m}),e[21]=m,e[22]=j):j=e[22];let y;e[23]!==b?(y=s.jsx(_t,{size:12,className:b}),e[23]=b,e[24]=y):y=e[24];let S;e[25]!==f||e[26]!==j||e[27]!==y||e[28]!==h?(S=s.jsx(Nt,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[f,j,y]})}),e[25]=f,e[26]=j,e[27]=y,e[28]=h,e[29]=S):S=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Kt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=D):D=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Qt,{children:"No members found."}),e[31]=A):A=e[31];let F;e[32]!==i?(F=s.jsx(ue,{value:"Anyone",onSelect:()=>i(null),children:"Anyone"}),e[32]=i,e[33]=F):F=e[33];let k;e[34]!==i?(k=()=>i(wt),e[34]=i,e[35]=k):k=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(St,{size:16,className:"text-muted-foreground"}),e[36]=K):K=e[36];let q;e[37]!==k?(q=s.jsxs(ue,{value:"Unassigned",onSelect:k,className:"gap-2",children:[K,"Unassigned"]}),e[37]=k,e[38]=q):q=e[38];let P;e[39]!==i?(P=()=>i(Qe),e[39]=i,e[40]=P):P=e[40];let L;e[41]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(me,{size:16}),e[41]=L):L=e[41];let B;e[42]!==P?(B=s.jsxs(ue,{value:"Super Agent",onSelect:P,className:"gap-2",children:[L,"Super Agent"]}),e[42]=P,e[43]=B):B=e[43];let M;e[44]!==F||e[45]!==q||e[46]!==B?(M=s.jsxs(ct,{children:[F,q,B]}),e[44]=F,e[45]=q,e[46]=B,e[47]=M):M=e[47];let U;if(e[48]!==a||e[49]!==i){let T;e[51]!==i?(T=C=>s.jsxs(ue,{value:C.user?.name??C.userId,onSelect:()=>i(C.userId),className:"gap-2",children:[s.jsx(ie,{url:C.user?.image??void 0,fallback:re(C.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:C.user?.name??C.userId})]},C.userId),e[51]=i,e[52]=T):T=e[52],U=a.map(T),e[48]=a,e[49]=i,e[50]=U}else U=e[50];let I;e[53]!==U?(I=s.jsx(ct,{heading:"Members",children:U}),e[53]=U,e[54]=I):I=e[54];let R;e[55]!==M||e[56]!==I?(R=s.jsx(yt,{align:"start",className:"w-56 p-0",children:s.jsxs(Yt,{children:[D,s.jsxs(Ht,{children:[A,M,I]})]})}),e[55]=M,e[56]=I,e[57]=R):R=e[57];let G;return e[58]!==o||e[59]!==R||e[60]!==S?(G=s.jsxs(vt,{open:o,onOpenChange:c,children:[S,R]}),e[58]=o,e[59]=R,e[60]=S,e[61]=G):G=e[61],G}function Qs(t){const e=O.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let o;e[0]!==n||e[1]!==r?(o=mt(r,n),e[0]=n,e[1]=r,e[2]=o):o=e[2];const c=o,d=n&&"ml-auto";let f;e[3]!==d?(f=_("shrink-0 opacity-60",d),e[3]=d,e[4]=f):f=e[4];const m=f;let g;e[5]!==l?(g=l?s.jsx("span",{className:_("size-2 shrink-0 rounded-full",oe[l].dotClassName)}):s.jsx(Ts,{size:14,className:"shrink-0"}),e[5]=l,e[6]=g):g=e[6];const i=l?oe[l].label:"Priority";let u;e[7]!==m?(u=s.jsx(_t,{size:12,className:m}),e[7]=m,e[8]=u):u=e[8];let x;e[9]!==g||e[10]!==i||e[11]!==u||e[12]!==c?(x=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[g,i,u]})}),e[9]=g,e[10]=i,e[11]=u,e[12]=c,e[13]=x):x=e[13];let h,p;e[14]!==a?(p=s.jsx(qe,{onSelect:()=>a(null),children:"Any priority"}),h=Xt.map(j=>s.jsxs(qe,{onSelect:()=>a(j),className:"gap-2",children:[s.jsx("span",{className:_("size-2 rounded-full",oe[j].dotClassName)}),oe[j].label]},j)),e[14]=a,e[15]=h,e[16]=p):(h=e[15],p=e[16]);let N;e[17]!==h||e[18]!==p?(N=s.jsxs(it,{align:"start",className:"w-40",children:[p,h]}),e[17]=h,e[18]=p,e[19]=N):N=e[19];let b;return e[20]!==N||e[21]!==x?(b=s.jsxs(ot,{children:[x,N]}),e[20]=N,e[21]=x,e[22]=b):b=e[22],b}function Ys(t){const e=O.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=At.find(A=>A.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const o=r,c=l!==null;let d;e[2]!==n||e[3]!==c?(d=mt(c,n),e[2]=n,e[3]=c,e[4]=d):d=e[4];const f=d,m=n&&"ml-auto";let g;e[5]!==m?(g=_("shrink-0 opacity-60",m),e[5]=m,e[6]=g):g=e[6];const i=g;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ke,{size:14,className:"shrink-0"}),e[7]=u):u=e[7];const x=o??"Due date";let h;e[8]!==i?(h=s.jsx(_t,{size:12,className:i}),e[8]=i,e[9]=h):h=e[9];let p;e[10]!==x||e[11]!==h||e[12]!==f?(p=s.jsx(rt,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,x,h]})}),e[10]=x,e[11]=h,e[12]=f,e[13]=p):p=e[13];let N;e[14]!==a?(N=()=>a(null),e[14]=a,e[15]=N):N=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[16]=b):b=e[16];let j;e[17]!==N?(j=s.jsxs(qe,{onSelect:N,className:"gap-2",children:[b,"Any time"]}),e[17]=N,e[18]=j):j=e[18];let y;e[19]!==a?(y=At.map(A=>{const F=A.value==="overdue";return s.jsxs(qe,{onSelect:()=>a(A.value),className:_("gap-2",F&&"text-destructive"),children:[s.jsx(Ke,{size:16,className:_("shrink-0",F?"text-destructive":"text-muted-foreground")}),A.label]},A.value)}),e[19]=a,e[20]=y):y=e[20];let S;e[21]!==j||e[22]!==y?(S=s.jsxs(it,{align:"start",className:"w-44",children:[j,y]}),e[21]=j,e[22]=y,e[23]=S):S=e[23];let D;return e[24]!==S||e[25]!==p?(D=s.jsxs(ot,{children:[p,S]}),e[24]=S,e[25]=p,e[26]=D):D=e[26],D}function Zt(t){const e=O.c(26),{filters:l,members:a,onChange:n,block:r}=t;let o;e[0]!==l||e[1]!==n?(o=u=>n({...l,assignee:u}),e[0]=l,e[1]=n,e[2]=o):o=e[2];let c;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==o?(c=s.jsx(Ks,{block:r,value:l.assignee,members:a,onChange:o}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=o,e[7]=c):c=e[7];let d;e[8]!==l||e[9]!==n?(d=u=>n({...l,priority:u}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let f;e[11]!==r||e[12]!==l.priority||e[13]!==d?(f=s.jsx(Qs,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=f):f=e[14];let m;e[15]!==l||e[16]!==n?(m=u=>n({...l,due:u}),e[15]=l,e[16]=n,e[17]=m):m=e[17];let g;e[18]!==r||e[19]!==l.due||e[20]!==m?(g=s.jsx(Ys,{block:r,value:l.due,onChange:m}),e[18]=r,e[19]=l.due,e[20]=m,e[21]=g):g=e[21];let i;return e[22]!==c||e[23]!==f||e[24]!==g?(i=s.jsxs(s.Fragment,{children:[c,f,g]}),e[22]=c,e[23]=f,e[24]=g,e[25]=i):i=e[25],i}function Hs(t){const e=O.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Jt,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let o;e[1]!==l||e[2]!==a||e[3]!==n?(o=s.jsx(Zt,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=o):o=e[4];let c;e[5]!==l||e[6]!==n?(c=Ps(l)&&s.jsx("button",{type:"button",onClick:()=>n(dt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,o,c]}),e[8]=o,e[9]=c,e[10]=d):d=e[10],d}function Js(t){const e=O.c(26),{filters:l,members:a,onChange:n}=t,[r,o]=z.useState(!1),c=Ls(l),d=c>0;let f;e[0]!==d?(f=mt(d),e[0]=d,e[1]=f):f=e[1];const m=f;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Jt,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let i;e[3]!==c?(i=c>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:c}),e[3]=c,e[4]=i):i=e[4];let u;e[5]!==i||e[6]!==m?(u=s.jsx(Cs,{asChild:!0,children:s.jsxs("button",{type:"button",className:m,children:[g,"Filters",i]})}),e[5]=i,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ws,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==a||e[11]!==n?(h=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Zt,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=h):h=e[12];let p;e[13]!==c||e[14]!==n?(p=c>0&&s.jsx(Ue,{variant:"outline",className:"flex-1",onClick:()=>n(dt),children:"Clear all"}),e[13]=c,e[14]=n,e[15]=p):p=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ds,{asChild:!0,children:s.jsx(Ue,{className:"flex-1",children:"Done"})}),e[16]=N):N=e[16];let b;e[17]!==p?(b=s.jsxs(_s,{className:"flex-row gap-2",children:[p,N]}),e[17]=p,e[18]=b):b=e[18];let j;e[19]!==b||e[20]!==h?(j=s.jsxs(ks,{className:"p-0",children:[x,h,b]}),e[19]=b,e[20]=h,e[21]=j):j=e[21];let y;return e[22]!==r||e[23]!==j||e[24]!==u?(y=s.jsxs(Is,{open:r,onOpenChange:o,direction:"bottom",children:[u,j]}),e[22]=r,e[23]=j,e[24]=u,e[25]=y):y=e[25],y}const Et=380,Vs=90,$t=5,Ws="cubic-bezier(0.22, 0.61, 0.36, 1)",Xs=8;function Zs(t,e){const l=z.useRef(new Map);z.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,o=new Map,c=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const i of n){const u=i.dataset.flipId;if(!u)continue;const x=i.getBoundingClientRect();o.set(u,x);const h=r.get(u);if(!h)continue;const p=h.left-x.left,N=h.top-x.top;(p||N)&&d.push({el:i,dx:p,dy:N,lane:Math.abs(p)>Xs})}if(l.current=o,c||d.length===0)return;for(const i of d){const u=i.lane?` rotate(${i.dx>0?$t:-$t}deg)`:"";i.el.style.transition="none",i.el.style.transform=`translate(${i.dx}px, ${i.dy}px)${u}`,i.lane&&(i.el.style.zIndex="10")}let f=0;const m=[],g=requestAnimationFrame(()=>{for(const i of d){const u=i.lane?f++*Vs:0;i.el.style.transition=`transform ${Et}ms ${Ws} ${u}ms`,i.el.style.transform="",m.push(window.setTimeout(()=>{i.el.style.transition="",i.el.style.transform="",i.el.style.zIndex=""},Et+u+30))}});return()=>{cancelAnimationFrame(g);for(const i of m)clearTimeout(i)}},[e,t])}function el(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ns,{})})})}),t[0]=e):e=t[0],e}const tl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function sl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:tl.format(e),overdue:l}}const kt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function es(){const t=O.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_(kt,"border-amber-500/30 text-amber-600"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Pt,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function ts(t){const e=O.c(7),{priority:l}=t,a=oe[l];let n;e[0]!==a.dotClassName?(n=_("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a.label||e[5]!==r?(o=s.jsxs("span",{className:kt,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=o):o=e[6],o}function ss(t){const e=O.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:c,overdue:d}=sl(l);a=c,n=_(kt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{size:14}),e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==n?(o=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=o):o=e[6],o}function ls(t){const e=O.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===Qe){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let o;e[0]!==n?(o=n&&s.jsx(ie,{url:n.user?.image??void 0,fallback:re(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:16,className:"ring-2 ring-background"}),e[2]=c):c=e[2];let d;return e[3]!==r||e[4]!==o?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[o,c]}),e[3]=r,e[4]=o,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,o=a.user?.name;let c;e[6]!==o?(c=re(o),e[6]=o,e[7]=c):c=e[7];let d;return e[8]!==r||e[9]!==c?(d=s.jsx(ie,{url:r,fallback:c,shape:"circle",size:"2xs"}),e[8]=r,e[9]=c,e[10]=d):d=e[10],d}return null}function ns(){const t=O.c(64),{items:e,isLoading:l}=Es(),a=$s(),{data:n}=Lt();let r,o;t[0]!==n?.data?.members?(r=n?.data?.members??[],o=new Map(r.map(ll)),t[0]=n?.data?.members,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const c=o,[d,f]=z.useState("board"),[m,g]=z.useState(dt),[i,u]=z.useState(!1),[x,h]=z.useState(null),[p,N]=z.useState(null),{setTaskId:b}=zs();let j,y,S,D;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==d||t[8]!==c||t[9]!==r){D=Symbol.for("react.early_return_sentinel");e:{let I;t[14]!==m?(I=w=>Gs(w,m),t[14]=m,t[15]=I):I=t[15];const R=e.filter(I);let G;t[16]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{h(null),N(null),u(!0)},t[16]=G):G=t[16];const T=G;let C;t[17]===Symbol.for("react.memo_cache_sentinel")?(C=w=>{h(null),N(w),u(!0)},t[17]=C):C=t[17];const Q=C;let $;t[18]===Symbol.for("react.memo_cache_sentinel")?($=w=>{h(w),u(!0)},t[18]=$):$=t[18];const E=$;if(l&&e.length===0){let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(rs,{size:20,className:"animate-spin text-muted-foreground"})}),t[19]=w):w=t[19],D=w;break e}j="mx-auto flex min-h-0 w-full max-w-[1680px] flex-1 flex-col";let te;t[20]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[20]=te):te=t[20];let J;t[21]!==m||t[22]!==e.length||t[23]!==r?(J=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(Js,{filters:m,members:r,onChange:g})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(Hs,{filters:m,members:r,onChange:g})})]}),t[21]=m,t[22]=e.length,t[23]=r,t[24]=J):J=t[24];const ce=d==="list";let V;t[25]===Symbol.for("react.memo_cache_sentinel")?(V=()=>f("list"),t[25]=V):V=t[25];let se;t[26]!==ce?(se=s.jsx(Ot,{active:ce,onClick:V,icon:us,label:"List"}),t[26]=ce,t[27]=se):se=t[27];const le=d==="board";let ne;t[28]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f("board"),t[28]=ne):ne=t[28];let Y;t[29]!==le?(Y=s.jsx(Ot,{active:le,onClick:ne,icon:ms,label:"Board"}),t[29]=le,t[30]=Y):Y=t[30];let W;t[31]!==se||t[32]!==Y?(W=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[se,Y]}),t[31]=se,t[32]=Y,t[33]=W):W=t[33];let X;t[34]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(Ue,{size:"sm",onClick:T,children:[s.jsx(Dt,{size:16}),"New task"]}),t[34]=X):X=t[34];let Z;t[35]!==W?(Z=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[W,X]}),t[35]=W,t[36]=Z):Z=t[36],t[37]!==J||t[38]!==Z?(y=s.jsxs("div",{className:"flex flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[te,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[J,Z]})]}),t[37]=J,t[38]=Z,t[39]=y):y=t[39],S=e.length===0?s.jsx("div",{className:"px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):R.length===0?s.jsx("div",{className:"px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(Ue,{variant:"outline",size:"sm",onClick:()=>g(dt),children:"Clear filters"})]})}):d==="board"?s.jsx(nl,{items:R,memberByUserId:c,onOpen:E,onCreate:Q,onMove:(w,de)=>a.update.mutate({id:w,status:de})}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:R.map(w=>s.jsx(il,{item:w,assignee:w.assigneeId?c.get(w.assigneeId):void 0,assignedBy:w.assignedBy?c.get(w.assignedBy):void 0,onOpen:()=>E(w)},w.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=d,t[8]=c,t[9]=r,t[10]=j,t[11]=y,t[12]=S,t[13]=D}else j=t[10],y=t[11],S=t[12],D=t[13];if(D!==Symbol.for("react.early_return_sentinel"))return D;const A=i?x?.id??`new-${p??"default"}`:"closed";let F;t[40]===Symbol.for("react.memo_cache_sentinel")?(F=()=>u(!1),t[40]=F):F=t[40];const k=x??void 0,K=p??void 0,q=a.create.isPending||a.update.isPending;let P;t[41]!==a.create||t[42]!==a.update||t[43]!==x?(P=I=>{x?a.update.mutate({id:x.id,...I}):a.create.mutate(I),u(!1)},t[41]=a.create,t[42]=a.update,t[43]=x,t[44]=P):P=t[44];let L;t[45]!==a.remove||t[46]!==x?(L=x?()=>{a.remove.mutate(x.id),u(!1)}:void 0,t[45]=a.remove,t[46]=x,t[47]=L):L=t[47];let B;t[48]!==b?(B=I=>{I.virtualMcpId&&(u(!1),b(I.threadId,I.virtualMcpId,{main:I.hasPreview?"preview":"board"}))},t[48]=b,t[49]=B):B=t[49];let M;t[50]!==i||t[51]!==P||t[52]!==L||t[53]!==B||t[54]!==A||t[55]!==k||t[56]!==K||t[57]!==q?(M=s.jsx(Ms,{open:i,onClose:F,item:k,defaultStatus:K,isSaving:q,onSubmit:P,onDelete:L,onOpenThread:B},A),t[50]=i,t[51]=P,t[52]=L,t[53]=B,t[54]=A,t[55]=k,t[56]=K,t[57]=q,t[58]=M):M=t[58];let U;return t[59]!==j||t[60]!==M||t[61]!==y||t[62]!==S?(U=s.jsxs("div",{className:j,children:[y,S,M]}),t[59]=j,t[60]=M,t[61]=y,t[62]=S,t[63]=U):U=t[63],U}function ll(t){return[t.userId,t]}function Ot(t){const e=O.c(11),{active:l,onClick:a,icon:n,label:r}=t,o=`${r} view`,c=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==c?(d=_("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",c),e[0]=c,e[1]=d):d=e[1];let f;e[2]!==n?(f=s.jsx(n,{size:14}),e[2]=n,e[3]=f):f=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==d||e[9]!==f?(m=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,"aria-pressed":l,className:d,children:[f,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=o,e[8]=d,e[9]=f,e[10]=m):m=e[10],m}function nl(t){const e=O.c(11),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:o}=t,[c,d]=z.useState(null),f=z.useRef(null);let m;e[0]!==l?(m=l.map(al).join(","),e[0]=l,e[1]=m):m=e[1],Zs(f,m);let i;e[2]!==l||e[3]!==a||e[4]!==r||e[5]!==o||e[6]!==n||e[7]!==c?(i=Wt.map(x=>{const h=l.filter(b=>b.status===x),p=ae[x],N=p.icon;return s.jsxs("div",{onDragOver:b=>{b.preventDefault(),d(x)},onDragLeave:b=>{b.currentTarget.contains(b.relatedTarget)||d(null)},onDrop:b=>{b.preventDefault();const j=b.dataTransfer.getData("text/plain");j&&o(j,x),d(null)},className:_("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",c===x&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(N,{size:15,className:_("shrink-0",p.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:p.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:h.length}),s.jsx("button",{type:"button","aria-label":`New task in ${p.label}`,title:`New task in ${p.label}`,onClick:()=>r(x),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Dt,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:h.map(b=>s.jsx(rl,{item:b,assignee:b.assigneeId?a.get(b.assigneeId):void 0,assignedBy:b.assignedBy?a.get(b.assignedBy):void 0,onOpen:()=>n(b)},b.id))})]},x)}),e[2]=l,e[3]=a,e[4]=r,e[5]=o,e[6]=n,e[7]=c,e[8]=i):i=e[8];let u;return e[9]!==i?(u=s.jsx("div",{ref:f,className:"flex min-h-0 flex-1 gap-3 overflow-x-auto overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:i}),e[9]=i,e[10]=u):u=e[10],u}function al(t){return`${t.id}:${t.status}`}function rl(t){const e=O.c(29),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=ae[l.status],c=o.icon,d=Vt(l)?.lastMessage,f=l.id;let m;e[0]!==l.id?(m=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=m):m=e[1];const g=l.title;let i;e[2]!==o.iconClassName?(i=_("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=i):i=e[3];let u;e[4]!==c||e[5]!==i?(u=s.jsx(c,{size:16,className:i}),e[4]=c,e[5]=i,e[6]=u):u=e[6];let x;e[7]!==l.title?(x=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=x):x=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(ls,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let p;e[13]!==u||e[14]!==x||e[15]!==h?(p=s.jsxs("div",{className:"flex items-start gap-2",children:[u,x,h]}),e[13]=u,e[14]=x,e[15]=h,e[16]=p):p=e[16];let N;e[17]!==d?(N=d&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:d}),e[17]=d,e[18]=N):N=e[18];let b;e[19]!==l?(b=(Ct(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Ct(l)&&s.jsx(es,{}),l.priority!=="none"&&s.jsx(ts,{priority:l.priority}),l.dueDate&&s.jsx(ss,{iso:l.dueDate})]}),e[19]=l,e[20]=b):b=e[20];let j;return e[21]!==l.id||e[22]!==l.title||e[23]!==r||e[24]!==b||e[25]!==m||e[26]!==p||e[27]!==N?(j=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":f,onDragStart:m,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:g,children:[p,N,b]}),e[21]=l.id,e[22]=l.title,e[23]=r,e[24]=b,e[25]=m,e[26]=p,e[27]=N,e[28]=j):j=e[28],j}function il(t){const e=O.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=ae[l.status],c=o.icon;let d;e[0]!==o.iconClassName?(d=_("shrink-0",o.iconClassName),e[0]=o.iconClassName,e[1]=d):d=e[1];let f;e[2]!==c||e[3]!==d?(f=s.jsx(c,{size:16,className:d}),e[2]=c,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==l.title?(m=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=m):m=e[6];let g;e[7]!==l?(g=Ct(l)&&s.jsx(es,{}),e[7]=l,e[8]=g):g=e[8];let i;e[9]!==l.priority?(i=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(ts,{priority:l.priority})}),e[9]=l.priority,e[10]=i):i=e[10];let u;e[11]!==l.dueDate?(u=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(ss,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=u):u=e[12];let x;e[13]!==n||e[14]!==a||e[15]!==l?(x=s.jsx(ls,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=x):x=e[16];let h;e[17]!==l.createdAt?(h=ps(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=h):h=e[18];let p;e[19]!==h?(p=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:h}),e[19]=h,e[20]=p):p=e[20];let N;return e[21]!==r||e[22]!==f||e[23]!==m||e[24]!==g||e[25]!==i||e[26]!==u||e[27]!==x||e[28]!==p?(N=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[f,m,g,i,u,x,p]}),e[21]=r,e[22]=f,e[23]=m,e[24]=g,e[25]=i,e[26]=u,e[27]=x,e[28]=p,e[29]=N):N=e[29],N}const Bl=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ns,default:el},Symbol.toStringTag,{value:"Module"}));export{oe as P,ae as S,Ms as T,$s as a,me as b,ns as c,Bl as i,Es as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bi as f,bj as t,ae as R,I as l,c2 as z,H as s,af as y,ac as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-
|
|
1
|
+
import{bi as f,bj as t,ae as R,I as l,c2 as z,H as s,af as y,ac as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-DxAcjTx0.js";import{P as Je}from"./use-mcp-client-8bA1TgWq.js";const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ye(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ge(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=r.match(n);if(c){const m=(c.index??0)+c[0].length;return r.slice(0,m)+`
|
|
2
2
|
`+i+r.slice(m)}const d=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,u=r.match(d);if(u){const m=(u.index??0)+u[0].length;return r.slice(0,m)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,aM as R}from"./index-
|
|
1
|
+
import{r as a,aM as R}from"./index-DxAcjTx0.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|