(()=>{"use strict";function t(t,e,n){const a=Math.max(e-5,0);return r=n-t(a),(o=e-a)?r*(1e3/o):0;var r,o}const e=t=>t,n=t=>"string"==typeof t,a=["","X","Y","Z"],r={x:"translateX",y:"translateY",z:"translateZ"},o={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},s={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:o,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:e},skew:o},i=new Map,c=t=>`--motion-${t}`,u=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{a.forEach((e=>{u.push(t+e),i.set(c(t+e),s[t])}))}));const l=new Set(u);function h(t){return(t=>"number"==typeof t)(t)&&!isNaN(t)}function f(t){return n(t)?parseFloat(t):t}const g=function(a){const o=new WeakMap;return(a={})=>{const s=new Map,u=(e=0,n=100,r=0,o=!1)=>{const i=`${e}-${n}-${r}-${o}`;return s.has(i)||s.set(i,(({stiffness:e=100,damping:n=10,mass:a=1,from:r=0,to:o=1,velocity:s=0,restSpeed:i,restDistance:c}={})=>{s=s?(u=s,u/1e3):0;var u;const l={done:!1,hasReachedTarget:!1,current:r,target:o},h=o-r,f=Math.sqrt(e/a)/1e3,g=((t=100,e=10,n=1)=>e/(2*Math.sqrt(t*n)))(e,n,a),d=Math.abs(h)<5;let p;if(i||(i=d?.01:2),c||(c=d?.005:.5),g<1){const t=f*Math.sqrt(1-g*g);p=e=>o-Math.exp(-g*f*e)*((g*f*h-s)/t*Math.sin(t*e)+h*Math.cos(t*e))}else p=t=>o-Math.exp(-f*t)*(h+(f*h-s)*t);return e=>{l.current=p(e);const n=0===e?s:t(p,e,l.current),a=Math.abs(n)<=i,u=Math.abs(o-l.current)<=c;var h,f,g;return l.done=a&&u,l.hasReachedTarget=(h=r,f=o,g=l.current,h<f&&g>=f||h>f&&g<=f),l}})(Object.assign({from:e,to:n,velocity:r},a))),s.get(i)},g=(t,n)=>(o.has(t)||o.set(t,function(t,n=e){let a,r=10,o=t(0);const s=[n(o.current)];for(;!o.done&&r<1e4;)o=t(r),s.push(n(o.done?o.target:o.current)),void 0===a&&o.hasReachedTarget&&(a=r),r+=10;const i=r-10;return 1===s.length&&s.push(o.current),{keyframes:s,duration:i/1e3,overshootDuration:(null!=a?a:i)/1e3}}(t,n)),o.get(t));return{createAnimation:(a,o=!0,s,d,p)=>{let m,v,M,w=0,x=e;const y=a.length;if(o)if(x=function(t,a){var r;let o=(null==a?void 0:a.toDefaultUnit)||e;const s=t[t.length-1];if(n(s)){const t=(null===(r=s.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";t&&(o=e=>e+t)}return o}(a,d?i.get((r[b=d]&&(b=r[b]),(t=>l.has(t))(b)?c(b):b)):void 0),M=f(a[y-1]),y>1&&null!==a[0])v=f(a[0]);else{const e=null==p?void 0:p.generator;if(e){const{animation:n,generatorStartTime:a}=p,r=(null==n?void 0:n.startTime)||a||0,o=(null==n?void 0:n.currentTime)||performance.now()-r,s=e(o).current;v=s,w=t((t=>e(t).current),o,s)}else s&&(v=f(s()))}var b;if(h(v)&&h(M)){const t=u(v,M,w,null==d?void 0:d.includes("scale"));m=Object.assign(Object.assign({},g(t,x)),{easing:"linear"}),p&&(p.generator=t,p.generatorStartTime=performance.now())}return m||(m={easing:"ease",duration:g(u(0,100)).overshootDuration}),m}}}}();window.GSPBMotionSpring=g})();