@openhands/agent-canvas 1.0.0-rc.7 → 1.0.0-rc.9
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/README.md +1 -3
- package/README.windows.md +2 -2
- package/build/assets/{QueryClientProvider-2bFjjuvv.js → QueryClientProvider-XcSjsfpb.js} +1 -1
- package/build/assets/{Trans-D1xHkKyr.js → Trans-sy4l4TyQ.js} +1 -1
- package/build/assets/{acp-providers-Djbp2WMV.js → acp-providers-Dzb4nxxB.js} +1 -1
- package/build/assets/{active-backend-context-BiVlte2V.js → active-backend-context-B2OSC-qe.js} +1 -1
- package/build/assets/add-backend-modal-lG8XDYjr.js +1 -0
- package/build/assets/{agent-server-adapter-BD6kvwWb.js → agent-server-adapter-BPpZcLOE.js} +3 -3
- package/build/assets/agent-server-client-options-wXLeJYeM.js +1 -0
- package/build/assets/{agent-server-conversation-service.api-8AC86rC5.js → agent-server-conversation-service.api-C4Fc9Jnp.js} +1 -1
- package/build/assets/{agent-settings-DycVwGfd.js → agent-settings-Blipgztd.js} +1 -1
- package/build/assets/{alert-banner-BUqPui_3.js → alert-banner-Bsvys-hT.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-D0KeG5vZ.js → analytics-consent-form-modal-Cujm1lCj.js} +1 -1
- package/build/assets/{api-key-entry-screen-BnvQM0v5.js → api-key-entry-screen-BarZU9nr.js} +1 -1
- package/build/assets/{app-settings-FRYUtG-Z.js → app-settings-CofRfixq.js} +1 -1
- package/build/assets/{automation-detail-DiIq3Vsh.js → automation-detail-BV4Cn0O8.js} +1 -1
- package/build/assets/{automations-list-DQn7k1Ix.js → automations-list-BaJ61q7P.js} +1 -1
- package/build/assets/{back-nav-button-B8eULM4t.js → back-nav-button-D20Avel_.js} +1 -1
- package/build/assets/{backend-form-modal-DY3My0us.js → backend-form-modal-B3BCZDPq.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-BW2WPX-c.js → backend-synced-settings-badge-Da0G6Lwv.js} +1 -1
- package/build/assets/{base-modal-B_MCb3rx.js → base-modal-DvuGYyu1.js} +1 -1
- package/build/assets/{brand-button-B6g_UvEG.js → brand-button-9SOzmqPP.js} +1 -1
- package/build/assets/{browser-tab-DVHx54yn.js → browser-tab-bveyJhG9.js} +1 -1
- package/build/assets/{chat-send-button-Ce9rK8Vd.js → chat-send-button-DzRpAQr4.js} +1 -1
- package/build/assets/{checkmark-BQIxLn5W.js → checkmark--JWAesua.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-DRwQ4Z7K.js → circle-plus-check-toggle-AO9DWyDX.js} +1 -1
- package/build/assets/{close-HybccyBS.js → close--W-tHn1h.js} +1 -1
- package/build/assets/{code-tag-DZCEX2zo.js → code-tag-chmctf4w.js} +1 -1
- package/build/assets/{combobox-caret-kEa3kTvf.js → combobox-caret-C9BNHfSu.js} +1 -1
- package/build/assets/{condenser-settings-BlbT8YRd.js → condenser-settings-Bo07FAEi.js} +1 -1
- package/build/assets/{confirmation-modal-CG_Fgrny.js → confirmation-modal-Cq3eqvqH.js} +1 -1
- package/build/assets/{context-menu-list-item-CvJv3-kq.js → context-menu-list-item-BQU0jZPq.js} +1 -1
- package/build/assets/conversation-DDdRyW4z.js +19 -0
- package/build/assets/conversation-panel-Dww2uJOd.js +1 -0
- package/build/assets/conversation-rGQV1Eym.js +1 -0
- package/build/assets/{conversation-service.api-CngSQhPh.js → conversation-service.api-ByRiRU1e.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-B5eOSEGv.js → conversation-tab-empty-state-C8tztloo.js} +1 -1
- package/build/assets/{copy-D6CyDz2n.js → copy-CdKN5rtJ.js} +1 -1
- package/build/assets/{declaration-BDfM67Kl.js → declaration-D9ucT0fq.js} +1 -1
- package/build/assets/{device-verify-CAevP6_3.js → device-verify-YuGXnpRk.js} +1 -1
- package/build/assets/{dropdown-classes-CL8egwz_.js → dropdown-classes-CVp0kVdt.js} +1 -1
- package/build/assets/{edit-automation-modal-CwLfhSMN.js → edit-automation-modal-CpA_JKLY.js} +1 -1
- package/build/assets/{ellipsis-button-Db-AwbLv.js → ellipsis-button-k7HLwYth.js} +1 -1
- package/build/assets/{entry.client-BKDpKmdB.js → entry.client-DUpefbBp.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DnYXhc1E.js → enum-filter-dropdown-COqUq3mB.js} +1 -1
- package/build/assets/{environment-switch-overlay-BgYKFdf6.js → environment-switch-overlay-wB5LxfYZ.js} +1 -1
- package/build/assets/{extensions-hub-CgisT2wb.js → extensions-hub-BYCLWP3d.js} +1 -1
- package/build/assets/{extensions-navigation-nurGkQe5.js → extensions-navigation-3FLKfb6g.js} +1 -1
- package/build/assets/{files-tab-DIyAYvp0.js → files-tab-CBUPwSV1.js} +1 -1
- package/build/assets/{files-tab-store-RScGdwu8.js → files-tab-store-DSKUhziI.js} +1 -1
- package/build/assets/{folder-IChmji2Y.js → folder-DPTBlxWb.js} +1 -1
- package/build/assets/home-BDCL0Psk.js +1 -0
- package/build/assets/{install-server-modal-C8fylTet.js → install-server-modal-CWZhBKwH.js} +1 -1
- package/build/assets/{launch-BNiqgTvz.js → launch-CMZknx1e.js} +1 -1
- package/build/assets/{lesson-plan-BdmMvboE.js → lesson-plan-y520IDs6.js} +1 -1
- package/build/assets/{lightbulb-DzViGAuw.js → lightbulb-S616sGEL.js} +1 -1
- package/build/assets/{link-external-Dwv3oQAx.js → link-external-ooNztGLp.js} +1 -1
- package/build/assets/{llm-client-P9f2gKeW.js → llm-client-D6EtdLBs.js} +1 -1
- package/build/assets/llm-not-configured-banner-CJyURBCm.js +27 -0
- package/build/assets/llm-settings-BW6yW2Go.js +1 -0
- package/build/assets/{llm-settings-B92l1Z2N.js → llm-settings-CiY22Wzi.js} +1 -1
- package/build/assets/{loading-spinner-Dtm7y-w5.js → loading-spinner-D7bOU6I7.js} +1 -1
- package/build/assets/{manage-backends-modal-qpq2M_oN.js → manage-backends-modal-v5POMal5.js} +1 -1
- package/build/assets/manifest-eccb7f46.js +1 -0
- package/build/assets/{markdown-renderer-Dt0RXhUJ.js → markdown-renderer-z446oW0Z.js} +1 -1
- package/build/assets/{mcp-BKdD21xY.js → mcp-DgPFZ_Dv.js} +1 -1
- package/build/assets/{messages-Ch8Rd1cx.js → messages-Dq6AQ8mp.js} +1 -1
- package/build/assets/{modal-backdrop-DmDLoot0.js → modal-backdrop-_VbcKk5K.js} +1 -1
- package/build/assets/{modal-body-BWjhfiSa.js → modal-body-Cd-PtMHr.js} +1 -1
- package/build/assets/{modal-classes-DbJbhQCW.js → modal-classes-CNm4ovfm.js} +1 -1
- package/build/assets/{modal-close-button-DXN6uYvt.js → modal-close-button-Dbo0NAMt.js} +1 -1
- package/build/assets/{model-selector-BMn4D5v6.js → model-selector-CdZs21EZ.js} +1 -1
- package/build/assets/{navigation-context-BrRCrWhm.js → navigation-context-BpAOh_t5.js} +1 -1
- package/build/assets/{navigation-link-qUrH_I5_.js → navigation-link-Dci7Nuyf.js} +1 -1
- package/build/assets/{onboarding-B50IeNyy.js → onboarding-Cdwu8QIy.js} +1 -1
- package/build/assets/{openhands-logo-DnfHAq7Y.js → openhands-logo-Dzm-d_V_.js} +1 -1
- package/build/assets/{option-service.api-lzN_3s9w.js → option-service.api-CdYnKVsu.js} +1 -1
- package/build/assets/{organization-service.api-CNmSPGj4.js → organization-service.api-CzMvXIQT.js} +1 -1
- package/build/assets/{path-utils-CKgIQZAY.js → path-utils-DKu3CNkH.js} +1 -1
- package/build/assets/{plan-components-D9fU4FFh.js → plan-components-CutRBi0G.js} +1 -1
- package/build/assets/{planner-tab-B7kpsTT8.js → planner-tab-YkOp7QXt.js} +1 -1
- package/build/assets/{profiles-client-BNvHck-I.js → profiles-client-BjUo3q05.js} +1 -1
- package/build/assets/{providers-189W9TJO.js → providers-CbpQft-X.js} +1 -1
- package/build/assets/{proxy--Uy1iGsW.js → proxy-Bx3NeKeo.js} +1 -1
- package/build/assets/{query-client-config-B9ZI-1_w.js → query-client-config-Ca3tW1AH.js} +1 -1
- package/build/assets/{recommended-automations-launcher-C_RcP2yb.js → recommended-automations-launcher-WxaZcjRD.js} +1 -1
- package/build/assets/{root-Bz22PITD.js → root-CiNoOVrb.js} +2 -2
- package/build/assets/{root-layout-B8swq9fS.js → root-layout-DUw-s9LS.js} +2 -2
- package/build/assets/{runtime-waiting-state-DPjfE32a.js → runtime-waiting-state-8i0Z3A_i.js} +1 -1
- package/build/assets/{sdk-section-page-ozvrzW4r.js → sdk-section-page-DPBwwLle.js} +1 -1
- package/build/assets/{sdk-settings-schema-Ck6f2ON9.js → sdk-settings-schema-Big50zDH.js} +1 -1
- package/build/assets/{search-aDWSdSb7.js → search-C_l_XW4e.js} +1 -1
- package/build/assets/{secrets-service-D6Gcymcs.js → secrets-service-Skzza9sx.js} +1 -1
- package/build/assets/{secrets-settings-Bga0bwB1.js → secrets-settings-DmpsTC9V.js} +1 -1
- package/build/assets/{settings-DHAhcPm2.js → settings-ChsRtIJQ.js} +1 -1
- package/build/assets/{settings-dropdown-input-N0FtDFkk.js → settings-dropdown-input-BP-arqjU.js} +1 -1
- package/build/assets/{settings-gear-D8ao16bi.js → settings-gear-f-zWpxfI.js} +1 -1
- package/build/assets/{settings-index-CJvQH5ls.js → settings-index-BLfmrKRl.js} +1 -1
- package/build/assets/{settings-input-CyWJBrqC.js → settings-input-BM8ANxDb.js} +1 -1
- package/build/assets/{settings-list-classes-CYRnRf8r.js → settings-list-classes-B9uo5WES.js} +1 -1
- package/build/assets/{settings-modal-BeAlR7Be.js → settings-modal-Cth7Zb-I.js} +1 -1
- package/build/assets/{settings-section-header-context-1fN7Xkb3.js → settings-section-header-context-Cid25HM2.js} +1 -1
- package/build/assets/{settings-service.api-CFt5HmXD.js → settings-service.api-CcpckquT.js} +1 -1
- package/build/assets/{settings-switch-D3aEIphL.js → settings-switch-xa6q4M6j.js} +1 -1
- package/build/assets/{shared-conversation-CtRf6CQN.js → shared-conversation-Y0C8zqdr.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-DkYaKR6Q.js → sidebar-mobile-menu-toggle-BvcBXvLY.js} +1 -1
- package/build/assets/{sidebar-nav-link-CzeuB4So.js → sidebar-nav-link-BekRAssb.js} +1 -1
- package/build/assets/{skill-card-pill-row-CvLCLqqD.js → skill-card-pill-row-DeodrwPG.js} +1 -1
- package/build/assets/{skills-jKeJCunm.js → skills-BE5HJuGM.js} +1 -1
- package/build/assets/{skills-client-Ui_9FvXp.js → skills-client-CgraS-wA.js} +1 -1
- package/build/assets/{skills-plugins-juwPhlEE.js → skills-plugins-rIza_fUf.js} +1 -1
- package/build/assets/{skills-settings-BW09n_Px.js → skills-settings-Dvl7gpEx.js} +1 -1
- package/build/assets/{styled-tooltip-B3wz8m5E.js → styled-tooltip-X61SEwqk.js} +1 -1
- package/build/assets/{suspense-BpkWt-39.js → suspense-Bqb0V0q1.js} +1 -1
- package/build/assets/{switch-skeleton-Cl_Nh2kt.js → switch-skeleton-BbIWemkK.js} +1 -1
- package/build/assets/{task-list-tab-DKnHShLG.js → task-list-tab-BFnyHGsn.js} +1 -1
- package/build/assets/{telemetry-DR_3fMN0.js → telemetry-CAWBJ_rB.js} +1 -1
- package/build/assets/{terminal-BFi5FOMc.js → terminal-B92mACR5.js} +1 -1
- package/build/assets/{terminal-CZH2h1J3.js → terminal-BFypysgZ.js} +1 -1
- package/build/assets/{toggle-switch-BzaEofjj.js → toggle-switch-CL_wRiGs.js} +1 -1
- package/build/assets/{typography-BFj4IzMj.js → typography-BLSEGjph.js} +1 -1
- package/build/assets/{u-check-circle-Cs2GOrZ7.js → u-check-circle-dG_VJqx5.js} +1 -1
- package/build/assets/{u-check-circle-half-DGgLKVV1.js → u-check-circle-half-D-5ZPRnd.js} +1 -1
- package/build/assets/{u-circuit-DniZPNAV.js → u-circuit-BXoisXOA.js} +1 -1
- package/build/assets/{u-edit-BvTiDr33.js → u-edit-DIgADxLH.js} +1 -1
- package/build/assets/{use-acp-credential-form-8yHKY_py.js → use-acp-credential-form-Dj7Jkhgp.js} +1 -1
- package/build/assets/{use-active-conversation-CLzls6XV.js → use-active-conversation-BkohEtaN.js} +1 -1
- package/build/assets/{use-agent-settings-schema-BCXxH2N-.js → use-agent-settings-schema-Lf_lBAky.js} +1 -1
- package/build/assets/{use-agent-state-BocVPR5S.js → use-agent-state-DITv5qV7.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BjDwnldw.js → use-cloud-current-user-id-CSm3kgqy.js} +1 -1
- package/build/assets/use-config-DVU9HaPf.js +1 -0
- package/build/assets/{use-create-conversation-CIkPp9u9.js → use-create-conversation-CJUAOf1q.js} +1 -1
- package/build/assets/{use-create-secret-Bwy6457V.js → use-create-secret-LObNBU3M.js} +1 -1
- package/build/assets/{use-handle-plan-click-CjNwpDeO.js → use-handle-plan-click-BdcdMWbv.js} +1 -1
- package/build/assets/use-is-authed-B8eLO-Xq.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-QmcJQxUY.js → use-launch-skill-in-chat-BTgXIu3N.js} +1 -1
- package/build/assets/{use-llm-profiles-CZD1ALup.js → use-llm-profiles-BBTR-OsK.js} +1 -1
- package/build/assets/use-runtime-is-ready-BOQpqCvp.js +1 -0
- package/build/assets/{use-save-settings-BjYPOrtF.js → use-save-settings-7_MLft-Y.js} +1 -1
- package/build/assets/{use-settings-YTDcMvj1.js → use-settings-CNsxccvQ.js} +1 -1
- package/build/assets/{use-settings-nav-items-DMit9adK.js → use-settings-nav-items-ykMjd_NG.js} +1 -1
- package/build/assets/{use-skills-fh_U4ZGe.js → use-skills-_unimM2d.js} +1 -1
- package/build/assets/{use-tracking-DJ3Z7ha1.js → use-tracking-C9P88zSo.js} +1 -1
- package/build/assets/{use-user-conversation-Ct93yaXj.js → use-user-conversation-2jZZ-MLA.js} +1 -1
- package/build/assets/{useMutation-B1gQr_yr.js → useMutation-Dm84WAKR.js} +1 -1
- package/build/assets/{useQuery-CbqdITLM.js → useQuery-DGRSm7IT.js} +1 -1
- package/build/assets/{useTranslation-C-T8J2U-.js → useTranslation-CL6FTf1b.js} +1 -1
- package/build/assets/{utils-CXRkUr73.js → utils-eXk6yerZ.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-CkFCLbQW.js → vendor~conversation-panel~conversation-D98u43rl.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-C1BmvJX4.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dqpi2xyZ.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-RuHTcYaf.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-7eqKdLSQ.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-B04AZhMW.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-BP3MGAAY.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-D7ZsdcLa.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-Dkd2wxJA.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~mcp~settings~settings-index~~m3acswdn-CGm-Jxp5.js → vendor~root-layout~home~conversation-panel~conversation~launch~mcp~settings~settings-index~~m3acswdn-DQE89epK.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~mcp~automati~dou5smdo-DH07jaIY.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~mcp~automati~dou5smdo-DavKsAvB.js} +186 -40
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-COlx7Is6.js → vendor~root-layout~home~mcp~automations-list-D40jgugf.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-DuiHR4ce.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BIm99UaF.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-4yr76Evz.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-xCM3k6Rd.js} +1 -1
- package/build/assets/{verification-settings-CeIuPtF2.js → verification-settings-EUkt_CkZ.js} +1 -1
- package/build/assets/{x-mark-BMhi11Sg.js → x-mark-C42svtnu.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +45 -40
- package/build/locales/ca/openhands.json +41 -36
- package/build/locales/de/openhands.json +42 -37
- package/build/locales/en/openhands.json +6 -1
- package/build/locales/es/openhands.json +44 -39
- package/build/locales/fr/openhands.json +44 -39
- package/build/locales/it/openhands.json +44 -39
- package/build/locales/ja/openhands.json +44 -39
- package/build/locales/ko-KR/openhands.json +44 -39
- package/build/locales/no/openhands.json +44 -39
- package/build/locales/pt/openhands.json +44 -39
- package/build/locales/tr/openhands.json +43 -38
- package/build/locales/uk/openhands.json +44 -39
- package/build/locales/zh-CN/openhands.json +44 -39
- package/build/locales/zh-TW/openhands.json +44 -39
- package/config/defaults.json +4 -4
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.js +1 -1
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +1 -1
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +1 -1
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/git-control-bar.cjs +1 -1
- package/dist/components/features/chat/git-control-bar.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar.js +1 -1
- package/dist/components/features/chat/git-control-bar.js.map +1 -1
- package/dist/components/features/chat/open-repository-modal.cjs +1 -1
- package/dist/components/features/chat/open-repository-modal.cjs.map +1 -1
- package/dist/components/features/chat/open-repository-modal.js +0 -3
- package/dist/components/features/chat/open-repository-modal.js.map +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
- package/dist/components/features/chat/pending-user-messages.js +31 -28
- package/dist/components/features/chat/pending-user-messages.js.map +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.cjs +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.cjs.map +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.js +79 -77
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.js.map +1 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.cjs +1 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.cjs.map +1 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.js +67 -65
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.js.map +1 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs +1 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs.map +1 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.js +2 -2
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.js.map +1 -1
- package/dist/components/features/settings/settings-navigation.cjs +1 -1
- package/dist/components/features/settings/settings-navigation.cjs.map +1 -1
- package/dist/components/features/settings/settings-navigation.js +1 -1
- package/dist/components/features/settings/settings-navigation.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +3 -2
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +6 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +612 -527
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +45 -40
- package/dist/locales/ca/openhands.json +41 -36
- package/dist/locales/de/openhands.json +42 -37
- package/dist/locales/en/openhands.json +6 -1
- package/dist/locales/es/openhands.json +44 -39
- package/dist/locales/fr/openhands.json +44 -39
- package/dist/locales/it/openhands.json +44 -39
- package/dist/locales/ja/openhands.json +44 -39
- package/dist/locales/ko-KR/openhands.json +44 -39
- package/dist/locales/no/openhands.json +44 -39
- package/dist/locales/pt/openhands.json +44 -39
- package/dist/locales/tr/openhands.json +43 -38
- package/dist/locales/uk/openhands.json +44 -39
- package/dist/locales/zh-CN/openhands.json +44 -39
- package/dist/locales/zh-TW/openhands.json +44 -39
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +186 -40
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +2 -2
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/utils/websocket-url.cjs +1 -1
- package/dist/utils/websocket-url.cjs.map +1 -1
- package/dist/utils/websocket-url.js +2 -2
- package/dist/utils/websocket-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +149 -59
- package/scripts/dev-safe.mjs +1 -1
- package/build/assets/add-backend-modal-CSfOPrnr.js +0 -1
- package/build/assets/agent-server-client-options-B-C8JaTb.js +0 -1
- package/build/assets/conversation-B7ztPdyS.js +0 -1
- package/build/assets/conversation-DZYd8QiZ.js +0 -19
- package/build/assets/conversation-panel-CklMXcs6.js +0 -1
- package/build/assets/home-iVOrSOWL.js +0 -1
- package/build/assets/llm-not-configured-banner-BQgVTo0O.js +0 -27
- package/build/assets/llm-settings-ICWFhhjM.js +0 -1
- package/build/assets/manifest-d230d4a5.js +0 -1
- package/build/assets/use-config-C4DX1-nF.js +0 -1
- package/build/assets/use-is-authed-7P3xSsit.js +0 -1
- package/build/assets/use-runtime-is-ready-B7sbw-q5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-D9ucT0fq.js";e();var n=t(),r=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})});export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-D9ucT0fq.js";e();var n=t(),r=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M16.2929 2.29289C16.6834 1.90237 17.3166 1.90237 17.7071 2.29289L21.7071 6.29289C22.0976 6.68342 22.0976 7.31658 21.7071 7.70711L8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H4C3.44772 21 3 20.5523 3 20V16C3 15.7348 3.10536 15.4804 3.29289 15.2929L13.2927 5.2931L16.2929 2.29289ZM14 7.41421L5 16.4142V19H7.58579L16.5858 10L14 7.41421ZM18 8.58579L19.5858 7L17 4.41421L15.4142 6L18 8.58579Z`,fill:`currentColor`})});export{r as t};
|
package/build/assets/{use-acp-credential-form-8yHKY_py.js → use-acp-credential-form-Dj7Jkhgp.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,t as r}from"./declaration-
|
|
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-D9ucT0fq.js";import{n as i}from"./QueryClientProvider-XcSjsfpb.js";import{t as a}from"./useQuery-DGRSm7IT.js";import{t as o}from"./useTranslation-CL6FTf1b.js";import{g as s,h as c,m as l,p as u}from"./query-client-config-Ca3tW1AH.js";import{t as d}from"./check-BhnsMsWy.js";import{t as f}from"./loader-circle-1XB9nbwF.js";import{t as p}from"./utils-eXk6yerZ.js";import{n as m}from"./agent-server-client-options-wXLeJYeM.js";import{n as h}from"./active-backend-context-B2OSC-qe.js";import{f as g}from"./vendor~root-layout~home~conversation-panel~conversation~launch~mcp~settings~settings-index~~m3acswdn-DQE89epK.js";import{c as _}from"./brand-button-9SOzmqPP.js";import{n as v,t as y}from"./settings-input-BM8ANxDb.js";import{a as b,l as x}from"./acp-providers-Dzb4nxxB.js";import{n as S,t as C}from"./use-create-secret-LObNBU3M.js";var w=e(t(),1),T=n();function E({conflicts:e}){let{t}=o(`openhands`);return(0,T.jsx)(T.Fragment,{children:e.map(([e,n])=>(0,T.jsx)(`p`,{"data-testid":`acp-credential-conflict-warning`,className:`text-sm text-amber-300`,children:t(r.SETTINGS$ACP_CREDENTIAL_CONFLICT_WARNING,{credential:e,conflicting:n})},`${e}:${n}`))})}function D({status:e,isChecking:t,providerName:n,testIdPrefix:i}){let{t:a}=o(`openhands`);return e===`authenticated`?(0,T.jsxs)(`div`,{"data-testid":`${i}-detected`,className:`flex items-start gap-2 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3 text-sm text-green-200`,children:[(0,T.jsx)(d,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:a(r.ONBOARDING$ACP_AUTH_DETECTED,{provider:n})})]}):t?(0,T.jsxs)(`div`,{"data-testid":`${i}-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,T.jsx)(f,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:a(r.ONBOARDING$ACP_AUTH_CHECKING,{provider:n})})]}):null}function O({field:e,value:t,onChange:n,alreadySet:i,testId:a,showOptionalTag:s}){let{t:c}=o(`openhands`),l=i?c(r.ONBOARDING$ACP_SECRET_ALREADY_SET):``;return(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.multiline?(0,T.jsxs)(`label`,{className:`flex flex-col gap-2.5`,children:[(0,T.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-sm font-mono text-white`,children:e.name}),s&&(0,T.jsx)(v,{})]}),(0,T.jsx)(`textarea`,{"data-testid":a,name:e.name,rows:4,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,value:t,placeholder:l,onChange:e=>n(e.target.value),className:p(_,`font-mono text-xs`)})]}):(0,T.jsx)(y,{testId:a,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:t,onChange:n,showOptionalTag:s,placeholder:l}),(0,T.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:c(e.hint_key,e.hint_values)})]})}var k=10;function A(e){return`${e.stdout??``}\n${e.stderr??``}`}function j(e){let t;try{t=JSON.parse((e.stdout??``).trim())}catch{return`unknown`}let n=t?.loggedIn;return typeof n==`boolean`?n?`authenticated`:`unauthenticated`:`unknown`}function M(e){let t=A(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function N(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var P={"claude-code":{command:`claude auth status --json`,classify:j},codex:{command:`codex login status`,classify:M},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:N}},F=class{static async getAuthStatus(e){let t=P[e];if(!t)return`unknown`;let n=await new g(m()).executeCommand(t.command,void 0,k);return t.classify(n)}};async function I(e){try{return await F.getAuthStatus(e)}catch{return`unknown`}}function L(e,t={}){let{enabled:n=!0}=t,r=h(),i=r.backend.kind===`local`,o=n&&i&&!!e,s=a({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>I(e),enabled:o,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:s.data??`unknown`,isChecking:o&&s.isFetching&&s.data===void 0,isSupported:i}}function R(e,t){let{t:n}=o(`openhands`),a=i(),{mutateAsync:d}=C(),[f,p]=w.useState(!1);return{saveFilled:async(i,{silent:o=!1}={})=>{let f=e.map(e=>({field:e,value:i[e.name]?.trim()})).filter(e=>!!e.value);if(f.length===0)return!0;p(!0);try{for(let{field:e,value:t}of f)await d({name:e.name,value:t});return await a.invalidateQueries({queryKey:[`secrets-search`]}),await a.invalidateQueries({queryKey:[`secrets`]}),!t&&f.some(({field:e})=>e.multiline)?c(n(r.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):o||l(n(r.SETTINGS$SAVED)),!0}catch(e){return u(s(e)||n(r.ERROR$GENERIC)),!1}finally{p(!1)}},isSaving:f}}function z(e){let{data:t}=S(),n=w.useMemo(()=>x(e),[e]),[r,i]=w.useState({}),{saveFilled:a,isSaving:o}=R(n,!0);w.useEffect(()=>{i({})},[e]);let s=w.useCallback(e=>(t??[]).some(t=>t.name===e),[t]),c=w.useCallback(e=>!!r[e]?.trim()||s(e),[r,s]),l=w.useCallback((e,t)=>i(n=>({...n,[e]:t})),[]),u=w.useCallback(()=>i({}),[]);return{fields:n,values:r,setValue:l,secretExists:s,hasValueFor:c,conflicts:b(e,c),consumesFileCredentials:!0,isDirty:n.some(e=>!!r[e.name]?.trim()),save:e=>a(r,e),reset:u,isSaving:o}}export{E as a,D as i,L as n,O as r,z as t};
|
package/build/assets/{use-active-conversation-CLzls6XV.js → use-active-conversation-BkohEtaN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{n}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{n}from"./navigation-context-BpAOh_t5.js";import{t as r}from"./conversation-service.api-ByRiRU1e.js";import{t as i}from"./use-user-conversation-2jZZ-MLA.js";var a=e(t(),1);function o(){let{conversationId:e}=n();return{conversationId:e}}function s(){let{conversationId:e}=o();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var c=()=>{let{conversationId:e}=o(),t=!!e&&e.startsWith(`task-`),n=i(!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=n.data;r.setCurrentConversation(e||null)},[e,n.isFetched,n?.data?.execution_status]),n};export{s as n,o as r,c as t};
|
package/build/assets/{use-agent-settings-schema-BCXxH2N-.js → use-agent-settings-schema-Lf_lBAky.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";import{u as t}from"./agent-server-client-options-wXLeJYeM.js";import{n}from"./active-backend-context-B2OSC-qe.js";import{t as r}from"./settings-service.api-CcpckquT.js";import{t as i}from"./use-is-authed-B8eLO-Xq.js";var a=(a,o)=>{let{data:s}=i(),{backend:c,orgId:l}=n(),u=!t(c),{data:d,error:f,isLoading:p,isFetching:m}=e({queryKey:[`settings-schema`,a,c.id,l,c.kind,c.host,c.apiKey],queryFn:a===`conversation`?r.getConversationSettingsSchema:r.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!o&&!!s&&u,meta:{disableToast:!0}});return o?{data:o,error:null,isLoading:!1,isFetching:!1}:{data:d,error:f,isLoading:p,isFetching:m}},o=e=>a(`agent`,e),s=e=>a(`conversation`,e);export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{S as n}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{S as n}from"./utils-eXk6yerZ.js";import{t as r}from"./common-Dh7OqABE.js";import{t as i}from"./conversation-state-store-NEktJKfL.js";import{t as a}from"./use-active-conversation-BkohEtaN.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-BjDwnldw.js → use-cloud-current-user-id-CSm3kgqy.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-CzMvXIQT.js";import{t as i}from"./utils-eXk6yerZ.js";import{n as a,r as o}from"./active-backend-context-B2OSC-qe.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";import{f as t,i as n,s as r,u as i}from"./active-backend-context-B2OSC-qe.js";import{t as a}from"./option-service.api-CdYnKVsu.js";var o=o=>e({queryKey:r.WEB_CLIENT_CONFIG,queryFn:a.getConfig,retry:(e,n)=>!t(n)&&!i(n)&&e<3,meta:{disableToast:!0},...n,enabled:o?.enabled});export{o as t};
|
package/build/assets/{use-create-conversation-CIkPp9u9.js → use-create-conversation-CJUAOf1q.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-
|
|
1
|
+
import{t as e}from"./useMutation-Dm84WAKR.js";import{n as t}from"./QueryClientProvider-XcSjsfpb.js";import{t as n}from"./agent-server-conversation-service.api-C4Fc9Jnp.js";import{l as r,s as i}from"./agent-server-adapter-BPpZcLOE.js";import{t as a}from"./use-tracking-C9P88zSo.js";import{t as o}from"./use-llm-profiles-BBTR-OsK.js";var s=()=>{let s=t(),{trackConversationCreated:c}=a(),{data:l}=o();return e({mutationKey:[`create-conversation`],mutationFn:async e=>{let{query:t,conversationInstructions:a,plugins:o,repository:s,workingDir:c,workspaceMode:u,parentConversationId:d,agentType:f}=e,p=await n.createConversation(t,a,o,s?{selected_repository:s.name,selected_branch:s.branch??null,git_provider:s.gitProvider}:null,c,u,d,f),m=p.app_conversation_id;if(m&&l?.active_profile){let e=i(m);r(m,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:l.active_profile})}return{conversation_id:p.app_conversation_id?p.app_conversation_id:`task-${p.id}`,session_api_key:null,url:p.agent_server_url,task_id:p.id}},onSuccess:async(e,{repository:t})=>{c({hasRepository:!!t}),s.invalidateQueries({queryKey:[`user`,`conversations`]}),s.invalidateQueries({queryKey:[`start-tasks`]})}})};export{s 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}from"./useMutation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./useMutation-Dm84WAKR.js";import{t as r}from"./useQuery-DGRSm7IT.js";import{n as i}from"./active-backend-context-B2OSC-qe.js";import{t as a}from"./secrets-service-Skzza9sx.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
|
package/build/assets/{use-handle-plan-click-CjNwpDeO.js → use-handle-plan-click-BdcdMWbv.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-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-D9ucT0fq.js";import{t as r}from"./useTranslation-CL6FTf1b.js";import{m as i}from"./query-client-config-Ca3tW1AH.js";import{t as a}from"./conversation-store-FQmakEd-.js";import{a as o,r as s}from"./conversation-local-storage-an3MiIiJ.js";import{t as c}from"./use-create-conversation-CJUAOf1q.js";import{t as l}from"./use-active-conversation-BkohEtaN.js";var u=e(t(),1),d=()=>{let{t:e}=r(`openhands`),{setConversationMode:t,setSubConversationTaskId:d,subConversationTaskId:f}=a(),{data:p}=l(),{mutate:m,isPending:h}=c();return(0,u.useEffect)(()=>{if(!p?.id)return;let e=s(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),o(p.id,{subConversationTaskId:t.task_id}))}})},[p,m,t,d,f,e]),isCreatingConversation:h}};export{d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";var t=()=>e({queryKey:[`user`,`authenticated`],queryFn:async()=>!0,staleTime:1e3*60*5,gcTime:1e3*60*15,retry:!1,meta:{disableToast:!0}});export{t};
|
package/build/assets/{use-launch-skill-in-chat-QmcJQxUY.js → use-launch-skill-in-chat-BTgXIu3N.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-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-D9ucT0fq.js";import{n as r}from"./navigation-context-BpAOh_t5.js";import{t as i}from"./conversation-store-FQmakEd-.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"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";import{n as t}from"./agent-server-client-options-wXLeJYeM.js";import{a as n,i as r,n as i}from"./active-backend-context-B2OSC-qe.js";import{t as a}from"./profiles-client-BjUo3q05.js";var o=class{static async listProfiles(){return new a(t()).listProfiles()}static async getProfile(e,n){let r=n?{exposeSecrets:n}:{};return new a(t()).getProfile(e,r)}static async saveProfile(e,n){return new a(t()).saveProfile(e,n)}static async deleteProfile(e){return new a(t()).deleteProfile(e)}static async renameProfile(e,n){return new a(t()).renameProfile(e,n)}static async activateProfile(e){return new a(t()).activateProfile(e)}};function s(t={}){let{backend:a,orgId:s}=i();return e({queryKey:[...n.all,a.id,s],queryFn:o.listProfiles,...r,enabled:t.enabled??!0,meta:{disableToast:!0}})}export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,w as t,y as n}from"./utils-eXk6yerZ.js";import{t as r}from"./use-active-conversation-BkohEtaN.js";import{t as i}from"./use-agent-state-DITv5qV7.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-
|
|
1
|
+
import{t as e}from"./useMutation-Dm84WAKR.js";import{n as t}from"./QueryClientProvider-XcSjsfpb.js";import{c as n}from"./active-backend-context-B2OSC-qe.js";import{t as r}from"./settings-service.api-CcpckquT.js";import{r as i}from"./use-settings-CNsxccvQ.js";import{t as a}from"./use-tracking-C9P88zSo.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 i=t.agent_settings_diff,a=i?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}i&&Object.keys(i).length>0?t.agent_settings_diff=i: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 r.saveSettings(t)},s=(r=`personal`)=>{let{trackMcpConfigUpdated:s}=a(),c=t(),{data:l}=i(r);return e({mutationFn:async e=>{let t=e.mcp_config,n=l?.mcp_config;t&&n!==t&&s({sseServersCount:t.sse_servers?.length??0,stdioServersCount:t.stdio_servers?.length??0}),await o(e)},onSuccess:async()=>{await c.invalidateQueries({queryKey:n.byScope(r)})},meta:{disableToast:!0}})};export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";import{u as t}from"./agent-server-client-options-wXLeJYeM.js";import{c as n,n as r}from"./active-backend-context-B2OSC-qe.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~bxn4ldi1-_LydBB1e.js";import{t as a}from"./settings-wh2sLLJM.js";import{t as o}from"./settings-service.api-CcpckquT.js";var s=(...e)=>e.find(e=>typeof e==`boolean`),c=(...e)=>e.find(e=>typeof e==`number`),l=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},u={sse_servers:[],stdio_servers:[],shttp_servers:[]},d=`https://mcp.linear.app/sse`,f=`https://mcp.linear.app/mcp`;function p(e,t){return t===`sse`?e.split(`?`)[0].replace(/\/+$/,``)===d:!1}function m(e){if(!e||typeof e!=`object`)return{...u};let t=e;if(!(`mcpServers`in t)||!t.mcpServers||typeof t.mcpServers!=`object`)return{...u};let n=[],r=[],i=[],a=[],o=t.mcpServers;for(let[e,t]of Object.entries(o)){if(!t||typeof t!=`object`)continue;let o=t.url;if(o){let e=t.transport,r=t.auth,s=typeof r==`string`&&r!==`oauth`?r:void 0;if(p(o,e)){let e={url:f};s&&(e.api_key=s),a.push(e)}else if(e===`sse`){let e={url:o};s&&(e.api_key=s),n.push(e)}else{let e={url:o};s&&(e.api_key=s),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)}}let s=e=>e.replace(/\/+$/,``);for(let e of a)i.some(t=>s(typeof t==`string`?t:t.url)===s(e.url))||i.push(e);return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function h(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 g=e=>{if(typeof e==`object`&&e&&`status`in e){let{status:t}=e;if(typeof t==`number`)return t}if(i.isAxiosError(e))return e.response?.status},_=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},v=(e,t,n,r=!1)=>{let i=_(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},y=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}};return{...a,...e,llm_model:v(t,`llm.model`,a.llm_model),llm_base_url:v(t,`llm.base_url`,a.llm_base_url,!0),agent:v(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:s(n.confirmation_mode)??a.confirmation_mode,security_analyzer:l(n.security_analyzer)??a.security_analyzer,max_iterations:c(n.max_iterations)??a.max_iterations,enable_default_condenser:s(_(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:c(_(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:m(e.mcp_config??t.mcp_config),search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},b=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return y(await o.getSettings())},x=(i=`personal`)=>{let o=r(),s=!t(o.backend),c=e({queryKey:[...n.byScope(i),o.backend.id,o.orgId],queryFn:()=>b(i),retry:(e,t)=>g(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?g(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{h as a,m as i,b as n,x as r,g as t};
|
package/build/assets/{use-settings-nav-items-DMit9adK.js → use-settings-nav-items-ykMjd_NG.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-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-D9ucT0fq.js";import{t as r}from"./createLucideIcon-CkGTf9Qj.js";import{n as i}from"./active-backend-context-B2OSC-qe.js";import{t as a}from"./use-config-DVU9HaPf.js";import{n as o}from"./acp-providers-Dzb4nxxB.js";import{r as s}from"./use-settings-CNsxccvQ.js";import{t as c}from"./u-circuit-BXoisXOA.js";import{r as l}from"./settings-utils--H_EvFjx.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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DGRSm7IT.js";import{a as t,n,x as r}from"./agent-server-client-options-wXLeJYeM.js";import{t as i}from"./skills-client-CgraS-wA.js";import{t as a}from"./proxy-Bx3NeKeo.js";import{t as o}from"./vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~mcp~automati~dou5smdo-DavKsAvB.js";var s=100;function c(){let e=t().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});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}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(e){if(t().backend.kind===`cloud`)return l();let a=[];try{a=(await new i(n()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:e??r()})).skills??[]}catch{}return[...a,...d]}},p=t=>e({queryKey:[`skills`,t??null],queryFn:()=>f.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BmOMM-6e.js";import{r as t}from"./use-settings-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BmOMM-6e.js";import{r as t}from"./use-settings-CNsxccvQ.js";var n=()=>{let n=e(),{data:r}=t(),i={current_url:window.location.href,user_email:r?.email||r?.git_user_email||null},a=(e,t={})=>{!n||r?.user_consents_to_analytics!==!0||n.capture(e,{...t,...i})};return{trackLoginButtonClick:({provider:e})=>{a(`login_button_clicked`,{provider:e})},trackConversationCreated:({hasRepository:e})=>{a(`conversation_created`,{has_repository:e})},trackPushButtonClick:()=>{a(`push_button_clicked`)},trackPullButtonClick:()=>{a(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{a(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{a(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{a(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{a(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{a(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{a(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{a(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{a(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{a(`download_trajectory_button_clicked`)}}};export{n as t};
|
package/build/assets/{use-user-conversation-Ct93yaXj.js → use-user-conversation-2jZZ-MLA.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"./useQuery-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./useQuery-DGRSm7IT.js";import{n as r}from"./active-backend-context-B2OSC-qe.js";import{t as i}from"./agent-server-conversation-service.api-C4Fc9Jnp.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,c as i,f as a,k as o,w as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js";import{d as c}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfbjdnyv-C5ZIbuq8.js";import{n as l}from"./QueryClientProvider-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,c as i,f as a,k as o,w as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js";import{d as c}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfbjdnyv-C5ZIbuq8.js";import{n as l}from"./QueryClientProvider-XcSjsfpb.js";var u=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),n(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??c();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){i.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let n=l(t),[a]=d.useState(()=>new u(n,e));d.useEffect(()=>{a.setOptions(e)},[a,e]);let o=d.useSyncExternalStore(d.useCallback(e=>a.subscribe(i.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=d.useCallback((e,t)=>{a.mutate(e,t).catch(r)},[a]);if(o.error&&s(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}export{f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{_ as n,c as r,u as i}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js";import{a,c as o,i as s,l as c,n as l,o as u,r as d,s as f,t as p,u as m}from"./suspense-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{_ as n,c as r,u as i}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js";import{a,c as o,i as s,l as c,n as l,o as u,r as d,s as f,t as p,u as m}from"./suspense-Bqb0V0q1.js";import{n as h}from"./QueryClientProvider-XcSjsfpb.js";var g=e(t(),1);function _(e,t,m){let _=c(),v=o(),y=h(m),b=y.defaultQueryOptions(e);y.getDefaultOptions().queries?._experimental_beforeQuery?.(b);let x=y.getQueryCache().get(b.queryHash);b._optimisticResults=_?`isRestoring`:`optimistic`,p(b),a(b,v,x),f(v);let S=!y.getQueryCache().get(b.queryHash),[C]=g.useState(()=>new t(y,b)),w=C.getOptimisticResult(b),T=!_&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(e=>{let t=T?C.subscribe(r.batchCalls(e)):n;return C.updateResult(),t},[C,T]),()=>C.getCurrentResult(),()=>C.getCurrentResult()),g.useEffect(()=>{C.setOptions(b)},[b,C]),d(b,w))throw l(b,C,v);if(u({result:w,errorResetBoundary:v,throwOnError:b.throwOnError,query:x,suspense:b.suspense}))throw w.error;return y.getDefaultOptions().queries?._experimental_afterQuery?.(b,w),b.experimental_prefetchInRender&&!i.isServer()&&s(w,_)&&(S?l(b,C,v):x?.promise)?.catch(n).finally(()=>{C.updateResult()}),b.notifyOnChangeProps?w:C.trackResult(w)}function v(e,t){return _(e,m,t)}export{_ as n,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{i as r,r as i}from"./declaration-
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{i as r,r as i}from"./declaration-D9ucT0fq.js";import{n as a,t as o}from"./context-CI9FqkUp.js";var s=e(n()),c=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);h(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},l={},u=(e,t,n,r)=>{h(n)&&l[n]||(h(n)&&(l[n]=new Date),c(e,t,n,r))},d=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},f=(e,t,n)=>{e.loadNamespaces(t,d(e,n))},p=(e,t,n,r)=>{if(h(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return f(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,d(e,r))},m=(e,t,n={})=>!t.languages||!t.languages.length?(u(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),h=e=>typeof e==`string`,g=e=>typeof e==`object`&&!!e,_=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),v=t(((e,t)=>{t.exports=_()}))(),y={t:(e,t)=>{if(h(t))return t;if(g(t)&&h(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},b=()=>()=>{},x=(e,t={})=>{let{i18n:n}=t,{i18n:c,defaultNS:l}=(0,s.useContext)(o)||{},d=n||c||i();d&&!d.reportNamespaces&&(d.reportNamespaces=new a),d||u(d,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let g=(0,s.useMemo)(()=>({...r(),...d?.options?.react,...t}),[d,t]),{useSuspense:_,keyPrefix:x}=g,S=e||l||d?.options?.defaultNS,C=h(S)?[S]:S||[`translation`],w=(0,s.useMemo)(()=>C,C);d?.reportNamespaces?.addUsedNamespaces?.(w);let T=(0,s.useRef)(0),E=(0,s.useCallback)(e=>{if(!d)return b;let{bindI18n:t,bindI18nStore:n}=g,r=()=>{T.current+=1,e()};return t&&d.on(t,r),n&&d.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>d.off(e,r)),n&&n.split(` `).forEach(e=>d.store.off(e,r))}},[d,g]),D=(0,s.useRef)(),O=(0,s.useCallback)(()=>{if(!d)return y;let e=!!(d.isInitialized||d.initializedStoreOnce)&&w.every(e=>m(e,d,g)),n=t.lng||d.language,r=T.current,i=D.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===x&&i.revision===r)return i;let a={t:d.getFixedT(n,g.nsMode===`fallback`?w:w[0],x),ready:e,lng:n,keyPrefix:x,revision:r};return D.current=a,a},[d,w,x,g,t.lng]),[k,A]=(0,s.useState)(0),{t:j,ready:M}=(0,v.useSyncExternalStore)(E,O,O);(0,s.useEffect)(()=>{if(d&&!M&&!_){let e=()=>A(e=>e+1);t.lng?p(d,t.lng,w,e):f(d,w,e)}},[d,t.lng,w,M,_,k]);let N=d||{},P=(0,s.useRef)(null),F=(0,s.useRef)(),I=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},L=(0,s.useMemo)(()=>{let e=N,t=e?.language,n=e;e&&(P.current&&P.current.__original===e&&F.current===t?n=P.current:(n=I(e),P.current=n,F.current=t));let r=!M&&!_?(...e)=>(u(d,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),j(...e)):j,i=[r,n,M];return i.t=r,i.i18n=n,i.ready=M,i},[j,N,M,N.resolvedLanguage,N.language,N.languages]);if(d&&_&&!M)throw new Promise(e=>{let n=()=>e();t.lng?p(d,t.lng,w,n):f(d,w,n)});return L};export{u as a,c as i,g as n,h as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./declaration-
|
|
1
|
+
import{t as e}from"./declaration-D9ucT0fq.js";import{n as t,r as n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nh19ovoo-DJTFnsA1.js";import{t as r}from"./common-Dh7OqABE.js";var i=`var(--oh-status-success)`,a=`var(--oh-status-error)`,o={base00:`transparent`,base01:`var(--cool-grey-900)`,base02:`var(--cool-grey-700)`,base03:`var(--cool-grey-600)`,base04:`var(--cool-grey-500)`,base05:`var(--cool-grey-200)`,base06:`var(--cool-grey-100)`,base07:`#ffffff`,base08:`#ff5370`,base09:`#f78c6c`,base0A:`#ffcb6b`,base0B:`#c3e88d`,base0C:`#89ddff`,base0D:`#82aaff`,base0E:`#c792ea`,base0F:`#ff5370`},s={PRODUCTION:`https://app.all-hands.dev`},c={LABEL_CLASSNAME:`text-[11px] font-medium leading-4 tracking-[0.11px]`},l={HEIGHT_THRESHOLD:100},u=1.5,d=`/btw`,f=`/model`,p=[{skill:{name:`new`,type:`agentskills`,content:`Creates a new conversation using the same runtime`,triggers:[`/new`]},command:`/new`},{skill:{name:`btw`,type:`agentskills`,content:`Ask the agent a side question without derailing the main task`,triggers:[d]},command:d},{skill:{name:`model`,type:`agentskills`,content:`List saved LLM profiles, or switch the conversation LLM profile with /model <name>`,triggers:[f]},command:f}],m=[`The following information has been included`,`It may or may not be relevant`,`Skill location:`,`(Use this path to resolve`],h=function(e){return e.LOADING=`loading`,e.INIT=`init`,e.RUNNING=`running`,e.AWAITING_USER_INPUT=`awaiting_user_input`,e.PAUSED=`paused`,e.STOPPED=`stopped`,e.FINISHED=`finished`,e.REJECTED=`rejected`,e.ERROR=`error`,e.RATE_LIMITED=`rate_limited`,e.AWAITING_USER_CONFIRMATION=`awaiting_user_confirmation`,e.USER_CONFIRMED=`user_confirmed`,e.USER_REJECTED=`user_rejected`,e}({}),g=[h.INIT,h.LOADING],_=[...g,h.ERROR],v=new Set([r.IDLE,r.RUNNING,r.WAITING_FOR_CONFIRMATION,r.FINISHED]);function y(e){return!!e&&v.has(e)}function b(e){return e===r.PAUSED}function x(e){return e===r.ERROR||e===r.STUCK}function S(t){switch(t){case`WAITING_FOR_SANDBOX`:return e.COMMON$WAITING_FOR_SANDBOX;case`SETTING_UP_GIT_HOOKS`:return e.STATUS$SETTING_UP_GIT_HOOKS;case`SETTING_UP_SKILLS`:return e.STATUS$SETTING_UP_SKILLS;case`READY`:return e.CONVERSATION$READY;case`ERROR`:return e.COMMON$ERROR;default:return e.CONVERSATION$STARTING_CONVERSATION}}function C(t,n,i,a){if(i===`ERROR`||a===`ERROR`||n===`error`)return e.AGENT_STATUS$ERROR_OCCURRED;if(i&&i!==`READY`)return S(i);if(n===r.PAUSED)return e.CHAT_INTERFACE$STOPPED;if(t&&t!==`OPEN`)switch(t){case`CLOSED`:case`CLOSING`:return e.CHAT_INTERFACE$DISCONNECTED;case`CONNECTING`:return e.CHAT_INTERFACE$CONNECTING;default:throw Error(`Unknown WebsocketConnectionState: ${t}`)}if(n&&n!==r.STUCK)switch(n){case r.IDLE:return e.AGENT_STATUS$WAITING_FOR_TASK;case r.RUNNING:return e.AGENT_STATUS$RUNNING_TASK;case r.WAITING_FOR_CONFIRMATION:return e.AGENT_STATUS$WAITING_FOR_USER_CONFIRMATION;case r.FINISHED:return e.CHAT_INTERFACE$AGENT_FINISHED_MESSAGE;default:throw Error(`Unknown executionStatus: ${n}`)}return e.CHAT_INTERFACE$AGENT_ERROR_MESSAGE}function w(...e){return t(n(e))}var T=(e,t)=>{let n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)},E=(e,t)=>{let n=parseFloat(e.style.height||``);return Number.isFinite(n)?n:t},D=(e,t)=>{e.style.setProperty(`height`,`${t}px`)},O=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?!0:`ontouchstart`in window||navigator.maxTouchPoints>0?typeof window.matchMedia==`function`?!window.matchMedia(`(pointer: fine)`).matches:!0:!1,k=e=>e.split(`.`).pop()?.toUpperCase()||`FILE`,A=(e,t)=>{if(!e)return!1;switch(e){case`bitbucket`:case`bitbucket_data_center`:return!0;case`github`:return t===`cloud`;default:return!1}},j=(e,t)=>{if(t&&t.trim()!==``)return t.startsWith(`http`)?t:`https://${t}`;switch(e){case`github`:return`https://github.com`;case`gitlab`:return`https://gitlab.com`;case`bitbucket`:return`https://bitbucket.org`;case`azure_devops`:return`https://dev.azure.com`;case`forgejo`:return`https://codeberg.org`;default:return``}},M=e=>e===`gitlab`?`GitLab`:e===`bitbucket`?`Bitbucket`:e===`bitbucket_data_center`?`Bitbucket Data Center`:e===`azure_devops`?`Azure DevOps`:e===`forgejo`?`Forgejo`:`GitHub`,N=e=>e?`merge request`:`pull request`,P=e=>e?`MR`:`PR`,F=(e,t,n)=>{let r=j(e,n);if(e===`bitbucket_data_center`){let[e,n]=t.split(`/`);return`${r}/projects/${e}/repos/${n}`}return`${r}/${t}`},I=(e,t,n,r)=>{let i=j(e,r);switch(e){case`github`:return`${i}/${t}/tree/${n}`;case`forgejo`:return`${i}/${t}/src/branch/${n}`;case`gitlab`:return`${i}/${t}/-/tree/${n}`;case`bitbucket`:return`${i}/${t}/src/${n}`;case`bitbucket_data_center`:{let e=t.split(`/`);if(e.length>=2){let[t,r]=e;return`${i}/projects/${t}/repos/${r}/browse?at=refs/heads/${n}`}return``}case`azure_devops`:{let e=t.split(`/`);if(e.length===3){let[t,r,a]=e;return`${i}/${t}/${r}/_git/${a}?version=GB${n}`}return``}default:return``}},L=()=>`Please pull the latest code from the repository.`,R=e=>`Please push the changes to a remote branch on ${M(e)}, but do NOT create a ${N(e===`gitlab`)}. Check your current branch name first - if it's main, master, deploy, or another common default branch name, create a new branch with a descriptive name related to your changes. Otherwise, use the exact SAME branch name as the one you are currently on.`,z=e=>{let t=M(e),n=N(e===`gitlab`);return`Please push the changes to ${t} and open a ${n}. If you're on a default branch (e.g., main, master, deploy), create a new branch with a descriptive name otherwise use the current branch. If a ${n} template exists in the repository, please follow it when creating the ${P(e===`gitlab`)} description.`},B=()=>`Please create a new branch with a descriptive name related to the work you plan to do.`,V=e=>!!e&&e!==`ERROR`&&e!==`READY`,H=e=>{let{isPausing:t,isTask:n,taskStatus:r,isStartingStatus:o,isStopStatus:s,curAgentState:c}=e;return t?`#FFD600`:n&&r?r===`ERROR`?a:`#FFD600`:o?`#FFD600`:s?`#ffffff`:c===h.ERROR?a:i};function U({isPausing:t=!1,isTask:n,taskStatus:r,taskDetail:i,isStartingStatus:a,isStopStatus:o,curAgentState:s,errorMessage:c,t:l}){return t?l(e.COMMON$STOPPING):n&&r?r===`ERROR`?i||l(e.CONVERSATION$ERROR_STARTING_CONVERSATION):r===`READY`?l(e.CONVERSATION$READY):i||l(S(r)):a?l(e.COMMON$STARTING):o?l(e.COMMON$SERVER_STOPPED):s===h.ERROR?c||l(e.COMMON$ERROR):l(e.COMMON$RUNNING)}export{m as A,_ as C,l as D,p as E,s as M,c as N,u as O,a as P,h as S,d as T,C as _,B as a,x as b,L as c,U as d,E as f,A as g,D as h,T as i,f as j,o as k,R as l,V as m,I as n,z as o,O as p,F as r,k as s,w as t,H as u,S as v,g as w,b as x,y};
|
|
@@ -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-BDfM67Kl.js";import{t as r}from"./createLucideIcon-CkGTf9Qj.js";import{A as i,E as a,M as o,T as s,j as c,k as l,w as u}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-RuHTcYaf.js";import{$ as d,A as f,C as p,Dt as ee,Et as te,J as m,M as ne,Ot as h,S as g,_t as re,ct as _,dt as v,et as ie,ft as y,gt as ae,ht as oe,lt as b,ot as x,s as se,st as ce,ut as S,vt as C,wt as le,x as w,xt as ue}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-BmZcy_kH.js";import{C as de,D as fe,E as pe,O as T,S as me,T as he,_ as ge,a as _e,b as ve,c as ye,d as E,f as D,g as be,h as O,i as xe,k as Se,l as Ce,m as we,n as Te,o as k,p as Ee,r as De,s as Oe,t as ke,u as Ae,v as je,w as Me,x as A,y as Ne}from"./vendor~conversation-panel~conversation~index-BXt2-3Cc.js";var Pe=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 Fe(e){return e===`x`||e===`y`?A[e]?null:(A[e]=!0,()=>{A[e]=!1}):A.x||A.y?null:(A.x=A.y=!0,()=>{A.x=A.y=!1})}function j(e){return ue(e)&&`ownerSVGElement`in e}var M=new WeakMap,N,Ie=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:j(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Le=Ie(`inline`,`width`,`offsetWidth`),Re=Ie(`block`,`height`,`offsetHeight`);function ze({target:e,borderBoxSize:t}){M.get(e)?.forEach(n=>{n(e,{get width(){return Le(e,t)},get height(){return Re(e,t)}})})}function Be(e){e.forEach(ze)}function Ve(){typeof ResizeObserver>`u`||(N=new ResizeObserver(Be))}function He(e,t){N||Ve();let n=me(e);return n.forEach(e=>{let n=M.get(e);n||(n=new Set,M.set(e,n)),n.add(t),N?.observe(e)}),()=>{n.forEach(e=>{let n=M.get(e);n?.delete(t),n?.size||N?.unobserve(e)})}}var P=new Set,F;function Ue(){F=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};P.forEach(t=>t(e))},window.addEventListener(`resize`,F)}function We(e){return P.add(e),F||Ue(),()=>{P.delete(e),!P.size&&typeof F==`function`&&(window.removeEventListener(`resize`,F),F=void 0)}}function Ge(e,t){return typeof e==`function`?We(e):He(e,t)}function Ke(e){return j(e)&&e.tagName===`svg`}function I(e,t){e.min=t.min,e.max=t.max}function L(e,t){I(e.x,t.x),I(e.y,t.y)}function qe(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Je=1e-4,Ye=1-Je,Xe=1+Je,Ze=.01,Qe=0-Ze,$e=0+Ze;function R(e){return e.max-e.min}function et(e,t,n){return Math.abs(e-t)<=n}function tt(e,t,n,r=.5){e.origin=r,e.originPoint=m(t.min,t.max,e.origin),e.scale=R(n)/R(t),e.translate=m(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ye&&e.scale<=Xe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Qe&&e.translate<=$e||isNaN(e.translate))&&(e.translate=0)}function z(e,t,n,r){tt(e.x,t.x,n.x,r?r.originX:void 0),tt(e.y,t.y,n.y,r?r.originY:void 0)}function nt(e,t,n,r=0){e.min=(r?m(n.min,n.max,r):n.min)+t.min,e.max=e.min+R(t)}function rt(e,t,n,r){nt(e.x,t.x,n.x,r?.x),nt(e.y,t.y,n.y,r?.y)}function it(e,t,n,r=0){let i=r?m(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+R(t)}function B(e,t,n,r){it(e.x,t.x,n.x,r?.x),it(e.y,t.y,n.y,r?.y)}function at(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 ot(e,t=0,n=1,r=.5,i,a=e,o=e){if(d.test(t)&&(t=parseFloat(t),t=m(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=m(a.min,a.max,r);e===a&&(s-=t),e.min=at(e.min,t,n,s,i),e.max=at(e.max,t,n,s,i)}function st(e,t,[n,r,i],a,o){ot(e,t[n],t[r],t[i],t.scale,a,o)}var ct=[`x`,`scaleX`,`originX`],lt=[`y`,`scaleY`,`originY`];function ut(e,t,n,r){st(e.x,t,ct,n?n.x:void 0,r?r.x:void 0),st(e.y,t,lt,n?n.y:void 0,r?r.y:void 0)}function dt(e){return e.translate===0&&e.scale===1}function ft(e){return dt(e.x)&&dt(e.y)}function pt(e,t){return e.min===t.min&&e.max===t.max}function mt(e,t){return pt(e.x,t.x)&&pt(e.y,t.y)}function ht(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gt(e,t){return ht(e.x,t.x)&&ht(e.y,t.y)}function _t(e){return R(e.x)/R(e.y)}function vt(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function V(e){return[e(`x`),e(`y`)]}function yt(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,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}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 bt=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],xt=bt.length,St=e=>typeof e==`string`?parseFloat(e):e,Ct=e=>typeof e==`number`||ie.test(e);function wt(e,t,n,r,i,a){i?(e.opacity=m(0,n.opacity??1,Et(r)),e.opacityExit=m(t.opacity??1,0,Dt(r))):a&&(e.opacity=m(t.opacity??1,n.opacity??1,r));for(let i=0;i<xt;i++){let a=bt[i],o=Tt(t,a),s=Tt(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Ct(o)===Ct(s)?(e[a]=Math.max(m(St(o),St(s),r),0),(d.test(s)||d.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=m(t.rotate||0,n.rotate||0,r))}function Tt(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Et=Ot(0,.5,fe),Dt=Ot(.5,.95,C);function Ot(e,t,n){return r=>r<e?0:r>t?1:n(T(e,t,r))}function kt(e,t,n){let r=f(e)?e:ne(e);return r.start(he(``,r,t,n)),r.animation}var At=(e,t)=>e.depth-t.depth,jt=class{constructor(){this.children=[],this.isDirty=!1}add(e){ee(this.children,e),this.isDirty=!0}remove(e){h(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(At),this.isDirty=!1,this.children.forEach(e)}};function Mt(e,t){let n=ce.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(_(r),e(a-t))};return b.setup(r,!0),()=>_(r)}var Nt=class{constructor(){this.members=[]}add(e){ee(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&&(h(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(h(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)}},H={hasAnimatedSinceResize:!0,hasEverUpdated:!1},U={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},W=[``,`X`,`Y`,`Z`],Pt=1e3,Ft=0;function G(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function It(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`,b,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&It(r)}function Lt({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=Ft++,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,y.value&&(U.nodes=U.calculatedTargetDeltas=U.calculatedProjections=0),this.nodes.forEach(Bt),this.nodes.forEach(Yt),this.nodes.forEach(Xt),this.nodes.forEach(Vt),y.addProjectionMetrics&&y.addProjectionMetrics(U)},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 jt)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new re),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=j(t)&&!Ke(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;b.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Mt(i,250),H.hasAnimatedSinceResize&&(H.hasAnimatedSinceResize=!1,this.nodes.forEach(Jt)))})}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()||rn,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!gt(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,t.path)}else t||Jt(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(),_(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(Zt),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&&It(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(Wt),this.nodes.forEach(Ut);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gt);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kt),this.nodes.forEach(qt),this.nodes.forEach(Rt),this.nodes.forEach(zt)):this.nodes.forEach(Gt),this.clearAllSnapshots();let e=ce.now();S.delta=te(0,1e3/60,e-S.timestamp),S.timestamp=e,S.isProcessing=!0,v.update.process(S),v.preRender.process(S),v.render.process(S),S.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ht),this.sharedNodes.forEach(Qt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,b.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){b.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!R(this.snapshot.measuredBox.x)&&!R(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||=w(),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&&!ft(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||O(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)),cn(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return w();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(un))){let{scroll:e}=this.root;e&&(D(t.x,e.offset.x),D(t.y,e.offset.y))}return t}removeElementScroll(e){let t=w();if(L(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&&L(t,e),D(t.x,i.offset.x),D(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||w();L(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&&(D(r.x,-n.scroll.offset.x),D(r.y,-n.scroll.offset.y)),O(n.latestValues)&&E(r,n.latestValues,n.layout?.layoutBox)}return O(this.latestValues)&&E(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=w();L(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!O(n.latestValues))continue;let r;n.instance&&(we(n.latestValues)&&n.updateSnapshot(),r=w(),L(r,n.measurePageBox())),ut(t,n.latestValues,n.snapshot?.layoutBox,r)}return O(this.latestValues)&&ut(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!==S.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=S.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=w(),this.targetWithTransforms=w()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rt(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):L(this.target,this.layout.layoutBox),ye(this.target,this.targetDelta)):L(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),y.value&&U.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=w(),this.relativeTargetOrigin=w(),B(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),L(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===S.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;L(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=w());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qe(this.prevProjectionDelta.x,this.projectionDelta.x),qe(this.prevProjectionDelta.y,this.projectionDelta.y)),z(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!vt(this.projectionDelta.x,this.prevProjectionDelta.x)||!vt(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),y.value&&U.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=g(),this.projectionDelta=g(),this.projectionDeltaWithTransform=g()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=g();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=w(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(nn));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=m(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=m(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):($t(o.x,e.x,n),$t(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(B(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&mt(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=w(),L(f,this.relativeTarget)),c&&(this.animationValues=a,wt(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),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&&=(_(this.pendingAnimation),void 0),this.pendingAnimation=b.update(()=>{H.hasAnimatedSinceResize=!0,x.layout++,this.motionValue||=ne(0),this.motionValue.jump(0,!1),this.currentAnimation=kt(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{x.layout--},onComplete:()=>{x.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(Pt),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&&ln(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||w();let t=R(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=R(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}L(t,n),E(t,i),z(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nt),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&&G(`z`,e,r,this.animationValues);for(let t=0;t<W.length;t++)G(`rotate${W[t]}`,e,r,this.animationValues),G(`skew${W[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&&!O(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=yt(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(Ut),this.root.sharedNodes.clear()}}}function Rt(e){e.updateLayout()}function zt(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`)V(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=R(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;I(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ln(i,t.layoutBox,n)&&V(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=R(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=g();z(o,n,t.layoutBox);let s=g();a?z(s,e.applyTransform(r,!0),t.measuredBox):z(s,n,t.layoutBox);let c=!ft(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=w();B(s,t.layoutBox,i.layoutBox,o);let c=w();B(c,n,a.layoutBox,o),gt(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 Bt(e){y.value&&U.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 Vt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ht(e){e.clearSnapshot()}function Ut(e){e.clearMeasurements()}function Wt(e){e.isLayoutDirty=!0,e.updateLayout()}function Gt(e){e.isLayoutDirty=!1}function Kt(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function qt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Jt(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yt(e){e.resolveTargetDelta()}function Xt(e){e.calcProjection()}function Zt(e){e.resetSkewAndRotation()}function Qt(e){e.removeLeadSnapshot()}function $t(e,t,n){e.translate=m(t.translate,0,n),e.scale=m(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function en(e,t,n,r){e.min=m(t.min,n.min,r),e.max=m(t.max,n.max,r)}function tn(e,t,n,r){en(e.x,t.x,n.x,r),en(e.y,t.y,n.y,r)}function nn(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var rn={duration:.45,ease:[.4,0,.1,1]},an=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),on=an(`applewebkit/`)&&!an(`chrome/`)?Math.round:C;function sn(e){e.min=on(e.min),e.max=on(e.max)}function cn(e){sn(e.x),sn(e.y)}function ln(e,t,n){return e===`position`||e===`preserve-aspect`&&!et(_t(t),_t(n),.2)}function un(e){return e!==e.root&&e.scroll?.wasRoot}var dn=Lt({attachResizeListener:(e,t)=>k(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),fn=e=>!e.isLayoutDirty&&e.willUpdate(!1);function pn(){let e=new Set,t=new WeakMap,n=()=>e.forEach(fn);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var K={current:void 0},mn=Lt({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!K.current){let e=new dn({});e.mount(window),e.setOptions({layoutScroll:!0}),K.current=e}return K.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),hn=n(),q=e(t(),1),gn=(0,q.createContext)(null);function _n(){let e=(0,q.useRef)(!1);return c(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vn(){let e=_n(),[t,n]=(0,q.useState)(0),r=(0,q.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,q.useCallback)(()=>b.postRender(r),[r]),t]}var yn=e=>e===!0,bn=e=>yn(e===!0)||e===`id`,xn=({children:e,id:t,inherit:n=!0})=>{let r=(0,q.useContext)(o),i=(0,q.useContext)(gn),[a,s]=vn(),c=(0,q.useRef)(null),l=r.id||i;c.current===null&&(bn(n)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:yn(n)&&r.group||pn()});let u=(0,q.useMemo)(()=>({...c.current,forceRender:a}),[s]);return(0,hn.jsx)(o.Provider,{value:u,children:e})};function J(e,t,n,r){return k(e,t,Te(n),r)}var Sn=({current:e})=>e?e.ownerDocument.defaultView:null,Cn=(e,t)=>Math.abs(e-t);function wn(e,t){let n=Cn(e.x,t.x),r=Cn(e.y,t.y);return Math.sqrt(n**2+r**2)}var Tn=new Set([`auto`,`scroll`]),En=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=Y(this.lastRawMoveEventInfo,this.transformPagePoint));let e=X(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=wn(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=S;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=Y(t,this.transformPagePoint),b.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=X(e.type===`pointercancel`?this.lastMoveEventInfo:Y(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=Y(De(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=S;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,X(s,this.history)),this.removeListeners=Se(J(this.contextWindow,`pointermove`,this.handlePointerMove),J(this.contextWindow,`pointerup`,this.handlePointerUp),J(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Tn.has(e.overflowX)||Tn.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),b.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_(this.updatePoint)}};function Y(e,t){return t?{point:t(e.point)}:e}function Dn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function X({point:e},t){return{point:e,delta:Dn(e,kn(t)),offset:Dn(e,On(t)),velocity:An(t,.1)}}function On(e){return e[0]}function kn(e){return e[e.length-1]}function An(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=kn(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ae(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ae(t)*2&&(r=e[1]);let a=oe(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 jn(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?m(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?m(n,e,r.max):Math.min(e,n)),e}function Mn(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 Nn(e,{top:t,left:n,bottom:r,right:i}){return{x:Mn(e.x,n,i),y:Mn(e.y,t,r)}}function Pn(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 Fn(e,t){return{x:Pn(e.x,t.x),y:Pn(e.y,t.y)}}function In(e,t){let n=.5,r=R(e),i=R(t);return i>r?n=T(t.min,t.max-r,e.min):r>i&&(n=T(e.min,e.max-i,t.min)),te(0,1,n)}function Ln(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 Z=.35;function Rn(e=Z){return e===!1?e=0:e===!0&&(e=Z),{x:zn(e,`left`,`right`),y:zn(e,`top`,`bottom`)}}function zn(e,t,n){return{min:Bn(e,t),max:Bn(e,n)}}function Bn(e,t){return typeof e==`number`?e:e[t]||0}var Vn=new WeakMap,Hn=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=w(),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=Fe(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),V(e=>{let t=this.getAxisMotionValue(e).get()||0;if(d.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=R(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&b.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=Gn(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&&b.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 En(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Sn(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&&b.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||!Q(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=jn(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&&s(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Nn(n.layoutBox,e):this.constraints=!1,this.elastic=Rn(t),r!==this.constraints&&!s(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&V(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ln(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!s(e))return!1;let n=e.current;le(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=Fn(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=V(o=>{if(!Q(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(){V(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){V(t=>{let{drag:n}=this.getProps();if(!Q(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]-m(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!s(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};V(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=In({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(),V(t=>{if(!Q(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(m(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Vn.set(this.visualElement,this);let e=this.visualElement.current,t=J(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();s(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Wn(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),b.read(r);let o=k(window,`resize`,()=>this.scalePositionWithinConstraints()),c=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(V(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),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=Z,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Un(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Wn(e,t,n){let r=Ge(e,Un(n)),i=Ge(t,Un(n));return()=>{r(),i()}}function Q(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Gn(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Kn=class extends je{constructor(e){super(e),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Hn(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}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()}},$=e=>(t,n)=>{e&&b.update(()=>e(t,n),!1,!0)},qn=class extends je{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(e){this.session=new En(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sn(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:$(e),onStart:$(t),onMove:$(n),onEnd:(e,t)=>{delete this.session,r&&b.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=J(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Jn=!1,Yn=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),Jn&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),H.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}),Jn=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||b.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(),p.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Jn=!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 Xn(e){let[t,n]=l(),r=(0,q.useContext)(o);return(0,hn.jsx)(Yn,{...e,layoutGroup:r,switchLayoutGroup:(0,q.useContext)(a),isPresent:t,safeToRemove:n})}var Zn={pan:{Feature:qn},drag:{Feature:Kn,ProjectionNode:mn,MeasureLayout:Xn}},Qn={layout:{ProjectionNode:mn,MeasureLayout:Xn}},$n=u({...xe,...ke,...Zn,...Qn},_e);export{xn as n,Pe as r,$n 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-D9ucT0fq.js";import{t as r}from"./createLucideIcon-CkGTf9Qj.js";import{A as i,E as a,M as o,T as s,j as c,k as l,w as u}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-7eqKdLSQ.js";import{$ as d,A as f,C as p,Dt as ee,Et as te,J as m,M as ne,Ot as h,S as g,_t as re,ct as _,dt as v,et as ie,ft as y,gt as ae,ht as oe,lt as b,ot as x,s as se,st as ce,ut as S,vt as C,wt as le,x as w,xt as ue}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-BmZcy_kH.js";import{C as de,D as fe,E as pe,O as T,S as me,T as he,_ as ge,a as _e,b as ve,c as ye,d as E,f as D,g as be,h as O,i as xe,k as Se,l as Ce,m as we,n as Te,o as k,p as Ee,r as De,s as Oe,t as ke,u as Ae,v as je,w as Me,x as A,y as Ne}from"./vendor~conversation-panel~conversation~index-BXt2-3Cc.js";var Pe=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 Fe(e){return e===`x`||e===`y`?A[e]?null:(A[e]=!0,()=>{A[e]=!1}):A.x||A.y?null:(A.x=A.y=!0,()=>{A.x=A.y=!1})}function j(e){return ue(e)&&`ownerSVGElement`in e}var M=new WeakMap,N,Ie=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:j(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Le=Ie(`inline`,`width`,`offsetWidth`),Re=Ie(`block`,`height`,`offsetHeight`);function ze({target:e,borderBoxSize:t}){M.get(e)?.forEach(n=>{n(e,{get width(){return Le(e,t)},get height(){return Re(e,t)}})})}function Be(e){e.forEach(ze)}function Ve(){typeof ResizeObserver>`u`||(N=new ResizeObserver(Be))}function He(e,t){N||Ve();let n=me(e);return n.forEach(e=>{let n=M.get(e);n||(n=new Set,M.set(e,n)),n.add(t),N?.observe(e)}),()=>{n.forEach(e=>{let n=M.get(e);n?.delete(t),n?.size||N?.unobserve(e)})}}var P=new Set,F;function Ue(){F=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};P.forEach(t=>t(e))},window.addEventListener(`resize`,F)}function We(e){return P.add(e),F||Ue(),()=>{P.delete(e),!P.size&&typeof F==`function`&&(window.removeEventListener(`resize`,F),F=void 0)}}function Ge(e,t){return typeof e==`function`?We(e):He(e,t)}function Ke(e){return j(e)&&e.tagName===`svg`}function I(e,t){e.min=t.min,e.max=t.max}function L(e,t){I(e.x,t.x),I(e.y,t.y)}function qe(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Je=1e-4,Ye=1-Je,Xe=1+Je,Ze=.01,Qe=0-Ze,$e=0+Ze;function R(e){return e.max-e.min}function et(e,t,n){return Math.abs(e-t)<=n}function tt(e,t,n,r=.5){e.origin=r,e.originPoint=m(t.min,t.max,e.origin),e.scale=R(n)/R(t),e.translate=m(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ye&&e.scale<=Xe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Qe&&e.translate<=$e||isNaN(e.translate))&&(e.translate=0)}function z(e,t,n,r){tt(e.x,t.x,n.x,r?r.originX:void 0),tt(e.y,t.y,n.y,r?r.originY:void 0)}function nt(e,t,n,r=0){e.min=(r?m(n.min,n.max,r):n.min)+t.min,e.max=e.min+R(t)}function rt(e,t,n,r){nt(e.x,t.x,n.x,r?.x),nt(e.y,t.y,n.y,r?.y)}function it(e,t,n,r=0){let i=r?m(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+R(t)}function B(e,t,n,r){it(e.x,t.x,n.x,r?.x),it(e.y,t.y,n.y,r?.y)}function at(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 ot(e,t=0,n=1,r=.5,i,a=e,o=e){if(d.test(t)&&(t=parseFloat(t),t=m(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=m(a.min,a.max,r);e===a&&(s-=t),e.min=at(e.min,t,n,s,i),e.max=at(e.max,t,n,s,i)}function st(e,t,[n,r,i],a,o){ot(e,t[n],t[r],t[i],t.scale,a,o)}var ct=[`x`,`scaleX`,`originX`],lt=[`y`,`scaleY`,`originY`];function ut(e,t,n,r){st(e.x,t,ct,n?n.x:void 0,r?r.x:void 0),st(e.y,t,lt,n?n.y:void 0,r?r.y:void 0)}function dt(e){return e.translate===0&&e.scale===1}function ft(e){return dt(e.x)&&dt(e.y)}function pt(e,t){return e.min===t.min&&e.max===t.max}function mt(e,t){return pt(e.x,t.x)&&pt(e.y,t.y)}function ht(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gt(e,t){return ht(e.x,t.x)&&ht(e.y,t.y)}function _t(e){return R(e.x)/R(e.y)}function vt(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function V(e){return[e(`x`),e(`y`)]}function yt(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,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}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 bt=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],xt=bt.length,St=e=>typeof e==`string`?parseFloat(e):e,Ct=e=>typeof e==`number`||ie.test(e);function wt(e,t,n,r,i,a){i?(e.opacity=m(0,n.opacity??1,Et(r)),e.opacityExit=m(t.opacity??1,0,Dt(r))):a&&(e.opacity=m(t.opacity??1,n.opacity??1,r));for(let i=0;i<xt;i++){let a=bt[i],o=Tt(t,a),s=Tt(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Ct(o)===Ct(s)?(e[a]=Math.max(m(St(o),St(s),r),0),(d.test(s)||d.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=m(t.rotate||0,n.rotate||0,r))}function Tt(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Et=Ot(0,.5,fe),Dt=Ot(.5,.95,C);function Ot(e,t,n){return r=>r<e?0:r>t?1:n(T(e,t,r))}function kt(e,t,n){let r=f(e)?e:ne(e);return r.start(he(``,r,t,n)),r.animation}var At=(e,t)=>e.depth-t.depth,jt=class{constructor(){this.children=[],this.isDirty=!1}add(e){ee(this.children,e),this.isDirty=!0}remove(e){h(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(At),this.isDirty=!1,this.children.forEach(e)}};function Mt(e,t){let n=ce.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(_(r),e(a-t))};return b.setup(r,!0),()=>_(r)}var Nt=class{constructor(){this.members=[]}add(e){ee(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&&(h(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(h(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)}},H={hasAnimatedSinceResize:!0,hasEverUpdated:!1},U={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},W=[``,`X`,`Y`,`Z`],Pt=1e3,Ft=0;function G(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function It(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`,b,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&It(r)}function Lt({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=Ft++,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,y.value&&(U.nodes=U.calculatedTargetDeltas=U.calculatedProjections=0),this.nodes.forEach(Bt),this.nodes.forEach(Yt),this.nodes.forEach(Xt),this.nodes.forEach(Vt),y.addProjectionMetrics&&y.addProjectionMetrics(U)},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 jt)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new re),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=j(t)&&!Ke(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;b.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Mt(i,250),H.hasAnimatedSinceResize&&(H.hasAnimatedSinceResize=!1,this.nodes.forEach(Jt)))})}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()||rn,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!gt(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,t.path)}else t||Jt(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(),_(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(Zt),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&&It(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(Wt),this.nodes.forEach(Ut);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gt);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kt),this.nodes.forEach(qt),this.nodes.forEach(Rt),this.nodes.forEach(zt)):this.nodes.forEach(Gt),this.clearAllSnapshots();let e=ce.now();S.delta=te(0,1e3/60,e-S.timestamp),S.timestamp=e,S.isProcessing=!0,v.update.process(S),v.preRender.process(S),v.render.process(S),S.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ht),this.sharedNodes.forEach(Qt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,b.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){b.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!R(this.snapshot.measuredBox.x)&&!R(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||=w(),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&&!ft(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||O(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)),cn(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return w();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(un))){let{scroll:e}=this.root;e&&(D(t.x,e.offset.x),D(t.y,e.offset.y))}return t}removeElementScroll(e){let t=w();if(L(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&&L(t,e),D(t.x,i.offset.x),D(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||w();L(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&&(D(r.x,-n.scroll.offset.x),D(r.y,-n.scroll.offset.y)),O(n.latestValues)&&E(r,n.latestValues,n.layout?.layoutBox)}return O(this.latestValues)&&E(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=w();L(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!O(n.latestValues))continue;let r;n.instance&&(we(n.latestValues)&&n.updateSnapshot(),r=w(),L(r,n.measurePageBox())),ut(t,n.latestValues,n.snapshot?.layoutBox,r)}return O(this.latestValues)&&ut(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!==S.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=S.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=w(),this.targetWithTransforms=w()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rt(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):L(this.target,this.layout.layoutBox),ye(this.target,this.targetDelta)):L(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),y.value&&U.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=w(),this.relativeTargetOrigin=w(),B(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),L(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===S.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;L(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=w());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qe(this.prevProjectionDelta.x,this.projectionDelta.x),qe(this.prevProjectionDelta.y,this.projectionDelta.y)),z(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!vt(this.projectionDelta.x,this.prevProjectionDelta.x)||!vt(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),y.value&&U.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=g(),this.projectionDelta=g(),this.projectionDeltaWithTransform=g()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=g();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=w(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(nn));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=m(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=m(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):($t(o.x,e.x,n),$t(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(B(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&mt(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=w(),L(f,this.relativeTarget)),c&&(this.animationValues=a,wt(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),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&&=(_(this.pendingAnimation),void 0),this.pendingAnimation=b.update(()=>{H.hasAnimatedSinceResize=!0,x.layout++,this.motionValue||=ne(0),this.motionValue.jump(0,!1),this.currentAnimation=kt(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{x.layout--},onComplete:()=>{x.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(Pt),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&&ln(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||w();let t=R(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=R(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}L(t,n),E(t,i),z(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nt),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&&G(`z`,e,r,this.animationValues);for(let t=0;t<W.length;t++)G(`rotate${W[t]}`,e,r,this.animationValues),G(`skew${W[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&&!O(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=yt(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(Ut),this.root.sharedNodes.clear()}}}function Rt(e){e.updateLayout()}function zt(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`)V(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=R(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;I(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ln(i,t.layoutBox,n)&&V(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=R(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=g();z(o,n,t.layoutBox);let s=g();a?z(s,e.applyTransform(r,!0),t.measuredBox):z(s,n,t.layoutBox);let c=!ft(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=w();B(s,t.layoutBox,i.layoutBox,o);let c=w();B(c,n,a.layoutBox,o),gt(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 Bt(e){y.value&&U.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 Vt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ht(e){e.clearSnapshot()}function Ut(e){e.clearMeasurements()}function Wt(e){e.isLayoutDirty=!0,e.updateLayout()}function Gt(e){e.isLayoutDirty=!1}function Kt(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function qt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Jt(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yt(e){e.resolveTargetDelta()}function Xt(e){e.calcProjection()}function Zt(e){e.resetSkewAndRotation()}function Qt(e){e.removeLeadSnapshot()}function $t(e,t,n){e.translate=m(t.translate,0,n),e.scale=m(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function en(e,t,n,r){e.min=m(t.min,n.min,r),e.max=m(t.max,n.max,r)}function tn(e,t,n,r){en(e.x,t.x,n.x,r),en(e.y,t.y,n.y,r)}function nn(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var rn={duration:.45,ease:[.4,0,.1,1]},an=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),on=an(`applewebkit/`)&&!an(`chrome/`)?Math.round:C;function sn(e){e.min=on(e.min),e.max=on(e.max)}function cn(e){sn(e.x),sn(e.y)}function ln(e,t,n){return e===`position`||e===`preserve-aspect`&&!et(_t(t),_t(n),.2)}function un(e){return e!==e.root&&e.scroll?.wasRoot}var dn=Lt({attachResizeListener:(e,t)=>k(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),fn=e=>!e.isLayoutDirty&&e.willUpdate(!1);function pn(){let e=new Set,t=new WeakMap,n=()=>e.forEach(fn);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var K={current:void 0},mn=Lt({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!K.current){let e=new dn({});e.mount(window),e.setOptions({layoutScroll:!0}),K.current=e}return K.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),hn=n(),q=e(t(),1),gn=(0,q.createContext)(null);function _n(){let e=(0,q.useRef)(!1);return c(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vn(){let e=_n(),[t,n]=(0,q.useState)(0),r=(0,q.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,q.useCallback)(()=>b.postRender(r),[r]),t]}var yn=e=>e===!0,bn=e=>yn(e===!0)||e===`id`,xn=({children:e,id:t,inherit:n=!0})=>{let r=(0,q.useContext)(o),i=(0,q.useContext)(gn),[a,s]=vn(),c=(0,q.useRef)(null),l=r.id||i;c.current===null&&(bn(n)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:yn(n)&&r.group||pn()});let u=(0,q.useMemo)(()=>({...c.current,forceRender:a}),[s]);return(0,hn.jsx)(o.Provider,{value:u,children:e})};function J(e,t,n,r){return k(e,t,Te(n),r)}var Sn=({current:e})=>e?e.ownerDocument.defaultView:null,Cn=(e,t)=>Math.abs(e-t);function wn(e,t){let n=Cn(e.x,t.x),r=Cn(e.y,t.y);return Math.sqrt(n**2+r**2)}var Tn=new Set([`auto`,`scroll`]),En=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=Y(this.lastRawMoveEventInfo,this.transformPagePoint));let e=X(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=wn(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=S;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=Y(t,this.transformPagePoint),b.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=X(e.type===`pointercancel`?this.lastMoveEventInfo:Y(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=Y(De(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=S;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,X(s,this.history)),this.removeListeners=Se(J(this.contextWindow,`pointermove`,this.handlePointerMove),J(this.contextWindow,`pointerup`,this.handlePointerUp),J(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Tn.has(e.overflowX)||Tn.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),b.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_(this.updatePoint)}};function Y(e,t){return t?{point:t(e.point)}:e}function Dn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function X({point:e},t){return{point:e,delta:Dn(e,kn(t)),offset:Dn(e,On(t)),velocity:An(t,.1)}}function On(e){return e[0]}function kn(e){return e[e.length-1]}function An(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=kn(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ae(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ae(t)*2&&(r=e[1]);let a=oe(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 jn(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?m(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?m(n,e,r.max):Math.min(e,n)),e}function Mn(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 Nn(e,{top:t,left:n,bottom:r,right:i}){return{x:Mn(e.x,n,i),y:Mn(e.y,t,r)}}function Pn(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 Fn(e,t){return{x:Pn(e.x,t.x),y:Pn(e.y,t.y)}}function In(e,t){let n=.5,r=R(e),i=R(t);return i>r?n=T(t.min,t.max-r,e.min):r>i&&(n=T(e.min,e.max-i,t.min)),te(0,1,n)}function Ln(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 Z=.35;function Rn(e=Z){return e===!1?e=0:e===!0&&(e=Z),{x:zn(e,`left`,`right`),y:zn(e,`top`,`bottom`)}}function zn(e,t,n){return{min:Bn(e,t),max:Bn(e,n)}}function Bn(e,t){return typeof e==`number`?e:e[t]||0}var Vn=new WeakMap,Hn=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=w(),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=Fe(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),V(e=>{let t=this.getAxisMotionValue(e).get()||0;if(d.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=R(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&b.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=Gn(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&&b.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 En(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Sn(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&&b.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||!Q(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=jn(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&&s(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Nn(n.layoutBox,e):this.constraints=!1,this.elastic=Rn(t),r!==this.constraints&&!s(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&V(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ln(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!s(e))return!1;let n=e.current;le(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=Fn(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=V(o=>{if(!Q(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(){V(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){V(t=>{let{drag:n}=this.getProps();if(!Q(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]-m(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!s(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};V(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=In({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(),V(t=>{if(!Q(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(m(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Vn.set(this.visualElement,this);let e=this.visualElement.current,t=J(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();s(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Wn(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),b.read(r);let o=k(window,`resize`,()=>this.scalePositionWithinConstraints()),c=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(V(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),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=Z,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Un(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Wn(e,t,n){let r=Ge(e,Un(n)),i=Ge(t,Un(n));return()=>{r(),i()}}function Q(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Gn(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Kn=class extends je{constructor(e){super(e),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Hn(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}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()}},$=e=>(t,n)=>{e&&b.update(()=>e(t,n),!1,!0)},qn=class extends je{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(e){this.session=new En(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sn(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:$(e),onStart:$(t),onMove:$(n),onEnd:(e,t)=>{delete this.session,r&&b.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=J(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Jn=!1,Yn=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),Jn&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),H.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}),Jn=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||b.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(),p.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Jn=!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 Xn(e){let[t,n]=l(),r=(0,q.useContext)(o);return(0,hn.jsx)(Yn,{...e,layoutGroup:r,switchLayoutGroup:(0,q.useContext)(a),isPresent:t,safeToRemove:n})}var Zn={pan:{Feature:qn},drag:{Feature:Kn,ProjectionNode:mn,MeasureLayout:Xn}},Qn={layout:{ProjectionNode:mn,MeasureLayout:Xn}},$n=u({...xe,...ke,...Zn,...Qn},_e);export{xn as n,Pe as r,$n as t};
|