@openhands/agent-canvas 1.0.0-alpha.4 → 1.0.0-alpha.6
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/build/assets/acp-providers-SCPK1BIU.js +1 -0
- package/build/assets/{acp-route-guard-CY4Kktrm.js → acp-route-guard-IWlFmS6x.js} +1 -1
- package/build/assets/active-backend-context-CkP3ZEJs.js +1 -0
- package/build/assets/{add-backend-modal-MoeYcSlW.js → add-backend-modal-CqjNjGqY.js} +1 -1
- package/build/assets/{agent-server-compatibility-DnXbX5aL.js → agent-server-compatibility-DvKtnXHw.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BdEre_71.js +5 -0
- package/build/assets/{agent-settings-D9CvPVkc.js → agent-settings-DdisD2Xx.js} +1 -1
- package/build/assets/{alert-banner-BopWFWDK.js → alert-banner-CvTYN73l.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-FvOoRQJt.js → analytics-consent-form-modal-BKgT9i2w.js} +1 -1
- package/build/assets/{app-settings-Dh9WIVcy.js → app-settings-DcYXtxGP.js} +1 -1
- package/build/assets/{automation-detail-B1toFzbL.js → automation-detail-CQrtk33s.js} +1 -1
- package/build/assets/{automations-list-lQ_f_eVe.js → automations-list-COmogz0S.js} +1 -1
- package/build/assets/backend-form-modal-KudhWUX8.js +1 -0
- package/build/assets/{backend-synced-settings-badge-f7SIwZJJ.js → backend-synced-settings-badge-BFy2HylT.js} +1 -1
- package/build/assets/{base-modal-D0AZIorb.js → base-modal-B4HvlFHE.js} +1 -1
- package/build/assets/{browser-store-CYpN823z.js → browser-store-C3AqxAO7.js} +1 -1
- package/build/assets/{browser-tab-Cy5h30Rj.js → browser-tab-DTM6RyoV.js} +1 -1
- package/build/assets/{browser-CqONu_f3.js → browser-vYpdU3CR.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BLCVOBAz.js → circle-plus-check-toggle-DRvuu-RD.js} +1 -1
- package/build/assets/{color-themes-VfRROuOB.js → color-themes-DSaoIL6A.js} +1 -1
- package/build/assets/{command-store-BUJOHJw0.js → command-store-DFN_17p1.js} +1 -1
- package/build/assets/{condenser-settings-tU2QpcvW.js → condenser-settings-DduLQcpV.js} +1 -1
- package/build/assets/{confirmation-modal-C9X6T5NM.js → confirmation-modal-B-DOYMUH.js} +1 -1
- package/build/assets/{context-menu-list-item-CdiNsCXt.js → context-menu-list-item-DzjPB8aC.js} +1 -1
- package/build/assets/conversation-CeGMBOyB.js +1 -0
- package/build/assets/conversation-D8scXOe7.js +17 -0
- package/build/assets/conversation-panel-DMz46ji-.js +1 -0
- package/build/assets/{conversation-service.api-bFeuJPps.js → conversation-service.api-YTGTw0pz.js} +1 -1
- package/build/assets/conversation-state-store-Bc0slAjL.js +1 -0
- package/build/assets/{conversation-store-CAtSuhbI.js → conversation-store-Z5iMCRpc.js} +1 -1
- package/build/assets/conversation-websocket-context-B0Gd3yiT.js +3 -0
- package/build/assets/{device-verify-B3pEa6X6.js → device-verify-CTbXX9CQ.js} +1 -1
- package/build/assets/dist-yMQV8IUk.js +1 -0
- package/build/assets/edit-automation-modal-DnTHJrf1.js +1 -0
- package/build/assets/{ellipsis-button-BMXoWChN.js → ellipsis-button-BoU2-xlG.js} +1 -1
- package/build/assets/{entry.client-DH09zdmW.js → entry.client-DU7-q4ZU.js} +2 -2
- package/build/assets/{environment-switch-overlay-akifSJ7a.js → environment-switch-overlay-DQ1n6Iu6.js} +1 -1
- package/build/assets/{extensions-hub-BTPY21Mo.js → extensions-hub-BW1FAKFJ.js} +1 -1
- package/build/assets/{extensions-navigation-Bw61uJe9.js → extensions-navigation-CbPMhSML.js} +1 -1
- package/build/assets/{files-tab-CsZQRSpv.js → files-tab-CbJ4s7Ik.js} +1 -1
- package/build/assets/files-tab-store-CDyVTXNT.js +1 -0
- package/build/assets/git-control-bar-branch-button-DhpPgadK.js +27 -0
- package/build/assets/git-provider-icon-D8RE4unY.js +1 -0
- package/build/assets/health-store-BDC2rM-X.js +1 -0
- package/build/assets/{home-7IR9W24e.js → home-D9fJfhQA.js} +1 -1
- package/build/assets/{install-server-modal-BL4pprnN.js → install-server-modal-VB5hOBpW.js} +1 -1
- package/build/assets/{launch-Bd5avLyw.js → launch-DKCU9uJH.js} +1 -1
- package/build/assets/{llm-client-BvUU4If8.js → llm-client-BpIfxETv.js} +1 -1
- package/build/assets/{llm-settings-yIFf1UoE.js → llm-settings-BOJC4vD-.js} +1 -1
- package/build/assets/llm-settings-CIdxmimN.js +1 -0
- package/build/assets/{manage-backends-modal-buYNliLv.js → manage-backends-modal-DqpzcxdI.js} +1 -1
- package/build/assets/{manage-workspaces-modal-BiTj6Z4W.js → manage-workspaces-modal-eG6XgAvw.js} +1 -1
- package/build/assets/manifest-6400820c.js +1 -0
- package/build/assets/{markdown-renderer-CeCYDWvz.js → markdown-renderer-wZnLDbA1.js} +1 -1
- package/build/assets/{mcp-DSzTA9H1.js → mcp-BdfyCW1l.js} +1 -1
- package/build/assets/{messages-x5kGl-bQ.js → messages-BfaEAG2q.js} +1 -1
- package/build/assets/{model-selector-CED-tBXx.js → model-selector-7id-Uirf.js} +1 -1
- package/build/assets/{navigation-link-C_YVC2i-.js → navigation-link-DFQ7YcWq.js} +1 -1
- package/build/assets/{option-service.api-Bqy363N2.js → option-service.api-DN0ZcGjw.js} +1 -1
- package/build/assets/{organization-service.api-BAwDUJoL.js → organization-service.api-Ct2dZF8M.js} +1 -1
- package/build/assets/{path-utils-3ccf0YXA.js → path-utils-D1ZtqFC7.js} +1 -1
- package/build/assets/{planner-tab-b0Q_JZvr.js → planner-tab-yubfN-6U.js} +1 -1
- package/build/assets/{profiles-client-Cj9KHwuq.js → profiles-client-D4twHRVf.js} +1 -1
- package/build/assets/{providers-CdDNvcEb.js → providers-C2T07PM3.js} +1 -1
- package/build/assets/{proxy-3uQm0NJ9.js → proxy-BMZyC45G.js} +1 -1
- package/build/assets/query-client-config-CiK0GJJO.js +1 -0
- package/build/assets/{recommended-automations-launcher--puKMsm-.js → recommended-automations-launcher-Cx7svuGE.js} +17 -3
- package/build/assets/root-6AdVEJBT.js +2 -0
- package/build/assets/root-layout-DvYGxAnr.js +2 -0
- package/build/assets/{sdk-section-page-Dgmjx3Nh.js → sdk-section-page-03k88tIR.js} +1 -1
- package/build/assets/{sdk-settings-schema-QrDJfOon.js → sdk-settings-schema-BY8dOy3a.js} +1 -1
- package/build/assets/{secrets-service-Dy7jaVk0.js → secrets-service-Z3qtRb_G.js} +1 -1
- package/build/assets/{secrets-settings-9X_bB7-j.js → secrets-settings-BnlByuMZ.js} +1 -1
- package/build/assets/{server-client-BvA-DepM.js → server-client-CG1zHqph.js} +1 -1
- package/build/assets/{settings-CLfgxw_Q.js → settings-DyzGLF_d.js} +1 -1
- package/build/assets/{settings-client-DjnapAI3.js → settings-client-CkXDJwIY.js} +1 -1
- package/build/assets/{settings-dropdown-input-1bMoP5ld.js → settings-dropdown-input-CAQWQgx-.js} +1 -1
- package/build/assets/{settings-index-QV1myqj-.js → settings-index-KtTw49xL.js} +1 -1
- package/build/assets/{settings-input-Bz9QClNU.js → settings-input-BWCZt9g2.js} +1 -1
- package/build/assets/{settings-list-classes-vFnNAdFx.js → settings-list-classes-xMleGkTC.js} +1 -1
- package/build/assets/{settings-modal-CmsyiNtY.js → settings-modal-Cv2YWSUY.js} +1 -1
- package/build/assets/{settings-service.api-DfJwVvYA.js → settings-service.api-Z6x0l0GU.js} +1 -1
- package/build/assets/{shared-conversation-CsGvti_a.js → shared-conversation-BfZNCsvo.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CRQrI0ED.js → sidebar-mobile-menu-toggle-DXplko7u.js} +1 -1
- package/build/assets/{sidebar-nav-link-qrRmYl8T.js → sidebar-nav-link-B4h8naZ7.js} +1 -1
- package/build/assets/{sidebar-store-CUm9qCi_.js → sidebar-store-cOeaKmIm.js} +1 -1
- package/build/assets/{skill-card-pill-row-DdaVfIxC.js → skill-card-pill-row-D0oTWx-a.js} +1 -1
- package/build/assets/{skills-plugins-BX5zDQC6.js → skills-plugins-BTnp7QcQ.js} +1 -1
- package/build/assets/{skills-settings-CuoWDnTN.js → skills-settings-CbOQvzkR.js} +1 -1
- package/build/assets/{styled-tooltip-C7QOGK28.js → styled-tooltip-Awq4HMw3.js} +1 -1
- package/build/assets/{task-list-tab-Bz7_oCIo.js → task-list-tab-B45ktzHM.js} +1 -1
- package/build/assets/{terminal-CRX7ZSEA.js → terminal-D5pzR9Ru.js} +1 -1
- package/build/assets/{typography-BqlA_dVV.js → typography-BbaUAC4V.js} +1 -1
- package/build/assets/{use-active-conversation-DOLpeZZ5.js → use-active-conversation-Bu5J9iLy.js} +1 -1
- package/build/assets/{use-agent-settings-schema-D90oKLgR.js → use-agent-settings-schema-BbtOsR7P.js} +1 -1
- package/build/assets/{use-agent-state-BqaILzms.js → use-agent-state-DN9Nc5pP.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dy9b3ahi.js → use-cloud-current-user-id-B_rMUiu8.js} +1 -1
- package/build/assets/{use-config-BD9X1AvI.js → use-config-Bcz2JL2t.js} +1 -1
- package/build/assets/{use-conversation-id-DPRiMh48.js → use-conversation-id-BOaaZahn.js} +1 -1
- package/build/assets/{use-create-conversation-B4M_yYz3.js → use-create-conversation-BWFA_FId.js} +1 -1
- package/build/assets/{use-event-store-DDhcATXi.js → use-event-store-CQZCcVz-.js} +1 -1
- package/build/assets/{use-handle-plan-click-Dno7Yfm3.js → use-handle-plan-click-CgrCGmT1.js} +1 -1
- package/build/assets/{use-is-creating-conversation-CVum0xhv.js → use-is-creating-conversation-DhoM7UAB.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-sASpuCpy.js → use-launch-skill-in-chat-DOyQsXFO.js} +1 -1
- package/build/assets/{use-llm-profiles-DHxXPcrl.js → use-llm-profiles-CAIzHJDX.js} +1 -1
- package/build/assets/{use-runtime-is-ready-C-dZi-ZU.js → use-runtime-is-ready-BQWLEyqa.js} +1 -1
- package/build/assets/{use-save-settings-pkHKHB31.js → use-save-settings-5m3w89Ph.js} +1 -1
- package/build/assets/{use-settings-ClRWXa6p.js → use-settings-DzG0C3vO.js} +1 -1
- package/build/assets/{use-settings-nav-items-CDy22kOR.js → use-settings-nav-items-BIsKeX52.js} +1 -1
- package/build/assets/use-skills-Cn-78xP1.js +1 -0
- package/build/assets/{use-task-list-BwJGWML_.js → use-task-list-Bs90uF2N.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DU7On_6w.js → use-unified-vscode-url-C5iI-Z5A.js} +1 -1
- package/build/assets/{use-user-conversation-DdUU6uqz.js → use-user-conversation-BCYpbPT1.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-CJfSHdwC.js → vendor~conversation-panel~conversation-CbjvWBSu.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-DZ7eKFW3.js → vendor~conversation-panel~conversation~index-C23ZXO4R.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-ksomn5Bg.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CM_1dibO.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B-s2ZXN7.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BbFOrAjI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-bTqZAHqW.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-By5W2oHN.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-8cYFyeHR.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CofhIDpd.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-uK_SqCPd.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js} +1 -1
- package/build/assets/{vendor~home~mcp~automations-list-a--VL9Np.js → vendor~home~mcp~automations-list-DRfWZRnF.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-WuKCleb6.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BQPOygpY.js} +2 -2
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BG3to4e4.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CyYIBiBk.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DL8iX8eY.js → vendor~root-layout~home~conversation-panel~conversation-DjAjXS5J.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-8l0SYWBt.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CFpDeb9o.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CrBN5IsU.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CuGq_cxH.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-DHbj3Bsh.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-C1p8-pMr.js} +2 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js +48 -0
- package/build/assets/{verification-settings-CiaMSkli.js → verification-settings-DbziMp4K.js} +1 -1
- package/build/assets/{vscode-tab-DkUK-4Xb.js → vscode-tab-BVhQR2rt.js} +1 -1
- package/build/index.html +4 -4
- package/config/defaults.json +38 -0
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +10 -18
- package/dist/constants/acp-providers.js +42 -209
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +2 -1
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +213 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js +10 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +4 -3
- package/dist/package.js.map +1 -1
- package/dist/query-client-config.cjs +1 -1
- package/dist/query-client-config.cjs.map +1 -1
- package/dist/query-client-config.js +30 -23
- package/dist/query-client-config.js.map +1 -1
- package/package.json +4 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/dev-static.mjs +2 -1
- package/scripts/dev-with-automation.mjs +24 -49
- package/scripts/static-build.mjs +2 -6
- package/build/assets/acp-providers-BhOEPsud.js +0 -1
- package/build/assets/active-backend-context-jthDtMCD.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CA7hOJAy.js +0 -5
- package/build/assets/backend-form-modal-DbriBS-v.js +0 -1
- package/build/assets/conversation-CDHXbtHw.js +0 -17
- package/build/assets/conversation-Dd7NkKCq.js +0 -1
- package/build/assets/conversation-panel-BZ1-fw2m.js +0 -1
- package/build/assets/conversation-state-store-Dpa4x70O.js +0 -1
- package/build/assets/conversation-websocket-context-BEeh-jIG.js +0 -3
- package/build/assets/dist-dxViYC8L.js +0 -1
- package/build/assets/edit-automation-modal-CoJon94X.js +0 -1
- package/build/assets/files-tab-store-ymnFnIBO.js +0 -1
- package/build/assets/git-control-bar-branch-button-BzqhhzW4.js +0 -27
- package/build/assets/git-provider-icon-Cf-vdwYZ.js +0 -1
- package/build/assets/llm-settings-BwVWlOyB.js +0 -1
- package/build/assets/manifest-e27751af.js +0 -1
- package/build/assets/query-client-config-BtB8Yvpf.js +0 -1
- package/build/assets/root-Xt6cd1J6.js +0 -2
- package/build/assets/root-layout-Bp7iQEOJ.js +0 -2
- package/build/assets/skills-client-DOeT6HEj.js +0 -1
- package/build/assets/use-skills-C2S3iOtJ.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~automations-list~automation-~f57mv2f3-D6ItaxF-.js +0 -48
- package/scripts/check-acp-providers-sync.mjs +0 -560
- /package/build/assets/{agent-server-client-options-BvlH7qGM.js → agent-server-client-options-8OJSXbm8.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-DWLieFHA.js → agent-server-ui-style-scope-BwIZYdC1.js} +0 -0
- /package/build/assets/{brand-button-BYloqbQ3.js → brand-button-8fVVei4i.js} +0 -0
- /package/build/assets/{combobox-caret-C7rVhI_V.js → combobox-caret-BMsz5mQX.js} +0 -0
- /package/build/assets/{conversation-local-storage-BQSptoYo.js → conversation-local-storage-UYl-SX-r.js} +0 -0
- /package/build/assets/{dist-3eF0ujsw.js → dist-DZHSA2e6.js} +0 -0
- /package/build/assets/{environment-switch-store-CBXkf5bS.js → environment-switch-store-C4ulFJKp.js} +0 -0
- /package/build/assets/{loading-spinner-D-ea2dZq.js → loading-spinner-91b5FiMQ.js} +0 -0
- /package/build/assets/{middleware-iK-zKVe0.js → middleware-BC9EwbB9.js} +0 -0
- /package/build/assets/{modal-backdrop-DML21GPD.js → modal-backdrop-B04pVYAD.js} +0 -0
- /package/build/assets/{modal-body-RpEv_U1i.js → modal-body-CgUoFQA1.js} +0 -0
- /package/build/assets/{modal-close-button-SKLwT3A4.js → modal-close-button-SM_WXzDY.js} +0 -0
- /package/build/assets/{navigation-context-DtjWNE3F.js → navigation-context-BFjstyH6.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-SGdQSpMZ.js → objectWithoutPropertiesLoose-Du6eBn-V.js} +0 -0
- /package/build/assets/{openhands-logo-BRKD7Ir9.js → openhands-logo-DkDp75rC.js} +0 -0
- /package/build/assets/{query-keys-D5xWPArX.js → query-keys-tAsQcc_9.js} +0 -0
- /package/build/assets/{react-DMUxGBRt.js → react-Do0CT17Y.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-Csgp2p8o.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-iOsylxCS.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BdNVgtVT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-DFFy3NX_.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as t,t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./useTranslation-01pF7z10.js";import{n as i}from"./extensions-navigation-
|
|
1
|
+
import{L as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as t,t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./useTranslation-01pF7z10.js";import{n as i}from"./extensions-navigation-CbPMhSML.js";import{n as a}from"./settings-like-page-layout-classes-Bn-M9oOa.js";var o=t(),s=e(function(){let{t:e}=r(`openhands`);return(0,o.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,o.jsx)(i,{}),(0,o.jsx)(`main`,{className:a,children:(0,o.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:(0,o.jsxs)(`div`,{className:`mb-4 min-w-0 space-y-1`,children:[(0,o.jsx)(`h2`,{className:`text-xl font-medium leading-6 text-foreground`,children:e(n.SETTINGS$PLUGINS_TITLE)}),(0,o.jsx)(`div`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(n.SETTINGS$PLUGINS_DESCRIPTION)})]})})})]})});export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as r,t as i}from"./declaration-C9nuq2Dj.js";import{t as a}from"./Trans-D43bd3yR.js";import{t as o}from"./useTranslation-01pF7z10.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c}from"./custom-toast-handlers-BYxhSr3t.js";import{a as l,l as u,n as d,s as f}from"./circle-plus-check-toggle-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as r,t as i}from"./declaration-C9nuq2Dj.js";import{t as a}from"./Trans-D43bd3yR.js";import{t as o}from"./useTranslation-01pF7z10.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c}from"./custom-toast-handlers-BYxhSr3t.js";import{a as l,l as u,n as d,s as f}from"./circle-plus-check-toggle-DRvuu-RD.js";import{t as p}from"./x-JOBEVLW0.js";import{t as m}from"./utils-Czcl6buL.js";import{t as h}from"./modal-backdrop-B04pVYAD.js";import{t as g}from"./brand-button-8fVVei4i.js";import{t as _}from"./modal-close-button-SM_WXzDY.js";import{r as v}from"./use-settings-DzG0C3vO.js";import{t as y}from"./skills-BN8atjgW.js";import{t as b}from"./use-save-settings-5m3w89Ph.js";import{t as ee}from"./use-skills-Cn-78xP1.js";import{t as x}from"./checkmark-BcvXE9bf.js";import{t as S}from"./copy-BxgbrjDT.js";import{t as C}from"./settings-switch-CGap2LtG.js";import{n as w,t as T}from"./skill-card-pill-row-D0oTWx-a.js";import{n as E}from"./extensions-navigation-CbPMhSML.js";import{n as D,t as O}from"./use-launch-skill-in-chat-DOyQsXFO.js";import{t as k}from"./enum-filter-dropdown-BJt-NplD.js";import{n as A}from"./settings-like-page-layout-classes-Bn-M9oOa.js";var j=e(t(),1),M=r();function N({skillName:e,className:t}){return(0,M.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:m(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,t),children:(0,M.jsx)(y,{})})}var P=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function F(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function I(e){let t=e.match(P);return t?e.slice(t[0].length).trim():e.trim()}function L(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function R(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(P);if(r){let e=F(r[1]);if(e)return e}return L(I(n))}var te=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,z={agentskills:{labelKey:i.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:i.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:i.SETTINGS$SKILLS_TYPE_REPO}};function B({type:e}){let{t}=o(`openhands`),n=z[e];return(0,M.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:te,children:t(n.labelKey)})}function V(e,t,n){if(e)return`${e}-${t}-${n}`}function H(e,t,n={}){let{variant:r=`card`,testIdPrefix:a}=n,o=[{id:`type-${e.type}`,node:(0,M.jsx)(B,{type:e.type})}];if(e.version&&o.push({id:`version-${e.version}`,node:(0,M.jsx)(`span`,{"data-testid":V(a,e.name,`version`)??`skill-version-${e.name}`,className:T,children:t(i.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&o.push({id:`license-${e.license}`,node:(0,M.jsx)(`span`,{"data-testid":V(a,e.name,`license`),className:T,children:e.license})}),r===`detail`&&e.compatibility&&o.push({id:`compatibility-${e.compatibility}`,node:(0,M.jsx)(`span`,{"data-testid":V(a,e.name,`compatibility`),className:T,children:e.compatibility})}),e.disable_model_invocation&&o.push({id:`disable-model-invocation`,node:(0,M.jsxs)(`span`,{"data-testid":V(a,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,M.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(i.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)o.push({id:`allowed-tool-${t}`,node:(0,M.jsx)(`span`,{"data-testid":V(a,e.name,`tool-${t}`),className:m(T,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))o.push({id:`metadata-${t}`,node:(0,M.jsxs)(`span`,{"data-testid":V(a,e.name,`metadata-${t}`),className:T,children:[(0,M.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])o.push({id:`trigger-${t}`,node:(0,M.jsx)(`span`,{"data-testid":V(a,e.name,`trigger-${t}`),className:T,children:t})});return o}function U(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function W({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:a}=o(`openhands`),[s,c]=j.useState(!1),u=R(e),p=j.useMemo(()=>H(e,a),[e,a]),h=U(e.source);return j.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,M.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:m(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,f,l),children:(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(N,{skillName:e.name}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,M.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,M.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,M.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),h?(0,M.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":a(s?i.BUTTON$COPIED:i.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,M.jsx)(x,{width:12,height:12}):(0,M.jsx)(S,{width:12,height:12})}):null]}):null]}),(0,M.jsx)(d,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:i.COMMON$DISABLE})]}),u?(0,M.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,M.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,p.length>0?(0,M.jsx)(w,{pills:p,testId:`skill-triggers-${e.name}`}):null]})]})})}var G=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,K=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function q(e){return e.name===`add-skill`?K:`/${e.name} `}function J({testId:e,label:t,value:n}){return(0,M.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,M.jsx)(`span`,{className:`text-sm`,children:t}),(0,M.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
2
|
`).length)),className:m(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function Y({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:a}=o(`openhands`),s=O(),[c,l]=j.useState(!1),u=j.useMemo(()=>q(e),[e]),d=R(e),f=j.useMemo(()=>H(e,a,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,a]),p=U(e.source);return j.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,M.jsx)(h,{onClose:r,"aria-label":e.name,children:(0,M.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,M.jsx)(_,{onClose:r,testId:`skill-detail-modal-close`}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,M.jsx)(N,{skillName:e.name}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:`text-lg font-semibold`,children:e.name}),e.source?(0,M.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,M.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,M.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":a(c?i.BUTTON$COPIED:i.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,M.jsx)(x,{width:12,height:12}):(0,M.jsx)(S,{width:12,height:12})}):null]}):null]})]}),(0,M.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,M.jsx)(C,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:a(t?i.SETTINGS$SKILLS_ENABLED:i.SETTINGS$SKILLS_DISABLED)})}),d?(0,M.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,M.jsx)(w,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,M.jsx)(J,{testId:`skill-modal-field-content-${e.name}`,label:a(i.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,M.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,M.jsx)(g,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:a(i.BUTTON$CLOSE)}),(0,M.jsx)(g,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,M.jsx)(D,{className:`size-4`,"aria-hidden":!0}),children:a(i.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var X=[i.SETTINGS$SKILLS_ADD_MODAL_STEP_1,i.SETTINGS$SKILLS_ADD_MODAL_STEP_2,i.SETTINGS$SKILLS_ADD_MODAL_STEP_3,i.SETTINGS$SKILLS_ADD_MODAL_STEP_4,i.SETTINGS$SKILLS_ADD_MODAL_STEP_5],Z={cmd:(0,M.jsx)(Q,{}),path:(0,M.jsx)(Q,{}),env:(0,M.jsx)(Q,{})};function Q({children:e}){return(0,M.jsx)(`code`,{className:m(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function ne(){let{t:e}=o(`openhands`),[t,n]=j.useState(!1);return j.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,M.jsxs)(`div`,{className:`relative`,children:[(0,M.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:m(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:K}),(0,M.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?i.BUTTON$COPIED:i.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(K),n(!0)},className:m(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,M.jsx)(x,{width:14,height:14}):(0,M.jsx)(S,{width:14,height:14})})]})}function $({i18nKey:e}){return(0,M.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,M.jsx)(a,{ns:`openhands`,i18nKey:e,components:Z})})}function re({onClose:e}){let{t}=o(`openhands`);return(0,M.jsx)(h,{onClose:e,"aria-label":t(i.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,M.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,M.jsx)(_,{onClose:e,testId:`add-skill-modal-close`}),(0,M.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,M.jsx)(`h2`,{className:`pr-6 text-lg font-semibold`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,M.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,M.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,M.jsx)($,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,M.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,M.jsx)(ne,{}),(0,M.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:X.map(e=>(0,M.jsx)(`li`,{children:e===i.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,M.jsx)(a,{ns:`openhands`,i18nKey:e,components:Z}):t(e)},e))})]}),(0,M.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,M.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,M.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,M.jsx)($,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,M.jsx)($,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,M.jsx)(`a`,{href:G,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,M.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,M.jsx)(g,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(i.BUTTON$CLOSE)})})]})})}var ie=[`all`,`agentskills`,`knowledge`,`repo`],ae={all:i.SETTINGS$SKILLS_TYPE_ALL,agentskills:i.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:i.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:i.SETTINGS$SKILLS_TYPE_REPO};function oe({value:e,onChange:t}){return(0,M.jsx)(k,{testId:`skills-type-filter`,value:e,onChange:t,options:ie,labelKeyByValue:ae})}function se({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:a}=o(`openhands`);return(0,M.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,M.jsxs)(`div`,{className:m(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,M.jsx)(u,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,M.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:a(i.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":a(i.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:m(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,M.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":`Clear search`,className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,M.jsx)(p,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,M.jsx)(oe,{value:n,onChange:r})]})}function ce(e,t){if(!t)return!0;let n=[e.name,R(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function le(){let{t:e}=o(`openhands`),{mutate:t}=b(),{data:n,isLoading:r}=v(),{data:a,isLoading:l}=ee(),[u,d]=j.useState(new Set),[f,p]=j.useState(!1),[h,_]=j.useState(``),[y,x]=j.useState(`all`),[S,C]=j.useState(null),[w,T]=j.useState(!1);j.useEffect(()=>{n?.disabled_skills&&(d(new Set(n.disabled_skills)),p(!0))},[n?.disabled_skills]);let D=(e,t)=>{d(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};j.useEffect(()=>{f&&t({disabled_skills:Array.from(u)},{onError:t=>{c(s(t)||e(i.ERROR$GENERIC))}})},[u,f,t,e]);let O=r||l||!n,k=j.useMemo(()=>a?a.filter(e=>(y===`all`||e.type===y)&&ce(e,h)):[],[a,y,h]);return(0,M.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,M.jsx)(E,{}),(0,M.jsx)(`main`,{className:m(A,`h-full`),children:(0,M.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,M.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(i.SETTINGS$SKILLS_TITLE)}),(0,M.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(i.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,M.jsx)(g,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(i.SETTINGS$SKILLS_ADD_BUTTON)})]}),O&&(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,M.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!O&&(!a||a.length===0)&&(0,M.jsx)(`p`,{className:`text-sm text-tertiary`,children:e(i.SETTINGS$SKILLS_NO_SKILLS)}),!O&&a&&a.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(se,{search:h,onSearchChange:_,typeFilter:y,onTypeFilterChange:x}),k.length===0?(0,M.jsx)(`p`,{"data-testid":`skills-no-match`,className:`text-sm text-tertiary`,children:e(i.SETTINGS$SKILLS_NO_MATCH)}):(0,M.jsx)(`section`,{className:m(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,M.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,M.jsx)(W,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>D(e.name,t)},e.name))})})]}),S&&(0,M.jsx)(Y,{skill:S,enabled:!u.has(S.name),onToggle:e=>D(S.name,e),onClose:()=>C(null)}),w&&(0,M.jsx)(re,{onClose:()=>T(!1)})]})})]})}var ue=n(le);export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./utils-Czcl6buL.js";import{t as i}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./utils-Czcl6buL.js";import{t as i}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-C1p8-pMr.js";var a=e(t(),1),o=n();function s(e){return a.Children.count(e)===1&&a.isValidElement(e)?e:(0,o.jsx)(`span`,{className:`inline-flex`,children:e})}function c({children:e,content:t,tooltipClassName:n,placement:a=`right`,showArrow:c=!1,closeDelay:l=100,shouldFlip:u,offset:d=7}){return(0,o.jsx)(i,{content:t,closeDelay:l,placement:a,offset:d,shouldFlip:u,className:r(`bg-white text-black`,n),showArrow:c,disableAnimation:!1,classNames:{content:r(`z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md`,`!bg-white !text-black`,n)},children:s(e)})}export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./utils-Czcl6buL.js";import{r as o}from"./typography-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./utils-Czcl6buL.js";import{r as o}from"./typography-BbaUAC4V.js";import{t as s}from"./u-check-circle-DHGiAi-w.js";import{n as c,t as l}from"./u-check-circle-half-BPcWtWwv.js";import{t as u}from"./use-task-list-Bs90uF2N.js";import{t as d}from"./conversation-tab-empty-state-BtFDbyTe.js";var f=e(t(),1),p=n();function m({task:e}){let{t}=i(`openhands`),n=(0,f.useMemo)(()=>{switch(e.status){case`todo`:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(l,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),u=e.status===`done`;return(0,p.jsxs)(`div`,{className:`flex gap-2 items-center w-full`,"data-name":`item`,children:[(0,p.jsx)(`div`,{className:`shrink-0`,children:n}),(0,p.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[16px] text-nowrap whitespace-pre font-normal`,children:[(0,p.jsx)(o.Text,{className:a(`text-[12px]`,u?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(o.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(r.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=i(`openhands`),{taskList:t}=u();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(s,{}),children:e(r.COMMON$NO_TASKS)}):(0,p.jsx)(`main`,{className:`h-full overflow-y-auto flex flex-col custom-scrollbar-always`,children:t.map(e=>(0,p.jsx)(`div`,{"data-active":e.status===`in_progress`?`true`:`false`,className:a(`px-4 py-2`,e.status===`in_progress`&&`bg-[var(--oh-surface-raised)]`),children:(0,p.jsx)(m,{task:e})},e.id))})}export{h as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r,v as i}from"./utils-Czcl6buL.js";import{t as a}from"./use-agent-state-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r,v as i}from"./utils-Czcl6buL.js";import{t as a}from"./use-agent-state-DN9Nc5pP.js";import{t as o}from"./command-store-DFN_17p1.js";import{n as s,t as c}from"./vendor~terminal-BUxzHKcC.js";import{t as l}from"./waiting-for-runtime-message-JotSOBdC.js";var u=e(t(),1),d=`[Python Interpreter: `,f=e=>{let t=e.indexOf(d);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},p=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
|
|
2
2
|
`,`\r
|
|
3
3
|
`).trim();a&&t.writeln(f(a))},m=(e,t,n)=>{if(!e||!t||!n||window.getComputedStyle(n).display===`none`)return!1;let{clientWidth:r,clientHeight:i}=n;return!(r===0||i===0||!e.element)};function h(e){let t=e.ownerDocument.createElement(`span`);t.style.color=`var(--oh-surface-foreground)`,t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,e.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n&&n!==`rgba(0, 0, 0, 0)`?n:getComputedStyle(e).color}var g={current:0},_=()=>{let e=o(e=>e.commands),t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),i=g,a=u.useRef(!1),l=e=>new c({fontFamily:`Menlo, Monaco, 'Courier New', monospace`,fontSize:14,scrollback:1e4,scrollSensitivity:1,fastScrollSensitivity:5,disableStdin:!0,allowTransparency:!0,theme:{background:`rgba(0, 0, 0, 0)`,foreground:h(e)}}),d=u.useCallback(()=>{a.current||m(t.current,n.current,r.current)&&n.current.fit()},[]),f=()=>{t.current&&(n.current&&t.current.loadAddon(n.current),r.current&&(t.current.open(r.current),t.current.write(`\x1B[?25l`),d()))};return u.useEffect(()=>{a.current=!1;let o=r.current;if(o){if(t.current=l(o),n.current=new s,r.current&&(f(),e.length>0)){for(let n=0;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),p(e[n],t.current,!1);i.current=e.length}return()=>{a.current=!0,t.current?.dispose(),i.current=0}}},[]),u.useEffect(()=>{if(t.current&&e.length>0&&i.current<e.length){for(let n=i.current;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),p(e[n],t.current,!1);i.current=e.length}},[e]),u.useEffect(()=>{let e=null;return e=new ResizeObserver(()=>{requestAnimationFrame(()=>{d()})}),r.current&&e.observe(r.current),()=>{e?.disconnect()}},[d]),r},v=n();function y(){let{curAgentState:e}=a(),t=i.includes(e),n=_();return(0,v.jsxs)(`div`,{className:`h-full flex flex-col rounded-xl`,children:[t&&(0,v.jsx)(l,{className:`pt-16`}),(0,v.jsx)(`div`,{className:`flex-1 min-h-0 p-4`,children:(0,v.jsx)(`div`,{ref:n,className:r(`w-full h-full`,t?`p-0 w-0 h-0 opacity-0 overflow-hidden`:``)})})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./declaration-C9nuq2Dj.js";import{t}from"./utils-Czcl6buL.js";import{t as n}from"./dist-
|
|
1
|
+
import{o as e}from"./declaration-C9nuq2Dj.js";import{t}from"./utils-Czcl6buL.js";import{t as n}from"./dist-DZHSA2e6.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
|
package/build/assets/{use-active-conversation-DOLpeZZ5.js → use-active-conversation-Bu5J9iLy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./conversation-service.api-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./conversation-service.api-YTGTw0pz.js";import{t as r}from"./use-user-conversation-BCYpbPT1.js";import{n as i}from"./use-conversation-id-BOaaZahn.js";var a=e(t(),1),o=()=>{let{conversationId:e}=i(),t=!!e&&e.startsWith(`task-`),o=r(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`)?3e3:3e4});return(0,a.useEffect)(()=>{let e=o.data;n.setCurrentConversation(e||null)},[e,o.isFetched,o?.data?.execution_status]),o};export{o as t};
|
package/build/assets/{use-agent-settings-schema-D90oKLgR.js → use-agent-settings-schema-BbtOsR7P.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t}from"./settings-service.api-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t}from"./settings-service.api-Z6x0l0GU.js";import{t as n}from"./use-is-authed-BFoh8Ogh.js";var r=(r,i)=>{let{data:a}=n(),{data:o,error:s,isLoading:c,isFetching:l}=e({queryKey:[`settings-schema`,r],queryFn:r===`conversation`?t.getConversationSettingsSchema:t.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!i&&!!a,meta:{disableToast:!0}});return i?{data:i,error:null,isLoading:!1,isFetching:!1}:{data:o,error:s,isLoading:c,isFetching:l}},i=e=>r(`agent`,e),a=e=>r(`conversation`,e);export{a as n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{_ as n}from"./utils-Czcl6buL.js";import{t as r}from"./common-SMkEaBSr.js";import{t as i}from"./conversation-state-store-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{_ as n}from"./utils-Czcl6buL.js";import{t as r}from"./common-SMkEaBSr.js";import{t as i}from"./conversation-state-store-Bc0slAjL.js";import{t as a}from"./use-active-conversation-Bu5J9iLy.js";var o=e(t(),1);function s(e){if(!e)return n.LOADING;switch(e){case r.IDLE:return n.AWAITING_USER_INPUT;case r.RUNNING:return n.RUNNING;case r.PAUSED:return n.PAUSED;case r.WAITING_FOR_CONFIRMATION:return n.AWAITING_USER_CONFIRMATION;case r.FINISHED:return n.FINISHED;case r.ERROR:return n.ERROR;case r.STUCK:return n.ERROR;default:return n.LOADING}}function c(){let e=i(e=>e.execution_status),t=a().data?.execution_status??null,n=e??t;return{curAgentState:(0,o.useMemo)(()=>s(n),[n]),executionStatus:n}}export{c as t};
|
package/build/assets/{use-cloud-current-user-id-Dy9b3ahi.js → use-cloud-current-user-id-B_rMUiu8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./organization-service.api-
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./organization-service.api-Ct2dZF8M.js";import{t as i}from"./utils-Czcl6buL.js";import{n as a,r as o}from"./active-backend-context-CkP3ZEJs.js";var s=`transition-none motion-reduce:transition-none`,c=`flex h-9 w-[18px] shrink-0 items-center justify-center`,l=`relative h-9 min-h-9 max-h-9 w-full shrink-0`;function u(e){return i(`flex h-10 min-h-10 shrink-0 items-center w-full`,e?`px-0`:`gap-2 pl-2.5 pr-2.5`)}var d={active:`bg-tertiary text-white font-normal`,idle:`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`};function f(e){return i(`flex flex-col gap-0.5 w-full shrink-0 items-stretch`,!e&&`pr-2.5`)}function p(e){let{indent:t=!1,collapsed:n=!1}=e??{};return i(`flex h-9 min-h-9 min-w-0 items-center rounded-md`,s,`text-sm leading-5 w-full`,n?`group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent`:`gap-2 px-2.5 overflow-hidden`,t&&!n&&`pl-7`)}function m(e){return i(`pointer-events-none absolute inset-0 z-0 rounded-md`,s,e?`bg-tertiary`:`bg-transparent group-hover:bg-[var(--oh-surface-raised)]`)}function h(e){return i(`relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0`,e?`text-white font-normal`:`text-[var(--oh-muted)] group-hover:text-white`)}function g(e){return e?`sr-only`:`min-w-0 truncate`}var _=i(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,s,`cursor-pointer`),v=i(`relative hidden md:block shrink-0 overflow-visible`,l),y=i(`absolute left-1/2 top-1/2 hidden h-7 w-7 -translate-x-1/2 -translate-y-1/2 md:inline-flex`,`items-center justify-center rounded-md`,s,`cursor-pointer`,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`);function b(){let{backends:r}=o(),i=r.filter(e=>e.kind===`cloud`),a=e({queries:i.map(e=>({queryKey:[`cloud-organizations`,e.id],queryFn:async()=>{let[r,i]=await Promise.all([t(e),n(e)]);return i.isLegacyKey||i.orgId===null?r:{...r,items:r.items.filter(e=>e.id===i.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return i.forEach((e,t)=>{let n=a[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[]}}),s}function x(){let{backends:t}=o(),n=a(),i=b(),s=[];for(let e of t)if(e.kind===`cloud`){let t=i[e.id],r=e.id===n.backend.id&&n.orgId?n.orgId:t?.orgs[0]?.id??null;r&&s.push({backendId:e.id,orgIdForMe:r})}let c=e({queries:s.map(({backendId:e,orgIdForMe:n})=>{let i=t.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,n],queryFn:async()=>i?r(n,i):{orgId:n,userId:``},enabled:!!i,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),l={};return s.forEach((e,t)=>{let n=c[t];l[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),l}export{y as a,d as c,u as d,g as f,v as i,m as l,p as m,b as n,_ as o,f as p,l as r,c as s,x as t,h as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./agent-server-compatibility-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./agent-server-compatibility-DvKtnXHw.js";import{t as n}from"./option-service.api-DN0ZcGjw.js";import{i as r,t as i}from"./query-keys-tAsQcc_9.js";var a=a=>e({queryKey:r.WEB_CLIENT_CONFIG,queryFn:n.getConfig,retry:(e,n)=>!t(n)&&e<3,meta:{disableToast:!0},...i,enabled:a?.enabled});export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./navigation-context-
|
|
1
|
+
import{n as e}from"./navigation-context-BFjstyH6.js";function t(){let{conversationId:t}=e();return{conversationId:t}}function n(){let{conversationId:e}=t();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}export{t as n,n as t};
|
package/build/assets/{use-create-conversation-B4M_yYz3.js → use-create-conversation-BWFA_FId.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-CRJwk4cR.js";import{n as t}from"./QueryClientProvider-DITRCGAK.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-
|
|
1
|
+
import{t as e}from"./useMutation-CRJwk4cR.js";import{n as t}from"./QueryClientProvider-DITRCGAK.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as r}from"./agent-server-conversation-service.api-BdEre_71.js";import{r as i}from"./use-settings-DzG0C3vO.js";var a=()=>{let e=n(),{data:t}=i(),r={current_url:window.location.href,user_email:t?.email||t?.git_user_email||null};return{trackLoginButtonClick:({provider:t})=>{e.capture(`login_button_clicked`,{provider:t,...r})},trackConversationCreated:({hasRepository:t})=>{e.capture(`conversation_created`,{has_repository:t,...r})},trackPushButtonClick:()=>{e.capture(`push_button_clicked`,{...r})},trackPullButtonClick:()=>{e.capture(`pull_button_clicked`,{...r})},trackCreatePrButtonClick:()=>{e.capture(`create_pr_button_clicked`,{...r})},trackUserSignupCompleted:()=>{e.capture(`user_signup_completed`,{signup_timestamp:new Date().toISOString(),...r})}}},o=()=>{let n=t(),{trackConversationCreated:i}=a();return e({mutationKey:[`create-conversation`],mutationFn:async e=>{let{query:t,conversationInstructions:n,plugins:i,repository:a,workingDir:o,parentConversationId:s,agentType:c}=e,l=await r.createConversation(t,n,i,a?{selected_repository:a.name,selected_branch:a.branch??null,git_provider:a.gitProvider}:null,o,s,c);return{conversation_id:l.app_conversation_id?l.app_conversation_id:`task-${l.id}`,session_api_key:null,url:l.agent_server_url,task_id:l.id}},onSuccess:async(e,{repository:t})=>{i({hasRepository:!!t}),n.invalidateQueries({queryKey:[`user`,`conversations`]}),n.invalidateQueries({queryKey:[`start-tasks`]})}})};export{a as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-
|
|
1
|
+
import{t as e}from"./react-Do0CT17Y.js";function t(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var n=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,r=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,i=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,a=e=>i(e)&&e.llm_message.role===`user`,o=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,s=e=>o(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),c=e=>n(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),l=e=>n(e)&&e.observation.kind===`PlanningFileEditorObservation`,u=e=>n(e)&&e.observation.kind===`BrowserObservation`,d=e=>n(e)&&e.observation.kind===`SwitchLLMObservation`,f=e=>o(e)&&e.action.kind===`BrowserNavigateAction`,p=e=>o(e)&&e.tool_name===`canvas_ui`,m=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),h=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,g=e=>e.key===`full_state`,_=e=>e.key===`execution_status`,v=e=>e.key===`stats`,y=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,b=e=>`kind`in e&&e.kind===`ServerErrorEvent`,x=e=>y(e)||b(e),S=e=>`kind`in e&&e.kind===`HookExecutionEvent`,C=e=>`kind`in e&&e.kind===`ACPToolCallEvent`;function w(e){return t(e)}var T=(e,t)=>{let r=[...t];if(C(e)){let t=r.findIndex(t=>C(t)&&t.tool_call_id===e.tool_call_id);return t===-1?r.push(e):r[t]=e,r}if(n(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return r;let t=r.findIndex(t=>t.id===e.action_id);t===-1?r.push(e):r[t]=e}else r.push(e);return r},E=e=>`id`in e?e.id:void 0,D=e=>`timestamp`in e?e.timestamp:void 0,O=(e,t)=>{let n=D(e),r=D(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},k=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=D(n),i=D(t);return!r||!i?!1:i<r},A=(e,t)=>{let n=E(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n);return{...e,events:[...e.events,t],eventIds:r,uiEvents:T(t,e.uiEvents)}},j=e=>({...e,events:[...e.events].sort(O),uiEvents:[...e.uiEvents].sort(O)}),M=(e,t)=>{let n=A(e,t);return n===e?e:!k(e.events,t)&&!k(e.uiEvents,t)?n:j(n)},N=e()(e=>({events:[],eventIds:new Set,uiEvents:[],addEvent:t=>e(e=>M(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=E(e);t!==void 0&&n.has(t)||(a=!0,t!==void 0&&n.add(t),r.push(e),i=T(e,i))}return a?j({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[]}))}));export{a as C,m as S,i as _,r as a,v as b,f as c,h as d,x as f,S as g,g as h,o as i,u as l,c as m,T as n,w as o,s as p,C as r,_ as s,N as t,p as u,n as v,d as x,l as y};
|
package/build/assets/{use-handle-plan-click-Dno7Yfm3.js → use-handle-plan-click-CgrCGmT1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./useTranslation-01pF7z10.js";import{r as i}from"./custom-toast-handlers-BYxhSr3t.js";import{a,r as o}from"./conversation-local-storage-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./useTranslation-01pF7z10.js";import{r as i}from"./custom-toast-handlers-BYxhSr3t.js";import{a,r as o}from"./conversation-local-storage-UYl-SX-r.js";import{t as s}from"./conversation-store-Z5iMCRpc.js";import{t as c}from"./use-create-conversation-BWFA_FId.js";import{t as l}from"./use-active-conversation-Bu5J9iLy.js";var u=e(t(),1),d=()=>{let{t:e}=r(`openhands`),{setConversationMode:t,setSubConversationTaskId:d,subConversationTaskId:f}=s(),{data:p}=l(),{mutate:m,isPending:h}=c();return(0,u.useEffect)(()=>{if(!p?.id)return;let e=o(p.id);e.subConversationTaskId&&!f&&d(e.subConversationTaskId)},[p?.id,f,d]),{handlePlanClick:(0,u.useCallback)(r=>{r?.preventDefault(),r?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`},{onSuccess:t=>{i(e(n.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(d(t.task_id),a(p.id,{subConversationTaskId:t.task_id}))}})},[p,m,t,d,f,e]),isCreatingConversation:h}};export{d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{b as n,c as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{n as i}from"./QueryClientProvider-DITRCGAK.js";import{n as a}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{b as n,c as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{n as i}from"./QueryClientProvider-DITRCGAK.js";import{n as a}from"./navigation-context-BFjstyH6.js";var o=e(t(),1);function s(e,t){let n=i(t);return l({filters:{...e,status:`pending`}},n).length}function c(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function l(e={},t){let a=i(t).getMutationCache(),s=o.useRef(e),l=o.useRef(null);return l.current===null&&(l.current=c(a,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(e=>a.subscribe(()=>{let t=n(l.current,c(a,s.current));l.current!==t&&(l.current=t,r.schedule(e))}),[a]),()=>l.current,()=>l.current)}var u=()=>{let e=a(),t=s({mutationKey:[`create-conversation`]}),{isNavigating:n}=e;return t>0||n};export{u as t};
|
package/build/assets/{use-launch-skill-in-chat-sASpuCpy.js → use-launch-skill-in-chat-DOyQsXFO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{n as r}from"./navigation-context-BFjstyH6.js";import{t as i}from"./conversation-store-Z5iMCRpc.js";var a=e(t()),o=n(),s=e=>(0,o.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,o.jsx)(`path`,{d:`M12 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4`}),(0,o.jsx)(`path`,{d:`M16 3h6v6`}),(0,o.jsx)(`path`,{d:`m16 9 6-6`})]});function c(){let{navigate:e}=r(),t=i(e=>e.setMessageToSend);return(0,a.useCallback)((n,r)=>{r?.(),e(`/conversations`),window.setTimeout(()=>{t(n)},0)},[e,t])}export{s as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t}from"./agent-server-client-options-8OJSXbm8.js";import{n}from"./active-backend-context-CkP3ZEJs.js";import{t as r}from"./profiles-client-D4twHRVf.js";import{n as i,t as a}from"./query-keys-tAsQcc_9.js";var o=class{static async listProfiles(){return new r(t()).listProfiles()}static async getProfile(e,n){let i=n?{exposeSecrets:n}:{};return new r(t()).getProfile(e,i)}static async saveProfile(e,n){return new r(t()).saveProfile(e,n)}static async deleteProfile(e){return new r(t()).deleteProfile(e)}static async renameProfile(e,n){return new r(t()).renameProfile(e,n)}static async activateProfile(e){return new r(t()).activateProfile(e)}};function s(t={}){let{backend:r,orgId:s}=n();return e({queryKey:[...i.all,r.id,s],queryFn:o.listProfiles,...a,enabled:t.enabled??!0,meta:{disableToast:!0}})}export{o as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as e,y as t}from"./utils-Czcl6buL.js";import{n}from"./status-DDL-ipIP.js";import{t as r}from"./use-active-conversation-
|
|
1
|
+
import{v as e,y as t}from"./utils-Czcl6buL.js";import{n}from"./status-DDL-ipIP.js";import{t as r}from"./use-active-conversation-Bu5J9iLy.js";import{t as i}from"./use-agent-state-DN9Nc5pP.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?t:e;return n(o?.execution_status)&&!c.includes(s)};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-CRJwk4cR.js";import{n as t}from"./QueryClientProvider-DITRCGAK.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-
|
|
1
|
+
import{t as e}from"./useMutation-CRJwk4cR.js";import{n as t}from"./QueryClientProvider-DITRCGAK.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{t as i}from"./settings-service.api-Z6x0l0GU.js";import{r as a}from"./use-settings-DzG0C3vO.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let r=t.agent_settings_diff,a=r?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}r&&Object.keys(r).length>0?t.agent_settings_diff=r:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await i.saveSettings(t)},s=(i=`personal`)=>{let s=n(),c=t(),{data:l}=a(i);return e({mutationFn:async e=>{let t=e.mcp_config,n=l?.mcp_config;t&&n!==t&&s.capture(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:t.sse_servers?.length||0,stdio_servers_count:t.stdio_servers?.length||0}),await o(e)},onSuccess:async()=>{await c.invalidateQueries({queryKey:r.byScope(i)})},meta:{disableToast:!0}})};export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./active-backend-context-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./active-backend-context-CkP3ZEJs.js";import{a as n}from"./query-keys-tAsQcc_9.js";import{r}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";import{t as i}from"./settings-D5am1n6X.js";import{t as a}from"./settings-service.api-Z6x0l0GU.js";var o=(...e)=>e.find(e=>typeof e==`boolean`),s=(...e)=>e.find(e=>typeof e==`number`),c=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},l={sse_servers:[],stdio_servers:[],shttp_servers:[]};function u(e){if(!e||typeof e!=`object`)return{...l};let t=e;if(!(`mcpServers`in t)||!t.mcpServers||typeof t.mcpServers!=`object`)return{...l};let n=[],r=[],i=[],a=t.mcpServers;for(let[e,t]of Object.entries(a)){if(!t||typeof t!=`object`)continue;let a=t.url;if(a){let e=t.transport,r=t.auth,o=typeof r==`string`&&r!==`oauth`?r:void 0;if(e===`sse`){let e={url:a};o&&(e.api_key=o),n.push(e)}else{let e={url:a};o&&(e.api_key=o),t.timeout!=null&&(e.timeout=t.timeout),i.push(e)}}else{let n={name:e,command:t.command};t.args&&(n.args=t.args),t.env&&(n.env=t.env),r.push(n)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function d(e){let t={},n=e=>{if(!(e in t))return e;let n=1;for(;`${e}_${n}`in t;)n+=1;return`${e}_${n}`};for(let r of e.sse_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key)),e.transport=`sse`,t[n(`sse`)]=e}for(let r of e.shttp_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key),r.timeout!=null&&(e.timeout=r.timeout)),t[n(`shttp`)]=e}for(let r of e.stdio_servers){let e={command:r.command};r.args&&(e.args=r.args),r.env&&(e.env=r.env),t[n(r.name||`stdio`)]=e}return Object.keys(t).length>0?{mcpServers:t}:null}var f=e=>{if(typeof e==`object`&&e&&`status`in e){let{status:t}=e;if(typeof t==`number`)return t}if(r.isAxiosError(e))return e.response?.status},p=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},m=(e,t,n,r=!1)=>{let i=p(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},h=e=>{let t=e.agent_settings??{},n={...i.conversation_settings??{},...e.conversation_settings??{}};return{...i,...e,llm_model:m(t,`llm.model`,i.llm_model),llm_base_url:m(t,`llm.base_url`,i.llm_base_url,!0),agent:m(t,`agent`,i.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:o(n.confirmation_mode)??i.confirmation_mode,security_analyzer:c(n.security_analyzer)??i.security_analyzer,max_iterations:s(n.max_iterations)??i.max_iterations,enable_default_condenser:o(p(t,`condenser.enabled`))??i.enable_default_condenser,condenser_max_size:s(p(t,`condenser.max_size`))??i.condenser_max_size,mcp_config:u(e.mcp_config??t.mcp_config),search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||i.git_user_name,git_user_email:e.git_user_email||i.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??i.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??i.agent_settings,conversation_settings_schema:e.conversation_settings_schema??i.conversation_settings_schema,conversation_settings:n}},g=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return h(await a.getSettings())},_=(r=`personal`)=>{let a=t(),o=e({queryKey:[...n.byScope(r),a.backend.id,a.orgId],queryFn:()=>g(r),retry:(e,t)=>f(t)!==404,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return f(o.error)===404?{data:i,error:o.error,isError:o.isError,isLoading:o.isLoading,isFetching:o.isFetching,isFetched:o.isFetched,isSuccess:o.isSuccess,status:o.status,fetchStatus:o.fetchStatus,refetch:o.refetch}:o};export{d as a,u as i,g as n,_ as r,f as t};
|
package/build/assets/{use-settings-nav-items-CDy22kOR.js → use-settings-nav-items-BIsKeX52.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{n as i}from"./active-backend-context-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{n as i}from"./active-backend-context-CkP3ZEJs.js";import{t as a}from"./use-config-Bcz2JL2t.js";import{n as o}from"./acp-providers-SCPK1BIU.js";import{r as s}from"./use-settings-DzG0C3vO.js";import{t as c}from"./u-circuit-B_nK9hOu.js";import{r as l}from"./settings-utils-BBozxqqi.js";var u=r(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),d=r(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]);e();var f=t(),p=[{icon:(0,f.jsx)(e=>(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,f.jsx)(`path`,{d:`M9 15C8.80222 15 8.60888 15.0586 8.44443 15.1685C8.27998 15.2784 8.15181 15.4346 8.07612 15.6173C8.00043 15.8 7.98063 16.0011 8.01921 16.1951C8.0578 16.3891 8.15304 16.5673 8.29289 16.7071C8.43275 16.847 8.61093 16.9422 8.80491 16.9808C8.99889 17.0194 9.19996 16.9996 9.38268 16.9239C9.56541 16.8482 9.72159 16.72 9.83147 16.5556C9.94135 16.3911 10 16.1978 10 16C10 15.7348 9.89464 15.4804 9.70711 15.2929C9.51957 15.1054 9.26522 15 9 15ZM2 14C1.73478 14 1.48043 14.1054 1.29289 14.2929C1.10536 14.4804 1 14.7348 1 15V17C1 17.2652 1.10536 17.5196 1.29289 17.7071C1.48043 17.8946 1.73478 18 2 18C2.26522 18 2.51957 17.8946 2.70711 17.7071C2.89464 17.5196 3 17.2652 3 17V15C3 14.7348 2.89464 14.4804 2.70711 14.2929C2.51957 14.1054 2.26522 14 2 14ZM22 14C21.7348 14 21.4804 14.1054 21.2929 14.2929C21.1054 14.4804 21 14.7348 21 15V17C21 17.2652 21.1054 17.5196 21.2929 17.7071C21.4804 17.8946 21.7348 18 22 18C22.2652 18 22.5196 17.8946 22.7071 17.7071C22.8946 17.5196 23 17.2652 23 17V15C23 14.7348 22.8946 14.4804 22.7071 14.2929C22.5196 14.1054 22.2652 14 22 14ZM17 7H13V5.72C13.3023 5.54549 13.5536 5.29491 13.7291 4.99317C13.9045 4.69143 13.9979 4.34903 14 4C14 3.46957 13.7893 2.96086 13.4142 2.58579C13.0391 2.21071 12.5304 2 12 2C11.4696 2 10.9609 2.21071 10.5858 2.58579C10.2107 2.96086 10 3.46957 10 4C10.0021 4.34903 10.0955 4.69143 10.2709 4.99317C10.4464 5.29491 10.6977 5.54549 11 5.72V7H7C6.20435 7 5.44129 7.31607 4.87868 7.87868C4.31607 8.44129 4 9.20435 4 10V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V10C20 9.20435 19.6839 8.44129 19.1213 7.87868C18.5587 7.31607 17.7956 7 17 7ZM13.72 9L13.22 11H10.78L10.28 9H13.72ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V10C6 9.73478 6.10536 9.48043 6.29289 9.29289C6.48043 9.10536 6.73478 9 7 9H8.22L9 12.24C9.05475 12.4619 9.18385 12.6583 9.36579 12.7966C9.54774 12.9349 9.77157 13.0067 10 13H14C14.2284 13.0067 14.4523 12.9349 14.6342 12.7966C14.8162 12.6583 14.9452 12.4619 15 12.24L15.78 9H17C17.2652 9 17.5196 9.10536 17.7071 9.29289C17.8946 9.48043 18 9.73478 18 10V19ZM15 15C14.8022 15 14.6089 15.0586 14.4444 15.1685C14.28 15.2784 14.1518 15.4346 14.0761 15.6173C14.0004 15.8 13.9806 16.0011 14.0192 16.1951C14.0578 16.3891 14.153 16.5673 14.2929 16.7071C14.4327 16.847 14.6109 16.9422 14.8049 16.9808C14.9989 17.0194 15.2 16.9996 15.3827 16.9239C15.5654 16.8482 15.7216 16.72 15.8315 16.5556C15.9414 16.3911 16 16.1978 16 16C16 15.7348 15.8946 15.4804 15.7071 15.2929C15.5196 15.1054 15.2652 15 15 15Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/agent`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_SUBLINE`},{icon:(0,f.jsx)(c,{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`,disabledByAcp:!0},{icon:(0,f.jsx)(e=>(0,f.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`style`,{children:`
|
|
2
2
|
.st0 {
|
|
3
3
|
stroke-miterlimit: 10;
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{S as t,c as n,t as r}from"./agent-server-client-options-8OJSXbm8.js";import{c as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js";import{t as a}from"./proxy-BMZyC45G.js";var o=100;function s(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function c(){let e=s(),t=[],n=null;do{let r=new URLSearchParams({limit:String(o)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}var l=class{static async getSkills(){return n().backend.kind===`cloud`?c():(await new i(r()).getSkills({load_public:!0,load_user:!0,load_project:!0,load_org:!1,project_dir:t()})).skills??[]}},u=()=>e({queryKey:[`skills`],queryFn:l.getSkills,staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n,v as r}from"./use-event-store-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n,v as r}from"./use-event-store-CQZCcVz-.js";var i=e(t(),1);function a(e){if(r(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function o(){let e=n(e=>e.events);return(0,i.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=a(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}export{o as t};
|
package/build/assets/{use-unified-vscode-url-DU7On_6w.js → use-unified-vscode-url-C5iI-Z5A.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{t}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{c as a}from"./agent-server-client-options-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{t}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{c as a}from"./agent-server-client-options-8OJSXbm8.js";import{n as o}from"./active-backend-context-CkP3ZEJs.js";import{t as s}from"./agent-server-conversation-service.api-BdEre_71.js";import{t as c}from"./proxy-BMZyC45G.js";import{t as l}from"./vscode-url-helper-jesbpos5.js";import{t as u}from"./conversation-service.api-YTGTw0pz.js";import{t as d}from"./use-conversation-id-BOaaZahn.js";import{t as f}from"./use-active-conversation-Bu5J9iLy.js";import{t as p}from"./use-runtime-is-ready-BQWLEyqa.js";e();var m=n(),h=e=>(0,m.jsxs)(`svg`,{viewBox:`0 0 20 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,m.jsx)(`path`,{d:`M12.5063 0.946289L11.4948 2.05386L16.8906 6.98209L11.4928 11.9481L12.5083 13.052L19.1105 6.97807L12.5063 0.946289Z`,fill:`currentColor`}),(0,m.jsx)(`path`,{d:`M7.49476 13.0539L8.50634 11.9463L3.11047 7.01806L8.50834 2.05202L7.49275 0.948125L0.890625 7.02208L7.49476 13.0539Z`,fill:`currentColor`})]});function g(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function _(e){if(e.length===0)return[];let t=g(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await c({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var v=e=>{let n=o(),r=n.backend.kind===`cloud`;return t({queryKey:[`cloud`,`sandbox`,n.backend.id,n.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await _([e]);return t??null},enabled:r&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},y=`VSCODE`,b=()=>{let{t:e}=i(`openhands`),{conversationId:n}=d(),a=p({allowAgentError:!0}),{data:c}=f(),m=o(),h=c?.conversation_url??null,g=c?.session_api_key??null,_=c?.sandbox_id??null,b=m.backend.kind===`cloud`,x=v(b?_:null),S=t({queryKey:[`unified`,`vscode_url`,`local`,n,h,g],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return{url:l((await s.getVSCodeUrl(n,h,g).catch(()=>u.getVSCodeUrl(n))).vscode_url)}},enabled:!b&&a&&!!n,refetchOnMount:!0,retry:3}),C,w,T,E,D,O,k;if(b){let e=x.data?.exposed_urls?.find(e=>e.name===y)?.url??null;C=x.isSuccess?{url:l(e)}:void 0,w=x.isLoading,T=x.isError,E=x.isSuccess,D=x.status,O=x.error,k=async()=>{let e=await x.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===y)?.url??null;return{data:e.data?{url:l(t)}:void 0}}}else C=S.data,w=S.isLoading,T=S.isError,E=S.isSuccess,D=S.status,O=S.error,k=async()=>({data:(await S.refetch()).data});let A=C&&!C.url?e(r.VSCODE$URL_NOT_AVAILABLE):null;return{data:C?{...C,error:A}:void 0,error:O,isLoading:w,isError:T,isSuccess:E,status:D,refetch:k}};export{h as n,b as t};
|
package/build/assets/{use-user-conversation-DdUU6uqz.js → use-user-conversation-BCYpbPT1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./active-backend-context-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as t}from"./active-backend-context-CkP3ZEJs.js";import{t as n}from"./agent-server-conversation-service.api-BdEre_71.js";var r=1e3*60*5,i=1e3*60*15,a=(a,o)=>{let s=t();return e({queryKey:[`user`,`conversation`,a,s.backend.id,s.orgId],queryFn:async()=>a?(await n.batchGetAppConversations([a]))[0]??null:null,enabled:!!a&&!a.startsWith(`task-`),retry:!1,refetchInterval:o,staleTime:r,gcTime:i})};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{A as i,E as a,T as o,j as s,k as c,w as l}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-8l0SYWBt.js";import{Ct as u,D as d,G as f,O as ee,Tt as p,X as m,Z as te,at as h,b as ne,ct as g,ft as re,ht as _,it as ie,lt as v,mt as ae,ot as y,pt as oe,rt as b,s as se,st as x,v as S,vt as ce,wt as le,xt as ue,y as C}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BdNVgtVT.js";import{C as de,D as fe,E as pe,O as w,S as me,T as he,_ as ge,a as _e,b as ve,c as ye,d as T,f as E,g as be,h as D,i as xe,k as Se,l as Ce,m as we,n as Te,o as O,p as Ee,r as De,s as Oe,t as ke,u as Ae,v as je,w as Me,x as k,y as Ne}from"./vendor~conversation-panel~conversation~index-DZ7eKFW3.js";var Pe=r(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Fe=r(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]);function Ie(e){return e===`x`||e===`y`?k[e]?null:(k[e]=!0,()=>{k[e]=!1}):k.x||k.y?null:(k.x=k.y=!0,()=>{k.x=k.y=!1})}function A(e){return ce(e)&&`ownerSVGElement`in e}var j=new WeakMap,M,Le=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:A(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Re=Le(`inline`,`width`,`offsetWidth`),ze=Le(`block`,`height`,`offsetHeight`);function Be({target:e,borderBoxSize:t}){j.get(e)?.forEach(n=>{n(e,{get width(){return Re(e,t)},get height(){return ze(e,t)}})})}function Ve(e){e.forEach(Be)}function He(){typeof ResizeObserver>`u`||(M=new ResizeObserver(Ve))}function Ue(e,t){M||He();let n=me(e);return n.forEach(e=>{let n=j.get(e);n||(n=new Set,j.set(e,n)),n.add(t),M?.observe(e)}),()=>{n.forEach(e=>{let n=j.get(e);n?.delete(t),n?.size||M?.unobserve(e)})}}var N=new Set,P;function We(){P=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};N.forEach(t=>t(e))},window.addEventListener(`resize`,P)}function Ge(e){return N.add(e),P||We(),()=>{N.delete(e),!N.size&&typeof P==`function`&&(window.removeEventListener(`resize`,P),P=void 0)}}function Ke(e,t){return typeof e==`function`?Ge(e):Ue(e,t)}function qe(e){return A(e)&&e.tagName===`svg`}function F(e,t){e.min=t.min,e.max=t.max}function I(e,t){F(e.x,t.x),F(e.y,t.y)}function Je(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ye=1e-4,Xe=1-Ye,Ze=1+Ye,Qe=.01,$e=0-Qe,et=0+Qe;function L(e){return e.max-e.min}function tt(e,t,n){return Math.abs(e-t)<=n}function nt(e,t,n,r=.5){e.origin=r,e.originPoint=f(t.min,t.max,e.origin),e.scale=L(n)/L(t),e.translate=f(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Xe&&e.scale<=Ze||isNaN(e.scale))&&(e.scale=1),(e.translate>=$e&&e.translate<=et||isNaN(e.translate))&&(e.translate=0)}function R(e,t,n,r){nt(e.x,t.x,n.x,r?r.originX:void 0),nt(e.y,t.y,n.y,r?r.originY:void 0)}function rt(e,t,n,r=0){e.min=(r?f(n.min,n.max,r):n.min)+t.min,e.max=e.min+L(t)}function it(e,t,n,r){rt(e.x,t.x,n.x,r?.x),rt(e.y,t.y,n.y,r?.y)}function at(e,t,n,r=0){let i=r?f(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+L(t)}function z(e,t,n,r){at(e.x,t.x,n.x,r?.x),at(e.y,t.y,n.y,r?.y)}function ot(e,t,n,r,i){return e-=t,e=Ae(e,1/n,r),i!==void 0&&(e=Ae(e,1/i,r)),e}function st(e,t=0,n=1,r=.5,i,a=e,o=e){if(m.test(t)&&(t=parseFloat(t),t=f(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=f(a.min,a.max,r);e===a&&(s-=t),e.min=ot(e.min,t,n,s,i),e.max=ot(e.max,t,n,s,i)}function ct(e,t,[n,r,i],a,o){st(e,t[n],t[r],t[i],t.scale,a,o)}var lt=[`x`,`scaleX`,`originX`],ut=[`y`,`scaleY`,`originY`];function dt(e,t,n,r){ct(e.x,t,lt,n?n.x:void 0,r?r.x:void 0),ct(e.y,t,ut,n?n.y:void 0,r?r.y:void 0)}function ft(e){return e.translate===0&&e.scale===1}function pt(e){return ft(e.x)&&ft(e.y)}function mt(e,t){return e.min===t.min&&e.max===t.max}function ht(e,t){return mt(e.x,t.x)&&mt(e.y,t.y)}function gt(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _t(e,t){return gt(e.x,t.x)&>(e.y,t.y)}function vt(e){return L(e.x)/L(e.y)}function yt(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function B(e){return[e(`x`),e(`y`)]}function bt(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var xt=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],St=xt.length,Ct=e=>typeof e==`string`?parseFloat(e):e,wt=e=>typeof e==`number`||te.test(e);function Tt(e,t,n,r,i,a){i?(e.opacity=f(0,n.opacity??1,Dt(r)),e.opacityExit=f(t.opacity??1,0,Ot(r))):a&&(e.opacity=f(t.opacity??1,n.opacity??1,r));for(let i=0;i<St;i++){let a=xt[i],o=Et(t,a),s=Et(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||wt(o)===wt(s)?(e[a]=Math.max(f(Ct(o),Ct(s),r),0),(m.test(s)||m.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=f(t.rotate||0,n.rotate||0,r))}function Et(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Dt=kt(0,.5,fe),Ot=kt(.5,.95,_);function kt(e,t,n){return r=>r<e?0:r>t?1:n(w(e,t,r))}function At(e,t,n){let r=d(e)?e:ee(e);return r.start(he(``,r,t,n)),r.animation}var jt=(e,t)=>e.depth-t.depth,Mt=class{constructor(){this.children=[],this.isDirty=!1}add(e){le(this.children,e),this.isDirty=!0}remove(e){p(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jt),this.isDirty=!1,this.children.forEach(e)}};function Nt(e,t){let n=ie.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(h(r),e(a-t))};return y.setup(r,!0),()=>h(r)}var Pt=class{constructor(){this.members=[]}add(e){le(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(p(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(p(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},V={hasAnimatedSinceResize:!0,hasEverUpdated:!1},H={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},U=[``,`X`,`Y`,`Z`],Ft=1e3,It=0;function W(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Lt(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=de(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,y,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Lt(r)}function Rt({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=It++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,v.value&&(H.nodes=H.calculatedTargetDeltas=H.calculatedProjections=0),this.nodes.forEach(Vt),this.nodes.forEach(Xt),this.nodes.forEach(Zt),this.nodes.forEach(Ht),v.addProjectionMetrics&&v.addProjectionMetrics(H)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mt)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ae),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=A(t)&&!qe(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;y.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Nt(i,250),V.hasAnimatedSinceResize&&(V.hasAnimatedSinceResize=!1,this.nodes.forEach(Yt)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||an,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!_t(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...pe(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Yt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),h(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qt),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lt(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Gt),this.nodes.forEach(Wt);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kt);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qt),this.nodes.forEach(Jt),this.nodes.forEach(zt),this.nodes.forEach(Bt)):this.nodes.forEach(Kt),this.clearAllSnapshots();let e=ie.now();x.delta=u(0,1e3/60,e-x.timestamp),x.timestamp=e,x.isProcessing=!0,g.update.process(x),g.preRender.process(x),g.render.process(x),x.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ne.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ut),this.sharedNodes.forEach($t)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,y.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){y.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!L(this.snapshot.measuredBox.x)&&!L(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=S(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pt(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||D(this.latestValues)||i)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ln(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return S();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dn))){let{scroll:e}=this.root;e&&(E(t.x,e.offset.x),E(t.y,e.offset.y))}return t}removeElementScroll(e){let t=S();if(I(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&I(t,e),E(t.x,i.offset.x),E(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||S();I(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(E(r.x,-n.scroll.offset.x),E(r.y,-n.scroll.offset.y)),D(n.latestValues)&&T(r,n.latestValues,n.layout?.layoutBox)}return D(this.latestValues)&&T(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=S();I(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!D(n.latestValues))continue;let r;n.instance&&(we(n.latestValues)&&n.updateSnapshot(),r=S(),I(r,n.measurePageBox())),dt(t,n.latestValues,n.snapshot?.layoutBox,r)}return D(this.latestValues)&&dt(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==x.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=x.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=S(),this.targetWithTransforms=S()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),it(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):I(this.target,this.layout.layoutBox),ye(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),v.value&&H.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||we(this.parent.latestValues)||Ee(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=S(),this.relativeTargetOrigin=S(),z(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),I(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===x.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;I(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ce(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=S());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Je(this.prevProjectionDelta.x,this.projectionDelta.x),Je(this.prevProjectionDelta.y,this.projectionDelta.y)),R(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!yt(this.projectionDelta.x,this.prevProjectionDelta.x)||!yt(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),v.value&&H.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=C(),this.projectionDelta=C(),this.projectionDeltaWithTransform=C()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=C();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=S(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(rn));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;en(a.x,e.x,n),en(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(z(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),nn(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ht(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=S(),I(d,this.relativeTarget)),s&&(this.animationValues=i,Tt(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(h(this.pendingAnimation),void 0),this.pendingAnimation=y.update(()=>{V.hasAnimatedSinceResize=!0,b.layout++,this.motionValue||=ee(0),this.motionValue.jump(0,!1),this.currentAnimation=At(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{b.layout--},onComplete:()=>{b.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ft),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&un(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||S();let t=L(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=L(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}I(t,n),T(t,i),R(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Pt),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&W(`z`,e,r,this.animationValues);for(let t=0;t<U.length;t++)W(`rotate${U[t]}`,e,r,this.animationValues),W(`skew${U[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=i(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=i(t?.pointerEvents)||``),this.hasProjected&&!D(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=bt(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;let{x:s,y:c}=this.projectionDelta;e.transformOrigin=`${s.origin*100}% ${c.origin*100}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?a.opacity===void 0?``:a.opacity:a.opacityExit===void 0?0:a.opacityExit;for(let t in se){if(a[t]===void 0)continue;let{correct:n,applyTo:i,isCSSVariable:s}=se[t],c=o===`none`?a[t]:n(a[t],r);if(i){let t=i.length;for(let n=0;n<t;n++)e[i[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?i(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Wt),this.root.sharedNodes.clear()}}}function zt(e){e.updateLayout()}function Bt(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)B(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=L(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;F(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else un(i,t.layoutBox,n)&&B(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=L(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=C();R(o,n,t.layoutBox);let s=C();a?R(s,e.applyTransform(r,!0),t.measuredBox):R(s,n,t.layoutBox);let c=!pt(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=S();z(s,t.layoutBox,i.layoutBox,o);let c=S();z(c,n,a.layoutBox,o),_t(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Vt(e){v.value&&H.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ht(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ut(e){e.clearSnapshot()}function Wt(e){e.clearMeasurements()}function Gt(e){e.isLayoutDirty=!0,e.updateLayout()}function Kt(e){e.isLayoutDirty=!1}function qt(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Jt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Yt(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xt(e){e.resolveTargetDelta()}function Zt(e){e.calcProjection()}function Qt(e){e.resetSkewAndRotation()}function $t(e){e.removeLeadSnapshot()}function en(e,t,n){e.translate=f(t.translate,0,n),e.scale=f(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function tn(e,t,n,r){e.min=f(t.min,n.min,r),e.max=f(t.max,n.max,r)}function nn(e,t,n,r){tn(e.x,t.x,n.x,r),tn(e.y,t.y,n.y,r)}function rn(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var an={duration:.45,ease:[.4,0,.1,1]},on=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sn=on(`applewebkit/`)&&!on(`chrome/`)?Math.round:_;function cn(e){e.min=sn(e.min),e.max=sn(e.max)}function ln(e){cn(e.x),cn(e.y)}function un(e,t,n){return e===`position`||e===`preserve-aspect`&&!tt(vt(t),vt(n),.2)}function dn(e){return e!==e.root&&e.scroll?.wasRoot}var fn=Rt({attachResizeListener:(e,t)=>O(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),G={current:void 0},pn=Rt({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!G.current){let e=new fn({});e.mount(window),e.setOptions({layoutScroll:!0}),G.current=e}return G.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});function K(e,t,n,r){return O(e,t,Te(n),r)}var mn=({current:e})=>e?e.ownerDocument.defaultView:null,hn=(e,t)=>Math.abs(e-t);function gn(e,t){let n=hn(e.x,t.x),r=hn(e.y,t.y);return Math.sqrt(n**2+r**2)}var _n=new Set([`auto`,`scroll`]),vn=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=q(this.lastRawMoveEventInfo,this.transformPagePoint));let e=J(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=gn(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=x;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=q(t,this.transformPagePoint),y.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=J(e.type===`pointercancel`?this.lastMoveEventInfo:q(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ve(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=q(De(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=x;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,J(s,this.history)),this.removeListeners=Se(K(this.contextWindow,`pointermove`,this.handlePointerMove),K(this.contextWindow,`pointerup`,this.handlePointerUp),K(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(_n.has(e.overflowX)||_n.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),y.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),h(this.updatePoint)}};function q(e,t){return t?{point:t(e.point)}:e}function yn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J({point:e},t){return{point:e,delta:yn(e,xn(t)),offset:yn(e,bn(t)),velocity:Sn(t,.1)}}function bn(e){return e[0]}function xn(e){return e[e.length-1]}function Sn(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=xn(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oe(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>oe(t)*2&&(r=e[1]);let a=re(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Cn(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?f(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?f(n,e,r.max):Math.min(e,n)),e}function wn(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Tn(e,{top:t,left:n,bottom:r,right:i}){return{x:wn(e.x,n,i),y:wn(e.y,t,r)}}function En(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Dn(e,t){return{x:En(e.x,t.x),y:En(e.y,t.y)}}function On(e,t){let n=.5,r=L(e),i=L(t);return i>r?n=w(t.min,t.max-r,e.min):r>i&&(n=w(e.min,e.max-i,t.min)),u(0,1,n)}function kn(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Y=.35;function An(e=Y){return e===!1?e=0:e===!0&&(e=Y),{x:jn(e,`left`,`right`),y:jn(e,`top`,`bottom`)}}function jn(e,t,n){return{min:Mn(e,t),max:Mn(e,n)}}function Mn(e,t){return typeof e==`number`?e:e[t]||0}var Nn=new WeakMap,Pn=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=S(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(De(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ie(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),B(e=>{let t=this.getAxisMotionValue(e).get()||0;if(m.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=L(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&y.update(()=>i(e,t),!1,!0),Me(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Ln(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&y.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new vn(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:mn(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&y.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!X(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Cn(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&o(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Tn(n.layoutBox,e):this.constraints=!1,this.elastic=An(t),r!==this.constraints&&!o(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&B(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=kn(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!o(e))return!1;let n=e.current;ue(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Oe(n,r.root,this.visualElement.getTransformPagePoint()),a=Dn(r.layout.layoutBox,i);if(t){let e=t(ge(a));this.hasMutatedConstraints=!!e,e&&(a=be(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=B(o=>{if(!X(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Me(this.visualElement,e),n.start(he(e,n,0,t,this.visualElement,!1))}stopAnimation(){B(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){B(t=>{let{drag:n}=this.getProps();if(!X(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-f(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!o(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};B(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=On({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),B(t=>{if(!X(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(f(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Nn.set(this.visualElement,this);let e=this.visualElement.current,t=K(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ne(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();o(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=In(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),y.read(r);let s=O(window,`resize`,()=>this.scalePositionWithinConstraints()),c=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(B(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{s(),t(),a(),c&&c(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Y,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Fn(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function In(e,t,n){let r=Ke(e,Fn(n)),i=Ke(t,Fn(n));return()=>{r(),i()}}function X(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ln(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Rn=class extends je{constructor(e){super(e),this.removeGroupControls=_,this.removeListeners=_,this.controls=new Pn(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Z=e=>(t,n)=>{e&&y.update(()=>e(t,n),!1,!0)},zn=class extends je{constructor(){super(...arguments),this.removePointerDownListener=_}onPointerDown(e){this.session=new vn(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mn(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Z(e),onStart:Z(t),onMove:Z(n),onEnd:(e,t)=>{delete this.session,r&&y.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=K(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Bn=n(),Q=e(t(),1),$=!1,Vn=class extends Q.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),$&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),V.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),$=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||y.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ne.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;$=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Hn(e){let[t,n]=c(),r=(0,Q.useContext)(s);return(0,Bn.jsx)(Vn,{...e,layoutGroup:r,switchLayoutGroup:(0,Q.useContext)(a),isPresent:t,safeToRemove:n})}var Un={pan:{Feature:zn},drag:{Feature:Rn,ProjectionNode:pn,MeasureLayout:Hn}},Wn={layout:{ProjectionNode:pn,MeasureLayout:Hn}},Gn=l({...xe,...ke,...Un,...Wn},_e);export{Fe as n,Pe as r,Gn as t};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{A as i,E as a,T as o,j as s,k as c,w as l}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CFpDeb9o.js";import{Ct as u,D as d,G as f,O as ee,Tt as p,X as m,Z as te,at as h,b as ne,ct as g,ft as re,ht as _,it as ie,lt as v,mt as ae,ot as y,pt as oe,rt as b,s as se,st as x,v as S,vt as ce,wt as le,xt as ue,y as C}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js";import{C as de,D as fe,E as pe,O as w,S as me,T as he,_ as ge,a as _e,b as ve,c as ye,d as T,f as E,g as be,h as D,i as xe,k as Se,l as Ce,m as we,n as Te,o as O,p as Ee,r as De,s as Oe,t as ke,u as Ae,v as je,w as Me,x as k,y as Ne}from"./vendor~conversation-panel~conversation~index-C23ZXO4R.js";var Pe=r(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Fe=r(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]);function Ie(e){return e===`x`||e===`y`?k[e]?null:(k[e]=!0,()=>{k[e]=!1}):k.x||k.y?null:(k.x=k.y=!0,()=>{k.x=k.y=!1})}function A(e){return ce(e)&&`ownerSVGElement`in e}var j=new WeakMap,M,Le=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:A(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Re=Le(`inline`,`width`,`offsetWidth`),ze=Le(`block`,`height`,`offsetHeight`);function Be({target:e,borderBoxSize:t}){j.get(e)?.forEach(n=>{n(e,{get width(){return Re(e,t)},get height(){return ze(e,t)}})})}function Ve(e){e.forEach(Be)}function He(){typeof ResizeObserver>`u`||(M=new ResizeObserver(Ve))}function Ue(e,t){M||He();let n=me(e);return n.forEach(e=>{let n=j.get(e);n||(n=new Set,j.set(e,n)),n.add(t),M?.observe(e)}),()=>{n.forEach(e=>{let n=j.get(e);n?.delete(t),n?.size||M?.unobserve(e)})}}var N=new Set,P;function We(){P=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};N.forEach(t=>t(e))},window.addEventListener(`resize`,P)}function Ge(e){return N.add(e),P||We(),()=>{N.delete(e),!N.size&&typeof P==`function`&&(window.removeEventListener(`resize`,P),P=void 0)}}function Ke(e,t){return typeof e==`function`?Ge(e):Ue(e,t)}function qe(e){return A(e)&&e.tagName===`svg`}function F(e,t){e.min=t.min,e.max=t.max}function I(e,t){F(e.x,t.x),F(e.y,t.y)}function Je(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ye=1e-4,Xe=1-Ye,Ze=1+Ye,Qe=.01,$e=0-Qe,et=0+Qe;function L(e){return e.max-e.min}function tt(e,t,n){return Math.abs(e-t)<=n}function nt(e,t,n,r=.5){e.origin=r,e.originPoint=f(t.min,t.max,e.origin),e.scale=L(n)/L(t),e.translate=f(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Xe&&e.scale<=Ze||isNaN(e.scale))&&(e.scale=1),(e.translate>=$e&&e.translate<=et||isNaN(e.translate))&&(e.translate=0)}function R(e,t,n,r){nt(e.x,t.x,n.x,r?r.originX:void 0),nt(e.y,t.y,n.y,r?r.originY:void 0)}function rt(e,t,n,r=0){e.min=(r?f(n.min,n.max,r):n.min)+t.min,e.max=e.min+L(t)}function it(e,t,n,r){rt(e.x,t.x,n.x,r?.x),rt(e.y,t.y,n.y,r?.y)}function at(e,t,n,r=0){let i=r?f(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+L(t)}function z(e,t,n,r){at(e.x,t.x,n.x,r?.x),at(e.y,t.y,n.y,r?.y)}function ot(e,t,n,r,i){return e-=t,e=Ae(e,1/n,r),i!==void 0&&(e=Ae(e,1/i,r)),e}function st(e,t=0,n=1,r=.5,i,a=e,o=e){if(m.test(t)&&(t=parseFloat(t),t=f(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=f(a.min,a.max,r);e===a&&(s-=t),e.min=ot(e.min,t,n,s,i),e.max=ot(e.max,t,n,s,i)}function ct(e,t,[n,r,i],a,o){st(e,t[n],t[r],t[i],t.scale,a,o)}var lt=[`x`,`scaleX`,`originX`],ut=[`y`,`scaleY`,`originY`];function dt(e,t,n,r){ct(e.x,t,lt,n?n.x:void 0,r?r.x:void 0),ct(e.y,t,ut,n?n.y:void 0,r?r.y:void 0)}function ft(e){return e.translate===0&&e.scale===1}function pt(e){return ft(e.x)&&ft(e.y)}function mt(e,t){return e.min===t.min&&e.max===t.max}function ht(e,t){return mt(e.x,t.x)&&mt(e.y,t.y)}function gt(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _t(e,t){return gt(e.x,t.x)&>(e.y,t.y)}function vt(e){return L(e.x)/L(e.y)}function yt(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function B(e){return[e(`x`),e(`y`)]}function bt(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var xt=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],St=xt.length,Ct=e=>typeof e==`string`?parseFloat(e):e,wt=e=>typeof e==`number`||te.test(e);function Tt(e,t,n,r,i,a){i?(e.opacity=f(0,n.opacity??1,Dt(r)),e.opacityExit=f(t.opacity??1,0,Ot(r))):a&&(e.opacity=f(t.opacity??1,n.opacity??1,r));for(let i=0;i<St;i++){let a=xt[i],o=Et(t,a),s=Et(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||wt(o)===wt(s)?(e[a]=Math.max(f(Ct(o),Ct(s),r),0),(m.test(s)||m.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=f(t.rotate||0,n.rotate||0,r))}function Et(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Dt=kt(0,.5,fe),Ot=kt(.5,.95,_);function kt(e,t,n){return r=>r<e?0:r>t?1:n(w(e,t,r))}function At(e,t,n){let r=d(e)?e:ee(e);return r.start(he(``,r,t,n)),r.animation}var jt=(e,t)=>e.depth-t.depth,Mt=class{constructor(){this.children=[],this.isDirty=!1}add(e){le(this.children,e),this.isDirty=!0}remove(e){p(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jt),this.isDirty=!1,this.children.forEach(e)}};function Nt(e,t){let n=ie.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(h(r),e(a-t))};return y.setup(r,!0),()=>h(r)}var Pt=class{constructor(){this.members=[]}add(e){le(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(p(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(p(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},V={hasAnimatedSinceResize:!0,hasEverUpdated:!1},H={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},U=[``,`X`,`Y`,`Z`],Ft=1e3,It=0;function W(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Lt(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=de(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,y,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Lt(r)}function Rt({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=It++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,v.value&&(H.nodes=H.calculatedTargetDeltas=H.calculatedProjections=0),this.nodes.forEach(Vt),this.nodes.forEach(Xt),this.nodes.forEach(Zt),this.nodes.forEach(Ht),v.addProjectionMetrics&&v.addProjectionMetrics(H)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mt)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ae),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=A(t)&&!qe(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;y.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Nt(i,250),V.hasAnimatedSinceResize&&(V.hasAnimatedSinceResize=!1,this.nodes.forEach(Yt)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||an,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!_t(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...pe(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Yt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),h(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qt),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lt(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Gt),this.nodes.forEach(Wt);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kt);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qt),this.nodes.forEach(Jt),this.nodes.forEach(zt),this.nodes.forEach(Bt)):this.nodes.forEach(Kt),this.clearAllSnapshots();let e=ie.now();x.delta=u(0,1e3/60,e-x.timestamp),x.timestamp=e,x.isProcessing=!0,g.update.process(x),g.preRender.process(x),g.render.process(x),x.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ne.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ut),this.sharedNodes.forEach($t)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,y.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){y.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!L(this.snapshot.measuredBox.x)&&!L(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=S(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pt(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||D(this.latestValues)||i)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ln(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return S();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dn))){let{scroll:e}=this.root;e&&(E(t.x,e.offset.x),E(t.y,e.offset.y))}return t}removeElementScroll(e){let t=S();if(I(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&I(t,e),E(t.x,i.offset.x),E(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||S();I(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(E(r.x,-n.scroll.offset.x),E(r.y,-n.scroll.offset.y)),D(n.latestValues)&&T(r,n.latestValues,n.layout?.layoutBox)}return D(this.latestValues)&&T(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=S();I(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!D(n.latestValues))continue;let r;n.instance&&(we(n.latestValues)&&n.updateSnapshot(),r=S(),I(r,n.measurePageBox())),dt(t,n.latestValues,n.snapshot?.layoutBox,r)}return D(this.latestValues)&&dt(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==x.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=x.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=S(),this.targetWithTransforms=S()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),it(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):I(this.target,this.layout.layoutBox),ye(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),v.value&&H.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||we(this.parent.latestValues)||Ee(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=S(),this.relativeTargetOrigin=S(),z(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),I(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===x.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;I(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ce(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=S());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Je(this.prevProjectionDelta.x,this.projectionDelta.x),Je(this.prevProjectionDelta.y,this.projectionDelta.y)),R(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!yt(this.projectionDelta.x,this.prevProjectionDelta.x)||!yt(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),v.value&&H.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=C(),this.projectionDelta=C(),this.projectionDeltaWithTransform=C()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=C();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=S(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(rn));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;en(a.x,e.x,n),en(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(z(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),nn(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ht(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=S(),I(d,this.relativeTarget)),s&&(this.animationValues=i,Tt(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(h(this.pendingAnimation),void 0),this.pendingAnimation=y.update(()=>{V.hasAnimatedSinceResize=!0,b.layout++,this.motionValue||=ee(0),this.motionValue.jump(0,!1),this.currentAnimation=At(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{b.layout--},onComplete:()=>{b.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ft),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&un(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||S();let t=L(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=L(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}I(t,n),T(t,i),R(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Pt),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&W(`z`,e,r,this.animationValues);for(let t=0;t<U.length;t++)W(`rotate${U[t]}`,e,r,this.animationValues),W(`skew${U[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=i(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=i(t?.pointerEvents)||``),this.hasProjected&&!D(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=bt(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;let{x:s,y:c}=this.projectionDelta;e.transformOrigin=`${s.origin*100}% ${c.origin*100}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?a.opacity===void 0?``:a.opacity:a.opacityExit===void 0?0:a.opacityExit;for(let t in se){if(a[t]===void 0)continue;let{correct:n,applyTo:i,isCSSVariable:s}=se[t],c=o===`none`?a[t]:n(a[t],r);if(i){let t=i.length;for(let n=0;n<t;n++)e[i[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?i(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Wt),this.root.sharedNodes.clear()}}}function zt(e){e.updateLayout()}function Bt(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)B(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=L(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;F(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else un(i,t.layoutBox,n)&&B(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=L(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=C();R(o,n,t.layoutBox);let s=C();a?R(s,e.applyTransform(r,!0),t.measuredBox):R(s,n,t.layoutBox);let c=!pt(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=S();z(s,t.layoutBox,i.layoutBox,o);let c=S();z(c,n,a.layoutBox,o),_t(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Vt(e){v.value&&H.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ht(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ut(e){e.clearSnapshot()}function Wt(e){e.clearMeasurements()}function Gt(e){e.isLayoutDirty=!0,e.updateLayout()}function Kt(e){e.isLayoutDirty=!1}function qt(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Jt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Yt(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xt(e){e.resolveTargetDelta()}function Zt(e){e.calcProjection()}function Qt(e){e.resetSkewAndRotation()}function $t(e){e.removeLeadSnapshot()}function en(e,t,n){e.translate=f(t.translate,0,n),e.scale=f(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function tn(e,t,n,r){e.min=f(t.min,n.min,r),e.max=f(t.max,n.max,r)}function nn(e,t,n,r){tn(e.x,t.x,n.x,r),tn(e.y,t.y,n.y,r)}function rn(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var an={duration:.45,ease:[.4,0,.1,1]},on=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sn=on(`applewebkit/`)&&!on(`chrome/`)?Math.round:_;function cn(e){e.min=sn(e.min),e.max=sn(e.max)}function ln(e){cn(e.x),cn(e.y)}function un(e,t,n){return e===`position`||e===`preserve-aspect`&&!tt(vt(t),vt(n),.2)}function dn(e){return e!==e.root&&e.scroll?.wasRoot}var fn=Rt({attachResizeListener:(e,t)=>O(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),G={current:void 0},pn=Rt({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!G.current){let e=new fn({});e.mount(window),e.setOptions({layoutScroll:!0}),G.current=e}return G.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});function K(e,t,n,r){return O(e,t,Te(n),r)}var mn=({current:e})=>e?e.ownerDocument.defaultView:null,hn=(e,t)=>Math.abs(e-t);function gn(e,t){let n=hn(e.x,t.x),r=hn(e.y,t.y);return Math.sqrt(n**2+r**2)}var _n=new Set([`auto`,`scroll`]),vn=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=q(this.lastRawMoveEventInfo,this.transformPagePoint));let e=J(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=gn(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=x;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=q(t,this.transformPagePoint),y.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=J(e.type===`pointercancel`?this.lastMoveEventInfo:q(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ve(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=q(De(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=x;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,J(s,this.history)),this.removeListeners=Se(K(this.contextWindow,`pointermove`,this.handlePointerMove),K(this.contextWindow,`pointerup`,this.handlePointerUp),K(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(_n.has(e.overflowX)||_n.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),y.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),h(this.updatePoint)}};function q(e,t){return t?{point:t(e.point)}:e}function yn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J({point:e},t){return{point:e,delta:yn(e,xn(t)),offset:yn(e,bn(t)),velocity:Sn(t,.1)}}function bn(e){return e[0]}function xn(e){return e[e.length-1]}function Sn(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=xn(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oe(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>oe(t)*2&&(r=e[1]);let a=re(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Cn(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?f(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?f(n,e,r.max):Math.min(e,n)),e}function wn(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Tn(e,{top:t,left:n,bottom:r,right:i}){return{x:wn(e.x,n,i),y:wn(e.y,t,r)}}function En(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Dn(e,t){return{x:En(e.x,t.x),y:En(e.y,t.y)}}function On(e,t){let n=.5,r=L(e),i=L(t);return i>r?n=w(t.min,t.max-r,e.min):r>i&&(n=w(e.min,e.max-i,t.min)),u(0,1,n)}function kn(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Y=.35;function An(e=Y){return e===!1?e=0:e===!0&&(e=Y),{x:jn(e,`left`,`right`),y:jn(e,`top`,`bottom`)}}function jn(e,t,n){return{min:Mn(e,t),max:Mn(e,n)}}function Mn(e,t){return typeof e==`number`?e:e[t]||0}var Nn=new WeakMap,Pn=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=S(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(De(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ie(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),B(e=>{let t=this.getAxisMotionValue(e).get()||0;if(m.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=L(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&y.update(()=>i(e,t),!1,!0),Me(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Ln(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&y.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new vn(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:mn(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&y.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!X(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Cn(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&o(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Tn(n.layoutBox,e):this.constraints=!1,this.elastic=An(t),r!==this.constraints&&!o(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&B(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=kn(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!o(e))return!1;let n=e.current;ue(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Oe(n,r.root,this.visualElement.getTransformPagePoint()),a=Dn(r.layout.layoutBox,i);if(t){let e=t(ge(a));this.hasMutatedConstraints=!!e,e&&(a=be(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=B(o=>{if(!X(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Me(this.visualElement,e),n.start(he(e,n,0,t,this.visualElement,!1))}stopAnimation(){B(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){B(t=>{let{drag:n}=this.getProps();if(!X(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-f(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!o(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};B(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=On({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),B(t=>{if(!X(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(f(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Nn.set(this.visualElement,this);let e=this.visualElement.current,t=K(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ne(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();o(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=In(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),y.read(r);let s=O(window,`resize`,()=>this.scalePositionWithinConstraints()),c=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(B(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{s(),t(),a(),c&&c(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Y,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Fn(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function In(e,t,n){let r=Ke(e,Fn(n)),i=Ke(t,Fn(n));return()=>{r(),i()}}function X(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ln(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Rn=class extends je{constructor(e){super(e),this.removeGroupControls=_,this.removeListeners=_,this.controls=new Pn(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Z=e=>(t,n)=>{e&&y.update(()=>e(t,n),!1,!0)},zn=class extends je{constructor(){super(...arguments),this.removePointerDownListener=_}onPointerDown(e){this.session=new vn(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mn(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Z(e),onStart:Z(t),onMove:Z(n),onEnd:(e,t)=>{delete this.session,r&&y.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=K(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Bn=n(),Q=e(t(),1),$=!1,Vn=class extends Q.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),$&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),V.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),$=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||y.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ne.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;$=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Hn(e){let[t,n]=c(),r=(0,Q.useContext)(s);return(0,Bn.jsx)(Vn,{...e,layoutGroup:r,switchLayoutGroup:(0,Q.useContext)(a),isPresent:t,safeToRemove:n})}var Un={pan:{Feature:zn},drag:{Feature:Rn,ProjectionNode:pn,MeasureLayout:Hn}},Wn={layout:{ProjectionNode:pn,MeasureLayout:Hn}},Gn=l({...xe,...ke,...Un,...Wn},_e);export{Fe as n,Pe as r,Gn as t};
|