materialize-sass 1.0.0.alpha1 → 1.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/materialize-sprockets.js +1 -1
  3. data/assets/javascripts/materialize.js +1162 -1218
  4. data/assets/javascripts/materialize/anime.min.js +417 -0
  5. data/assets/javascripts/materialize/buttons.js +49 -26
  6. data/assets/javascripts/materialize/cards.js +14 -8
  7. data/assets/javascripts/materialize/cash.js +3 -5
  8. data/assets/javascripts/materialize/chips.js +22 -19
  9. data/assets/javascripts/materialize/collapsible.js +53 -17
  10. data/assets/javascripts/materialize/datepicker.js +94 -78
  11. data/assets/javascripts/materialize/dropdown.js +33 -26
  12. data/assets/javascripts/materialize/extras/nouislider.js +1 -1
  13. data/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
  14. data/assets/javascripts/materialize/forms.js +17 -6
  15. data/assets/javascripts/materialize/global.js +17 -15
  16. data/assets/javascripts/materialize/materialbox.js +62 -35
  17. data/assets/javascripts/materialize/modal.js +50 -19
  18. data/assets/javascripts/materialize/range.js +40 -16
  19. data/assets/javascripts/materialize/scrollspy.js +9 -3
  20. data/assets/javascripts/materialize/select.js +62 -38
  21. data/assets/javascripts/materialize/sidenav.js +52 -18
  22. data/assets/javascripts/materialize/slider.js +56 -16
  23. data/assets/javascripts/materialize/tabs.js +35 -23
  24. data/assets/javascripts/materialize/timepicker.js +581 -579
  25. data/assets/javascripts/materialize/toasts.js +11 -7
  26. data/assets/javascripts/materialize/tooltip.js +16 -18
  27. data/assets/stylesheets/materialize.scss +3 -3
  28. data/assets/stylesheets/materialize/components/_buttons.scss +2 -2
  29. data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
  30. data/assets/stylesheets/materialize/components/{_color.scss → _color-variables.scss} +0 -42
  31. data/assets/stylesheets/materialize/components/_datepicker.scss +10 -4
  32. data/assets/stylesheets/materialize/components/_dropdown.scss +5 -0
  33. data/assets/stylesheets/materialize/components/_navbar.scss +3 -3
  34. data/assets/stylesheets/materialize/components/_pulse.scss +1 -1
  35. data/assets/stylesheets/materialize/components/_timepicker.scss +1 -0
  36. data/assets/stylesheets/materialize/components/_variables.scss +0 -1
  37. data/assets/stylesheets/materialize/components/forms/_input-fields.scss +6 -4
  38. data/assets/stylesheets/materialize/components/forms/_range.scss +3 -3
  39. data/assets/stylesheets/materialize/components/forms/_select.scss +7 -7
  40. data/assets/stylesheets/materialize/extras/nouislider.css +1 -1
  41. data/lib/materialize-sass/engine.rb +2 -0
  42. data/lib/materialize-sass/helpers.rb +38 -0
  43. data/lib/materialize-sass/version.rb +1 -1
  44. metadata +6 -5
  45. data/assets/javascripts/materialize/velocity.min.js +0 -782
  46. data/assets/stylesheets/materialize/components/_mixins.scss +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da0116a89a16685e6a1a32e1875b90f7c026ddb9
4
- data.tar.gz: 90514c64573927d32d41064affab0ec7cbc11d4a
3
+ metadata.gz: 2ac8f0bf7195902667bd08aa22953a47a340d3ec
4
+ data.tar.gz: 33e2ff8105cd58e7e9cc89d276731120a981c466
5
5
  SHA512:
6
- metadata.gz: '0519530964b7eb2b24c481902a4bcd731182b990fa866d2456b8b16cd4dd63790790a04d6381d1d0a8ab12abe39b02ef013625e1447ce841d76bab64bfdc24b0'
7
- data.tar.gz: 99504a3f9d20065f280e868b46001b4ce370abc220c875be7525529fed7596d15023cfa4f0688028b0ac19e939866d5d43c7821ad3a9381434669259f59a89cb
6
+ metadata.gz: bf13a0a9d03dfe882e2ef133c0e0357e91c8ba10e46d4586c06edd7164445b8b6f2978ecffba0d06b4cf2c57cd8a3ff3e2de7a4296a1210727102354d06b9024
7
+ data.tar.gz: 937614f9aa313749a8b8636951ba2703369ee5b09f50b255c5a4cbd4c0b1b20272504f7d7e04877b126b296c17f23a477eb3ca3cefbc3ad75ffeecb6379f04b1
@@ -1,6 +1,6 @@
1
1
  //= require ./materialize/cash
2
- //= require ./materialize/velocity.min
3
2
  //= require ./materialize/global
3
+ //= require ./materialize/anime.min
4
4
  //= require ./materialize/collapsible
5
5
  //= require ./materialize/dropdown
6
6
  //= require ./materialize/modal
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v1.0.0-alpha.1 (http://materializecss.com)
2
+ * Materialize v1.0.0-alpha.2 (http://materializecss.com)
3
3
  * Copyright 2014-2017 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -567,9 +567,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
567
567
 
568
568
  on: function (eventName, delegate, callback, runOnce) {
569
569
  // jshint ignore:line
570
-
571
570
  var originalCallback;
572
-
573
571
  if (!isString(eventName)) {
574
572
  for (var key in eventName) {
575
573
  this.on(key, delegate, eventName[key]);
@@ -591,11 +589,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
591
589
  originalCallback = callback;
592
590
  callback = function (e) {
593
591
  var t = e.target;
594
-
595
592
  while (!matches(t, delegate)) {
596
- if (t === this) {
593
+ if (t === this || t === null) {
597
594
  return t = false;
598
595
  }
596
+
599
597
  t = t.parentNode;
600
598
  }
601
599
 
@@ -999,788 +997,424 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
999
997
 
1000
998
  return cash;
1001
999
  });
1002
- ; /*! VelocityJS.org (1.4.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
1003
- /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
1004
- !function (a) {
1005
- "use strict";
1006
- function b(a) {
1007
- var b = a.length,
1008
- d = c.type(a);return "function" !== d && !c.isWindow(a) && (!(1 !== a.nodeType || !b) || "array" === d || 0 === b || "number" == typeof b && b > 0 && b - 1 in a);
1009
- }if (!a.jQuery) {
1010
- var c = function (a, b) {
1011
- return new c.fn.init(a, b);
1012
- };c.isWindow = function (a) {
1013
- return a && a === a.window;
1014
- }, c.type = function (a) {
1015
- return a ? "object" == typeof a || "function" == typeof a ? e[g.call(a)] || "object" : typeof a : a + "";
1016
- }, c.isArray = Array.isArray || function (a) {
1017
- return "array" === c.type(a);
1018
- }, c.isPlainObject = function (a) {
1019
- var b;if (!a || "object" !== c.type(a) || a.nodeType || c.isWindow(a)) return !1;try {
1020
- if (a.constructor && !f.call(a, "constructor") && !f.call(a.constructor.prototype, "isPrototypeOf")) return !1;
1021
- } catch (d) {
1022
- return !1;
1023
- }for (b in a) {}return void 0 === b || f.call(a, b);
1024
- }, c.each = function (a, c, d) {
1025
- var e,
1026
- f = 0,
1027
- g = a.length,
1028
- h = b(a);if (d) {
1029
- if (h) for (; f < g && (e = c.apply(a[f], d), e !== !1); f++) {} else for (f in a) {
1030
- if (a.hasOwnProperty(f) && (e = c.apply(a[f], d), e === !1)) break;
1031
- }
1032
- } else if (h) for (; f < g && (e = c.call(a[f], f, a[f]), e !== !1); f++) {} else for (f in a) {
1033
- if (a.hasOwnProperty(f) && (e = c.call(a[f], f, a[f]), e === !1)) break;
1034
- }return a;
1035
- }, c.data = function (a, b, e) {
1036
- if (void 0 === e) {
1037
- var f = a[c.expando],
1038
- g = f && d[f];if (void 0 === b) return g;if (g && b in g) return g[b];
1039
- } else if (void 0 !== b) {
1040
- var h = a[c.expando] || (a[c.expando] = ++c.uuid);return d[h] = d[h] || {}, d[h][b] = e, e;
1041
- }
1042
- }, c.removeData = function (a, b) {
1043
- var e = a[c.expando],
1044
- f = e && d[e];f && (b ? c.each(b, function (a, b) {
1045
- delete f[b];
1046
- }) : delete d[e]);
1047
- }, c.extend = function () {
1048
- var a,
1049
- b,
1050
- d,
1051
- e,
1052
- f,
1053
- g,
1054
- h = arguments[0] || {},
1055
- i = 1,
1056
- j = arguments.length,
1057
- k = !1;for ("boolean" == typeof h && (k = h, h = arguments[i] || {}, i++), "object" != typeof h && "function" !== c.type(h) && (h = {}), i === j && (h = this, i--); i < j; i++) {
1058
- if (f = arguments[i]) for (e in f) {
1059
- f.hasOwnProperty(e) && (a = h[e], d = f[e], h !== d && (k && d && (c.isPlainObject(d) || (b = c.isArray(d))) ? (b ? (b = !1, g = a && c.isArray(a) ? a : []) : g = a && c.isPlainObject(a) ? a : {}, h[e] = c.extend(k, g, d)) : void 0 !== d && (h[e] = d)));
1060
- }
1061
- }return h;
1062
- }, c.queue = function (a, d, e) {
1063
- function f(a, c) {
1064
- var d = c || [];return a && (b(Object(a)) ? !function (a, b) {
1065
- for (var c = +b.length, d = 0, e = a.length; d < c;) {
1066
- a[e++] = b[d++];
1067
- }if (c !== c) for (; void 0 !== b[d];) {
1068
- a[e++] = b[d++];
1069
- }return a.length = e, a;
1070
- }(d, "string" == typeof a ? [a] : a) : [].push.call(d, a)), d;
1071
- }if (a) {
1072
- d = (d || "fx") + "queue";var g = c.data(a, d);return e ? (!g || c.isArray(e) ? g = c.data(a, d, f(e)) : g.push(e), g) : g || [];
1073
- }
1074
- }, c.dequeue = function (a, b) {
1075
- c.each(a.nodeType ? [a] : a, function (a, d) {
1076
- b = b || "fx";var e = c.queue(d, b),
1077
- f = e.shift();"inprogress" === f && (f = e.shift()), f && ("fx" === b && e.unshift("inprogress"), f.call(d, function () {
1078
- c.dequeue(d, b);
1079
- }));
1080
- });
1081
- }, c.fn = c.prototype = { init: function (a) {
1082
- if (a.nodeType) return this[0] = a, this;throw new Error("Not a DOM node.");
1083
- }, offset: function () {
1084
- var b = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };return { top: b.top + (a.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0), left: b.left + (a.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0) };
1085
- }, position: function () {
1086
- function a(a) {
1087
- for (var b = a.offsetParent; b && "html" !== b.nodeName.toLowerCase() && b.style && "static" === b.style.position;) {
1088
- b = b.offsetParent;
1089
- }return b || document;
1090
- }var b = this[0],
1091
- d = a(b),
1092
- e = this.offset(),
1093
- f = /^(?:body|html)$/i.test(d.nodeName) ? { top: 0, left: 0 } : c(d).offset();return e.top -= parseFloat(b.style.marginTop) || 0, e.left -= parseFloat(b.style.marginLeft) || 0, d.style && (f.top += parseFloat(d.style.borderTopWidth) || 0, f.left += parseFloat(d.style.borderLeftWidth) || 0), { top: e.top - f.top, left: e.left - f.left };
1094
- } };var d = {};c.expando = "velocity" + new Date().getTime(), c.uuid = 0;for (var e = {}, f = e.hasOwnProperty, g = e.toString, h = "Boolean Number String Function Array Date RegExp Object Error".split(" "), i = 0; i < h.length; i++) {
1095
- e["[object " + h[i] + "]"] = h[i].toLowerCase();
1096
- }c.fn.init.prototype = c.fn, a.Velocity = { Utilities: c };
1000
+ ; /*
1001
+ v2.2.0
1002
+ 2017 Julian Garnier
1003
+ Released under the MIT license
1004
+ */
1005
+ var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) {
1006
+ if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value);
1007
+ };$jscomp.getGlobal = function (e) {
1008
+ return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e;
1009
+ };$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
1010
+ $jscomp.initSymbol = function () {
1011
+ $jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol);
1012
+ };$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) {
1013
+ return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++;
1014
+ };
1015
+ $jscomp.initSymbolIterator = function () {
1016
+ $jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () {
1017
+ return $jscomp.arrayIterator(this);
1018
+ } });$jscomp.initSymbolIterator = function () {};
1019
+ };$jscomp.arrayIterator = function (e) {
1020
+ var r = 0;return $jscomp.iteratorPrototype(function () {
1021
+ return r < e.length ? { done: !1, value: e[r++] } : { done: !0 };
1022
+ });
1023
+ };
1024
+ $jscomp.iteratorPrototype = function (e) {
1025
+ $jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () {
1026
+ return this;
1027
+ };return e;
1028
+ };$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) {
1029
+ $jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0,
1030
+ m = { next: function () {
1031
+ if (p < e.length) {
1032
+ var u = p++;return { value: r(u, e[u]), done: !1 };
1033
+ }m.next = function () {
1034
+ return { done: !0, value: void 0 };
1035
+ };return m.next();
1036
+ } };m[Symbol.iterator] = function () {
1037
+ return m;
1038
+ };return m;
1039
+ };
1040
+ $jscomp.polyfill = function (e, r, p, m) {
1041
+ if (r) {
1042
+ p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) {
1043
+ var u = e[m];u in p || (p[u] = {});p = p[u];
1044
+ }e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
1097
1045
  }
1098
- }(window), function (a) {
1099
- "use strict";
1100
- "object" == typeof module && "object" == typeof module.exports ? module.exports = a() : "function" == typeof define && define.amd ? define(a) : a();
1101
- }(function () {
1102
- "use strict";
1103
- return function (a, b, c, d) {
1104
- function e(a) {
1105
- for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) {
1106
- var e = a[b];e && d.push(e);
1107
- }return d;
1046
+ };$jscomp.polyfill("Array.prototype.keys", function (e) {
1047
+ return e ? e : function () {
1048
+ return $jscomp.iteratorFromArray(this, function (e) {
1049
+ return e;
1050
+ });
1051
+ };
1052
+ }, "es6-impl", "es3");var $jscomp$this = this;
1053
+ (function (e, r) {
1054
+ e.anime = r();
1055
+ })(this, function () {
1056
+ function e(a) {
1057
+ if (!h.col(a)) try {
1058
+ return document.querySelectorAll(a);
1059
+ } catch (c) {}
1060
+ }function r(a, c) {
1061
+ for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) {
1062
+ if (n in a) {
1063
+ var k = a[n];c.call(b, k, n, a) && f.push(k);
1064
+ }
1065
+ }return f;
1066
+ }function p(a) {
1067
+ return a.reduce(function (a, d) {
1068
+ return a.concat(h.arr(d) ? p(d) : d);
1069
+ }, []);
1070
+ }function m(a) {
1071
+ if (h.arr(a)) return a;
1072
+ h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
1073
+ }function u(a, c) {
1074
+ return a.some(function (a) {
1075
+ return a === c;
1076
+ });
1077
+ }function C(a) {
1078
+ var c = {},
1079
+ d;for (d in a) {
1080
+ c[d] = a[d];
1081
+ }return c;
1082
+ }function D(a, c) {
1083
+ var d = C(a),
1084
+ b;for (b in a) {
1085
+ d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
1086
+ }return d;
1087
+ }function z(a, c) {
1088
+ var d = C(a),
1089
+ b;for (b in c) {
1090
+ d[b] = h.und(a[b]) ? c[b] : a[b];
1091
+ }return d;
1092
+ }function T(a) {
1093
+ a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
1094
+ return c + c + d + d + k + k;
1095
+ });var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
1096
+ a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
1097
+ c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
1098
+ }function U(a) {
1099
+ function c(a, c, b) {
1100
+ 0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
1101
+ }var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
1102
+ f = parseInt(d[3]) / 100,
1103
+ d = d[4] || 1;if (0 == b) f = b = a = f;else {
1104
+ var n = .5 > f ? f * (1 + b) : f + b - f * b,
1105
+ k = 2 * f - n,
1106
+ f = c(k, n, a + 1 / 3),
1107
+ b = c(k, n, a);a = c(k, n, a - 1 / 3);
1108
+ }return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
1109
+ }function y(a) {
1110
+ if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
1111
+ }function V(a) {
1112
+ if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
1113
+ }function I(a, c) {
1114
+ return h.fnc(a) ? a(c.target, c.id, c.total) : a;
1115
+ }function E(a, c) {
1116
+ if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
1117
+ }function J(a, c) {
1118
+ if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
1119
+ }function X(a, c) {
1120
+ var d = V(c),
1121
+ d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
1122
+ f.push(b[1]), n.push(b[2]);
1123
+ }a = r(n, function (a, b) {
1124
+ return f[b] === c;
1125
+ });return a.length ? a[0] : d;
1126
+ }function K(a, c) {
1127
+ switch (J(a, c)) {case "transform":
1128
+ return X(a, c);case "css":
1129
+ return E(a, c);case "attribute":
1130
+ return a.getAttribute(c);}return a[c] || 0;
1131
+ }function L(a, c) {
1132
+ var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
1133
+ return c + a + b;case "-":
1134
+ return c - a + b;case "*":
1135
+ return c * a + b;}
1136
+ }function F(a, c) {
1137
+ return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
1138
+ }function M(a) {
1139
+ a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
1140
+ var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
1141
+ }return c;
1142
+ }function N(a) {
1143
+ if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
1144
+ return 2 * Math.PI * a.getAttribute("r");case "rect":
1145
+ return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
1146
+ return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
1147
+ return M(a);case "polygon":
1148
+ var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
1149
+ }function Y(a, c) {
1150
+ function d(b) {
1151
+ b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
1152
+ }var b = d(),
1153
+ f = d(-1),
1154
+ n = d(1);switch (a.property) {case "x":
1155
+ return b.x;case "y":
1156
+ return b.y;
1157
+ case "angle":
1158
+ return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
1159
+ }function O(a, c) {
1160
+ var d = /-?\d*\.?\d+/g,
1161
+ b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
1162
+ if (h.rgb(b)) {
1163
+ var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
1164
+ } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
1165
+ } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
1166
+ }function P(a) {
1167
+ a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
1168
+ return b.indexOf(a) === d;
1169
+ });
1170
+ }function Z(a) {
1171
+ var c = P(a);return c.map(function (a, b) {
1172
+ return { target: a, id: b, total: c.length };
1173
+ });
1174
+ }function aa(a, c) {
1175
+ var d = C(c);if (h.arr(a)) {
1176
+ var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
1177
+ }return m(a).map(function (a, b) {
1178
+ b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
1179
+ }).map(function (a) {
1180
+ return z(a, d);
1181
+ });
1182
+ }function ba(a, c) {
1183
+ var d = {},
1184
+ b;for (b in a) {
1185
+ var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
1186
+ return I(a, c);
1187
+ }), 1 === f.length && (f = f[0]));d[b] = f;
1188
+ }d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
1189
+ }function ca(a) {
1190
+ return h.arr(a) ? A.apply(this, a) : Q[a];
1191
+ }function da(a, c) {
1192
+ var d;return a.tweens.map(function (b) {
1193
+ b = ba(b, c);var f = b.value,
1194
+ e = K(c.target, a.name),
1195
+ k = d ? d.to.original : e,
1196
+ k = h.arr(f) ? f[0] : k,
1197
+ w = L(h.arr(f) ? f[1] : f, k),
1198
+ e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
1199
+ });
1200
+ }function ea(a, c) {
1201
+ return r(p(a.map(function (a) {
1202
+ return c.map(function (b) {
1203
+ var c = J(a.target, b.name);if (c) {
1204
+ var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
1205
+ } else b = void 0;return b;
1206
+ });
1207
+ })), function (a) {
1208
+ return !h.und(a);
1209
+ });
1210
+ }function R(a, c, d, b) {
1211
+ var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
1212
+ return b[a];
1213
+ })) : f ? b.delay : d.offset + b.delay + b.duration;
1214
+ }function fa(a) {
1215
+ var c = D(ga, a),
1216
+ d = D(S, a),
1217
+ b = Z(a.targets),
1218
+ f = [],
1219
+ e = z(c, d),
1220
+ k;for (k in a) {
1221
+ e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
1222
+ }a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
1223
+ }function q(a) {
1224
+ function c() {
1225
+ return window.Promise && new Promise(function (a) {
1226
+ return p = a;
1227
+ });
1228
+ }function d(a) {
1229
+ return g.reversed ? g.duration - a : a;
1230
+ }function b(a) {
1231
+ for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
1232
+ var e = d[b],
1233
+ k = e.animatable,
1234
+ h = e.tweens,
1235
+ n = h.length - 1,
1236
+ l = h[n];n && (l = r(h, function (b) {
1237
+ return a < b.end;
1238
+ })[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
1239
+ var x = void 0,
1240
+ x = l.to.numbers[t],
1241
+ q = l.from.numbers[t],
1242
+ x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
1243
+ }if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
1244
+ p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
1245
+ } else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
1246
+ }if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
1247
+ H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
1248
+ }g.currentTime = a;g.progress = a / g.duration * 100;
1108
1249
  }function f(a) {
1109
- return t.isWrapped(a) ? a = s.call(a) : t.isNode(a) && (a = [a]), a;
1110
- }function g(a) {
1111
- var b = o.data(a, "velocity");return null === b ? d : b;
1112
- }function h(a, b) {
1113
- var c = g(a);c && c.delayTimer && !c.delayPaused && (c.delayRemaining = c.delay - b + c.delayBegin, c.delayPaused = !0, clearTimeout(c.delayTimer.setTimeout));
1114
- }function i(a, b) {
1115
- var c = g(a);c && c.delayTimer && c.delayPaused && (c.delayPaused = !1, c.delayTimer.setTimeout = setTimeout(c.delayTimer.next, c.delayRemaining));
1116
- }function j(a) {
1117
- return function (b) {
1118
- return Math.round(b * a) * (1 / a);
1119
- };
1120
- }function k(a, c, d, e) {
1121
- function f(a, b) {
1122
- return 1 - 3 * b + 3 * a;
1123
- }function g(a, b) {
1124
- return 3 * b - 6 * a;
1125
- }function h(a) {
1126
- return 3 * a;
1127
- }function i(a, b, c) {
1128
- return ((f(b, c) * a + g(b, c)) * a + h(b)) * a;
1129
- }function j(a, b, c) {
1130
- return 3 * f(b, c) * a * a + 2 * g(b, c) * a + h(b);
1131
- }function k(b, c) {
1132
- for (var e = 0; e < p; ++e) {
1133
- var f = j(c, a, d);if (0 === f) return c;var g = i(c, a, d) - b;c -= g / f;
1134
- }return c;
1135
- }function l() {
1136
- for (var b = 0; b < t; ++b) {
1137
- x[b] = i(b * u, a, d);
1138
- }
1139
- }function m(b, c, e) {
1140
- var f,
1141
- g,
1142
- h = 0;do {
1143
- g = c + (e - c) / 2, f = i(g, a, d) - b, f > 0 ? e = g : c = g;
1144
- } while (Math.abs(f) > r && ++h < s);return g;
1145
- }function n(b) {
1146
- for (var c = 0, e = 1, f = t - 1; e !== f && x[e] <= b; ++e) {
1147
- c += u;
1148
- }--e;var g = (b - x[e]) / (x[e + 1] - x[e]),
1149
- h = c + g * u,
1150
- i = j(h, a, d);return i >= q ? k(b, h) : 0 === i ? h : m(b, c, c + u);
1151
- }function o() {
1152
- y = !0, a === c && d === e || l();
1153
- }var p = 4,
1154
- q = .001,
1155
- r = 1e-7,
1156
- s = 10,
1157
- t = 11,
1158
- u = 1 / (t - 1),
1159
- v = "Float32Array" in b;if (4 !== arguments.length) return !1;for (var w = 0; w < 4; ++w) {
1160
- if ("number" != typeof arguments[w] || isNaN(arguments[w]) || !isFinite(arguments[w])) return !1;
1161
- }a = Math.min(a, 1), d = Math.min(d, 1), a = Math.max(a, 0), d = Math.max(d, 0);var x = v ? new Float32Array(t) : new Array(t),
1162
- y = !1,
1163
- z = function (b) {
1164
- return y || o(), a === c && d === e ? b : 0 === b ? 0 : 1 === b ? 1 : i(n(b), c, e);
1165
- };z.getControlPoints = function () {
1166
- return [{ x: a, y: c }, { x: d, y: e }];
1167
- };var A = "generateBezier(" + [a, c, d, e] + ")";return z.toString = function () {
1168
- return A;
1169
- }, z;
1170
- }function l(a, b) {
1171
- var c = a;return t.isString(a) ? x.Easings[a] || (c = !1) : c = t.isArray(a) && 1 === a.length ? j.apply(null, a) : t.isArray(a) && 2 === a.length ? y.apply(null, a.concat([b])) : !(!t.isArray(a) || 4 !== a.length) && k.apply(null, a), c === !1 && (c = x.Easings[x.defaults.easing] ? x.defaults.easing : w), c;
1172
- }function m(a) {
1173
- if (a) {
1174
- var b = x.timestamp && a !== !0 ? a : r.now(),
1175
- c = x.State.calls.length;c > 1e4 && (x.State.calls = e(x.State.calls), c = x.State.calls.length);for (var f = 0; f < c; f++) {
1176
- if (x.State.calls[f]) {
1177
- var h = x.State.calls[f],
1178
- i = h[0],
1179
- j = h[2],
1180
- k = h[3],
1181
- l = !!k,
1182
- q = null,
1183
- s = h[5],
1184
- u = h[6];if (k || (k = x.State.calls[f][3] = b - 16), s) {
1185
- if (s.resume !== !0) continue;k = h[3] = Math.round(b - u - 16), h[5] = null;
1186
- }u = h[6] = b - k;for (var v = Math.min(u / j.duration, 1), w = 0, y = i.length; w < y; w++) {
1187
- var A = i[w],
1188
- C = A.element;if (g(C)) {
1189
- var D = !1;if (j.display !== d && null !== j.display && "none" !== j.display) {
1190
- if ("flex" === j.display) {
1191
- var E = ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex"];o.each(E, function (a, b) {
1192
- z.setPropertyValue(C, "display", b);
1193
- });
1194
- }z.setPropertyValue(C, "display", j.display);
1195
- }j.visibility !== d && "hidden" !== j.visibility && z.setPropertyValue(C, "visibility", j.visibility);for (var F in A) {
1196
- if (A.hasOwnProperty(F) && "element" !== F) {
1197
- var G,
1198
- H = A[F],
1199
- I = t.isString(H.easing) ? x.Easings[H.easing] : H.easing;if (t.isString(H.pattern)) {
1200
- var J = 1 === v ? function (a, b, c) {
1201
- var d = H.endValue[b];return c ? Math.round(d) : d;
1202
- } : function (a, b, c) {
1203
- var d = H.startValue[b],
1204
- e = H.endValue[b] - d,
1205
- f = d + e * I(v, j, e);return c ? Math.round(f) : f;
1206
- };G = H.pattern.replace(/{(\d+)(!)?}/g, J);
1207
- } else if (1 === v) G = H.endValue;else {
1208
- var K = H.endValue - H.startValue;G = H.startValue + K * I(v, j, K);
1209
- }if (!l && G === H.currentValue) continue;if (H.currentValue = G, "tween" === F) q = G;else {
1210
- var L;if (z.Hooks.registered[F]) {
1211
- L = z.Hooks.getRoot(F);var M = g(C).rootPropertyValueCache[L];M && (H.rootPropertyValue = M);
1212
- }var N = z.setPropertyValue(C, F, H.currentValue + (p < 9 && 0 === parseFloat(G) ? "" : H.unitType), H.rootPropertyValue, H.scrollData);z.Hooks.registered[F] && (z.Normalizations.registered[L] ? g(C).rootPropertyValueCache[L] = z.Normalizations.registered[L]("extract", null, N[1]) : g(C).rootPropertyValueCache[L] = N[1]), "transform" === N[0] && (D = !0);
1213
- }
1214
- }
1215
- }j.mobileHA && g(C).transformCache.translate3d === d && (g(C).transformCache.translate3d = "(0px, 0px, 0px)", D = !0), D && z.flushTransformCache(C);
1216
- }
1217
- }j.display !== d && "none" !== j.display && (x.State.calls[f][2].display = !1), j.visibility !== d && "hidden" !== j.visibility && (x.State.calls[f][2].visibility = !1), j.progress && j.progress.call(h[1], h[1], v, Math.max(0, k + j.duration - b), k, q), 1 === v && n(f);
1218
- }
1219
- }
1220
- }x.State.isTicking && B(m);
1221
- }function n(a, b) {
1222
- if (!x.State.calls[a]) return !1;for (var c = x.State.calls[a][0], e = x.State.calls[a][1], f = x.State.calls[a][2], h = x.State.calls[a][4], i = !1, j = 0, k = c.length; j < k; j++) {
1223
- var l = c[j].element;b || f.loop || ("none" === f.display && z.setPropertyValue(l, "display", f.display), "hidden" === f.visibility && z.setPropertyValue(l, "visibility", f.visibility));var m = g(l);if (f.loop !== !0 && (o.queue(l)[1] === d || !/\.velocityQueueEntryFlag/i.test(o.queue(l)[1])) && m) {
1224
- m.isAnimating = !1, m.rootPropertyValueCache = {};var n = !1;o.each(z.Lists.transforms3D, function (a, b) {
1225
- var c = /^scale/.test(b) ? 1 : 0,
1226
- e = m.transformCache[b];m.transformCache[b] !== d && new RegExp("^\\(" + c + "[^.]").test(e) && (n = !0, delete m.transformCache[b]);
1227
- }), f.mobileHA && (n = !0, delete m.transformCache.translate3d), n && z.flushTransformCache(l), z.Values.removeClass(l, "velocity-animating");
1228
- }if (!b && f.complete && !f.loop && j === k - 1) try {
1229
- f.complete.call(e, e);
1230
- } catch (p) {
1231
- setTimeout(function () {
1232
- throw p;
1233
- }, 1);
1234
- }h && f.loop !== !0 && h(e), m && f.loop === !0 && !b && (o.each(m.tweensContainer, function (a, b) {
1235
- if (/^rotate/.test(a) && (parseFloat(b.startValue) - parseFloat(b.endValue)) % 360 === 0) {
1236
- var c = b.startValue;b.startValue = b.endValue, b.endValue = c;
1237
- }/^backgroundPosition/.test(a) && 100 === parseFloat(b.endValue) && "%" === b.unitType && (b.endValue = 0, b.startValue = 100);
1238
- }), x(l, "reverse", { loop: !0, delay: f.delay })), f.queue !== !1 && o.dequeue(l, f.queue);
1239
- }x.State.calls[a] = !1;for (var q = 0, r = x.State.calls.length; q < r; q++) {
1240
- if (x.State.calls[q] !== !1) {
1241
- i = !0;break;
1242
- }
1243
- }i === !1 && (x.State.isTicking = !1, delete x.State.calls, x.State.calls = []);
1244
- }var o,
1245
- p = function () {
1246
- if (c.documentMode) return c.documentMode;for (var a = 7; a > 4; a--) {
1247
- var b = c.createElement("div");if (b.innerHTML = "<!--[if IE " + a + "]><span></span><![endif]-->", b.getElementsByTagName("span").length) return b = null, a;
1248
- }return d;
1249
- }(),
1250
- q = function () {
1251
- var a = 0;return b.webkitRequestAnimationFrame || b.mozRequestAnimationFrame || function (b) {
1252
- var c,
1253
- d = new Date().getTime();return c = Math.max(0, 16 - (d - a)), a = d + c, setTimeout(function () {
1254
- b(d + c);
1255
- }, c);
1256
- };
1257
- }(),
1258
- r = function () {
1259
- var a = b.performance || {};if (!Object.prototype.hasOwnProperty.call(a, "now")) {
1260
- var c = a.timing && a.timing.domComplete ? a.timing.domComplete : new Date().getTime();a.now = function () {
1261
- return new Date().getTime() - c;
1250
+ if (g[a]) g[a](g);
1251
+ }function e() {
1252
+ g.remaining && !0 !== g.remaining && g.remaining--;
1253
+ }function k(a) {
1254
+ var k = g.duration,
1255
+ n = g.offset,
1256
+ w = n + g.delay,
1257
+ r = g.currentTime,
1258
+ x = g.reversed,
1259
+ q = d(a);if (g.children.length) {
1260
+ var u = g.children,
1261
+ v = u.length;
1262
+ if (q >= g.currentTime) for (var G = 0; G < v; G++) {
1263
+ u[G].seek(q);
1264
+ } else for (; v--;) {
1265
+ u[v].seek(q);
1266
+ }
1267
+ }if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
1268
+ }a = void 0 === a ? {} : a;var h,
1269
+ t,
1270
+ l = 0,
1271
+ p = null,
1272
+ m = c(),
1273
+ g = fa(a);g.reset = function () {
1274
+ var a = g.direction,
1275
+ c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
1276
+ g.children[a].reset();
1277
+ }
1278
+ };g.tick = function (a) {
1279
+ h = a;t || (t = h);k((l + h - t) * q.speed);
1280
+ };g.seek = function (a) {
1281
+ k(d(a));
1282
+ };g.pause = function () {
1283
+ var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
1284
+ };g.play = function () {
1285
+ g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
1286
+ };g.reverse = function () {
1287
+ g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
1288
+ };g.restart = function () {
1289
+ g.pause();
1290
+ g.reset();g.play();
1291
+ };g.finished = m;g.reset();g.autoplay && g.play();return g;
1292
+ }var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
1293
+ S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
1294
+ W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
1295
+ H,
1296
+ h = { arr: function (a) {
1297
+ return Array.isArray(a);
1298
+ }, obj: function (a) {
1299
+ return -1 < Object.prototype.toString.call(a).indexOf("Object");
1300
+ },
1301
+ pth: function (a) {
1302
+ return h.obj(a) && a.hasOwnProperty("totalLength");
1303
+ }, svg: function (a) {
1304
+ return a instanceof SVGElement;
1305
+ }, dom: function (a) {
1306
+ return a.nodeType || h.svg(a);
1307
+ }, str: function (a) {
1308
+ return "string" === typeof a;
1309
+ }, fnc: function (a) {
1310
+ return "function" === typeof a;
1311
+ }, und: function (a) {
1312
+ return "undefined" === typeof a;
1313
+ }, hex: function (a) {
1314
+ return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
1315
+ );
1316
+ }, rgb: function (a) {
1317
+ return (/^rgb/.test(a)
1318
+ );
1319
+ }, hsl: function (a) {
1320
+ return (/^hsl/.test(a)
1321
+ );
1322
+ }, col: function (a) {
1323
+ return h.hex(a) || h.rgb(a) || h.hsl(a);
1324
+ } },
1325
+ A = function () {
1326
+ function a(a, d, b) {
1327
+ return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
1328
+ }return function (c, d, b, f) {
1329
+ if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
1330
+ var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
1331
+ e[k] = a(.1 * k, c, b);
1332
+ }return function (k) {
1333
+ if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
1334
+ h += .1;
1335
+ }--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
1336
+ n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
1337
+ for (h = 0; 4 > h; ++h) {
1338
+ n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
1339
+ l = l - m / n;
1340
+ }k = l;
1341
+ } else if (0 === n) k = l;else {
1342
+ var l = h,
1343
+ h = h + .1,
1344
+ g = 0;do {
1345
+ m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
1346
+ } while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
1347
+ }return a(k, d, f);
1262
1348
  };
1263
- }return a;
1264
- }(),
1265
- s = function () {
1266
- var a = Array.prototype.slice;try {
1267
- a.call(c.documentElement);
1268
- } catch (b) {
1269
- a = function () {
1270
- for (var a = this.length, b = []; --a > 0;) {
1271
- b[a] = this[a];
1272
- }return cloned;
1349
+ }
1350
+ };
1351
+ }(),
1352
+ Q = function () {
1353
+ function a(a, b) {
1354
+ return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
1355
+ }var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
1356
+ d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) {
1357
+ return 1 - a(1 - b, c);
1358
+ }], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) {
1359
+ return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
1360
+ }] },
1361
+ b = { linear: A(.25, .25, .75, .75) },
1362
+ f = {},
1363
+ e;for (e in d) {
1364
+ f.type = e, d[f.type].forEach(function (a) {
1365
+ return function (d, f) {
1366
+ b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
1273
1367
  };
1274
- }return a;
1275
- }(),
1276
- t = { isNumber: function (a) {
1277
- return "number" == typeof a;
1278
- }, isString: function (a) {
1279
- return "string" == typeof a;
1280
- }, isArray: Array.isArray || function (a) {
1281
- return "[object Array]" === Object.prototype.toString.call(a);
1282
- }, isFunction: function (a) {
1283
- return "[object Function]" === Object.prototype.toString.call(a);
1284
- }, isNode: function (a) {
1285
- return a && a.nodeType;
1286
- }, isWrapped: function (a) {
1287
- return a && t.isNumber(a.length) && !t.isString(a) && !t.isFunction(a) && !t.isNode(a) && (0 === a.length || t.isNode(a[0]));
1288
- }, isSVG: function (a) {
1289
- return b.SVGElement && a instanceof b.SVGElement;
1290
- }, isEmptyObject: function (a) {
1291
- for (var b in a) {
1292
- if (a.hasOwnProperty(b)) return !1;
1293
- }return !0;
1294
- } },
1295
- u = !1;if (a.fn && a.fn.jquery ? (o = a, u = !0) : o = b.Velocity.Utilities, p <= 8 && !u) throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if (p <= 7) return void (jQuery.fn.velocity = jQuery.fn.animate);var v = 400,
1296
- w = "swing",
1297
- x = { 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: b.chrome, isFirefox: /Firefox/i.test(navigator.userAgent), prefixElement: c.createElement("div"), prefixMatches: {}, scrollAnchor: null, scrollPropertyLeft: null, scrollPropertyTop: null, isTicking: !1, calls: [], delayedElements: { count: 0 } }, CSS: {}, Utilities: o, Redirects: {}, Easings: {}, Promise: b.Promise, defaults: { queue: "", duration: v, easing: w, begin: d, complete: d, progress: d, display: d, visibility: d, loop: !1, delay: !1, mobileHA: !0, _cacheValues: !0, promiseRejectEmpty: !0 }, init: function (a) {
1298
- o.data(a, "velocity", { isSVG: t.isSVG(a), isAnimating: !1, computedStyle: null, tweensContainer: null, rootPropertyValueCache: {}, transformCache: {} });
1299
- }, hook: null, mock: !1, version: { major: 1, minor: 4, patch: 2 }, debug: !1, timestamp: !0, pauseAll: function (a) {
1300
- var b = new Date().getTime();o.each(x.State.calls, function (b, c) {
1301
- if (c) {
1302
- if (a !== d && (c[2].queue !== a || c[2].queue === !1)) return !0;c[5] = { resume: !1 };
1303
- }
1304
- }), o.each(x.State.delayedElements, function (a, c) {
1305
- c && h(c, b);
1306
- });
1307
- }, resumeAll: function (a) {
1308
- var b = new Date().getTime();o.each(x.State.calls, function (b, c) {
1309
- if (c) {
1310
- if (a !== d && (c[2].queue !== a || c[2].queue === !1)) return !0;c[5] && (c[5].resume = !0);
1311
- }
1312
- }), o.each(x.State.delayedElements, function (a, c) {
1313
- c && i(c, b);
1314
- });
1315
- } };b.pageYOffset !== d ? (x.State.scrollAnchor = b, x.State.scrollPropertyLeft = "pageXOffset", x.State.scrollPropertyTop = "pageYOffset") : (x.State.scrollAnchor = c.documentElement || c.body.parentNode || c.body, x.State.scrollPropertyLeft = "scrollLeft", x.State.scrollPropertyTop = "scrollTop");var y = function () {
1316
- function a(a) {
1317
- return -a.tension * a.x - a.friction * a.v;
1318
- }function b(b, c, d) {
1319
- var e = { x: b.x + d.dx * c, v: b.v + d.dv * c, tension: b.tension, friction: b.friction };return { dx: e.v, dv: a(e) };
1320
- }function c(c, d) {
1321
- var e = { dx: c.v, dv: a(c) },
1322
- f = b(c, .5 * d, e),
1323
- g = b(c, .5 * d, f),
1324
- h = b(c, d, g),
1325
- i = 1 / 6 * (e.dx + 2 * (f.dx + g.dx) + h.dx),
1326
- j = 1 / 6 * (e.dv + 2 * (f.dv + g.dv) + h.dv);return c.x = c.x + i * d, c.v = c.v + j * d, c;
1327
- }return function d(a, b, e) {
1328
- var f,
1329
- g,
1330
- h,
1331
- i = { x: -1, v: 0, tension: null, friction: null },
1332
- j = [0],
1333
- k = 0,
1334
- l = 1e-4,
1335
- m = .016;for (a = parseFloat(a) || 500, b = parseFloat(b) || 20, e = e || null, i.tension = a, i.friction = b, f = null !== e, f ? (k = d(a, b), g = k / e * m) : g = m;;) {
1336
- if (h = c(h || i, g), j.push(1 + h.x), k += 16, !(Math.abs(h.x) > l && Math.abs(h.v) > l)) break;
1337
- }return f ? function (a) {
1338
- return j[a * (j.length - 1) | 0];
1339
- } : k;
1340
- };
1341
- }();x.Easings = { linear: function (a) {
1342
- return a;
1343
- }, swing: function (a) {
1344
- return .5 - Math.cos(a * Math.PI) / 2;
1345
- }, spring: function (a) {
1346
- return 1 - Math.cos(4.5 * a * Math.PI) * Math.exp(6 * -a);
1347
- } }, o.each([["ease", [.25, .1, .25, 1]], ["ease-in", [.42, 0, 1, 1]], ["ease-out", [0, 0, .58, 1]], ["ease-in-out", [.42, 0, .58, 1]], ["easeInSine", [.47, 0, .745, .715]], ["easeOutSine", [.39, .575, .565, 1]], ["easeInOutSine", [.445, .05, .55, .95]], ["easeInQuad", [.55, .085, .68, .53]], ["easeOutQuad", [.25, .46, .45, .94]], ["easeInOutQuad", [.455, .03, .515, .955]], ["easeInCubic", [.55, .055, .675, .19]], ["easeOutCubic", [.215, .61, .355, 1]], ["easeInOutCubic", [.645, .045, .355, 1]], ["easeInQuart", [.895, .03, .685, .22]], ["easeOutQuart", [.165, .84, .44, 1]], ["easeInOutQuart", [.77, 0, .175, 1]], ["easeInQuint", [.755, .05, .855, .06]], ["easeOutQuint", [.23, 1, .32, 1]], ["easeInOutQuint", [.86, 0, .07, 1]], ["easeInExpo", [.95, .05, .795, .035]], ["easeOutExpo", [.19, 1, .22, 1]], ["easeInOutExpo", [1, 0, 0, 1]], ["easeInCirc", [.6, .04, .98, .335]], ["easeOutCirc", [.075, .82, .165, 1]], ["easeInOutCirc", [.785, .135, .15, .86]]], function (a, b) {
1348
- x.Easings[b[0]] = k.apply(null, b[1]);
1349
- });var z = x.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"], units: ["%", "em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax", "cm", "mm", "Q", "in", "pc", "pt", "px", "deg", "grad", "rad", "turn", "s", "ms"], colorNames: { aliceblue: "240,248,255", antiquewhite: "250,235,215", aquamarine: "127,255,212", aqua: "0,255,255", azure: "240,255,255", beige: "245,245,220", bisque: "255,228,196", black: "0,0,0", blanchedalmond: "255,235,205", blueviolet: "138,43,226", blue: "0,0,255", brown: "165,42,42", burlywood: "222,184,135", cadetblue: "95,158,160", chartreuse: "127,255,0", chocolate: "210,105,30", coral: "255,127,80", cornflowerblue: "100,149,237", cornsilk: "255,248,220", crimson: "220,20,60", cyan: "0,255,255", darkblue: "0,0,139", darkcyan: "0,139,139", darkgoldenrod: "184,134,11", darkgray: "169,169,169", darkgrey: "169,169,169", darkgreen: "0,100,0", darkkhaki: "189,183,107", darkmagenta: "139,0,139", darkolivegreen: "85,107,47", darkorange: "255,140,0", darkorchid: "153,50,204", darkred: "139,0,0", darksalmon: "233,150,122", darkseagreen: "143,188,143", darkslateblue: "72,61,139", darkslategray: "47,79,79", darkturquoise: "0,206,209", darkviolet: "148,0,211", deeppink: "255,20,147", deepskyblue: "0,191,255", dimgray: "105,105,105", dimgrey: "105,105,105", dodgerblue: "30,144,255", firebrick: "178,34,34", floralwhite: "255,250,240", forestgreen: "34,139,34", fuchsia: "255,0,255", gainsboro: "220,220,220", ghostwhite: "248,248,255", gold: "255,215,0", goldenrod: "218,165,32", gray: "128,128,128", grey: "128,128,128", greenyellow: "173,255,47", green: "0,128,0", honeydew: "240,255,240", hotpink: "255,105,180", indianred: "205,92,92", indigo: "75,0,130", ivory: "255,255,240", khaki: "240,230,140", lavenderblush: "255,240,245", lavender: "230,230,250", lawngreen: "124,252,0", lemonchiffon: "255,250,205", lightblue: "173,216,230", lightcoral: "240,128,128", lightcyan: "224,255,255", lightgoldenrodyellow: "250,250,210", lightgray: "211,211,211", lightgrey: "211,211,211", lightgreen: "144,238,144", lightpink: "255,182,193", lightsalmon: "255,160,122", lightseagreen: "32,178,170", lightskyblue: "135,206,250", lightslategray: "119,136,153", lightsteelblue: "176,196,222", lightyellow: "255,255,224", limegreen: "50,205,50", lime: "0,255,0", linen: "250,240,230", magenta: "255,0,255", maroon: "128,0,0", mediumaquamarine: "102,205,170", mediumblue: "0,0,205", mediumorchid: "186,85,211", mediumpurple: "147,112,219", mediumseagreen: "60,179,113", mediumslateblue: "123,104,238", mediumspringgreen: "0,250,154", mediumturquoise: "72,209,204", mediumvioletred: "199,21,133", midnightblue: "25,25,112", mintcream: "245,255,250", mistyrose: "255,228,225", moccasin: "255,228,181", navajowhite: "255,222,173", navy: "0,0,128", oldlace: "253,245,230", olivedrab: "107,142,35", olive: "128,128,0", orangered: "255,69,0", orange: "255,165,0", orchid: "218,112,214", palegoldenrod: "238,232,170", palegreen: "152,251,152", paleturquoise: "175,238,238", palevioletred: "219,112,147", papayawhip: "255,239,213", peachpuff: "255,218,185", peru: "205,133,63", pink: "255,192,203", plum: "221,160,221", powderblue: "176,224,230", purple: "128,0,128", red: "255,0,0", rosybrown: "188,143,143", royalblue: "65,105,225", saddlebrown: "139,69,19", salmon: "250,128,114", sandybrown: "244,164,96", seagreen: "46,139,87", seashell: "255,245,238", sienna: "160,82,45", silver: "192,192,192", skyblue: "135,206,235", slateblue: "106,90,205", slategray: "112,128,144", snow: "255,250,250", springgreen: "0,255,127", steelblue: "70,130,180", tan: "210,180,140", teal: "0,128,128", thistle: "216,191,216", tomato: "255,99,71", turquoise: "64,224,208", violet: "238,130,238", wheat: "245,222,179", whitesmoke: "245,245,245", white: "255,255,255", yellowgreen: "154,205,50", yellow: "255,255,0" } }, 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 () {
1350
- for (var a = 0; a < z.Lists.colors.length; a++) {
1351
- var b = "color" === z.Lists.colors[a] ? "0 0 0 1" : "255 255 255 1";z.Hooks.templates[z.Lists.colors[a]] = ["Red Green Blue Alpha", b];
1352
- }var c, d, e;if (p) for (c in z.Hooks.templates) {
1353
- if (z.Hooks.templates.hasOwnProperty(c)) {
1354
- d = z.Hooks.templates[c], e = d[0].split(" ");var f = d[1].match(z.RegEx.valueSplit);"Color" === e[0] && (e.push(e.shift()), f.push(f.shift()), z.Hooks.templates[c] = [e.join(" "), f.join(" ")]);
1355
- }
1356
- }for (c in z.Hooks.templates) {
1357
- if (z.Hooks.templates.hasOwnProperty(c)) {
1358
- d = z.Hooks.templates[c], e = d[0].split(" ");for (var g in e) {
1359
- if (e.hasOwnProperty(g)) {
1360
- var h = c + e[g],
1361
- i = g;z.Hooks.registered[h] = [c, i];
1362
- }
1363
- }
1364
- }
1365
- }
1366
- }, getRoot: function (a) {
1367
- var b = z.Hooks.registered[a];return b ? b[0] : a;
1368
- }, getUnit: function (a, b) {
1369
- var c = (a.substr(b || 0, 5).match(/^[a-z%]+/) || [])[0] || "";return c && z.Lists.units.indexOf(c) >= 0 ? c : "";
1370
- }, fixColors: function (a) {
1371
- return a.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g, function (a, b, c) {
1372
- return z.Lists.colorNames.hasOwnProperty(c) ? (b ? b : "rgba(") + z.Lists.colorNames[c] + (b ? "" : ",1)") : b + c;
1373
- });
1374
- }, cleanRootPropertyValue: function (a, b) {
1375
- return z.RegEx.valueUnwrap.test(b) && (b = b.match(z.RegEx.valueUnwrap)[1]), z.Values.isCSSNullValue(b) && (b = z.Hooks.templates[a][1]), b;
1376
- }, extractValue: function (a, b) {
1377
- var c = z.Hooks.registered[a];if (c) {
1378
- var d = c[0],
1379
- e = c[1];return b = z.Hooks.cleanRootPropertyValue(d, b), b.toString().match(z.RegEx.valueSplit)[e];
1380
- }return b;
1381
- }, injectValue: function (a, b, c) {
1382
- var d = z.Hooks.registered[a];if (d) {
1383
- var e,
1384
- f,
1385
- g = d[0],
1386
- h = d[1];return c = z.Hooks.cleanRootPropertyValue(g, c), e = c.toString().match(z.RegEx.valueSplit), e[h] = b, f = e.join(" ");
1387
- }return c;
1388
- } }, Normalizations: { registered: { clip: function (a, b, c) {
1389
- switch (a) {case "name":
1390
- return "clip";case "extract":
1391
- var d;return z.RegEx.wrappedValueAlreadyExtracted.test(c) ? d = c : (d = c.toString().match(z.RegEx.valueUnwrap), d = d ? d[1].replace(/,(\s+)?/g, " ") : c), d;case "inject":
1392
- return "rect(" + c + ")";}
1393
- }, blur: function (a, b, c) {
1394
- switch (a) {case "name":
1395
- return x.State.isFirefox ? "filter" : "-webkit-filter";case "extract":
1396
- var d = parseFloat(c);if (!d && 0 !== d) {
1397
- var e = c.toString().match(/blur\(([0-9]+[A-z]+)\)/i);d = e ? e[1] : 0;
1398
- }return d;case "inject":
1399
- return parseFloat(c) ? "blur(" + c + ")" : "none";}
1400
- }, opacity: function (a, b, c) {
1401
- if (p <= 8) switch (a) {case "name":
1402
- return "filter";case "extract":
1403
- var d = c.toString().match(/alpha\(opacity=(.*)\)/i);return c = d ? d[1] / 100 : 1;case "inject":
1404
- return b.style.zoom = 1, parseFloat(c) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(c), 10) + ")";} else switch (a) {case "name":
1405
- return "opacity";case "extract":
1406
- return c;case "inject":
1407
- return c;}
1408
- } }, register: function () {
1409
- function a(a, b, c) {
1410
- var d = "border-box" === z.getPropertyValue(b, "boxSizing").toString().toLowerCase();if (d === (c || !1)) {
1411
- var e,
1412
- f,
1413
- g = 0,
1414
- h = "width" === a ? ["Left", "Right"] : ["Top", "Bottom"],
1415
- i = ["padding" + h[0], "padding" + h[1], "border" + h[0] + "Width", "border" + h[1] + "Width"];for (e = 0; e < i.length; e++) {
1416
- f = parseFloat(z.getPropertyValue(b, i[e])), isNaN(f) || (g += f);
1417
- }return c ? -g : g;
1418
- }return 0;
1419
- }function b(b, c) {
1420
- return function (d, e, f) {
1421
- switch (d) {case "name":
1422
- return b;case "extract":
1423
- return parseFloat(f) + a(b, e, c);case "inject":
1424
- return parseFloat(f) - a(b, e, c) + "px";}
1425
- };
1426
- }p && !(p > 9) || x.State.isGingerbread || (z.Lists.transformsBase = z.Lists.transformsBase.concat(z.Lists.transforms3D));for (var c = 0; c < z.Lists.transformsBase.length; c++) {
1427
- !function () {
1428
- var a = z.Lists.transformsBase[c];z.Normalizations.registered[a] = function (b, c, e) {
1429
- switch (b) {case "name":
1430
- return "transform";case "extract":
1431
- return g(c) === d || g(c).transformCache[a] === d ? /^scale/i.test(a) ? 1 : 0 : g(c).transformCache[a].replace(/[()]/g, "");case "inject":
1432
- var f = !1;switch (a.substr(0, a.length - 1)) {case "translate":
1433
- f = !/(%|px|em|rem|vw|vh|\d)$/i.test(e);break;case "scal":case "scale":
1434
- x.State.isAndroid && g(c).transformCache[a] === d && e < 1 && (e = 1), f = !/(\d)$/i.test(e);break;case "skew":
1435
- f = !/(deg|\d)$/i.test(e);break;case "rotate":
1436
- f = !/(deg|\d)$/i.test(e);}return f || (g(c).transformCache[a] = "(" + e + ")"), g(c).transformCache[a];}
1437
- };
1438
- }();
1439
- }for (var e = 0; e < z.Lists.colors.length; e++) {
1440
- !function () {
1441
- var a = z.Lists.colors[e];z.Normalizations.registered[a] = function (b, c, e) {
1442
- switch (b) {case "name":
1443
- return a;case "extract":
1444
- var f;if (z.RegEx.wrappedValueAlreadyExtracted.test(e)) f = e;else {
1445
- var g,
1446
- h = { black: "rgb(0, 0, 0)", blue: "rgb(0, 0, 255)", gray: "rgb(128, 128, 128)", green: "rgb(0, 128, 0)", red: "rgb(255, 0, 0)", white: "rgb(255, 255, 255)" };/^[A-z]+$/i.test(e) ? g = h[e] !== d ? h[e] : h.black : z.RegEx.isHex.test(e) ? g = "rgb(" + z.Values.hexToRgb(e).join(" ") + ")" : /^rgba?\(/i.test(e) || (g = h.black), f = (g || e).toString().match(z.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ");
1447
- }return (!p || p > 8) && 3 === f.split(" ").length && (f += " 1"), f;case "inject":
1448
- return (/^rgb/.test(e) ? e : (p <= 8 ? 4 === e.split(" ").length && (e = e.split(/\s+/).slice(0, 3).join(" ")) : 3 === e.split(" ").length && (e += " 1"), (p <= 8 ? "rgb" : "rgba") + "(" + e.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")")
1449
- );}
1450
- };
1451
- }();
1452
- }z.Normalizations.registered.innerWidth = b("width", !0), z.Normalizations.registered.innerHeight = b("height", !0), z.Normalizations.registered.outerWidth = b("width"), z.Normalizations.registered.outerHeight = b("height");
1453
- } }, Names: { camelCase: function (a) {
1454
- return a.replace(/-(\w)/g, function (a, b) {
1455
- return b.toUpperCase();
1456
- });
1457
- }, SVGAttribute: function (a) {
1458
- var b = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return (p || x.State.isAndroid && !x.State.isChrome) && (b += "|transform"), new RegExp("^(" + b + ")$", "i").test(a);
1459
- }, prefixCheck: function (a) {
1460
- if (x.State.prefixMatches[a]) return [x.State.prefixMatches[a], !0];for (var b = ["", "Webkit", "Moz", "ms", "O"], c = 0, d = b.length; c < d; c++) {
1461
- var e;if (e = 0 === c ? a : b[c] + a.replace(/^\w/, function (a) {
1462
- return a.toUpperCase();
1463
- }), t.isString(x.State.prefixElement.style[e])) return x.State.prefixMatches[a] = e, [e, !0];
1464
- }return [a, !1];
1465
- } }, Values: { hexToRgb: function (a) {
1466
- var b,
1467
- c = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
1468
- d = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a = a.replace(c, function (a, b, c, d) {
1469
- return b + b + c + c + d + d;
1470
- }), b = d.exec(a), b ? [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)] : [0, 0, 0];
1471
- }, isCSSNullValue: function (a) {
1472
- return !a || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a);
1473
- }, getUnitType: function (a) {
1474
- return (/^(rotate|skew)/i.test(a) ? "deg" : /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a) ? "" : "px"
1475
- );
1476
- }, getDisplayType: function (a) {
1477
- var b = a && a.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(b) ? "inline" : /^(li)$/i.test(b) ? "list-item" : /^(tr)$/i.test(b) ? "table-row" : /^(table)$/i.test(b) ? "table" : /^(tbody)$/i.test(b) ? "table-row-group" : "block"
1478
- );
1479
- }, addClass: function (a, b) {
1480
- if (a) if (a.classList) a.classList.add(b);else if (t.isString(a.className)) a.className += (a.className.length ? " " : "") + b;else {
1481
- var c = a.getAttribute(p <= 7 ? "className" : "class") || "";a.setAttribute("class", c + (c ? " " : "") + b);
1482
- }
1483
- }, removeClass: function (a, b) {
1484
- if (a) if (a.classList) a.classList.remove(b);else if (t.isString(a.className)) a.className = a.className.toString().replace(new RegExp("(^|\\s)" + b.split(" ").join("|") + "(\\s|$)", "gi"), " ");else {
1485
- var c = a.getAttribute(p <= 7 ? "className" : "class") || "";a.setAttribute("class", c.replace(new RegExp("(^|s)" + b.split(" ").join("|") + "(s|$)", "gi"), " "));
1486
- }
1487
- } }, getPropertyValue: function (a, c, e, f) {
1488
- function h(a, c) {
1489
- var e = 0;if (p <= 8) e = o.css(a, c);else {
1490
- var i = !1;/^(width|height)$/.test(c) && 0 === z.getPropertyValue(a, "display") && (i = !0, z.setPropertyValue(a, "display", z.Values.getDisplayType(a)));var j = function () {
1491
- i && z.setPropertyValue(a, "display", "none");
1492
- };if (!f) {
1493
- if ("height" === c && "border-box" !== z.getPropertyValue(a, "boxSizing").toString().toLowerCase()) {
1494
- var k = a.offsetHeight - (parseFloat(z.getPropertyValue(a, "borderTopWidth")) || 0) - (parseFloat(z.getPropertyValue(a, "borderBottomWidth")) || 0) - (parseFloat(z.getPropertyValue(a, "paddingTop")) || 0) - (parseFloat(z.getPropertyValue(a, "paddingBottom")) || 0);return j(), k;
1495
- }if ("width" === c && "border-box" !== z.getPropertyValue(a, "boxSizing").toString().toLowerCase()) {
1496
- var l = a.offsetWidth - (parseFloat(z.getPropertyValue(a, "borderLeftWidth")) || 0) - (parseFloat(z.getPropertyValue(a, "borderRightWidth")) || 0) - (parseFloat(z.getPropertyValue(a, "paddingLeft")) || 0) - (parseFloat(z.getPropertyValue(a, "paddingRight")) || 0);return j(), l;
1497
- }
1498
- }var m;m = g(a) === d ? b.getComputedStyle(a, null) : g(a).computedStyle ? g(a).computedStyle : g(a).computedStyle = b.getComputedStyle(a, null), "borderColor" === c && (c = "borderTopColor"), e = 9 === p && "filter" === c ? m.getPropertyValue(c) : m[c], "" !== e && null !== e || (e = a.style[c]), j();
1499
- }if ("auto" === e && /^(top|right|bottom|left)$/i.test(c)) {
1500
- var n = h(a, "position");("fixed" === n || "absolute" === n && /top|left/i.test(c)) && (e = o(a).position()[c] + "px");
1501
- }return e;
1502
- }var i;if (z.Hooks.registered[c]) {
1503
- var j = c,
1504
- k = z.Hooks.getRoot(j);e === d && (e = z.getPropertyValue(a, z.Names.prefixCheck(k)[0])), z.Normalizations.registered[k] && (e = z.Normalizations.registered[k]("extract", a, e)), i = z.Hooks.extractValue(j, e);
1505
- } else if (z.Normalizations.registered[c]) {
1506
- var l, m;l = z.Normalizations.registered[c]("name", a), "transform" !== l && (m = h(a, z.Names.prefixCheck(l)[0]), z.Values.isCSSNullValue(m) && z.Hooks.templates[c] && (m = z.Hooks.templates[c][1])), i = z.Normalizations.registered[c]("extract", a, m);
1507
- }if (!/^[\d-]/.test(i)) {
1508
- var n = g(a);if (n && n.isSVG && z.Names.SVGAttribute(c)) {
1509
- if (/^(height|width)$/i.test(c)) try {
1510
- i = a.getBBox()[c];
1511
- } catch (q) {
1512
- i = 0;
1513
- } else i = a.getAttribute(c);
1514
- } else i = h(a, z.Names.prefixCheck(c)[0]);
1515
- }return z.Values.isCSSNullValue(i) && (i = 0), x.debug >= 2 && console.log("Get " + c + ": " + i), i;
1516
- }, setPropertyValue: function (a, c, d, e, f) {
1517
- var h = c;if ("scroll" === c) f.container ? f.container["scroll" + f.direction] = d : "Left" === f.direction ? b.scrollTo(d, f.alternateValue) : b.scrollTo(f.alternateValue, d);else if (z.Normalizations.registered[c] && "transform" === z.Normalizations.registered[c]("name", a)) z.Normalizations.registered[c]("inject", a, d), h = "transform", d = g(a).transformCache[c];else {
1518
- if (z.Hooks.registered[c]) {
1519
- var i = c,
1520
- j = z.Hooks.getRoot(c);e = e || z.getPropertyValue(a, j), d = z.Hooks.injectValue(i, d, e), c = j;
1521
- }if (z.Normalizations.registered[c] && (d = z.Normalizations.registered[c]("inject", a, d), c = z.Normalizations.registered[c]("name", a)), h = z.Names.prefixCheck(c)[0], p <= 8) try {
1522
- a.style[h] = d;
1523
- } catch (k) {
1524
- x.debug && console.log("Browser does not support [" + d + "] for [" + h + "]");
1525
- } else {
1526
- var l = g(a);l && l.isSVG && z.Names.SVGAttribute(c) ? a.setAttribute(c, d) : a.style[h] = d;
1527
- }x.debug >= 2 && console.log("Set " + c + " (" + h + "): " + d);
1528
- }return [h, d];
1529
- }, flushTransformCache: function (a) {
1530
- var b = "",
1531
- c = g(a);if ((p || x.State.isAndroid && !x.State.isChrome) && c && c.isSVG) {
1532
- var d = function (b) {
1533
- return parseFloat(z.getPropertyValue(a, b));
1534
- },
1535
- e = { translate: [d("translateX"), d("translateY")], skewX: [d("skewX")], skewY: [d("skewY")], scale: 1 !== d("scale") ? [d("scale"), d("scale")] : [d("scaleX"), d("scaleY")], rotate: [d("rotateZ"), 0, 0] };o.each(g(a).transformCache, function (a) {
1536
- /^translate/i.test(a) ? a = "translate" : /^scale/i.test(a) ? a = "scale" : /^rotate/i.test(a) && (a = "rotate"), e[a] && (b += a + "(" + e[a].join(" ") + ") ", delete e[a]);
1537
- });
1538
- } else {
1539
- var f, h;o.each(g(a).transformCache, function (c) {
1540
- return f = g(a).transformCache[c], "transformPerspective" === c ? (h = f, !0) : (9 === p && "rotateZ" === c && (c = "rotate"), void (b += c + f + " "));
1541
- }), h && (b = "perspective" + h + " " + b);
1542
- }z.setPropertyValue(a, "transform", b);
1543
- } };z.Hooks.register(), z.Normalizations.register(), x.hook = function (a, b, c) {
1544
- var e;return a = f(a), o.each(a, function (a, f) {
1545
- if (g(f) === d && x.init(f), c === d) e === d && (e = z.getPropertyValue(f, b));else {
1546
- var h = z.setPropertyValue(f, b, c);"transform" === h[0] && x.CSS.flushTransformCache(f), e = h;
1547
- }
1548
- }), e;
1549
- };var A = function () {
1550
- function a() {
1551
- return k ? y.promise || null : p;
1552
- }function e(a, e) {
1553
- function f(f) {
1554
- var k, n;if (i.begin && 0 === C) try {
1555
- i.begin.call(r, r);
1556
- } catch (p) {
1557
- setTimeout(function () {
1558
- throw p;
1559
- }, 1);
1560
- }if ("scroll" === F) {
1561
- var q,
1562
- v,
1563
- w,
1564
- A = /^x$/i.test(i.axis) ? "Left" : "Top",
1565
- D = parseFloat(i.offset) || 0;i.container ? t.isWrapped(i.container) || t.isNode(i.container) ? (i.container = i.container[0] || i.container, q = i.container["scroll" + A], w = q + o(a).position()[A.toLowerCase()] + D) : i.container = null : (q = x.State.scrollAnchor[x.State["scrollProperty" + A]], v = x.State.scrollAnchor[x.State["scrollProperty" + ("Left" === A ? "Top" : "Left")]], w = o(a).offset()[A.toLowerCase()] + D), j = { scroll: { rootPropertyValue: !1, startValue: q, currentValue: q, endValue: w, unitType: "", easing: i.easing, scrollData: { container: i.container, direction: A, alternateValue: v } }, element: a }, x.debug && console.log("tweensContainer (scroll): ", j.scroll, a);
1566
- } else if ("reverse" === F) {
1567
- if (k = g(a), !k) return;if (!k.tweensContainer) return void o.dequeue(a, i.queue);"none" === k.opts.display && (k.opts.display = "auto"), "hidden" === k.opts.visibility && (k.opts.visibility = "visible"), k.opts.loop = !1, k.opts.begin = null, k.opts.complete = null, u.easing || delete i.easing, u.duration || delete i.duration, i = o.extend({}, k.opts, i), n = o.extend(!0, {}, k ? k.tweensContainer : null);for (var E in n) {
1568
- if (n.hasOwnProperty(E) && "element" !== E) {
1569
- var G = n[E].startValue;n[E].startValue = n[E].currentValue = n[E].endValue, n[E].endValue = G, t.isEmptyObject(u) || (n[E].easing = i.easing), x.debug && console.log("reverse tweensContainer (" + E + "): " + JSON.stringify(n[E]), a);
1570
- }
1571
- }j = n;
1572
- } else if ("start" === F) {
1573
- k = g(a), k && k.tweensContainer && k.isAnimating === !0 && (n = k.tweensContainer);var H = function (b, c) {
1574
- var d, f, g;return t.isFunction(b) && (b = b.call(a, e, B)), t.isArray(b) ? (d = b[0], !t.isArray(b[1]) && /^[\d-]/.test(b[1]) || t.isFunction(b[1]) || z.RegEx.isHex.test(b[1]) ? g = b[1] : t.isString(b[1]) && !z.RegEx.isHex.test(b[1]) && x.Easings[b[1]] || t.isArray(b[1]) ? (f = c ? b[1] : l(b[1], i.duration), g = b[2]) : g = b[1] || b[2]) : d = b, c || (f = f || i.easing), t.isFunction(d) && (d = d.call(a, e, B)), t.isFunction(g) && (g = g.call(a, e, B)), [d || 0, f, g];
1575
- },
1576
- I = function (e, f) {
1577
- var g,
1578
- l = z.Hooks.getRoot(e),
1579
- m = !1,
1580
- p = f[0],
1581
- q = f[1],
1582
- r = f[2];
1583
- if (!(k && k.isSVG || "tween" === l || z.Names.prefixCheck(l)[1] !== !1 || z.Normalizations.registered[l] !== d)) return void (x.debug && console.log("Skipping [" + l + "] due to a lack of browser support."));(i.display !== d && null !== i.display && "none" !== i.display || i.visibility !== d && "hidden" !== i.visibility) && /opacity|filter/.test(e) && !r && 0 !== p && (r = 0), i._cacheValues && n && n[e] ? (r === d && (r = n[e].endValue + n[e].unitType), m = k.rootPropertyValueCache[l]) : z.Hooks.registered[e] ? r === d ? (m = z.getPropertyValue(a, l), r = z.getPropertyValue(a, e, m)) : m = z.Hooks.templates[l][1] : r === d && (r = z.getPropertyValue(a, e));var s,
1584
- u,
1585
- v,
1586
- w = !1,
1587
- y = function (a, b) {
1588
- var c, d;return d = (b || "0").toString().toLowerCase().replace(/[%A-z]+$/, function (a) {
1589
- return c = a, "";
1590
- }), c || (c = z.Values.getUnitType(a)), [d, c];
1591
- };if (r !== p && t.isString(r) && t.isString(p)) {
1592
- g = "";var A = 0,
1593
- B = 0,
1594
- C = [],
1595
- D = [],
1596
- E = 0,
1597
- F = 0,
1598
- G = 0;for (r = z.Hooks.fixColors(r), p = z.Hooks.fixColors(p); A < r.length && B < p.length;) {
1599
- var H = r[A],
1600
- I = p[B];if (/[\d\.]/.test(H) && /[\d\.]/.test(I)) {
1601
- for (var J = H, K = I, M = ".", N = "."; ++A < r.length;) {
1602
- if (H = r[A], H === M) M = "..";else if (!/\d/.test(H)) break;J += H;
1603
- }for (; ++B < p.length;) {
1604
- if (I = p[B], I === N) N = "..";else if (!/\d/.test(I)) break;K += I;
1605
- }var O = z.Hooks.getUnit(r, A),
1606
- P = z.Hooks.getUnit(p, B);if (A += O.length, B += P.length, O === P) J === K ? g += J + O : (g += "{" + C.length + (F ? "!" : "") + "}" + O, C.push(parseFloat(J)), D.push(parseFloat(K)));else {
1607
- var Q = parseFloat(J),
1608
- R = parseFloat(K);g += (E < 5 ? "calc" : "") + "(" + (Q ? "{" + C.length + (F ? "!" : "") + "}" : "0") + O + " + " + (R ? "{" + (C.length + (Q ? 1 : 0)) + (F ? "!" : "") + "}" : "0") + P + ")", Q && (C.push(Q), D.push(0)), R && (C.push(0), D.push(R));
1609
- }
1610
- } else {
1611
- if (H !== I) {
1612
- E = 0;break;
1613
- }g += H, A++, B++, 0 === E && "c" === H || 1 === E && "a" === H || 2 === E && "l" === H || 3 === E && "c" === H || E >= 4 && "(" === H ? E++ : (E && E < 5 || E >= 4 && ")" === H && --E < 5) && (E = 0), 0 === F && "r" === H || 1 === F && "g" === H || 2 === F && "b" === H || 3 === F && "a" === H || F >= 3 && "(" === H ? (3 === F && "a" === H && (G = 1), F++) : G && "," === H ? ++G > 3 && (F = G = 0) : (G && F < (G ? 5 : 4) || F >= (G ? 4 : 3) && ")" === H && --F < (G ? 5 : 4)) && (F = G = 0);
1614
- }
1615
- }A === r.length && B === p.length || (x.debug && console.error('Trying to pattern match mis-matched strings ["' + p + '", "' + r + '"]'), g = d), g && (C.length ? (x.debug && console.log('Pattern found "' + g + '" -> ', C, D, "[" + r + "," + p + "]"), r = C, p = D, u = v = "") : g = d);
1616
- }g || (s = y(e, r), r = s[0], v = s[1], s = y(e, p), p = s[0].replace(/^([+-\/*])=/, function (a, b) {
1617
- return w = b, "";
1618
- }), u = s[1], r = parseFloat(r) || 0, p = parseFloat(p) || 0, "%" === u && (/^(fontSize|lineHeight)$/.test(e) ? (p /= 100, u = "em") : /^scale/.test(e) ? (p /= 100, u = "") : /(Red|Green|Blue)$/i.test(e) && (p = p / 100 * 255, u = "")));var S = function () {
1619
- var d = { myParent: a.parentNode || c.body, position: z.getPropertyValue(a, "position"), fontSize: z.getPropertyValue(a, "fontSize") },
1620
- e = d.position === L.lastPosition && d.myParent === L.lastParent,
1621
- f = d.fontSize === L.lastFontSize;L.lastParent = d.myParent, L.lastPosition = d.position, L.lastFontSize = d.fontSize;var g = 100,
1622
- h = {};if (f && e) h.emToPx = L.lastEmToPx, h.percentToPxWidth = L.lastPercentToPxWidth, h.percentToPxHeight = L.lastPercentToPxHeight;else {
1623
- var i = k && k.isSVG ? c.createElementNS("http://www.w3.org/2000/svg", "rect") : c.createElement("div");x.init(i), d.myParent.appendChild(i), o.each(["overflow", "overflowX", "overflowY"], function (a, b) {
1624
- x.CSS.setPropertyValue(i, b, "hidden");
1625
- }), x.CSS.setPropertyValue(i, "position", d.position), x.CSS.setPropertyValue(i, "fontSize", d.fontSize), x.CSS.setPropertyValue(i, "boxSizing", "content-box"), o.each(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height"], function (a, b) {
1626
- x.CSS.setPropertyValue(i, b, g + "%");
1627
- }), x.CSS.setPropertyValue(i, "paddingLeft", g + "em"), h.percentToPxWidth = L.lastPercentToPxWidth = (parseFloat(z.getPropertyValue(i, "width", null, !0)) || 1) / g, h.percentToPxHeight = L.lastPercentToPxHeight = (parseFloat(z.getPropertyValue(i, "height", null, !0)) || 1) / g, h.emToPx = L.lastEmToPx = (parseFloat(z.getPropertyValue(i, "paddingLeft")) || 1) / g, d.myParent.removeChild(i);
1628
- }return null === L.remToPx && (L.remToPx = parseFloat(z.getPropertyValue(c.body, "fontSize")) || 16), null === L.vwToPx && (L.vwToPx = parseFloat(b.innerWidth) / 100, L.vhToPx = parseFloat(b.innerHeight) / 100), h.remToPx = L.remToPx, h.vwToPx = L.vwToPx, h.vhToPx = L.vhToPx, x.debug >= 1 && console.log("Unit ratios: " + JSON.stringify(h), a), h;
1629
- };if (/[\/*]/.test(w)) u = v;else if (v !== u && 0 !== r) if (0 === p) u = v;else {
1630
- h = h || S();var T = /margin|padding|left|right|width|text|word|letter/i.test(e) || /X$/.test(e) || "x" === e ? "x" : "y";switch (v) {case "%":
1631
- r *= "x" === T ? h.percentToPxWidth : h.percentToPxHeight;break;case "px":
1632
- break;default:
1633
- r *= h[v + "ToPx"];}switch (u) {case "%":
1634
- r *= 1 / ("x" === T ? h.percentToPxWidth : h.percentToPxHeight);break;case "px":
1635
- break;default:
1636
- r *= 1 / h[u + "ToPx"];}
1637
- }switch (w) {case "+":
1638
- p = r + p;break;case "-":
1639
- p = r - p;break;case "*":
1640
- p *= r;break;case "/":
1641
- p = r / p;}j[e] = { rootPropertyValue: m, startValue: r, currentValue: r, endValue: p, unitType: u, easing: q }, g && (j[e].pattern = g), x.debug && console.log("tweensContainer (" + e + "): " + JSON.stringify(j[e]), a);
1642
- };for (var J in s) {
1643
- if (s.hasOwnProperty(J)) {
1644
- var K = z.Names.camelCase(J),
1645
- N = H(s[J]);if (z.Lists.colors.indexOf(K) >= 0) {
1646
- var O = N[0],
1647
- P = N[1],
1648
- Q = N[2];if (z.RegEx.isHex.test(O)) {
1649
- for (var R = ["Red", "Green", "Blue"], S = z.Values.hexToRgb(O), T = Q ? z.Values.hexToRgb(Q) : d, U = 0; U < R.length; U++) {
1650
- var V = [S[U]];P && V.push(P), T !== d && V.push(T[U]), I(K + R[U], V);
1651
- }continue;
1652
- }
1653
- }I(K, N);
1654
- }
1655
- }j.element = a;
1656
- }j.element && (z.Values.addClass(a, "velocity-animating"), M.push(j), k = g(a), k && ("" === i.queue && (k.tweensContainer = j, k.opts = i), k.isAnimating = !0), C === B - 1 ? (x.State.calls.push([M, r, i, null, y.resolver, null, 0]), x.State.isTicking === !1 && (x.State.isTicking = !0, m())) : C++);
1657
- }var h,
1658
- i = o.extend({}, x.defaults, u),
1659
- j = {};switch (g(a) === d && x.init(a), parseFloat(i.delay) && i.queue !== !1 && o.queue(a, i.queue, function (b) {
1660
- x.velocityQueueEntryFlag = !0;var c = x.State.delayedElements.count++;x.State.delayedElements[c] = a;var d = function (a) {
1661
- return function () {
1662
- x.State.delayedElements[a] = !1, b();
1663
- };
1664
- }(c);g(a).delayBegin = new Date().getTime(), g(a).delay = parseFloat(i.delay), g(a).delayTimer = { setTimeout: setTimeout(b, parseFloat(i.delay)), next: d };
1665
- }), i.duration.toString().toLowerCase()) {case "fast":
1666
- i.duration = 200;break;case "normal":
1667
- i.duration = v;break;case "slow":
1668
- i.duration = 600;break;default:
1669
- i.duration = parseFloat(i.duration) || 1;}if (x.mock !== !1 && (x.mock === !0 ? i.duration = i.delay = 1 : (i.duration *= parseFloat(x.mock) || 1, i.delay *= parseFloat(x.mock) || 1)), i.easing = l(i.easing, i.duration), i.begin && !t.isFunction(i.begin) && (i.begin = null), i.progress && !t.isFunction(i.progress) && (i.progress = null), i.complete && !t.isFunction(i.complete) && (i.complete = null), i.display !== d && null !== i.display && (i.display = i.display.toString().toLowerCase(), "auto" === i.display && (i.display = x.CSS.Values.getDisplayType(a))), i.visibility !== d && null !== i.visibility && (i.visibility = i.visibility.toString().toLowerCase()), i.mobileHA = i.mobileHA && x.State.isMobile && !x.State.isGingerbread, i.queue === !1) {
1670
- if (i.delay) {
1671
- var k = x.State.delayedElements.count++;x.State.delayedElements[k] = a;var n = function (a) {
1672
- return function () {
1673
- x.State.delayedElements[a] = !1, f();
1674
- };
1675
- }(k);g(a).delayBegin = new Date().getTime(), g(a).delay = parseFloat(i.delay), g(a).delayTimer = { setTimeout: setTimeout(f, parseFloat(i.delay)), next: n };
1676
- } else f();
1677
- } else o.queue(a, i.queue, function (a, b) {
1678
- return b === !0 ? (y.promise && y.resolver(r), !0) : (x.velocityQueueEntryFlag = !0, void f(a));
1679
- });"" !== i.queue && "fx" !== i.queue || "inprogress" === o.queue(a)[0] || o.dequeue(a);
1680
- }var j,
1681
- k,
1682
- p,
1683
- q,
1684
- r,
1685
- s,
1686
- u,
1687
- w = arguments[0] && (arguments[0].p || o.isPlainObject(arguments[0].properties) && !arguments[0].properties.names || t.isString(arguments[0].properties));t.isWrapped(this) ? (k = !1, q = 0, r = this, p = this) : (k = !0, q = 1, r = w ? arguments[0].elements || arguments[0].e : arguments[0]);var y = { promise: null, resolver: null, rejecter: null };if (k && x.Promise && (y.promise = new x.Promise(function (a, b) {
1688
- y.resolver = a, y.rejecter = b;
1689
- })), w ? (s = arguments[0].properties || arguments[0].p, u = arguments[0].options || arguments[0].o) : (s = arguments[q], u = arguments[q + 1]), r = f(r), !r) return void (y.promise && (s && u && u.promiseRejectEmpty === !1 ? y.resolver() : y.rejecter()));var B = r.length,
1690
- C = 0;if (!/^(stop|finish|finishAll|pause|resume)$/i.test(s) && !o.isPlainObject(u)) {
1691
- var D = q + 1;u = {};for (var E = D; E < arguments.length; E++) {
1692
- t.isArray(arguments[E]) || !/^(fast|normal|slow)$/i.test(arguments[E]) && !/^\d/.test(arguments[E]) ? t.isString(arguments[E]) || t.isArray(arguments[E]) ? u.easing = arguments[E] : t.isFunction(arguments[E]) && (u.complete = arguments[E]) : u.duration = arguments[E];
1693
- }
1694
- }var F;switch (s) {case "scroll":
1695
- F = "scroll";break;case "reverse":
1696
- F = "reverse";break;case "pause":
1697
- var G = new Date().getTime();return o.each(r, function (a, b) {
1698
- h(b, G);
1699
- }), o.each(x.State.calls, function (a, b) {
1700
- var c = !1;b && o.each(b[1], function (a, e) {
1701
- var f = u === d ? "" : u;return f !== !0 && b[2].queue !== f && (u !== d || b[2].queue !== !1) || (o.each(r, function (a, d) {
1702
- if (d === e) return b[5] = { resume: !1 }, c = !0, !1;
1703
- }), !c && void 0);
1704
- });
1705
- }), a();case "resume":
1706
- return o.each(r, function (a, b) {
1707
- i(b, G);
1708
- }), o.each(x.State.calls, function (a, b) {
1709
- var c = !1;b && o.each(b[1], function (a, e) {
1710
- var f = u === d ? "" : u;return f !== !0 && b[2].queue !== f && (u !== d || b[2].queue !== !1) || !b[5] || (o.each(r, function (a, d) {
1711
- if (d === e) return b[5].resume = !0, c = !0, !1;
1712
- }), !c && void 0);
1713
- });
1714
- }), a();case "finish":case "finishAll":case "stop":
1715
- o.each(r, function (a, b) {
1716
- g(b) && g(b).delayTimer && (clearTimeout(g(b).delayTimer.setTimeout), g(b).delayTimer.next && g(b).delayTimer.next(), delete g(b).delayTimer), "finishAll" !== s || u !== !0 && !t.isString(u) || (o.each(o.queue(b, t.isString(u) ? u : ""), function (a, b) {
1717
- t.isFunction(b) && b();
1718
- }), o.queue(b, t.isString(u) ? u : "", []));
1719
- });var H = [];return o.each(x.State.calls, function (a, b) {
1720
- b && o.each(b[1], function (c, e) {
1721
- var f = u === d ? "" : u;return f !== !0 && b[2].queue !== f && (u !== d || b[2].queue !== !1) || void o.each(r, function (c, d) {
1722
- if (d === e) if ((u === !0 || t.isString(u)) && (o.each(o.queue(d, t.isString(u) ? u : ""), function (a, b) {
1723
- t.isFunction(b) && b(null, !0);
1724
- }), o.queue(d, t.isString(u) ? u : "", [])), "stop" === s) {
1725
- var h = g(d);h && h.tweensContainer && f !== !1 && o.each(h.tweensContainer, function (a, b) {
1726
- b.endValue = b.currentValue;
1727
- }), H.push(a);
1728
- } else "finish" !== s && "finishAll" !== s || (b[2].duration = 1);
1729
- });
1730
- });
1731
- }), "stop" === s && (o.each(H, function (a, b) {
1732
- n(b, !0);
1733
- }), y.promise && y.resolver(r)), a();default:
1734
- if (!o.isPlainObject(s) || t.isEmptyObject(s)) {
1735
- if (t.isString(s) && x.Redirects[s]) {
1736
- j = o.extend({}, u);var I = j.duration,
1737
- J = j.delay || 0;return j.backwards === !0 && (r = o.extend(!0, [], r).reverse()), o.each(r, function (a, b) {
1738
- parseFloat(j.stagger) ? j.delay = J + parseFloat(j.stagger) * a : t.isFunction(j.stagger) && (j.delay = J + j.stagger.call(b, a, B)), j.drag && (j.duration = parseFloat(I) || (/^(callout|transition)/.test(s) ? 1e3 : v), j.duration = Math.max(j.duration * (j.backwards ? 1 - a / B : (a + 1) / B), .75 * j.duration, 200)), x.Redirects[s].call(b, b, j || {}, a, B, r, y.promise ? y : d);
1739
- }), a();
1740
- }var K = "Velocity: First argument (" + s + ") was not a property map, a known action, or a registered redirect. Aborting.";return y.promise ? y.rejecter(new Error(K)) : console.log(K), a();
1741
- }F = "start";}var L = { lastParent: null, lastPosition: null, lastFontSize: null, lastPercentToPxWidth: null, lastPercentToPxHeight: null, lastEmToPx: null, remToPx: null, vwToPx: null, vhToPx: null },
1742
- M = [];o.each(r, function (a, b) {
1743
- t.isNode(b) && e(b, a);
1744
- }), j = o.extend({}, x.defaults, u), j.loop = parseInt(j.loop, 10);var N = 2 * j.loop - 1;if (j.loop) for (var O = 0; O < N; O++) {
1745
- var P = { delay: j.delay, progress: j.progress };O === N - 1 && (P.display = j.display, P.visibility = j.visibility, P.complete = j.complete), A(r, "reverse", P);
1746
- }return a();
1747
- };x = o.extend(A, x), x.animate = A;var B = b.requestAnimationFrame || q;if (!x.State.isMobile && c.hidden !== d) {
1748
- var C = function () {
1749
- c.hidden ? (B = function (a) {
1750
- return setTimeout(function () {
1751
- a(!0);
1752
- }, 16);
1753
- }, m()) : B = b.requestAnimationFrame || q;
1754
- };C(), c.addEventListener("visibilitychange", C);
1755
- }return a.Velocity = x, a !== b && (a.fn.velocity = A, a.fn.velocity.defaults = x.defaults), o.each(["Down", "Up"], function (a, b) {
1756
- x.Redirects["slide" + b] = function (a, c, e, f, g, h) {
1757
- var i = o.extend({}, c),
1758
- j = i.begin,
1759
- k = i.complete,
1760
- l = {},
1761
- m = { height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: "" };i.display === d && (i.display = "Down" === b ? "inline" === x.CSS.Values.getDisplayType(a) ? "inline-block" : "block" : "none"), i.begin = function () {
1762
- 0 === e && j && j.call(g, g);for (var c in m) {
1763
- if (m.hasOwnProperty(c)) {
1764
- l[c] = a.style[c];var d = z.getPropertyValue(a, c);m[c] = "Down" === b ? [d, 0] : [0, d];
1765
- }
1766
- }l.overflow = a.style.overflow, a.style.overflow = "hidden";
1767
- }, i.complete = function () {
1768
- for (var b in l) {
1769
- l.hasOwnProperty(b) && (a.style[b] = l[b]);
1770
- }e === f - 1 && (k && k.call(g, g), h && h.resolver(g));
1771
- }, x(a, m, i);
1772
- };
1773
- }), o.each(["In", "Out"], function (a, b) {
1774
- x.Redirects["fade" + b] = function (a, c, e, f, g, h) {
1775
- var i = o.extend({}, c),
1776
- j = i.complete,
1777
- k = { opacity: "In" === b ? 1 : 0 };0 !== e && (i.begin = null), e !== f - 1 ? i.complete = null : i.complete = function () {
1778
- j && j.call(g, g), h && h.resolver(g);
1779
- }, i.display === d && (i.display = "In" === b ? "auto" : "none"), x(this, k, i);
1780
- };
1781
- }), x;
1782
- }(window.jQuery || window.Zepto || window, window, window ? window.document : void 0);
1783
- });; // Required for Meteor package, the use of window prevents export by Meteor
1368
+ }(f)), f = { type: f.type };
1369
+ }return b;
1370
+ }(),
1371
+ ha = { css: function (a, c, d) {
1372
+ return a.style[c] = d;
1373
+ }, attribute: function (a, c, d) {
1374
+ return a.setAttribute(c, d);
1375
+ }, object: function (a, c, d) {
1376
+ return a[c] = d;
1377
+ }, transform: function (a, c, d, b, f) {
1378
+ b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
1379
+ } },
1380
+ v = [],
1381
+ B = 0,
1382
+ ia = function () {
1383
+ function a() {
1384
+ B = requestAnimationFrame(c);
1385
+ }function c(c) {
1386
+ var b = v.length;if (b) {
1387
+ for (var d = 0; d < b;) {
1388
+ v[d] && v[d].tick(c), d++;
1389
+ }a();
1390
+ } else cancelAnimationFrame(B), B = 0;
1391
+ }return a;
1392
+ }();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
1393
+ a = P(a);for (var c = v.length; c--;) {
1394
+ for (var d = v[c], b = d.animations, f = b.length; f--;) {
1395
+ u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
1396
+ }
1397
+ }
1398
+ };q.getValue = K;q.path = function (a, c) {
1399
+ var d = h.str(a) ? e(a)[0] : a,
1400
+ b = c || 100;return function (a) {
1401
+ return { el: d, property: a, totalLength: N(d) * (b / 100) };
1402
+ };
1403
+ };q.setDashoffset = function (a) {
1404
+ var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
1405
+ };q.bezier = A;q.easings = Q;q.timeline = function (a) {
1406
+ var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
1407
+ c.children.forEach(function (a) {
1408
+ a.began = !0;a.completed = !0;
1409
+ });m(d).forEach(function (b) {
1410
+ var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
1411
+ });c.seek(0);c.reset();c.autoplay && c.restart();return c;
1412
+ };return c;
1413
+ };q.random = function (a, c) {
1414
+ return Math.floor(Math.random() * (c - a + 1)) + a;
1415
+ };return q;
1416
+ });
1417
+ ; // Required for Meteor package, the use of window prevents export by Meteor
1784
1418
  (function (window) {
1785
1419
  if (window.Package) {
1786
1420
  M = {};
@@ -1814,6 +1448,23 @@ M.keys = {
1814
1448
  ARROW_DOWN: 40
1815
1449
  };
1816
1450
 
1451
+ /**
1452
+ * TabPress Keydown handler
1453
+ */
1454
+ M.tabPressed = false;
1455
+ var docHandleKeydown = function (e) {
1456
+ if (e.which === M.keys.TAB) {
1457
+ M.tabPressed = true;
1458
+ }
1459
+ };
1460
+ var docHandleKeyup = function (e) {
1461
+ if (e.which === M.keys.TAB) {
1462
+ M.tabPressed = false;
1463
+ }
1464
+ };
1465
+ document.addEventListener('keydown', docHandleKeydown);
1466
+ document.addEventListener('keyup', docHandleKeyup);
1467
+
1817
1468
  /**
1818
1469
  * Initialize jQuery wrapper for plugin
1819
1470
  * @param {Class} plugin javascript class
@@ -2118,22 +1769,7 @@ M.throttle = function (func, wait, options) {
2118
1769
  return result;
2119
1770
  };
2120
1771
  };
2121
-
2122
- // Velocity has conflicts when loaded with jQuery, this will check for it
2123
- // First, check if in noConflict mode
2124
- var Vel = void 0;
2125
- if (M.jQueryLoaded) {
2126
- Vel = jQuery.Velocity;
2127
- } else {
2128
- Vel = Velocity;
2129
- }
2130
-
2131
- if (Vel) {
2132
- M.Vel = Vel;
2133
- } else {
2134
- M.Vel = Velocity;
2135
- }
2136
- ;(function ($, Vel) {
1772
+ ;(function ($, anim) {
2137
1773
  'use strict';
2138
1774
 
2139
1775
  var _defaults = {
@@ -2268,19 +1904,45 @@ if (Vel) {
2268
1904
  var $collapsibleLi = this.$el.children('li').eq(index);
2269
1905
  if ($collapsibleLi.length) {
2270
1906
  var $body = $collapsibleLi.children('.collapsible-body');
2271
- Vel($body[0], 'stop');
2272
- Vel($body[0], 'slideDown', { duration: this.options.inDuration, easing: 'easeInOutCubic', queue: false,
2273
- complete: function () {
2274
- $body[0].style.height = '';
2275
- $body[0].style.overflow = '';
2276
- $body[0].style.padding = '';
2277
- $body[0].style.margin = '';
1907
+
1908
+ anim.remove($body[0]);
1909
+ $body.css({
1910
+ display: 'block',
1911
+ overflow: 'hidden',
1912
+ height: 0,
1913
+ paddingTop: '',
1914
+ paddingBottom: ''
1915
+ });
1916
+
1917
+ var pTop = $body.css('padding-top');
1918
+ var pBottom = $body.css('padding-bottom');
1919
+ var finalHeight = $body[0].scrollHeight;
1920
+ $body.css({
1921
+ paddingTop: 0,
1922
+ paddingBottom: 0
1923
+ });
1924
+
1925
+ anim({
1926
+ targets: $body[0],
1927
+ height: finalHeight,
1928
+ paddingTop: pTop,
1929
+ paddingBottom: pBottom,
1930
+ duration: this.options.inDuration,
1931
+ easing: 'easeInOutCubic',
1932
+ complete: function (anim) {
1933
+ $body.css({
1934
+ overflow: '',
1935
+ paddingTop: '',
1936
+ paddingBottom: '',
1937
+ height: ''
1938
+ });
2278
1939
 
2279
1940
  // onOpenEnd callback
2280
1941
  if (typeof _this3.options.onOpenEnd === 'function') {
2281
1942
  _this3.options.onOpenEnd.call(_this3, $collapsibleLi[0]);
2282
1943
  }
2283
- } });
1944
+ }
1945
+ });
2284
1946
  }
2285
1947
  }
2286
1948
 
@@ -2297,19 +1959,29 @@ if (Vel) {
2297
1959
  var $collapsibleLi = this.$el.children('li').eq(index);
2298
1960
  if ($collapsibleLi.length) {
2299
1961
  var $body = $collapsibleLi.children('.collapsible-body');
2300
- Vel($body[0], 'stop');
2301
- Vel($body[0], 'slideUp', { duration: this.options.outDuration, easing: 'easeInOutCubic', queue: false,
1962
+ anim.remove($body[0]);
1963
+ $body.css('overflow', 'hidden');
1964
+ anim({
1965
+ targets: $body[0],
1966
+ height: 0,
1967
+ paddingTop: 0,
1968
+ paddingBottom: 0,
1969
+ duration: this.options.outDuration,
1970
+ easing: 'easeInOutCubic',
2302
1971
  complete: function () {
2303
- $body[0].style.height = '';
2304
- $body[0].style.overflow = '';
2305
- $body[0].style.padding = '';
2306
- $body[0].style.margin = '';
1972
+ $body.css({
1973
+ height: '',
1974
+ overflow: '',
1975
+ padding: '',
1976
+ display: ''
1977
+ });
2307
1978
 
2308
1979
  // onCloseEnd callback
2309
1980
  if (typeof _this4.options.onCloseEnd === 'function') {
2310
1981
  _this4.options.onCloseEnd.call(_this4, $collapsibleLi[0]);
2311
1982
  }
2312
- } });
1983
+ }
1984
+ });
2313
1985
  }
2314
1986
  }
2315
1987
 
@@ -2403,8 +2075,8 @@ if (Vel) {
2403
2075
  if (M.jQueryLoaded) {
2404
2076
  M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible');
2405
2077
  }
2406
- })(cash, M.Vel);
2407
- ;(function ($, Vel) {
2078
+ })(cash, anime);
2079
+ ;(function ($, anim) {
2408
2080
  'use strict';
2409
2081
 
2410
2082
  var _defaults = {
@@ -2459,7 +2131,7 @@ if (Vel) {
2459
2131
  */
2460
2132
  this.isOpen = false;
2461
2133
 
2462
- this.focusedIndex = null;
2134
+ this.focusedIndex = -1;
2463
2135
  this.filterQuery = [];
2464
2136
 
2465
2137
  // Move dropdown-content after dropdown-trigger
@@ -2691,7 +2363,9 @@ if (Vel) {
2691
2363
  }, {
2692
2364
  key: "_focusFocusedItem",
2693
2365
  value: function _focusFocusedItem() {
2694
- this.dropdownEl.children[this.focusedIndex].focus();
2366
+ if (this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length) {
2367
+ this.dropdownEl.children[this.focusedIndex].focus();
2368
+ }
2695
2369
  }
2696
2370
  }, {
2697
2371
  key: "_getDropdownPosition",
@@ -2784,19 +2458,24 @@ if (Vel) {
2784
2458
  this.dropdownEl.style.width = positionInfo.width + 'px';
2785
2459
  this.dropdownEl.style.transformOrigin = (positionInfo.horizontalAlignment === 'left' ? '0' : '100%') + " " + (positionInfo.verticalAlignment === 'top' ? '0' : '100%');
2786
2460
 
2787
- Vel(this.dropdownEl, {
2788
- opacity: [1, 'easeOutQuad'],
2789
- scaleX: [1, .3],
2790
- scaleY: [1, .3] }, {
2461
+ anim.remove(this.dropdownEl);
2462
+ anim({
2463
+ targets: this.dropdownEl,
2464
+ opacity: {
2465
+ value: [0, 1],
2466
+ easing: 'easeOutQuad'
2467
+ },
2468
+ scaleX: [.3, 1],
2469
+ scaleY: [.3, 1],
2791
2470
  duration: this.options.inDuration,
2792
- queue: false,
2793
2471
  easing: 'easeOutQuint',
2794
- complete: function () {
2795
- _this7._focusFocusedItem();
2472
+ complete: function (anim) {
2473
+ _this7.dropdownEl.focus();
2796
2474
 
2797
2475
  // onOpenEnd callback
2798
2476
  if (typeof _this7.options.onOpenEnd === 'function') {
2799
- _this7.options.onOpenEnd.call(_this7, _this7.el);
2477
+ var elem = anim.animatables[0].target;
2478
+ _this7.options.onOpenEnd.call(elem, _this7.el);
2800
2479
  }
2801
2480
  }
2802
2481
  });
@@ -2811,18 +2490,23 @@ if (Vel) {
2811
2490
  value: function _animateOut() {
2812
2491
  var _this8 = this;
2813
2492
 
2814
- Vel(this.dropdownEl, {
2815
- opacity: [0, 'easeOutQuint'],
2816
- scaleX: [.3, 1],
2817
- scaleY: [.3, 1] }, {
2493
+ anim.remove(this.dropdownEl);
2494
+ anim({
2495
+ targets: this.dropdownEl,
2496
+ opacity: {
2497
+ value: 0,
2498
+ easing: 'easeOutQuint'
2499
+ },
2500
+ scaleX: .3,
2501
+ scaleY: .3,
2818
2502
  duration: this.options.outDuration,
2819
- queue: false,
2820
2503
  easing: 'easeOutQuint',
2821
- complete: function () {
2504
+ complete: function (anim) {
2822
2505
  _this8._resetDropdownStyles();
2823
2506
 
2824
2507
  // onCloseEnd callback
2825
2508
  if (typeof _this8.options.onCloseEnd === 'function') {
2509
+ var elem = anim.animatables[0].target;
2826
2510
  _this8.options.onCloseEnd.call(_this8, _this8.el);
2827
2511
  }
2828
2512
  }
@@ -2841,20 +2525,14 @@ if (Vel) {
2841
2525
  }
2842
2526
  this.isOpen = true;
2843
2527
 
2844
- // Highlight focused item
2845
- if (this.focusedIndex === null) {
2846
- this.focusedIndex = 0;
2847
- }
2848
-
2849
2528
  // onOpenStart callback
2850
2529
  if (typeof this.options.onOpenStart === 'function') {
2851
2530
  this.options.onOpenStart.call(this, this.el);
2852
2531
  }
2853
2532
 
2854
- // Stop any previous animation
2855
- Vel(this.dropdownEl, 'stop');
2533
+ // Reset styles
2856
2534
  this._resetDropdownStyles();
2857
- Vel.hook(this.dropdownEl, 'display', 'block');
2535
+ this.dropdownEl.style.display = 'block';
2858
2536
 
2859
2537
  // Set width before calculating positionInfo
2860
2538
  var idealWidth = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
@@ -2876,6 +2554,7 @@ if (Vel) {
2876
2554
  return;
2877
2555
  }
2878
2556
  this.isOpen = false;
2557
+ this.focusedIndex = -1;
2879
2558
 
2880
2559
  // onCloseStart callback
2881
2560
  if (typeof this.options.onCloseStart === 'function') {
@@ -2929,8 +2608,8 @@ if (Vel) {
2929
2608
  if (M.jQueryLoaded) {
2930
2609
  M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
2931
2610
  }
2932
- })(cash, M.Vel);
2933
- ;(function ($, Vel) {
2611
+ })(cash, anime);
2612
+ ;(function ($, anim) {
2934
2613
  'use strict';
2935
2614
 
2936
2615
  var _defaults = {
@@ -3124,13 +2803,18 @@ if (Vel) {
3124
2803
  });
3125
2804
 
3126
2805
  // Animate overlay
3127
- Vel(this.$overlay[0], { opacity: this.options.opacity }, { duration: this.options.inDuration, queue: false, ease: 'easeOutCubic' });
2806
+ anim({
2807
+ targets: this.$overlay[0],
2808
+ opacity: this.options.opacity,
2809
+ duration: this.options.inDuration,
2810
+ easing: 'easeOutQuad'
2811
+ });
3128
2812
 
3129
2813
  // Define modal animation options
3130
- var enterVelocityOptions = {
2814
+ var enterAnimOptions = {
2815
+ targets: this.el,
3131
2816
  duration: this.options.inDuration,
3132
- queue: false,
3133
- ease: 'easeOutCubic',
2817
+ easing: 'easeOutCubic',
3134
2818
  // Handle modal ready callback
3135
2819
  complete: function () {
3136
2820
  if (typeof _this9.options.ready === 'function') {
@@ -3141,14 +2825,21 @@ if (Vel) {
3141
2825
 
3142
2826
  // Bottom sheet animation
3143
2827
  if (this.el.classList.contains('bottom-sheet')) {
3144
- Vel(this.el, { bottom: 0, opacity: 1 }, enterVelocityOptions);
2828
+ $.extend(enterAnimOptions, {
2829
+ bottom: 0,
2830
+ opacity: 1
2831
+ });
2832
+ anim(enterAnimOptions);
3145
2833
 
3146
2834
  // Normal modal animation
3147
2835
  } else {
3148
- Vel.hook(this.el, 'scaleX', 0.8);
3149
- Vel.hook(this.el, 'scaleY', 0.8);
3150
- this.el.style.top = this.options.startingTop;
3151
- Vel(this.el, { top: this.options.endingTop, opacity: 1, scaleX: 1, scaleY: 1 }, enterVelocityOptions);
2836
+ $.extend(enterAnimOptions, {
2837
+ top: [this.options.startingTop, this.options.endingTop],
2838
+ opacity: 1,
2839
+ scaleX: [.8, 1],
2840
+ scaleY: [.8, 1]
2841
+ });
2842
+ anim(enterAnimOptions);
3152
2843
  }
3153
2844
  }
3154
2845
 
@@ -3162,19 +2853,24 @@ if (Vel) {
3162
2853
  var _this10 = this;
3163
2854
 
3164
2855
  // Animate overlay
3165
- Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuart' });
2856
+ anim({
2857
+ targets: this.$overlay[0],
2858
+ opacity: 0,
2859
+ duration: this.options.outDuration,
2860
+ easing: 'easeOutQuart'
2861
+ });
3166
2862
 
3167
2863
  // Define modal animation options
3168
- var exitVelocityOptions = {
2864
+ var exitAnimOptions = {
2865
+ targets: this.el,
3169
2866
  duration: this.options.outDuration,
3170
- queue: false,
3171
- ease: 'easeOutCubic',
2867
+ easing: 'easeOutCubic',
3172
2868
  // Handle modal ready callback
3173
2869
  complete: function () {
3174
2870
  _this10.el.style.display = 'none';
3175
2871
  // Call complete callback
3176
2872
  if (typeof _this10.options.complete === 'function') {
3177
- _this10.options.complete.call(_this10, _this10.$el);
2873
+ _this10.options.complete.call(_this10, _this10.el);
3178
2874
  }
3179
2875
  _this10.$overlay.remove();
3180
2876
  }
@@ -3182,11 +2878,21 @@ if (Vel) {
3182
2878
 
3183
2879
  // Bottom sheet animation
3184
2880
  if (this.el.classList.contains('bottom-sheet')) {
3185
- Vel(this.el, { bottom: '-100%', opacity: 0 }, exitVelocityOptions);
2881
+ $.extend(exitAnimOptions, {
2882
+ bottom: '-100%',
2883
+ opacity: 0
2884
+ });
2885
+ anim(exitAnimOptions);
3186
2886
 
3187
2887
  // Normal modal animation
3188
2888
  } else {
3189
- Vel(this.el, { top: this.options.startingTop, opacity: 0, scaleX: 0.8, scaleY: 0.8 }, exitVelocityOptions);
2889
+ $.extend(exitAnimOptions, {
2890
+ top: [this.options.endingTop, this.options.startingTop],
2891
+ opacity: 0,
2892
+ scaleX: 0.8,
2893
+ scaleY: 0.8
2894
+ });
2895
+ anim(exitAnimOptions);
3190
2896
  }
3191
2897
  }
3192
2898
 
@@ -3209,13 +2915,15 @@ if (Vel) {
3209
2915
  body.appendChild(this.$overlay[0]);
3210
2916
 
3211
2917
  // Set opening trigger, undefined indicates modal was opened by javascript
3212
- this._openingTrigger = !!$trigger ? $trigger : undefined;
2918
+ this._openingTrigger = !!$trigger ? $trigger[0] : undefined;
3213
2919
 
3214
2920
  if (this.options.dismissible) {
3215
2921
  this._handleKeydownBound = this._handleKeydown.bind(this);
3216
2922
  document.addEventListener('keydown', this._handleKeydownBound);
3217
2923
  }
3218
2924
 
2925
+ anim.remove(this.el);
2926
+ anim.remove(this.$overlay[0]);
3219
2927
  this._animateIn();
3220
2928
  return this;
3221
2929
  }
@@ -3239,6 +2947,8 @@ if (Vel) {
3239
2947
  document.removeEventListener('keydown', this._handleKeydownBound);
3240
2948
  }
3241
2949
 
2950
+ anim.remove(this.el);
2951
+ anim.remove(this.$overlay[0]);
3242
2952
  this._animateOut();
3243
2953
  return this;
3244
2954
  }
@@ -3291,8 +3001,8 @@ if (Vel) {
3291
3001
  if (M.jQueryLoaded) {
3292
3002
  M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal');
3293
3003
  }
3294
- })(cash, M.Vel);
3295
- ;(function ($, Vel) {
3004
+ })(cash, anime);
3005
+ ;(function ($, anim) {
3296
3006
  'use strict';
3297
3007
 
3298
3008
  var _defaults = {
@@ -3466,31 +3176,28 @@ if (Vel) {
3466
3176
  value: function _animateImageIn() {
3467
3177
  var _this11 = this;
3468
3178
 
3469
- var velocityOptions = {
3179
+ var animOptions = {
3180
+ targets: this.el,
3181
+ height: this.newHeight,
3182
+ width: this.newWidth,
3183
+ left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
3184
+ top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
3470
3185
  duration: this.options.inDuration,
3471
- queue: false,
3472
- ease: 'easeOutQuad',
3186
+ easing: 'easeOutQuad',
3473
3187
  complete: function () {
3474
3188
  _this11.doneAnimating = true;
3475
3189
  }
3476
3190
  };
3477
3191
 
3478
- var velocityProperties = {
3479
- height: this.newHeight,
3480
- width: this.newWidth,
3481
- left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
3482
- top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2
3483
- };
3484
-
3485
3192
  if (this.$el.hasClass('responsive-img')) {
3486
- velocityProperties.maxWidth = [this.newWidth, this.newWidth];
3487
- velocityProperties.width = [velocityProperties.width, this.originalWidth];
3193
+ animOptions.maxWidth = this.newWidth;
3194
+ animOptions.width = [this.originalWidth, animOptions.width];
3488
3195
  } else {
3489
- velocityProperties.left = [velocityProperties.left, 0];
3490
- velocityProperties.top = [velocityProperties.top, 0];
3196
+ animOptions.left = [animOptions.left, 0];
3197
+ animOptions.top = [animOptions.top, 0];
3491
3198
  }
3492
3199
 
3493
- Vel(this.el, velocityProperties, velocityOptions);
3200
+ anim(animOptions);
3494
3201
  }
3495
3202
 
3496
3203
  /**
@@ -3502,10 +3209,14 @@ if (Vel) {
3502
3209
  value: function _animateImageOut() {
3503
3210
  var _this12 = this;
3504
3211
 
3505
- var velocityOptions = {
3212
+ var animOptions = {
3213
+ targets: this.el,
3214
+ width: this.originalWidth,
3215
+ height: this.originalHeight,
3216
+ left: 0,
3217
+ top: 0,
3506
3218
  duration: this.options.outDuration,
3507
- queue: false,
3508
- ease: 'easeOutQuad',
3219
+ easing: 'easeOutQuad',
3509
3220
  complete: function () {
3510
3221
  _this12.placeholder.css({
3511
3222
  height: '',
@@ -3529,12 +3240,7 @@ if (Vel) {
3529
3240
  }
3530
3241
  };
3531
3242
 
3532
- Vel(this.el, {
3533
- width: this.originalWidth,
3534
- height: this.originalHeight,
3535
- left: 0,
3536
- top: 0
3537
- }, velocityOptions);
3243
+ anim(animOptions);
3538
3244
  }
3539
3245
 
3540
3246
  /**
@@ -3606,8 +3312,20 @@ if (Vel) {
3606
3312
  top: -1 * overlayOffset.top + 'px'
3607
3313
  });
3608
3314
 
3315
+ anim.remove(this.el);
3316
+ anim.remove(this.$overlay[0]);
3317
+
3318
+ if (this.caption !== "") {
3319
+ anim.remove(this.$photoCaption[0]);
3320
+ }
3321
+
3609
3322
  // Animate Overlay
3610
- Vel(this.$overlay[0], { opacity: 1 }, { duration: this.options.inDuration, queue: false, ease: 'easeOutQuad' });
3323
+ anim({
3324
+ targets: this.$overlay[0],
3325
+ opacity: 1,
3326
+ duration: this.options.inDuration,
3327
+ easing: 'easeOutQuad'
3328
+ });
3611
3329
 
3612
3330
  // Add and animate caption if it exists
3613
3331
  if (this.caption !== "") {
@@ -3615,7 +3333,13 @@ if (Vel) {
3615
3333
  this.$photoCaption.text(this.caption);
3616
3334
  $('body').append(this.$photoCaption);
3617
3335
  this.$photoCaption.css({ "display": "inline" });
3618
- Vel(this.$photoCaption[0], { opacity: 1 }, { duration: this.options.inDuration, queue: false, ease: 'easeOutQuad' });
3336
+
3337
+ anim({
3338
+ targets: this.$photoCaption[0],
3339
+ opacity: 1,
3340
+ duration: this.options.inDuration,
3341
+ easing: 'easeOutQuad'
3342
+ });
3619
3343
  }
3620
3344
 
3621
3345
  // Resize Image
@@ -3659,10 +3383,11 @@ if (Vel) {
3659
3383
  this._updateVars();
3660
3384
  this.doneAnimating = false;
3661
3385
 
3662
- Vel(this.el, 'stop');
3663
- Vel(this.$overlay[0], 'stop');
3386
+ anim.remove(this.el);
3387
+ anim.remove(this.$overlay[0]);
3388
+
3664
3389
  if (this.caption !== "") {
3665
- Vel(this.$photoCaption[0], 'stop');
3390
+ anim.remove(this.$photoCaption[0]);
3666
3391
  }
3667
3392
 
3668
3393
  // disable exit handlers
@@ -3670,18 +3395,30 @@ if (Vel) {
3670
3395
  window.removeEventListener('resize', this._handleWindowResizeBound);
3671
3396
  window.removeEventListener('keyup', this._handleWindowEscapeBound);
3672
3397
 
3673
- Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuad', complete: function () {
3398
+ anim({
3399
+ targets: this.$overlay[0],
3400
+ opacity: 0,
3401
+ duration: this.options.outDuration,
3402
+ easing: 'easeOutQuad',
3403
+ complete: function () {
3674
3404
  _this14.overlayActive = false;
3675
3405
  _this14.$overlay.remove();
3676
- } });
3406
+ }
3407
+ });
3677
3408
 
3678
3409
  this._animateImageOut();
3679
3410
 
3680
3411
  // Remove Caption + reset css settings on image
3681
3412
  if (this.caption !== "") {
3682
- Vel(this.$photoCaption[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuad', complete: function () {
3413
+ anim({
3414
+ targets: this.$photoCaption[0],
3415
+ opacity: 0,
3416
+ duration: this.options.outDuration,
3417
+ easing: 'easeOutQuad',
3418
+ complete: function () {
3683
3419
  _this14.$photoCaption.remove();
3684
- } });
3420
+ }
3421
+ });
3685
3422
  }
3686
3423
  }
3687
3424
  }], [{
@@ -3719,7 +3456,7 @@ if (Vel) {
3719
3456
  if (M.jQueryLoaded) {
3720
3457
  M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox');
3721
3458
  }
3722
- })(cash, M.Vel);
3459
+ })(cash, anime);
3723
3460
  ;(function ($) {
3724
3461
  'use strict';
3725
3462
 
@@ -3851,7 +3588,7 @@ if (Vel) {
3851
3588
  M.initializeJqueryWrapper(Parallax, 'parallax', 'M_Parallax');
3852
3589
  }
3853
3590
  })(cash);
3854
- ;(function ($, Vel) {
3591
+ ;(function ($, anim) {
3855
3592
  'use strict';
3856
3593
 
3857
3594
  var _defaults = {
@@ -3890,7 +3627,7 @@ if (Vel) {
3890
3627
  this.el = el;
3891
3628
 
3892
3629
  /**
3893
- * Options for the carousel
3630
+ * Options for the Tabs
3894
3631
  * @member Tabs#options
3895
3632
  * @prop {Number} duration
3896
3633
  * @prop {Function} onShow
@@ -4031,14 +3768,14 @@ if (Vel) {
4031
3768
  });
4032
3769
  }
4033
3770
  } else {
4034
- if (this.$content !== undefined) {
3771
+ if (this.$content.length) {
4035
3772
  this.$content[0].style.display = 'block';
4036
3773
  this.$content.addClass('active');
4037
3774
  if (typeof this.options.onShow === 'function') {
4038
3775
  this.options.onShow.call(this, this.$content[0]);
4039
3776
  }
4040
3777
 
4041
- if ($oldContent !== undefined && !$oldContent.is(this.$content)) {
3778
+ if ($oldContent.length && !$oldContent.is(this.$content)) {
4042
3779
  $oldContent[0].style.display = 'none';
4043
3780
  $oldContent.removeClass('active');
4044
3781
  }
@@ -4112,7 +3849,7 @@ if (Vel) {
4112
3849
  var _this17 = this;
4113
3850
 
4114
3851
  // Change swipeable according to responsive threshold
4115
- if (window.innerWidth > options.responsiveThreshold) {
3852
+ if (window.innerWidth > this.options.responsiveThreshold) {
4116
3853
  this.options.swipeable = false;
4117
3854
  }
4118
3855
 
@@ -4139,7 +3876,7 @@ if (Vel) {
4139
3876
  _this17.$activeTabLink.addClass('active');
4140
3877
  _this17._animateIndicator(prevIndex);
4141
3878
  if (typeof _this17.options.onShow === "function") {
4142
- _this17.options.onShow.call(_this17, _this17.$content);
3879
+ _this17.options.onShow.call(_this17, _this17.$content[0]);
4143
3880
  }
4144
3881
  }
4145
3882
  });
@@ -4209,7 +3946,7 @@ if (Vel) {
4209
3946
 
4210
3947
  /**
4211
3948
  * Finds right attribute for indicator based on active tab.
4212
- * @param {jQuery} el
3949
+ * @param {cash} el
4213
3950
  */
4214
3951
 
4215
3952
  }, {
@@ -4220,7 +3957,7 @@ if (Vel) {
4220
3957
 
4221
3958
  /**
4222
3959
  * Finds left attribute for indicator based on active tab.
4223
- * @param {jQuery} el
3960
+ * @param {cash} el
4224
3961
  */
4225
3962
 
4226
3963
  }, {
@@ -4228,6 +3965,11 @@ if (Vel) {
4228
3965
  value: function _calcLeftPos(el) {
4229
3966
  return Math.floor(el.position().left);
4230
3967
  }
3968
+ }, {
3969
+ key: "updateTabIndicator",
3970
+ value: function updateTabIndicator() {
3971
+ this._animateIndicator(this.index);
3972
+ }
4231
3973
 
4232
3974
  /**
4233
3975
  * Animates Indicator to active tab.
@@ -4237,25 +3979,31 @@ if (Vel) {
4237
3979
  }, {
4238
3980
  key: "_animateIndicator",
4239
3981
  value: function _animateIndicator(prevIndex) {
4240
- var velOptions = {
4241
- duration: this.options.duration,
4242
- queue: false,
4243
- easing: 'easeOutQuad'
4244
- };
4245
- var velOptionsLeft = void 0,
4246
- velOptionsRight = void 0;
3982
+ var leftDelay = 0,
3983
+ rightDelay = 0;
4247
3984
 
4248
3985
  if (this.index - prevIndex >= 0) {
4249
- velOptionsLeft = $.extend({}, velOptions, { delay: 90 });
4250
- velOptionsRight = velOptions;
3986
+ leftDelay = 90;
4251
3987
  } else {
4252
- velOptionsLeft = velOptions;
4253
- velOptionsRight = $.extend({}, velOptions, { delay: 90 });
3988
+ rightDelay = 90;
4254
3989
  }
4255
3990
 
4256
- // Animate with velocity
4257
- Vel(this._indicator, { left: this._calcLeftPos(this.$activeTabLink) }, velOptionsLeft);
4258
- Vel(this._indicator, { right: this._calcRightPos(this.$activeTabLink) }, velOptionsRight);
3991
+ // Animate
3992
+ var animOptions = {
3993
+ targets: this._indicator,
3994
+ left: {
3995
+ value: this._calcLeftPos(this.$activeTabLink),
3996
+ delay: leftDelay
3997
+ },
3998
+ right: {
3999
+ value: this._calcRightPos(this.$activeTabLink),
4000
+ delay: rightDelay
4001
+ },
4002
+ duration: this.options.duration,
4003
+ easing: 'easeOutQuad'
4004
+ };
4005
+ anim.remove(this._indicator);
4006
+ anim(animOptions);
4259
4007
  }
4260
4008
 
4261
4009
  /**
@@ -4268,6 +4016,7 @@ if (Vel) {
4268
4016
  value: function select(tabId) {
4269
4017
  var tab = this.$tabLinks.filter('[href="#' + tabId + '"]');
4270
4018
  if (tab.length) {
4019
+ 4;
4271
4020
  tab.trigger('click');
4272
4021
  }
4273
4022
  }
@@ -4306,8 +4055,8 @@ if (Vel) {
4306
4055
  if (M.jQueryLoaded) {
4307
4056
  M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
4308
4057
  }
4309
- })(cash, M.Vel);
4310
- ;(function ($, Vel) {
4058
+ })(cash, anime);
4059
+ ;(function ($, anim) {
4311
4060
  'use strict';
4312
4061
 
4313
4062
  var _defaults = {
@@ -4315,8 +4064,8 @@ if (Vel) {
4315
4064
  enterDelay: 0,
4316
4065
  html: null,
4317
4066
  margin: 5,
4318
- inDuration: 300,
4319
- outDuration: 250,
4067
+ inDuration: 250,
4068
+ outDuration: 200,
4320
4069
  position: 'bottom',
4321
4070
  transitionMovement: 10
4322
4071
  };
@@ -4475,8 +4224,8 @@ if (Vel) {
4475
4224
 
4476
4225
  this.xMovement = 0, this.yMovement = 0;
4477
4226
 
4478
- targetTop = origin.offsetTop;
4479
- targetLeft = origin.offsetLeft;
4227
+ targetTop = origin.getBoundingClientRect().top + M.getDocumentScrollTop();
4228
+ targetLeft = origin.getBoundingClientRect().left + M.getDocumentScrollLeft();
4480
4229
 
4481
4230
  if (this.options.position === 'top') {
4482
4231
  targetTop += -tooltipHeight - margin;
@@ -4539,29 +4288,27 @@ if (Vel) {
4539
4288
  value: function _animateIn() {
4540
4289
  this._positionTooltip();
4541
4290
  this.tooltipEl.style.visibility = 'visible';
4542
- Vel(this.tooltipEl, 'stop');
4543
- Vel(this.tooltipEl, {
4291
+ anim.remove(this.tooltipEl);
4292
+ anim({
4293
+ targets: this.tooltipEl,
4544
4294
  opacity: 1,
4545
4295
  translateX: this.xMovement,
4546
- translateY: this.yMovement
4547
- }, {
4296
+ translateY: this.yMovement,
4548
4297
  duration: this.options.inDuration,
4549
- easing: 'easeOutCubic',
4550
- queue: false
4298
+ easing: 'easeOutCubic'
4551
4299
  });
4552
4300
  }
4553
4301
  }, {
4554
4302
  key: "_animateOut",
4555
4303
  value: function _animateOut() {
4556
- Vel(this.tooltipEl, 'stop');
4557
- Vel(this.tooltipEl, {
4304
+ anim.remove(this.tooltipEl);
4305
+ anim({
4306
+ targets: this.tooltipEl,
4558
4307
  opacity: 0,
4559
4308
  translateX: 0,
4560
- translateY: 0
4561
- }, {
4309
+ translateY: 0,
4562
4310
  duration: this.options.outDuration,
4563
- easing: 'easeOutCubic',
4564
- queue: false
4311
+ easing: 'easeOutCubic'
4565
4312
  });
4566
4313
  }
4567
4314
  }, {
@@ -4627,7 +4374,7 @@ if (Vel) {
4627
4374
  if (M.jQueryLoaded) {
4628
4375
  M.initializeJqueryWrapper(Tooltip, 'tooltip', 'M_Tooltip');
4629
4376
  }
4630
- })(cash, M.Vel);
4377
+ })(cash, anime);
4631
4378
  ; /*!
4632
4379
  * Waves v0.6.4
4633
4380
  * http://fian.my.id/Waves
@@ -4961,7 +4708,7 @@ if (Vel) {
4961
4708
  Waves.displayEffect();
4962
4709
  }, false);
4963
4710
  })(window);
4964
- ;(function ($, Vel) {
4711
+ ;(function ($, anim) {
4965
4712
  'use strict';
4966
4713
 
4967
4714
  var _defaults = {
@@ -5051,10 +4798,12 @@ if (Vel) {
5051
4798
  key: "_animateIn",
5052
4799
  value: function _animateIn() {
5053
4800
  // Animate toast in
5054
- Vel(this.el, { top: 0, opacity: 1 }, {
4801
+ anim({
4802
+ targets: this.el,
4803
+ top: 0,
4804
+ opacity: 1,
5055
4805
  duration: 300,
5056
- easing: 'easeOutCubic',
5057
- queue: false
4806
+ easing: 'easeOutCubic'
5058
4807
  });
5059
4808
  }
5060
4809
 
@@ -5101,10 +4850,12 @@ if (Vel) {
5101
4850
  this.el.style.opacity = 0;
5102
4851
  }
5103
4852
 
5104
- Vel(this.el, { opacity: 0, marginTop: '-40px' }, {
4853
+ anim({
4854
+ targets: this.el,
4855
+ opacity: 0,
4856
+ marginTop: -40,
5105
4857
  duration: this.options.outDuration,
5106
4858
  easing: 'easeOutExpo',
5107
- queue: false,
5108
4859
  complete: function () {
5109
4860
  // Call the optional callback
5110
4861
  if (typeof _this21.options.completeCallback === 'function') {
@@ -5306,8 +5057,8 @@ if (Vel) {
5306
5057
  M.toast = function (options) {
5307
5058
  return new Toast(options);
5308
5059
  };
5309
- })(cash, M.Vel);
5310
- ;(function ($, Vel) {
5060
+ })(cash, anime);
5061
+ ;(function ($, anim) {
5311
5062
  'use strict';
5312
5063
 
5313
5064
  var _defaults = {
@@ -5486,7 +5237,7 @@ if (Vel) {
5486
5237
 
5487
5238
  /**
5488
5239
  * Set variables needed at the beggining of drag
5489
- * and stop any current Velocity transition.
5240
+ * and stop any current transition.
5490
5241
  * @param {Event} e
5491
5242
  */
5492
5243
 
@@ -5500,8 +5251,8 @@ if (Vel) {
5500
5251
  this._time = Date.now();
5501
5252
  this._width = this.el.getBoundingClientRect().width;
5502
5253
  this._overlay.style.display = 'block';
5503
- Vel(this.el, 'stop');
5504
- Vel(this._overlay, 'stop');
5254
+ anim.remove(this.el);
5255
+ anim.remove(this._overlay);
5505
5256
  }
5506
5257
 
5507
5258
  /**
@@ -5730,8 +5481,13 @@ if (Vel) {
5730
5481
 
5731
5482
  // Handle fixed Sidenav
5732
5483
  if (this.isFixed && window.innerWidth > 992) {
5733
- Vel(this.el, 'stop');
5734
- Vel(this.el, { translateX: 0 }, { duration: 0, queue: false });
5484
+ anim.remove(this.el);
5485
+ anim({
5486
+ targets: this.el,
5487
+ translateX: 0,
5488
+ duration: 0,
5489
+ easing: 'easeOutQuad'
5490
+ });
5735
5491
  this._enableBodyScrolling();
5736
5492
  this._overlay.style.display = 'none';
5737
5493
 
@@ -5790,13 +5546,19 @@ if (Vel) {
5790
5546
  slideOutPercent = this.options.edge === 'left' ? slideOutPercent + this.percentOpen : slideOutPercent - this.percentOpen;
5791
5547
  }
5792
5548
 
5793
- Vel(this.el, 'stop');
5794
- Vel(this.el, { 'translateX': [0, slideOutPercent * 100 + "%"] }, { duration: this.options.inDuration, queue: false, easing: 'easeOutQuad', complete: function () {
5549
+ anim.remove(this.el);
5550
+ anim({
5551
+ targets: this.el,
5552
+ translateX: [slideOutPercent * 100 + "%", 0],
5553
+ duration: this.options.inDuration,
5554
+ easing: 'easeOutQuad',
5555
+ complete: function () {
5795
5556
  // Run onOpenEnd callback
5796
5557
  if (typeof _this22.options.onOpenEnd === 'function') {
5797
5558
  _this22.options.onOpenEnd.call(_this22, _this22.el);
5798
5559
  }
5799
- } });
5560
+ }
5561
+ });
5800
5562
  }
5801
5563
  }, {
5802
5564
  key: "_animateOverlayIn",
@@ -5805,11 +5567,18 @@ if (Vel) {
5805
5567
  if (this.isDragged) {
5806
5568
  start = this.percentOpen;
5807
5569
  } else {
5808
- Vel.hook(this._overlay, 'display', 'block');
5570
+ $(this._overlay).css({
5571
+ display: 'block'
5572
+ });
5809
5573
  }
5810
5574
 
5811
- Vel(this._overlay, 'stop');
5812
- Vel(this._overlay, { opacity: [1, start] }, { duration: this.options.inDuration, queue: false, easing: 'easeOutQuad' });
5575
+ anim.remove(this._overlay);
5576
+ anim({
5577
+ targets: this._overlay,
5578
+ opacity: [start, 1],
5579
+ duration: this.options.inDuration,
5580
+ easing: 'easeOutQuad'
5581
+ });
5813
5582
  }
5814
5583
  }, {
5815
5584
  key: "_animateOut",
@@ -5828,19 +5597,35 @@ if (Vel) {
5828
5597
  slideOutPercent = this.options.edge === 'left' ? endPercent + this.percentOpen : endPercent - this.percentOpen;
5829
5598
  }
5830
5599
 
5831
- Vel(this.el, 'stop');
5832
- Vel(this.el, { 'translateX': [endPercent * 105 + "%", slideOutPercent * 100 + "%"] }, { duration: this.options.outDuration, queue: false, easing: 'easeOutQuad', complete: function () {
5600
+ anim.remove(this.el);
5601
+ anim({
5602
+ targets: this.el,
5603
+ translateX: [slideOutPercent * 100 + "%", endPercent * 105 + "%"],
5604
+ duration: this.options.outDuration,
5605
+ easing: 'easeOutQuad',
5606
+ complete: function () {
5833
5607
  // Run onOpenEnd callback
5834
5608
  if (typeof _this23.options.onCloseEnd === 'function') {
5835
5609
  _this23.options.onCloseEnd.call(_this23, _this23.el);
5836
5610
  }
5837
- } });
5611
+ }
5612
+ });
5838
5613
  }
5839
5614
  }, {
5840
5615
  key: "_animateOverlayOut",
5841
5616
  value: function _animateOverlayOut() {
5842
- Vel(this._overlay, 'stop');
5843
- Vel(this._overlay, 'fadeOut', { duration: this.options.outDuration, queue: false, easing: 'easeOutQuad' });
5617
+ var _this24 = this;
5618
+
5619
+ anim.remove(this._overlay);
5620
+ anim({
5621
+ targets: this._overlay,
5622
+ opacity: 0,
5623
+ duration: this.options.outDuration,
5624
+ easing: 'easeOutQuad',
5625
+ complete: function () {
5626
+ $(_this24._overlay).css('display', 'none');
5627
+ }
5628
+ });
5844
5629
  }
5845
5630
  }], [{
5846
5631
  key: "init",
@@ -5886,8 +5671,8 @@ if (Vel) {
5886
5671
  if (M.jQueryLoaded) {
5887
5672
  M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
5888
5673
  }
5889
- })(cash, M.Vel);
5890
- ;(function ($, Vel) {
5674
+ })(cash, anime);
5675
+ ;(function ($, anim) {
5891
5676
  'use strict';
5892
5677
 
5893
5678
  var _defaults = {
@@ -6005,7 +5790,13 @@ if (Vel) {
6005
5790
  if ($trigger.is('a[href="#' + scrollspy.$el.attr('id') + '"]')) {
6006
5791
  e.preventDefault();
6007
5792
  var offset = scrollspy.$el.offset().top + 1;
6008
- Vel(document.body, 'scroll', { duration: 400, offset: offset - scrollspy.options.scrollOffset, easing: 'easeOutCubic' });
5793
+
5794
+ anim({
5795
+ targets: [document.documentElement, document.body],
5796
+ scrollTop: offset - scrollspy.options.scrollOffset,
5797
+ duration: 400,
5798
+ easing: 'easeOutCubic'
5799
+ });
6009
5800
  break;
6010
5801
  }
6011
5802
  }
@@ -6087,7 +5878,7 @@ if (Vel) {
6087
5878
  }, {
6088
5879
  key: "_exit",
6089
5880
  value: function _exit() {
6090
- var _this24 = this;
5881
+ var _this25 = this;
6091
5882
 
6092
5883
  ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
6093
5884
  return value.height() != 0;
@@ -6097,7 +5888,7 @@ if (Vel) {
6097
5888
  $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
6098
5889
 
6099
5890
  ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (el) {
6100
- return el.attr('id') != _this24.$el.attr('id');
5891
+ return el.attr('id') != _this25.$el.attr('id');
6101
5892
  });
6102
5893
  if (ScrollSpy._visibleElements[0]) {
6103
5894
  // Check if empty
@@ -6204,7 +5995,7 @@ if (Vel) {
6204
5995
  if (M.jQueryLoaded) {
6205
5996
  M.initializeJqueryWrapper(ScrollSpy, 'scrollSpy', 'M_ScrollSpy');
6206
5997
  }
6207
- })(cash, M.Vel);
5998
+ })(cash, anime);
6208
5999
  ;(function ($) {
6209
6000
  'use strict';
6210
6001
 
@@ -6517,7 +6308,7 @@ if (Vel) {
6517
6308
  }, {
6518
6309
  key: "_renderDropdown",
6519
6310
  value: function _renderDropdown(data, val) {
6520
- var _this25 = this;
6311
+ var _this26 = this;
6521
6312
 
6522
6313
  this._removeAutocomplete();
6523
6314
 
@@ -6543,7 +6334,7 @@ if (Vel) {
6543
6334
 
6544
6335
  // Sort
6545
6336
  var sortFunctionBound = function (a, b) {
6546
- return _this25.options.sortFunction(a.key.toLowerCase(), b.key.toLowerCase(), val.toLowerCase());
6337
+ return _this26.options.sortFunction(a.key.toLowerCase(), b.key.toLowerCase(), val.toLowerCase());
6547
6338
  };
6548
6339
  matchingData.sort(sortFunctionBound);
6549
6340
 
@@ -6673,7 +6464,12 @@ if (Vel) {
6673
6464
  var fontFamily = $textarea.css('font-family');
6674
6465
  var fontSize = $textarea.css('font-size');
6675
6466
  var lineHeight = $textarea.css('line-height');
6676
- var padding = $textarea.css('padding');
6467
+
6468
+ // Firefox can't handle padding shorthand.
6469
+ var paddingTop = $textarea.css('padding-top');
6470
+ var paddingRight = $textarea.css('padding-right');
6471
+ var paddingBottom = $textarea.css('padding-bottom');
6472
+ var paddingLeft = $textarea.css('padding-left');
6677
6473
 
6678
6474
  if (fontSize) {
6679
6475
  hiddenDiv.css('font-size', fontSize);
@@ -6684,8 +6480,17 @@ if (Vel) {
6684
6480
  if (lineHeight) {
6685
6481
  hiddenDiv.css('line-height', lineHeight);
6686
6482
  }
6687
- if (padding) {
6688
- hiddenDiv.css('padding', padding);
6483
+ if (paddingTop) {
6484
+ hiddenDiv.css('padding-top', paddingTop);
6485
+ }
6486
+ if (paddingRight) {
6487
+ hiddenDiv.css('padding-right', paddingRight);
6488
+ }
6489
+ if (paddingBottom) {
6490
+ hiddenDiv.css('padding-bottom', paddingBottom);
6491
+ }
6492
+ if (paddingLeft) {
6493
+ hiddenDiv.css('padding-left', paddingLeft);
6689
6494
  }
6690
6495
 
6691
6496
  // Set original-height, if none
@@ -6844,7 +6649,7 @@ if (Vel) {
6844
6649
  });
6845
6650
  }); // End of $(document).ready
6846
6651
  })(cash);
6847
- ;(function ($, Vel) {
6652
+ ;(function ($, anim) {
6848
6653
  'use strict';
6849
6654
 
6850
6655
  var _defaults = {
@@ -6867,7 +6672,7 @@ if (Vel) {
6867
6672
  * @param {Object} options
6868
6673
  */
6869
6674
  function Slider(el, options) {
6870
- var _this26 = this;
6675
+ var _this27 = this;
6871
6676
 
6872
6677
  _classCallCheck(this, Slider);
6873
6678
 
@@ -6902,7 +6707,7 @@ if (Vel) {
6902
6707
 
6903
6708
  // Set initial positions of captions
6904
6709
  this.$slides.find('.caption').each(function (el) {
6905
- _this26._animateCaptionIn(el, 0);
6710
+ _this27._animateCaptionIn(el, 0);
6906
6711
  });
6907
6712
 
6908
6713
  // Move img src into background-image
@@ -6921,7 +6726,12 @@ if (Vel) {
6921
6726
  this.$active.css('display', 'block');
6922
6727
  } else {
6923
6728
  this.$slides.first().addClass('active');
6924
- Vel(this.$slides.first()[0], { opacity: 1 }, { duration: this.options.duration, queue: false, easing: 'easeOutQuad' });
6729
+ anim({
6730
+ targets: this.$slides.first()[0],
6731
+ opacity: 1,
6732
+ duration: this.options.duration,
6733
+ easing: 'easeOutQuad'
6734
+ });
6925
6735
 
6926
6736
  this.activeIndex = 0;
6927
6737
  this.$active = this.$slides.eq(this.activeIndex);
@@ -6934,7 +6744,14 @@ if (Vel) {
6934
6744
 
6935
6745
  // Adjust height to current slide
6936
6746
  this.$active.find('img').each(function (el) {
6937
- Vel(_this26.$active.find('.caption')[0], { opacity: 1, translateX: 0, translateY: 0 }, { duration: _this26.options.duration, queue: false, easing: 'easeOutQuad' });
6747
+ anim({
6748
+ targets: _this27.$active.find('.caption')[0],
6749
+ opacity: 1,
6750
+ translateX: 0,
6751
+ translateY: 0,
6752
+ duration: _this27.options.duration,
6753
+ easing: 'easeOutQuad'
6754
+ });
6938
6755
  });
6939
6756
 
6940
6757
  this._setupEventHandlers();
@@ -6964,14 +6781,14 @@ if (Vel) {
6964
6781
  }, {
6965
6782
  key: "_setupEventHandlers",
6966
6783
  value: function _setupEventHandlers() {
6967
- var _this27 = this;
6784
+ var _this28 = this;
6968
6785
 
6969
6786
  this._handleIntervalBound = this._handleInterval.bind(this);
6970
6787
  this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
6971
6788
 
6972
6789
  if (this.options.indicators) {
6973
6790
  this.$indicators.each(function (el) {
6974
- el.addEventListener('click', _this27._handleIndicatorClickBound);
6791
+ el.addEventListener('click', _this28._handleIndicatorClickBound);
6975
6792
  });
6976
6793
  }
6977
6794
  }
@@ -6983,11 +6800,11 @@ if (Vel) {
6983
6800
  }, {
6984
6801
  key: "_removeEventHandlers",
6985
6802
  value: function _removeEventHandlers() {
6986
- var _this28 = this;
6803
+ var _this29 = this;
6987
6804
 
6988
6805
  if (this.options.indicators) {
6989
6806
  this.$indicators.each(function (el) {
6990
- el.removeEventListener('click', _this28._handleIndicatorClickBound);
6807
+ el.removeEventListener('click', _this29._handleIndicatorClickBound);
6991
6808
  });
6992
6809
  }
6993
6810
  }
@@ -7027,19 +6844,22 @@ if (Vel) {
7027
6844
  }, {
7028
6845
  key: "_animateCaptionIn",
7029
6846
  value: function _animateCaptionIn(caption, duration) {
7030
- var velocityOptions = {
7031
- opacity: 0
6847
+ var animOptions = {
6848
+ targets: caption,
6849
+ opacity: 0,
6850
+ duration: duration,
6851
+ easing: 'easeOutQuad'
7032
6852
  };
7033
6853
 
7034
6854
  if ($(caption).hasClass('center-align')) {
7035
- velocityOptions.translateY = -100;
6855
+ animOptions.translateY = -100;
7036
6856
  } else if ($(caption).hasClass('right-align')) {
7037
- velocityOptions.translateX = 100;
6857
+ animOptions.translateX = 100;
7038
6858
  } else if ($(caption).hasClass('left-align')) {
7039
- velocityOptions.translateX = -100;
6859
+ animOptions.translateX = -100;
7040
6860
  }
7041
6861
 
7042
- Vel(caption, velocityOptions, { duration: duration, queue: false });
6862
+ anim(animOptions);
7043
6863
  }
7044
6864
 
7045
6865
  /**
@@ -7068,13 +6888,13 @@ if (Vel) {
7068
6888
  }, {
7069
6889
  key: "_setupIndicators",
7070
6890
  value: function _setupIndicators() {
7071
- var _this29 = this;
6891
+ var _this30 = this;
7072
6892
 
7073
6893
  if (this.options.indicators) {
7074
6894
  this.$indicators = $('<ul class="indicators"></ul>');
7075
6895
  this.$slides.each(function (el, index) {
7076
6896
  var $indicator = $('<li class="indicator-item"></li>');
7077
- _this29.$indicators.append($indicator[0]);
6897
+ _this30.$indicators.append($indicator[0]);
7078
6898
  });
7079
6899
  this.$el.append(this.$indicators[0]);
7080
6900
  this.$indicators = this.$indicators.children('li.indicator-item');
@@ -7099,7 +6919,7 @@ if (Vel) {
7099
6919
  }, {
7100
6920
  key: "set",
7101
6921
  value: function set(index) {
7102
- var _this30 = this;
6922
+ var _this31 = this;
7103
6923
 
7104
6924
  // Wrap around indices.
7105
6925
  if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1;
@@ -7108,14 +6928,25 @@ if (Vel) {
7108
6928
  if (this.activeIndex != index) {
7109
6929
  this.$active = this.$slides.eq(this.activeIndex);
7110
6930
  var $caption = this.$active.find('.caption');
7111
-
7112
6931
  this.$active.removeClass('active');
7113
- Vel(this.$active[0], { opacity: 0 }, { duration: this.options.duration, queue: false, easing: 'easeOutQuad',
6932
+
6933
+ anim({
6934
+ targets: this.$active[0],
6935
+ opacity: 0,
6936
+ duration: this.options.duration,
6937
+ easing: 'easeOutQuad',
7114
6938
  complete: function () {
7115
- _this30.$slides.not('.active').each(function (el) {
7116
- Vel(el, { opacity: 0, translateX: 0, translateY: 0 }, { duration: 0, queue: false });
6939
+ _this31.$slides.not('.active').each(function (el) {
6940
+ anim({
6941
+ targets: el,
6942
+ opacity: 0,
6943
+ translateX: 0,
6944
+ translateY: 0,
6945
+ duration: 0,
6946
+ easing: 'easeOutQuad'
6947
+ });
7117
6948
  });
7118
- }.bind(this)
6949
+ }
7119
6950
  });
7120
6951
 
7121
6952
  this._animateCaptionIn($caption[0], this.options.duration);
@@ -7126,8 +6957,22 @@ if (Vel) {
7126
6957
  this.$indicators.eq(index).addClass('active');
7127
6958
  }
7128
6959
 
7129
- Vel(this.$slides.eq(index)[0], { opacity: 1 }, { duration: this.options.duration, queue: false, easing: 'easeOutQuad' });
7130
- Vel(this.$slides.eq(index).find('.caption')[0], { opacity: 1, translateX: 0, translateY: 0 }, { duration: this.options.duration, delay: this.options.duration, queue: false, easing: 'easeOutQuad' });
6960
+ anim({
6961
+ targets: this.$slides.eq(index)[0],
6962
+ opacity: 1,
6963
+ duration: this.options.duration,
6964
+ easing: 'easeOutQuad'
6965
+ });
6966
+
6967
+ anim({
6968
+ targets: this.$slides.eq(index).find('.caption')[0],
6969
+ opacity: 1,
6970
+ translateX: 0,
6971
+ translateY: 0,
6972
+ duration: this.options.duration,
6973
+ delay: this.options.duration,
6974
+ easing: 'easeOutQuad'
6975
+ });
7131
6976
 
7132
6977
  this.$slides.eq(index).addClass('active');
7133
6978
  this.activeIndex = index;
@@ -7222,8 +7067,8 @@ if (Vel) {
7222
7067
  if (M.jQueryLoaded) {
7223
7068
  M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider');
7224
7069
  }
7225
- })(cash, M.Vel);
7226
- ;(function ($, Vel) {
7070
+ })(cash, anime);
7071
+ ;(function ($, anim) {
7227
7072
  $(document).on('click', '.card', function (e) {
7228
7073
  if ($(this).children('.card-reveal').length) {
7229
7074
  var $card = $(e.target).closest('.card');
@@ -7233,25 +7078,31 @@ if (Vel) {
7233
7078
  var $cardReveal = $(this).find('.card-reveal');
7234
7079
  if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
7235
7080
  // Make Reveal animate down and display none
7236
- Vel($cardReveal, { translateY: 0 }, {
7081
+ anim({
7082
+ targets: $cardReveal[0],
7083
+ translateY: 0,
7237
7084
  duration: 225,
7238
- queue: false,
7239
7085
  easing: 'easeInOutQuad',
7240
- complete: function () {
7241
- $(this).css({ display: 'none' });
7086
+ complete: function (anim) {
7087
+ var el = anim.animatables[0].target;
7088
+ $(el).css({ display: 'none' });
7242
7089
  $card.css('overflow', $card.data('initialOverflow'));
7243
7090
  }
7244
7091
  });
7245
7092
  } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) {
7246
7093
  $card.css('overflow', 'hidden');
7247
7094
  $cardReveal.css({ display: 'block' });
7248
- Vel($cardReveal, 'stop');
7249
- Vel($cardReveal, { translateY: '-100%' }, { duration: 300, queue: false, easing: 'easeInOutQuad' });
7095
+ anim({
7096
+ targets: $cardReveal[0],
7097
+ translateY: '-100%',
7098
+ duration: 300,
7099
+ easing: 'easeInOutQuad'
7100
+ });
7250
7101
  }
7251
7102
  }
7252
7103
  });
7253
- })(cash, M.Vel);
7254
- ;(function ($, Vel) {
7104
+ })(cash, anime);
7105
+ ;(function ($) {
7255
7106
  'use strict';
7256
7107
 
7257
7108
  var _defaults = {
@@ -7308,8 +7159,7 @@ if (Vel) {
7308
7159
  this.$el.addClass('chips input-field');
7309
7160
  this.chipsData = [];
7310
7161
  this.$chips = $();
7311
- this.$input = this.$el.find('input');
7312
- this.$input.addClass('input');
7162
+ this._setupInput();
7313
7163
  this.hasAutocomplete = Object.keys(this.options.autocompleteOptions).length > 0;
7314
7164
 
7315
7165
  // Set input id
@@ -7521,7 +7371,7 @@ if (Vel) {
7521
7371
  }
7522
7372
 
7523
7373
  // move input to end
7524
- this.$el.append(this.$input);
7374
+ this.$el.append(this.$input[0]);
7525
7375
  }
7526
7376
 
7527
7377
  /**
@@ -7531,17 +7381,33 @@ if (Vel) {
7531
7381
  }, {
7532
7382
  key: "_setupAutocomplete",
7533
7383
  value: function _setupAutocomplete() {
7534
- var _this31 = this;
7384
+ var _this32 = this;
7535
7385
 
7536
7386
  this.options.autocompleteOptions.onAutocomplete = function (val) {
7537
- _this31.addChip({ tag: val });
7538
- _this31.$input[0].value = '';
7539
- _this31.$input[0].focus();
7387
+ _this32.addChip({ tag: val });
7388
+ _this32.$input[0].value = '';
7389
+ _this32.$input[0].focus();
7540
7390
  };
7541
7391
 
7542
7392
  this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0];
7543
7393
  }
7544
7394
 
7395
+ /**
7396
+ * Setup Input
7397
+ */
7398
+
7399
+ }, {
7400
+ key: "_setupInput",
7401
+ value: function _setupInput() {
7402
+ this.$input = this.$el.find('input');
7403
+ if (!this.$input.length) {
7404
+ this.$input = $('<input></input>');
7405
+ this.$el.append(this.$input);
7406
+ }
7407
+
7408
+ this.$input.addClass('input');
7409
+ }
7410
+
7545
7411
  /**
7546
7412
  * Setup Label
7547
7413
  */
@@ -7623,7 +7489,7 @@ if (Vel) {
7623
7489
  }, {
7624
7490
  key: "deleteChip",
7625
7491
  value: function deleteChip(chipIndex) {
7626
- // let chip = this.chips[chipIndex];
7492
+ var $chip = this.$chips.eq(chipIndex);
7627
7493
  this.$chips.eq(chipIndex).remove();
7628
7494
  this.$chips = this.$chips.filter(function (el) {
7629
7495
  return $(el).index() >= 0;
@@ -7633,7 +7499,7 @@ if (Vel) {
7633
7499
 
7634
7500
  // fire chipDelete callback
7635
7501
  if (typeof this.options.onChipDelete === 'function') {
7636
- this.options.onChipDelete.call(this, this.$el, this.$chip);
7502
+ this.options.onChipDelete.call(this, this.$el, $chip[0]);
7637
7503
  }
7638
7504
  }
7639
7505
 
@@ -7651,21 +7517,9 @@ if (Vel) {
7651
7517
 
7652
7518
  // fire chipSelect callback
7653
7519
  if (typeof this.options.onChipSelect === 'function') {
7654
- this.options.onChipSelect.call(this, this.$el, this.$chip);
7520
+ this.options.onChipSelect.call(this, this.$el, $chip[0]);
7655
7521
  }
7656
7522
  }
7657
-
7658
- /**
7659
- * Deselect chip
7660
- * @param {Number} chip
7661
- */
7662
-
7663
- }, {
7664
- key: "deselectChip",
7665
- value: function deselectChip(chipIndex) {
7666
- var $chip = this.$chips.eq(chipIndex);
7667
- this._selectedChip = null;
7668
- }
7669
7523
  }], [{
7670
7524
  key: "init",
7671
7525
  value: function init($els, options) {
@@ -7956,7 +7810,7 @@ if (Vel) {
7956
7810
  M.initializeJqueryWrapper(Pushpin, 'pushpin', 'M_Pushpin');
7957
7811
  }
7958
7812
  })(cash);
7959
- ;(function ($, Vel) {
7813
+ ;(function ($, anim) {
7960
7814
  'use strict';
7961
7815
 
7962
7816
  var _defaults = {
@@ -8005,6 +7859,8 @@ if (Vel) {
8005
7859
  this.$menu = this.$el.children('ul').first();
8006
7860
  this.$floatingBtns = this.$el.find('ul .btn-floating');
8007
7861
  this.$floatingBtnsReverse = this.$el.find('ul .btn-floating').reverse();
7862
+ this.offsetY = 0;
7863
+ this.offsetX = 0;
8008
7864
  if (this.options.direction === 'top') {
8009
7865
  this.$el.addClass('direction-top');
8010
7866
  this.offsetY = 40;
@@ -8141,15 +7997,22 @@ if (Vel) {
8141
7997
  }, {
8142
7998
  key: "_animateInFAB",
8143
7999
  value: function _animateInFAB() {
8000
+ var _this33 = this;
8001
+
8144
8002
  this.$el.addClass('active');
8145
- Vel.hook(this.$floatingBtns, 'scaleX', 0.4);
8146
- Vel.hook(this.$floatingBtns, 'scaleY', 0.4);
8147
- Vel.hook(this.$floatingBtns, 'translateY', this.offsetY + 'px');
8148
- Vel.hook(this.$floatingBtns, 'translateX', this.offsetX + 'px');
8149
8003
 
8150
8004
  var time = 0;
8151
- this.$floatingBtnsReverse.each(function () {
8152
- Vel(this, { opacity: "1", scaleX: 1, scaleY: 1, translateY: 0, translateX: 0 }, { duration: 80, delay: time });
8005
+ this.$floatingBtnsReverse.each(function (el) {
8006
+ anim({
8007
+ targets: el,
8008
+ opacity: 1,
8009
+ scale: [.4, 1],
8010
+ translateY: [_this33.offsetY, 0],
8011
+ translateX: [_this33.offsetX, 0],
8012
+ duration: 275,
8013
+ delay: time,
8014
+ easing: 'easeInOutQuad'
8015
+ });
8153
8016
  time += 40;
8154
8017
  });
8155
8018
  }
@@ -8161,9 +8024,23 @@ if (Vel) {
8161
8024
  }, {
8162
8025
  key: "_animateOutFAB",
8163
8026
  value: function _animateOutFAB() {
8164
- this.$el.removeClass('active');
8165
- Vel(this.$floatingBtns, 'stop');
8166
- Vel(this.$floatingBtns, { opacity: "0", scaleX: .4, scaleY: .4, translateY: this.offsetY, translateX: this.offsetX }, { duration: 80 });
8027
+ var _this34 = this;
8028
+
8029
+ this.$floatingBtnsReverse.each(function (el) {
8030
+ anim.remove(el);
8031
+ anim({
8032
+ targets: el,
8033
+ opacity: 0,
8034
+ scale: .4,
8035
+ translateY: _this34.offsetY,
8036
+ translateX: _this34.offsetX,
8037
+ duration: 175,
8038
+ easing: 'easeOutQuad',
8039
+ complete: function () {
8040
+ _this34.$el.removeClass('active');
8041
+ }
8042
+ });
8043
+ });
8167
8044
  }
8168
8045
 
8169
8046
  /**
@@ -8173,7 +8050,7 @@ if (Vel) {
8173
8050
  }, {
8174
8051
  key: "_animateInToolbar",
8175
8052
  value: function _animateInToolbar() {
8176
- var _this32 = this;
8053
+ var _this35 = this;
8177
8054
 
8178
8055
  var scaleFactor = void 0;
8179
8056
  var windowWidth = window.innerWidth;
@@ -8209,18 +8086,18 @@ if (Vel) {
8209
8086
  });
8210
8087
 
8211
8088
  setTimeout(function () {
8212
- _this32.$el.css({
8089
+ _this35.$el.css({
8213
8090
  transform: '',
8214
8091
  transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
8215
8092
  });
8216
- _this32.$anchor.css({
8093
+ _this35.$anchor.css({
8217
8094
  overflow: 'visible',
8218
8095
  transform: '',
8219
8096
  transition: 'transform .2s'
8220
8097
  });
8221
8098
 
8222
8099
  setTimeout(function () {
8223
- _this32.$el.css({
8100
+ _this35.$el.css({
8224
8101
  overflow: 'hidden',
8225
8102
  'background-color': fabColor
8226
8103
  });
@@ -8228,14 +8105,14 @@ if (Vel) {
8228
8105
  transform: 'scale(' + scaleFactor + ')',
8229
8106
  transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
8230
8107
  });
8231
- _this32.$menu.children('li').children('a').css({
8108
+ _this35.$menu.children('li').children('a').css({
8232
8109
  opacity: 1
8233
8110
  });
8234
8111
 
8235
8112
  // Scroll to close.
8236
- _this32._handleDocumentClickBound = _this32._handleDocumentClick.bind(_this32);
8237
- window.addEventListener('scroll', _this32._handleCloseBound, true);
8238
- document.body.addEventListener('click', _this32._handleDocumentClickBound, true);
8113
+ _this35._handleDocumentClickBound = _this35._handleDocumentClick.bind(_this35);
8114
+ window.addEventListener('scroll', _this35._handleCloseBound, true);
8115
+ document.body.addEventListener('click', _this35._handleDocumentClickBound, true);
8239
8116
  }, 100);
8240
8117
  }, 0);
8241
8118
  }
@@ -8247,7 +8124,7 @@ if (Vel) {
8247
8124
  }, {
8248
8125
  key: "_animateOutToolbar",
8249
8126
  value: function _animateOutToolbar() {
8250
- var _this33 = this;
8127
+ var _this36 = this;
8251
8128
 
8252
8129
  var windowWidth = window.innerWidth;
8253
8130
  var windowHeight = window.innerHeight;
@@ -8278,26 +8155,26 @@ if (Vel) {
8278
8155
  backdrop.remove();
8279
8156
 
8280
8157
  // Set initial state.
8281
- _this33.$el.css({
8158
+ _this36.$el.css({
8282
8159
  'text-align': '',
8283
8160
  width: '',
8284
8161
  bottom: '',
8285
8162
  left: '',
8286
8163
  overflow: '',
8287
8164
  'background-color': '',
8288
- transform: 'translate3d(' + -_this33.offsetX + 'px,0,0)'
8165
+ transform: 'translate3d(' + -_this36.offsetX + 'px,0,0)'
8289
8166
  });
8290
- _this33.$anchor.css({
8167
+ _this36.$anchor.css({
8291
8168
  overflow: '',
8292
- transform: 'translate3d(0,' + _this33.offsetY + 'px,0)'
8169
+ transform: 'translate3d(0,' + _this36.offsetY + 'px,0)'
8293
8170
  });
8294
8171
 
8295
8172
  setTimeout(function () {
8296
- _this33.$el.css({
8173
+ _this36.$el.css({
8297
8174
  transform: 'translate3d(0,0,0)',
8298
8175
  transition: 'transform .2s'
8299
8176
  });
8300
- _this33.$anchor.css({
8177
+ _this36.$anchor.css({
8301
8178
  transform: 'translate3d(0,0,0)',
8302
8179
  transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
8303
8180
  });
@@ -8339,18 +8216,14 @@ if (Vel) {
8339
8216
  if (M.jQueryLoaded) {
8340
8217
  M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton');
8341
8218
  }
8342
- })(cash, M.Vel);
8343
- ;(function ($, Vel) {
8219
+ })(cash, anime);
8220
+ ;(function ($) {
8344
8221
  'use strict';
8345
8222
 
8346
8223
  var _defaults = {
8347
8224
 
8348
8225
  // the default output format for the input field value
8349
- format: 'YYYY-MM-DD',
8350
-
8351
- // the toString function which gets passed a current date object and format
8352
- // and returns a string
8353
- toString: null,
8226
+ format: 'mmm dd, yyyy',
8354
8227
 
8355
8228
  // Used to create date object from current input string
8356
8229
  parse: null,
@@ -8446,6 +8319,10 @@ if (Vel) {
8446
8319
 
8447
8320
  this.options = $.extend({}, Datepicker.defaults, options);
8448
8321
 
8322
+ // Remove time component from minDate and maxDate options
8323
+ if (this.options.minDate) this.options.minDate.setHours(0, 0, 0, 0);
8324
+ if (this.options.maxDate) this.options.maxDate.setHours(0, 0, 0, 0);
8325
+
8449
8326
  this.id = M.guid();
8450
8327
 
8451
8328
  this._setupVariables();
@@ -8503,26 +8380,34 @@ if (Vel) {
8503
8380
  }, {
8504
8381
  key: "_setupModal",
8505
8382
  value: function _setupModal() {
8506
- var _this34 = this;
8383
+ var _this37 = this;
8507
8384
 
8508
8385
  this.modalEl.id = 'modal-' + this.id;
8509
8386
  this.modal = new M.Modal(this.modalEl, {
8510
8387
  complete: function () {
8511
- _this34.isOpen = false;
8388
+ _this37.isOpen = false;
8512
8389
  }
8513
8390
  });
8514
8391
  }
8515
8392
  }, {
8516
8393
  key: "toString",
8517
8394
  value: function toString(format) {
8395
+ var _this38 = this;
8396
+
8518
8397
  format = format || this.options.format;
8519
8398
  if (!Datepicker._isDate(this.date)) {
8520
8399
  return '';
8521
8400
  }
8522
- if (this.options.toString) {
8523
- return this.options.toString(this.date, format);
8524
- }
8525
- return this.date.toDateString();
8401
+
8402
+ var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
8403
+ var formattedDate = formatArray.map(function (label) {
8404
+ if (_this38.formats[label]) {
8405
+ return _this38.formats[label]();
8406
+ } else {
8407
+ return label;
8408
+ }
8409
+ }).join('');
8410
+ return formattedDate;
8526
8411
  }
8527
8412
  }, {
8528
8413
  key: "setDate",
@@ -8556,7 +8441,7 @@ if (Vel) {
8556
8441
  this.gotoDate(this.date);
8557
8442
 
8558
8443
  if (!preventOnSelect && typeof this.options.onSelect === 'function') {
8559
- this.options.onSelect.call(this, this.getDate());
8444
+ this.options.onSelect.call(this, this.date);
8560
8445
  }
8561
8446
  }
8562
8447
  }, {
@@ -8811,7 +8696,6 @@ if (Vel) {
8811
8696
  arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' + (i === month ? ' selected="selected"' : '') + (isMinYear && i < opts.minMonth || isMaxYear && i > opts.maxMonth ? 'disabled="disabled"' : '') + '>' + opts.i18n.months[i] + '</option>');
8812
8697
  }
8813
8698
 
8814
- // monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';
8815
8699
  monthHtml = '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select>';
8816
8700
 
8817
8701
  if ($.isArray(opts.yearRange)) {
@@ -8827,7 +8711,7 @@ if (Vel) {
8827
8711
  arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"' : '') + '>' + i + '</option>');
8828
8712
  }
8829
8713
  }
8830
- // yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';
8714
+
8831
8715
  yearHtml = '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select>';
8832
8716
 
8833
8717
  var leftArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg>';
@@ -8898,8 +8782,14 @@ if (Vel) {
8898
8782
  this.calendarEl.innerHTML = html;
8899
8783
 
8900
8784
  // Init Materialize Select
8901
- new M.Select(this.calendarEl.querySelector('.pika-select-year'), { classes: 'select-year' });
8902
- new M.Select(this.calendarEl.querySelector('.pika-select-month'), { classes: 'select-month' });
8785
+ var yearSelect = this.calendarEl.querySelector('.pika-select-year');
8786
+ var monthSelect = this.calendarEl.querySelector('.pika-select-month');
8787
+ new M.Select(yearSelect, { classes: 'select-year' });
8788
+ new M.Select(monthSelect, { classes: 'select-month' });
8789
+
8790
+ // Add change handlers for select
8791
+ yearSelect.addEventListener('change', this._handleYearChange.bind(this));
8792
+ monthSelect.addEventListener('change', this._handleMonthChange.bind(this));
8903
8793
 
8904
8794
  if (typeof this.options.onDraw === 'function') {
8905
8795
  this.options.onDraw(this);
@@ -8920,6 +8810,7 @@ if (Vel) {
8920
8810
  this._finishSelectionBound = this._finishSelection.bind(this);
8921
8811
  this._handleTodayClickBound = this._handleTodayClick.bind(this);
8922
8812
  this._handleClearClickBound = this._handleClearClick.bind(this);
8813
+ this._handleMonthChange = this._handleMonthChange.bind(this);
8923
8814
 
8924
8815
  this.el.addEventListener('click', this._handleInputClickBound);
8925
8816
  this.el.addEventListener('keydown', this._handleInputKeydownBound);
@@ -8932,6 +8823,8 @@ if (Vel) {
8932
8823
  }, {
8933
8824
  key: "_setupVariables",
8934
8825
  value: function _setupVariables() {
8826
+ var _this39 = this;
8827
+
8935
8828
  this.$modalEl = $(Datepicker._template);
8936
8829
  this.modalEl = this.$modalEl[0];
8937
8830
 
@@ -8942,6 +8835,34 @@ if (Vel) {
8942
8835
  this.clearBtn = this.modalEl.querySelector('.datepicker-clear');
8943
8836
  this.todayBtn = this.modalEl.querySelector('.datepicker-today');
8944
8837
  this.doneBtn = this.modalEl.querySelector('.datepicker-done');
8838
+
8839
+ this.formats = {
8840
+
8841
+ dd: function () {
8842
+ return _this39.date.getDate();
8843
+ },
8844
+ ddd: function () {
8845
+ return _this39.options.i18n.weekdaysShort[_this39.date.getDay()];
8846
+ },
8847
+ dddd: function () {
8848
+ return _this39.options.i18n.weekdays[_this39.date.getDay()];
8849
+ },
8850
+ mm: function () {
8851
+ return _this39.date.getMonth() + 1;
8852
+ },
8853
+ mmm: function () {
8854
+ return _this39.options.i18n.monthsShort[_this39.date.getMonth()];
8855
+ },
8856
+ mmmm: function () {
8857
+ return _this39.options.i18n.monthsShort[_this39.date.getMonth()];
8858
+ },
8859
+ yy: function () {
8860
+ return _this39.date.getFullYear().slice(2);
8861
+ },
8862
+ yyyy: function () {
8863
+ return _this39.date.getFullYear();
8864
+ }
8865
+ };
8945
8866
  }
8946
8867
 
8947
8868
  /**
@@ -9012,50 +8933,42 @@ if (Vel) {
9012
8933
  this.setInputValue();
9013
8934
  this.close();
9014
8935
  }
8936
+ }, {
8937
+ key: "_handleMonthChange",
8938
+ value: function _handleMonthChange(e) {
8939
+ this.gotoMonth(e.target.value);
8940
+ }
8941
+ }, {
8942
+ key: "_handleYearChange",
8943
+ value: function _handleYearChange(e) {
8944
+ this.gotoYear(e.target.value);
8945
+ }
8946
+
8947
+ /**
8948
+ * change view to a specific month (zero-index, e.g. 0: January)
8949
+ */
8950
+
8951
+ }, {
8952
+ key: "gotoMonth",
8953
+ value: function gotoMonth(month) {
8954
+ if (!isNaN(month)) {
8955
+ this.calendars[0].month = parseInt(month, 10);
8956
+ this.adjustCalendars();
8957
+ }
8958
+ }
9015
8959
 
9016
- // _onChange(e) {
9017
- // e = e || window.event;
9018
- // let target = e.target || e.srcElement;
9019
- // if (!target) {
9020
- // return;
9021
- // }
9022
- // if (hasClass(target, 'pika-select-month')) {
9023
- // self.gotoMonth(target.value);
9024
- // }
9025
- // else if (hasClass(target, 'pika-select-year')) {
9026
- // self.gotoYear(target.value);
9027
- // }
9028
- // }
9029
-
9030
- // _onKeyChange(e) {
9031
- // e = e || window.event;
9032
-
9033
- // if (self.isVisible()) {
9034
-
9035
- // switch(e.keyCode){
9036
- // case 13:
9037
- // case 27:
9038
- // if (opts.field) {
9039
- // opts.field.blur();
9040
- // }
9041
- // break;
9042
- // case 37:
9043
- // e.preventDefault();
9044
- // self.adjustDate('subtract', 1);
9045
- // break;
9046
- // case 38:
9047
- // self.adjustDate('subtract', 7);
9048
- // break;
9049
- // case 39:
9050
- // self.adjustDate('add', 1);
9051
- // break;
9052
- // case 40:
9053
- // self.adjustDate('add', 7);
9054
- // break;
9055
- // }
9056
- // }
9057
- // }
8960
+ /**
8961
+ * change view to a specific full year (e.g. "2012")
8962
+ */
9058
8963
 
8964
+ }, {
8965
+ key: "gotoYear",
8966
+ value: function gotoYear(year) {
8967
+ if (!isNaN(year)) {
8968
+ this.calendars[0].year = parseInt(year, 10);
8969
+ this.adjustCalendars();
8970
+ }
8971
+ }
9059
8972
  }, {
9060
8973
  key: "_handleInputChange",
9061
8974
  value: function _handleInputChange(e) {
@@ -9078,26 +8991,6 @@ if (Vel) {
9078
8991
  // self.show();
9079
8992
  // }
9080
8993
  }
9081
-
9082
- // _onInputBlur() {
9083
- // // IE allows pika div to gain focus; catch blur the input field
9084
- // let pEl = document.activeElement;
9085
- // do {
9086
- // if (hasClass(pEl, 'pika-single')) {
9087
- // return;
9088
- // }
9089
- // }
9090
- // while ((pEl = pEl.parentNode));
9091
-
9092
- // if (!self._c) {
9093
- // self._b = sto(function() {
9094
- // self.hide();
9095
- // }, 50);
9096
- // }
9097
- // self._c = false;
9098
- // }
9099
-
9100
-
9101
8994
  }, {
9102
8995
  key: "renderDayName",
9103
8996
  value: function renderDayName(opts, day, abbr) {
@@ -9233,8 +9126,8 @@ if (Vel) {
9233
9126
  if (M.jQueryLoaded) {
9234
9127
  M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker');
9235
9128
  }
9236
- })(cash, M.Vel);
9237
- ;(function ($, Vel) {
9129
+ })(cash);
9130
+ ;(function ($) {
9238
9131
  'use strict';
9239
9132
 
9240
9133
  var _defaults = {
@@ -9417,11 +9310,11 @@ if (Vel) {
9417
9310
  }, {
9418
9311
  key: "_setupModal",
9419
9312
  value: function _setupModal() {
9420
- var _this35 = this;
9313
+ var _this40 = this;
9421
9314
 
9422
9315
  this.modal = new M.Modal(this.modalEl, {
9423
9316
  complete: function () {
9424
- _this35.isOpen = false;
9317
+ _this40.isOpen = false;
9425
9318
  }
9426
9319
  });
9427
9320
  }
@@ -9562,8 +9455,10 @@ if (Vel) {
9562
9455
  }, {
9563
9456
  key: "_updateAmPmView",
9564
9457
  value: function _updateAmPmView() {
9565
- this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM');
9566
- this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM');
9458
+ if (this.options.twelveHour) {
9459
+ this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM');
9460
+ this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM');
9461
+ }
9567
9462
  }
9568
9463
  }, {
9569
9464
  key: "_updateTimeFromInput",
@@ -9645,7 +9540,7 @@ if (Vel) {
9645
9540
  }, {
9646
9541
  key: "setHand",
9647
9542
  value: function setHand(x, y, roundBy5) {
9648
- var _this36 = this;
9543
+ var _this41 = this;
9649
9544
 
9650
9545
  var radian = Math.atan2(x, -y),
9651
9546
  isHours = this.currentView === 'hours',
@@ -9700,7 +9595,7 @@ if (Vel) {
9700
9595
  if (!this.vibrateTimer) {
9701
9596
  navigator[this.vibrate](10);
9702
9597
  this.vibrateTimer = setTimeout(function () {
9703
- _this36.vibrateTimer = null;
9598
+ _this41.vibrateTimer = null;
9704
9599
  }, 100);
9705
9600
  }
9706
9601
  }
@@ -9845,7 +9740,7 @@ if (Vel) {
9845
9740
  if (M.jQueryLoaded) {
9846
9741
  M.initializeJqueryWrapper(Timepicker, 'timepicker', 'M_Timepicker');
9847
9742
  }
9848
- })(cash, M.Vel);
9743
+ })(cash);
9849
9744
  ;(function ($) {
9850
9745
  'use strict';
9851
9746
 
@@ -10049,7 +9944,7 @@ if (Vel) {
10049
9944
  * @param {Object} options
10050
9945
  */
10051
9946
  function Carousel(el, options) {
10052
- var _this37 = this;
9947
+ var _this42 = this;
10053
9948
 
10054
9949
  _classCallCheck(this, Carousel);
10055
9950
 
@@ -10104,8 +9999,8 @@ if (Vel) {
10104
9999
  // Iterate through slides
10105
10000
  this.$indicators = $('<ul class="indicators"></ul>');
10106
10001
  this.$el.find('.carousel-item').each(function (el, i) {
10107
- _this37.images.push(el);
10108
- if (_this37.showIndicators) {
10002
+ _this42.images.push(el);
10003
+ if (_this42.showIndicators) {
10109
10004
  var $indicator = $('<li class="indicator-item"></li>');
10110
10005
 
10111
10006
  // Add active to first by default.
@@ -10113,7 +10008,7 @@ if (Vel) {
10113
10008
  $indicator[0].classList.add('active');
10114
10009
  }
10115
10010
 
10116
- _this37.$indicators.append($indicator);
10011
+ _this42.$indicators.append($indicator);
10117
10012
  }
10118
10013
  });
10119
10014
  if (this.showIndicators) {
@@ -10126,7 +10021,7 @@ if (Vel) {
10126
10021
  ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {
10127
10022
  var e = prefix + 'Transform';
10128
10023
  if (typeof document.body.style[e] !== 'undefined') {
10129
- _this37.xform = e;
10024
+ _this42.xform = e;
10130
10025
  return false;
10131
10026
  }
10132
10027
  return true;
@@ -10155,7 +10050,7 @@ if (Vel) {
10155
10050
  }, {
10156
10051
  key: "_setupEventHandlers",
10157
10052
  value: function _setupEventHandlers() {
10158
- var _this38 = this;
10053
+ var _this43 = this;
10159
10054
 
10160
10055
  this._handleCarouselTapBound = this._handleCarouselTap.bind(this);
10161
10056
  this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);
@@ -10177,7 +10072,7 @@ if (Vel) {
10177
10072
  if (this.showIndicators && this.$indicators) {
10178
10073
  this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
10179
10074
  this.$indicators.find('.indicator-item').each(function (el, i) {
10180
- el.addEventListener('click', _this38._handleIndicatorClickBound);
10075
+ el.addEventListener('click', _this43._handleIndicatorClickBound);
10181
10076
  });
10182
10077
  }
10183
10078
 
@@ -10195,7 +10090,7 @@ if (Vel) {
10195
10090
  }, {
10196
10091
  key: "_removeEventHandlers",
10197
10092
  value: function _removeEventHandlers() {
10198
- var _this39 = this;
10093
+ var _this44 = this;
10199
10094
 
10200
10095
  if (typeof window.ontouchstart !== 'undefined') {
10201
10096
  this.el.removeEventListener('touchstart', this._handleCarouselTapBound);
@@ -10210,7 +10105,7 @@ if (Vel) {
10210
10105
 
10211
10106
  if (this.showIndicators && this.$indicators) {
10212
10107
  this.$indicators.find('.indicator-item').each(function (el, i) {
10213
- el.removeEventListener('click', _this39._handleIndicatorClickBound);
10108
+ el.removeEventListener('click', _this44._handleIndicatorClickBound);
10214
10109
  });
10215
10110
  }
10216
10111
 
@@ -10396,7 +10291,7 @@ if (Vel) {
10396
10291
  }, {
10397
10292
  key: "_setCarouselHeight",
10398
10293
  value: function _setCarouselHeight(imageOnly) {
10399
- var _this40 = this;
10294
+ var _this45 = this;
10400
10295
 
10401
10296
  var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first();
10402
10297
  var firstImage = firstSlide.find('img').first();
@@ -10416,7 +10311,7 @@ if (Vel) {
10416
10311
  } else {
10417
10312
  // Get height when image is loaded normally
10418
10313
  firstImage.one('load', function (el, i) {
10419
- _this40.$el.css('height', el.offsetHeight + 'px');
10314
+ _this45.$el.css('height', el.offsetHeight + 'px');
10420
10315
  });
10421
10316
  }
10422
10317
  } else if (!imageOnly) {
@@ -10522,7 +10417,7 @@ if (Vel) {
10522
10417
  }, {
10523
10418
  key: "_scroll",
10524
10419
  value: function _scroll(x) {
10525
- var _this41 = this;
10420
+ var _this46 = this;
10526
10421
 
10527
10422
  // Track scrolling state
10528
10423
  if (!this.$el.hasClass('scrolling')) {
@@ -10532,7 +10427,7 @@ if (Vel) {
10532
10427
  window.clearTimeout(this.scrollingTimeout);
10533
10428
  }
10534
10429
  this.scrollingTimeout = window.setTimeout(function () {
10535
- _this41.$el.removeClass('scrolling');
10430
+ _this46.$el.removeClass('scrolling');
10536
10431
  }, this.options.duration);
10537
10432
 
10538
10433
  // Start actual scroll
@@ -11192,8 +11087,8 @@ if (Vel) {
11192
11087
  this.isMultiple = this.$el.prop('multiple');
11193
11088
 
11194
11089
  // Setup
11195
- this.valuesSelected = [];
11196
- this.$selectedOptions = $();
11090
+ this._keysSelected = {};
11091
+ this._valueDict = {}; // Maps key to original and generated option element.
11197
11092
  this._setupDropdown();
11198
11093
 
11199
11094
  this._setupEventHandlers();
@@ -11219,14 +11114,14 @@ if (Vel) {
11219
11114
  }, {
11220
11115
  key: "_setupEventHandlers",
11221
11116
  value: function _setupEventHandlers() {
11222
- var _this42 = this;
11117
+ var _this47 = this;
11223
11118
 
11224
11119
  this._handleSelectChangeBound = this._handleSelectChange.bind(this);
11225
11120
  this._handleOptionClickBound = this._handleOptionClick.bind(this);
11226
11121
  this._handleInputClickBound = this._handleInputClick.bind(this);
11227
11122
 
11228
11123
  $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
11229
- el.addEventListener('click', _this42._handleOptionClickBound);
11124
+ el.addEventListener('click', _this47._handleOptionClickBound);
11230
11125
  });
11231
11126
  this.el.addEventListener('change', this._handleSelectChangeBound);
11232
11127
  this.input.addEventListener('click', this._handleInputClickBound);
@@ -11239,10 +11134,10 @@ if (Vel) {
11239
11134
  }, {
11240
11135
  key: "_removeEventHandlers",
11241
11136
  value: function _removeEventHandlers() {
11242
- var _this43 = this;
11137
+ var _this48 = this;
11243
11138
 
11244
11139
  $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
11245
- el.removeEventListener('click', _this43._handleOptionClickBound);
11140
+ el.removeEventListener('click', _this48._handleOptionClickBound);
11246
11141
  });
11247
11142
  this.el.removeEventListener('change', this._handleSelectChangeBound);
11248
11143
  this.input.removeEventListener('click', this._handleInputClickBound);
@@ -11270,14 +11165,14 @@ if (Vel) {
11270
11165
  value: function _handleOptionClick(e) {
11271
11166
  e.preventDefault();
11272
11167
  var option = $(e.target).closest('li')[0];
11273
- var optionIndex = $(this.dropdownOptions).find('li:not(.optgroup)').index(option);
11274
- if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup')) {
11168
+ var key = option.id;
11169
+ if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup') && key.length) {
11275
11170
  var selected = true;
11276
11171
 
11277
11172
  if (this.isMultiple) {
11278
11173
  var checkbox = $(option).find('input[type="checkbox"]');
11279
11174
  checkbox.prop('checked', !checkbox.prop('checked'));
11280
- selected = this._toggleEntryFromArray(optionIndex);
11175
+ selected = this._toggleEntryFromArray(key);
11281
11176
  } else {
11282
11177
  $(this.dropdownOptions).find('li').removeClass('active');
11283
11178
  $(option).toggleClass('active');
@@ -11285,7 +11180,7 @@ if (Vel) {
11285
11180
  }
11286
11181
 
11287
11182
  this._activateOption($(this.dropdownOptions), option);
11288
- this.$el.find('option').eq(optionIndex).prop('selected', selected);
11183
+ $(this._valueDict[key].el).prop('selected', selected);
11289
11184
  this.$el.trigger('change');
11290
11185
  }
11291
11186
 
@@ -11312,7 +11207,7 @@ if (Vel) {
11312
11207
  }, {
11313
11208
  key: "_setupDropdown",
11314
11209
  value: function _setupDropdown() {
11315
- var _this44 = this;
11210
+ var _this49 = this;
11316
11211
 
11317
11212
  this.wrapper = document.createElement('div');
11318
11213
  this.wrapper.classList.add();
@@ -11336,25 +11231,21 @@ if (Vel) {
11336
11231
  if ($(el).is('option')) {
11337
11232
  // Direct descendant option.
11338
11233
  var optionEl = void 0;
11339
- if (_this44.isMultiple) {
11340
- optionEl = _this44._appendOptionWithIcon(_this44.$el, el, 'multiple');
11234
+ if (_this49.isMultiple) {
11235
+ optionEl = _this49._appendOptionWithIcon(_this49.$el, el, 'multiple');
11341
11236
  } else {
11342
- optionEl = _this44._appendOptionWithIcon(_this44.$el, el);
11237
+ optionEl = _this49._appendOptionWithIcon(_this49.$el, el);
11343
11238
  }
11344
11239
 
11345
- if ($(el).prop('selected')) {
11346
- _this44.$selectedOptions.add(optionEl);
11347
- }
11240
+ _this49._addOptionToValueDict(el, optionEl);
11348
11241
  } else if ($(el).is('optgroup')) {
11349
11242
  // Optgroup.
11350
11243
  var selectOptions = $(el).children('option');
11351
- $(_this44.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]);
11244
+ $(_this49.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]);
11352
11245
 
11353
11246
  selectOptions.each(function (el) {
11354
- var optionEl = _this44._appendOptionWithIcon(_this44.$el, el, 'optgroup-option');
11355
- if ($(el).prop('selected')) {
11356
- _this44.$selectedOptions.add(optionEl);
11357
- }
11247
+ var optionEl = _this49._appendOptionWithIcon(_this49.$el, el, 'optgroup-option');
11248
+ _this49._addOptionToValueDict(el, optionEl);
11358
11249
  });
11359
11250
  }
11360
11251
  });
@@ -11376,7 +11267,7 @@ if (Vel) {
11376
11267
  this._setValueToInput();
11377
11268
 
11378
11269
  // Add caret
11379
- var dropdownIcon = $('<svg class="caret" fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
11270
+ var dropdownIcon = $('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
11380
11271
  this.$el.before(dropdownIcon[0]);
11381
11272
 
11382
11273
  // Initialize dropdown
@@ -11392,6 +11283,25 @@ if (Vel) {
11392
11283
  this._setSelectedStates();
11393
11284
  }
11394
11285
 
11286
+ /**
11287
+ * Add option to value dict
11288
+ * @param {Element} el original option element
11289
+ * @param {Element} optionEl generated option element
11290
+ */
11291
+
11292
+ }, {
11293
+ key: "_addOptionToValueDict",
11294
+ value: function _addOptionToValueDict(el, optionEl) {
11295
+ var index = Object.keys(this._valueDict).length;
11296
+ var key = this.dropdownOptions.id + index;
11297
+ var obj = {};
11298
+ optionEl.id = key;
11299
+
11300
+ obj.el = el;
11301
+ obj.optionEl = optionEl;
11302
+ this._valueDict[key] = obj;
11303
+ }
11304
+
11395
11305
  /**
11396
11306
  * Remove dropdown
11397
11307
  */
@@ -11442,26 +11352,24 @@ if (Vel) {
11442
11352
 
11443
11353
  /**
11444
11354
  * Toggle entry from option
11445
- * @param {Number} entryIndex
11355
+ * @param {String} key Option key
11446
11356
  * @return {Boolean} if entry was added or removed
11447
11357
  */
11448
11358
 
11449
11359
  }, {
11450
11360
  key: "_toggleEntryFromArray",
11451
- value: function _toggleEntryFromArray(entryIndex) {
11452
- var index = this.valuesSelected.indexOf(entryIndex),
11453
- notAdded = index === -1;
11454
-
11361
+ value: function _toggleEntryFromArray(key) {
11362
+ var notAdded = !this._keysSelected.hasOwnProperty(key);
11455
11363
  if (notAdded) {
11456
- this.valuesSelected.push(entryIndex);
11364
+ this._keysSelected[key] = true;
11457
11365
  } else {
11458
- this.valuesSelected.splice(index, 1);
11366
+ delete this._keysSelected[key];
11459
11367
  }
11460
11368
 
11461
- $(this.dropdownOptions).find('li:not(.optgroup)').eq(entryIndex).toggleClass('active');
11369
+ $(this._valueDict[key].optionEl).toggleClass('active');
11462
11370
 
11463
11371
  // use notAdded instead of true (to detect if the option is selected or not)
11464
- this.$el.find('option').eq(entryIndex).prop('selected', notAdded);
11372
+ $(this._valueDict[key].el).prop('selected', notAdded);
11465
11373
 
11466
11374
  return notAdded;
11467
11375
  }
@@ -11476,7 +11384,7 @@ if (Vel) {
11476
11384
  var value = '';
11477
11385
  var options = this.$el.find('option');
11478
11386
 
11479
- options.each(function (el, i) {
11387
+ options.each(function (el) {
11480
11388
  if ($(el).prop('selected')) {
11481
11389
  var text = $(el).text();
11482
11390
  value === '' ? value += text : value += ', ' + text;
@@ -11500,22 +11408,19 @@ if (Vel) {
11500
11408
  }, {
11501
11409
  key: "_setSelectedStates",
11502
11410
  value: function _setSelectedStates() {
11503
- var _this45 = this;
11504
-
11505
- this.valuesSelected = [];
11506
- var $onlyOptions = $(this.dropdownOptions).find('li:not(.optgroup)');
11507
- this.$el.find('option').each(function (el, i) {
11508
- var option = $onlyOptions.eq(i);
11509
-
11510
- if ($(el).prop('selected')) {
11511
- option.find('input[type="checkbox"]').prop("checked", true);
11512
- _this45._activateOption($(_this45.dropdownOptions), option);
11513
- _this45.valuesSelected.push(i);
11411
+ this._keysSelected = {};
11412
+
11413
+ for (var key in this._valueDict) {
11414
+ var option = this._valueDict[key];
11415
+ if ($(option.el).prop('selected')) {
11416
+ $(option.optionEl).find('input[type="checkbox"]').prop("checked", true);
11417
+ this._activateOption($(this.dropdownOptions), $(option.optionEl));
11418
+ this._keysSelected[key] = true;
11514
11419
  } else {
11515
- option.find('input[type="checkbox"]').prop("checked", false);
11516
- option.removeClass('selected');
11420
+ $(option.optionEl).find('input[type="checkbox"]').prop("checked", false);
11421
+ $(option.optionEl).removeClass('selected');
11517
11422
  }
11518
- });
11423
+ }
11519
11424
  }
11520
11425
 
11521
11426
  /**
@@ -11536,6 +11441,21 @@ if (Vel) {
11536
11441
  option.addClass('selected');
11537
11442
  }
11538
11443
  }
11444
+
11445
+ /**
11446
+ * Get Selected Values
11447
+ * @return {Array} Array of selected values
11448
+ */
11449
+
11450
+ }, {
11451
+ key: "getSelectedValues",
11452
+ value: function getSelectedValues() {
11453
+ var selectedValues = [];
11454
+ for (var key in this._keysSelected) {
11455
+ selectedValues.push(this._valueDict[key].el.value);
11456
+ }
11457
+ return selectedValues;
11458
+ }
11539
11459
  }], [{
11540
11460
  key: "init",
11541
11461
  value: function init($els, options) {
@@ -11574,7 +11494,7 @@ if (Vel) {
11574
11494
  M.initializeJqueryWrapper(Select, 'select', 'M_Select');
11575
11495
  }
11576
11496
  })(cash);
11577
- ;(function ($, Vel) {
11497
+ ;(function ($, anim) {
11578
11498
  'use strict';
11579
11499
 
11580
11500
  var _defaults = {};
@@ -11638,12 +11558,14 @@ if (Vel) {
11638
11558
  key: "_setupEventHandlers",
11639
11559
  value: function _setupEventHandlers() {
11640
11560
  this._handleRangeChangeBound = this._handleRangeChange.bind(this);
11561
+ this._handleRangeFocusBound = this._handleRangeFocus.bind(this);
11641
11562
  this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this);
11642
11563
  this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this);
11643
11564
  this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this);
11644
11565
  this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this);
11645
11566
 
11646
11567
  this.el.addEventListener('change', this._handleRangeChangeBound);
11568
+ this.el.addEventListener('focus', this._handleRangeFocusBound);
11647
11569
 
11648
11570
  this.el.addEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
11649
11571
  this.el.addEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
@@ -11668,6 +11590,7 @@ if (Vel) {
11668
11590
  key: "_removeEventHandlers",
11669
11591
  value: function _removeEventHandlers() {
11670
11592
  this.el.removeEventListener('change', this._handleRangeChangeBound);
11593
+ this.el.removeEventListener('focus', this._handleRangeFocusBound);
11671
11594
 
11672
11595
  this.el.removeEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
11673
11596
  this.el.removeEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
@@ -11702,6 +11625,19 @@ if (Vel) {
11702
11625
  $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
11703
11626
  }
11704
11627
 
11628
+ /**
11629
+ * Handle Range Focus
11630
+ * @param {Event} e
11631
+ */
11632
+
11633
+ }, {
11634
+ key: "_handleRangeFocus",
11635
+ value: function _handleRangeFocus() {
11636
+ if (M.tabPressed) {
11637
+ this.$el.addClass('focused');
11638
+ }
11639
+ }
11640
+
11705
11641
  /**
11706
11642
  * Handle Range Mousedown and Touchstart
11707
11643
  * @param {Event} e
@@ -11763,17 +11699,21 @@ if (Vel) {
11763
11699
  key: "_handleRangeBlurMouseoutTouchleave",
11764
11700
  value: function _handleRangeBlurMouseoutTouchleave() {
11765
11701
  if (!this._mousedown) {
11702
+ this.$el.removeClass('focused');
11766
11703
  var paddingLeft = parseInt(this.$el.css('padding-left'));
11767
11704
  var marginLeft = 7 + paddingLeft + 'px';
11768
11705
 
11769
11706
  if ($(this.thumb).hasClass('active')) {
11770
- Vel(this.thumb, 'stop');
11771
- Vel(this.thumb, {
11772
- height: '0px',
11773
- width: '0px',
11774
- top: '10px',
11775
- marginLeft: marginLeft
11776
- }, { duration: 100 });
11707
+ anim.remove(this.thumb);
11708
+ anim({
11709
+ targets: this.thumb,
11710
+ height: 0,
11711
+ width: 0,
11712
+ top: 10,
11713
+ easing: 'easeOutQuad',
11714
+ marginLeft: marginLeft,
11715
+ duration: 100
11716
+ });
11777
11717
  }
11778
11718
  $(this.thumb).removeClass('active');
11779
11719
  }
@@ -11813,12 +11753,16 @@ if (Vel) {
11813
11753
  value: function _showRangeBubble() {
11814
11754
  var paddingLeft = parseInt($(this.thumb).parent().css('padding-left'));
11815
11755
  var marginLeft = -7 + paddingLeft + 'px'; // TODO: fix magic number?
11816
- Vel(this.thumb, {
11817
- height: "30px",
11818
- width: "30px",
11819
- top: "-30px",
11820
- marginLeft: marginLeft
11821
- }, { duration: 300, easing: 'easeOutExpo' });
11756
+ anim.remove(this.thumb);
11757
+ anim({
11758
+ targets: this.thumb,
11759
+ height: 30,
11760
+ width: 30,
11761
+ top: -30,
11762
+ marginLeft: marginLeft,
11763
+ duration: 300,
11764
+ easing: 'easeOutQuint'
11765
+ });
11822
11766
  }
11823
11767
 
11824
11768
  /**
@@ -11873,5 +11817,5 @@ if (Vel) {
11873
11817
  M.initializeJqueryWrapper(Range, 'range', 'M_Range');
11874
11818
  }
11875
11819
 
11876
- Range.init($('input[type=range'));
11877
- })(cash, M.Vel);
11820
+ Range.init($('input[type=range]'));
11821
+ })(cash, anime);