/*
 * anime.js v3.1.5
 * (c) 2021 Julian Garnier
 * Released under the MIT license
 * animejs.com
 */

!function(t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var d={},v={duration:1e3,round:0},n=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],s={CSS:{}};function I(t,r,n){return Math.min(Math.max(t,r),n)}function i(t,r){return-1<t.indexOf(r)}var p={arr:function(t){return Array.isArray(t)},obj:function(t){return i(Object.prototype.toString.call(t),"Object")},pth:function(t){return p.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||p.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return p.hex(t)||p.rgb(t)||p.hsl(t)},key:function(t){return!d.hasOwnProperty(t)&&!v.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}},t={linear:function(){return function(t){return t}}};function M(t,r){for(var n=t.length,e=2<=arguments.length?r:void 0,a=[],o=0;o<n;o++)if(o in t){var u=t[o];r.call(e,u,o,t)&&a.push(u)}return a}function e(t){return t.reduce(function(t,r){return t.concat(p.arr(r)?e(r):r)},[])}function a(t){return p.arr(t)?t:(p.str(t)&&(t=function(t){try{return document.querySelectorAll(t)}catch(t){return}}(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function c(t,r){return t.some(function(t){return t===r})}function o(t){var r={};for(var n in t)r[n]=t[n];return r}function g(t,r){var n=o(t);for(var e in t)n[e]=r.hasOwnProperty(e)?r[e]:t[e];return n}function m(t,r){var n=o(t);for(var e in r)n[e]=p.und(t[e])?r[e]:t[e];return n}function u(t){return p.rgb(t)?(n=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(r=t))?"rgba("+n[1]+",1)":r:p.hex(t)?(e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,r,n,e){return r+r+n+n+e+e}),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),"rgba("+parseInt(a[1],16)+","+parseInt(a[2],16)+","+parseInt(a[3],16)+",1)"):p.hsl(t)?function(t){var r,n,e,a=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),o=parseInt(a[1],10)/360,u=parseInt(a[2],10)/100,i=parseInt(a[3],10)/100,s=a[4]||1;function c(t,r,n){return n<0&&(n+=1),1<n&&--n,n<1/6?t+6*(r-t)*n:n<.5?r:n<2/3?t+(r-t)*(2/3-n)*6:t}if(0==u)r=n=e=i;else{var f=i<.5?i*(1+u):i+u-i*u,l=2*i-f;r=c(l,f,o+1/3),n=c(l,f,o),e=c(l,f,o-1/3)}return"rgba("+255*r+","+255*n+","+255*e+","+s+")"}(t):void 0;var r,n,e,a}function h(t){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(r)return r[1]}function y(t,r){return p.fnc(t)?t(r.target,r.id,r.total):t}function f(t,r){return t.getAttribute(r)}function l(t,r,n){if(c([n,"deg","rad","turn"],h(r)))return r;var e=s.CSS[r+n];if(!p.und(e))return e;var a=document.createElement(t.tagName),o=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;o.appendChild(a),a.style.position="absolute",a.style.width=100+n;var u=100/a.offsetWidth;o.removeChild(a);var i=u*parseFloat(r);return s.CSS[r+n]=i}function b(t,r,n){if(r in t.style){var e=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=t.style[r]||getComputedStyle(t).getPropertyValue(e)||"0";return n?l(t,a,n):a}}function x(t,r){return p.dom(t)&&!p.inp(t)&&(f(t,r)||p.svg(t)&&t[r])?"attribute":p.dom(t)&&c(n,r)?"transform":p.dom(t)&&"transform"!==r&&b(t,r)?"css":null!=t[r]?"object":void 0}function w(t){if(p.dom(t)){for(var r,n=t.style.transform||"",e=/(\w+)\(([^)]*)\)/g,a=new Map;r=e.exec(n);)a.set(r[1],r[2]);return a}}function P(t,r,n,e){var a,o=i(r,"scale")?1:0+(i(a=r,"translate")||"perspective"===a?"px":i(a,"rotate")||i(a,"skew")?"deg":void 0),u=w(t).get(r)||o;return n&&(n.transforms.list.set(r,u),n.transforms.last=r),e?l(t,u,e):u}function C(t,r,n,e){switch(x(t,r)){case"transform":return P(t,r,e,n);case"css":return b(t,r,n);case"attribute":return f(t,r);default:return t[r]||0}}function k(t,r){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var e=h(t)||0,a=parseFloat(r),o=parseFloat(t.replace(n[0],""));switch(n[0][0]){case"+":return a+o+e;case"-":return a-o+e;case"*":return a*o+e}}function L(t,r){if(p.col(t))return u(t);if(/\s/g.test(t))return t;var n=h(t),e=n?t.substr(0,t.length-n.length):t;return r?e+r:e}function N(t,r){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,e=L(p.pth(t)?t.totalLength:t,r)+"";return{original:e,numbers:e.match(n)?e.match(n).map(Number):[0],strings:p.str(t)||r?e.split(n):[]}}function T(t){var r,n=M((r=t)?e(p.arr(r)?r.map(a):a(r)):[],function(t,r,n){return n.indexOf(t)===r});return n.map(function(t,r){return{target:t,id:r,total:n.length,transforms:{list:w(t)}}})}function O(t,r){var n=o(r);if(p.arr(t)){var e=t.length;2===e&&!p.obj(t[0])?t={value:t}:p.fnc(r.duration)||(n.duration=r.duration/e)}return(p.arr(t)?t:[t]).map(function(t,r){return p.obj(t)&&!p.pth(t)?t:{value:t}}).map(function(t){return m(t,n)})}function S(f,l){var d;return f.tweens.map(function(t){var r=function(t,r){var n={};for(var e in t){var a=y(t[e],r);p.arr(a)&&1===(a=a.map(function(t){return y(t,r)})).length&&(a=a[0]),n[e]=a}return n.duration=parseFloat(n.duration),n}(t,l),n=r.value,e=p.arr(n)?n[1]:n,a=h(e),o=C(l.target,f.name,a,l),u=d?d.to.original:o,i=p.arr(n)?n[0]:u,s=h(i)||h(o),c=a||s;return p.und(e)&&(e=u),r.from=N(i,c),r.to=N(k(e,i),c),r.start=d?d.end:0,r.end=r.start+r.duration,r.isPath=!1,r.isColor=p.col(r.from.original),r.isColor&&(r.round=1),d=r})}var j={css:function(t,r,n){return t.style[r]=n},attribute:function(t,r,n){return t.setAttribute(r,n)},object:function(t,r,n){return t[r]=n},transform:function(t,r,n,e,a){if(e.list.set(r,n),r===e.last||a){var o="";e.list.forEach(function(t,r){o+=r+"("+t+") "}),t.style.transform=o}}};function A(t,s){T(t).forEach(function(t){for(var r in s){var n=y(s[r],t),e=t.target,a=h(n),o=C(e,r,a,t),u=k(L(n,a||h(o)),o),i=x(e,r);j[i](e,r,u,t.transforms,!0)}})}function E(t,n){return M(e(t.map(function(r){return n.map(function(t){return function(t,r){var n=x(t.target,r.name);if(n){var e=S(r,t),a=e[e.length-1];return{type:n,property:r.name,animatable:t,tweens:e,duration:a.end}}}(r,t)})})),function(t){return!p.und(t)})}var $=0;function F(t){var r,n,e,a,o=g(d,t),u=g(v,t),i=function(t,r){var n=[];for(var e in r)p.key(e)&&n.push({name:e,tweens:O(r[e],t)});return n}(u,t),s=T(t.targets),c=E(s,i),f=(n=u,e=(r=c).length,(a={}).duration=e?Math.max.apply(Math,r.map(function(t){return t.duration})):n.duration,a),l=$;return $++,m(o,{id:l,children:[],animatables:s,animations:c,duration:f.duration})}function r(t){void 0===t&&(t={});var e,a=0,o=null;function u(t){var r=window.Promise&&new Promise(function(t){return o=t});return t.finished=r}var C=F(t);u(C);function i(t,r){r&&r.seek(t)}function r(t){var r=C.duration,n=t;C.progress=I(n/r*100,0,100),C.reversePlayback=n<C.currentTime,e&&function(t){if(C.reversePlayback)for(var r=a;r--;)i(t,e[r]);else for(var n=0;n<a;n++)i(t,e[n])}(n),!C.began&&0<C.currentTime&&(C.began=!0),function(r){for(var t=0,n=C.animations,e=n.length;t<e;){var a=n[t],o=a.animatable,u=a.tweens,i=u.length-1,s=u[i];i&&(s=M(u,function(t){return r<t.end})[0]||s);for(var c=I(r-s.start,0,s.duration)/s.duration,f=s.to.strings,l=s.round,d=[],v=s.to.numbers.length,p=void 0,g=0;g<v;g++){var m=void 0,h=s.to.numbers[g],y=s.from.numbers[g]||0;m=y+c*(h-y),l&&(s.isColor&&2<g||(m=Math.round(m*l)/l)),d.push(m)}var b=f.length;if(b){p=f[0];for(var x=0;x<b;x++){f[x];var w=f[x+1],P=d[x];isNaN(P)||(p+=w?P+w:P+" ")}}else p=d[0];j[a.type](o.target,a.property,p,o.transforms),a.currentValue=p,t++}}(n),C.currentTime=I(n,0,r),r<=t&&(C.paused=!0,C.completed||(C.completed=!0,!C.passThrough&&"Promise"in window&&(o(),u(C))))}return C.reset=function(){C.passThrough=!1,C.currentTime=0,C.progress=0,C.paused=!0,C.began=!1,C.completed=!1,C.reversePlayback=!1,e=C.children;for(var t=a=e.length;t--;)C.children[t].reset()},C.set=function(t,r){return A(t,r),C},C.seek=function(t){r(t)},C.reset(),C}function B(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function X(t){for(var r,n=t.points,e=0,a=0;a<n.numberOfItems;a++){var o=n.getItem(a);0<a&&(e+=B(r,o)),r=o}return e}function Y(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return o=t,2*Math.PI*f(o,"r");case"rect":return 2*f(a=t,"width")+2*f(a,"height");case"line":return B({x:f(e=t,"x1"),y:f(e,"y1")},{x:f(e,"x2"),y:f(e,"y2")});case"polyline":return X(t);case"polygon":return n=(r=t).points,X(r)+B(n.getItem(n.numberOfItems-1),n.getItem(0))}var r,n,e,a,o}function Z(t,r){var n=r||{},e=n.el||function(t){for(var r=t.parentNode;p.svg(r)&&p.svg(r.parentNode);)r=r.parentNode;return r}(t),a=e.getBoundingClientRect(),o=f(e,"viewBox"),u=a.width,i=a.height,s=n.viewBox||(o?o.split(" "):[0,0,u,i]);return{el:e,viewBox:s,x:s[0]/1,y:s[1]/1,w:u,h:i,vW:s[2],vH:s[3]}}r.version="3.1.0",r.get=C,r.set=A,r.convertPx=l,r.penner=t,r.path=function(t){return{el:t,svg:Z(t),totalLength:Y(t),deltaCorrections:{x:4,y:5}}},r.getPathProgress=function(e,a,t){function r(t){void 0===t&&(t=0);var r=a*e.totalLength,n=1<=r+t?r+t:0;return e.el.getPointAtLength(n)}var n=Z(e.el,e.svg),o=r(),u=r(-1),i=r(1);return{x:1*(o.x-n.x),y:1*(o.y-n.y),angle:180*Math.atan2(i.y-u.y,i.x-u.x)/Math.PI}},module.exports=r});