@forsion/unit 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.mjs +5 -3
- package/package.json +1 -1
- package/release.json +5 -5
- package/web/assets/{ArtificialView-BSv3Mx5C.js → ArtificialView-XwHMLUFb.js} +1 -1
- package/web/assets/{AutomationBuilder-BuiHtVB-.js → AutomationBuilder-hqs0QhMt.js} +1 -1
- package/web/assets/{CalendarConfigView-BJtG6cqN.js → CalendarConfigView-DKib8Oed.js} +1 -1
- package/web/assets/{CalendarView-C-FX1RED.js → CalendarView-DJ5iOzvu.js} +1 -1
- package/web/assets/{CapabilityMenu-kx1TIJYN.js → CapabilityMenu-SwVlZ06x.js} +1 -1
- package/web/assets/{CheckboxInput-eW7xdiRS.js → CheckboxInput-BC-5a_C9.js} +1 -1
- package/web/assets/{Chrome-B77-lQyh.js → Chrome-HdfyYV3i.js} +1 -1
- package/web/assets/{CodeView-Df3AiSIi.js → CodeView-CFL6yQ-6.js} +3 -3
- package/web/assets/{DashboardGridView-MlO1dpuo.js → DashboardGridView-B9DCWYVb.js} +12 -12
- package/web/assets/{EventCard-CDmeCbI8.js → EventCard-B_ndpqH_.js} +1 -1
- package/web/assets/{ExcalidrawCanvas-D9vkBh_5.js → ExcalidrawCanvas-BQ4KKLJP.js} +1 -1
- package/web/assets/{FloatingToc-tART_jC4.js → FloatingToc-Ce9GamvH.js} +1 -1
- package/web/assets/{HomepageView-Trqmd3RV.js → HomepageView-RCOfcVbE.js} +1 -1
- package/web/assets/{ImageStudioPanels-BfCVTnKC.js → ImageStudioPanels-lkS_y2uM.js} +2 -2
- package/web/assets/{ImageStudioView-KJhx0wJk.js → ImageStudioView-UPv52acl.js} +1 -1
- package/web/assets/{InlineFiles-BHwivGbQ.js → InlineFiles-CQbQumkf.js} +1 -1
- package/web/assets/{MarkdownBlock-D8LgHFYY.js → MarkdownBlock-CkqiwPXa.js} +19 -19
- package/web/assets/{ModelPill-DrW2cG0l.js → ModelPill-CY-rU1RU.js} +2 -2
- package/web/assets/{MuseLibraryView-CW78Uivf.js → MuseLibraryView-CtTHlVnT.js} +2 -2
- package/web/assets/{MuseView-Cb6R_l4i.js → MuseView-CC2A7MBs.js} +2 -2
- package/web/assets/{PageHistoryPanel-BQs9IWTP.js → PageHistoryPanel-KhKT1DLy.js} +2 -2
- package/web/assets/{PdfAnnotator-BFTBkxvO.js → PdfAnnotator-DUyrgY-t.js} +1 -1
- package/web/assets/{ProductView-mB-S0j81.js → ProductView-CgsIYZqD.js} +1 -1
- package/web/assets/{RightPanel-BVZeVO3c.js → RightPanel-BHDgqTFs.js} +3 -3
- package/web/assets/RunLocationPicker-DBnXYV5B.js +38 -0
- package/web/assets/{SidebarRow-D77yrSLf.js → SidebarRow-BAJxbMcx.js} +1 -1
- package/web/assets/{SketchCard-CAAr_cqF.js → SketchCard-BGYz-bXP.js} +1 -1
- package/web/assets/{StudioGuestSurface-DthpuVGg.js → StudioGuestSurface-lt6znmkl.js} +1 -1
- package/web/assets/{TodoListView-C3ZkMIIf.js → TodoListView-DPKhee6i.js} +1 -1
- package/web/assets/{Tooltip-D9Dt9ZTr.js → Tooltip-ZxrDqN4p.js} +1 -1
- package/web/assets/{UnifiedPage-C75y-MKT.js → UnifiedPage-BX6ZQL0h.js} +27 -27
- package/web/assets/{amadeus-manual.en-D5wZKuag.js → amadeus-manual.en-DzRWr4BL.js} +15 -15
- package/web/assets/{amadeus-manual.zh-Br5fidrj.js → amadeus-manual.zh-DW32DkL7.js} +15 -15
- package/web/assets/{appStore-B1ynyt42.js → appStore-DWP8UET9.js} +99 -79
- package/web/assets/appStore-wtOILggO.css +1 -0
- package/web/assets/{arrow-up-right-R10mR2I6.js → arrow-up-right-DrCXuWS7.js} +1 -1
- package/web/assets/{astryxBridge-CU_kQTEl.js → astryxBridge-D-m4_kYt.js} +3 -3
- package/web/assets/{automationListSource-B8EIRmDW.js → automationListSource-C8BNy6RY.js} +1 -1
- package/web/assets/{book-open-DBJ3dDpw.js → book-open-OLNm7OaB.js} +1 -1
- package/web/assets/{calendarNavStore-DGvUlU5N.js → calendarNavStore-Cylfvv3s.js} +1 -1
- package/web/assets/{canvasPrefs-DwL_OAAo.js → canvasPrefs-8taQ42Cz.js} +1 -1
- package/web/assets/{chatBoxSurface-Lq-2qfd3.js → chatBoxSurface-CIlzs45H.js} +1 -1
- package/web/assets/{circle-question-mark-HPZpZQxd.js → circle-question-mark-XbAFplz1.js} +1 -1
- package/web/assets/{circle-x-BZfe7d6S.js → circle-x-fcReAZaE.js} +1 -1
- package/web/assets/{client-DxGbwZLy.js → client-0MPbodA6.js} +1 -1
- package/web/assets/{code-xml-joKQ-qGS.js → code-xml-Cuna8Kh4.js} +1 -1
- package/web/assets/{codeStudioStore-C7rGKlOC.js → codeStudioStore-BBU62GTy.js} +1 -1
- package/web/assets/{codingNavigation-CjeWG4xm.js → codingNavigation-DDlPpPk5.js} +7 -7
- package/web/assets/{create-BjBRKATq.js → create-BGtEfCcg.js} +2 -2
- package/web/assets/{dashboardSurface-Cojgf_-U.js → dashboardSurface-BYM3C7WG.js} +1 -1
- package/web/assets/{deskCapture-DnGWk1iq.js → deskCapture-BiUCmqfc.js} +1 -1
- package/web/assets/{diff2html-Cd1rVi_Z.js → diff2html-BNp2FTbk.js} +1 -1
- package/web/assets/{docx-preview-CK0k1mUD.js → docx-preview-CFznGVOU.js} +1 -1
- package/web/assets/{emoji-Cjm3bKiF.js → emoji-6zl4yfOS.js} +1 -1
- package/web/assets/{floatingTocSurface-Dd1pT5j5.js → floatingTocSurface-DreXPCa6.js} +1 -1
- package/web/assets/{foldActions-Dm-uAt3L.js → foldActions-05QcQziQ.js} +1 -1
- package/web/assets/{folder-CvZyHIgb.js → folder-BpsfOHD4.js} +1 -1
- package/web/assets/{folder-plus-BRScGQ9m.js → folder-plus-BeQHr4AZ.js} +1 -1
- package/web/assets/{gestures-CZQVefU0.js → gestures-DQBCcK4y.js} +1 -1
- package/web/assets/{hand-D3QspKYq.js → hand-Bko7ms15.js} +1 -1
- package/web/assets/{hard-drive-BQsHSala.js → hard-drive-BpuI5ebj.js} +1 -1
- package/web/assets/{i18n.generated-BZRHO2Nc.js → i18n.generated-BuLjnmY8.js} +1 -1
- package/web/assets/{imageStudio-Cy3_437s.js → imageStudio-BLVNKmEG.js} +2 -2
- package/web/assets/{index-BPhwi4-v.js → index-BF10xp_K.js} +1 -1
- package/web/assets/{index-GjLSlygt.js → index-BHm6K743.js} +1 -1
- package/web/assets/{index-Bh_nLVTc.js → index-BM2o7PeV.js} +5 -5
- package/web/assets/{index-BcVGjCAJ.js → index-BgnNNv3e.js} +1 -1
- package/web/assets/{index-CcOag8eb.js → index-C0Gy2NQ6.js} +1 -1
- package/web/assets/{index-0AYHATDX.js → index-C1doZp5H.js} +1 -1
- package/web/assets/{index-9BmmlTjY.js → index-C4L6vjd_.js} +1 -1
- package/web/assets/{index-8ag1K7AZ.js → index-CD3yIkOA.js} +1 -1
- package/web/assets/{index-Dkd-nl1u.js → index-CJeUgjPU.js} +1 -1
- package/web/assets/{index-B5GxvbNm.js → index-CLHoq1w-.js} +1 -1
- package/web/assets/{index-DElrDw66.js → index-CUZI62qU.js} +1 -1
- package/web/assets/{index-BgtO11q8.js → index-Cff42k7q.js} +1 -1
- package/web/assets/{index-Dj-PygjB.js → index-Ck_O3Jdd.js} +1 -1
- package/web/assets/index-CuiYK18N.js +1 -0
- package/web/assets/{index-Bpc3R3DS.js → index-CwcOeZdT.js} +1 -1
- package/web/assets/{index-DJLWTPtq.js → index-D6AycQIz.js} +1 -1
- package/web/assets/{index-C9yo04Ck.js → index-D7gVhvNY.js} +1 -1
- package/web/assets/{index-BnWj6ggb.js → index-D9UZQy42.js} +1 -1
- package/web/assets/{index-D6mpAJ9S.js → index-DuBQ0j2g.js} +1 -1
- package/web/assets/{index-1FhRiJ_X.js → index-OD1gSX3h.js} +1 -1
- package/web/assets/{index-DNE_PBJt.js → index-Uo5tswys.js} +1 -1
- package/web/assets/{index-BgDZGDqt.js → index-o8cj0pRH.js} +1 -1
- package/web/assets/{index-BdZaheMZ.js → index-rHjhbwvm.js} +1 -1
- package/web/assets/{index-4E9nrhwf.js → index-rggq2czF.js} +1 -1
- package/web/assets/{index-D0FLFLfh.js → index-sCXThwqZ.js} +1 -1
- package/web/assets/{invitePage-B4gMvEKi.js → invitePage-b0HGvMj6.js} +1 -1
- package/web/assets/{ipc-CPhL3bPp.js → ipc-CxAyeo8q.js} +1 -1
- package/web/assets/{jszip.min-DAJT9RUA.js → jszip.min-B94KpE21.js} +1 -1
- package/web/assets/{layout-grid-DfUfnvDS.js → layout-grid-BBVuEdWG.js} +1 -1
- package/web/assets/{linkFollow-C6PHGUxk.js → linkFollow-B7ivDZMM.js} +5 -5
- package/web/assets/{list-tree-DaGpnIYu.js → list-tree-4-0QDbLu.js} +1 -1
- package/web/assets/{listFold-Q_8mh5ZG.js → listFold-DLuxXiIj.js} +1 -1
- package/web/assets/{lock-DQ_yL4nF.js → lock-CnbZm4vo.js} +1 -1
- package/web/assets/{log-out-DFwTeh2X.js → log-out-BEynWaHa.js} +1 -1
- package/web/assets/{main-NgUPPqDn.css → main-BiS_5wrB.css} +1 -1
- package/web/assets/main-sIq2N9Z5.js +20 -0
- package/web/assets/{markdownEditorSurface-e_oMhqx-.js → markdownEditorSurface-ZSJ3RHAv.js} +1 -1
- package/web/assets/{mdMarkStore-DjN4bf1T.js → mdMarkStore-DQHDjG7s.js} +2 -2
- package/web/assets/{mdMarks-cmL6vzR-.js → mdMarks-DbIcRa0O.js} +1 -1
- package/web/assets/{message-square-plus-CEHkduIL.js → message-square-plus-CpiKDvle.js} +1 -1
- package/web/assets/{messages-CBtmbpur.js → messages-_jta1lSI.js} +1 -1
- package/web/assets/minus-C9ndHJ9O.js +1 -0
- package/web/assets/{mobileEntry-qR7BAROr.js → mobileEntry-CPmU_c4m.js} +1 -1
- package/web/assets/{nativeDownload-CziEyW_p.js → nativeDownload-BYT082bY.js} +1 -1
- package/web/assets/{pageChrome-DFz_AAzZ.js → pageChrome-D3Niv1JM.js} +1 -1
- package/web/assets/{pageTree-yVO1_fSy.js → pageTree-CgfvpzIj.js} +1 -1
- package/web/assets/{pen-tool-uxsFELYC.js → pen-tool-BXEFnU2i.js} +1 -1
- package/web/assets/{pencil-BSbra1Ra.js → pencil-cqvCkekG.js} +1 -1
- package/web/assets/pluginChat-BbBukMuN.js +2 -0
- package/web/assets/{redo-2-BK5LMNa5.js → redo-2-BO7wCDwy.js} +1 -1
- package/web/assets/{rotate-ccw-HedfU4na.js → rotate-ccw-BvipPIjC.js} +1 -1
- package/web/assets/{sharePage-CpzDpuU1.js → sharePage-XbN50US7.js} +2 -2
- package/web/assets/{shareViewer-BwzH2bIs.js → shareViewer-BaYogetW.js} +1 -1
- package/web/assets/{star-CgYon3z4.js → star-BQWMXnn7.js} +1 -1
- package/web/assets/tableSurface-BXqqidd1.js +1 -0
- package/web/assets/{terminal-krsPf1mc.js → terminal-l9k6RDrH.js} +1 -1
- package/web/assets/{terminalView-4e2_u5_I.js → terminalView-Cpnt5_0P.js} +1 -1
- package/web/assets/{type-GJYLEhY-.js → type-CFoaj2eD.js} +1 -1
- package/web/assets/{undo-2-DCTs4Ro4.js → undo-2-DusxpdLa.js} +1 -1
- package/web/assets/{unitAccount-D3xjX3cu.js → unitAccount-DwutFPPw.js} +1 -1
- package/web/assets/{unitBridge-D5JcIkAP.js → unitBridge-CcgQpkqV.js} +1 -1
- package/web/assets/{unitCloudTransport-B44L3x6M.js → unitCloudTransport-vA7cLDts.js} +1 -1
- package/web/assets/{unitOwnerAccess-CRUHWGpf.js → unitOwnerAccess-LBlJ1YfA.js} +1 -1
- package/web/assets/{unitShim-_VzxvdEG.js → unitShim-B_M9IrbC.js} +3 -3
- package/web/assets/{upload-MVVRQtkj.js → upload-ZrOj6tXA.js} +1 -1
- package/web/assets/{userSpaces-CI4eqEgh.js → userSpaces-uJOnsedR.js} +1 -1
- package/web/assets/viewportLock-D3SNkwS2.js +631 -0
- package/web/assets/{workflow-DzeW9OXR.js → workflow-DPoG4QE2.js} +1 -1
- package/web/assets/{zoom-in-CovPsw4g.js → zoom-in-lbTgzdQP.js} +1 -1
- package/web/index.html +27 -7
- package/web/assets/RunLocationPicker-CyVa0RJa.js +0 -38
- package/web/assets/appStore-BC_CQv-L.css +0 -1
- package/web/assets/index-BaRySZ-M.js +0 -1
- package/web/assets/main-CwqZ_ymb.js +0 -19
- package/web/assets/minus-BUT48dAC.js +0 -1
- package/web/assets/pluginChat-BMFnf_j2.js +0 -2
- package/web/assets/tableSurface-CmDwnKnd.js +0 -1
- package/web/assets/viewportLock-BH26xHQO.js +0 -611
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as x,j as m,R as Rt,r as bt,u as Rr,f as Dr,t as jr,L as Lr}from"./index-Bh_nLVTc.js";import{c as Or}from"./client-DxGbwZLy.js";import{u as Ir,a as Fr,b as Nr,A as Br,C as zr,c as Ur,M as Wr,S as _r,B as $r,P as Kr,d as Hr,N as Gr,i as Yr,e as Xr}from"./viewportLock-BH26xHQO.js";import{H as Ii,a as qr,u as et,b as Zr,o as Jr,f as Qr,c as Fi,n as es,d as ta,e as ea,g as ns,h as na,i as Ni,j as sa,k as ia,l as oa,m as ra,S as aa,Q as la,O as ca,p as ss,q as is,r as ua,s as ha,t as os,v as da,w as fa,x as ma,y as pa,z as ga,A as ya,B as va,C as xa,D as ba,E as wa}from"./appStore-B1ynyt42.js";import{i as Ta,u as Ye,b as Bi,E as Sa}from"./codingNavigation-CjeWG4xm.js";import{F as Pa}from"./UnifiedPage-C75y-MKT.js";import{d as Ca,i as Aa,s as ka}from"./RunLocationPicker-CyVa0RJa.js";import{i as Tn,R as Ma,a as Va,b as Ea}from"./ipc-CPhL3bPp.js";import"./i18n.generated-BZRHO2Nc.js";import"./ModelPill-DrW2cG0l.js";import"./rotate-ccw-HedfU4na.js";import"./upload-MVVRQtkj.js";import"./hard-drive-BQsHSala.js";import"./CapabilityMenu-kx1TIJYN.js";import"./book-open-DBJ3dDpw.js";import"./folder-plus-BRScGQ9m.js";import"./circle-x-BZfe7d6S.js";import"./userSpaces-CI4eqEgh.js";import"./automationListSource-B8EIRmDW.js";import"./nativeDownload-CziEyW_p.js";import"./messages-CBtmbpur.js";import"./code-xml-joKQ-qGS.js";import"./workflow-DzeW9OXR.js";import"./list-tree-DaGpnIYu.js";import"./layout-grid-DfUfnvDS.js";import"./terminal-krsPf1mc.js";import"./star-CgYon3z4.js";import"./folder-CvZyHIgb.js";import"./DashboardGridView-MlO1dpuo.js";import"./FloatingToc-tART_jC4.js";import"./MarkdownBlock-D8LgHFYY.js";import"./index-BaRySZ-M.js";import"./linkFollow-C6PHGUxk.js";import"./mdMarks-cmL6vzR-.js";import"./emoji-Cjm3bKiF.js";import"./listFold-Q_8mh5ZG.js";import"./pageChrome-DFz_AAzZ.js";import"./pageTree-yVO1_fSy.js";import"./pluginExt-Byb64tQO.js";import"./SidebarRow-D77yrSLf.js";import"./pen-tool-uxsFELYC.js";import"./pencil-BSbra1Ra.js";import"./type-GJYLEhY-.js";import"./undo-2-DCTs4Ro4.js";import"./redo-2-BK5LMNa5.js";import"./lock-DQ_yL4nF.js";import"./AutomationBuilder-BuiHtVB-.js";import"./gestures-CZQVefU0.js";import"./Chrome-B77-lQyh.js";import"./minus-BUT48dAC.js";import"./canvasPrefs-DwL_OAAo.js";import"./circle-question-mark-HPZpZQxd.js";import"./InlineFiles-BHwivGbQ.js";import"./RightPanel-BVZeVO3c.js";import"./MuseView-Cb6R_l4i.js";import"./approvalText-Cy2UAUAQ.js";import"./message-square-plus-CEHkduIL.js";import"./codeStudioStore-C7rGKlOC.js";import"./log-out-DFwTeh2X.js";import"./index-Dj-PygjB.js";/* empty css */import"./StudioGuestSurface-DthpuVGg.js";import"./create-BjBRKATq.js";import"./pdf.worker.min-CGb3BKV9.js";import"./zoom-in-CovPsw4g.js";import"./SketchCard-CAAr_cqF.js";import"./mdMarkStore-DjN4bf1T.js";import"./arrow-up-right-R10mR2I6.js";import"./hand-D3QspKYq.js";import"./foldActions-Dm-uAt3L.js";const Me={addListener:async(t,e)=>({remove:()=>{}}),minimizeApp:async()=>{},getLaunchUrl:async()=>{}},Sn=x.createContext({});function Pn(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ra=typeof window<"u",Cn=Ra?x.useLayoutEffect:x.useEffect,Te=x.createContext(null);function An(t,e){t.indexOf(e)===-1&&t.push(e)}function de(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const rt=(t,e,n)=>n>e?e:n<t?t:n;let kn=()=>{};const ht={},zi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ui=t=>typeof t=="object"&&t!==null,Wi=t=>/^0[^.\s]+$/u.test(t);function _i(t){let e;return()=>(e===void 0&&(e=t()),e)}const Z=t=>t,_t=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Ft=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class Mn{constructor(){this.subscriptions=[]}add(e){return An(this.subscriptions,e),()=>de(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const H=t=>t*1e3,q=t=>t/1e3,$i=(t,e)=>e?t*(1e3/e):0,Ki=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Da=1e-7,ja=12;function La(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Ki(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Da&&++a<ja);return o}function $t(t,e,n,s){if(t===e&&n===s)return Z;const i=r=>La(r,0,1,t,n);return r=>r===0||r===1?r:Ki(i(r),e,s)}const Hi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Gi=t=>e=>1-t(1-e),Yi=$t(.33,1.53,.69,.99),Vn=Gi(Yi),Xi=Hi(Vn),qi=t=>t>=1?1:(t*=2)<1?.5*Vn(t):.5*(2-Math.pow(2,-10*(t-1))),En=t=>1-Math.sin(Math.acos(t)),Zi=Gi(En),Ji=Hi(En),Oa=$t(.42,0,1,1),Ia=$t(0,0,.58,1),Qi=$t(.42,0,.58,1),Fa=t=>Array.isArray(t)&&typeof t[0]!="number",to=t=>Array.isArray(t)&&typeof t[0]=="number",Na={linear:Z,easeIn:Oa,easeInOut:Qi,easeOut:Ia,circIn:En,circInOut:Ji,circOut:Zi,backIn:Vn,backInOut:Xi,backOut:Yi,anticipate:qi},Ba=t=>typeof t=="string",rs=t=>{if(to(t)){kn(t.length===4);const[e,n,s,i]=t;return $t(e,n,s,i)}else if(Ba(t))return Na[t];return t},Yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function za(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){r.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,h=!1)=>{const p=h&&s?e:n;return u&&r.add(c),p.add(c),c},cancel:c=>{n.delete(c),r.delete(c)},process:c=>{if(o=c,s){i=!0;return}s=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Ua=40;function eo(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Yt.reduce((b,T)=>(b[T]=za(r),b),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:f}=o,y=()=>{const b=ht.useManualTiming,T=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Ua),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},v=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Yt.reduce((b,T)=>{const k=o[T];return b[T]=(V,M=!1,C=!1)=>(n||v(),k.schedule(V,M,C)),b},{}),cancel:b=>{for(let T=0;T<Yt.length;T++)o[Yt[T]].cancel(b)},state:i,steps:o}}const{schedule:L,cancel:dt,state:U,steps:Ve}=eo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let se;function Wa(){se=void 0}const _={now:()=>(se===void 0&&_.set(U.isProcessing||ht.useManualTiming?U.timestamp:performance.now()),se),set:t=>{se=t,queueMicrotask(Wa)}},no=t=>e=>typeof e=="string"&&e.startsWith(t),so=no("--"),_a=no("var(--"),Rn=t=>_a(t)?$a.test(t.split("/*")[0].trim()):!1,$a=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function as(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...kt,transform:t=>rt(0,1,t)},Xt={...kt,default:1},jt=t=>Math.round(t*1e5)/1e5,Dn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ka(t){return t==null}const Ha=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jn=(t,e)=>n=>!!(typeof n=="string"&&Ha.test(n)&&n.startsWith(t)||e&&!Ka(n)&&Object.prototype.hasOwnProperty.call(n,e)),io=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Dn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ga=t=>rt(0,255,t),Ee={...kt,transform:t=>Math.round(Ga(t))},gt={test:jn("rgb","red"),parse:io("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ee.transform(t)+", "+Ee.transform(e)+", "+Ee.transform(n)+", "+jt(Nt.transform(s))+")"};function Ya(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Xe={test:jn("#"),parse:Ya,transform:gt.transform},Kt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),at=Kt("deg"),ot=Kt("%"),P=Kt("px"),Xa=Kt("vh"),qa=Kt("vw"),ls={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)},Tt={test:jn("hsl","hue"),parse:io("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(jt(e))+", "+ot.transform(jt(n))+", "+jt(Nt.transform(s))+")"},F={test:t=>gt.test(t)||Xe.test(t)||Tt.test(t),parse:t=>gt.test(t)?gt.parse(t):Tt.test(t)?Tt.parse(t):Xe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?gt.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=F.parse(t);return e.alpha=0,F.transform(e)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ja(t){return isNaN(t)&&typeof t=="string"&&(t.match(Dn)?.length||0)+(t.match(Za)?.length||0)>0}const oo="number",ro="color",Qa="var",tl="var(",cs="${}",el=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ct(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(el,l=>(F.test(l)?(s.color.push(r),i.push(ro),n.push(F.parse(l))):l.startsWith(tl)?(s.var.push(r),i.push(Qa),n.push(l)):(s.number.push(r),i.push(oo),n.push(parseFloat(l))),++r,cs)).split(cs);return{values:n,split:a,indexes:s,types:i}}function nl(t){return Ct(t).values}function ao({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===oo?i+=jt(s[r]):o===ro?i+=F.transform(s[r]):i+=s[r]}return i}}function sl(t){return ao(Ct(t))}const il=t=>typeof t=="number"?0:F.test(t)?F.getAnimatableNone(t):t,ol=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:il(t);function rl(t){const e=Ct(t);return ao(e)(e.values.map((s,i)=>ol(s,e.split[i])))}const nt={test:Ja,parse:nl,createTransformer:sl,getAnimatableNone:rl};function Re(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function al({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Re(l,a,t+1/3),r=Re(l,a,t),o=Re(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function fe(t,e){return n=>n>0?e:t}const j=(t,e,n)=>t+(e-t)*n,De=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ll=[Xe,gt,Tt],cl=t=>ll.find(e=>e.test(t));function us(t){const e=cl(t);if(!e)return!1;let n=e.parse(t);return e===Tt&&(n=al(n)),n}const hs=(t,e)=>{const n=us(t),s=us(e);if(!n||!s)return fe(t,e);const i={...n};return r=>(i.red=De(n.red,s.red,r),i.green=De(n.green,s.green,r),i.blue=De(n.blue,s.blue,r),i.alpha=j(n.alpha,s.alpha,r),gt.transform(i))},qe=new Set(["none","hidden"]);function ul(t,e){return qe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function hl(t,e){return n=>j(t,e,n)}function Ln(t){return typeof t=="number"?hl:typeof t=="string"?Rn(t)?fe:F.test(t)?hs:ml:Array.isArray(t)?lo:typeof t=="object"?F.test(t)?hs:dl:fe}function lo(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function dl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const ml=(t,e)=>{const n=nt.createTransformer(e),s=Ct(t),i=Ct(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?qe.has(t)&&!i.values.length||qe.has(e)&&!s.values.length?ul(t,e):_t(lo(fl(s,i),i.values),n):fe(t,e)};function co(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):Ln(t)(t,e)}const pl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>dt(e),now:()=>U.isProcessing?U.timestamp:_.now()}},uo=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},me=2e4;function On(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<me;)e+=n,s=t.next(e);return e>=me?1/0:e}function gl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(On(s),me);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:q(i)}}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ze(t,e){return t*Math.sqrt(1-e*e)}const yl=12;function vl(t,e,n){let s=n;for(let i=1;i<yl;i++)s=s-t(s)/e(s);return s}const je=.001;function xl({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,r,o=1-e;o=rt(I.minDamping,I.maxDamping,o),t=rt(I.minDuration,I.maxDuration,q(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-n,p=Ze(c,o),f=Math.exp(-h);return je-d/p*f},r=c=>{const h=c*o*t,d=h*n+n,p=Math.pow(o,2)*Math.pow(c,2)*t,f=Math.exp(-h),y=Ze(Math.pow(c,2),o);return(-i(c)+je>0?-1:1)*((d-p)*f)/y}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-je+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=vl(i,r,a);if(t=H(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const bl=["duration","bounce"],wl=["stiffness","damping","mass"];function ds(t,e){return e.some(n=>t[n]!==void 0)}function Tl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!ds(t,wl)&&ds(t,bl))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*rt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:r}}else{const n=xl({...t,velocity:0});e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function pe(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=Tl({...n,velocity:-q(n.velocity||0)}),f=d||0,y=c/(2*Math.sqrt(l*u)),v=o-r,g=q(Math.sqrt(l/u)),S=Math.abs(v)<5;s||(s=S?I.restSpeed.granular:I.restSpeed.default),i||(i=S?I.restDelta.granular:I.restDelta.default);let b,T,k,V,M,C;if(y<1)k=Ze(g,y),V=(f+y*g*v)/k,b=A=>{const O=Math.exp(-y*g*A);return o-O*(V*Math.sin(k*A)+v*Math.cos(k*A))},M=y*g*V+v*k,C=y*g*v-V*k,T=A=>Math.exp(-y*g*A)*(M*Math.sin(k*A)+C*Math.cos(k*A));else if(y===1){b=O=>o-Math.exp(-g*O)*(v+(f+g*v)*O);const A=f+g*v;T=O=>Math.exp(-g*O)*(g*A*O-f)}else{const A=g*Math.sqrt(y*y-1);b=G=>{const Y=Math.exp(-y*g*G),K=Math.min(A*G,300);return o-Y*((f+y*g*v)*Math.sinh(K)+A*v*Math.cosh(K))/A};const O=(f+y*g*v)/A,N=y*g*O-v*A,J=y*g*v-O*A;T=G=>{const Y=Math.exp(-y*g*G),K=Math.min(A*G,300);return Y*(N*Math.sinh(K)+J*Math.cosh(K))}}const E={calculatedDuration:p&&h||null,velocity:A=>H(T(A)),next:A=>{if(!p&&y<1){const N=Math.exp(-y*g*A),J=Math.sin(k*A),G=Math.cos(k*A),Y=o-N*(V*J+v*G),K=H(N*(M*J+C*G));return a.done=Math.abs(K)<=s&&Math.abs(o-Y)<=i,a.value=a.done?o:Y,a}const O=b(A);if(p)a.done=A>=h;else{const N=H(T(A));a.done=Math.abs(N)<=s&&Math.abs(o-O)<=i}return a.value=a.done?o:O,a},toString:()=>{const A=Math.min(On(E),me),O=uo(N=>E.next(A*N).value,A,30);return A+"ms "+O},toTransition:()=>{}};return E}pe.applyToOptions=t=>{const e=gl(t,100,pe);return t.ease=e.ease,t.duration=H(e.duration),t.type="keyframes",t};const Sl=5;function ho(t,e,n){const s=Math.max(e-Sl,0);return $i(n-t(s),e-s)}function Je({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,f=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*e;const v=h+y,g=o===void 0?v:o(v);g!==v&&(y=g-h);const S=C=>-y*Math.exp(-C/s),b=C=>g+S(C),T=C=>{const E=S(C),A=b(C);d.done=Math.abs(E)<=c,d.value=d.done?g:A};let k,V;const M=C=>{p(d.value)&&(k=C,V=pe({keyframes:[d.value,f(d.value)],velocity:ho(b,C,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:C=>{let E=!1;return!V&&k===void 0&&(E=!0,T(C),M(C)),k!==void 0&&C>=k?V.next(C-k):(!E&&T(C),d)}}}function Pl(t,e,n){const s=[],i=n||ht.mix||co,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Z:e;a=_t(l,a)}s.push(a)}return s}function Cl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(kn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=Ft(t[h],t[h+1],u);return a[h](d)};return n?u=>c(rt(t[0],t[r-1],u)):c}function Al(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ft(0,e,s);t.push(j(n,1,i))}}function kl(t){const e=[0];return Al(e,t.length-1),e}function Ml(t,e){return t.map(n=>n*e)}function Vl(t,e){return t.map(()=>e||Qi).splice(0,t.length-1)}function Lt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fa(s)?s.map(rs):rs(s),r={done:!1,value:e[0]},o=Ml(n&&n.length===e.length?n:kl(e),t),a=Cl(o,e,{ease:Array.isArray(i)?i:Vl(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const El=t=>t!==null;function Se(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(El),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Rl={decay:Je,inertia:Je,tween:Lt,keyframes:Lt,spring:pe};function fo(t){typeof t.type=="string"&&(t.type=Rl[t.type])}class In{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Dl=t=>t/100;class ge extends In{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;fo(e);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Lt;l!==Lt&&typeof a[0]!="number"&&(this.mixKeyframes=_t(Dl,co(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=On(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let b=this.currentTime,T=s;if(h){const C=Math.min(this.currentTime,i)/a;let E=Math.floor(C),A=C%1;!A&&C>=1&&(A=1),A===1&&E--,E=Math.min(E,h+1),E%2&&(d==="reverse"?(A=1-A,p&&(A-=p/a)):d==="mirror"&&(T=o)),b=rt(0,1,A)*a}let k;S?(this.delayState.value=u[0],k=this.delayState):k=T.next(b),r&&!S&&(k.value=r(k.value));let{done:V}=k;!S&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return M&&f!==Je&&(k.value=Se(u,this.options,v,this.speed)),y&&y(k.value),M&&this.finish(),k}then(e,n){return this.finished.then(e,n)}get duration(){return q(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(this.currentTime)}set time(e){e=H(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return ho(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(_.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=q(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=pl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function jl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const yt=t=>t*180/Math.PI,Qe=t=>{const e=yt(Math.atan2(t[1],t[0]));return tn(e)},Ll={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qe,rotateZ:Qe,skewX:t=>yt(Math.atan(t[1])),skewY:t=>yt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>(t=t%360,t<0&&(t+=360),t),fs=Qe,ms=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ps=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ol={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ms,scaleY:ps,scale:t=>(ms(t)+ps(t))/2,rotateX:t=>tn(yt(Math.atan2(t[6],t[5]))),rotateY:t=>tn(yt(Math.atan2(-t[2],t[0]))),rotateZ:fs,rotate:fs,skewX:t=>yt(Math.atan(t[4])),skewY:t=>yt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function en(t){return t.includes("scale")?1:0}function nn(t,e){if(!t||t==="none")return en(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ol,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ll,i=a}if(!i)return en(e);const r=s[e],o=i[1].split(",").map(Fl);return typeof r=="function"?r(o):o[r]}const Il=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nn(n,e)};function Fl(t){return parseFloat(t.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set([...Mt,"pathRotation"]),gs=t=>t===kt||t===P,Nl=new Set(["x","y","z"]),Bl=Mt.filter(t=>!Nl.has(t));function zl(t){const e=[];return Bl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ut={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>nn(e,"x"),y:(t,{transform:e})=>nn(e,"y")};ut.translateX=ut.x;ut.translateY=ut.y;const vt=new Set;let sn=!1,on=!1,rn=!1;function mo(){if(on){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=zl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}on=!1,sn=!1,vt.forEach(t=>t.complete(rn)),vt.clear()}function po(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)})}function Ul(){rn=!0,po(),mo(),rn=!1}class Fn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(vt.add(this),sn||(sn=!0,L.read(po),L.resolveKeyframes(mo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}jl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Wl=t=>t.startsWith("--");function go(t,e,n){Wl(e)?t.style.setProperty(e,n):t.style[e]=n}const _l={};function yo(t,e){const n=_i(t);return()=>_l[e]??n()}const $l=yo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vo=yo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ys={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dt([0,.65,.55,1]),circOut:Dt([.55,0,1,.45]),backIn:Dt([.31,.01,.66,-.59]),backOut:Dt([.33,1.53,.69,.99])};function xo(t,e){if(t)return typeof t=="function"?vo()?uo(t,e):"ease-out":to(t)?Dt(t):Array.isArray(t)?t.map(n=>xo(n,e)||ys.easeOut):ys[t]}function Kl(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=xo(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function bo(t){return typeof t=="function"&&"applyToOptions"in t}function Hl({type:t,...e}){return bo(t)&&vo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class wo extends In{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,kn(typeof e.type!="string");const c=Hl(e);this.animation=Kl(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Se(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),go(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&$l()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),Z):i(this)}}const To={anticipate:qi,backInOut:Xi,circInOut:Ji};function Gl(t){return t in To}function Yl(t){typeof t.ease=="string"&&Gl(t.ease)&&(t.ease=To[t.ease])}const Le=10;class Xl extends wo{constructor(e){Yl(e),fo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ge({...o,autoplay:!1}),l=Math.max(Le,_.now()-this.startTime),c=rt(0,Le,l-Le),u=a.sample(l).value,{name:h}=this.options;r&&h&&go(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const vs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(nt.test(t)||t==="0")&&!t.startsWith("url("));function ql(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Zl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=vs(i,e),a=vs(r,e);return!o||!a?!1:ql(t)||(n==="spring"||bo(n))&&s}function an(t){t.duration=0,t.type="keyframes"}const So=new Set(["opacity","clipPath","filter","transform"]),Jl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ql(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Jl.test(t[e]))return!0;return!1}const tc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ec=_i(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function nc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return ec()&&n&&(So.has(n)||tc.has(n)&&Ql(a))&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const sc=40;class ic extends In{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Fn;this.keyframeResolver=new p(a,(f,y,v)=>this.onKeyframesResolved(f,y,d,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=_.now();let h=!0;Zl(e,r,o,a)||(h=!1,(ht.instantAnimations||!l)&&u?.(Se(e,s,n)),e[0]=e[e.length-1],an(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=h&&!c&&nc(p),y=p.motionValue?.owner?.current;let v;if(f)try{v=new Xl({...p,element:y})}catch{v=new ge(p)}else v=new ge(p);v.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ul()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Po(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const xs=30,oc=t=>!isNaN(parseFloat(t));class rc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=oc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return $i(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(t,e){return new rc(t,e)}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Nn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}const ac={type:"spring",stiffness:500,damping:25,restSpeed:10},lc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),cc={type:"keyframes",duration:.8},uc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hc=(t,{keyframes:e})=>e.length>2?cc:Vt.has(t)?t.startsWith("scale")?lc(e[1]):ac:uc,dc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function fc(t){for(const e in t)if(!dc.has(e))return!0;return!1}const Bn=(t,e,n,s={},i,r)=>o=>{const a=Nn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-H(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};fc(a)||Object.assign(u,hc(t,u)),u.duration&&(u.duration=H(u.duration)),u.repeatDelay&&(u.repeatDelay=H(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(an(u),u.delay===0&&(h=!0)),(ht.instantAnimations||ht.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,an(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Se(u.keyframes,a);if(d!==void 0){L.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ge(u):new ic(u)},mc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pc(t){const e=mc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ao(t,e,n=1){const[s,i]=pc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return zi(o)?parseFloat(o):o}return Rn(i)?Ao(i,e,n+1):i}function bs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function zn(t,e,n,s){if(typeof e=="function"){const[i,r]=bs(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=bs(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function xt(t,e,n){const s=t.getProps();return zn(s,e,n!==void 0?n:s.custom,t)}const ko=new Set(["width","height","top","left","right","bottom",...Mt]),ln=t=>Array.isArray(t);function gc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,At(n))}function yc(t){return ln(t)?t[t.length-1]||0:t}function vc(t,e){const n=xt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=yc(r[o]);gc(t,o,a)}}const W=t=>!!(t&&t.getVelocity);function xc(t){return!!(W(t)&&t.add)}function cn(t,e){const n=t.getValue("willChange");if(xc(n))return n.add(e);if(!n&&ht.WillChange){const s=new ht.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Un(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const bc="framerAppearId",Mo="data-"+Un(bc);function Vo(t){return t.props[Mo]}function wc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Eo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Co(r,l):l;const c=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);const h=[],d=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const f in a){const y=t.getValue(f,t.latestValues[f]??null),v=a[f];if(v===void 0||d&&wc(d,f))continue;const g={delay:n,...Nn(r||{},f)};u&&(g.skipAnimations=!0);const S=y.get();if(S!==void 0&&!y.isAnimating()&&!Array.isArray(v)&&v===S&&!g.velocity){L.update(()=>y.set(v));continue}let b=!1;if(window.MotionHandoffAnimation){const V=Vo(t);if(V){const M=window.MotionHandoffAnimation(V,f,L);M!==null&&(g.startTime=M,b=!0)}}cn(t,f);const T=c??t.shouldReduceMotion;y.start(Bn(f,y,v,T&&ko.has(f)?{type:!1}:g,t,b));const k=y.animation;k&&h.push(k)}if(o){const f=()=>L.update(()=>{o&&vc(t,o)});h.length?Promise.all(h).then(f):f()}return h}function un(t,e,n={}){const s=xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Eo(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return Tc(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Tc(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(un(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Sc(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>un(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=un(t,e,n);else{const i=typeof e=="function"?xt(t,e,n.custom):e;s=Promise.all(Eo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pc={test:t=>t==="auto",parse:t=>t},Ro=t=>e=>e.test(t),Do=[kt,P,ot,at,qa,Xa,Pc],ws=t=>Do.find(Ro(t));function Cc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Wi(t):!0}const Ac=new Set(["brightness","contrast","saturate","opacity"]);function kc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Dn)||[];if(!s)return t;const i=n.replace(s,"");let r=Ac.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Mc=/\b([a-z-]*)\(.*?\)/gu,hn={...nt,getAnimatableNone:t=>{const e=t.match(Mc);return e?e.map(kc).join(" "):t}},dn={...nt,getAnimatableNone:t=>{const e=nt.parse(t);return nt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ts={...kt,transform:Math.round},Vc={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Xt,scaleX:Xt,scaleY:Xt,scaleZ:Xt,skew:at,skewX:at,skewY:at,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Nt,originX:ls,originY:ls,originZ:P},ye={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...Vc,zIndex:Ts,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:Ts},Ec={...ye,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:hn,WebkitFilter:hn,mask:dn,WebkitMask:dn},jo=t=>Ec[t],Rc=new Set([hn,dn]);function Lo(t,e){let n=jo(t);return Rc.has(n)||(n=nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Dc=new Set(["auto","none","0"]);function jc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Dc.has(r)&&Ct(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Lo(n,i)}class Lc extends Fn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Rn(h))){const d=Ao(h,n.current);d!==void 0&&(e[u]=d),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ko.has(s)||e.length!==2)return;const[i,r]=e,o=ws(i),a=ws(r),l=as(i),c=as(r);if(l!==c&&ut[s]){this.needsMeasurement=!0;return}if(o!==a)if(gs(o)&&gs(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else ut[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Cc(e[i]))&&s.push(i);s.length&&jc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ut[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ut[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const Wn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const fn=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ie(t){return Ui(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:_n}=eo(queueMicrotask,!1),tt={x:!1,y:!1};function Io(){return tt.x||tt.y}function Oc(t){return t==="x"||t==="y"?tt[t]?null:(tt[t]=!0,()=>{tt[t]=!1}):tt.x||tt.y?null:(tt.x=tt.y=!0,()=>{tt.x=tt.y=!1})}function Fo(t,e){const n=Oo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ic(t){return!(t.pointerType==="touch"||Io())}function Fc(t,e,n={}){const[s,i,r]=Fo(t,n);return s.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",f)},h=v=>{c&&(c(v),c=void 0),u()},d=v=>{a=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),l&&(l=!1,h(v))},p=()=>{a=!0,window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",d,i)},f=v=>{if(v.pointerType!=="touch"){if(a){l=!0;return}h(v)}},y=v=>{if(!Ic(v))return;l=!1;const g=e(o,v);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",f,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),r}const No=(t,e)=>e?t===e?!0:No(t,e.parentElement):!1,$n=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Nc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bc(t){return Nc.has(t.tagName)||t.isContentEditable===!0}const zc=new Set(["INPUT","SELECT","TEXTAREA"]);function Uc(t){return zc.has(t.tagName)||t.isContentEditable===!0}const oe=new WeakSet;function Ss(t){return e=>{e.key==="Enter"&&t(e)}}function Oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Wc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ss(()=>{if(oe.has(n))return;Oe(n,"down");const i=Ss(()=>{Oe(n,"up")}),r=()=>Oe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ps(t){return $n(t)&&!Io()}const Cs=new WeakSet;function _c(t,e,n={}){const[s,i,r]=Fo(t,n),o=a=>{const l=a.currentTarget;if(!Ps(a)||Cs.has(a))return;oe.add(l),n.stopPropagation&&Cs.add(a);const c=e(l,a),u={...i,capture:!0},h=(f,y)=>{window.removeEventListener("pointerup",d,u),window.removeEventListener("pointercancel",p,u),oe.has(l)&&oe.delete(l),Ps(f)&&typeof c=="function"&&c(f,{success:y})},d=f=>{h(f,l===window||l===document||n.useGlobalTarget||No(l,f.target))},p=f=>{h(f,!1)};window.addEventListener("pointerup",d,u),window.addEventListener("pointercancel",p,u)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ie(a)&&(a.addEventListener("focus",c=>Wc(c,i)),!Bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Kn(t){return Ui(t)&&"ownerSVGElement"in t}const re=new WeakMap;let ae;const Bo=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Kn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],$c=Bo("inline","width","offsetWidth"),Kc=Bo("block","height","offsetHeight");function Hc({target:t,borderBoxSize:e}){re.get(t)?.forEach(n=>{n(t,{get width(){return $c(t,e)},get height(){return Kc(t,e)}})})}function Gc(t){t.forEach(Hc)}function Yc(){typeof ResizeObserver>"u"||(ae=new ResizeObserver(Gc))}function Xc(t,e){ae||Yc();const n=Oo(t);return n.forEach(s=>{let i=re.get(s);i||(i=new Set,re.set(s,i)),i.add(e),ae?.observe(s)}),()=>{n.forEach(s=>{const i=re.get(s);i?.delete(e),i?.size||ae?.unobserve(s)})}}const le=new Set;let St;function qc(){St=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};le.forEach(e=>e(t))},window.addEventListener("resize",St)}function Zc(t){return le.add(t),St||qc(),()=>{le.delete(t),!le.size&&typeof St=="function"&&(window.removeEventListener("resize",St),St=void 0)}}function As(t,e){return typeof t=="function"?Zc(t):Xc(t,e)}function Jc(t){return Kn(t)&&t.tagName==="svg"}const Qc=[...Do,F,nt],tu=t=>Qc.find(Ro(t)),ks=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pt=()=>({x:ks(),y:ks()}),Ms=()=>({min:0,max:0}),z=()=>({x:Ms(),y:Ms()}),eu=new WeakMap;function Pe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Bt(t){return typeof t=="string"||Array.isArray(t)}const Hn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gn=["initial",...Hn];function Ce(t){return Pe(t.animate)||Gn.some(e=>Bt(t[e]))}function zo(t){return!!(Ce(t)||t.variants)}function nu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(W(i))t.addValue(s,i);else if(W(r))t.addValue(s,At(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,At(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const mn={current:null},Uo={current:!1},su=typeof window<"u";function iu(){if(Uo.current=!0,!!su)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>mn.current=t.matches;t.addEventListener("change",e),e()}else mn.current=!1}const Vs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ve={};function Wo(t){ve=t}function ou(){return ve}class ru{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=_.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,L.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Ce(n),this.isVariantNode=zo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];c[p]!==void 0&&W(f)&&f.set(c[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,eu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Uo.current||iu(),this.shouldReduceMotion=mn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),dt(this.notifyUpdate),dt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&So.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new wo({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:H(u)}),d=o(h);this.valueSubscriptions.set(e,()=>{d(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ve){const n=ve[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Vs.length;s++){const i=Vs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=nu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=At(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(zi(s)||Wi(s))?s=parseFloat(s):!tu(s)&&nt.test(n)&&(s=Lo(e,n)),this.setBaseTarget(e,W(s)?s.get():s)),W(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=zn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!W(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_n.render(this.render)}}class _o extends ru{constructor(){super(...arguments),this.KeyframeResolver=Lc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;W(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $o({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ie(t){return t===void 0||t===1}function pn({scale:t,scaleX:e,scaleY:n}){return!Ie(t)||!Ie(e)||!Ie(n)}function pt(t){return pn(t)||Ko(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ko(t){return Es(t.x)||Es(t.y)}function Es(t){return t&&t!=="0%"}function xe(t,e,n){const s=t-n,i=e*s;return n+i}function Rs(t,e,n,s,i){return i!==void 0&&(t=xe(t,i,s)),xe(t,n,s)+e}function gn(t,e=0,n=1,s,i){t.min=Rs(t.min,e,n,s,i),t.max=Rs(t.max,e,n,s,i)}function Ho(t,{x:e,y:n}){gn(t.x,e.translate,e.scale,e.originPoint),gn(t.y,n.translate,n.scale,n.originPoint)}const Ds=.999999999999,js=1.0000000000001;function cu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(it(t.x,-r.scroll.offset.x),it(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ho(t,o)),s&&pt(r.latestValues)&&ce(t,r.latestValues,r.layout?.layoutBox))}e.x<js&&e.x>Ds&&(e.x=1),e.y<js&&e.y>Ds&&(e.y=1)}function it(t,e){t.min+=e,t.max+=e}function Ls(t,e,n,s,i=.5){const r=j(t.min,t.max,i);gn(t,e,n,r,s)}function Os(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ce(t,e,n){const s=n??t;Ls(t.x,Os(e.x,s.x),e.scaleX,e.scale,e.originX),Ls(t.y,Os(e.y,s.y),e.scaleY,e.scale,e.originY)}function Go(t,e){return $o(lu(t.getBoundingClientRect(),e))}function uu(t,e,n){const s=Go(t,n),{scroll:i}=e;return i&&(it(s.x,i.offset.x),it(s.y,i.offset.y)),s}const hu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},du=Mt.length;function fu(t,e,n){let s="",i=!0;for(let o=0;o<du;o++){const a=Mt[o],l=t[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=fn(l,ye[a]);if(!c){i=!1;const h=hu[a]||a;s+=`${h}(${u}) `}n&&(e[a]=u)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${fn(r,ye.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Yn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(Vt.has(l)){o=!0;continue}else if(so(l)){i[l]=c;continue}else{const u=fn(c,ye[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=fu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function Yo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Et={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Is(t,e.target.x),s=Is(t,e.target.y);return`${n}% ${s}%`}},mu={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=nt.parse(t);if(i.length>5)return s;const r=nt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=j(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},yn={borderRadius:{...Et,applyTo:[...Wn]},borderTopLeftRadius:Et,borderTopRightRadius:Et,borderBottomLeftRadius:Et,borderBottomRightRadius:Et,boxShadow:mu};function Xo(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!yn[t]||t==="opacity")}function Xn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(W(s[o])||i&&W(i[o])||Xo(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pu(t){return window.getComputedStyle(t)}class gu extends _o{constructor(){super(...arguments),this.type="html",this.renderInstance=Yo}readValueFromInstance(e,n){if(Vt.has(n))return this.projection?.isProjecting?en(n):Il(e,n);{const s=pu(e),i=(so(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Go(e,n)}build(e,n,s){Yn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xn(e,n,s)}}const yu={offset:"stroke-dashoffset",array:"stroke-dasharray"},vu={offset:"strokeDashoffset",array:"strokeDasharray"};function xu(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?yu:vu;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const bu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Yn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const p of bu)h[p]!==void 0&&(d[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&xu(h,i,r,o,!1)}const Zo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Jo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wu(t,e,n,s){Yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Zo.has(i)?i:Un(i),e.attrs[i])}function Qo(t,e,n){const s=Xn(t,e,n);for(const i in t)if(W(t[i])||W(e[i])){const r=Mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Tu extends _o{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=jo(n);return s&&s.default||0}return n=Zo.has(n)?n:Un(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Qo(e,n,s)}build(e,n,s){qo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){wu(e,n,s,i)}mount(e){this.isSVGTag=Jo(e.tagName),super.mount(e)}}const Su=Gn.length;function tr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?tr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Su;n++){const s=Gn[n],i=t.props[s];(Bt(i)||i===!1)&&(e[s]=i)}return e}function er(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Pu=[...Hn].reverse(),Cu=Hn.length;function Au(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Sc(t,n,s)))}function ku(t){let e=Au(t),n=Fs(),s=!0,i=!1;const r=c=>(u,h)=>{const d=xt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...y}=d;u={...u,...y,...f}}return u};function o(c){e=c(t)}function a(c){const{props:u}=t,h=tr(t.parent)||{},d=[],p=new Set;let f={},y=1/0;for(let g=0;g<Cu;g++){const S=Pu[g],b=n[S],T=u[S]!==void 0?u[S]:h[S],k=Bt(T),V=S===c?b.isActive:null;V===!1&&(y=g);let M=T===h[S]&&T!==u[S]&&k;if(M&&(s||i)&&t.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...f},!b.isActive&&V===null||!T&&!b.prevProp||Pe(T)||typeof T=="boolean")continue;if(S==="exit"&&b.isActive&&V!==!0){b.prevResolvedValues&&(f={...f,...b.prevResolvedValues});continue}const C=Mu(b.prevProp,T);let E=C||S===c&&b.isActive&&!M&&k||g>y&&k,A=!1;const O=Array.isArray(T)?T:[T];let N=O.reduce(r(S),{});V===!1&&(N={});const{prevResolvedValues:J={}}=b,G={...J,...N},Y=B=>{E=!0,p.has(B)&&(A=!0,p.delete(B)),b.needsAnimating[B]=!0;const w=t.getValue(B);w&&(w.liveStyle=!1)};for(const B in G){const w=N[B],R=J[B];if(f.hasOwnProperty(B))continue;let X=!1;ln(w)&&ln(R)?X=!er(w,R)||C:X=w!==R,X?w!=null?Y(B):p.add(B):w!==void 0&&p.has(B)?Y(B):b.protectedKeys[B]=!0}b.prevProp=T,b.prevResolvedValues=N,b.isActive&&(f={...f,...N}),(s||i)&&t.blockInitialAnimation&&(E=!1);const K=M&&C;E&&(!K||A)&&d.push(...O.map(B=>{const w={type:S};if(typeof B=="string"&&(s||i)&&!K&&t.manuallyAnimateOnMount&&t.parent){const{parent:R}=t,X=xt(R,B);if(R.enteringChildren&&X){const{delayChildren:D}=X.transition||{};w.delay=Po(R.enteringChildren,t,D)}}return{animation:B,options:w}}))}if(p.size){const g={};if(typeof u.initial!="boolean"){const S=xt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);S&&S.transition&&(g.transition=S.transition)}p.forEach(S=>{const b=t.getBaseTarget(S),T=t.getValue(S);T&&(T.liveStyle=!0),g[S]=b??null}),d.push({animation:g})}let v=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,i=!1,v?e(d):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();t.variantChildren?.forEach(d=>d.animationState?.setActive(c,u)),n[c].isActive=u;const h=a(c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Fs(),i=!0}}}function Mu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!er(e,t):!1}function mt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fs(){return{animate:mt(!0),whileInView:mt(),whileHover:mt(),whileTap:mt(),whileDrag:mt(),whileFocus:mt(),exit:mt()}}function vn(t,e){t.min=e.min,t.max=e.max}function Q(t,e){vn(t.x,e.x),vn(t.y,e.y)}function Ns(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const nr=1e-4,Vu=1-nr,Eu=1+nr,sr=.01,Ru=0-sr,Du=0+sr;function $(t){return t.max-t.min}function ju(t,e,n){return Math.abs(t-e)<=n}function Bs(t,e,n,s=.5){t.origin=s,t.originPoint=j(e.min,e.max,t.origin),t.scale=$(n)/$(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Vu&&t.scale<=Eu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ru&&t.translate<=Du||isNaN(t.translate))&&(t.translate=0)}function Ot(t,e,n,s){Bs(t.x,e.x,n.x,s?s.originX:void 0),Bs(t.y,e.y,n.y,s?s.originY:void 0)}function zs(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+$(e)}function Lu(t,e,n,s){zs(t.x,e.x,n.x,s?.x),zs(t.y,e.y,n.y,s?.y)}function Us(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+$(e)}function be(t,e,n,s){Us(t.x,e.x,n.x,s?.x),Us(t.y,e.y,n.y,s?.y)}function Ws(t,e,n,s,i){return t-=e,t=xe(t,1/n,s),i!==void 0&&(t=xe(t,1/i,s)),t}function Ou(t,e=0,n=1,s=.5,i,r=t,o=t){if(ot.test(e)&&(e=parseFloat(e),e=j(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=j(r.min,r.max,s);t===r&&(a-=e),t.min=Ws(t.min,e,n,a,i),t.max=Ws(t.max,e,n,a,i)}function _s(t,e,[n,s,i],r,o){Ou(t,e[n],e[s],e[i],e.scale,r,o)}const Iu=["x","scaleX","originX"],Fu=["y","scaleY","originY"];function $s(t,e,n,s){_s(t.x,e,Iu,n?n.x:void 0,s?s.x:void 0),_s(t.y,e,Fu,n?n.y:void 0,s?s.y:void 0)}function Ks(t){return t.translate===0&&t.scale===1}function ir(t){return Ks(t.x)&&Ks(t.y)}function Hs(t,e){return t.min===e.min&&t.max===e.max}function Nu(t,e){return Hs(t.x,e.x)&&Hs(t.y,e.y)}function Gs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function or(t,e){return Gs(t.x,e.x)&&Gs(t.y,e.y)}function Ys(t){return $(t.x)/$(t.y)}function Xs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function st(t){return[t("x"),t("y")]}function Bu(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:h,rotateX:d,rotateY:p,skewX:f,skewY:y}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotate(${h}deg) `),d&&(s+=`rotateX(${d}deg) `),p&&(s+=`rotateY(${p}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const zu=Wn.length,qs=t=>typeof t=="string"?parseFloat(t):t,Zs=t=>typeof t=="number"||P.test(t);function Uu(t,e,n,s,i,r){i?(t.opacity=j(0,n.opacity??1,Wu(s)),t.opacityExit=j(e.opacity??1,0,_u(s))):r&&(t.opacity=j(e.opacity??1,n.opacity??1,s));for(let o=0;o<zu;o++){const a=Wn[o];let l=Js(e,a),c=Js(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Zs(l)===Zs(c)?(t[a]=Math.max(j(qs(l),qs(c),s),0),(ot.test(c)||ot.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,s))}function Js(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Wu=rr(0,.5,Zi),_u=rr(.5,.95,Z);function rr(t,e,n){return s=>s<t?0:s>e?1:n(Ft(t,e,s))}function $u(t,e,n){const s=W(t)?t:At(t);return s.start(Bn("",s,e,n)),s.animation}function zt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Ku=(t,e)=>t.depth-e.depth;class Hu{constructor(){this.children=[],this.isDirty=!1}add(e){An(this.children,e),this.isDirty=!0}remove(e){de(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ku),this.isDirty=!1,this.children.forEach(e)}}function Gu(t,e){const n=_.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(dt(s),t(r-e))};return L.setup(s,!0),()=>dt(s)}function ue(t){return W(t)?t.get():t}class Yu{constructor(){this.members=[]}add(e){An(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(de(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(de(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.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)}}const he={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fe=["","X","Y","Z"],Xu=1e3;let qu=0;function Ne(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ar(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ar(s)}function lr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=qu++,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,this.nodes.forEach(Qu),this.nodes.forEach(oh),this.nodes.forEach(rh),this.nodes.forEach(th)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Kn(o)&&!Jc(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=Gu(d,250),he.hasAnimatedSinceResize&&(he.hasAnimatedSinceResize=!1,this.nodes.forEach(ei)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||c.getDefaultTransition()||hh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),g=!this.targetLayout||!or(this.targetLayout,p),S=!h&&d;if(this.options.layoutRoot||this.resumeFrom||S||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Nn(f,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,S,b.path)}else h||ei(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dt(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(ah),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ar(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(nh),this.nodes.forEach(Qs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ti);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sh),this.nodes.forEach(ih),this.nodes.forEach(Zu),this.nodes.forEach(Ju)):this.nodes.forEach(ti),this.clearAllSnapshots();const a=_.now();U.delta=rt(0,1e3/60,a-U.timestamp),U.timestamp=a,U.isProcessing=!0,Ve.update.process(U),Ve.preRender.process(U),Ve.render.process(U),U.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_n.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(lh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$(this.snapshot.measuredBox.x)&&!$(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ir(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||pt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),dh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fh))){const{scroll:c}=this.root;c&&(it(a.x,c.offset.x),it(a.y,c.offset.y))}return a}removeElementScroll(o){const a=z();if(Q(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&Q(a,o),it(a.x,u.offset.x),it(a.y,u.offset.y))}return a}applyTransform(o,a=!1,l){const c=l||z();Q(c,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(it(c.x,-h.scroll.offset.x),it(c.y,-h.scroll.offset.y)),pt(h.latestValues)&&ce(c,h.latestValues,h.layout?.layoutBox)}return pt(this.latestValues)&&ce(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=z();Q(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!pt(c.latestValues))continue;let u;c.instance&&(pn(c.latestValues)&&c.updateSnapshot(),u=z(),Q(u,c.measurePageBox())),$s(a,c.latestValues,c.snapshot?.layoutBox,u)}return pt(this.latestValues)&&$s(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==U.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=U.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Q(this.target,this.layout.layoutBox),Ho(this.target,this.targetDelta)):Q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pn(this.parent.latestValues)||Ko(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),be(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===U.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;cu(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ns(this.prevProjectionDelta.x,this.projectionDelta.x),Ns(this.prevProjectionDelta.y,this.projectionDelta.y)),Ot(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Xs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pt(),this.projectionDelta=Pt(),this.projectionDeltaWithTransform=Pt()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},d=Pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=z(),f=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=f!==y,g=this.getStack(),S=!g||g.members.length<=1,b=!!(v&&!S&&this.options.crossfade===!0&&!this.path.some(uh));this.animationProgress=0;let T;const k=l?.interpolateProjection(o);this.mixTargetDelta=V=>{const M=V/1e3,C=k?.(M);C?(d.x.translate=C.x,d.x.scale=j(o.x.scale,1,M),d.x.origin=o.x.origin,d.x.originPoint=o.x.originPoint,d.y.translate=C.y,d.y.scale=j(o.y.scale,1,M),d.y.origin=o.y.origin,d.y.originPoint=o.y.originPoint):(ni(d.x,o.x,M),ni(d.y,o.y,M)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(be(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ch(this.relativeTarget,this.relativeTargetOrigin,p,M),T&&Nu(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=z()),Q(T,this.relativeTarget)),v&&(this.animationValues=h,Uu(h,u,this.latestValues,M,b,S)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{he.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=At(0)),this.motionValue.jump(0,!1),this.currentAnimation=$u(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&cr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||z();const h=$(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=$(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Q(a,l),ce(a,u),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Yu),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ne("z",o,c,this.animationValues);for(let u=0;u<Fe.length;u++)Ne(`rotate${Fe[u]}`,o,c,this.animationValues),Ne(`skew${Fe[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ue(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ue(a?.pointerEvents)||""),this.hasProjected&&!pt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Bu(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:p}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in yn){if(u[f]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:g}=yn[f],S=h==="none"?u[f]:y(u[f],c);if(v){const b=v.length;for(let T=0;T<b;T++)o[v[T]]=S}else g?this.options.visualElement.renderState.vars[f]=S:o[f]=S}this.options.layoutId&&(o.pointerEvents=c===this?ue(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Qs),this.root.sharedNodes.clear()}}}function Zu(t){t.updateLayout()}function Ju(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")st(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],d=$(h);h.min=n[u].min,h.max=h.min+d});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";vn(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else cr(i,e.layoutBox,n)&&st(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],d=$(n[u]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const o=Pt();Ot(o,n,e.layoutBox);const a=Pt();r?Ot(a,t.applyTransform(s,!0),e.measuredBox):Ot(a,n,e.layoutBox);const l=!ir(o);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:d}=u;if(h&&d){const p=t.options.layoutAnchor||void 0,f=z();be(f,e.layoutBox,h.layoutBox,p);const y=z();be(y,n,d.layoutBox,p),or(f,y)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=f,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Qu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function th(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eh(t){t.clearSnapshot()}function Qs(t){t.clearMeasurements()}function nh(t){t.isLayoutDirty=!0,t.updateLayout()}function ti(t){t.isLayoutDirty=!1}function sh(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ih(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ei(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oh(t){t.resolveTargetDelta()}function rh(t){t.calcProjection()}function ah(t){t.resetSkewAndRotation()}function lh(t){t.removeLeadSnapshot()}function ni(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function si(t,e,n,s){t.min=j(e.min,n.min,s),t.max=j(e.max,n.max,s)}function ch(t,e,n,s){si(t.x,e.x,n.x,s),si(t.y,e.y,n.y,s)}function uh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hh={duration:.45,ease:[.4,0,.1,1]},ii=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),oi=ii("applewebkit/")&&!ii("chrome/")?Math.round:Z;function ri(t){t.min=oi(t.min),t.max=oi(t.max)}function dh(t){ri(t.x),ri(t.y)}function cr(t,e,n){return t==="position"||t==="preserve-aspect"&&!ju(Ys(e),Ys(n),.2)}function fh(t){return t!==t.root&&t.scroll?.wasRoot}const mh=lr({attachResizeListener:(t,e)=>zt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Be={current:void 0},ur=lr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new mh({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),qn=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ai(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ph(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ai(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ai(t[i],null)}}}}function gh(...t){return x.useCallback(ph(...t),t)}class yh extends x.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(ie(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=ie(s)&&s.offsetWidth||0,r=ie(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function vh({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){const o=x.useId(),a=x.useRef(null),l=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=x.useContext(qn),u=t.props?.ref??t?.ref,h=gh(a,u);return x.useInsertionEffect(()=>{const{width:d,height:p,top:f,left:y,right:v,bottom:g,direction:S}=l.current;if(e||r===!1||!a.current||!d||!p)return;const b=S==="rtl",T=n==="left"?b?`right: ${v}`:`left: ${y}`:b?`left: ${y}`:`right: ${v}`,k=s==="bottom"?`bottom: ${g}`:`top: ${f}`;a.current.dataset.motionPopId=o;const V=document.createElement("style");c&&(V.nonce=c);const M=i??document.head;return M.appendChild(V),V.sheet&&V.sheet.insertRule(`
|
|
1
|
+
import{d as x,j as m,R as Rt,r as bt,u as Rr,f as Dr,t as jr,L as Lr}from"./index-BM2o7PeV.js";import{c as Or}from"./client-0MPbodA6.js";import{u as Ir,a as Fr,b as Nr,A as Br,C as zr,c as Ur,M as Wr,S as _r,B as $r,P as Kr,d as Hr,N as Gr,i as Yr,e as Xr}from"./viewportLock-D3SNkwS2.js";import{H as Ii,a as qr,u as et,b as Zr,o as Jr,f as Qr,c as Fi,n as es,d as ta,e as ea,g as ns,h as na,i as Ni,j as sa,k as ia,l as oa,m as ra,S as aa,Q as la,O as ca,p as ss,q as is,r as ua,s as ha,t as os,v as da,w as fa,x as ma,y as pa,z as ga,A as ya,B as va,C as xa,D as ba,E as wa}from"./appStore-DWP8UET9.js";import{i as Ta,u as Ye,b as Bi,E as Sa}from"./codingNavigation-DDlPpPk5.js";import{F as Pa}from"./UnifiedPage-BX6ZQL0h.js";import{d as Ca,i as Aa,s as ka}from"./RunLocationPicker-DBnXYV5B.js";import{i as Tn,R as Ma,a as Va,b as Ea}from"./ipc-CxAyeo8q.js";import"./i18n.generated-BuLjnmY8.js";import"./ModelPill-CY-rU1RU.js";import"./rotate-ccw-BvipPIjC.js";import"./upload-ZrOj6tXA.js";import"./hard-drive-BpuI5ebj.js";import"./CapabilityMenu-SwVlZ06x.js";import"./book-open-OLNm7OaB.js";import"./folder-plus-BeQHr4AZ.js";import"./circle-x-fcReAZaE.js";import"./userSpaces-uJOnsedR.js";import"./automationListSource-C8BNy6RY.js";import"./nativeDownload-BYT082bY.js";import"./messages-_jta1lSI.js";import"./code-xml-Cuna8Kh4.js";import"./workflow-DPoG4QE2.js";import"./list-tree-4-0QDbLu.js";import"./layout-grid-BBVuEdWG.js";import"./terminal-l9k6RDrH.js";import"./star-BQWMXnn7.js";import"./folder-BpsfOHD4.js";import"./DashboardGridView-B9DCWYVb.js";import"./FloatingToc-Ce9GamvH.js";import"./MarkdownBlock-CkqiwPXa.js";import"./index-CuiYK18N.js";import"./linkFollow-B7ivDZMM.js";import"./mdMarks-DbIcRa0O.js";import"./emoji-6zl4yfOS.js";import"./listFold-DLuxXiIj.js";import"./pageChrome-D3Niv1JM.js";import"./pageTree-CgfvpzIj.js";import"./pluginExt-Byb64tQO.js";import"./SidebarRow-BAJxbMcx.js";import"./pen-tool-BXEFnU2i.js";import"./pencil-cqvCkekG.js";import"./type-CFoaj2eD.js";import"./undo-2-DusxpdLa.js";import"./redo-2-BO7wCDwy.js";import"./lock-CnbZm4vo.js";import"./AutomationBuilder-hqs0QhMt.js";import"./gestures-DQBCcK4y.js";import"./Chrome-HdfyYV3i.js";import"./minus-C9ndHJ9O.js";import"./canvasPrefs-8taQ42Cz.js";import"./circle-question-mark-XbAFplz1.js";import"./InlineFiles-CQbQumkf.js";import"./RightPanel-BHDgqTFs.js";import"./MuseView-CC2A7MBs.js";import"./approvalText-Cy2UAUAQ.js";import"./message-square-plus-CpiKDvle.js";import"./codeStudioStore-BBU62GTy.js";import"./log-out-BEynWaHa.js";import"./index-Ck_O3Jdd.js";/* empty css */import"./StudioGuestSurface-lt6znmkl.js";import"./create-BGtEfCcg.js";import"./pdf.worker.min-CGb3BKV9.js";import"./zoom-in-lbTgzdQP.js";import"./SketchCard-BGYz-bXP.js";import"./mdMarkStore-DQHDjG7s.js";import"./arrow-up-right-DrCXuWS7.js";import"./hand-Bko7ms15.js";import"./foldActions-05QcQziQ.js";const Me={addListener:async(t,e)=>({remove:()=>{}}),minimizeApp:async()=>{},getLaunchUrl:async()=>{}},Sn=x.createContext({});function Pn(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ra=typeof window<"u",Cn=Ra?x.useLayoutEffect:x.useEffect,Te=x.createContext(null);function An(t,e){t.indexOf(e)===-1&&t.push(e)}function de(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const rt=(t,e,n)=>n>e?e:n<t?t:n;let kn=()=>{};const ht={},zi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ui=t=>typeof t=="object"&&t!==null,Wi=t=>/^0[^.\s]+$/u.test(t);function _i(t){let e;return()=>(e===void 0&&(e=t()),e)}const Z=t=>t,_t=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Ft=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class Mn{constructor(){this.subscriptions=[]}add(e){return An(this.subscriptions,e),()=>de(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const H=t=>t*1e3,q=t=>t/1e3,$i=(t,e)=>e?t*(1e3/e):0,Ki=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Da=1e-7,ja=12;function La(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Ki(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Da&&++a<ja);return o}function $t(t,e,n,s){if(t===e&&n===s)return Z;const i=r=>La(r,0,1,t,n);return r=>r===0||r===1?r:Ki(i(r),e,s)}const Hi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Gi=t=>e=>1-t(1-e),Yi=$t(.33,1.53,.69,.99),Vn=Gi(Yi),Xi=Hi(Vn),qi=t=>t>=1?1:(t*=2)<1?.5*Vn(t):.5*(2-Math.pow(2,-10*(t-1))),En=t=>1-Math.sin(Math.acos(t)),Zi=Gi(En),Ji=Hi(En),Oa=$t(.42,0,1,1),Ia=$t(0,0,.58,1),Qi=$t(.42,0,.58,1),Fa=t=>Array.isArray(t)&&typeof t[0]!="number",to=t=>Array.isArray(t)&&typeof t[0]=="number",Na={linear:Z,easeIn:Oa,easeInOut:Qi,easeOut:Ia,circIn:En,circInOut:Ji,circOut:Zi,backIn:Vn,backInOut:Xi,backOut:Yi,anticipate:qi},Ba=t=>typeof t=="string",rs=t=>{if(to(t)){kn(t.length===4);const[e,n,s,i]=t;return $t(e,n,s,i)}else if(Ba(t))return Na[t];return t},Yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function za(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){r.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,h=!1)=>{const p=h&&s?e:n;return u&&r.add(c),p.add(c),c},cancel:c=>{n.delete(c),r.delete(c)},process:c=>{if(o=c,s){i=!0;return}s=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Ua=40;function eo(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Yt.reduce((b,T)=>(b[T]=za(r),b),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:f}=o,y=()=>{const b=ht.useManualTiming,T=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Ua),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},v=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Yt.reduce((b,T)=>{const k=o[T];return b[T]=(V,M=!1,C=!1)=>(n||v(),k.schedule(V,M,C)),b},{}),cancel:b=>{for(let T=0;T<Yt.length;T++)o[Yt[T]].cancel(b)},state:i,steps:o}}const{schedule:L,cancel:dt,state:U,steps:Ve}=eo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let se;function Wa(){se=void 0}const _={now:()=>(se===void 0&&_.set(U.isProcessing||ht.useManualTiming?U.timestamp:performance.now()),se),set:t=>{se=t,queueMicrotask(Wa)}},no=t=>e=>typeof e=="string"&&e.startsWith(t),so=no("--"),_a=no("var(--"),Rn=t=>_a(t)?$a.test(t.split("/*")[0].trim()):!1,$a=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function as(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...kt,transform:t=>rt(0,1,t)},Xt={...kt,default:1},jt=t=>Math.round(t*1e5)/1e5,Dn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ka(t){return t==null}const Ha=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jn=(t,e)=>n=>!!(typeof n=="string"&&Ha.test(n)&&n.startsWith(t)||e&&!Ka(n)&&Object.prototype.hasOwnProperty.call(n,e)),io=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Dn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ga=t=>rt(0,255,t),Ee={...kt,transform:t=>Math.round(Ga(t))},gt={test:jn("rgb","red"),parse:io("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ee.transform(t)+", "+Ee.transform(e)+", "+Ee.transform(n)+", "+jt(Nt.transform(s))+")"};function Ya(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Xe={test:jn("#"),parse:Ya,transform:gt.transform},Kt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),at=Kt("deg"),ot=Kt("%"),P=Kt("px"),Xa=Kt("vh"),qa=Kt("vw"),ls={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)},Tt={test:jn("hsl","hue"),parse:io("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(jt(e))+", "+ot.transform(jt(n))+", "+jt(Nt.transform(s))+")"},F={test:t=>gt.test(t)||Xe.test(t)||Tt.test(t),parse:t=>gt.test(t)?gt.parse(t):Tt.test(t)?Tt.parse(t):Xe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?gt.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=F.parse(t);return e.alpha=0,F.transform(e)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ja(t){return isNaN(t)&&typeof t=="string"&&(t.match(Dn)?.length||0)+(t.match(Za)?.length||0)>0}const oo="number",ro="color",Qa="var",tl="var(",cs="${}",el=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ct(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(el,l=>(F.test(l)?(s.color.push(r),i.push(ro),n.push(F.parse(l))):l.startsWith(tl)?(s.var.push(r),i.push(Qa),n.push(l)):(s.number.push(r),i.push(oo),n.push(parseFloat(l))),++r,cs)).split(cs);return{values:n,split:a,indexes:s,types:i}}function nl(t){return Ct(t).values}function ao({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===oo?i+=jt(s[r]):o===ro?i+=F.transform(s[r]):i+=s[r]}return i}}function sl(t){return ao(Ct(t))}const il=t=>typeof t=="number"?0:F.test(t)?F.getAnimatableNone(t):t,ol=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:il(t);function rl(t){const e=Ct(t);return ao(e)(e.values.map((s,i)=>ol(s,e.split[i])))}const nt={test:Ja,parse:nl,createTransformer:sl,getAnimatableNone:rl};function Re(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function al({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Re(l,a,t+1/3),r=Re(l,a,t),o=Re(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function fe(t,e){return n=>n>0?e:t}const j=(t,e,n)=>t+(e-t)*n,De=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ll=[Xe,gt,Tt],cl=t=>ll.find(e=>e.test(t));function us(t){const e=cl(t);if(!e)return!1;let n=e.parse(t);return e===Tt&&(n=al(n)),n}const hs=(t,e)=>{const n=us(t),s=us(e);if(!n||!s)return fe(t,e);const i={...n};return r=>(i.red=De(n.red,s.red,r),i.green=De(n.green,s.green,r),i.blue=De(n.blue,s.blue,r),i.alpha=j(n.alpha,s.alpha,r),gt.transform(i))},qe=new Set(["none","hidden"]);function ul(t,e){return qe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function hl(t,e){return n=>j(t,e,n)}function Ln(t){return typeof t=="number"?hl:typeof t=="string"?Rn(t)?fe:F.test(t)?hs:ml:Array.isArray(t)?lo:typeof t=="object"?F.test(t)?hs:dl:fe}function lo(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function dl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const ml=(t,e)=>{const n=nt.createTransformer(e),s=Ct(t),i=Ct(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?qe.has(t)&&!i.values.length||qe.has(e)&&!s.values.length?ul(t,e):_t(lo(fl(s,i),i.values),n):fe(t,e)};function co(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):Ln(t)(t,e)}const pl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>dt(e),now:()=>U.isProcessing?U.timestamp:_.now()}},uo=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},me=2e4;function On(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<me;)e+=n,s=t.next(e);return e>=me?1/0:e}function gl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(On(s),me);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:q(i)}}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ze(t,e){return t*Math.sqrt(1-e*e)}const yl=12;function vl(t,e,n){let s=n;for(let i=1;i<yl;i++)s=s-t(s)/e(s);return s}const je=.001;function xl({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,r,o=1-e;o=rt(I.minDamping,I.maxDamping,o),t=rt(I.minDuration,I.maxDuration,q(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-n,p=Ze(c,o),f=Math.exp(-h);return je-d/p*f},r=c=>{const h=c*o*t,d=h*n+n,p=Math.pow(o,2)*Math.pow(c,2)*t,f=Math.exp(-h),y=Ze(Math.pow(c,2),o);return(-i(c)+je>0?-1:1)*((d-p)*f)/y}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-je+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=vl(i,r,a);if(t=H(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const bl=["duration","bounce"],wl=["stiffness","damping","mass"];function ds(t,e){return e.some(n=>t[n]!==void 0)}function Tl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!ds(t,wl)&&ds(t,bl))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*rt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:r}}else{const n=xl({...t,velocity:0});e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function pe(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=Tl({...n,velocity:-q(n.velocity||0)}),f=d||0,y=c/(2*Math.sqrt(l*u)),v=o-r,g=q(Math.sqrt(l/u)),S=Math.abs(v)<5;s||(s=S?I.restSpeed.granular:I.restSpeed.default),i||(i=S?I.restDelta.granular:I.restDelta.default);let b,T,k,V,M,C;if(y<1)k=Ze(g,y),V=(f+y*g*v)/k,b=A=>{const O=Math.exp(-y*g*A);return o-O*(V*Math.sin(k*A)+v*Math.cos(k*A))},M=y*g*V+v*k,C=y*g*v-V*k,T=A=>Math.exp(-y*g*A)*(M*Math.sin(k*A)+C*Math.cos(k*A));else if(y===1){b=O=>o-Math.exp(-g*O)*(v+(f+g*v)*O);const A=f+g*v;T=O=>Math.exp(-g*O)*(g*A*O-f)}else{const A=g*Math.sqrt(y*y-1);b=G=>{const Y=Math.exp(-y*g*G),K=Math.min(A*G,300);return o-Y*((f+y*g*v)*Math.sinh(K)+A*v*Math.cosh(K))/A};const O=(f+y*g*v)/A,N=y*g*O-v*A,J=y*g*v-O*A;T=G=>{const Y=Math.exp(-y*g*G),K=Math.min(A*G,300);return Y*(N*Math.sinh(K)+J*Math.cosh(K))}}const E={calculatedDuration:p&&h||null,velocity:A=>H(T(A)),next:A=>{if(!p&&y<1){const N=Math.exp(-y*g*A),J=Math.sin(k*A),G=Math.cos(k*A),Y=o-N*(V*J+v*G),K=H(N*(M*J+C*G));return a.done=Math.abs(K)<=s&&Math.abs(o-Y)<=i,a.value=a.done?o:Y,a}const O=b(A);if(p)a.done=A>=h;else{const N=H(T(A));a.done=Math.abs(N)<=s&&Math.abs(o-O)<=i}return a.value=a.done?o:O,a},toString:()=>{const A=Math.min(On(E),me),O=uo(N=>E.next(A*N).value,A,30);return A+"ms "+O},toTransition:()=>{}};return E}pe.applyToOptions=t=>{const e=gl(t,100,pe);return t.ease=e.ease,t.duration=H(e.duration),t.type="keyframes",t};const Sl=5;function ho(t,e,n){const s=Math.max(e-Sl,0);return $i(n-t(s),e-s)}function Je({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,f=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*e;const v=h+y,g=o===void 0?v:o(v);g!==v&&(y=g-h);const S=C=>-y*Math.exp(-C/s),b=C=>g+S(C),T=C=>{const E=S(C),A=b(C);d.done=Math.abs(E)<=c,d.value=d.done?g:A};let k,V;const M=C=>{p(d.value)&&(k=C,V=pe({keyframes:[d.value,f(d.value)],velocity:ho(b,C,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:C=>{let E=!1;return!V&&k===void 0&&(E=!0,T(C),M(C)),k!==void 0&&C>=k?V.next(C-k):(!E&&T(C),d)}}}function Pl(t,e,n){const s=[],i=n||ht.mix||co,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Z:e;a=_t(l,a)}s.push(a)}return s}function Cl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(kn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=Ft(t[h],t[h+1],u);return a[h](d)};return n?u=>c(rt(t[0],t[r-1],u)):c}function Al(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ft(0,e,s);t.push(j(n,1,i))}}function kl(t){const e=[0];return Al(e,t.length-1),e}function Ml(t,e){return t.map(n=>n*e)}function Vl(t,e){return t.map(()=>e||Qi).splice(0,t.length-1)}function Lt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fa(s)?s.map(rs):rs(s),r={done:!1,value:e[0]},o=Ml(n&&n.length===e.length?n:kl(e),t),a=Cl(o,e,{ease:Array.isArray(i)?i:Vl(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const El=t=>t!==null;function Se(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(El),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Rl={decay:Je,inertia:Je,tween:Lt,keyframes:Lt,spring:pe};function fo(t){typeof t.type=="string"&&(t.type=Rl[t.type])}class In{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Dl=t=>t/100;class ge extends In{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;fo(e);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Lt;l!==Lt&&typeof a[0]!="number"&&(this.mixKeyframes=_t(Dl,co(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=On(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let b=this.currentTime,T=s;if(h){const C=Math.min(this.currentTime,i)/a;let E=Math.floor(C),A=C%1;!A&&C>=1&&(A=1),A===1&&E--,E=Math.min(E,h+1),E%2&&(d==="reverse"?(A=1-A,p&&(A-=p/a)):d==="mirror"&&(T=o)),b=rt(0,1,A)*a}let k;S?(this.delayState.value=u[0],k=this.delayState):k=T.next(b),r&&!S&&(k.value=r(k.value));let{done:V}=k;!S&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return M&&f!==Je&&(k.value=Se(u,this.options,v,this.speed)),y&&y(k.value),M&&this.finish(),k}then(e,n){return this.finished.then(e,n)}get duration(){return q(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(this.currentTime)}set time(e){e=H(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return ho(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(_.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=q(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=pl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function jl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const yt=t=>t*180/Math.PI,Qe=t=>{const e=yt(Math.atan2(t[1],t[0]));return tn(e)},Ll={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qe,rotateZ:Qe,skewX:t=>yt(Math.atan(t[1])),skewY:t=>yt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>(t=t%360,t<0&&(t+=360),t),fs=Qe,ms=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ps=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ol={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ms,scaleY:ps,scale:t=>(ms(t)+ps(t))/2,rotateX:t=>tn(yt(Math.atan2(t[6],t[5]))),rotateY:t=>tn(yt(Math.atan2(-t[2],t[0]))),rotateZ:fs,rotate:fs,skewX:t=>yt(Math.atan(t[4])),skewY:t=>yt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function en(t){return t.includes("scale")?1:0}function nn(t,e){if(!t||t==="none")return en(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ol,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ll,i=a}if(!i)return en(e);const r=s[e],o=i[1].split(",").map(Fl);return typeof r=="function"?r(o):o[r]}const Il=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nn(n,e)};function Fl(t){return parseFloat(t.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set([...Mt,"pathRotation"]),gs=t=>t===kt||t===P,Nl=new Set(["x","y","z"]),Bl=Mt.filter(t=>!Nl.has(t));function zl(t){const e=[];return Bl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ut={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>nn(e,"x"),y:(t,{transform:e})=>nn(e,"y")};ut.translateX=ut.x;ut.translateY=ut.y;const vt=new Set;let sn=!1,on=!1,rn=!1;function mo(){if(on){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=zl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}on=!1,sn=!1,vt.forEach(t=>t.complete(rn)),vt.clear()}function po(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)})}function Ul(){rn=!0,po(),mo(),rn=!1}class Fn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(vt.add(this),sn||(sn=!0,L.read(po),L.resolveKeyframes(mo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}jl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Wl=t=>t.startsWith("--");function go(t,e,n){Wl(e)?t.style.setProperty(e,n):t.style[e]=n}const _l={};function yo(t,e){const n=_i(t);return()=>_l[e]??n()}const $l=yo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vo=yo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ys={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dt([0,.65,.55,1]),circOut:Dt([.55,0,1,.45]),backIn:Dt([.31,.01,.66,-.59]),backOut:Dt([.33,1.53,.69,.99])};function xo(t,e){if(t)return typeof t=="function"?vo()?uo(t,e):"ease-out":to(t)?Dt(t):Array.isArray(t)?t.map(n=>xo(n,e)||ys.easeOut):ys[t]}function Kl(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=xo(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function bo(t){return typeof t=="function"&&"applyToOptions"in t}function Hl({type:t,...e}){return bo(t)&&vo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class wo extends In{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,kn(typeof e.type!="string");const c=Hl(e);this.animation=Kl(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Se(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),go(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&$l()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),Z):i(this)}}const To={anticipate:qi,backInOut:Xi,circInOut:Ji};function Gl(t){return t in To}function Yl(t){typeof t.ease=="string"&&Gl(t.ease)&&(t.ease=To[t.ease])}const Le=10;class Xl extends wo{constructor(e){Yl(e),fo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ge({...o,autoplay:!1}),l=Math.max(Le,_.now()-this.startTime),c=rt(0,Le,l-Le),u=a.sample(l).value,{name:h}=this.options;r&&h&&go(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const vs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(nt.test(t)||t==="0")&&!t.startsWith("url("));function ql(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Zl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=vs(i,e),a=vs(r,e);return!o||!a?!1:ql(t)||(n==="spring"||bo(n))&&s}function an(t){t.duration=0,t.type="keyframes"}const So=new Set(["opacity","clipPath","filter","transform"]),Jl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ql(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Jl.test(t[e]))return!0;return!1}const tc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ec=_i(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function nc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return ec()&&n&&(So.has(n)||tc.has(n)&&Ql(a))&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const sc=40;class ic extends In{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Fn;this.keyframeResolver=new p(a,(f,y,v)=>this.onKeyframesResolved(f,y,d,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=_.now();let h=!0;Zl(e,r,o,a)||(h=!1,(ht.instantAnimations||!l)&&u?.(Se(e,s,n)),e[0]=e[e.length-1],an(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=h&&!c&&nc(p),y=p.motionValue?.owner?.current;let v;if(f)try{v=new Xl({...p,element:y})}catch{v=new ge(p)}else v=new ge(p);v.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ul()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Po(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const xs=30,oc=t=>!isNaN(parseFloat(t));class rc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=oc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return $i(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(t,e){return new rc(t,e)}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Nn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}const ac={type:"spring",stiffness:500,damping:25,restSpeed:10},lc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),cc={type:"keyframes",duration:.8},uc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hc=(t,{keyframes:e})=>e.length>2?cc:Vt.has(t)?t.startsWith("scale")?lc(e[1]):ac:uc,dc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function fc(t){for(const e in t)if(!dc.has(e))return!0;return!1}const Bn=(t,e,n,s={},i,r)=>o=>{const a=Nn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-H(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};fc(a)||Object.assign(u,hc(t,u)),u.duration&&(u.duration=H(u.duration)),u.repeatDelay&&(u.repeatDelay=H(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(an(u),u.delay===0&&(h=!0)),(ht.instantAnimations||ht.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,an(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Se(u.keyframes,a);if(d!==void 0){L.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ge(u):new ic(u)},mc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pc(t){const e=mc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ao(t,e,n=1){const[s,i]=pc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return zi(o)?parseFloat(o):o}return Rn(i)?Ao(i,e,n+1):i}function bs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function zn(t,e,n,s){if(typeof e=="function"){const[i,r]=bs(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=bs(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function xt(t,e,n){const s=t.getProps();return zn(s,e,n!==void 0?n:s.custom,t)}const ko=new Set(["width","height","top","left","right","bottom",...Mt]),ln=t=>Array.isArray(t);function gc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,At(n))}function yc(t){return ln(t)?t[t.length-1]||0:t}function vc(t,e){const n=xt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=yc(r[o]);gc(t,o,a)}}const W=t=>!!(t&&t.getVelocity);function xc(t){return!!(W(t)&&t.add)}function cn(t,e){const n=t.getValue("willChange");if(xc(n))return n.add(e);if(!n&&ht.WillChange){const s=new ht.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Un(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const bc="framerAppearId",Mo="data-"+Un(bc);function Vo(t){return t.props[Mo]}function wc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Eo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Co(r,l):l;const c=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);const h=[],d=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const f in a){const y=t.getValue(f,t.latestValues[f]??null),v=a[f];if(v===void 0||d&&wc(d,f))continue;const g={delay:n,...Nn(r||{},f)};u&&(g.skipAnimations=!0);const S=y.get();if(S!==void 0&&!y.isAnimating()&&!Array.isArray(v)&&v===S&&!g.velocity){L.update(()=>y.set(v));continue}let b=!1;if(window.MotionHandoffAnimation){const V=Vo(t);if(V){const M=window.MotionHandoffAnimation(V,f,L);M!==null&&(g.startTime=M,b=!0)}}cn(t,f);const T=c??t.shouldReduceMotion;y.start(Bn(f,y,v,T&&ko.has(f)?{type:!1}:g,t,b));const k=y.animation;k&&h.push(k)}if(o){const f=()=>L.update(()=>{o&&vc(t,o)});h.length?Promise.all(h).then(f):f()}return h}function un(t,e,n={}){const s=xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Eo(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return Tc(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Tc(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(un(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Sc(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>un(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=un(t,e,n);else{const i=typeof e=="function"?xt(t,e,n.custom):e;s=Promise.all(Eo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pc={test:t=>t==="auto",parse:t=>t},Ro=t=>e=>e.test(t),Do=[kt,P,ot,at,qa,Xa,Pc],ws=t=>Do.find(Ro(t));function Cc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Wi(t):!0}const Ac=new Set(["brightness","contrast","saturate","opacity"]);function kc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Dn)||[];if(!s)return t;const i=n.replace(s,"");let r=Ac.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Mc=/\b([a-z-]*)\(.*?\)/gu,hn={...nt,getAnimatableNone:t=>{const e=t.match(Mc);return e?e.map(kc).join(" "):t}},dn={...nt,getAnimatableNone:t=>{const e=nt.parse(t);return nt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ts={...kt,transform:Math.round},Vc={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Xt,scaleX:Xt,scaleY:Xt,scaleZ:Xt,skew:at,skewX:at,skewY:at,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Nt,originX:ls,originY:ls,originZ:P},ye={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...Vc,zIndex:Ts,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:Ts},Ec={...ye,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:hn,WebkitFilter:hn,mask:dn,WebkitMask:dn},jo=t=>Ec[t],Rc=new Set([hn,dn]);function Lo(t,e){let n=jo(t);return Rc.has(n)||(n=nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Dc=new Set(["auto","none","0"]);function jc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Dc.has(r)&&Ct(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Lo(n,i)}class Lc extends Fn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Rn(h))){const d=Ao(h,n.current);d!==void 0&&(e[u]=d),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ko.has(s)||e.length!==2)return;const[i,r]=e,o=ws(i),a=ws(r),l=as(i),c=as(r);if(l!==c&&ut[s]){this.needsMeasurement=!0;return}if(o!==a)if(gs(o)&&gs(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else ut[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Cc(e[i]))&&s.push(i);s.length&&jc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ut[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ut[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const Wn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const fn=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ie(t){return Ui(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:_n}=eo(queueMicrotask,!1),tt={x:!1,y:!1};function Io(){return tt.x||tt.y}function Oc(t){return t==="x"||t==="y"?tt[t]?null:(tt[t]=!0,()=>{tt[t]=!1}):tt.x||tt.y?null:(tt.x=tt.y=!0,()=>{tt.x=tt.y=!1})}function Fo(t,e){const n=Oo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ic(t){return!(t.pointerType==="touch"||Io())}function Fc(t,e,n={}){const[s,i,r]=Fo(t,n);return s.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",f)},h=v=>{c&&(c(v),c=void 0),u()},d=v=>{a=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),l&&(l=!1,h(v))},p=()=>{a=!0,window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",d,i)},f=v=>{if(v.pointerType!=="touch"){if(a){l=!0;return}h(v)}},y=v=>{if(!Ic(v))return;l=!1;const g=e(o,v);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",f,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),r}const No=(t,e)=>e?t===e?!0:No(t,e.parentElement):!1,$n=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Nc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bc(t){return Nc.has(t.tagName)||t.isContentEditable===!0}const zc=new Set(["INPUT","SELECT","TEXTAREA"]);function Uc(t){return zc.has(t.tagName)||t.isContentEditable===!0}const oe=new WeakSet;function Ss(t){return e=>{e.key==="Enter"&&t(e)}}function Oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Wc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ss(()=>{if(oe.has(n))return;Oe(n,"down");const i=Ss(()=>{Oe(n,"up")}),r=()=>Oe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ps(t){return $n(t)&&!Io()}const Cs=new WeakSet;function _c(t,e,n={}){const[s,i,r]=Fo(t,n),o=a=>{const l=a.currentTarget;if(!Ps(a)||Cs.has(a))return;oe.add(l),n.stopPropagation&&Cs.add(a);const c=e(l,a),u={...i,capture:!0},h=(f,y)=>{window.removeEventListener("pointerup",d,u),window.removeEventListener("pointercancel",p,u),oe.has(l)&&oe.delete(l),Ps(f)&&typeof c=="function"&&c(f,{success:y})},d=f=>{h(f,l===window||l===document||n.useGlobalTarget||No(l,f.target))},p=f=>{h(f,!1)};window.addEventListener("pointerup",d,u),window.addEventListener("pointercancel",p,u)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ie(a)&&(a.addEventListener("focus",c=>Wc(c,i)),!Bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Kn(t){return Ui(t)&&"ownerSVGElement"in t}const re=new WeakMap;let ae;const Bo=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Kn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],$c=Bo("inline","width","offsetWidth"),Kc=Bo("block","height","offsetHeight");function Hc({target:t,borderBoxSize:e}){re.get(t)?.forEach(n=>{n(t,{get width(){return $c(t,e)},get height(){return Kc(t,e)}})})}function Gc(t){t.forEach(Hc)}function Yc(){typeof ResizeObserver>"u"||(ae=new ResizeObserver(Gc))}function Xc(t,e){ae||Yc();const n=Oo(t);return n.forEach(s=>{let i=re.get(s);i||(i=new Set,re.set(s,i)),i.add(e),ae?.observe(s)}),()=>{n.forEach(s=>{const i=re.get(s);i?.delete(e),i?.size||ae?.unobserve(s)})}}const le=new Set;let St;function qc(){St=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};le.forEach(e=>e(t))},window.addEventListener("resize",St)}function Zc(t){return le.add(t),St||qc(),()=>{le.delete(t),!le.size&&typeof St=="function"&&(window.removeEventListener("resize",St),St=void 0)}}function As(t,e){return typeof t=="function"?Zc(t):Xc(t,e)}function Jc(t){return Kn(t)&&t.tagName==="svg"}const Qc=[...Do,F,nt],tu=t=>Qc.find(Ro(t)),ks=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pt=()=>({x:ks(),y:ks()}),Ms=()=>({min:0,max:0}),z=()=>({x:Ms(),y:Ms()}),eu=new WeakMap;function Pe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Bt(t){return typeof t=="string"||Array.isArray(t)}const Hn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gn=["initial",...Hn];function Ce(t){return Pe(t.animate)||Gn.some(e=>Bt(t[e]))}function zo(t){return!!(Ce(t)||t.variants)}function nu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(W(i))t.addValue(s,i);else if(W(r))t.addValue(s,At(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,At(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const mn={current:null},Uo={current:!1},su=typeof window<"u";function iu(){if(Uo.current=!0,!!su)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>mn.current=t.matches;t.addEventListener("change",e),e()}else mn.current=!1}const Vs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ve={};function Wo(t){ve=t}function ou(){return ve}class ru{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=_.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,L.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Ce(n),this.isVariantNode=zo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];c[p]!==void 0&&W(f)&&f.set(c[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,eu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Uo.current||iu(),this.shouldReduceMotion=mn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),dt(this.notifyUpdate),dt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&So.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new wo({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:H(u)}),d=o(h);this.valueSubscriptions.set(e,()=>{d(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ve){const n=ve[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Vs.length;s++){const i=Vs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=nu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=At(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(zi(s)||Wi(s))?s=parseFloat(s):!tu(s)&&nt.test(n)&&(s=Lo(e,n)),this.setBaseTarget(e,W(s)?s.get():s)),W(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=zn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!W(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_n.render(this.render)}}class _o extends ru{constructor(){super(...arguments),this.KeyframeResolver=Lc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;W(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $o({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ie(t){return t===void 0||t===1}function pn({scale:t,scaleX:e,scaleY:n}){return!Ie(t)||!Ie(e)||!Ie(n)}function pt(t){return pn(t)||Ko(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ko(t){return Es(t.x)||Es(t.y)}function Es(t){return t&&t!=="0%"}function xe(t,e,n){const s=t-n,i=e*s;return n+i}function Rs(t,e,n,s,i){return i!==void 0&&(t=xe(t,i,s)),xe(t,n,s)+e}function gn(t,e=0,n=1,s,i){t.min=Rs(t.min,e,n,s,i),t.max=Rs(t.max,e,n,s,i)}function Ho(t,{x:e,y:n}){gn(t.x,e.translate,e.scale,e.originPoint),gn(t.y,n.translate,n.scale,n.originPoint)}const Ds=.999999999999,js=1.0000000000001;function cu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(it(t.x,-r.scroll.offset.x),it(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ho(t,o)),s&&pt(r.latestValues)&&ce(t,r.latestValues,r.layout?.layoutBox))}e.x<js&&e.x>Ds&&(e.x=1),e.y<js&&e.y>Ds&&(e.y=1)}function it(t,e){t.min+=e,t.max+=e}function Ls(t,e,n,s,i=.5){const r=j(t.min,t.max,i);gn(t,e,n,r,s)}function Os(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ce(t,e,n){const s=n??t;Ls(t.x,Os(e.x,s.x),e.scaleX,e.scale,e.originX),Ls(t.y,Os(e.y,s.y),e.scaleY,e.scale,e.originY)}function Go(t,e){return $o(lu(t.getBoundingClientRect(),e))}function uu(t,e,n){const s=Go(t,n),{scroll:i}=e;return i&&(it(s.x,i.offset.x),it(s.y,i.offset.y)),s}const hu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},du=Mt.length;function fu(t,e,n){let s="",i=!0;for(let o=0;o<du;o++){const a=Mt[o],l=t[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=fn(l,ye[a]);if(!c){i=!1;const h=hu[a]||a;s+=`${h}(${u}) `}n&&(e[a]=u)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${fn(r,ye.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Yn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(Vt.has(l)){o=!0;continue}else if(so(l)){i[l]=c;continue}else{const u=fn(c,ye[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=fu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function Yo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Et={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Is(t,e.target.x),s=Is(t,e.target.y);return`${n}% ${s}%`}},mu={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=nt.parse(t);if(i.length>5)return s;const r=nt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=j(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},yn={borderRadius:{...Et,applyTo:[...Wn]},borderTopLeftRadius:Et,borderTopRightRadius:Et,borderBottomLeftRadius:Et,borderBottomRightRadius:Et,boxShadow:mu};function Xo(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!yn[t]||t==="opacity")}function Xn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(W(s[o])||i&&W(i[o])||Xo(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pu(t){return window.getComputedStyle(t)}class gu extends _o{constructor(){super(...arguments),this.type="html",this.renderInstance=Yo}readValueFromInstance(e,n){if(Vt.has(n))return this.projection?.isProjecting?en(n):Il(e,n);{const s=pu(e),i=(so(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Go(e,n)}build(e,n,s){Yn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xn(e,n,s)}}const yu={offset:"stroke-dashoffset",array:"stroke-dasharray"},vu={offset:"strokeDashoffset",array:"strokeDasharray"};function xu(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?yu:vu;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const bu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Yn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const p of bu)h[p]!==void 0&&(d[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&xu(h,i,r,o,!1)}const Zo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Jo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wu(t,e,n,s){Yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Zo.has(i)?i:Un(i),e.attrs[i])}function Qo(t,e,n){const s=Xn(t,e,n);for(const i in t)if(W(t[i])||W(e[i])){const r=Mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Tu extends _o{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=jo(n);return s&&s.default||0}return n=Zo.has(n)?n:Un(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Qo(e,n,s)}build(e,n,s){qo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){wu(e,n,s,i)}mount(e){this.isSVGTag=Jo(e.tagName),super.mount(e)}}const Su=Gn.length;function tr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?tr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Su;n++){const s=Gn[n],i=t.props[s];(Bt(i)||i===!1)&&(e[s]=i)}return e}function er(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Pu=[...Hn].reverse(),Cu=Hn.length;function Au(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Sc(t,n,s)))}function ku(t){let e=Au(t),n=Fs(),s=!0,i=!1;const r=c=>(u,h)=>{const d=xt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...y}=d;u={...u,...y,...f}}return u};function o(c){e=c(t)}function a(c){const{props:u}=t,h=tr(t.parent)||{},d=[],p=new Set;let f={},y=1/0;for(let g=0;g<Cu;g++){const S=Pu[g],b=n[S],T=u[S]!==void 0?u[S]:h[S],k=Bt(T),V=S===c?b.isActive:null;V===!1&&(y=g);let M=T===h[S]&&T!==u[S]&&k;if(M&&(s||i)&&t.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...f},!b.isActive&&V===null||!T&&!b.prevProp||Pe(T)||typeof T=="boolean")continue;if(S==="exit"&&b.isActive&&V!==!0){b.prevResolvedValues&&(f={...f,...b.prevResolvedValues});continue}const C=Mu(b.prevProp,T);let E=C||S===c&&b.isActive&&!M&&k||g>y&&k,A=!1;const O=Array.isArray(T)?T:[T];let N=O.reduce(r(S),{});V===!1&&(N={});const{prevResolvedValues:J={}}=b,G={...J,...N},Y=B=>{E=!0,p.has(B)&&(A=!0,p.delete(B)),b.needsAnimating[B]=!0;const w=t.getValue(B);w&&(w.liveStyle=!1)};for(const B in G){const w=N[B],R=J[B];if(f.hasOwnProperty(B))continue;let X=!1;ln(w)&&ln(R)?X=!er(w,R)||C:X=w!==R,X?w!=null?Y(B):p.add(B):w!==void 0&&p.has(B)?Y(B):b.protectedKeys[B]=!0}b.prevProp=T,b.prevResolvedValues=N,b.isActive&&(f={...f,...N}),(s||i)&&t.blockInitialAnimation&&(E=!1);const K=M&&C;E&&(!K||A)&&d.push(...O.map(B=>{const w={type:S};if(typeof B=="string"&&(s||i)&&!K&&t.manuallyAnimateOnMount&&t.parent){const{parent:R}=t,X=xt(R,B);if(R.enteringChildren&&X){const{delayChildren:D}=X.transition||{};w.delay=Po(R.enteringChildren,t,D)}}return{animation:B,options:w}}))}if(p.size){const g={};if(typeof u.initial!="boolean"){const S=xt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);S&&S.transition&&(g.transition=S.transition)}p.forEach(S=>{const b=t.getBaseTarget(S),T=t.getValue(S);T&&(T.liveStyle=!0),g[S]=b??null}),d.push({animation:g})}let v=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,i=!1,v?e(d):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();t.variantChildren?.forEach(d=>d.animationState?.setActive(c,u)),n[c].isActive=u;const h=a(c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Fs(),i=!0}}}function Mu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!er(e,t):!1}function mt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fs(){return{animate:mt(!0),whileInView:mt(),whileHover:mt(),whileTap:mt(),whileDrag:mt(),whileFocus:mt(),exit:mt()}}function vn(t,e){t.min=e.min,t.max=e.max}function Q(t,e){vn(t.x,e.x),vn(t.y,e.y)}function Ns(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const nr=1e-4,Vu=1-nr,Eu=1+nr,sr=.01,Ru=0-sr,Du=0+sr;function $(t){return t.max-t.min}function ju(t,e,n){return Math.abs(t-e)<=n}function Bs(t,e,n,s=.5){t.origin=s,t.originPoint=j(e.min,e.max,t.origin),t.scale=$(n)/$(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Vu&&t.scale<=Eu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ru&&t.translate<=Du||isNaN(t.translate))&&(t.translate=0)}function Ot(t,e,n,s){Bs(t.x,e.x,n.x,s?s.originX:void 0),Bs(t.y,e.y,n.y,s?s.originY:void 0)}function zs(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+$(e)}function Lu(t,e,n,s){zs(t.x,e.x,n.x,s?.x),zs(t.y,e.y,n.y,s?.y)}function Us(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+$(e)}function be(t,e,n,s){Us(t.x,e.x,n.x,s?.x),Us(t.y,e.y,n.y,s?.y)}function Ws(t,e,n,s,i){return t-=e,t=xe(t,1/n,s),i!==void 0&&(t=xe(t,1/i,s)),t}function Ou(t,e=0,n=1,s=.5,i,r=t,o=t){if(ot.test(e)&&(e=parseFloat(e),e=j(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=j(r.min,r.max,s);t===r&&(a-=e),t.min=Ws(t.min,e,n,a,i),t.max=Ws(t.max,e,n,a,i)}function _s(t,e,[n,s,i],r,o){Ou(t,e[n],e[s],e[i],e.scale,r,o)}const Iu=["x","scaleX","originX"],Fu=["y","scaleY","originY"];function $s(t,e,n,s){_s(t.x,e,Iu,n?n.x:void 0,s?s.x:void 0),_s(t.y,e,Fu,n?n.y:void 0,s?s.y:void 0)}function Ks(t){return t.translate===0&&t.scale===1}function ir(t){return Ks(t.x)&&Ks(t.y)}function Hs(t,e){return t.min===e.min&&t.max===e.max}function Nu(t,e){return Hs(t.x,e.x)&&Hs(t.y,e.y)}function Gs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function or(t,e){return Gs(t.x,e.x)&&Gs(t.y,e.y)}function Ys(t){return $(t.x)/$(t.y)}function Xs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function st(t){return[t("x"),t("y")]}function Bu(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:h,rotateX:d,rotateY:p,skewX:f,skewY:y}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotate(${h}deg) `),d&&(s+=`rotateX(${d}deg) `),p&&(s+=`rotateY(${p}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const zu=Wn.length,qs=t=>typeof t=="string"?parseFloat(t):t,Zs=t=>typeof t=="number"||P.test(t);function Uu(t,e,n,s,i,r){i?(t.opacity=j(0,n.opacity??1,Wu(s)),t.opacityExit=j(e.opacity??1,0,_u(s))):r&&(t.opacity=j(e.opacity??1,n.opacity??1,s));for(let o=0;o<zu;o++){const a=Wn[o];let l=Js(e,a),c=Js(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Zs(l)===Zs(c)?(t[a]=Math.max(j(qs(l),qs(c),s),0),(ot.test(c)||ot.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,s))}function Js(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Wu=rr(0,.5,Zi),_u=rr(.5,.95,Z);function rr(t,e,n){return s=>s<t?0:s>e?1:n(Ft(t,e,s))}function $u(t,e,n){const s=W(t)?t:At(t);return s.start(Bn("",s,e,n)),s.animation}function zt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Ku=(t,e)=>t.depth-e.depth;class Hu{constructor(){this.children=[],this.isDirty=!1}add(e){An(this.children,e),this.isDirty=!0}remove(e){de(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ku),this.isDirty=!1,this.children.forEach(e)}}function Gu(t,e){const n=_.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(dt(s),t(r-e))};return L.setup(s,!0),()=>dt(s)}function ue(t){return W(t)?t.get():t}class Yu{constructor(){this.members=[]}add(e){An(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(de(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(de(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.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)}}const he={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fe=["","X","Y","Z"],Xu=1e3;let qu=0;function Ne(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ar(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ar(s)}function lr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=qu++,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,this.nodes.forEach(Qu),this.nodes.forEach(oh),this.nodes.forEach(rh),this.nodes.forEach(th)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Kn(o)&&!Jc(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=Gu(d,250),he.hasAnimatedSinceResize&&(he.hasAnimatedSinceResize=!1,this.nodes.forEach(ei)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||c.getDefaultTransition()||hh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),g=!this.targetLayout||!or(this.targetLayout,p),S=!h&&d;if(this.options.layoutRoot||this.resumeFrom||S||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Nn(f,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,S,b.path)}else h||ei(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dt(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(ah),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ar(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(nh),this.nodes.forEach(Qs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ti);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sh),this.nodes.forEach(ih),this.nodes.forEach(Zu),this.nodes.forEach(Ju)):this.nodes.forEach(ti),this.clearAllSnapshots();const a=_.now();U.delta=rt(0,1e3/60,a-U.timestamp),U.timestamp=a,U.isProcessing=!0,Ve.update.process(U),Ve.preRender.process(U),Ve.render.process(U),U.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_n.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(lh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$(this.snapshot.measuredBox.x)&&!$(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ir(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||pt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),dh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fh))){const{scroll:c}=this.root;c&&(it(a.x,c.offset.x),it(a.y,c.offset.y))}return a}removeElementScroll(o){const a=z();if(Q(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&Q(a,o),it(a.x,u.offset.x),it(a.y,u.offset.y))}return a}applyTransform(o,a=!1,l){const c=l||z();Q(c,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(it(c.x,-h.scroll.offset.x),it(c.y,-h.scroll.offset.y)),pt(h.latestValues)&&ce(c,h.latestValues,h.layout?.layoutBox)}return pt(this.latestValues)&&ce(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=z();Q(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!pt(c.latestValues))continue;let u;c.instance&&(pn(c.latestValues)&&c.updateSnapshot(),u=z(),Q(u,c.measurePageBox())),$s(a,c.latestValues,c.snapshot?.layoutBox,u)}return pt(this.latestValues)&&$s(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==U.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=U.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Q(this.target,this.layout.layoutBox),Ho(this.target,this.targetDelta)):Q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pn(this.parent.latestValues)||Ko(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),be(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===U.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;cu(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ns(this.prevProjectionDelta.x,this.projectionDelta.x),Ns(this.prevProjectionDelta.y,this.projectionDelta.y)),Ot(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Xs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pt(),this.projectionDelta=Pt(),this.projectionDeltaWithTransform=Pt()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},d=Pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=z(),f=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=f!==y,g=this.getStack(),S=!g||g.members.length<=1,b=!!(v&&!S&&this.options.crossfade===!0&&!this.path.some(uh));this.animationProgress=0;let T;const k=l?.interpolateProjection(o);this.mixTargetDelta=V=>{const M=V/1e3,C=k?.(M);C?(d.x.translate=C.x,d.x.scale=j(o.x.scale,1,M),d.x.origin=o.x.origin,d.x.originPoint=o.x.originPoint,d.y.translate=C.y,d.y.scale=j(o.y.scale,1,M),d.y.origin=o.y.origin,d.y.originPoint=o.y.originPoint):(ni(d.x,o.x,M),ni(d.y,o.y,M)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(be(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ch(this.relativeTarget,this.relativeTargetOrigin,p,M),T&&Nu(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=z()),Q(T,this.relativeTarget)),v&&(this.animationValues=h,Uu(h,u,this.latestValues,M,b,S)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{he.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=At(0)),this.motionValue.jump(0,!1),this.currentAnimation=$u(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&cr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||z();const h=$(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=$(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Q(a,l),ce(a,u),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Yu),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ne("z",o,c,this.animationValues);for(let u=0;u<Fe.length;u++)Ne(`rotate${Fe[u]}`,o,c,this.animationValues),Ne(`skew${Fe[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ue(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ue(a?.pointerEvents)||""),this.hasProjected&&!pt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Bu(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:p}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in yn){if(u[f]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:g}=yn[f],S=h==="none"?u[f]:y(u[f],c);if(v){const b=v.length;for(let T=0;T<b;T++)o[v[T]]=S}else g?this.options.visualElement.renderState.vars[f]=S:o[f]=S}this.options.layoutId&&(o.pointerEvents=c===this?ue(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Qs),this.root.sharedNodes.clear()}}}function Zu(t){t.updateLayout()}function Ju(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")st(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],d=$(h);h.min=n[u].min,h.max=h.min+d});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";vn(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else cr(i,e.layoutBox,n)&&st(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],d=$(n[u]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const o=Pt();Ot(o,n,e.layoutBox);const a=Pt();r?Ot(a,t.applyTransform(s,!0),e.measuredBox):Ot(a,n,e.layoutBox);const l=!ir(o);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:d}=u;if(h&&d){const p=t.options.layoutAnchor||void 0,f=z();be(f,e.layoutBox,h.layoutBox,p);const y=z();be(y,n,d.layoutBox,p),or(f,y)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=f,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Qu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function th(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eh(t){t.clearSnapshot()}function Qs(t){t.clearMeasurements()}function nh(t){t.isLayoutDirty=!0,t.updateLayout()}function ti(t){t.isLayoutDirty=!1}function sh(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ih(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ei(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oh(t){t.resolveTargetDelta()}function rh(t){t.calcProjection()}function ah(t){t.resetSkewAndRotation()}function lh(t){t.removeLeadSnapshot()}function ni(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function si(t,e,n,s){t.min=j(e.min,n.min,s),t.max=j(e.max,n.max,s)}function ch(t,e,n,s){si(t.x,e.x,n.x,s),si(t.y,e.y,n.y,s)}function uh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hh={duration:.45,ease:[.4,0,.1,1]},ii=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),oi=ii("applewebkit/")&&!ii("chrome/")?Math.round:Z;function ri(t){t.min=oi(t.min),t.max=oi(t.max)}function dh(t){ri(t.x),ri(t.y)}function cr(t,e,n){return t==="position"||t==="preserve-aspect"&&!ju(Ys(e),Ys(n),.2)}function fh(t){return t!==t.root&&t.scroll?.wasRoot}const mh=lr({attachResizeListener:(t,e)=>zt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Be={current:void 0},ur=lr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new mh({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),qn=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ai(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ph(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ai(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ai(t[i],null)}}}}function gh(...t){return x.useCallback(ph(...t),t)}class yh extends x.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(ie(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=ie(s)&&s.offsetWidth||0,r=ie(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function vh({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){const o=x.useId(),a=x.useRef(null),l=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=x.useContext(qn),u=t.props?.ref??t?.ref,h=gh(a,u);return x.useInsertionEffect(()=>{const{width:d,height:p,top:f,left:y,right:v,bottom:g,direction:S}=l.current;if(e||r===!1||!a.current||!d||!p)return;const b=S==="rtl",T=n==="left"?b?`right: ${v}`:`left: ${y}`:b?`left: ${y}`:`right: ${v}`,k=s==="bottom"?`bottom: ${g}`:`top: ${f}`;a.current.dataset.motionPopId=o;const V=document.createElement("style");c&&(V.nonce=c);const M=i??document.head;return M.appendChild(V),V.sheet&&V.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${o}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${d}px !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as w,t as b,r as L}from"./index-
|
|
1
|
+
import{R as w,t as b,r as L}from"./index-BM2o7PeV.js";const z=e=>{let n;const s=new Set,l=(u,a)=>{const f=typeof u=="function"?u(n):u;if(!Object.is(f,n)){const y=n;n=a??(typeof f!="object"||f===null)?f:Object.assign({},n,f),s.forEach(E=>E(n,y))}},t=()=>n,d={setState:l,getState:t,getInitialState:()=>c,subscribe:u=>(s.add(u),()=>s.delete(u))},c=n=e(l,t,d);return d},q=(e=>e?z(e):z),C=e=>e;function F(e,n=C){const s=w.useSyncExternalStore(e.subscribe,w.useCallback(()=>n(e.getState()),[e,n]),w.useCallback(()=>n(e.getInitialState()),[e,n]));return w.useDebugValue(s),s}const K=e=>{const n=q(e),s=l=>F(n,l);return Object.assign(s,n),s},k=(e=>e?K(e):K),I=[{id:"system.generic",labelKey:"ntf.event.system",defaultOn:!0},{id:"sync.error",labelKey:"ntf.event.syncError",defaultOn:!0},{id:"sync.done",labelKey:"ntf.event.syncDone",defaultOn:!0},{id:"sync.doneOnline",labelKey:"ntf.event.syncDoneOnline",defaultOn:!1},{id:"agent.done",labelKey:"ntf.event.agentDone",defaultOn:!0},{id:"inbox.message",labelKey:"ntf.event.inbox",defaultOn:!0},{id:"note.reminder",labelKey:"ntf.event.noteReminder",defaultOn:!0},{id:"harness.candidates",labelKey:"ntf.event.harnessCandidates",defaultOn:!0},{id:"memory.projectCandidates",labelKey:"ntf.event.projectCandidates",defaultOn:!0},{id:"memory.projectCompacted",labelKey:"ntf.event.projectCompacted",defaultOn:!0}];function R(e){const n=I.find(s=>s.id===e);return n?n.defaultOn:!0}const N=4,B={success:3200,info:5e3,warning:8e3,error:0},U=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?Math.min(e,12e4):void 0,D=e=>e.durationMs??B[e.level],T="forsion.ntf.prefs";function P(){try{const e=localStorage.getItem(T);if(e)return{enabled:!0,osEnabled:!0,events:{},...JSON.parse(e)}}catch{}return{enabled:!0,osEnabled:!0,events:{}}}function M(e){try{localStorage.setItem(T,JSON.stringify(e))}catch{}}function V(e){return typeof window>"u"||!window.tangu?.mobile||!/Failed to fetch/i.test(e)?e:e.replace(/(?:TypeError:\s*)?Failed to fetch/gi,b("net.unavailable"))}const m=new Map;function O(e){const n=m.get(e);n?.handle&&clearTimeout(n.handle),m.delete(e)}let Y=0;const J=k((e,n)=>{const s=(t,o)=>{if(O(t),!(o<=0)){if(n().paused){m.set(t,{handle:null,deadline:0,remaining:o});return}m.set(t,{handle:setTimeout(()=>n().dismiss(t),o),deadline:Date.now()+o,remaining:0})}},l=t=>{try{t?.onClose?.()}catch{}};return{items:[],queue:[],prefs:P(),paused:!1,notify:t=>{const o=t.level&&["info","success","warning","error"].includes(t.level)?t.level:"info",i=t.event??"system.generic",d=n();if(!t.force&&!t.receipt&&(!d.prefs.enabled||!(d.prefs.events[i]??R(i))))return null;const c=t.sticky??o==="error",u=U(t.durationMs),a=V(String(t.text??"")).slice(0,500),f=t.title?String(t.title).slice(0,120):void 0;if(t.dedupeKey){const r=d.items.find(h=>h.dedupeKey===t.dedupeKey)||d.queue.find(h=>h.dedupeKey===t.dedupeKey);if(r){const h=d.items.some(p=>p.id===r.id),g={...r,text:a,title:f??r.title,level:o,count:r.count+1,createdAt:Date.now(),sticky:c||r.sticky,action:t.action??r.action,durationMs:u??r.durationMs,onClose:t.onClose??r.onClose};return e(p=>({items:p.items.map(v=>v.id===r.id?g:v),queue:p.queue.map(v=>v.id===r.id?g:v)})),h&&(g.sticky?O(r.id):s(r.id,D(g))),r.id}}const y={id:`ntf-${++Y}-${Date.now()}`,text:a,title:f,level:o,event:i,sourceLabel:t.sourceLabel,createdAt:Date.now(),sticky:c,count:1,dedupeKey:t.dedupeKey,action:t.action,durationMs:u,onClose:t.onClose},E=typeof document<"u"&&(!document.hasFocus()||document.visibilityState==="hidden");if(!t.inAppOnly&&!t.receipt&&d.prefs.osEnabled&&E){const r=f||t.sourceLabel||"Forsion";try{window.tangu?.notify?.(r,a,{event:i})}catch{}}return d.items.length<N?(e(r=>({items:[...r.items,y]})),c||s(y.id,D(y))):e(r=>({queue:[...r.queue,y]})),y.id},dismiss:t=>{O(t);const o=n(),i=o.items.find(a=>a.id===t)||o.queue.find(a=>a.id===t);let d=o.items.filter(a=>a.id!==t),c=o.queue.filter(a=>a.id!==t);if(d.length===o.items.length&&c.length===o.queue.length)return;const u=[];for(;d.length<N&&c.length;){const a=c[0];c=c.slice(1),d=[...d,a],u.push(a)}e({items:d,queue:c});for(const a of u)a.sticky||s(a.id,D(a));l(i)},dismissAll:()=>{for(const i of[...m.keys()])O(i);const{items:t,queue:o}=n();e({items:[],queue:[]});for(const i of[...t,...o])l(i)},setEnabled:t=>{const o={...n().prefs,enabled:t};e({prefs:o}),M(o)},setOsEnabled:t=>{const o={...n().prefs,osEnabled:t};e({prefs:o}),M(o)},setEventOn:(t,o)=>{const i={...n().prefs,events:{...n().prefs.events,[t]:o}};e({prefs:i}),M(i)},pause:()=>{if(!n().paused){e({paused:!0});for(const[t,o]of m)o.handle&&(clearTimeout(o.handle),m.set(t,{handle:null,deadline:0,remaining:Math.max(800,o.deadline-Date.now())}))}},resume:()=>{if(n().paused){e({paused:!1});for(const[t,o]of m)if(!o.handle){const i=o.remaining||1500;m.set(t,{handle:setTimeout(()=>n().dismiss(t),i),deadline:Date.now()+i,remaining:0})}}}}}),W=e=>J.getState().notify(e),S=50*1024*1024;L({"nativedl.saved":{zh:"已保存到「下载」:{name}",en:"Saved to Downloads: {name}"},"nativedl.tooLarge":{zh:"文件太大({size} MB),手机上一次最多保存 {max} MB",en:"File is too large ({size} MB); the phone can save up to {max} MB at a time"},"nativedl.unsupportedOs":{zh:"保存到「下载」需要 Android 10 及以上",en:"Saving to Downloads requires Android 10 or later"},"nativedl.failed":{zh:"保存到「下载」失败:{err}",en:"Could not save to Downloads: {err}"},"hostdl.failed":{zh:"下载失败({status})",en:"Download failed ({status})"},"hostdl.tooLarge":{zh:"文件太大({size} MB),远程下载一次最多 {max} MB",en:"File is too large ({size} MB); remote downloads are limited to {max} MB"},"hostdl.unsupported":{zh:"那台电脑上的 Forsion 版本还不支持远程下载文件",en:"Forsion on that computer does not support remote file downloads yet"}});function _(){return(typeof window<"u"?window.tangu?.saveDownload:void 0)??null}const x=e=>(e/1024/1024).toFixed(1);function j(e){return Object.assign(new Error(b("nativedl.tooLarge",{size:x(e),max:String(S/1024/1024)})),{code:"too_large"})}function X(e){const n=e?.code;if(n==="unsupported_os")return Object.assign(new Error(b("nativedl.unsupportedOs")),{code:n});const s=String(e?.message||e||"");return Object.assign(new Error(b("nativedl.failed",{err:s})),{code:typeof n=="string"?n:void 0})}async function A(e,n,s){const l=Number(s.headers.get("content-length"));if(Number.isFinite(l)&&l>S){try{await s.body?.cancel()}catch{}throw j(l)}const t=await s.blob();if(t.size>S)throw j(t.size);let o;try{o=(await e(n,t.type||"",t)).name||n}catch(i){throw i?.code==="too_large"?j(t.size):X(i)}return W({text:b("nativedl.saved",{name:o}),level:"info",inAppOnly:!0}),o}async function $(e,n){const s=_();if(s){await A(s,e,n);return}const l=await n.blob(),t=document.createElement("a");t.href=URL.createObjectURL(l),t.download=e,t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),5e3)}async function G(e){let n={};try{n=await e.json()}catch{}return e.status===413&&n.code==="HOST_DOWNLOAD_TOO_LARGE"?Object.assign(new Error(b("hostdl.tooLarge",{size:x(Number(n.size)||0),max:String(Math.round((Number(n.limit)||0)/1024/1024))})),{status:413,code:"too_large"}):e.status===501?Object.assign(new Error(b("hostdl.unsupported")),{status:501}):Object.assign(new Error(b("hostdl.failed",{status:e.status})),{status:e.status})}const Q=Object.freeze(Object.defineProperty({__proto__:null,NATIVE_DOWNLOAD_MAX_BYTES:S,hostDownloadError:G,nativeSaveDownload:_,saveResponseAs:$,saveResponseNative:A},Symbol.toStringTag,{value:"Module"}));export{I as N,F as a,Q as b,k as c,R as e,G as h,W as n,$ as s,J as u};
|