import{linear as r}from"./index.js";var n=function(r,n){return 1-3*n+3*r},t=function(r,n){return 3*n-6*r},u=function(r){return 3*r},o=function(r,o,e){return((n(o,e)*r+t(o,e))*r+u(o))*r},e=function(r,o,e){return 3*n(o,e)*r*r+2*t(o,e)*r+u(o)};function f(n,t,u,f){if(n===t&&u===f)return r;for(var i=new Float32Array(11),a=0;a<11;++a)i[a]=o(.1*a,n,u);function c(r){for(var t=0,f=1;10!==f&&i[f]<=r;++f)t+=.1;--f;var a=t+.1*((r-i[f])/(i[f+1]-i[f])),c=e(a,n,u);return c>=.001?function(r,n,t,u){for(var f=0;f<8;++f){var i=e(n,t,u);if(0===i)return n;n-=(o(n,t,u)-r)/i}return n}(r,a,n,u):0===c?a:function(r,n,t,u,e){var f,i,a=0;do{(f=o(i=n+(t-n)/2,u,e)-r)>0?t=i:n=i}while(Math.abs(f)>1e-7&&++a<10);return i}(r,t,t+.1,n,u)}return function(r){return 0===r||1===r?r:o(c(r),t,f)}}export{f as cubicBezier};
//# sourceMappingURL=cubic-bezier.js.map
