import{N as t,_ as e,_t as n,g as r,l as o,lt as i,yt as a}from"./render-cqdoDfd9.js";import{a as s,o as l,r as d}from"./Paper-DtiadJnq.js";import{a as u,i as c,n as p,t as f}from"./utils-8Bj6112o.js";function g(t){const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1,...a}=t,u=i?{}:s(r,o),{props:c,internalRef:p}=d({...a,externalSlotProps:u}),f=e(p,u?.ref,t.additionalProps?.ref);return l(n,{...c,ref:f},o)}var y=a(n()),m=i();function E(t){return`scale(${t}, ${t**2})`}var x={entering:{opacity:1,transform:E(1)},entered:{opacity:1,transform:"none"}},v="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),h=y.forwardRef(function(e,n){const{addEndListener:i,appear:a=!0,children:s,easing:l,in:d,onEnter:g,onEntered:h,onEntering:j,onExit:R,onExited:S,onExiting:A,style:P,timeout:H="auto",TransitionComponent:w=u,..._}=e,b=o(),D=y.useRef(),L=t(),T=y.useRef(null),$=r(T,c(s),n),k=t=>e=>{if(t){const n=T.current;void 0===e?t(n):t(n,e)}},C=k(j),N=k((t,e)=>{p(t);const{duration:n,delay:r,easing:o}=f({style:P,timeout:H,easing:l},{mode:"enter"});let i;"auto"===H?(i=L.transitions.getAutoHeightDuration(t.clientHeight),D.current=i):i=n,t.style.transition=[L.transitions.create("opacity",{duration:i,delay:r}),L.transitions.create("transform",{duration:v?i:.666*i,delay:r,easing:o})].join(","),g&&g(t,e)}),q=k(h),z=k(A),B=k(t=>{const{duration:e,delay:n,easing:r}=f({style:P,timeout:H,easing:l},{mode:"exit"});let o;"auto"===H?(o=L.transitions.getAutoHeightDuration(t.clientHeight),D.current=o):o=e,t.style.transition=[L.transitions.create("opacity",{duration:o,delay:n}),L.transitions.create("transform",{duration:v?o:.666*o,delay:v?n:n||.333*o,easing:r})].join(","),t.style.opacity=0,t.style.transform=E(.75),R&&R(t)}),F=k(S);return(0,m.jsx)(w,{appear:a,in:d,nodeRef:T,onEnter:N,onEntered:q,onEntering:C,onExit:B,onExited:F,onExiting:z,addEndListener:t=>{"auto"===H&&b.start(D.current||0,t),i&&i(T.current,t)},timeout:"auto"===H?null:H,..._,children:(t,{ownerState:e,...n})=>y.cloneElement(s,{style:{opacity:0,transform:E(.75),visibility:"exited"!==t||d?void 0:"hidden",...x[t],...P,...s.props.style},ref:$,...n})})});h&&(h.muiSupportAuto=!0);export{g as n,h as t};