import{g,cE as p,bc as v,a1 as b,cn as x,p as w}from"#entry";const S=w({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function s(o,n,l){return g()({name:o,props:S({mode:l,origin:n}),setup(i,t){let{slots:a}=t;const r={onBeforeEnter(e){i.origin&&(e.style.transformOrigin=i.origin)},onLeave(e){if(i.leaveAbsolute){const{offsetTop:d,offsetLeft:f,offsetWidth:h,offsetHeight:y}=e;e._transitionInitialStyles={position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height},e.style.position="absolute",e.style.top=`${d}px`,e.style.left=`${f}px`,e.style.width=`${h}px`,e.style.height=`${y}px`}i.hideOnLeave&&e.style.setProperty("display","none","important")},onAfterLeave(e){if(i.leaveAbsolute&&e?._transitionInitialStyles){const{position:d,top:f,left:h,width:y,height:m}=e._transitionInitialStyles;delete e._transitionInitialStyles,e.style.position=d||"",e.style.top=f||"",e.style.left=h||"",e.style.width=y||"",e.style.height=m||""}}};return()=>{const e=i.group?p:v;return b(e,{name:i.disabled?"":o,css:!i.disabled,...i.group?void 0:{mode:i.mode},...i.disabled?{}:r},a.default)}}})}function u(o,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return g()({name:o,props:{mode:{type:String,default:l},disabled:{type:Boolean,default:x()},group:Boolean,hideOnLeave:Boolean},setup(i,t){let{slots:a}=t;const r=i.group?p:v;return()=>b(r,{name:i.disabled?"":o,css:!i.disabled,...i.disabled?{}:{...n,onLeave:e=>{i.hideOnLeave?e.style.setProperty("display","none","important"):n.onLeave?.(e)}}},a.default)}})}function c(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(t){t._parent=t.parentNode,t._initialStyle={transition:t.style.transition,overflow:t.style.overflow,width:t.style.width,height:t.style.height}},onEnter(t){const a=t._initialStyle;if(!a)return;t.style.setProperty("transition","none","important"),t.style.overflow="hidden";const r=`${t.offsetWidth}px`,e=`${t.offsetHeight}px`;["x","both"].includes(n)&&(t.style.width="0"),["y","both"].includes(n)&&(t.style.height="0"),t.offsetHeight,t.style.transition=a.transition,o&&t._parent&&t._parent.classList.add(o),requestAnimationFrame(()=>{["x","both"].includes(n)&&(t.style.width=r),["y","both"].includes(n)&&(t.style.height=e)})},onAfterEnter:i,onEnterCancelled:i,onLeave(t){t._initialStyle={transition:"",overflow:t.style.overflow,width:t.style.width,height:t.style.height},t.style.overflow="hidden",["x","both"].includes(n)&&(t.style.width=`${t.offsetWidth}px`),["y","both"].includes(n)&&(t.style.height=`${t.offsetHeight}px`),t.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(n)&&(t.style.width="0"),["y","both"].includes(n)&&(t.style.height="0")})},onAfterLeave:l,onLeaveCancelled:l};function l(t){o&&t._parent&&t._parent.classList.remove(o),i(t)}function i(t){if(!t._initialStyle)return;const{width:a,height:r}=t._initialStyle;t.style.overflow=t._initialStyle.overflow,a!=null&&["x","both"].includes(n)&&(t.style.width=a),r!=null&&["y","both"].includes(n)&&(t.style.height=r),delete t._initialStyle}}s("fab-transition","center center","out-in");s("dialog-bottom-transition");s("dialog-top-transition");const L=s("fade-transition"),T=s("scale-transition");s("scroll-x-transition");const E=s("scroll-x-reverse-transition");s("scroll-y-transition");s("scroll-y-reverse-transition");s("slide-x-transition");s("slide-x-reverse-transition");const B=s("slide-y-transition");s("slide-y-reverse-transition");const A=u("expand-transition",c()),$=u("expand-x-transition",c("","x"));u("expand-both-transition",c("","both"));export{T as V,E as a,L as b,$ as c,A as d,B as e};
