text: // KUTE.js Base v2.0.11 | thednp © 2020 | MIT-License
  !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).KUTE=n()}(this,(function(){"use strict";var t={},n=[],e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},i={},r={},o={};o.now=self.performance.now.bind(self.performance);var a=0,s=function(t){for(var e=0;e<n.length;)n[e].update(t)?e++:n.splice(e,1);a=requestAnimationFrame(s)};function u(){setTimeout((function(){if(!n.length&&a){for(var e in cancelAnimationFrame(a),a=null,r)if("function"==typeof r[e])t[e]&&delete t[e];else for(var o in r[e])t[o]&&delete t[o];for(var s in i)t[s]&&delete t[s]}}),64)}var f={Tick:a,Ticker:s,Tweens:n,Time:o};for(var c in f)t[c]||(t[c]="Time"===c?o.now:f[c]);e._KUTE=t;var l={duration:700,delay:0,easing:"linear"},p={},h={},d={defaultOptions:l,linkProperty:p,onStart:r,onComplete:h},v={},y={},m={linear:function(t){return t},easingQuadraticIn:function(t){return t*t},easingQuadraticOut:function(t){return t*(2-t)},easingQuadraticInOut:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easingCubicIn:function(t){return t*t*t},easingCubicOut:function(t){return--t*t*t+1},easingCubicInOut:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easingCircularIn:function(t){return-(Math.sqrt(1-t*t)-1)},easingCircularOut:function(t){return Math.sqrt(1-(t-=1)*t)},easingCircularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easingBackIn:function(t){var n=1.70158;return t*t*((n+1)*t-n)},easingBackOut:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},easingBackInOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)}};function g(t){return n.push(t)}function _(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}y.processEasing=function(t){return"function"==typeof t?t:"function"==typeof m[t]?m[t]:m.linear};var S={};function w(){var n=this,e=function(e){var i=p[e],r=S[e];for(var o in i)if("function"==typeof i[o]&&Object.keys(n.valuesEnd).some((function(t){return r&&r.includes(t)||"attr"===t&&Object.keys(n.valuesEnd[t]).some((function(t){return r&&r.includes(t)}))})))!t[o]&&(t[o]=i[o]);else for(var a in n.valuesEnd)for(var s in n.valuesEnd[a])if("function"==typeof i[s])!t[s]&&(t[s]=i[s]);else for(var u in i[o])i[s]&&"function"==typeof i[s][u]&&!t[u]&&(t[u]=i[s][u])};for(var i in p)e(i)}var C={add:g,remove:_,getAll:function(){return n},removeAll:function(){n.length=0},stop:u,linkInterpolation:w};function M(t,n){try{return n?t instanceof HTMLCollection||t instanceof NodeList||t instanceof Array&&t.every((function(t){return t instanceof Element}))?t:document.querySelectorAll(t):t instanceof Element||t===window?t:document.querySelector(t)}catch(n){console.error("KUTE.js - Element(s) not found: "+t+".")}}var T=function(t){return this.setComponent(t)};T.prototype.setComponent=function(t){var n=t.component,e={onStart:r,onComplete:h},o=t.category,a=t.property;if(S[n]=t.properties||t.subProperties||t.property,t.defaultOptions)for(var s in t.defaultOptions)l[s]=t.defaultOptions[s];if(t.functions)for(var u in e)if(u in t.functions)if("function"==typeof t.functions[u])!e[u][n]&&(e[u][n]={}),!e[u][n][o||a]&&(e[u][n][o||a]=t.functions[u]);else for(var f in t.functions[u])!e[u][n]&&(e[u][n]={}),!e[u][n][f]&&(e[u][n][f]=t.functions[u][f]);if(t.Interpolate){for(var c in t.Interpolate){var d=t.Interpolate[c];if("function"!=typeof d||i[c])for(var y in d)"function"!=typeof d[y]||i[c]||(i[c]=d[y]);else i[c]=d}p[n]=t.Interpolate}if(t.Util)for(var m in t.Util)!v[m]&&(v[m]=t.Util[m]);return{name:n}};var E=function(n,e,i,o){for(var a in this.element=n,this.playing=!1,this._startTime=null,this._startFired=!1,this.valuesEnd=i,this.valuesStart=e,o=o||{},this._resetStart=o.resetStart||0,this._easing="function"==typeof o.easing?o.easing:y.processEasing(o.easing),this._duration=o.duration||l.duration,this._delay=o.delay||l.delay,o){var s="_"+a;s in this||(this[s]=o[a])}var u=this._easing.name;return r[u]||(r[u]=function(n){!t[n]&&n===this._easing.name&&(t[n]=this._easing)}),this};function O(t,n,e){return(t=+t)+(n-=t)*e}function b(t,n,e){for(var i=[],r=0,o=n.length;r<o;r++)i[r]=(1e3*(t[r]+(n[r]-t[r])*e)>>0)/1e3;return i}E.prototype.start=function(n){if(g(this),this.playing=!0,this._startTime=void 0!==n?n:t.Time(),this._startTime+=this._delay,!this._startFired){for(var e in this._onStart&&this._onStart.call(this),r)if("function"==typeof r[e])r[e].call(this,e);else for(var i in r[e])r[e][i].call(this,i);w.call(this),this._startFired=!0}return!a&&s(),this},E.prototype.stop=function(){return this.playing&&(_(this),this.playing=!1,this._onStop&&this._onStop.call(this),this.close()),this},E.prototype.close=function(){for(var t in h)for(var n in h[t])h[t][n].call(this,n);this._startFired=!1,u.call(this)},E.prototype.chain=function(t){return this._chain=[],this._chain=t.length?t:this._chain.concat(t),this},E.prototype.stopChainedTweens=function(){this._chain&&this._chain.length&&this._chain.map((function(t){return t.stop()}))},E.prototype.update=function(n){var e,i;if((n=void 0!==n?n:t.Time())<this._startTime&&this.playing)return!0;for(var r in e=(n-this._startTime)/this._duration,e=0===this._duration||e>1?1:e,i=this._easing(e),this.valuesEnd)t[r](this.element,this.valuesStart[r],this.valuesEnd[r],i);return this._onUpdate&&this._onUpdate.call(this),1!==e||(this._onComplete&&this._onComplete.call(this),this.playing=!1,this.close(),void 0!==this._chain&&this._chain.length&&this._chain.map((function(t){return t.start()})),!1)},y.tween=E;var I="undefined"!=typeof DOMMatrix?DOMMatrix:"undefined"!=typeof WebKitCSSMatrix?WebKitCSSMatrix:"undefined"!=typeof CSSMatrix?CSSMatrix:"undefined"!=typeof MSCSSMatrix?MSCSSMatrix:null,k={component:"transformMatrixBase",property:"transform",functions:{onStart:{transform:function(n){this.valuesEnd[n]&&!t[n]&&(t[n]=function(t,e,i,r){var o=new I,a={};for(var s in i)a[s]="perspective"===s?O(e[s],i[s],r):b(e[s],i[s],r);a.perspective&&(o.m34=-1/a.perspective),o=a.translate3d?o.translate(a.translate3d[0],a.translate3d[1],a.translate3d[2]):o,o=a.rotate3d?o.rotate(a.rotate3d[0],a.rotate3d[1],a.rotate3d[2]):o,a.skew&&(o=a.skew[0]?o.skewX(a.skew[0]):o,o=a.skew[1]?o.skewY(a.skew[1]):o),o=a.scale3d?o.scale(a.scale3d[0],a.scale3d[1],a.scale3d[2]):o,t.style[n]=o.toString()})},CSS3Matrix:function(n){this.valuesEnd.transform&&!t[n]&&(t[n]=I)}}},Interpolate:{perspective:O,translate3d:b,rotate3d:b,skew:b,scale3d:b}};function x(n){n in this.valuesEnd&&!t[n]&&(t[n]=function(t,e,i,r){t.style[n]=(r>.99||r<.01?(10*O(e,i,r)>>0)/10:O(e,i,r)>>0)+"px"})}var U=["top","left","width","height"],q={};U.map((function(t){return q[t]=x}));var A={component:"baseBoxModel",category:"boxModel",properties:U,Interpolate:{numbers:O},functions:{onStart:q}};var B={component:"baseOpacity",property:"opacity",Interpolate:{numbers:O},functions:{onStart:function(n){n in this.valuesEnd&&!t[n]&&(t[n]=function(t,e,i,r){t.style[n]=(1e3*O(e,i,r)>>0)/1e3})}}},F=new T(k),j=new T(A),K=new T(B);return{Animation:T,Components:{Transform:F,BoxModel:j,Opacity:K},TweenBase:E,fromTo:function(t,n,e,i){return i=i||{},new y.tween(M(t),n,e,i)},Objects:d,Easing:m,Util:v,Render:f,Interpolate:i,Internals:C,Selector:M,Version:"2.0.11"}}));
  