((n,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()})(this,function(){var u={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},M={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},j=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],l={CSS:{},springs:{}};function C(n,e,t){return Math.min(Math.max(n,e),t)}function c(n,e){return-1{for(var e=0,t=1;10!==t&&x[t]<=n;++t)e+=.1;var r=e+(n-x[--t])/(x[t+1]-x[t])*.1,a=O(r,b,M);if(.001<=a){for(var o=n,i=r,u=b,s=M,c=0;c<4;++c){var f=O(i,u,s);if(0===f)return i;i-=(k(i,u,s)-o)/f}return i}if(0===a)return r;for(var l,d,p=n,h=e,g=e+.1,m=b,v=M,y=0;0<(l=k(d=h+(g-h)/2,m,v)-p)?g=d:h=d,1e-7{for(var n=e.parentNode;w.svg(n)&&w.svg(n.parentNode);)n=n.parentNode;return n})(),r=t.getBoundingClientRect(),a=v(t,"viewBox"),o=r.width,r=r.height,n=n.viewBox||(a?a.split(" "):[0,0,o,r]);return{el:t,viewBox:n,x:+n[0],y:+n[1],w:o,h:r,vW:n[2],vH:n[3]}}function G(n,e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=W(w.pth(n)?n.totalLength:n,e)+"";return{original:r,numbers:r.match(t)?r.match(t).map(Number):[0],strings:w.str(n)||e?r.split(t):[]}}function A(n){return I(n?f(w.arr(n)?n.map(p):p(n)):[],function(n,e,t){return t.indexOf(n)===e})}function Q(n){var t=A(n);return t.map(function(n,e){return{target:n,id:e,total:t.length,transforms:{list:$(n)}}})}function z(n,e){var t,r=[],a=e.keyframes;for(t in e=a?D((e=>{for(var t=I(f(e.map(function(n){return Object.keys(n)})),function(n){return w.key(n)}).reduce(function(n,e){return n.indexOf(e)<0&&n.push(e),n},[]),a={},n=0;n{var r=t[n];a[r]=e.map(function(n){var e,t={};for(e in n)w.key(e)?e==r&&(t.value=n[e]):t[e]=n[e];return t})})(n);return a})(a),e):e)w.key(t)&&r.push({name:t,tweens:((n,t)=>{var e,r=g(t),a=(/^spring/.test(r.easing)&&(r.duration=i(r.easing)),w.arr(n)&&(2!==(e=n.length)||w.obj(n[0])?w.fnc(t.duration)||(r.duration=t.duration/e):n={value:n}),w.arr(n)?n:[n]);return a.map(function(n,e){n=w.obj(n)&&!w.pth(n)?n:{value:n};return w.und(n.delay)&&(n.delay=e?0:t.delay),w.und(n.endDelay)&&(n.endDelay=e===a.length-1?t.endDelay:0),n}).map(function(n){return D(n,r)})})(e[t],n)});return r}function _(u,s){var c;return u.tweens.map(function(n){var n=((n,e)=>{var t,r={};for(t in n){var a=m(n[t],e);w.arr(a)&&1===(a=a.map(function(n){return m(n,e)})).length&&(a=a[0]),r[t]=a}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r})(n,s),e=n.value,t=w.arr(e)?e[1]:e,r=B(t),a=T(s.target,u.name,r,s),o=c?c.to.original:a,i=w.arr(e)?e[0]:o,a=B(i)||B(a),r=r||a;return w.und(t)&&(t=o),n.from=G(i,r),n.to=G(E(t,i),r),n.start=c?c.end:0,n.end=n.start+n.delay+n.duration+n.endDelay,n.easing=P(n.easing,n.duration),n.isPath=w.pth(e),n.isPathTargetInsideSVG=n.isPath&&w.svg(s.target),n.isColor=w.col(n.from.original),n.isColor&&(n.round=1),c=n})}var R={css:function(n,e,t){return n.style[e]=t},attribute:function(n,e,t){return n.setAttribute(e,t)},object:function(n,e,t){return n[e]=t},transform:function(n,e,t,r,a){var o;r.list.set(e,t),e!==r.last&&!a||(o="",r.list.forEach(function(n,e){o+=e+"("+n+") "}),n.style.transform=o)}};function J(n,i){Q(n).forEach(function(n){for(var e in i){var t=m(i[e],n),r=n.target,a=B(t),o=T(r,e,a,n),t=E(W(t,a||B(o)),o),a=b(r,e);R[a](r,e,t,n.transforms,!0)}})}function K(n,e){return I(f(n.map(function(o){return e.map(function(n){var e,t,r=o,a=b(r.target,n.name);if(a)return t=(e=_(n,r))[e.length-1],{type:a,property:n.name,animatable:r,tweens:e,duration:t.end,delay:e[0].delay,endDelay:t.endDelay}})})),function(n){return!w.und(n)})}function U(n,e){function t(n){return n.timelineOffset||0}var r=n.length,a={};return a.duration=r?Math.max.apply(Math,n.map(function(n){return t(n)+n.duration})):e.duration,a.delay=r?Math.min.apply(Math,n.map(function(n){return t(n)+n.delay})):e.delay,a.endDelay=r?a.duration-Math.max.apply(Math,n.map(function(n){return t(n)+n.duration-n.endDelay})):e.endDelay,a}var N,nn=0,S=[],en=("undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){L.suspendWhenDocumentHidden&&(n()?N=cancelAnimationFrame(N):(S.forEach(function(n){return n._onDocumentVisibility()}),en()))}),function(){!(N||n()&&L.suspendWhenDocumentHidden)&&0{function r(n){return e.el.getPointAtLength(1<=t+(n=void 0===n?0:n)?t+n:0)}var a=Z(e.el,e.svg),o=r(),i=r(-1),u=r(1),s=n?1:a.w/a.vW,c=n?1:a.h/a.vH;switch(e.property){case"x":return(o.x-a.x)*s;case"y":return(o.y-a.y)*c;case"angle":return 180*Math.atan2(u.y-i.y,u.x-i.x)/Math.PI}})(s.value,c*v,s.isPathTargetInsideSVG):y+c*(v-y);!l||s.isColor&&2