From 2320e6ea2cd74a4e0ac495d47131ca4f3c2f2e9f Mon Sep 17 00:00:00 2001 From: Julian Shapiro Date: Sun, 17 Aug 2014 17:43:19 -0700 Subject: [PATCH] Utility function w/ sequences fix Fixes sequences with raw DOM elements and utility function. Closes #247. Closes #249. Thanks, @fattenap. Prepare Velocity for the upcoming jQuery shim. Closes #208. --- packages/velocity/bower.json | 2 +- packages/velocity/component.json | 2 +- packages/velocity/jquery.velocity.js | 24 ++++++++++++++---------- packages/velocity/jquery.velocity.min.js | 4 ++-- packages/velocity/package.json | 2 +- packages/velocity/velocity.ui.js | 6 +++--- packages/velocity/velocity.ui.min.js | 4 ++-- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/velocity/bower.json b/packages/velocity/bower.json index 43dfb55e..917050a6 100644 --- a/packages/velocity/bower.json +++ b/packages/velocity/bower.json @@ -1,6 +1,6 @@ { "name": "velocity", - "version": "0.11.5", + "version": "0.11.6", "homepage": "http://velocityjs.org", "authors": [ { "name" : "Julian Shapiro", diff --git a/packages/velocity/component.json b/packages/velocity/component.json index 916bff15..bd4d06b7 100644 --- a/packages/velocity/component.json +++ b/packages/velocity/component.json @@ -1,7 +1,7 @@ { "name": "velocity", "repository": "julianshapiro/velocity", - "version": "0.11.5", + "version": "0.11.6", "description": "Accelerated JavaScript animation.", "keywords": [ "animation", diff --git a/packages/velocity/jquery.velocity.js b/packages/velocity/jquery.velocity.js index 44dcc7ad..721645f4 100644 --- a/packages/velocity/jquery.velocity.js +++ b/packages/velocity/jquery.velocity.js @@ -2,7 +2,7 @@ Velocity.js ******************/ -/*! VelocityJS.org (0.11.5). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ +/*! VelocityJS.org (0.11.6). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ /* Structure: @@ -103,6 +103,11 @@ return function (global, window, document, undefined) { return result; } + /* Wrap single elements in an array so that $.each() can iterate with the element instead of its node's children. */ + function createElementsArray (elements) { + return Type.isNode(elements) ? [ elements ] : elements; + } + var Type = { isString: function (variable) { return (typeof variable === "string"); @@ -160,7 +165,6 @@ return function (global, window, document, undefined) { if (jQuery && jQuery.fn !== undefined) { $ = jQuery; } else if (window.Velocity && window.Velocity.Utilities) { - $ = window.Velocity.Utilities; } @@ -286,7 +290,7 @@ return function (global, window, document, undefined) { elements = [].slice.call(elements); } - $.each(Type.isNode(elements) ? [ elements ] : elements, function(i, element) { + $.each(createElementsArray(elements), function(i, element) { /* Initialize Velocity's per-element data cache if this element hasn't previously been animated. */ if (Data(element) === undefined) { Velocity.init(element); @@ -315,7 +319,7 @@ return function (global, window, document, undefined) { }, /* Set to true to force a duration of 1ms for all animations so that UI testing can be performed without waiting on animations to complete. */ mock: false, - version: { major: 0, minor: 11, patch: 5 }, + version: { major: 0, minor: 11, patch: 6 }, /* Set to 1 or 2 (most verbose) to output debug info to console. */ debug: false }; @@ -1696,7 +1700,7 @@ return function (global, window, document, undefined) { *******************/ /* Clear the currently-active delay on each targeted element. */ - $.each(Type.isNode(elements) ? [ elements ] : elements, function(i, element) { + $.each(createElementsArray(elements), function(i, element) { if (Data(element) && Data(element).delayTimer) { /* Stop the timer from triggering its cached next() function. */ clearTimeout(Data(element).delayTimer.setTimeout); @@ -1724,8 +1728,8 @@ return function (global, window, document, undefined) { /* Inactive calls are set to false by the logic inside completeCall(). Skip them. */ if (activeCall) { /* If we're operating on a single element, wrap it in an array so that $.each() can iterate over it. */ - $.each(Type.isNode(activeCall[1]) ? [ activeCall[1] ] : activeCall[1], function(k, activeElement) { - $.each(Type.isNode(elements) ? [ elements ] : elements, function(l, element) { + $.each(createElementsArray(activeCall[1]), function(k, activeElement) { + $.each(createElementsArray(elements), function(l, element) { /* Check that this call was applied to the target element. */ if (element === activeElement) { if (Data(element)) { @@ -1743,7 +1747,7 @@ return function (global, window, document, undefined) { /* Iterate through the items in the element's queue. */ $.each($.queue(element, queueName), function(i, item) { - /* The queue array can contain an "inprogress" sentinal, which we skip. */ + /* The queue array can contain an "inprogress" string, which we skip. */ if (Type.isFunction(item)) { /* Pass the item's callback a flag indicating that we want to abort from the queue call. (Specifically, the queue will resolve the call's associated promise then abort.) */ @@ -1796,7 +1800,7 @@ return function (global, window, document, undefined) { } /* Individually trigger the sequence for each element in the set to prevent users from having to handle iteration logic in their sequence. */ - $.each(elements, function(elementIndex, element) { + $.each(createElementsArray(elements), function(elementIndex, element) { /* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */ if (parseFloat(options.stagger)) { options.delay = delayOriginal + (parseFloat(options.stagger) * elementIndex); @@ -2753,7 +2757,7 @@ return function (global, window, document, undefined) { /* If the "nodeType" property exists on the elements variable, we're animating a single element. Place it in an array so that $.each() can iterate over it. */ - $.each(Type.isNode(elements) ? [ elements ] : elements, function(i, element) { + $.each(createElementsArray(elements), function(i, element) { /* Ensure each element in a set has a nodeType (is a real element) to avoid throwing errors. */ if (Type.isNode(element)) { processElement.call(element); diff --git a/packages/velocity/jquery.velocity.min.js b/packages/velocity/jquery.velocity.min.js index 2d114e2e..30f53122 100644 --- a/packages/velocity/jquery.velocity.min.js +++ b/packages/velocity/jquery.velocity.min.js @@ -1,2 +1,2 @@ -/*! VelocityJS.org (0.11.5). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ -!function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e(window.Velocity?void 0:require("jquery")):"function"==typeof define&&define.amd?window.Velocity?define("velocity",e):define("velocity",["jquery"],e):e(window.jQuery)}(function(e){return function(t,r,a,o){function i(e){for(var t=-1,r=e?e.length:0,a=[];++tr;r++)if(v.State.calls[r]){var i=v.State.calls[r],s=i[0],l=i[2],p=i[3];p||(p=v.State.calls[r][3]=t-16);for(var d=Math.min((t-p)/l.duration,1),f=0,g=s.length;g>f;f++){var m=s[f],S=m.element;if(n(S)){var x=!1;l.display&&"none"!==l.display&&b.setPropertyValue(S,"display",l.display),l.visibility&&"hidden"!==l.visibility&&b.setPropertyValue(S,"visibility",l.visibility);for(var V in m)if("element"!==V){var P=m[V],w,C=h.isString(P.easing)?v.Easings[P.easing]:P.easing;if(w=1===d?P.endValue:P.startValue+(P.endValue-P.startValue)*C(d),P.currentValue=w,b.Hooks.registered[V]){var T=b.Hooks.getRoot(V),k=n(S).rootPropertyValueCache[T];k&&(P.rootPropertyValue=k)}var E=b.setPropertyValue(S,V,P.currentValue+(0===parseFloat(w)?"":P.unitType),P.rootPropertyValue,P.scrollData);b.Hooks.registered[V]&&(n(S).rootPropertyValueCache[T]=b.Normalizations.registered[T]?b.Normalizations.registered[T]("extract",null,E[1]):E[1]),"transform"===E[0]&&(x=!0)}l.mobileHA&&n(S).transformCache.translate3d===o&&(n(S).transformCache.translate3d="(0px, 0px, 0px)",x=!0),x&&b.flushTransformCache(S)}}l.display&&"none"!==l.display&&(v.State.calls[r][2].display=!1),l.visibility&&"hidden"!==l.visibility&&(v.State.calls[r][2].visibility=!1),l.progress&&l.progress.call(i[1],i[1],d,Math.max(0,p+l.duration-t),p),1===d&&c(r)}v.State.isTicking&&y(u)}function c(e,t){if(!v.State.calls[e])return!1;for(var r=v.State.calls[e][0],a=v.State.calls[e][1],i=v.State.calls[e][2],s=v.State.calls[e][4],l=!1,u=0,c=r.length;c>u;u++){var p=r[u].element;if(t||i.loop||("none"===i.display&&b.setPropertyValue(p,"display",i.display),"hidden"===i.visibility&&b.setPropertyValue(p,"visibility",i.visibility)),($.queue(p)[1]===o||!/\.velocityQueueEntryFlag/i.test($.queue(p)[1]))&&n(p)){n(p).isAnimating=!1,n(p).rootPropertyValueCache={};var d=!1;$.each(b.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,a=n(p).transformCache[t];n(p).transformCache[t]!==o&&new RegExp("^\\("+r+"[^.]").test(a)&&(d=!0,delete n(p).transformCache[t])}),i.mobileHA&&(d=!0,delete n(p).transformCache.translate3d),d&&b.flushTransformCache(p),b.Values.removeClass(p,"velocity-animating")}if(!t&&i.complete&&!i.loop&&u===c-1)try{i.complete.call(a,a)}catch(f){setTimeout(function(){throw f},1)}s&&i.loop!==!0&&s(a),i.loop!==!0||t||v(p,"reverse",{loop:!0,delay:i.delay}),i.queue!==!1&&$.dequeue(p,i.queue)}v.State.calls[e]=!1;for(var g=0,m=v.State.calls.length;m>g;g++)if(v.State.calls[g]!==!1){l=!0;break}l===!1&&(v.State.isTicking=!1,delete v.State.calls,v.State.calls=[])}var p="velocity",d=400,f="swing",g=function(){if(a.documentMode)return a.documentMode;for(var e=7;e>4;e--){var t=a.createElement("div");if(t.innerHTML="",t.getElementsByTagName("span").length)return t=null,e}return o}(),m=function(){var e=0;return r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||function(t){var r=(new Date).getTime(),a;return a=Math.max(0,16-(r-e)),e=r+a,setTimeout(function(){t(r+a)},a)}}(),y=r.requestAnimationFrame||m,h={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==o&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||r.Zepto&&r.Zepto.zepto.isZ(e))},isSVG:function(e){return r.SVGElement&&e instanceof SVGElement},isEmptyObject:function(e){var t;for(t in e)return!1;return!0}},$;if(e&&e.fn!==o?$=e:r.Velocity&&r.Velocity.Utilities&&($=r.Velocity.Utilities),!$)throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded.");if(t.Velocity!==o&&t.Velocity.Utilities==o)throw new Error("Velocity: Namespace is occupied.");if(7>=g){if(e)return void(e.fn.velocity=e.fn.animate);throw new Error("Velocity: For IE<=7, Velocity falls back to jQuery, which must first be loaded.")}if(8===g&&!e)throw new Error("Velocity: For IE8, Velocity requires jQuery proper to be loaded; Velocity's jQuery shim does not work with IE8.");var v={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:r.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:a.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:$,Sequences:{},Easings:{},Promise:r.Promise,defaults:{queue:"",duration:d,easing:f,begin:null,complete:null,progress:null,display:null,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){$.data(e,p,{isSVG:h.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},animate:null,hook:function(e,t,r){var a=o;return h.isWrapped(e)&&(e=[].slice.call(e)),$.each(h.isNode(e)?[e]:e,function(e,i){if(n(i)===o&&v.init(i),r===o)a===o&&(a=v.CSS.getPropertyValue(i,t));else{var s=v.CSS.setPropertyValue(i,t,r);"transform"===s[0]&&v.CSS.flushTransformCache(i),a=s}}),a},mock:!1,version:{major:0,minor:11,patch:5},debug:!1};r.pageYOffset!==o?(v.State.scrollAnchor=r,v.State.scrollPropertyLeft="pageXOffset",v.State.scrollPropertyTop="pageYOffset"):(v.State.scrollAnchor=a.documentElement||a.body.parentNode||a.body,v.State.scrollPropertyLeft="scrollLeft",v.State.scrollPropertyTop="scrollTop");var S=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function r(e){return 3*e}function a(a,o,i){return((e(o,i)*a+t(o,i))*a+r(o))*a}function o(a,o,i){return 3*e(o,i)*a*a+2*t(o,i)*a+r(o)}return function(e,t,r,i){function n(t){for(var i=t,n=0;8>n;++n){var s=o(i,e,r);if(0===s)return i;var l=a(i,e,r)-t;i-=l/s}return i}if(4!==arguments.length)return!1;for(var s=0;4>s;++s)if("number"!=typeof arguments[s]||isNaN(arguments[s])||!isFinite(arguments[s]))return!1;return e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0),function(o){return e===t&&r===i?o:a(n(o),t,i)}}}(),x=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,a){var o={x:t.x+a.dx*r,v:t.v+a.dv*r,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function r(r,a){var o={dx:r.v,dv:e(r)},i=t(r,.5*a,o),n=t(r,.5*a,i),s=t(r,a,n),l=1/6*(o.dx+2*(i.dx+n.dx)+s.dx),u=1/6*(o.dv+2*(i.dv+n.dv)+s.dv);return r.x=r.x+l*a,r.v=r.v+u*a,r}return function a(e,t,o){var i={x:-1,v:0,tension:null,friction:null},n=[0],s=0,l=1e-4,u=.016,c,p,d;for(e=parseFloat(e)||500,t=parseFloat(t)||20,o=o||null,i.tension=e,i.friction=t,c=null!==o,c?(s=a(e,t),p=s/o*u):p=u;;)if(d=r(d||i,p),n.push(1+d.x),s+=16,!(Math.abs(d.x)>l&&Math.abs(d.v)>l))break;return c?function(e){return n[e*(n.length-1)|0]}:s}}();!function(){v.Easings.linear=function(e){return e},v.Easings.swing=function(e){return.5-Math.cos(e*Math.PI)/2},v.Easings.spring=function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)},v.Easings.ease=S(.25,.1,.25,1),v.Easings["ease-in"]=S(.42,0,1,1),v.Easings["ease-out"]=S(0,0,.58,1),v.Easings["ease-in-out"]=S(.42,0,.58,1);var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,r){e[r]=function(e){return Math.pow(e,t+2)}}),$.extend(e,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,r=4;e<((t=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*t-2)/22-e,2)}}),$.each(e,function(e,t){v.Easings["easeIn"+e]=t,v.Easings["easeOut"+e]=function(e){return 1-t(1-e)},v.Easings["easeInOut"+e]=function(e){return.5>e?t(2*e)/2:1-t(-2*e+2)/2}})}();var b=v.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e=g)switch(e){case"name":return"filter";case"extract":var a=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=a?a[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=g||v.State.isGingerbread||(b.Lists.transformsBase=b.Lists.transformsBase.concat(b.Lists.transforms3D));for(var e=0;ea&&(a=1),i=!/(\d)$/i.test(a);break;case"skew":i=!/(deg|\d)$/i.test(a);break;case"rotate":i=!/(deg|\d)$/i.test(a)}return i||(n(r).transformCache[t]="("+a+")"),n(r).transformCache[t]}}}();for(var e=0;e=g||3!==i.split(" ").length||(i+=" 1"),i;case"inject":return 8>=g?4===a.split(" ").length&&(a=a.split(/\s+/).slice(0,3).join(" ")):3===a.split(" ").length&&(a+=" 1"),(8>=g?"rgb":"rgba")+"("+a.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(g||v.State.isAndroid&&!v.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(v.State.prefixMatches[e])return[v.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,a=t.length;a>r;r++){var o;if(o=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()}),h.isString(v.State.prefixElement.style[o]))return v.State.prefixMatches[e]=o,[o,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,a;return e=e.replace(t,function(e,t,r,a){return t+t+r+r+a+a}),a=r.exec(e),a?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,t,a,i){function s(e,t){function a(){u&&b.setPropertyValue(e,"display","none")}var l=0;if(8>=g)l=$.css(e,t);else{var u=!1;if(/^(width|height)$/.test(t)&&0===b.getPropertyValue(e,"display")&&(u=!0,b.setPropertyValue(e,"display",b.Values.getDisplayType(e))),!i){if("height"===t&&"border-box"!==b.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(b.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(b.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(b.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(b.getPropertyValue(e,"paddingBottom"))||0);return a(),c}if("width"===t&&"border-box"!==b.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(b.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(b.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(b.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(b.getPropertyValue(e,"paddingRight"))||0);return a(),p}}var d;d=n(e)===o?r.getComputedStyle(e,null):n(e).computedStyle?n(e).computedStyle:n(e).computedStyle=r.getComputedStyle(e,null),(g||v.State.isFirefox)&&"borderColor"===t&&(t="borderTopColor"),l=9===g&&"filter"===t?d.getPropertyValue(t):d[t],(""===l||null===l)&&(l=e.style[t]),a()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(t)){var f=s(e,"position");("fixed"===f||"absolute"===f&&/top|left/i.test(t))&&(l=$(e).position()[t]+"px")}return l}var l;if(b.Hooks.registered[t]){var u=t,c=b.Hooks.getRoot(u);a===o&&(a=b.getPropertyValue(e,b.Names.prefixCheck(c)[0])),b.Normalizations.registered[c]&&(a=b.Normalizations.registered[c]("extract",e,a)),l=b.Hooks.extractValue(u,a)}else if(b.Normalizations.registered[t]){var p,d;p=b.Normalizations.registered[t]("name",e),"transform"!==p&&(d=s(e,b.Names.prefixCheck(p)[0]),b.Values.isCSSNullValue(d)&&b.Hooks.templates[t]&&(d=b.Hooks.templates[t][1])),l=b.Normalizations.registered[t]("extract",e,d)}return/^[\d-]/.test(l)||(l=n(e)&&n(e).isSVG&&b.Names.SVGAttribute(t)?/^(height|width)$/i.test(t)?e.getBBox()[t]:e.getAttribute(t):s(e,b.Names.prefixCheck(t)[0])),b.Values.isCSSNullValue(l)&&(l=0),v.debug>=2&&console.log("Get "+t+": "+l),l},setPropertyValue:function(e,t,a,o,i){var s=t;if("scroll"===t)i.container?i.container["scroll"+i.direction]=a:"Left"===i.direction?r.scrollTo(a,i.alternateValue):r.scrollTo(i.alternateValue,a);else if(b.Normalizations.registered[t]&&"transform"===b.Normalizations.registered[t]("name",e))b.Normalizations.registered[t]("inject",e,a),s="transform",a=n(e).transformCache[t];else{if(b.Hooks.registered[t]){var l=t,u=b.Hooks.getRoot(t);o=o||b.getPropertyValue(e,u),a=b.Hooks.injectValue(l,a,o),t=u}if(b.Normalizations.registered[t]&&(a=b.Normalizations.registered[t]("inject",e,a),t=b.Normalizations.registered[t]("name",e)),s=b.Names.prefixCheck(t)[0],8>=g)try{e.style[s]=a}catch(c){v.debug&&console.log("Browser does not support ["+a+"] for ["+s+"]")}else n(e)&&n(e).isSVG&&b.Names.SVGAttribute(t)?e.setAttribute(t,a):e.style[s]=a;v.debug>=2&&console.log("Set "+t+" ("+s+"): "+a)}return[s,a]},flushTransformCache:function(e){function t(t){return parseFloat(b.getPropertyValue(e,t))}var r="";if((g||v.State.isAndroid&&!v.State.isChrome)&&n(e).isSVG){var a={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};$.each(n(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(r+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var o,i;$.each(n(e).transformCache,function(t){return o=n(e).transformCache[t],"transformPerspective"===t?(i=o,!0):(9===g&&"rotateZ"===t&&(t="rotate"),void(r+=t+o+" "))}),i&&(r="perspective"+i+" "+r)}b.setPropertyValue(e,"transform",r)}};b.Hooks.register(),b.Normalizations.register();var V=function(){function e(){return p?C.promise||null:f}function t(){function e(e){function d(e,r){var a=o,i=o,n=o;return h.isArray(e)?(a=e[0],!h.isArray(e[1])&&/^[\d-]/.test(e[1])||h.isFunction(e[1])||b.RegEx.isHex.test(e[1])?n=e[1]:(h.isString(e[1])&&!b.RegEx.isHex.test(e[1])||h.isArray(e[1]))&&(i=r?e[1]:l(e[1],s.duration),e[2]!==o&&(n=e[2]))):a=e,r||(i=i||s.easing),h.isFunction(a)&&(a=a.call(t,V,x)),h.isFunction(n)&&(n=n.call(t,V,x)),[a||0,i,n]}function f(e,t){var r,a;return a=(t||0).toString().toLowerCase().replace(/[%A-z]+$/,function(e){return r=e,""}),r||(r=b.Values.getUnitType(e)),[a,r]}function g(){var e={myParent:t.parentNode||a.body,position:b.getPropertyValue(t,"position"),fontSize:b.getPropertyValue(t,"fontSize")},o=e.position===N.lastPosition&&e.myParent===N.lastParent,i=e.fontSize===N.lastFontSize;N.lastParent=e.myParent,N.lastPosition=e.position,N.lastFontSize=e.fontSize;var s=100,l={};if(i&&o)l.emToPx=N.lastEmToPx,l.percentToPxWidth=N.lastPercentToPxWidth,l.percentToPxHeight=N.lastPercentToPxHeight;else{var u=n(t).isSVG?a.createElementNS("http://www.w3.org/2000/svg","rect"):a.createElement("div");v.init(u),e.myParent.appendChild(u),v.CSS.setPropertyValue(u,"position",e.position),v.CSS.setPropertyValue(u,"fontSize",e.fontSize),v.CSS.setPropertyValue(u,"overflow","hidden"),v.CSS.setPropertyValue(u,"overflowX","hidden"),v.CSS.setPropertyValue(u,"overflowY","hidden"),v.CSS.setPropertyValue(u,"boxSizing","content-box"),v.CSS.setPropertyValue(u,"paddingLeft",s+"em"),v.CSS.setPropertyValue(u,"minWidth",s+"%"),v.CSS.setPropertyValue(u,"maxWidth",s+"%"),v.CSS.setPropertyValue(u,"width",s+"%"),v.CSS.setPropertyValue(u,"minHeight",s+"%"),v.CSS.setPropertyValue(u,"maxHeight",s+"%"),v.CSS.setPropertyValue(u,"height",s+"%"),l.percentToPxWidth=N.lastPercentToPxWidth=(parseFloat(b.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=N.lastPercentToPxHeight=(parseFloat(b.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=N.lastEmToPx=(parseFloat(b.getPropertyValue(u,"paddingLeft"))||1)/s,e.myParent.removeChild(u)}return null===N.remToPx&&(N.remToPx=parseFloat(b.getPropertyValue(a.body,"fontSize"))||16),null===N.vwToPx&&(N.vwToPx=parseFloat(r.innerWidth)/100,N.vhToPx=parseFloat(r.innerHeight)/100),l.remToPx=N.remToPx,l.vwToPx=N.vwToPx,l.vhToPx=N.vhToPx,v.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),t),l}if(s.begin&&0===V)try{s.begin.call(m,m)}catch(P){setTimeout(function(){throw P},1)}if("scroll"===T){var w=/^x$/i.test(s.axis)?"Left":"Top",k=parseFloat(s.offset)||0,E,F,A;s.container?h.isWrapped(s.container)||h.isNode(s.container)?(s.container=s.container[0]||s.container,E=s.container["scroll"+w],A=E+$(t).position()[w.toLowerCase()]+k):s.container=null:(E=v.State.scrollAnchor[v.State["scrollProperty"+w]],F=v.State.scrollAnchor[v.State["scrollProperty"+("Left"===w?"Top":"Left")]],A=$(t).offset()[w.toLowerCase()]+k),c={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:A,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:w,alternateValue:F}},element:t},v.debug&&console.log("tweensContainer (scroll): ",c.scroll,t)}else if("reverse"===T){if(!n(t).tweensContainer)return void $.dequeue(t,s.queue);"none"===n(t).opts.display&&(n(t).opts.display="block"),"hidden"===n(t).opts.visibility&&(n(t).opts.visibility="visible"),n(t).opts.loop=!1,n(t).opts.begin=null,n(t).opts.complete=null,S.easing||delete s.easing,S.duration||delete s.duration,s=$.extend({},n(t).opts,s);var j=$.extend(!0,{},n(t).tweensContainer);for(var L in j)if("element"!==L){var z=j[L].startValue;j[L].startValue=j[L].currentValue=j[L].endValue,j[L].endValue=z,h.isEmptyObject(S)||(j[L].easing=s.easing),v.debug&&console.log("reverse tweensContainer ("+L+"): "+JSON.stringify(j[L]),t)}c=j}else if("start"===T){var j;n(t).tweensContainer&&n(t).isAnimating===!0&&(j=n(t).tweensContainer),$.each(y,function(e,t){if(RegExp("^"+b.Lists.colors.join("$|^")+"$").test(e)){var r=d(t,!0),a=r[0],i=r[1],n=r[2];if(b.RegEx.isHex.test(a)){for(var s=["Red","Green","Blue"],l=b.Values.hexToRgb(a),u=n?b.Values.hexToRgb(n):o,c=0;c1e4&&(v.State.calls=i(v.State.calls)),v.State.calls.push([H,m,s,null,C.resolver]),v.State.isTicking===!1&&(v.State.isTicking=!0,u())):V++)}var t=this,s=$.extend({},v.defaults,S),c={},p;if(n(t)===o&&v.init(t),parseFloat(s.delay)&&s.queue!==!1&&$.queue(t,s.queue,function(e){v.velocityQueueEntryFlag=!0,n(t).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}}),v.mock===!0)s.duration=1;else switch(s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=d;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}s.easing=l(s.easing,s.duration),s.begin&&!h.isFunction(s.begin)&&(s.begin=null),s.progress&&!h.isFunction(s.progress)&&(s.progress=null),s.complete&&!h.isFunction(s.complete)&&(s.complete=null),s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=v.CSS.Values.getDisplayType(t))),s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&v.State.isMobile&&!v.State.isGingerbread,s.queue===!1?s.delay?setTimeout(e,s.delay):e():$.queue(t,s.queue,function(t,r){return r===!0?(C.promise&&C.resolver(m),!0):(v.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===$.queue(t)[0]||$.dequeue(t)}var s=arguments[0]&&($.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||h.isString(arguments[0].properties)),p,f,g,m,y,S;if(h.isWrapped(this)?(p=!1,g=0,m=this,f=this):(p=!0,g=1,m=s?arguments[0].elements:arguments[0]),m=h.isWrapped(m)?[].slice.call(m):m){s?(y=arguments[0].properties,S=arguments[0].options):(y=arguments[g],S=arguments[g+1]);var x=h.isArray(m)||h.isNodeList(m)?m.length:1,V=0;if("stop"!==y&&!$.isPlainObject(S)){var P=g+1;S={};for(var w=P;wz;z++){var M={delay:j.delay};z===L-1&&(M.display=j.display,M.visibility=j.visibility,M.complete=j.complete),v(m,"reverse",M)}return e()}};v=$.extend(V,v),v.animate=V,v.State.isMobile||a.hidden===o||a.addEventListener("visibilitychange",function(){a.hidden?(y=function(e){return setTimeout(function(){e(!0)},16)},u()):y=r.requestAnimationFrame||m});var P;return e&&e.fn!==o?P=e:r.Zepto&&(P=r.Zepto),(P||r).Velocity=v,P&&(P.fn.velocity=V,P.fn.velocity.defaults=v.defaults),$.each(["Down","Up"],function(e,t){v.Sequences["slide"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={height:null,marginTop:null,marginBottom:null,paddingTop:null,paddingBottom:null,overflow:null,overflowX:null,overflowY:null},u=s.begin,c=s.complete,p=!1;null!==s.display&&(s.display="Down"===t?s.display||"auto":s.display||"none"),s.begin=function(){function r(){l.height=parseFloat(v.CSS.getPropertyValue(e,"height")),e.style.height="auto",parseFloat(v.CSS.getPropertyValue(e,"height"))===l.height&&(p=!0),v.CSS.setPropertyValue(e,"height",l.height+"px")}if("Down"===t){l.overflow=[v.CSS.getPropertyValue(e,"overflow"),0],l.overflowX=[v.CSS.getPropertyValue(e,"overflowX"),0],l.overflowY=[v.CSS.getPropertyValue(e,"overflowY"),0],e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden",r();for(var a in l)if(!/^overflow/.test(a)){var o=v.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[o,0]}}else{r();for(var a in l){var o=v.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[0,o]}e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden"}u&&u.call(e,e)},s.complete=function(e){var r="Down"===t?0:1;p===!0?l.height[r]="auto":l.height[r]+="px";for(var a in l)e.style[a]=l[a][r];c&&c.call(e,e),n&&n.resolver(i||e)},v(e,l,s)}}),$.each(["In","Out"],function(e,t){v.Sequences["fade"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={opacity:"In"===t?1:0};if(a!==o-1)s.complete=s.begin=null;else{var u=s.complete;s.complete=function(){u&&u.call(e,e),n&&n.resolver(i||e)}}null!==s.display&&(s.display=s.display||("In"===t?"auto":"none")),v(this,l,s)}}),v}(e||window,window,document)}); \ No newline at end of file +/*! VelocityJS.org (0.11.6). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ +!function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e(window.Velocity?void 0:require("jquery")):"function"==typeof define&&define.amd?window.Velocity?define("velocity",e):define("velocity",["jquery"],e):e(window.jQuery)}(function(e){return function(t,r,a,o){function i(e){for(var t=-1,r=e?e.length:0,a=[];++tr;r++)if(S.State.calls[r]){var i=S.State.calls[r],n=i[0],l=i[2],u=i[3];u||(u=S.State.calls[r][3]=t-16);for(var f=Math.min((t-u)/l.duration,1),d=0,g=n.length;g>d;d++){var m=n[d],y=m.element;if(s(y)){var x=!1;l.display&&"none"!==l.display&&V.setPropertyValue(y,"display",l.display),l.visibility&&"hidden"!==l.visibility&&V.setPropertyValue(y,"visibility",l.visibility);for(var b in m)if("element"!==b){var P=m[b],w,C=v.isString(P.easing)?S.Easings[P.easing]:P.easing;if(w=1===f?P.endValue:P.startValue+(P.endValue-P.startValue)*C(f),P.currentValue=w,V.Hooks.registered[b]){var T=V.Hooks.getRoot(b),k=s(y).rootPropertyValueCache[T];k&&(P.rootPropertyValue=k)}var E=V.setPropertyValue(y,b,P.currentValue+(0===parseFloat(w)?"":P.unitType),P.rootPropertyValue,P.scrollData);V.Hooks.registered[b]&&(s(y).rootPropertyValueCache[T]=V.Normalizations.registered[T]?V.Normalizations.registered[T]("extract",null,E[1]):E[1]),"transform"===E[0]&&(x=!0)}l.mobileHA&&s(y).transformCache.translate3d===o&&(s(y).transformCache.translate3d="(0px, 0px, 0px)",x=!0),x&&V.flushTransformCache(y)}}l.display&&"none"!==l.display&&(S.State.calls[r][2].display=!1),l.visibility&&"hidden"!==l.visibility&&(S.State.calls[r][2].visibility=!1),l.progress&&l.progress.call(i[1],i[1],f,Math.max(0,u+l.duration-t),u),1===f&&p(r)}S.State.isTicking&&h(c)}function p(e,t){if(!S.State.calls[e])return!1;for(var r=S.State.calls[e][0],a=S.State.calls[e][1],i=S.State.calls[e][2],n=S.State.calls[e][4],l=!1,u=0,c=r.length;c>u;u++){var p=r[u].element;if(t||i.loop||("none"===i.display&&V.setPropertyValue(p,"display",i.display),"hidden"===i.visibility&&V.setPropertyValue(p,"visibility",i.visibility)),($.queue(p)[1]===o||!/\.velocityQueueEntryFlag/i.test($.queue(p)[1]))&&s(p)){s(p).isAnimating=!1,s(p).rootPropertyValueCache={};var f=!1;$.each(V.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,a=s(p).transformCache[t];s(p).transformCache[t]!==o&&new RegExp("^\\("+r+"[^.]").test(a)&&(f=!0,delete s(p).transformCache[t])}),i.mobileHA&&(f=!0,delete s(p).transformCache.translate3d),f&&V.flushTransformCache(p),V.Values.removeClass(p,"velocity-animating")}if(!t&&i.complete&&!i.loop&&u===c-1)try{i.complete.call(a,a)}catch(d){setTimeout(function(){throw d},1)}n&&i.loop!==!0&&n(a),i.loop!==!0||t||S(p,"reverse",{loop:!0,delay:i.delay}),i.queue!==!1&&$.dequeue(p,i.queue)}S.State.calls[e]=!1;for(var g=0,m=S.State.calls.length;m>g;g++)if(S.State.calls[g]!==!1){l=!0;break}l===!1&&(S.State.isTicking=!1,delete S.State.calls,S.State.calls=[])}var f="velocity",d=400,g="swing",m=function(){if(a.documentMode)return a.documentMode;for(var e=7;e>4;e--){var t=a.createElement("div");if(t.innerHTML="",t.getElementsByTagName("span").length)return t=null,e}return o}(),y=function(){var e=0;return r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||function(t){var r=(new Date).getTime(),a;return a=Math.max(0,16-(r-e)),e=r+a,setTimeout(function(){t(r+a)},a)}}(),h=r.requestAnimationFrame||y,v={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==o&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||r.Zepto&&r.Zepto.zepto.isZ(e))},isSVG:function(e){return r.SVGElement&&e instanceof SVGElement},isEmptyObject:function(e){var t;for(t in e)return!1;return!0}},$;if(e&&e.fn!==o?$=e:r.Velocity&&r.Velocity.Utilities&&($=r.Velocity.Utilities),!$)throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded.");if(t.Velocity!==o&&t.Velocity.Utilities==o)throw new Error("Velocity: Namespace is occupied.");if(7>=m){if(e)return void(e.fn.velocity=e.fn.animate);throw new Error("Velocity: For IE<=7, Velocity falls back to jQuery, which must first be loaded.")}if(8===m&&!e)throw new Error("Velocity: For IE8, Velocity requires jQuery proper to be loaded; Velocity's jQuery shim does not work with IE8.");var S={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:r.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:a.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:$,Sequences:{},Easings:{},Promise:r.Promise,defaults:{queue:"",duration:d,easing:g,begin:null,complete:null,progress:null,display:null,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){$.data(e,f,{isSVG:v.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},animate:null,hook:function(e,t,r){var a=o;return v.isWrapped(e)&&(e=[].slice.call(e)),$.each(n(e),function(e,i){if(s(i)===o&&S.init(i),r===o)a===o&&(a=S.CSS.getPropertyValue(i,t));else{var n=S.CSS.setPropertyValue(i,t,r);"transform"===n[0]&&S.CSS.flushTransformCache(i),a=n}}),a},mock:!1,version:{major:0,minor:11,patch:6},debug:!1};r.pageYOffset!==o?(S.State.scrollAnchor=r,S.State.scrollPropertyLeft="pageXOffset",S.State.scrollPropertyTop="pageYOffset"):(S.State.scrollAnchor=a.documentElement||a.body.parentNode||a.body,S.State.scrollPropertyLeft="scrollLeft",S.State.scrollPropertyTop="scrollTop");var x=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function r(e){return 3*e}function a(a,o,i){return((e(o,i)*a+t(o,i))*a+r(o))*a}function o(a,o,i){return 3*e(o,i)*a*a+2*t(o,i)*a+r(o)}return function(e,t,r,i){function n(t){for(var i=t,n=0;8>n;++n){var s=o(i,e,r);if(0===s)return i;var l=a(i,e,r)-t;i-=l/s}return i}if(4!==arguments.length)return!1;for(var s=0;4>s;++s)if("number"!=typeof arguments[s]||isNaN(arguments[s])||!isFinite(arguments[s]))return!1;return e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0),function(o){return e===t&&r===i?o:a(n(o),t,i)}}}(),b=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,a){var o={x:t.x+a.dx*r,v:t.v+a.dv*r,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function r(r,a){var o={dx:r.v,dv:e(r)},i=t(r,.5*a,o),n=t(r,.5*a,i),s=t(r,a,n),l=1/6*(o.dx+2*(i.dx+n.dx)+s.dx),u=1/6*(o.dv+2*(i.dv+n.dv)+s.dv);return r.x=r.x+l*a,r.v=r.v+u*a,r}return function a(e,t,o){var i={x:-1,v:0,tension:null,friction:null},n=[0],s=0,l=1e-4,u=.016,c,p,f;for(e=parseFloat(e)||500,t=parseFloat(t)||20,o=o||null,i.tension=e,i.friction=t,c=null!==o,c?(s=a(e,t),p=s/o*u):p=u;;)if(f=r(f||i,p),n.push(1+f.x),s+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return c?function(e){return n[e*(n.length-1)|0]}:s}}();!function(){S.Easings.linear=function(e){return e},S.Easings.swing=function(e){return.5-Math.cos(e*Math.PI)/2},S.Easings.spring=function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)},S.Easings.ease=x(.25,.1,.25,1),S.Easings["ease-in"]=x(.42,0,1,1),S.Easings["ease-out"]=x(0,0,.58,1),S.Easings["ease-in-out"]=x(.42,0,.58,1);var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,r){e[r]=function(e){return Math.pow(e,t+2)}}),$.extend(e,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,r=4;e<((t=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*t-2)/22-e,2)}}),$.each(e,function(e,t){S.Easings["easeIn"+e]=t,S.Easings["easeOut"+e]=function(e){return 1-t(1-e)},S.Easings["easeInOut"+e]=function(e){return.5>e?t(2*e)/2:1-t(-2*e+2)/2}})}();var V=S.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e=m)switch(e){case"name":return"filter";case"extract":var a=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=a?a[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=m||S.State.isGingerbread||(V.Lists.transformsBase=V.Lists.transformsBase.concat(V.Lists.transforms3D));for(var e=0;ea&&(a=1),i=!/(\d)$/i.test(a);break;case"skew":i=!/(deg|\d)$/i.test(a);break;case"rotate":i=!/(deg|\d)$/i.test(a)}return i||(s(r).transformCache[t]="("+a+")"),s(r).transformCache[t]}}}();for(var e=0;e=m||3!==i.split(" ").length||(i+=" 1"),i;case"inject":return 8>=m?4===a.split(" ").length&&(a=a.split(/\s+/).slice(0,3).join(" ")):3===a.split(" ").length&&(a+=" 1"),(8>=m?"rgb":"rgba")+"("+a.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||S.State.isAndroid&&!S.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(S.State.prefixMatches[e])return[S.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,a=t.length;a>r;r++){var o;if(o=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()}),v.isString(S.State.prefixElement.style[o]))return S.State.prefixMatches[e]=o,[o,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,a;return e=e.replace(t,function(e,t,r,a){return t+t+r+r+a+a}),a=r.exec(e),a?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,t,a,i){function n(e,t){function a(){u&&V.setPropertyValue(e,"display","none")}var l=0;if(8>=m)l=$.css(e,t);else{var u=!1;if(/^(width|height)$/.test(t)&&0===V.getPropertyValue(e,"display")&&(u=!0,V.setPropertyValue(e,"display",V.Values.getDisplayType(e))),!i){if("height"===t&&"border-box"!==V.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(V.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(V.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(V.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(V.getPropertyValue(e,"paddingBottom"))||0);return a(),c}if("width"===t&&"border-box"!==V.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(V.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(V.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(V.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(V.getPropertyValue(e,"paddingRight"))||0);return a(),p}}var f;f=s(e)===o?r.getComputedStyle(e,null):s(e).computedStyle?s(e).computedStyle:s(e).computedStyle=r.getComputedStyle(e,null),(m||S.State.isFirefox)&&"borderColor"===t&&(t="borderTopColor"),l=9===m&&"filter"===t?f.getPropertyValue(t):f[t],(""===l||null===l)&&(l=e.style[t]),a()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(t)){var d=n(e,"position");("fixed"===d||"absolute"===d&&/top|left/i.test(t))&&(l=$(e).position()[t]+"px")}return l}var l;if(V.Hooks.registered[t]){var u=t,c=V.Hooks.getRoot(u);a===o&&(a=V.getPropertyValue(e,V.Names.prefixCheck(c)[0])),V.Normalizations.registered[c]&&(a=V.Normalizations.registered[c]("extract",e,a)),l=V.Hooks.extractValue(u,a)}else if(V.Normalizations.registered[t]){var p,f;p=V.Normalizations.registered[t]("name",e),"transform"!==p&&(f=n(e,V.Names.prefixCheck(p)[0]),V.Values.isCSSNullValue(f)&&V.Hooks.templates[t]&&(f=V.Hooks.templates[t][1])),l=V.Normalizations.registered[t]("extract",e,f)}return/^[\d-]/.test(l)||(l=s(e)&&s(e).isSVG&&V.Names.SVGAttribute(t)?/^(height|width)$/i.test(t)?e.getBBox()[t]:e.getAttribute(t):n(e,V.Names.prefixCheck(t)[0])),V.Values.isCSSNullValue(l)&&(l=0),S.debug>=2&&console.log("Get "+t+": "+l),l},setPropertyValue:function(e,t,a,o,i){var n=t;if("scroll"===t)i.container?i.container["scroll"+i.direction]=a:"Left"===i.direction?r.scrollTo(a,i.alternateValue):r.scrollTo(i.alternateValue,a);else if(V.Normalizations.registered[t]&&"transform"===V.Normalizations.registered[t]("name",e))V.Normalizations.registered[t]("inject",e,a),n="transform",a=s(e).transformCache[t];else{if(V.Hooks.registered[t]){var l=t,u=V.Hooks.getRoot(t);o=o||V.getPropertyValue(e,u),a=V.Hooks.injectValue(l,a,o),t=u}if(V.Normalizations.registered[t]&&(a=V.Normalizations.registered[t]("inject",e,a),t=V.Normalizations.registered[t]("name",e)),n=V.Names.prefixCheck(t)[0],8>=m)try{e.style[n]=a}catch(c){S.debug&&console.log("Browser does not support ["+a+"] for ["+n+"]")}else s(e)&&s(e).isSVG&&V.Names.SVGAttribute(t)?e.setAttribute(t,a):e.style[n]=a;S.debug>=2&&console.log("Set "+t+" ("+n+"): "+a)}return[n,a]},flushTransformCache:function(e){function t(t){return parseFloat(V.getPropertyValue(e,t))}var r="";if((m||S.State.isAndroid&&!S.State.isChrome)&&s(e).isSVG){var a={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};$.each(s(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(r+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var o,i;$.each(s(e).transformCache,function(t){return o=s(e).transformCache[t],"transformPerspective"===t?(i=o,!0):(9===m&&"rotateZ"===t&&(t="rotate"),void(r+=t+o+" "))}),i&&(r="perspective"+i+" "+r)}V.setPropertyValue(e,"transform",r)}};V.Hooks.register(),V.Normalizations.register();var P=function(){function e(){return f?T.promise||null:g}function t(){function e(e){function f(e,r){var a=o,i=o,s=o;return v.isArray(e)?(a=e[0],!v.isArray(e[1])&&/^[\d-]/.test(e[1])||v.isFunction(e[1])||V.RegEx.isHex.test(e[1])?s=e[1]:(v.isString(e[1])&&!V.RegEx.isHex.test(e[1])||v.isArray(e[1]))&&(i=r?e[1]:u(e[1],n.duration),e[2]!==o&&(s=e[2]))):a=e,r||(i=i||n.easing),v.isFunction(a)&&(a=a.call(t,P,b)),v.isFunction(s)&&(s=s.call(t,P,b)),[a||0,i,s]}function d(e,t){var r,a;return a=(t||0).toString().toLowerCase().replace(/[%A-z]+$/,function(e){return r=e,""}),r||(r=V.Values.getUnitType(e)),[a,r]}function g(){var e={myParent:t.parentNode||a.body,position:V.getPropertyValue(t,"position"),fontSize:V.getPropertyValue(t,"fontSize")},o=e.position===N.lastPosition&&e.myParent===N.lastParent,i=e.fontSize===N.lastFontSize;N.lastParent=e.myParent,N.lastPosition=e.position,N.lastFontSize=e.fontSize;var n=100,l={};if(i&&o)l.emToPx=N.lastEmToPx,l.percentToPxWidth=N.lastPercentToPxWidth,l.percentToPxHeight=N.lastPercentToPxHeight;else{var u=s(t).isSVG?a.createElementNS("http://www.w3.org/2000/svg","rect"):a.createElement("div");S.init(u),e.myParent.appendChild(u),S.CSS.setPropertyValue(u,"position",e.position),S.CSS.setPropertyValue(u,"fontSize",e.fontSize),S.CSS.setPropertyValue(u,"overflow","hidden"),S.CSS.setPropertyValue(u,"overflowX","hidden"),S.CSS.setPropertyValue(u,"overflowY","hidden"),S.CSS.setPropertyValue(u,"boxSizing","content-box"),S.CSS.setPropertyValue(u,"paddingLeft",n+"em"),S.CSS.setPropertyValue(u,"minWidth",n+"%"),S.CSS.setPropertyValue(u,"maxWidth",n+"%"),S.CSS.setPropertyValue(u,"width",n+"%"),S.CSS.setPropertyValue(u,"minHeight",n+"%"),S.CSS.setPropertyValue(u,"maxHeight",n+"%"),S.CSS.setPropertyValue(u,"height",n+"%"),l.percentToPxWidth=N.lastPercentToPxWidth=(parseFloat(V.getPropertyValue(u,"width",null,!0))||1)/n,l.percentToPxHeight=N.lastPercentToPxHeight=(parseFloat(V.getPropertyValue(u,"height",null,!0))||1)/n,l.emToPx=N.lastEmToPx=(parseFloat(V.getPropertyValue(u,"paddingLeft"))||1)/n,e.myParent.removeChild(u)}return null===N.remToPx&&(N.remToPx=parseFloat(V.getPropertyValue(a.body,"fontSize"))||16),null===N.vwToPx&&(N.vwToPx=parseFloat(r.innerWidth)/100,N.vhToPx=parseFloat(r.innerHeight)/100),l.remToPx=N.remToPx,l.vwToPx=N.vwToPx,l.vhToPx=N.vhToPx,S.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),t),l}if(n.begin&&0===P)try{n.begin.call(y,y)}catch(m){setTimeout(function(){throw m},1)}if("scroll"===k){var w=/^x$/i.test(n.axis)?"Left":"Top",C=parseFloat(n.offset)||0,E,F,A;n.container?v.isWrapped(n.container)||v.isNode(n.container)?(n.container=n.container[0]||n.container,E=n.container["scroll"+w],A=E+$(t).position()[w.toLowerCase()]+C):n.container=null:(E=S.State.scrollAnchor[S.State["scrollProperty"+w]],F=S.State.scrollAnchor[S.State["scrollProperty"+("Left"===w?"Top":"Left")]],A=$(t).offset()[w.toLowerCase()]+C),l={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:A,unitType:"",easing:n.easing,scrollData:{container:n.container,direction:w,alternateValue:F}},element:t},S.debug&&console.log("tweensContainer (scroll): ",l.scroll,t)}else if("reverse"===k){if(!s(t).tweensContainer)return void $.dequeue(t,n.queue);"none"===s(t).opts.display&&(s(t).opts.display="block"),"hidden"===s(t).opts.visibility&&(s(t).opts.visibility="visible"),s(t).opts.loop=!1,s(t).opts.begin=null,s(t).opts.complete=null,x.easing||delete n.easing,x.duration||delete n.duration,n=$.extend({},s(t).opts,n);var H=$.extend(!0,{},s(t).tweensContainer);for(var L in H)if("element"!==L){var z=H[L].startValue;H[L].startValue=H[L].currentValue=H[L].endValue,H[L].endValue=z,v.isEmptyObject(x)||(H[L].easing=n.easing),S.debug&&console.log("reverse tweensContainer ("+L+"): "+JSON.stringify(H[L]),t)}l=H}else if("start"===k){var H;s(t).tweensContainer&&s(t).isAnimating===!0&&(H=s(t).tweensContainer),$.each(h,function(e,t){if(RegExp("^"+V.Lists.colors.join("$|^")+"$").test(e)){var r=f(t,!0),a=r[0],i=r[1],n=r[2];if(V.RegEx.isHex.test(a)){for(var s=["Red","Green","Blue"],l=V.Values.hexToRgb(a),u=n?V.Values.hexToRgb(n):o,c=0;c1e4&&(S.State.calls=i(S.State.calls)),S.State.calls.push([j,y,n,null,T.resolver]),S.State.isTicking===!1&&(S.State.isTicking=!0,c())):P++)}var t=this,n=$.extend({},S.defaults,x),l={},p;if(s(t)===o&&S.init(t),parseFloat(n.delay)&&n.queue!==!1&&$.queue(t,n.queue,function(e){S.velocityQueueEntryFlag=!0,s(t).delayTimer={setTimeout:setTimeout(e,parseFloat(n.delay)),next:e}}),S.mock===!0)n.duration=1;else switch(n.duration.toString().toLowerCase()){case"fast":n.duration=200;break;case"normal":n.duration=d;break;case"slow":n.duration=600;break;default:n.duration=parseFloat(n.duration)||1}n.easing=u(n.easing,n.duration),n.begin&&!v.isFunction(n.begin)&&(n.begin=null),n.progress&&!v.isFunction(n.progress)&&(n.progress=null),n.complete&&!v.isFunction(n.complete)&&(n.complete=null),n.display&&(n.display=n.display.toString().toLowerCase(),"auto"===n.display&&(n.display=S.CSS.Values.getDisplayType(t))),n.visibility&&(n.visibility=n.visibility.toString().toLowerCase()),n.mobileHA=n.mobileHA&&S.State.isMobile&&!S.State.isGingerbread,n.queue===!1?n.delay?setTimeout(e,n.delay):e():$.queue(t,n.queue,function(t,r){return r===!0?(T.promise&&T.resolver(y),!0):(S.velocityQueueEntryFlag=!0,void e(t))}),""!==n.queue&&"fx"!==n.queue||"inprogress"===$.queue(t)[0]||$.dequeue(t)}var l=arguments[0]&&($.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||v.isString(arguments[0].properties)),f,g,m,y,h,x;if(v.isWrapped(this)?(f=!1,m=0,y=this,g=this):(f=!0,m=1,y=l?arguments[0].elements:arguments[0]),y=v.isWrapped(y)?[].slice.call(y):y){l?(h=arguments[0].properties,x=arguments[0].options):(h=arguments[m],x=arguments[m+1]);var b=v.isArray(y)||v.isNodeList(y)?y.length:1,P=0;if("stop"!==h&&!$.isPlainObject(x)){var w=m+1;x={};for(var C=w;CM;M++){var R={delay:L.delay};M===z-1&&(R.display=L.display,R.visibility=L.visibility,R.complete=L.complete),S(y,"reverse",R)}return e()}};S=$.extend(P,S),S.animate=P,S.State.isMobile||a.hidden===o||a.addEventListener("visibilitychange",function(){a.hidden?(h=function(e){return setTimeout(function(){e(!0)},16)},c()):h=r.requestAnimationFrame||y});var w;return e&&e.fn!==o?w=e:r.Zepto&&(w=r.Zepto),(w||r).Velocity=S,w&&(w.fn.velocity=P,w.fn.velocity.defaults=S.defaults),$.each(["Down","Up"],function(e,t){S.Sequences["slide"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={height:null,marginTop:null,marginBottom:null,paddingTop:null,paddingBottom:null,overflow:null,overflowX:null,overflowY:null},u=s.begin,c=s.complete,p=!1;null!==s.display&&(s.display="Down"===t?s.display||"auto":s.display||"none"),s.begin=function(){function r(){l.height=parseFloat(S.CSS.getPropertyValue(e,"height")),e.style.height="auto",parseFloat(S.CSS.getPropertyValue(e,"height"))===l.height&&(p=!0),S.CSS.setPropertyValue(e,"height",l.height+"px")}if("Down"===t){l.overflow=[S.CSS.getPropertyValue(e,"overflow"),0],l.overflowX=[S.CSS.getPropertyValue(e,"overflowX"),0],l.overflowY=[S.CSS.getPropertyValue(e,"overflowY"),0],e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden",r();for(var a in l)if(!/^overflow/.test(a)){var o=S.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[o,0]}}else{r();for(var a in l){var o=S.CSS.getPropertyValue(e,a);"height"===a&&(o=parseFloat(o)),l[a]=[0,o]}e.style.overflow="hidden",e.style.overflowX="visible",e.style.overflowY="hidden"}u&&u.call(e,e)},s.complete=function(e){var r="Down"===t?0:1;p===!0?l.height[r]="auto":l.height[r]+="px";for(var a in l)e.style[a]=l[a][r];c&&c.call(e,e),n&&n.resolver(i||e)},S(e,l,s)}}),$.each(["In","Out"],function(e,t){S.Sequences["fade"+t]=function(e,r,a,o,i,n){var s=$.extend({},r),l={opacity:"In"===t?1:0};if(a!==o-1)s.complete=s.begin=null;else{var u=s.complete;s.complete=function(){u&&u.call(e,e),n&&n.resolver(i||e)}}null!==s.display&&(s.display=s.display||("In"===t?"auto":"none")),S(this,l,s)}}),S}(e||window,window,document)}); \ No newline at end of file diff --git a/packages/velocity/package.json b/packages/velocity/package.json index 838a6cc4..0a5899a9 100644 --- a/packages/velocity/package.json +++ b/packages/velocity/package.json @@ -1,6 +1,6 @@ { "name": "velocity-animate", - "version": "0.11.5", + "version": "0.11.6", "description": "Accelerated JavaScript animation.", "keywords": [ "velocity", diff --git a/packages/velocity/velocity.ui.js b/packages/velocity/velocity.ui.js index 694f5815..c447d630 100644 --- a/packages/velocity/velocity.ui.js +++ b/packages/velocity/velocity.ui.js @@ -2,7 +2,7 @@ Velocity UI Pack **********************/ -/* VelocityJS.org UI Pack (4.1.1). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */ +/* VelocityJS.org UI Pack (4.1.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */ (function() { @@ -36,7 +36,7 @@ parentNode; /* Sum the total height (including padding and margin) of all targeted elements. */ - Container.Velocity.Utilities.each(elements, function(i, element) { + Container.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) { if (stagger) { /* Increase the totalDuration by the successive delay amounts produced by the stagger option. */ totalDuration += i * stagger; @@ -116,7 +116,7 @@ /* Append promise resolving onto the user's sequence callback. */ function injectFinalCallbacks () { if ((sequenceOptions.display === undefined || sequenceOptions.display === "none") && /Out$/.test(effectName)) { - Container.Velocity.Utilities.each(elements, function(i, element) { + Container.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) { Container.Velocity.CSS.setPropertyValue(element, "display", "none"); }); } diff --git a/packages/velocity/velocity.ui.min.js b/packages/velocity/velocity.ui.min.js index 6dc5f81b..44eb94ba 100644 --- a/packages/velocity/velocity.ui.min.js +++ b/packages/velocity/velocity.ui.min.js @@ -1,2 +1,2 @@ -/* VelocityJS.org UI Pack (4.1.1). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */ -!function(){var t=window.jQuery||window.Zepto||window;if(!t.Velocity||!t.Velocity.Utilities)return void(window.console&&console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."));if(!t.Velocity.version||t.Velocity.version.major<=0&&t.Velocity.version.minor<=5&&t.Velocity.version.patch<=2){var a="Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";throw alert(a),new Error(a)}t.Velocity.RegisterUI=function(a,e){function r(a,e,r,i){var n=0,s;t.Velocity.Utilities.each(a,function(a,e){i&&(r+=a*i),s=e.parentNode,t.Velocity.Utilities.each(["height","paddingTop","paddingBottom","marginTop","marginBottom"],function(a,r){n+=parseFloat(t.Velocity.CSS.getPropertyValue(e,r))})}),t.Velocity.animate(s,{height:("In"===e?"+":"-")+"="+n},{queue:!1,easing:"ease-in-out",duration:r*("In"===e?.6:1)})}return t.Velocity.Sequences[a]=function(i,n,s,l,o,c){function u(){void 0!==n.display&&"none"!==n.display||!/Out$/.test(a)||t.Velocity.Utilities.each(o,function(a,e){t.Velocity.CSS.setPropertyValue(e,"display","none")}),n.complete&&n.complete.call(o,o),c&&c.resolver(o||i)}for(var f=s===l-1,p=0;p