function s(s,t){-1===s.indexOf(t)&&s.push(t)}function t(s,t){const n=s.indexOf(t);n>-1&&s.splice(n,1)}const n=(s,t,n)=>n>t?t:n<s?s:n;let e=()=>{};const i={},r=s=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(s);function a(s){return"object"==typeof s&&null!==s}const c=s=>/^0[^.\s]+$/u.test(s);function o(s){let t;return()=>(void 0===t&&(t=s()),t)}const u=s=>s,f=(s,t)=>n=>t(s(n)),h=(...s)=>s.reduce(f),p=(s,t,n)=>{const e=t-s;return 0===e?1:(n-s)/e};class l{constructor(){this.subscriptions=[]}add(n){return s(this.subscriptions,n),()=>t(this.subscriptions,n)}notify(s,t,n){const e=this.subscriptions.length;if(e)if(1===e)this.subscriptions[0](s,t,n);else for(let i=0;i<e;i++){const e=this.subscriptions[i];e&&e(s,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const b=s=>1e3*s,d=s=>s/1e3;function y(s,t){return t?s*(1e3/t):0}const O=(s,t,n)=>(((1-3*n+3*t)*s+(3*n-6*t))*s+3*t)*s;function g(s,t,n,e){if(s===t&&n===e)return u;const i=t=>function(s,t,n,e,i){let r,a,c=0;do{a=t+(n-t)/2,r=O(a,e,i)-s,r>0?n=a:t=a}while(Math.abs(r)>1e-7&&++c<12);return a}(t,0,1,s,n);return s=>0===s||1===s?s:O(i(s),t,e)}const I=s=>t=>t<=.5?s(2*t)/2:(2-s(2*(1-t)))/2,M=s=>t=>1-s(1-t),k=g(.33,1.53,.69,.99),A=M(k),m=I(A),x=s=>(s*=2)<1?.5*A(s):.5*(2-Math.pow(2,-10*(s-1))),j=s=>1-Math.sin(Math.acos(s)),v=M(j),w=I(j),S=g(.42,0,1,1),$=g(0,0,.58,1),q=g(.42,0,.58,1),z=s=>Array.isArray(s)&&"number"!=typeof s[0],B=s=>Array.isArray(s)&&"number"==typeof s[0],C={linear:u,easeIn:S,easeInOut:q,easeOut:$,circIn:j,circInOut:w,circOut:v,backIn:A,backInOut:m,backOut:k,anticipate:x},D=s=>{if(B(s)){s.length;const[t,n,e,i]=s;return g(t,n,e,i)}return"string"==typeof s?C[s]:s};export{i as M,l as S,c as a,p as b,n as c,s as d,v as e,e as f,z as g,D as h,r as i,q as j,o as k,B as l,d as m,u as n,w as o,h as p,m as q,t as r,b as s,x as t,a as u,y as v};
