decocms 3.103.2 → 3.103.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B7YwjVuv.js → AlertCircle-BJzQ1lVJ.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DvElag-V.js → ArrowUpRight-CA22UP6Q.js} +1 -1
- package/dist/client/assets/{CheckCircle-DIxU9fNb.js → CheckCircle-p5tYLXMg.js} +1 -1
- package/dist/client/assets/{ChevronDown-D7t2IbgZ.js → ChevronDown-DM7Zg7z0.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DnVztwcc.js → ChevronLeft-lcwdftXp.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cw6r4eF5.js → ChevronRight-CKc4NZet.js} +1 -1
- package/dist/client/assets/{ChevronUp-DrHOs0IB.js → ChevronUp-uk87fvlM.js} +1 -1
- package/dist/client/assets/{DotsVertical-p5cw6bzY.js → DotsVertical-DXDm8Xzs.js} +1 -1
- package/dist/client/assets/{Eye-CPb9WDyf.js → Eye-BHPT57Tm.js} +1 -1
- package/dist/client/assets/{FilterLines-2uX2Gf4U.js → FilterLines-HsRbW4y-.js} +1 -1
- package/dist/client/assets/{Globe01-D51Pf1ib.js → Globe01-DD63JJzL.js} +1 -1
- package/dist/client/assets/{Globe04-8CmI5zRW.js → Globe04-CokcJjWp.js} +1 -1
- package/dist/client/assets/{HardDrive-fBNuw9RE.js → HardDrive-xu95HLc0.js} +1 -1
- package/dist/client/assets/{Key01-B-V8oh6M.js → Key01-V7SPr6j-.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B7KWV4nT.js → LayoutLeft-y1fOcQ0I.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cd3gNz9H.js → LinkExternal01-DCed5R2c.js} +1 -1
- package/dist/client/assets/{Monitor01-BzxQo8OV.js → Monitor01-BKqFs8Gp.js} +1 -1
- package/dist/client/assets/{Palette-TV4PomkE.js → Palette-DkcZCW1n.js} +1 -1
- package/dist/client/assets/{Play-B9WHtGRe.js → Play-CKPBuURg.js} +1 -1
- package/dist/client/assets/{Plus-DrCr8atg.js → Plus-Bi8BbQwT.js} +1 -1
- package/dist/client/assets/{SearchLg-C45t9PQZ.js → SearchLg-D0nJXyNY.js} +1 -1
- package/dist/client/assets/{SearchMd-C5JuA4Q_.js → SearchMd-BkXN-Kzx.js} +1 -1
- package/dist/client/assets/{Settings02-CWsiKyfu.js → Settings02-C-qi4-Q_.js} +1 -1
- package/dist/client/assets/{Shield01-BP8Krja8.js → Shield01-BaBnwolv.js} +1 -1
- package/dist/client/assets/{Star01-BvLdWUOq.js → Star01-D2l7-L0I.js} +1 -1
- package/dist/client/assets/{Stars01-ledCttL2.js → Stars01-CBpnmt-0.js} +1 -1
- package/dist/client/assets/{Stars02-CZ3C1sQr.js → Stars02-DC4cG_dc.js} +1 -1
- package/dist/client/assets/{Sun-DPnjEA61.js → Sun-ubimVQVz.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-fTq_Xj_0.js → SwitchHorizontal01-DkcNGyLK.js} +1 -1
- package/dist/client/assets/{Tool01-MvyjXDCb.js → Tool01-D4LA61If.js} +1 -1
- package/dist/client/assets/{Trash01-C3HJx9Eu.js → Trash01-CbqEHpx0.js} +1 -1
- package/dist/client/assets/{Upload01-DvSZDpgm.js → Upload01-C_kFf8l0.js} +1 -1
- package/dist/client/assets/{User01-TldGh0YP.js → User01-Cykpl4hh.js} +1 -1
- package/dist/client/assets/{Users01-B63UEiqj.js → Users01-fhFCwrP8.js} +1 -1
- package/dist/client/assets/{Users03-BiIAwLFR.js → Users03-BkBCkWQn.js} +1 -1
- package/dist/client/assets/{X-D1lT84o6.js → X-DEdLuuqP.js} +1 -1
- package/dist/client/assets/{XCircle-B1aV7AX3.js → XCircle-IAOWYKKA.js} +1 -1
- package/dist/client/assets/{XClose-9xeu7JIP.js → XClose-ChjX78ei.js} +1 -1
- package/dist/client/assets/{Zap-C8z5Nmtq.js → Zap-DE8YfoLa.js} +1 -1
- package/dist/client/assets/{ZapSquare-C-BUl6mg.js → ZapSquare-hkjSQWO8.js} +1 -1
- package/dist/client/assets/{ZoomOut-DnuKetHD.js → ZoomOut-DoQt1wdd.js} +1 -1
- package/dist/client/assets/{access-gate-BY3tN2ja.js → access-gate-C9EgwKjC.js} +1 -1
- package/dist/client/assets/{add-section-modal-B07Xr2Kn.js → add-section-modal-uGR2Gjzo.js} +1 -1
- package/dist/client/assets/{agent-icon-SFzfjqT3.js → agent-icon-C1dYfmgT.js} +1 -1
- package/dist/client/assets/agents-list-BYujSwxP.js +1 -0
- package/dist/client/assets/{ai-providers-CKzZgnvl.js → ai-providers-BNI68B_k.js} +1 -1
- package/dist/client/assets/{alert-Xi4tmGdJ.js → alert-D_TmabeW.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dv-S36Xs.js → alert-dialog-DZvgeli3.js} +1 -1
- package/dist/client/assets/{app-editor-DkeeVFb9.js → app-editor-CzvUrXdA.js} +1 -1
- package/dist/client/assets/{auth-B9AdzGWs.js → auth-CPEoqZ5f.js} +1 -1
- package/dist/client/assets/{auth-catchall-0TYVm2fW.js → auth-catchall-B0YsSe8e.js} +1 -1
- package/dist/client/assets/{auth-entry-DnJxnsQa.js → auth-entry-BNBDxAD5.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CRM5rJ4I.js → auth-split-layout-TVpnUfp8.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CWwDFJ5t.js → authenticate-and-persist-oauth-BgoQZkYE.js} +1 -1
- package/dist/client/assets/{automation-list-row-CsaQkLKW.js → automation-list-row-Bic_MYAx.js} +1 -1
- package/dist/client/assets/{automation-runs-B7uMDF25.js → automation-runs-B_ZKhNSO.js} +1 -1
- package/dist/client/assets/automations-B-nS9KAc.js +1 -0
- package/dist/client/assets/{avatar-CdYywjB8.js → avatar-VZM5i0Ki.js} +1 -1
- package/dist/client/assets/{badge-Dxlv54DZ.js → badge-BGbD2JMR.js} +1 -1
- package/dist/client/assets/{block-document-DmBsan0A.js → block-document-alsZITys.js} +1 -1
- package/dist/client/assets/{brand-context-BXcXRl5I.js → brand-context-DSNeUFQk.js} +1 -1
- package/dist/client/assets/{buckets-bgNzTmcE.js → buckets-htbDyfKS.js} +1 -1
- package/dist/client/assets/{capability-load-error-CFxZVJfo.js → capability-load-error-7-bUVJZE.js} +1 -1
- package/dist/client/assets/{card-Dt5JuJj0.js → card-DjLKG66H.js} +1 -1
- package/dist/client/assets/{category-editor-4VhAzI64.js → category-editor-DlDVDfZO.js} +1 -1
- package/dist/client/assets/{chat-context-rSGx0F1S.js → chat-context-DJ9kQ1Gu.js} +5 -5
- package/dist/client/assets/{checkbox-D5qKxHwE.js → checkbox-CHfAThPE.js} +1 -1
- package/dist/client/assets/{cli-auth-success-fK-z6B11.js → cli-auth-success-C0Rp_k77.js} +1 -1
- package/dist/client/assets/{collection-detail-CKsULKt8.js → collection-detail-WRW5wTM9.js} +1 -1
- package/dist/client/assets/{collection-display-button-D1GAS3K4.js → collection-display-button-V-CSOAM6.js} +1 -1
- package/dist/client/assets/{collection-search-Yx1Vcd74.js → collection-search-C4TcbQ-p.js} +1 -1
- package/dist/client/assets/{collection-tabs-DEvCjzY2.js → collection-tabs-CA6SI6KD.js} +1 -1
- package/dist/client/assets/{command--DrDkfnb.js → command-CZZOMfiA.js} +1 -1
- package/dist/client/assets/commerce-onboarding-B618DbMl.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-Ny2ddpDi.js → connect-desktop-dialog-C7OzpQot.js} +1 -1
- package/dist/client/assets/{connection-card-DGJrNSMY.js → connection-card-CFZ9gVcC.js} +1 -1
- package/dist/client/assets/{connection-detail-CrxMas_a.js → connection-detail-Dz4PneDx.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cco6Qbpt.js → connection-form-helpers-CF-WQyTc.js} +1 -1
- package/dist/client/assets/{connections-D2DZU5GB.js → connections-3TpGWQgy.js} +1 -1
- package/dist/client/assets/{context-menu-BLuGnyVu.js → context-menu-DyhUbPtL.js} +1 -1
- package/dist/client/assets/{decopilot-DMutZh6M.js → decopilot-DrrsAbRN.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool--1mtBHxz.js → decopilot-sse-pool-CyIsiJ1H.js} +1 -1
- package/dist/client/assets/{dialog-Dy6eXpKe.js → dialog-Dj81EdMo.js} +1 -1
- package/dist/client/assets/{domain-settings-C1eV-9a-.js → domain-settings-xhuDCJzA.js} +1 -1
- package/dist/client/assets/{drawer-Dvd-9Sja.js → drawer-tdj9aCh7.js} +1 -1
- package/dist/client/assets/{dropdown-menu-OVr8TMr_.js → dropdown-menu-UriF3iJ3.js} +1 -1
- package/dist/client/assets/{empty-state-DQfglbNM.js → empty-state-pCesbyUM.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DrUVsxqd.js → extract-connection-data-DumI9Ge5.js} +1 -1
- package/dist/client/assets/{file-explorer-CkPnNmO8.js → file-explorer-BrAHdPYq.js} +1 -1
- package/dist/client/assets/{file-type-icon-SP0v8UlM.js → file-type-icon-Czo8zyOj.js} +1 -1
- package/dist/client/assets/{files-Wz-xIRKZ.js → files-2-ylEzlS.js} +1 -1
- package/dist/client/assets/{form-CkEHHrgu.js → form--KUjsjlO.js} +1 -1
- package/dist/client/assets/{general-DdP8ztNk.js → general-CESQV-oz.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DSR-TwBo.js → github-repo-picker-B2FrynHJ.js} +1 -1
- package/dist/client/assets/{hooks-o8yCDzJC.js → hooks-dZjznYow.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CEW3ZJjT.js → import-from-deco-dialog-BR852fbZ.js} +1 -1
- package/dist/client/assets/{index-XoC6Mv98.js → index-0P9allDr.js} +1 -1
- package/dist/client/assets/{index-DuwRwNmr.js → index-BBWislhf.js} +1 -1
- package/dist/client/assets/{index-B6kdF_L8.js → index-BWNTd3xK.js} +1 -1
- package/dist/client/assets/{index-Dp_9MLtk.js → index-BcYiAjiX.js} +1 -1
- package/dist/client/assets/{index-j1EmgqV8.js → index-BlbGtC1U.js} +3 -3
- package/dist/client/assets/{index-_cWo9NQL.js → index-BxxTJpbB.js} +30 -30
- package/dist/client/assets/{index-DrmUu6Oi.js → index-CCANgKdB.js} +1 -1
- package/dist/client/assets/{index-D3y2G80O.js → index-CSUPQJzr.js} +1 -1
- package/dist/client/assets/{index-Z9ET5M46.js → index-CTgm7OBW.js} +1 -1
- package/dist/client/assets/{index-kU0DbGlO.js → index-CsOdgboE.js} +1 -1
- package/dist/client/assets/{index-DgC1qvp3.js → index-Dc1mL4BR.js} +1 -1
- package/dist/client/assets/{index-_iXFFHGt.js → index-S2ZDAOoZ.js} +1 -1
- package/dist/client/assets/{index-BFhrz-f4.js → index-bqGy9pqv.js} +1 -1
- package/dist/client/assets/{index-C0th2ciG.js → index-gxmWeiHj.js} +1 -1
- package/dist/client/assets/{index-redirect-Cq22Ou3t.js → index-redirect-DfTnv8HP.js} +1 -1
- package/dist/client/assets/{input-zUoMTUjz.js → input-DHDgjmX0.js} +1 -1
- package/dist/client/assets/{integration-icon-Cpv4CIQ_.js → integration-icon-m4V5ew5R.js} +1 -1
- package/dist/client/assets/{label-DIdfff7-.js → label-PsbKXPB5.js} +1 -1
- package/dist/client/assets/{login-0NOIPa_i.js → login-CjZD7E7q.js} +1 -1
- package/dist/client/assets/{mcp-oauth-iKgiXli9.js → mcp-oauth-D8vUJRgp.js} +1 -1
- package/dist/client/assets/{members-CnFYAz0Z.js → members-BPqR9Tpk.js} +1 -1
- package/dist/client/assets/{monaco-editor-DvDR9w-L.js → monaco-editor-C6TIlc3v.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BbY_q-eo.js → monitoring-stats-row-CuYST9yW.js} +1 -1
- package/dist/client/assets/{oauth-callback-BPtayFiR.js → oauth-callback-MIwBkTTF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-K5aCOvaH.js → oauth-callback-ai-provider-DE51OBIS.js} +1 -1
- package/dist/client/assets/{onboarding-ZiU6JGv-.js → onboarding-D2dd9Hw0.js} +1 -1
- package/dist/client/assets/{org-install-Cy54wLGw.js → org-install-TvXy2En0.js} +1 -1
- package/dist/client/assets/{org-layout-D-P2tcqC.js → org-layout-B7of36Ug.js} +1 -1
- package/dist/client/assets/{organization-choice-C1y80Okj.js → organization-choice-ClD6fu3y.js} +1 -1
- package/dist/client/assets/{page-seo-form-xc_ndIWR.js → page-seo-form-B43PbD8q.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bms3CN63.js +1 -0
- package/dist/client/assets/{popover-DU5qAOzi.js → popover-Do5OoBkb.js} +1 -1
- package/dist/client/assets/{post-editor-Bu1uK3RV.js → post-editor-DyiVSt54.js} +1 -1
- package/dist/client/assets/{preview-dialog-C9-3VKyJ.js → preview-dialog-DxRKsymK.js} +1 -1
- package/dist/client/assets/{primitives-CykDcCCX.js → primitives-DxWZCDhA.js} +1 -1
- package/dist/client/assets/{profile-BKoUm-g9.js → profile-BhdJgKGB.js} +1 -1
- package/dist/client/assets/project-app-view-CI4_btQ-.js +1 -0
- package/dist/client/assets/record-editor-BXTRvz07.js +1 -0
- package/dist/client/assets/registry-Du_E4iar.js +2 -0
- package/dist/client/assets/{registry-layout-B9FmRjJz.js → registry-layout-B9PDVzF6.js} +1 -1
- package/dist/client/assets/{require-capability-CehH7jAZ.js → require-capability-D2RrR3BZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CU8fve_K.js → required-auth-layout-BdWFlHgh.js} +1 -1
- package/dist/client/assets/{reset-password-zdekZmVd.js → reset-password-ZLVvnqus.js} +1 -1
- package/dist/client/assets/{roles-D-x_wkGo.js → roles-3wYBxtCJ.js} +1 -1
- package/dist/client/assets/{scroll-area-BAz3Rj9i.js → scroll-area-B3-Gj80e.js} +1 -1
- package/dist/client/assets/{search-input-DRzQD01R.js → search-input-Cmd3sBC3.js} +1 -1
- package/dist/client/assets/{secrets-CuUGkNhM.js → secrets-DwdsYco7.js} +1 -1
- package/dist/client/assets/{sections-editor-DPVFX_7V.js → sections-editor-DC39EH-a.js} +1 -1
- package/dist/client/assets/{select-svPYG6Bw.js → select-DxONb3Kt.js} +1 -1
- package/dist/client/assets/{select-model-Dq-JstQ8.js → select-model-RfbC0RGe.js} +1 -1
- package/dist/client/assets/{seo-editor-BFJub-eW.js → seo-editor-kUNtMQs9.js} +1 -1
- package/dist/client/assets/{settings-layout-a74u_hLy.js → settings-layout-BqoYV9gy.js} +1 -1
- package/dist/client/assets/{settings-section-CNscyKHW.js → settings-section-BlH2FRiM.js} +1 -1
- package/dist/client/assets/{sheet-DahuGsa4.js → sheet-C2Kfge9r.js} +1 -1
- package/dist/client/assets/{shell-controls-K52T5sMB.js → shell-controls-CHbMUihJ.js} +1 -1
- package/dist/client/assets/{shell-layout-Buk6j896.js → shell-layout-BihuyTtm.js} +1 -1
- package/dist/client/assets/{shell-route-loading-B0z1lBof.js → shell-route-loading-De-l4N89.js} +1 -1
- package/dist/client/assets/{sidebar-D5j5gPeI.js → sidebar-BjIzPMot.js} +1 -1
- package/dist/client/assets/{skeleton-U2Av8cLZ.js → skeleton-BG0I4KDd.js} +1 -1
- package/dist/client/assets/sortable.esm-DUIS-SLz.js +5 -0
- package/dist/client/assets/{sso-BoRzwrWA.js → sso-DHlsuJgQ.js} +1 -1
- package/dist/client/assets/{store-vubGBkGy.js → store-CF-c7AjJ.js} +1 -1
- package/dist/client/assets/store-registry-C91x-W79.js +2 -0
- package/dist/client/assets/{studio-tools-BAmwKCdT.js → studio-tools-7mZABBZl.js} +1 -1
- package/dist/client/assets/{switch-CjEoRRuC.js → switch-Dprre6Tx.js} +1 -1
- package/dist/client/assets/{table-T8p77nDy.js → table-2dv8FC6q.js} +1 -1
- package/dist/client/assets/{tabs-DDAkKuLU.js → tabs-nJ0qk72w.js} +1 -1
- package/dist/client/assets/{task-status-Dc-JFjIj.js → task-status-CvjZ7N6W.js} +1 -1
- package/dist/client/assets/{textarea-BrxTK711.js → textarea-HTN5AIWJ.js} +1 -1
- package/dist/client/assets/{toggle-group-r5JjNYaj.js → toggle-group-D22tG_vD.js} +1 -1
- package/dist/client/assets/{toolbar-Cd-zT0GV.js → toolbar-DktIJIGj.js} +1 -1
- package/dist/client/assets/{tooltip-D2IcwsrW.js → tooltip-oPF11xOc.js} +1 -1
- package/dist/client/assets/{types-DdqgwoF-.js → types-DZM3oHCm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B7DE5RlO.js → use-ai-providers-CZx1BFdY.js} +1 -1
- package/dist/client/assets/{use-automations-BaLowkA-.js → use-automations-DttN1_QI.js} +1 -1
- package/dist/client/assets/{use-capability-BYfWBphf.js → use-capability-CREa5hxg.js} +1 -1
- package/dist/client/assets/{use-clock-tick-vJNeZS2R.js → use-clock-tick-D4shCSZy.js} +1 -1
- package/dist/client/assets/{use-collections-DOhjyZoW.js → use-collections-DZi4alPB.js} +1 -1
- package/dist/client/assets/{use-connection-a48WkDyi.js → use-connection-BaK7gZK8.js} +1 -1
- package/dist/client/assets/{use-copy-Dm0W_H8p.js → use-copy-BGXnmJ0Y.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BRQVpCUG.js → use-create-virtual-mcp-BzfjXCKR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-oRzID6xD.js → use-debounced-autosave-DCle0l35.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B1GdK5fU.js → use-debounced-value-D0ar8P23.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CKYm7fJS.js → use-delete-connection-IE5Qqa0Q.js} +1 -1
- package/dist/client/assets/{use-file-configs-F_Lh19IF.js → use-file-configs-CZMtO580.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cs1p0W0X.js → use-infinite-scroll-c7yDanFw.js} +1 -1
- package/dist/client/assets/{use-join-requests-Cx83Qjv9.js → use-join-requests-CiTPLtoo.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B1E7Nyjd.js → use-mcp-client-BYcrk6lz.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B4idSZTh.js → use-mcp-prompts-BjyIsgXC.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CqHv2Xxs.js → use-mcp-tools-DYc-d8kf.js} +1 -1
- package/dist/client/assets/{use-members-BqgoI8LN.js → use-members-CDV7-ikh.js} +1 -1
- package/dist/client/assets/{use-mobile-CWv_pUWp.js → use-mobile-BKRfr7ic.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CWpJGmq-.js → use-navigate-to-agent-D_fgYk51.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C3mEUOcx.js → use-org-auth-client-C2F1ILpp.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dop9y0HC.js → use-org-sso-DHz7VJ1a.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BJ74MotE.js → use-organization-roles-9DZ9iYns.js} +1 -1
- package/dist/client/assets/{use-organization-settings-8LInvXec.js → use-organization-settings-ClKaDrE7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D2DhXJmA.js → use-registry-connections-Bgebk2mm.js} +1 -1
- package/dist/client/assets/{use-secrets-BLkb7BZG.js → use-secrets-DLWDaup6.js} +1 -1
- package/dist/client/assets/{use-status-sounds-MjzDR8jw.js → use-status-sounds-CBCN2gk-.js} +1 -1
- package/dist/client/assets/{use-view-mode-pvlDGqxN.js → use-view-mode-MNe61YUF.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BcsK_V5p.js → use-virtual-mcp-Bkiriz_M.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-bB2OO4_F.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CgFmFjuu.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-C20MRsU9.js → useSuspenseQueries-DO4LObMF.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dnj2EkPc.js → variant-calendar-B-NYPIkC.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DQyCEqbJ.js → view-mode-toggle-DbKux4TQ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +510 -451
- package/dist/server/migrate.js +156 -97
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DjZyRbNh.js +0 -1
- package/dist/client/assets/automations-Dss23VYg.js +0 -1
- package/dist/client/assets/commerce-onboarding-C0r_RGc5.js +0 -1
- package/dist/client/assets/page-seo-sheet-CL3gCFpf.js +0 -1
- package/dist/client/assets/project-app-view-y5DH-I8K.js +0 -1
- package/dist/client/assets/record-editor-CvDeMQ2G.js +0 -1
- package/dist/client/assets/registry-BaFm0L19.js +0 -2
- package/dist/client/assets/sortable.esm-DHLm3dqa.js +0 -5
- package/dist/client/assets/store-registry-3H_xbQFv.js +0 -2
- package/dist/client/assets/useInfiniteQuery-QT7BExxx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CVusVKT2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-j1EmgqV8.js";import{i as R}from"./LayoutLeft-B7KWV4nT.js";import{u as V}from"./use-mobile-CWv_pUWp.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-DahuGsa4.js";import{c as D,b as B,a as E,T as z}from"./tooltip-D2IcwsrW.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
1
|
+
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-BlbGtC1U.js";import{i as R}from"./LayoutLeft-y1fOcQ0I.js";import{u as V}from"./use-mobile-BKRfr7ic.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-C2Kfge9r.js";import{c as D,b as B,a as E,T as z}from"./tooltip-oPF11xOc.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as c,j as i}from"./index-
|
|
1
|
+
import{c as n,l as c,j as i}from"./index-BlbGtC1U.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{D as Ft,a as _n,z as vr,p as mr,n as br,j as i,B as Ye,t as Le,r as u,m as xr,b as yr,i as At,v as J,K as ht,c as wr,C as Cr,L as Sr,l as Dr,k as Rr,ah as z,aQ as ft}from"./index-BlbGtC1U.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as kn,a as Mn,g as Nr,C as Ht}from"./connection-card-CFZ9gVcC.js";import{C as Ir}from"./collection-search-C4TcbQ-p.js";import{C as Ar}from"./collection-tabs-CA6SI6KD.js";import{a as Er,b as Tr,e as _r,g as kr}from"./extract-connection-data-DumI9Ge5.js";import{e as On,d as Pn,c as Ln,a as Fn,b as Mr,D as Or}from"./dialog-Dj81EdMo.js";import{D as Pr,a as Lr,c as Fr,b as zr,d as Br,e as $r,f as Vr}from"./drawer-tdj9aCh7.js";import{u as Xr}from"./use-mobile-BKRfr7ic.js";import{F as De,b as Re,c as je,d as Ne,e as Ie,a as hn}from"./form--KUjsjlO.js";import{I as He}from"./input-DHDgjmX0.js";import{d as Kr,b as Ur,c as Hr,S as Yr,a as ut}from"./select-DxONb3Kt.js";import{T as Wr}from"./textarea-HTN5AIWJ.js";import{b as zn}from"./use-connection-BaK7gZK8.js";import{n as Et,c as Yt}from"./XCircle-IAOWYKKA.js";import{s as Wt}from"./Star01-D2l7-L0I.js";import{a8 as qr}from"./agent-icon-C1dYfmgT.js";import{s as Gr}from"./XClose-ChjX78ei.js";import{c as Jr,i as Dt,a as gn,E as Qr,p as Zr,b as eo,d as to}from"./connection-form-helpers-CF-WQyTc.js";import{u as pn}from"./use-infinite-scroll-c7yDanFw.js";import{a as qt}from"./authenticate-and-persist-oauth-BgoQZkYE.js";import{B as Rt}from"./badge-BGbD2JMR.js";import{T as Gt,a as Jt,b as Qt}from"./tooltip-oPF11xOc.js";import{u as no}from"./useSuspenseInfiniteQuery-CgFmFjuu.js";import{S as ro,u as oo}from"./use-mcp-client-BYcrk6lz.js";import{i as vn}from"./ChevronUp-uk87fvlM.js";import{s as so}from"./Plus-Bi8BbQwT.js";import{u as io}from"./studio-tools-7mZABBZl.js";import{u as ao}from"./use-ai-providers-CZx1BFdY.js";function an(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function Oi(t){const e=an(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Pi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Li(t){return an(t).status==="attached"}function Fi(t){const e=an(t).status;return e==="attached"||e==="detached"}function zi(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Bi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function $i(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Vi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function co({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Ft(),{data:o}=_n.useSession(),{stdioEnabled:s}=vr(),a=Xr(),c=zn(),l=kn(),h=Mn(l,"").items,d=mr({resolver:br(Jr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??gn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),X=E.envVarKeys.filter(Y=>!ae.has(Y));X.length>0&&d.setValue("env_vars",[...B,...X.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Zr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??gn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},R=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=eo(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=to(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Er("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Ur,{children:i.jsx(Hr,{})})}),i.jsxs(Yr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(qr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Qr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Wr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Pr,{open:t,onOpenChange:R,children:i.jsxs(Lr,{className:"max-h-[90vh]",children:[i.jsx(Fr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(zr,{children:S}),i.jsx(Br,{className:"mt-1",children:j})]}),i.jsx($r,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Gr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx(Vr,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Pn,{className:"sm:max-w-[525px]",children:[i.jsxs(Ln,{children:[i.jsx(Fn,{children:S}),i.jsx(Mr,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Or,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function lo(t){const e=wr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Ft(),v=u.useDeferredValue(f),R=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[j,T]=Cr(Sr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==j||e[3]!==T?(A=D=>{D!==j&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=j,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:ro,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=oo(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=no,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:vo,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:X,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(po)??[],xe=Nr(ce),qe=new Set(ce.filter(go).map(ho)),$=kn(),U=Mn($,v),he=pn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=pn(ae,X??!1,Y),L=j==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Tr(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(fo),W=Ue.filter(uo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ht,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(vn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(vn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||kr(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Qt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(At,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ar,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(so,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Dr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Yt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==j||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function uo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function fo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ho(t){return t.app_name}function go(t){return t.app_name}function po(t){return t?.items??[]}function vo(t,e){if(t?.hasMore)return e.reduce(mo,0)}function mo(t,e){return t+(e?.items?.length??0)}function Xi({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Ft(),{data:R}=_n.useSession(),C=zn(),S=xr(),j=yr(),T=b=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await qt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!R?.user?.id)){d(b.id);try{const w=_r(b,v.id,R.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await qt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Pn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Ln,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Fn,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Ir,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(lo,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(co,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await qt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const mn=new Map;function Ki(){const{org:t}=Ft(),e=io(),n=ao(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Rr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=mn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),mn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function bo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Bn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:yt(t)||Bn(t)?t.ownerDocument:document:document:document}const me=zt?u.useLayoutEffect:u.useEffect;function Bt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function xo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function _t(t){const e=Bt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function kt(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){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((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),bt=$n(-1);function yo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function wo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Mt(t){if(wo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return yo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),bn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Co(t){return t.matches(bn)?t:t.querySelector(bn)}const So={display:"none"};function Do(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:So},n)}function Ro(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;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 z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Vn=u.createContext(null);function No(t){const e=u.useContext(Vn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Io(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Ao={draggable:`
|
|
2
|
+
To pick up a draggable item, press the space bar.
|
|
3
|
+
While dragging, use the arrow keys to move the item.
|
|
4
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
+
`},Eo={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function To(t){let{announcements:e=Eo,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Ao}=t;const{announce:s,announcement:a}=jo(),c=Ct("DndLiveRegion"),[l,f]=u.useState(!1);if(u.useEffect(()=>{f(!0)},[]),No(u.useMemo(()=>({onDragStart(d){let{active:g}=d;s(e.onDragStart({active:g}))},onDragMove(d){let{active:g,over:m}=d;e.onDragMove&&s(e.onDragMove({active:g,over:m}))},onDragOver(d){let{active:g,over:m}=d;s(e.onDragOver({active:g,over:m}))},onDragEnd(d){let{active:g,over:m}=d;s(e.onDragEnd({active:g,over:m}))},onDragCancel(d){let{active:g,over:m}=d;s(e.onDragCancel({active:g,over:m}))}}),[s,e])),!l)return null;const h=z.createElement(z.Fragment,null,z.createElement(Do,{id:r,value:o.draggable}),z.createElement(Ro,{id:c,announcement:a}));return n?ft.createPortal(h,n):h}var V;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(V||(V={}));function Ot(){}function Ui(t,e){return u.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Hi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const be=Object.freeze({x:0,y:0});function Xn(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function _o(t,e){const n=Mt(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function Kn(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function ko(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function xn(t){let{left:e,top:n,height:r,width:o}=t;return[{x:e,y:n},{x:e+o,y:n},{x:e,y:n+r},{x:e+o,y:n+r}]}function Un(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function yn(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Yi=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=yn(e,e.left,e.top),s=[];for(const a of r){const{id:c}=a,l=n.get(c);if(l){const f=Xn(yn(l),o);s.push({id:c,data:{droppableContainer:a,value:f}})}}return s.sort(Kn)},Mo=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=xn(e),s=[];for(const a of r){const{id:c}=a,l=n.get(c);if(l){const f=xn(l),h=o.reduce((g,m,N)=>g+Xn(f[N],m),0),d=Number((h/4).toFixed(4));s.push({id:c,data:{droppableContainer:a,value:d}})}}return s.sort(Kn)};function Oo(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),o=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),a=o-r,c=s-n;if(r<o&&n<s){const l=e.width*e.height,f=t.width*t.height,h=a*c,d=h/(l+f-h);return Number(d.toFixed(4))}return 0}const Po=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=[];for(const s of r){const{id:a}=s,c=n.get(a);if(c){const l=Oo(c,e);l>0&&o.push({id:a,data:{droppableContainer:s,value:l}})}}return o.sort(ko)};function Lo(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Hn(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:be}function Fo(t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((a,c)=>({...a,top:a.top+t*c.y,bottom:a.bottom+t*c.y,left:a.left+t*c.x,right:a.right+t*c.x}),{...n})}}const zo=Fo(1);function Yn(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Bo(t,e,n){const r=Yn(e);if(!r)return t;const{scaleX:o,scaleY:s,x:a,y:c}=r,l=t.left-a-(1-o)*parseFloat(n),f=t.top-c-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),h=o?t.width/o:t.width,d=s?t.height/s:t.height;return{width:h,height:d,top:f,right:l+h,bottom:f+d,left:l}}const $o={ignoreTransform:!1};function ot(t,e){e===void 0&&(e=$o);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:h}=Q(t).getComputedStyle(t);f&&(n=Bo(n,f,h))}const{top:r,left:o,width:s,height:a,bottom:c,right:l}=n;return{top:r,left:o,width:s,height:a,bottom:c,right:l}}function wn(t){return ot(t,{ignoreTransform:!0})}function Vo(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function Xo(t,e){return e===void 0&&(e=Q(t).getComputedStyle(t)),e.position==="fixed"}function Ko(t,e){e===void 0&&(e=Q(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=e[o];return typeof s=="string"?n.test(s):!1})}function Vt(t,e){const n=[];function r(o){if(e!=null&&n.length>=e||!o)return n;if(ln(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!yt(o)||Bn(o)||n.includes(o))return n;const s=Q(t).getComputedStyle(o);return o!==t&&Ko(o,s)&&n.push(o),Xo(o,s)?n:r(o.parentNode)}return t?r(t):n}function Wn(t){const[e]=Vt(t,1);return e??null}function en(t){return!zt||!t?null:nt(t)?t:cn(t)?ln(t)||t===rt(t).scrollingElement?window:yt(t)?t:null:null}function qn(t){return nt(t)?t.scrollX:t.scrollLeft}function Gn(t){return nt(t)?t.scrollY:t.scrollTop}function rn(t){return{x:qn(t),y:Gn(t)}}var K;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(K||(K={}));function Jn(t){return!zt||!t?!1:t===document.scrollingElement}function Qn(t){const e={x:0,y:0},n=Jn(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},o=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,a=t.scrollTop>=r.y,c=t.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:a,isRight:c,maxScroll:r,minScroll:e}}const Uo={x:.2,y:.2};function Ho(t,e,n,r,o){let{top:s,left:a,right:c,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=Uo);const{isTop:f,isBottom:h,isLeft:d,isRight:g}=Qn(t),m={x:0,y:0},N={x:0,y:0},x={height:e.height*o.y,width:e.width*o.x};return!f&&s<=e.top+x.height?(m.y=K.Backward,N.y=r*Math.abs((e.top+x.height-s)/x.height)):!h&&l>=e.bottom-x.height&&(m.y=K.Forward,N.y=r*Math.abs((e.bottom-x.height-l)/x.height)),!g&&c>=e.right-x.width?(m.x=K.Forward,N.x=r*Math.abs((e.right-x.width-c)/x.width)):!d&&a<=e.left+x.width&&(m.x=K.Backward,N.x=r*Math.abs((e.left+x.width-a)/x.width)),{direction:m,speed:N}}function Yo(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:e,left:n,right:r,bottom:o}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:o,width:t.clientWidth,height:t.clientHeight}}function Zn(t){return t.reduce((e,n)=>tt(e,rn(n)),be)}function Wo(t){return t.reduce((e,n)=>e+qn(n),0)}function qo(t){return t.reduce((e,n)=>e+Gn(n),0)}function er(t,e){if(e===void 0&&(e=ot),!t)return;const{top:n,left:r,bottom:o,right:s}=e(t);Wn(t)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const Go=[["x",["left","right"],Wo],["y",["top","bottom"],qo]];class dn{constructor(e,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=Vt(n),o=Zn(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,a,c]of Go)for(const l of a)Object.defineProperty(this,l,{get:()=>{const f=c(r),h=o[s]-f;return this.rect[l]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gt{constructor(e){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=e}add(e,n,r){var o;(o=this.target)==null||o.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function Jo(t){const{EventTarget:e}=Q(t);return t instanceof e?t:rt(t)}function tn(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var fe;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(fe||(fe={}));function Cn(t){t.preventDefault()}function Qo(t){t.stopPropagation()}var _;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(_||(_={}));const tr={start:[_.Space,_.Enter],cancel:[_.Esc],end:[_.Space,_.Enter,_.Tab]},Zo=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case _.Right:return{...n,x:n.x+25};case _.Left:return{...n,x:n.x-25};case _.Down:return{...n,y:n.y+25};case _.Up:return{...n,y:n.y-25}}};class nr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new gt(rt(n)),this.windowListeners=new gt(Q(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&er(r),n(be)}handleKeyDown(e){if($t(e)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=tr,coordinateGetter:a=Zo,scrollBehavior:c="smooth"}=o,{code:l}=e;if(s.end.includes(l)){this.handleEnd(e);return}if(s.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:f}=r.current,h=f?{x:f.left,y:f.top}:be;this.referenceCoordinates||(this.referenceCoordinates=h);const d=a(e,{active:n,context:r.current,currentCoordinates:h});if(d){const g=bt(d,h),m={x:0,y:0},{scrollableAncestors:N}=r.current;for(const x of N){const v=e.code,{isTop:R,isRight:C,isLeft:S,isBottom:j,maxScroll:T,minScroll:A}=Qn(x),p=Yo(x),y={x:Math.min(v===_.Right?p.right-p.width/2:p.right,Math.max(v===_.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(v===_.Down?p.bottom-p.height/2:p.bottom,Math.max(v===_.Down?p.top:p.top+p.height/2,d.y))},b=v===_.Right&&!C||v===_.Left&&!S,w=v===_.Down&&!j||v===_.Up&&!R;if(b&&y.x!==d.x){const I=x.scrollLeft+g.x,O=v===_.Right&&I<=T.x||v===_.Left&&I>=A.x;if(O&&!g.y){x.scrollTo({left:I,behavior:c});return}O?m.x=x.scrollLeft-I:m.x=v===_.Right?x.scrollLeft-T.x:x.scrollLeft-A.x,m.x&&x.scrollBy({left:-m.x,behavior:c});break}else if(w&&y.y!==d.y){const I=x.scrollTop+g.y,O=v===_.Down&&I<=T.y||v===_.Up&&I>=A.y;if(O&&!g.x){x.scrollTo({top:I,behavior:c});return}O?m.y=x.scrollTop-I:m.y=v===_.Down?x.scrollTop-T.y:x.scrollTop-A.y,m.y&&x.scrollBy({top:-m.y,behavior:c});break}}this.handleMove(e,tt(bt(d,this.referenceCoordinates),m))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}nr.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=tr,onActivation:o}=e,{active:s}=n;const{code:a}=t.nativeEvent;if(r.start.includes(a)){const c=s.activatorNode.current;return c&&t.target!==c?!1:(t.preventDefault(),o?.({event:t.nativeEvent}),!0)}return!1}}];function Sn(t){return!!(t&&"distance"in t)}function Dn(t){return!!(t&&"delay"in t)}class un{constructor(e,n,r){var o;r===void 0&&(r=Jo(e.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=e,this.events=n;const{event:s}=e,{target:a}=s;this.props=e,this.events=n,this.document=rt(a),this.documentListeners=new gt(this.document),this.listeners=new gt(r),this.windowListeners=new gt(Q(a)),this.initialCoordinates=(o=Mt(s))!=null?o:be,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:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.DragStart,Cn),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),this.windowListeners.add(fe.ContextMenu,Cn),this.documentListeners.add(fe.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Dn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Sn(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(e,n){const{active:r,onPending:o}=this.props;o(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(fe.Click,Qo,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fe.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:a,options:{activationConstraint:c}}=s;if(!o)return;const l=(n=Mt(e))!=null?n:be,f=bt(o,l);if(!r&&c){if(Sn(c)){if(c.tolerance!=null&&tn(f,c.tolerance))return this.handleCancel();if(tn(f,c.distance))return this.handleStart()}if(Dn(c)&&tn(f,c.tolerance))return this.handleCancel();this.handlePending(c,f);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===_.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const es={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class rr extends un{constructor(e){const{event:n}=e,r=rt(n.target);super(e,es,r)}}rr.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const ts={move:{name:"mousemove"},end:{name:"mouseup"}};var on;(function(t){t[t.RightClick=2]="RightClick"})(on||(on={}));class ns extends un{constructor(e){super(e,ts,rt(e.event.target))}}ns.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===on.RightClick?!1:(r?.({event:n}),!0)}}];const nn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class rs extends un{constructor(e){super(e,nn)}static setup(){return window.addEventListener(nn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(nn.move.name,e)};function e(){}}}rs.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var pt;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(pt||(pt={}));var Pt;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Pt||(Pt={}));function os(t){let{acceleration:e,activator:n=pt.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:a=5,order:c=Pt.TreeOrder,pointerCoordinates:l,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:g}=t;const m=is({delta:d,disabled:!s}),[N,x]=xo(),v=u.useRef({x:0,y:0}),R=u.useRef({x:0,y:0}),C=u.useMemo(()=>{switch(n){case pt.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case pt.DraggableRect:return o}},[n,o,l]),S=u.useRef(null),j=u.useCallback(()=>{const A=S.current;if(!A)return;const p=v.current.x*R.current.x,y=v.current.y*R.current.y;A.scrollBy(p,y)},[]),T=u.useMemo(()=>c===Pt.TreeOrder?[...f].reverse():f,[c,f]);u.useEffect(()=>{if(!s||!f.length||!C){x();return}for(const A of T){if(r?.(A)===!1)continue;const p=f.indexOf(A),y=h[p];if(!y)continue;const{direction:b,speed:w}=Ho(A,y,C,e,g);for(const I of["x","y"])m[I][b[I]]||(w[I]=0,b[I]=0);if(w.x>0||w.y>0){x(),S.current=A,N(j,a),v.current=w,R.current=b;return}}v.current={x:0,y:0},R.current={x:0,y:0},x()},[e,j,r,x,s,a,JSON.stringify(C),JSON.stringify(m),N,f,T,h,JSON.stringify(g)])}const ss={x:{[K.Backward]:!1,[K.Forward]:!1},y:{[K.Backward]:!1,[K.Forward]:!1}};function is(t){let{delta:e,disabled:n}=t;const r=kt(e);return wt(o=>{if(n||!r||!o)return ss;const s={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[K.Backward]:o.x[K.Backward]||s.x===-1,[K.Forward]:o.x[K.Forward]||s.x===1},y:{[K.Backward]:o.y[K.Backward]||s.y===-1,[K.Forward]:o.y[K.Forward]||s.y===1}}},[n,e,r])}function as(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return wt(o=>{var s;return e==null?null:(s=r??o)!=null?s:null},[r,e])}function cs(t,e){return u.useMemo(()=>t.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,r)}));return[...n,...s]},[]),[t,e])}var xt;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(xt||(xt={}));var sn;(function(t){t.Optimized="optimized"})(sn||(sn={}));const Rn=new Map;function ls(t,e){let{dragging:n,dependencies:r,config:o}=e;const[s,a]=u.useState(null),{frequency:c,measure:l,strategy:f}=o,h=u.useRef(t),d=v(),g=mt(d),m=u.useCallback(function(R){R===void 0&&(R=[]),!g.current&&a(C=>C===null?R:C.concat(R.filter(S=>!C.includes(S))))},[g]),N=u.useRef(null),x=wt(R=>{if(d&&!n)return Rn;if(!R||R===Rn||h.current!==t||s!=null){const C=new Map;for(let S of t){if(!S)continue;if(s&&s.length>0&&!s.includes(S.id)&&S.rect.current){C.set(S.id,S.rect.current);continue}const j=S.node.current,T=j?new dn(l(j),j):null;S.rect.current=T,T&&C.set(S.id,T)}return C}return R},[t,s,n,d,l]);return u.useEffect(()=>{h.current=t},[t]),u.useEffect(()=>{d||m()},[n,d]),u.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),u.useEffect(()=>{d||typeof c!="number"||N.current!==null||(N.current=setTimeout(()=>{m(),N.current=null},c))},[c,d,m,...r]),{droppableRects:x,measureDroppableContainers:m,measuringScheduled:s!=null};function v(){switch(f){case xt.Always:return!1;case xt.BeforeDragging:return n;default:return!n}}}function fn(t,e){return wt(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function ds(t,e){return fn(t,e)}function us(t){let{callback:e,disabled:n}=t;const r=Bt(e),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function Xt(t){let{callback:e,disabled:n}=t;const r=Bt(e),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function fs(t){return new dn(ot(t),t)}function jn(t,e,n){e===void 0&&(e=fs);const[r,o]=u.useState(null);function s(){o(l=>{if(!t)return null;if(t.isConnected===!1){var f;return(f=l??n)!=null?f:null}const h=e(t);return JSON.stringify(l)===JSON.stringify(h)?l:h})}const a=us({callback(l){if(t)for(const f of l){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(t)){s();break}}}}),c=Xt({callback:s});return me(()=>{s(),t?(c?.observe(t),a?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),a?.disconnect())},[t]),r}function hs(t){const e=fn(t);return Hn(t,e)}const Nn=[];function gs(t){const e=u.useRef(t),n=wt(r=>t?r&&r!==Nn&&t&&e.current&&t.parentNode===e.current.parentNode?r:Vt(t):Nn,[t]);return u.useEffect(()=>{e.current=t},[t]),n}function ps(t){const[e,n]=u.useState(null),r=u.useRef(t),o=u.useCallback(s=>{const a=en(s.target);a&&n(c=>c?(c.set(a,rn(a)),new Map(c)):null)},[]);return u.useEffect(()=>{const s=r.current;if(t!==s){a(s);const c=t.map(l=>{const f=en(l);return f?(f.addEventListener("scroll",o,{passive:!0}),[f,rn(f)]):null}).filter(l=>l!=null);n(c.length?new Map(c):null),r.current=t}return()=>{a(t),a(s)};function a(c){c.forEach(l=>{const f=en(l);f?.removeEventListener("scroll",o)})}},[o,t]),u.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,a)=>tt(s,a),be):Zn(t):be,[t,e])}function In(t,e){e===void 0&&(e=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},e),u.useEffect(()=>{const r=t!==be;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?bt(t,n.current):be}function vs(t){u.useEffect(()=>{if(!zt)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function ms(t,e){return u.useMemo(()=>t.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=a=>{s(a,e)},n},{}),[t,e])}function or(t){return u.useMemo(()=>t?Vo(t):null,[t])}const An=[];function bs(t,e){e===void 0&&(e=ot);const[n]=t,r=or(n?Q(n):null),[o,s]=u.useState(An);function a(){s(()=>t.length?t.map(l=>Jn(l)?r:new dn(e(l),l)):An)}const c=Xt({callback:a});return me(()=>{c?.disconnect(),a(),t.forEach(l=>c?.observe(l))},[t]),o}function sr(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return yt(e)?e:t}function xs(t){let{measure:e}=t;const[n,r]=u.useState(null),o=u.useCallback(f=>{for(const{target:h}of f)if(yt(h)){r(d=>{const g=e(h);return d?{...d,width:g.width,height:g.height}:g});break}},[e]),s=Xt({callback:o}),a=u.useCallback(f=>{const h=sr(f);s?.disconnect(),h&&s?.observe(h),r(h?e(h):null)},[e,s]),[c,l]=_t(a);return u.useMemo(()=>({nodeRef:c,rect:n,setRef:l}),[n,c,l])}const ys=[{sensor:rr,options:{}},{sensor:nr,options:{}}],ws={current:{}},Tt={draggable:{measure:wn},droppable:{measure:wn,strategy:xt.WhileDragging,frequency:sn.Optimized},dragOverlay:{measure:ot}};class vt extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const Cs={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ot},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Tt,measureDroppableContainers:Ot,windowRect:null,measuringScheduled:!1},ir={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ot,draggableNodes:new Map,over:null,measureDroppableContainers:Ot},St=u.createContext(ir),ar=u.createContext(Cs);function Ss(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vt}}}function Ds(t,e){switch(e.type){case V.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case V.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case V.DragEnd:case V.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case V.RegisterDroppable:{const{element:n}=e,{id:r}=n,o=new vt(t.droppable.containers);return o.set(r,n),{...t,droppable:{...t.droppable,containers:o}}}case V.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const a=new vt(t.droppable.containers);return a.set(n,{...s,disabled:o}),{...t,droppable:{...t.droppable,containers:a}}}case V.UnregisterDroppable:{const{id:n,key:r}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const s=new vt(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function Rs(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:o}=u.useContext(St),s=kt(r),a=kt(n?.id);return u.useEffect(()=>{if(!e&&!r&&s&&a!=null){if(!$t(s)||document.activeElement===s.target)return;const c=o.get(a);if(!c)return;const{activatorNode:l,node:f}=c;if(!l.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[l.current,f.current]){if(!h)continue;const d=Co(h);if(d){d.focus();break}}})}},[r,e,o,a,s]),null}function cr(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((o,s)=>s({transform:o,...r}),n):n}function js(t){return u.useMemo(()=>({draggable:{...Tt.draggable,...t?.draggable},droppable:{...Tt.droppable,...t?.droppable},dragOverlay:{...Tt.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function Ns(t){let{activeNode:e,measure:n,initialRect:r,config:o=!0}=t;const s=u.useRef(!1),{x:a,y:c}=typeof o=="boolean"?{x:o,y:o}:o;me(()=>{if(!a&&!c||!e){s.current=!1;return}if(s.current||!r)return;const f=e?.node.current;if(!f||f.isConnected===!1)return;const h=n(f),d=Hn(h,r);if(a||(d.x=0),c||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=Wn(f);g&&g.scrollBy({top:d.y,left:d.x})}},[e,a,c,r,n])}const Kt=u.createContext({...be,scaleX:1,scaleY:1});var Ke;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ke||(Ke={}));const Wi=u.memo(function(e){var n,r,o,s;let{id:a,accessibility:c,autoScroll:l=!0,children:f,sensors:h=ys,collisionDetection:d=Po,measuring:g,modifiers:m,...N}=e;const x=u.useReducer(Ds,void 0,Ss),[v,R]=x,[C,S]=Io(),[j,T]=u.useState(Ke.Uninitialized),A=j===Ke.Initialized,{draggable:{active:p,nodes:y,translate:b},droppable:{containers:w}}=v,I=p!=null?y.get(p):null,O=u.useRef({initial:null,translated:null}),k=u.useMemo(()=>{var F;return p!=null?{id:p,data:(F=I?.data)!=null?F:ws,rect:O}:null},[p,I]),E=u.useRef(null),[B,ae]=u.useState(null),[X,Y]=u.useState(null),ce=mt(N,Object.values(N)),xe=Ct("DndDescribedBy",a),qe=u.useMemo(()=>w.getEnabled(),[w]),$=js(g),{droppableRects:U,measureDroppableContainers:he,measuringScheduled:Ae}=ls(qe,{dragging:A,dependencies:[b.x,b.y],config:$.droppable}),L=as(y,p),Ue=u.useMemo(()=>X?Mt(X):null,[X]),Z=te(),W=ds(L,$.draggable.measure);Ns({activeNode:p!=null?y.get(p):null,config:Z.layoutShiftCompensation,initialRect:W,measure:$.draggable.measure});const M=jn(L,$.draggable.measure,W),Ee=jn(L?L.parentElement:null),q=u.useRef({activatorEvent:null,active:null,activeNode:L,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:w,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=w.getNodeFor((n=q.current.over)==null?void 0:n.id),ee=xs({measure:$.dragOverlay.measure}),Te=(r=ee.nodeRef.current)!=null?r:L,ye=A?(o=ee.rect)!=null?o:M:null,Ge=!!(ee.nodeRef.current&&ee.rect),_e=hs(Ge?null:M),st=or(Te?Q(Te):null),ne=gs(A?ge??L:null),Fe=bs(ne),pe=cr(m,{transform:{x:b.x-_e.x,y:b.y-_e.y,scaleX:1,scaleY:1},activatorEvent:X,active:k,activeNodeRect:M,containerNodeRect:Ee,draggingNodeRect:ye,over:q.current.over,overlayNodeRect:ee.rect,scrollableAncestors:ne,scrollableAncestorRects:Fe,windowRect:st}),ke=Ue?tt(Ue,b):null,Je=ps(ne),it=In(Je),at=In(Je,[M]),we=tt(pe,it),re=ye?zo(ye,pe):null,le=k&&re?d({active:k,collisionRect:re,droppableRects:U,droppableContainers:qe,pointerCoordinates:ke}):null,Me=Un(le,"id"),[G,Oe]=u.useState(null),Qe=Ge?pe:tt(pe,at),D=Lo(Qe,(s=G?.rect)!=null?s:null,M),P=u.useRef(null),de=u.useCallback((F,oe)=>{let{sensor:se,options:$e}=oe;if(E.current==null)return;const ue=y.get(E.current);if(!ue)return;const ie=F.nativeEvent,Ce=new se({active:E.current,activeNode:ue,event:ie,options:$e,context:q,onAbort(H){if(!y.get(H))return;const{onDragAbort:Se}=ce.current,Pe={id:H};Se?.(Pe),C({type:"onDragAbort",event:Pe})},onPending(H,Ve,Se,Pe){if(!y.get(H))return;const{onDragPending:lt}=ce.current,Xe={id:H,constraint:Ve,initialCoordinates:Se,offset:Pe};lt?.(Xe),C({type:"onDragPending",event:Xe})},onStart(H){const Ve=E.current;if(Ve==null)return;const Se=y.get(Ve);if(!Se)return;const{onDragStart:Pe}=ce.current,ct={activatorEvent:ie,active:{id:Ve,data:Se.data,rect:O}};ft.unstable_batchedUpdates(()=>{Pe?.(ct),T(Ke.Initializing),R({type:V.DragStart,initialCoordinates:H,active:Ve}),C({type:"onDragStart",event:ct}),ae(P.current),Y(ie)})},onMove(H){R({type:V.DragMove,coordinates:H})},onEnd:et(V.DragEnd),onCancel:et(V.DragCancel)});P.current=Ce;function et(H){return async function(){const{active:Se,collisions:Pe,over:ct,scrollAdjustedTranslate:lt}=q.current;let Xe=null;if(Se&<){const{cancelDrop:dt}=ce.current;Xe={activatorEvent:ie,active:Se,collisions:Pe,delta:lt,over:ct},H===V.DragEnd&&typeof dt=="function"&&await Promise.resolve(dt(Xe))&&(H=V.DragCancel)}E.current=null,ft.unstable_batchedUpdates(()=>{R({type:H}),T(Ke.Uninitialized),Oe(null),ae(null),Y(null),P.current=null;const dt=H===V.DragEnd?"onDragEnd":"onDragCancel";if(Xe){const Ut=ce.current[dt];Ut?.(Xe),C({type:dt,event:Xe})}})}}},[y]),ze=u.useCallback((F,oe)=>(se,$e)=>{const ue=se.nativeEvent,ie=y.get($e);if(E.current!==null||!ie||ue.dndKit||ue.defaultPrevented)return;const Ce={active:ie};F(se,oe.options,Ce)===!0&&(ue.dndKit={capturedBy:oe.sensor},E.current=$e,de(se,oe))},[y,de]),ve=cs(h,ze);vs(h),me(()=>{M&&j===Ke.Initializing&&T(Ke.Initialized)},[M,j]),u.useEffect(()=>{const{onDragMove:F}=ce.current,{active:oe,activatorEvent:se,collisions:$e,over:ue}=q.current;if(!oe||!se)return;const ie={active:oe,activatorEvent:se,collisions:$e,delta:{x:we.x,y:we.y},over:ue};ft.unstable_batchedUpdates(()=>{F?.(ie),C({type:"onDragMove",event:ie})})},[we.x,we.y]),u.useEffect(()=>{const{active:F,activatorEvent:oe,collisions:se,droppableContainers:$e,scrollAdjustedTranslate:ue}=q.current;if(!F||E.current==null||!oe||!ue)return;const{onDragOver:ie}=ce.current,Ce=$e.get(Me),et=Ce&&Ce.rect.current?{id:Ce.id,rect:Ce.rect.current,data:Ce.data,disabled:Ce.disabled}:null,H={active:F,activatorEvent:oe,collisions:se,delta:{x:ue.x,y:ue.y},over:et};ft.unstable_batchedUpdates(()=>{Oe(et),ie?.(H),C({type:"onDragOver",event:H})})},[Me]),me(()=>{q.current={activatorEvent:X,active:k,activeNode:L,collisionRect:re,collisions:le,droppableRects:U,draggableNodes:y,draggingNode:Te,draggingNodeRect:ye,droppableContainers:w,over:G,scrollableAncestors:ne,scrollAdjustedTranslate:we},O.current={initial:ye,translated:re}},[k,L,le,re,y,Te,ye,U,w,G,ne,we]),os({...Z,delta:b,draggingRect:re,pointerCoordinates:ke,scrollableAncestors:ne,scrollableAncestorRects:Fe});const Ze=u.useMemo(()=>({active:k,activeNode:L,activeNodeRect:M,activatorEvent:X,collisions:le,containerNodeRect:Ee,dragOverlay:ee,draggableNodes:y,droppableContainers:w,droppableRects:U,over:G,measureDroppableContainers:he,scrollableAncestors:ne,scrollableAncestorRects:Fe,measuringConfiguration:$,measuringScheduled:Ae,windowRect:st}),[k,L,M,X,le,Ee,ee,y,w,U,G,he,ne,Fe,$,Ae,st]),Be=u.useMemo(()=>({activatorEvent:X,activators:ve,active:k,activeNodeRect:M,ariaDescribedById:{draggable:xe},dispatch:R,draggableNodes:y,over:G,measureDroppableContainers:he}),[X,ve,k,M,R,xe,y,G,he]);return z.createElement(Vn.Provider,{value:S},z.createElement(St.Provider,{value:Be},z.createElement(ar.Provider,{value:Ze},z.createElement(Kt.Provider,{value:D},f)),z.createElement(Rs,{disabled:c?.restoreFocus===!1})),z.createElement(To,{...c,hiddenTextDescribedById:xe}));function te(){const F=B?.autoScrollEnabled===!1,oe=typeof l=="object"?l.enabled===!1:l===!1,se=A&&!F&&!oe;return typeof l=="object"?{...l,enabled:se}:{enabled:se}}}),Is=u.createContext(null),En="button",As="Draggable";function Es(t){let{id:e,data:n,disabled:r=!1,attributes:o}=t;const s=Ct(As),{activators:a,activatorEvent:c,active:l,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:g}=u.useContext(St),{role:m=En,roleDescription:N="draggable",tabIndex:x=0}=o??{},v=l?.id===e,R=u.useContext(v?Kt:Is),[C,S]=_t(),[j,T]=_t(),A=ms(a,e),p=mt(n);me(()=>(d.set(e,{id:e,key:s,node:C,activatorNode:j,data:p}),()=>{const b=d.get(e);b&&b.key===s&&d.delete(e)}),[d,e]);const y=u.useMemo(()=>({role:m,tabIndex:x,"aria-disabled":r,"aria-pressed":v&&m===En?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[r,m,x,v,N,h.draggable]);return{active:l,activatorEvent:c,activeNodeRect:f,attributes:y,isDragging:v,listeners:r?void 0:A,node:C,over:g,setNodeRef:S,setActivatorNodeRef:T,transform:R}}function lr(){return u.useContext(ar)}const Ts="Droppable",_s={timeout:25};function ks(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:o}=t;const s=Ct(Ts),{active:a,dispatch:c,over:l,measureDroppableContainers:f}=u.useContext(St),h=u.useRef({disabled:n}),d=u.useRef(!1),g=u.useRef(null),m=u.useRef(null),{disabled:N,updateMeasurementsFor:x,timeout:v}={..._s,...o},R=mt(x??r),C=u.useCallback(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{f(Array.isArray(R.current)?R.current:[R.current]),m.current=null},v)},[v]),S=Xt({callback:C,disabled:N||!a}),j=u.useCallback((y,b)=>{S&&(b&&(S.unobserve(b),d.current=!1),y&&S.observe(y))},[S]),[T,A]=_t(j),p=mt(e);return u.useEffect(()=>{!S||!T.current||(S.disconnect(),d.current=!1,S.observe(T.current))},[T,S]),u.useEffect(()=>(c({type:V.RegisterDroppable,element:{id:r,key:s,disabled:n,node:T,rect:g,data:p}}),()=>c({type:V.UnregisterDroppable,key:s,id:r})),[r]),u.useEffect(()=>{n!==h.current.disabled&&(c({type:V.SetDroppableDisabled,id:r,key:s,disabled:n}),h.current.disabled=n)},[r,s,n,c]),{active:a,rect:g,isOver:l?.id===r,node:T,over:l,setNodeRef:A}}function Ms(t){let{animation:e,children:n}=t;const[r,o]=u.useState(null),[s,a]=u.useState(null),c=kt(n);return!n&&!r&&c&&o(c),me(()=>{if(!s)return;const l=r?.key,f=r?.props.id;if(l==null||f==null){o(null);return}Promise.resolve(e(f,s)).then(()=>{o(null)})},[e,r,s]),z.createElement(z.Fragment,null,n,r?u.cloneElement(r,{ref:a}):null)}const Os={x:0,y:0,scaleX:1,scaleY:1};function Ps(t){let{children:e}=t;return z.createElement(St.Provider,{value:ir},z.createElement(Kt.Provider,{value:Os},e))}const Ls={position:"fixed",touchAction:"none"},Fs=t=>$t(t)?"transform 250ms ease":void 0,zs=u.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:a,rect:c,style:l,transform:f,transition:h=Fs}=t;if(!c)return null;const d=o?f:{...f,scaleX:1,scaleY:1},g={...Ls,width:c.width,height:c.height,top:c.top,left:c.left,transform:We.Transform.toString(d),transformOrigin:o&&r?_o(r,c):void 0,transition:typeof h=="function"?h(r):h,...l};return z.createElement(n,{className:a,style:g,ref:e},s)}),Bs=t=>e=>{let{active:n,dragOverlay:r}=e;const o={},{styles:s,className:a}=t;if(s!=null&&s.active)for(const[c,l]of Object.entries(s.active))l!==void 0&&(o[c]=n.node.style.getPropertyValue(c),n.node.style.setProperty(c,l));if(s!=null&&s.dragOverlay)for(const[c,l]of Object.entries(s.dragOverlay))l!==void 0&&r.node.style.setProperty(c,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,f]of Object.entries(o))n.node.style.setProperty(l,f);a!=null&&a.active&&n.node.classList.remove(a.active)}},$s=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:We.Transform.toString(e)},{transform:We.Transform.toString(n)}]},Vs={duration:250,easing:"ease",keyframes:$s,sideEffects:Bs({styles:{active:{opacity:"0"}}})};function Xs(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=t;return Bt((s,a)=>{if(e===null)return;const c=n.get(s);if(!c)return;const l=c.node.current;if(!l)return;const f=sr(a);if(!f)return;const{transform:h}=Q(a).getComputedStyle(a),d=Yn(h);if(!d)return;const g=typeof e=="function"?e:Ks(e);return er(l,o.draggable.measure),g({active:{id:s,data:c.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(f)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function Ks(t){const{duration:e,easing:n,sideEffects:r,keyframes:o}={...Vs,...t};return s=>{let{active:a,dragOverlay:c,transform:l,...f}=s;if(!e)return;const h={x:c.rect.left-a.rect.left,y:c.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/c.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/c.rect.height:1},g={x:l.x-h.x,y:l.y-h.y,...d},m=o({...f,active:a,dragOverlay:c,transform:{initial:l,final:g}}),[N]=m,x=m[m.length-1];if(JSON.stringify(N)===JSON.stringify(x))return;const v=r?.({active:a,dragOverlay:c,...f}),R=c.node.animate(m,{duration:e,easing:n,fill:"forwards"});return new Promise(C=>{R.onfinish=()=>{v?.(),C()}})}}let Tn=0;function Us(t){return u.useMemo(()=>{if(t!=null)return Tn++,Tn},[t])}const qi=z.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:a,wrapperElement:c="div",className:l,zIndex:f=999}=t;const{activatorEvent:h,active:d,activeNodeRect:g,containerNodeRect:m,draggableNodes:N,droppableContainers:x,dragOverlay:v,over:R,measuringConfiguration:C,scrollableAncestors:S,scrollableAncestorRects:j,windowRect:T}=lr(),A=u.useContext(Kt),p=Us(d?.id),y=cr(a,{activatorEvent:h,active:d,activeNodeRect:g,containerNodeRect:m,draggingNodeRect:v.rect,over:R,overlayNodeRect:v.rect,scrollableAncestors:S,scrollableAncestorRects:j,transform:A,windowRect:T}),b=fn(g),w=Xs({config:r,draggableNodes:N,droppableContainers:x,measuringConfiguration:C}),I=b?v.setRef:void 0;return z.createElement(Ps,null,z.createElement(Ms,{animation:w},d&&p?z.createElement(zs,{key:p,id:d.id,ref:I,as:c,activatorEvent:h,adjustScale:e,className:l,transition:s,rect:b,style:{zIndex:f,...o},transform:y},n):null))});function dr(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function Hs(t,e){return t.reduce((n,r,o)=>{const s=e.get(r);return s&&(n[o]=s),n},Array(t.length))}function jt(t){return t!==null&&t>=0}function Ys(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ws(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Nt={scaleX:1,scaleY:1},Gi=t=>{var e;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:s,index:a}=t;const c=(e=n[o])!=null?e:r;if(!c)return null;const l=qs(n,a,o);if(a===o){const f=n[s];return f?{x:o<s?f.left+f.width-(c.left+c.width):f.left-c.left,y:0,...Nt}:null}return a>o&&a<=s?{x:-c.width-l,y:0,...Nt}:a<o&&a>=s?{x:c.width+l,y:0,...Nt}:{x:0,y:0,...Nt}};function qs(t,e,n){const r=t[e],o=t[e-1],s=t[e+1];return!r||!o&&!s?0:n<e?o?r.left-(o.left+o.width):s.left-(r.left+r.width):s?s.left-(r.left+r.width):r.left-(o.left+o.width)}const ur=t=>{let{rects:e,activeIndex:n,overIndex:r,index:o}=t;const s=dr(e,r,n),a=e[o],c=s[o];return!c||!a?null:{x:c.left-a.left,y:c.top-a.top,scaleX:c.width/a.width,scaleY:c.height/a.height}},It={scaleX:1,scaleY:1},Ji=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:a}=t;const c=(e=s[n])!=null?e:r;if(!c)return null;if(o===n){const f=s[a];return f?{x:0,y:n<a?f.top+f.height-(c.top+c.height):f.top-c.top,...It}:null}const l=Gs(s,o,n);return o>n&&o<=a?{x:0,y:-c.height-l,...It}:o<n&&o>=a?{x:0,y:c.height+l,...It}:{x:0,y:0,...It}};function Gs(t,e,n){const r=t[e],o=t[e-1],s=t[e+1];return r?n<e?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const fr="Sortable",hr=z.createContext({activeIndex:-1,containerId:fr,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ur,disabled:{draggable:!1,droppable:!1}});function Qi(t){let{children:e,id:n,items:r,strategy:o=ur,disabled:s=!1}=t;const{active:a,dragOverlay:c,droppableRects:l,over:f,measureDroppableContainers:h}=lr(),d=Ct(fr,n),g=c.rect!==null,m=u.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),N=a!=null,x=a?m.indexOf(a.id):-1,v=f?m.indexOf(f.id):-1,R=u.useRef(m),C=!Ys(m,R.current),S=v!==-1&&x===-1||C,j=Ws(s);me(()=>{C&&N&&h(m)},[C,m,N,h]),u.useEffect(()=>{R.current=m},[m]);const T=u.useMemo(()=>({activeIndex:x,containerId:d,disabled:j,disableTransforms:S,items:m,overIndex:v,useDragOverlay:g,sortedRects:Hs(m,l),strategy:o}),[x,d,j.draggable,j.droppable,S,m,v,l,g,o]);return z.createElement(hr.Provider,{value:T},e)}const Js=t=>{let{id:e,items:n,activeIndex:r,overIndex:o}=t;return dr(n,r,o).indexOf(e)},Qs=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:o,items:s,newIndex:a,previousItems:c,previousContainerId:l,transition:f}=t;return!f||!r||c!==s&&o===a?!1:n?!0:a!==o&&e===l},Zs={duration:200,easing:"ease"},gr="transform",ei=We.Transition.toString({property:gr,duration:0,easing:"linear"}),ti={roleDescription:"sortable"};function ni(t){let{disabled:e,index:n,node:r,rect:o}=t;const[s,a]=u.useState(null),c=u.useRef(n);return me(()=>{if(!e&&n!==c.current&&r.current){const l=o.current;if(l){const f=ot(r.current,{ignoreTransform:!0}),h={x:l.left-f.left,y:l.top-f.top,scaleX:l.width/f.width,scaleY:l.height/f.height};(h.x||h.y)&&a(h)}}n!==c.current&&(c.current=n)},[e,n,r,o]),u.useEffect(()=>{s&&a(null)},[s]),s}function Zi(t){let{animateLayoutChanges:e=Qs,attributes:n,disabled:r,data:o,getNewIndex:s=Js,id:a,strategy:c,resizeObserverConfig:l,transition:f=Zs}=t;const{items:h,containerId:d,activeIndex:g,disabled:m,disableTransforms:N,sortedRects:x,overIndex:v,useDragOverlay:R,strategy:C}=u.useContext(hr),S=ri(r,m),j=h.indexOf(a),T=u.useMemo(()=>({sortable:{containerId:d,index:j,items:h},...o}),[d,o,j,h]),A=u.useMemo(()=>h.slice(h.indexOf(a)),[h,a]),{rect:p,node:y,isOver:b,setNodeRef:w}=ks({id:a,data:T,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...l}}),{active:I,activatorEvent:O,activeNodeRect:k,attributes:E,setNodeRef:B,listeners:ae,isDragging:X,over:Y,setActivatorNodeRef:ce,transform:xe}=Es({id:a,data:T,attributes:{...ti,...n},disabled:S.draggable}),qe=bo(w,B),$=!!I,U=$&&!N&&jt(g)&&jt(v),he=!R&&X,Ae=he&&U?xe:null,Ue=U?Ae??(c??C)({rects:x,activeNodeRect:k,activeIndex:g,overIndex:v,index:j}):null,Z=jt(g)&&jt(v)?s({id:a,items:h,activeIndex:g,overIndex:v}):j,W=I?.id,M=u.useRef({activeId:W,items:h,newIndex:Z,containerId:d}),Ee=h!==M.current.items,q=e({active:I,containerId:d,isDragging:X,isSorting:$,id:a,index:j,items:h,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:f,wasDragging:M.current.activeId!=null}),ge=ni({disabled:!q,index:j,node:y,rect:p});return u.useEffect(()=>{$&&M.current.newIndex!==Z&&(M.current.newIndex=Z),d!==M.current.containerId&&(M.current.containerId=d),h!==M.current.items&&(M.current.items=h)},[$,Z,d,h]),u.useEffect(()=>{if(W===M.current.activeId)return;if(W!=null&&M.current.activeId==null){M.current.activeId=W;return}const Te=setTimeout(()=>{M.current.activeId=W},50);return()=>clearTimeout(Te)},[W]),{active:I,activeIndex:g,attributes:E,data:T,rect:p,index:j,newIndex:Z,items:h,isOver:b,isSorting:$,isDragging:X,listeners:ae,node:y,overIndex:v,over:Y,setNodeRef:qe,setActivatorNodeRef:ce,setDroppableNodeRef:w,setDraggableNodeRef:B,transform:ge??Ue,transition:ee()};function ee(){if(ge||Ee&&M.current.newIndex===j)return ei;if(!(he&&!$t(O)||!f)&&($||q))return We.Transition.toString({...f,property:gr})}}function ri(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function Lt(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const oi=[_.Down,_.Right,_.Up,_.Left],ea=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:a,scrollableAncestors:c}}=e;if(oi.includes(t.code)){if(t.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const g=o.get(d.id);if(g)switch(t.code){case _.Down:r.top<g.top&&l.push(d);break;case _.Up:r.top>g.top&&l.push(d);break;case _.Left:r.left>g.left&&l.push(d);break;case _.Right:r.left<g.left&&l.push(d);break}});const f=Mo({collisionRect:r,droppableRects:o,droppableContainers:l});let h=Un(f,"id");if(h===a?.id&&f.length>1&&(h=f[1].id),h!=null){const d=s.get(n.id),g=s.get(h),m=g?o.get(g.id):null,N=g?.node.current;if(N&&m&&d&&g){const v=Vt(N).some((A,p)=>c[p]!==A),R=pr(d,g),C=si(d,g),S=v||!R?{x:0,y:0}:{x:C?r.width-m.width:0,y:C?r.height-m.height:0},j={x:m.left,y:m.top};return S.x&&S.y?j:bt(j,S)}}}};function pr(t,e){return!Lt(t)||!Lt(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function si(t,e){return!Lt(t)||!Lt(e)||!pr(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}export{Xi as A,We as C,Wi as D,nr as K,rr as P,Qi as S,Oi as a,Hi as b,Ui as c,Yi as d,Zi as e,Bi as f,zi as g,Vi as h,Li as i,Pi as j,qi as k,dr as l,$i as m,Fi as n,Es as o,Gi as p,an as r,ea as s,Ki as u,Ji as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,r as
|
|
1
|
+
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-BlbGtC1U.js";import{D as k}from"./domain-settings-xhuDCJzA.js";import{P as f}from"./index-BBWislhf.js";import{I as l}from"./input-DHDgjmX0.js";import{S as z}from"./switch-Dprre6Tx.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DHz7VJ1a.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-BlH2FRiM.js";import{s as L}from"./Trash01-CbqEHpx0.js";import{R as q}from"./require-capability-D2RrR3BZ.js";import"./studio-tools-7mZABBZl.js";import"./badge-BGbD2JMR.js";import"./select-DxONb3Kt.js";import"./tooltip-oPF11xOc.js";import"./ChevronUp-uk87fvlM.js";import"./ChevronDown-DM7Zg7z0.js";import"./sidebar-BjIzPMot.js";import"./LayoutLeft-y1fOcQ0I.js";import"./use-mobile-BKRfr7ic.js";import"./sheet-C2Kfge9r.js";import"./X-DEdLuuqP.js";import"./card-DjLKG66H.js";import"./ArrowUpRight-CA22UP6Q.js";import"./use-capability-CREa5hxg.js";import"./access-gate-C9EgwKjC.js";import"./capability-load-error-7-bUVJZE.js";function B(){const{org:s}=_(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),v=T(s.id,s.slug),[t,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,w as te,K as fe,d as ge,t as ie}from"./index-j1EmgqV8.js";import{i as ue}from"./AlertCircle-B7YwjVuv.js";import{i as pe}from"./ChevronRight-Cw6r4eF5.js";import{s as xe}from"./Plus-DrCr8atg.js";import{s as he}from"./Trash01-C3HJx9Eu.js";import{I as X}from"./input-zUoMTUjz.js";import{S as oe}from"./switch-CjEoRRuC.js";import{S as ye}from"./skeleton-U2Av8cLZ.js";import{A as ne}from"./avatar-CdYywjB8.js";import{P as je,a as Ce,b as Se}from"./popover-DU5qAOzi.js";import{b as re}from"./use-connection-a48WkDyi.js";import{W as Z}from"./use-mcp-client-B1E7Nyjd.js";import{P as G}from"./index-DuwRwNmr.js";import{u as ve}from"./use-registry-connections-D2DhXJmA.js";import{f as _e,g as be}from"./use-organization-settings-8LInvXec.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-CNscyKHW.js";import{R as Re}from"./require-capability-CehH7jAZ.js";import"./User01-TldGh0YP.js";import"./use-collections-DOhjyZoW.js";import"./auth-B9AdzGWs.js";import"./sidebar-D5j5gPeI.js";import"./LayoutLeft-B7KWV4nT.js";import"./use-mobile-CWv_pUWp.js";import"./sheet-DahuGsa4.js";import"./X-D1lT84o6.js";import"./tooltip-D2IcwsrW.js";import"./studio-tools-BAmwKCdT.js";import"./card-Dt5JuJj0.js";import"./ArrowUpRight-DvElag-V.js";import"./use-capability-BYfWBphf.js";import"./access-gate-BY3tN2ja.js";import"./capability-load-error-CFxZVJfo.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
1
|
+
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-BlbGtC1U.js";import{i as ue}from"./AlertCircle-BJzQ1lVJ.js";import{i as pe}from"./ChevronRight-CKc4NZet.js";import{s as xe}from"./Plus-Bi8BbQwT.js";import{s as he}from"./Trash01-CbqEHpx0.js";import{I as X}from"./input-DHDgjmX0.js";import{S as oe}from"./switch-Dprre6Tx.js";import{S as ye}from"./skeleton-BG0I4KDd.js";import{A as ne}from"./avatar-VZM5i0Ki.js";import{P as je,a as Ce,b as ve}from"./popover-Do5OoBkb.js";import{b as re}from"./use-connection-BaK7gZK8.js";import{W as Z}from"./use-mcp-client-BYcrk6lz.js";import{P as G}from"./index-BBWislhf.js";import{u as Se}from"./use-registry-connections-Bgebk2mm.js";import{f as _e,g as be}from"./use-organization-settings-ClKaDrE7.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BlH2FRiM.js";import{R as Re}from"./require-capability-D2RrR3BZ.js";import"./User01-Cykpl4hh.js";import"./use-collections-DZi4alPB.js";import"./auth-CPEoqZ5f.js";import"./sidebar-BjIzPMot.js";import"./LayoutLeft-y1fOcQ0I.js";import"./use-mobile-BKRfr7ic.js";import"./sheet-C2Kfge9r.js";import"./X-DEdLuuqP.js";import"./tooltip-oPF11xOc.js";import"./studio-tools-7mZABBZl.js";import"./card-DjLKG66H.js";import"./ArrowUpRight-CA22UP6Q.js";import"./use-capability-CREa5hxg.js";import"./access-gate-C9EgwKjC.js";import"./capability-load-error-7-bUVJZE.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-B9PDVzF6.js","assets/index-BlbGtC1U.js","assets/index-BBz2M403.css","assets/XCircle-IAOWYKKA.js","assets/CheckCircle-p5tYLXMg.js","assets/Settings02-C-qi4-Q_.js","assets/use-mcp-client-BYcrk6lz.js","assets/auth-CPEoqZ5f.js","assets/useInfiniteQuery-bB2OO4_F.js","assets/use-infinite-scroll-c7yDanFw.js","assets/studio-tools-7mZABBZl.js","assets/badge-BGbD2JMR.js","assets/input-DHDgjmX0.js","assets/dropdown-menu-UriF3iJ3.js","assets/ChevronUp-uk87fvlM.js","assets/ChevronRight-CKc4NZet.js","assets/DotsVertical-DXDm8Xzs.js","assets/table-2dv8FC6q.js","assets/toggle-group-D22tG_vD.js","assets/use-view-mode-MNe61YUF.js","assets/use-mobile-BKRfr7ic.js","assets/FilterLines-HsRbW4y-.js","assets/Globe01-DD63JJzL.js","assets/SearchMd-BkXN-Kzx.js","assets/dialog-Dj81EdMo.js","assets/X-DEdLuuqP.js","assets/AlertCircle-BJzQ1lVJ.js","assets/Upload01-C_kFf8l0.js","assets/alert-dialog-DZvgeli3.js","assets/card-DjLKG66H.js","assets/Trash01-CbqEHpx0.js","assets/label-PsbKXPB5.js","assets/select-DxONb3Kt.js","assets/tooltip-oPF11xOc.js","assets/ChevronDown-DM7Zg7z0.js","assets/switch-Dprre6Tx.js","assets/textarea-HTN5AIWJ.js","assets/checkbox-CHfAThPE.js","assets/Eye-BHPT57Tm.js","assets/LinkExternal01-DCed5R2c.js","assets/use-copy-BGXnmJ0Y.js","assets/Key01-V7SPr6j-.js","assets/Plus-Bi8BbQwT.js","assets/mcp-oauth-D8vUJRgp.js","assets/Play-CKPBuURg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as m,b as n,e as c,j as t,i as p,r as l,am as f}from"./index-BlbGtC1U.js";import{R as u}from"./require-capability-D2RrR3BZ.js";import"./use-capability-CREa5hxg.js";import"./access-gate-C9EgwKjC.js";import"./capability-load-error-7-bUVJZE.js";const g=l.lazy(()=>f(()=>import("./registry-layout-B9PDVzF6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,D as i}from"./index-
|
|
1
|
+
import{c,D as i}from"./index-BlbGtC1U.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,V as C,_ as y,a3 as T,W as I,bK as M,bJ as H,Y as z,c as A,l as g}from"./index-
|
|
1
|
+
import{r as c,j as i,V as C,_ as y,a3 as T,W as I,bK as M,bJ as H,Y as z,c as A,l as g}from"./index-BlbGtC1U.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",_=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});_.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(a){return a?"checked":"unchecked"}var W=E,$=_;function F(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(W,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{F as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,l as i,j as r}from"./index-
|
|
1
|
+
import{c,l as i,j as r}from"./index-BlbGtC1U.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,bb as k,V as p,W as T,bc as y,Y as M,aj as P,a3 as S,ak as V,bd as F,Z as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,bb as k,V as p,W as T,bc as y,Y as M,aj as P,a3 as S,ak as V,bd as F,Z as D,c as x,l as g}from"./index-BlbGtC1U.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function W(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Y(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Z(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Y as T,W as a,Z as b,O as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-
|
|
1
|
+
import{i as o}from"./AlertCircle-BJzQ1lVJ.js";import{i as t}from"./CheckCircle-p5tYLXMg.js";import{i as r}from"./DotsVertical-DXDm8Xzs.js";import{ao as a}from"./agent-icon-C1dYfmgT.js";import{i as n}from"./index-BlbGtC1U.js";import{a as i}from"./XCircle-IAOWYKKA.js";const l={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:i,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:n,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return l[e??"completed"]??m}export{l as S,x as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-
|
|
1
|
+
import{c as o,l,j as n}from"./index-BlbGtC1U.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,a3 as b,j as c,V as m,W as k,ah as p,bb as M,bc as T,aj as S,bd as A,Y as F,bF as $,c as P,l as C}from"./index-
|
|
1
|
+
import{r as x,a3 as b,j as c,V as m,W as k,ah as p,bb as M,bc as T,aj as S,bd as A,Y as F,bF as $,c as P,l as C}from"./index-BlbGtC1U.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=H(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),L=h,U=N;const W=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),V=x.createContext({size:"default",variant:"default"});function q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(V.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function J(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(V),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(W({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{q as T,J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,l as p,j as r,r as d,e as N,aQ as T,G as S,F as $,H as y}from"./index-
|
|
1
|
+
import{c as i,l as p,j as r,r as d,e as N,aQ as T,G as S,F as $,H as y}from"./index-BlbGtC1U.js";import{n as w}from"./ChevronLeft-lcwdftXp.js";import{i as C}from"./ChevronRight-CKc4NZet.js";function j(t){const e=i.c(14);let s,o,l,n,c;e[0]!==t?({active:s,className:o,ref:n,type:c,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l,e[4]=n,e[5]=c):(s=e[1],o=e[2],l=e[3],n=e[4],c=e[5]);const f=c===void 0?"button":c,h=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let u;e[6]!==o||e[7]!==h?(u=p("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",h,o),e[6]=o,e[7]=h,e[8]=u):u=e[8];let g;return e[9]!==l||e[10]!==n||e[11]!==u||e[12]!==f?(g=r.jsx("button",{ref:n,type:f,className:u,...l}),e[9]=l,e[10]=n,e[11]=u,e[12]=f,e[13]=g):g=e[13],g}const k=d.createContext(null);function m(){const t=d.use(k);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=i.c(8),{children:s}=t,[o,l]=d.useState(null),[n,c]=d.useState(null),[f,h]=d.useState(null),[u,g]=d.useState(null);let b;e[0]!==f||e[1]!==u||e[2]!==n||e[3]!==o?(b={togglesEl:o,setTogglesEl:l,tabsEl:n,setTabsEl:c,centerEl:f,setCenterEl:h,rightEl:u,setRightEl:g},e[0]=f,e[1]=u,e[2]=n,e[3]=o,e[4]=b):b=e[4];let x;return e[5]!==s||e[6]!==b?(x=r.jsx(k,{value:b,children:s}),e[5]=s,e[6]=b,e[7]=x):x=e[7],x}function a(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx(v,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=o):o=e[1],o}function L(t){const e=i.c(10);let s,o,l;e[0]!==t?({children:s,className:o,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l):(s=e[1],o=e[2],l=e[3]);let n;e[4]!==o?(n=p("app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",o),e[4]=o,e[5]=n):n=e[5];let c;return e[6]!==s||e[7]!==l||e[8]!==n?(c=r.jsx("div",{className:n,...l,children:s}),e[6]=s,e[7]=l,e[8]=n,e[9]=c):c=e[9],c}function _(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=o):o=e[1],o}function R(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=o):o=e[1],o}function z(){const t=i.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(j,{onClick:G,"aria-label":"Go back",title:"Go back",children:r.jsx(w,{size:16})}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsxs(r.Fragment,{children:[e,r.jsx(j,{onClick:P,"aria-label":"Go forward",title:"Go forward",children:r.jsx(C,{size:16})})]}),t[1]=s):s=t[1],s}function P(){return window.history.forward()}function G(){return window.history.back()}function B(){const t=i.c(7),s=$().logo??y,o=typeof s=="string"?s:s.light,l=typeof s=="string"?s:s.dark;let n;t[0]!==o?(n=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=n):n=t[1];let c;t[2]!==l?(c=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=l,t[3]=c):c=t[3];let f;return t[4]!==n||t[5]!==c?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,c]}),t[4]=n,t[5]=c,t[6]=f):f=t[6],f}function E(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(B,{})}),t[0]=e):e=t[0],e}function F(){const t=i.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=N(e);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(E,{}),t[3]=l):l=t[3];let n;return t[4]!==o?(n=r.jsx(S,{to:"/$org",params:o,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:l}),t[4]=o,t[5]=n):n=t[5],n}function H(){const t=i.c(2),{setCenterEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function I(t){const e=i.c(3),{children:s}=t,{centerEl:o}=m();if(!o)return null;let l;return e[0]!==o||e[1]!==s?(l=T.createPortal(s,o),e[0]=o,e[1]=s,e[2]=l):l=e[2],l}function D(t){const e=i.c(5),{className:s}=t,{setTabsEl:o}=m();let l;e[0]!==s?(l=p("shrink-0 flex items-center",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function O(t){const e=i.c(3),{children:s}=t,{tabsEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function A(t){const e=i.c(5),{className:s}=t,{setTogglesEl:o}=m();let l;e[0]!==s?(l=p("contents",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function Q(t){const e=i.c(3),{children:s}=t,{togglesEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function U(){const t=i.c(2),{setRightEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function q(t){const e=i.c(3),{children:s}=t,{rightEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}a.Provider=v;a.Header=L;a.LeftColumn=_;a.RightColumn=R;a.Nav=z;a.Logo=E;a.LogoLink=F;a.CenterSlot=H;a.Center=I;a.TabsSlot=D;a.Tabs=O;a.TogglesSlot=A;a.Toggles=Q;a.RightSlot=U;a.Right=q;export{j as T,a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,V as S,ak as Z,a3 as J,a4 as Q,_ as H,U as ee,W as C,Z as $,a2 as te,X as G,$ as oe,a0 as re,Y as ne,dy as se,a1 as ae,c as j,l as ie}from"./index-
|
|
1
|
+
import{r as a,j as c,V as S,ak as Z,a3 as J,a4 as Q,_ as H,U as ee,W as C,Z as $,a2 as te,X as G,$ as oe,a0 as re,Y as ne,dy as se,a1 as ae,c as j,l as ie}from"./index-BlbGtC1U.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[m,y]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>m?g.current?"delayed-open":"instant-open":"closed",[m]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,y(!0)},[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,y(!0),f.current=0},T)},[T,y]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:m,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,m={x:h.clientX,y:h.clientY},y=me(m,g.getBoundingClientRect()),w=Ce(m,y),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,m={x:T.clientX,y:T.clientY},y=i?.contains(g)||u?.contains(g),w=!we(m,l);y?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),ye=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ye,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function me(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=U,Oe=B,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ne as T,le as V,Ie as a,Me as b,Ae as c};
|