decocms 4.372.3 → 4.373.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-CMjsP_Tk.js → AlertCircle-2L7lI8NL.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh_grNQZ.js → AreaChart-BSJ08P7a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CjYy5Nhj.js → ArrowLeft-8rouBEwC.js} +1 -1
- package/dist/client/assets/{ArrowRight-CLncCNat.js → ArrowRight-DCA5zjxW.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cii1LHW7.js → ArrowUp-BtksDHBQ.js} +1 -1
- package/dist/client/assets/{CartesianChart-CD-5y_pX.js → CartesianChart-BbOaLmfq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DHXQFnpK.js → CheckCircle-BmVuh1xp.js} +1 -1
- package/dist/client/assets/{ChevronUp-DiYhGG4T.js → ChevronUp-fg9sod-H.js} +1 -1
- package/dist/client/assets/{Copy01-nMxlBfeT.js → Copy01-BgwuTJFm.js} +1 -1
- package/dist/client/assets/{CreditCard01-CWXVH3ZM.js → CreditCard01-CIt471eG.js} +1 -1
- package/dist/client/assets/DotsVertical-CE2o6L6N.js +1 -0
- package/dist/client/assets/{Download01-BRrSA3Yx.js → Download01-DNhEQzg0.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-fXvhmekg.js → ErrorBarContext-DxNax47N.js} +1 -1
- package/dist/client/assets/{Eye-Dyg2WPG4.js → Eye-Dq6Vw6FI.js} +1 -1
- package/dist/client/assets/{Globe01-D6FaaFR2.js → Globe01-g_y8gAs1.js} +1 -1
- package/dist/client/assets/{Users03-Y0Jco4zL.js → Globe04-GFiRExL0.js} +1 -1
- package/dist/client/assets/{Image01-CxnjAzbb.js → Image01-QB6twEDu.js} +1 -1
- package/dist/client/assets/{Key01-CIXwHMRo.js → Key01-CO_i2QPb.js} +1 -1
- package/dist/client/assets/LayoutLeft-BfySK4h8.js +1 -0
- package/dist/client/assets/{Line-YO4Ozgbt.js → Line-Cr57fOtp.js} +1 -1
- package/dist/client/assets/{Link01-C0FvgZZB.js → Link01-BIFMl_M0.js} +1 -1
- package/dist/client/assets/{LinkExternal01-AWlhN5o7.js → LinkExternal01-DQD59o7F.js} +1 -1
- package/dist/client/assets/{Monitor01-Ccs1gh2Z.js → Monitor01-Ddm2yOG6.js} +1 -1
- package/dist/client/assets/{Package-nTbucmaQ.js → Package-CvzEol5_.js} +1 -1
- package/dist/client/assets/{Palette-DSdn1Xis.js → Palette-DT856bn6.js} +1 -1
- package/dist/client/assets/{Play-lMuWOObF.js → Play-wYDcJhBq.js} +1 -1
- package/dist/client/assets/{Plus-CVauOqLT.js → Plus-BSp00qOC.js} +1 -1
- package/dist/client/assets/{SearchLg-BrrPVuXr.js → SearchLg-DFD1t2UL.js} +1 -1
- package/dist/client/assets/{SearchMd-C45D2PMI.js → SearchMd-Bb5gjLcX.js} +1 -1
- package/dist/client/assets/{Sector-9mXbxJ9i.js → Sector-wViCnB96.js} +5 -5
- package/dist/client/assets/{Settings02-Cyf85ea0.js → Settings02-D9Qv7BDm.js} +1 -1
- package/dist/client/assets/{Share07-wC47qn2E.js → Share07-CZ7JzYs9.js} +1 -1
- package/dist/client/assets/{Stars01-oAh9h5b5.js → Stars01-D-wYuyik.js} +1 -1
- package/dist/client/assets/{Sun-0Ied-kyZ.js → Sun-DLRcOzSd.js} +1 -1
- package/dist/client/assets/Tool01-Dwy1nlT9.js +1 -0
- package/dist/client/assets/{Tool02-CATStXCy.js → Tool02-CvlAGFBM.js} +1 -1
- package/dist/client/assets/{Trash01-nl-t4IoV.js → Trash01-DtE0n00a.js} +1 -1
- package/dist/client/assets/{TrendUp01-BFAEMx9E.js → TrendUp01-BCriuXJd.js} +1 -1
- package/dist/client/assets/{Upload01-B4Fqdkae.js → Upload01-Ba-RLxE1.js} +1 -1
- package/dist/client/assets/{User01-ClMaVCaJ.js → User01-DHd46PZp.js} +1 -1
- package/dist/client/assets/{UserSquare-B2lKdt4w.js → UserSquare-CcF49LHs.js} +1 -1
- package/dist/client/assets/{Users01-BFhxJVhO.js → Users01-B8gdz27Y.js} +1 -1
- package/dist/client/assets/{X-CFCE4a-Q.js → X-BtMi8Qau.js} +1 -1
- package/dist/client/assets/{XCircle-CleKT0Id.js → XCircle-BLCHBIhx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DpXsFGyJ.js → XClose-CvcHLHe2.js} +1 -1
- package/dist/client/assets/{Zap-B6zkqKWB.js → Zap-DZAIluO6.js} +1 -1
- package/dist/client/assets/ZoomOut-DUFJq3-K.js +1 -0
- package/dist/client/assets/{access-gate-Ds4n25mC.js → access-gate-C9Dl5e5c.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DA05asFs.js +1 -0
- package/dist/client/assets/agent-analytics-CDo5Hugr.js +2 -0
- package/dist/client/assets/agent-app-lfl4wDqj.js +1 -0
- package/dist/client/assets/agent-assets-6UK-ev9d.js +1 -0
- package/dist/client/assets/agent-automation-BC-cMvrG.js +20 -0
- package/dist/client/assets/agent-automations-CnHTcvU7.js +1 -0
- package/dist/client/assets/agent-connect-sources-CJ8artss.js +1 -0
- package/dist/client/assets/agent-deck-BCZ0G4O2.js +1 -0
- package/dist/client/assets/agent-e2e-Cj1Q_JS0.js +1 -0
- package/dist/client/assets/agent-experiments-DJ13yAp9.js +1 -0
- package/dist/client/assets/agent-file-DbKP1r-4.js +1 -0
- package/dist/client/assets/{agent-git-D4IYczGa.js → agent-git-B8LMQ2zl.js} +2 -2
- package/dist/client/assets/agent-hosting-Bm-WxahY.js +1 -0
- package/dist/client/assets/agent-icon-CTsmTxHg.js +1 -0
- package/dist/client/assets/agent-library-file-DvybgEEZ.js +1 -0
- package/dist/client/assets/agent-monitor-DgVt0zbx.js +1 -0
- package/dist/client/assets/agent-overview-pOglhwpN.js +1 -0
- package/dist/client/assets/agent-settings-Bx-Ya3hQ.js +1 -0
- package/dist/client/assets/{agent-site-editor-DJSdtoNU.js → agent-site-editor-DVT-M9T0.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-DpPWdLwT.js +2 -0
- package/dist/client/assets/agent-site-editor-content-eM0WchN0.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-3VO_kTqr.js +518 -0
- package/dist/client/assets/{agent-view-guard-DHJpzCVR.js → agent-view-guard-BNYKK-x9.js} +1 -1
- package/dist/client/assets/agent-view-v-h5B6vN.js +1 -0
- package/dist/client/assets/agents-list-BXPjUzIN.js +1 -0
- package/dist/client/assets/{ai-providers-jxGd6MbV.js → ai-providers-BAmCFPvS.js} +2 -2
- package/dist/client/assets/{alert-U2IStW1f.js → alert-C8o4-kn8.js} +1 -1
- package/dist/client/assets/{alert-dialog-BI-B_8hq.js → alert-dialog-9n2p5SCQ.js} +2 -2
- package/dist/client/assets/api-keys-Cu1KdEtK.js +1 -0
- package/dist/client/assets/api-keys-DCurVLgh.js +1 -0
- package/dist/client/assets/app-editor-C3QSidsO.js +1 -0
- package/dist/client/assets/asset-utils-CK3Em4fb.js +1 -0
- package/dist/client/assets/{auth-DhzAq_9m.js → auth-BBW3DF0r.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dar7OygY.js → auth-catchall-Bva2z4Gj.js} +1 -1
- package/dist/client/assets/auth-entry-BuHqwUIr.js +1 -0
- package/dist/client/assets/{auth-split-layout-DLFqjvPt.js → auth-split-layout-DMgxvbll.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DkJ4g-X5.js → authenticate-and-persist-oauth-Pk9b2m8R.js} +1 -1
- package/dist/client/assets/automation-list-row-D-zBLXA-.js +1 -0
- package/dist/client/assets/automation-runs-C8Wbje-n.js +1 -0
- package/dist/client/assets/automations-D69ikqKh.js +1 -0
- package/dist/client/assets/{autosend-BberXmli.js → autosend-CVNOmzPu.js} +1 -1
- package/dist/client/assets/{avatar-C9HiP4eS.js → avatar-BzRNaDEk.js} +1 -1
- package/dist/client/assets/badge-C5M6nZd4.js +1 -0
- package/dist/client/assets/block-document-UPtnFOJG.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-Bwmvvd4S.js → blocks-preview-workspace-context-DAFMxzU6.js} +1 -1
- package/dist/client/assets/breadcrumb-0yy48vm9.js +1 -0
- package/dist/client/assets/{buckets-BndbOAGO.js → buckets-CktpbsrB.js} +1 -1
- package/dist/client/assets/build-improve-prompt-doc-C-SX02eL.js +2 -0
- package/dist/client/assets/bulk-category-panel-MrIv4eD2.js +1 -0
- package/dist/client/assets/calendar-QcX36iLy.js +1 -0
- package/dist/client/assets/capability-load-error-BVb3VEU2.js +1 -0
- package/dist/client/assets/category-editor-DZThBJlF.js +1 -0
- package/dist/client/assets/{chart-8nXuVw9P.js → chart-BVjaATZw.js} +5 -5
- package/dist/client/assets/{chat-context-tZCX_cqt.js → chat-context-ELO8A2Ar.js} +6 -6
- package/dist/client/assets/{chat-draft-BCeqPSxA.js → chat-draft-tDfZTlxU.js} +1 -1
- package/dist/client/assets/checkbox-iGlb02v9.js +1 -0
- package/dist/client/assets/choose-editor-CWLAiGtz.js +1 -0
- package/dist/client/assets/{cli-auth-success-D39z_FO3.js → cli-auth-success-DyNW_Pmq.js} +1 -1
- package/dist/client/assets/{client-icons-DpcP1bht.js → client-icons-BuRYGGKe.js} +1 -1
- package/dist/client/assets/collapsible-PyJ2NOzW.js +1 -0
- package/dist/client/assets/collection-detail-DXmBNKMr.js +1 -0
- package/dist/client/assets/collection-display-button-Cz5AkuIg.js +1 -0
- package/dist/client/assets/{collection-search-J9Bt25gS.js → collection-search-DM8MkJfo.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DBeauaNS.js → collection-table-wrapper-cBr_X4Jo.js} +1 -1
- package/dist/client/assets/collection-tabs-aKKPIP9M.js +1 -0
- package/dist/client/assets/combobox-CQBdlQef.js +1 -0
- package/dist/client/assets/command-CZcxzTcw.js +1 -0
- package/dist/client/assets/{companion-mcps-section-xmRpNJBK.js → companion-mcps-section-B7qgbnOZ.js} +1 -1
- package/dist/client/assets/connect-D6Wz7x6C.js +8 -0
- package/dist/client/assets/connect-layout-DzSDvFP2.js +1 -0
- package/dist/client/assets/{connection-DD0omVHZ.js → connection-DStV2sLP.js} +1 -1
- package/dist/client/assets/connection-card-CpIJKLp3.js +1 -0
- package/dist/client/assets/connection-detail-junbbrHX.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CHlcdgAK.js → connection-form-helpers-DM_wSOEJ.js} +1 -1
- package/dist/client/assets/connections-DvjnCZJT.js +1 -0
- package/dist/client/assets/{create-organization-dialog-1mI4Ad1B.js → create-organization-dialog-CvXOAbwA.js} +1 -1
- package/dist/client/assets/{decofile-api-BNWbEMR6.js → decofile-api-zRlIvvNL.js} +1 -1
- package/dist/client/assets/{decopilot-BvepxP_-.js → decopilot-BI8eOOPY.js} +2 -2
- package/dist/client/assets/dialog-AoC07APJ.js +1 -0
- package/dist/client/assets/discover-zo2iAYFW.js +1 -0
- package/dist/client/assets/domain-settings-C6kSznIr.js +1 -0
- package/dist/client/assets/download-app-dialog-CsiIuf7j.js +1 -0
- package/dist/client/assets/{drawer-BIjkXMV3.js → drawer-DGzquxJ8.js} +1 -1
- package/dist/client/assets/{editor-D4Ls62vg.js → editor-oL1B7LVJ.js} +1 -1
- package/dist/client/assets/{empty-state-BdiOfgle.js → empty-state-DxJQDjCw.js} +1 -1
- package/dist/client/assets/{empty-state-CyICQznD.js → empty-state-Y08kvU5o.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dbm_cKaX.js → extract-connection-data-C7Wh9xkI.js} +1 -1
- package/dist/client/assets/{feature-gate-Bp7Cydio.js → feature-gate-C1d068b1.js} +1 -1
- package/dist/client/assets/feature-paywall-BoABVlUQ.js +1 -0
- package/dist/client/assets/file-explorer-DG5Gvb-w.js +2 -0
- package/dist/client/assets/{file-preview-CARebwHJ.js → file-preview-iaqpqUYi.js} +1 -1
- package/dist/client/assets/file-share-button-D0lT5ixf.js +3 -0
- package/dist/client/assets/{file-type-icon-C9Qn36v4.js → file-type-icon-lZW2ows7.js} +1 -1
- package/dist/client/assets/{folder-icon-BLBZBD_a.js → folder-icon-DVG7PK8X.js} +1 -1
- package/dist/client/assets/{form-CSXgIHLz.js → form-CYsJTpNM.js} +1 -1
- package/dist/client/assets/{gateway-client-BuiOykcN.js → gateway-client-CnYYocwu.js} +1 -1
- package/dist/client/assets/general-BiYLEv2o.js +1 -0
- package/dist/client/assets/{github-icon-huXDOAgf.js → github-icon-swNUSpAU.js} +1 -1
- package/dist/client/assets/home-BbjS-573.js +1 -0
- package/dist/client/assets/{hooks-BoX5BC-f.js → hooks-BlE0QZwR.js} +2 -2
- package/dist/client/assets/{hooks-DZOMRp7D.js → hooks-D0dDgrIf.js} +1 -1
- package/dist/client/assets/icon-button-7c--Wy5B.js +1 -0
- package/dist/client/assets/{index-BWpNlf6e.js → index-0-s9o3tr.js} +1 -1
- package/dist/client/assets/index-BDYXeKzz.js +1 -0
- package/dist/client/assets/index-BOHOyAF8.css +1 -0
- package/dist/client/assets/{index-tj4CWdxr.js → index-BUfoj27y.js} +1 -1
- package/dist/client/assets/index-BchRuDAc.js +26 -0
- package/dist/client/assets/{index-BD213WLU.js → index-C97O3ClY.js} +1 -1
- package/dist/client/assets/index-CutV0Ygc.js +1 -0
- package/dist/client/assets/{index-DqT4mG5l.js → index-DGY2nhhI.js} +1 -1
- package/dist/client/assets/index-DItj2r3e.js +5 -0
- package/dist/client/assets/index-DKXWNSdB.js +1 -0
- package/dist/client/assets/{index-Bb-Re5q8.js → index-DllcfiZL.js} +1 -1
- package/dist/client/assets/{index-DiULBiX9.js → index-DyCAAYSx.js} +1 -1
- package/dist/client/assets/index-EcuFIS2a.js +235 -0
- package/dist/client/assets/{index-DWw5wi2G.js → index-Exw_Yjch.js} +1 -1
- package/dist/client/assets/{index-2gtoysbs.js → index-fN6RkMSD.js} +1 -1
- package/dist/client/assets/{index-redirect-BQTLrDGT.js → index-redirect-Bm4zqVUy.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjWlcBHD.js → infiniteQueryObserver-3RxH1tr-.js} +1 -1
- package/dist/client/assets/infra-billing-CmY2herT.js +1 -0
- package/dist/client/assets/input-BrPa4I3Z.js +8 -0
- package/dist/client/assets/input-Buz_7xoG.js +1 -0
- package/dist/client/assets/input-C5klQNJJ.js +1 -0
- package/dist/client/assets/{integration-icon-BeEdjsn9.js → integration-icon-D3FHJbYu.js} +1 -1
- package/dist/client/assets/{label-BMxIRiEr.js → label-BX1BwzZ4.js} +1 -1
- package/dist/client/assets/{last-preview-page-B_H0ubHa.js → last-preview-page-BSVfE6AT.js} +1 -1
- package/dist/client/assets/layout-030aDjqi.js +1 -0
- package/dist/client/assets/legacy-agents-deep-BblX_qPq.js +1 -0
- package/dist/client/assets/legacy-main-redirect-BDaODIKZ.js +1 -0
- package/dist/client/assets/library-CmkU9fCT.js +161 -0
- package/dist/client/assets/{login-C4Dx9xMO.js → login-BpUdj6Fq.js} +1 -1
- package/dist/client/assets/{markdown-DGWjAeXL.js → markdown-VKlC4_bJ.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-BTjC7Gse.js → mcp-app-renderer-wS7imsel.js} +2 -2
- package/dist/client/assets/{mcp-oauth-C4khbNJJ.js → mcp-oauth-B7YJNr4N.js} +1 -1
- package/dist/client/assets/members-2ZkimP3H.js +1 -0
- package/dist/client/assets/message-templates-DyGM313y.js +1 -0
- package/dist/client/assets/{mini-report-page-Ci4cxCz8.js → mini-report-page-CYdef8vQ.js} +1 -1
- package/dist/client/assets/mock-board-Dk2mRFCa.js +90 -0
- package/dist/client/assets/{monaco-editor-CMRYkmyb.js → monaco-editor-ChRh_qus.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-PncjnNwy.js → monitoring-stats-row-DirMMFq2.js} +1 -1
- package/dist/client/assets/multi-select-CYKeAXVo.js +1 -0
- package/dist/client/assets/{mustache-CPZS2ebG.js → mustache-BpzqsH6c.js} +1 -1
- package/dist/client/assets/{oauth-callback-CETK2WZB.js → oauth-callback-CLQttSb2.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DqbbngEF.js → oauth-callback-ai-provider-C5AqSldx.js} +1 -1
- package/dist/client/assets/{onboarding-B5zAGi2B.js → onboarding-BYeSkDcE.js} +1 -1
- package/dist/client/assets/optimistic-project-sidebar-views-hB0JGrCs.js +1 -0
- package/dist/client/assets/{org-file-open-context-BCUpiY_R.js → org-file-open-context-D26BTBiX.js} +1 -1
- package/dist/client/assets/{organization-choice-BNulT5zU.js → organization-choice-sm9k2ko4.js} +1 -1
- package/dist/client/assets/orgs-BT6gh3Sc.js +1 -0
- package/dist/client/assets/{page-seo-form-BrHgBXF1.js → page-seo-form-Bhk-2qvu.js} +1 -1
- package/dist/client/assets/{pair-B46EBBjF.js → pair-Bh73YYpe.js} +8 -8
- package/dist/client/assets/plan-ladder-B-hb17ya.js +1 -0
- package/dist/client/assets/{popover-yk_ePqAA.js → popover-Bff85VlI.js} +1 -1
- package/dist/client/assets/post-calendar-BUJnl75O.js +1 -0
- package/dist/client/assets/post-editor-B8ClYTJb.js +1 -0
- package/dist/client/assets/{preview-content-CfbsbElk.js → preview-content-C4FuOpTi.js} +1 -1
- package/dist/client/assets/{preview-dialog-CA2C3DS4.js → preview-dialog-DY1kQ4y_.js} +1 -1
- package/dist/client/assets/primitives-BCCkMTJb.js +1 -0
- package/dist/client/assets/profile-T7ySaz_t.js +1 -0
- package/dist/client/assets/project-app-view-D4HCSkue.js +1 -0
- package/dist/client/assets/project-feed-CRHprIgj.js +1 -0
- package/dist/client/assets/{project-icon-MWmzrrm8.js → project-icon-D_oHwik9.js} +1 -1
- package/dist/client/assets/project-reports-CzVFjEoR.js +1 -0
- package/dist/client/assets/project-tasks-c_cBe8VF.js +1 -0
- package/dist/client/assets/{prompts-4lILOzK9.js → prompts-BuPAnA4R.js} +1 -1
- package/dist/client/assets/record-editor-CHfqyrFA.js +1 -0
- package/dist/client/assets/redirect-editor-BrEMZWAU.js +1 -0
- package/dist/client/assets/registry-4kJYrulU.js +2 -0
- package/dist/client/assets/registry-layout-o90YrVKa.js +27 -0
- package/dist/client/assets/reports-COffkxyo.js +1 -0
- package/dist/client/assets/{reports-BpxYdv2_.js → reports-DEVutxJq.js} +2 -2
- package/dist/client/assets/reports-onboarding-Dt5mvf07.js +1 -0
- package/dist/client/assets/reports-tab-C6PZg0b6.js +2 -0
- package/dist/client/assets/repositories-DBFrDUwl.js +1 -0
- package/dist/client/assets/repository-import-picker-ftg0FRzY.js +1 -0
- package/dist/client/assets/repository-picker-BKj90hIS.js +1 -0
- package/dist/client/assets/{require-capability-CmtOZnXt.js → require-capability-gpVnF6U4.js} +1 -1
- package/dist/client/assets/{required-auth-layout-RoMNnMPO.js → required-auth-layout-BhdxJMdb.js} +1 -1
- package/dist/client/assets/{reset-password-BeUL8IgX.js → reset-password-DD2ixVIR.js} +1 -1
- package/dist/client/assets/resizable-wU1MiASn.js +1 -0
- package/dist/client/assets/review-settings-3uLiRV1J.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-Bn-QsIS6.js} +2 -2
- package/dist/client/assets/roles-DX_ap2B0.js +1 -0
- package/dist/client/assets/route-Bdqr734y.js +1 -0
- package/dist/client/assets/route-Cg6AOuOY.js +1 -0
- package/dist/client/assets/route-DGhKwFXa.js +1 -0
- package/dist/client/assets/route-page-header-DKm5kHtX.js +1 -0
- package/dist/client/assets/runnable-block-editor-9i5DpxOA.js +16 -0
- package/dist/client/assets/{sandbox-lifecycle-context-C7VKOJoV.js → sandbox-lifecycle-context-BHn9YFEW.js} +2 -2
- package/dist/client/assets/{schema-1zAO-l7e.js → schema-FDf70VFI.js} +1 -1
- package/dist/client/assets/{scroll-area-C-wtbVS1.js → scroll-area-DMmJ7JtI.js} +1 -1
- package/dist/client/assets/search-input-BHVk6m6A.js +1 -0
- package/dist/client/assets/search-toggle-CCC7TvwN.js +1 -0
- package/dist/client/assets/secrets-BNtrMaDs.js +1 -0
- package/dist/client/assets/sections-editor-HtflyYMM.js +2 -0
- package/dist/client/assets/select-DBfOOW9i.js +1 -0
- package/dist/client/assets/select-model-2C5Fdpra.js +1 -0
- package/dist/client/assets/seo-editor-CFULobkJ.js +1 -0
- package/dist/client/assets/separator-8fswVHAH.js +1 -0
- package/dist/client/assets/settings-tab-s3d5MtS-.js +5 -0
- package/dist/client/assets/{sheet-i72Qx7sL.js → sheet-DWSThpSZ.js} +1 -1
- package/dist/client/assets/shell-layout-BQnbNNla.js +1 -0
- package/dist/client/assets/{shell-layout-CuFt8bor.css → shell-layout-CE2Eihra.css} +1 -1
- package/dist/client/assets/sidebar-CoC2_Nad.js +1 -0
- package/dist/client/assets/{skill-preview-gfYVdSdM.js → skill-preview-QgrtYNqp.js} +1 -1
- package/dist/client/assets/skills-BVINvlqv.js +1 -0
- package/dist/client/assets/sso-CSqM_F3b.js +1 -0
- package/dist/client/assets/store-DBNpNTVQ.js +1 -0
- package/dist/client/assets/store-registry-DLmFNBij.js +2 -0
- package/dist/client/assets/{switch-BQFtt3BH.js → switch-BIfmgDHS.js} +1 -1
- package/dist/client/assets/synced-repos-CG_pm_Ch.js +1 -0
- package/dist/client/assets/{table-6I6YKvFY.js → table-CEVOOGGz.js} +1 -1
- package/dist/client/assets/{tabs-CLziM0Ww.js → tabs-Dd0IWElc.js} +1 -1
- package/dist/client/assets/{task-board-DrUf5p-Z.js → task-board-Dip4Wu9j.js} +1 -1
- package/dist/client/assets/task-route-SKFoAFiU.js +1 -0
- package/dist/client/assets/task-status-k7EGfTLN.js +1 -0
- package/dist/client/assets/taskboard-analytics-C3lk9wb7.js +1 -0
- package/dist/client/assets/tasks-Sl_c9zFF.js +1 -0
- package/dist/client/assets/{tasks-Drgd6az8.js → tasks-ebQIYdwz.js} +4 -4
- package/dist/client/assets/textarea-D5v3ol7T.js +1 -0
- package/dist/client/assets/thread-button-C3YUAV-G.js +1 -0
- package/dist/client/assets/{thread-intent-F-sZEflj.js → thread-intent-CTSjhfEo.js} +1 -1
- package/dist/client/assets/thread-route-B57JfaL5.js +1 -0
- package/dist/client/assets/thread-route-CHwqHPf_.js +1 -0
- package/dist/client/assets/thread-sheet-body-Hqh1hVbj.js +1 -0
- package/dist/client/assets/toggle-group-CwAn2mKr.js +1 -0
- package/dist/client/assets/toolbar-icon-button-ChZE-2zp.js +1 -0
- package/dist/client/assets/{tooltip-DV2xHesQ.js → tooltip-nr5oS_bm.js} +1 -1
- package/dist/client/assets/{track-ZuOMvhd2.js → track-BDYWN4z3.js} +1 -1
- package/dist/client/assets/{types-27TVsPN_.js → types-7UQ7SDxU.js} +3 -3
- package/dist/client/assets/usage-stats-YafP0g9G.js +1 -0
- package/dist/client/assets/use-ai-providers-D-abiIwe.js +1 -0
- package/dist/client/assets/use-automations-D_y1YNke.js +1 -0
- package/dist/client/assets/{use-autosave-DOzyZumC.js → use-autosave-z8cIzzdm.js} +1 -1
- package/dist/client/assets/use-connect-companion-jQzCS0Na.js +1 -0
- package/dist/client/assets/use-connection-BKZRi94S.js +1 -0
- package/dist/client/assets/{use-copy-C_ctOeuP.js → use-copy-Cp_DyXH6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D1w9d4ex.js → use-create-virtual-mcp-nvoTomrD.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-onM9TTf8.js → use-date-fns-locale-CNoKSvxx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DqyNKPJM.js → use-debounced-autosave-B0HBbqeX.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B9nG3bW5.js → use-debounced-value-BgYHDTDk.js} +1 -1
- package/dist/client/assets/use-deco-credits-CqbkXgA9.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BpuQrfKN.js → use-decopilot-events-qaEKsixC.js} +1 -1
- package/dist/client/assets/use-delete-connection-CqvqqWgS.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BVfgEagI.js → use-deployment-admin-DzkF6L4b.js} +1 -1
- package/dist/client/assets/{use-entitlements-Dl7pAsQ5.js → use-entitlements-kPr6KRf9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-mcfOeAAq.js → use-fast-preview-draft-url-BBBDyhsD.js} +1 -1
- package/dist/client/assets/use-file-configs-6ygOocDG.js +1 -0
- package/dist/client/assets/use-in-settings-BCDqA2EC.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-PhBGPm8H.js → use-infinite-scroll-D0T36z_V.js} +1 -1
- package/dist/client/assets/use-join-requests-BBovhUnp.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-BghanH6r.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-h4sAecTI.js +1 -0
- package/dist/client/assets/{use-mcp-client-e_hCatGm.js → use-mcp-client-B_gcvvCy.js} +6 -6
- package/dist/client/assets/{use-mcp-prompts-DJRXjL4_.js → use-mcp-prompts-DfSKL4Gu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-g86k4oib.js → use-mcp-tools-DC47roTz.js} +1 -1
- package/dist/client/assets/use-members-C6brpkJ1.js +1 -0
- package/dist/client/assets/{use-mobile-hIijCK0k.js → use-mobile-BZ15DgEB.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-B8SXI0oO.js +1 -0
- package/dist/client/assets/use-open-billing-url-BAg3ZeFq.js +1 -0
- package/dist/client/assets/use-org-auth-client-8fDIgHEZ.js +1 -0
- package/dist/client/assets/use-org-fs-Bf6n51Xm.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-CnBqiATM.js +8 -0
- package/dist/client/assets/{use-org-sso-BvfIL0yq.js → use-org-sso-QeqdMaIa.js} +1 -1
- package/dist/client/assets/use-organization-roles-tuKknI1K.js +1 -0
- package/dist/client/assets/use-organization-settings-DvtBymY3.js +1 -0
- package/dist/client/assets/{use-panel-navigate-WrD0KEYx.js → use-panel-navigate-IItrbgmN.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-WwnxvZuP.js +1 -0
- package/dist/client/assets/use-project-scope-CCxyXvEU.js +1 -0
- package/dist/client/assets/use-registry-connections-Bd4wJHbx.js +1 -0
- package/dist/client/assets/use-releases-DZvNer89.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-BeTEI2FZ.js +1 -0
- package/dist/client/assets/{use-route-default-main-Djaj_cL9.js → use-route-default-main-BhbKsXCz.js} +1 -1
- package/dist/client/assets/use-secrets-Bq9yyXHE.js +1 -0
- package/dist/client/assets/{use-section-preview-base-BOFovHh4.js → use-section-preview-base--XbKHK2U.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BR1aW1y5.js → use-session-runtime-B5wMaHtP.js} +1 -1
- package/dist/client/assets/use-tags-Do2tDPSO.js +1 -0
- package/dist/client/assets/use-task-board-analytics-MK_Z2cUq.js +1 -0
- package/dist/client/assets/use-task-metadata-CQjLXps1.js +1 -0
- package/dist/client/assets/use-thread-outputs-DYukUH5N.js +1 -0
- package/dist/client/assets/{use-view-mode-B0LeaJg7.js → use-view-mode-BEPkb8x0.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-Ji9vcgUj.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CzQJkRT9.js +1 -0
- package/dist/client/assets/{useQueries-C-SV8tD7.js → useQueries-D0xhxw7a.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D9iG0Y5m.js +1 -0
- package/dist/client/assets/{users-BiOPZ43X.js → users-DzwkCv2F.js} +1 -1
- package/dist/client/assets/utils-y2q6u6PK.js +4 -0
- package/dist/client/assets/variant-calendar-D1R9xk7D.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BFQoXu82.js → variant-matcher-override-qHzE4baz.js} +1 -1
- package/dist/client/assets/view-mode-toggle-Ca0bFull.js +1 -0
- package/dist/client/assets/{virtual-mcp-ldxphi5G.js → virtual-mcp-Dji-1ojO.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/Check-B3RSsr_D.js +0 -1
- package/dist/client/assets/ChevronRight-USKkhEpL.js +0 -1
- package/dist/client/assets/ChevronSelectorVertical-DpRb2z1l.js +0 -1
- package/dist/client/assets/Database01-C0YJpjc3.js +0 -1
- package/dist/client/assets/DotsVertical-CsjwfYzf.js +0 -1
- package/dist/client/assets/File02-BvR-HYxK.js +0 -1
- package/dist/client/assets/GitBranch01-rWb2SJK9.js +0 -1
- package/dist/client/assets/HardDrive-DNTPLPT4.js +0 -1
- package/dist/client/assets/MessageCircle01-DBcg2aiD.js +0 -1
- package/dist/client/assets/Printer-CvyxF9Jo.js +0 -1
- package/dist/client/assets/Shield01-CqB4I7qm.js +0 -1
- package/dist/client/assets/Tool01-DouqPjim.js +0 -1
- package/dist/client/assets/XClose-BgzK-Dwz.js +0 -1
- package/dist/client/assets/ZoomOut-BPxprY2s.js +0 -1
- package/dist/client/assets/add-connection-dialog-DZjTm9W3.js +0 -1
- package/dist/client/assets/agent-analytics-DmvdLg8B.js +0 -2
- package/dist/client/assets/agent-app-BvmFdS4C.js +0 -1
- package/dist/client/assets/agent-assets-czUGY90q.js +0 -1
- package/dist/client/assets/agent-automation-C5Kr5Oj3.js +0 -20
- package/dist/client/assets/agent-automations-D-3-Opoc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CjhmYssY.js +0 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +0 -1
- package/dist/client/assets/agent-e2e-DkL4Ltr6.js +0 -1
- package/dist/client/assets/agent-experiments--rXT-2aB.js +0 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +0 -1
- package/dist/client/assets/agent-hosting-DaIfm8Hu.js +0 -1
- package/dist/client/assets/agent-icon-CczrFEe7.js +0 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +0 -1
- package/dist/client/assets/agent-monitor-C-HIyaF_.js +0 -1
- package/dist/client/assets/agent-overview-cm15sxNU.js +0 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DOAcxz0t.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-mg5Q6hoW.js +0 -518
- package/dist/client/assets/agent-view-ClMILC98.js +0 -1
- package/dist/client/assets/agents-list-rKFF5b3o.js +0 -1
- package/dist/client/assets/anchors-yqDzZN4K.js +0 -1
- package/dist/client/assets/api-keys-AIfL76r6.js +0 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +0 -1
- package/dist/client/assets/app-editor-BZKFeBmU.js +0 -1
- package/dist/client/assets/asset-utils-DhbLEVKo.js +0 -1
- package/dist/client/assets/auth-entry-CwWjlqGu.js +0 -1
- package/dist/client/assets/automation-list-row-Btr-Kty6.js +0 -1
- package/dist/client/assets/automation-runs-CnOOOwZJ.js +0 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +0 -1
- package/dist/client/assets/badge-Bu51Hlti.js +0 -1
- package/dist/client/assets/block-document-BLCekKXO.js +0 -3
- package/dist/client/assets/breadcrumb-Dhdru7Jh.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Cedp3vV1.js +0 -2
- package/dist/client/assets/bulk-category-panel-D3c_qJDk.js +0 -1
- package/dist/client/assets/calendar-DIQx67oO.js +0 -1
- package/dist/client/assets/capability-load-error-CJMvYDf4.js +0 -1
- package/dist/client/assets/cards-BVw8sRdW.js +0 -8
- package/dist/client/assets/category-editor-C7sRrVfl.js +0 -1
- package/dist/client/assets/checkbox-jLf7fBuW.js +0 -1
- package/dist/client/assets/choose-editor-Cbu3-nVC.js +0 -1
- package/dist/client/assets/collapsible-CTgXdVQa.js +0 -1
- package/dist/client/assets/collection-detail-BF7WM7Gn.js +0 -1
- package/dist/client/assets/collection-display-button-C-4xB6xx.js +0 -1
- package/dist/client/assets/collection-tabs-CrXIJeNf.js +0 -1
- package/dist/client/assets/combobox-BHrqHmge.js +0 -1
- package/dist/client/assets/command-B-XD29Nx.js +0 -1
- package/dist/client/assets/command-palette-store-DK-56E2K.js +0 -1
- package/dist/client/assets/connect-D4qCE3TM.js +0 -8
- package/dist/client/assets/connect-layout-DGO84ImO.js +0 -1
- package/dist/client/assets/connection-card-fcMCwbTh.js +0 -1
- package/dist/client/assets/connection-detail-DS015J4e.js +0 -1
- package/dist/client/assets/connections-C98FMYyY.js +0 -1
- package/dist/client/assets/dialog-llvhXw2o.js +0 -1
- package/dist/client/assets/discover-DNPHmIfF.js +0 -1
- package/dist/client/assets/domain-settings-CXxEmIjB.js +0 -1
- package/dist/client/assets/download-app-dialog-D_4eQbbs.js +0 -1
- package/dist/client/assets/dropdown-menu-C5iafa8S.js +0 -1
- package/dist/client/assets/feature-paywall-DEy2mpV2.js +0 -1
- package/dist/client/assets/file-explorer-Bs7B2-rr.js +0 -2
- package/dist/client/assets/file-share-button-Dk1ugrdV.js +0 -3
- package/dist/client/assets/general-BYFfG0fF.js +0 -1
- package/dist/client/assets/home-DTaaCW3K.js +0 -1
- package/dist/client/assets/index-2eKztu7k.js +0 -5
- package/dist/client/assets/index-BH7uCYoT.js +0 -1
- package/dist/client/assets/index-CSd_k8Np.js +0 -1
- package/dist/client/assets/index-CiMUXLco.js +0 -26
- package/dist/client/assets/index-CpNTsElB.css +0 -1
- package/dist/client/assets/index-D4RUT3q0.js +0 -1
- package/dist/client/assets/index-D_X-LIyA.js +0 -1
- package/dist/client/assets/index-Dc7hzqoi.js +0 -235
- package/dist/client/assets/infra-billing-D6jrbNxA.js +0 -1
- package/dist/client/assets/input-DXlaTX4w.js +0 -1
- package/dist/client/assets/input-D_FfvHr0.js +0 -8
- package/dist/client/assets/input-uIV5S_EX.js +0 -1
- package/dist/client/assets/layout-Dli4i2a0.js +0 -1
- package/dist/client/assets/legacy-agents-deep-CoiLV3QJ.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BZ4nzqkQ.js +0 -1
- package/dist/client/assets/library-Dste3SFA.js +0 -161
- package/dist/client/assets/members-CRtKrUle.js +0 -1
- package/dist/client/assets/message-templates-B8kOo0Kk.js +0 -1
- package/dist/client/assets/mock-board-DRa60E6i.js +0 -90
- package/dist/client/assets/multi-select-DzAZ8Rb8.js +0 -1
- package/dist/client/assets/optimistic-project-sidebar-views-CrZ9OeIk.js +0 -1
- package/dist/client/assets/orgs-B1TBklWZ.js +0 -1
- package/dist/client/assets/plan-ladder-B2pv9Y73.js +0 -1
- package/dist/client/assets/post-calendar-Bx8YiCbs.js +0 -1
- package/dist/client/assets/post-editor-B1fD7o8C.js +0 -1
- package/dist/client/assets/primitives-JiGRyPkw.js +0 -1
- package/dist/client/assets/profile-CDR0JVtv.js +0 -1
- package/dist/client/assets/project-app-view-8VWdrWMf.js +0 -1
- package/dist/client/assets/project-feed-ChJRKxhk.js +0 -1
- package/dist/client/assets/project-reports-D31utlHg.js +0 -1
- package/dist/client/assets/project-tasks-D2AAgqxo.js +0 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +0 -1
- package/dist/client/assets/redirect-editor-EPs_GX-_.js +0 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +0 -2
- package/dist/client/assets/registry-layout-CC2lewiS.js +0 -27
- package/dist/client/assets/reports-Ch9UvBcS.js +0 -1
- package/dist/client/assets/reports-onboarding-Dhm8IBuD.js +0 -1
- package/dist/client/assets/reports-tab-BJWrZp37.js +0 -2
- package/dist/client/assets/repositories-CMIGVJwC.js +0 -1
- package/dist/client/assets/repository-import-picker-DhVniDI2.js +0 -1
- package/dist/client/assets/repository-picker-BkoSI-jm.js +0 -1
- package/dist/client/assets/resizable-Bt7dvMCc.js +0 -1
- package/dist/client/assets/review-settings-Cx_Yzx40.js +0 -1
- package/dist/client/assets/roles-BNleKwt9.js +0 -1
- package/dist/client/assets/route-CHqG9ihd.js +0 -1
- package/dist/client/assets/route-DqJoK5dW.js +0 -1
- package/dist/client/assets/route-x8jgkj5T.js +0 -1
- package/dist/client/assets/runnable-block-editor-xmOnaiFL.js +0 -16
- package/dist/client/assets/search-input-Pobww52G.js +0 -1
- package/dist/client/assets/secrets-BF5nuoR4.js +0 -1
- package/dist/client/assets/sections-editor-B1LpXw4X.js +0 -2
- package/dist/client/assets/select-BkKPcZFe.js +0 -1
- package/dist/client/assets/select-model-DPv-zVVj.js +0 -1
- package/dist/client/assets/seo-editor-9G7mQFJ5.js +0 -1
- package/dist/client/assets/settings-tab-D1V5Uszb.js +0 -5
- package/dist/client/assets/shell-layout-Ce0aCJuX.js +0 -1
- package/dist/client/assets/sidebar-C5KRz1Pj.js +0 -1
- package/dist/client/assets/skills-CgTiBPyO.js +0 -1
- package/dist/client/assets/sso-BK-aRT5P.js +0 -1
- package/dist/client/assets/store-Nm6KtwbD.js +0 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +0 -2
- package/dist/client/assets/synced-repos-B1z4DDCt.js +0 -1
- package/dist/client/assets/task-route-BCTCy27Q.js +0 -1
- package/dist/client/assets/task-status-DhCT2ly_.js +0 -1
- package/dist/client/assets/taskboard-analytics-Cf1r1f7I.js +0 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +0 -1
- package/dist/client/assets/textarea-BU6xemAP.js +0 -1
- package/dist/client/assets/thread-route-BBf64Mwk.js +0 -1
- package/dist/client/assets/thread-route-BSYRqZDg.js +0 -1
- package/dist/client/assets/thread-sheet-body-B4OUWlMn.js +0 -1
- package/dist/client/assets/toggle-group-BiU_UDOq.js +0 -1
- package/dist/client/assets/toolbar-icon-button-PuQFE8Y9.js +0 -1
- package/dist/client/assets/usage-stats-vMRDbAUM.js +0 -1
- package/dist/client/assets/use-ai-providers-BnF5Rw_n.js +0 -1
- package/dist/client/assets/use-automations-Bo0S3g8m.js +0 -1
- package/dist/client/assets/use-connect-companion-CClQCUMS.js +0 -1
- package/dist/client/assets/use-connection-Ba04fHwa.js +0 -1
- package/dist/client/assets/use-deco-credits-BGBshlLi.js +0 -1
- package/dist/client/assets/use-delete-connection-Cns6x8UC.js +0 -1
- package/dist/client/assets/use-file-configs-DYGSdjth.js +0 -1
- package/dist/client/assets/use-join-requests-DjeVFQr9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-sSRGo66A.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-I377R0Kg.js +0 -1
- package/dist/client/assets/use-members-DPYHJDe2.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-C8pu0B4z.js +0 -1
- package/dist/client/assets/use-open-billing-url-Df7K1DCF.js +0 -1
- package/dist/client/assets/use-org-auth-client-DbPU3bA-.js +0 -1
- package/dist/client/assets/use-org-fs-Du-ErRPs.js +0 -1
- package/dist/client/assets/use-org-notice-CyiiFkRG.js +0 -1
- package/dist/client/assets/use-organization-roles-FAEtbpE5.js +0 -1
- package/dist/client/assets/use-organization-settings-CKbX2SdA.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DWzPH-Sc.js +0 -1
- package/dist/client/assets/use-project-scope-DU0-JxYr.js +0 -1
- package/dist/client/assets/use-registry-connections-SLFMHpqj.js +0 -1
- package/dist/client/assets/use-releases-CFNTwgY3.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-8BvW2in8.js +0 -1
- package/dist/client/assets/use-secrets-DVry--sz.js +0 -1
- package/dist/client/assets/use-tags-CZXCbbwL.js +0 -1
- package/dist/client/assets/use-task-board-analytics-Ci1AhxvH.js +0 -1
- package/dist/client/assets/use-task-metadata-Dt9l5S_a.js +0 -1
- package/dist/client/assets/use-thread-outputs-Dq-RN0P_.js +0 -1
- package/dist/client/assets/use-virtual-mcp-DkK7ErtB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +0 -1
- package/dist/client/assets/utils-DsvmRe8M.js +0 -4
- package/dist/client/assets/variant-calendar-DImnsJnP.js +0 -1
- package/dist/client/assets/view-mode-toggle-DvGhnpsV.js +0 -1
package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-Bn-QsIS6.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{r as c,
|
|
1
|
+
import{r as c,e7 as I,aO as Ne,c as xt,l as Ct,b as Pn,j as P,a9 as jn}from"./index-EcuFIS2a.js";import{i as Bn}from"./Link01-BIFMl_M0.js";import{s as $n}from"./Trash01-DtE0n00a.js";function Fn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const ot=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xe(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Dt(e){return"nodeType"in e}function j(e){var t,n;return e?xe(e)?e:Dt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function St(e){const{Document:t}=j(e);return e instanceof t}function $e(e){return xe(e)?!1:e instanceof j(e).HTMLElement}function Jt(e){return e instanceof j(e).SVGElement}function Ce(e){return e?xe(e)?e.document:Dt(e)?St(e)?e:$e(e)||Jt(e)?e.ownerDocument:document:document:document}const _=ot?c.useLayoutEffect:c.useEffect;function it(e){const t=c.useRef(e);return _(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Xn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return _(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ze(e){const t=it(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qe(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ht={};function Xe(e,t){return c.useMemo(()=>{if(t)return t;const n=ht[e]==null?0:ht[e]+1;return ht[e]=n,e+"-"+n},[e,t])}function Zt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Zt(1),je=Zt(-1);function Yn(e){return"clientX"in e&&"clientY"in e}function st(e){if(!e)return!1;const{KeyboardEvent:t}=j(e.target);return t&&e instanceof t}function Wn(e){if(!e)return!1;const{TouchEvent:t}=j(e.target);return t&&e instanceof t}function et(e){if(Wn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Yn(e)?{x:e.clientX,y:e.clientY}:null}const he=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[he.Translate.toString(e),he.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Pt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kn(e){return e.matches(Pt)?e:e.querySelector(Pt)}const Un={display:"none"};function Hn(e){let{id:t,value:n}=e;return I.createElement("div",{id:t,style:Un},n)}function Vn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return I.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function _n(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Qt=c.createContext(null);function qn(e){const t=c.useContext(Qt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Gn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Jn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
-
`},Zn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Qn(e){let{announcements:t=Zn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Jn}=e;const{announce:i,announcement:s}=_n(),a=Xe("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),qn(c.useMemo(()=>({onDragStart(d){let{active:g}=d;i(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;i(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;i(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!l)return null;const f=I.createElement(I.Fragment,null,I.createElement(Hn,{id:r,value:o.draggable}),I.createElement(Vn,{id:a,announcement:s}));return n?Ne.createPortal(f,n):f}var N;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(N||(N={}));function tt(){}function Bo(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function $o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const q=Object.freeze({x:0,y:0});function en(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function er(e,t){const n=et(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function tn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function tr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function nn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Bt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Fo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bt(t,t.left,t.top),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=en(Bt(l),o);i.push({id:a,data:{droppableContainer:s,value:u}})}}return i.sort(tn)},nr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=jt(t),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=jt(l),f=o.reduce((g,h,S)=>g+en(u[S],h),0),d=Number((f/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:d}})}}return i.sort(tn)};function rr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const l=t.width*t.height,u=e.width*e.height,f=s*a,d=f/(l+u-f);return Number(d.toFixed(4))}return 0}const or=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,a=n.get(s);if(a){const l=rr(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(tr)};function ir(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function rn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function sr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const ar=sr(1);function on(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function lr(e,t,n){const r=on(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:l+f,bottom:u+d,left:l}}const cr={ignoreTransform:!1};function De(e,t){t===void 0&&(t=cr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=j(e).getComputedStyle(e);u&&(n=lr(n,u,f))}const{top:r,left:o,width:i,height:s,bottom:a,right:l}=n;return{top:r,left:o,width:i,height:s,bottom:a,right:l}}function $t(e){return De(e,{ignoreTransform:!0})}function ur(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function dr(e,t){return t===void 0&&(t=j(e).getComputedStyle(e)),t.position==="fixed"}function fr(e,t){t===void 0&&(t=j(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function at(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(St(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!$e(o)||Jt(o)||n.includes(o))return n;const i=j(e).getComputedStyle(o);return o!==e&&fr(o,i)&&n.push(o),dr(o,i)?n:r(o.parentNode)}return e?r(e):n}function sn(e){const[t]=at(e,1);return t??null}function gt(e){return!ot||!e?null:xe(e)?e:Dt(e)?St(e)||e===Ce(e).scrollingElement?window:$e(e)?e:null:null}function an(e){return xe(e)?e.scrollX:e.scrollLeft}function ln(e){return xe(e)?e.scrollY:e.scrollTop}function mt(e){return{x:an(e),y:ln(e)}}var k;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(k||(k={}));function cn(e){return!ot||!e?!1:e===document.scrollingElement}function un(e){const t={x:0,y:0},n=cn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const hr={x:.2,y:.2};function gr(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=hr);const{isTop:u,isBottom:f,isLeft:d,isRight:g}=un(e),h={x:0,y:0},S={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+v.height?(h.y=k.Backward,S.y=r*Math.abs((t.top+v.height-i)/v.height)):!f&&l>=t.bottom-v.height&&(h.y=k.Forward,S.y=r*Math.abs((t.bottom-v.height-l)/v.height)),!g&&a>=t.right-v.width?(h.x=k.Forward,S.x=r*Math.abs((t.right-v.width-a)/v.width)):!d&&s<=t.left+v.width&&(h.x=k.Backward,S.x=r*Math.abs((t.left+v.width-s)/v.width)),{direction:h,speed:S}}function vr(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function dn(e){return e.reduce((t,n)=>we(t,mt(n)),q)}function pr(e){return e.reduce((t,n)=>t+an(n),0)}function br(e){return e.reduce((t,n)=>t+ln(n),0)}function fn(e,t){if(t===void 0&&(t=De),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);sn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const mr=[["x",["left","right"],pr],["y",["top","bottom"],br]];class Rt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=at(n),o=dn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of mr)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(r),f=o[i]-u;return this.rect[l]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ke{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function yr(e){const{EventTarget:t}=j(e);return e instanceof t?e:Ce(e)}function vt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var U;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(U||(U={}));function Ft(e){e.preventDefault()}function wr(e){e.stopPropagation()}var A;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(A||(A={}));const hn={start:[A.Space,A.Enter],cancel:[A.Esc],end:[A.Space,A.Enter,A.Tab]},xr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case A.Right:return{...n,x:n.x+25};case A.Left:return{...n,x:n.x-25};case A.Down:return{...n,y:n.y+25};case A.Up:return{...n,y:n.y-25}}};class gn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ke(Ce(n)),this.windowListeners=new ke(j(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&fn(r),n(q)}handleKeyDown(t){if(st(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=hn,coordinateGetter:s=xr,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:q;this.referenceCoordinates||(this.referenceCoordinates=f);const d=s(t,{active:n,context:r.current,currentCoordinates:f});if(d){const g=je(d,f),h={x:0,y:0},{scrollableAncestors:S}=r.current;for(const v of S){const p=t.code,{isTop:y,isRight:w,isLeft:b,isBottom:R,maxScroll:D,minScroll:E}=un(v),x=vr(v),C={x:Math.min(p===A.Right?x.right-x.width/2:x.right,Math.max(p===A.Right?x.left:x.left+x.width/2,d.x)),y:Math.min(p===A.Down?x.bottom-x.height/2:x.bottom,Math.max(p===A.Down?x.top:x.top+x.height/2,d.y))},T=p===A.Right&&!w||p===A.Left&&!b,O=p===A.Down&&!R||p===A.Up&&!y;if(T&&C.x!==d.x){const m=v.scrollLeft+g.x,H=p===A.Right&&m<=D.x||p===A.Left&&m>=E.x;if(H&&!g.y){v.scrollTo({left:m,behavior:a});return}H?h.x=v.scrollLeft-m:h.x=p===A.Right?v.scrollLeft-D.x:v.scrollLeft-E.x,h.x&&v.scrollBy({left:-h.x,behavior:a});break}else if(O&&C.y!==d.y){const m=v.scrollTop+g.y,H=p===A.Down&&m<=D.y||p===A.Up&&m>=E.y;if(H&&!g.x){v.scrollTo({top:m,behavior:a});return}H?h.y=v.scrollTop-m:h.y=p===A.Down?v.scrollTop-D.y:v.scrollTop-E.y,h.y&&v.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,we(je(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}gn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=hn,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Xt(e){return!!(e&&"distance"in e)}function Yt(e){return!!(e&&"delay"in e)}class Et{constructor(t,n,r){var o;r===void 0&&(r=yr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Ce(s),this.documentListeners=new ke(this.document),this.listeners=new ke(r),this.windowListeners=new ke(j(s)),this.initialCoordinates=(o=et(i))!=null?o:q,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Ft),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Ft),this.documentListeners.add(U.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Yt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Xt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(U.Click,wr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(n=et(t))!=null?n:q,u=je(o,l);if(!r&&a){if(Xt(a)){if(a.tolerance!=null&&vt(u,a.tolerance))return this.handleCancel();if(vt(u,a.distance))return this.handleStart()}if(Yt(a)&&vt(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===A.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Cr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class vn extends Et{constructor(t){const{event:n}=t,r=Ce(n.target);super(t,Cr,r)}}vn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Dr={move:{name:"mousemove"},end:{name:"mouseup"}};var yt;(function(e){e[e.RightClick=2]="RightClick"})(yt||(yt={}));class Sr extends Et{constructor(t){super(t,Dr,Ce(t.event.target))}}Sr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===yt.RightClick?!1:(r?.({event:n}),!0)}}];const pt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Rr extends Et{constructor(t){super(t,pt)}static setup(){return window.addEventListener(pt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(pt.move.name,t)};function t(){}}}Rr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Le;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Le||(Le={}));var nt;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(nt||(nt={}));function Er(e){let{acceleration:t,activator:n=Le.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=nt.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:g}=e;const h=Tr({delta:d,disabled:!i}),[S,v]=Xn(),p=c.useRef({x:0,y:0}),y=c.useRef({x:0,y:0}),w=c.useMemo(()=>{switch(n){case Le.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Le.DraggableRect:return o}},[n,o,l]),b=c.useRef(null),R=c.useCallback(()=>{const E=b.current;if(!E)return;const x=p.current.x*y.current.x,C=p.current.y*y.current.y;E.scrollBy(x,C)},[]),D=c.useMemo(()=>a===nt.TreeOrder?[...u].reverse():u,[a,u]);c.useEffect(()=>{if(!i||!u.length||!w){v();return}for(const E of D){if(r?.(E)===!1)continue;const x=u.indexOf(E),C=f[x];if(!C)continue;const{direction:T,speed:O}=gr(E,C,w,t,g);for(const m of["x","y"])h[m][T[m]]||(O[m]=0,T[m]=0);if(O.x>0||O.y>0){v(),b.current=E,S(R,s),p.current=O,y.current=T;return}}p.current={x:0,y:0},y.current={x:0,y:0},v()},[t,R,r,v,i,s,JSON.stringify(w),JSON.stringify(h),S,u,D,f,JSON.stringify(g)])}const Ar={x:{[k.Backward]:!1,[k.Forward]:!1},y:{[k.Backward]:!1,[k.Forward]:!1}};function Tr(e){let{delta:t,disabled:n}=e;const r=Qe(t);return Fe(o=>{if(n||!r||!o)return Ar;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[k.Backward]:o.x[k.Backward]||i.x===-1,[k.Forward]:o.x[k.Forward]||i.x===1},y:{[k.Backward]:o.y[k.Backward]||i.y===-1,[k.Forward]:o.y[k.Forward]||i.y===1}}},[n,t,r])}function Mr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Fe(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function Or(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var Be;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Be||(Be={}));var wt;(function(e){e.Optimized="optimized"})(wt||(wt={}));const Wt=new Map;function Ir(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=c.useState(null),{frequency:a,measure:l,strategy:u}=o,f=c.useRef(e),d=p(),g=Pe(d),h=c.useCallback(function(y){y===void 0&&(y=[]),!g.current&&s(w=>w===null?y:w.concat(y.filter(b=>!w.includes(b))))},[g]),S=c.useRef(null),v=Fe(y=>{if(d&&!n)return Wt;if(!y||y===Wt||f.current!==e||i!=null){const w=new Map;for(let b of e){if(!b)continue;if(i&&i.length>0&&!i.includes(b.id)&&b.rect.current){w.set(b.id,b.rect.current);continue}const R=b.node.current,D=R?new Rt(l(R),R):null;b.rect.current=D,D&&w.set(b.id,D)}return w}return y},[e,i,n,d,l]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{d||h()},[n,d]),c.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),c.useEffect(()=>{d||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{h(),S.current=null},a))},[a,d,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Be.Always:return!1;case Be.BeforeDragging:return n;default:return!n}}}function At(e,t){return Fe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nr(e,t){return At(e,t)}function kr(e){let{callback:t,disabled:n}=e;const r=it(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function lt(e){let{callback:t,disabled:n}=e;const r=it(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function Lr(e){return new Rt(De(e),e)}function Kt(e,t,n){t===void 0&&(t=Lr);const[r,o]=c.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const f=t(e);return JSON.stringify(l)===JSON.stringify(f)?l:f})}const s=kr({callback(l){if(e)for(const u of l){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=lt({callback:i});return _(()=>{i(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function zr(e){const t=At(e);return rn(e,t)}const Ut=[];function Pr(e){const t=c.useRef(e),n=Fe(r=>e?r&&r!==Ut&&e&&t.current&&e.parentNode===t.current.parentNode?r:at(e):Ut,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function jr(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(i=>{const s=gt(i.target);s&&n(a=>a?(a.set(s,mt(s)),new Map(a)):null)},[]);return c.useEffect(()=>{const i=r.current;if(e!==i){s(i);const a=e.map(l=>{const u=gt(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,mt(u)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const u=gt(l);u?.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>we(i,s),q):dn(e):q,[e,t])}function Ht(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==q;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?je(e,n.current):q}function Br(e){c.useEffect(()=>{if(!ot)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function $r(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function pn(e){return c.useMemo(()=>e?ur(e):null,[e])}const Vt=[];function Fr(e,t){t===void 0&&(t=De);const[n]=e,r=pn(n?j(n):null),[o,i]=c.useState(Vt);function s(){i(()=>e.length?e.map(l=>cn(l)?r:new Rt(t(l),l)):Vt)}const a=lt({callback:s});return _(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),o}function bn(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return $e(t)?t:e}function Xr(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:f}of u)if($e(f)){r(d=>{const g=t(f);return d?{...d,width:g.width,height:g.height}:g});break}},[t]),i=lt({callback:o}),s=c.useCallback(u=>{const f=bn(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[a,l]=Ze(s);return c.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Yr=[{sensor:vn,options:{}},{sensor:gn,options:{}}],Wr={current:{}},Je={draggable:{measure:$t},droppable:{measure:$t,strategy:Be.WhileDragging,frequency:wt.Optimized},dragOverlay:{measure:De}};class ze extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Kr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ze,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Je,measureDroppableContainers:tt,windowRect:null,measuringScheduled:!1},mn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tt,draggableNodes:new Map,over:null,measureDroppableContainers:tt},Ye=c.createContext(mn),yn=c.createContext(Kr);function Ur(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ze}}}function Hr(e,t){switch(t.type){case N.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case N.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case N.DragEnd:case N.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case N.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ze(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case N.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new ze(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case N.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new ze(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Vr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(Ye),i=Qe(r),s=Qe(n?.id);return c.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!st(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[l.current,u.current]){if(!f)continue;const d=Kn(f);if(d){d.focus();break}}})}},[r,t,o,s,i]),null}function wn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function _r(e){return c.useMemo(()=>({draggable:{...Je.draggable,...e?.draggable},droppable:{...Je.droppable,...e?.droppable},dragOverlay:{...Je.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function qr(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=c.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;_(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=rn(f,r);if(s||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=sn(u);g&&g.scrollBy({top:d.y,left:d.x})}},[t,s,a,r,n])}const ct=c.createContext({...q,scaleX:1,scaleY:1});var de;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(de||(de={}));const Xo=c.memo(function(t){var n,r,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:f=Yr,collisionDetection:d=or,measuring:g,modifiers:h,...S}=t;const v=c.useReducer(Hr,void 0,Ur),[p,y]=v,[w,b]=Gn(),[R,D]=c.useState(de.Uninitialized),E=R===de.Initialized,{draggable:{active:x,nodes:C,translate:T},droppable:{containers:O}}=p,m=x!=null?C.get(x):null,H=c.useRef({initial:null,translated:null}),V=c.useMemo(()=>{var z;return x!=null?{id:x,data:(z=m?.data)!=null?z:Wr,rect:H}:null},[x,m]),G=c.useRef(null),[Se,We]=c.useState(null),[$,Ke]=c.useState(null),ee=Pe(S,Object.values(S)),Re=Xe("DndDescribedBy",s),Ue=c.useMemo(()=>O.getEnabled(),[O]),B=_r(g),{droppableRects:te,measureDroppableContainers:fe,measuringScheduled:Ee}=Ir(Ue,{dragging:E,dependencies:[T.x,T.y],config:B.droppable}),W=Mr(C,x),He=c.useMemo(()=>$?et($):null,[$]),ie=zn(),ne=Nr(W,B.draggable.measure);qr({activeNode:x!=null?C.get(x):null,config:ie.layoutShiftCompensation,initialRect:ne,measure:B.draggable.measure});const M=Kt(W,B.draggable.measure,ne),Ae=Kt(W?W.parentElement:null),J=c.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=O.getNodeFor((n=J.current.over)==null?void 0:n.id),re=Xr({measure:B.dragOverlay.measure}),ve=(r=re.nodeRef.current)!=null?r:W,pe=E?(o=re.rect)!=null?o:M:null,Tt=!!(re.nodeRef.current&&re.rect),Mt=zr(Tt?null:M),ut=pn(ve?j(ve):null),se=Pr(E?ge??W:null),Ve=Fr(se),_e=wn(h,{transform:{x:T.x-Mt.x,y:T.y-Mt.y,scaleX:1,scaleY:1},activatorEvent:$,active:V,activeNodeRect:M,containerNodeRect:Ae,draggingNodeRect:pe,over:J.current.over,overlayNodeRect:re.rect,scrollableAncestors:se,scrollableAncestorRects:Ve,windowRect:ut}),Ot=He?we(He,T):null,It=jr(se),Tn=Ht(It),Mn=Ht(It,[M]),be=we(_e,Tn),me=pe?ar(pe,_e):null,Te=V&&me?d({active:V,collisionRect:me,droppableRects:te,droppableContainers:Ue,pointerCoordinates:Ot}):null,Nt=nn(Te,"id"),[ae,kt]=c.useState(null),On=Tt?_e:we(_e,Mn),In=ir(On,(i=ae?.rect)!=null?i:null,M),dt=c.useRef(null),Lt=c.useCallback((z,F)=>{let{sensor:X,options:le}=F;if(G.current==null)return;const K=C.get(G.current);if(!K)return;const Y=z.nativeEvent,Z=new X({active:G.current,activeNode:K,event:Y,options:le,context:J,onAbort(L){if(!C.get(L))return;const{onDragAbort:Q}=ee.current,oe={id:L};Q?.(oe),w({type:"onDragAbort",event:oe})},onPending(L,ce,Q,oe){if(!C.get(L))return;const{onDragPending:Oe}=ee.current,ue={id:L,constraint:ce,initialCoordinates:Q,offset:oe};Oe?.(ue),w({type:"onDragPending",event:ue})},onStart(L){const ce=G.current;if(ce==null)return;const Q=C.get(ce);if(!Q)return;const{onDragStart:oe}=ee.current,Me={activatorEvent:Y,active:{id:ce,data:Q.data,rect:H}};Ne.unstable_batchedUpdates(()=>{oe?.(Me),D(de.Initializing),y({type:N.DragStart,initialCoordinates:L,active:ce}),w({type:"onDragStart",event:Me}),We(dt.current),Ke(Y)})},onMove(L){y({type:N.DragMove,coordinates:L})},onEnd:ye(N.DragEnd),onCancel:ye(N.DragCancel)});dt.current=Z;function ye(L){return async function(){const{active:Q,collisions:oe,over:Me,scrollAdjustedTranslate:Oe}=J.current;let ue=null;if(Q&&Oe){const{cancelDrop:Ie}=ee.current;ue={activatorEvent:Y,active:Q,collisions:oe,delta:Oe,over:Me},L===N.DragEnd&&typeof Ie=="function"&&await Promise.resolve(Ie(ue))&&(L=N.DragCancel)}G.current=null,Ne.unstable_batchedUpdates(()=>{y({type:L}),D(de.Uninitialized),kt(null),We(null),Ke(null),dt.current=null;const Ie=L===N.DragEnd?"onDragEnd":"onDragCancel";if(ue){const ft=ee.current[Ie];ft?.(ue),w({type:Ie,event:ue})}})}}},[C]),Nn=c.useCallback((z,F)=>(X,le)=>{const K=X.nativeEvent,Y=C.get(le);if(G.current!==null||!Y||K.dndKit||K.defaultPrevented)return;const Z={active:Y};z(X,F.options,Z)===!0&&(K.dndKit={capturedBy:F.sensor},G.current=le,Lt(X,F))},[C,Lt]),zt=Or(f,Nn);Br(f),_(()=>{M&&R===de.Initializing&&D(de.Initialized)},[M,R]),c.useEffect(()=>{const{onDragMove:z}=ee.current,{active:F,activatorEvent:X,collisions:le,over:K}=J.current;if(!F||!X)return;const Y={active:F,activatorEvent:X,collisions:le,delta:{x:be.x,y:be.y},over:K};Ne.unstable_batchedUpdates(()=>{z?.(Y),w({type:"onDragMove",event:Y})})},[be.x,be.y]),c.useEffect(()=>{const{active:z,activatorEvent:F,collisions:X,droppableContainers:le,scrollAdjustedTranslate:K}=J.current;if(!z||G.current==null||!F||!K)return;const{onDragOver:Y}=ee.current,Z=le.get(Nt),ye=Z&&Z.rect.current?{id:Z.id,rect:Z.rect.current,data:Z.data,disabled:Z.disabled}:null,L={active:z,activatorEvent:F,collisions:X,delta:{x:K.x,y:K.y},over:ye};Ne.unstable_batchedUpdates(()=>{kt(ye),Y?.(L),w({type:"onDragOver",event:L})})},[Nt]),_(()=>{J.current={activatorEvent:$,active:V,activeNode:W,collisionRect:me,collisions:Te,droppableRects:te,draggableNodes:C,draggingNode:ve,draggingNodeRect:pe,droppableContainers:O,over:ae,scrollableAncestors:se,scrollAdjustedTranslate:be},H.current={initial:pe,translated:me}},[V,W,Te,me,C,ve,pe,te,O,ae,se,be]),Er({...ie,delta:T,draggingRect:me,pointerCoordinates:Ot,scrollableAncestors:se,scrollableAncestorRects:Ve});const kn=c.useMemo(()=>({active:V,activeNode:W,activeNodeRect:M,activatorEvent:$,collisions:Te,containerNodeRect:Ae,dragOverlay:re,draggableNodes:C,droppableContainers:O,droppableRects:te,over:ae,measureDroppableContainers:fe,scrollableAncestors:se,scrollableAncestorRects:Ve,measuringConfiguration:B,measuringScheduled:Ee,windowRect:ut}),[V,W,M,$,Te,Ae,re,C,O,te,ae,fe,se,Ve,B,Ee,ut]),Ln=c.useMemo(()=>({activatorEvent:$,activators:zt,active:V,activeNodeRect:M,ariaDescribedById:{draggable:Re},dispatch:y,draggableNodes:C,over:ae,measureDroppableContainers:fe}),[$,zt,V,M,y,Re,C,ae,fe]);return I.createElement(Qt.Provider,{value:b},I.createElement(Ye.Provider,{value:Ln},I.createElement(yn.Provider,{value:kn},I.createElement(ct.Provider,{value:In},u)),I.createElement(Vr,{disabled:a?.restoreFocus===!1})),I.createElement(Qn,{...a,hiddenTextDescribedById:Re}));function zn(){const z=Se?.autoScrollEnabled===!1,F=typeof l=="object"?l.enabled===!1:l===!1,X=E&&!z&&!F;return typeof l=="object"?{...l,enabled:X}:{enabled:X}}}),Gr=c.createContext(null),_t="button",Jr="Draggable";function Zr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=Xe(Jr),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:g}=c.useContext(Ye),{role:h=_t,roleDescription:S="draggable",tabIndex:v=0}=o??{},p=l?.id===t,y=c.useContext(p?ct:Gr),[w,b]=Ze(),[R,D]=Ze(),E=$r(s,t),x=Pe(n);_(()=>(d.set(t,{id:t,key:i,node:w,activatorNode:R,data:x}),()=>{const T=d.get(t);T&&T.key===i&&d.delete(t)}),[d,t]);const C=c.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":p&&h===_t?!0:void 0,"aria-roledescription":S,"aria-describedby":f.draggable}),[r,h,v,p,S,f.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:C,isDragging:p,listeners:r?void 0:E,node:w,over:g,setNodeRef:b,setActivatorNodeRef:D,transform:y}}function xn(){return c.useContext(yn)}const Qr="Droppable",eo={timeout:25};function to(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=Xe(Qr),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=c.useContext(Ye),f=c.useRef({disabled:n}),d=c.useRef(!1),g=c.useRef(null),h=c.useRef(null),{disabled:S,updateMeasurementsFor:v,timeout:p}={...eo,...o},y=Pe(v??r),w=c.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),h.current=null},p)},[p]),b=lt({callback:w,disabled:S||!s}),R=c.useCallback((C,T)=>{b&&(T&&(b.unobserve(T),d.current=!1),C&&b.observe(C))},[b]),[D,E]=Ze(R),x=Pe(t);return c.useEffect(()=>{!b||!D.current||(b.disconnect(),d.current=!1,b.observe(D.current))},[D,b]),c.useEffect(()=>(a({type:N.RegisterDroppable,element:{id:r,key:i,disabled:n,node:D,rect:g,data:x}}),()=>a({type:N.UnregisterDroppable,key:i,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(a({type:N.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,a]),{active:s,rect:g,isOver:l?.id===r,node:D,over:l,setNodeRef:E}}function no(e){let{animation:t,children:n}=e;const[r,o]=c.useState(null),[i,s]=c.useState(null),a=Qe(n);return!n&&!r&&a&&o(a),_(()=>{if(!i)return;const l=r?.key,u=r?.props.id;if(l==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),I.createElement(I.Fragment,null,n,r?c.cloneElement(r,{ref:s}):null)}const ro={x:0,y:0,scaleX:1,scaleY:1};function oo(e){let{children:t}=e;return I.createElement(Ye.Provider,{value:mn},I.createElement(ct.Provider,{value:ro},t))}const io={position:"fixed",touchAction:"none"},so=e=>st(e)?"transform 250ms ease":void 0,ao=c.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:a,style:l,transform:u,transition:f=so}=e;if(!a)return null;const d=o?u:{...u,scaleX:1,scaleY:1},g={...io,width:a.width,height:a.height,top:a.top,left:a.left,transform:he.Transform.toString(d),transformOrigin:o&&r?er(r,a):void 0,transition:typeof f=="function"?f(r):f,...l};return I.createElement(n,{className:s,style:g,ref:t},i)}),lo=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&r.node.style.setProperty(a,l);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[l,u]of Object.entries(o))n.node.style.setProperty(l,u);s!=null&&s.active&&n.node.classList.remove(s.active)}},co=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:he.Transform.toString(t)},{transform:he.Transform.toString(n)}]},uo={duration:250,easing:"ease",keyframes:co,sideEffects:lo({styles:{active:{opacity:"0"}}})};function fo(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return it((i,s)=>{if(t===null)return;const a=n.get(i);if(!a)return;const l=a.node.current;if(!l)return;const u=bn(s);if(!u)return;const{transform:f}=j(s).getComputedStyle(s),d=on(f);if(!d)return;const g=typeof t=="function"?t:ho(t);return fn(l,o.draggable.measure),g({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function ho(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...uo,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...u}=i;if(!t)return;const f={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},d={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},g={x:l.x-f.x,y:l.y-f.y,...d},h=o({...u,active:s,dragOverlay:a,transform:{initial:l,final:g}}),[S]=h,v=h[h.length-1];if(JSON.stringify(S)===JSON.stringify(v))return;const p=r?.({active:s,dragOverlay:a,...u}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(w=>{y.onfinish=()=>{p?.(),w()}})}}let qt=0;function go(e){return c.useMemo(()=>{if(e!=null)return qt++,qt},[e])}const Yo=I.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggableNodes:S,droppableContainers:v,dragOverlay:p,over:y,measuringConfiguration:w,scrollableAncestors:b,scrollableAncestorRects:R,windowRect:D}=xn(),E=c.useContext(ct),x=go(d?.id),C=wn(s,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:p.rect,over:y,overlayNodeRect:p.rect,scrollableAncestors:b,scrollableAncestorRects:R,transform:E,windowRect:D}),T=At(g),O=fo({config:r,draggableNodes:S,droppableContainers:v,measuringConfiguration:w}),m=T?p.setRef:void 0;return I.createElement(oo,null,I.createElement(no,{animation:O},d&&x?I.createElement(ao,{key:x,id:d.id,ref:m,as:a,activatorEvent:f,adjustScale:t,className:l,transition:i,rect:T,style:{zIndex:u,...o},transform:C},n):null))});function Cn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function vo(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function qe(e){return e!==null&&e>=0}function po(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function bo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Dn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Cn(t,r,n),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},Ge={scaleX:1,scaleY:1},Wo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:r;if(!a)return null;if(o===n){const u=i[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...Ge}:null}const l=mo(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-l,...Ge}:o<n&&o>=s?{x:0,y:a.height+l,...Ge}:{x:0,y:0,...Ge}};function mo(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const Sn="Sortable",Rn=I.createContext({activeIndex:-1,containerId:Sn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Dn,disabled:{draggable:!1,droppable:!1}});function Ko(e){let{children:t,id:n,items:r,strategy:o=Dn,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:f}=xn(),d=Xe(Sn,n),g=a.rect!==null,h=c.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),S=s!=null,v=s?h.indexOf(s.id):-1,p=u?h.indexOf(u.id):-1,y=c.useRef(h),w=!po(h,y.current),b=p!==-1&&v===-1||w,R=bo(i);_(()=>{w&&S&&f(h)},[w,h,S,f]),c.useEffect(()=>{y.current=h},[h]);const D=c.useMemo(()=>({activeIndex:v,containerId:d,disabled:R,disableTransforms:b,items:h,overIndex:p,useDragOverlay:g,sortedRects:vo(h,l),strategy:o}),[v,d,R.draggable,R.droppable,b,h,p,l,g,o]);return I.createElement(Rn.Provider,{value:D},t)}const yo=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Cn(n,r,o).indexOf(t)},wo=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==i&&o===s?!1:n?!0:s!==o&&t===l},xo={duration:200,easing:"ease"},En="transform",Co=he.Transition.toString({property:En,duration:0,easing:"linear"}),Do={roleDescription:"sortable"};function So(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=c.useState(null),a=c.useRef(n);return _(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const u=De(r.current,{ignoreTransform:!0}),f={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(f.x||f.y)&&s(f)}}n!==a.current&&(a.current=n)},[t,n,r,o]),c.useEffect(()=>{i&&s(null)},[i]),i}function Uo(e){let{animateLayoutChanges:t=wo,attributes:n,disabled:r,data:o,getNewIndex:i=yo,id:s,strategy:a,resizeObserverConfig:l,transition:u=xo}=e;const{items:f,containerId:d,activeIndex:g,disabled:h,disableTransforms:S,sortedRects:v,overIndex:p,useDragOverlay:y,strategy:w}=c.useContext(Rn),b=Ro(r,h),R=f.indexOf(s),D=c.useMemo(()=>({sortable:{containerId:d,index:R,items:f},...o}),[d,o,R,f]),E=c.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:x,node:C,isOver:T,setNodeRef:O}=to({id:s,data:D,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...l}}),{active:m,activatorEvent:H,activeNodeRect:V,attributes:G,setNodeRef:Se,listeners:We,isDragging:$,over:Ke,setActivatorNodeRef:ee,transform:Re}=Zr({id:s,data:D,attributes:{...Do,...n},disabled:b.draggable}),Ue=Fn(O,Se),B=!!m,te=B&&!S&&qe(g)&&qe(p),fe=!y&&$,Ee=fe&&te?Re:null,He=te?Ee??(a??w)({rects:v,activeNodeRect:V,activeIndex:g,overIndex:p,index:R}):null,ie=qe(g)&&qe(p)?i({id:s,items:f,activeIndex:g,overIndex:p}):R,ne=m?.id,M=c.useRef({activeId:ne,items:f,newIndex:ie,containerId:d}),Ae=f!==M.current.items,J=t({active:m,containerId:d,isDragging:$,isSorting:B,id:s,index:R,items:f,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:u,wasDragging:M.current.activeId!=null}),ge=So({disabled:!J,index:R,node:C,rect:x});return c.useEffect(()=>{B&&M.current.newIndex!==ie&&(M.current.newIndex=ie),d!==M.current.containerId&&(M.current.containerId=d),f!==M.current.items&&(M.current.items=f)},[B,ie,d,f]),c.useEffect(()=>{if(ne===M.current.activeId)return;if(ne!=null&&M.current.activeId==null){M.current.activeId=ne;return}const ve=setTimeout(()=>{M.current.activeId=ne},50);return()=>clearTimeout(ve)},[ne]),{active:m,activeIndex:g,attributes:G,data:D,rect:x,index:R,newIndex:ie,items:f,isOver:T,isSorting:B,isDragging:$,listeners:We,node:C,overIndex:p,over:Ke,setNodeRef:Ue,setActivatorNodeRef:ee,setDroppableNodeRef:O,setDraggableNodeRef:Se,transform:ge??He,transition:re()};function re(){if(ge||Ae&&M.current.newIndex===R)return Co;if(!(fe&&!st(H)||!u)&&(B||J))return he.Transition.toString({...u,property:En})}}function Ro(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function rt(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Eo=[A.Down,A.Right,A.Up,A.Left],Ho=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Eo.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];i.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const g=o.get(d.id);if(g)switch(e.code){case A.Down:r.top<g.top&&l.push(d);break;case A.Up:r.top>g.top&&l.push(d);break;case A.Left:r.left>g.left&&l.push(d);break;case A.Right:r.left<g.left&&l.push(d);break}});const u=nr({collisionRect:r,droppableRects:o,droppableContainers:l});let f=nn(u,"id");if(f===s?.id&&u.length>1&&(f=u[1].id),f!=null){const d=i.get(n.id),g=i.get(f),h=g?o.get(g.id):null,S=g?.node.current;if(S&&h&&d&&g){const p=at(S).some((E,x)=>a[x]!==E),y=An(d,g),w=Ao(d,g),b=p||!y?{x:0,y:0}:{x:w?r.width-h.width:0,y:w?r.height-h.height:0},R={x:h.left,y:h.top};return b.x&&b.y?R:je(R,b)}}}};function An(e,t){return!rt(e)||!rt(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ao(e,t){return!rt(e)||!rt(t)||!An(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const To=new Set(["http:","https:","mailto:","tel:","ftp:"]);function Mo(e){if(e.startsWith("/")||e.startsWith(".")||e.startsWith("#"))return!0;try{const t=new URL(e,"https://placeholder.invalid");return To.has(t.protocol)}catch{return!1}}function Oo(e){const t=e.trim();return t?t.startsWith("/")||t.startsWith(".")||t.startsWith("#")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`:""}const Io="noopener noreferrer nofollow";function bt(e){const t=xt.c(8),{active:n,label:r,onClick:o,children:i}=e,s=n?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let a;t[0]!==s?(a=Ct("flex h-7 w-7 items-center justify-center rounded transition-colors cursor-pointer",s),t[0]=s,t[1]=a):a=t[1];let l;return t[2]!==n||t[3]!==i||t[4]!==r||t[5]!==o||t[6]!==a?(l=P.jsx("button",{type:"button","aria-label":r,"aria-pressed":n,onMouseDown:No,onClick:o,className:a,children:i}),t[2]=n,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l):l=t[7],l}function No(e){return e.preventDefault()}function Gt(e){const t=xt.c(7),{active:n,label:r,onSelect:o}=e,i=n?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let s;t[0]!==i?(s=Ct("flex-1 rounded px-2 py-1 text-xs transition-colors cursor-pointer",i),t[0]=i,t[1]=s):s=t[1];let a;return t[2]!==n||t[3]!==r||t[4]!==o||t[5]!==s?(a=P.jsx("button",{type:"button","aria-pressed":n,onMouseDown:ko,onClick:o,className:s,children:r}),t[2]=n,t[3]=r,t[4]=o,t[5]=s,t[6]=a):a=t[6],a}function ko(e){return e.preventDefault()}function Vo(e){const t=xt.c(36),{editor:n,active:r,open:o,onOpenChange:i}=e,s=Pn(),[a,l]=c.useState(""),[u,f]=c.useState(!0),[d,g]=c.useState(!1);let h;t[0]!==r||t[1]!==n||t[2]!==i?(h=()=>{const m=n.getAttributes("link");l(typeof m.href=="string"?m.href:""),f(r?m.target==="_blank":!0),g(!1),i(!0)},t[0]=r,t[1]=n,t[2]=i,t[3]=h):h=t[3];const S=h;let v;t[4]!==n||t[5]!==i?(v=()=>{i(!1),n.chain().focus().run()},t[4]=n,t[5]=i,t[6]=v):v=t[6];const p=v;let y;t[7]!==a||t[8]!==n||t[9]!==u||t[10]!==i?(y=()=>{const m=Oo(a);if(m===""){n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1);return}if(!Mo(m)){g(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:m,target:u?"_blank":null,rel:u?Io:null}).run(),i(!1)},t[7]=a,t[8]=n,t[9]=u,t[10]=i,t[11]=y):y=t[11];const w=y;let b;t[12]!==n||t[13]!==i?(b=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},t[12]=n,t[13]=i,t[14]=b):b=t[14];const R=b;let D;t[15]!==s?(D=s("sectionsEditor.richTextLinkControl.linkButtonLabel"),t[15]=s,t[16]=D):D=t[16];const E=o?p:S;let x;t[17]===Symbol.for("react.memo_cache_sentinel")?(x=P.jsx(Bn,{size:14}),t[17]=x):x=t[17];let C;t[18]!==r||t[19]!==D||t[20]!==E?(C=P.jsx(bt,{active:r,label:D,onClick:E,children:x}),t[18]=r,t[19]=D,t[20]=E,t[21]=C):C=t[21];let T;t[22]!==r||t[23]!==w||t[24]!==p||t[25]!==a||t[26]!==d||t[27]!==u||t[28]!==i||t[29]!==o||t[30]!==R||t[31]!==s?(T=o&&P.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 flex-col gap-1 rounded-md border bg-popover p-1 shadow-md",onBlur:m=>{m.currentTarget.contains(m.relatedTarget)||i(!1)},children:[P.jsxs("div",{className:"flex items-center gap-0.5",children:[P.jsx("input",{autoFocus:!0,type:"text","aria-label":s("sectionsEditor.richTextLinkControl.urlInputAriaLabel"),"aria-invalid":d,placeholder:s("sectionsEditor.richTextLinkControl.urlInputPlaceholder"),value:a,onChange:m=>{l(m.target.value),g(!1)},onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),w()):m.key==="Escape"&&(m.preventDefault(),p())},className:Ct("h-7 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",d&&"text-destructive")}),P.jsx(bt,{active:!1,label:s("sectionsEditor.richTextLinkControl.applyLinkLabel"),onClick:w,children:P.jsx(jn,{size:14})}),r&&P.jsx(bt,{active:!1,label:s("sectionsEditor.richTextLinkControl.removeLinkLabel"),onClick:R,children:P.jsx($n,{size:14})})]}),P.jsxs("div",{className:"flex items-center gap-0.5 rounded bg-muted/40 p-0.5",children:[P.jsx(Gt,{active:!u,label:s("sectionsEditor.richTextLinkControl.sameTabLabel"),onSelect:()=>f(!1)}),P.jsx(Gt,{active:u,label:s("sectionsEditor.richTextLinkControl.newTabLabel"),onSelect:()=>f(!0)})]})]}),t[22]=r,t[23]=w,t[24]=p,t[25]=a,t[26]=d,t[27]=u,t[28]=i,t[29]=o,t[30]=R,t[31]=s,t[32]=T):T=t[32];let O;return t[33]!==C||t[34]!==T?(O=P.jsxs("div",{className:"relative",children:[C,T]}),t[33]=C,t[34]=T,t[35]=O):O=t[35],O}export{he as C,Xo as D,gn as K,vn as P,Vo as R,Ko as S,bt as T,$o as a,Bo as b,Fo as c,Yo as d,Cn as e,nr as f,to as g,Mo as i,Oo as n,Dn as r,Ho as s,Uo as u,Wo as v};
|
|
5
|
+
`},Zn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Qn(e){let{announcements:t=Zn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Jn}=e;const{announce:i,announcement:s}=_n(),a=Xe("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),qn(c.useMemo(()=>({onDragStart(d){let{active:g}=d;i(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;i(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;i(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!l)return null;const f=I.createElement(I.Fragment,null,I.createElement(Hn,{id:r,value:o.draggable}),I.createElement(Vn,{id:a,announcement:s}));return n?Ne.createPortal(f,n):f}var N;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(N||(N={}));function tt(){}function jo(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Bo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const q=Object.freeze({x:0,y:0});function en(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function er(e,t){const n=et(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function tn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function tr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function nn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Bt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const $o=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bt(t,t.left,t.top),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=en(Bt(l),o);i.push({id:a,data:{droppableContainer:s,value:u}})}}return i.sort(tn)},nr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=jt(t),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=jt(l),f=o.reduce((g,h,S)=>g+en(u[S],h),0),d=Number((f/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:d}})}}return i.sort(tn)};function rr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const l=t.width*t.height,u=e.width*e.height,f=s*a,d=f/(l+u-f);return Number(d.toFixed(4))}return 0}const or=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,a=n.get(s);if(a){const l=rr(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(tr)};function ir(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function rn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function sr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const ar=sr(1);function on(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function lr(e,t,n){const r=on(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:l+f,bottom:u+d,left:l}}const cr={ignoreTransform:!1};function De(e,t){t===void 0&&(t=cr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=j(e).getComputedStyle(e);u&&(n=lr(n,u,f))}const{top:r,left:o,width:i,height:s,bottom:a,right:l}=n;return{top:r,left:o,width:i,height:s,bottom:a,right:l}}function $t(e){return De(e,{ignoreTransform:!0})}function ur(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function dr(e,t){return t===void 0&&(t=j(e).getComputedStyle(e)),t.position==="fixed"}function fr(e,t){t===void 0&&(t=j(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function at(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(St(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!$e(o)||Jt(o)||n.includes(o))return n;const i=j(e).getComputedStyle(o);return o!==e&&fr(o,i)&&n.push(o),dr(o,i)?n:r(o.parentNode)}return e?r(e):n}function sn(e){const[t]=at(e,1);return t??null}function gt(e){return!ot||!e?null:xe(e)?e:Dt(e)?St(e)||e===Ce(e).scrollingElement?window:$e(e)?e:null:null}function an(e){return xe(e)?e.scrollX:e.scrollLeft}function ln(e){return xe(e)?e.scrollY:e.scrollTop}function mt(e){return{x:an(e),y:ln(e)}}var k;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(k||(k={}));function cn(e){return!ot||!e?!1:e===document.scrollingElement}function un(e){const t={x:0,y:0},n=cn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const hr={x:.2,y:.2};function gr(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=hr);const{isTop:u,isBottom:f,isLeft:d,isRight:g}=un(e),h={x:0,y:0},S={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+v.height?(h.y=k.Backward,S.y=r*Math.abs((t.top+v.height-i)/v.height)):!f&&l>=t.bottom-v.height&&(h.y=k.Forward,S.y=r*Math.abs((t.bottom-v.height-l)/v.height)),!g&&a>=t.right-v.width?(h.x=k.Forward,S.x=r*Math.abs((t.right-v.width-a)/v.width)):!d&&s<=t.left+v.width&&(h.x=k.Backward,S.x=r*Math.abs((t.left+v.width-s)/v.width)),{direction:h,speed:S}}function vr(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function dn(e){return e.reduce((t,n)=>we(t,mt(n)),q)}function pr(e){return e.reduce((t,n)=>t+an(n),0)}function br(e){return e.reduce((t,n)=>t+ln(n),0)}function fn(e,t){if(t===void 0&&(t=De),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);sn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const mr=[["x",["left","right"],pr],["y",["top","bottom"],br]];class Rt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=at(n),o=dn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of mr)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(r),f=o[i]-u;return this.rect[l]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ke{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function yr(e){const{EventTarget:t}=j(e);return e instanceof t?e:Ce(e)}function vt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var U;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(U||(U={}));function Ft(e){e.preventDefault()}function wr(e){e.stopPropagation()}var A;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(A||(A={}));const hn={start:[A.Space,A.Enter],cancel:[A.Esc],end:[A.Space,A.Enter,A.Tab]},xr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case A.Right:return{...n,x:n.x+25};case A.Left:return{...n,x:n.x-25};case A.Down:return{...n,y:n.y+25};case A.Up:return{...n,y:n.y-25}}};class gn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ke(Ce(n)),this.windowListeners=new ke(j(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&fn(r),n(q)}handleKeyDown(t){if(st(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=hn,coordinateGetter:s=xr,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:q;this.referenceCoordinates||(this.referenceCoordinates=f);const d=s(t,{active:n,context:r.current,currentCoordinates:f});if(d){const g=je(d,f),h={x:0,y:0},{scrollableAncestors:S}=r.current;for(const v of S){const p=t.code,{isTop:y,isRight:w,isLeft:b,isBottom:R,maxScroll:D,minScroll:E}=un(v),x=vr(v),C={x:Math.min(p===A.Right?x.right-x.width/2:x.right,Math.max(p===A.Right?x.left:x.left+x.width/2,d.x)),y:Math.min(p===A.Down?x.bottom-x.height/2:x.bottom,Math.max(p===A.Down?x.top:x.top+x.height/2,d.y))},T=p===A.Right&&!w||p===A.Left&&!b,O=p===A.Down&&!R||p===A.Up&&!y;if(T&&C.x!==d.x){const m=v.scrollLeft+g.x,H=p===A.Right&&m<=D.x||p===A.Left&&m>=E.x;if(H&&!g.y){v.scrollTo({left:m,behavior:a});return}H?h.x=v.scrollLeft-m:h.x=p===A.Right?v.scrollLeft-D.x:v.scrollLeft-E.x,h.x&&v.scrollBy({left:-h.x,behavior:a});break}else if(O&&C.y!==d.y){const m=v.scrollTop+g.y,H=p===A.Down&&m<=D.y||p===A.Up&&m>=E.y;if(H&&!g.x){v.scrollTo({top:m,behavior:a});return}H?h.y=v.scrollTop-m:h.y=p===A.Down?v.scrollTop-D.y:v.scrollTop-E.y,h.y&&v.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,we(je(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}gn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=hn,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Xt(e){return!!(e&&"distance"in e)}function Yt(e){return!!(e&&"delay"in e)}class Et{constructor(t,n,r){var o;r===void 0&&(r=yr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Ce(s),this.documentListeners=new ke(this.document),this.listeners=new ke(r),this.windowListeners=new ke(j(s)),this.initialCoordinates=(o=et(i))!=null?o:q,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Ft),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Ft),this.documentListeners.add(U.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Yt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Xt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(U.Click,wr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(n=et(t))!=null?n:q,u=je(o,l);if(!r&&a){if(Xt(a)){if(a.tolerance!=null&&vt(u,a.tolerance))return this.handleCancel();if(vt(u,a.distance))return this.handleStart()}if(Yt(a)&&vt(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===A.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Cr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class vn extends Et{constructor(t){const{event:n}=t,r=Ce(n.target);super(t,Cr,r)}}vn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Dr={move:{name:"mousemove"},end:{name:"mouseup"}};var yt;(function(e){e[e.RightClick=2]="RightClick"})(yt||(yt={}));class Sr extends Et{constructor(t){super(t,Dr,Ce(t.event.target))}}Sr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===yt.RightClick?!1:(r?.({event:n}),!0)}}];const pt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Rr extends Et{constructor(t){super(t,pt)}static setup(){return window.addEventListener(pt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(pt.move.name,t)};function t(){}}}Rr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Le;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Le||(Le={}));var nt;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(nt||(nt={}));function Er(e){let{acceleration:t,activator:n=Le.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=nt.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:g}=e;const h=Tr({delta:d,disabled:!i}),[S,v]=Xn(),p=c.useRef({x:0,y:0}),y=c.useRef({x:0,y:0}),w=c.useMemo(()=>{switch(n){case Le.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Le.DraggableRect:return o}},[n,o,l]),b=c.useRef(null),R=c.useCallback(()=>{const E=b.current;if(!E)return;const x=p.current.x*y.current.x,C=p.current.y*y.current.y;E.scrollBy(x,C)},[]),D=c.useMemo(()=>a===nt.TreeOrder?[...u].reverse():u,[a,u]);c.useEffect(()=>{if(!i||!u.length||!w){v();return}for(const E of D){if(r?.(E)===!1)continue;const x=u.indexOf(E),C=f[x];if(!C)continue;const{direction:T,speed:O}=gr(E,C,w,t,g);for(const m of["x","y"])h[m][T[m]]||(O[m]=0,T[m]=0);if(O.x>0||O.y>0){v(),b.current=E,S(R,s),p.current=O,y.current=T;return}}p.current={x:0,y:0},y.current={x:0,y:0},v()},[t,R,r,v,i,s,JSON.stringify(w),JSON.stringify(h),S,u,D,f,JSON.stringify(g)])}const Ar={x:{[k.Backward]:!1,[k.Forward]:!1},y:{[k.Backward]:!1,[k.Forward]:!1}};function Tr(e){let{delta:t,disabled:n}=e;const r=Qe(t);return Fe(o=>{if(n||!r||!o)return Ar;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[k.Backward]:o.x[k.Backward]||i.x===-1,[k.Forward]:o.x[k.Forward]||i.x===1},y:{[k.Backward]:o.y[k.Backward]||i.y===-1,[k.Forward]:o.y[k.Forward]||i.y===1}}},[n,t,r])}function Mr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Fe(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function Or(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var Be;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Be||(Be={}));var wt;(function(e){e.Optimized="optimized"})(wt||(wt={}));const Wt=new Map;function Ir(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=c.useState(null),{frequency:a,measure:l,strategy:u}=o,f=c.useRef(e),d=p(),g=Pe(d),h=c.useCallback(function(y){y===void 0&&(y=[]),!g.current&&s(w=>w===null?y:w.concat(y.filter(b=>!w.includes(b))))},[g]),S=c.useRef(null),v=Fe(y=>{if(d&&!n)return Wt;if(!y||y===Wt||f.current!==e||i!=null){const w=new Map;for(let b of e){if(!b)continue;if(i&&i.length>0&&!i.includes(b.id)&&b.rect.current){w.set(b.id,b.rect.current);continue}const R=b.node.current,D=R?new Rt(l(R),R):null;b.rect.current=D,D&&w.set(b.id,D)}return w}return y},[e,i,n,d,l]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{d||h()},[n,d]),c.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),c.useEffect(()=>{d||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{h(),S.current=null},a))},[a,d,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Be.Always:return!1;case Be.BeforeDragging:return n;default:return!n}}}function At(e,t){return Fe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nr(e,t){return At(e,t)}function kr(e){let{callback:t,disabled:n}=e;const r=it(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function lt(e){let{callback:t,disabled:n}=e;const r=it(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function Lr(e){return new Rt(De(e),e)}function Kt(e,t,n){t===void 0&&(t=Lr);const[r,o]=c.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const f=t(e);return JSON.stringify(l)===JSON.stringify(f)?l:f})}const s=kr({callback(l){if(e)for(const u of l){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=lt({callback:i});return _(()=>{i(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function zr(e){const t=At(e);return rn(e,t)}const Ut=[];function Pr(e){const t=c.useRef(e),n=Fe(r=>e?r&&r!==Ut&&e&&t.current&&e.parentNode===t.current.parentNode?r:at(e):Ut,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function jr(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(i=>{const s=gt(i.target);s&&n(a=>a?(a.set(s,mt(s)),new Map(a)):null)},[]);return c.useEffect(()=>{const i=r.current;if(e!==i){s(i);const a=e.map(l=>{const u=gt(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,mt(u)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const u=gt(l);u?.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>we(i,s),q):dn(e):q,[e,t])}function Ht(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==q;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?je(e,n.current):q}function Br(e){c.useEffect(()=>{if(!ot)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function $r(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function pn(e){return c.useMemo(()=>e?ur(e):null,[e])}const Vt=[];function Fr(e,t){t===void 0&&(t=De);const[n]=e,r=pn(n?j(n):null),[o,i]=c.useState(Vt);function s(){i(()=>e.length?e.map(l=>cn(l)?r:new Rt(t(l),l)):Vt)}const a=lt({callback:s});return _(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),o}function bn(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return $e(t)?t:e}function Xr(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:f}of u)if($e(f)){r(d=>{const g=t(f);return d?{...d,width:g.width,height:g.height}:g});break}},[t]),i=lt({callback:o}),s=c.useCallback(u=>{const f=bn(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[a,l]=Ze(s);return c.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Yr=[{sensor:vn,options:{}},{sensor:gn,options:{}}],Wr={current:{}},Je={draggable:{measure:$t},droppable:{measure:$t,strategy:Be.WhileDragging,frequency:wt.Optimized},dragOverlay:{measure:De}};class ze extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Kr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ze,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Je,measureDroppableContainers:tt,windowRect:null,measuringScheduled:!1},mn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tt,draggableNodes:new Map,over:null,measureDroppableContainers:tt},Ye=c.createContext(mn),yn=c.createContext(Kr);function Ur(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ze}}}function Hr(e,t){switch(t.type){case N.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case N.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case N.DragEnd:case N.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case N.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ze(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case N.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new ze(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case N.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new ze(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Vr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(Ye),i=Qe(r),s=Qe(n?.id);return c.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!st(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[l.current,u.current]){if(!f)continue;const d=Kn(f);if(d){d.focus();break}}})}},[r,t,o,s,i]),null}function wn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function _r(e){return c.useMemo(()=>({draggable:{...Je.draggable,...e?.draggable},droppable:{...Je.droppable,...e?.droppable},dragOverlay:{...Je.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function qr(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=c.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;_(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=rn(f,r);if(s||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=sn(u);g&&g.scrollBy({top:d.y,left:d.x})}},[t,s,a,r,n])}const ct=c.createContext({...q,scaleX:1,scaleY:1});var de;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(de||(de={}));const Fo=c.memo(function(t){var n,r,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:f=Yr,collisionDetection:d=or,measuring:g,modifiers:h,...S}=t;const v=c.useReducer(Hr,void 0,Ur),[p,y]=v,[w,b]=Gn(),[R,D]=c.useState(de.Uninitialized),E=R===de.Initialized,{draggable:{active:x,nodes:C,translate:T},droppable:{containers:O}}=p,m=x!=null?C.get(x):null,H=c.useRef({initial:null,translated:null}),V=c.useMemo(()=>{var z;return x!=null?{id:x,data:(z=m?.data)!=null?z:Wr,rect:H}:null},[x,m]),G=c.useRef(null),[Se,We]=c.useState(null),[$,Ke]=c.useState(null),ee=Pe(S,Object.values(S)),Re=Xe("DndDescribedBy",s),Ue=c.useMemo(()=>O.getEnabled(),[O]),B=_r(g),{droppableRects:te,measureDroppableContainers:fe,measuringScheduled:Ee}=Ir(Ue,{dragging:E,dependencies:[T.x,T.y],config:B.droppable}),W=Mr(C,x),He=c.useMemo(()=>$?et($):null,[$]),ie=zn(),ne=Nr(W,B.draggable.measure);qr({activeNode:x!=null?C.get(x):null,config:ie.layoutShiftCompensation,initialRect:ne,measure:B.draggable.measure});const M=Kt(W,B.draggable.measure,ne),Ae=Kt(W?W.parentElement:null),J=c.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=O.getNodeFor((n=J.current.over)==null?void 0:n.id),re=Xr({measure:B.dragOverlay.measure}),ve=(r=re.nodeRef.current)!=null?r:W,pe=E?(o=re.rect)!=null?o:M:null,Tt=!!(re.nodeRef.current&&re.rect),Mt=zr(Tt?null:M),ut=pn(ve?j(ve):null),se=Pr(E?ge??W:null),Ve=Fr(se),_e=wn(h,{transform:{x:T.x-Mt.x,y:T.y-Mt.y,scaleX:1,scaleY:1},activatorEvent:$,active:V,activeNodeRect:M,containerNodeRect:Ae,draggingNodeRect:pe,over:J.current.over,overlayNodeRect:re.rect,scrollableAncestors:se,scrollableAncestorRects:Ve,windowRect:ut}),Ot=He?we(He,T):null,It=jr(se),Tn=Ht(It),Mn=Ht(It,[M]),be=we(_e,Tn),me=pe?ar(pe,_e):null,Te=V&&me?d({active:V,collisionRect:me,droppableRects:te,droppableContainers:Ue,pointerCoordinates:Ot}):null,Nt=nn(Te,"id"),[ae,kt]=c.useState(null),On=Tt?_e:we(_e,Mn),In=ir(On,(i=ae?.rect)!=null?i:null,M),dt=c.useRef(null),Lt=c.useCallback((z,F)=>{let{sensor:X,options:le}=F;if(G.current==null)return;const K=C.get(G.current);if(!K)return;const Y=z.nativeEvent,Z=new X({active:G.current,activeNode:K,event:Y,options:le,context:J,onAbort(L){if(!C.get(L))return;const{onDragAbort:Q}=ee.current,oe={id:L};Q?.(oe),w({type:"onDragAbort",event:oe})},onPending(L,ce,Q,oe){if(!C.get(L))return;const{onDragPending:Oe}=ee.current,ue={id:L,constraint:ce,initialCoordinates:Q,offset:oe};Oe?.(ue),w({type:"onDragPending",event:ue})},onStart(L){const ce=G.current;if(ce==null)return;const Q=C.get(ce);if(!Q)return;const{onDragStart:oe}=ee.current,Me={activatorEvent:Y,active:{id:ce,data:Q.data,rect:H}};Ne.unstable_batchedUpdates(()=>{oe?.(Me),D(de.Initializing),y({type:N.DragStart,initialCoordinates:L,active:ce}),w({type:"onDragStart",event:Me}),We(dt.current),Ke(Y)})},onMove(L){y({type:N.DragMove,coordinates:L})},onEnd:ye(N.DragEnd),onCancel:ye(N.DragCancel)});dt.current=Z;function ye(L){return async function(){const{active:Q,collisions:oe,over:Me,scrollAdjustedTranslate:Oe}=J.current;let ue=null;if(Q&&Oe){const{cancelDrop:Ie}=ee.current;ue={activatorEvent:Y,active:Q,collisions:oe,delta:Oe,over:Me},L===N.DragEnd&&typeof Ie=="function"&&await Promise.resolve(Ie(ue))&&(L=N.DragCancel)}G.current=null,Ne.unstable_batchedUpdates(()=>{y({type:L}),D(de.Uninitialized),kt(null),We(null),Ke(null),dt.current=null;const Ie=L===N.DragEnd?"onDragEnd":"onDragCancel";if(ue){const ft=ee.current[Ie];ft?.(ue),w({type:Ie,event:ue})}})}}},[C]),Nn=c.useCallback((z,F)=>(X,le)=>{const K=X.nativeEvent,Y=C.get(le);if(G.current!==null||!Y||K.dndKit||K.defaultPrevented)return;const Z={active:Y};z(X,F.options,Z)===!0&&(K.dndKit={capturedBy:F.sensor},G.current=le,Lt(X,F))},[C,Lt]),zt=Or(f,Nn);Br(f),_(()=>{M&&R===de.Initializing&&D(de.Initialized)},[M,R]),c.useEffect(()=>{const{onDragMove:z}=ee.current,{active:F,activatorEvent:X,collisions:le,over:K}=J.current;if(!F||!X)return;const Y={active:F,activatorEvent:X,collisions:le,delta:{x:be.x,y:be.y},over:K};Ne.unstable_batchedUpdates(()=>{z?.(Y),w({type:"onDragMove",event:Y})})},[be.x,be.y]),c.useEffect(()=>{const{active:z,activatorEvent:F,collisions:X,droppableContainers:le,scrollAdjustedTranslate:K}=J.current;if(!z||G.current==null||!F||!K)return;const{onDragOver:Y}=ee.current,Z=le.get(Nt),ye=Z&&Z.rect.current?{id:Z.id,rect:Z.rect.current,data:Z.data,disabled:Z.disabled}:null,L={active:z,activatorEvent:F,collisions:X,delta:{x:K.x,y:K.y},over:ye};Ne.unstable_batchedUpdates(()=>{kt(ye),Y?.(L),w({type:"onDragOver",event:L})})},[Nt]),_(()=>{J.current={activatorEvent:$,active:V,activeNode:W,collisionRect:me,collisions:Te,droppableRects:te,draggableNodes:C,draggingNode:ve,draggingNodeRect:pe,droppableContainers:O,over:ae,scrollableAncestors:se,scrollAdjustedTranslate:be},H.current={initial:pe,translated:me}},[V,W,Te,me,C,ve,pe,te,O,ae,se,be]),Er({...ie,delta:T,draggingRect:me,pointerCoordinates:Ot,scrollableAncestors:se,scrollableAncestorRects:Ve});const kn=c.useMemo(()=>({active:V,activeNode:W,activeNodeRect:M,activatorEvent:$,collisions:Te,containerNodeRect:Ae,dragOverlay:re,draggableNodes:C,droppableContainers:O,droppableRects:te,over:ae,measureDroppableContainers:fe,scrollableAncestors:se,scrollableAncestorRects:Ve,measuringConfiguration:B,measuringScheduled:Ee,windowRect:ut}),[V,W,M,$,Te,Ae,re,C,O,te,ae,fe,se,Ve,B,Ee,ut]),Ln=c.useMemo(()=>({activatorEvent:$,activators:zt,active:V,activeNodeRect:M,ariaDescribedById:{draggable:Re},dispatch:y,draggableNodes:C,over:ae,measureDroppableContainers:fe}),[$,zt,V,M,y,Re,C,ae,fe]);return I.createElement(Qt.Provider,{value:b},I.createElement(Ye.Provider,{value:Ln},I.createElement(yn.Provider,{value:kn},I.createElement(ct.Provider,{value:In},u)),I.createElement(Vr,{disabled:a?.restoreFocus===!1})),I.createElement(Qn,{...a,hiddenTextDescribedById:Re}));function zn(){const z=Se?.autoScrollEnabled===!1,F=typeof l=="object"?l.enabled===!1:l===!1,X=E&&!z&&!F;return typeof l=="object"?{...l,enabled:X}:{enabled:X}}}),Gr=c.createContext(null),_t="button",Jr="Draggable";function Zr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=Xe(Jr),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:g}=c.useContext(Ye),{role:h=_t,roleDescription:S="draggable",tabIndex:v=0}=o??{},p=l?.id===t,y=c.useContext(p?ct:Gr),[w,b]=Ze(),[R,D]=Ze(),E=$r(s,t),x=Pe(n);_(()=>(d.set(t,{id:t,key:i,node:w,activatorNode:R,data:x}),()=>{const T=d.get(t);T&&T.key===i&&d.delete(t)}),[d,t]);const C=c.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":p&&h===_t?!0:void 0,"aria-roledescription":S,"aria-describedby":f.draggable}),[r,h,v,p,S,f.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:C,isDragging:p,listeners:r?void 0:E,node:w,over:g,setNodeRef:b,setActivatorNodeRef:D,transform:y}}function xn(){return c.useContext(yn)}const Qr="Droppable",eo={timeout:25};function to(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=Xe(Qr),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=c.useContext(Ye),f=c.useRef({disabled:n}),d=c.useRef(!1),g=c.useRef(null),h=c.useRef(null),{disabled:S,updateMeasurementsFor:v,timeout:p}={...eo,...o},y=Pe(v??r),w=c.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),h.current=null},p)},[p]),b=lt({callback:w,disabled:S||!s}),R=c.useCallback((C,T)=>{b&&(T&&(b.unobserve(T),d.current=!1),C&&b.observe(C))},[b]),[D,E]=Ze(R),x=Pe(t);return c.useEffect(()=>{!b||!D.current||(b.disconnect(),d.current=!1,b.observe(D.current))},[D,b]),c.useEffect(()=>(a({type:N.RegisterDroppable,element:{id:r,key:i,disabled:n,node:D,rect:g,data:x}}),()=>a({type:N.UnregisterDroppable,key:i,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(a({type:N.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,a]),{active:s,rect:g,isOver:l?.id===r,node:D,over:l,setNodeRef:E}}function no(e){let{animation:t,children:n}=e;const[r,o]=c.useState(null),[i,s]=c.useState(null),a=Qe(n);return!n&&!r&&a&&o(a),_(()=>{if(!i)return;const l=r?.key,u=r?.props.id;if(l==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),I.createElement(I.Fragment,null,n,r?c.cloneElement(r,{ref:s}):null)}const ro={x:0,y:0,scaleX:1,scaleY:1};function oo(e){let{children:t}=e;return I.createElement(Ye.Provider,{value:mn},I.createElement(ct.Provider,{value:ro},t))}const io={position:"fixed",touchAction:"none"},so=e=>st(e)?"transform 250ms ease":void 0,ao=c.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:a,style:l,transform:u,transition:f=so}=e;if(!a)return null;const d=o?u:{...u,scaleX:1,scaleY:1},g={...io,width:a.width,height:a.height,top:a.top,left:a.left,transform:he.Transform.toString(d),transformOrigin:o&&r?er(r,a):void 0,transition:typeof f=="function"?f(r):f,...l};return I.createElement(n,{className:s,style:g,ref:t},i)}),lo=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&r.node.style.setProperty(a,l);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[l,u]of Object.entries(o))n.node.style.setProperty(l,u);s!=null&&s.active&&n.node.classList.remove(s.active)}},co=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:he.Transform.toString(t)},{transform:he.Transform.toString(n)}]},uo={duration:250,easing:"ease",keyframes:co,sideEffects:lo({styles:{active:{opacity:"0"}}})};function fo(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return it((i,s)=>{if(t===null)return;const a=n.get(i);if(!a)return;const l=a.node.current;if(!l)return;const u=bn(s);if(!u)return;const{transform:f}=j(s).getComputedStyle(s),d=on(f);if(!d)return;const g=typeof t=="function"?t:ho(t);return fn(l,o.draggable.measure),g({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function ho(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...uo,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...u}=i;if(!t)return;const f={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},d={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},g={x:l.x-f.x,y:l.y-f.y,...d},h=o({...u,active:s,dragOverlay:a,transform:{initial:l,final:g}}),[S]=h,v=h[h.length-1];if(JSON.stringify(S)===JSON.stringify(v))return;const p=r?.({active:s,dragOverlay:a,...u}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(w=>{y.onfinish=()=>{p?.(),w()}})}}let qt=0;function go(e){return c.useMemo(()=>{if(e!=null)return qt++,qt},[e])}const Xo=I.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggableNodes:S,droppableContainers:v,dragOverlay:p,over:y,measuringConfiguration:w,scrollableAncestors:b,scrollableAncestorRects:R,windowRect:D}=xn(),E=c.useContext(ct),x=go(d?.id),C=wn(s,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:p.rect,over:y,overlayNodeRect:p.rect,scrollableAncestors:b,scrollableAncestorRects:R,transform:E,windowRect:D}),T=At(g),O=fo({config:r,draggableNodes:S,droppableContainers:v,measuringConfiguration:w}),m=T?p.setRef:void 0;return I.createElement(oo,null,I.createElement(no,{animation:O},d&&x?I.createElement(ao,{key:x,id:d.id,ref:m,as:a,activatorEvent:f,adjustScale:t,className:l,transition:i,rect:T,style:{zIndex:u,...o},transform:C},n):null))});function Cn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function vo(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function qe(e){return e!==null&&e>=0}function po(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function bo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Dn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Cn(t,r,n),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},Ge={scaleX:1,scaleY:1},Yo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:r;if(!a)return null;if(o===n){const u=i[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...Ge}:null}const l=mo(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-l,...Ge}:o<n&&o>=s?{x:0,y:a.height+l,...Ge}:{x:0,y:0,...Ge}};function mo(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const Sn="Sortable",Rn=I.createContext({activeIndex:-1,containerId:Sn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Dn,disabled:{draggable:!1,droppable:!1}});function Wo(e){let{children:t,id:n,items:r,strategy:o=Dn,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:f}=xn(),d=Xe(Sn,n),g=a.rect!==null,h=c.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),S=s!=null,v=s?h.indexOf(s.id):-1,p=u?h.indexOf(u.id):-1,y=c.useRef(h),w=!po(h,y.current),b=p!==-1&&v===-1||w,R=bo(i);_(()=>{w&&S&&f(h)},[w,h,S,f]),c.useEffect(()=>{y.current=h},[h]);const D=c.useMemo(()=>({activeIndex:v,containerId:d,disabled:R,disableTransforms:b,items:h,overIndex:p,useDragOverlay:g,sortedRects:vo(h,l),strategy:o}),[v,d,R.draggable,R.droppable,b,h,p,l,g,o]);return I.createElement(Rn.Provider,{value:D},t)}const yo=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Cn(n,r,o).indexOf(t)},wo=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==i&&o===s?!1:n?!0:s!==o&&t===l},xo={duration:200,easing:"ease"},En="transform",Co=he.Transition.toString({property:En,duration:0,easing:"linear"}),Do={roleDescription:"sortable"};function So(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=c.useState(null),a=c.useRef(n);return _(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const u=De(r.current,{ignoreTransform:!0}),f={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(f.x||f.y)&&s(f)}}n!==a.current&&(a.current=n)},[t,n,r,o]),c.useEffect(()=>{i&&s(null)},[i]),i}function Ko(e){let{animateLayoutChanges:t=wo,attributes:n,disabled:r,data:o,getNewIndex:i=yo,id:s,strategy:a,resizeObserverConfig:l,transition:u=xo}=e;const{items:f,containerId:d,activeIndex:g,disabled:h,disableTransforms:S,sortedRects:v,overIndex:p,useDragOverlay:y,strategy:w}=c.useContext(Rn),b=Ro(r,h),R=f.indexOf(s),D=c.useMemo(()=>({sortable:{containerId:d,index:R,items:f},...o}),[d,o,R,f]),E=c.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:x,node:C,isOver:T,setNodeRef:O}=to({id:s,data:D,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...l}}),{active:m,activatorEvent:H,activeNodeRect:V,attributes:G,setNodeRef:Se,listeners:We,isDragging:$,over:Ke,setActivatorNodeRef:ee,transform:Re}=Zr({id:s,data:D,attributes:{...Do,...n},disabled:b.draggable}),Ue=Fn(O,Se),B=!!m,te=B&&!S&&qe(g)&&qe(p),fe=!y&&$,Ee=fe&&te?Re:null,He=te?Ee??(a??w)({rects:v,activeNodeRect:V,activeIndex:g,overIndex:p,index:R}):null,ie=qe(g)&&qe(p)?i({id:s,items:f,activeIndex:g,overIndex:p}):R,ne=m?.id,M=c.useRef({activeId:ne,items:f,newIndex:ie,containerId:d}),Ae=f!==M.current.items,J=t({active:m,containerId:d,isDragging:$,isSorting:B,id:s,index:R,items:f,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:u,wasDragging:M.current.activeId!=null}),ge=So({disabled:!J,index:R,node:C,rect:x});return c.useEffect(()=>{B&&M.current.newIndex!==ie&&(M.current.newIndex=ie),d!==M.current.containerId&&(M.current.containerId=d),f!==M.current.items&&(M.current.items=f)},[B,ie,d,f]),c.useEffect(()=>{if(ne===M.current.activeId)return;if(ne!=null&&M.current.activeId==null){M.current.activeId=ne;return}const ve=setTimeout(()=>{M.current.activeId=ne},50);return()=>clearTimeout(ve)},[ne]),{active:m,activeIndex:g,attributes:G,data:D,rect:x,index:R,newIndex:ie,items:f,isOver:T,isSorting:B,isDragging:$,listeners:We,node:C,overIndex:p,over:Ke,setNodeRef:Ue,setActivatorNodeRef:ee,setDroppableNodeRef:O,setDraggableNodeRef:Se,transform:ge??He,transition:re()};function re(){if(ge||Ae&&M.current.newIndex===R)return Co;if(!(fe&&!st(H)||!u)&&(B||J))return he.Transition.toString({...u,property:En})}}function Ro(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function rt(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Eo=[A.Down,A.Right,A.Up,A.Left],Uo=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Eo.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];i.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const g=o.get(d.id);if(g)switch(e.code){case A.Down:r.top<g.top&&l.push(d);break;case A.Up:r.top>g.top&&l.push(d);break;case A.Left:r.left>g.left&&l.push(d);break;case A.Right:r.left<g.left&&l.push(d);break}});const u=nr({collisionRect:r,droppableRects:o,droppableContainers:l});let f=nn(u,"id");if(f===s?.id&&u.length>1&&(f=u[1].id),f!=null){const d=i.get(n.id),g=i.get(f),h=g?o.get(g.id):null,S=g?.node.current;if(S&&h&&d&&g){const p=at(S).some((E,x)=>a[x]!==E),y=An(d,g),w=Ao(d,g),b=p||!y?{x:0,y:0}:{x:w?r.width-h.width:0,y:w?r.height-h.height:0},R={x:h.left,y:h.top};return b.x&&b.y?R:je(R,b)}}}};function An(e,t){return!rt(e)||!rt(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ao(e,t){return!rt(e)||!rt(t)||!An(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const To=new Set(["http:","https:","mailto:","tel:","ftp:"]);function Mo(e){if(e.startsWith("/")||e.startsWith(".")||e.startsWith("#"))return!0;try{const t=new URL(e,"https://placeholder.invalid");return To.has(t.protocol)}catch{return!1}}function Oo(e){const t=e.trim();return t?t.startsWith("/")||t.startsWith(".")||t.startsWith("#")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`:""}const Io="noopener noreferrer nofollow";function bt(e){const t=xt.c(8),{active:n,label:r,onClick:o,children:i}=e,s=n?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let a;t[0]!==s?(a=Ct("flex h-7 w-7 items-center justify-center classic:rounded transition-colors cursor-pointer compact:rounded-lg",s),t[0]=s,t[1]=a):a=t[1];let l;return t[2]!==n||t[3]!==i||t[4]!==r||t[5]!==o||t[6]!==a?(l=P.jsx("button",{type:"button","aria-label":r,"aria-pressed":n,onMouseDown:No,onClick:o,className:a,children:i}),t[2]=n,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l):l=t[7],l}function No(e){return e.preventDefault()}function Gt(e){const t=xt.c(7),{active:n,label:r,onSelect:o}=e,i=n?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let s;t[0]!==i?(s=Ct("flex-1 classic:rounded px-2 py-1 text-xs transition-colors cursor-pointer compact:rounded-lg",i),t[0]=i,t[1]=s):s=t[1];let a;return t[2]!==n||t[3]!==r||t[4]!==o||t[5]!==s?(a=P.jsx("button",{type:"button","aria-pressed":n,onMouseDown:ko,onClick:o,className:s,children:r}),t[2]=n,t[3]=r,t[4]=o,t[5]=s,t[6]=a):a=t[6],a}function ko(e){return e.preventDefault()}function Ho(e){const t=xt.c(36),{editor:n,active:r,open:o,onOpenChange:i}=e,s=Pn(),[a,l]=c.useState(""),[u,f]=c.useState(!0),[d,g]=c.useState(!1);let h;t[0]!==r||t[1]!==n||t[2]!==i?(h=()=>{const m=n.getAttributes("link");l(typeof m.href=="string"?m.href:""),f(r?m.target==="_blank":!0),g(!1),i(!0)},t[0]=r,t[1]=n,t[2]=i,t[3]=h):h=t[3];const S=h;let v;t[4]!==n||t[5]!==i?(v=()=>{i(!1),n.chain().focus().run()},t[4]=n,t[5]=i,t[6]=v):v=t[6];const p=v;let y;t[7]!==a||t[8]!==n||t[9]!==u||t[10]!==i?(y=()=>{const m=Oo(a);if(m===""){n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1);return}if(!Mo(m)){g(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:m,target:u?"_blank":null,rel:u?Io:null}).run(),i(!1)},t[7]=a,t[8]=n,t[9]=u,t[10]=i,t[11]=y):y=t[11];const w=y;let b;t[12]!==n||t[13]!==i?(b=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},t[12]=n,t[13]=i,t[14]=b):b=t[14];const R=b;let D;t[15]!==s?(D=s("sectionsEditor.richTextLinkControl.linkButtonLabel"),t[15]=s,t[16]=D):D=t[16];const E=o?p:S;let x;t[17]===Symbol.for("react.memo_cache_sentinel")?(x=P.jsx(Bn,{size:14}),t[17]=x):x=t[17];let C;t[18]!==r||t[19]!==D||t[20]!==E?(C=P.jsx(bt,{active:r,label:D,onClick:E,children:x}),t[18]=r,t[19]=D,t[20]=E,t[21]=C):C=t[21];let T;t[22]!==r||t[23]!==w||t[24]!==p||t[25]!==a||t[26]!==d||t[27]!==u||t[28]!==i||t[29]!==o||t[30]!==R||t[31]!==s?(T=o&&P.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 flex-col gap-1 rounded-md border bg-popover p-1 shadow-md",onBlur:m=>{m.currentTarget.contains(m.relatedTarget)||i(!1)},children:[P.jsxs("div",{className:"flex items-center gap-0.5",children:[P.jsx("input",{autoFocus:!0,type:"text","aria-label":s("sectionsEditor.richTextLinkControl.urlInputAriaLabel"),"aria-invalid":d,placeholder:s("sectionsEditor.richTextLinkControl.urlInputPlaceholder"),value:a,onChange:m=>{l(m.target.value),g(!1)},onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),w()):m.key==="Escape"&&(m.preventDefault(),p())},className:Ct("h-7 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",d&&"text-destructive")}),P.jsx(bt,{active:!1,label:s("sectionsEditor.richTextLinkControl.applyLinkLabel"),onClick:w,children:P.jsx(jn,{size:14})}),r&&P.jsx(bt,{active:!1,label:s("sectionsEditor.richTextLinkControl.removeLinkLabel"),onClick:R,children:P.jsx($n,{size:14})})]}),P.jsxs("div",{className:"flex items-center gap-0.5 rounded bg-muted/40 p-0.5",children:[P.jsx(Gt,{active:!u,label:s("sectionsEditor.richTextLinkControl.sameTabLabel"),onSelect:()=>f(!1)}),P.jsx(Gt,{active:u,label:s("sectionsEditor.richTextLinkControl.newTabLabel"),onSelect:()=>f(!0)})]})]}),t[22]=r,t[23]=w,t[24]=p,t[25]=a,t[26]=d,t[27]=u,t[28]=i,t[29]=o,t[30]=R,t[31]=s,t[32]=T):T=t[32];let O;return t[33]!==C||t[34]!==T?(O=P.jsxs("div",{className:"relative",children:[C,T]}),t[33]=C,t[34]=T,t[35]=O):O=t[35],O}export{he as C,Fo as D,gn as K,vn as P,Ho as R,Wo as S,bt as T,Bo as a,jo as b,$o as c,Xo as d,Cn as e,nr as f,to as g,Mo as i,Oo as n,Dn as r,Uo as s,Ko as u,Yo as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as ie,r as z,a0 as Ue,z as Mt,K as me,m as ze,j as s,l as Z,h as je,B as ce,c as X,ao as Xe,bL as ve,ap as re,bK as Ye,bM as et,Z as at,o as ct,ar as Lt,aq as vt,e as dt,t as ye,q as $e,bS as yt,p as wt,n as ae,R as mt,P as Gt,dW as tt,dX as st,dY as lt,T as kt,an as Ut,ah as Bt,u as ut,fr as ft,fw as Kt,E as Vt,d as Yt,I as Ft,F as zt,H as $t,G as Qt}from"./index-EcuFIS2a.js";import{u as Ht}from"./use-organization-roles-tuKknI1K.js";import{u as Qe}from"./use-org-auth-client-8fDIgHEZ.js";import{g as gt,a as Zt}from"./role-color-Dn2tXDDF.js";import{B as we}from"./badge-C5M6nZd4.js";import{f as Tt,e as ht,A as _t,a as xt,b as pt,c as Et,g as It,d as Rt}from"./alert-dialog-9n2p5SCQ.js";import{i as qt}from"./DotsVertical-CE2o6L6N.js";import{s as Fe}from"./Plus-BSp00qOC.js";import{s as Jt}from"./Trash01-DtE0n00a.js";import{C as Wt}from"./collection-table-wrapper-cBr_X4Jo.js";import{E as ot}from"./empty-state-Y08kvU5o.js";import{S as He}from"./search-input-BHVk6m6A.js";import{P as St,D as At}from"./ai-providers-logos-DD3qZ33J.js";import{I as Ze}from"./integration-icon-D3FHJbYu.js";import{u as Xt}from"./use-infinite-scroll-D0T36z_V.js";import{C as Be}from"./checkbox-iGlb02v9.js";import{i as es}from"./ArrowLeft-8rouBEwC.js";import{u as ts}from"./useSuspenseInfiniteQuery-D9iG0Y5m.js";import{u as ss}from"./use-mcp-client-B_gcvvCy.js";import{C as ls}from"./collection-search-DM8MkJfo.js";import{p as os}from"./connection-DStV2sLP.js";import{a as Nt}from"./use-members-C6brpkJ1.js";import{g as Ot}from"./get-initials-D-f_fDFw.js";import{u as ns}from"./use-connection-BKZRi94S.js";import{e as is}from"./use-virtual-mcp-Ji9vcgUj.js";import{u as rs,g as as}from"./use-ai-providers-D-abiIwe.js";import{A as Ct}from"./avatar-BzRNaDEk.js";import{S as ue}from"./switch-BIfmgDHS.js";import{b as Pe,c as De,T as Me,a as Le}from"./tooltip-nr5oS_bm.js";import{P as cs}from"./project-icon-D_oHwik9.js";import{s as ds}from"./use-project-scope-CCxyXvEU.js";import{t as ms}from"./Globe04-GFiRExL0.js";import{t as us}from"./ChevronUp-fg9sod-H.js";import{i as fs}from"./Share07-CZ7JzYs9.js";import{i as nt}from"./X-BtMi8Qau.js";import{k as gs}from"./agent-icon-CTsmTxHg.js";import{A as Ts}from"./access-gate-C9Dl5e5c.js";import"./table-CEVOOGGz.js";import"./ArrowUp-BtksDHBQ.js";import"./SearchMd-Bb5gjLcX.js";import"./Tool02-CvlAGFBM.js";import"./infiniteQueryObserver-3RxH1tr-.js";import"./auth-BBW3DF0r.js";import"./User01-DHd46PZp.js";import"./index-Exw_Yjch.js";import"./github-repo-BknN0SVI.js";import"./AlertCircle-2L7lI8NL.js";import"./Tool01-Dwy1nlT9.js";import"./ArrowRight-DCA5zjxW.js";import"./TrendUp01-BCriuXJd.js";import"./ZoomOut-DUFJq3-K.js";import"./CheckCircle-BmVuh1xp.js";import"./UserSquare-CcF49LHs.js";import"./Copy01-BgwuTJFm.js";import"./CreditCard01-CIt471eG.js";import"./Download01-DNhEQzg0.js";import"./Settings02-D9Qv7BDm.js";import"./Eye-Dq6Vw6FI.js";import"./Globe01-g_y8gAs1.js";import"./XClose-CvcHLHe2.js";import"./Image01-QB6twEDu.js";import"./Key01-CO_i2QPb.js";import"./LayoutLeft-BfySK4h8.js";import"./Link01-BIFMl_M0.js";import"./LinkExternal01-DQD59o7F.js";import"./Monitor01-Ddm2yOG6.js";import"./Sun-DLRcOzSd.js";import"./Package-CvzEol5_.js";import"./Palette-DT856bn6.js";import"./Play-wYDcJhBq.js";import"./SearchLg-DFD1t2UL.js";import"./Stars01-D-wYuyik.js";import"./Upload01-Ba-RLxE1.js";import"./Users01-B8gdz27Y.js";import"./XCircle-BLCHBIhx.js";import"./Zap-DZAIluO6.js";import"./capability-load-error-BVb3VEU2.js";const qe="basic-usage",Je=[{id:qe,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","ORGANIZATION_BILLING_PLAN_PRICES","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","REPOSITORY_SEARCH_BRANCHES","GIT_PROVIDER_CAPABILITIES","GIT_ACCOUNT_LIST","REPOSITORY_LIST","REPOSITORY_SEARCH","CHANGE_REQUEST_STATE","CHANGE_REQUEST_LAST_MERGED","CHANGE_REQUEST_LIST_OPEN","CHANGE_REQUEST_CHECK_LOG","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","ORGANIZATION_HAS_SITE","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_AUTOMATION_LIST","TASK_BOARD_AUTOMATION_UPSERT","TASK_BOARD_AUTOMATION_DELETE","TASK_BOARD_PROMPT_LIST","TASK_BOARD_PROMPT_UPSERT","TASK_BOARD_PROMPT_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_PREVIEW_PROBE","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE","TASK_BOARD_ADMIN_ORG_LIST","TASK_BOARD_DELIVERY","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_QUALITY","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS","NOTIFICATION_LIST","NOTIFICATION_MARK_READ","NOTIFICATION_SUBSCRIPTION_SET","NOTIFICATION_SUBSCRIPTION_LIST"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_AUTOMATION_LIST","JIRA_AUTOMATION_UPSERT","JIRA_AUTOMATION_DELETE","JIRA_RUN_START"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","REPORTS_SETUP","REPORTS_RUN","REPORTS_BIND","REPORTS_CONNECTION_STATUS","REPORTS_SET_REPOSITORY"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","AI_PLAN_SET","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Je.find(t=>t.id===qe)?.tools??[]];const hs=["agents:manage","connections:manage"];new Set(Je.filter(t=>hs.includes(t.id)).flatMap(t=>t.tools));function _s(){const t=new Map;for(const e of Je){if(e.id===qe)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function xs(t,e,l){return l?!0:t.tools.every(n=>e.includes(n))}function ps(t,e,l){if(l){const i=new Set(e);for(const a of t.tools)i.add(a);return Array.from(i)}const n=new Set(e);for(const i of t.tools)n.delete(i);return Array.from(n)}const We="projects",it="*";function Es(t){if(!t)return null;const e=t[We];return Array.isArray(e)?e:null}function Is(t){const e=X.c(21),{connection:l,isSelected:n,hasToolsEnabled:i,activeToolsCount:a,totalToolsCount:o,onSelect:T,onToggle:m}=t,r=n?"bg-accent/50":"hover:bg-muted/50";let h;e[0]!==r?(h=Z("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",r),e[0]=r,e[1]=h):h=e[1];let d;e[2]!==l.icon||e[3]!==l.title?(d=s.jsx(Ze,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=d):d=e[4];let _;e[5]!==l.title?(_=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=_):_=e[6];let g;e[7]!==T||e[8]!==d||e[9]!==_?(g=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:T,children:[d,_]}),e[7]=T,e[8]=d,e[9]=_,e[10]=g):g=e[10];let f;e[11]!==a||e[12]!==l.tools||e[13]!==i||e[14]!==m||e[15]!==o?(f=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[a,"/",o]}),s.jsx(Be,{checked:i,onCheckedChange:m,onClick:Rs})]}),e[11]=a,e[12]=l.tools,e[13]=i,e[14]=m,e[15]=o,e[16]=f):f=e[16];let u;return e[17]!==h||e[18]!==g||e[19]!==f?(u=s.jsxs("div",{className:h,children:[g,f]}),e[17]=h,e[18]=g,e[19]=f,e[20]=u):u=e[20],u}function Rs(t){return t.stopPropagation()}function Ss(t){const e=X.c(18),{connectionId:l,tool:n,isSelected:i,onToggle:a}=t,o=`tool-${l}-${n.name}`,T=i?"text-foreground":"text-muted-foreground";let m;e[0]!==T?(m=Z("text-sm font-medium",T),e[0]=T,e[1]=m):m=e[1];let r;e[2]!==m||e[3]!==n.name?(r=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:m,children:n.name})}),e[2]=m,e[3]=n.name,e[4]=r):r=e[4];let h;e[5]!==n.description?(h=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:n.description}),e[5]=n.description,e[6]=h):h=e[6];let d;e[7]!==r||e[8]!==h?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[r,h]}),e[7]=r,e[8]=h,e[9]=d):d=e[9];const _=`tool-${l}-${n.name}`;let g;e[10]!==i||e[11]!==a||e[12]!==_?(g=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Be,{id:_,checked:i,onCheckedChange:a,onClick:As})}),e[10]=i,e[11]=a,e[12]=_,e[13]=g):g=e[13];let f;return e[14]!==o||e[15]!==d||e[16]!==g?(f=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:o,children:[d,g]}),e[14]=o,e[15]=d,e[16]=g,e[17]=f):f=e[17],f}function As(t){return t.stopPropagation()}function Ns({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:n}){const i=ie(),[a,o]=z.useState(""),T=n!==void 0?n:a,m=z.useDeferredValue(T),[r,h]=z.useState("all"),[d,_]=z.useState(!1),g=z.useRef(new Set(Object.keys(t))),{org:f}=Ue(),u=ss({connectionId:Mt,orgId:f.id,orgSlug:f.slug}),x=100,A=m.trim(),E=A?{operator:"or",conditions:[{field:["title"],operator:"contains",value:A},{field:["description"],operator:"contains",value:A}]}:void 0,b=!!l,N={...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:x,offset:0,...b&&{include_virtual:!0}},P=JSON.stringify(N),{data:j,fetchNextPage:O,hasNextPage:D,isFetchingNextPage:I}=ts({queryKey:me.collectionListInfinite(u,f.id,"","CONNECTIONS",P),queryFn:async({pageParam:R=0})=>(await u.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:x,offset:R,...b&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(R,w)=>{if(R?.hasMore)return w.reduce((H,J)=>H+(J?.items?.length??0),0)},staleTime:3e4}),C=j?.pages.flatMap(R=>R?.items??[])??[],S=Xt(O,D??!1,I),p=l?C.filter(R=>R.connection_type!=="VIRTUAL"?!0:os(R.connection_url)!==l):C,c=g.current,G=[...c.values()].map(R=>p.find(w=>w.id===R)).filter(R=>R!==void 0),y=p.filter(R=>!c.has(R.id)),V=[...G,...y],F=R=>{const w=t[R];return w!==void 0&&w.length>0},K=V.filter(R=>{if(r==="all")return!0;const w=F(R.id);return r==="selected"?w:r==="unselected"?!w:!0}),[k,U]=z.useState(V[0]?.id??null),B=k?V.find(R=>R.id===k)??null:null,{data:$,isFetching:L}=ze({queryKey:me.collectionItem(u,f.id,"","CONNECTIONS",k??""),queryFn:async()=>k?(await u.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:k}})).structuredContent?.item??null:null,enabled:!!k,staleTime:3e4}),Y=$?.tools??[],W=(R,w)=>t[R]?.includes(w)??!1,le=(R,w)=>{const H=t[R]??[],J=H.includes(w),ne={...t};if(J){const se=H.filter(oe=>oe!==w);se.length===0?delete ne[R]:ne[R]=se}else ne[R]=[...H,w];e(ne)},te=R=>{const w=R===k?Y:[];if(!w.length)return;const H=t[R]??[],J=w.map(oe=>oe.name),ne=H.length>0&&J.every(oe=>H.includes(oe)),se={...t};ne?delete se[R]:(se[R]=J,U(R)),e(se)},Q=R=>{U(R),_(!0)},q=()=>{_(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:Z("w-full md:w-80 border-r border-border flex flex-col",d&&"hidden md:flex"),children:[n===void 0&&s.jsx(ls,{value:a,onChange:o,placeholder:i("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>h("all"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>h("selected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>h("unselected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:K.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:i(T?"common.toolSetSelector.noConnectionsFound":r==="selected"?"common.toolSetSelector.noServersSelected":r==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[K.map(R=>{const w=k===R.id,H=w?Y.length:0,J=t[R.id]?.length??0;return s.jsx(Is,{connection:{...R,tools:w?Y:R.tools},isSelected:w,hasToolsEnabled:F(R.id),activeToolsCount:J,totalToolsCount:H,onSelect:()=>Q(R.id),onToggle:()=>te(R.id)},R.id)}),s.jsx("div",{ref:S,className:"h-4"}),I&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(je,{className:"size-4.5 text-muted-foreground"})})]})})]}),s.jsx("div",{className:Z("flex-1 flex-col",d?"flex":"hidden md:flex"),children:B?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ce,{variant:"ghost",size:"sm",onClick:q,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(es,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Ze,{icon:B.icon,name:B.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:B.title}),B.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:B.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:L?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(je,{className:"size-4.5 text-muted-foreground"})}):Y.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:Y.map(R=>s.jsx(Ss,{connectionId:B.id,tool:R,isSelected:W(B.id,R.name),onToggle:()=>le(B.id,R.name)},R.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:i("common.toolSetSelector.selectConnection")})})})]})}const Os=Xe({role:Xe({id:re().optional(),slug:re().optional(),label:re()}),allowAllStaticPermissions:Ye(),staticPermissions:ve(re()),toolSet:et(re(),ve(re())),allowAllModels:Ye(),modelSet:et(re(),ve(re())),allowAllProjects:Ye(),projectSet:ve(re()),memberIds:ve(re())});function rt(t,e,l,n){const i=s.jsx(ue,{checked:e,disabled:l,onCheckedChange:n});return l?s.jsx(Pe,{children:s.jsxs(De,{children:[s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(Le,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function Cs(t){const e=X.c(41),{allowAllStaticPermissions:l,staticPermissions:n,onAllowAllChange:i,onPermissionsChange:a,readOnly:o,searchQuery:T}=t,m=o===void 0?!1:o,r=ie();let h;e[0]!==T?(h=T.trim().toLowerCase(),e[0]=T,e[1]=h):h=e[1];const d=z.useDeferredValue(h);let _;if(e[2]!==l||e[3]!==d||e[4]!==i||e[5]!==a||e[6]!==m||e[7]!==T||e[8]!==n||e[9]!==r){const g=_s(),f=(I,C)=>{if(!m){if(l&&C){const S=g.flatMap(Ps).flatMap(js);i(!1),a(S.filter(p=>!I.tools.includes(p)));return}l||a(ps(I,n,!C))}};let u;e[11]!==d?(u=I=>{const{section:C,capabilities:S}=I;return{section:C,capabilities:S.filter(p=>!d||p.label.toLowerCase().includes(d)||p.description.toLowerCase().includes(d))}},e[11]=d,e[12]=u):u=e[12];const x=g.map(u).filter(bs);let A;e[13]!==r?(A=r("settings.orgRoleDetail.general"),e[13]=r,e[14]=A):A=e[14];let E;e[15]!==r?(E=r("settings.orgRoleDetail.allOrgPermissions"),e[15]=r,e[16]=E):E=e[16];let b;e[17]!==r?(b=r("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=r,e[18]=b):b=e[18];let N;e[19]!==l||e[20]!==i||e[21]!==a?(N=()=>{i(!l),a([])},e[19]=l,e[20]=i,e[21]=a,e[22]=N):N=e[22];let P;e[23]!==l||e[24]!==m||e[25]!==r||e[26]!==N?(P=rt(r,l,m,N),e[23]=l,e[24]=m,e[25]=r,e[26]=N,e[27]=P):P=e[27];let j;e[28]!==l||e[29]!==i||e[30]!==a||e[31]!==m?(j=m?void 0:()=>{i(!l),a([])},e[28]=l,e[29]=i,e[30]=a,e[31]=m,e[32]=j):j=e[32];let O;e[33]!==j||e[34]!==E||e[35]!==b||e[36]!==P?(O=s.jsx(st,{children:s.jsx(lt,{title:E,description:b,action:P,onClick:j})}),e[33]=j,e[34]=E,e[35]=b,e[36]=P,e[37]=O):O=e[37];let D;e[38]!==O||e[39]!==A?(D=s.jsx(tt,{title:A,children:O}),e[38]=O,e[39]=A,e[40]=D):D=e[40],_=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,x.length===0&&d?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:r("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:T})}):x.map(I=>{const{section:C,capabilities:S}=I;return s.jsx(tt,{title:C,children:s.jsx(st,{children:S.map(p=>{const c=xs(p,n,l);return s.jsx(lt,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(kt,{size:12,className:"text-warning shrink-0"})]}),description:p.description,action:rt(r,c,m,()=>f(p,c)),onClick:m?void 0:()=>f(p,c)},p.id)})})},C)})]})}),e[2]=l,e[3]=d,e[4]=i,e[5]=a,e[6]=m,e[7]=T,e[8]=n,e[9]=r,e[10]=_}else _=e[10];return _}function bs(t){return t.capabilities.length>0}function js(t){return t.tools}function Ps(t){return t.capabilities}const bt={anthropic:"Anthropic",openrouter:"OpenRouter"},Ds={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function Ms(t,e){const l=t.indexOf("/"),n=l>0?t.slice(0,l):e;return n.startsWith("~")?n.slice(1):n}function Ls(t){return Ds[t]??bt[t]??t}function vs(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const jt=30;function ys(t){const e=X.c(40),{connectionId:l,subProviderId:n,subProviderName:i,groupLogo:a,models:o,allConnectionModelIds:T,selectedModels:m,allowAllModels:r,allConnectionModelsSelected:h,onToggleModel:d,onExitAllowAll:_,readOnly:g,defaultExpanded:f}=t,u=ie(),[x,A]=z.useState(f),E=f||x,b=A,[N,P]=z.useState(jt);let j;e[0]!==h||e[1]!==r||e[2]!==m?(j=I=>r||h||m.includes("*")||m.includes(I),e[0]=h,e[1]=r,e[2]=m,e[3]=j):j=e[3];const O=j;let D;if(e[4]!==T||e[5]!==r||e[6]!==l||e[7]!==E||e[8]!==a||e[9]!==O||e[10]!==o||e[11]!==_||e[12]!==d||e[13]!==g||e[14]!==n||e[15]!==i||e[16]!==u||e[17]!==N){let I;e[19]!==O?(I=L=>O(L.id),e[19]=O,e[20]=I):I=e[20];const C=o.filter(I).length,S=o.slice(0,N),p=o.length>N;let c;e[21]===Symbol.for("react.memo_cache_sentinel")?(c=()=>b(Us),e[21]=c):c=e[21];const G=a??St[n]??At;let y;e[22]!==i||e[23]!==G?(y=s.jsx(Ze,{icon:G,name:i,size:"sm"}),e[22]=i,e[23]=G,e[24]=y):y=e[24];let V;e[25]!==i?(V=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[25]=i,e[26]=V):V=e[26];let F;e[27]!==y||e[28]!==V?(F=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[y,V]}),e[27]=y,e[28]=V,e[29]=F):F=e[29];const K=u("settings.orgRoleDetail.enabledCount",{enabledCount:C,total:o.length});let k;e[30]!==K?(k=s.jsx(we,{variant:"secondary",className:"text-xs text-muted-foreground",children:K}),e[30]=K,e[31]=k):k=e[31];let U;e[32]!==E?(U=E?s.jsx(us,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Ut,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=E,e[33]=U):U=e[33];let B;e[34]!==k||e[35]!==U?(B=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[k,U]}),e[34]=k,e[35]=U,e[36]=B):B=e[36];let $;e[37]!==B||e[38]!==F?($=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:c,children:[F,B]}),e[37]=B,e[38]=F,e[39]=$):$=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[$,E&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[S.map(L=>{const Y=O(L.id),W=()=>{if(!g){if(r){_(l,T,L.id);return}d(l,L.id)}};return s.jsxs("div",{className:Z("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!g&&"hover:bg-muted/50 cursor-pointer"),onClick:W,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:ks,children:g?s.jsx(Pe,{children:s.jsxs(De,{children:[s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:s.jsx(ue,{checked:Y,disabled:!0,onCheckedChange:Gs})})}),s.jsx(Le,{children:s.jsx("p",{children:u("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ue,{checked:Y,onCheckedChange:W})})]},L.id)}),p&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>P(ws),children:u("settings.orgRoleDetail.showMore",{remaining:o.length-N})})]})]}),e[4]=T,e[5]=r,e[6]=l,e[7]=E,e[8]=a,e[9]=O,e[10]=o,e[11]=_,e[12]=d,e[13]=g,e[14]=n,e[15]=i,e[16]=u,e[17]=N,e[18]=D}else D=e[18];return D}function ws(t){return t+jt}function Gs(){}function ks(t){return t.stopPropagation()}function Us(t){return!t}function Bs(t){const e=X.c(33),{connection:l,selectedModels:n,allowAllModels:i,onToggleModel:a,onExitAllowAll:o,allConnectionModelsSelected:T,searchQuery:m,readOnly:r}=t,h=as(l.id);let d,_,g,f,u;if(e[0]!==T||e[1]!==i||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==o||e[6]!==a||e[7]!==h||e[8]!==r||e[9]!==m||e[10]!==n){u=Symbol.for("react.early_return_sentinel");e:{let E;e[16]!==l.label?(E=c=>({...c,id:c.modelId,provider:l.label}),e[16]=l.label,e[17]=E):E=e[17];const b=h.filter(Fs).map(E),N=m.trim().toLowerCase(),P=N?b.filter(c=>c.title.toLowerCase().includes(N)||c.id.toLowerCase().includes(N)||c.provider?.toLowerCase().includes(N)):b;if(P.length===0){u=null;break e}const j=new Map;for(const c of P){const G=Ms(c.id,l.providerId),y=j.get(G)??{models:[],logo:null};y.models.push({id:c.id,title:vs(c.title),logo:c.logo}),!y.logo&&c.logo&&(y.logo=c.logo),j.set(G,y)}const O=Array.from(j.entries()).map(Ys).sort(Vs),D=O.length===1||N.length>0;g="flex flex-col gap-3";const I=St[l.providerId]??At;let C;e[18]!==l.providerId||e[19]!==I?(C=s.jsx("img",{src:I,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=I,e[20]=C):C=e[20];const S=bt[l.providerId]??l.providerId;let p;e[21]!==S?(p=s.jsx("h4",{className:"text-sm font-medium",children:S}),e[21]=S,e[22]=p):p=e[22],e[23]!==p||e[24]!==C?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[C,p]}),e[23]=p,e[24]=C,e[25]=f):f=e[25],d="flex flex-col gap-3",_=O.map(c=>s.jsx(ys,{connectionId:l.id,subProviderId:c.id,subProviderName:c.name,groupLogo:c.logo,models:c.models,allConnectionModelIds:b.map(Ks),selectedModels:n,allowAllModels:i,allConnectionModelsSelected:T,onToggleModel:a,onExitAllowAll:o,readOnly:r,defaultExpanded:D},c.id))}e[0]=T,e[1]=i,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=o,e[6]=a,e[7]=h,e[8]=r,e[9]=m,e[10]=n,e[11]=d,e[12]=_,e[13]=g,e[14]=f,e[15]=u}else d=e[11],_=e[12],g=e[13],f=e[14],u=e[15];if(u!==Symbol.for("react.early_return_sentinel"))return u;let x;e[26]!==d||e[27]!==_?(x=s.jsx("div",{className:d,children:_}),e[26]=d,e[27]=_,e[28]=x):x=e[28];let A;return e[29]!==g||e[30]!==f||e[31]!==x?(A=s.jsxs("div",{className:g,children:[f,x]}),e[29]=g,e[30]=f,e[31]=x,e[32]=A):A=e[32],A}function Ks(t){return t.id}function Vs(t,e){return t.name.localeCompare(e.name)}function Ys(t){const[e,l]=t;return{id:e,name:Ls(e),logo:l.logo,models:l.models}}function Fs(t,e,l){return l.findIndex(n=>n.modelId===t.modelId)===e}function zs(t){const e=X.c(41),{allowAllModels:l,modelSet:n,onAllowAllChange:i,onModelSetChange:a,readOnly:o,searchQuery:T}=t,m=o===void 0?!1:o,r=ie(),h=z.useDeferredValue(T),d=rs();let _;e[0]!==n||e[1]!==a?(_=(I,C)=>{const S=n[I]??[],p={...n};if(S.includes(C)){const c=S.filter(G=>G!==C);c.length===0?delete p[I]:p[I]=c}else p[I]=[...S,C];a(p)},e[0]=n,e[1]=a,e[2]=_):_=e[2];const g=_;let f;e[3]!==n||e[4]!==i||e[5]!==a?(f=(I,C,S)=>{i(!1),a({...n,[I]:C.filter(p=>p!==S)})},e[3]=n,e[4]=i,e[5]=a,e[6]=f):f=e[6];const u=f,x=!m&&"hover:bg-muted/50 cursor-pointer";let A;e[7]!==x?(A=Z("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",x),e[7]=x,e[8]=A):A=e[8];let E;e[9]!==l||e[10]!==i||e[11]!==a||e[12]!==m?(E=()=>{if(m)return;const I=!l;i(I),I&&a({})},e[9]=l,e[10]=i,e[11]=a,e[12]=m,e[13]=E):E=e[13];let b;e[14]!==r?(b=r("settings.orgRoleDetail.allModels"),e[14]=r,e[15]=b):b=e[15];let N;e[16]!==b?(N=s.jsx("span",{className:"text-sm font-medium",children:b}),e[16]=b,e[17]=N):N=e[17];let P;e[18]!==l||e[19]!==i||e[20]!==a||e[21]!==m||e[22]!==r?(P=s.jsx("div",{onClick:Qs,children:m?s.jsx(Pe,{children:s.jsxs(De,{children:[s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:s.jsx(ue,{checked:l,disabled:!0,onCheckedChange:$s})})}),s.jsx(Le,{children:s.jsx("p",{children:r("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ue,{checked:l,onCheckedChange:I=>{i(I),I&&a({})}})}),e[18]=l,e[19]=i,e[20]=a,e[21]=m,e[22]=r,e[23]=P):P=e[23];let j;e[24]!==A||e[25]!==E||e[26]!==N||e[27]!==P?(j=s.jsxs("div",{className:A,onClick:E,children:[N,P]}),e[24]=A,e[25]=E,e[26]=N,e[27]=P,e[28]=j):j=e[28];let O;e[29]!==d||e[30]!==l||e[31]!==h||e[32]!==u||e[33]!==n||e[34]!==m||e[35]!==r||e[36]!==g?(O=d.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:r("settings.orgRoleDetail.noLlmConnectionsConfigured")}):d.map(I=>s.jsx(z.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),r("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Bs,{connection:I,selectedModels:n[I.id]??[],allowAllModels:l,onToggleModel:g,onExitAllowAll:u,allConnectionModelsSelected:(n[I.id]??[]).includes("*"),searchQuery:h,readOnly:m})},I.id)),e[29]=d,e[30]=l,e[31]=h,e[32]=u,e[33]=n,e[34]=m,e[35]=r,e[36]=g,e[37]=O):O=e[37];let D;return e[38]!==j||e[39]!==O?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[j,O]}),e[38]=j,e[39]=O,e[40]=D):D=e[40],D}function $s(){}function Qs(t){return t.stopPropagation()}function Hs(t){const e=X.c(39),{allowAllProjects:l,projectSet:n,onAllowAllChange:i,onProjectSetChange:a,readOnly:o,searchQuery:T}=t,m=o===void 0?!1:o,r=ie(),h=z.useDeferredValue(T),d=is();let _;if(e[0]!==l||e[1]!==h||e[2]!==i||e[3]!==a||e[4]!==n||e[5]!==m||e[6]!==T||e[7]!==r||e[8]!==d){const g=ds(d),f=h.trim().toLowerCase(),u=f?g.filter(S=>S.title.toLowerCase().includes(f)):g,x=S=>{if(l){i(!1),a(g.map(Js).filter(p=>p!==S));return}n.includes(S)?a(n.filter(p=>p!==S)):a([...n,S])},A=!m&&"hover:bg-muted/50 cursor-pointer";let E;e[10]!==A?(E=Z("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",A),e[10]=A,e[11]=E):E=e[11];let b;e[12]!==l||e[13]!==i||e[14]!==a||e[15]!==m?(b=()=>{if(m)return;const S=!l;i(S),S&&a([])},e[12]=l,e[13]=i,e[14]=a,e[15]=m,e[16]=b):b=e[16];let N;e[17]!==r?(N=r("settings.orgRoleDetail.allProjects"),e[17]=r,e[18]=N):N=e[18];let P;e[19]!==N?(P=s.jsx("span",{className:"text-sm font-medium",children:N}),e[19]=N,e[20]=P):P=e[20];let j;e[21]!==r?(j=r("settings.orgRoleDetail.allProjectsDescription"),e[21]=r,e[22]=j):j=e[22];let O;e[23]!==j?(O=s.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[23]=j,e[24]=O):O=e[24];let D;e[25]!==P||e[26]!==O?(D=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[P,O]}),e[25]=P,e[26]=O,e[27]=D):D=e[27];let I;e[28]!==l||e[29]!==i||e[30]!==a||e[31]!==m||e[32]!==r?(I=s.jsx("div",{onClick:qs,children:m?s.jsx(Pe,{children:s.jsxs(De,{children:[s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:s.jsx(ue,{checked:l,disabled:!0,onCheckedChange:Zs})})}),s.jsx(Le,{children:s.jsx("p",{children:r("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ue,{checked:l,onCheckedChange:S=>{i(S),S&&a([])}})}),e[28]=l,e[29]=i,e[30]=a,e[31]=m,e[32]=r,e[33]=I):I=e[33];let C;e[34]!==D||e[35]!==I||e[36]!==E||e[37]!==b?(C=s.jsxs("div",{className:E,onClick:b,children:[D,I]}),e[34]=D,e[35]=I,e[36]=E,e[37]=b,e[38]=C):C=e[38],_=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 p-4",children:[C,g.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:r("settings.orgRoleDetail.noProjectsAvailable")}):u.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:r("settings.orgRoleDetail.noProjectsMatch",{searchQuery:T})}):s.jsx("div",{className:"flex flex-col gap-1",children:u.map(S=>{const p=l||n.includes(S.id);return s.jsxs("label",{className:Z("flex items-center gap-3 px-3 py-2 rounded-lg border border-transparent",m?"cursor-default":"hover:bg-muted/50 cursor-pointer"),children:[s.jsx(Be,{checked:p,disabled:m,onCheckedChange:()=>{m||x(S.id)}}),s.jsx(cs,{icon:S.icon,name:S.title}),s.jsx("span",{className:"text-sm truncate",children:S.title})]},S.id)})})]}),e[0]=l,e[1]=h,e[2]=i,e[3]=a,e[4]=n,e[5]=m,e[6]=T,e[7]=r,e[8]=d,e[9]=_}else _=e[9];return _}function Zs(){}function qs(t){return t.stopPropagation()}function Js(t){return t.id}function Ws(t){const e=X.c(75),{open:l,onOpenChange:n,selectedMemberIds:i,onAddMembers:a}=t,o=ie(),[T,m]=z.useState(""),r=z.useDeferredValue(T);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[0]=h):h=e[0];const[d,_]=z.useState(h),{data:g}=Nt();let f,u,x,A,E,b,N,P,j,O,D;if(e[1]!==g?.data?.members||e[2]!==r||e[3]!==a||e[4]!==n||e[5]!==l||e[6]!==d||e[7]!==T||e[8]!==i||e[9]!==o){const k=g?.data?.members??[];let U;e[21]!==r?(U=Q=>{const q=r.toLowerCase();return Q.user?.name?.toLowerCase().includes(q)||Q.user?.email?.toLowerCase().includes(q)},e[21]=r,e[22]=U):U=e[22];const B=k.filter(U);let $;e[23]!==a||e[24]!==n||e[25]!==d?($=()=>{a(d),_([]),n(!1)},e[23]=a,e[24]=n,e[25]=d,e[26]=$):$=e[26],x=$,u=Tt,O=l,D=n,f=ht,P="sm:max-w-md p-0";let L;e[27]!==o?(L=o("settings.orgRoleDetail.addMembersToRole"),e[27]=o,e[28]=L):L=e[28];let Y;e[29]!==L?(Y=s.jsx(_t,{children:L}),e[29]=L,e[30]=Y):Y=e[30];let W;e[31]!==o?(W=o("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=o,e[32]=W):W=e[32];let le;e[33]!==W?(le=s.jsx(xt,{children:W}),e[33]=W,e[34]=le):le=e[34],e[35]!==Y||e[36]!==le?(j=s.jsxs(pt,{className:"px-6 pt-6",children:[Y,le]}),e[35]=Y,e[36]=le,e[37]=j):j=e[37],b="flex flex-col h-80";let te;e[38]!==o?(te=o("settings.orgRoleDetail.searchMembers"),e[38]=o,e[39]=te):te=e[39],e[40]!==T||e[41]!==te?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(He,{value:T,onChange:m,placeholder:te,className:"w-full"})}),e[40]=T,e[41]=te,e[42]=N):N=e[42],A="flex-1 overflow-auto",E=B.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:o(T?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:B.map(Q=>{const q=Q.role!=="owner",R=i.includes(Q.id),w=d.includes(Q.id);return s.jsxs("label",{className:Z("flex items-center gap-3 p-2 rounded-lg",!q||R?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Be,{checked:w||R,onCheckedChange:()=>{!q||R||_(H=>H.includes(Q.id)?H.filter(J=>J!==Q.id):[...H,Q.id])},disabled:!q||R}),s.jsx(Ct,{url:Q.user?.image??void 0,fallback:Ot(Q.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:Q.user?.name||o("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:Q.user?.email})]}),!q&&s.jsx(we,{variant:"secondary",className:"shrink-0",children:o("settings.orgRoleDetail.owner")}),R&&q&&s.jsx(we,{variant:"outline",className:"shrink-0",children:o("settings.orgRoleDetail.added")})]},Q.id)})}),e[1]=g?.data?.members,e[2]=r,e[3]=a,e[4]=n,e[5]=l,e[6]=d,e[7]=T,e[8]=i,e[9]=o,e[10]=f,e[11]=u,e[12]=x,e[13]=A,e[14]=E,e[15]=b,e[16]=N,e[17]=P,e[18]=j,e[19]=O,e[20]=D}else f=e[10],u=e[11],x=e[12],A=e[13],E=e[14],b=e[15],N=e[16],P=e[17],j=e[18],O=e[19],D=e[20];let I;e[43]!==A||e[44]!==E?(I=s.jsx("div",{className:A,children:E}),e[43]=A,e[44]=E,e[45]=I):I=e[45];let C;e[46]!==I||e[47]!==b||e[48]!==N?(C=s.jsxs("div",{className:b,children:[N,I]}),e[46]=I,e[47]=b,e[48]=N,e[49]=C):C=e[49];let S;e[50]!==o?(S=o("settings.orgRoleDetail.cancel"),e[50]=o,e[51]=S):S=e[51];let p;e[52]!==S?(p=s.jsx(Et,{children:S}),e[52]=S,e[53]=p):p=e[53];const c=d.length===0;let G;e[54]!==d.length||e[55]!==o?(G=o("settings.orgRoleDetail.addWithCount",{count:d.length}),e[54]=d.length,e[55]=o,e[56]=G):G=e[56];let y;e[57]!==x||e[58]!==c||e[59]!==G?(y=s.jsx(It,{onClick:x,disabled:c,children:G}),e[57]=x,e[58]=c,e[59]=G,e[60]=y):y=e[60];let V;e[61]!==p||e[62]!==y?(V=s.jsxs(Rt,{className:"px-6 pb-6",children:[p,y]}),e[61]=p,e[62]=y,e[63]=V):V=e[63];let F;e[64]!==f||e[65]!==C||e[66]!==V||e[67]!==P||e[68]!==j?(F=s.jsxs(f,{className:P,children:[j,C,V]}),e[64]=f,e[65]=C,e[66]=V,e[67]=P,e[68]=j,e[69]=F):F=e[69];let K;return e[70]!==u||e[71]!==F||e[72]!==O||e[73]!==D?(K=s.jsx(u,{open:O,onOpenChange:D,children:F}),e[70]=u,e[71]=F,e[72]=O,e[73]=D,e[74]=K):K=e[74],K}function Xs(t){const e=X.c(33),{memberIds:l,onMemberIdsChange:n,readOnly:i,readOnlyMessage:a,searchQuery:o,addMemberDialogOpen:T,onAddMemberDialogOpenChange:m}=t,r=i===void 0?!1:i,h=a===void 0?void 0:a,d=ie(),_=z.useDeferredValue(o),{data:g}=Nt();let f,u,x;if(e[0]!==g?.data?.members||e[1]!==_||e[2]!==l||e[3]!==n||e[4]!==r||e[5]!==h||e[6]!==o||e[7]!==d){const P=g?.data?.members??[];let j;e[11]!==l?(j=p=>l.includes(p.id),e[11]=l,e[12]=j):j=e[12];const O=P.filter(j);let D;e[13]!==_?(D=p=>{const c=_.toLowerCase();return p.user?.name?.toLowerCase().includes(c)||p.user?.email?.toLowerCase().includes(c)},e[13]=_,e[14]=D):D=e[14];const I=O.filter(D);let C;e[15]!==h||e[16]!==d?(C=h??d("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=h,e[16]=d,e[17]=C):C=e[17];const S=C;x="flex flex-col h-full",f="flex-1 overflow-auto",u=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:d("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:d("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):I.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d("settings.orgRoleDetail.noMembersMatch",{searchQuery:o})})}):s.jsx("div",{className:"p-4 space-y-2",children:I.map(p=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Ct,{url:p.user?.image??void 0,fallback:Ot(p.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:p.user?.name||d("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:p.user?.email})]}),r?s.jsx(Pe,{children:s.jsxs(De,{children:[s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{variant:"ghost",size:"sm",disabled:!0,"aria-label":d("settings.orgRoleDetail.removeMember",{name:p.user?.name||d("settings.orgRoleDetail.unknown")}),children:s.jsx(nt,{size:16})})})}),s.jsx(Le,{children:s.jsx("p",{children:S})})]})}):s.jsx(ce,{variant:"ghost",size:"sm","aria-label":d("settings.orgRoleDetail.removeMember",{name:p.user?.name||d("settings.orgRoleDetail.unknown")}),onClick:()=>n(l.filter(c=>c!==p.id)),children:s.jsx(nt,{size:16})})]},p.id))}),e[0]=g?.data?.members,e[1]=_,e[2]=l,e[3]=n,e[4]=r,e[5]=h,e[6]=o,e[7]=d,e[8]=f,e[9]=u,e[10]=x}else f=e[8],u=e[9],x=e[10];let A;e[18]!==f||e[19]!==u?(A=s.jsx("div",{className:f,children:u}),e[18]=f,e[19]=u,e[20]=A):A=e[20];let E;e[21]!==l||e[22]!==n?(E=P=>n([...l,...P]),e[21]=l,e[22]=n,e[23]=E):E=e[23];let b;e[24]!==T||e[25]!==l||e[26]!==m||e[27]!==E?(b=s.jsx(Ws,{open:T,onOpenChange:m,selectedMemberIds:l,onAddMembers:E}),e[24]=T,e[25]=l,e[26]=m,e[27]=E,e[28]=b):b=e[28];let N;return e[29]!==x||e[30]!==A||e[31]!==b?(N=s.jsxs("div",{className:x,children:[A,b]}),e[29]=x,e[30]=A,e[31]=b,e[32]=N):N=e[32],N}function el(t){const e=X.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{className:"size-6 text-muted-foreground"})}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(z.Suspense,{fallback:l,children:s.jsx(Xs,{...t})}),e[1]=t,e[2]=n):n=e[2],n}const tl={owner:[],admin:[],user:[]};function sl(t,e,l,n){const i=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:tl[t],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],memberIds:e.filter(a=>a.role===t).map(a=>a.id)}}function ll(t,e,l){const n=t.permission||{},i=n.self||[],a=i.includes("*"),o=a?[]:i.filter(f=>f!=="*"),T={};for(const[f,u]of Object.entries(n))if(!(f==="self"||f==="models"||f===We))if(f==="*")for(const x of l)T[x.id]=u.includes("*")?x.tools?.map(A=>A.name)??[]:u;else{const x=l.find(A=>A.id===f);x&&(T[f]=u.includes("*")?x.tools?.map(A=>A.name)??[]:u)}const m=n.models||[],r=m.length===0||m.includes("*:*"),h={};if(!r)for(const f of m){const u=f.indexOf(":");if(u===-1)continue;const x=f.slice(0,u),A=f.slice(u+1);h[x]||(h[x]=[]),h[x].push(A)}const d=Es(n),_=d===null||d.includes(it),g=_?[]:d.filter(f=>f!==it);return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:a,staticPermissions:o,toolSet:T,allowAllModels:r,modelSet:h,allowAllProjects:_,projectSet:g,memberIds:e.filter(f=>f.role===t.role).map(f=>f.id)}}function ol(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[n,i]of Object.entries(t.toolSet))if(i.length>0){const o=e.find(T=>T.id===n)?.tools?.map(T=>T.name)??[];l[n]=o.length>0&&o.every(T=>i.includes(T))?["*"]:i}if(t.allowAllModels)l.models=["*:*"];else{const n=[];for(const[i,a]of Object.entries(t.modelSet))for(const o of a)n.push(`${i}:${o}`);n.length>0&&(l.models=n)}return t.allowAllProjects||(l[We]=t.projectSet),l}function nl(t,e,l){return t.kind==="builtin"?sl(t.role,e,void 0):t.kind==="custom"?ll(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],memberIds:[]}}function il(t){const e=X.c(19),{readOnly:l,readOnlyMessage:n,onOpen:i}=t,a=n===void 0?void 0:n,o=ie();let T;e[0]!==a||e[1]!==o?(T=a??o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=a,e[1]=o,e[2]=T):T=e[2];const m=T;if(l){let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Fe,{size:16}),e[3]=_):_=e[3];let g;e[4]!==o?(g=o("settings.orgRoleDetail.addMember"),e[4]=o,e[5]=g):g=e[5];let f;e[6]!==g?(f=s.jsx(Me,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ce,{variant:"outline",size:"sm",disabled:!0,children:[_,g]})})}),e[6]=g,e[7]=f):f=e[7];let u;e[8]!==m?(u=s.jsx(Le,{children:s.jsx("p",{children:m})}),e[8]=m,e[9]=u):u=e[9];let x;return e[10]!==f||e[11]!==u?(x=s.jsx(Pe,{children:s.jsxs(De,{children:[f,u]})}),e[10]=f,e[11]=u,e[12]=x):x=e[12],x}let r;e[13]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Fe,{size:16}),e[13]=r):r=e[13];let h;e[14]!==o?(h=o("settings.orgRoleDetail.addMember"),e[14]=o,e[15]=h):h=e[15];let d;return e[16]!==i||e[17]!==h?(d=s.jsxs(ce,{variant:"outline",size:"sm",onClick:i,children:[r,h]}),e[16]=i,e[17]=h,e[18]=d):d=e[18],d}function rl(t){const e=X.c(14),{locator:l}=Ue(),n=Qe(),i=ns();let a;e[0]!==l?(a=me.members(l),e[0]=l,e[1]=a):a=e[1];let o;e[2]!==n?(o=()=>n.organization.listMembers(),e[2]=n,e[3]=o):o=e[3];let T;e[4]!==a||e[5]!==o?(T={queryKey:a,queryFn:o},e[4]=a,e[5]=o,e[6]=T):T=e[6];const{data:m,isPending:r}=ze(T);if(r||!i){let g;return e[7]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})})}),e[7]=g):g=e[7],g}let h;e[8]!==m?.data?.members?(h=m?.data?.members??[],e[8]=m?.data?.members,e[9]=h):h=e[9];const d=h;let _;return e[10]!==i||e[11]!==d||e[12]!==t?(_=s.jsx(al,{...t,members:d,connections:i}),e[10]=i,e[11]=d,e[12]=t,e[13]=_):_=e[13],_}function al({target:t,onBack:e,onSaved:l,members:n,connections:i}){const a=at(),o=ie(),{locator:T}=Ue(),m=Qe(),r=ct(),h=t.kind==="builtin",d=t.kind==="builtin"&&t.role==="owner",_=t.kind==="new",[g,f]=z.useState(h?"org":"mcp"),u=Lt({resolver:vt(Os),defaultValues:nl(t,n,i)}),x=u.formState.isValid,A=u.formState.isDirty,E=dt({mutationFn:async c=>{const G=ol(c,i),y=c.role.slug||c.role.label.toLowerCase().replace(/\s+/g,"-"),V=(c.role.slug==="owner"||c.role.slug==="admin"||c.role.slug==="user")&&!c.role.id,F=async(K,k)=>{const U=n.filter(L=>L.role===(k??K)).map(L=>L.id),B=c.memberIds.filter(L=>!U.includes(L)),$=U.filter(L=>!c.memberIds.includes(L));for(const L of B){const Y=await m.organization.updateMemberRole({memberId:L,role:[K]});if(Y?.error)throw new Error(Y.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const L of $){const Y=await m.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(V)return await F(c.role.slug),c;if(c.role.id){const K=c.role.label.toLowerCase().replace(/\s+/g,"-"),k=c.role.slug,U=K!==k,B=await m.organization.updateRole({roleId:c.role.id,data:{permission:G,...U?{roleName:K}:{}}});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await F(U?K:k,U?k:void 0),U?{...c,role:{...c.role,slug:K}}:c}else{const K=await m.organization.createRole({role:y,permission:G});if(K?.error)throw new Error(K.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const k of c.memberIds){const U=await m.organization.updateMemberRole({memberId:k,role:[y]});if(U?.error)throw new Error(U.error.message)}return{...c,role:{...c.role,id:K.data?.roleData?.id,slug:y}}}},onSuccess:(c,G)=>{r.invalidateQueries({queryKey:me.members(T)}),r.invalidateQueries({queryKey:me.organizationRoles(T)});const y=!G.role.id&&!G.role.slug,V=G.role.slug==="owner"&&!G.role.id;$e(V?"role_members_updated":y?"role_created":"role_updated",{role_slug:G.role.slug??null}),ye.success(o(V?"settings.orgRoleDetail.membersUpdatedSuccessfully":y?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),u.reset(c),l(c.role.id)},onError:c=>{ye.error(c instanceof Error?c.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),b=u.handleSubmit(c=>{if(!c.role.label.trim()){ye.error(o("settings.orgRoleDetail.roleNameIsRequired")),u.setFocus("role.label");return}E.mutate(c)}),N=!d,P=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",j=[...d?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions"),icon:gs}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions"),icon:ms},{id:"models",label:o("settings.orgRoleDetail.models"),icon:yt},{id:"projects",label:o("settings.orgRoleDetail.projects"),icon:fs},{id:"members",label:o("settings.orgRoleDetail.members"),icon:wt}],[O,D]=z.useState(""),[I,C]=z.useState(!1),S=c=>{f(c),D("")},p={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),projects:o("settings.orgRoleDetail.searchProjects"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(ae,{children:s.jsxs(ae.Content,{className:Z("flex flex-col",g!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ae.Title,{actions:N&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{variant:"outline",size:"sm",onClick:e,disabled:E.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ce,{size:"sm",onClick:b,disabled:E.isPending||!x||!A,children:E.isPending?o("settings.orgRoleDetail.saving"):o(_?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",t.kind==="builtin"?gt(t.role,!0):Zt(u.watch("role.label")))}),d&&s.jsx(mt,{size:16,className:"text-muted-foreground shrink-0"}),_||t.kind==="custom"?s.jsx("input",{...u.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:_}):s.jsx("span",{className:"truncate",children:P})]})}),a?s.jsx(s.Fragment,{children:s.jsx(Gt.Toolbar.Left.Portal,{children:s.jsx(ae.Tabs,{children:j.map(c=>s.jsx(ae.Tab,{active:g===c.id,onClick:()=>S(c.id),children:c.label},c.id))})})}):s.jsx(s.Fragment,{children:s.jsx("div",{className:"flex items-center gap-2",children:j.map(c=>s.jsx("button",{type:"button",onClick:()=>S(c.id),className:Z("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",g===c.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:c.label},c.id))})}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(He,{value:O,onChange:D,placeholder:p[g]??"Search...",className:"w-full md:w-[375px]"}),g==="members"&&s.jsx(il,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>C(!0)})]})]})}),s.jsx("div",{className:Z("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",g!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:Z(g!=="org"&&"h-full overflow-hidden",g!=="models"&&g!=="projects"&&g!=="org"&&"border border-border rounded-xl bg-card"),children:[g==="mcp"&&!d&&s.jsx(Ns,{toolSet:u.watch("toolSet"),onToolSetChange:c=>u.setValue("toolSet",c,{shouldDirty:!0}),searchQuery:O}),g==="org"&&s.jsx(Cs,{allowAllStaticPermissions:u.watch("allowAllStaticPermissions"),staticPermissions:u.watch("staticPermissions"),onAllowAllChange:c=>u.setValue("allowAllStaticPermissions",c,{shouldDirty:!0}),onPermissionsChange:c=>u.setValue("staticPermissions",c,{shouldDirty:!0}),readOnly:d,searchQuery:O}),g==="models"&&s.jsx(zs,{allowAllModels:u.watch("allowAllModels"),modelSet:u.watch("modelSet"),onAllowAllChange:c=>u.setValue("allowAllModels",c,{shouldDirty:!0}),onModelSetChange:c=>u.setValue("modelSet",c,{shouldDirty:!0}),readOnly:d,searchQuery:O}),g==="projects"&&s.jsx(Hs,{allowAllProjects:u.watch("allowAllProjects"),projectSet:u.watch("projectSet"),onAllowAllChange:c=>u.setValue("allowAllProjects",c,{shouldDirty:!0}),onProjectSetChange:c=>u.setValue("projectSet",c,{shouldDirty:!0}),readOnly:d,searchQuery:O}),g==="members"&&s.jsx(el,{memberIds:u.watch("memberIds"),onMemberIdsChange:c=>u.setValue("memberIds",c,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:O,addMemberDialogOpen:I,onAddMemberDialogOpenChange:C})]})})]})})}function cl(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function dl(t){const e=X.c(6),{area:l,children:n}=t,{isPrivileged:i,loading:a,error:o}=Bt();let T;return e[0]!==l||e[1]!==n||e[2]!==o||e[3]!==i||e[4]!==a?(T=s.jsx(Ts,{granted:i,loading:a,error:o,area:l,children:n}),e[0]=l,e[1]=n,e[2]=o,e[3]=i,e[4]=a,e[5]=T):T=e[5],T}const ml=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function ul(){const t=X.c(129),e=at(),l=ie(),[n,i]=z.useState(""),[a,o]=z.useState(null),T=Yt();let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},t[0]=m):m=t[0];const{role:r}=ut(m),{locator:h}=Ue(),d=Qe(),_=ct(),{customRoles:g,refetch:f}=Ht();let u;t[1]!==T?(u=M=>T({to:".",search:v=>({...v,role:M})}),t[1]=T,t[2]=u):u=t[2];const x=u;let A;e:{if(!r){A=null;break e}if(r==="new"){A={kind:"new"};break e}if(r.startsWith("builtin-")){A={kind:"builtin",role:r.slice(8)};break e}let M;t[3]!==r?(M=ee=>ee.id===r,t[3]=r,t[4]=M):M=t[4];const v=g.find(M);A=v?{kind:"custom",role:v}:null}const E=A;let b;t[5]!==h?(b=me.members(h),t[5]=h,t[6]=b):b=t[6];let N;t[7]!==d?(N=()=>d.organization.listMembers(),t[7]=d,t[8]=N):N=t[8];let P;t[9]!==b||t[10]!==N?(P={queryKey:b,queryFn:N},t[9]=b,t[10]=N,t[11]=P):P=t[11];const{data:j}=ze(P);let O;t[12]!==j?.data?.members?(O=j?.data?.members??[],t[12]=j?.data?.members,t[13]=O):O=t[13];const D=O;let I;t[14]!==D?(I=M=>D.filter(v=>v.role===M).length,t[14]=D,t[15]=I):I=t[15];const C=I;let S;if(t[16]!==g||t[17]!==C||t[18]!==n||t[19]!==l){let M;t[21]!==C||t[22]!==l?(M=de=>({kind:"builtin",role:{...de,memberCount:C(de.role),label:l(de.labelKey)}}),t[21]=C,t[22]=l,t[23]=M):M=t[23];const v=ml.map(M);let ee;t[24]!==C?(ee=de=>({kind:"custom",role:{...de,memberCount:C(de.role)}}),t[24]=C,t[25]=ee):ee=t[25];const Pt=g.map(ee);if(S=[...v,...Pt],n){const de=n.toLowerCase();S=S.filter(Dt=>Dt.role.label.toLowerCase().includes(de))}t[16]=g,t[17]=C,t[18]=n,t[19]=l,t[20]=S}else S=t[20];let p;t[26]!==d?(p=async M=>{const v=await d.organization.deleteRole({roleId:M});if(v?.error)throw new Error(v.error.message);return v?.data},t[26]=d,t[27]=p):p=t[27];const c=dt({mutationFn:p,onSuccess:(M,v)=>{$e("role_deleted",{role_id:v}),_.invalidateQueries({queryKey:me.members(h)}),_.invalidateQueries({queryKey:me.organizationRoles(h)}),ye.success(l("settings.roles.deletedSuccessfully")),f(),E?.kind==="custom"&&E.role.id===v&&x(void 0)},onError:_l});let G;t[28]!==l?(G=l("settings.roles.columnRole"),t[28]=l,t[29]=G):G=t[29];let y;t[30]!==G?(y={id:"role",header:G,render:hl,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=G,t[31]=y):y=t[31];let V;t[32]!==l?(V=l("settings.roles.columnType"),t[32]=l,t[33]=V):V=t[33];let F;t[34]!==l?(F=M=>M.kind==="builtin"?s.jsx(we,{variant:"secondary",className:"text-xs",children:l("settings.roles.builtIn")}):s.jsx(we,{variant:"outline",className:"text-xs",children:l("settings.roles.custom")}),t[34]=l,t[35]=F):F=t[35];let K;t[36]!==V||t[37]!==F?(K={id:"type",header:V,render:F,cellClassName:"w-28 shrink-0"},t[36]=V,t[37]=F,t[38]=K):K=t[38];let k;t[39]!==l?(k=l("settings.roles.columnPermissions"),t[39]=l,t[40]=k):k=t[40];let U;t[41]!==l?(U=M=>{if(M.kind==="builtin")return M.role.role==="owner"||M.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:l("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:l("settings.roles.basicAccess")});const v=M.role,ee=[];return v.allowsAllStaticPermissions?ee.push(l("settings.roles.fullOrgAccess")):v.staticPermissionCount&&v.staticPermissionCount>0&&ee.push(l("settings.roles.orgPermsCount",{count:v.staticPermissionCount})),v.allowsAllConnections?ee.push(l("settings.roles.allConnections")):v.connectionCount&&v.connectionCount>0&&ee.push(l("settings.roles.connectionCount",{count:v.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):l("settings.roles.noPermissions")})},t[41]=l,t[42]=U):U=t[42];let B;t[43]!==k||t[44]!==U?(B={id:"permissions",header:k,render:U,cellClassName:"flex-1 min-w-0"},t[43]=k,t[44]=U,t[45]=B):B=t[45];let $;t[46]!==l?($=l("settings.roles.columnMembers"),t[46]=l,t[47]=$):$=t[47];let L;t[48]!==$?(L={id:"members",header:$,render:Tl,cellClassName:"w-24 shrink-0"},t[48]=$,t[49]=L):L=t[49];let Y;t[50]!==l?(Y={id:"actions",header:"",render:M=>M.kind==="builtin"?null:s.jsxs(Ft,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:gl,children:s.jsx(qt,{size:16})})}),s.jsx($t,{align:"end",onClick:fl,children:s.jsxs(Qt,{variant:"destructive",onClick:()=>{const v=M.role;v.id&&o({id:v.id,label:v.label})},children:[s.jsx(Jt,{size:16}),l("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=l,t[51]=Y):Y=t[51];let W;t[52]!==y||t[53]!==K||t[54]!==B||t[55]!==L||t[56]!==Y?(W=[y,K,B,L,Y],t[52]=y,t[53]=K,t[54]=B,t[55]=L,t[56]=Y,t[57]=W):W=t[57];const le=W;let te;t[58]!==x?(te=M=>{if(M.kind==="builtin")x(`builtin-${M.role.role}`);else{const v=M.role;x(v.id)}},t[58]=x,t[59]=te):te=t[59];const Q=te;if(E){let M;t[60]!==x?(M=()=>x(void 0),t[60]=x,t[61]=M):M=t[61];let v;return t[62]!==f||t[63]!==x?(v=()=>{f(),x(void 0)},t[62]=f,t[63]=x,t[64]=v):v=t[64],s.jsx(rl,{target:E,onBack:M,onSaved:v},cl(E))}let q;t[65]!==l?(q=l("settings.roles.searchPlaceholder"),t[65]=l,t[66]=q):q=t[66];let R;t[67]===Symbol.for("react.memo_cache_sentinel")?(R=M=>{M.key==="Escape"&&(i(""),M.target.blur())},t[67]=R):R=t[67];let w;t[68]!==n||t[69]!==q?(w=s.jsx(He,{value:n,onChange:i,placeholder:q,className:"w-full md:w-[375px]",onKeyDown:R}),t[68]=n,t[69]=q,t[70]=w):w=t[70];const H=e?"sm":"default";let J;t[71]!==x?(J=()=>x("new"),t[71]=x,t[72]=J):J=t[72];let ne;t[73]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(Fe,{size:16}),t[73]=ne):ne=t[73];let se;t[74]!==l?(se=l("settings.roles.createRole"),t[74]=l,t[75]=se):se=t[75];let oe;t[76]!==H||t[77]!==J||t[78]!==se?(oe=s.jsx(ae.Actions,{children:s.jsxs(ce,{size:H,onClick:J,children:[ne,se]})}),t[76]=H,t[77]=J,t[78]=se,t[79]=oe):oe=t[79];let fe;t[80]!==w||t[81]!==oe?(fe=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[w,oe]}),t[80]=w,t[81]=oe,t[82]=fe):fe=t[82];let ge;t[83]!==n||t[84]!==l?(ge=n?s.jsx(ot,{title:l("settings.roles.noRolesFound"),description:l("settings.roles.noRolesMatchSearch",{search:n})}):s.jsx(ot,{title:l("settings.roles.noRoles"),description:l("settings.roles.createRoleGetStarted")}),t[83]=n,t[84]=l,t[85]=ge):ge=t[85];let Te;t[86]!==S||t[87]!==le||t[88]!==Q||t[89]!==ge?(Te=s.jsx(Wt,{columns:le,data:S,isLoading:!1,onRowClick:Q,emptyState:ge}),t[86]=S,t[87]=le,t[88]=Q,t[89]=ge,t[90]=Te):Te=t[90];const Ke=a!==null;let Ge;t[91]===Symbol.for("react.memo_cache_sentinel")?(Ge=M=>!M&&o(null),t[91]=Ge):Ge=t[91];let he;t[92]!==l?(he=l("settings.roles.deleteRoleTitle"),t[92]=l,t[93]=he):he=t[93];let _e;t[94]!==he?(_e=s.jsx(_t,{children:he}),t[94]=he,t[95]=_e):_e=t[95];const Ve=a?.label??"";let xe;t[96]!==l||t[97]!==Ve?(xe=l("settings.roles.deleteRoleConfirm",{role:Ve}),t[96]=l,t[97]=Ve,t[98]=xe):xe=t[98];let pe;t[99]!==xe?(pe=s.jsx(xt,{children:xe}),t[99]=xe,t[100]=pe):pe=t[100];let Ee;t[101]!==_e||t[102]!==pe?(Ee=s.jsxs(pt,{children:[_e,pe]}),t[101]=_e,t[102]=pe,t[103]=Ee):Ee=t[103];let Ie;t[104]!==l?(Ie=l("settings.roles.cancel"),t[104]=l,t[105]=Ie):Ie=t[105];let Re;t[106]!==Ie?(Re=s.jsx(Et,{children:Ie}),t[106]=Ie,t[107]=Re):Re=t[107];let Se;t[108]!==c||t[109]!==a?(Se=()=>{a?.id&&c.mutate(a.id),o(null)},t[108]=c,t[109]=a,t[110]=Se):Se=t[110];let Ae;t[111]!==l?(Ae=l("settings.roles.delete"),t[111]=l,t[112]=Ae):Ae=t[112];let Ne;t[113]!==Se||t[114]!==Ae?(Ne=s.jsx(It,{onClick:Se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ae}),t[113]=Se,t[114]=Ae,t[115]=Ne):Ne=t[115];let Oe;t[116]!==Re||t[117]!==Ne?(Oe=s.jsxs(Rt,{children:[Re,Ne]}),t[116]=Re,t[117]=Ne,t[118]=Oe):Oe=t[118];let Ce;t[119]!==Ee||t[120]!==Oe?(Ce=s.jsxs(ht,{children:[Ee,Oe]}),t[119]=Ee,t[120]=Oe,t[121]=Ce):Ce=t[121];let be;t[122]!==Ke||t[123]!==Ce?(be=s.jsx(Tt,{open:Ke,onOpenChange:Ge,children:Ce}),t[122]=Ke,t[123]=Ce,t[124]=be):be=t[124];let ke;return t[125]!==fe||t[126]!==Te||t[127]!==be?(ke=s.jsxs(ft,{group:"members",className:"gap-6",children:[fe,Te,be]}),t[125]=fe,t[126]=Te,t[127]=be,t[128]=ke):ke=t[128],ke}function fl(t){return t.stopPropagation()}function gl(t){return t.stopPropagation()}function Tl(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function hl(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",gt(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(mt,{size:12,className:"text-muted-foreground shrink-0"})]})}function _l(t,e){$e("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),ye.error(t instanceof Error?t.message:"Failed to delete role")}function xl(){const t=X.c(13),e=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{role:n}=ut(l);let i;t[1]!==e?(i=e("settings.roles.failedToLoad"),t[1]=e,t[2]=i):i=t[2];let a;t[3]!==i?(a=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:i})})}),t[3]=i,t[4]=a):a=t[4];let o;t[5]!==n?(o=n?s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})})}):s.jsx(ft,{group:"members",className:"gap-6",children:s.jsx(Kt,{})}),t[5]=n,t[6]=o):o=t[6];let T;t[7]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(ul,{}),t[7]=T):T=t[7];let m;t[8]!==o?(m=s.jsx(z.Suspense,{fallback:o,children:T}),t[8]=o,t[9]=m):m=t[9];let r;return t[10]!==a||t[11]!==m?(r=s.jsx(Vt,{fallback:a,children:m}),t[10]=a,t[11]=m,t[12]=r):r=t[12],r}function Yo(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(dl,{area:"roles",children:s.jsx(xl,{})}),t[0]=e):e=t[0],e}export{Yo as default};
|