import{r as c,F as z,c$ as q,d3 as A,j as B,dt as D,du as G,dv as x}from"./index-e6164346.js";const H={entering:{transform:"none"},entered:{transform:"none"}},J=c.forwardRef(function(h,p){const e=z(),g={enter:e.transitions.duration.enteringScreen,exit:e.transitions.duration.leavingScreen},{addEndListener:l,appear:R=!0,children:s,easing:f,in:E,onEnter:m,onEntered:y,onEntering:T,onExit:u,onExited:w,onExiting:P,style:a,timeout:d=g,TransitionComponent:Z=D,...j}=h,i=c.useRef(null),v=q(i,A(s),p),o=n=>t=>{if(n){const r=i.current;t===void 0?n(r):n(r,t)}},L=o(T),k=o((n,t)=>{G(n);const r=x({style:a,timeout:d,easing:f},{mode:"enter"});n.style.webkitTransition=e.transitions.create("transform",r),n.style.transition=e.transitions.create("transform",r),m&&m(n,t)}),C=o(y),F=o(P),S=o(n=>{const t=x({style:a,timeout:d,easing:f},{mode:"exit"});n.style.webkitTransition=e.transitions.create("transform",t),n.style.transition=e.transitions.create("transform",t),u&&u(n)}),$=o(w),b=n=>{l&&l(i.current,n)};return B.jsx(Z,{appear:R,in:E,nodeRef:i,onEnter:k,onEntered:C,onEntering:L,onExit:S,onExited:$,onExiting:F,addEndListener:b,timeout:d,...j,children:(n,t)=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...H[n],...a,...s.props.style},ref:v,...t})})}),N=J;export{N as Z};
