import{interpolate as n}from"../../utils/interpolate.js";import{easeInOut as r}from"../../easing/index.js";function t(n,t){return n.map((function(){return t||r})).splice(0,n.length-1)}function e(n){var r=n.length;return n.map((function(n,t){return 0!==t?t/(r-1):0}))}function o(n,r){return n.map((function(n){return n*r}))}function i(r){var i=r.from,u=void 0===i?0:i,a=r.to,f=void 0===a?1:a,c=r.ease,s=r.offset,l=r.duration,p=void 0===l?300:l,v={done:!1,value:u},m=Array.isArray(f)?f:[u,f],d=o(s&&s.length===m.length?s:e(m),p);function g(){return n(d,m,{ease:Array.isArray(c)?c:t(m,c)})}var h=g();return{next:function(n){return v.value=h(n),v.done=n>=p,v},flipTarget:function(){m.reverse(),h=g()}}}export{o as convertOffsetToTimes,t as defaultEasing,e as defaultOffset,i as keyframes};
//# sourceMappingURL=keyframes.js.map
