import{_ as B,b as E}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as c}from"./index-NdkWRN8K.js";import{T as J,u as M,g as A,r as N}from"./utils-kUZVaD1e.js";import{j as O}from"./jsx-runtime-CnH95YSl.js";import{a as Q,u as U}from"./useIsFocusVisible-DH0qxT5e.js";import{g as V}from"./getReactElementRef-DsIevm5t.js";const X=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h(l){return`scale(${l}, ${l**2})`}const Y={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},p=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Z=c.forwardRef(function(x,L){const{addEndListener:y,appear:_=!0,children:m,easing:T,in:R,onEnter:j,onEntered:w,onEntering:D,onExit:v,onExited:H,onExiting:b,style:f,timeout:o="auto",TransitionComponent:C=J}=x,F=B(x,X),G=Q(),g=c.useRef(),r=M(),u=c.useRef(null),P=U(u,V(m),L),s=t=>e=>{if(t){const i=u.current;e===void 0?t(i):t(i,e)}},S=s(D),W=s((t,e)=>{N(t);const{duration:i,delay:d,easing:n}=A({style:f,timeout:o,easing:T},{mode:"enter"});let a;o==="auto"?(a=r.transitions.getAutoHeightDuration(t.clientHeight),g.current=a):a=i,t.style.transition=[r.transitions.create("opacity",{duration:a,delay:d}),r.transitions.create("transform",{duration:p?a:a*.666,delay:d,easing:n})].join(","),j&&j(t,e)}),$=s(w),z=s(b),K=s(t=>{const{duration:e,delay:i,easing:d}=A({style:f,timeout:o,easing:T},{mode:"exit"});let n;o==="auto"?(n=r.transitions.getAutoHeightDuration(t.clientHeight),g.current=n):n=e,t.style.transition=[r.transitions.create("opacity",{duration:n,delay:i}),r.transitions.create("transform",{duration:p?n:n*.666,delay:p?i:i||n*.333,easing:d})].join(","),t.style.opacity=0,t.style.transform=h(.75),v&&v(t)}),k=s(H),q=t=>{o==="auto"&&G.start(g.current||0,t),y&&y(u.current,t)};return O.jsx(C,E({appear:_,in:R,nodeRef:u,onEnter:W,onEntered:$,onEntering:S,onExit:K,onExited:k,onExiting:z,addEndListener:q,timeout:o==="auto"?null:o},F,{children:(t,e)=>c.cloneElement(m,E({style:E({opacity:0,transform:h(.75),visibility:t==="exited"&&!R?"hidden":void 0},Y[t],f,m.props.style),ref:P},e))}))});Z.muiSupportAuto=!0;export{Z as G};
