class a{constructor(e){let{x:r,y:s,width:i,height:n}=e;this.x=r,this.y=s,this.width=i,this.height=n}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function x(t,e){return{x:{before:Math.max(0,e.left-t.left),after:Math.max(0,t.right-e.right)},y:{before:Math.max(0,e.top-t.top),after:Math.max(0,t.bottom-e.bottom)}}}function m(t){return Array.isArray(t)?new a({x:t[0],y:t[1],width:0,height:0}):t.getBoundingClientRect()}function y(t){const e=t.getBoundingClientRect(),r=getComputedStyle(t),s=r.transform;if(s){let i,n,o,h,c;if(s.startsWith("matrix3d("))i=s.slice(9,-1).split(/, /),n=+i[0],o=+i[5],h=+i[12],c=+i[13];else if(s.startsWith("matrix("))i=s.slice(7,-1).split(/, /),n=+i[0],o=+i[3],h=+i[4],c=+i[5];else return new a(e);const f=r.transformOrigin,d=e.x-h-(1-n)*parseFloat(f),u=e.y-c-(1-o)*parseFloat(f.slice(f.indexOf(" ")+1)),l=n?e.width/n:t.offsetWidth+1,g=o?e.height/o:t.offsetHeight+1;return new a({x:d,y:u,width:l,height:g})}else return new a(e)}function w(t,e,r){if(typeof t.animate>"u")return{finished:Promise.resolve()};let s;try{s=t.animate(e,r)}catch{return{finished:Promise.resolve()}}return typeof s.finished>"u"&&(s.finished=new Promise(i=>{s.onfinish=()=>{i(s)}})),s}const p="cubic-bezier(0.4, 0, 0.2, 1)",b="cubic-bezier(0.0, 0, 0.2, 1)",B="cubic-bezier(0.4, 0, 1, 1)";export{a as B,w as a,B as b,x as c,b as d,m as g,y as n,p as s};
