GSAP (GreenSock Animation Platform): high-performance JavaScript animation for anything JavaScript can touch. 100% free, including every plugin.
JavaScript animationcanvasgsapjavascriptjavascript-libraryreactscrollscrolltriggerspringsvgweb-animations
1.20.5
GreenSockec715487348c
diff --git a/README.md b/README.mdindex dc27e16..30ba79b 100644--- a/README.md+++ b/README.md@@ -2,7 +2,9 @@#### Ultra high-performance, professional-grade animation for the modern web-GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See the <a href="https://greensock.com/why-gsap/">"Why GSAP?"</a> article for what makes GSAP so special.+GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser. No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...animate anything! At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! See the <a href="https://greensock.com/why-gsap/">"Why GSAP?"</a> article for what makes GSAP so special.++<a href="https://greensock.com/docs">Full documentation</a>### What is GSAP? (video)@@ -12,38 +14,49 @@ GSAP is a JavaScript library for creating high-performance animations that work[](http://www.youtube.com/watch?v=tMP1PCErrmE)-Simply put, GSAP is the most robust high-performance animation library on the planet, which is probably why **every major ad network excludes it from file size calculations**. Unlike monolithic frameworks that dictate how you structure your apps, GSAP is completely flexible; sprinkle it wherever you want. React, Vue, Angular or vanilla JS - doesn't matter. Zero dependencies.+Unlike monolithic frameworks that dictate how you structure your apps, GSAP is completely flexible; sprinkle it wherever you want. React, Vue, Angular or vanilla JS - doesn't matter. Simply put, GSAP is the most robust high-performance animation library on the planet, which is probably why **every major ad network excludes it from file size calculations**.++**Zero dependencies.**This is the public repository for GreenSock's JavaScript tools like <a href="https://greensock.com/gsap/" target="_blank">GSAP</a> and <a href="https://greensock.com/draggable/" target="_blank">Draggable</a>. "GSAP" describes all of the animation-related tools which include TweenLite, TweenMax, TimelineLite, TimelineMax, various <a href="https://greensock.com/plugins/?product_id=4921">plugins</a>, extra <a href="https://greensock.com/ease-visualizer/">easing</a> functions, etc.### CDN-The TweenMax file is most popular because it has all the essential tools plus several common plugins, all in one file:+TweenMax is most popular because it has all the essential tools plus several common <a href="https://greensock.com/plugins/?product_id=4921">plugins</a>, all in one file:```html-<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.4/TweenMax.min.js"></script>+<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.5/TweenMax.min.js"></script>```Click the green "Download GSAP" button at <a href="https://greensock.com/?download=GSAP-JS">greensock.com</a> for more options. Click "customize" at the bottom of the resulting window to see all the extra plugins and tool URLs.Draggable, for example, is at:```html-<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.4/utils/Draggable.min.js"></script>+<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.5/utils/Draggable.min.js"></script>```-Most ad networks have it on their CDNs as well, so contact them for the appropriate URL(s).+Most ad networks have GSAP on their CDNs as well, so contact them for the appropriate URL(s).### NPM+See the <a href="https://greensock.com/docs/NPMUsage">full guide to using GSAP via NPM</a>.+```javascriptnpm install gsap```The default (main) file is TweenMax which includes TweenLite, TimelineLite, TimelineMax, all of the eases (except CustomEase/CustomWiggle/CustomBounce) and the following plugins: css, roundProps, bezier, attr, and directionalRotation.```javascript//typical import-import {TweenMax, Power2, TimelineLite} from "gsap";+import {TweenMax, Power2, TimelineLite} from "gsap/TweenMax";//or get to the parts that aren't included inside TweenMax:import Draggable from "gsap/Draggable";import ScrollToPlugin from "gsap/ScrollToPlugin";++//or, as of 1.20.5, all tools are exported from the "all" file (excluding bonus plugins):+import {TweenMax, CSSPlugin, ScrollToPlugin, Draggable, Elastic} from "gsap/all";+//if tree shaking dumps plugins, just reference them somewhere in your code like:+const plugins = [CSSPlugin, ScrollToPlugin];```-If you're having trouble getting a plugin to work, it may be that your build tool's tree shaking feature is dumping it, so try referencing it directly somewhere in your code. For import problems, try the npm path like "gsap/ModifiersPlugin". For Club GreenSock-only plugins, download them from your GreenSock.com account and then drop them into your node_modules/gsap folder or treat them as part of your own JS payload. Post other questions in our <a href="https://greensock.com/forums/">forums</a> and we'd be happy to help.+As of version 1.20.5, the NPM files are ES modules, though there's also a /umd/ directory with UMD files for extra compatibility.++For <a href="https://greensock.com/club/">Club GreenSock</a>-only plugins, download them from your GreenSock.com account and then treat them as part of your own JS payload or drop them into your node_modules/gsap folder. Post other questions in our <a href="https://greensock.com/forums/">forums</a> and we'd be happy to help.### Resources@@ -51,13 +64,14 @@ If you're having trouble getting a plugin to work, it may be that your build too* <a href="https://greensock.com/get-started-js/">Getting started guide</a>* <a href="https://greensock.com/docs/">Full documentation</a>* <a href="https://greensock.com/forums/">Community forums</a>+* <a href="https://greensock.com/docs/NPMUsage">NPM & Webpack usage guide</a>* <a href="https://greensock.com/examples-showcases">Examples & showcases</a>* <a href="https://greensock.com/why-gsap/">Why GSAP?</a> (a practical guide for developers)* <a href="https://greensock.com/draggable/">Draggable demo</a>* <a href="https://greensock.com/svg-tips/">Animating SVG with GSAP</a>* <a href="https://greensock.com/club/">Club GreenSock</a> (get access to bonus plugins and tools not in this repository)-* css-tricks.com article: <a href="https://css-tricks.com/myth-busting-css-animations-vs-javascript/">Myth Busting: CSS Animations vs. JavaScript</a>-* css-tricks.com article about <a href="https://css-tricks.com/writing-smarter-animation-code/">writing smarter animation code</a>+* css-tricks article: <a href="https://css-tricks.com/myth-busting-css-animations-vs-javascript/">Myth Busting: CSS Animations vs. JavaScript</a>+* css-tricks article about <a href="https://css-tricks.com/writing-smarter-animation-code/">writing smarter animation code</a>### Get CustomEase for freeSign up for a free GreenSock account to gain access to <a href="https://greensock.com/customease/">CustomEase</a> which lets you create literally any ease imaginable (unlimited control points). It's in the download zip at <a href="https://greensock.com/?download=GSAP-JS">GreenSock.com</a> (when you're logged in).diff --git a/bower.json b/bower.jsonindex 9cce68e..b85aa04 100644--- a/bower.json+++ b/bower.json@@ -1,6 +1,6 @@{"name": "gsap",- "version": "1.20.4",+ "version": "1.20.5","description": "The most flexible, high-performance animation library on the planet. Animate any property of any object. Solves browser quirks.","author": {"name": "Jack Doyle",diff --git a/package.json b/package.jsonindex a175927..4bfd47b 100644--- a/package.json+++ b/package.json@@ -1,9 +1,9 @@{"name": "gsap",- "filename": "TweenMax.min.js",- "version": "1.20.4",+ "version": "1.20.5","description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.","homepage": "https://greensock.com/gsap/",+ "module": "./src/esm/index.js","main": "./src/uncompressed/TweenMax.js","browser": {"./src/uncompressed/TimelineLite.js": "./TimelineLite.js",@@ -28,6 +28,11 @@"./src/uncompressed/plugins/TextPlugin.js": "./TextPlugin.js","./src/uncompressed/utils/Draggable.js": "./Draggable.js"},+ "sideEffects": [+ "./src/esm/TweenLite.js",+ "./src/esm/index.js"+ ],+ "filename": "TweenMax.min.js","keywords": ["animation","TweenLite",diff --git a/src/esm/AttrPlugin.js b/src/esm/AttrPlugin.jsnew file mode 100644index 0000000..d5d5a64--- /dev/null+++ b/src/esm/AttrPlugin.js@@ -0,0 +1,42 @@+/*!+ * VERSION: 0.6.1+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import { _gsScope } from "./TweenLite";++export const AttrPlugin = _gsScope._gsDefine.plugin({+ propName: "attr",+ API: 2,+ version: "0.6.1",++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween, index) {+ var p, end;+ if (typeof(target.setAttribute) !== "function") {+ return false;+ }+ for (p in value) {+ end = value[p];+ if (typeof(end) === "function") {+ end = end(index, target);+ }+ this._addTween(target, "setAttribute", target.getAttribute(p) + "", end + "", p, false, p);+ this._overwriteProps.push(p);+ }+ return true;+ }++});++export { AttrPlugin as default };+++diff --git a/src/esm/BezierPlugin.js b/src/esm/BezierPlugin.jsnew file mode 100644index 0000000..4cce3dd--- /dev/null+++ b/src/esm/BezierPlugin.js@@ -0,0 +1,603 @@+/*!+ * VERSION: 1.3.8+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import { _gsScope } from "./TweenLite";++ var _RAD2DEG = 180 / Math.PI,+ _r1 = [],+ _r2 = [],+ _r3 = [],+ _corProps = {},+ _globals = _gsScope._gsDefine.globals,+ Segment = function(a, b, c, d) {+ if (c === d) { //if c and d match, the final autoRotate value could lock at -90 degrees, so differentiate them slightly.+ c = d - (d - b) / 1000000;+ }+ if (a === b) { //if a and b match, the starting autoRotate value could lock at -90 degrees, so differentiate them slightly.+ b = a + (c - a) / 1000000;+ }+ this.a = a;+ this.b = b;+ this.c = c;+ this.d = d;+ this.da = d - a;+ this.ca = c - a;+ this.ba = b - a;+ },+ _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",+ cubicToQuadratic = function(a, b, c, d) {+ var q1 = {a:a},+ q2 = {},+ q3 = {},+ q4 = {c:d},+ mab = (a + b) / 2,+ mbc = (b + c) / 2,+ mcd = (c + d) / 2,+ mabc = (mab + mbc) / 2,+ mbcd = (mbc + mcd) / 2,+ m8 = (mbcd - mabc) / 8;+ q1.b = mab + (a - mab) / 4;+ q2.b = mabc + m8;+ q1.c = q2.a = (q1.b + q2.b) / 2;+ q2.c = q3.a = (mabc + mbcd) / 2;+ q3.b = mbcd - m8;+ q4.b = mcd + (d - mcd) / 4;+ q3.c = q4.a = (q3.b + q4.b) / 2;+ return [q1, q2, q3, q4];+ },+ _calculateControlPoints = function(a, curviness, quad, basic, correlate) {+ var l = a.length - 1,+ ii = 0,+ cp1 = a[0].a,+ i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl;+ for (i = 0; i < l; i++) {+ seg = a[ii];+ p1 = seg.a;+ p2 = seg.d;+ p3 = a[ii+1].d;++ if (correlate) {+ r1 = _r1[i];+ r2 = _r2[i];+ tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5);+ m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0));+ m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0));+ mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0));+ } else {+ m1 = p2 - (p2 - p1) * curviness * 0.5;+ m2 = p2 + (p3 - p2) * curviness * 0.5;+ mm = p2 - (m1 + m2) / 2;+ }+ m1 += mm;+ m2 += mm;++ seg.c = cp2 = m1;+ if (i !== 0) {+ seg.b = cp1;+ } else {+ seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly.+ }++ seg.da = p2 - p1;+ seg.ca = cp2 - p1;+ seg.ba = cp1 - p1;++ if (quad) {+ qb = cubicToQuadratic(p1, cp1, cp2, p2);+ a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);+ ii += 4;+ } else {+ ii++;+ }++ cp1 = m2;+ }+ seg = a[ii];+ seg.b = cp1;+ seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly.+ seg.da = seg.d - seg.a;+ seg.ca = seg.c - seg.a;+ seg.ba = cp1 - seg.a;+ if (quad) {+ qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d);+ a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);+ }+ },+ _parseAnchors = function(values, p, correlate, prepend) {+ var a = [],+ l, i, p1, p2, p3, tmp;+ if (prepend) {+ values = [prepend].concat(values);+ i = values.length;+ while (--i > -1) {+ if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") {+ values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons+ }+ }+ }+ l = values.length - 2;+ if (l < 0) {+ a[0] = new Segment(values[0][p], 0, 0, values[0][p]);+ return a;+ }+ for (i = 0; i < l; i++) {+ p1 = values[i][p];+ p2 = values[i+1][p];+ a[i] = new Segment(p1, 0, 0, p2);+ if (correlate) {+ p3 = values[i+2][p];+ _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1);+ _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2);+ }+ }+ a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]);+ return a;+ },+ bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) {+ var obj = {},+ props = [],+ first = prepend || values[0],+ i, p, a, j, r, l, seamless, last;+ correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate;+ if (curviness == null) {+ curviness = 1;+ }+ for (p in values[0]) {+ props.push(p);+ }+ //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later)+ if (values.length > 1) {+ last = values[values.length - 1];+ seamless = true;+ i = props.length;+ while (--i > -1) {+ p = props[i];+ if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors.+ seamless = false;+ break;+ }+ }+ if (seamless) {+ values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens+ if (prepend) {+ values.unshift(prepend);+ }+ values.push(values[1]);+ prepend = values[values.length - 3];+ }+ }+ _r1.length = _r2.length = _r3.length = 0;+ i = props.length;+ while (--i > -1) {+ p = props[i];+ _corProps[p] = (correlate.indexOf(","+p+",") !== -1);+ obj[p] = _parseAnchors(values, p, _corProps[p], prepend);+ }+ i = _r1.length;+ while (--i > -1) {+ _r1[i] = Math.sqrt(_r1[i]);+ _r2[i] = Math.sqrt(_r2[i]);+ }+ if (!basic) {+ i = props.length;+ while (--i > -1) {+ if (_corProps[p]) {+ a = obj[props[i]];+ l = a.length - 1;+ for (j = 0; j < l; j++) {+ r = (a[j+1].da / _r2[j] + a[j].da / _r1[j]) || 0;+ _r3[j] = (_r3[j] || 0) + r * r;+ }+ }+ }+ i = _r3.length;+ while (--i > -1) {+ _r3[i] = Math.sqrt(_r3[i]);+ }+ }+ i = props.length;+ j = quadratic ? 4 : 1;+ while (--i > -1) {+ p = props[i];+ a = obj[p];+ _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties+ if (seamless) {+ a.splice(0, j);+ a.splice(a.length - j, j);+ }+ }+ return obj;+ },+ _parseBezierData = function(values, type, prepend) {+ type = type || "soft";+ var obj = {},+ inc = (type === "cubic") ? 3 : 2,+ soft = (type === "soft"),+ props = [],+ a, b, c, d, cur, i, j, l, p, cnt, tmp;+ if (soft && prepend) {+ values = [prepend].concat(values);+ }+ if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; }+ for (p in values[0]) {+ props.push(p);+ }+ i = props.length;+ while (--i > -1) {+ p = props[i];+ obj[p] = cur = [];+ cnt = 0;+ l = values.length;+ for (j = 0; j < l; j++) {+ a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp);+ if (soft) if (j > 1) if (j < l - 1) {+ cur[cnt++] = (a + cur[cnt-2]) / 2;+ }+ cur[cnt++] = a;+ }+ l = cnt - inc + 1;+ cnt = 0;+ for (j = 0; j < l; j += inc) {+ a = cur[j];+ b = cur[j+1];+ c = cur[j+2];+ d = (inc === 2) ? 0 : cur[j+3];+ cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);+ }+ cur.length = cnt;+ }+ return obj;+ },+ _addCubicLengths = function(a, steps, resolution) {+ var inc = 1 / resolution,+ j = a.length,+ d, d1, s, da, ca, ba, p, i, inv, bez, index;+ while (--j > -1) {+ bez = a[j];+ s = bez.a;+ da = bez.d - s;+ ca = bez.c - s;+ ba = bez.b - s;+ d = d1 = 0;+ for (i = 1; i <= resolution; i++) {+ p = inc * i;+ inv = 1 - p;+ d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p);+ index = j * resolution + i - 1;+ steps[index] = (steps[index] || 0) + d * d;+ }+ }+ },+ _parseLengthData = function(obj, resolution) {+ resolution = resolution >> 0 || 6;+ var a = [],+ lengths = [],+ d = 0,+ total = 0,+ threshold = resolution - 1,+ segments = [],+ curLS = [], //current length segments array+ p, i, l, index;+ for (p in obj) {+ _addCubicLengths(obj[p], a, resolution);+ }+ l = a.length;+ for (i = 0; i < l; i++) {+ d += Math.sqrt(a[i]);+ index = i % resolution;+ curLS[index] = d;+ if (index === threshold) {+ total += d;+ index = (i / resolution) >> 0;+ segments[index] = curLS;+ lengths[index] = total;+ d = 0;+ curLS = [];+ }+ }+ return {length:total, lengths:lengths, segments:segments};+ },++++ BezierPlugin = _gsScope._gsDefine.plugin({+ propName: "bezier",+ priority: -1,+ version: "1.3.8",+ API: 2,+ global:true,++ //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, vars, tween) {+ this._target = target;+ if (vars instanceof Array) {+ vars = {values:vars};+ }+ this._func = {};+ this._mod = {};+ this._props = [];+ this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10);+ var values = vars.values || [],+ first = {},+ second = values[0],+ autoRotate = vars.autoRotate || tween.vars.orientToBezier,+ p, isFunc, i, j, prepend;++ this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null;+ for (p in second) {+ this._props.push(p);+ }++ i = this._props.length;+ while (--i > -1) {+ p = this._props[i];++ this._overwriteProps.push(p);+ isFunc = this._func[p] = (typeof(target[p]) === "function");+ first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();+ if (!prepend) if (first[p] !== values[0][p]) {+ prepend = first;+ }+ }+ this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first);+ this._segCount = this._beziers[p].length;++ if (this._timeRes) {+ var ld = _parseLengthData(this._beziers, this._timeRes);+ this._length = ld.length;+ this._lengths = ld.lengths;+ this._segments = ld.segments;+ this._l1 = this._li = this._s1 = this._si = 0;+ this._l2 = this._lengths[0];+ this._curSeg = this._segments[0];+ this._s2 = this._curSeg[0];+ this._prec = 1 / this._curSeg.length;+ }++ if ((autoRotate = this._autoRotate)) {+ this._initialRotations = [];+ if (!(autoRotate[0] instanceof Array)) {+ this._autoRotate = autoRotate = [autoRotate];+ }+ i = autoRotate.length;+ while (--i > -1) {+ for (j = 0; j < 3; j++) {+ p = autoRotate[i][j];+ this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;+ }+ p = autoRotate[i][2];+ this._initialRotations[i] = (this._func[p] ? this._func[p].call(this._target) : this._target[p]) || 0;+ this._overwriteProps.push(p);+ }+ }+ this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(v) {+ var segments = this._segCount,+ func = this._func,+ target = this._target,+ notStart = (v !== this._startRatio),+ curIndex, inv, i, p, b, t, val, l, lengths, curSeg;+ if (!this._timeRes) {+ curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;+ t = (v - (curIndex * (1 / segments))) * segments;+ } else {+ lengths = this._lengths;+ curSeg = this._curSeg;+ v *= this._length;+ i = this._li;+ //find the appropriate segment (if the currently cached one isn't correct)+ if (v > this._l2 && i < segments - 1) {+ l = segments - 1;+ while (i < l && (this._l2 = lengths[++i]) <= v) { }+ this._l1 = lengths[i-1];+ this._li = i;+ this._curSeg = curSeg = this._segments[i];+ this._s2 = curSeg[(this._s1 = this._si = 0)];+ } else if (v < this._l1 && i > 0) {+ while (i > 0 && (this._l1 = lengths[--i]) >= v) { }+ if (i === 0 && v < this._l1) {+ this._l1 = 0;+ } else {+ i++;+ }+ this._l2 = lengths[i];+ this._li = i;+ this._curSeg = curSeg = this._segments[i];+ this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0;+ this._s2 = curSeg[this._si];+ }+ curIndex = i;+ //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)+ v -= this._l1;+ i = this._si;+ if (v > this._s2 && i < curSeg.length - 1) {+ l = curSeg.length - 1;+ while (i < l && (this._s2 = curSeg[++i]) <= v) { }+ this._s1 = curSeg[i-1];+ this._si = i;+ } else if (v < this._s1 && i > 0) {+ while (i > 0 && (this._s1 = curSeg[--i]) >= v) { }+ if (i === 0 && v < this._s1) {+ this._s1 = 0;+ } else {+ i++;+ }+ this._s2 = curSeg[i];+ this._si = i;+ }+ t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;+ }+ inv = 1 - t;++ i = this._props.length;+ while (--i > -1) {+ p = this._props[i];+ b = this._beziers[p][curIndex];+ val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a;+ if (this._mod[p]) {+ val = this._mod[p](val, target);+ }+ if (func[p]) {+ target[p](val);+ } else {+ target[p] = val;+ }+ }++ if (this._autoRotate) {+ var ar = this._autoRotate,+ b2, x1, y1, x2, y2, add, conv;+ i = ar.length;+ while (--i > -1) {+ p = ar[i][2];+ add = ar[i][3] || 0;+ conv = (ar[i][4] === true) ? 1 : _RAD2DEG;+ b = this._beziers[ar[i][0]];+ b2 = this._beziers[ar[i][1]];++ if (b && b2) { //in case one of the properties got overwritten.+ b = b[curIndex];+ b2 = b2[curIndex];++ x1 = b.a + (b.b - b.a) * t;+ x2 = b.b + (b.c - b.b) * t;+ x1 += (x2 - x1) * t;+ x2 += ((b.c + (b.d - b.c) * t) - x2) * t;++ y1 = b2.a + (b2.b - b2.a) * t;+ y2 = b2.b + (b2.c - b2.b) * t;+ y1 += (y2 - y1) * t;+ y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t;++ val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i];++ if (this._mod[p]) {+ val = this._mod[p](val, target); //for modProps+ }++ if (func[p]) {+ target[p](val);+ } else {+ target[p] = val;+ }+ }+ }+ }+ }+ }),+ p = BezierPlugin.prototype;+++ BezierPlugin.bezierThrough = bezierThrough;+ BezierPlugin.cubicToQuadratic = cubicToQuadratic;+ BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite+ BezierPlugin.quadraticToCubic = function(a, b, c) {+ return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);+ };++ BezierPlugin._cssRegister = function() {+ var CSSPlugin = _globals.CSSPlugin;+ if (!CSSPlugin) {+ return;+ }+ var _internals = CSSPlugin._internals,+ _parseToProxy = _internals._parseToProxy,+ _setPluginRatio = _internals._setPluginRatio,+ CSSPropTween = _internals.CSSPropTween;+ _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) {+ if (e instanceof Array) {+ e = {values:e};+ }+ plugin = new BezierPlugin();+ var values = e.values,+ l = values.length - 1,+ pluginValues = [],+ v = {},+ i, p, data;+ if (l < 0) {+ return pt;+ }+ for (i = 0; i <= l; i++) {+ data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i));+ pluginValues[i] = data.end;+ }+ for (p in e) {+ v[p] = e[p]; //duplicate the vars object because we need to alter some things which would cause problems if the user plans to reuse the same vars object for another tween.+ }+ v.values = pluginValues;+ pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2);+ pt.data = data;+ pt.plugin = plugin;+ pt.setRatio = _setPluginRatio;+ if (v.autoRotate === 0) {+ v.autoRotate = true;+ }+ if (v.autoRotate && !(v.autoRotate instanceof Array)) {+ i = (v.autoRotate === true) ? 0 : Number(v.autoRotate);+ v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false;+ }+ if (v.autoRotate) {+ if (!cssp._transform) {+ cssp._enableTransforms(false);+ }+ data.autoRotate = cssp._target._gsTransform;+ data.proxy.rotation = data.autoRotate.rotation || 0;+ cssp._overwriteProps.push("rotation");+ }+ plugin._onInitTween(data.proxy, v, cssp._tween);+ return pt;+ }});+ };++ p._mod = function(lookup) {+ var op = this._overwriteProps,+ i = op.length,+ val;+ while (--i > -1) {+ val = lookup[op[i]];+ if (val && typeof(val) === "function") {+ this._mod[op[i]] = val;+ }+ }+ };++ p._kill = function(lookup) {+ var a = this._props,+ p, i;+ for (p in this._beziers) {+ if (p in lookup) {+ delete this._beziers[p];+ delete this._func[p];+ i = a.length;+ while (--i > -1) {+ if (a[i] === p) {+ a.splice(i, 1);+ }+ }+ }+ }+ a = this._autoRotate;+ if (a) {+ i = a.length;+ while (--i > -1) {+ if (lookup[a[i][2]]) {+ a.splice(i, 1);+ }+ }+ }+ return this._super._kill.call(this, lookup);+ };++export { BezierPlugin, BezierPlugin as default };\ No newline at end of filediff --git a/src/esm/CSSPlugin.js b/src/esm/CSSPlugin.jsnew file mode 100644index 0000000..66281c7--- /dev/null+++ b/src/esm/CSSPlugin.js@@ -0,0 +1,2900 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */+import TweenLite, { _gsScope, TweenPlugin } from "./TweenLite";++ _gsScope._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function() {++ /** @constructor **/+ var CSSPlugin = function() {+ TweenPlugin.call(this, "css");+ this._overwriteProps.length = 0;+ this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)+ },+ _globals = _gsScope._gsDefine.globals,+ _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.+ _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance+ _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter+ _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.+ _specialProps = {},+ p = CSSPlugin.prototype = new TweenPlugin("css");++ p.constructor = CSSPlugin;+ CSSPlugin.version = "1.20.5";+ CSSPlugin.API = 2;+ CSSPlugin.defaultTransformPerspective = 0;+ CSSPlugin.defaultSkewType = "compensated";+ CSSPlugin.defaultSmoothOrigin = true;+ p = "px"; //we'll reuse the "p" variable to keep file size down+ CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};+++ var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g,+ _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,+ _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"+ _NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=+ _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,+ _opacityExp = /opacity *= *([^)]*)/i,+ _opacityValExp = /opacity:([^;]*)/i,+ _alphaFilterExp = /alpha\(opacity *=.+?\)/i,+ _rgbhslExp = /^(rgb|hsl)/,+ _capsExp = /([A-Z])/g,+ _camelExp = /-([a-z])/gi,+ _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage)+ _camelFunc = function(s, g) { return g.toUpperCase(); },+ _horizExp = /(?:Left|Right|Width)/i,+ _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,+ _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,+ _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis+ _complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value)+ _DEG2RAD = Math.PI / 180,+ _RAD2DEG = 180 / Math.PI,+ _forcePT = {},+ _dummyElement = {style:{}},+ _doc = _gsScope.document || {createElement: function() {return _dummyElement;}},+ _createElement = function(type, ns) {+ return _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);+ },+ _tempDiv = _createElement("div"),+ _tempImg = _createElement("img"),+ _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins+ _agent = (_gsScope.navigator || {}).userAgent || "",+ _autoRound,+ _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).++ _isSafari,+ _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element.+ _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!)+ _ieVers,+ _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.+ var i = _agent.indexOf("Android"),+ a = _createElement("a");+ _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || parseFloat(_agent.substr(i+8, 2)) > 3));+ _isSafariLT6 = (_isSafari && (parseFloat(_agent.substr(_agent.indexOf("Version/")+8, 2)) < 6));+ _isFirefox = (_agent.indexOf("Firefox") !== -1);+ if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {+ _ieVers = parseFloat( RegExp.$1 );+ }+ if (!a) {+ return false;+ }+ a.style.cssText = "top:1px;opacity:.55;";+ return /^0.55/.test(a.style.opacity);+ }()),+ _getIEOpacity = function(v) {+ return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);+ },+ _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.+ if (_gsScope.console) {+ console.log(s);+ }+ },+ _target, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params+ _index, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params++ _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"+ _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".++ // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)+ _checkPropPrefix = function(p, e) {+ e = e || _tempDiv;+ var s = e.style,+ a, i;+ if (s[p] !== undefined) {+ return p;+ }+ p = p.charAt(0).toUpperCase() + p.substr(1);+ a = ["O","Moz","ms","Ms","Webkit"];+ i = 5;+ while (--i > -1 && s[a[i]+p] === undefined) { }+ if (i >= 0) {+ _prefix = (i === 3) ? "ms" : a[i];+ _prefixCSS = "-" + _prefix.toLowerCase() + "-";+ return _prefix + p;+ }+ return null;+ },++ _getComputedStyle = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,++ /**+ * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:+ * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left");+ *+ * @param {!Object} t Target element whose style property you want to query+ * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.)+ * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call.+ * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value.+ * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto".+ * @return {?string} The current property value+ */+ _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) {+ var rv;+ if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here.+ return _getIEOpacity(t);+ }+ if (!calc && t.style[p]) {+ rv = t.style[p];+ } else if ((cs = cs || _getComputedStyle(t))) {+ rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase());+ } else if (t.currentStyle) {+ rv = t.currentStyle[p];+ }+ return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv;+ },++ /**+ * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number.+ * @param {!Object} t Target element+ * @param {!string} p Property name (like "left", "top", "marginLeft", etc.)+ * @param {!number} v Value+ * @param {string=} sfx Suffix (like "px" or "%" or "em")+ * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect.+ * @return {number} value in pixels+ */+ _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {+ if (sfx === "px" || (!sfx && p !== "lineHeight")) { return v; }+ if (sfx === "auto" || !v) { return 0; }+ var horiz = _horizExp.test(p),+ node = t,+ style = _tempDiv.style,+ neg = (v < 0),+ precise = (v === 1),+ pix, cache, time;+ if (neg) {+ v = -v;+ }+ if (precise) {+ v *= 100;+ }+ if (p === "lineHeight" && !sfx) { //special case of when a simple lineHeight (without a unit) is used. Set it to the value, read back the computed value, and then revert.+ cache = _getComputedStyle(t).lineHeight;+ t.style.lineHeight = v;+ pix = parseFloat(_getComputedStyle(t).lineHeight);+ t.style.lineHeight = cache;+ } else if (sfx === "%" && p.indexOf("border") !== -1) {+ pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);+ } else {+ style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";+ if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") {+ node = t.parentNode || _doc.body;+ if (_getStyle(node, "display").indexOf("flex") !== -1) { //Edge and IE11 have a bug that causes offsetWidth to report as 0 if the container has display:flex and the child is position:relative. Switching to position: absolute solves it.+ style.position = "absolute";+ }+ cache = node._gsCache;+ time = TweenLite.ticker.frame;+ if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)+ return cache.width * v / 100;+ }+ style[(horiz ? "width" : "height")] = v + sfx;+ } else {+ style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;+ }+ node.appendChild(_tempDiv);+ pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);+ node.removeChild(_tempDiv);+ if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) {+ cache = node._gsCache = node._gsCache || {};+ cache.time = time;+ cache.width = pix / v * 100;+ }+ if (pix === 0 && !recurse) {+ pix = _convertToPixels(t, p, v, sfx, true);+ }+ }+ if (precise) {+ pix /= 100;+ }+ return neg ? -pix : pix;+ },+ _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop+ if (_getStyle(t, "position", cs) !== "absolute") { return 0; }+ var dim = ((p === "left") ? "Left" : "Top"),+ v = _getStyle(t, "margin" + dim, cs);+ return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);+ },++ // @private returns at object containing ALL of the style properties in camelCase and their associated values.+ _getAllStyles = function(t, cs) {+ var s = {},+ i, tr, p;+ if ((cs = cs || _getComputedStyle(t, null))) {+ if ((i = cs.length)) {+ while (--i > -1) {+ p = cs[i];+ if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.+ s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p);+ }+ }+ } else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop.+ for (i in cs) {+ if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.+ s[i] = cs[i];+ }+ }+ }+ } else if ((cs = t.currentStyle || t.style)) {+ for (i in cs) {+ if (typeof(i) === "string" && s[i] === undefined) {+ s[i.replace(_camelExp, _camelFunc)] = cs[i];+ }+ }+ }+ if (!_supportsOpacity) {+ s.opacity = _getIEOpacity(t);+ }+ tr = _getTransform(t, cs, false);+ s.rotation = tr.rotation;+ s.skewX = tr.skewX;+ s.scaleX = tr.scaleX;+ s.scaleY = tr.scaleY;+ s.x = tr.x;+ s.y = tr.y;+ if (_supports3D) {+ s.z = tr.z;+ s.rotationX = tr.rotationX;+ s.rotationY = tr.rotationY;+ s.scaleZ = tr.scaleZ;+ }+ if (s.filters) {+ delete s.filters;+ }+ return s;+ },++ // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.+ _cssDif = function(t, s1, s2, vars, forceLookup) {+ var difs = {},+ style = t.style,+ val, p, mpt;+ for (p in s2) {+ if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") {+ difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.+ if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes.+ mpt = new MiniPropTween(style, p, style[p], mpt);+ }+ }+ }+ if (vars) {+ for (p in vars) { //copy properties (except className)+ if (p !== "className") {+ difs[p] = vars[p];+ }+ }+ }+ return {difs:difs, firstMPT:mpt};+ },+ _dimensions = {width:["Left","Right"], height:["Top","Bottom"]},+ _margins = ["marginLeft","marginRight","marginTop","marginBottom"],++ /**+ * @private Gets the width or height of an element+ * @param {!Object} t Target element+ * @param {!string} p Property name ("width" or "height")+ * @param {Object=} cs Computed style object (if one exists). Just a speed optimization.+ * @return {number} Dimension (in pixels)+ */+ _getDimension = function(t, p, cs) {+ if ((t.nodeName + "").toLowerCase() === "svg") { //Chrome no longer supports offsetWidth/offsetHeight on SVG elements.+ return (cs || _getComputedStyle(t))[p] || 0;+ } else if (t.getCTM && _isSVG(t)) {+ return t.getBBox()[p] || 0;+ }+ var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),+ a = _dimensions[p],+ i = a.length;+ cs = cs || _getComputedStyle(t, null);+ while (--i > -1) {+ v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0;+ v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;+ }+ return v;+ },++ // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)+ _parsePosition = function(v, recObj) {+ if (v === "contain" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".+ return v + " ";+ }+ if (v == null || v === "") {+ v = "0 0";+ }+ var a = v.split(" "),+ x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],+ y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1],+ i;+ if (a.length > 3 && !recObj) { //multiple positions+ a = v.split(", ").join(",").split(",");+ v = [];+ for (i = 0; i < a.length; i++) {+ v.push(_parsePosition(a[i]));+ }+ return v.join(",");+ }+ if (y == null) {+ y = (x === "center") ? "50%" : "0";+ } else if (y === "center") {+ y = "50%";+ }+ if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.+ x = "50%";+ }+ v = x + " " + y + ((a.length > 2) ? " " + a[2] : "");+ if (recObj) {+ recObj.oxp = (x.indexOf("%") !== -1);+ recObj.oyp = (y.indexOf("%") !== -1);+ recObj.oxr = (x.charAt(1) === "=");+ recObj.oyr = (y.charAt(1) === "=");+ recObj.ox = parseFloat(x.replace(_NaNExp, ""));+ recObj.oy = parseFloat(y.replace(_NaNExp, ""));+ recObj.v = v;+ }+ return recObj || v;+ },++ /**+ * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!)+ * @param {(number|string)} e End value which is typically a string, but could be a number+ * @param {(number|string)} b Beginning value which is typically a string but could be a number+ * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)+ */+ _parseChange = function(e, b) {+ if (typeof(e) === "function") {+ e = e(_index, _target);+ }+ return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0;+ },++ /**+ * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.+ * @param {Object} v Value to be parsed+ * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)+ * @return {number} Parsed value+ */+ _parseVal = function(v, d) {+ if (typeof(v) === "function") {+ v = v(_index, _target);+ }+ return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0;+ },++ /**+ * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.+ * @param {Object} v Value to be parsed+ * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)+ * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY"+ * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation.+ * @return {number} parsed angle in radians+ */+ _parseAngle = function(v, d, p, directionalEnd) {+ var min = 0.000001,+ cap, split, dif, result, isRelative;+ if (typeof(v) === "function") {+ v = v(_index, _target);+ }+ if (v == null) {+ result = d;+ } else if (typeof(v) === "number") {+ result = v;+ } else {+ cap = 360;+ split = v.split("_");+ isRelative = (v.charAt(1) === "=");+ dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d);+ if (split.length) {+ if (directionalEnd) {+ directionalEnd[p] = d + dif;+ }+ if (v.indexOf("short") !== -1) {+ dif = dif % cap;+ if (dif !== dif % (cap / 2)) {+ dif = (dif < 0) ? dif + cap : dif - cap;+ }+ }+ if (v.indexOf("_cw") !== -1 && dif < 0) {+ dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;+ } else if (v.indexOf("ccw") !== -1 && dif > 0) {+ dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;+ }+ }+ result = d + dif;+ }+ if (result < min && result > -min) {+ result = 0;+ }+ return result;+ },++ _colorLookup = {aqua:[0,255,255],+ lime:[0,255,0],+ silver:[192,192,192],+ black:[0,0,0],+ maroon:[128,0,0],+ teal:[0,128,128],+ blue:[0,0,255],+ navy:[0,0,128],+ white:[255,255,255],+ fuchsia:[255,0,255],+ olive:[128,128,0],+ yellow:[255,255,0],+ orange:[255,165,0],+ gray:[128,128,128],+ purple:[128,0,128],+ green:[0,128,0],+ red:[255,0,0],+ pink:[255,192,203],+ cyan:[0,255,255],+ transparent:[255,255,255,0]},++ _hue = function(h, m1, m2) {+ h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;+ return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;+ },++ /**+ * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers).+ * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.+ * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba()+ * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true.+ */+ _parseColor = CSSPlugin.parseColor = function(v, toHSL) {+ var a, r, g, b, h, s, l, max, min, d, wasHSL;+ if (!v) {+ a = _colorLookup.black;+ } else if (typeof(v) === "number") {+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else {+ if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.+ v = v.substr(0, v.length - 1);+ }+ if (_colorLookup[v]) {+ a = _colorLookup[v];+ } else if (v.charAt(0) === "#") {+ if (v.length === 4) { //for shorthand like #9F0+ r = v.charAt(1);+ g = v.charAt(2);+ b = v.charAt(3);+ v = "#" + r + r + g + g + b + b;+ }+ v = parseInt(v.substr(1), 16);+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else if (v.substr(0, 3) === "hsl") {+ a = wasHSL = v.match(_numExp);+ if (!toHSL) {+ h = (Number(a[0]) % 360) / 360;+ s = Number(a[1]) / 100;+ l = Number(a[2]) / 100;+ g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;+ r = l * 2 - g;+ if (a.length > 3) {+ a[3] = Number(a[3]);+ }+ a[0] = _hue(h + 1 / 3, r, g);+ a[1] = _hue(h, r, g);+ a[2] = _hue(h - 1 / 3, r, g);+ } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place.+ return v.match(_relNumExp);+ }+ } else {+ a = v.match(_numExp) || _colorLookup.transparent;+ }+ a[0] = Number(a[0]);+ a[1] = Number(a[1]);+ a[2] = Number(a[2]);+ if (a.length > 3) {+ a[3] = Number(a[3]);+ }+ }+ if (toHSL && !wasHSL) {+ r = a[0] / 255;+ g = a[1] / 255;+ b = a[2] / 255;+ max = Math.max(r, g, b);+ min = Math.min(r, g, b);+ l = (max + min) / 2;+ if (max === min) {+ h = s = 0;+ } else {+ d = max - min;+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);+ h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4;+ h *= 60;+ }+ a[0] = (h + 0.5) | 0;+ a[1] = (s * 100 + 0.5) | 0;+ a[2] = (l * 100 + 0.5) | 0;+ }+ return a;+ },+ _formatColors = function(s, toHSL) {+ var colors = s.match(_colorExp) || [],+ charIndex = 0,+ parsed = "",+ i, color, temp;+ if (!colors.length) {+ return s;+ }+ for (i = 0; i < colors.length; i++) {+ color = colors[i];+ temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex);+ charIndex += temp.length + color.length;+ color = _parseColor(color, toHSL);+ if (color.length === 3) {+ color.push(1);+ }+ parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";+ }+ return parsed + s.substr(charIndex);+ },+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.++ for (p in _colorLookup) {+ _colorExp += "|" + p + "\\b";+ }+ _colorExp = new RegExp(_colorExp+")", "gi");++ CSSPlugin.colorStringFilter = function(a) {+ var combined = a[0] + " " + a[1],+ toHSL;+ if (_colorExp.test(combined)) {+ toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);+ a[0] = _formatColors(a[0], toHSL);+ a[1] = _formatColors(a[1], toHSL);+ }+ _colorExp.lastIndex = 0;+ };++ if (!TweenLite.defaultStringFilter) {+ TweenLite.defaultStringFilter = CSSPlugin.colorStringFilter;+ }++ /**+ * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned.+ * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned.+ * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't.+ * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc.+ * @return {Function} formatter function+ */+ var _getFormatter = function(dflt, clr, collapsible, multi) {+ if (dflt == null) {+ return function(v) {return v;};+ }+ var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "",+ dVals = dflt.split(dColor).join("").match(_valuesExp) || [],+ pfx = dflt.substr(0, dflt.indexOf(dVals[0])),+ sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "",+ delim = (dflt.indexOf(" ") !== -1) ? " " : ",",+ numVals = dVals.length,+ dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "",+ formatter;+ if (!numVals) {+ return function(v) {return v;};+ }+ if (clr) {+ formatter = function(v) {+ var color, vals, i, a;+ if (typeof(v) === "number") {+ v += dSfx;+ } else if (multi && _commasOutsideParenExp.test(v)) {+ a = v.replace(_commasOutsideParenExp, "|").split("|");+ for (i = 0; i < a.length; i++) {+ a[i] = formatter(a[i]);+ }+ return a.join(",");+ }+ color = (v.match(_colorExp) || [dColor])[0];+ vals = v.split(color).join("").match(_valuesExp) || [];+ i = vals.length;+ if (numVals > i--) {+ while (++i < numVals) {+ vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];+ }+ }+ return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : "");+ };+ return formatter;++ }+ formatter = function(v) {+ var vals, a, i;+ if (typeof(v) === "number") {+ v += dSfx;+ } else if (multi && _commasOutsideParenExp.test(v)) {+ a = v.replace(_commasOutsideParenExp, "|").split("|");+ for (i = 0; i < a.length; i++) {+ a[i] = formatter(a[i]);+ }+ return a.join(",");+ }+ vals = v.match(_valuesExp) || [];+ i = vals.length;+ if (numVals > i--) {+ while (++i < numVals) {+ vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];+ }+ }+ return pfx + vals.join(delim) + sfx;+ };+ return formatter;+ },++ /**+ * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges.+ * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft"+ * @return {Function} a formatter function+ */+ _getEdgeParser = function(props) {+ props = props.split(",");+ return function(t, e, p, cssp, pt, plugin, vars) {+ var a = (e + "").split(" "),+ i;+ vars = {};+ for (i = 0; i < 4; i++) {+ vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)];+ }+ return cssp.parse(t, vars, pt, plugin);+ };+ },++ // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.+ _setPluginRatio = _internals._setPluginRatio = function(v) {+ this.plugin.setRatio(v);+ var d = this.data,+ proxy = d.proxy,+ mpt = d.firstMPT,+ min = 0.000001,+ val, pt, i, str, p;+ while (mpt) {+ val = proxy[mpt.v];+ if (mpt.r) {+ val = mpt.r(val);+ } else if (val < min && val > -min) {+ val = 0;+ }+ mpt.t[mpt.p] = val;+ mpt = mpt._next;+ }+ if (d.autoRotate) {+ d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier+ }+ //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.+ if (v === 1 || v === 0) {+ mpt = d.firstMPT;+ p = (v === 1) ? "e" : "b";+ while (mpt) {+ pt = mpt.t;+ if (!pt.type) {+ pt[p] = pt.s + pt.xs0;+ } else if (pt.type === 1) {+ str = pt.xs0 + pt.s + pt.xs1;+ for (i = 1; i < pt.l; i++) {+ str += pt["xn"+i] + pt["xs"+(i+1)];+ }+ pt[p] = str;+ }+ mpt = mpt._next;+ }+ }+ },++ /**+ * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value.+ * @param {!Object} t target object whose property we're tweening (often a CSSPropTween)+ * @param {!string} p property name+ * @param {(number|string|object)} v value+ * @param {MiniPropTween=} next next MiniPropTween in the linked list+ * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer+ */+ MiniPropTween = function(t, p, v, next, r) {+ this.t = t;+ this.p = p;+ this.v = v;+ this.r = r;+ if (next) {+ next._prev = this;+ this._next = next;+ }+ },++ /**+ * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element.+ * This method returns an object that has the following properties:+ * - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin. This is what we feed to the external _onInitTween() as the target+ * - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values+ * - firstMPT: the first MiniPropTween in the linked list+ * - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter.+ * @param {!Object} t target object to be tweened+ * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed+ * @param {!CSSPlugin} cssp The CSSPlugin instance+ * @param {CSSPropTween=} pt the next CSSPropTween in the linked list+ * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values+ * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter.+ * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions)+ */+ _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) {+ var bpt = pt,+ start = {},+ end = {},+ transform = cssp._transform,+ oldForce = _forcePT,+ i, p, xp, mpt, firstPT;+ cssp._transform = null;+ _forcePT = vars;+ pt = firstPT = cssp.parse(t, vars, pt, plugin);+ _forcePT = oldForce;+ //break off from the linked list so the new ones are isolated.+ if (shallow) {+ cssp._transform = transform;+ if (bpt) {+ bpt._prev = null;+ if (bpt._prev) {+ bpt._prev._next = null;+ }+ }+ }+ while (pt && pt !== bpt) {+ if (pt.type <= 1) {+ p = pt.p;+ end[p] = pt.s + pt.c;+ start[p] = pt.s;+ if (!shallow) {+ mpt = new MiniPropTween(pt, "s", p, mpt, pt.r);+ pt.c = 0;+ }+ if (pt.type === 1) {+ i = pt.l;+ while (--i > 0) {+ xp = "xn" + i;+ p = pt.p + "_" + xp;+ end[p] = pt.data[xp];+ start[p] = pt[xp];+ if (!shallow) {+ mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]);+ }+ }+ }+ }+ pt = pt._next;+ }+ return {proxy:start, end:end, firstMPT:mpt, pt:firstPT};+ },++++ /**+ * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory.+ * CSSPropTweens have the following optional properties as well (not defined through the constructor):+ * - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc.+ * - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list)+ * - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request.+ * - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target.+ * - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible.+ * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything.+ * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width".+ * @param {number} s Starting numeric value+ * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95.+ * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it.+ * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update.+ * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip"+ * @param {boolean=} r If true, the value(s) should be rounded+ * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0.+ * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues.+ * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues.+ */+ CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) {+ this.t = t; //target+ this.p = p; //property+ this.s = s; //starting value+ this.c = c; //change value+ this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at)+ if (!(t instanceof CSSPropTween)) {+ _overwriteProps.push(this.n);+ }+ this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean)+ this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work+ if (pr) {+ this.pr = pr;+ _hasPriority = true;+ }+ this.b = (b === undefined) ? s : b;+ this.e = (e === undefined) ? s + c : e;+ if (next) {+ this._next = next;+ next._prev = this;+ }+ },++ _addNonTweeningNumericPT = function(target, prop, start, end, next, overwriteProp) { //cleans up some code redundancies and helps minification. Just a fast way to add a NUMERIC non-tweening CSSPropTween+ var pt = new CSSPropTween(target, prop, start, end - start, next, -1, overwriteProp);+ pt.b = start;+ pt.e = pt.xs0 = end;+ return pt;+ },++ /**+ * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example:+ * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt);+ * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio().+ * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method.+ *+ * @param {!Object} t Target whose property will be tweened+ * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow")+ * @param {string} b Beginning value+ * @param {string} e Ending value+ * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization)+ * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match+ * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this).+ * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0.+ * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300}+ * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here.+ * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call.+ */+ _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) {+ //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e);+ b = b || dflt || "";+ if (typeof(e) === "function") {+ e = e(_index, _target);+ }+ pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);+ e += ""; //ensures it's a string+ if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla().+ e = [b, e];+ CSSPlugin.colorStringFilter(e);+ b = e[0];+ e = e[1];+ }+ var ba = b.split(", ").join(",").split(" "), //beginning array+ ea = e.split(", ").join(",").split(" "), //ending array+ l = ba.length,+ autoRound = (_autoRound !== false),+ i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL;+ if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {+ if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces)+ ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");+ ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");+ } else {+ ba = ba.join(" ").split(",").join(", ").split(" ");+ ea = ea.join(" ").split(",").join(", ").split(" ");+ }+ l = ba.length;+ }+ if (l !== ea.length) {+ //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");+ ba = (dflt || "").split(" ");+ l = ba.length;+ }+ pt.plugin = plugin;+ pt.setRatio = setRatio;+ _colorExp.lastIndex = 0;+ for (i = 0; i < l; i++) {+ bv = ba[i];+ ev = ea[i] + "";+ bn = parseFloat(bv);+ //if the value begins with a number (most common). It's fine if it has a suffix like px+ if (bn || bn === 0) {+ pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true);++ //if the value is a color+ } else if (clrs && _colorExp.test(bv)) {+ str = ev.indexOf(")") + 1;+ str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it.+ useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity);+ temp = ev; //original string value so we can look for any prefix later.+ bv = _parseColor(bv, useHSL);+ ev = _parseColor(ev, useHSL);+ hasAlpha = (bv.length + ev.length > 6);+ if (hasAlpha && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color+ pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";+ pt.e = pt.e.split(ea[i]).join("transparent");+ } else {+ if (!_supportsOpacity) { //old versions of IE don't support rgba().+ hasAlpha = false;+ }+ if (useHSL) {+ pt.appendXtra(temp.substr(0, temp.indexOf("hsl")) + (hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true)+ .appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false)+ .appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false);+ } else {+ pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true)+ .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round)+ .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round);+ }++ if (hasAlpha) {+ bv = (bv.length < 4) ? 1 : bv[3];+ pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false);+ }+ }+ _colorExp.lastIndex = 0; //otherwise the test() on the RegExp could move the lastIndex and taint future results.++ } else {+ bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array++ //if no number is found, treat it as a non-tweening value and just append the string to the current xs.+ if (!bnums) {+ pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev;++ //loop through all the numbers that are found and construct the extra values on the pt.+ } else {+ enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5+ if (!enums || enums.length !== bnums.length) {+ //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");+ return pt;+ }+ ni = 0;+ for (xi = 0; xi < bnums.length; xi++) {+ cv = bnums[xi];+ temp = bv.indexOf(cv, ni);+ pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0));+ ni = temp + cv.length;+ }+ pt["xs" + pt.l] += bv.substr(ni);+ }+ }+ }+ //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly.+ if (e.indexOf("=") !== -1) if (pt.data) {+ str = pt.xs0 + pt.data.s;+ for (i = 1; i < pt.l; i++) {+ str += pt["xs" + i] + pt.data["xn" + i];+ }+ pt.e = str + pt["xs" + i];+ }+ if (!pt.l) {+ pt.type = -1;+ pt.xs0 = pt.e;+ }+ return pt.xfirst || pt;+ },+ i = 9;+++ p = CSSPropTween.prototype;+ p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc.+ while (--i > 0) {+ p["xn" + i] = 0;+ p["xs" + i] = "";+ }+ p.xs0 = "";+ p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null;+++ /**+ * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this:+ * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)"+ * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method).+ * @param {string=} pfx Prefix (if any)+ * @param {!number} s Starting value+ * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95.+ * @param {string=} sfx Suffix (if any)+ * @param {boolean=} r Round (if true).+ * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space.+ * @return {CSSPropTween} returns itself so that multiple methods can be chained together.+ */+ p.appendXtra = function(pfx, s, c, sfx, r, pad) {+ var pt = this,+ l = pt.l;+ pt["xs" + l] += (pad && (l || pt["xs" + l])) ? " " + pfx : pfx || "";+ if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value!+ pt["xs" + l] += s + (sfx || "");+ return pt;+ }+ pt.l++;+ pt.type = pt.setRatio ? 2 : 1;+ pt["xs" + pt.l] = sfx || "";+ if (l > 0) {+ pt.data["xn" + l] = s + c;+ pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method)+ pt["xn" + l] = s;+ if (!pt.plugin) {+ pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr);+ pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly.+ }+ return pt;+ }+ pt.data = {s:s + c};+ pt.rxp = {};+ pt.s = s;+ pt.c = c;+ pt.r = r;+ return pt;+ };++ /**+ * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly.+ * @param {!string} p Property name (like "boxShadow" or "throwProps")+ * @param {Object=} options An object containing any of the following configuration options:+ * - defaultValue: the default value+ * - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker)+ * - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.)+ * - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O)+ * - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc.+ * - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0.+ * - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out.+ * - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc.+ * - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default).+ */+ var SpecialProp = function(p, options) {+ options = options || {};+ this.p = options.prefix ? _checkPropPrefix(p) || p : p;+ _specialProps[p] = _specialProps[this.p] = this;+ this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi);+ if (options.parser) {+ this.parse = options.parser;+ }+ this.clrs = options.color;+ this.multi = options.multi;+ this.keyword = options.keyword;+ this.dflt = options.defaultValue;+ this.pr = options.priority || 0;+ },++ //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin.+ _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) {+ if (typeof(options) !== "object") {+ options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin+ }+ var a = p.split(","),+ d = options.defaultValue,+ i, temp;+ defaults = defaults || [d];+ for (i = 0; i < a.length; i++) {+ options.prefix = (i === 0 && options.prefix);+ options.defaultValue = defaults[i] || d;+ temp = new SpecialProp(a[i], options);+ }+ },++ //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file.+ _registerPluginProp = _internals._registerPluginProp = function(p) {+ if (!_specialProps[p]) {+ var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin";+ _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) {+ var pluginClass = _globals.com.greensock.plugins[pluginName];+ if (!pluginClass) {+ _log("Error: " + pluginName + " js file not loaded.");+ return pt;+ }+ pluginClass._cssRegister();+ return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars);+ }});+ }+ };+++ p = SpecialProp.prototype;++ /**+ * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list)+ * @param {!Object} t target element+ * @param {(string|number|object)} b beginning value+ * @param {(string|number|object)} e ending (destination) value+ * @param {CSSPropTween=} pt next CSSPropTween in the linked list+ * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here.+ * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here.+ * @return {CSSPropTween=} First CSSPropTween in the linked list+ */+ p.parseComplex = function(t, b, e, pt, plugin, setRatio) {+ var kwd = this.keyword,+ i, ba, ea, l, bi, ei;+ //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example)+ if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) {+ ba = b.replace(_commasOutsideParenExp, "|").split("|");+ ea = e.replace(_commasOutsideParenExp, "|").split("|");+ } else if (kwd) {+ ba = [b];+ ea = [e];+ }+ if (ea) {+ l = (ea.length > ba.length) ? ea.length : ba.length;+ for (i = 0; i < l; i++) {+ b = ba[i] = ba[i] || this.dflt;+ e = ea[i] = ea[i] || this.dflt;+ if (kwd) {+ bi = b.indexOf(kwd);+ ei = e.indexOf(kwd);+ if (bi !== ei) {+ if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one.+ ba[i] = ba[i].split(kwd).join("");+ } else if (bi === -1) { //if the keyword isn't in the beginning, add it.+ ba[i] += " " + kwd;+ }+ }+ }+ }+ b = ba.join(", ");+ e = ea.join(", ");+ }+ return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio);+ };++ /**+ * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call:+ * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this);+ * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that).+ * @param {!Object} t Target object whose property is being tweened+ * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object).+ * @param {!string} p Property name+ * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween.+ * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it)+ * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance.+ * @param {Object=} vars Original vars object that contains the data for parsing.+ * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call.+ */+ p.parse = function(t, e, p, cssp, pt, plugin, vars) {+ return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin);+ };++ /**+ * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters:+ * 1) Target object whose property should be tweened (typically a DOM element)+ * 2) The end/destination value (could be a string, number, object, or whatever you want)+ * 3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration)+ *+ * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example:+ *+ * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) {+ * var start = target.style.width;+ * return function(ratio) {+ * target.style.width = (start + value * ratio) + "px";+ * console.log("set width to " + target.style.width);+ * }+ * }, 0);+ *+ * Then, when I do this tween, it will trigger my special property:+ *+ * TweenLite.to(element, 1, {css:{myCustomProp:100}});+ *+ * In the example, of course, we're just changing the width, but you can do anything you want.+ *+ * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}})+ * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function.+ * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones.+ */+ CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) {+ _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) {+ var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority);+ rv.plugin = plugin;+ rv.setRatio = onInitTween(t, e, cssp._tween, p);+ return rv;+ }, priority:priority});+ };+++++++ //transform-related methods and properties+ CSSPlugin.useSVGTransformAttr = true; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this).+ var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","),+ _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.+ _transformPropCSS = _prefixCSS + "transform",+ _transformOriginProp = _checkPropPrefix("transformOrigin"),+ _supports3D = (_checkPropPrefix("perspective") !== null),+ Transform = _internals.Transform = function() {+ this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;+ this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto";+ },+ _SVGElement = _gsScope.SVGElement,+ _useSVGTransformAttr,+ //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future.++ _createSVG = function(type, container, attributes) {+ var element = _doc.createElementNS("http://www.w3.org/2000/svg", type),+ reg = /([a-z])([A-Z])/g,+ p;+ for (p in attributes) {+ element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]);+ }+ container.appendChild(element);+ return element;+ },+ _docElement = _doc.documentElement || {},+ _forceSVGTransformAttr = (function() {+ //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element+ var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome),+ svg, rect, width;+ if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway+ svg = _createSVG("svg", _docElement);+ rect = _createSVG("rect", svg, {width:100, height:50, x:100});+ width = rect.getBoundingClientRect().width;+ rect.style[_transformOriginProp] = "50% 50%";+ rect.style[_transformProp] = "scaleX(0.5)";+ force = (width === rect.getBoundingClientRect().width && !(_isFirefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D).+ _docElement.removeChild(svg);+ }+ return force;+ })(),+ _parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) {+ var tm = e._gsTransform,+ m = _getMatrix(e, true),+ v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld;+ if (tm) {+ xOriginOld = tm.xOrigin; //record the original values before we alter them.+ yOriginOld = tm.yOrigin;+ }+ if (!absolute || (v = absolute.split(" ")).length < 2) {+ b = e.getBBox();+ if (b.x === 0 && b.y === 0 && b.width + b.height === 0) { //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.+ b = {x: parseFloat(e.hasAttribute("x") ? e.getAttribute("x") : e.hasAttribute("cx") ? e.getAttribute("cx") : 0) || 0, y: parseFloat(e.hasAttribute("y") ? e.getAttribute("y") : e.hasAttribute("cy") ? e.getAttribute("cy") : 0) || 0, width:0, height:0};+ }+ local = _parsePosition(local).split(" ");+ v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x,+ (local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y];+ }+ decoratee.xOrigin = xOrigin = parseFloat(v[0]);+ decoratee.yOrigin = yOrigin = parseFloat(v[1]);+ if (absolute && m !== _identity2DMatrix) { //if svgOrigin is being set, we must invert the matrix and determine where the absolute point is, factoring in the current transforms. Otherwise, the svgOrigin would be based on the element's non-transformed position on the canvas.+ a = m[0];+ b = m[1];+ c = m[2];+ d = m[3];+ tx = m[4];+ ty = m[5];+ determinant = (a * d - b * c);+ if (determinant) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.+ x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant);+ y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant);+ xOrigin = decoratee.xOrigin = v[0] = x;+ yOrigin = decoratee.yOrigin = v[1] = y;+ }+ }+ if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly+ if (skipRecord) {+ decoratee.xOffset = tm.xOffset;+ decoratee.yOffset = tm.yOffset;+ tm = decoratee;+ }+ if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) {+ x = xOrigin - xOriginOld;+ y = yOrigin - yOriginOld;+ //originally, we simply adjusted the x and y values, but that would cause problems if, for example, you created a rotational tween part-way through an x/y tween. Managing the offset in a separate variable gives us ultimate flexibility.+ //tm.x -= x - (x * m[0] + y * m[2]);+ //tm.y -= y - (x * m[1] + y * m[3]);+ tm.xOffset += (x * m[0] + y * m[2]) - x;+ tm.yOffset += (x * m[1] + y * m[3]) - y;+ } else {+ tm.xOffset = tm.yOffset = 0;+ }+ }+ if (!skipRecord) {+ e.setAttribute("data-svg-origin", v.join(" "));+ }+ },+ _getBBoxHack = function(swapIfPossible) { //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).+ var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"),+ oldParent = this.parentNode,+ oldSibling = this.nextSibling,+ oldCSS = this.style.cssText,+ bbox;+ _docElement.appendChild(svg);+ svg.appendChild(this);+ this.style.display = "block";+ if (swapIfPossible) {+ try {+ bbox = this.getBBox();+ this._originalGetBBox = this.getBBox;+ this.getBBox = _getBBoxHack;+ } catch (e) { }+ } else if (this._originalGetBBox) {+ bbox = this._originalGetBBox();+ }+ if (oldSibling) {+ oldParent.insertBefore(this, oldSibling);+ } else {+ oldParent.appendChild(this);+ }+ _docElement.removeChild(svg);+ this.style.cssText = oldCSS;+ return bbox;+ },+ _getBBox = function(e) {+ try {+ return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118+ } catch (error) {+ return _getBBoxHack.call(e, true);+ }+ },+ _isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works+ return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));+ },+ _identity2DMatrix = [1,0,0,1,0,0],+ _getMatrix = function(e, force2D) {+ var tm = e._gsTransform || new Transform(),+ rnd = 100000,+ style = e.style,+ isDefault, s, m, n, dec, none;+ if (_transformProp) {+ s = _getStyle(e, _transformPropCSS, null, true);+ } else if (e.currentStyle) {+ //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix.+ s = e.currentStyle.filter.match(_ieGetMatrixExp);+ s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";+ }+ isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");+ if (_transformProp && ((none = (!_getComputedStyle(e) || _getComputedStyle(e).display === "none")) || !e.parentNode)) { //note: Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397+ if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).+ n = style.display;+ style.display = "block";+ }+ if (!e.parentNode) {+ dec = 1; //flag+ _docElement.appendChild(e);+ }+ s = _getStyle(e, _transformPropCSS, null, true);+ isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");+ if (n) {+ style.display = n;+ } else if (none) {+ _removeProp(style, "display");+ }+ if (dec) {+ _docElement.removeChild(e);+ }+ }+ if (tm.svg || (e.getCTM && _isSVG(e))) {+ if (isDefault && (style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values+ s = style[_transformProp];+ isDefault = 0;+ }+ m = e.getAttribute("transform");+ if (isDefault && m) {+ m = e.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix.+ s = "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + m.e + "," + m.f + ")";+ isDefault = 0;+ }+ }+ if (isDefault) {+ return _identity2DMatrix;+ }+ //split the matrix values out into an array (m for matrix)+ m = (s || "").match(_numExp) || [];+ i = m.length;+ while (--i > -1) {+ n = Number(m[i]);+ m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).+ }+ return (force2D && m.length > 6) ? [m[0], m[1], m[4], m[5], m[12], m[13]] : m;+ },++ /**+ * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.+ * @param {!Object} t target element+ * @param {Object=} cs computed style object (optional)+ * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...}+ * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style)+ * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...}+ */+ _getTransform = _internals.getTransform = function(t, cs, rec, parse) {+ if (t._gsTransform && rec && !parse) {+ return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things.+ }+ var tm = rec ? t._gsTransform || new Transform() : new Transform(),+ invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.+ min = 0.00002,+ rnd = 100000,+ zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0,+ defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0,+ m, i, scaleX, scaleY, rotation, skewX;++ tm.svg = !!(t.getCTM && _isSVG(t));+ if (tm.svg) {+ _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin"));+ _useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr;+ }+ m = _getMatrix(t);+ if (m !== _identity2DMatrix) {++ if (m.length === 16) {+ //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)+ var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],+ a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],+ a13 = m[8], a23 = m[9], a33 = m[10],+ a14 = m[12], a24 = m[13], a34 = m[14],+ a43 = m[11],+ angle = Math.atan2(a32, a33),+ t1, t2, t3, t4, cos, sin;+ //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari+ if (tm.zOrigin) {+ a34 = -tm.zOrigin;+ a14 = a13*a34-m[12];+ a24 = a23*a34-m[13];+ a34 = a33*a34+tm.zOrigin-m[14];+ }+ //note for possible future consolidation: rotationX: Math.atan2(a32, a33), rotationY: Math.atan2(-a31, Math.sqrt(a33 * a33 + a32 * a32)), rotation: Math.atan2(a21, a11), skew: Math.atan2(a12, a22). However, it doesn't seem to be quite as reliable as the full-on backwards rotation procedure.+ tm.rotationX = angle * _RAD2DEG;+ //rotationX+ if (angle) {+ cos = Math.cos(-angle);+ sin = Math.sin(-angle);+ t1 = a12*cos+a13*sin;+ t2 = a22*cos+a23*sin;+ t3 = a32*cos+a33*sin;+ a13 = a12*-sin+a13*cos;+ a23 = a22*-sin+a23*cos;+ a33 = a32*-sin+a33*cos;+ a43 = a42*-sin+a43*cos;+ a12 = t1;+ a22 = t2;+ a32 = t3;+ }+ //rotationY+ angle = Math.atan2(-a31, a33);+ tm.rotationY = angle * _RAD2DEG;+ if (angle) {+ cos = Math.cos(-angle);+ sin = Math.sin(-angle);+ t1 = a11*cos-a13*sin;+ t2 = a21*cos-a23*sin;+ t3 = a31*cos-a33*sin;+ a23 = a21*sin+a23*cos;+ a33 = a31*sin+a33*cos;+ a43 = a41*sin+a43*cos;+ a11 = t1;+ a21 = t2;+ a31 = t3;+ }+ //rotationZ+ angle = Math.atan2(a21, a11);+ tm.rotation = angle * _RAD2DEG;+ if (angle) {+ cos = Math.cos(angle);+ sin = Math.sin(angle);+ t1 = a11*cos+a21*sin;+ t2 = a12*cos+a22*sin;+ t3 = a13*cos+a23*sin;+ a21 = a21*cos-a11*sin;+ a22 = a22*cos-a12*sin;+ a23 = a23*cos-a13*sin;+ a11 = t1;+ a12 = t2;+ a13 = t3;+ }++ if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.+ tm.rotationX = tm.rotation = 0;+ tm.rotationY = 180 - tm.rotationY;+ }++ //skewX+ angle = Math.atan2(a12, a22);++ //scales+ tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21 + a31 * a31) * rnd + 0.5) | 0) / rnd;+ tm.scaleY = ((Math.sqrt(a22 * a22 + a32 * a32) * rnd + 0.5) | 0) / rnd;+ tm.scaleZ = ((Math.sqrt(a13 * a13 + a23 * a23 + a33 * a33) * rnd + 0.5) | 0) / rnd;+ a11 /= tm.scaleX;+ a12 /= tm.scaleY;+ a21 /= tm.scaleX;+ a22 /= tm.scaleY;+ if (Math.abs(angle) > min) {+ tm.skewX = angle * _RAD2DEG;+ a12 = 0; //unskews+ if (tm.skewType !== "simple") {+ tm.scaleY *= 1 / Math.cos(angle); //by default, we compensate the scale based on the skew so that the element maintains a similar proportion when skewed, so we have to alter the scaleY here accordingly to match the default (non-adjusted) skewing that CSS does (stretching more and more as it skews).+ }++ } else {+ tm.skewX = 0;+ }++ /* //for testing purposes+ var transform = "matrix3d(",+ comma = ",",+ zero = "0";+ a13 /= tm.scaleZ;+ a23 /= tm.scaleZ;+ a31 /= tm.scaleX;+ a32 /= tm.scaleY;+ a33 /= tm.scaleZ;+ transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);+ transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);+ transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);+ transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;+ transform += a14 + comma + a24 + comma + a34 + comma + (tm.perspective ? (1 + (-a34 / tm.perspective)) : 1) + ")";+ console.log(transform);+ document.querySelector(".test").style[_transformProp] = transform;+ */++ tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;+ tm.x = a14;+ tm.y = a24;+ tm.z = a34;+ if (tm.svg) {+ tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12);+ tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22);+ }++ } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY))) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.+ var k = (m.length >= 6),+ a = k ? m[0] : 1,+ b = m[1] || 0,+ c = m[2] || 0,+ d = k ? m[3] : 1;+ tm.x = m[4] || 0;+ tm.y = m[5] || 0;+ scaleX = Math.sqrt(a * a + b * b);+ scaleY = Math.sqrt(d * d + c * c);+ rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).+ skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;+ tm.scaleX = scaleX;+ tm.scaleY = scaleY;+ tm.rotation = rotation;+ tm.skewX = skewX;+ if (_supports3D) {+ tm.rotationX = tm.rotationY = tm.z = 0;+ tm.perspective = defaultTransformPerspective;+ tm.scaleZ = 1;+ }+ if (tm.svg) {+ tm.x -= tm.xOrigin - (tm.xOrigin * a + tm.yOrigin * c);+ tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d);+ }+ }+ if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) {+ if (invX) {+ tm.scaleX *= -1;+ tm.skewX += (tm.rotation <= 0) ? 180 : -180;+ tm.rotation += (tm.rotation <= 0) ? 180 : -180;+ } else {+ tm.scaleY *= -1;+ tm.skewX += (tm.skewX <= 0) ? 180 : -180;+ }+ }+ tm.zOrigin = zOrigin;+ //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.+ for (i in tm) {+ if (tm[i] < min) if (tm[i] > -min) {+ tm[i] = 0;+ }+ }+ }+ //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective+ ", origin: "+ tm.xOrigin+ ","+ tm.yOrigin);+ if (rec) {+ t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)+ if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean.+ if (_useSVGTransformAttr && t.style[_transformProp]) {+ TweenLite.delayedCall(0.001, function(){ //if we apply this right away (before anything has rendered), we risk there being no transforms for a brief moment and it also interferes with adjusting the transformOrigin in a tween with immediateRender:true (it'd try reading the matrix and it wouldn't have the appropriate data in place because we just removed it).+ _removeProp(t.style, _transformProp);+ });+ } else if (!_useSVGTransformAttr && t.getAttribute("transform")) {+ TweenLite.delayedCall(0.001, function(){+ t.removeAttribute("transform");+ });+ }+ }+ }+ return tm;+ },++ //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms)+ _setIETransformRatio = function(v) {+ var t = this.data, //refers to the element's _gsTransform object+ ang = -t.rotation * _DEG2RAD,+ skew = ang + t.skewX * _DEG2RAD,+ rnd = 100000,+ a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd,+ b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd,+ c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd,+ d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd,+ style = this.t.style,+ cs = this.t.currentStyle,+ filters, val;+ if (!cs) {+ return;+ }+ val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted)+ b = -c;+ c = -val;+ filters = cs.filter;+ style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight+ var w = this.t.offsetWidth,+ h = this.t.offsetHeight,+ clip = (cs.position !== "absolute"),+ m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d,+ ox = t.x + (w * t.xPercent / 100),+ oy = t.y + (h * t.yPercent / 100),+ dx, dy;++ //if transformOrigin is being used, adjust the offset x and y+ if (t.ox != null) {+ dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2;+ dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2;+ ox += dx - (dx * a + dy * b);+ oy += dy - (dx * c + dy * d);+ }++ if (!clip) {+ m += ", sizingMethod='auto expand')";+ } else {+ dx = (w / 2);+ dy = (h / 2);+ //translate to ensure that transformations occur around the correct origin (default is center).+ m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")";+ }+ if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) {+ style.filter = filters.replace(_ieSetMatrixExp, m);+ } else {+ style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha.+ }++ //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance.+ if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) {+ style.removeAttribute("filter");+ }++ //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration).+ if (!clip) {+ var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom+ marg, prop, dif;+ dx = t.ieOffsetX || 0;+ dy = t.ieOffsetY || 0;+ t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox);+ t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy);+ for (i = 0; i < 4; i++) {+ prop = _margins[i];+ marg = cs[prop];+ //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes)+ val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0;+ if (val !== t[prop]) {+ dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible.+ } else {+ dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY;+ }+ style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px";+ }+ }+ },++ /* translates a super small decimal to a string WITHOUT scientific notation+ _safeDecimal = function(n) {+ var s = (n < 0 ? -n : n) + "",+ a = s.split("e-");+ return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join("");+ },+ */++ _setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) {+ var t = this.data, //refers to the element's _gsTransform object+ style = this.t.style,+ angle = t.rotation,+ rotationX = t.rotationX,+ rotationY = t.rotationY,+ sx = t.scaleX,+ sy = t.scaleY,+ sz = t.scaleZ,+ x = t.x,+ y = t.y,+ z = t.z,+ isSVG = t.svg,+ perspective = t.perspective,+ force3D = t.force3D,+ skewY = t.skewY,+ skewX = t.skewX,+ t1, a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,+ zOrigin, min, cos, sin, t2, transform, comma, zero, skew, rnd;+ if (skewY) { //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.+ skewX += skewY;+ angle += skewY;+ }++ //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)+ if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX && sz === 1) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween.++ //2D+ if (angle || skewX || isSVG) {+ angle *= _DEG2RAD;+ skew = skewX * _DEG2RAD;+ rnd = 100000;+ a11 = Math.cos(angle) * sx;+ a21 = Math.sin(angle) * sx;+ a12 = Math.sin(angle - skew) * -sy;+ a22 = Math.cos(angle - skew) * sy;+ if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does+ t1 = Math.tan(skew - skewY * _DEG2RAD);+ t1 = Math.sqrt(1 + t1 * t1);+ a12 *= t1;+ a22 *= t1;+ if (skewY) {+ t1 = Math.tan(skewY * _DEG2RAD);+ t1 = Math.sqrt(1 + t1 * t1);+ a11 *= t1;+ a21 *= t1;+ }+ }+ if (isSVG) {+ x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset;+ y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset;+ if (_useSVGTransformAttr && (t.xPercent || t.yPercent)) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the matrix to simulate it.+ min = this.t.getBBox();+ x += t.xPercent * 0.01 * min.width;+ y += t.yPercent * 0.01 * min.height;+ }+ min = 0.000001;+ if (x < min) if (x > -min) {+ x = 0;+ }+ if (y < min) if (y > -min) {+ y = 0;+ }+ }+ transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")";+ if (isSVG && _useSVGTransformAttr) {+ this.t.setAttribute("transform", "matrix(" + transform);+ } else {+ //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform;+ }+ } else {+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";+ }+ return;++ }+ if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.+ min = 0.0001;+ if (sx < min && sx > -min) {+ sx = sz = 0.00002;+ }+ if (sy < min && sy > -min) {+ sy = sz = 0.00002;+ }+ if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).+ perspective = 0;+ }+ }+ if (angle || skewX) {+ angle *= _DEG2RAD;+ cos = a11 = Math.cos(angle);+ sin = a21 = Math.sin(angle);+ if (skewX) {+ angle -= skewX * _DEG2RAD;+ cos = Math.cos(angle);+ sin = Math.sin(angle);+ if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does+ t1 = Math.tan((skewX - skewY) * _DEG2RAD);+ t1 = Math.sqrt(1 + t1 * t1);+ cos *= t1;+ sin *= t1;+ if (t.skewY) {+ t1 = Math.tan(skewY * _DEG2RAD);+ t1 = Math.sqrt(1 + t1 * t1);+ a11 *= t1;+ a21 *= t1;+ }+ }+ }+ a12 = -sin;+ a22 = cos;++ } else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster...+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");+ return;+ } else {+ a11 = a22 = 1;+ a12 = a21 = 0;+ }+ // KEY INDEX AFFECTS a[row][column]+ // a11 0 rotation, rotationY, scaleX+ // a21 1 rotation, rotationY, scaleX+ // a31 2 rotationY, scaleX+ // a41 3 rotationY, scaleX+ // a12 4 rotation, skewX, rotationX, scaleY+ // a22 5 rotation, skewX, rotationX, scaleY+ // a32 6 rotationX, scaleY+ // a42 7 rotationX, scaleY+ // a13 8 rotationY, rotationX, scaleZ+ // a23 9 rotationY, rotationX, scaleZ+ // a33 10 rotationY, rotationX, scaleZ+ // a43 11 rotationY, rotationX, perspective, scaleZ+ // a14 12 x, zOrigin, svgOrigin+ // a24 13 y, zOrigin, svgOrigin+ // a34 14 z, zOrigin+ // a44 15+ // rotation: Math.atan2(a21, a11)+ // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11))+ // rotationX: Math.atan2(a32, a33)+ a33 = 1;+ a13 = a23 = a31 = a32 = a41 = a42 = 0;+ a43 = (perspective) ? -1 / perspective : 0;+ zOrigin = t.zOrigin;+ min = 0.000001; //threshold below which browsers use scientific notation which won't work.+ comma = ",";+ zero = "0";+ angle = rotationY * _DEG2RAD;+ if (angle) {+ cos = Math.cos(angle);+ sin = Math.sin(angle);+ a31 = -sin;+ a41 = a43*-sin;+ a13 = a11*sin;+ a23 = a21*sin;+ a33 = cos;+ a43 *= cos;+ a11 *= cos;+ a21 *= cos;+ }+ angle = rotationX * _DEG2RAD;+ if (angle) {+ cos = Math.cos(angle);+ sin = Math.sin(angle);+ t1 = a12*cos+a13*sin;+ t2 = a22*cos+a23*sin;+ a32 = a33*sin;+ a42 = a43*sin;+ a13 = a12*-sin+a13*cos;+ a23 = a22*-sin+a23*cos;+ a33 = a33*cos;+ a43 = a43*cos;+ a12 = t1;+ a22 = t2;+ }+ if (sz !== 1) {+ a13*=sz;+ a23*=sz;+ a33*=sz;+ a43*=sz;+ }+ if (sy !== 1) {+ a12*=sy;+ a22*=sy;+ a32*=sy;+ a42*=sy;+ }+ if (sx !== 1) {+ a11*=sx;+ a21*=sx;+ a31*=sx;+ a41*=sx;+ }++ if (zOrigin || isSVG) {+ if (zOrigin) {+ x += a13*-zOrigin;+ y += a23*-zOrigin;+ z += a33*-zOrigin+zOrigin;+ }+ if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually+ x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset;+ y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset;+ }+ if (x < min && x > -min) {+ x = zero;+ }+ if (y < min && y > -min) {+ y = zero;+ }+ if (z < min && z > -min) {+ z = 0; //don't use string because we calculate perspective later and need the number.+ }+ }++ //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall:+ transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");+ transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);+ transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);+ if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)+ transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);+ transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;+ } else {+ transform += ",0,0,0,0,1,0,";+ }+ transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")";++ style[_transformProp] = transform;+ };++ p = Transform.prototype;+ p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = p.xOffset = p.yOffset = 0;+ p.scaleX = p.scaleY = p.scaleZ = 1;++ _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) {+ if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it.+ cssp._lastParsedTransform = vars;+ var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0, //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()).+ swapFunc;+ if (typeof(vars[parsingProp]) === "function") { //whatever property triggers the initial parsing might be a function-based value in which case it already got called in parse(), thus we don't want to call it again in here. The most efficient way to avoid this is to temporarily swap the value directly into the vars object, and then after we do all our parsing in this function, we'll swap it back again.+ swapFunc = vars[parsingProp];+ vars[parsingProp] = e;+ }+ if (scaleFunc) {+ vars.scale = scaleFunc(_index, t);+ }+ var originalGSTransform = t._gsTransform,+ style = t.style,+ min = 0.000001,+ i = _transformProps.length,+ v = vars,+ endRotations = {},+ transformOriginString = "transformOrigin",+ m1 = _getTransform(t, _cs, true, v.parseTransform),+ orig = v.transform && ((typeof(v.transform) === "function") ? v.transform(_index, _target) : v.transform),+ m2, copy, has3D, hasChange, dr, x, y, matrix, p;+ m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;+ cssp._transform = m1;+ if (orig && typeof(orig) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"+ copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.+ copy[_transformProp] = orig;+ copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.+ copy.position = "absolute";+ if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target...+ copy.width = _getStyle(t, "width");+ copy.height = _getStyle(t, "height");+ }+ _doc.body.appendChild(_tempDiv);+ m2 = _getTransform(_tempDiv, null, false);+ if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple".+ m2.scaleY *= Math.cos(m2.skewX * _DEG2RAD);+ }+ if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here...+ x = m1.xOrigin;+ y = m1.yOrigin;+ m2.x -= m1.xOffset;+ m2.y -= m1.yOffset;+ if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly.+ orig = {};+ _parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true);+ x = orig.xOrigin;+ y = orig.yOrigin;+ m2.x -= orig.xOffset - m1.xOffset;+ m2.y -= orig.yOffset - m1.yOffset;+ }+ if (x || y) {+ matrix = _getMatrix(_tempDiv, true);+ m2.x -= x - (x * matrix[0] + y * matrix[2]);+ m2.y -= y - (x * matrix[1] + y * matrix[3]);+ }+ }+ _doc.body.removeChild(_tempDiv);+ if (!m2.perspective) {+ m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.+ }+ if (v.xPercent != null) {+ m2.xPercent = _parseVal(v.xPercent, m1.xPercent);+ }+ if (v.yPercent != null) {+ m2.yPercent = _parseVal(v.yPercent, m1.yPercent);+ }+ } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object)+ m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX),+ scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY),+ scaleZ:_parseVal(v.scaleZ, m1.scaleZ),+ x:_parseVal(v.x, m1.x),+ y:_parseVal(v.y, m1.y),+ z:_parseVal(v.z, m1.z),+ xPercent:_parseVal(v.xPercent, m1.xPercent),+ yPercent:_parseVal(v.yPercent, m1.yPercent),+ perspective:_parseVal(v.transformPerspective, m1.perspective)};+ dr = v.directionalRotation;+ if (dr != null) {+ if (typeof(dr) === "object") {+ for (copy in dr) {+ v[copy] = dr[copy];+ }+ } else {+ v.rotation = dr;+ }+ }+ if (typeof(v.x) === "string" && v.x.indexOf("%") !== -1) {+ m2.x = 0;+ m2.xPercent = _parseVal(v.x, m1.xPercent);+ }+ if (typeof(v.y) === "string" && v.y.indexOf("%") !== -1) {+ m2.y = 0;+ m2.yPercent = _parseVal(v.y, m1.yPercent);+ }++ m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);+ if (_supports3D) {+ m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);+ m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);+ }+ m2.skewX = _parseAngle(v.skewX, m1.skewX);+ m2.skewY = _parseAngle(v.skewY, m1.skewY);+ }+ if (_supports3D && v.force3D != null) {+ m1.force3D = v.force3D;+ hasChange = true;+ }++ has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);+ if (!has3D && v.scale != null) {+ m2.scaleZ = 1; //no need to tween scaleZ.+ }++ while (--i > -1) {+ p = _transformProps[i];+ orig = m2[p] - m1[p];+ if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) {+ hasChange = true;+ pt = new CSSPropTween(m1, p, m1[p], orig, pt);+ if (p in endRotations) {+ pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested+ }+ pt.xs0 = 0; //ensures the value stays numeric in setRatio()+ pt.plugin = plugin;+ cssp._overwriteProps.push(pt.n);+ }+ }++ orig = v.transformOrigin;+ if (m1.svg && (orig || v.svgOrigin)) {+ x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin+ y = m1.yOffset;+ _parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin, v.smoothOrigin);+ pt = _addNonTweeningNumericPT(m1, "xOrigin", (originalGSTransform ? m1 : m2).xOrigin, m2.xOrigin, pt, transformOriginString); //note: if there wasn't a transformOrigin defined yet, just start with the destination one; it's wasteful otherwise, and it causes problems with fromTo() tweens. For example, TweenLite.to("#wheel", 3, {rotation:180, transformOrigin:"50% 50%", delay:1}); TweenLite.fromTo("#wheel", 3, {scale:0.5, transformOrigin:"50% 50%"}, {scale:1, delay:2}); would cause a jump when the from values revert at the beginning of the 2nd tween.+ pt = _addNonTweeningNumericPT(m1, "yOrigin", (originalGSTransform ? m1 : m2).yOrigin, m2.yOrigin, pt, transformOriginString);+ if (x !== m1.xOffset || y !== m1.yOffset) {+ pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString);+ pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString);+ }+ orig = "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin+ }+ if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).+ if (_transformProp) {+ hasChange = true;+ p = _transformOriginProp;+ orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors+ pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString);+ pt.b = style[p];+ pt.plugin = plugin;+ if (_supports3D) {+ copy = m1.zOrigin;+ orig = orig.split(" ");+ m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.+ pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!+ pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)+ pt.b = copy;+ pt.xs0 = pt.e = m1.zOrigin;+ } else {+ pt.xs0 = pt.e = orig;+ }++ //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).+ } else {+ _parsePosition(orig + "", m1);+ }+ }+ if (hasChange) {+ cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms();+ }+ if (swapFunc) {+ vars[parsingProp] = swapFunc;+ }+ if (scaleFunc) {+ vars.scale = scaleFunc;+ }+ return pt;+ }, prefix:true});++ _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});++ _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {+ e = this.format(e);+ var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],+ style = t.style,+ ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em;+ w = parseFloat(t.offsetWidth);+ h = parseFloat(t.offsetHeight);+ ea1 = e.split(" ");+ for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis!+ if (this.p.indexOf("border")) { //older browsers used a prefix+ props[i] = _checkPropPrefix(props[i]);+ }+ bs = bs2 = _getStyle(t, props[i], _cs, false, "0px");+ if (bs.indexOf(" ") !== -1) {+ bs2 = bs.split(" ");+ bs = bs2[0];+ bs2 = bs2[1];+ }+ es = es2 = ea1[i];+ bn = parseFloat(bs);+ bsfx = bs.substr((bn + "").length);+ rel = (es.charAt(1) === "=");+ if (rel) {+ en = parseInt(es.charAt(0)+"1", 10);+ es = es.substr(2);+ en *= parseFloat(es);+ esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || "";+ } else {+ en = parseFloat(es);+ esfx = es.substr((en + "").length);+ }+ if (esfx === "") {+ esfx = _suffixMap[p] || bsfx;+ }+ if (esfx !== bsfx) {+ hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent.+ vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number+ if (esfx === "%") {+ bs = (hn / w * 100) + "%";+ bs2 = (vn / h * 100) + "%";+ } else if (esfx === "em") {+ em = _convertToPixels(t, "borderLeft", 1, "em");+ bs = (hn / em) + "em";+ bs2 = (vn / em) + "em";+ } else {+ bs = hn + "px";+ bs2 = vn + "px";+ }+ if (rel) {+ es = (parseFloat(bs) + en) + esfx;+ es2 = (parseFloat(bs2) + en) + esfx;+ }+ }+ pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt);+ }+ return pt;+ }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)});+ _registerComplexSpecialProp("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {+ return _parseComplex(t.style, p, this.format(_getStyle(t, p, _cs, false, "0px 0px")), this.format(e), false, "0px", pt);+ }, prefix:true, formatter:_getFormatter("0px 0px", false, true)});+ _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) {+ var bp = "background-position",+ cs = (_cs || _getComputedStyle(t, null)),+ bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase+ es = this.format(e),+ ba, ea, i, pct, overlap, src;+ if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) {+ src = _getStyle(t, "backgroundImage").replace(_urlExp, "");+ if (src && src !== "none") {+ ba = bs.split(" ");+ ea = es.split(" ");+ _tempImg.setAttribute("src", src); //set the temp IMG's src to the background-image so that we can measure its width/height+ i = 2;+ while (--i > -1) {+ bs = ba[i];+ pct = (bs.indexOf("%") !== -1);+ if (pct !== (ea[i].indexOf("%") !== -1)) {+ overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height;+ ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%";+ }+ }+ bs = ba.join(" ");+ }+ }+ return this.parseComplex(t.style, bs, es, pt, plugin);+ }, formatter:_parsePosition});+ _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) {+ v += ""; //ensure it's a string+ return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set.+ }});+ _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});+ _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});+ _registerComplexSpecialProp("transformStyle", {prefix:true});+ _registerComplexSpecialProp("backfaceVisibility", {prefix:true});+ _registerComplexSpecialProp("userSelect", {prefix:true});+ _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")});+ _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")});+ _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){+ var b, cs, delim;+ if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited.+ cs = t.currentStyle;+ delim = _ieVers < 8 ? " " : ",";+ b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")";+ e = this.format(e).split(",").join(delim);+ } else {+ b = this.format(_getStyle(t, this.p, _cs, false, this.dflt));+ e = this.format(e);+ }+ return this.parseComplex(t.style, b, e, pt, plugin);+ }});+ _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true});+ _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them)+ _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) {+ var bw = _getStyle(t, "borderTopWidth", _cs, false, "0px"),+ end = this.format(e).split(" "),+ esfx = end[0].replace(_suffixExp, "");+ if (esfx !== "px") { //if we're animating to a non-px value, we need to convert the beginning width to that unit.+ bw = (parseFloat(bw) / _convertToPixels(t, "borderTopWidth", 1, esfx)) + esfx;+ }+ return this.parseComplex(t.style, this.format(bw + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), end.join(" "), pt, plugin);+ }, color:true, formatter:function(v) {+ var a = v.split(" ");+ return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0];+ }});+ _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline).+ _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) {+ var s = t.style,+ prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat";+ return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e);+ }});++ //opacity-related+ var _setIEOpacityRatio = function(v) {+ var t = this.t, //refers to the element's style property+ filters = t.filter || _getStyle(this.data, "filter") || "",+ val = (this.s + this.c * v) | 0,+ skip;+ if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.+ if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) {+ t.removeAttribute("filter");+ skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check.+ } else {+ t.filter = filters.replace(_alphaFilterExp, "");+ skip = true;+ }+ }+ if (!skip) {+ if (this.xn1) {+ t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame.+ }+ if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues+ if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween)+ t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly.+ }+ } else {+ t.filter = filters.replace(_opacityExp, "opacity=" + val);+ }+ }+ };+ _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) {+ var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")),+ style = t.style,+ isAutoAlpha = (p === "autoAlpha");+ if (typeof(e) === "string" && e.charAt(1) === "=") {+ e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b;+ }+ if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)+ b = 0;+ }+ if (_supportsOpacity) {+ pt = new CSSPropTween(style, "opacity", b, e - b, pt);+ } else {+ pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt);+ pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug.+ style.zoom = 1; //helps correct an IE issue.+ pt.type = 2;+ pt.b = "alpha(opacity=" + pt.s + ")";+ pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")";+ pt.data = t;+ pt.plugin = plugin;+ pt.setRatio = _setIEOpacityRatio;+ }+ if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier+ pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));+ pt.xs0 = "inherit";+ cssp._overwriteProps.push(pt.n);+ cssp._overwriteProps.push(p);+ }+ return pt;+ }});+++ var _removeProp = function(s, p) {+ if (p) {+ if (s.removeProperty) {+ if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)+ p = "-" + p;+ }+ s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());+ } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"+ s.removeAttribute(p);+ }+ }+ },+ _setClassNameRatio = function(v) {+ this.t._gsClassPT = this;+ if (v === 1 || v === 0) {+ this.t.setAttribute("class", (v === 0) ? this.b : this.e);+ var mpt = this.data, //first MiniPropTween+ s = this.t.style;+ while (mpt) {+ if (!mpt.v) {+ _removeProp(s, mpt.p);+ } else {+ s[mpt.p] = mpt.v;+ }+ mpt = mpt._next;+ }+ if (v === 1 && this.t._gsClassPT === this) {+ this.t._gsClassPT = null;+ }+ } else if (this.t.getAttribute("class") !== this.e) {+ this.t.setAttribute("class", this.e);+ }+ };+ _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) {+ var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable.+ cssText = t.style.cssText,+ difData, bs, cnpt, cnptLookup, mpt;+ pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2);+ pt.setRatio = _setClassNameRatio;+ pt.pr = -11;+ _hasPriority = true;+ pt.b = b;+ bs = _getAllStyles(t, _cs);+ //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values)+ cnpt = t._gsClassPT;+ if (cnpt) {+ cnptLookup = {};+ mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned.+ while (mpt) {+ cnptLookup[mpt.p] = 1;+ mpt = mpt._next;+ }+ cnpt.setRatio(1);+ }+ t._gsClassPT = pt;+ pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");+ t.setAttribute("class", pt.e);+ difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);+ t.setAttribute("class", b);+ pt.data = difData.firstMPT;+ t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).+ pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)+ return pt;+ }});+++ var _setClearPropsRatio = function(v) {+ if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).+ var s = this.t.style,+ transformParse = _specialProps.transform.parse,+ a, p, i, clearTransform, transform;+ if (this.e === "all") {+ s.cssText = "";+ clearTransform = true;+ } else {+ a = this.e.split(" ").join("").split(",");+ i = a.length;+ while (--i > -1) {+ p = a[i];+ if (_specialProps[p]) {+ if (_specialProps[p].parse === transformParse) {+ clearTransform = true;+ } else {+ p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow"+ }+ }+ _removeProp(s, p);+ }+ }+ if (clearTransform) {+ _removeProp(s, _transformProp);+ transform = this.t._gsTransform;+ if (transform) {+ if (transform.svg) {+ this.t.removeAttribute("data-svg-origin");+ this.t.removeAttribute("transform");+ }+ delete this.t._gsTransform;+ }+ }++ }+ };+ _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) {+ pt = new CSSPropTween(t, p, 0, 0, pt, 2);+ pt.setRatio = _setClearPropsRatio;+ pt.e = e;+ pt.pr = -10;+ pt.data = cssp._tween;+ _hasPriority = true;+ return pt;+ }});++ p = "bezier,throwProps,physicsProps,physics2D".split(",");+ i = p.length;+ while (i--) {+ _registerPluginProp(p[i]);+ }+++++++++ p = CSSPlugin.prototype;+ p._firstPT = p._lastParsedTransform = p._transform = null;++ //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.+ p._onInitTween = function(target, vars, tween, index) {+ if (!target.nodeType) { //css is only for dom elements+ return false;+ }+ this._target = _target = target;+ this._tween = tween;+ this._vars = vars;+ _index = index;+ _autoRound = vars.autoRound;+ _hasPriority = false;+ _suffixMap = vars.suffixMap || CSSPlugin.suffixMap;+ _cs = _getComputedStyle(target, "");+ _overwriteProps = this._overwriteProps;+ var style = target.style,+ v, pt, pt2, first, last, next, zIndex, tpt, threeD;+ if (_reqSafariFix) if (style.zIndex === "") {+ v = _getStyle(target, "zIndex", _cs);+ if (v === "auto" || v === "") {+ //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive.+ this._addLazySet(style, "zIndex", 0);+ }+ }++ if (typeof(vars) === "string") {+ first = style.cssText;+ v = _getAllStyles(target, _cs);+ style.cssText = first + ";" + vars;+ v = _cssDif(target, v, _getAllStyles(target)).difs;+ if (!_supportsOpacity && _opacityValExp.test(vars)) {+ v.opacity = parseFloat( RegExp.$1 );+ }+ vars = v;+ style.cssText = first;+ }++ if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work.+ this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars);+ } else {+ this._firstPT = pt = this.parse(target, vars, null);+ }++ if (this._transformType) {+ threeD = (this._transformType === 3);+ if (!_transformProp) {+ style.zoom = 1; //helps correct an IE issue.+ } else if (_isSafari) {+ _reqSafariFix = true;+ //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random).+ if (style.zIndex === "") {+ zIndex = _getStyle(target, "zIndex", _cs);+ if (zIndex === "auto" || zIndex === "") {+ this._addLazySet(style, "zIndex", 0);+ }+ }+ //Setting WebkitBackfaceVisibility corrects 3 bugs:+ // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update.+ // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly.+ // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug.+ //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween.+ if (_isSafariLT6) {+ this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden"));+ }+ }+ pt2 = pt;+ while (pt2 && pt2._next) {+ pt2 = pt2._next;+ }+ tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);+ this._linkCSSP(tpt, null, pt2);+ tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio;+ tpt.data = this._transform || _getTransform(target, _cs, true);+ tpt.tween = tween;+ tpt.pr = -1; //ensures that the transforms get applied after the components are updated.+ _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.+ }++ if (_hasPriority) {+ //reorders the linked list in order of pr (priority)+ while (pt) {+ next = pt._next;+ pt2 = first;+ while (pt2 && pt2.pr > pt.pr) {+ pt2 = pt2._next;+ }+ if ((pt._prev = pt2 ? pt2._prev : last)) {+ pt._prev._next = pt;+ } else {+ first = pt;+ }+ if ((pt._next = pt2)) {+ pt2._prev = pt;+ } else {+ last = pt;+ }+ pt = next;+ }+ this._firstPT = first;+ }+ return true;+ };+++ p.parse = function(target, vars, pt, plugin) {+ var style = target.style,+ p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;+ for (p in vars) {+ es = vars[p]; //ending value string+ if (typeof(es) === "function") {+ es = es(_index, _target);+ }+ sp = _specialProps[p]; //SpecialProp lookup.+ if (sp) {+ pt = sp.parse(target, es, p, this, pt, plugin, vars);+ } else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself.+ this._tween._propLookup[p] = this._addTween.call(this._tween, target.style, "setProperty", _getComputedStyle(target).getPropertyValue(p) + "", es + "", p, false, p);+ continue;+ } else {+ bs = _getStyle(target, p, _cs) + "";+ isStr = (typeof(es) === "string");+ if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor:+ if (!isStr) {+ es = _parseColor(es);+ es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")";+ }+ pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);++ } else if (isStr && _complexExp.test(es)) {+ pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);++ } else {+ bn = parseFloat(bs);+ bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case.++ if (bs === "" || bs === "auto") {+ if (p === "width" || p === "height") {+ bn = _getDimension(target, p, _cs);+ bsfx = "px";+ } else if (p === "left" || p === "top") {+ bn = _calculateOffset(target, p, _cs);+ bsfx = "px";+ } else {+ bn = (p !== "opacity") ? 0 : 1;+ bsfx = "";+ }+ }++ rel = (isStr && es.charAt(1) === "=");+ if (rel) {+ en = parseInt(es.charAt(0) + "1", 10);+ es = es.substr(2);+ en *= parseFloat(es);+ esfx = es.replace(_suffixExp, "");+ } else {+ en = parseFloat(es);+ esfx = isStr ? es.replace(_suffixExp, "") : "";+ }++ if (esfx === "") {+ esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix.+ }++ es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.+ //if the beginning/ending suffixes don't match, normalize them...+ if (bsfx !== esfx) if (esfx !== "" || p === "lineHeight") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!+ bn = _convertToPixels(target, p, bn, bsfx);+ if (esfx === "%") {+ bn /= _convertToPixels(target, p, 100, "%") / 100;+ if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens.+ bs = bn + "%";+ }++ } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") {+ bn /= _convertToPixels(target, p, 1, esfx);++ //otherwise convert to pixels.+ } else if (esfx !== "px") {+ en = _convertToPixels(target, p, en, esfx);+ esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too.+ }+ if (rel) if (en || en === 0) {+ es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here.+ }+ }++ if (rel) {+ en += bn;+ }++ if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly.+ pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es);+ pt.xs0 = esfx;+ //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0);+ } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) {+ _log("invalid " + p + " tween value: " + vars[p]);+ } else {+ pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es);+ pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween.+ //DEBUG: _log("non-tweening value "+p+": "+pt.xs0);+ }+ }+ }+ if (plugin) if (pt && !pt.plugin) {+ pt.plugin = plugin;+ }+ }+ return pt;+ };+++ //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.+ p.setRatio = function(v) {+ var pt = this._firstPT,+ min = 0.000001,+ val, str, i;+ //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).+ if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {+ while (pt) {+ if (pt.type !== 2) {+ if (pt.r && pt.type !== -1) {+ val = pt.r(pt.s + pt.c);+ if (!pt.type) {+ pt.t[pt.p] = val + pt.xs0;+ } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"+ i = pt.l;+ str = pt.xs0 + val + pt.xs1;+ for (i = 1; i < pt.l; i++) {+ str += pt["xn"+i] + pt["xs"+(i+1)];+ }+ pt.t[pt.p] = str;+ }+ } else {+ pt.t[pt.p] = pt.e;+ }+ } else {+ pt.setRatio(v);+ }+ pt = pt._next;+ }++ } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) {+ while (pt) {+ val = pt.c * v + pt.s;+ if (pt.r) {+ val = pt.r(val);+ } else if (val < min) if (val > -min) {+ val = 0;+ }+ if (!pt.type) {+ pt.t[pt.p] = val + pt.xs0;+ } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"+ i = pt.l;+ if (i === 2) {+ pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2;+ } else if (i === 3) {+ pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3;+ } else if (i === 4) {+ pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4;+ } else if (i === 5) {+ pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5;+ } else {+ str = pt.xs0 + val + pt.xs1;+ for (i = 1; i < pt.l; i++) {+ str += pt["xn"+i] + pt["xs"+(i+1)];+ }+ pt.t[pt.p] = str;+ }++ } else if (pt.type === -1) { //non-tweening value+ pt.t[pt.p] = pt.xs0;++ } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc.+ pt.setRatio(v);+ }+ pt = pt._next;+ }++ //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever).+ } else {+ while (pt) {+ if (pt.type !== 2) {+ pt.t[pt.p] = pt.b;+ } else {+ pt.setRatio(v);+ }+ pt = pt._next;+ }+ }+ };++ /**+ * @private+ * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called.+ * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked+ * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call+ * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin+ * doesn't have any transform-related properties of its own. You can call this method as many times as you+ * want and it won't create duplicate CSSPropTweens.+ *+ * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)+ */+ p._enableTransforms = function(threeD) {+ this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.+ this._transformType = (!(this._transform.svg && _useSVGTransformAttr) && (threeD || this._transformType === 3)) ? 3 : 2;+ };++ var lazySet = function(v) {+ this.t[this.p] = this.e;+ this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop.+ };+ /** @private Gives us a way to set a value on the first render (and only the first render). **/+ p._addLazySet = function(t, p, v) {+ var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2);+ pt.e = v;+ pt.setRatio = lazySet;+ pt.data = this;+ };++ /** @private **/+ p._linkCSSP = function(pt, next, prev, remove) {+ if (pt) {+ if (next) {+ next._prev = pt;+ }+ if (pt._next) {+ pt._next._prev = pt._prev;+ }+ if (pt._prev) {+ pt._prev._next = pt._next;+ } else if (this._firstPT === pt) {+ this._firstPT = pt._next;+ remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)+ }+ if (prev) {+ prev._next = pt;+ } else if (!remove && this._firstPT === null) {+ this._firstPT = pt;+ }+ pt._next = next;+ pt._prev = prev;+ }+ return pt;+ };++ p._mod = function(lookup) {+ var pt = this._firstPT;+ while (pt) {+ if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally.+ pt.r = lookup[pt.p];+ }+ pt = pt._next;+ }+ };++ //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property.+ p._kill = function(lookup) {+ var copy = lookup,+ pt, p, xfirst;+ if (lookup.autoAlpha || lookup.alpha) {+ copy = {};+ for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere.+ copy[p] = lookup[p];+ }+ copy.opacity = 1;+ if (copy.autoAlpha) {+ copy.visibility = 1;+ }+ }+ if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst".+ xfirst = pt.xfirst;+ if (xfirst && xfirst._prev) {+ this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev+ } else if (xfirst === this._firstPT) {+ this._firstPT = pt._next;+ }+ if (pt._next) {+ this._linkCSSP(pt._next, pt._next._next, xfirst._prev);+ }+ this._classNamePT = null;+ }+ pt = this._firstPT;+ while (pt) {+ if (pt.plugin && pt.plugin !== p && pt.plugin._kill) { //for plugins that are registered with CSSPlugin, we should notify them of the kill.+ pt.plugin._kill(lookup);+ p = pt.plugin;+ }+ pt = pt._next;+ }+ return TweenPlugin.prototype._kill.call(this, copy);+ };++++ //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison.+ var _getChildStyles = function(e, props, targets) {+ var children, i, child, type;+ if (e.slice) {+ i = e.length;+ while (--i > -1) {+ _getChildStyles(e[i], props, targets);+ }+ return;+ }+ children = e.childNodes;+ i = children.length;+ while (--i > -1) {+ child = children[i];+ type = child.type;+ if (child.style) {+ props.push(_getAllStyles(child));+ if (targets) {+ targets.push(child);+ }+ }+ if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) {+ _getChildStyles(child, props, targets);+ }+ }+ };++ /**+ * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite+ * and then compares the style properties of all the target's child elements at the tween's start and end, and+ * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting+ * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is+ * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens+ * is because it creates entirely new tweens that may have completely different targets than the original tween,+ * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API+ * and it would create other problems. For example:+ * - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted)+ * - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others.+ * - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed.+ *+ * @param {Object} target object to be tweened+ * @param {number} Duration in seconds (or frames for frames-based tweens)+ * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone}+ * @return {Array} An array of TweenLite instances+ */+ CSSPlugin.cascadeTo = function(target, duration, vars) {+ var tween = TweenLite.to(target, duration, vars),+ results = [tween],+ b = [],+ e = [],+ targets = [],+ _reservedProps = TweenLite._internals.reservedProps,+ i, difs, p, from;+ target = tween._targets || tween.target;+ _getChildStyles(target, b, targets);+ tween.render(duration, true, true);+ _getChildStyles(target, e);+ tween.render(0, true, true);+ tween._enabled(true);+ i = targets.length;+ while (--i > -1) {+ difs = _cssDif(targets[i], b[i], e[i]);+ if (difs.firstMPT) {+ difs = difs.difs;+ for (p in vars) {+ if (_reservedProps[p]) {+ difs[p] = vars[p];+ }+ }+ from = {};+ for (p in difs) {+ from[p] = b[i][p];+ }+ results.push(TweenLite.fromTo(targets[i], duration, from, difs));+ }+ }+ return results;+ };++ TweenPlugin.activate([CSSPlugin]);+ return CSSPlugin;++ }, true);++export const CSSPlugin = _gsScope.CSSPlugin;+export { CSSPlugin as default };\ No newline at end of filediff --git a/src/esm/CSSRulePlugin.js b/src/esm/CSSRulePlugin.jsnew file mode 100644index 0000000..22b4c37--- /dev/null+++ b/src/esm/CSSRulePlugin.js@@ -0,0 +1,104 @@+/*!+ * VERSION: 0.6.6+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */+import TweenLite, { _gsScope, TweenPlugin } from "./TweenLite";+import CSSPlugin from "./CSSPlugin";++_gsScope._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"], function() {++ /** @constructor **/+ var CSSRulePlugin = function() {+ TweenPlugin.call(this, "cssRule");+ this._overwriteProps.length = 0;+ },+ _doc = _gsScope.document,+ _superSetRatio = CSSPlugin.prototype.setRatio,+ p = CSSRulePlugin.prototype = new CSSPlugin();++ p._propName = "cssRule";+ p.constructor = CSSRulePlugin;+ CSSRulePlugin.version = "0.6.6";+ CSSRulePlugin.API = 2;++ /**+ * Searches the style sheets in the document for a particular selector like ".myClass" or "a" or "a:hover" or ":after" and+ * returns a reference to that style sheet (or an array of them in the case of a pseudo selector like ":after"). Then you+ * can animate the individual properties of the style sheet.+ *+ * @param {!string} selector a string describing the selector, like ".myClass" or "a" or "a:hover" or ":after"+ * @return a reference to the style sheet (or an array of them in the case of a pseudo selector). If none was found, null is returned (or an empty array for a pseudo selector)+ */+ CSSRulePlugin.getRule = function(selector) {+ var ruleProp = _doc.all ? "rules" : "cssRules",+ ss = _doc.styleSheets,+ i = ss.length,+ pseudo = (selector.charAt(0) === ":"),+ j, curSS, cs, a;+ selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ","; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase.+ if (pseudo) {+ a = [];+ }+ while (--i > -1) {+ //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch.+ try {+ curSS = ss[i][ruleProp];+ if (!curSS) {+ continue;+ }+ j = curSS.length;+ } catch (e) {+ console.log(e);+ continue;+ }+ while (--j > -1) {+ cs = curSS[j];+ if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out.+ if (pseudo) {+ a.push(cs.style);+ } else {+ return cs.style;+ }+ }+ }+ }+ return a;+ };+++ // @private gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.+ p._onInitTween = function(target, value, tween) {+ if (target.cssText === undefined) {+ return false;+ }+ var div = target._gsProxy = target._gsProxy || _doc.createElement("div");+ this._ss = target;+ this._proxy = div.style;+ div.style.cssText = target.cssText;+ CSSPlugin.prototype._onInitTween.call(this, div, value, tween); //we just offload all the work to the regular CSSPlugin and then copy the cssText back over to the rule in the setRatio() method. This allows us to have all of the updates to CSSPlugin automatically flow through to CSSRulePlugin instead of having to maintain both+ return true;+ };++++ // @private gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.+ p.setRatio = function(v) {+ _superSetRatio.call(this, v);+ this._ss.cssText = this._proxy.cssText;+ };+++ TweenPlugin.activate([CSSRulePlugin]);+ return CSSRulePlugin;++ }, true);++export const CSSRulePlugin = _gsScope.CSSRulePlugin;+export { CSSRulePlugin as default };\ No newline at end of filediff --git a/src/esm/ColorPropsPlugin.js b/src/esm/ColorPropsPlugin.jsnew file mode 100644index 0000000..e59c764--- /dev/null+++ b/src/esm/ColorPropsPlugin.js@@ -0,0 +1,230 @@+/*!+ * VERSION: 1.5.3+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import { _gsScope } from "./TweenLite";+++ var _numExp = /(\d|\.)+/g,+ _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,+ _colorLookup = {aqua:[0,255,255],+ lime:[0,255,0],+ silver:[192,192,192],+ black:[0,0,0],+ maroon:[128,0,0],+ teal:[0,128,128],+ blue:[0,0,255],+ navy:[0,0,128],+ white:[255,255,255],+ fuchsia:[255,0,255],+ olive:[128,128,0],+ yellow:[255,255,0],+ orange:[255,165,0],+ gray:[128,128,128],+ purple:[128,0,128],+ green:[0,128,0],+ red:[255,0,0],+ pink:[255,192,203],+ cyan:[0,255,255],+ transparent:[255,255,255,0]},+ _hue = function(h, m1, m2) {+ h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;+ return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;+ },+ /**+ * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers).+ * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.+ * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba()+ * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true.+ */+ _parseColor = function(v, toHSL) {+ var a, r, g, b, h, s, l, max, min, d, wasHSL;+ if (!v) {+ a = _colorLookup.black;+ } else if (typeof(v) === "number") {+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else {+ if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.+ v = v.substr(0, v.length - 1);+ }+ if (_colorLookup[v]) {+ a = _colorLookup[v];+ } else if (v.charAt(0) === "#") {+ if (v.length === 4) { //for shorthand like #9F0+ r = v.charAt(1);+ g = v.charAt(2);+ b = v.charAt(3);+ v = "#" + r + r + g + g + b + b;+ }+ v = parseInt(v.substr(1), 16);+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else if (v.substr(0, 3) === "hsl") {+ a = wasHSL = v.match(_numExp);+ if (!toHSL) {+ h = (Number(a[0]) % 360) / 360;+ s = Number(a[1]) / 100;+ l = Number(a[2]) / 100;+ g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;+ r = l * 2 - g;+ if (a.length > 3) {+ a[3] = Number(a[3]);+ }+ a[0] = _hue(h + 1 / 3, r, g);+ a[1] = _hue(h, r, g);+ a[2] = _hue(h - 1 / 3, r, g);+ } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place.+ return v.match(_relNumExp);+ }+ } else {+ a = v.match(_numExp) || _colorLookup.transparent;+ }+ a[0] = Number(a[0]);+ a[1] = Number(a[1]);+ a[2] = Number(a[2]);+ if (a.length > 3) {+ a[3] = Number(a[3]);+ }+ }+ if (toHSL && !wasHSL) {+ r = a[0] / 255;+ g = a[1] / 255;+ b = a[2] / 255;+ max = Math.max(r, g, b);+ min = Math.min(r, g, b);+ l = (max + min) / 2;+ if (max === min) {+ h = s = 0;+ } else {+ d = max - min;+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);+ h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4;+ h *= 60;+ }+ a[0] = (h + 0.5) | 0;+ a[1] = (s * 100 + 0.5) | 0;+ a[2] = (l * 100 + 0.5) | 0;+ }+ return a;+ },+ _formatColors = function(s, toHSL) {+ var colors = (s + "").match(_colorExp) || [],+ charIndex = 0,+ parsed = "",+ i, color, temp;+ if (!colors.length) {+ return s;+ }+ for (i = 0; i < colors.length; i++) {+ color = colors[i];+ temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex);+ charIndex += temp.length + color.length;+ color = _parseColor(color, toHSL);+ if (color.length === 3) {+ color.push(1);+ }+ parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";+ }+ return parsed + s.substr(charIndex);+ }, p, _colorStringFilter,+ TweenLite = (_gsScope.GreenSockGlobals || _gsScope).TweenLite,+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.++ ColorPropsPlugin = _gsScope._gsDefine.plugin({+ propName: "colorProps",+ version: "1.5.3",+ priority: -1,+ API: 2,+ global: true,++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween, index) {+ var p, proxy, pt, val;+ this._target = target;+ this._proxy = proxy = ((value.format + "").toUpperCase() === "NUMBER") ? {} : 0;+ for (p in value) {+ if (p !== "format") {+ if (proxy) {+ this._firstNumPT = pt = {_next:this._firstNumPT, t:target, p:p, f:(typeof(target[p]) === "function")};+ proxy[p] = "rgb(" + _parseColor(!pt.f ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]()).join(",") + ")";+ val = value[p];+ if (typeof(val) === "function") {+ val = val(index, target);+ }+ this._addTween(proxy, p, "get", ((typeof(val) === "number") ? "rgb(" + _parseColor(val, false).join(",") + ")" : val), p, null, null, _colorStringFilter);+ } else {+ this._addTween(target, p, "get", value[p], p, null, null, _colorStringFilter, index);+ }++ }+ }+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(v) {+ var pt = this._firstNumPT,+ val;+ this._super.setRatio.call(this, v);+ while (pt) {+ val = _parseColor(this._proxy[pt.p], false);+ val = val[0] << 16 | val[1] << 8 | val[2];+ if (pt.f) {+ this._target[pt.p](val);+ } else {+ this._target[pt.p] = val;+ }+ pt = pt._next;+ }+ }+ });++ for (p in _colorLookup) {+ _colorExp += "|" + p + "\\b";+ }+ _colorExp = new RegExp(_colorExp+")", "gi");+ ColorPropsPlugin.colorStringFilter = _colorStringFilter = function(a) {+ var combined = a[0] + " " + a[1],+ toHSL;+ _colorExp.lastIndex = 0;+ if (_colorExp.test(combined)) {+ toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);+ a[0] = _formatColors(a[0], toHSL);+ a[1] = _formatColors(a[1], toHSL);+ }+ };++ if (!TweenLite.defaultStringFilter) {+ TweenLite.defaultStringFilter = ColorPropsPlugin.colorStringFilter;+ }++ ColorPropsPlugin.parseColor = _parseColor;+ p = ColorPropsPlugin.prototype;+ p._firstNumPT = null;+ p._kill = function(lookup) {+ var pt = this._firstNumPT,+ prev;+ while (pt) {+ if (pt.p in lookup) {+ if (pt === p._firstNumPT) {+ this._firstNumPT = pt._next;+ }+ if (prev) {+ prev._next = pt._next;+ }+ } else {+ prev = pt;+ }+ pt = pt._next;+ }+ return this._super._kill(lookup);+ };+++export { ColorPropsPlugin, ColorPropsPlugin as default };\ No newline at end of filediff --git a/src/esm/DirectionalRotationPlugin.js b/src/esm/DirectionalRotationPlugin.jsnew file mode 100644index 0000000..5b3e625--- /dev/null+++ b/src/esm/DirectionalRotationPlugin.js@@ -0,0 +1,85 @@+/*!+ * VERSION: 0.3.1+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/++import { _gsScope } from "./TweenLite";++export const DirectionalRotationPlugin = _gsScope._gsDefine.plugin({+ propName: "directionalRotation",+ version: "0.3.1",+ API: 2,++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween, index) {+ if (typeof(value) !== "object") {+ value = {rotation:value};+ }+ this.finals = {};+ var cap = (value.useRadians === true) ? Math.PI * 2 : 360,+ min = 0.000001,+ p, v, start, end, dif, split;+ for (p in value) {+ if (p !== "useRadians") {+ end = value[p];+ if (typeof(end) === "function") {+ end = end(index, target);+ }+ split = (end + "").split("_");+ v = split[0];+ start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );+ end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0;+ dif = end - start;+ if (split.length) {+ v = split.join("_");+ if (v.indexOf("short") !== -1) {+ dif = dif % cap;+ if (dif !== dif % (cap / 2)) {+ dif = (dif < 0) ? dif + cap : dif - cap;+ }+ }+ if (v.indexOf("_cw") !== -1 && dif < 0) {+ dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;+ } else if (v.indexOf("ccw") !== -1 && dif > 0) {+ dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;+ }+ }+ if (dif > min || dif < -min) {+ this._addTween(target, p, start, start + dif, p);+ this._overwriteProps.push(p);+ }+ }+ }+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(ratio) {+ var pt;+ if (ratio !== 1) {+ this._super.setRatio.call(this, ratio);+ } else {+ pt = this._firstPT;+ while (pt) {+ if (pt.f) {+ pt.t[pt.p](this.finals[pt.p]);+ } else {+ pt.t[pt.p] = this.finals[pt.p];+ }+ pt = pt._next;+ }+ }+ }++ });++DirectionalRotationPlugin._autoCSS = true;++export { DirectionalRotationPlugin as default };\ No newline at end of filediff --git a/src/esm/Draggable.js b/src/esm/Draggable.jsnew file mode 100644index 0000000..b7f9376--- /dev/null+++ b/src/esm/Draggable.js@@ -0,0 +1,2476 @@+/*!+ * VERSION: 0.16.3+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import TweenLite, { _gsScope, EventDispatcher } from "./TweenLite";+import CSSPlugin from "./CSSPlugin";++ _gsScope._gsDefine("utils.Draggable", ["events.EventDispatcher","TweenLite","plugins.CSSPlugin"], function() {++ var _tempVarsXY = {css:{}, data:"_draggable"}, //speed optimization - we reuse the same vars object for x/y TweenLite.set() calls to minimize garbage collection tasks and improve performance.+ _tempVarsX = {css:{}, data:"_draggable"},+ _tempVarsY = {css:{}, data:"_draggable"},+ _tempVarsRotation = {css:{}},+ _globals = _gsScope._gsDefine.globals,+ _tempEvent = {}, //for populating with pageX/pageY in old versions of IE+ _dummyElement = {style:{}},+ _doc = _gsScope.document || {createElement: function() {return _dummyElement;}},+ _docElement = _doc.documentElement || {},+ _createElement = function(type) {+ return _doc.createElementNS ? _doc.createElementNS("http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);+ },+ _tempDiv = _createElement("div"),+ _emptyArray = [],+ _emptyFunc = function() { return false; },+ _RAD2DEG = 180 / Math.PI,+ _max = 999999999999999,+ _getTime = Date.now || function() {return new Date().getTime();},+ _isOldIE = !!(!_doc.addEventListener && _doc.all),+ _placeholderDiv = _doc.createElement("div"),+ _renderQueue = [],+ _lookup = {}, //when a Draggable is created, the target gets a unique _gsDragID property that allows gets associated with the Draggable instance for quick lookups in Draggable.get(). This avoids circular references that could cause gc problems.+ _lookupCount = 0,+ _clickableTagExp = /^(?:a|input|textarea|button|select)$/i,+ _dragCount = 0, //total number of elements currently being dragged+ _prefix,+ _isMultiTouching,+ _isAndroid = (_gsScope.navigator && _gsScope.navigator.userAgent.toLowerCase().indexOf("android") !== -1), //Android handles touch events in an odd way and it's virtually impossible to "feature test" so we resort to UA sniffing+ _lastDragTime = 0,+ _temp1 = {}, // a simple object we reuse and populate (usually x/y properties) to conserve memory and improve performance.+ _windowProxy = {}, //memory/performance optimization - we reuse this object during autoScroll to store window-related bounds/offsets.+ _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()+ if (typeof(a) === "string") {+ a = TweenLite.selector(a);+ }+ if (!a || a.nodeType) { //if it's not an array, wrap it in one.+ return [a];+ }+ var b = [],+ l = a.length,+ i;+ for (i = 0; i !== l; b.push(a[i++]));+ return b;+ },+ _copy = function(obj, factor) {+ var copy = {}, p;+ if (factor) {+ for (p in obj) {+ copy[p] = obj[p] * factor;+ }+ } else {+ for (p in obj) {+ copy[p] = obj[p];+ }+ }+ return copy;+ },+ ThrowPropsPlugin,++ _renderQueueTick = function() {+ var i = _renderQueue.length;+ while (--i > -1) {+ _renderQueue[i]();+ }+ },+ _addToRenderQueue = function(func) {+ _renderQueue.push(func);+ if (_renderQueue.length === 1) {+ TweenLite.ticker.addEventListener("tick", _renderQueueTick, this, false, 1);+ }+ },+ _removeFromRenderQueue = function(func) {+ var i = _renderQueue.length;+ while (--i > -1) {+ if (_renderQueue[i] === func) {+ _renderQueue.splice(i, 1);+ }+ }+ TweenLite.to(_renderQueueTimeout, 0, {overwrite:"all", delay:15, onComplete:_renderQueueTimeout, data:"_draggable"}); //remove the "tick" listener only after the render queue is empty for 15 seconds (to improve performance). Adding/removing it constantly for every click/touch wouldn't deliver optimal speed, and we also don't want the ticker to keep calling the render method when things are idle for long periods of time (we want to improve battery life on mobile devices).+ },+ _renderQueueTimeout = function() {+ if (!_renderQueue.length) {+ TweenLite.ticker.removeEventListener("tick", _renderQueueTick);+ }+ },++ _extend = function(obj, defaults) {+ var p;+ for (p in defaults) {+ if (obj[p] === undefined) {+ obj[p] = defaults[p];+ }+ }+ return obj;+ },+ _getDocScrollTop = function() {+ return (window.pageYOffset != null) ? window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : _docElement.scrollTop || _doc.body.scrollTop || 0;+ },+ _getDocScrollLeft = function() {+ return (window.pageXOffset != null) ? window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : _docElement.scrollLeft || _doc.body.scrollLeft || 0;+ },+ _addScrollListener = function(e, callback) {+ _addListener(e, "scroll", callback);+ if (!_isRoot(e.parentNode)) {+ _addScrollListener(e.parentNode, callback);+ }+ },+ _removeScrollListener = function(e, callback) {+ _removeListener(e, "scroll", callback);+ if (!_isRoot(e.parentNode)) {+ _removeScrollListener(e.parentNode, callback);+ }+ },+ _isRoot = function (e) {+ return !!(!e || e === _docElement || e === _doc || e === _doc.body || e === window || !e.nodeType || !e.parentNode);+ },+ _getMaxScroll = function(element, axis) {+ var dim = (axis === "x") ? "Width" : "Height",+ scroll = "scroll" + dim,+ client = "client" + dim,+ body = _doc.body;+ return Math.max(0, _isRoot(element) ? Math.max(_docElement[scroll], body[scroll]) - (window["inner" + dim] || _docElement[client] || body[client]) : element[scroll] - element[client]);+ },+ _recordMaxScrolls = function(e) { //records _gsMaxScrollX and _gsMaxScrollY properties for the element and all ancestors up the chain so that we can cap it, otherwise dragging beyond the edges with autoScroll on can endlessly scroll.+ var isRoot = _isRoot(e),+ x = _getMaxScroll(e, "x"),+ y = _getMaxScroll(e, "y");+ if (isRoot) {+ e = _windowProxy;+ } else {+ _recordMaxScrolls(e.parentNode);+ }+ e._gsMaxScrollX = x;+ e._gsMaxScrollY = y;+ e._gsScrollX = e.scrollLeft || 0;+ e._gsScrollY = e.scrollTop || 0;+ },++ //just used for IE8 and earlier to normalize events and populate pageX/pageY+ _populateIEEvent = function(e, preventDefault) {+ e = e || window.event;+ _tempEvent.pageX = e.clientX + _doc.body.scrollLeft + _docElement.scrollLeft;+ _tempEvent.pageY = e.clientY + _doc.body.scrollTop + _docElement.scrollTop;+ if (preventDefault) {+ e.returnValue = false;+ }+ return _tempEvent;+ },++ //grabs the first element it finds (and we include the window as an element), so if it's selector text, it'll feed that value to TweenLite.selector, if it's a jQuery object or some other selector engine's result, it'll grab the first one, and same for an array. If the value doesn't contain a DOM element, it'll just return null.+ _unwrapElement = function(value) {+ if (!value) {+ return value;+ }+ if (typeof(value) === "string") {+ value = TweenLite.selector(value);+ }+ if (value.length && value !== window && value[0] && value[0].style && !value.nodeType) {+ value = value[0];+ }+ return (value === window || (value.nodeType && value.style)) ? value : null;+ },++ _checkPrefix = function(e, p) {+ var s = e.style,+ capped, i, a;+ if (s[p] === undefined) {+ a = ["O","Moz","ms","Ms","Webkit"];+ i = 5;+ capped = p.charAt(0).toUpperCase() + p.substr(1);+ while (--i > -1 && s[a[i]+capped] === undefined) { }+ if (i < 0) {+ return "";+ }+ _prefix = (i === 3) ? "ms" : a[i];+ p = _prefix + capped;+ }+ return p;+ },++ _setStyle = function(e, p, value) {+ var s = e.style;+ if (!s) {+ return;+ }+ if (s[p] === undefined) {+ p = _checkPrefix(e, p);+ }+ if (value == null) {+ if (s.removeProperty) {+ s.removeProperty(p.replace(/([A-Z])/g, "-$1").toLowerCase());+ } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"+ s.removeAttribute(p);+ }+ } else if (s[p] !== undefined) {+ s[p] = value;+ }+ },++ _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : _emptyFunc,+ _horizExp = /(?:Left|Right|Width)/i,+ _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,+ _convertToPixels = function(t, p, v, sfx, recurse) {+ if (sfx === "px" || !sfx) { return v; }+ if (sfx === "auto" || !v) { return 0; }+ var horiz = _horizExp.test(p),+ node = t,+ style = _tempDiv.style,+ neg = (v < 0),+ pix;+ if (neg) {+ v = -v;+ }+ if (sfx === "%" && p.indexOf("border") !== -1) {+ pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);+ } else {+ style.cssText = "border:0 solid red;position:" + _getStyle(t, "position", true) + ";line-height:0;";+ if (sfx === "%" || !node.appendChild) {+ node = t.parentNode || _doc.body;+ style[(horiz ? "width" : "height")] = v + sfx;+ } else {+ style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;+ }+ node.appendChild(_tempDiv);+ pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);+ node.removeChild(_tempDiv);+ if (pix === 0 && !recurse) {+ pix = _convertToPixels(t, p, v, sfx, true);+ }+ }+ return neg ? -pix : pix;+ },+ _calculateOffset = function(t, p) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop+ if (_getStyle(t, "position", true) !== "absolute") { return 0; }+ var dim = ((p === "left") ? "Left" : "Top"),+ v = _getStyle(t, "margin" + dim, true);+ return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), (v + "").replace(_suffixExp, "")) || 0);+ },++ _getStyle = function(element, prop, keepUnits) {+ var rv = (element._gsTransform || {})[prop],+ cs;+ if (rv || rv === 0) {+ return rv;+ } else if (element.style[prop]) {+ rv = element.style[prop];+ } else if ((cs = _getComputedStyle(element))) {+ rv = cs.getPropertyValue(prop.replace(/([A-Z])/g, "-$1").toLowerCase());+ rv = (rv || cs.length) ? rv : cs[prop]; //Opera behaves VERY strangely - length is usually 0 and cs[prop] is the only way to get accurate results EXCEPT when checking for -o-transform which only works with cs.getPropertyValue()!+ } else if (element.currentStyle) {+ rv = element.currentStyle[prop];+ }+ if (rv === "auto" && (prop === "top" || prop === "left")) {+ rv = _calculateOffset(element, prop);+ }+ return keepUnits ? rv : parseFloat(rv) || 0;+ },++ _dispatchEvent = function(instance, type, callbackName) {+ var vars = instance.vars,+ callback = vars[callbackName],+ listeners = instance._listeners[type];+ if (typeof(callback) === "function") {+ callback.apply(vars[callbackName + "Scope"] || vars.callbackScope || instance, vars[callbackName + "Params"] || [instance.pointerEvent]);+ }+ if (listeners) {+ instance.dispatchEvent(type);+ }+ },+ _getBounds = function(obj, context) { //accepts any of the following: a DOM element, jQuery object, selector text, or an object defining bounds as {top, left, width, height} or {minX, maxX, minY, maxY}. Returns an object with left, top, width, and height properties.+ var e = _unwrapElement(obj),+ top, left, offset;+ if (!e) {+ if (obj.left !== undefined) {+ offset = _getOffsetTransformOrigin(context); //the bounds should be relative to the origin+ return {left: obj.left - offset.x, top: obj.top - offset.y, width: obj.width, height: obj.height};+ }+ left = obj.min || obj.minX || obj.minRotation || 0;+ top = obj.min || obj.minY || 0;+ return {left:left, top:top, width:(obj.max || obj.maxX || obj.maxRotation || 0) - left, height:(obj.max || obj.maxY || 0) - top};+ }+ return _getElementBounds(e, context);+ },++ _svgBorderFactor,+ _svgBorderScales,+ _svgScrollOffset,+ _hasBorderBug,+ _hasReparentBug,//some browsers, like Chrome 49, alter the offsetTop/offsetLeft/offsetParent of elements when a non-identity transform is applied.+ _setEnvironmentVariables = function() { //some browsers factor the border into the SVG coordinate space, some don't (like Firefox). Some apply transforms to them, some don't. We feature-detect here so we know how to handle the border(s). We can't do this immediately - we must wait for the document.body to exist.+ if (!_doc.createElementNS) {+ _svgBorderFactor = 0;+ _svgBorderScales = false;+ return;+ }+ var div = _createElement("div"),+ svg = _doc.createElementNS("http://www.w3.org/2000/svg", "svg"),+ wrapper = _createElement("div"),+ style = div.style,+ parent = _doc.body || _docElement,+ isFlex = (_getStyle(parent, "display", true) === "flex"), //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)+ matrix, e1, point, oldValue;+ if (_doc.body && _transformProp) {+ style.position = "absolute";+ parent.appendChild(wrapper);+ wrapper.appendChild(div);+ oldValue = div.offsetParent;+ wrapper.style[_transformProp] = "rotate(1deg)";+ _hasReparentBug = (div.offsetParent === oldValue);+ wrapper.style.position = "absolute";+ style.height = "10px";+ oldValue = div.offsetTop;+ wrapper.style.border = "5px solid red";+ _hasBorderBug = (oldValue !== div.offsetTop); //some browsers, like Firefox 38, cause the offsetTop/Left to be affected by a parent's border.+ parent.removeChild(wrapper);+ }+ style = svg.style;+ svg.setAttributeNS(null, "width", "400px");+ svg.setAttributeNS(null, "height", "400px");+ svg.setAttributeNS(null, "viewBox", "0 0 400 400");+ style.display = "block";+ style.boxSizing = "border-box";+ style.border = "0px solid red";+ style.transform = "none";+ // in some browsers (like certain flavors of Android), the getScreenCTM() matrix is contaminated by the scroll position. We can run some logic here to detect that condition, but we ended up not needing this because we found another workaround using getBoundingClientRect().+ div.style.cssText = "width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;";+ parent.appendChild(div);+ div.appendChild(svg);+ point = svg.createSVGPoint().matrixTransform(svg.getScreenCTM());+ e1 = point.y;+ div.scrollTop = 100;+ point.x = point.y = 0;+ point = point.matrixTransform(svg.getScreenCTM());+ _svgScrollOffset = (e1 - point.y < 100.1) ? 0 : e1 - point.y - 150;+ div.removeChild(svg);+ parent.removeChild(div);+ // -- end _svgScrollOffset calculation.+ parent.appendChild(svg);+ if (isFlex) {+ parent.style.display = "block"; //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)+ }+ matrix = svg.getScreenCTM();+ e1 = matrix.e;+ style.border = "50px solid red";+ matrix = svg.getScreenCTM();+ if (e1 === 0 && matrix.e === 0 && matrix.f === 0 && matrix.a === 1) { //Opera has a bunch of bugs - it doesn't adjust the x/y of the matrix, nor does it scale when box-sizing is border-box but it does so elsewhere; to get the correct behavior we set _svgBorderScales to true.+ _svgBorderFactor = 1;+ _svgBorderScales = true;+ } else {+ _svgBorderFactor = (e1 !== matrix.e) ? 1 : 0;+ _svgBorderScales = (matrix.a !== 1);+ }+ if (isFlex) {+ parent.style.display = "flex";+ }+ parent.removeChild(svg);+ },++ _supports3D = (_checkPrefix(_tempDiv, "perspective") !== ""),++ // start matrix and point conversion methods...+ _transformOriginProp = _checkPrefix(_tempDiv, "transformOrigin").replace(/^ms/g, "Ms").replace(/([A-Z])/g, "-$1").toLowerCase(),+ _transformProp = _checkPrefix(_tempDiv, "transform"),+ _transformPropCSS = _transformProp.replace(/^ms/g, "Ms").replace(/([A-Z])/g, "-$1").toLowerCase(),+ _point1 = {}, //we reuse _point1 and _point2 objects inside matrix and point conversion methods to conserve memory and minimize garbage collection tasks.+ _point2 = {},+ _SVGElement = _gsScope.SVGElement,+ _isSVG = function(e) {+ return !!(_SVGElement && typeof(e.getBBox) === "function" && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM)));+ },+ _isIE10orBelow = (((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(navigator.userAgent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(navigator.userAgent)) && parseFloat( RegExp.$1 ) < 11), //Ideally we'd avoid user agent sniffing, but there doesn't seem to be a way to feature-detect and sense a border-related bug that only affects IE10 and IE9.+ _tempTransforms = [],+ _tempElements = [],+ _getSVGOffsets = function(e) { //SVG elements don't always report offsetTop/offsetLeft/offsetParent at all (I'm looking at you, Firefox 29 and Android), so we have to do some work to manufacture those values. You can pass any SVG element and it'll spit back an object with offsetTop, offsetLeft, offsetParent, scaleX, and scaleY properties. We need the scaleX and scaleY to handle the way SVG can resize itself based on the container.+ if (!e.getBoundingClientRect || !e.parentNode || !_transformProp) {+ return {offsetTop:0, offsetLeft:0, scaleX:1, scaleY:1, offsetParent:_docElement};+ }+ if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite.ticker.frame) { //performance optimization. Assume that if the offsets are requested again on the same tick, we can just feed back the values we already calculated (no need to keep recalculating until another tick elapses).+ return e._dCache;+ }+ var curElement = e,+ cache = _cache(e),+ eRect, parentRect, offsetParent, cs, m, i, point1, point2, borderWidth, borderHeight, width, height;+ cache.lastUpdate = TweenLite.ticker.frame;+ if (e.getBBox && !cache.isSVGRoot) { //if it's a nested/child SVG element, we must find the parent SVG canvas and measure the offset from there.+ curElement = e.parentNode;+ eRect = e.getBBox();+ while (curElement && (curElement.nodeName + "").toLowerCase() !== "svg") {+ curElement = curElement.parentNode;+ }+ cs = _getSVGOffsets(curElement);+ cache.offsetTop = eRect.y * cs.scaleY;+ cache.offsetLeft = eRect.x * cs.scaleX;+ cache.scaleX = cs.scaleX;+ cache.scaleY = cs.scaleY;+ cache.offsetParent = curElement || _docElement;+ return cache;+ }+ //only root SVG elements continue here...+ offsetParent = cache.offsetParent;+ if (offsetParent === _doc.body) {+ offsetParent = _docElement; //avoids problems with margins/padding on the body+ }+ //walk up the ancestors and record any non-identity transforms (and reset them to "none") until we reach the offsetParent. We must do this so that the getBoundingClientRect() is accurate for measuring the offsetTop/offsetLeft. We'll revert the values later...+ _tempElements.length = _tempTransforms.length = 0;+ while (curElement) {+ m = _getStyle(curElement, _transformProp, true);+ if (m !== "matrix(1, 0, 0, 1, 0, 0)" && m !== "none" && m !== "translate3d(0px, 0px, 0px)") {+ _tempElements.push(curElement);+ _tempTransforms.push(curElement.style[_transformProp]);+ curElement.style[_transformProp] = "none";+ }+ if (curElement === offsetParent) {+ break;+ }+ curElement = curElement.parentNode;+ }+ parentRect = offsetParent.getBoundingClientRect();+ m = e.getScreenCTM();++ point2 = e.createSVGPoint();+ point1 = point2.matrixTransform(m);+ cache.scaleX = Math.sqrt(m.a * m.a + m.b * m.b);+ cache.scaleY = Math.sqrt(m.d * m.d + m.c * m.c);+ if (_svgBorderFactor === undefined) {+ _setEnvironmentVariables();+ }+ if (cache.borderBox && !_svgBorderScales && e.getAttribute("width")) { //some browsers (like Safari) don't properly scale the matrix to accommodate the border when box-sizing is border-box, so we must calculate it here...+ cs = _getComputedStyle(e) || {};+ borderWidth = (parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth)) || 0;+ borderHeight = (parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth)) || 0;+ width = parseFloat(cs.width) || 0;+ height = parseFloat(cs.height) || 0;+ cache.scaleX *= (width - borderWidth) / width;+ cache.scaleY *= (height - borderHeight) / height;+ }+ if (_svgScrollOffset) { //some browsers (like Chrome for Android) have bugs in the way getScreenCTM() is reported (it doesn't factor in scroll position), so we must revert to a more expensive technique for calculating offsetTop/Left.+ eRect = e.getBoundingClientRect();+ cache.offsetLeft = eRect.left - parentRect.left;+ cache.offsetTop = eRect.top - parentRect.top;+ } else {+ cache.offsetLeft = point1.x - parentRect.left;+ cache.offsetTop = point1.y - parentRect.top;+ }+ cache.offsetParent = offsetParent;+ i = _tempElements.length;+ while (--i > -1) {+ _tempElements[i].style[_transformProp] = _tempTransforms[i];+ }+ return cache;+ },+ _getOffsetTransformOrigin = function(e, decoratee) { //returns the x/y position of the transformOrigin of the element, in its own local coordinate system (pixels), offset from the top left corner.+ decoratee = decoratee || {};+ if (!e || e === _docElement || !e.parentNode || e === window) {+ return {x:0, y:0};+ }+ var cs = _getComputedStyle(e),+ v = (_transformOriginProp && cs) ? cs.getPropertyValue(_transformOriginProp) : "50% 50%",+ a = v.split(" "),+ x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],+ y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];+ if (y === "center" || y == null) {+ y = "50%";+ }+ if (x === "center" || isNaN(parseFloat(x))) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.+ x = "50%";+ }+ if (e.getBBox && _isSVG(e)) { //SVG elements must be handled in a special way because their origins are calculated from the top left.+ if (!e._gsTransform) {+ TweenLite.set(e, {x:"+=0", overwrite:false}); //forces creation of the _gsTransform where we store all the transform components including xOrigin and yOrigin for SVG elements, as of GSAP 1.15.0 which also takes care of calculating the origin from the upper left corner of the SVG canvas.+ if (e._gsTransform.xOrigin === undefined) {+ console.log("Draggable requires at least GSAP 1.17.0");+ }+ }+ v = e.getBBox();+ decoratee.x = (e._gsTransform.xOrigin - v.x);+ decoratee.y = (e._gsTransform.yOrigin - v.y);+ } else {+ if (e.getBBox && (x + y).indexOf("%") !== -1) { //Firefox doesn't report offsetWidth/height on <svg> elements.+ e = e.getBBox();+ e = {offsetWidth: e.width, offsetHeight: e.height};+ }+ decoratee.x = ((x.indexOf("%") !== -1) ? e.offsetWidth * parseFloat(x) / 100 : parseFloat(x));+ decoratee.y = ((y.indexOf("%") !== -1) ? e.offsetHeight * parseFloat(y) / 100 : parseFloat(y));+ }+ return decoratee;+ },+ _cache = function(e) { //computes some important values and stores them in a _dCache object attached to the element itself so that we can optimize performance+ if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite.ticker.frame) { //performance optimization. Assume that if the offsets are requested again on the same tick, we can just feed back the values we already calculated (no need to keep recalculating until another tick elapses).+ return e._dCache;+ }+ var cache = e._dCache = e._dCache || {},+ cs = _getComputedStyle(e),+ isSVG = (e.getBBox && _isSVG(e)),+ isSVGRoot = ((e.nodeName + "").toLowerCase() === "svg"),+ curSVG;+ cache.isSVG = isSVG;+ cache.isSVGRoot = isSVGRoot;+ cache.borderBox = (cs.boxSizing === "border-box");+ cache.computedStyle = cs;+ if (isSVGRoot) { //some browsers don't report parentNode on SVG elements.+ curSVG = e.parentNode || _docElement;+ curSVG.insertBefore(_tempDiv, e);+ cache.offsetParent = _tempDiv.offsetParent || _docElement; //in some cases, Firefox still reports offsetParent as null.+ curSVG.removeChild(_tempDiv);+ } else if (isSVG) {+ curSVG = e.parentNode;+ while (curSVG && (curSVG.nodeName + "").toLowerCase() !== "svg") { //offsetParent is always the SVG canvas for SVG elements.+ curSVG = curSVG.parentNode;+ }+ cache.offsetParent = curSVG;+ } else {+ cache.offsetParent = e.offsetParent;+ }+ return cache;+ },+ _getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin, isBase) { //"isBase" helps us discern context - it should only be true when the element is the base one (the one at which we're starting to walk up the chain). It only matters in cases when it's an <svg> element itself because that's a case when we don't apply scaling.+ if (e === window || !e || !e.style || !e.parentNode) {+ return [1,0,0,1,0,0];+ }+ var cache = e._dCache || _cache(e),+ parent = e.parentNode,+ parentCache = parent._dCache || _cache(parent),+ cs = cache.computedStyle,+ parentOffsetParent = cache.isSVG ? parentCache.offsetParent : parent.offsetParent,+ m, isRoot, offsets, rect, t, sx, sy, offsetX, offsetY, parentRect, borderTop, borderLeft, borderTranslateX, borderTranslateY;+ m = (cache.isSVG && (e.style[_transformProp] + "").indexOf("matrix") !== -1) ? e.style[_transformProp] : cs ? cs.getPropertyValue(_transformPropCSS) : e.currentStyle ? e.currentStyle[_transformProp] : "1,0,0,1,0,0"; //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values+ if (e.getBBox && (e.getAttribute("transform") + "").indexOf("matrix") !== -1) { //SVG can store transform data in its "transform" attribute instead of the CSS, so look for that here (only accept matrix()).+ m = e.getAttribute("transform");+ }+ m = (m + "").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g) || [1,0,0,1,0,0];+ if (m.length > 6) {+ m = [m[0], m[1], m[4], m[5], m[12], m[13]];+ }+ if (zeroOrigin) {+ m[4] = m[5] = 0;+ } else if (cache.isSVG && (t = e._gsTransform) && (t.xOrigin || t.yOrigin)) {+ //SVGs handle origin very differently. Factor in GSAP's handling of origin values here:+ m[0] = parseFloat(m[0]);+ m[1] = parseFloat(m[1]);+ m[2] = parseFloat(m[2]);+ m[3] = parseFloat(m[3]);+ m[4] = parseFloat(m[4]) - (t.xOrigin - (t.xOrigin * m[0] + t.yOrigin * m[2]));+ m[5] = parseFloat(m[5]) - (t.yOrigin - (t.xOrigin * m[1] + t.yOrigin * m[3]));+ }+ if (offsetOrigin) {+ if (_svgBorderFactor === undefined) {+ _setEnvironmentVariables();+ }+ offsets = (cache.isSVG || cache.isSVGRoot) ? _getSVGOffsets(e) : e;+ if (cache.isSVG) { //don't just rely on "instanceof _SVGElement" because if the SVG is embedded via an object tag, it won't work (SVGElement is mapped to a different object))+ rect = e.getBBox();+ parentRect = (parentCache.isSVGRoot) ? {x:0, y:0} : parent.getBBox();+ offsets = {offsetLeft:rect.x - parentRect.x, offsetTop:rect.y - parentRect.y, offsetParent:cache.offsetParent};+ } else if (cache.isSVGRoot) {+ borderTop = parseInt(cs.borderTopWidth, 10) || 0;+ borderLeft = parseInt(cs.borderLeftWidth, 10) || 0;+ borderTranslateX = ((m[0] - _svgBorderFactor) * borderLeft + m[2] * borderTop);+ borderTranslateY = (m[1] * borderLeft + (m[3] - _svgBorderFactor) * borderTop);++ sx = offsetOrigin.x;+ sy = offsetOrigin.y;+ offsetX = (sx - (sx * m[0] + sy * m[2])); //accommodate the SVG root's transforms when the origin isn't in the top left.+ offsetY = (sy - (sx * m[1] + sy * m[3]));++ m[4] = parseFloat(m[4]) + offsetX;+ m[5] = parseFloat(m[5]) + offsetY;+ offsetOrigin.x -= offsetX;+ offsetOrigin.y -= offsetY;+ sx = offsets.scaleX;+ sy = offsets.scaleY;+ if (!isBase) { //when getting the matrix for a root <svg> element itself (NOT in the context of an SVG element that's nested inside of it like a <path>), we do NOT apply the scaling!+ offsetOrigin.x *= sx;+ offsetOrigin.y *= sy;+ }+ m[0] *= sx;+ m[1] *= sy;+ m[2] *= sx;+ m[3] *= sy;+ if (!_isIE10orBelow) {+ offsetOrigin.x += borderTranslateX;+ offsetOrigin.y += borderTranslateY;+ }+ if (parentOffsetParent === _doc.body && offsets.offsetParent === _docElement) { //to avoid issues with margin/padding on the <body>, we always set the offsetParent to _docElement in the _getSVGOffsets() function but there's a condition we check later in this function for (parentOffsetParent === offsets.offsetParent) which would fail if we don't run this logic. In other words, parentOffsetParent may be <body> and the <svg>'s offsetParent is also <body> but artificially set to _docElement to avoid margin/padding issues.+ parentOffsetParent = _docElement;+ }+ } else if (!_hasBorderBug && e.offsetParent) {+ offsetOrigin.x += parseInt(_getStyle(e.offsetParent, "borderLeftWidth"), 10) || 0;+ offsetOrigin.y += parseInt(_getStyle(e.offsetParent, "borderTopWidth"), 10) || 0;+ }+ isRoot = (parent === _docElement || parent === _doc.body);+ m[4] = Number(m[4]) + offsetOrigin.x + (offsets.offsetLeft || 0) - parentOffsetOrigin.x - (isRoot ? 0 : parent.scrollLeft || 0);+ m[5] = Number(m[5]) + offsetOrigin.y + (offsets.offsetTop || 0) - parentOffsetOrigin.y - (isRoot ? 0 : parent.scrollTop || 0);+ if (parent && _getStyle(e, "position", cs) === "fixed") { //fixed position elements should factor in the scroll position of the document.+ m[4] += _getDocScrollLeft();+ m[5] += _getDocScrollTop();+ }+ if (parent && parent !== _docElement && parentOffsetParent === offsets.offsetParent && !parentCache.isSVG && (!_hasReparentBug || _getOffset2DMatrix(parent).join("") === "100100")) {+ offsets = (parentCache.isSVGRoot) ? _getSVGOffsets(parent) : parent;+ m[4] -= offsets.offsetLeft || 0;+ m[5] -= offsets.offsetTop || 0;+ if (!_hasBorderBug && parentCache.offsetParent && !cache.isSVG && !cache.isSVGRoot) {+ m[4] -= parseInt(_getStyle(parentCache.offsetParent, "borderLeftWidth"), 10) || 0;+ m[5] -= parseInt(_getStyle(parentCache.offsetParent, "borderTopWidth"), 10) || 0;+ }+ }+ }+ return m;+ },+ _getConcatenatedMatrix = function(e, invert) {+ if (!e || e === window || !e.parentNode) {+ return [1,0,0,1,0,0];+ }+ //note: we keep reusing _point1 and _point2 in order to minimize memory usage and garbage collection chores.+ var originOffset = _getOffsetTransformOrigin(e, _point1),+ parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, _point2),+ m = _getOffset2DMatrix(e, originOffset, parentOriginOffset, false, !invert),+ a, b, c, d, tx, ty, m2, determinant;+ while ((e = e.parentNode) && e.parentNode && e !== _docElement) {+ originOffset = parentOriginOffset;+ parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, (originOffset === _point1) ? _point2 : _point1);+ m2 = _getOffset2DMatrix(e, originOffset, parentOriginOffset);+ a = m[0];+ b = m[1];+ c = m[2];+ d = m[3];+ tx = m[4];+ ty = m[5];+ m[0] = a * m2[0] + b * m2[2];+ m[1] = a * m2[1] + b * m2[3];+ m[2] = c * m2[0] + d * m2[2];+ m[3] = c * m2[1] + d * m2[3];+ m[4] = tx * m2[0] + ty * m2[2] + m2[4];+ m[5] = tx * m2[1] + ty * m2[3] + m2[5];+ }+ if (invert) {+ a = m[0];+ b = m[1];+ c = m[2];+ d = m[3];+ tx = m[4];+ ty = m[5];+ determinant = (a * d - b * c);+ m[0] = d / determinant;+ m[1] = -b / determinant;+ m[2] = -c / determinant;+ m[3] = a / determinant;+ m[4] = (c * ty - d * tx) / determinant;+ m[5] = -(a * ty - b * tx) / determinant;+ }+ return m;+ },+ _localToGlobal = function(e, p, fromTopLeft, decoratee, zeroOrigin) {+ e = _unwrapElement(e);+ var m = _getConcatenatedMatrix(e, false, zeroOrigin),+ x = p.x,+ y = p.y;+ if (fromTopLeft) {+ _getOffsetTransformOrigin(e, p);+ x -= p.x;+ y -= p.y;+ }+ decoratee = (decoratee === true) ? p : decoratee || {};+ decoratee.x = x * m[0] + y * m[2] + m[4];+ decoratee.y = x * m[1] + y * m[3] + m[5];+ return decoratee;+ },+ _localizePoint = function(p, localToGlobal, globalToLocal) {+ var x = p.x * localToGlobal[0] + p.y * localToGlobal[2] + localToGlobal[4],+ y = p.x * localToGlobal[1] + p.y * localToGlobal[3] + localToGlobal[5];+ p.x = x * globalToLocal[0] + y * globalToLocal[2] + globalToLocal[4];+ p.y = x * globalToLocal[1] + y * globalToLocal[3] + globalToLocal[5];+ return p;+ },++ _getElementBounds = function(e, context, fromTopLeft) {+ if (!(e = _unwrapElement(e))) {+ return null;+ }+ context = _unwrapElement(context);+ var isSVG = (e.getBBox && _isSVG(e)),+ origin, left, right, top, bottom, mLocalToGlobal, mGlobalToLocal, p1, p2, p3, p4, bbox, width, height, cache, borderLeft, borderTop, viewBox, viewBoxX, viewBoxY, computedDimensions, cs;+ if (e === window) {+ top = _getDocScrollTop();+ left = _getDocScrollLeft();+ right = left + (_docElement.clientWidth || e.innerWidth || _doc.body.clientWidth || 0);+ bottom = top + (((e.innerHeight || 0) - 20 < _docElement.clientHeight) ? _docElement.clientHeight : e.innerHeight || _doc.body.clientHeight || 0); //some browsers (like Firefox) ignore absolutely positioned elements, and collapse the height of the documentElement, so it could be 8px, for example, if you have just an absolutely positioned div. In that case, we use the innerHeight to resolve this.+ } else if (context === undefined || context === window) {+ return e.getBoundingClientRect();+ } else {+ origin = _getOffsetTransformOrigin(e);+ left = -origin.x;+ top = -origin.y;+ if (isSVG) {+ bbox = e.getBBox();+ width = bbox.width;+ height = bbox.height;+ } else if ((e.nodeName + "").toLowerCase() !== "svg" && e.offsetWidth) { //Chrome dropped support for "offsetWidth" on SVG elements+ width = e.offsetWidth;+ height = e.offsetHeight;+ } else {+ computedDimensions = _getComputedStyle(e);+ width = parseFloat(computedDimensions.width);+ height = parseFloat(computedDimensions.height);+ }+ right = left + width;+ bottom = top + height;+ if (e.nodeName.toLowerCase() === "svg" && !_isOldIE) { //root SVG elements are a special beast because they have 2 types of scaling - transforms on themselves as well as the stretching of the SVG canvas itself based on the outer size and the viewBox. If, for example, the SVG's viewbox is "0 0 100 100" but the CSS is set to width:200px; height:200px, that'd make it appear at 2x scale even though the element itself has no CSS transforms but the offsetWidth/offsetHeight are based on that css, not the viewBox so we need to adjust them accordingly.+ cache = _getSVGOffsets(e);+ cs = cache.computedStyle || {};+ viewBox = (e.getAttribute("viewBox") || "0 0").split(" ");+ viewBoxX = parseFloat(viewBox[0]);+ viewBoxY = parseFloat(viewBox[1]);+ borderLeft = parseFloat(cs.borderLeftWidth) || 0;+ borderTop = parseFloat(cs.borderTopWidth) || 0;+ right -= width - ((width - borderLeft) / cache.scaleX) - viewBoxX;+ bottom -= height - ((height - borderTop) / cache.scaleY) - viewBoxY;+ left -= borderLeft / cache.scaleX - viewBoxX;+ top -= borderTop / cache.scaleY - viewBoxY;+ if (computedDimensions) { //when we had to use computed styles, factor in the border now.+ right += (parseFloat(cs.borderRightWidth) + borderLeft) / cache.scaleX;+ bottom += (borderTop + parseFloat(cs.borderBottomWidth)) / cache.scaleY;+ }+ }+ }+ if (e === context) {+ return {left:left, top:top, width: right - left, height: bottom - top};+ }+ mLocalToGlobal = _getConcatenatedMatrix(e);+ mGlobalToLocal = _getConcatenatedMatrix(context, true);+ p1 = _localizePoint({x:left, y:top}, mLocalToGlobal, mGlobalToLocal);+ p2 = _localizePoint({x:right, y:top}, mLocalToGlobal, mGlobalToLocal);+ p3 = _localizePoint({x:right, y:bottom}, mLocalToGlobal, mGlobalToLocal);+ p4 = _localizePoint({x:left, y:bottom}, mLocalToGlobal, mGlobalToLocal);+ left = Math.min(p1.x, p2.x, p3.x, p4.x);+ top = Math.min(p1.y, p2.y, p3.y, p4.y);+ _temp1.x = _temp1.y = 0;+ if (fromTopLeft) {+ _getOffsetTransformOrigin(context, _temp1);+ }+ return {left:left + _temp1.x, top:top + _temp1.y, width:Math.max(p1.x, p2.x, p3.x, p4.x) - left, height:Math.max(p1.y, p2.y, p3.y, p4.y) - top};+ },+ // end matrix and point conversion methods++++ _isArrayLike = function(e) {+ return (e && e.length && e[0] && ((e[0].nodeType && e[0].style && !e.nodeType) || (e[0].length && e[0][0]))) ? true : false; //could be an array of jQuery objects too, so accommodate that.+ },++ _flattenArray = function(a) {+ var result = [],+ l = a.length,+ i, e, j;+ for (i = 0; i < l; i++) {+ e = a[i];+ if (_isArrayLike(e)) {+ j = e.length;+ for (j = 0; j < e.length; j++) {+ result.push(e[j]);+ }+ } else if (e && e.length !== 0) {+ result.push(e);+ }+ }+ return result;+ },++ _isTouchDevice = (("ontouchstart" in _docElement) && ("orientation" in window)),+ _touchEventLookup = (function(types) { //we create an object that makes it easy to translate touch event types into their "pointer" counterparts if we're in a browser that uses those instead. Like IE10 uses "MSPointerDown" instead of "touchstart", for example.+ var standard = types.split(","),+ converted = ((_tempDiv.onpointerdown !== undefined) ? "pointerdown,pointermove,pointerup,pointercancel" : (_tempDiv.onmspointerdown !== undefined) ? "MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel" : types).split(","),+ obj = {},+ i = 4;+ while (--i > -1) {+ obj[standard[i]] = converted[i];+ obj[converted[i]] = standard[i];+ }+ return obj;+ }("touchstart,touchmove,touchend,touchcancel")),++ _addListener = function(element, type, func, capture) {+ if (element.addEventListener) {+ var touchType = _touchEventLookup[type];+ capture = capture || {passive:false};+ element.addEventListener(touchType || type, func, capture);+ if (touchType && type !== touchType) { //some browsers actually support both, so must we.+ element.addEventListener(type, func, capture);+ }+ } else if (element.attachEvent) {+ element.attachEvent("on" + type, func);+ }+ },++ _removeListener = function(element, type, func) {+ if (element.removeEventListener) {+ var touchType = _touchEventLookup[type];+ element.removeEventListener(touchType || type, func);+ if (touchType && type !== touchType) {+ element.removeEventListener(type, func);+ }+ } else if (element.detachEvent) {+ element.detachEvent("on" + type, func);+ }+ },++ _hasTouchID = function(list, ID) {+ var i = list.length;+ while (--i > -1) {+ if (list[i].identifier === ID) {+ return true;+ }+ }+ return false;+ },++ _onMultiTouchDocumentEnd = function(e) {+ _isMultiTouching = (e.touches && _dragCount < e.touches.length);+ _removeListener(e.target, "touchend", _onMultiTouchDocumentEnd);+ },++ _onMultiTouchDocument = function(e) {+ _isMultiTouching = (e.touches && _dragCount < e.touches.length);+ _addListener(e.target, "touchend", _onMultiTouchDocumentEnd);+ },++ _parseThrowProps = function(draggable, snap, max, min, factor, forceZeroVelocity) {+ var vars = {},+ a, i, l;+ if (snap) {+ if (factor !== 1 && snap instanceof Array) { //some data must be altered to make sense, like if the user passes in an array of rotational values in degrees, we must convert it to radians. Or for scrollLeft and scrollTop, we invert the values.+ vars.end = a = [];+ l = snap.length;+ if (typeof(snap[0]) === "object") { //if the array is populated with objects, like points ({x:100, y:200}), make copies before multiplying by the factor, otherwise we'll mess up the originals and the user may reuse it elsewhere.+ for (i = 0; i < l; i++) {+ a[i] = _copy(snap[i], factor);+ }+ } else {+ for (i = 0; i < l; i++) {+ a[i] = snap[i] * factor;+ }+ }+ max += 1.1; //allow 1.1 pixels of wiggle room when snapping in order to work around some browser inconsistencies in the way bounds are reported which can make them roughly a pixel off. For example, if "snap:[-$('#menu').width(), 0]" was defined and #menu had a wrapper that was used as the bounds, some browsers would be one pixel off, making the minimum -752 for example when snap was [-753,0], thus instead of snapping to -753, it would snap to 0 since -753 was below the minimum.+ min -= 1.1;+ } else if (typeof(snap) === "function") {+ vars.end = function(value) {+ var result = snap.call(draggable, value),+ copy, p;+ if (factor !== 1) {+ if (typeof(result) === "object") {+ copy = {};+ for (p in result) {+ copy[p] = result[p] * factor;+ }+ result = copy;+ } else {+ result *= factor;+ }+ }+ return result; //we need to ensure that we can scope the function call to the Draggable instance itself so that users can access important values like maxX, minX, maxY, minY, x, and y from within that function.+ };+ } else {+ vars.end = snap;+ }+ }+ if (max || max === 0) {+ vars.max = max;+ }+ if (min || min === 0) {+ vars.min = min;+ }+ if (forceZeroVelocity) {+ vars.velocity = 0;+ }+ return vars;+ },++ _isClickable = function(e) { //sometimes it's convenient to mark an element as clickable by adding a data-clickable="true" attribute (in which case we won't preventDefault() the mouse/touch event). This method checks if the element is an <a>, <input>, or <button> or has an onclick or has the data-clickable or contentEditable attribute set to true (or any of its parent elements).+ var data;+ return (!e || !e.getAttribute || e.nodeName === "BODY") ? false : ((data = e.getAttribute("data-clickable")) === "true" || (data !== "false" && (e.onclick || _clickableTagExp.test(e.nodeName + "") || e.getAttribute("contentEditable") === "true"))) ? true : _isClickable(e.parentNode);+ },++ _setSelectable = function(elements, selectable) {+ var i = elements.length,+ e;+ while (--i > -1) {+ e = elements[i];+ e.ondragstart = e.onselectstart = selectable ? null : _emptyFunc;+ _setStyle(e, "userSelect", (selectable ? "text" : "none"));+ }+ },++ _addPaddingBR = (function() { //this function is in charge of analyzing browser behavior related to padding. It sets the _addPaddingBR to true if the browser doesn't normally factor in the bottom or right padding on the element inside the scrolling area, and it sets _addPaddingLeft to true if it's a browser that requires the extra offset (offsetLeft) to be added to the paddingRight (like Opera).+ var div = _doc.createElement("div"),+ child = _doc.createElement("div"),+ childStyle = child.style,+ parent = _doc.body || _tempDiv,+ val;+ childStyle.display = "inline-block";+ childStyle.position = "relative";+ div.style.cssText = child.innerHTML = "width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden";+ div.appendChild(child);+ parent.appendChild(div);+ val = (child.offsetHeight + 18 > div.scrollHeight); //div.scrollHeight should be child.offsetHeight + 20 because of the 10px of padding on each side, but some browsers ignore one side. We allow a 2px margin of error.+ parent.removeChild(div);+ return val;+ }()),+++++ //The ScrollProxy class wraps an element's contents into another div (we call it "content") that we either add padding when necessary or apply a translate3d() transform in order to overscroll (scroll past the boundaries). This allows us to simply set the scrollTop/scrollLeft (or top/left for easier reverse-axis orientation, which is what we do in Draggable) and it'll do all the work for us. For example, if we tried setting scrollTop to -100 on a normal DOM element, it wouldn't work - it'd look the same as setting it to 0, but if we set scrollTop of a ScrollProxy to -100, it'll give the correct appearance by either setting paddingTop of the wrapper to 100 or applying a 100-pixel translateY.+ ScrollProxy = function(element, vars) {+ element = _unwrapElement(element);+ vars = vars || {};+ var content = _doc.createElement("div"),+ style = content.style,+ node = element.firstChild,+ offsetTop = 0,+ offsetLeft = 0,+ prevTop = element.scrollTop,+ prevLeft = element.scrollLeft,+ scrollWidth = element.scrollWidth,+ scrollHeight = element.scrollHeight,+ extraPadRight = 0,+ maxLeft = 0,+ maxTop = 0,+ elementWidth, elementHeight, contentHeight, nextNode, transformStart, transformEnd;++ if (_supports3D && vars.force3D !== false) {+ transformStart = "translate3d(";+ transformEnd = "px,0px)";+ } else if (_transformProp) {+ transformStart = "translate(";+ transformEnd = "px)";+ }++ this.scrollTop = function(value, force) {+ if (!arguments.length) {+ return -this.top();+ }+ this.top(-value, force);+ };++ this.scrollLeft = function(value, force) {+ if (!arguments.length) {+ return -this.left();+ }+ this.left(-value, force);+ };++ this.left = function(value, force) {+ if (!arguments.length) {+ return -(element.scrollLeft + offsetLeft);+ }+ var dif = element.scrollLeft - prevLeft,+ oldOffset = offsetLeft;+ if ((dif > 2 || dif < -2) && !force) { //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy.+ prevLeft = element.scrollLeft;+ TweenLite.killTweensOf(this, true, {left:1, scrollLeft:1});+ this.left(-prevLeft);+ if (vars.onKill) {+ vars.onKill();+ }+ return;+ }+ value = -value; //invert because scrolling works in the opposite direction+ if (value < 0) {+ offsetLeft = (value - 0.5) | 0;+ value = 0;+ } else if (value > maxLeft) {+ offsetLeft = (value - maxLeft) | 0;+ value = maxLeft;+ } else {+ offsetLeft = 0;+ }+ if (offsetLeft || oldOffset) {+ if (transformStart) {+ if (!this._suspendTransforms) {+ style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;+ }+ } else {+ style.left = -offsetLeft + "px";+ }+ if (offsetLeft + extraPadRight >= 0) {+ style.paddingRight = offsetLeft + extraPadRight + "px";+ }+ }+ element.scrollLeft = value | 0;+ prevLeft = element.scrollLeft; //don't merge this with the line above because some browsers adjsut the scrollLeft after it's set, so in order to be 100% accurate in tracking it, we need to ask the browser to report it.+ };++ this.top = function(value, force) {+ if (!arguments.length) {+ return -(element.scrollTop + offsetTop);+ }+ var dif = element.scrollTop - prevTop,+ oldOffset = offsetTop;+ if ((dif > 2 || dif < -2) && !force) { //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy.+ prevTop = element.scrollTop;+ TweenLite.killTweensOf(this, true, {top:1, scrollTop:1});+ this.top(-prevTop);+ if (vars.onKill) {+ vars.onKill();+ }+ return;+ }+ value = -value; //invert because scrolling works in the opposite direction+ if (value < 0) {+ offsetTop = (value - 0.5) | 0;+ value = 0;+ } else if (value > maxTop) {+ offsetTop = (value - maxTop) | 0;+ value = maxTop;+ } else {+ offsetTop = 0;+ }+ if (offsetTop || oldOffset) {+ if (transformStart) {+ if (!this._suspendTransforms) {+ style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;+ }+ } else {+ style.top = -offsetTop + "px";+ }+ }+ element.scrollTop = value | 0;+ prevTop = element.scrollTop;+ };++ this.maxScrollTop = function() {+ return maxTop;+ };++ this.maxScrollLeft = function() {+ return maxLeft;+ };++ this.disable = function() {+ node = content.firstChild;+ while (node) {+ nextNode = node.nextSibling;+ element.appendChild(node);+ node = nextNode;+ }+ if (element === content.parentNode) { //in case disable() is called when it's already disabled.+ element.removeChild(content);+ }+ };++ this.enable = function() {+ node = element.firstChild;+ if (node === content) {+ return;+ }+ while (node) {+ nextNode = node.nextSibling;+ content.appendChild(node);+ node = nextNode;+ }+ element.appendChild(content);+ this.calibrate();+ };++ this.calibrate = function(force) {+ var widthMatches = (element.clientWidth === elementWidth),+ x, y;+ prevTop = element.scrollTop;+ prevLeft = element.scrollLeft;+ if (widthMatches && element.clientHeight === elementHeight && content.offsetHeight === contentHeight && scrollWidth === element.scrollWidth && scrollHeight === element.scrollHeight && !force) {+ return; //no need to recalculate things if the width and height haven't changed.+ }+ if (offsetTop || offsetLeft) {+ x = this.left();+ y = this.top();+ this.left(-element.scrollLeft);+ this.top(-element.scrollTop);+ }+ //first, we need to remove any width constraints to see how the content naturally flows so that we can see if it's wider than the containing element. If so, we've got to record the amount of overage so that we can apply that as padding in order for browsers to correctly handle things. Then we switch back to a width of 100% (without that, some browsers don't flow the content correctly)+ if (!widthMatches || force) {+ style.display = "block";+ style.width = "auto";+ style.paddingRight = "0px";+ extraPadRight = Math.max(0, element.scrollWidth - element.clientWidth);+ //if the content is wider than the container, we need to add the paddingLeft and paddingRight in order for things to behave correctly.+ if (extraPadRight) {+ extraPadRight += _getStyle(element, "paddingLeft") + (_addPaddingBR ? _getStyle(element, "paddingRight") : 0);+ }+ }+ style.display = "inline-block";+ style.position = "relative";+ style.overflow = "visible";+ style.verticalAlign = "top";+ style.width = "100%";+ style.paddingRight = extraPadRight + "px";+ //some browsers neglect to factor in the bottom padding when calculating the scrollHeight, so we need to add that padding to the content when that happens. Allow a 2px margin for error+ if (_addPaddingBR) {+ style.paddingBottom = _getStyle(element, "paddingBottom", true);+ }+ if (_isOldIE) {+ style.zoom = "1";+ }+ elementWidth = element.clientWidth;+ elementHeight = element.clientHeight;+ scrollWidth = element.scrollWidth;+ scrollHeight = element.scrollHeight;+ maxLeft = element.scrollWidth - elementWidth;+ maxTop = element.scrollHeight - elementHeight;+ contentHeight = content.offsetHeight;+ style.display = "block";+ if (x || y) {+ this.left(x);+ this.top(y);+ }+ };++ this.content = content;+ this.element = element;+ this._suspendTransforms = false;+ this.enable();+ },++++++ Draggable = function(target, vars) {+ EventDispatcher.call(this, target);+ target = _unwrapElement(target); //in case the target is a selector object or selector text+ if (!ThrowPropsPlugin) {+ ThrowPropsPlugin = _globals.com.greensock.plugins.ThrowPropsPlugin;+ }+ this.vars = vars = _copy(vars || {});+ this.target = target;+ this.x = this.y = this.rotation = 0;+ this.dragResistance = parseFloat(vars.dragResistance) || 0;+ this.edgeResistance = isNaN(vars.edgeResistance) ? 1 : parseFloat(vars.edgeResistance) || 0;+ this.lockAxis = vars.lockAxis;+ this.autoScroll = vars.autoScroll || 0;+ this.lockedAxis = null;+ this.allowEventDefault = !!vars.allowEventDefault;+ var type = (vars.type || (_isOldIE ? "top,left" : "x,y")).toLowerCase(),+ xyMode = (type.indexOf("x") !== -1 || type.indexOf("y") !== -1),+ rotationMode = (type.indexOf("rotation") !== -1),+ xProp = rotationMode ? "rotation" : xyMode ? "x" : "left",+ yProp = xyMode ? "y" : "top",+ allowX = (type.indexOf("x") !== -1 || type.indexOf("left") !== -1 || type === "scroll"),+ allowY = (type.indexOf("y") !== -1 || type.indexOf("top") !== -1 || type === "scroll"),+ minimumMovement = vars.minimumMovement || 2,+ self = this,+ triggers = _slice(vars.trigger || vars.handle || target),+ killProps = {},+ dragEndTime = 0,+ checkAutoScrollBounds = false,+ autoScrollMarginTop = vars.autoScrollMarginTop || 40,+ autoScrollMarginRight = vars.autoScrollMarginRight || 40,+ autoScrollMarginBottom = vars.autoScrollMarginBottom || 40,+ autoScrollMarginLeft = vars.autoScrollMarginLeft || 40,+ isClickable = vars.clickableTest || _isClickable,+ clickTime = 0,+ enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, snapXY, isClicking, touchEventTarget, matrix, interrupted, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch, trustedClickDispatch,++ onContextMenu = function(e) { //used to prevent long-touch from triggering a context menu.+ if (self.isPressed && e.which < 2) {+ self.endDrag();+ } else {+ e.preventDefault();+ e.stopPropagation();+ return false;+ }+ },++ //this method gets called on every tick of TweenLite.ticker which allows us to synchronize the renders to the core engine (which is typically synchronized with the display refresh via requestAnimationFrame). This is an optimization - it's better than applying the values inside the "mousemove" or "touchmove" event handler which may get called many times inbetween refreshes.+ render = function(suppressEvents) {+ if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) {+ var e = target,+ autoScrollFactor = self.autoScroll * 15, //multiplying by 15 just gives us a better "feel" speed-wise.+ parent, isRoot, rect, pointerX, pointerY, changeX, changeY, gap;+ checkAutoScrollBounds = false;+ _windowProxy.scrollTop = ((window.pageYOffset != null) ? window.pageYOffset : (_docElement.scrollTop != null) ? _docElement.scrollTop : _doc.body.scrollTop);+ _windowProxy.scrollLeft = ((window.pageXOffset != null) ? window.pageXOffset : (_docElement.scrollLeft != null) ? _docElement.scrollLeft : _doc.body.scrollLeft);+ pointerX = self.pointerX - _windowProxy.scrollLeft;+ pointerY = self.pointerY - _windowProxy.scrollTop;+ while (e && !isRoot) { //walk up the chain and sense wherever the pointer is within 40px of an edge that's scrollable.+ isRoot = _isRoot(e.parentNode);+ parent = isRoot ? _windowProxy : e.parentNode;+ rect = isRoot ? {bottom:Math.max(_docElement.clientHeight, window.innerHeight || 0), right: Math.max(_docElement.clientWidth, window.innerWidth || 0), left:0, top:0} : parent.getBoundingClientRect();+ changeX = changeY = 0;+ if (allowY) {+ gap = parent._gsMaxScrollY - parent.scrollTop;+ if (gap < 0) {+ changeY = gap;+ } else if (pointerY > rect.bottom - autoScrollMarginBottom && gap) {+ checkAutoScrollBounds = true;+ changeY = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.bottom - pointerY)) / autoScrollMarginBottom)) | 0);+ } else if (pointerY < rect.top + autoScrollMarginTop && parent.scrollTop) {+ checkAutoScrollBounds = true;+ changeY = -Math.min(parent.scrollTop, (autoScrollFactor * (1 - Math.max(0, (pointerY - rect.top)) / autoScrollMarginTop)) | 0);+ }+ if (changeY) {+ parent.scrollTop += changeY;+ }+ }+ if (allowX) {+ gap = parent._gsMaxScrollX - parent.scrollLeft;+ if (gap < 0) {+ changeX = gap;+ } else if (pointerX > rect.right - autoScrollMarginRight && gap) {+ checkAutoScrollBounds = true;+ changeX = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.right - pointerX)) / autoScrollMarginRight)) | 0);+ } else if (pointerX < rect.left + autoScrollMarginLeft && parent.scrollLeft) {+ checkAutoScrollBounds = true;+ changeX = -Math.min(parent.scrollLeft, (autoScrollFactor * (1 - Math.max(0, (pointerX - rect.left)) / autoScrollMarginLeft)) | 0);+ }+ if (changeX) {+ parent.scrollLeft += changeX;+ }+ }++ if (isRoot && (changeX || changeY)) {+ window.scrollTo(parent.scrollLeft, parent.scrollTop);+ setPointerPosition(self.pointerX + changeX, self.pointerY + changeY);+ }+ e = parent;+ }+ }+ if (dirty) {+ var x = self.x,+ y = self.y,+ min = 0.000001;+ if (x < min && x > -min) { //browsers don't handle super small decimals well.+ x = 0;+ }+ if (y < min && y > -min) {+ y = 0;+ }+ if (rotationMode) {+ self.deltaX = x - applyObj.data.rotation;+ applyObj.data.rotation = self.rotation = x;+ applyObj.setRatio(1); //note: instead of doing TweenLite.set(), as a performance optimization we skip right to the method that renders the transforms inside CSSPlugin. For old versions of IE, though, we do a normal TweenLite.set() to leverage its ability to re-reroute to an IE-specific 2D renderer.+ } else {+ if (scrollProxy) {+ if (allowY) {+ self.deltaY = y - scrollProxy.top();+ scrollProxy.top(y);+ }+ if (allowX) {+ self.deltaX = x - scrollProxy.left();+ scrollProxy.left(x);+ }+ } else if (xyMode) {+ if (allowY) {+ self.deltaY = y - applyObj.data.y;+ applyObj.data.y = y;+ }+ if (allowX) {+ self.deltaX = x - applyObj.data.x;+ applyObj.data.x = x;+ }+ applyObj.setRatio(1); //note: instead of doing TweenLite.set(), as a performance optimization we skip right to the method that renders the transforms inside CSSPlugin. For old versions of IE, though, we do a normal TweenLite.set() to leverage its ability to re-reroute to an IE-specific 2D renderer.+ } else {+ if (allowY) {+ self.deltaY = y - parseFloat(target.style.top || 0);+ target.style.top = y + "px";+ }+ if (allowX) {+ self.deltaY = x - parseFloat(target.style.left || 0);+ target.style.left = x + "px";+ }+ }+ }+ if (hasDragCallback && !suppressEvents && !isDispatching) {+ isDispatching = true; //in case onDrag has an update() call (avoid endless loop)+ _dispatchEvent(self, "drag", "onDrag");+ isDispatching = false;+ }+ }+ dirty = false;+ },++ //copies the x/y from the element (whether that be transforms, top/left, or ScrollProxy's top/left) to the Draggable's x and y (and rotation if necessary) properties so that they reflect reality and it also (optionally) applies any snapping necessary. This is used by the ThrowPropsPlugin tween in an onUpdate to ensure things are synced and snapped.+ syncXY = function(skipOnUpdate, skipSnap) {+ var x = self.x,+ y = self.y,+ snappedValue;+ if (!target._gsTransform && (xyMode || rotationMode)) { //just in case the _gsTransform got wiped, like if the user called clearProps on the transform or something (very rare), doing an x tween forces a re-parsing of the transforms and population of the _gsTransform.+ TweenLite.set(target, {x:"+=0", overwrite:false, data:"_draggable"});+ }+ if (xyMode) {+ self.y = target._gsTransform.y;+ self.x = target._gsTransform.x;+ } else if (rotationMode) {+ self.x = self.rotation = target._gsTransform.rotation;+ } else if (scrollProxy) {+ self.y = scrollProxy.top();+ self.x = scrollProxy.left();+ } else {+ self.y = parseInt(target.style.top, 10) || 0;+ self.x = parseInt(target.style.left, 10) || 0;+ }+ if ((snapX || snapY || snapXY) && !skipSnap && (self.isDragging || self.isThrowing)) {+ if (snapXY) {+ _temp1.x = self.x;+ _temp1.y = self.y;+ snappedValue = snapXY(_temp1);+ if (snappedValue.x !== self.x) {+ self.x = snappedValue.x;+ dirty = true;+ }+ if (snappedValue.y !== self.y) {+ self.y = snappedValue.y;+ dirty = true;+ }+ }+ if (snapX) {+ snappedValue = snapX(self.x);+ if (snappedValue !== self.x) {+ self.x = snappedValue;+ if (rotationMode) {+ self.rotation = snappedValue;+ }+ dirty = true;+ }+ }+ if (snapY) {+ snappedValue = snapY(self.y);+ if (snappedValue !== self.y) {+ self.y = snappedValue;+ }+ dirty = true;+ }+ }+ if (dirty) {+ render(true);+ }+ if (!skipOnUpdate) {+ self.deltaX = self.x - x;+ self.deltaY = self.y - y;+ _dispatchEvent(self, "throwupdate", "onThrowUpdate");+ }+ },++ calculateBounds = function() {+ var bounds, targetBounds, snap, snapIsRaw;+ hasBounds = false;+ if (scrollProxy) {+ scrollProxy.calibrate();+ self.minX = minX = -scrollProxy.maxScrollLeft();+ self.minY = minY = -scrollProxy.maxScrollTop();+ self.maxX = maxX = self.maxY = maxY = 0;+ hasBounds = true;+ } else if (!!vars.bounds) {+ bounds = _getBounds(vars.bounds, target.parentNode); //could be a selector/jQuery object or a DOM element or a generic object like {top:0, left:100, width:1000, height:800} or {minX:100, maxX:1100, minY:0, maxY:800}+ if (rotationMode) {+ self.minX = minX = bounds.left;+ self.maxX = maxX = bounds.left + bounds.width;+ self.minY = minY = self.maxY = maxY = 0;+ } else if (vars.bounds.maxX !== undefined || vars.bounds.maxY !== undefined) {+ bounds = vars.bounds;+ self.minX = minX = bounds.minX;+ self.minY = minY = bounds.minY;+ self.maxX = maxX = bounds.maxX;+ self.maxY = maxY = bounds.maxY;+ } else {+ targetBounds = _getBounds(target, target.parentNode);+ self.minX = minX = _getStyle(target, xProp) + bounds.left - targetBounds.left;+ self.minY = minY = _getStyle(target, yProp) + bounds.top - targetBounds.top;+ self.maxX = maxX = minX + (bounds.width - targetBounds.width);+ self.maxY = maxY = minY + (bounds.height - targetBounds.height);+ }+ if (minX > maxX) {+ self.minX = maxX;+ self.maxX = maxX = minX;+ minX = self.minX;+ }+ if (minY > maxY) {+ self.minY = maxY;+ self.maxY = maxY = minY;+ minY = self.minY;+ }+ if (rotationMode) {+ self.minRotation = minX;+ self.maxRotation = maxX;+ }+ hasBounds = true;+ }+ if (vars.liveSnap) {+ snap = (vars.liveSnap === true) ? (vars.snap || {}) : vars.liveSnap;+ snapIsRaw = (snap instanceof Array || typeof(snap) === "function");+ if (rotationMode) {+ snapX = buildSnapFunc((snapIsRaw ? snap : snap.rotation), minX, maxX, 1);+ snapY = null;+ } else {+ if (snap.points) {+ snapXY = buildPointSnapFunc((snapIsRaw ? snap : snap.points), minX, maxX, minY, maxY, snap.radius, scrollProxy ? -1 : 1);+ } else {+ if (allowX) {+ snapX = buildSnapFunc((snapIsRaw ? snap : snap.x || snap.left || snap.scrollLeft), minX, maxX, scrollProxy ? -1 : 1);+ }+ if (allowY) {+ snapY = buildSnapFunc((snapIsRaw ? snap : snap.y || snap.top || snap.scrollTop), minY, maxY, scrollProxy ? -1 : 1);+ }+ }+ }+ }++ },++ onThrowComplete = function() {+ self.isThrowing = false;+ _dispatchEvent(self, "throwcomplete", "onThrowComplete");+ },+ onThrowOverwrite = function() {+ self.isThrowing = false;+ },++ animate = function(throwProps, forceZeroVelocity) {+ var snap, snapIsRaw, tween, overshootTolerance;+ if (throwProps && ThrowPropsPlugin) {+ if (throwProps === true) {+ snap = vars.snap || vars.liveSnap || {};+ snapIsRaw = (snap instanceof Array || typeof(snap) === "function");+ throwProps = {resistance:(vars.throwResistance || vars.resistance || 1000) / (rotationMode ? 10 : 1)};+ if (rotationMode) {+ throwProps.rotation = _parseThrowProps(self, snapIsRaw ? snap : snap.rotation, maxX, minX, 1, forceZeroVelocity);+ } else {+ if (allowX) {+ throwProps[xProp] = _parseThrowProps(self, snapIsRaw ? snap : snap.points || snap.x || snap.left || snap.scrollLeft, maxX, minX, scrollProxy ? -1 : 1, forceZeroVelocity || (self.lockedAxis === "x"));+ }+ if (allowY) {+ throwProps[yProp] = _parseThrowProps(self, snapIsRaw ? snap : snap.points || snap.y || snap.top || snap.scrollTop, maxY, minY, scrollProxy ? -1 : 1, forceZeroVelocity || (self.lockedAxis === "y"));+ }+ if (snap.points || (snap instanceof Array && typeof(snap[0]) === "object")) {+ throwProps.linkedProps = xProp + "," + yProp;+ throwProps.radius = snap.radius; //note: we also disable liveSnapping while throwing if there's a "radius" defined, otherwise it looks weird to have the item thrown past a snapping point but live-snapping mid-tween. We do this by altering the onUpdateParams so that "skipSnap" parameter is true for syncXY.+ }+ }+ }+ self.isThrowing = true;+ overshootTolerance = (!isNaN(vars.overshootTolerance)) ? vars.overshootTolerance : (vars.edgeResistance === 1) ? 0 : (1 - self.edgeResistance) + 0.2;+ self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, data:"_draggable", ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, (isNaN(vars.maxDuration) ? 2 : vars.maxDuration), (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0 || (typeof(throwProps) === "object" && throwProps.resistance > 1000)) ? 0 : 0.5), overshootTolerance);+ if (!vars.fastMode) {+ //to populate the end values, we just scrub the tween to the end, record the values, and then jump back to the beginning.+ if (scrollProxy) {+ scrollProxy._suspendTransforms = true; //Microsoft browsers have a bug that causes them to briefly render the position incorrectly (it flashes to the end state when we seek() the tween even though we jump right back to the current position, and this only seems to happen when we're affecting both top and left), so we set a _suspendTransforms flag to prevent it from actually applying the values in the ScrollProxy.+ }+ tween.render(tween.duration(), true, true);+ syncXY(true, true);+ self.endX = self.x;+ self.endY = self.y;+ if (rotationMode) {+ self.endRotation = self.x;+ }+ tween.play(0);+ syncXY(true, true);+ if (scrollProxy) {+ scrollProxy._suspendTransforms = false;+ }+ }+ } else if (hasBounds) {+ self.applyBounds();+ }+ },++ updateMatrix = function(shiftStart) {+ var start = matrix || [1,0,0,1,0,0],+ a, b, c, d, tx, ty, determinant, pointerX, pointerY;+ matrix = _getConcatenatedMatrix(target.parentNode, true);+ if (shiftStart && self.isPressed && start.join(",") !== matrix.join(",")) { //if the matrix changes WHILE the element is pressed, we must adjust the startPointerX and startPointerY accordingly, so we invert the original matrix and figure out where the pointerX and pointerY were in the global space, then apply the new matrix to get the updated coordinates.+ a = start[0];+ b = start[1];+ c = start[2];+ d = start[3];+ tx = start[4];+ ty = start[5];+ determinant = (a * d - b * c);+ pointerX = startPointerX * (d / determinant) + startPointerY * (-c / determinant) + ((c * ty - d * tx) / determinant);+ pointerY = startPointerX * (-b / determinant) + startPointerY * (a / determinant) + (-(a * ty - b * tx) / determinant);+ startPointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];+ startPointerX = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];+ }+ if (!matrix[1] && !matrix[2] && matrix[0] == 1 && matrix[3] == 1 && matrix[4] == 0 && matrix[5] == 0) { //if there are no transforms, we can optimize performance by not factoring in the matrix+ matrix = null;+ }++ },++ recordStartPositions = function() {+ var edgeTolerance = 1 - self.edgeResistance;+ updateMatrix(false);+ if (matrix) {+ startPointerX = self.pointerX * matrix[0] + self.pointerY * matrix[2] + matrix[4]; //translate to local coordinate system+ startPointerY = self.pointerX * matrix[1] + self.pointerY * matrix[3] + matrix[5];+ }+ if (dirty) {+ setPointerPosition(self.pointerX, self.pointerY);+ render(true);+ }+ if (scrollProxy) {+ calculateBounds();+ startElementY = scrollProxy.top();+ startElementX = scrollProxy.left();+ } else {+ //if the element is in the process of tweening, don't force snapping to occur because it could make it jump. Imagine the user throwing, then before it's done, clicking on the element in its inbetween state.+ if (isTweening()) {+ syncXY(true, true);+ calculateBounds();+ } else {+ self.applyBounds();+ }+ if (rotationMode) {+ rotationOrigin = self.rotationOrigin = _localToGlobal(target, {x:0, y:0});+ syncXY(true, true);+ startElementX = self.x; //starting rotation (x always refers to rotation in type:"rotation", measured in degrees)+ startElementY = self.y = Math.atan2(rotationOrigin.y - self.pointerY, self.pointerX - rotationOrigin.x) * _RAD2DEG;+ } else {+ startScrollTop = target.parentNode ? target.parentNode.scrollTop || 0 : 0;+ startScrollLeft = target.parentNode ? target.parentNode.scrollLeft || 0 : 0;+ startElementY = _getStyle(target, yProp); //record the starting top and left values so that we can just add the mouse's movement to them later.+ startElementX = _getStyle(target, xProp);+ }+ }+ if (hasBounds && edgeTolerance) {+ if (startElementX > maxX) {+ startElementX = maxX + (startElementX - maxX) / edgeTolerance;+ } else if (startElementX < minX) {+ startElementX = minX - (minX - startElementX) / edgeTolerance;+ }+ if (!rotationMode) {+ if (startElementY > maxY) {+ startElementY = maxY + (startElementY - maxY) / edgeTolerance;+ } else if (startElementY < minY) {+ startElementY = minY - (minY - startElementY) / edgeTolerance;+ }+ }+ }+ self.startX = startElementX;+ self.startY = startElementY;+ },++ isTweening = function() {+ return (self.tween && self.tween.isActive());+ },++ removePlaceholder = function() {+ if (_placeholderDiv.parentNode && !isTweening() && !self.isDragging) { //_placeholderDiv just props open auto-scrolling containers so they don't collapse as the user drags left/up. We remove it after dragging (and throwing, if necessary) finishes.+ _placeholderDiv.parentNode.removeChild(_placeholderDiv);+ }+ },++ buildSnapFunc = function(snap, min, max, factor) {+ if (typeof(snap) === "function") {+ return function(n) {+ var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times)+ return snap.call(self, (n > max ? max + (n - max) * edgeTolerance : (n < min) ? min + (n - min) * edgeTolerance : n)) * factor;+ };+ }+ if (snap instanceof Array) {+ return function(n) {+ var i = snap.length,+ closest = 0,+ absDif = _max,+ val, dif;+ while (--i > -1) {+ val = snap[i];+ dif = val - n;+ if (dif < 0) {+ dif = -dif;+ }+ if (dif < absDif && val >= min && val <= max) {+ closest = i;+ absDif = dif;+ }+ }+ return snap[closest];+ };+ }+ return isNaN(snap) ? function(n) { return n; } : function() { return snap * factor; };+ },++ buildPointSnapFunc = function(snap, minX, maxX, minY, maxY, radius, factor) {+ radius = (radius && radius < _max) ? radius * radius : _max; //so we don't have to Math.sqrt() in the functions. Performance optimization.+ if (typeof(snap) === "function") {+ return function(point) {+ var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance,+ x = point.x,+ y = point.y,+ result, dx, dy; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times)+ point.x = x = (x > maxX ? maxX + (x - maxX) * edgeTolerance : (x < minX) ? minX + (x - minX) * edgeTolerance : x);+ point.y = y = (y > maxY ? maxY + (y - maxY) * edgeTolerance : (y < minY) ? minY + (y - minY) * edgeTolerance : y);+ result = snap.call(self, point);+ if (result !== point) {+ point.x = result.x;+ point.y = result.y;+ }+ if (factor !== 1) {+ point.x *= factor;+ point.y *= factor;+ }+ if (radius < _max) {+ dx = point.x - x;+ dy = point.y - y;+ if (dx * dx + dy * dy > radius) {+ point.x = x;+ point.y = y;+ }+ }+ return point;+ };+ }+ if (snap instanceof Array) {+ return function(p) {+ var i = snap.length,+ closest = 0,+ minDist = _max,+ x, y, point, dist;+ while (--i > -1) {+ point = snap[i];+ x = point.x - p.x;+ y = point.y - p.y;+ dist = x * x + y * y;+ if (dist < minDist) {+ closest = i;+ minDist = dist;+ }+ }+ return (minDist <= radius) ? snap[closest] : p;+ };+ }+ return function(n) { return n; };+ },++ //called when the mouse is pressed (or touch starts)+ onPress = function(e, force) {+ var i;+ if (!enabled || self.isPressed || !e || ((e.type === "mousedown" || e.type === "pointerdown") && !force && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.+ return;+ }+ interrupted = isTweening();+ self.pointerEvent = e;+ if (_touchEventLookup[e.type]) { //note: on iOS, BOTH touchmove and mousemove are dispatched, but the mousemove has pageY and pageX of 0 which would mess up the calculations and needlessly hurt performance.+ touchEventTarget = (e.type.indexOf("touch") !== -1) ? (e.currentTarget || e.target) : _doc; //pointer-based touches (for Microsoft browsers) don't remain locked to the original target like other browsers, so we must use the document instead. The event type would be "MSPointerDown" or "pointerdown".+ _addListener(touchEventTarget, "touchend", onRelease);+ _addListener(touchEventTarget, "touchmove", onMove);+ _addListener(touchEventTarget, "touchcancel", onRelease);+ _addListener(_doc, "touchstart", _onMultiTouchDocument);+ } else {+ touchEventTarget = null;+ _addListener(_doc, "mousemove", onMove); //attach these to the document instead of the box itself so that if the user's mouse moves too quickly (and off of the box), things still work.+ }+ touchDragAxis = null;+ _addListener(_doc, "mouseup", onRelease);+ if (e && e.target) {+ _addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"+ }+ isClicking = (isClickable.call(self, e.target) && !vars.dragClickables && !force);+ if (isClicking) {+ _addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.+ _dispatchEvent(self, "press", "onPress");+ _setSelectable(triggers, true); //accommodates things like inputs and elements with contentEditable="true" (otherwise user couldn't drag to select text)+ return;+ }+ allowNativeTouchScrolling = (!touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false || (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2))) ? false : allowX ? "y" : "x"; //note: in Chrome, right-clicking (for a context menu) fires onPress and it doesn't have the event.which set properly, so we must look for event.ctrlKey. If the user wants to allow context menus we should of course sense it here and not allow native touch scrolling.+ if (_isOldIE) {+ e = _populateIEEvent(e, true);+ } else if (!allowNativeTouchScrolling && !self.allowEventDefault) {+ e.preventDefault();+ if (e.preventManipulation) {+ e.preventManipulation(); //for some Microsoft browsers+ }+ }+ if (e.changedTouches) { //touch events store the data slightly differently+ e = touch = e.changedTouches[0];+ touchID = e.identifier;+ } else if (e.pointerId) {+ touchID = e.pointerId; //for some Microsoft browsers+ } else {+ touch = touchID = null;+ }+ _dragCount++;+ _addToRenderQueue(render); //causes the Draggable to render on each "tick" of TweenLite.ticker (performance optimization - updating values in a mousemove can cause them to happen too frequently, like multiple times between frame redraws which is wasteful, and it also prevents values from updating properly in IE8)+ startPointerY = self.pointerY = e.pageY; //record the starting x and y so that we can calculate the movement from the original in _onMouseMove+ startPointerX = self.pointerX = e.pageX;+ if (allowNativeTouchScrolling || self.autoScroll) {+ _recordMaxScrolls(target.parentNode);+ }+ if (target.parentNode && self.autoScroll && !scrollProxy && !rotationMode && target.parentNode._gsMaxScrollX && !_placeholderDiv.parentNode && !target.getBBox) { //add a placeholder div to prevent the parent container from collapsing when the user drags the element left.+ _placeholderDiv.style.width = target.parentNode.scrollWidth + "px";+ target.parentNode.appendChild(_placeholderDiv);+ }+ recordStartPositions();+ if (self.tween) {+ self.tween.kill();+ }+ self.isThrowing = false;+ TweenLite.killTweensOf(scrollProxy || target, true, killProps); //in case the user tries to drag it before the last tween is done.+ if (scrollProxy) {+ TweenLite.killTweensOf(target, true, {scrollTo:1}); //just in case the original target's scroll position is being tweened somewhere else.+ }+ self.tween = self.lockedAxis = null;+ if (vars.zIndexBoost || (!rotationMode && !scrollProxy && vars.zIndexBoost !== false)) {+ target.style.zIndex = Draggable.zIndex++;+ }+ self.isPressed = true;+ hasDragCallback = !!(vars.onDrag || self._listeners.drag);+ if (!rotationMode) {+ i = triggers.length;+ while (--i > -1) {+ _setStyle(triggers[i], "cursor", vars.cursor || "move");+ }+ }+ _dispatchEvent(self, "press", "onPress");+ },++ //called every time the mouse/touch moves+ onMove = function(e) {+ var originalEvent = e,+ touches, pointerX, pointerY, i, dx, dy;+ if (!enabled || _isMultiTouching || !self.isPressed || !e) {+ return;+ }+ self.pointerEvent = e;+ touches = e.changedTouches;+ if (touches) { //touch events store the data slightly differently+ e = touches[0];+ if (e !== touch && e.identifier !== touchID) { //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS)+ i = touches.length;+ while (--i > -1 && (e = touches[i]).identifier !== touchID) {}+ if (i < 0) {+ return;+ }+ }+ } else if (e.pointerId && touchID && e.pointerId !== touchID) { //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch)+ return;+ }+ if (_isOldIE) {+ e = _populateIEEvent(e, true);+ } else {+ if (touchEventTarget && allowNativeTouchScrolling && !touchDragAxis) { //Android browsers force us to decide on the first "touchmove" event if we should allow the default (scrolling) behavior or preventDefault(). Otherwise, a "touchcancel" will be fired and then no "touchmove" or "touchend" will fire during the scrolling (no good).+ pointerX = e.pageX;+ pointerY = e.pageY;+ if (matrix) {+ i = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];+ pointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];+ pointerX = i;+ }+ dx = Math.abs(pointerX - startPointerX);+ dy = Math.abs(pointerY - startPointerY);+ if ((dx !== dy && (dx > minimumMovement || dy > minimumMovement)) || (_isAndroid && allowNativeTouchScrolling === touchDragAxis)) {+ touchDragAxis = (dx > dy && allowX) ? "x" : "y";+ if (self.vars.lockAxisOnTouchScroll !== false) {+ self.lockedAxis = (touchDragAxis === "x") ? "y" : "x";+ if (typeof(self.vars.onLockAxis) === "function") {+ self.vars.onLockAxis.call(self, originalEvent);+ }+ }+ if (_isAndroid && allowNativeTouchScrolling === touchDragAxis) {+ onRelease(originalEvent);+ return;+ }+ }+ }+ if (!self.allowEventDefault && (!allowNativeTouchScrolling || (touchDragAxis && allowNativeTouchScrolling !== touchDragAxis)) && originalEvent.cancelable !== false) {+ originalEvent.preventDefault();+ if (originalEvent.preventManipulation) { //for some Microsoft browsers+ originalEvent.preventManipulation();+ }+ }+ }+ if (self.autoScroll) {+ checkAutoScrollBounds = true;+ }+ setPointerPosition(e.pageX, e.pageY);+ },++ setPointerPosition = function(pointerX, pointerY) {+ var dragTolerance = 1 - self.dragResistance,+ edgeTolerance = 1 - self.edgeResistance,+ xChange, yChange, x, y, dif, temp;++ self.pointerX = pointerX;+ self.pointerY = pointerY;+ if (rotationMode) {+ y = Math.atan2(rotationOrigin.y - pointerY, pointerX - rotationOrigin.x) * _RAD2DEG;+ dif = self.y - y;+ if (dif > 180) {+ startElementY -= 360;+ self.y = y;+ } else if (dif < -180) {+ startElementY += 360;+ self.y = y;+ }+ if (self.x !== startElementX || Math.abs(startElementY - y) > minimumMovement) {+ self.y = y;+ x = startElementX + (startElementY - y) * dragTolerance;+ } else {+ x = startElementX;+ }++ } else {+ if (matrix) {+ temp = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];+ pointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];+ pointerX = temp;+ }+ yChange = (pointerY - startPointerY);+ xChange = (pointerX - startPointerX);+ if (yChange < minimumMovement && yChange > -minimumMovement) {+ yChange = 0;+ }+ if (xChange < minimumMovement && xChange > -minimumMovement) {+ xChange = 0;+ }+ if ((self.lockAxis || self.lockedAxis) && (xChange || yChange)) {+ temp = self.lockedAxis;+ if (!temp) {+ self.lockedAxis = temp = (allowX && Math.abs(xChange) > Math.abs(yChange)) ? "y" : allowY ? "x" : null;+ if (temp && typeof(self.vars.onLockAxis) === "function") {+ self.vars.onLockAxis.call(self, self.pointerEvent);+ }+ }+ if (temp === "y") {+ yChange = 0;+ } else if (temp === "x") {+ xChange = 0;+ }+ }+ x = startElementX + xChange * dragTolerance;+ y = startElementY + yChange * dragTolerance;+ }++ if ((snapX || snapY || snapXY) && (self.x !== x || (self.y !== y && !rotationMode))) {+ if (snapXY) {+ _temp1.x = x;+ _temp1.y = y;+ temp = snapXY(_temp1);+ x = temp.x;+ y = temp.y;+ }+ if (snapX) {+ x = snapX(x);+ }+ if (snapY) {+ y = snapY(y);+ }+ } else if (hasBounds) {+ if (x > maxX) {+ x = maxX + (x - maxX) * edgeTolerance;+ } else if (x < minX) {+ x = minX + (x - minX) * edgeTolerance;+ }+ if (!rotationMode) {+ if (y > maxY) {+ y = maxY + (y - maxY) * edgeTolerance;+ } else if (y < minY) {+ y = minY + (y - minY) * edgeTolerance;+ }+ }+ }+ if (!rotationMode && !matrix) {+ x = Math.round(x); //helps work around an issue with some Win Touch devices+ y = Math.round(y);+ }+ if (self.x !== x || (self.y !== y && !rotationMode)) {+ if (rotationMode) {+ self.endRotation = self.x = self.endX = x;+ dirty = true;+ } else {+ if (allowY) {+ self.y = self.endY = y;+ dirty = true; //a flag that indicates we need to render the target next time the TweenLite.ticker dispatches a "tick" event (typically on a requestAnimationFrame) - this is a performance optimization (we shouldn't render on every move because sometimes many move events can get dispatched between screen refreshes, and that'd be wasteful to render every time)+ }+ if (allowX) {+ self.x = self.endX = x;+ dirty = true;+ }+ }+ if (!self.isDragging && self.isPressed) {+ self.isDragging = true;+ _dispatchEvent(self, "dragstart", "onDragStart");+ }+ }+ },++ //called when the mouse/touch is released+ onRelease = function(e, force) {+ if (!enabled || !self.isPressed || (e && touchID != null && !force && ((e.pointerId && e.pointerId !== touchID) || (e.changedTouches && !_hasTouchID(e.changedTouches, touchID))))) { //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch)+ return;+ }+ self.isPressed = false;+ var originalEvent = e,+ wasDragging = self.isDragging,+ isContextMenuRelease = (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2)),+ placeholderDelayedCall = TweenLite.delayedCall(0.001, removePlaceholder),+ touches, i, syntheticEvent, eventTarget, syntheticClick;+ if (touchEventTarget) {+ _removeListener(touchEventTarget, "touchend", onRelease);+ _removeListener(touchEventTarget, "touchmove", onMove);+ _removeListener(touchEventTarget, "touchcancel", onRelease);+ _removeListener(_doc, "touchstart", _onMultiTouchDocument);+ } else {+ _removeListener(_doc, "mousemove", onMove);+ }+ _removeListener(_doc, "mouseup", onRelease);+ if (e && e.target) {+ _removeListener(e.target, "mouseup", onRelease);+ }+ dirty = false;+ if (isClicking && !isContextMenuRelease) {+ if (e) {+ _removeListener(e.target, "change", onRelease);+ self.pointerEvent = originalEvent;+ }+ _setSelectable(triggers, false);+ _dispatchEvent(self, "release", "onRelease");+ _dispatchEvent(self, "click", "onClick");+ isClicking = false;+ return;+ }+ _removeFromRenderQueue(render);+ if (!rotationMode) {+ i = triggers.length;+ while (--i > -1) {+ _setStyle(triggers[i], "cursor", vars.cursor || "move");+ }+ }+ if (wasDragging) {+ dragEndTime = _lastDragTime = _getTime();+ self.isDragging = false;+ }+ _dragCount--;+ if (e) {+ if (_isOldIE) {+ e = _populateIEEvent(e, false);+ }+ touches = e.changedTouches;+ if (touches) { //touch events store the data slightly differently+ e = touches[0];+ if (e !== touch && e.identifier !== touchID) { //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS)+ i = touches.length;+ while (--i > -1 && (e = touches[i]).identifier !== touchID) {}+ if (i < 0) {+ return;+ }+ }+ }+ self.pointerEvent = originalEvent;+ self.pointerX = e.pageX;+ self.pointerY = e.pageY;+ }+ if (isContextMenuRelease && originalEvent) {+ originalEvent.preventDefault();+ if (originalEvent.preventManipulation) {+ originalEvent.preventManipulation(); //for some Microsoft browsers+ }+ _dispatchEvent(self, "release", "onRelease");+ } else if (originalEvent && !wasDragging) {+ if (interrupted && (vars.snap || vars.bounds)) { //otherwise, if the user clicks on the object while it's animating to a snapped position, and then releases without moving 3 pixels, it will just stay there (it should animate/snap)+ animate(vars.throwProps);+ }+ _dispatchEvent(self, "release", "onRelease");+ if ((!_isAndroid || originalEvent.type !== "touchmove") && originalEvent.type.indexOf("cancel") === -1) { //to accommodate native scrolling on Android devices, we have to immediately call onRelease() on the first touchmove event, but that shouldn't trigger a "click".+ _dispatchEvent(self, "click", "onClick");+ if (_getTime() - clickTime < 300) {+ _dispatchEvent(self, "doubleclick", "onDoubleClick");+ }+ eventTarget = originalEvent.target || originalEvent.srcElement || target; //old IE uses srcElement+ clickTime = _getTime();+ syntheticClick = function () { // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched.+ if (clickTime !== clickDispatch && self.enabled() && !self.isPressed) {+ if (eventTarget.click) { //some browsers (like mobile Safari) don't properly trigger the click event+ eventTarget.click();+ } else if (_doc.createEvent) {+ syntheticEvent = _doc.createEvent("MouseEvents");+ syntheticEvent.initMouseEvent("click", true, true, window, 1, self.pointerEvent.screenX, self.pointerEvent.screenY, self.pointerX, self.pointerY, false, false, false, false, 0, null);+ eventTarget.dispatchEvent(syntheticEvent);+ }+ }+ };+ if (!_isAndroid && !originalEvent.defaultPrevented) { //iOS Safari requires the synthetic click to happen immediately or else it simply won't work, but Android doesn't play nice.+ TweenLite.delayedCall(0.00001, syntheticClick); //in addition to the iOS bug workaround, there's a Firefox issue with clicking on things like a video to play, so we must fake a click event in a slightly delayed fashion. Previously, we listened for the "click" event with "capture" false which solved the video-click-to-play issue, but it would allow the "click" event to be dispatched twice like if you were using a jQuery.click() because that was handled in the capture phase, thus we had to switch to the capture phase to avoid the double-dispatching, but do the delayed synthetic click.+ }+ }+ } else {+ animate(vars.throwProps); //will skip if throwProps isn't defined or ThrowPropsPlugin isn't loaded.+ if (!_isOldIE && !self.allowEventDefault && originalEvent && (vars.dragClickables || !isClickable.call(self, originalEvent.target)) && wasDragging && (!allowNativeTouchScrolling || (touchDragAxis && allowNativeTouchScrolling === touchDragAxis)) && originalEvent.cancelable !== false) {+ originalEvent.preventDefault();+ if (originalEvent.preventManipulation) {+ originalEvent.preventManipulation(); //for some Microsoft browsers+ }+ }+ _dispatchEvent(self, "release", "onRelease");+ }+ if (isTweening()) {+ placeholderDelayedCall.duration( self.tween.duration() ); //sync the timing so that the placeholder DIV gets+ }+ if (wasDragging) {+ _dispatchEvent(self, "dragend", "onDragEnd");+ }+ return true;+ },++ updateScroll = function(e) {+ if (e && self.isDragging && !scrollProxy) {+ var parent = e.target || e.srcElement || target.parentNode,+ deltaX = parent.scrollLeft - parent._gsScrollX,+ deltaY = parent.scrollTop - parent._gsScrollY;+ if (deltaX || deltaY) {+ if (matrix) {+ startPointerX -= deltaX * matrix[0] + deltaY * matrix[2];+ startPointerY -= deltaY * matrix[3] + deltaX * matrix[1];+ } else {+ startPointerX -= deltaX;+ startPointerY -= deltaY;+ }+ parent._gsScrollX += deltaX;+ parent._gsScrollY += deltaY;+ setPointerPosition(self.pointerX, self.pointerY);+ }+ }+ },++ onClick = function(e) { //this was a huge pain in the neck to align all the various browsers and their behaviors. Chrome, Firefox, Safari, Opera, Android, and Microsoft Edge all handle events differently! Some will only trigger native behavior (like checkbox toggling) from trusted events. Others don't even support isTrusted, but require 2 events to flow through before triggering native behavior. Edge treats everything as trusted but also mandates that 2 flow through to trigger the correct native behavior.+ var time = _getTime(),+ recentlyClicked = (time - clickTime < 40),+ recentlyDragged = (time - dragEndTime < 40),+ alreadyDispatched = (recentlyClicked && clickDispatch === clickTime),+ isModern = !!e.preventDefault,+ defaultPrevented = (self.pointerEvent && self.pointerEvent.defaultPrevented),+ alreadyDispatchedTrusted = (recentlyClicked && trustedClickDispatch === clickTime),+ trusted = e.isTrusted || (e.isTrusted == null && recentlyClicked && alreadyDispatched); //note: Safari doesn't support isTrusted, and it won't properly execute native behavior (like toggling checkboxes) on the first synthetic "click" event - we must wait for the 2nd and treat it as trusted (but stop propagation at that point). Confusing, I know. Don't you love cross-browser compatibility challenges?+ if (isModern && (alreadyDispatched || (recentlyDragged && self.vars.suppressClickOnDrag !== false) )) {+ e.stopImmediatePropagation();+ }+ if (recentlyClicked && !(self.pointerEvent && self.pointerEvent.defaultPrevented) && (!alreadyDispatched || (trusted !== alreadyDispatchedTrusted))) { //let the first click pass through unhindered. Let the next one only if it's trusted, then no more (stop quick-succession ones)+ if (trusted && alreadyDispatched) {+ trustedClickDispatch = clickTime;+ }+ clickDispatch = clickTime;+ return;+ }+ if (self.isPressed || recentlyDragged || recentlyClicked) {+ if (!isModern) {+ e.returnValue = false;+ } else if (!trusted || !e.detail || !recentlyClicked || defaultPrevented) {+ e.preventDefault();+ if (e.preventManipulation) {+ e.preventManipulation(); //for some Microsoft browsers+ }+ }+ }+ },++ localizePoint = function(p) {+ return matrix ? {x:p.x * matrix[0] + p.y * matrix[2] + matrix[4], y:p.x * matrix[1] + p.y * matrix[3] + matrix[5]} : {x:p.x, y:p.y};+ };++ old = Draggable.get(this.target);+ if (old) {+ old.kill(); // avoids duplicates (an element can only be controlled by one Draggable)+ }++ //give the user access to start/stop dragging...+ this.startDrag = function(e, align) {+ var r1, r2, p1, p2;+ onPress(e || self.pointerEvent, true);+ //if the pointer isn't on top of the element, adjust things accordingly+ if (align && !self.hitTest(e || self.pointerEvent)) {+ r1 = _parseRect(e || self.pointerEvent);+ r2 = _parseRect(target);+ p1 = localizePoint({x:r1.left + r1.width / 2, y:r1.top + r1.height / 2});+ p2 = localizePoint({x:r2.left + r2.width / 2, y:r2.top + r2.height / 2});+ startPointerX -= p1.x - p2.x;+ startPointerY -= p1.y - p2.y;+ }+ if (!self.isDragging) {+ self.isDragging = true;+ _dispatchEvent(self, "dragstart", "onDragStart");+ }+ };+ this.drag = onMove;+ this.endDrag = function(e) {+ onRelease(e || self.pointerEvent, true);+ };+ this.timeSinceDrag = function() {+ return self.isDragging ? 0 : (_getTime() - dragEndTime) / 1000;+ };+ this.timeSinceClick = function() {+ return (_getTime() - clickTime) / 1000;+ };+ this.hitTest = function(target, threshold) {+ return Draggable.hitTest(self.target, target, threshold);+ };++ this.getDirection = function(from, diagonalThreshold) { //from can be "start" (default), "velocity", or an element+ var mode = (from === "velocity" && ThrowPropsPlugin) ? from : (typeof(from) === "object" && !rotationMode) ? "element" : "start",+ xChange, yChange, ratio, direction, r1, r2;+ if (mode === "element") {+ r1 = _parseRect(self.target);+ r2 = _parseRect(from);+ }+ xChange = (mode === "start") ? self.x - startElementX : (mode === "velocity") ? ThrowPropsPlugin.getVelocity(this.target, xProp) : (r1.left + r1.width / 2) - (r2.left + r2.width / 2);+ if (rotationMode) {+ return xChange < 0 ? "counter-clockwise" : "clockwise";+ } else {+ diagonalThreshold = diagonalThreshold || 2;+ yChange = (mode === "start") ? self.y - startElementY : (mode === "velocity") ? ThrowPropsPlugin.getVelocity(this.target, yProp) : (r1.top + r1.height / 2) - (r2.top + r2.height / 2);+ ratio = Math.abs(xChange / yChange);+ direction = (ratio < 1 / diagonalThreshold) ? "" : (xChange < 0) ? "left" : "right";+ if (ratio < diagonalThreshold) {+ if (direction !== "") {+ direction += "-";+ }+ direction += (yChange < 0) ? "up" : "down";+ }+ }+ return direction;+ };+++ this.applyBounds = function(newBounds) {+ var x, y, forceZeroVelocity, e, parent, isRoot;+ if (newBounds && vars.bounds !== newBounds) {+ vars.bounds = newBounds;+ return self.update(true);+ }+ syncXY(true);+ calculateBounds();+ if (hasBounds) {+ x = self.x;+ y = self.y;+ if (x > maxX) {+ x = maxX;+ } else if (x < minX) {+ x = minX;+ }+ if (y > maxY) {+ y = maxY;+ } else if (y < minY) {+ y = minY;+ }+ if (self.x !== x || self.y !== y) {+ forceZeroVelocity = true;+ self.x = self.endX = x;+ if (rotationMode) {+ self.endRotation = x;+ } else {+ self.y = self.endY = y;+ }+ dirty = true;+ render(true);+ if (self.autoScroll && !self.isDragging) {+ _recordMaxScrolls(target.parentNode);+ e = target;+ _windowProxy.scrollTop = ((window.pageYOffset != null) ? window.pageYOffset : (_docElement.scrollTop != null) ? _docElement.scrollTop : _doc.body.scrollTop);+ _windowProxy.scrollLeft = ((window.pageXOffset != null) ? window.pageXOffset : (_docElement.scrollLeft != null) ? _docElement.scrollLeft : _doc.body.scrollLeft);+ while (e && !isRoot) { //walk up the chain and sense wherever the scrollTop/scrollLeft exceeds the maximum.+ isRoot = _isRoot(e.parentNode);+ parent = isRoot ? _windowProxy : e.parentNode;+ if (allowY && parent.scrollTop > parent._gsMaxScrollY) {+ parent.scrollTop = parent._gsMaxScrollY;+ }+ if (allowX && parent.scrollLeft > parent._gsMaxScrollX) {+ parent.scrollLeft = parent._gsMaxScrollX;+ }+ e = parent;+ }+ }+ }+ if (self.isThrowing && (forceZeroVelocity || self.endX > maxX || self.endX < minX || self.endY > maxY || self.endY < minY)) {+ animate(vars.throwProps, forceZeroVelocity);+ }+ }+ return self;+ };++ this.update = function(applyBounds, sticky, ignoreExternalChanges) {+ var x = self.x,+ y = self.y;+ updateMatrix(!sticky);+ if (applyBounds) {+ self.applyBounds();+ } else {+ if (dirty && ignoreExternalChanges) {+ render(true);+ }+ syncXY(true);+ }+ if (sticky) {+ setPointerPosition(self.pointerX, self.pointerY);+ if (dirty) {+ render(true);+ }+ }+ if (self.isPressed && !sticky && ((allowX && Math.abs(x - self.x) > 0.01) || (allowY && (Math.abs(y - self.y) > 0.01 && !rotationMode)))) {+ recordStartPositions();+ }+ if (self.autoScroll) {+ _recordMaxScrolls(target.parentNode);+ checkAutoScrollBounds = self.isDragging;+ render(true);+ }+ if (self.autoScroll) { //in case reparenting occurred.+ _removeScrollListener(target, updateScroll);+ _addScrollListener(target, updateScroll);+ }+ return self;+ };++ this.enable = function(type) {+ var id, i, trigger;+ if (type !== "soft") {+ i = triggers.length;+ while (--i > -1) {+ trigger = triggers[i];+ _addListener(trigger, "mousedown", onPress);+ _addListener(trigger, "touchstart", onPress);+ _addListener(trigger, "click", onClick, true); //note: used to pass true for capture but it prevented click-to-play-video functionality in Firefox.+ if (!rotationMode) {+ _setStyle(trigger, "cursor", vars.cursor || "move");+ }+ _setStyle(trigger, "touchCallout", "none");+ _setStyle(trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");+ if (_isSVG(trigger)) { // a bug in chrome doesn't respect touch-action on SVG elements - it only works if we set it on the parent SVG.+ _setStyle(trigger.ownerSVGElement || trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");+ }+ if (!this.vars.allowContextMenu) {+ _addListener(trigger, "contextmenu", onContextMenu);+ }+ }+ _setSelectable(triggers, false);+ }+ _addScrollListener(target, updateScroll);+ enabled = true;+ if (ThrowPropsPlugin && type !== "soft") {+ ThrowPropsPlugin.track(scrollProxy || target, (xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"));+ }+ if (scrollProxy) {+ scrollProxy.enable();+ }+ target._gsDragID = id = "d" + (_lookupCount++);+ _lookup[id] = this;+ if (scrollProxy) {+ scrollProxy.element._gsDragID = id;+ }+ TweenLite.set(target, {x:"+=0", overwrite:false, data:"_draggable"}); //simply ensures that there's a _gsTransform on the element.+ applyObj = {+ t:target,+ data:_isOldIE ? cssVars : target._gsTransform,+ tween:{},+ setRatio:(_isOldIE ? function() { TweenLite.set(target, tempVars); } : CSSPlugin._internals.setTransformRatio || CSSPlugin._internals.set3DTransformRatio)+ };+ recordStartPositions();+ self.update(true);+ return self;+ };++ this.disable = function(type) {+ var dragging = self.isDragging,+ i, trigger;+ if (!rotationMode) {+ i = triggers.length;+ while (--i > -1) {+ _setStyle(triggers[i], "cursor", null);+ }+ }+ if (type !== "soft") {+ i = triggers.length;+ while (--i > -1) {+ trigger = triggers[i];+ _setStyle(trigger, "touchCallout", null);+ _setStyle(trigger, "touchAction", null);+ _removeListener(trigger, "mousedown", onPress);+ _removeListener(trigger, "touchstart", onPress);+ _removeListener(trigger, "click", onClick);+ _removeListener(trigger, "contextmenu", onContextMenu);+ }+ _setSelectable(triggers, true);+ if (touchEventTarget) {+ _removeListener(touchEventTarget, "touchcancel", onRelease);+ _removeListener(touchEventTarget, "touchend", onRelease);+ _removeListener(touchEventTarget, "touchmove", onMove);+ }+ _removeListener(_doc, "mouseup", onRelease);+ _removeListener(_doc, "mousemove", onMove);+ }+ _removeScrollListener(target, updateScroll);+ enabled = false;+ if (ThrowPropsPlugin && type !== "soft") {+ ThrowPropsPlugin.untrack(scrollProxy || target, (xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"));+ }+ if (scrollProxy) {+ scrollProxy.disable();+ }+ _removeFromRenderQueue(render);+ self.isDragging = self.isPressed = isClicking = false;+ if (dragging) {+ _dispatchEvent(self, "dragend", "onDragEnd");+ }+ return self;+ };++ this.enabled = function(value, type) {+ return arguments.length ? (value ? self.enable(type) : self.disable(type)) : enabled;+ };++ this.kill = function() {+ self.isThrowing = false;+ TweenLite.killTweensOf(scrollProxy || target, true, killProps);+ self.disable();+ delete _lookup[target._gsDragID];+ return self;+ };++ if (type.indexOf("scroll") !== -1) {+ scrollProxy = this.scrollProxy = new ScrollProxy(target, _extend({onKill:function() { //ScrollProxy's onKill() gets called if/when the ScrollProxy senses that the user interacted with the scroll position manually (like using the scrollbar). IE9 doesn't fire the "mouseup" properly when users drag the scrollbar of an element, so this works around that issue.+ if (self.isPressed) {+ onRelease(null);+ }}}, vars));+ //a bug in many Android devices' stock browser causes scrollTop to get forced back to 0 after it is altered via JS, so we set overflow to "hidden" on mobile/touch devices (they hide the scroll bar anyway). That works around the bug. (This bug is discussed at https://code.google.com/p/android/issues/detail?id=19625)+ target.style.overflowY = (allowY && !_isTouchDevice) ? "auto" : "hidden";+ target.style.overflowX = (allowX && !_isTouchDevice) ? "auto" : "hidden";+ target = scrollProxy.content;+ }++ if (vars.force3D !== false) {+ TweenLite.set(target, {force3D:true}); //improve performance by forcing a GPU layer when possible+ }+ if (rotationMode) {+ killProps.rotation = 1;+ } else {+ if (allowX) {+ killProps[xProp] = 1;+ }+ if (allowY) {+ killProps[yProp] = 1;+ }+ }+ if (rotationMode) {+ tempVars = _tempVarsRotation;+ cssVars = tempVars.css;+ tempVars.overwrite = false;+ } else if (xyMode) {+ tempVars = (allowX && allowY) ? _tempVarsXY : allowX ? _tempVarsX : _tempVarsY;+ cssVars = tempVars.css;+ tempVars.overwrite = false;+ }++ this.enable();+ },+ p = Draggable.prototype = new EventDispatcher();++ p.constructor = Draggable;+ p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;+ p.isDragging = p.isPressed = false;+ Draggable.version = "0.16.3";+ Draggable.zIndex = 1000;++ _addListener(_doc, "touchcancel", function() {+ //some older Android devices intermittently stop dispatching "touchmove" events if we don't listen for "touchcancel" on the document. Very strange indeed.+ });+ _addListener(_doc, "contextmenu", function(e) {+ var p;+ for (p in _lookup) {+ if (_lookup[p].isPressed) {+ _lookup[p].endDrag();+ }+ }+ });++ Draggable.create = function(targets, vars) {+ if (typeof(targets) === "string") {+ targets = TweenLite.selector(targets);+ }+ var a = (!targets || targets.length === 0) ? [] : _isArrayLike(targets) ? _flattenArray(targets) : [targets],+ i = a.length;+ while (--i > -1) {+ a[i] = new Draggable(a[i], vars);+ }+ return a;+ };++ Draggable.get = function(target) {+ return _lookup[(_unwrapElement(target) || {})._gsDragID];+ };++ Draggable.timeSinceDrag = function() {+ return (_getTime() - _lastDragTime) / 1000;+ };++ var _tempRect = {}, //reuse to reduce garbage collection tasks+ _oldIERect = function(e) { //IE8 doesn't support getBoundingClientRect(), so we use this as a backup.+ var top = 0,+ left = 0,+ width, height;+ e = _unwrapElement(e);+ width = e.offsetWidth;+ height = e.offsetHeight;+ while(e) {+ top += e.offsetTop;+ left += e.offsetLeft;+ e = e.offsetParent;+ }+ return {top: top, left: left, width: width, height: height};+ },+ _parseRect = function(e, undefined) { //accepts a DOM element, a mouse event, or a rectangle object and returns the corresponding rectangle with left, right, width, height, top, and bottom properties+ if (e === window) {+ _tempRect.left = _tempRect.top = 0;+ _tempRect.width = _tempRect.right = _docElement.clientWidth || e.innerWidth || _doc.body.clientWidth || 0;+ _tempRect.height = _tempRect.bottom = ((e.innerHeight || 0) - 20 < _docElement.clientHeight) ? _docElement.clientHeight : e.innerHeight || _doc.body.clientHeight || 0;+ return _tempRect;+ }+ var r = (e.pageX !== undefined) ? {left:e.pageX - _getDocScrollLeft(), top:e.pageY - _getDocScrollTop(), right:e.pageX - _getDocScrollLeft() + 1, bottom:e.pageY - _getDocScrollTop() + 1} : (!e.nodeType && e.left !== undefined && e.top !== undefined) ? e : _isOldIE ? _oldIERect(e) : _unwrapElement(e).getBoundingClientRect();+ if (r.right === undefined && r.width !== undefined) {+ r.right = r.left + r.width;+ r.bottom = r.top + r.height;+ } else if (r.width === undefined) { //some browsers don't include width and height properties. We can't just set them directly on r because some browsers throw errors, so create a new generic object.+ r = {width: r.right - r.left, height: r.bottom - r.top, right: r.right, left: r.left, bottom: r.bottom, top: r.top};+ }+ return r;+ };++ Draggable.hitTest = function(obj1, obj2, threshold) {+ if (obj1 === obj2) {+ return false;+ }+ var r1 = _parseRect(obj1),+ r2 = _parseRect(obj2),+ isOutside = (r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top),+ overlap, area, isRatio;+ if (isOutside || !threshold) {+ return !isOutside;+ }+ isRatio = ((threshold + "").indexOf("%") !== -1);+ threshold = parseFloat(threshold) || 0;+ overlap = {left:Math.max(r1.left, r2.left), top:Math.max(r1.top, r2.top)};+ overlap.width = Math.min(r1.right, r2.right) - overlap.left;+ overlap.height = Math.min(r1.bottom, r2.bottom) - overlap.top;+ if (overlap.width < 0 || overlap.height < 0) {+ return false;+ }+ if (isRatio) {+ threshold *= 0.01;+ area = overlap.width * overlap.height;+ return (area >= r1.width * r1.height * threshold || area >= r2.width * r2.height * threshold);+ }+ return (overlap.width > threshold && overlap.height > threshold);+ };++ _placeholderDiv.style.cssText = "visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;";++ return Draggable;++ }, true);++export const Draggable = _gsScope.Draggable;+export { Draggable as default };\ No newline at end of filediff --git a/src/esm/EasePack.js b/src/esm/EasePack.jsnew file mode 100644index 0000000..60787e5--- /dev/null+++ b/src/esm/EasePack.js@@ -0,0 +1,374 @@+/*!+ * VERSION: 1.16.0+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/++import { _gsScope, Ease, Linear, Power0, Power1, Power2, Power3, Power4 } from "./TweenLite";++_gsScope._gsDefine("easing.Back", ["easing.Ease"], function() {++ var w = (_gsScope.GreenSockGlobals || _gsScope),+ gs = w.com.greensock,+ _2PI = Math.PI * 2,+ _HALF_PI = Math.PI / 2,+ _class = gs._class,+ _create = function(n, f) {+ var C = _class("easing." + n, function(){}, true),+ p = C.prototype = new Ease();+ p.constructor = C;+ p.getRatio = f;+ return C;+ },+ _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist.+ _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) {+ var C = _class("easing."+name, {+ easeOut:new EaseOut(),+ easeIn:new EaseIn(),+ easeInOut:new EaseInOut()+ }, true);+ _easeReg(C, name);+ return C;+ },+ EasePoint = function(time, value, next) {+ this.t = time;+ this.v = value;+ if (next) {+ this.next = next;+ next.prev = this;+ this.c = next.v - value;+ this.gap = next.t - time;+ }+ },++ //Back+ _createBack = function(n, f) {+ var C = _class("easing." + n, function(overshoot) {+ this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158;+ this._p2 = this._p1 * 1.525;+ }, true),+ p = C.prototype = new Ease();+ p.constructor = C;+ p.getRatio = f;+ p.config = function(overshoot) {+ return new C(overshoot);+ };+ return C;+ },++ Back = _wrap("Back",+ _createBack("BackOut", function(p) {+ return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1);+ }),+ _createBack("BackIn", function(p) {+ return p * p * ((this._p1 + 1) * p - this._p1);+ }),+ _createBack("BackInOut", function(p) {+ return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2);+ })+ ),+++ //SlowMo+ SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) {+ power = (power || power === 0) ? power : 0.7;+ if (linearRatio == null) {+ linearRatio = 0.7;+ } else if (linearRatio > 1) {+ linearRatio = 1;+ }+ this._p = (linearRatio !== 1) ? power : 0;+ this._p1 = (1 - linearRatio) / 2;+ this._p2 = linearRatio;+ this._p3 = this._p1 + this._p2;+ this._calcEnd = (yoyoMode === true);+ }, true),+ p = SlowMo.prototype = new Ease(),+ SteppedEase, ExpoScaleEase, RoughEase, _createElastic;++ p.constructor = SlowMo;+ p.getRatio = function(p) {+ var r = p + (0.5 - p) * this._p;+ if (p < this._p1) {+ return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);+ } else if (p > this._p3) {+ return this._calcEnd ? (p === 1 ? 0 : 1 - (p = (p - this._p3) / this._p1) * p) : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); //added p === 1 ? 0 to avoid floating point rounding errors from affecting the final value, like 1 - 0.7 = 0.30000000000000004 instead of 0.3+ }+ return this._calcEnd ? 1 : r;+ };+ SlowMo.ease = new SlowMo(0.7, 0.7);++ p.config = SlowMo.config = function(linearRatio, power, yoyoMode) {+ return new SlowMo(linearRatio, power, yoyoMode);+ };+++ //SteppedEase+ SteppedEase = _class("easing.SteppedEase", function(steps, immediateStart) {+ steps = steps || 1;+ this._p1 = 1 / steps;+ this._p2 = steps + (immediateStart ? 0 : 1);+ this._p3 = immediateStart ? 1 : 0;+ }, true);+ p = SteppedEase.prototype = new Ease();+ p.constructor = SteppedEase;+ p.getRatio = function(p) {+ if (p < 0) {+ p = 0;+ } else if (p >= 1) {+ p = 0.999999999;+ }+ return (((this._p2 * p) | 0) + this._p3) * this._p1;+ };+ p.config = SteppedEase.config = function(steps, immediateStart) {+ return new SteppedEase(steps, immediateStart);+ };+++ //ExpoScaleEase+ ExpoScaleEase = _class("easing.ExpoScaleEase", function(start, end, ease) {+ this._p1 = Math.log(end / start);+ this._p2 = end - start;+ this._p3 = start;+ this._ease = ease;+ }, true);+ p = ExpoScaleEase.prototype = new Ease();+ p.constructor = ExpoScaleEase;+ p.getRatio = function(p) {+ if (this._ease) {+ p = this._ease.getRatio(p);+ }+ return (this._p3 * Math.exp(this._p1 * p) - this._p3) / this._p2;+ };+ p.config = ExpoScaleEase.config = function(start, end, ease) {+ return new ExpoScaleEase(start, end, ease);+ };+++ //RoughEase+ RoughEase = _class("easing.RoughEase", function(vars) {+ vars = vars || {};+ var taper = vars.taper || "none",+ a = [],+ cnt = 0,+ points = (vars.points || 20) | 0,+ i = points,+ randomize = (vars.randomize !== false),+ clamp = (vars.clamp === true),+ template = (vars.template instanceof Ease) ? vars.template : null,+ strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4,+ x, y, bump, invX, obj, pnt;+ while (--i > -1) {+ x = randomize ? Math.random() : (1 / points) * i;+ y = template ? template.getRatio(x) : x;+ if (taper === "none") {+ bump = strength;+ } else if (taper === "out") {+ invX = 1 - x;+ bump = invX * invX * strength;+ } else if (taper === "in") {+ bump = x * x * strength;+ } else if (x < 0.5) { //"both" (start)+ invX = x * 2;+ bump = invX * invX * 0.5 * strength;+ } else { //"both" (end)+ invX = (1 - x) * 2;+ bump = invX * invX * 0.5 * strength;+ }+ if (randomize) {+ y += (Math.random() * bump) - (bump * 0.5);+ } else if (i % 2) {+ y += bump * 0.5;+ } else {+ y -= bump * 0.5;+ }+ if (clamp) {+ if (y > 1) {+ y = 1;+ } else if (y < 0) {+ y = 0;+ }+ }+ a[cnt++] = {x:x, y:y};+ }+ a.sort(function(a, b) {+ return a.x - b.x;+ });++ pnt = new EasePoint(1, 1, null);+ i = points;+ while (--i > -1) {+ obj = a[i];+ pnt = new EasePoint(obj.x, obj.y, pnt);+ }++ this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next);+ }, true);+ p = RoughEase.prototype = new Ease();+ p.constructor = RoughEase;+ p.getRatio = function(p) {+ var pnt = this._prev;+ if (p > pnt.t) {+ while (pnt.next && p >= pnt.t) {+ pnt = pnt.next;+ }+ pnt = pnt.prev;+ } else {+ while (pnt.prev && p <= pnt.t) {+ pnt = pnt.prev;+ }+ }+ this._prev = pnt;+ return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c);+ };+ p.config = function(vars) {+ return new RoughEase(vars);+ };+ RoughEase.ease = new RoughEase();+++ //Bounce+ _wrap("Bounce",+ _create("BounceOut", function(p) {+ if (p < 1 / 2.75) {+ return 7.5625 * p * p;+ } else if (p < 2 / 2.75) {+ return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;+ } else if (p < 2.5 / 2.75) {+ return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;+ }+ return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;+ }),+ _create("BounceIn", function(p) {+ if ((p = 1 - p) < 1 / 2.75) {+ return 1 - (7.5625 * p * p);+ } else if (p < 2 / 2.75) {+ return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75);+ } else if (p < 2.5 / 2.75) {+ return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375);+ }+ return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375);+ }),+ _create("BounceInOut", function(p) {+ var invert = (p < 0.5);+ if (invert) {+ p = 1 - (p * 2);+ } else {+ p = (p * 2) - 1;+ }+ if (p < 1 / 2.75) {+ p = 7.5625 * p * p;+ } else if (p < 2 / 2.75) {+ p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;+ } else if (p < 2.5 / 2.75) {+ p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;+ } else {+ p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;+ }+ return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5;+ })+ );+++ //CIRC+ _wrap("Circ",+ _create("CircOut", function(p) {+ return Math.sqrt(1 - (p = p - 1) * p);+ }),+ _create("CircIn", function(p) {+ return -(Math.sqrt(1 - (p * p)) - 1);+ }),+ _create("CircInOut", function(p) {+ return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1);+ })+ );+++ //Elastic+ _createElastic = function(n, f, def) {+ var C = _class("easing." + n, function(amplitude, period) {+ this._p1 = (amplitude >= 1) ? amplitude : 1; //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.+ this._p2 = (period || def) / (amplitude < 1 ? amplitude : 1);+ this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0);+ this._p2 = _2PI / this._p2; //precalculate to optimize+ }, true),+ p = C.prototype = new Ease();+ p.constructor = C;+ p.getRatio = f;+ p.config = function(amplitude, period) {+ return new C(amplitude, period);+ };+ return C;+ };+ _wrap("Elastic",+ _createElastic("ElasticOut", function(p) {+ return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * this._p2 ) + 1;+ }, 0.3),+ _createElastic("ElasticIn", function(p) {+ return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2 ));+ }, 0.3),+ _createElastic("ElasticInOut", function(p) {+ return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * this._p2 ) * 0.5 + 1;+ }, 0.45)+ );+++ //Expo+ _wrap("Expo",+ _create("ExpoOut", function(p) {+ return 1 - Math.pow(2, -10 * p);+ }),+ _create("ExpoIn", function(p) {+ return Math.pow(2, 10 * (p - 1)) - 0.001;+ }),+ _create("ExpoInOut", function(p) {+ return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));+ })+ );+++ //Sine+ _wrap("Sine",+ _create("SineOut", function(p) {+ return Math.sin(p * _HALF_PI);+ }),+ _create("SineIn", function(p) {+ return -Math.cos(p * _HALF_PI) + 1;+ }),+ _create("SineInOut", function(p) {+ return -0.5 * (Math.cos(Math.PI * p) - 1);+ })+ );++ _class("easing.EaseLookup", {+ find:function(s) {+ return Ease.map[s];+ }+ }, true);++ //register the non-standard eases+ _easeReg(w.SlowMo, "SlowMo", "ease,");+ _easeReg(RoughEase, "RoughEase", "ease,");+ _easeReg(SteppedEase, "SteppedEase", "ease,");++ return Back;++ }, true);++export const Back = _gsScope.Back;+export const Elastic = _gsScope.Elastic;+export const Bounce = _gsScope.Bounce;+export const RoughEase = _gsScope.RoughEase;+export const SlowMo = _gsScope.SlowMo;+export const SteppedEase = _gsScope.SteppedEase;+export const Circ = _gsScope.Circ;+export const Expo = _gsScope.Expo;+export const Sine = _gsScope.Sine;+export const ExpoScaleEase = _gsScope.ExpoScaleEase;+export { Linear, Power0, Power1, Power2, Power3, Power4 };\ No newline at end of filediff --git a/src/esm/EaselPlugin.js b/src/esm/EaselPlugin.jsnew file mode 100644index 0000000..574b6fa--- /dev/null+++ b/src/esm/EaselPlugin.js@@ -0,0 +1,311 @@+/*!+ * VERSION: 0.2.2+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/++import { _gsScope } from "./TweenLite";+++ var _numExp = /(\d|\.)+/g,+ _ColorFilter, _ColorMatrixFilter,+ _colorProps = ["redMultiplier","greenMultiplier","blueMultiplier","alphaMultiplier","redOffset","greenOffset","blueOffset","alphaOffset"],+ _colorLookup = {aqua:[0,255,255],+ lime:[0,255,0],+ silver:[192,192,192],+ black:[0,0,0],+ maroon:[128,0,0],+ teal:[0,128,128],+ blue:[0,0,255],+ navy:[0,0,128],+ white:[255,255,255],+ fuchsia:[255,0,255],+ olive:[128,128,0],+ yellow:[255,255,0],+ orange:[255,165,0],+ gray:[128,128,128],+ purple:[128,0,128],+ green:[0,128,0],+ red:[255,0,0],+ pink:[255,192,203],+ cyan:[0,255,255],+ transparent:[255,255,255,0]},+ _parseColor = function(color) {+ if (color === "" || color == null || color === "none") {+ return _colorLookup.transparent;+ } else if (_colorLookup[color]) {+ return _colorLookup[color];+ } else if (typeof(color) === "number") {+ return [color >> 16, (color >> 8) & 255, color & 255];+ } else if (color.charAt(0) === "#") {+ if (color.length === 4) { //for shorthand like #9F0+ color = "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3);+ }+ color = parseInt(color.substr(1), 16);+ return [color >> 16, (color >> 8) & 255, color & 255];+ }+ return color.match(_numExp) || _colorLookup.transparent;+ },+ _parseColorFilter = function(t, v, pg) {+ if (!_ColorFilter) {+ _ColorFilter = (_gsScope.ColorFilter || _gsScope.createjs.ColorFilter);+ if (!_ColorFilter) {+ throw("EaselPlugin error: The EaselJS ColorFilter JavaScript file wasn't loaded.");+ }+ }+ var filters = t.filters || [],+ i = filters.length,+ c, s, e, a, p;+ while (--i > -1) {+ if (filters[i] instanceof _ColorFilter) {+ s = filters[i];+ break;+ }+ }+ if (!s) {+ s = new _ColorFilter();+ filters.push(s);+ t.filters = filters;+ }+ e = s.clone();+ if (v.tint != null) {+ c = _parseColor(v.tint);+ a = (v.tintAmount != null) ? Number(v.tintAmount) : 1;+ e.redOffset = Number(c[0]) * a;+ e.greenOffset = Number(c[1]) * a;+ e.blueOffset = Number(c[2]) * a;+ e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - a;+ } else {+ for (p in v) {+ if (p !== "exposure") if (p !== "brightness") {+ e[p] = Number(v[p]);+ }+ }+ }+ if (v.exposure != null) {+ e.redOffset = e.greenOffset = e.blueOffset = 255 * (Number(v.exposure) - 1);+ e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1;+ } else if (v.brightness != null) {+ a = Number(v.brightness) - 1;+ e.redOffset = e.greenOffset = e.blueOffset = (a > 0) ? a * 255 : 0;+ e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - Math.abs(a);+ }+ i = 8;+ while (--i > -1) {+ p = _colorProps[i];+ if (s[p] !== e[p]) {+ pg._addTween(s, p, s[p], e[p], "easel_colorFilter");+ }+ }+ pg._overwriteProps.push("easel_colorFilter");+ if (!t.cacheID) {+ throw("EaselPlugin warning: for filters to display in EaselJS, you must call the object's cache() method first. " + t);+ }+ },++ _idMatrix = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],+ _lumR = 0.212671,+ _lumG = 0.715160,+ _lumB = 0.072169,++ _applyMatrix = function(m, m2) {+ if (!(m instanceof Array) || !(m2 instanceof Array)) {+ return m2;+ }+ var temp = [],+ i = 0,+ z = 0,+ y, x;+ for (y = 0; y < 4; y++) {+ for (x = 0; x < 5; x++) {+ z = (x === 4) ? m[i + 4] : 0;+ temp[i + x] = m[i] * m2[x] + m[i+1] * m2[x + 5] + m[i+2] * m2[x + 10] + m[i+3] * m2[x + 15] + z;+ }+ i += 5;+ }+ return temp;+ },++ _setSaturation = function(m, n) {+ if (isNaN(n)) {+ return m;+ }+ var inv = 1 - n,+ r = inv * _lumR,+ g = inv * _lumG,+ b = inv * _lumB;+ return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m);+ },++ _colorize = function(m, color, amount) {+ if (isNaN(amount)) {+ amount = 1;+ }+ var c = _parseColor(color),+ r = c[0] / 255,+ g = c[1] / 255,+ b = c[2] / 255,+ inv = 1 - amount;+ return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m);+ },++ _setHue = function(m, n) {+ if (isNaN(n)) {+ return m;+ }+ n *= Math.PI / 180;+ var c = Math.cos(n),+ s = Math.sin(n);+ return _applyMatrix([(_lumR + (c * (1 - _lumR))) + (s * (-_lumR)), (_lumG + (c * (-_lumG))) + (s * (-_lumG)), (_lumB + (c * (-_lumB))) + (s * (1 - _lumB)), 0, 0, (_lumR + (c * (-_lumR))) + (s * 0.143), (_lumG + (c * (1 - _lumG))) + (s * 0.14), (_lumB + (c * (-_lumB))) + (s * -0.283), 0, 0, (_lumR + (c * (-_lumR))) + (s * (-(1 - _lumR))), (_lumG + (c * (-_lumG))) + (s * _lumG), (_lumB + (c * (1 - _lumB))) + (s * _lumB), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m);+ },++ _setContrast = function(m, n) {+ if (isNaN(n)) {+ return m;+ }+ n += 0.01;+ return _applyMatrix([n,0,0,0,128 * (1 - n), 0,n,0,0,128 * (1 - n), 0,0,n,0,128 * (1 - n), 0,0,0,1,0], m);+ },++ _parseColorMatrixFilter = function(t, v, pg) {+ if (!_ColorMatrixFilter) {+ _ColorMatrixFilter = (_gsScope.ColorMatrixFilter || _gsScope.createjs.ColorMatrixFilter);+ if (!_ColorMatrixFilter) {+ throw("EaselPlugin error: The EaselJS ColorMatrixFilter JavaScript file wasn't loaded.");+ }+ }+ var filters = t.filters || [],+ i = filters.length,+ matrix, startMatrix, s;+ while (--i > -1) {+ if (filters[i] instanceof _ColorMatrixFilter) {+ s = filters[i];+ break;+ }+ }+ if (!s) {+ s = new _ColorMatrixFilter(_idMatrix.slice());+ filters.push(s);+ t.filters = filters;+ }+ startMatrix = s.matrix;+ matrix = _idMatrix.slice();+ if (v.colorize != null) {+ matrix = _colorize(matrix, v.colorize, Number(v.colorizeAmount));+ }+ if (v.contrast != null) {+ matrix = _setContrast(matrix, Number(v.contrast));+ }+ if (v.hue != null) {+ matrix = _setHue(matrix, Number(v.hue));+ }+ if (v.saturation != null) {+ matrix = _setSaturation(matrix, Number(v.saturation));+ }++ i = matrix.length;+ while (--i > -1) {+ if (matrix[i] !== startMatrix[i]) {+ pg._addTween(startMatrix, i, startMatrix[i], matrix[i], "easel_colorMatrixFilter");+ }+ }++ pg._overwriteProps.push("easel_colorMatrixFilter");+ if (!t.cacheID) {+ throw("EaselPlugin warning: for filters to display in EaselJS, you must call the object's cache() method first. " + t);+ }++ pg._matrix = startMatrix;+ };+++ var EaselPlugin = _gsScope._gsDefine.plugin({+ propName: "easel",+ priority: -1,+ version: "0.2.2",+ API: 2,++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween, index) {+ this._target = target;+ var p, pt, tint, colorMatrix, end, labels, i;+ for (p in value) {++ end = value[p];+ if (typeof(end) === "function") {+ end = end(index, target);+ }+ if (p === "colorFilter" || p === "tint" || p === "tintAmount" || p === "exposure" || p === "brightness") {+ if (!tint) {+ _parseColorFilter(target, value.colorFilter || value, this);+ tint = true;+ }++ } else if (p === "saturation" || p === "contrast" || p === "hue" || p === "colorize" || p === "colorizeAmount") {+ if (!colorMatrix) {+ _parseColorMatrixFilter(target, value.colorMatrixFilter || value, this);+ colorMatrix = true;+ }++ } else if (p === "frame") {+ this._firstPT = pt = {_next:this._firstPT, t:target, p:"gotoAndStop", s:target.currentFrame, f:true, n:"frame", pr:0, type:0, m:Math.round};+ if (typeof(end) === "string" && end.charAt(1) !== "=" && (labels = target.labels)) {+ for (i = 0; i < labels.length; i++) {+ if (labels[i].label === end) {+ end = labels[i].position;+ }+ }+ }+ pt.c = (typeof(end) === "number") ? end - pt.s : parseFloat((end+"").split("=").join(""));+ if (pt._next) {+ pt._next._prev = pt;+ }++ } else if (target[p] != null) {+ this._firstPT = pt = {_next:this._firstPT, t:target, p:p, f:(typeof(target[p]) === "function"), n:p, pr:0, type:0};+ pt.s = (!pt.f) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();+ pt.c = (typeof(end) === "number") ? end - pt.s : (typeof(end) === "string") ? parseFloat(end.split("=").join("")) : 0;++ if (pt._next) {+ pt._next._prev = pt;+ }+ }++ }+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(v) {+ var pt = this._firstPT,+ min = 0.000001,+ val;+ while (pt) {+ val = pt.c * v + pt.s;+ if (pt.m) {+ val = pt.m(val, pt.t);+ } else if (val < min && val > -min) {+ val = 0;+ }+ if (pt.f) {+ pt.t[pt.p](val);+ } else {+ pt.t[pt.p] = val;+ }+ pt = pt._next;+ }+ if (this._target.cacheID) {+ this._target.updateCache();+ }+ }++ });+++export { EaselPlugin, EaselPlugin as default };\ No newline at end of filediff --git a/src/esm/EndArrayPlugin.js b/src/esm/EndArrayPlugin.jsnew file mode 100644index 0000000..d302ca7--- /dev/null+++ b/src/esm/EndArrayPlugin.js@@ -0,0 +1,68 @@+/*!+ * VERSION: 0.1.3+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */+import { _gsScope } from "./TweenLite";++export const EndArrayPlugin = _gsScope._gsDefine.plugin({+ propName: "endArray",+ API: 2,+ version: "0.1.3",++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween) {+ var i = value.length,+ a = this.a = [],+ start, end;+ this.target = target;+ this._mod = 0;+ if (!i) {+ return false;+ }+ while (--i > -1) {+ start = target[i];+ end = value[i];+ if (start !== end) {+ a.push({i:i, s:start, c:end - start});+ }+ }+ return true;+ },++ mod: function(lookup) {+ if (typeof(lookup.endArray) === "function") {+ this._mod = lookup.endArray;+ }+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(ratio) {+ var target = this.target,+ a = this.a,+ i = a.length,+ mod = this._mod,+ e, val;+ if (mod) {+ while (--i > -1) {+ e = a[i];+ target[e.i] = mod(e.s + e.c * ratio, target);+ }+ } else {+ while (--i > -1) {+ e = a[i];+ val = e.s + e.c * ratio;+ target[e.i] = (val < 0.000001 && val > -0.000001) ? 0 : val;+ }+ }+ }++ });++export { EndArrayPlugin as default };\ No newline at end of filediff --git a/src/esm/ModifiersPlugin.js b/src/esm/ModifiersPlugin.jsnew file mode 100644index 0000000..d53f39f--- /dev/null+++ b/src/esm/ModifiersPlugin.js@@ -0,0 +1,169 @@+/*!+ * VERSION: 0.0.4+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import { _gsScope } from "./TweenLite";+++ var _cssRatioSetter = function(pt, cssp, mod) { //Takes an individual CSSPropTween and converts it into a type:2 that has a setRatio that does everything the regular CSSPlugin.setRatio() method does but applying the mod() too. We do this to keep the main CSSPlugin.setRatio() as fast as possible (the vast majority of times, no mod() will be necessary)+ var type = pt.type,+ oldSetRatio = pt.setRatio,+ tween = cssp._tween,+ target = cssp._target;+ pt.type = 2;+ pt.m = mod;+ pt.setRatio = function(v) {+ var min = 0.000001,+ val, str, i;+ if (v === 1 && (tween._time === tween._duration || tween._time === 0)) {++ if (type !== 2) {+ if (pt.r && type !== -1) {+ val = Math.round(pt.s + pt.c);+ if (!type) {+ pt.t[pt.p] = mod.call(tween, val + pt.xs0, target, tween);+ } else if (type === 1) {+ str = pt.xs0 + val + pt.xs1;+ for (i = 1; i < pt.l; i++) {+ str += pt["xn"+i] + pt["xs"+(i+1)];+ }+ pt.t[pt.p] = mod.call(tween, str, target, tween);+ }+ } else {+ pt.t[pt.p] = mod.call(tween, pt.e, target, tween);+ }+ } else {+ oldSetRatio.call(pt, v);+ }++ } else if (v || !(tween._time === tween._duration || tween._time === 0) || tween._rawPrevTime === -0.000001) {+ val = pt.c * v + pt.s;+ if (pt.r) {+ val = Math.round(val);+ } else if (val < min) if (val > -min) {+ val = 0;+ }+ if (!type) {+ pt.t[pt.p] = mod.call(tween, val + pt.xs0, target, tween);+ } else if (type === 1) {+ str = pt.xs0 + val + pt.xs1;+ for (i = 1; i < pt.l; i++) {+ str += pt["xn"+i] + pt["xs"+(i+1)];+ }+ pt.t[pt.p] = mod.call(tween, str, target, tween);++ } else if (type === -1) { //non-tweening value+ pt.t[pt.p] = mod.call(tween, pt.xs0, target, tween);++ } else if (oldSetRatio) {+ oldSetRatio.call(pt, v);+ }++ } else {+ if (type !== 2) {+ pt.t[pt.p] = mod.call(tween, pt.b, target, tween);+ } else {+ oldSetRatio.call(pt, v);+ }+ }+ };+ },+ _modCSS = function(lookup, cssp) {+ var pt = cssp._firstPT,+ hasBezier = (lookup.rotation && cssp._overwriteProps.join("").indexOf("bezier") !== -1); //when a Bezier tween is applying autoRotation, it's a very special case we need to handle differently.+ if (lookup.scale) {+ lookup.scaleX = lookup.scaleY = lookup.scale;+ } else if (lookup.rotationZ) {+ lookup.rotation = lookup.rotationZ;+ }+ while (pt) {+ if (typeof(lookup[pt.p]) === "function") {+ _cssRatioSetter(pt, cssp, lookup[pt.p]);+ } else if (hasBezier && pt.n === "bezier" && pt.plugin._overwriteProps.join("").indexOf("rotation") !== -1) {+ pt.data.mod = lookup.rotation;+ }+ pt = pt._next;+ }+ },++ ModifiersPlugin = _gsScope._gsDefine.plugin({+ propName: "modifiers",+ version: "0.0.4",+ API: 2,++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween) {+ this._tween = tween;+ this._vars = value;+ return true;+ },++ initAll: function() {+ var tween = this._tween,+ lookup = this._vars,+ mpt = this,+ pt = tween._firstPT,+ val, next;+ //initAll() gets called for each and every ModifiersPlugin instance in a tween, so if there are multiple targets, there will be multiple instances. Since we're ripping through the whole tween (and all the PropTweens), we only need to run this code ONCE. So we're setting a toggle on the first PropTween that just tells us if we've done it already. We don't set it on the tween instance because if it gets invalidated, we don't want to have to track this property and reset it. PropTweens get blown away when a tween is invalidated.+ if (pt._modInitted) {+ return false;+ } else {+ pt._modInitted = 1;+ }+ while (pt) {+ next = pt._next; //record here, because it may get removed+ val = lookup[pt.n];+ if (pt.pg) {+ if (pt.t._propName === "css") { //handle CSSPlugin uniquely (for performance, due to the fact that the values almost always are a concatenation of numbers and strings, like suffixes, and we don't want to slow down the regular CSSPlugin setRatio() performance with conditional checks for if the value needs to be modded, so we pull any modding prop out and change it to a type:2 one that simply calls a setRatio() method where we encapsulate the modding and update all together. That way, it says in the main CSSProp linked list and just has some custom logic applied to it inside its setRatio())+ _modCSS(lookup, pt.t);+ } else if (pt.t !== mpt) { //don't run modProps on modProps :)+ val = lookup[pt.t._propName];+ pt.t._tween = tween;+ pt.t._mod((typeof(val) === "object") ? val : lookup);+ }+ } else if (typeof(val) === "function") {+ if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values)+ pt.t._applyPT.m = val;+ pt.t._tween = tween;+ } else {+ this._add(pt.t, pt.p, pt.s, pt.c, val);+ //remove from linked list+ if (next) {+ next._prev = pt._prev;+ }+ if (pt._prev) {+ pt._prev._next = next;+ } else if (tween._firstPT === pt) {+ tween._firstPT = next;+ }+ pt._next = pt._prev = null;+ tween._propLookup[pt.n] = mpt;+ }+ }+ pt = next;+ }+ return false;+ }++ }),+ p = ModifiersPlugin.prototype;++ p._add = function(target, p, s, c, mod) {+ this._addTween(target, p, s, s + c, p, mod);+ this._overwriteProps.push(p);+ };++ p = _gsScope._gsDefine.globals.TweenLite.version.split(".");+ if (Number(p[0]) <= 1 && Number(p[1]) < 19 && _gsScope.console) {+ console.log("ModifiersPlugin requires GSAP 1.19.0 or later.");+ }++export { ModifiersPlugin, ModifiersPlugin as default };\ No newline at end of filediff --git a/src/esm/PixiPlugin.js b/src/esm/PixiPlugin.jsnew file mode 100644index 0000000..307a870--- /dev/null+++ b/src/esm/PixiPlugin.js@@ -0,0 +1,463 @@+/*!+ * VERSION: 0.2.1+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * PixiPlugin is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import { _gsScope } from "./TweenLite";+++ var _numExp = /(\d|\.)+/g,+ _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,+ _colorLookup = {aqua:[0,255,255],+ lime:[0,255,0],+ silver:[192,192,192],+ black:[0,0,0],+ maroon:[128,0,0],+ teal:[0,128,128],+ blue:[0,0,255],+ navy:[0,0,128],+ white:[255,255,255],+ fuchsia:[255,0,255],+ olive:[128,128,0],+ yellow:[255,255,0],+ orange:[255,165,0],+ gray:[128,128,128],+ purple:[128,0,128],+ green:[0,128,0],+ red:[255,0,0],+ pink:[255,192,203],+ cyan:[0,255,255],+ transparent:[255,255,255,0]},+ _hue = function(h, m1, m2) {+ h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;+ return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;+ },+ /**+ * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if "format" parameter is "hsl", it will populate the array with hue, saturation, and lightness values. Or if "format" is "number", it'll return a number like 0xFF0000 instead of an array. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers).+ * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.+ * @param {(string)} format If "hsl", an hsl() or hsla() value will be returned instead of rgb() or rgba(). Or if "number", then a numeric value will be returned, like 0xFF0000. Default is rgb.+ * @return {(array|number)} An array containing red, green, and blue (and optionally alpha) in that order, or if the format parameter was "hsl", the array will contain hue, saturation and lightness (and optionally alpha) in that order. Or if "format" is defined as "number", it'll return a number like 0xFF0000. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and "format" is "hsl".+ */+ _parseColor = function(v, format) {+ var toHSL = (format === "hsl"),+ a, r, g, b, h, s, l, max, min, d, wasHSL;+ if (!v) {+ a = _colorLookup.black;+ } else if (typeof(v) === "number") {+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else {+ if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.+ v = v.substr(0, v.length - 1);+ }+ if (_colorLookup[v]) {+ a = _colorLookup[v];+ } else if (v.charAt(0) === "#") {+ if (v.length === 4) { //for shorthand like #9F0+ r = v.charAt(1);+ g = v.charAt(2);+ b = v.charAt(3);+ v = "#" + r + r + g + g + b + b;+ }+ v = parseInt(v.substr(1), 16);+ a = [v >> 16, (v >> 8) & 255, v & 255];+ } else if (v.substr(0, 3) === "hsl") {+ a = wasHSL = v.match(_numExp);+ if (!toHSL) {+ h = (Number(a[0]) % 360) / 360;+ s = Number(a[1]) / 100;+ l = Number(a[2]) / 100;+ g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;+ r = l * 2 - g;+ if (a.length > 3) {+ a[3] = Number(v[3]);+ }+ a[0] = _hue(h + 1 / 3, r, g);+ a[1] = _hue(h, r, g);+ a[2] = _hue(h - 1 / 3, r, g);+ } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place.+ return v.match(_relNumExp);+ }+ } else {+ a = v.match(_numExp) || _colorLookup.transparent;+ }+ a[0] = Number(a[0]);+ a[1] = Number(a[1]);+ a[2] = Number(a[2]);+ if (a.length > 3) {+ a[3] = Number(a[3]);+ }+ }+ if (toHSL && !wasHSL) {+ r = a[0] / 255;+ g = a[1] / 255;+ b = a[2] / 255;+ max = Math.max(r, g, b);+ min = Math.min(r, g, b);+ l = (max + min) / 2;+ if (max === min) {+ h = s = 0;+ } else {+ d = max - min;+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);+ h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4;+ h *= 60;+ }+ a[0] = (h + 0.5) | 0;+ a[1] = (s * 100 + 0.5) | 0;+ a[2] = (l * 100 + 0.5) | 0;+ }+ return (format === "number") ? (a[0] << 16 | a[1] << 8 | a[2]) : a;+ },+ _formatColors = function(s, toHSL) {+ var colors = (s + "").match(_colorExp) || [],+ charIndex = 0,+ parsed = "",+ i, color, temp;+ if (!colors.length) {+ return s;+ }+ for (i = 0; i < colors.length; i++) {+ color = colors[i];+ temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex);+ charIndex += temp.length + color.length;+ color = _parseColor(color, (toHSL ? "hsl" : "rgb"));+ if (color.length === 3) {+ color.push(1);+ }+ parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";+ }+ return parsed + s.substr(charIndex);+ }, _colorStringFilter,+ TweenLite = (_gsScope.GreenSockGlobals || _gsScope).TweenLite,+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.++ _idMatrix = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],+ _lumR = 0.212671,+ _lumG = 0.715160,+ _lumB = 0.072169,++ _applyMatrix = function(m, m2) {+ var temp = [],+ i = 0,+ z = 0,+ y, x;+ for (y = 0; y < 4; y++) {+ for (x = 0; x < 5; x++) {+ z = (x === 4) ? m[i + 4] : 0;+ temp[i + x] = m[i] * m2[x] + m[i+1] * m2[x + 5] + m[i+2] * m2[x + 10] + m[i+3] * m2[x + 15] + z;+ }+ i += 5;+ }+ return temp;+ },++ _setSaturation = function(m, n) {+ var inv = 1 - n,+ r = inv * _lumR,+ g = inv * _lumG,+ b = inv * _lumB;+ return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m);+ },++ _colorize = function(m, color, amount) {+ var c = _parseColor(color),+ r = c[0] / 255,+ g = c[1] / 255,+ b = c[2] / 255,+ inv = 1 - amount;+ return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m);+ },++ _setHue = function(m, n) {+ n *= Math.PI / 180;+ var c = Math.cos(n),+ s = Math.sin(n);+ return _applyMatrix([(_lumR + (c * (1 - _lumR))) + (s * (-_lumR)), (_lumG + (c * (-_lumG))) + (s * (-_lumG)), (_lumB + (c * (-_lumB))) + (s * (1 - _lumB)), 0, 0, (_lumR + (c * (-_lumR))) + (s * 0.143), (_lumG + (c * (1 - _lumG))) + (s * 0.14), (_lumB + (c * (-_lumB))) + (s * -0.283), 0, 0, (_lumR + (c * (-_lumR))) + (s * (-(1 - _lumR))), (_lumG + (c * (-_lumG))) + (s * _lumG), (_lumB + (c * (1 - _lumB))) + (s * _lumB), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m);+ },++ _setContrast = function(m, n) {+ return _applyMatrix([n,0,0,0,0.5 * (1 - n), 0,n,0,0,0.5 * (1 - n), 0,0,n,0,0.5 * (1 - n), 0,0,0,1,0], m);+ },++ _getFilter = function(t, type) {+ var filterClass = _gsScope.PIXI.filters[type],+ filters = t.filters || [],+ i = filters.length,+ filter;+ if (!filterClass) {+ throw("PixiPlugin error: " + type + " isn't present.");+ }+ while (--i > -1) {+ if (filters[i] instanceof filterClass) {+ return filters[i];+ }+ }+ filter = new filterClass();+ if (type === "BlurFilter") {+ filter.blur = 0;+ }+ filters.push(filter);+ t.filters = filters;+ return filter;+ },++ _addColorMatrixFilterCacheTween = function(p, pg, cache, vars) { //we cache the ColorMatrixFilter components in a _gsColorMatrixFilter object attached to the target object so that it's easy to grab the current value at any time.+ pg._addTween(cache, p, cache[p], vars[p], p);+ pg._overwriteProps.push(p);+ },++ _applyBrightnessToMatrix = function(brightness, matrix) {+ var temp = new _gsScope.PIXI.filters.ColorMatrixFilter();+ temp.matrix = matrix;+ temp.brightness(brightness, true);+ return temp.matrix;+ },++ _CMFdefaults = {contrast:1, saturation:1, colorizeAmount:0, colorize:"rgb(255,255,255)", hue:0, brightness:1},++ _parseColorMatrixFilter = function(t, v, pg) {+ var filter = _getFilter(t, "ColorMatrixFilter"),+ cache = t._gsColorMatrixFilter = t._gsColorMatrixFilter || {contrast:1, saturation:1, colorizeAmount:0, colorize:"rgb(255,255,255)", hue:0, brightness:1},+ combine = v.combineCMF && !("colorMatrixFilter" in v && !v.colorMatrixFilter),+ i, matrix, startMatrix;+ startMatrix = filter.matrix;+ if (v.resolution) {+ filter.resolution = v.resolution;+ }+ if (v.matrix && v.matrix.length === startMatrix.length) {+ matrix = v.matrix;+ if (cache.contrast !== 1) {+ _addColorMatrixFilterCacheTween("contrast", pg, cache, _CMFdefaults);+ }+ if (cache.hue) {+ _addColorMatrixFilterCacheTween("hue", pg, cache, _CMFdefaults);+ }+ if (cache.brightness !== 1) {+ _addColorMatrixFilterCacheTween("brightness", pg, cache, _CMFdefaults);+ }+ if (cache.colorizeAmount) {+ _addColorMatrixFilterCacheTween("colorize", pg, cache, _CMFdefaults);+ _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, _CMFdefaults);+ }+ if (cache.saturation !== 1) {+ _addColorMatrixFilterCacheTween("saturation", pg, cache, _CMFdefaults);+ }++ } else {+ matrix = _idMatrix.slice();+ if (v.contrast != null) {+ matrix = _setContrast(matrix, Number(v.contrast));+ _addColorMatrixFilterCacheTween("contrast", pg, cache, v);+ } else if (cache.contrast !== 1) {+ if (combine) {+ matrix = _setContrast(matrix, cache.contrast);+ } else {+ _addColorMatrixFilterCacheTween("contrast", pg, cache, _CMFdefaults);+ }+ }+ if (v.hue != null) {+ matrix = _setHue(matrix, Number(v.hue));+ _addColorMatrixFilterCacheTween("hue", pg, cache, v);+ } else if (cache.hue) {+ if (combine) {+ matrix = _setHue(matrix, cache.hue);+ } else {+ _addColorMatrixFilterCacheTween("hue", pg, cache, _CMFdefaults);+ }+ }+ if (v.brightness != null) {+ matrix = _applyBrightnessToMatrix(Number(v.brightness), matrix);+ _addColorMatrixFilterCacheTween("brightness", pg, cache, v);+ } else if (cache.brightness !== 1) {+ if (combine) {+ matrix = _applyBrightnessToMatrix(cache.brightness, matrix);+ } else {+ _addColorMatrixFilterCacheTween("brightness", pg, cache, _CMFdefaults);+ }+ }+ if (v.colorize != null) {+ v.colorizeAmount = ("colorizeAmount" in v) ? Number(v.colorizeAmount) : 1;+ matrix = _colorize(matrix, v.colorize, v.colorizeAmount);+ _addColorMatrixFilterCacheTween("colorize", pg, cache, v);+ _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, v);+ } else if (cache.colorizeAmount) {+ if (combine) {+ matrix = _colorize(matrix, cache.colorize, cache.colorizeAmount);+ } else {+ _addColorMatrixFilterCacheTween("colorize", pg, cache, _CMFdefaults);+ _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, _CMFdefaults);+ }+ }+ if (v.saturation != null) {+ matrix = _setSaturation(matrix, Number(v.saturation));+ _addColorMatrixFilterCacheTween("saturation", pg, cache, v);+ } else if (cache.saturation !== 1) {+ if (combine) {+ matrix = _setSaturation(matrix, cache.saturation);+ } else {+ _addColorMatrixFilterCacheTween("saturation", pg, cache, _CMFdefaults);+ }+ }+ }+ i = matrix.length;+ while (--i > -1) {+ if (matrix[i] !== startMatrix[i]) {+ pg._addTween(startMatrix, i, startMatrix[i], matrix[i], "colorMatrixFilter");+ }+ }+ pg._overwriteProps.push("colorMatrixFilter");+ },++ _addColorTween = function(target, p, value, colorSetter, plugin) {+ var pt = colorSetter._firstPT = {_next:colorSetter._firstPT, t:target, p:p, proxy:{}, f:(typeof(target[p]) === "function")};+ pt.proxy[p] = "rgb(" + _parseColor(!pt.f ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]()).join(",") + ")";+ plugin._addTween(pt.proxy, p, "get", ((typeof(value) === "number") ? "rgb(" + _parseColor(value, false).join(",") + ")" : value), p, null, null, _colorStringFilter);+ },++ //to improve performance, when a color is sensed, we hijack the setRatio() method of the plugin instance with a new function that this method spits back. This is a special method that handles parsing color values on-the-fly and turns them into numeric values which PixiJS requires. In other words, instead of "rgb(255, 0, 0)", PixiJS wants 0xFF0000. This also works with hsl() values.+ _buildColorSetter = function(tween, plugin) {+ var setRatio = plugin.setRatio, //save the original (super) setRatio() function+ func = function(v) {+ var pt = func._firstPT,+ val;+ setRatio.call(plugin, v);+ while (pt) {+ val = _parseColor(pt.proxy[pt.p], "number");+ if (pt.f) {+ pt.t[pt.p](val);+ } else {+ pt.t[pt.p] = val;+ }+ pt = pt._next;+ }+ if (func.graphics) { //in order for PixiJS to actually redraw GraphicsData, we've gotta increment the "dirty" and "clearDirty" values. If we don't do this, the values will be tween properly, but not rendered.+ func.graphics.dirty++;+ func.graphics.clearDirty++;+ }+ };+ plugin.setRatio = func;+ return func;+ },+++ _colorProps = {tint:1, lineColor:1, fillColor:1},+ _xyContexts = "position,scale,skew,pivot,anchor,tilePosition,tileScale".split(","),+ _contexts = {x:"position", y:"position", tileX:"tilePosition", tileY:"tilePosition"},+ _colorMatrixFilterProps = {colorMatrixFilter:1, saturation:1, contrast:1, hue:1, colorize:1, colorizeAmount:1, brightness:1, combineCMF:1},+ _DEG2RAD = Math.PI / 180,+ _degreesToRadians = function(value) {+ return (typeof(value) === "string" && value.charAt(1) === "=") ? value.substr(0, 2) + (parseFloat(value.substr(2)) * _DEG2RAD) : value * _DEG2RAD;+ }, i, p;++ //context setup...+ for (i = 0; i < _xyContexts.length; i++) {+ p = _xyContexts[i];+ _contexts[p + "X"] = p;+ _contexts[p + "Y"] = p;+ }++ //color parsing setup...+ for (p in _colorLookup) {+ _colorExp += "|" + p + "\\b";+ }+ _colorExp = new RegExp(_colorExp+")", "gi");+ _colorStringFilter = function(a) {+ var combined = a[0] + " " + a[1],+ toHSL;+ _colorExp.lastIndex = 0;+ if (_colorExp.test(combined)) {+ toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);+ a[0] = _formatColors(a[0], toHSL);+ a[1] = _formatColors(a[1], toHSL);+ }+ };++ if (!TweenLite.defaultStringFilter) {+ TweenLite.defaultStringFilter = _colorStringFilter;+ }++ var PixiPlugin = _gsScope._gsDefine.plugin({+ propName: "pixi",+ priority: 0,+ API: 2,+ global: true,+ version: "0.2.1",++ init: function (target, values, tween, index) {+ if (!target instanceof _gsScope.PIXI.DisplayObject) {+ return false;+ }+ var context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;+ for (p in values) {+ context = _contexts[p];+ value = values[p];+ if (typeof(value) === "function") {+ value = value(index || 0, target);+ }+ if (context) {+ axis = (p.charAt(p.length-1).toLowerCase().indexOf("x") !== -1) ? "x" : "y";+ this._addTween(target[context], axis, target[context][axis], (context === "skew") ? _degreesToRadians(value) : value, p);+ } else if (p === "scale" || p === "anchor" || p === "pivot" || p === "tileScale") {+ this._addTween(target[p], "x", target[p].x, value, p + "X");+ this._addTween(target[p], "y", target[p].y, value, p + "Y");+ } else if (p === "rotation") { //PIXI expects rotation in radians, but as a convenience we let folks define it in degrees and we do the conversion.+ this._addTween(target, p, target.rotation, _degreesToRadians(value), p);++ } else if (_colorMatrixFilterProps[p]) {+ if (!colorMatrix) {+ _parseColorMatrixFilter(target, values.colorMatrixFilter || values, this);+ colorMatrix = true;+ }+ } else if (p === "blur" || p === "blurX" || p === "blurY" || p === "blurPadding") {+ filter = _getFilter(target, "BlurFilter");+ this._addTween(filter, p, filter[p], value, p);+ if (values.blurPadding !== 0) {+ padding = values.blurPadding || Math.max(filter[p], value) * 2;+ i = target.filters.length;+ while (--i > -1) {+ target.filters[i].padding = Math.max(target.filters[i].padding, padding); //if we don't expand the padding on all the filters, it can look clipped.+ }+ }+ } else if (_colorProps[p]) {+ if (!colorSetter) {+ colorSetter = _buildColorSetter(tween, this);+ }+ if ((p === "lineColor" || p === "fillColor") && target instanceof _gsScope.PIXI.Graphics) {+ data = target.graphicsData;+ i = data.length;+ while (--i > -1) {+ _addColorTween(data[i], p, value, colorSetter, this);+ }+ colorSetter.graphics = target;+ } else {+ _addColorTween(target, p, value, colorSetter, this);+ }+ } else if (p === "autoAlpha") {+ this._firstPT = pt = {t: {setRatio:function() { target.visible = !!target.alpha; }}, p: "setRatio", s: 0, c: 1, f: 1, pg: 0, n: "visible", pr: 0, m: 0, _next:this._firstPT};+ if (pt._next) {+ pt._next._prev = pt;+ }+ this._addTween(target, "alpha", target.alpha, value, "alpha");+ this._overwriteProps.push("alpha", "visible");+ } else {+ this._addTween(target, p, target[p], value, p);+ }+ this._overwriteProps.push(p);+ }+ return true;+ }+ });++ PixiPlugin.colorProps = _colorProps;+ PixiPlugin.parseColor = _parseColor;+ PixiPlugin.formatColors = _formatColors;+ PixiPlugin.colorStringFilter = _colorStringFilter;++export { PixiPlugin, PixiPlugin as default };\ No newline at end of filediff --git a/src/esm/RoundPropsPlugin.js b/src/esm/RoundPropsPlugin.jsnew file mode 100644index 0000000..9827ff3--- /dev/null+++ b/src/esm/RoundPropsPlugin.js@@ -0,0 +1,98 @@+/*!+ * VERSION: 1.6.0+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import { _gsScope } from "./TweenLite";++export const RoundPropsPlugin = _gsScope._gsDefine.plugin({+ propName: "roundProps",+ version: "1.7.0",+ priority: -1,+ API: 2,++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween) {+ this._tween = tween;+ return true;+ }++ }),+ _getRoundFunc = function(v) { //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.+ var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()+ return function(n) {+ return ((Math.round(n / v) * v * p) | 0) / p;+ };+ },+ _roundLinkedList = function(node, mod) {+ while (node) {+ if (!node.f && !node.blob) {+ node.m = mod || Math.round;+ }+ node = node._next;+ }+ },+ p = RoundPropsPlugin.prototype;++ p._onInitAllProps = function() {+ var tween = this._tween,+ rp = tween.vars.roundProps,+ lookup = {},+ rpt = tween._propLookup.roundProps,+ pt, next, i, p;+ if (typeof(rp) === "object" && !rp.push) {+ for (p in rp) {+ lookup[p] = _getRoundFunc(rp[p]);+ }+ } else {+ if (typeof(rp) === "string") {+ rp = rp.split(",");+ }+ i = rp.length;+ while (--i > -1) {+ lookup[rp[i]] = Math.round;+ }+ }++ for (p in lookup) {+ pt = tween._firstPT;+ while (pt) {+ next = pt._next; //record here, because it may get removed+ if (pt.pg) {+ pt.t._mod(lookup);+ } else if (pt.n === p) {+ if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values)+ _roundLinkedList(pt.t._firstPT, lookup[p]);+ } else {+ this._add(pt.t, p, pt.s, pt.c, lookup[p]);+ //remove from linked list+ if (next) {+ next._prev = pt._prev;+ }+ if (pt._prev) {+ pt._prev._next = next;+ } else if (tween._firstPT === pt) {+ tween._firstPT = next;+ }+ pt._next = pt._prev = null;+ tween._propLookup[p] = rpt;+ }+ }+ pt = next;+ }+ }+ return false;+ };++ p._add = function(target, p, s, c, mod) {+ this._addTween(target, p, s, s + c, p, mod || Math.round);+ this._overwriteProps.push(p);+ };++export { RoundPropsPlugin as default };diff --git a/src/esm/ScrollToPlugin.js b/src/esm/ScrollToPlugin.jsnew file mode 100644index 0000000..6593b90--- /dev/null+++ b/src/esm/ScrollToPlugin.js@@ -0,0 +1,180 @@+/*!+ * VERSION: 1.9.1+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import { _gsScope } from "./TweenLite";+++var _doc = (_gsScope.document || {}).documentElement,+ _window = _gsScope,+ _max = function(element, axis) {+ var dim = (axis === "x") ? "Width" : "Height",+ scroll = "scroll" + dim,+ client = "client" + dim,+ body = document.body;+ return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || _doc[client] || body[client]) : element[scroll] - element["offset" + dim];+ },+ _unwrapElement = function(value) {+ if (typeof(value) === "string") {+ value = TweenLite.selector(value);+ }+ if (value.length && value !== _window && value[0] && value[0].style && !value.nodeType) {+ value = value[0];+ }+ return (value === _window || (value.nodeType && value.style)) ? value : null;+ },+ _buildGetter = function(e, axis) { //pass in an element and an axis ("x" or "y") and it'll return a getter function for the scroll position of that element (like scrollTop or scrollLeft, although if the element is the window, it'll use the pageXOffset/pageYOffset or the documentElement's scrollTop/scrollLeft or document.body's. Basically this streamlines things and makes a very fast getter across browsers.+ var p = "scroll" + ((axis === "x") ? "Left" : "Top");+ if (e === _window) {+ if (e.pageXOffset != null) {+ p = "page" + axis.toUpperCase() + "Offset";+ } else if (_doc[p] != null) {+ e = _doc;+ } else {+ e = document.body;+ }+ }+ return function() {+ return e[p];+ };+ },+ _getOffset = function(element, container) {+ var rect = _unwrapElement(element).getBoundingClientRect(),+ b = document.body,+ isRoot = (!container || container === _window || container === b),+ cRect = isRoot ? {top:_doc.clientTop - (window.pageYOffset || _doc.scrollTop || b.scrollTop || 0), left:_doc.clientLeft - (window.pageXOffset || _doc.scrollLeft || b.scrollLeft || 0)} : container.getBoundingClientRect(),+ offsets = {x: rect.left - cRect.left, y: rect.top - cRect.top};+ if (!isRoot && container) { //only add the current scroll position if it's not the window/body.+ offsets.x += _buildGetter(container, "x")();+ offsets.y += _buildGetter(container, "y")();+ }+ return offsets;+ /* PREVIOUS+ var rect = _unwrapElement(element).getBoundingClientRect(),+ isRoot = (!container || container === _window || container === document.body),+ cRect = (isRoot ? _doc : container).getBoundingClientRect(),+ offsets = {x: rect.left - cRect.left, y: rect.top - cRect.top};+ if (!isRoot && container) { //only add the current scroll position if it's not the window/body.+ offsets.x += _buildGetter(container, "x")();+ offsets.y += _buildGetter(container, "y")();+ }+ return offsets;+ */+ },+ _parseVal = function(value, target, axis) {+ var type = typeof(value);+ return !isNaN(value) ? parseFloat(value) : (type === "number" || (type === "string" && value.charAt(1) === "=")) ? value : (value === "max") ? _max(target, axis) : Math.min(_max(target, axis), _getOffset(value, target)[axis]);+ },++ ScrollToPlugin = _gsScope._gsDefine.plugin({+ propName: "scrollTo",+ API: 2,+ global: true,+ version:"1.9.1",++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween) {+ this._wdw = (target === _window);+ this._target = target;+ this._tween = tween;+ if (typeof(value) !== "object") {+ value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".+ if (typeof(value.y) === "string" && value.y !== "max" && value.y.charAt(1) !== "=") {+ value.x = value.y;+ }+ } else if (value.nodeType) {+ value = {y:value, x:value};+ }+ this.vars = value;+ this._autoKill = (value.autoKill !== false);+ this.getX = _buildGetter(target, "x");+ this.getY = _buildGetter(target, "y");+ this.x = this.xPrev = this.getX();+ this.y = this.yPrev = this.getY();+ if (value.x != null) {+ this._addTween(this, "x", this.x, _parseVal(value.x, target, "x") - (value.offsetX || 0), "scrollTo_x", true);+ this._overwriteProps.push("scrollTo_x");+ } else {+ this.skipX = true;+ }+ if (value.y != null) {+ this._addTween(this, "y", this.y, _parseVal(value.y, target, "y") - (value.offsetY || 0), "scrollTo_y", true);+ this._overwriteProps.push("scrollTo_y");+ } else {+ this.skipY = true;+ }+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(v) {+ this._super.setRatio.call(this, v);++ var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,+ y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,+ yDif = y - this.yPrev,+ xDif = x - this.xPrev,+ threshold = ScrollToPlugin.autoKillThreshold;++ if (this.x < 0) { //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example)+ this.x = 0;+ }+ if (this.y < 0) {+ this.y = 0;+ }+ if (this._autoKill) {+ //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.+ if (!this.skipX && (xDif > threshold || xDif < -threshold) && x < _max(this._target, "x")) {+ this.skipX = true; //if the user scrolls separately, we should stop tweening!+ }+ if (!this.skipY && (yDif > threshold || yDif < -threshold) && y < _max(this._target, "y")) {+ this.skipY = true; //if the user scrolls separately, we should stop tweening!+ }+ if (this.skipX && this.skipY) {+ this._tween.kill();+ if (this.vars.onAutoKill) {+ this.vars.onAutoKill.apply(this.vars.onAutoKillScope || this._tween, this.vars.onAutoKillParams || []);+ }+ }+ }+ if (this._wdw) {+ _window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);+ } else {+ if (!this.skipY) {+ this._target.scrollTop = this.y;+ }+ if (!this.skipX) {+ this._target.scrollLeft = this.x;+ }+ }+ this.xPrev = this.x;+ this.yPrev = this.y;+ }++ }),+ p = ScrollToPlugin.prototype;++ ScrollToPlugin.max = _max;+ ScrollToPlugin.getOffset = _getOffset;+ ScrollToPlugin.buildGetter = _buildGetter;+ ScrollToPlugin.autoKillThreshold = 7;++ p._kill = function(lookup) {+ if (lookup.scrollTo_x) {+ this.skipX = true;+ }+ if (lookup.scrollTo_y) {+ this.skipY = true;+ }+ return this._super._kill.call(this, lookup);+ };+++export { ScrollToPlugin, ScrollToPlugin as default };\ No newline at end of filediff --git a/src/esm/TEMPLATE_Plugin.js b/src/esm/TEMPLATE_Plugin.jsnew file mode 100644index 0000000..11fb70a--- /dev/null+++ b/src/esm/TEMPLATE_Plugin.js@@ -0,0 +1,74 @@+/*!+ * VERSION: 1.2.0+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * This file is to be used as a simple template for writing your own plugin. See the+ * TweenPlugin docs for more details.+ *+ * You can start by doing a search for "yourCustomProperty" and replace it with whatever the name+ * of your property is. This way of defining a plugin was introduced in version 1.9.0 - previous versions+ * of TweenLite won't work with this.+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import { _gsScope } from "./TweenLite";++export const YourPlugin = _gsScope._gsDefine.plugin({+ propName: "yourCustomProperty", //the name of the property that will get intercepted and handled by this plugin (obviously change it to whatever you want, typically it is camelCase starting with lowercase).+ priority: 0, //the priority in the rendering pipeline (0 by default). A priority of -1 would mean this plugin will run after all those with 0 or greater. A priority of 1 would get run before 0, etc. This only matters when a plugin relies on other plugins finishing their work before it runs (or visa-versa)+ API: 2, //the API should stay 2 - it just gives us a way to know the method/property structure so that if in the future we change to a different TweenPlugin architecture, we can identify this plugin's structure.+ version: "1.0.0", //your plugin's version number+ overwriteProps: ["yourCustomProperty"], //an array of property names whose tweens should be overwritten by this plugin. For example, if you create a "scale" plugin that handles both "scaleX" and "scaleY", the overwriteProps would be ["scaleX","scaleY"] so that if there's a scaleX or scaleY tween in-progress when a new "scale" tween starts (using this plugin), it would overwrite the scaleX or scaleY tween.++ /*+ * The init function is called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. It receives 3 parameters:+ * 1) target [object] - the target of the tween. In cases where the tween's original target is an array (or jQuery object), this target will be the individual object inside that array (a new plugin instance is created for each target in the array). For example, TweenLite.to([obj1, obj2, obj3], 1, {x:100}) the target will be obj1 or obj2 or obj3 rather than the array containing them.+ * 2) value [*] - whatever value is passed as the special property value. For example, TweenLite.to(element, 1, {yourCustomProperty:3}) the value would be 3. Or for TweenLite.to(element, 1, {yourCustomProperty:{subProp1:3, subProp2:"whatever"}});, value would be {subProp1:3, subProp2:"whatever"}.+ * 3) tween [TweenLite] - the TweenLite (or TweenMax) instance that is managing this plugin instance. This can be useful if you need to check certain state-related properties on the tween (maybe in the set method) like its duration or time. Most of the time, however, you don't need to do anything with the tween. It is provided just in case you want to reference it.+ * 4) index [integer] - the index number of the target in the tween. For example, if an array is passed in as the target (or selector text), this would be 0 for the first one, 1 for the second, 2 for the third, etc. This was introduced in GSAP 1.19.0+ *+ * This function should return true unless you want to have TweenLite/Max skip the plugin altogether and instead treat the property/value like a normal tween (as if the plugin wasn't activated). This is rarely useful, so you should almost always return true.+ */+ init: function(target, value, tween, index) {+ this._target = target; //we record the target so that we can refer to it in the set method when doing updates.++ /* Next, we create a property tween for "scaleX" and "scaleY" properties of our target+ * (we're just using them as a examples of how to set up a property tween with a name, start, and end value).+ * the _addTween() method accepts the following parameters:+ * 1) target [object] - target object whose property this tween will control.+ * 2) property [string] - the name of the property, like "scaleX" or "scaleY"+ * 3) start [number] - The starting value of the property. For example, if you're tweening from 0 to 100, start would be 0.+ * 4) end [number] - the ending value of the property. For example, if you're tweening from 0 to 100, end would be 100.+ * 5) overwriteProperty [string] - the name that gets registered as the overwrite property so that if another concurrent tween of the same target gets created and it is tweening a property with this name, this one will be overwritten. Typically this is the same as "property".+ * 6) round [boolean] - if true, the updated value on each update will be rounded to the nearest integer. [false by default]+ * You do NOT need to use _addTween() at all. It is merely a convenience. You can record your own values internally or whatever you want.+ */+ this._addTween(target, "scaleX", target.scaleX, value, "scaleX", false);+ this._addTween(target, "scaleY", target.scaleY, value, "scaleY", false);++ //now, just for kicks, we'll record the starting "alpha" value and amount of change so that we can manage this manually rather than _addTween() (again, totally fictitious, just for an example)+ this._alphaStart = target.alpha;+ this._alphaChange = value.alpha - target.alpha;++ //always return true unless we want to scrap the plugin and have the value treated as a normal property tween (very uncommon)+ return true;+ },++ //[optional] - called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.). If you're using this._super._addTween() for all your tweens and you don't need to do anything special on each frame besides updating those values, you can omit this "set" function altogether.+ set: function(ratio) {+ //since we used _addTween() inside init function, it created some property tweens that we'll update by calling the parent prototype's setRatio() (otherwise, the property tweens wouldn't get their values updated). this._super refers to the TweenPlugin prototype from which the plugin inherits (not that you need to worry about that).+ this._super.setRatio.call(this, ratio);++ //now manually set the alpha+ this._target.alpha = this._alphaStart + this._alphaChange * ratio;+ }++ });++// Now export it for ES6+export { YourPlugin, YourPlugin as default };\ No newline at end of filediff --git a/src/esm/TextPlugin.js b/src/esm/TextPlugin.jsnew file mode 100644index 0000000..d6d6d97--- /dev/null+++ b/src/esm/TextPlugin.js@@ -0,0 +1,156 @@+/*!+ * VERSION: 0.6.2+ * DATE: 2018-05-14+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import { _gsScope } from "./TweenLite";++var _getText = function(e) {+ var type = e.nodeType,+ result = "";+ if (type === 1 || type === 9 || type === 11) {+ if (typeof(e.textContent) === "string") {+ return e.textContent;+ } else {+ for ( e = e.firstChild; e; e = e.nextSibling ) {+ result += _getText(e);+ }+ }+ } else if (type === 3 || type === 4) {+ return e.nodeValue;+ }+ return result;+ },+ _emoji = "[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2694-\u2697]|\uD83E[\uDD10-\uDD5D]|[\uD800-\uDBFF][\uDC00-\uDFFF]",+ _emojiExp = new RegExp(_emoji),+ _emojiAndCharsExp = new RegExp(_emoji + "|.", "g"),+ _emojiSafeSplit = function(text, delimiter) {+ return ((delimiter === "" || !delimiter) && _emojiExp.test(text)) ? text.match(_emojiAndCharsExp) : text.split(delimiter || "");+ },+ /* //previous emoji-related splitting. New method above is faster and more concise.+ _emojiStart = 0xD800,+ _emojiEnd = 0xDBFF,+ _emojiLowStart = 0xDC00,+ _emojiRegionStart = 0x1F1E6,+ _emojiRegionEnd = 0x1F1FF,+ _emojiModStart = 0x1f3fb,+ _emojiModEnd = 0x1f3ff,+ _emojiPairCode = function(s) {+ return ((s.charCodeAt(0) - _emojiStart) << 10) + (s.charCodeAt(1) - _emojiLowStart) + 0x10000;+ },+ _emojiSafeSplit = function(text, delimiter) { //like calling String.split(delimiter) except that it keeps emoji characters together.+ if (delimiter !== "") {+ return text.split(delimiter);+ }+ var l = text.length,+ a = [],+ character, i, emojiPair1, emojiPair2, j;+ for (i = 0; i < l; i++) {+ character = text.charAt(i);+ if ((character.charCodeAt(0) >= _emojiStart && character.charCodeAt(0) <= _emojiEnd) || (text.charCodeAt(i+1) >= 0xFE00 && text.charCodeAt(i+1) <= 0xFE0F)) { //special emoji characters use 2 or 4 unicode characters that we must keep together.+ emojiPair1 = _emojiPairCode(text.substr(i, 2));+ emojiPair2 = _emojiPairCode(text.substr(i + 2, 2));+ j = ((emojiPair1 >= _emojiRegionStart && emojiPair1 <= _emojiRegionEnd && emojiPair2 >= _emojiRegionStart && emojiPair2 <= _emojiRegionEnd) || (emojiPair2 >= _emojiModStart && emojiPair2 <= _emojiModEnd)) ? 4 : 2;+ a.push(text.substr(i, j));+ i += j - 1;+ } else {+ a.push(character);+ }+ }+ return a;+ },+ */+ TextPlugin = _gsScope._gsDefine.plugin({+ propName: "text",+ API: 2,+ version:"0.6.2",++ //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.+ init: function(target, value, tween, index) {+ var i = target.nodeName.toUpperCase(),+ shrt;+ if (typeof(value) === "function") {+ value = value(index, target);+ }+ this._svg = (target.getBBox && (i === "TEXT" || i === "TSPAN"));+ if (!("innerHTML" in target) && !this._svg) {+ return false;+ }+ this._target = target;+ if (typeof(value) !== "object") {+ value = {value:value};+ }+ if (value.value === undefined) {+ this._text = this._original = [""];+ return true;+ }+ this._delimiter = value.delimiter || "";+ this._original = _emojiSafeSplit(_getText(target).replace(/\s+/g, " "), this._delimiter);+ this._text = _emojiSafeSplit(value.value.replace(/\s+/g, " "), this._delimiter);+ this._runBackwards = (tween.vars.runBackwards === true);+ if (this._runBackwards) {+ i = this._original;+ this._original = this._text;+ this._text = i;+ }+ if (typeof(value.newClass) === "string") {+ this._newClass = value.newClass;+ this._hasClass = true;+ }+ if (typeof(value.oldClass) === "string") {+ this._oldClass = value.oldClass;+ this._hasClass = true;+ }+ i = this._original.length - this._text.length;+ shrt = (i < 0) ? this._original : this._text;+ this._fillChar = value.fillChar || (value.padSpace ? " " : "");+ if (i < 0) {+ i = -i;+ }+ while (--i > -1) {+ shrt.push(this._fillChar);+ }+ return true;+ },++ //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)+ set: function(ratio) {+ if (ratio > 1) {+ ratio = 1;+ } else if (ratio < 0) {+ ratio = 0;+ }+ if (this._runBackwards) {+ ratio = 1 - ratio;+ }+ var l = this._text.length,+ i = (ratio * l + 0.5) | 0,+ applyNew, applyOld, str;+ if (this._hasClass) {+ applyNew = (this._newClass && i !== 0);+ applyOld = (this._oldClass && i !== l);+ str = (applyNew ? "<span class='" + this._newClass + "'>" : "") + this._text.slice(0, i).join(this._delimiter) + (applyNew ? "</span>" : "") + (applyOld ? "<span class='" + this._oldClass + "'>" : "") + this._delimiter + this._original.slice(i).join(this._delimiter) + (applyOld ? "</span>" : "");+ } else {+ str = this._text.slice(0, i).join(this._delimiter) + this._delimiter + this._original.slice(i).join(this._delimiter);+ }+ if (this._svg) { //SVG text elements don't have an "innerHTML" in Microsoft browsers.+ this._target.textContent = str;+ } else {+ this._target.innerHTML = (this._fillChar === " " && str.indexOf(" ") !== -1) ? str.split(" ").join(" ") : str;+ }+ }++ }),+ p = TextPlugin.prototype;++ p._newClass = p._oldClass = p._delimiter = "";+++export { TextPlugin, TextPlugin as default };\ No newline at end of filediff --git a/src/esm/TimelineLite.js b/src/esm/TimelineLite.jsnew file mode 100644index 0000000..b866236--- /dev/null+++ b/src/esm/TimelineLite.js@@ -0,0 +1,784 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */+import TweenLite, { _gsScope, Animation, SimpleTimeline } from "./TweenLite";++_gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function() {++ var TimelineLite = function(vars) {+ SimpleTimeline.call(this, vars);+ this._labels = {};+ this.autoRemoveChildren = (this.vars.autoRemoveChildren === true);+ this.smoothChildTiming = (this.vars.smoothChildTiming === true);+ this._sortChildren = true;+ this._onUpdate = this.vars.onUpdate;+ var v = this.vars,+ val, p;+ for (p in v) {+ val = v[p];+ if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) {+ v[p] = this._swapSelfInParams(val);+ }+ }+ if (_isArray(v.tweens)) {+ this.add(v.tweens, 0, v.align, v.stagger);+ }+ },+ _tinyNum = 0.0000000001,+ TweenLiteInternals = TweenLite._internals,+ _internals = TimelineLite._internals = {},+ _isSelector = TweenLiteInternals.isSelector,+ _isArray = TweenLiteInternals.isArray,+ _lazyTweens = TweenLiteInternals.lazyTweens,+ _lazyRender = TweenLiteInternals.lazyRender,+ _globals = _gsScope._gsDefine.globals,+ _copy = function(vars) {+ var copy = {}, p;+ for (p in vars) {+ copy[p] = vars[p];+ }+ return copy;+ },+ _applyCycle = function(vars, targets, i) {+ var alt = vars.cycle,+ p, val;+ for (p in alt) {+ val = alt[p];+ vars[p] = (typeof(val) === "function") ? val(i, targets[i]) : val[i % val.length];+ }+ delete vars.cycle;+ },+ _pauseCallback = _internals.pauseCallback = function() {},+ _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()+ var b = [],+ l = a.length,+ i;+ for (i = 0; i !== l; b.push(a[i++]));+ return b;+ },+ p = TimelineLite.prototype = new SimpleTimeline();++ TimelineLite.version = "1.20.5";+ p.constructor = TimelineLite;+ p.kill()._gc = p._forcingPlayhead = p._hasPause = false;++ /* might use later...+ //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales.+ function localToGlobal(time, animation) {+ while (animation) {+ time = (time / animation._timeScale) + animation._startTime;+ animation = animation.timeline;+ }+ return time;+ }++ //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales+ function globalToLocal(time, animation) {+ var scale = 1;+ time -= localToGlobal(0, animation);+ while (animation) {+ scale *= animation._timeScale;+ animation = animation.timeline;+ }+ return time * scale;+ }+ */++ p.to = function(target, duration, vars, position) {+ var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;+ return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position);+ };++ p.from = function(target, duration, vars, position) {+ return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, vars), position);+ };++ p.fromTo = function(target, duration, fromVars, toVars, position) {+ var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite;+ return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position);+ };++ p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}),+ cycle = vars.cycle,+ copy, i;+ if (typeof(targets) === "string") {+ targets = TweenLite.selector(targets) || targets;+ }+ targets = targets || [];+ if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.+ targets = _slice(targets);+ }+ stagger = stagger || 0;+ if (stagger < 0) {+ targets = _slice(targets);+ targets.reverse();+ stagger *= -1;+ }+ for (i = 0; i < targets.length; i++) {+ copy = _copy(vars);+ if (copy.startAt) {+ copy.startAt = _copy(copy.startAt);+ if (copy.startAt.cycle) {+ _applyCycle(copy.startAt, targets, i);+ }+ }+ if (cycle) {+ _applyCycle(copy, targets, i);+ if (copy.duration != null) {+ duration = copy.duration;+ delete copy.duration;+ }+ }+ tl.to(targets[i], duration, copy, i * stagger);+ }+ return this.add(tl, position);+ };++ p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ vars.immediateRender = (vars.immediateRender != false);+ vars.runBackwards = true;+ return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);+ };++ p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ toVars.startAt = fromVars;+ toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);+ return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);+ };++ p.call = function(callback, params, scope, position) {+ return this.add( TweenLite.delayedCall(0, callback, params, scope), position);+ };++ p.set = function(target, vars, position) {+ position = this._parseTimeOrLabel(position, 0, true);+ if (vars.immediateRender == null) {+ vars.immediateRender = (position === this._time && !this._paused);+ }+ return this.add( new TweenLite(target, 0, vars), position);+ };++ TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) {+ vars = vars || {};+ if (vars.smoothChildTiming == null) {+ vars.smoothChildTiming = true;+ }+ var tl = new TimelineLite(vars),+ root = tl._timeline,+ hasNegativeStart, time, tween, next;+ if (ignoreDelayedCalls == null) {+ ignoreDelayedCalls = true;+ }+ root._remove(tl, true);+ tl._startTime = 0;+ tl._rawPrevTime = tl._time = tl._totalTime = root._time;+ tween = root._first;+ while (tween) {+ next = tween._next;+ if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {+ time = tween._startTime - tween._delay;+ if (time < 0) {+ hasNegativeStart = 1;+ }+ tl.add(tween, time);+ }+ tween = next;+ }+ root.add(tl, 0);+ if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero.+ tl.totalDuration();+ }+ return tl;+ };++ p.add = function(value, position, align, stagger) {+ var curTime, l, i, child, tl, beforeRawTime;+ if (typeof(position) !== "number") {+ position = this._parseTimeOrLabel(position, 0, true, value);+ }+ if (!(value instanceof Animation)) {+ if ((value instanceof Array) || (value && value.push && _isArray(value))) {+ align = align || "normal";+ stagger = stagger || 0;+ curTime = position;+ l = value.length;+ for (i = 0; i < l; i++) {+ if (_isArray(child = value[i])) {+ child = new TimelineLite({tweens:child});+ }+ this.add(child, curTime);+ if (typeof(child) !== "string" && typeof(child) !== "function") {+ if (align === "sequence") {+ curTime = child._startTime + (child.totalDuration() / child._timeScale);+ } else if (align === "start") {+ child._startTime -= child.delay();+ }+ }+ curTime += stagger;+ }+ return this._uncache(true);+ } else if (typeof(value) === "string") {+ return this.addLabel(value, position);+ } else if (typeof(value) === "function") {+ value = TweenLite.delayedCall(0, value);+ } else {+ throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string.");+ }+ }++ SimpleTimeline.prototype.add.call(this, value, position);++ if (value._time) { //in case, for example, the _startTime is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning.+ value.render((this.rawTime() - value._startTime) * value._timeScale, false, false);+ }++ //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.+ if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) {+ //in case any of the ancestors had completed but should now be enabled...+ tl = this;+ beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect.+ while (tl._timeline) {+ if (beforeRawTime && tl._timeline.smoothChildTiming) {+ tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it.+ } else if (tl._gc) {+ tl._enabled(true, false);+ }+ tl = tl._timeline;+ }+ }++ return this;+ };++ p.remove = function(value) {+ if (value instanceof Animation) {+ this._remove(value, false);+ var tl = value._timeline = value.vars.useFrames ? Animation._rootFramesTimeline : Animation._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline.+ value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct.+ return this;+ } else if (value instanceof Array || (value && value.push && _isArray(value))) {+ var i = value.length;+ while (--i > -1) {+ this.remove(value[i]);+ }+ return this;+ } else if (typeof(value) === "string") {+ return this.removeLabel(value);+ }+ return this.kill(null, value);+ };++ p._remove = function(tween, skipDisable) {+ SimpleTimeline.prototype._remove.call(this, tween, skipDisable);+ var last = this._last;+ if (!last) {+ this._time = this._totalTime = this._duration = this._totalDuration = 0;+ } else if (this._time > this.duration()) {+ this._time = this._duration;+ this._totalTime = this._totalDuration;+ }+ return this;+ };++ p.append = function(value, offsetOrLabel) {+ return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value));+ };++ p.insert = p.insertMultiple = function(value, position, align, stagger) {+ return this.add(value, position || 0, align, stagger);+ };++ p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) {+ return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger);+ };++ p.addLabel = function(label, position) {+ this._labels[label] = this._parseTimeOrLabel(position);+ return this;+ };++ p.addPause = function(position, callback, params, scope) {+ var t = TweenLite.delayedCall(0, _pauseCallback, params, scope || this);+ t.vars.onComplete = t.vars.onReverseComplete = callback;+ t.data = "isPause";+ this._hasPause = true;+ return this.add(t, position);+ };++ p.removeLabel = function(label) {+ delete this._labels[label];+ return this;+ };++ p.getLabelTime = function(label) {+ return (this._labels[label] != null) ? this._labels[label] : -1;+ };++ p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) {+ var clippedDuration, i;+ //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration().+ if (ignore instanceof Animation && ignore.timeline === this) {+ this.remove(ignore);+ } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) {+ i = ignore.length;+ while (--i > -1) {+ if (ignore[i] instanceof Animation && ignore[i].timeline === this) {+ this.remove(ignore[i]);+ }+ }+ }+ clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.+ if (typeof(offsetOrLabel) === "string") {+ return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent);+ }+ offsetOrLabel = offsetOrLabel || 0;+ if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).+ i = timeOrLabel.indexOf("=");+ if (i === -1) {+ if (this._labels[timeOrLabel] == null) {+ return appendIfAbsent ? (this._labels[timeOrLabel] = clippedDuration + offsetOrLabel) : offsetOrLabel;+ }+ return this._labels[timeOrLabel] + offsetOrLabel;+ }+ offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1));+ timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : clippedDuration;+ } else if (timeOrLabel == null) {+ timeOrLabel = clippedDuration;+ }+ return Number(timeOrLabel) + offsetOrLabel;+ };++ p.seek = function(position, suppressEvents) {+ return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false));+ };++ p.stop = function() {+ return this.paused(true);+ };++ p.gotoAndPlay = function(position, suppressEvents) {+ return this.play(position, suppressEvents);+ };++ p.gotoAndStop = function(position, suppressEvents) {+ return this.pause(position, suppressEvents);+ };++ p.render = function(time, suppressEvents, force) {+ if (this._gc) {+ this._enabled(true, false);+ }+ var prevTime = this._time,+ totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),+ prevStart = this._startTime,+ prevTimeScale = this._timeScale,+ prevPaused = this._paused,+ tween, isComplete, next, callback, internalForce, pauseTween, curTime;+ if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).+ time += this._time - prevTime;+ }+ if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.+ this._totalTime = this._time = totalDur;+ if (!this._reversed) if (!this._hasPausedChild()) {+ isComplete = true;+ callback = "onComplete";+ internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {+ internalForce = true;+ if (this._rawPrevTime > _tinyNum) {+ callback = "onReverseComplete";+ }+ }+ }+ this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7.++ } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.+ this._totalTime = this._time = 0;+ if (prevTime !== 0 || (this._duration === 0 && this._rawPrevTime !== _tinyNum && (this._rawPrevTime > 0 || (time < 0 && this._rawPrevTime >= 0)))) {+ callback = "onReverseComplete";+ isComplete = this._reversed;+ }+ if (time < 0) {+ this._active = false;+ if (this._timeline.autoRemoveChildren && this._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing.+ internalForce = isComplete = true;+ callback = "onReverseComplete";+ } else if (this._rawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state.+ internalForce = true;+ }+ this._rawPrevTime = time;+ } else {+ this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good).+ tween = this._first;+ while (tween && tween._startTime === 0) {+ if (!tween._duration) {+ isComplete = false;+ }+ tween = tween._next;+ }+ }+ time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)+ if (!this._initted) {+ internalForce = true;+ }+ }++ } else {++ if (this._hasPause && !this._forcingPlayhead && !suppressEvents) {+ if (time >= prevTime) {+ tween = this._first;+ while (tween && tween._startTime <= time && !pauseTween) {+ if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && this._rawPrevTime === 0)) {+ pauseTween = tween;+ }+ tween = tween._next;+ }+ } else {+ tween = this._last;+ while (tween && tween._startTime >= time && !pauseTween) {+ if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {+ pauseTween = tween;+ }+ tween = tween._prev;+ }+ }+ if (pauseTween) {+ this._time = time = pauseTween._startTime;+ this._totalTime = time + (this._cycle * (this._totalDuration + this._repeatDelay));+ }+ }++ this._totalTime = this._time = this._rawPrevTime = time;+ }+ if ((this._time === prevTime || !this._first) && !force && !internalForce && !pauseTween) {+ return;+ } else if (!this._initted) {+ this._initted = true;+ }++ if (!this._active) if (!this._paused && this._time !== prevTime && time > 0) {+ this._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.+ }++ if (prevTime === 0) if (this.vars.onStart) if (this._time !== 0 || !this._duration) if (!suppressEvents) {+ this._callback("onStart");+ }++ curTime = this._time;+ if (curTime >= prevTime) {+ tween = this._first;+ while (tween) {+ next = tween._next; //record it here because the value could change after rendering...+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete+ break;+ } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) {+ if (pauseTween === tween) {+ this.pause();+ }+ if (!tween._reversed) {+ tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);+ } else {+ tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);+ }+ }+ tween = next;+ }+ } else {+ tween = this._last;+ while (tween) {+ next = tween._prev; //record it here because the value could change after rendering...+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete+ break;+ } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {+ if (pauseTween === tween) {+ pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse.+ while (pauseTween && pauseTween.endTime() > this._time) {+ pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force);+ pauseTween = pauseTween._prev;+ }+ pauseTween = null;+ this.pause();+ }+ if (!tween._reversed) {+ tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);+ } else {+ tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);+ }+ }+ tween = next;+ }+ }++ if (this._onUpdate) if (!suppressEvents) {+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.+ _lazyRender();+ }+ this._callback("onUpdate");+ }++ if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate+ if (isComplete) {+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values.+ _lazyRender();+ }+ if (this._timeline.autoRemoveChildren) {+ this._enabled(false, false);+ }+ this._active = false;+ }+ if (!suppressEvents && this.vars[callback]) {+ this._callback(callback);+ }+ }+ };++ p._hasPausedChild = function() {+ var tween = this._first;+ while (tween) {+ if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) {+ return true;+ }+ tween = tween._next;+ }+ return false;+ };++ p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) {+ ignoreBeforeTime = ignoreBeforeTime || -9999999999;+ var a = [],+ tween = this._first,+ cnt = 0;+ while (tween) {+ if (tween._startTime < ignoreBeforeTime) {+ //do nothing+ } else if (tween instanceof TweenLite) {+ if (tweens !== false) {+ a[cnt++] = tween;+ }+ } else {+ if (timelines !== false) {+ a[cnt++] = tween;+ }+ if (nested !== false) {+ a = a.concat(tween.getChildren(true, tweens, timelines));+ cnt = a.length;+ }+ }+ tween = tween._next;+ }+ return a;+ };++ p.getTweensOf = function(target, nested) {+ var disabled = this._gc,+ a = [],+ cnt = 0,+ tweens, i;+ if (disabled) {+ this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here.+ }+ tweens = TweenLite.getTweensOf(target);+ i = tweens.length;+ while (--i > -1) {+ if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) {+ a[cnt++] = tweens[i];+ }+ }+ if (disabled) {+ this._enabled(false, true);+ }+ return a;+ };++ p.recent = function() {+ return this._recent;+ };++ p._contains = function(tween) {+ var tl = tween.timeline;+ while (tl) {+ if (tl === this) {+ return true;+ }+ tl = tl.timeline;+ }+ return false;+ };++ p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) {+ ignoreBeforeTime = ignoreBeforeTime || 0;+ var tween = this._first,+ labels = this._labels,+ p;+ while (tween) {+ if (tween._startTime >= ignoreBeforeTime) {+ tween._startTime += amount;+ }+ tween = tween._next;+ }+ if (adjustLabels) {+ for (p in labels) {+ if (labels[p] >= ignoreBeforeTime) {+ labels[p] += amount;+ }+ }+ }+ return this._uncache(true);+ };++ p._kill = function(vars, target) {+ if (!vars && !target) {+ return this._enabled(false, false);+ }+ var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target),+ i = tweens.length,+ changed = false;+ while (--i > -1) {+ if (tweens[i]._kill(vars, target)) {+ changed = true;+ }+ }+ return changed;+ };++ p.clear = function(labels) {+ var tweens = this.getChildren(false, true, true),+ i = tweens.length;+ this._time = this._totalTime = 0;+ while (--i > -1) {+ tweens[i]._enabled(false, false);+ }+ if (labels !== false) {+ this._labels = {};+ }+ return this._uncache(true);+ };++ p.invalidate = function() {+ var tween = this._first;+ while (tween) {+ tween.invalidate();+ tween = tween._next;+ }+ return Animation.prototype.invalidate.call(this);;+ };++ p._enabled = function(enabled, ignoreTimeline) {+ if (enabled === this._gc) {+ var tween = this._first;+ while (tween) {+ tween._enabled(enabled, true);+ tween = tween._next;+ }+ }+ return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline);+ };++ p.totalTime = function(time, suppressEvents, uncapped) {+ this._forcingPlayhead = true;+ var val = Animation.prototype.totalTime.apply(this, arguments);+ this._forcingPlayhead = false;+ return val;+ };++ p.duration = function(value) {+ if (!arguments.length) {+ if (this._dirty) {+ this.totalDuration(); //just triggers recalculation+ }+ return this._duration;+ }+ if (this.duration() !== 0 && value !== 0) {+ this.timeScale(this._duration / value);+ }+ return this;+ };++ p.totalDuration = function(value) {+ if (!arguments.length) {+ if (this._dirty) {+ var max = 0,+ tween = this._last,+ prevStart = 999999999999,+ prev, end;+ while (tween) {+ prev = tween._prev; //record it here in case the tween changes position in the sequence...+ if (tween._dirty) {+ tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.+ }+ if (tween._startTime > prevStart && this._sortChildren && !tween._paused && !this._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence+ this._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel().+ this.add(tween, tween._startTime - tween._delay);+ this._calculatingDuration = 0;+ } else {+ prevStart = tween._startTime;+ }+ if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.+ max -= tween._startTime;+ if (this._timeline.smoothChildTiming) {+ this._startTime += tween._startTime / this._timeScale;+ this._time -= tween._startTime;+ this._totalTime -= tween._startTime;+ this._rawPrevTime -= tween._startTime;+ }+ this.shiftChildren(-tween._startTime, false, -9999999999);+ prevStart = 0;+ }+ end = tween._startTime + (tween._totalDuration / tween._timeScale);+ if (end > max) {+ max = end;+ }+ tween = prev;+ }+ this._duration = this._totalDuration = max;+ this._dirty = false;+ }+ return this._totalDuration;+ }+ return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this;+ };++ p.paused = function(value) {+ if (!value) { //if there's a pause directly at the spot from where we're unpausing, skip it.+ var tween = this._first,+ time = this._time;+ while (tween) {+ if (tween._startTime === time && tween.data === "isPause") {+ tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire.+ }+ tween = tween._next;+ }+ }+ return Animation.prototype.paused.apply(this, arguments);+ };++ p.usesFrames = function() {+ var tl = this._timeline;+ while (tl._timeline) {+ tl = tl._timeline;+ }+ return (tl === Animation._rootFramesTimeline);+ };++ p.rawTime = function(wrapRepeats) {+ return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale;+ };++ return TimelineLite;++ }, true);++export const TimelineLite = _gsScope.TimelineLite;+export { TimelineLite as default };diff --git a/src/esm/TimelineMax.js b/src/esm/TimelineMax.jsnew file mode 100644index 0000000..0c6ce69--- /dev/null+++ b/src/esm/TimelineMax.js@@ -0,0 +1,524 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++import TweenLite, { _gsScope, Ease, Animation } from "./TweenLite";+import TimelineLite from "./TimelineLite";++_gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function() {++ var TimelineMax = function(vars) {+ TimelineLite.call(this, vars);+ this._repeat = this.vars.repeat || 0;+ this._repeatDelay = this.vars.repeatDelay || 0;+ this._cycle = 0;+ this._yoyo = (this.vars.yoyo === true);+ this._dirty = true;+ },+ _tinyNum = 0.0000000001,+ TweenLiteInternals = TweenLite._internals,+ _lazyTweens = TweenLiteInternals.lazyTweens,+ _lazyRender = TweenLiteInternals.lazyRender,+ _globals = _gsScope._gsDefine.globals,+ _easeNone = new Ease(null, null, 1, 0),+ p = TimelineMax.prototype = new TimelineLite();++ p.constructor = TimelineMax;+ p.kill()._gc = false;+ TimelineMax.version = "1.20.5";++ p.invalidate = function() {+ this._yoyo = (this.vars.yoyo === true);+ this._repeat = this.vars.repeat || 0;+ this._repeatDelay = this.vars.repeatDelay || 0;+ this._uncache(true);+ return TimelineLite.prototype.invalidate.call(this);+ };++ p.addCallback = function(callback, position, params, scope) {+ return this.add( TweenLite.delayedCall(0, callback, params, scope), position);+ };++ p.removeCallback = function(callback, position) {+ if (callback) {+ if (position == null) {+ this._kill(null, callback);+ } else {+ var a = this.getTweensOf(callback, false),+ i = a.length,+ time = this._parseTimeOrLabel(position);+ while (--i > -1) {+ if (a[i]._startTime === time) {+ a[i]._enabled(false, false);+ }+ }+ }+ }+ return this;+ };++ p.removePause = function(position) {+ return this.removeCallback(TimelineLite._internals.pauseCallback, position);+ };++ p.tweenTo = function(position, vars) {+ vars = vars || {};+ var copy = {ease:_easeNone, useFrames:this.usesFrames(), immediateRender:false, lazy:false},+ Engine = (vars.repeat && _globals.TweenMax) || TweenLite,+ duration, p, t;+ for (p in vars) {+ copy[p] = vars[p];+ }+ copy.time = this._parseTimeOrLabel(position);+ duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001;+ t = new Engine(this, duration, copy);+ copy.onStart = function() {+ t.target.paused(true);+ if (t.vars.time !== t.target.time() && duration === t.duration() && !t.isFromTo) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all.+ t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale ).render(t.time(), true, true); //render() right away to ensure that things look right, especially in the case of .tweenTo(0).+ }+ if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.+ vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error.+ }+ };+ return t;+ };++ p.tweenFromTo = function(fromPosition, toPosition, vars) {+ vars = vars || {};+ fromPosition = this._parseTimeOrLabel(fromPosition);+ vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], callbackScope:this};+ vars.immediateRender = (vars.immediateRender !== false);+ var t = this.tweenTo(toPosition, vars);+ t.isFromTo = 1; //to ensure we don't mess with the duration in the onStart (we've got the start and end values here, so lock it in)+ return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001);+ };++ p.render = function(time, suppressEvents, force) {+ if (this._gc) {+ this._enabled(true, false);+ }+ var prevTime = this._time,+ totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),+ dur = this._duration,+ prevTotalTime = this._totalTime,+ prevStart = this._startTime,+ prevTimeScale = this._timeScale,+ prevRawPrevTime = this._rawPrevTime,+ prevPaused = this._paused,+ prevCycle = this._cycle,+ tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;+ if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).+ time += this._time - prevTime;+ }+ if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.+ if (!this._locked) {+ this._totalTime = totalDur;+ this._cycle = this._repeat;+ }+ if (!this._reversed) if (!this._hasPausedChild()) {+ isComplete = true;+ callback = "onComplete";+ internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {+ internalForce = true;+ if (prevRawPrevTime > _tinyNum) {+ callback = "onReverseComplete";+ }+ }+ }+ this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ if (this._yoyo && (this._cycle & 1) !== 0) {+ this._time = time = 0;+ } else {+ this._time = dur;+ time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added.+ }++ } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.+ if (!this._locked) {+ this._totalTime = this._cycle = 0;+ }+ this._time = 0;+ if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !this._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare)+ callback = "onReverseComplete";+ isComplete = this._reversed;+ }+ if (time < 0) {+ this._active = false;+ if (this._timeline.autoRemoveChildren && this._reversed) {+ internalForce = isComplete = true;+ callback = "onReverseComplete";+ } else if (prevRawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state.+ internalForce = true;+ }+ this._rawPrevTime = time;+ } else {+ this._rawPrevTime = (dur || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good).+ tween = this._first;+ while (tween && tween._startTime === 0) {+ if (!tween._duration) {+ isComplete = false;+ }+ tween = tween._next;+ }+ }+ time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)+ if (!this._initted) {+ internalForce = true;+ }+ }++ } else {+ if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through.+ internalForce = true;+ }+ this._time = this._rawPrevTime = time;+ if (!this._locked) {+ this._totalTime = time;+ if (this._repeat !== 0) {+ cycleDuration = dur + this._repeatDelay;+ this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)+ if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration && prevTotalTime <= time) {+ this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)+ }+ this._time = this._totalTime - (this._cycle * cycleDuration);+ if (this._yoyo) if ((this._cycle & 1) !== 0) {+ this._time = dur - this._time;+ }+ if (this._time > dur) {+ this._time = dur;+ time = dur + 0.0001; //to avoid occasional floating point rounding error+ } else if (this._time < 0) {+ this._time = time = 0;+ } else {+ time = this._time;+ }+ }+ }++ if (this._hasPause && !this._forcingPlayhead && !suppressEvents) {+ time = this._time;+ if (time >= prevTime || (this._repeat && prevCycle !== this._cycle)) {+ tween = this._first;+ while (tween && tween._startTime <= time && !pauseTween) {+ if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && this._rawPrevTime === 0)) {+ pauseTween = tween;+ }+ tween = tween._next;+ }+ } else {+ tween = this._last;+ while (tween && tween._startTime >= time && !pauseTween) {+ if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {+ pauseTween = tween;+ }+ tween = tween._prev;+ }+ }+ if (pauseTween && pauseTween._startTime < dur) {+ this._time = time = pauseTween._startTime;+ this._totalTime = time + (this._cycle * (this._totalDuration + this._repeatDelay));+ }+ }++ }++ if (this._cycle !== prevCycle) if (!this._locked) {+ /*+ make sure children at the end/beginning of the timeline are rendered properly. If, for example,+ a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which+ would get transated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there+ could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So+ we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must+ ensure that zero-duration tweens at the very beginning or end of the TimelineMax work.+ */+ var backwards = (this._yoyo && (prevCycle & 1) !== 0),+ wrap = (backwards === (this._yoyo && (this._cycle & 1) !== 0)),+ recTotalTime = this._totalTime,+ recCycle = this._cycle,+ recRawPrevTime = this._rawPrevTime,+ recTime = this._time;++ this._totalTime = prevCycle * dur;+ if (this._cycle < prevCycle) {+ backwards = !backwards;+ } else {+ this._totalTime += dur;+ }+ this._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method.++ this._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime;+ this._cycle = prevCycle;+ this._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render()+ prevTime = (backwards) ? 0 : dur;+ this.render(prevTime, suppressEvents, (dur === 0));+ if (!suppressEvents) if (!this._gc) {+ if (this.vars.onRepeat) {+ this._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle.+ this._locked = false;+ this._callback("onRepeat");+ }+ }+ if (prevTime !== this._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort.+ return;+ }+ if (wrap) {+ this._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too.+ this._locked = true;+ prevTime = (backwards) ? dur + 0.0001 : -0.0001;+ this.render(prevTime, true, false);+ }+ this._locked = false;+ if (this._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible)+ return;+ }+ this._time = recTime;+ this._totalTime = recTotalTime;+ this._cycle = recCycle;+ this._rawPrevTime = recRawPrevTime;+ }++ if ((this._time === prevTime || !this._first) && !force && !internalForce && !pauseTween) {+ if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.+ this._callback("onUpdate");+ }+ return;+ } else if (!this._initted) {+ this._initted = true;+ }++ if (!this._active) if (!this._paused && this._totalTime !== prevTotalTime && time > 0) {+ this._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.+ }++ if (prevTotalTime === 0) if (this.vars.onStart) if (this._totalTime !== 0 || !this._totalDuration) if (!suppressEvents) {+ this._callback("onStart");+ }++ curTime = this._time;+ if (curTime >= prevTime) {+ tween = this._first;+ while (tween) {+ next = tween._next; //record it here because the value could change after rendering...+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete+ break;+ } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {+ if (pauseTween === tween) {+ this.pause();+ }+ if (!tween._reversed) {+ tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);+ } else {+ tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);+ }+ }+ tween = next;+ }+ } else {+ tween = this._last;+ while (tween) {+ next = tween._prev; //record it here because the value could change after rendering...+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete+ break;+ } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {+ if (pauseTween === tween) {+ pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse.+ while (pauseTween && pauseTween.endTime() > this._time) {+ pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force);+ pauseTween = pauseTween._prev;+ }+ pauseTween = null;+ this.pause();+ }+ if (!tween._reversed) {+ tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);+ } else {+ tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);+ }+ }+ tween = next;+ }+ }++ if (this._onUpdate) if (!suppressEvents) {+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.+ _lazyRender();+ }+ this._callback("onUpdate");+ }+ if (callback) if (!this._locked) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate+ if (isComplete) {+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values.+ _lazyRender();+ }+ if (this._timeline.autoRemoveChildren) {+ this._enabled(false, false);+ }+ this._active = false;+ }+ if (!suppressEvents && this.vars[callback]) {+ this._callback(callback);+ }+ }+ };++ p.getActive = function(nested, tweens, timelines) {+ if (nested == null) {+ nested = true;+ }+ if (tweens == null) {+ tweens = true;+ }+ if (timelines == null) {+ timelines = false;+ }+ var a = [],+ all = this.getChildren(nested, tweens, timelines),+ cnt = 0,+ l = all.length,+ i, tween;+ for (i = 0; i < l; i++) {+ tween = all[i];+ if (tween.isActive()) {+ a[cnt++] = tween;+ }+ }+ return a;+ };+++ p.getLabelAfter = function(time) {+ if (!time) if (time !== 0) { //faster than isNan()+ time = this._time;+ }+ var labels = this.getLabelsArray(),+ l = labels.length,+ i;+ for (i = 0; i < l; i++) {+ if (labels[i].time > time) {+ return labels[i].name;+ }+ }+ return null;+ };++ p.getLabelBefore = function(time) {+ if (time == null) {+ time = this._time;+ }+ var labels = this.getLabelsArray(),+ i = labels.length;+ while (--i > -1) {+ if (labels[i].time < time) {+ return labels[i].name;+ }+ }+ return null;+ };++ p.getLabelsArray = function() {+ var a = [],+ cnt = 0,+ p;+ for (p in this._labels) {+ a[cnt++] = {time:this._labels[p], name:p};+ }+ a.sort(function(a,b) {+ return a.time - b.time;+ });+ return a;+ };++ p.invalidate = function() {+ this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat+ return TimelineLite.prototype.invalidate.call(this);+ };+++//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------++ p.progress = function(value, suppressEvents) {+ return (!arguments.length) ? (this._time / this.duration()) || 0 : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);+ };++ p.totalProgress = function(value, suppressEvents) {+ return (!arguments.length) ? (this._totalTime / this.totalDuration()) || 0 : this.totalTime( this.totalDuration() * value, suppressEvents);+ };++ p.totalDuration = function(value) {+ if (!arguments.length) {+ if (this._dirty) {+ TimelineLite.prototype.totalDuration.call(this); //just forces refresh+ //Instead of Infinity, we use 999999999999 so that we can accommodate reverses.+ this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);+ }+ return this._totalDuration;+ }+ return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value );+ };++ p.time = function(value, suppressEvents) {+ if (!arguments.length) {+ return this._time;+ }+ if (this._dirty) {+ this.totalDuration();+ }+ if (value > this._duration) {+ value = this._duration;+ }+ if (this._yoyo && (this._cycle & 1) !== 0) {+ value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));+ } else if (this._repeat !== 0) {+ value += this._cycle * (this._duration + this._repeatDelay);+ }+ return this.totalTime(value, suppressEvents);+ };++ p.repeat = function(value) {+ if (!arguments.length) {+ return this._repeat;+ }+ this._repeat = value;+ return this._uncache(true);+ };++ p.repeatDelay = function(value) {+ if (!arguments.length) {+ return this._repeatDelay;+ }+ this._repeatDelay = value;+ return this._uncache(true);+ };++ p.yoyo = function(value) {+ if (!arguments.length) {+ return this._yoyo;+ }+ this._yoyo = value;+ return this;+ };++ p.currentLabel = function(value) {+ if (!arguments.length) {+ return this.getLabelBefore(this._time + 0.00000001);+ }+ return this.seek(value, true);+ };++ return TimelineMax;++ }, true);++export const TimelineMax = _gsScope.TimelineMax;+export { TimelineLite, TimelineMax as default };\ No newline at end of filediff --git a/src/esm/TweenLite.js b/src/esm/TweenLite.jsnew file mode 100644index 0000000..99e411d--- /dev/null+++ b/src/esm/TweenLite.js@@ -0,0 +1,1967 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ */++/* ES6 changes:+ - declare and export _gsScope at top.+ - set const TweenLite = the result of the main function+ - export default TweenLite at the bottom+ - return TweenLite at the bottom of the main function+ - pass in _gsScope as the first parameter of the main function (which is actually at the bottom)+ - remove the "export to multiple environments" in Definition().+ */+export const _gsScope = (typeof(window) !== "undefined") ? window : (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this;++export const TweenLite = (function(window, moduleName) {++ "use strict";+ var _exports = {},+ _doc = window.document,+ _globals = window.GreenSockGlobals = window.GreenSockGlobals || window;+ if (_globals.TweenLite) {+ return _globals.TweenLite; //in case the core set of classes is already loaded, don't instantiate twice.+ }+ var _namespace = function(ns) {+ var a = ns.split("."),+ p = _globals, i;+ for (i = 0; i < a.length; i++) {+ p[a[i]] = p = p[a[i]] || {};+ }+ return p;+ },+ gs = _namespace("com.greensock"),+ _tinyNum = 0.0000000001,+ _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()+ var b = [],+ l = a.length,+ i;+ for (i = 0; i !== l; b.push(a[i++])) {}+ return b;+ },+ _emptyFunc = function() {},+ _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)+ var toString = Object.prototype.toString,+ array = toString.call([]);+ return function(obj) {+ return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array));+ };+ }()),+ a, i, p, _ticker, _tickerActive,+ _defLookup = {},++ /**+ * @constructor+ * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition.+ * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is+ * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin+ * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally.+ *+ * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found,+ * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere,+ * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so+ * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything+ * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock+ * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could+ * sandbox the banner one like:+ *+ * <script>+ * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever.+ * </script>+ * <script src="js/greensock/v1.7/TweenMax.js"></script>+ * <script>+ * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)+ * </script>+ * <script src="js/greensock/v1.6/TweenMax.js"></script>+ * <script>+ * gs.TweenLite.to(...); //would use v1.7+ * TweenLite.to(...); //would use v1.6+ * </script>+ *+ * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".+ * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]+ * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.+ * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)+ */+ Definition = function(ns, dependencies, func, global) {+ this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses+ _defLookup[ns] = this;+ this.gsClass = null;+ this.func = func;+ var _classes = [];+ this.check = function(init) {+ var i = dependencies.length,+ missing = i,+ cur, a, n, cl;+ while (--i > -1) {+ if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {+ _classes[i] = cur.gsClass;+ missing--;+ } else if (init) {+ cur.sc.push(this);+ }+ }+ if (missing === 0 && func) {+ a = ("com.greensock." + ns).split(".");+ n = a.pop();+ cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);++ //exports to multiple environments+ if (global) {+ _globals[n] = _exports[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)+ /*+ if (typeof(module) !== "undefined" && module.exports) { //node+ if (ns === moduleName) {+ module.exports = _exports[moduleName] = cl;+ for (i in _exports) {+ cl[i] = _exports[i];+ }+ } else if (_exports[moduleName]) {+ _exports[moduleName][n] = cl;+ }+ } else if (typeof(define) === "function" && define.amd){ //AMD+ define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; });+ }+ */+ }+ for (i = 0; i < this.sc.length; i++) {+ this.sc[i].check();+ }+ }+ };+ this.check(true);+ },++ //used to create Definition instances (which basically registers a class that has dependencies).+ _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {+ return new Definition(ns, dependencies, func, global);+ },++ //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).+ _class = gs._class = function(ns, func, global) {+ func = func || function() {};+ _gsDefine(ns, [], function(){ return func; }, global);+ return func;+ };++ _gsDefine.globals = _globals;++++/*+ * ----------------------------------------------------------------+ * Ease+ * ----------------------------------------------------------------+ */+ var _baseParams = [0, 0, 1, 1],+ Ease = _class("easing.Ease", function(func, extraParams, type, power) {+ this._func = func;+ this._type = type || 0;+ this._power = power || 0;+ this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;+ }, true),+ _easeMap = Ease.map = {},+ _easeReg = Ease.register = function(ease, names, types, create) {+ var na = names.split(","),+ i = na.length,+ ta = (types || "easeIn,easeOut,easeInOut").split(","),+ e, name, j, type;+ while (--i > -1) {+ name = na[i];+ e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};+ j = ta.length;+ while (--j > -1) {+ type = ta[j];+ _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();+ }+ }+ };++ p = Ease.prototype;+ p._calcEnd = false;+ p.getRatio = function(p) {+ if (this._func) {+ this._params[0] = p;+ return this._func.apply(null, this._params);+ }+ var t = this._type,+ pw = this._power,+ r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;+ if (pw === 1) {+ r *= r;+ } else if (pw === 2) {+ r *= r * r;+ } else if (pw === 3) {+ r *= r * r * r;+ } else if (pw === 4) {+ r *= r * r * r * r;+ }+ return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);+ };++ //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)+ a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];+ i = a.length;+ while (--i > -1) {+ p = a[i]+",Power"+i;+ _easeReg(new Ease(null,null,1,i), p, "easeOut", true);+ _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));+ _easeReg(new Ease(null,null,3,i), p, "easeInOut");+ }+ _easeMap.linear = gs.easing.Linear.easeIn;+ _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks+++/*+ * ----------------------------------------------------------------+ * EventDispatcher+ * ----------------------------------------------------------------+ */+ var EventDispatcher = _class("events.EventDispatcher", function(target) {+ this._listeners = {};+ this._eventTarget = target || this;+ });+ p = EventDispatcher.prototype;++ p.addEventListener = function(type, callback, scope, useParam, priority) {+ priority = priority || 0;+ var list = this._listeners[type],+ index = 0,+ listener, i;+ if (this === _ticker && !_tickerActive) {+ _ticker.wake();+ }+ if (list == null) {+ this._listeners[type] = list = [];+ }+ i = list.length;+ while (--i > -1) {+ listener = list[i];+ if (listener.c === callback && listener.s === scope) {+ list.splice(i, 1);+ } else if (index === 0 && listener.pr < priority) {+ index = i + 1;+ }+ }+ list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});+ };++ p.removeEventListener = function(type, callback) {+ var list = this._listeners[type], i;+ if (list) {+ i = list.length;+ while (--i > -1) {+ if (list[i].c === callback) {+ list.splice(i, 1);+ return;+ }+ }+ }+ };++ p.dispatchEvent = function(type) {+ var list = this._listeners[type],+ i, t, listener;+ if (list) {+ i = list.length;+ if (i > 1) {+ list = list.slice(0); //in case addEventListener() is called from within a listener/callback (otherwise the index could change, resulting in a skip)+ }+ t = this._eventTarget;+ while (--i > -1) {+ listener = list[i];+ if (listener) {+ if (listener.up) {+ listener.c.call(listener.s || t, {type:type, target:t});+ } else {+ listener.c.call(listener.s || t);+ }+ }+ }+ }+ };+++/*+ * ----------------------------------------------------------------+ * Ticker+ * ----------------------------------------------------------------+ */+ var _reqAnimFrame = window.requestAnimationFrame,+ _cancelAnimFrame = window.cancelAnimationFrame,+ _getTime = Date.now || function() {return new Date().getTime();},+ _lastUpdate = _getTime();++ //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.+ a = ["ms","moz","webkit","o"];+ i = a.length;+ while (--i > -1 && !_reqAnimFrame) {+ _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];+ _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];+ }++ _class("Ticker", function(fps, useRAF) {+ var _self = this,+ _startTime = _getTime(),+ _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false,+ _lagThreshold = 500,+ _adjustedLag = 33,+ _tickWord = "tick", //helps reduce gc burden+ _fps, _req, _id, _gap, _nextTime,+ _tick = function(manual) {+ var elapsed = _getTime() - _lastUpdate,+ overlap, dispatch;+ if (elapsed > _lagThreshold) {+ _startTime += elapsed - _adjustedLag;+ }+ _lastUpdate += elapsed;+ _self.time = (_lastUpdate - _startTime) / 1000;+ overlap = _self.time - _nextTime;+ if (!_fps || overlap > 0 || manual === true) {+ _self.frame++;+ _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);+ dispatch = true;+ }+ if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.+ _id = _req(_tick);+ }+ if (dispatch) {+ _self.dispatchEvent(_tickWord);+ }+ };++ EventDispatcher.call(_self);+ _self.time = _self.frame = 0;+ _self.tick = function() {+ _tick(true);+ };++ _self.lagSmoothing = function(threshold, adjustedLag) {+ if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use.+ return (_lagThreshold < 1 / _tinyNum);+ }+ _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited+ _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);+ };++ _self.sleep = function() {+ if (_id == null) {+ return;+ }+ if (!_useRAF || !_cancelAnimFrame) {+ clearTimeout(_id);+ } else {+ _cancelAnimFrame(_id);+ }+ _req = _emptyFunc;+ _id = null;+ if (_self === _ticker) {+ _tickerActive = false;+ }+ };++ _self.wake = function(seamless) {+ if (_id !== null) {+ _self.sleep();+ } else if (seamless) {+ _startTime += -_lastUpdate + (_lastUpdate = _getTime());+ } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().+ _lastUpdate = _getTime() - _lagThreshold + 5;+ }+ _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;+ if (_self === _ticker) {+ _tickerActive = true;+ }+ _tick(2);+ };++ _self.fps = function(value) {+ if (!arguments.length) {+ return _fps;+ }+ _fps = value;+ _gap = 1 / (_fps || 60);+ _nextTime = this.time + _gap;+ _self.wake();+ };++ _self.useRAF = function(value) {+ if (!arguments.length) {+ return _useRAF;+ }+ _self.sleep();+ _useRAF = value;+ _self.fps(_fps);+ };+ _self.fps(fps);++ //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.+ setTimeout(function() {+ if (_useRAF === "auto" && _self.frame < 5 && (_doc || {}).visibilityState !== "hidden") {+ _self.useRAF(false);+ }+ }, 1500);+ });++ p = gs.Ticker.prototype = new gs.events.EventDispatcher();+ p.constructor = gs.Ticker;+++/*+ * ----------------------------------------------------------------+ * Animation+ * ----------------------------------------------------------------+ */+ var Animation = _class("core.Animation", function(duration, vars) {+ this.vars = vars = vars || {};+ this._duration = this._totalDuration = duration || 0;+ this._delay = Number(vars.delay) || 0;+ this._timeScale = 1;+ this._active = (vars.immediateRender === true);+ this.data = vars.data;+ this._reversed = (vars.reversed === true);++ if (!_rootTimeline) {+ return;+ }+ if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.+ _ticker.wake();+ }++ var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;+ tl.add(this, tl._time);++ if (this.vars.paused) {+ this.paused(true);+ }+ });++ _ticker = Animation.ticker = new gs.Ticker();+ p = Animation.prototype;+ p._dirty = p._gc = p._initted = p._paused = false;+ p._totalTime = p._time = 0;+ p._rawPrevTime = -1;+ p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;+ p._paused = false;+++ //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.+ var _checkTimeout = function() {+ if (_tickerActive && _getTime() - _lastUpdate > 2000 && ((_doc || {}).visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled.+ _ticker.wake();+ }+ var t = setTimeout(_checkTimeout, 2000);+ if (t.unref) {+ // allows a node process to exit even if the timeout’s callback hasn't been invoked. Without it, the node process could hang as this function is called every two seconds.+ t.unref();+ }+ };+ _checkTimeout();+++ p.play = function(from, suppressEvents) {+ if (from != null) {+ this.seek(from, suppressEvents);+ }+ return this.reversed(false).paused(false);+ };++ p.pause = function(atTime, suppressEvents) {+ if (atTime != null) {+ this.seek(atTime, suppressEvents);+ }+ return this.paused(true);+ };++ p.resume = function(from, suppressEvents) {+ if (from != null) {+ this.seek(from, suppressEvents);+ }+ return this.paused(false);+ };++ p.seek = function(time, suppressEvents) {+ return this.totalTime(Number(time), suppressEvents !== false);+ };++ p.restart = function(includeDelay, suppressEvents) {+ return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);+ };++ p.reverse = function(from, suppressEvents) {+ if (from != null) {+ this.seek((from || this.totalDuration()), suppressEvents);+ }+ return this.reversed(true).paused(false);+ };++ p.render = function(time, suppressEvents, force) {+ //stub - we override this method in subclasses.+ };++ p.invalidate = function() {+ this._time = this._totalTime = 0;+ this._initted = this._gc = false;+ this._rawPrevTime = -1;+ if (this._gc || !this.timeline) {+ this._enabled(true);+ }+ return this;+ };++ p.isActive = function() {+ var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.+ startTime = this._startTime,+ rawTime;+ return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale - 0.0000001));+ };++ p._enabled = function (enabled, ignoreTimeline) {+ if (!_tickerActive) {+ _ticker.wake();+ }+ this._gc = !enabled;+ this._active = this.isActive();+ if (ignoreTimeline !== true) {+ if (enabled && !this.timeline) {+ this._timeline.add(this, this._startTime - this._delay);+ } else if (!enabled && this.timeline) {+ this._timeline._remove(this, true);+ }+ }+ return false;+ };+++ p._kill = function(vars, target) {+ return this._enabled(false, false);+ };++ p.kill = function(vars, target) {+ this._kill(vars, target);+ return this;+ };++ p._uncache = function(includeSelf) {+ var tween = includeSelf ? this : this.timeline;+ while (tween) {+ tween._dirty = true;+ tween = tween.timeline;+ }+ return this;+ };++ p._swapSelfInParams = function(params) {+ var i = params.length,+ copy = params.concat();+ while (--i > -1) {+ if (params[i] === "{self}") {+ copy[i] = this;+ }+ }+ return copy;+ };++ p._callback = function(type) {+ var v = this.vars,+ callback = v[type],+ params = v[type + "Params"],+ scope = v[type + "Scope"] || v.callbackScope || this,+ l = params ? params.length : 0;+ switch (l) { //speed optimization; call() is faster than apply() so use it when there are only a few parameters (which is by far most common). Previously we simply did var v = this.vars; v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray);+ case 0: callback.call(scope); break;+ case 1: callback.call(scope, params[0]); break;+ case 2: callback.call(scope, params[0], params[1]); break;+ default: callback.apply(scope, params);+ }+ };++//----Animation getters/setters --------------------------------------------------------++ p.eventCallback = function(type, callback, params, scope) {+ if ((type || "").substr(0,2) === "on") {+ var v = this.vars;+ if (arguments.length === 1) {+ return v[type];+ }+ if (callback == null) {+ delete v[type];+ } else {+ v[type] = callback;+ v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;+ v[type + "Scope"] = scope;+ }+ if (type === "onUpdate") {+ this._onUpdate = callback;+ }+ }+ return this;+ };++ p.delay = function(value) {+ if (!arguments.length) {+ return this._delay;+ }+ if (this._timeline.smoothChildTiming) {+ this.startTime( this._startTime + value - this._delay );+ }+ this._delay = value;+ return this;+ };++ p.duration = function(value) {+ if (!arguments.length) {+ this._dirty = false;+ return this._duration;+ }+ this._duration = this._totalDuration = value;+ this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.+ if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {+ this.totalTime(this._totalTime * (value / this._duration), true);+ }+ return this;+ };++ p.totalDuration = function(value) {+ this._dirty = false;+ return (!arguments.length) ? this._totalDuration : this.duration(value);+ };++ p.time = function(value, suppressEvents) {+ if (!arguments.length) {+ return this._time;+ }+ if (this._dirty) {+ this.totalDuration();+ }+ return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);+ };++ p.totalTime = function(time, suppressEvents, uncapped) {+ if (!_tickerActive) {+ _ticker.wake();+ }+ if (!arguments.length) {+ return this._totalTime;+ }+ if (this._timeline) {+ if (time < 0 && !uncapped) {+ time += this.totalDuration();+ }+ if (this._timeline.smoothChildTiming) {+ if (this._dirty) {+ this.totalDuration();+ }+ var totalDuration = this._totalDuration,+ tl = this._timeline;+ if (time > totalDuration && !uncapped) {+ time = totalDuration;+ }+ this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);+ if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.+ this._uncache(false);+ }+ //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.+ if (tl._timeline) {+ while (tl._timeline) {+ if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {+ tl.totalTime(tl._totalTime, true);+ }+ tl = tl._timeline;+ }+ }+ }+ if (this._gc) {+ this._enabled(true, false);+ }+ if (this._totalTime !== time || this._duration === 0) {+ if (_lazyTweens.length) {+ _lazyRender();+ }+ this.render(time, suppressEvents, false);+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.+ _lazyRender();+ }+ }+ }+ return this;+ };++ p.progress = p.totalProgress = function(value, suppressEvents) {+ var duration = this.duration();+ return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents);+ };++ p.startTime = function(value) {+ if (!arguments.length) {+ return this._startTime;+ }+ if (value !== this._startTime) {+ this._startTime = value;+ if (this.timeline) if (this.timeline._sortChildren) {+ this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.+ }+ }+ return this;+ };++ p.endTime = function(includeRepeats) {+ return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale;+ };++ p.timeScale = function(value) {+ if (!arguments.length) {+ return this._timeScale;+ }+ var pauseTime, t;+ value = value || _tinyNum; //can't allow zero because it'll throw the math off+ if (this._timeline && this._timeline.smoothChildTiming) {+ pauseTime = this._pauseTime;+ t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();+ this._startTime = t - ((t - this._startTime) * this._timeScale / value);+ }+ this._timeScale = value;+ t = this.timeline;+ while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.+ t._dirty = true;+ t.totalDuration();+ t = t.timeline;+ }+ return this;+ };++ p.reversed = function(value) {+ if (!arguments.length) {+ return this._reversed;+ }+ if (value != this._reversed) {+ this._reversed = value;+ this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);+ }+ return this;+ };++ p.paused = function(value) {+ if (!arguments.length) {+ return this._paused;+ }+ var tl = this._timeline,+ raw, elapsed;+ if (value != this._paused) if (tl) {+ if (!_tickerActive && !value) {+ _ticker.wake();+ }+ raw = tl.rawTime();+ elapsed = raw - this._pauseTime;+ if (!value && tl.smoothChildTiming) {+ this._startTime += elapsed;+ this._uncache(false);+ }+ this._pauseTime = value ? raw : null;+ this._paused = value;+ this._active = this.isActive();+ if (!value && elapsed !== 0 && this._initted && this.duration()) {+ raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale;+ this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.+ }+ }+ if (this._gc && !value) {+ this._enabled(true, false);+ }+ return this;+ };+++/*+ * ----------------------------------------------------------------+ * SimpleTimeline+ * ----------------------------------------------------------------+ */+ var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {+ Animation.call(this, 0, vars);+ this.autoRemoveChildren = this.smoothChildTiming = true;+ });++ p = SimpleTimeline.prototype = new Animation();+ p.constructor = SimpleTimeline;+ p.kill()._gc = false;+ p._first = p._last = p._recent = null;+ p._sortChildren = false;++ p.add = p.insert = function(child, position, align, stagger) {+ var prevTween, st;+ child._startTime = Number(position || 0) + child._delay;+ if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).+ child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime);+ }+ if (child.timeline) {+ child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.+ }+ child.timeline = child._timeline = this;+ if (child._gc) {+ child._enabled(true, true);+ }+ prevTween = this._last;+ if (this._sortChildren) {+ st = child._startTime;+ while (prevTween && prevTween._startTime > st) {+ prevTween = prevTween._prev;+ }+ }+ if (prevTween) {+ child._next = prevTween._next;+ prevTween._next = child;+ } else {+ child._next = this._first;+ this._first = child;+ }+ if (child._next) {+ child._next._prev = child;+ } else {+ this._last = child;+ }+ child._prev = prevTween;+ this._recent = child;+ if (this._timeline) {+ this._uncache(true);+ }+ return this;+ };++ p._remove = function(tween, skipDisable) {+ if (tween.timeline === this) {+ if (!skipDisable) {+ tween._enabled(false, true);+ }++ if (tween._prev) {+ tween._prev._next = tween._next;+ } else if (this._first === tween) {+ this._first = tween._next;+ }+ if (tween._next) {+ tween._next._prev = tween._prev;+ } else if (this._last === tween) {+ this._last = tween._prev;+ }+ tween._next = tween._prev = tween.timeline = null;+ if (tween === this._recent) {+ this._recent = this._last;+ }++ if (this._timeline) {+ this._uncache(true);+ }+ }+ return this;+ };++ p.render = function(time, suppressEvents, force) {+ var tween = this._first,+ next;+ this._totalTime = this._time = this._rawPrevTime = time;+ while (tween) {+ next = tween._next; //record it here because the value could change after rendering...+ if (tween._active || (time >= tween._startTime && !tween._paused && !tween._gc)) {+ if (!tween._reversed) {+ tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);+ } else {+ tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);+ }+ }+ tween = next;+ }+ };++ p.rawTime = function() {+ if (!_tickerActive) {+ _ticker.wake();+ }+ return this._totalTime;+ };++/*+ * ----------------------------------------------------------------+ * TweenLite+ * ----------------------------------------------------------------+ */+ var TweenLite = _class("TweenLite", function(target, duration, vars) {+ Animation.call(this, duration, vars);+ this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)++ if (target == null) {+ throw "Cannot tween a null target.";+ }++ this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;++ var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),+ overwrite = this.vars.overwrite,+ i, targ, targets;++ this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];++ if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {+ this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()+ this._propLookup = [];+ this._siblings = [];+ for (i = 0; i < targets.length; i++) {+ targ = targets[i];+ if (!targ) {+ targets.splice(i--, 1);+ continue;+ } else if (typeof(targ) === "string") {+ targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings+ if (typeof(targ) === "string") {+ targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)+ }+ continue;+ } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.+ targets.splice(i--, 1);+ this._targets = targets = targets.concat(_slice(targ));+ continue;+ }+ this._siblings[i] = _register(targ, this, false);+ if (overwrite === 1) if (this._siblings[i].length > 1) {+ _applyOverwrite(targ, this, null, 1, this._siblings[i]);+ }+ }++ } else {+ this._propLookup = {};+ this._siblings = _register(target, this, false);+ if (overwrite === 1) if (this._siblings.length > 1) {+ _applyOverwrite(target, this, null, 1, this._siblings);+ }+ }+ if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {+ this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)+ this.render(Math.min(0, -this._delay)); //in case delay is negative+ }+ }, true),+ _isSelector = function(v) {+ return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.+ },+ _autoCSS = function(vars, target) {+ var css = {},+ p;+ for (p in vars) {+ if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.+ css[p] = vars[p];+ delete vars[p];+ }+ }+ vars.css = css;+ };++ p = TweenLite.prototype = new Animation();+ p.constructor = TweenLite;+ p.kill()._gc = false;++//----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------++ p.ratio = 0;+ p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;+ p._notifyPluginsOfEnabled = p._lazy = false;++ TweenLite.version = "1.20.5";+ TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);+ TweenLite.defaultOverwrite = "auto";+ TweenLite.ticker = _ticker;+ TweenLite.autoSleep = 120;+ TweenLite.lagSmoothing = function(threshold, adjustedLag) {+ _ticker.lagSmoothing(threshold, adjustedLag);+ };++ TweenLite.selector = window.$ || window.jQuery || function(e) {+ var selector = window.$ || window.jQuery;+ if (selector) {+ TweenLite.selector = selector;+ return selector(e);+ }+ if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary.+ _doc = window.document;+ }+ return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));+ };++ var _lazyTweens = [],+ _lazyLookup = {},+ _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,+ _relExp = /[\+-]=-?[\.\d]/,+ //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig,+ _setRatio = function(v) {+ var pt = this._firstPT,+ min = 0.000001,+ val;+ while (pt) {+ val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;+ if (pt.m) {+ val = pt.m.call(this._tween, val, this._target || pt.t, this._tween);+ } else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser+ val = 0;+ }+ if (!pt.f) {+ pt.t[pt.p] = val;+ } else if (pt.fp) {+ pt.t[pt.p](pt.fp, val);+ } else {+ pt.t[pt.p](val);+ }+ pt = pt._next;+ }+ },+ //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")).+ _blobDif = function(start, end, filter, pt) {+ var a = [],+ charIndex = 0,+ s = "",+ color = 0,+ startNums, endNums, num, i, l, nonNumbers, currentNum;+ a.start = start;+ a.end = end;+ start = a[0] = start + ""; //ensure values are strings+ end = a[1] = end + "";+ if (filter) {+ filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.+ start = a[0];+ end = a[1];+ }+ a.length = 0;+ startNums = start.match(_numbersExp) || [];+ endNums = end.match(_numbersExp) || [];+ if (pt) {+ pt._next = null;+ pt.blob = 1;+ a._firstPT = a._applyPT = pt; //apply last in the linked list (which means inserting it first)+ }+ l = endNums.length;+ for (i = 0; i < l; i++) {+ currentNum = endNums[i];+ nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex);+ s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.+ charIndex += nonNumbers.length;+ if (color) { //sense rgba() values and round them.+ color = (color + 1) % 5;+ } else if (nonNumbers.substr(-5) === "rgba(") {+ color = 1;+ }+ if (currentNum === startNums[i] || startNums.length <= i) {+ s += currentNum;+ } else {+ if (s) {+ a.push(s);+ s = "";+ }+ num = parseFloat(startNums[i]);+ a.push(num);+ a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, m:(color && color < 4) ? Math.round : 0};+ //note: we don't set _prev because we'll never need to remove individual PropTweens from this list.+ }+ charIndex += currentNum.length;+ }+ s += end.substr(charIndex);+ if (s) {+ a.push(s);+ }+ a.setRatio = _setRatio;+ if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value).+ a.end = null;+ }+ return a;+ },+ //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example.+ _addPropTween = function(target, prop, start, end, overwriteProp, mod, funcParam, stringFilter, index) {+ if (typeof(end) === "function") {+ end = end(index || 0, target);+ }+ var type = typeof(target[prop]),+ getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)),+ s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](),+ isRelative = (typeof(end) === "string" && end.charAt(1) === "="),+ pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0},+ blob;++ if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) {+ if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") {+ //a blob (string that has multiple numbers in it)+ pt.fp = funcParam;+ blob = _blobDif(s, (isRelative ? (parseFloat(pt.s) + pt.c) + (pt.s + "").replace(/[0-9\-\.]/g, "") : end), stringFilter || TweenLite.defaultStringFilter, pt);+ pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.+ } else {+ pt.s = parseFloat(s);+ if (!isRelative) {+ pt.c = (parseFloat(end) - pt.s) || 0;+ }+ }+ }+ if (pt.c) { //only add it to the linked list if there's a change.+ if ((pt._next = this._firstPT)) {+ pt._next._prev = pt;+ }+ this._firstPT = pt;+ return pt;+ }+ },+ _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.+ _plugins = TweenLite._plugins = {},+ _tweenLookup = _internals.tweenLookup = {},+ _tweenLookupNum = 0,+ _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1, id:1, yoyoEase:1},+ _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},+ _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),+ _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),+ _nextGCFrame = 30,+ _lazyRender = _internals.lazyRender = function() {+ var i = _lazyTweens.length,+ tween;+ _lazyLookup = {};+ while (--i > -1) {+ tween = _lazyTweens[i];+ if (tween && tween._lazy !== false) {+ tween.render(tween._lazy[0], tween._lazy[1], true);+ tween._lazy = false;+ }+ }+ _lazyTweens.length = 0;+ };++ _rootTimeline._startTime = _ticker.time;+ _rootFramesTimeline._startTime = _ticker.frame;+ _rootTimeline._active = _rootFramesTimeline._active = true;+ setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".++ Animation._updateRoot = TweenLite.render = function() {+ var i, a, p;+ if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.+ _lazyRender();+ }+ _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);+ _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);+ if (_lazyTweens.length) {+ _lazyRender();+ }+ if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to+ _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120);+ for (p in _tweenLookup) {+ a = _tweenLookup[p].tweens;+ i = a.length;+ while (--i > -1) {+ if (a[i]._gc) {+ a.splice(i, 1);+ }+ }+ if (a.length === 0) {+ delete _tweenLookup[p];+ }+ }+ //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly+ p = _rootTimeline._first;+ if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {+ while (p && p._paused) {+ p = p._next;+ }+ if (!p) {+ _ticker.sleep();+ }+ }+ }+ };++ _ticker.addEventListener("tick", Animation._updateRoot);++ var _register = function(target, tween, scrub) {+ var id = target._gsTweenID, a, i;+ if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {+ _tweenLookup[id] = {target:target, tweens:[]};+ }+ if (tween) {+ a = _tweenLookup[id].tweens;+ a[(i = a.length)] = tween;+ if (scrub) {+ while (--i > -1) {+ if (a[i] === tween) {+ a.splice(i, 1);+ }+ }+ }+ }+ return _tweenLookup[id].tweens;+ },+ _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) {+ var func = overwrittenTween.vars.onOverwrite, r1, r2;+ if (func) {+ r1 = func(overwrittenTween, overwritingTween, target, killedProps);+ }+ func = TweenLite.onOverwrite;+ if (func) {+ r2 = func(overwrittenTween, overwritingTween, target, killedProps);+ }+ return (r1 !== false && r2 !== false);+ },+ _applyOverwrite = function(target, tween, props, mode, siblings) {+ var i, changed, curTween, l;+ if (mode === 1 || mode >= 4) {+ l = siblings.length;+ for (i = 0; i < l; i++) {+ if ((curTween = siblings[i]) !== tween) {+ if (!curTween._gc) {+ if (curTween._kill(null, target, tween)) {+ changed = true;+ }+ }+ } else if (mode === 5) {+ break;+ }+ }+ return changed;+ }+ //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)+ var startTime = tween._startTime + _tinyNum,+ overlaps = [],+ oCount = 0,+ zeroDur = (tween._duration === 0),+ globalStart;+ i = siblings.length;+ while (--i > -1) {+ if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {+ //ignore+ } else if (curTween._timeline !== tween._timeline) {+ globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);+ if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {+ overlaps[oCount++] = curTween;+ }+ } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {+ overlaps[oCount++] = curTween;+ }+ }++ i = oCount;+ while (--i > -1) {+ curTween = overlaps[i];+ if (mode === 2) if (curTween._kill(props, target, tween)) {+ changed = true;+ }+ if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {+ if (mode !== 2 && !_onOverwrite(curTween, tween)) {+ continue;+ }+ if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.+ changed = true;+ }+ }+ }+ return changed;+ },+ _checkOverlap = function(tween, reference, zeroDur) {+ var tl = tween._timeline,+ ts = tl._timeScale,+ t = tween._startTime;+ while (tl._timeline) {+ t += tl._startTime;+ ts *= tl._timeScale;+ if (tl._paused) {+ return -100;+ }+ tl = tl._timeline;+ }+ t /= ts;+ return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;+ };+++//---- TweenLite instance methods -----------------------------------------------------------------------------++ p._init = function() {+ var v = this.vars,+ op = this._overwrittenProps,+ dur = this._duration,+ immediate = !!v.immediateRender,+ ease = v.ease,+ i, initPlugins, pt, p, startVars, l;+ if (v.startAt) {+ if (this._startAt) {+ this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.+ this._startAt.kill();+ }+ startVars = {};+ for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);+ startVars[p] = v.startAt[p];+ }+ startVars.data = "isStart";+ startVars.overwrite = false;+ startVars.immediateRender = true;+ startVars.lazy = (immediate && v.lazy !== false);+ startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).+ startVars.onUpdate = v.onUpdate;+ startVars.onUpdateParams = v.onUpdateParams;+ startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;+ this._startAt = TweenLite.to(this.target || {}, 0, startVars);+ if (immediate) {+ if (this._time > 0) {+ this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).+ } else if (dur !== 0) {+ return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.+ }+ }+ } else if (v.runBackwards && dur !== 0) {+ //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)+ if (this._startAt) {+ this._startAt.render(-1, true);+ this._startAt.kill();+ this._startAt = null;+ } else {+ if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0+ immediate = false;+ }+ pt = {};+ for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.+ if (!_reservedProps[p] || p === "autoCSS") {+ pt[p] = v[p];+ }+ }+ pt.overwrite = 0;+ pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.+ pt.lazy = (immediate && v.lazy !== false);+ pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)+ this._startAt = TweenLite.to(this.target, 0, pt);+ if (!immediate) {+ this._startAt._init(); //ensures that the initial values are recorded+ this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.+ if (this.vars.immediateRender) {+ this._startAt = null;+ }+ } else if (this._time === 0) {+ return;+ }+ }+ }+ this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;+ if (v.easeParams instanceof Array && ease.config) {+ this._ease = ease.config.apply(ease, v.easeParams);+ }+ this._easeType = this._ease._type;+ this._easePower = this._ease._power;+ this._firstPT = null;++ if (this._targets) {+ l = this._targets.length;+ for (i = 0; i < l; i++) {+ if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null), i) ) {+ initPlugins = true;+ }+ }+ } else {+ initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op, 0);+ }++ if (initPlugins) {+ TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite+ }+ if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.+ this._enabled(false, false);+ }+ if (v.runBackwards) {+ pt = this._firstPT;+ while (pt) {+ pt.s += pt.c;+ pt.c = -pt.c;+ pt = pt._next;+ }+ }+ this._onUpdate = v.onUpdate;+ this._initted = true;+ };++ p._initProps = function(target, propLookup, siblings, overwrittenProps, index) {+ var p, i, initPlugins, plugin, pt, v;+ if (target == null) {+ return false;+ }++ if (_lazyLookup[target._gsTweenID]) {+ _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)+ }++ if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.+ _autoCSS(this.vars, target);+ }+ for (p in this.vars) {+ v = this.vars[p];+ if (_reservedProps[p]) {+ if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {+ this.vars[p] = v = this._swapSelfInParams(v, this);+ }++ } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this, index)) {++ //t - target [object]+ //p - property [string]+ //s - start [number]+ //c - change [number]+ //f - isFunction [boolean]+ //n - name [string]+ //pg - isPlugin [boolean]+ //pr - priority [number]+ //m - mod [function | 0]+ this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority, m:0};+ i = plugin._overwriteProps.length;+ while (--i > -1) {+ propLookup[plugin._overwriteProps[i]] = this._firstPT;+ }+ if (plugin._priority || plugin._onInitAllProps) {+ initPlugins = true;+ }+ if (plugin._onDisable || plugin._onEnable) {+ this._notifyPluginsOfEnabled = true;+ }+ if (pt._next) {+ pt._next._prev = pt;+ }++ } else {+ propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter, index);+ }+ }++ if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)+ return this._initProps(target, propLookup, siblings, overwrittenProps, index);+ }+ if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {+ this._kill(propLookup, target);+ return this._initProps(target, propLookup, siblings, overwrittenProps, index);+ }+ if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.+ _lazyLookup[target._gsTweenID] = true;+ }+ return initPlugins;+ };++ p.render = function(time, suppressEvents, force) {+ var prevTime = this._time,+ duration = this._duration,+ prevRawPrevTime = this._rawPrevTime,+ isComplete, callback, pt, rawPrevTime;+ if (time >= duration - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.+ this._totalTime = this._time = duration;+ this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;+ if (!this._reversed ) {+ isComplete = true;+ callback = "onComplete";+ force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.+ }+ if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.+ if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.+ time = 0;+ }+ if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.+ force = true;+ if (prevRawPrevTime > _tinyNum) {+ callback = "onReverseComplete";+ }+ }+ this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ }++ } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.+ this._totalTime = this._time = 0;+ this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;+ if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) {+ callback = "onReverseComplete";+ isComplete = this._reversed;+ }+ if (time < 0) {+ this._active = false;+ if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.+ if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && this.data === "isPause")) {+ force = true;+ }+ this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ }+ }+ if (!this._initted || (this._startAt && this._startAt.progress())) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. Also, we check progress() because if startAt has already rendered at its end, we should force a render at its beginning. Otherwise, if you put the playhead directly on top of where a fromTo({immediateRender:false}) starts, and then move it backwards, the from() won't revert its values.+ force = true;+ }+ } else {+ this._totalTime = this._time = time;++ if (this._easeType) {+ var r = time / duration, type = this._easeType, pow = this._easePower;+ if (type === 1 || (type === 3 && r >= 0.5)) {+ r = 1 - r;+ }+ if (type === 3) {+ r *= 2;+ }+ if (pow === 1) {+ r *= r;+ } else if (pow === 2) {+ r *= r * r;+ } else if (pow === 3) {+ r *= r * r * r;+ } else if (pow === 4) {+ r *= r * r * r * r;+ }++ if (type === 1) {+ this.ratio = 1 - r;+ } else if (type === 2) {+ this.ratio = r;+ } else if (time / duration < 0.5) {+ this.ratio = r / 2;+ } else {+ this.ratio = 1 - (r / 2);+ }++ } else {+ this.ratio = this._ease.getRatio(time / duration);+ }+ }++ if (this._time === prevTime && !force) {+ return;+ } else if (!this._initted) {+ this._init();+ if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.+ return;+ } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {+ this._time = this._totalTime = prevTime;+ this._rawPrevTime = prevRawPrevTime;+ _lazyTweens.push(this);+ this._lazy = [time, suppressEvents];+ return;+ }+ //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.+ if (this._time && !isComplete) {+ this.ratio = this._ease.getRatio(this._time / duration);+ } else if (isComplete && this._ease._calcEnd) {+ this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);+ }+ }+ if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.+ this._lazy = false;+ }+ if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {+ this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.+ }+ if (prevTime === 0) {+ if (this._startAt) {+ if (time >= 0) {+ this._startAt.render(time, true, force);+ } else if (!callback) {+ callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.+ }+ }+ if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {+ this._callback("onStart");+ }+ }+ pt = this._firstPT;+ while (pt) {+ if (pt.f) {+ pt.t[pt.p](pt.c * this.ratio + pt.s);+ } else {+ pt.t[pt.p] = pt.c * this.ratio + pt.s;+ }+ pt = pt._next;+ }++ if (this._onUpdate) {+ if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.+ this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.+ }+ if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {+ this._callback("onUpdate");+ }+ }+ if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate+ if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values.+ this._startAt.render(time, true, force);+ }+ if (isComplete) {+ if (this._timeline.autoRemoveChildren) {+ this._enabled(false, false);+ }+ this._active = false;+ }+ if (!suppressEvents && this.vars[callback]) {+ this._callback(callback);+ }+ if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.+ this._rawPrevTime = 0;+ }+ }+ };++ p._kill = function(vars, target, overwritingTween) {+ if (vars === "all") {+ vars = null;+ }+ if (vars == null) if (target == null || target === this.target) {+ this._lazy = false;+ return this._enabled(false, false);+ }+ target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;+ var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline),+ i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed;+ if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {+ i = target.length;+ while (--i > -1) {+ if (this._kill(vars, target[i], overwritingTween)) {+ changed = true;+ }+ }+ } else {+ if (this._targets) {+ i = this._targets.length;+ while (--i > -1) {+ if (target === this._targets[i]) {+ propLookup = this._propLookup[i] || {};+ this._overwrittenProps = this._overwrittenProps || [];+ overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";+ break;+ }+ }+ } else if (target !== this.target) {+ return false;+ } else {+ propLookup = this._propLookup;+ overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";+ }++ if (propLookup) {+ killProps = vars || propLookup;+ record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)+ if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) {+ for (p in killProps) {+ if (propLookup[p]) {+ if (!killed) {+ killed = [];+ }+ killed.push(p);+ }+ }+ if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it).+ return false;+ }+ }++ for (p in killProps) {+ if ((pt = propLookup[p])) {+ if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween.+ if (pt.f) {+ pt.t[pt.p](pt.s);+ } else {+ pt.t[pt.p] = pt.s;+ }+ changed = true;+ }+ if (pt.pg && pt.t._kill(killProps)) {+ changed = true; //some plugins need to be notified so they can perform cleanup tasks first+ }+ if (!pt.pg || pt.t._overwriteProps.length === 0) {+ if (pt._prev) {+ pt._prev._next = pt._next;+ } else if (pt === this._firstPT) {+ this._firstPT = pt._next;+ }+ if (pt._next) {+ pt._next._prev = pt._prev;+ }+ pt._next = pt._prev = null;+ }+ delete propLookup[p];+ }+ if (record) {+ overwrittenProps[p] = 1;+ }+ }+ if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.+ this._enabled(false, false);+ }+ }+ }+ return changed;+ };++ p.invalidate = function() {+ if (this._notifyPluginsOfEnabled) {+ TweenLite._onPluginEvent("_onDisable", this);+ }+ this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null;+ this._notifyPluginsOfEnabled = this._active = this._lazy = false;+ this._propLookup = (this._targets) ? {} : [];+ Animation.prototype.invalidate.call(this);+ if (this.vars.immediateRender) {+ this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)+ this.render(Math.min(0, -this._delay)); //in case delay is negative.+ }+ return this;+ };++ p._enabled = function(enabled, ignoreTimeline) {+ if (!_tickerActive) {+ _ticker.wake();+ }+ if (enabled && this._gc) {+ var targets = this._targets,+ i;+ if (targets) {+ i = targets.length;+ while (--i > -1) {+ this._siblings[i] = _register(targets[i], this, true);+ }+ } else {+ this._siblings = _register(this.target, this, true);+ }+ }+ Animation.prototype._enabled.call(this, enabled, ignoreTimeline);+ if (this._notifyPluginsOfEnabled) if (this._firstPT) {+ return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);+ }+ return false;+ };+++//----TweenLite static methods -----------------------------------------------------++ TweenLite.to = function(target, duration, vars) {+ return new TweenLite(target, duration, vars);+ };++ TweenLite.from = function(target, duration, vars) {+ vars.runBackwards = true;+ vars.immediateRender = (vars.immediateRender != false);+ return new TweenLite(target, duration, vars);+ };++ TweenLite.fromTo = function(target, duration, fromVars, toVars) {+ toVars.startAt = fromVars;+ toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);+ return new TweenLite(target, duration, toVars);+ };++ TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {+ return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0});+ };++ TweenLite.set = function(target, vars) {+ return new TweenLite(target, 0, vars);+ };++ TweenLite.getTweensOf = function(target, onlyActive) {+ if (target == null) { return []; }+ target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;+ var i, a, j, t;+ if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {+ i = target.length;+ a = [];+ while (--i > -1) {+ a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));+ }+ i = a.length;+ //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)+ while (--i > -1) {+ t = a[i];+ j = i;+ while (--j > -1) {+ if (t === a[j]) {+ a.splice(i, 1);+ }+ }+ }+ } else if (target._gsTweenID) {+ a = _register(target).concat();+ i = a.length;+ while (--i > -1) {+ if (a[i]._gc || (onlyActive && !a[i].isActive())) {+ a.splice(i, 1);+ }+ }+ }+ return a || [];+ };++ TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {+ if (typeof(onlyActive) === "object") {+ vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)+ onlyActive = false;+ }+ var a = TweenLite.getTweensOf(target, onlyActive),+ i = a.length;+ while (--i > -1) {+ a[i]._kill(vars, target);+ }+ };++++/*+ * ----------------------------------------------------------------+ * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget)+ * ----------------------------------------------------------------+ */+ var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {+ this._overwriteProps = (props || "").split(",");+ this._propName = this._overwriteProps[0];+ this._priority = priority || 0;+ this._super = TweenPlugin.prototype;+ }, true);++ p = TweenPlugin.prototype;+ TweenPlugin.version = "1.19.0";+ TweenPlugin.API = 2;+ p._firstPT = null;+ p._addTween = _addPropTween;+ p.setRatio = _setRatio;++ p._kill = function(lookup) {+ var a = this._overwriteProps,+ pt = this._firstPT,+ i;+ if (lookup[this._propName] != null) {+ this._overwriteProps = [];+ } else {+ i = a.length;+ while (--i > -1) {+ if (lookup[a[i]] != null) {+ a.splice(i, 1);+ }+ }+ }+ while (pt) {+ if (lookup[pt.n] != null) {+ if (pt._next) {+ pt._next._prev = pt._prev;+ }+ if (pt._prev) {+ pt._prev._next = pt._next;+ pt._prev = null;+ } else if (this._firstPT === pt) {+ this._firstPT = pt._next;+ }+ }+ pt = pt._next;+ }+ return false;+ };++ p._mod = p._roundProps = function(lookup) {+ var pt = this._firstPT,+ val;+ while (pt) {+ val = lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ]);+ if (val && typeof(val) === "function") { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.+ if (pt.f === 2) {+ pt.t._applyPT.m = val;+ } else {+ pt.m = val;+ }+ }+ pt = pt._next;+ }+ };++ TweenLite._onPluginEvent = function(type, tween) {+ var pt = tween._firstPT,+ changed, pt2, first, last, next;+ if (type === "_onInitAllProps") {+ //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.+ while (pt) {+ next = pt._next;+ pt2 = first;+ while (pt2 && pt2.pr > pt.pr) {+ pt2 = pt2._next;+ }+ if ((pt._prev = pt2 ? pt2._prev : last)) {+ pt._prev._next = pt;+ } else {+ first = pt;+ }+ if ((pt._next = pt2)) {+ pt2._prev = pt;+ } else {+ last = pt;+ }+ pt = next;+ }+ pt = tween._firstPT = first;+ }+ while (pt) {+ if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {+ changed = true;+ }+ pt = pt._next;+ }+ return changed;+ };++ TweenPlugin.activate = function(plugins) {+ var i = plugins.length;+ while (--i > -1) {+ if (plugins[i].API === TweenPlugin.API) {+ _plugins[(new plugins[i]())._propName] = plugins[i];+ }+ }+ return true;+ };++ //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.+ _gsDefine.plugin = function(config) {+ if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }+ var propName = config.propName,+ priority = config.priority || 0,+ overwriteProps = config.overwriteProps,+ map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_mod", mod:"_mod", initAll:"_onInitAllProps"},+ Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",+ function() {+ TweenPlugin.call(this, propName, priority);+ this._overwriteProps = overwriteProps || [];+ }, (config.global === true)),+ p = Plugin.prototype = new TweenPlugin(propName),+ prop;+ p.constructor = Plugin;+ Plugin.API = config.API;+ for (prop in map) {+ if (typeof(config[prop]) === "function") {+ p[map[prop]] = config[prop];+ }+ }+ Plugin.version = config.version;+ TweenPlugin.activate([Plugin]);+ return Plugin;+ };+++ //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.+ a = window._gsQueue;+ if (a) {+ for (i = 0; i < a.length; i++) {+ a[i]();+ }+ for (p in _defLookup) {+ if (!_defLookup[p].func) {+ window.console.log("GSAP encountered missing dependency: " + p);+ }+ }+ }++ _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated++ return TweenLite;++})(_gsScope, "TweenLite");++const gs = _gsScope.com.greensock;+export { TweenLite as default };+export const SimpleTimeline = gs.core.SimpleTimeline;+export const Animation = gs.core.Animation;+export const {Ease, Linear, Power0, Power1, Power2, Power3, Power4, TweenPlugin} = _gsScope;+export const EventDispatcher = gs.events.EventDispatcher;diff --git a/src/esm/TweenMax.js b/src/esm/TweenMax.jsnew file mode 100644index 0000000..af0bf27--- /dev/null+++ b/src/esm/TweenMax.js@@ -0,0 +1,29 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/++import TweenLite, { TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear } from "./TweenLite";+import TweenMaxBase from "./TweenMaxBase";+import CSSPlugin from "./CSSPlugin";+import AttrPlugin from "./AttrPlugin";+import RoundPropsPlugin from "./RoundPropsPlugin";+import DirectionalRotationPlugin from "./DirectionalRotationPlugin";+import TimelineLite from "./TimelineLite";+import TimelineMax from "./TimelineMax";+import BezierPlugin from "./BezierPlugin";+import { Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase } from "./EasePack";++//the following two lines are designed to prevent tree shaking of the classes that were historically included with TweenMax (otherwise, folks would have to reference CSSPlugin, for example, to ensure their CSS-related animations worked)+export const TweenMax = TweenMaxBase;+TweenMax._autoActivated = [TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, RoundPropsPlugin, DirectionalRotationPlugin, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase];++export { TweenMax as default };+export { TweenLite, TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, DirectionalRotationPlugin, RoundPropsPlugin, TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase };diff --git a/src/esm/TweenMaxBase.js b/src/esm/TweenMaxBase.jsnew file mode 100644index 0000000..d3eac46--- /dev/null+++ b/src/esm/TweenMaxBase.js@@ -0,0 +1,637 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/++import TweenLite, { _gsScope, Animation, SimpleTimeline, Ease, Power0, Power1, Power2, Power3, Power4, Linear } from "./TweenLite";+++_gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function() {++ var _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()+ var b = [],+ l = a.length,+ i;+ for (i = 0; i !== l; b.push(a[i++]));+ return b;+ },+ _applyCycle = function(vars, targets, i) {+ var alt = vars.cycle,+ p, val;+ for (p in alt) {+ val = alt[p];+ vars[p] = (typeof(val) === "function") ? val(i, targets[i]) : val[i % val.length];+ }+ delete vars.cycle;+ },+ TweenMax = function(target, duration, vars) {+ TweenLite.call(this, target, duration, vars);+ this._cycle = 0;+ this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase);+ this._repeat = this.vars.repeat || 0;+ this._repeatDelay = this.vars.repeatDelay || 0;+ if (this._repeat) {+ this._uncache(true); //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.+ }+ this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)+ },+ _tinyNum = 0.0000000001,+ TweenLiteInternals = TweenLite._internals,+ _isSelector = TweenLiteInternals.isSelector,+ _isArray = TweenLiteInternals.isArray,+ p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),+ _blankArray = [];++ TweenMax.version = "1.20.5";+ p.constructor = TweenMax;+ p.kill()._gc = false;+ TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;+ TweenMax.getTweensOf = TweenLite.getTweensOf;+ TweenMax.lagSmoothing = TweenLite.lagSmoothing;+ TweenMax.ticker = TweenLite.ticker;+ TweenMax.render = TweenLite.render;++ p.invalidate = function() {+ this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase);+ this._repeat = this.vars.repeat || 0;+ this._repeatDelay = this.vars.repeatDelay || 0;+ this._yoyoEase = null;+ this._uncache(true);+ return TweenLite.prototype.invalidate.call(this);+ };++ p.updateTo = function(vars, resetDuration) {+ var curRatio = this.ratio,+ immediate = this.vars.immediateRender || vars.immediateRender,+ p;+ if (resetDuration && this._startTime < this._timeline._time) {+ this._startTime = this._timeline._time;+ this._uncache(false);+ if (this._gc) {+ this._enabled(true, false);+ } else {+ this._timeline.insert(this, this._startTime - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.+ }+ }+ for (p in vars) {+ this.vars[p] = vars[p];+ }+ if (this._initted || immediate) {+ if (resetDuration) {+ this._initted = false;+ if (immediate) {+ this.render(0, true, true);+ }+ } else {+ if (this._gc) {+ this._enabled(true, false);+ }+ if (this._notifyPluginsOfEnabled && this._firstPT) {+ TweenLite._onPluginEvent("_onDisable", this); //in case a plugin like MotionBlur must perform some cleanup tasks+ }+ if (this._time / this._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards.+ var prevTime = this._totalTime;+ this.render(0, true, false);+ this._initted = false;+ this.render(prevTime, true, false);+ } else {+ this._initted = false;+ this._init();+ if (this._time > 0 || immediate) {+ var inv = 1 / (1 - curRatio),+ pt = this._firstPT, endValue;+ while (pt) {+ endValue = pt.s + pt.c;+ pt.c *= inv;+ pt.s = endValue - pt.c;+ pt = pt._next;+ }+ }+ }+ }+ }+ return this;+ };++ p.render = function(time, suppressEvents, force) {+ if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly.+ this.invalidate();+ }+ var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),+ prevTime = this._time,+ prevTotalTime = this._totalTime,+ prevCycle = this._cycle,+ duration = this._duration,+ prevRawPrevTime = this._rawPrevTime,+ isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, yoyoEase;+ if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.+ this._totalTime = totalDur;+ this._cycle = this._repeat;+ if (this._yoyo && (this._cycle & 1) !== 0) {+ this._time = 0;+ this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;+ } else {+ this._time = duration;+ this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;+ }+ if (!this._reversed) {+ isComplete = true;+ callback = "onComplete";+ force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.+ }+ if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.+ if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.+ time = 0;+ }+ if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.+ force = true;+ if (prevRawPrevTime > _tinyNum) {+ callback = "onReverseComplete";+ }+ }+ this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ }++ } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.+ this._totalTime = this._time = this._cycle = 0;+ this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;+ if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) {+ callback = "onReverseComplete";+ isComplete = this._reversed;+ }+ if (time < 0) {+ this._active = false;+ if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.+ if (prevRawPrevTime >= 0) {+ force = true;+ }+ this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.+ }+ }+ if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.+ force = true;+ }+ } else {+ this._totalTime = this._time = time;+ if (this._repeat !== 0) {+ cycleDuration = duration + this._repeatDelay;+ this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)+ if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration && prevTotalTime <= time) {+ this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)+ }+ this._time = this._totalTime - (this._cycle * cycleDuration);+ if (this._yoyo) if ((this._cycle & 1) !== 0) {+ this._time = duration - this._time;+ yoyoEase = this._yoyoEase || this.vars.yoyoEase; //note: we don't set this._yoyoEase in _init() like we do other properties because it's TweenMax-specific and doing it here allows us to optimize performance (most tweens don't have a yoyoEase). Note that we also must skip the this.ratio calculation further down right after we _init() in this function, because we're doing it here.+ if (yoyoEase) {+ if (!this._yoyoEase) {+ if (yoyoEase === true && !this._initted) { //if it's not initted and yoyoEase is true, this._ease won't have been populated yet so we must discern it here.+ yoyoEase = this.vars.ease;+ this._yoyoEase = yoyoEase = !yoyoEase ? TweenLite.defaultEase : (yoyoEase instanceof Ease) ? yoyoEase : (typeof(yoyoEase) === "function") ? new Ease(yoyoEase, this.vars.easeParams) : Ease.map[yoyoEase] || TweenLite.defaultEase;+ } else {+ this._yoyoEase = yoyoEase = (yoyoEase === true) ? this._ease : (yoyoEase instanceof Ease) ? yoyoEase : Ease.map[yoyoEase];+ }+ }+ this.ratio = yoyoEase ? 1 - yoyoEase.getRatio((duration - this._time) / duration) : 0;+ }+ }+ if (this._time > duration) {+ this._time = duration;+ } else if (this._time < 0) {+ this._time = 0;+ }+ }+ if (this._easeType && !yoyoEase) {+ r = this._time / duration;+ type = this._easeType;+ pow = this._easePower;+ if (type === 1 || (type === 3 && r >= 0.5)) {+ r = 1 - r;+ }+ if (type === 3) {+ r *= 2;+ }+ if (pow === 1) {+ r *= r;+ } else if (pow === 2) {+ r *= r * r;+ } else if (pow === 3) {+ r *= r * r * r;+ } else if (pow === 4) {+ r *= r * r * r * r;+ }++ if (type === 1) {+ this.ratio = 1 - r;+ } else if (type === 2) {+ this.ratio = r;+ } else if (this._time / duration < 0.5) {+ this.ratio = r / 2;+ } else {+ this.ratio = 1 - (r / 2);+ }++ } else if (!yoyoEase) {+ this.ratio = this._ease.getRatio(this._time / duration);+ }++ }++ if (prevTime === this._time && !force && prevCycle === this._cycle) {+ if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.+ this._callback("onUpdate");+ }+ return;+ } else if (!this._initted) {+ this._init();+ if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.+ return;+ } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true.+ this._time = prevTime;+ this._totalTime = prevTotalTime;+ this._rawPrevTime = prevRawPrevTime;+ this._cycle = prevCycle;+ TweenLiteInternals.lazyTweens.push(this);+ this._lazy = [time, suppressEvents];+ return;+ }+ //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.+ if (this._time && !isComplete && !yoyoEase) {+ this.ratio = this._ease.getRatio(this._time / duration);+ } else if (isComplete && this._ease._calcEnd && !yoyoEase) {+ this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);+ }+ }+ if (this._lazy !== false) {+ this._lazy = false;+ }++ if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {+ this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.+ }+ if (prevTotalTime === 0) {+ if (this._initted === 2 && time > 0) {+ //this.invalidate();+ this._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true+ }+ if (this._startAt) {+ if (time >= 0) {+ this._startAt.render(time, true, force);+ } else if (!callback) {+ callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.+ }+ }+ if (this.vars.onStart) if (this._totalTime !== 0 || duration === 0) if (!suppressEvents) {+ this._callback("onStart");+ }+ }++ pt = this._firstPT;+ while (pt) {+ if (pt.f) {+ pt.t[pt.p](pt.c * this.ratio + pt.s);+ } else {+ pt.t[pt.p] = pt.c * this.ratio + pt.s;+ }+ pt = pt._next;+ }++ if (this._onUpdate) {+ if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.+ this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.+ }+ if (!suppressEvents) if (this._totalTime !== prevTotalTime || callback) {+ this._callback("onUpdate");+ }+ }+ if (this._cycle !== prevCycle) if (!suppressEvents) if (!this._gc) if (this.vars.onRepeat) {+ this._callback("onRepeat");+ }+ if (callback) if (!this._gc || force) { //check gc because there's a chance that kill() could be called in an onUpdate+ if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.+ this._startAt.render(time, true, force);+ }+ if (isComplete) {+ if (this._timeline.autoRemoveChildren) {+ this._enabled(false, false);+ }+ this._active = false;+ }+ if (!suppressEvents && this.vars[callback]) {+ this._callback(callback);+ }+ if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.+ this._rawPrevTime = 0;+ }+ }+ };++//---- STATIC FUNCTIONS -----------------------------------------------------------------------------------------------------------++ TweenMax.to = function(target, duration, vars) {+ return new TweenMax(target, duration, vars);+ };++ TweenMax.from = function(target, duration, vars) {+ vars.runBackwards = true;+ vars.immediateRender = (vars.immediateRender != false);+ return new TweenMax(target, duration, vars);+ };++ TweenMax.fromTo = function(target, duration, fromVars, toVars) {+ toVars.startAt = fromVars;+ toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);+ return new TweenMax(target, duration, toVars);+ };++ TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ stagger = stagger || 0;+ var delay = 0,+ a = [],+ finalComplete = function() {+ if (vars.onComplete) {+ vars.onComplete.apply(vars.onCompleteScope || this, arguments);+ }+ onCompleteAll.apply(onCompleteAllScope || vars.callbackScope || this, onCompleteAllParams || _blankArray);+ },+ cycle = vars.cycle,+ fromCycle = (vars.startAt && vars.startAt.cycle),+ l, copy, i, p;+ if (!_isArray(targets)) {+ if (typeof(targets) === "string") {+ targets = TweenLite.selector(targets) || targets;+ }+ if (_isSelector(targets)) {+ targets = _slice(targets);+ }+ }+ targets = targets || [];+ if (stagger < 0) {+ targets = _slice(targets);+ targets.reverse();+ stagger *= -1;+ }+ l = targets.length - 1;+ for (i = 0; i <= l; i++) {+ copy = {};+ for (p in vars) {+ copy[p] = vars[p];+ }+ if (cycle) {+ _applyCycle(copy, targets, i);+ if (copy.duration != null) {+ duration = copy.duration;+ delete copy.duration;+ }+ }+ if (fromCycle) {+ fromCycle = copy.startAt = {};+ for (p in vars.startAt) {+ fromCycle[p] = vars.startAt[p];+ }+ _applyCycle(copy.startAt, targets, i);+ }+ copy.delay = delay + (copy.delay || 0);+ if (i === l && onCompleteAll) {+ copy.onComplete = finalComplete;+ }+ a[i] = new TweenMax(targets[i], duration, copy);+ delay += stagger;+ }+ return a;+ };++ TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ vars.runBackwards = true;+ vars.immediateRender = (vars.immediateRender != false);+ return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);+ };++ TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {+ toVars.startAt = fromVars;+ toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);+ return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);+ };++ TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) {+ return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, useFrames:useFrames, overwrite:0});+ };++ TweenMax.set = function(target, vars) {+ return new TweenMax(target, 0, vars);+ };++ TweenMax.isTweening = function(target) {+ return (TweenLite.getTweensOf(target, true).length > 0);+ };++ var _getChildrenOf = function(timeline, includeTimelines) {+ var a = [],+ cnt = 0,+ tween = timeline._first;+ while (tween) {+ if (tween instanceof TweenLite) {+ a[cnt++] = tween;+ } else {+ if (includeTimelines) {+ a[cnt++] = tween;+ }+ a = a.concat(_getChildrenOf(tween, includeTimelines));+ cnt = a.length;+ }+ tween = tween._next;+ }+ return a;+ },+ getAllTweens = TweenMax.getAllTweens = function(includeTimelines) {+ return _getChildrenOf(Animation._rootTimeline, includeTimelines).concat( _getChildrenOf(Animation._rootFramesTimeline, includeTimelines) );+ };++ TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) {+ if (tweens == null) {+ tweens = true;+ }+ if (delayedCalls == null) {+ delayedCalls = true;+ }+ var a = getAllTweens((timelines != false)),+ l = a.length,+ allTrue = (tweens && delayedCalls && timelines),+ isDC, tween, i;+ for (i = 0; i < l; i++) {+ tween = a[i];+ if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {+ if (complete) {+ tween.totalTime(tween._reversed ? 0 : tween.totalDuration());+ } else {+ tween._enabled(false, false);+ }+ }+ }+ };++ TweenMax.killChildTweensOf = function(parent, complete) {+ if (parent == null) {+ return;+ }+ var tl = TweenLiteInternals.tweenLookup,+ a, curParent, p, i, l;+ if (typeof(parent) === "string") {+ parent = TweenLite.selector(parent) || parent;+ }+ if (_isSelector(parent)) {+ parent = _slice(parent);+ }+ if (_isArray(parent)) {+ i = parent.length;+ while (--i > -1) {+ TweenMax.killChildTweensOf(parent[i], complete);+ }+ return;+ }+ a = [];+ for (p in tl) {+ curParent = tl[p].target.parentNode;+ while (curParent) {+ if (curParent === parent) {+ a = a.concat(tl[p].tweens);+ }+ curParent = curParent.parentNode;+ }+ }+ l = a.length;+ for (i = 0; i < l; i++) {+ if (complete) {+ a[i].totalTime(a[i].totalDuration());+ }+ a[i]._enabled(false, false);+ }+ };++ var _changePause = function(pause, tweens, delayedCalls, timelines) {+ tweens = (tweens !== false);+ delayedCalls = (delayedCalls !== false);+ timelines = (timelines !== false);+ var a = getAllTweens(timelines),+ allTrue = (tweens && delayedCalls && timelines),+ i = a.length,+ isDC, tween;+ while (--i > -1) {+ tween = a[i];+ if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {+ tween.paused(pause);+ }+ }+ };++ TweenMax.pauseAll = function(tweens, delayedCalls, timelines) {+ _changePause(true, tweens, delayedCalls, timelines);+ };++ TweenMax.resumeAll = function(tweens, delayedCalls, timelines) {+ _changePause(false, tweens, delayedCalls, timelines);+ };++ TweenMax.globalTimeScale = function(value) {+ var tl = Animation._rootTimeline,+ t = TweenLite.ticker.time;+ if (!arguments.length) {+ return tl._timeScale;+ }+ value = value || _tinyNum; //can't allow zero because it'll throw the math off+ tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);+ tl = Animation._rootFramesTimeline;+ t = TweenLite.ticker.frame;+ tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);+ tl._timeScale = Animation._rootTimeline._timeScale = value;+ return value;+ };+++//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------++ p.progress = function(value, suppressEvents) {+ return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);+ };++ p.totalProgress = function(value, suppressEvents) {+ return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, suppressEvents);+ };++ p.time = function(value, suppressEvents) {+ if (!arguments.length) {+ return this._time;+ }+ if (this._dirty) {+ this.totalDuration();+ }+ if (value > this._duration) {+ value = this._duration;+ }+ if (this._yoyo && (this._cycle & 1) !== 0) {+ value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));+ } else if (this._repeat !== 0) {+ value += this._cycle * (this._duration + this._repeatDelay);+ }+ return this.totalTime(value, suppressEvents);+ };++ p.duration = function(value) {+ if (!arguments.length) {+ return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect.+ }+ return Animation.prototype.duration.call(this, value);+ };++ p.totalDuration = function(value) {+ if (!arguments.length) {+ if (this._dirty) {+ //instead of Infinity, we use 999999999999 so that we can accommodate reverses+ this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);+ this._dirty = false;+ }+ return this._totalDuration;+ }+ return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );+ };++ p.repeat = function(value) {+ if (!arguments.length) {+ return this._repeat;+ }+ this._repeat = value;+ return this._uncache(true);+ };++ p.repeatDelay = function(value) {+ if (!arguments.length) {+ return this._repeatDelay;+ }+ this._repeatDelay = value;+ return this._uncache(true);+ };++ p.yoyo = function(value) {+ if (!arguments.length) {+ return this._yoyo;+ }+ this._yoyo = value;+ return this;+ };+++ return TweenMax;++ }, true);++export const TweenMax = _gsScope.TweenMax;+export const TweenMaxBase = TweenMax;+export { TweenMax as default };+export { TweenLite, Ease, Power0, Power1, Power2, Power3, Power4, Linear };diff --git a/src/esm/all.js b/src/esm/all.jsnew file mode 100644index 0000000..5498b50--- /dev/null+++ b/src/esm/all.js@@ -0,0 +1,115 @@+import TweenLite, {Ease, Power0, Power1, Power2, Power3, Power4, Linear, _gsScope} from "./TweenLite";++import TweenMax from "./TweenMaxBase";+import TimelineLite from "./TimelineLite";+import TimelineMax from "./TimelineMax";++// plugins+import AttrPlugin from "./AttrPlugin";+import BezierPlugin from "./BezierPlugin";+import ColorPropsPlugin from "./ColorPropsPlugin";+import CSSPlugin from "./CSSPlugin";+import CSSRulePlugin from "./CSSRulePlugin";+import DirectionalRotationPlugin from "./DirectionalRotationPlugin";+import EaselPlugin from "./EaselPlugin";+import EndArrayPlugin from "./EndArrayPlugin";+import ModifiersPlugin from "./ModifiersPlugin";+import PixiPlugin from "./PixiPlugin";+import RoundPropsPlugin from "./RoundPropsPlugin";+import ScrollToPlugin from "./ScrollToPlugin";+import TextPlugin from "./TextPlugin";+++// utils+import Draggable from "./Draggable";++// easing+import {+ Back,+ Elastic,+ Bounce,+ RoughEase,+ SlowMo,+ SteppedEase,+ Circ,+ Expo,+ Sine,+ ExpoScaleEase+} from "./EasePack";++// bonus tools+/*+import DrawSVGPlugin from "./DrawSVGPlugin";+import MorphSVGPlugin from "./MorphSVGPlugin";+import Physics2DPlugin from "./Physics2DPlugin";+import PhysicsPropsPlugin from "./PhysicsPropsPlugin";+import ScrambleTextPlugin from "./ScrambleTextPlugin";+import ThrowPropsPlugin from "./ThrowPropsPlugin";+import GSDevTools from "./GSDevTools";+import SplitText from "./SplitText";+import CustomBounce from "./CustomBounce";+import CustomEase from "./CustomEase";+import CustomWiggle from "./CustomWiggle";++export {+ DrawSVGPlugin,+ MorphSVGPlugin,+ Physics2DPlugin,+ PhysicsPropsPlugin,+ ScrambleTextPlugin,+ ThrowPropsPlugin,+ GSDevTools,+ SplitText,+ CustomBounce,+ CustomEase,+ CustomWiggle+}+*/++++export {+ TweenLite,+ TweenMax,+ TimelineLite,+ TimelineMax,+ _gsScope,++ // plugins+ AttrPlugin,+ BezierPlugin,+ ColorPropsPlugin,+ CSSPlugin,+ CSSRulePlugin,+ DirectionalRotationPlugin,+ EaselPlugin,+ EndArrayPlugin,+ ModifiersPlugin,+ PixiPlugin,+ RoundPropsPlugin,+ ScrollToPlugin,+ TextPlugin,++ // utils+ Draggable,++ // easing+ Ease,+ Power0,+ Power1,+ Power2,+ Power3,+ Power4,+ Linear,+ Back,+ Elastic,+ Bounce,+ RoughEase,+ SlowMo,+ SteppedEase,+ Circ,+ Expo,+ Sine,+ ExpoScaleEase++};\ No newline at end of filediff --git a/src/esm/index.js b/src/esm/index.jsnew file mode 100644index 0000000..d3db9ee--- /dev/null+++ b/src/esm/index.js@@ -0,0 +1,25 @@+/*!+ * VERSION: 1.20.5+ * DATE: 2018-05-21+ * UPDATES AND DOCS AT: http://greensock.com+ *+ * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.+ * This work is subject to the terms at http://greensock.com/standard-license or for+ * Club GreenSock members, the software agreement that was issued with your membership.+ *+ * @author: Jack Doyle, [email protected]+ **/+import TweenLite, { _gsScope, TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear } from "./TweenLite";+import TimelineLite from "./TimelineLite";+import TimelineMax from "./TimelineMax";+import TweenMax from "./TweenMax";+import CSSPlugin from "./CSSPlugin";+import AttrPlugin from "./AttrPlugin";+import RoundPropsPlugin from "./RoundPropsPlugin";+import DirectionalRotationPlugin from "./DirectionalRotationPlugin";+import BezierPlugin from "./BezierPlugin";+import { Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase } from "./EasePack";+++export { TweenMax as default };+export { TweenLite, TweenMax, TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, RoundPropsPlugin, DirectionalRotationPlugin, TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase, _gsScope };diff --git a/src/esm/package.json b/src/esm/package.jsonnew file mode 100644index 0000000..0821411--- /dev/null+++ b/src/esm/package.json@@ -0,0 +1,53 @@+{+ "name": "gsap",+ "version": "1.20.5",+ "description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.",+ "homepage": "https://greensock.com/gsap/",+ "filename": "index.js",+ "module": "index.js",+ "main": "index.js",+ "sideEffects": [+ "./TweenLite.js",+ "./index.js"+ ],+ "keywords": [+ "animation",+ "TweenLite",+ "TweenMax",+ "TimelineLite",+ "TimelineMax",+ "GSAP",+ "GreenSock",+ "easing",+ "EasePack",+ "PixiPlugin",+ "CustomEase",+ "jQuery",+ "jquery.gsap.js",+ "Bezier",+ "SVG",+ "3D",+ "2D",+ "transform",+ "morph",+ "morphing",+ "svg",+ "tweening"+ ],+ "maintainers": [+ {+ "name": "Jack Doyle",+ "email": "[email protected]",+ "web": "https://greensock.com"+ }+ ],+ "license": "Standard 'no charge' license: https://greensock.com/standard-license. Club GreenSock members get more: https://greensock.com/licensing/. Why GreenSock doesn't employ an MIT license: https://greensock.com/why-license/",+ "bugs": {+ "url": "https://greensock.com/forums/"+ },+ "repository": {+ "type": "git",+ "url": "https://github.com/greensock/GreenSock-JS"+ }++}\ No newline at end of filediff --git a/src/minified/TimelineLite.min.js b/src/minified/TimelineLite.min.jsindex d62ce5b..f35a4ba 100644--- a/src/minified/TimelineLite.min.js+++ b/src/minified/TimelineLite.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]*/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.4",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._time,o=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,q=this._timeScale,r=this._paused;if(n!==this._time&&(a+=this._time-n),a>=o-1e-7&&a>=0)this._totalTime=this._time=o,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=o+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==n||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=n)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==n&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==n&&a>0&&(this._active=!0),0===n&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=n)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=n&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("./TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("TimelineLite");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.5",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._time,o=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,q=this._timeScale,r=this._paused;if(n!==this._time&&(a+=this._time-n),a>=o-1e-7&&a>=0)this._totalTime=this._time=o,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=o+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==n||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=n)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==n&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==n&&a>0&&(this._active=!0),0===n&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=n)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=n&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("./TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("TimelineLite");\ No newline at end of filediff --git a/src/minified/TimelineMax.min.js b/src/minified/TimelineMax.min.jsindex aaa7796..afceafc 100644--- a/src/minified/TimelineMax.min.js+++ b/src/minified/TimelineMax.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]*/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.20.4",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._time,p=this._dirty?this.totalDuration():this._totalDuration,q=this._duration,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(o!==this._time&&(a+=this._time-o),a>=p-1e-7&&a>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=q,a=q+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==o||0===q&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=q||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===q&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=q+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=q-this._time),this._time>q?(this._time=q,a=q+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b){if(a=this._time,a>=o||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&m._startTime<q&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*q,this._cycle<w?x=!x:this._totalTime+=q,this._time=o,this._rawPrevTime=0===q?u-1e-4:u,this._cycle=w,this._locked=!0,o=x?0:q,this.render(o,b,0===q),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),o!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,o=x?q+1e-4:-1e-4,this.render(o,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==o&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=o)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||p>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.4",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._startTime,q=this._timeScale,r=this._paused;if(a>=n-1e-7&&a>=0)this._totalTime=this._time=n,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=n+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=o)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==o&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=o)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||n>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("./TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("TimelineMax");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.20.5",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._time,p=this._dirty?this.totalDuration():this._totalDuration,q=this._duration,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(o!==this._time&&(a+=this._time-o),a>=p-1e-7&&a>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=q,a=q+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==o||0===q&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=q||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===q&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=q+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=q-this._time),this._time>q?(this._time=q,a=q+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b){if(a=this._time,a>=o||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&m._startTime<q&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*q,this._cycle<w?x=!x:this._totalTime+=q,this._time=o,this._rawPrevTime=0===q?u-1e-4:u,this._cycle=w,this._locked=!0,o=x?0:q,this.render(o,b,0===q),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),o!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,o=x?q+1e-4:-1e-4,this.render(o,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==o&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=o)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||p>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.5",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._startTime,q=this._timeScale,r=this._paused;if(a>=n-1e-7&&a>=0)this._totalTime=this._time=n,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=n+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=o)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==o&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=o)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||n>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("./TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("TimelineMax");\ No newline at end of filediff --git a/src/minified/TweenLite.min.js b/src/minified/TweenLite.min.jsindex c46c7d1..e9e7a1f 100644--- a/src/minified/TweenLite.min.js+++ b/src/minified/TweenLite.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]*/-!function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!e.TweenLite){var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p=f.length,s=p;--p>-1;)(l=q[f[p]]||new r(f[p],[])).gsClass?(i[p]=l.gsClass,s--):j&&l.sc.push(this);if(0===s&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,"undefined"!=typeof module&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else"function"==typeof define&&define.amd&&define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){return arguments.length?(p=a||1/m,void(q=Math.min(b,p,0))):1/m>p},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==(d||{}).visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,X){j||i.wake();var c=this.vars.useFrames?W:X;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&("hidden"!==(d||{}).visibilityState||!i.lagSmoothing())&&i.wake();var a=setTimeout(E,2e3);a.unref&&a.unref()};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-1e-7},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Z(),this.render(a,b,!1),J.length&&Z())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||m,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?V[G.defaultOverwrite]:"number"==typeof i?i>>0:V[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=$(f,this,!1),1===i&&this._siblings[e].length>1&&aa(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=$(b,this,!1),1===i&&this._siblings.length>1&&aa(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)U[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!R[c]||R[c]&&R[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.20.4",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=/[\+-]=-?[\.\d]/,N=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},O=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=N,M.test(b)&&(l.end=null),l},P=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=O(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},Q=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:O},R=G._plugins={},S=Q.tweenLookup={},T=0,U=Q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},V={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},W=D._rootFramesTimeline=new F,X=D._rootTimeline=new F,Y=30,Z=Q.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};X._startTime=i.time,W._startTime=i.frame,X._active=W._active=!0,setTimeout(Z,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Z(),X.render((i.time-X._startTime)*X._timeScale,!1,!1),W.render((i.frame-W._startTime)*W._timeScale,!1,!1),J.length&&Z(),i.frame>=Y){Y=i.frame+(parseInt(G.autoSleep,10)||120);for(c in S){for(b=S[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete S[c]}if(c=X._first,(!c||c._paused)&&G.autoSleep&&!W._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var $=function(a,b,c){var d,e,f=a._gsTweenID;if(S[f||(a._gsTweenID=f="t"+T++)]||(S[f]={target:a,tweens:[]}),b&&(d=S[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return S[f].tweens},_=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},aa=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||ba(b,0,o),0===ba(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!_(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},ba=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)U[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Z(),this.vars.css||b.style&&b!==a&&b.nodeType&&R.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],U[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(R[g]&&(j=new R[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=P.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&aa(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),(!this._initted||this._startAt&&this._startAt.progress())&&(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,!0,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,!0,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,!0,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!_(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=$(d[c],this,!0);else this._siblings=$(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=$(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ca=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ca.prototype},!0);if(h=ca.prototype,ca.version="1.19.0",ca.API=2,h._firstPT=null,h._addTween=P,h.setRatio=N,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ca.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ca.API&&(R[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ca.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ca(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ca.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite");\ No newline at end of file+!function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(e.TweenLite)return e.TweenLite;var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p=f.length,s=p;--p>-1;)(l=q[f[p]]||new r(f[p],[])).gsClass?(i[p]=l.gsClass,s--):j&&l.sc.push(this);if(0===s&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,"undefined"!=typeof module&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else"function"==typeof define&&define.amd&&define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){return arguments.length?(p=a||1/m,void(q=Math.min(b,p,0))):1/m>p},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==(d||{}).visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,X){j||i.wake();var c=this.vars.useFrames?W:X;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&("hidden"!==(d||{}).visibilityState||!i.lagSmoothing())&&i.wake();var a=setTimeout(E,2e3);a.unref&&a.unref()};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-1e-7},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Z(),this.render(a,b,!1),J.length&&Z())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||m,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=this.rawTime()-(a._timeline.rawTime()-a._pauseTime)),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?V[G.defaultOverwrite]:"number"==typeof i?i>>0:V[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=$(f,this,!1),1===i&&this._siblings[e].length>1&&aa(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=$(b,this,!1),1===i&&this._siblings.length>1&&aa(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)U[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!R[c]||R[c]&&R[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.20.5",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):(d||(d=a.document),d?d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=/[\+-]=-?[\.\d]/,N=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m.call(this._tween,b,this._target||c.t,this._tween):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},O=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=N,M.test(b)&&(l.end=null),l},P=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=O(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},Q=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:O},R=G._plugins={},S=Q.tweenLookup={},T=0,U=Q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},V={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},W=D._rootFramesTimeline=new F,X=D._rootTimeline=new F,Y=30,Z=Q.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};X._startTime=i.time,W._startTime=i.frame,X._active=W._active=!0,setTimeout(Z,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Z(),X.render((i.time-X._startTime)*X._timeScale,!1,!1),W.render((i.frame-W._startTime)*W._timeScale,!1,!1),J.length&&Z(),i.frame>=Y){Y=i.frame+(parseInt(G.autoSleep,10)||120);for(c in S){for(b=S[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete S[c]}if(c=X._first,(!c||c._paused)&&G.autoSleep&&!W._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var $=function(a,b,c){var d,e,f=a._gsTweenID;if(S[f||(a._gsTweenID=f="t"+T++)]||(S[f]={target:a,tweens:[]}),b&&(d=S[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return S[f].tweens},_=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},aa=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||ba(b,0,o),0===ba(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!_(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},ba=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=G.to(this.target||{},0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)U[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Z(),this.vars.css||b.style&&b!==a&&b.nodeType&&R.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],U[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(R[g]&&(j=new R[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=P.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&aa(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),(!this._initted||this._startAt&&this._startAt.progress())&&(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,!0,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,!0,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,!0,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!_(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=$(d[c],this,!0);else this._siblings=$(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=$(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ca=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ca.prototype},!0);if(h=ca.prototype,ca.version="1.19.0",ca.API=2,h._firstPT=null,h._addTween=P,h.setRatio=N,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ca.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ca.API&&(R[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ca.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ca(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ca.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite");\ No newline at end of filediff --git a/src/minified/TweenMax.min.js b/src/minified/TweenMax.min.jsindex 2f85dfa..c6cc7ca 100644--- a/src/minified/TweenMax.min.js+++ b/src/minified/TweenMax.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin@@ -11,7 +11,7 @@** @author: Jack Doyle, [email protected]**/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.20.4",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,d){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var e,f,i,j,k,l,m,n,o,p=this._dirty?this.totalDuration():this._totalDuration,q=this._time,r=this._totalTime,s=this._cycle,t=this._duration,u=this._rawPrevTime;if(a>=p-1e-7&&a>=0?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=t,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(e=!0,f="onComplete",d=d||this._timeline.autoRemoveChildren),0===t&&(this._initted||!this.vars.lazy||d)&&(this._startTime===this._timeline._duration&&(a=0),(0>u||0>=a&&a>=-1e-7||u===g&&"isPause"!==this.data)&&u!==a&&(d=!0,u>g&&(f="onReverseComplete")),this._rawPrevTime=n=!b||a||u===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==r||0===t&&u>0)&&(f="onReverseComplete",e=this._reversed),0>a&&(this._active=!1,0===t&&(this._initted||!this.vars.lazy||d)&&(u>=0&&(d=!0),this._rawPrevTime=n=!b||a||u===a?a:g)),this._initted||(d=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(j=t+this._repeatDelay,this._cycle=this._totalTime/j>>0,0!==this._cycle&&this._cycle===this._totalTime/j&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*j,this._yoyo&&0!==(1&this._cycle)&&(this._time=t-this._time,o=this._yoyoEase||this.vars.yoyoEase,o&&(this._yoyoEase||(o!==!0||this._initted?this._yoyoEase=o=o===!0?this._ease:o instanceof Ease?o:Ease.map[o]:(o=this.vars.ease,this._yoyoEase=o=o?o instanceof Ease?o:"function"==typeof o?new Ease(o,this.vars.easeParams):Ease.map[o]||c.defaultEase:c.defaultEase)),this.ratio=o?1-o.getRatio((t-this._time)/t):0)),this._time>t?this._time=t:this._time<0&&(this._time=0)),this._easeType&&!o?(k=this._time/t,l=this._easeType,m=this._easePower,(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===m?k*=k:2===m?k*=k*k:3===m?k*=k*k*k:4===m&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:this._time/t<.5?this.ratio=k/2:this.ratio=1-k/2):o||(this.ratio=this._ease.getRatio(this._time/t))),q===this._time&&!d&&s===this._cycle)return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!d&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=q,this._totalTime=r,this._rawPrevTime=u,this._cycle=s,h.lazyTweens.push(this),void(this._lazy=[a,b]);!this._time||e||o?e&&this._ease._calcEnd&&!o&&(this.ratio=this._ease.getRatio(0===this._time?0:1)):this.ratio=this._ease.getRatio(this._time/t)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==q&&a>=0&&(this._active=!0),0===r&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,!0,d):f||(f="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===t)&&(b||this._callback("onStart"))),i=this._firstPT;i;)i.f?i.t[i.p](i.c*this.ratio+i.s):i.t[i.p]=i.c*this.ratio+i.s,i=i._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,!0,d),b||(this._totalTime!==r||f)&&this._callback("onUpdate")),this._cycle!==s&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),f&&(!this._gc||d)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,!0,d),e&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[f]&&this._callback(f),0===t&&this._rawPrevTime===g&&n!==g&&(this._rawPrevTime=0))},f.to=function(a,b,c){return new f(a,b,c)},f.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new f(a,b,c)},f.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new f(a,b,d)},f.staggerTo=f.allTo=function(a,b,g,h,k,m,n){h=h||0;var o,p,q,r,s=0,t=[],u=function(){g.onComplete&&g.onComplete.apply(g.onCompleteScope||this,arguments),k.apply(n||g.callbackScope||this,m||l)},v=g.cycle,w=g.startAt&&g.startAt.cycle;for(j(a)||("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a))),a=a||[],0>h&&(a=d(a),a.reverse(),h*=-1),o=a.length-1,q=0;o>=q;q++){p={};for(r in g)p[r]=g[r];if(v&&(e(p,a,q),null!=p.duration&&(b=p.duration,delete p.duration)),w){w=p.startAt={};for(r in g.startAt)w[r]=g.startAt[r];e(p.startAt,a,q)}p.delay=s+(p.delay||0),q===o&&k&&(p.onComplete=u),t[q]=new f(a[q],b,p),s+=h}return t},f.staggerFrom=f.allFrom=function(a,b,c,d,e,g,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,f.staggerTo(a,b,c,d,e,g,h)},f.staggerFromTo=f.allFromTo=function(a,b,c,d,e,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,f.staggerTo(a,b,d,e,g,h,i)},f.delayedCall=function(a,b,c,d,e){return new f(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,useFrames:e,overwrite:0})},f.set=function(a,b){return new f(a,0,b)},f.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var m=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(m(f,b)),e=d.length),f=f._next;return d},n=f.getAllTweens=function(b){return m(a._rootTimeline,b).concat(m(a._rootFramesTimeline,b))};f.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=n(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},f.killChildTweensOf=function(a,b){if(null!=a){var e,g,k,l,m,n=h.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a)),j(a))for(l=a.length;--l>-1;)f.killChildTweensOf(a[l],b);else{e=[];for(k in n)for(g=n[k].target.parentNode;g;)g===a&&(e=e.concat(n[k].tweens)),g=g.parentNode;for(m=e.length,l=0;m>l;l++)b&&e[l].totalTime(e[l].totalDuration()),e[l]._enabled(!1,!1)}}};var o=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=n(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return f.pauseAll=function(a,b,c){o(!0,a,b,c)},f.resumeAll=function(a,b,c){o(!1,a,b,c)},f.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||g,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},k.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},f},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.4",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._time,o=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,q=this._timeScale,r=this._paused;if(n!==this._time&&(a+=this._time-n),a>=o-1e-7&&a>=0)this._totalTime=this._time=o,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=o+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==n||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=n)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==n&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==n&&a>0&&(this._active=!0),0===n&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=n)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=n&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.20.4",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._time,p=this._dirty?this.totalDuration():this._totalDuration,q=this._duration,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(o!==this._time&&(a+=this._time-o),a>=p-1e-7&&a>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=q,a=q+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==o||0===q&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=q||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===q&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=q+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=q-this._time),this._time>q?(this._time=q,a=q+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b){if(a=this._time,a>=o||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&m._startTime<q&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*q,this._cycle<w?x=!x:this._totalTime+=q,this._time=o,this._rawPrevTime=0===q?u-1e-4:u,this._cycle=w,this._locked=!0,o=x?0:q,this.render(o,b,0===q),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),o!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,o=x?q+1e-4:-1e-4,this.render(o,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==o&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=o)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||p>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=_gsScope._gsDefine.globals,g=function(a,b,c,d){c===d&&(c=d-(d-b)/1e6),a===b&&(b=a+(c-a)/1e6),this.a=a,this.b=b,this.c=c,this.d=d,this.da=d-a,this.ca=c-a,this.ba=b-a},h=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",i=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},j=function(a,e,f,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,h?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=i(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=i(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},k=function(a,d,e,f){var h,i,j,k,l,m,n=[];if(f)for(a=[f].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=f[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new g(a[0][d],0,0,a[0][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new g(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new g(a[i][d],0,0,a[i+1][d]),n},l=function(a,f,g,i,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":h,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=k(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!i){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]],-s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q]||0,d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=g?4:1;--n>-1;)o=w[n],p=v[o],j(p,f,g,i,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},m=function(a,b,c){b=b||"soft";var d,e,f,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],f=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new g(d,e,f,h):new g(d,(2*e+d)/3,(2*e+f)/3,f);i.length=n}return p},n=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f,h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.20.4",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e&&"lineHeight"!==c)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"lineHeight"!==c||e)if("%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,-1!==_(l,"display").indexOf("flex")&&(m.position="absolute"),i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}else i=$(a).lineHeight,a.style.lineHeight=d,h=parseFloat($(a).lineHeight),a.style.lineHeight=i;return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(c[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h="";if(!f.length)return a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+" "+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(-1!==(d+c).indexOf("rgb")||-1!==(d+c).indexOf("hsl")?(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" ")):(D=D.join(" ").split(",").join(", ").split(" "),E=E.join(" ").split(",").join(", ").split(" ")),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,z=u,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(z.substr(0,z.indexOf("hsl"))+(y?"hsla(":"hsl("),p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(z.substr(0,z.indexOf("rgb"))+(y?"rgba(":"rgb("),p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2),0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!Ha||!a.getCTM||a.parentNode&&!a.ownerSVGElement||!Na(a))},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,!Ca||!(h=!$(a)||"none"===$(a).display)&&a.parentNode||(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(e=a.transform.baseVal.consolidate().matrix,d="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")",c=0)),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(N),w=Math.sin(N),s=x*v+y*w,t=B*v+C*w,u=F*v+G*w,y=y*v-x*w,C=C*v-B*w,G=G*v-F*w,x=s,B=t,F=u),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),N=Math.atan2(B,C),m.scaleX=(Math.sqrt(x*x+y*y+z*z)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+D*D)*p+.5|0)/p,m.scaleZ=(Math.sqrt(F*F+G*G+H*H)*p+.5|0)/p,x/=m.scaleX,B/=m.scaleY,y/=m.scaleX,C/=m.scaleY,Math.abs(N)>o?(m.skewX=N*L,B=0,"simple"!==m.skewType&&(m.scaleY*=1/Math.cos(N))):m.skewX=0,m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{-parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(D.skewType=A.skewType||D.skewType||g.defaultSkewType,d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),"simple"===D.skewType&&(l.scaleY*=Math.cos(l.skewX*K)),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b){if(n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g])c=h.parse(a,n,g,this,c,f,b);else{if("--"===g.substr(0,2)){this._tween._propLookup[g]=this._addTween.call(this._tween,a.style,"setProperty",$(a).getPropertyValue(g)+"",n+"",g,!1,g);continue}m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&(""!==p||"lineHeight"===g)&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))}f&&c&&!c.plugin&&(c.plugin=f)}return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=Math.round(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&a[b.p]===Math.round&&(b.r=1),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){for(;a;)a.f||a.blob||(a.m=Math.round),a=a._next},c=a.prototype;c._onInitAllProps=function(){for(var a,c,d,e=this._tween,f=e.vars.roundProps.join?e.vars.roundProps:e.vars.roundProps.split(","),g=f.length,h={},i=e._propLookup.roundProps;--g>-1;)h[f[g]]=Math.round;for(g=f.length;--g>-1;)for(a=f[g],c=e._firstPT;c;)d=c._next,c.pg?c.t._mod(h):c.n===a&&(2===c.f&&c.t?b(c.t._firstPT):(this._add(c.t,a,c.s,c.c),d&&(d._prev=c._prev),c._prev?c._prev._next=d:e._firstPT===c&&(e._firstPT=d),c._next=c._prev=null,e._propLookup[a]=i)),c=d;return!1},c._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,Math.round),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(a,b,c,d){var e,f;if("function"!=typeof a.setAttribute)return!1;for(e in b)f=b[e],"function"==typeof f&&(f=f(d,a)),this._addTween(a,"setAttribute",a.getAttribute(e)+"",f+"",e,!1,e),this._overwriteProps.push(e);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(a,b,c,d){"object"!=typeof b&&(b={rotation:b}),this.finals={};var e,f,g,h,i,j,k=b.useRadians===!0?2*Math.PI:360,l=1e-6;for(e in b)"useRadians"!==e&&(h=b[e],"function"==typeof h&&(h=h(d,a)),j=(h+"").split("_"),f=j[0],g=parseFloat("function"!=typeof a[e]?a[e]:a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]()),h=this.finals[e]="string"==typeof f&&"="===f.charAt(1)?g+parseInt(f.charAt(0)+"1",10)*Number(f.substr(2)):Number(f)||0,i=h-g,j.length&&(f=j.join("_"),-1!==f.indexOf("short")&&(i%=k,i!==i%(k/2)&&(i=0>i?i+k:i-k)),-1!==f.indexOf("_cw")&&0>i?i=(i+9999999999*k)%k-(i/k|0)*k:-1!==f.indexOf("ccw")&&i>0&&(i=(i-9999999999*k)%k-(i/k|0)*k)),(i>l||-l>i)&&(this._addTween(a,e,g,g+i,e),this._overwriteProps.push(e)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e,f=_gsScope.GreenSockGlobals||_gsScope,g=f.com.greensock,h=2*Math.PI,i=Math.PI/2,j=g._class,k=function(b,c){var d=j("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},l=a.register||function(){},m=function(a,b,c,d,e){var f=j("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return l(f,a),f},n=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},o=function(b,c){var d=j("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},p=m("Back",o("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),o("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),o("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),q=j("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),r=q.prototype=new a;return r.constructor=q,r.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1===a?0:1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},q.ease=new q(.7,.7),r.config=q.config=function(a,b,c){return new q(a,b,c)},b=j("easing.SteppedEase",function(a,b){a=a||1,this._p1=1/a,this._p2=a+(b?0:1),this._p3=b?1:0},!0),r=b.prototype=new a,r.constructor=b,r.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),((this._p2*a|0)+this._p3)*this._p1},r.config=b.config=function(a,c){return new b(a,c)},c=j("easing.ExpoScaleEase",function(a,b,c){this._p1=Math.log(b/a),this._p2=b-a,this._p3=a,this._ease=c},!0),r=c.prototype=new a,r.constructor=c,r.getRatio=function(a){return this._ease&&(a=this._ease.getRatio(a)),(this._p3*Math.exp(this._p1*a)-this._p3)/this._p2},r.config=c.config=function(a,b,d){return new c(a,b,d)},d=j("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),m=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--m>-1;)c=o?Math.random():1/l*m,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:m%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new n(1,1,null),m=l;--m>-1;)g=j[m],h=new n(g.x,g.y,h);this._prev=new n(0,0,0!==h.t?h:h.next)},!0),r=d.prototype=new a,r.constructor=d,r.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},r.config=function(a){return new d(a)},d.ease=new d,m("Bounce",k("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),k("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),k("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),m("Circ",k("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),k("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),k("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),e=function(b,c,d){var e=j("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/h*(Math.asin(1/this._p1)||0),this._p2=h/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},m("Elastic",e("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),e("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),e("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),m("Expo",k("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),k("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),k("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),m("Sine",k("SineOut",function(a){return Math.sin(a*i)}),k("SineIn",function(a){return-Math.cos(a*i)+1}),k("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),j("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),l(f.SlowMo,"SlowMo","ease,"),l(d,"RoughEase","ease,"),l(b,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!e.TweenLite){var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p=f.length,s=p;--p>-1;)(l=q[f[p]]||new r(f[p],[])).gsClass?(i[p]=l.gsClass,s--):j&&l.sc.push(this);if(0===s&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,"undefined"!=typeof module&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else"function"==typeof define&&define.amd&&define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){return arguments.length?(p=a||1/m,void(q=Math.min(b,p,0))):1/m>p},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==(d||{}).visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,X){j||i.wake();var c=this.vars.useFrames?W:X;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&("hidden"!==(d||{}).visibilityState||!i.lagSmoothing())&&i.wake();var a=setTimeout(E,2e3);a.unref&&a.unref()};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-1e-7},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Z(),this.render(a,b,!1),J.length&&Z())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||m,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,-this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?V[G.defaultOverwrite]:"number"==typeof i?i>>0:V[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=$(f,this,!1),1===i&&this._siblings[e].length>1&&aa(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=$(b,this,!1),1===i&&this._siblings.length>1&&aa(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)U[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!R[c]||R[c]&&R[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.20.4",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=/[\+-]=-?[\.\d]/,N=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},O=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=N,M.test(b)&&(l.end=null),l},P=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=O(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},Q=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:O},R=G._plugins={},S=Q.tweenLookup={},T=0,U=Q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},V={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},W=D._rootFramesTimeline=new F,X=D._rootTimeline=new F,Y=30,Z=Q.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};X._startTime=i.time,W._startTime=i.frame,X._active=W._active=!0,setTimeout(Z,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Z(),X.render((i.time-X._startTime)*X._timeScale,!1,!1),W.render((i.frame-W._startTime)*W._timeScale,!1,!1),J.length&&Z(),i.frame>=Y){Y=i.frame+(parseInt(G.autoSleep,10)||120);for(c in S){for(b=S[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete S[c]}if(c=X._first,(!c||c._paused)&&G.autoSleep&&!W._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var $=function(a,b,c){var d,e,f=a._gsTweenID;if(S[f||(a._gsTweenID=f="t"+T++)]||(S[f]={target:a,tweens:[]}),b&&(d=S[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return S[f].tweens},_=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},aa=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||ba(b,0,o),0===ba(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!_(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},ba=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)U[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Z(),this.vars.css||b.style&&b!==a&&b.nodeType&&R.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],U[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(R[g]&&(j=new R[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=P.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&aa(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),(!this._initted||this._startAt&&this._startAt.progress())&&(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,!0,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,!0,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,!0,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!_(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=$(d[c],this,!0);else this._siblings=$(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=$(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ca=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ca.prototype},!0);if(h=ca.prototype,ca.version="1.19.0",ca.API=2,h._firstPT=null,h._addTween=P,h.setRatio=N,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ca.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ca.API&&(R[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ca.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ca(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ca.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.20.5",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,d){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var e,f,i,j,k,l,m,n,o,p=this._dirty?this.totalDuration():this._totalDuration,q=this._time,r=this._totalTime,s=this._cycle,t=this._duration,u=this._rawPrevTime;if(a>=p-1e-7&&a>=0?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=t,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(e=!0,f="onComplete",d=d||this._timeline.autoRemoveChildren),0===t&&(this._initted||!this.vars.lazy||d)&&(this._startTime===this._timeline._duration&&(a=0),(0>u||0>=a&&a>=-1e-7||u===g&&"isPause"!==this.data)&&u!==a&&(d=!0,u>g&&(f="onReverseComplete")),this._rawPrevTime=n=!b||a||u===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==r||0===t&&u>0)&&(f="onReverseComplete",e=this._reversed),0>a&&(this._active=!1,0===t&&(this._initted||!this.vars.lazy||d)&&(u>=0&&(d=!0),this._rawPrevTime=n=!b||a||u===a?a:g)),this._initted||(d=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(j=t+this._repeatDelay,this._cycle=this._totalTime/j>>0,0!==this._cycle&&this._cycle===this._totalTime/j&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*j,this._yoyo&&0!==(1&this._cycle)&&(this._time=t-this._time,o=this._yoyoEase||this.vars.yoyoEase,o&&(this._yoyoEase||(o!==!0||this._initted?this._yoyoEase=o=o===!0?this._ease:o instanceof Ease?o:Ease.map[o]:(o=this.vars.ease,this._yoyoEase=o=o?o instanceof Ease?o:"function"==typeof o?new Ease(o,this.vars.easeParams):Ease.map[o]||c.defaultEase:c.defaultEase)),this.ratio=o?1-o.getRatio((t-this._time)/t):0)),this._time>t?this._time=t:this._time<0&&(this._time=0)),this._easeType&&!o?(k=this._time/t,l=this._easeType,m=this._easePower,(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===m?k*=k:2===m?k*=k*k:3===m?k*=k*k*k:4===m&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:this._time/t<.5?this.ratio=k/2:this.ratio=1-k/2):o||(this.ratio=this._ease.getRatio(this._time/t))),q===this._time&&!d&&s===this._cycle)return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!d&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=q,this._totalTime=r,this._rawPrevTime=u,this._cycle=s,h.lazyTweens.push(this),void(this._lazy=[a,b]);!this._time||e||o?e&&this._ease._calcEnd&&!o&&(this.ratio=this._ease.getRatio(0===this._time?0:1)):this.ratio=this._ease.getRatio(this._time/t)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==q&&a>=0&&(this._active=!0),0===r&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,!0,d):f||(f="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===t)&&(b||this._callback("onStart"))),i=this._firstPT;i;)i.f?i.t[i.p](i.c*this.ratio+i.s):i.t[i.p]=i.c*this.ratio+i.s,i=i._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,!0,d),b||(this._totalTime!==r||f)&&this._callback("onUpdate")),this._cycle!==s&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),f&&(!this._gc||d)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,!0,d),e&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[f]&&this._callback(f),0===t&&this._rawPrevTime===g&&n!==g&&(this._rawPrevTime=0))},f.to=function(a,b,c){return new f(a,b,c)},f.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new f(a,b,c)},f.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new f(a,b,d)},f.staggerTo=f.allTo=function(a,b,g,h,k,m,n){h=h||0;var o,p,q,r,s=0,t=[],u=function(){g.onComplete&&g.onComplete.apply(g.onCompleteScope||this,arguments),k.apply(n||g.callbackScope||this,m||l)},v=g.cycle,w=g.startAt&&g.startAt.cycle;for(j(a)||("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a))),a=a||[],0>h&&(a=d(a),a.reverse(),h*=-1),o=a.length-1,q=0;o>=q;q++){p={};for(r in g)p[r]=g[r];if(v&&(e(p,a,q),null!=p.duration&&(b=p.duration,delete p.duration)),w){w=p.startAt={};for(r in g.startAt)w[r]=g.startAt[r];e(p.startAt,a,q)}p.delay=s+(p.delay||0),q===o&&k&&(p.onComplete=u),t[q]=new f(a[q],b,p),s+=h}return t},f.staggerFrom=f.allFrom=function(a,b,c,d,e,g,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,f.staggerTo(a,b,c,d,e,g,h)},f.staggerFromTo=f.allFromTo=function(a,b,c,d,e,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,f.staggerTo(a,b,d,e,g,h,i)},f.delayedCall=function(a,b,c,d,e){return new f(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,useFrames:e,overwrite:0})},f.set=function(a,b){return new f(a,0,b)},f.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var m=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(m(f,b)),e=d.length),f=f._next;return d},n=f.getAllTweens=function(b){return m(a._rootTimeline,b).concat(m(a._rootFramesTimeline,b))};f.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=n(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},f.killChildTweensOf=function(a,b){if(null!=a){var e,g,k,l,m,n=h.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a)),j(a))for(l=a.length;--l>-1;)f.killChildTweensOf(a[l],b);else{e=[];for(k in n)for(g=n[k].target.parentNode;g;)g===a&&(e=e.concat(n[k].tweens)),g=g.parentNode;for(m=e.length,l=0;m>l;l++)b&&e[l].totalTime(e[l].totalDuration()),e[l]._enabled(!1,!1)}}};var o=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=n(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return f.pauseAll=function(a,b,c){o(!0,a,b,c)},f.resumeAll=function(a,b,c){o(!1,a,b,c)},f.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||g,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},k.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},f},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.20.4",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),e._time&&e.render((this.rawTime()-e._startTime)*e._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._time,o=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,q=this._timeScale,r=this._paused;if(n!==this._time&&(a+=this._time-n),a>=o-1e-7&&a>=0)this._totalTime=this._time=o,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=o+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==n||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=n)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==n&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==n&&a>0&&(this._active=!0),0===n&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=n)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=n&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(e,e._startTime-e._delay),this._calculatingDuration=0):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale,this._time-=e._startTime,this._totalTime-=e._startTime,this._rawPrevTime-=e._startTime),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.20.4",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._time,p=this._dirty?this.totalDuration():this._totalDuration,q=this._duration,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(o!==this._time&&(a+=this._time-o),a>=p-1e-7&&a>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=q,a=q+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==o||0===q&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=q||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===q&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=q+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=q-this._time),this._time>q?(this._time=q,a=q+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b){if(a=this._time,a>=o||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&m._startTime<q&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*q,this._cycle<w?x=!x:this._totalTime+=q,this._time=o,this._rawPrevTime=0===q?u-1e-4:u,this._cycle=w,this._locked=!0,o=x?0:q,this.render(o,b,0===q),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),o!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,o=x?q+1e-4:-1e-4,this.render(o,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==o&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=o)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||p>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=_gsScope._gsDefine.globals,g=function(a,b,c,d){c===d&&(c=d-(d-b)/1e6),a===b&&(b=a+(c-a)/1e6),this.a=a,this.b=b,this.c=c,this.d=d,this.da=d-a,this.ca=c-a,this.ba=b-a},h=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",i=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},j=function(a,e,f,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,h?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=i(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=i(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},k=function(a,d,e,f){var h,i,j,k,l,m,n=[];if(f)for(a=[f].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=f[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new g(a[0][d],0,0,a[0][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new g(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new g(a[i][d],0,0,a[i+1][d]),n},l=function(a,f,g,i,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":h,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=k(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!i){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]],+s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q]||0,d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=g?4:1;--n>-1;)o=w[n],p=v[o],j(p,f,g,i,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},m=function(a,b,c){b=b||"soft";var d,e,f,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],f=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new g(d,e,f,h):new g(d,(2*e+d)/3,(2*e+f)/3,f);i.length=n}return p},n=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f,h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.20.5",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=("undefined"!=typeof window?window:O.defaultView||{getComputedStyle:function(){}}).getComputedStyle,_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e&&"lineHeight"!==c)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"lineHeight"!==c||e)if("%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,-1!==_(l,"display").indexOf("flex")&&(m.position="absolute"),i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}else i=$(a).lineHeight,a.style.lineHeight=d,h=parseFloat($(a).lineHeight),a.style.lineHeight=i;return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(c[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h="";if(!f.length)return a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+" "+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=i.r(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod.call(this._tween,h.rotation,this.t,this._tween):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j?"function"==typeof j?j:Math.round:j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(-1!==(d+c).indexOf("rgb")||-1!==(d+c).indexOf("hsl")?(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" ")):(D=D.join(" ").split(",").join(", ").split(" "),E=E.join(" ").split(",").join(", ").split(" ")),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m]+"",x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px")?Math.round:!1,!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,z=u,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(z.substr(0,z.indexOf("hsl"))+(y?"hsla(":"hsl("),p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(z.substr(0,z.indexOf("rgb"))+(y?"rgba(":"rgb("),p[0],u[0]-p[0],",",Math.round,!0).appendXtra("",p[1],u[1]-p[1],",",Math.round).appendXtra("",p[2],u[2]-p[2],y?",":B,Math.round),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2)?Math.round:!1,0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!Ha||!a.getCTM||a.parentNode&&!a.ownerSVGElement||!Na(a))},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,!Ca||!(h=!$(a)||"none"===$(a).display)&&a.parentNode||(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(e=a.transform.baseVal.consolidate().matrix,d="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")",c=0)),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(N),w=Math.sin(N),s=x*v+y*w,t=B*v+C*w,u=F*v+G*w,y=y*v-x*w,C=C*v-B*w,G=G*v-F*w,x=s,B=t,F=u),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),N=Math.atan2(B,C),m.scaleX=(Math.sqrt(x*x+y*y+z*z)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+D*D)*p+.5|0)/p,m.scaleZ=(Math.sqrt(F*F+G*G+H*H)*p+.5|0)/p,x/=m.scaleX,B/=m.scaleY,y/=m.scaleX,C/=m.scaleY,Math.abs(N)>o?(m.skewX=N*L,B=0,"simple"!==m.skewType&&(m.scaleY*=1/Math.cos(N))):m.skewX=0,m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{+parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(D.skewType=A.skewType||D.skewType||g.defaultSkewType,d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",-1!==E.indexOf("%")&&(m.width=_(a,"width"),m.height=_(a,"height")),O.body.appendChild(Q),l=Ra(Q,null,!1),"simple"===D.skewType&&(l.scaleY*=Math.cos(l.skewX*K)),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="","co"===a.substr(0,2)?a:ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b){if(n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g])c=h.parse(a,n,g,this,c,f,b);else{if("--"===g.substr(0,2)){this._tween._propLookup[g]=this._addTween.call(this._tween,a.style,"setProperty",$(a).getPropertyValue(g)+"",n+"",g,!1,g);continue}m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&(""!==p||"lineHeight"===g)&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))}f&&c&&!c.plugin&&(c.plugin=f)}return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=e.r(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=e.r(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&(b.r=a[b.p]),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){var b=1>a?Math.pow(10,(a+"").length-2):1;return function(c){return(Math.round(c/a)*a*b|0)/b}},c=function(a,b){for(;a;)a.f||a.blob||(a.m=b||Math.round),a=a._next},d=a.prototype;d._onInitAllProps=function(){var a,d,e,f,g=this._tween,h=g.vars.roundProps,i={},j=g._propLookup.roundProps;if("object"!=typeof h||h.push)for("string"==typeof h&&(h=h.split(",")),e=h.length;--e>-1;)i[h[e]]=Math.round;else for(f in h)i[f]=b(h[f]);for(f in i)for(a=g._firstPT;a;)d=a._next,a.pg?a.t._mod(i):a.n===f&&(2===a.f&&a.t?c(a.t._firstPT,i[f]):(this._add(a.t,f,a.s,a.c,i[f]),d&&(d._prev=a._prev),a._prev?a._prev._next=d:g._firstPT===a&&(g._firstPT=d),a._next=a._prev=null,g._propLookup[f]=j)),a=d;return!1},d._add=function(a,b,c,d,e){this._addTween(a,b,c,c+d,b,e||Math.round),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(a,b,c,d){var e,f;if("function"!=typeof a.setAttribute)return!1;for(e in b)f=b[e],"function"==typeof f&&(f=f(d,a)),this._addTween(a,"setAttribute",a.getAttribute(e)+"",f+"",e,!1,e),this._overwriteProps.push(e);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(a,b,c,d){"object"!=typeof b&&(b={rotation:b}),this.finals={};var e,f,g,h,i,j,k=b.useRadians===!0?2*Math.PI:360,l=1e-6;for(e in b)"useRadians"!==e&&(h=b[e],"function"==typeof h&&(h=h(d,a)),j=(h+"").split("_"),f=j[0],g=parseFloat("function"!=typeof a[e]?a[e]:a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]()),h=this.finals[e]="string"==typeof f&&"="===f.charAt(1)?g+parseInt(f.charAt(0)+"1",10)*Number(f.substr(2)):Number(f)||0,i=h-g,j.length&&(f=j.join("_"),-1!==f.indexOf("short")&&(i%=k,i!==i%(k/2)&&(i=0>i?i+k:i-k)),-1!==f.indexOf("_cw")&&0>i?i=(i+9999999999*k)%k-(i/k|0)*k:-1!==f.indexOf("ccw")&&i>0&&(i=(i-9999999999*k)%k-(i/k|0)*k)),(i>l||-l>i)&&(this._addTween(a,e,g,g+i,e),this._overwriteProps.push(e)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e,f=_gsScope.GreenSockGlobals||_gsScope,g=f.com.greensock,h=2*Math.PI,i=Math.PI/2,j=g._class,k=function(b,c){var d=j("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},l=a.register||function(){},m=function(a,b,c,d,e){var f=j("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return l(f,a),f},n=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},o=function(b,c){var d=j("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},p=m("Back",o("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),o("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),o("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),q=j("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),r=q.prototype=new a;return r.constructor=q,r.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1===a?0:1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},q.ease=new q(.7,.7),r.config=q.config=function(a,b,c){return new q(a,b,c)},b=j("easing.SteppedEase",function(a,b){a=a||1,this._p1=1/a,this._p2=a+(b?0:1),this._p3=b?1:0},!0),r=b.prototype=new a,r.constructor=b,r.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),((this._p2*a|0)+this._p3)*this._p1},r.config=b.config=function(a,c){return new b(a,c)},c=j("easing.ExpoScaleEase",function(a,b,c){this._p1=Math.log(b/a),this._p2=b-a,this._p3=a,this._ease=c},!0),r=c.prototype=new a,r.constructor=c,r.getRatio=function(a){return this._ease&&(a=this._ease.getRatio(a)),(this._p3*Math.exp(this._p1*a)-this._p3)/this._p2},r.config=c.config=function(a,b,d){return new c(a,b,d)},d=j("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),m=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--m>-1;)c=o?Math.random():1/l*m,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:m%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new n(1,1,null),m=l;--m>-1;)g=j[m],h=new n(g.x,g.y,h);this._prev=new n(0,0,0!==h.t?h:h.next)},!0),r=d.prototype=new a,r.constructor=d,r.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},r.config=function(a){return new d(a)},d.ease=new d,m("Bounce",k("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),k("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),k("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),m("Circ",k("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),k("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),k("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),e=function(b,c,d){var e=j("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/h*(Math.asin(1/this._p1)||0),this._p2=h/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},m("Elastic",e("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),e("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),e("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),m("Expo",k("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),k("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),k("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),m("Sine",k("SineOut",function(a){return Math.sin(a*i)}),k("SineIn",function(a){return-Math.cos(a*i)+1}),k("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),j("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),l(f.SlowMo,"SlowMo","ease,"),l(d,"RoughEase","ease,"),l(b,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(e.TweenLite)return e.TweenLite;var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p=f.length,s=p;--p>-1;)(l=q[f[p]]||new r(f[p],[])).gsClass?(i[p]=l.gsClass,s--):j&&l.sc.push(this);if(0===s&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,"undefined"!=typeof module&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else"function"==typeof define&&define.amd&&define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){return arguments.length?(p=a||1/m,void(q=Math.min(b,p,0))):1/m>p},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==(d||{}).visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,X){j||i.wake();var c=this.vars.useFrames?W:X;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&("hidden"!==(d||{}).visibilityState||!i.lagSmoothing())&&i.wake();var a=setTimeout(E,2e3);a.unref&&a.unref()};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-1e-7},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Z(),this.render(a,b,!1),J.length&&Z())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||m,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),+this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=this.rawTime()-(a._timeline.rawTime()-a._pauseTime)),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?V[G.defaultOverwrite]:"number"==typeof i?i>>0:V[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=$(f,this,!1),1===i&&this._siblings[e].length>1&&aa(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=$(b,this,!1),1===i&&this._siblings.length>1&&aa(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)U[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!R[c]||R[c]&&R[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.20.5",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):(d||(d=a.document),d?d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=/[\+-]=-?[\.\d]/,N=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m.call(this._tween,b,this._target||c.t,this._tween):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},O=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=N,M.test(b)&&(l.end=null),l},P=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=O(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},Q=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:O},R=G._plugins={},S=Q.tweenLookup={},T=0,U=Q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},V={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},W=D._rootFramesTimeline=new F,X=D._rootTimeline=new F,Y=30,Z=Q.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};X._startTime=i.time,W._startTime=i.frame,X._active=W._active=!0,setTimeout(Z,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Z(),X.render((i.time-X._startTime)*X._timeScale,!1,!1),W.render((i.frame-W._startTime)*W._timeScale,!1,!1),J.length&&Z(),i.frame>=Y){Y=i.frame+(parseInt(G.autoSleep,10)||120);for(c in S){for(b=S[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete S[c]}if(c=X._first,(!c||c._paused)&&G.autoSleep&&!W._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var $=function(a,b,c){var d,e,f=a._gsTweenID;if(S[f||(a._gsTweenID=f="t"+T++)]||(S[f]={target:a,tweens:[]}),b&&(d=S[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return S[f].tweens},_=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},aa=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||ba(b,0,o),0===ba(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!_(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},ba=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=G.to(this.target||{},0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)U[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Z(),this.vars.css||b.style&&b!==a&&b.nodeType&&R.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],U[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(R[g]&&(j=new R[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=P.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&aa(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),(!this._initted||this._startAt&&this._startAt.progress())&&(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,!0,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,!0,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,!0,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!_(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=$(d[c],this,!0);else this._siblings=$(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=$(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ca=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ca.prototype},!0);if(h=ca.prototype,ca.version="1.19.0",ca.API=2,h._firstPT=null,h._addTween=P,h.setRatio=N,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ca.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ca.API&&(R[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ca.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ca(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ca.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax");\ No newline at end of filediff --git a/src/minified/plugins/CSSPlugin.min.js b/src/minified/plugins/CSSPlugin.min.jsindex f4b360f..094b140 100644--- a/src/minified/plugins/CSSPlugin.min.js+++ b/src/minified/plugins/CSSPlugin.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,5 +9,5 @@** @author: Jack Doyle, [email protected]*/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.20.4",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e&&"lineHeight"!==c)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"lineHeight"!==c||e)if("%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,-1!==_(l,"display").indexOf("flex")&&(m.position="absolute"),i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}else i=$(a).lineHeight,a.style.lineHeight=d,h=parseFloat($(a).lineHeight),a.style.lineHeight=i;return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(c[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h="";if(!f.length)return a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+" "+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(-1!==(d+c).indexOf("rgb")||-1!==(d+c).indexOf("hsl")?(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" ")):(D=D.join(" ").split(",").join(", ").split(" "),E=E.join(" ").split(",").join(", ").split(" ")),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,z=u,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(z.substr(0,z.indexOf("hsl"))+(y?"hsla(":"hsl("),p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(z.substr(0,z.indexOf("rgb"))+(y?"rgba(":"rgb("),p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2),0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!Ha||!a.getCTM||a.parentNode&&!a.ownerSVGElement||!Na(a))},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,!Ca||!(h=!$(a)||"none"===$(a).display)&&a.parentNode||(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(e=a.transform.baseVal.consolidate().matrix,d="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")",c=0)),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(N),w=Math.sin(N),s=x*v+y*w,t=B*v+C*w,u=F*v+G*w,y=y*v-x*w,C=C*v-B*w,G=G*v-F*w,x=s,B=t,F=u),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),N=Math.atan2(B,C),m.scaleX=(Math.sqrt(x*x+y*y+z*z)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+D*D)*p+.5|0)/p,m.scaleZ=(Math.sqrt(F*F+G*G+H*H)*p+.5|0)/p,x/=m.scaleX,B/=m.scaleY,y/=m.scaleX,C/=m.scaleY,Math.abs(N)>o?(m.skewX=N*L,B=0,"simple"!==m.skewType&&(m.scaleY*=1/Math.cos(N))):m.skewX=0,m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(D.skewType=A.skewType||D.skewType||g.defaultSkewType,d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),"simple"===D.skewType&&(l.scaleY*=Math.cos(l.skewX*K)),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0-}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b){if(n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g])c=h.parse(a,n,g,this,c,f,b);else{if("--"===g.substr(0,2)){this._tween._propLookup[g]=this._addTween.call(this._tween,a.style,"setProperty",$(a).getPropertyValue(g)+"",n+"",g,!1,g);continue}m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&(""!==p||"lineHeight"===g)&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))}f&&c&&!c.plugin&&(c.plugin=f)}return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=Math.round(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&a[b.p]===Math.round&&(b.r=1),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CSSPlugin");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.20.5",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=("undefined"!=typeof window?window:O.defaultView||{getComputedStyle:function(){}}).getComputedStyle,_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e&&"lineHeight"!==c)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"lineHeight"!==c||e)if("%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,-1!==_(l,"display").indexOf("flex")&&(m.position="absolute"),i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}else i=$(a).lineHeight,a.style.lineHeight=d,h=parseFloat($(a).lineHeight),a.style.lineHeight=i;return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(c[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h="";if(!f.length)return a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+" "+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=i.r(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod.call(this._tween,h.rotation,this.t,this._tween):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j?"function"==typeof j?j:Math.round:j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(-1!==(d+c).indexOf("rgb")||-1!==(d+c).indexOf("hsl")?(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" ")):(D=D.join(" ").split(",").join(", ").split(" "),E=E.join(" ").split(",").join(", ").split(" ")),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m]+"",x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px")?Math.round:!1,!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,z=u,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(z.substr(0,z.indexOf("hsl"))+(y?"hsla(":"hsl("),p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(z.substr(0,z.indexOf("rgb"))+(y?"rgba(":"rgb("),p[0],u[0]-p[0],",",Math.round,!0).appendXtra("",p[1],u[1]-p[1],",",Math.round).appendXtra("",p[2],u[2]-p[2],y?",":B,Math.round),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2)?Math.round:!1,0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!Ha||!a.getCTM||a.parentNode&&!a.ownerSVGElement||!Na(a))},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,!Ca||!(h=!$(a)||"none"===$(a).display)&&a.parentNode||(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(e=a.transform.baseVal.consolidate().matrix,d="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")",c=0)),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(N),w=Math.sin(N),s=x*v+y*w,t=B*v+C*w,u=F*v+G*w,y=y*v-x*w,C=C*v-B*w,G=G*v-F*w,x=s,B=t,F=u),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),N=Math.atan2(B,C),m.scaleX=(Math.sqrt(x*x+y*y+z*z)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+D*D)*p+.5|0)/p,m.scaleZ=(Math.sqrt(F*F+G*G+H*H)*p+.5|0)/p,x/=m.scaleX,B/=m.scaleY,y/=m.scaleX,C/=m.scaleY,Math.abs(N)>o?(m.skewX=N*L,B=0,"simple"!==m.skewType&&(m.scaleY*=1/Math.cos(N))):m.skewX=0,m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(D.skewType=A.skewType||D.skewType||g.defaultSkewType,d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",-1!==E.indexOf("%")&&(m.width=_(a,"width"),m.height=_(a,"height")),O.body.appendChild(Q),l=Ra(Q,null,!1),"simple"===D.skewType&&(l.scaleY*=Math.cos(l.skewX*K)),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ");+}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="","co"===a.substr(0,2)?a:ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b){if(n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g])c=h.parse(a,n,g,this,c,f,b);else{if("--"===g.substr(0,2)){this._tween._propLookup[g]=this._addTween.call(this._tween,a.style,"setProperty",$(a).getPropertyValue(g)+"",n+"",g,!1,g);continue}m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&(""!==p||"lineHeight"===g)&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))}f&&c&&!c.plugin&&(c.plugin=f)}return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=e.r(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=e.r(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&(b.r=a[b.p]),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CSSPlugin");\ No newline at end of filediff --git a/src/minified/plugins/ModifiersPlugin.min.js b/src/minified/plugins/ModifiersPlugin.min.jsindex bb1ab99..e58255c 100644--- a/src/minified/plugins/ModifiersPlugin.min.js+++ b/src/minified/plugins/ModifiersPlugin.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 0.0.3- * DATE: 2018-02-15+ * VERSION: 0.0.4+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]*/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=function(a,b,c){var d=a.type,e=a.setRatio,f=b._tween,g=b._target;a.type=2,a.m=c,a.setRatio=function(b){var h,i,j,k=1e-6;if(1!==b||f._time!==f._duration&&0!==f._time)if(b||f._time!==f._duration&&0!==f._time||f._rawPrevTime===-1e-6)if(h=a.c*b+a.s,a.r?h=Math.round(h):k>h&&h>-k&&(h=0),d)if(1===d){for(i=a.xs0+h+a.xs1,j=1;j<a.l;j++)i+=a["xn"+j]+a["xs"+(j+1)];a.t[a.p]=c(i,g)}else-1===d?a.t[a.p]=c(a.xs0,g):e&&e.call(a,b);else a.t[a.p]=c(h+a.xs0,g);else 2!==d?a.t[a.p]=c(a.b,g):e.call(a,b);else if(2!==d)if(a.r&&-1!==d)if(h=Math.round(a.s+a.c),d){if(1===d){for(i=a.xs0+h+a.xs1,j=1;j<a.l;j++)i+=a["xn"+j]+a["xs"+(j+1)];a.t[a.p]=c(i,g)}}else a.t[a.p]=c(h+a.xs0,g);else a.t[a.p]=c(a.e,g);else e.call(a,b)}},b=function(b,c){for(var d=c._firstPT,e=b.rotation&&-1!==c._overwriteProps.join("").indexOf("bezier");d;)"function"==typeof b[d.p]?a(d,c,b[d.p]):e&&"bezier"===d.n&&-1!==d.plugin._overwriteProps.join("").indexOf("rotation")&&(d.data.mod=b.rotation),d=d._next},c=_gsScope._gsDefine.plugin({propName:"modifiers",version:"0.0.3",API:2,init:function(a,b,c){return this._tween=c,this._vars=b,!0},initAll:function(){for(var a,c,d=this._tween,e=this._vars,f=this,g=d._firstPT;g;)c=g._next,a=e[g.n],g.pg?"css"===g.t._propName?b(e,g.t):g.t!==f&&(a=e[g.t._propName],g.t._mod("object"==typeof a?a:e)):"function"==typeof a&&(2===g.f&&g.t?g.t._applyPT.m=a:(this._add(g.t,g.p,g.s,g.c,a),c&&(c._prev=g._prev),g._prev?g._prev._next=c:d._firstPT===g&&(d._firstPT=c),g._next=g._prev=null,d._propLookup[g.n]=f)),g=c;return!1}}),d=c.prototype;d._add=function(a,b,c,d,e){this._addTween(a,b,c,c+d,b,e),this._overwriteProps.push(b)},d=_gsScope._gsDefine.globals.TweenLite.version.split("."),Number(d[0])<=1&&Number(d[1])<19&&_gsScope.console&&console.log("ModifiersPlugin requires GSAP 1.19.0 or later.")}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("ModifiersPlugin");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=function(a,b,c){var d=a.type,e=a.setRatio,f=b._tween,g=b._target;a.type=2,a.m=c,a.setRatio=function(b){var h,i,j,k=1e-6;if(1!==b||f._time!==f._duration&&0!==f._time)if(b||f._time!==f._duration&&0!==f._time||f._rawPrevTime===-1e-6)if(h=a.c*b+a.s,a.r?h=Math.round(h):k>h&&h>-k&&(h=0),d)if(1===d){for(i=a.xs0+h+a.xs1,j=1;j<a.l;j++)i+=a["xn"+j]+a["xs"+(j+1)];a.t[a.p]=c.call(f,i,g,f)}else-1===d?a.t[a.p]=c.call(f,a.xs0,g,f):e&&e.call(a,b);else a.t[a.p]=c.call(f,h+a.xs0,g,f);else 2!==d?a.t[a.p]=c.call(f,a.b,g,f):e.call(a,b);else if(2!==d)if(a.r&&-1!==d)if(h=Math.round(a.s+a.c),d){if(1===d){for(i=a.xs0+h+a.xs1,j=1;j<a.l;j++)i+=a["xn"+j]+a["xs"+(j+1)];a.t[a.p]=c.call(f,i,g,f)}}else a.t[a.p]=c.call(f,h+a.xs0,g,f);else a.t[a.p]=c.call(f,a.e,g,f);else e.call(a,b)}},b=function(b,c){var d=c._firstPT,e=b.rotation&&-1!==c._overwriteProps.join("").indexOf("bezier");for(b.scale?b.scaleX=b.scaleY=b.scale:b.rotationZ&&(b.rotation=b.rotationZ);d;)"function"==typeof b[d.p]?a(d,c,b[d.p]):e&&"bezier"===d.n&&-1!==d.plugin._overwriteProps.join("").indexOf("rotation")&&(d.data.mod=b.rotation),d=d._next},c=_gsScope._gsDefine.plugin({propName:"modifiers",version:"0.0.4",API:2,init:function(a,b,c){return this._tween=c,this._vars=b,!0},initAll:function(){var a,c,d=this._tween,e=this._vars,f=this,g=d._firstPT;if(g._modInitted)return!1;for(g._modInitted=1;g;)c=g._next,a=e[g.n],g.pg?"css"===g.t._propName?b(e,g.t):g.t!==f&&(a=e[g.t._propName],g.t._tween=d,g.t._mod("object"==typeof a?a:e)):"function"==typeof a&&(2===g.f&&g.t?(g.t._applyPT.m=a,g.t._tween=d):(this._add(g.t,g.p,g.s,g.c,a),c&&(c._prev=g._prev),g._prev?g._prev._next=c:d._firstPT===g&&(d._firstPT=c),g._next=g._prev=null,d._propLookup[g.n]=f)),g=c;return!1}}),d=c.prototype;d._add=function(a,b,c,d,e){this._addTween(a,b,c,c+d,b,e),this._overwriteProps.push(b)},d=_gsScope._gsDefine.globals.TweenLite.version.split("."),Number(d[0])<=1&&Number(d[1])<19&&_gsScope.console&&console.log("ModifiersPlugin requires GSAP 1.19.0 or later.")}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("ModifiersPlugin");\ No newline at end of filediff --git a/src/minified/plugins/RoundPropsPlugin.min.js b/src/minified/plugins/RoundPropsPlugin.min.jsindex fee6a6d..a53e7c0 100644--- a/src/minified/plugins/RoundPropsPlugin.min.js+++ b/src/minified/plugins/RoundPropsPlugin.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.6.0- * DATE: 2018-02-15+ * VERSION: 1.7.0+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]**/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){for(;a;)a.f||a.blob||(a.m=Math.round),a=a._next},c=a.prototype;c._onInitAllProps=function(){for(var a,c,d,e=this._tween,f=e.vars.roundProps.join?e.vars.roundProps:e.vars.roundProps.split(","),g=f.length,h={},i=e._propLookup.roundProps;--g>-1;)h[f[g]]=Math.round;for(g=f.length;--g>-1;)for(a=f[g],c=e._firstPT;c;)d=c._next,c.pg?c.t._mod(h):c.n===a&&(2===c.f&&c.t?b(c.t._firstPT):(this._add(c.t,a,c.s,c.c),d&&(d._prev=c._prev),c._prev?c._prev._next=d:e._firstPT===c&&(e._firstPT=d),c._next=c._prev=null,e._propLookup[a]=i)),c=d;return!1},c._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,Math.round),this._overwriteProps.push(b)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){var b=1>a?Math.pow(10,(a+"").length-2):1;return function(c){return(Math.round(c/a)*a*b|0)/b}},c=function(a,b){for(;a;)a.f||a.blob||(a.m=b||Math.round),a=a._next},d=a.prototype;d._onInitAllProps=function(){var a,d,e,f,g=this._tween,h=g.vars.roundProps,i={},j=g._propLookup.roundProps;if("object"!=typeof h||h.push)for("string"==typeof h&&(h=h.split(",")),e=h.length;--e>-1;)i[h[e]]=Math.round;else for(f in h)i[f]=b(h[f]);for(f in i)for(a=g._firstPT;a;)d=a._next,a.pg?a.t._mod(i):a.n===f&&(2===a.f&&a.t?c(a.t._firstPT,i[f]):(this._add(a.t,f,a.s,a.c,i[f]),d&&(d._prev=a._prev),a._prev?a._prev._next=d:g._firstPT===a&&(g._firstPT=d),a._next=a._prev=null,g._propLookup[f]=j)),a=d;return!1},d._add=function(a,b,c,d,e){this._addTween(a,b,c,c+d,b,e||Math.round),this._overwriteProps.push(b)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();\ No newline at end of filediff --git a/src/minified/plugins/ScrollToPlugin.min.js b/src/minified/plugins/ScrollToPlugin.min.jsindex d8c1e6b..f4d1851 100644--- a/src/minified/plugins/ScrollToPlugin.min.js+++ b/src/minified/plugins/ScrollToPlugin.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.9.0- * DATE: 2018-02-15+ * VERSION: 1.9.1+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -9,4 +9,4 @@** @author: Jack Doyle, [email protected]**/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=(_gsScope.document||{}).documentElement,b=_gsScope,c=function(c,d){var e="x"===d?"Width":"Height",f="scroll"+e,g="client"+e,h=document.body;return c===b||c===a||c===h?Math.max(a[f],h[f])-(b["inner"+e]||a[g]||h[g]):c[f]-c["offset"+e]},d=function(a){return"string"==typeof a&&(a=TweenLite.selector(a)),a.length&&a!==b&&a[0]&&a[0].style&&!a.nodeType&&(a=a[0]),a===b||a.nodeType&&a.style?a:null},e=function(c,d){var e="scroll"+("x"===d?"Left":"Top");return c===b&&(null!=c.pageXOffset?e="page"+d.toUpperCase()+"Offset":c=null!=a[e]?a:document.body),function(){return c[e]}},f=function(c,f){var g=d(c).getBoundingClientRect(),h=!f||f===b||f===document.body,i=(h?a:f).getBoundingClientRect(),j={x:g.left-i.left,y:g.top-i.top};return!h&&f&&(j.x+=e(f,"x")(),j.y+=e(f,"y")()),j},g=function(a,b,d){var e=typeof a;return isNaN(a)?"number"===e||"string"===e&&"="===a.charAt(1)?a:"max"===a?c(b,d):Math.min(c(b,d),f(a,b)[d]):parseFloat(a)},h=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,global:!0,version:"1.9.0",init:function(a,c,d){return this._wdw=a===b,this._target=a,this._tween=d,"object"!=typeof c?(c={y:c},"string"==typeof c.y&&"max"!==c.y&&"="!==c.y.charAt(1)&&(c.x=c.y)):c.nodeType&&(c={y:c,x:c}),this.vars=c,this._autoKill=c.autoKill!==!1,this.getX=e(a,"x"),this.getY=e(a,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=c.x?(this._addTween(this,"x",this.x,g(c.x,a,"x")-(c.offsetX||0),"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=c.y?(this._addTween(this,"y",this.y,g(c.y,a,"y")-(c.offsetY||0),"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(a){this._super.setRatio.call(this,a);var d=this._wdw||!this.skipX?this.getX():this.xPrev,e=this._wdw||!this.skipY?this.getY():this.yPrev,f=e-this.yPrev,g=d-this.xPrev,i=h.autoKillThreshold;this.x<0&&(this.x=0),this.y<0&&(this.y=0),this._autoKill&&(!this.skipX&&(g>i||-i>g)&&d<c(this._target,"x")&&(this.skipX=!0),!this.skipY&&(f>i||-i>f)&&e<c(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?b.scrollTo(this.skipX?d:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),i=h.prototype;h.max=c,h.getOffset=f,h.buildGetter=e,h.autoKillThreshold=7,i._kill=function(a){return a.scrollTo_x&&(this.skipX=!0),a.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,a)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("ScrollToPlugin");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=(_gsScope.document||{}).documentElement,b=_gsScope,c=function(c,d){var e="x"===d?"Width":"Height",f="scroll"+e,g="client"+e,h=document.body;return c===b||c===a||c===h?Math.max(a[f],h[f])-(b["inner"+e]||a[g]||h[g]):c[f]-c["offset"+e]},d=function(a){return"string"==typeof a&&(a=TweenLite.selector(a)),a.length&&a!==b&&a[0]&&a[0].style&&!a.nodeType&&(a=a[0]),a===b||a.nodeType&&a.style?a:null},e=function(c,d){var e="scroll"+("x"===d?"Left":"Top");return c===b&&(null!=c.pageXOffset?e="page"+d.toUpperCase()+"Offset":c=null!=a[e]?a:document.body),function(){return c[e]}},f=function(c,f){var g=d(c).getBoundingClientRect(),h=document.body,i=!f||f===b||f===h,j=i?{top:a.clientTop-(window.pageYOffset||a.scrollTop||h.scrollTop||0),left:a.clientLeft-(window.pageXOffset||a.scrollLeft||h.scrollLeft||0)}:f.getBoundingClientRect(),k={x:g.left-j.left,y:g.top-j.top};return!i&&f&&(k.x+=e(f,"x")(),k.y+=e(f,"y")()),k},g=function(a,b,d){var e=typeof a;return isNaN(a)?"number"===e||"string"===e&&"="===a.charAt(1)?a:"max"===a?c(b,d):Math.min(c(b,d),f(a,b)[d]):parseFloat(a)},h=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,global:!0,version:"1.9.1",init:function(a,c,d){return this._wdw=a===b,this._target=a,this._tween=d,"object"!=typeof c?(c={y:c},"string"==typeof c.y&&"max"!==c.y&&"="!==c.y.charAt(1)&&(c.x=c.y)):c.nodeType&&(c={y:c,x:c}),this.vars=c,this._autoKill=c.autoKill!==!1,this.getX=e(a,"x"),this.getY=e(a,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=c.x?(this._addTween(this,"x",this.x,g(c.x,a,"x")-(c.offsetX||0),"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=c.y?(this._addTween(this,"y",this.y,g(c.y,a,"y")-(c.offsetY||0),"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(a){this._super.setRatio.call(this,a);var d=this._wdw||!this.skipX?this.getX():this.xPrev,e=this._wdw||!this.skipY?this.getY():this.yPrev,f=e-this.yPrev,g=d-this.xPrev,i=h.autoKillThreshold;this.x<0&&(this.x=0),this.y<0&&(this.y=0),this._autoKill&&(!this.skipX&&(g>i||-i>g)&&d<c(this._target,"x")&&(this.skipX=!0),!this.skipY&&(f>i||-i>f)&&e<c(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?b.scrollTo(this.skipX?d:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),i=h.prototype;h.max=c,h.getOffset=f,h.buildGetter=e,h.autoKillThreshold=7,i._kill=function(a){return a.scrollTo_x&&(this.skipX=!0),a.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,a)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("ScrollToPlugin");\ No newline at end of filediff --git a/src/minified/utils/Draggable.min.js b/src/minified/utils/Draggable.min.jsindex 1abe53a..8bc825e 100644--- a/src/minified/utils/Draggable.min.js+++ b/src/minified/utils/Draggable.min.js@@ -1,6 +1,6 @@/*!- * VERSION: 0.16.2- * DATE: 2018-02-15+ * VERSION: 0.16.3+ * DATE: 2018-05-04* UPDATES AND DOCS AT: http://greensock.com** Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).@@ -11,5 +11,5 @@** @author: Jack Doyle, [email protected]*/-var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite","plugins.CSSPlugin"],function(a,b,c){var d,e,f,g,h,i,j,k,l,m={css:{},data:"_draggable"},n={css:{},data:"_draggable"},o={css:{},data:"_draggable"},p={css:{}},q=_gsScope._gsDefine.globals,r={},s={style:{}},t=_gsScope.document||{createElement:function(){return s}},u=t.documentElement||{},v=function(a){return t.createElementNS?t.createElementNS("http://www.w3.org/1999/xhtml",a):t.createElement(a)},w=v("div"),x=[],y=function(){return!1},z=180/Math.PI,A=999999999999999,B=Date.now||function(){return(new Date).getTime()},C=!(t.addEventListener||!t.all),D=t.createElement("div"),E=[],F={},G=0,H=/^(?:a|input|textarea|button|select)$/i,I=0,J=_gsScope.navigator&&-1!==_gsScope.navigator.userAgent.toLowerCase().indexOf("android"),K=0,L={},M={},N=function(a){if("string"==typeof a&&(a=b.selector(a)),!a||a.nodeType)return[a];var c,d=[],e=a.length;for(c=0;c!==e;d.push(a[c++]));return d},O=function(a,b){var c,d={};if(b)for(c in a)d[c]=a[c]*b;else for(c in a)d[c]=a[c];return d},P=function(){for(var a=E.length;--a>-1;)E[a]()},Q=function(a){E.push(a),1===E.length&&b.ticker.addEventListener("tick",P,this,!1,1)},R=function(a){for(var c=E.length;--c>-1;)E[c]===a&&E.splice(c,1);b.to(S,0,{overwrite:"all",delay:15,onComplete:S,data:"_draggable"})},S=function(){E.length||b.ticker.removeEventListener("tick",P)},T=function(a,b){var c;for(c in b)void 0===a[c]&&(a[c]=b[c]);return a},U=function(){return null!=window.pageYOffset?window.pageYOffset:null!=t.scrollTop?t.scrollTop:u.scrollTop||t.body.scrollTop||0},V=function(){return null!=window.pageXOffset?window.pageXOffset:null!=t.scrollLeft?t.scrollLeft:u.scrollLeft||t.body.scrollLeft||0},W=function(a,b){Ja(a,"scroll",b),Y(a.parentNode)||W(a.parentNode,b)},X=function(a,b){Ka(a,"scroll",b),Y(a.parentNode)||X(a.parentNode,b)},Y=function(a){return!(a&&a!==u&&a!==t&&a!==t.body&&a!==window&&a.nodeType&&a.parentNode)},Z=function(a,b){var c="x"===b?"Width":"Height",d="scroll"+c,e="client"+c,f=t.body;return Math.max(0,Y(a)?Math.max(u[d],f[d])-(window["inner"+c]||u[e]||f[e]):a[d]-a[e])},$=function(a){var b=Y(a),c=Z(a,"x"),d=Z(a,"y");b?a=M:$(a.parentNode),a._gsMaxScrollX=c,a._gsMaxScrollY=d,a._gsScrollX=a.scrollLeft||0,a._gsScrollY=a.scrollTop||0},_=function(a,b){return a=a||window.event,r.pageX=a.clientX+t.body.scrollLeft+u.scrollLeft,r.pageY=a.clientY+t.body.scrollTop+u.scrollTop,b&&(a.returnValue=!1),r},aa=function(a){return a?("string"==typeof a&&(a=b.selector(a)),a.length&&a!==window&&a[0]&&a[0].style&&!a.nodeType&&(a=a[0]),a===window||a.nodeType&&a.style?a:null):a},ba=function(a,b){var c,e,f,g=a.style;if(void 0===g[b]){for(f=["O","Moz","ms","Ms","Webkit"],e=5,c=b.charAt(0).toUpperCase()+b.substr(1);--e>-1&&void 0===g[f[e]+c];);if(0>e)return"";d=3===e?"ms":f[e],b=d+c}return b},ca=function(a,b,c){var d=a.style;d&&(void 0===d[b]&&(b=ba(a,b)),null==c?d.removeProperty?d.removeProperty(b.replace(/([A-Z])/g,"-$1").toLowerCase()):d.removeAttribute(b):void 0!==d[b]&&(d[b]=c))},da=t.defaultView?t.defaultView.getComputedStyle:y,ea=/(?:Left|Right|Width)/i,fa=/(?:\d|\-|\+|=|#|\.)*/g,ga=function(a,b,c,d,e){if("px"===d||!d)return c;if("auto"===d||!c)return 0;var f,g=ea.test(b),h=a,i=w.style,j=0>c;return j&&(c=-c),"%"===d&&-1!==b.indexOf("border")?f=c/100*(g?a.clientWidth:a.clientHeight):(i.cssText="border:0 solid red;position:"+ia(a,"position",!0)+";line-height:0;","%"!==d&&h.appendChild?i[g?"borderLeftWidth":"borderTopWidth"]=c+d:(h=a.parentNode||t.body,i[g?"width":"height"]=c+d),h.appendChild(w),f=parseFloat(w[g?"offsetWidth":"offsetHeight"]),h.removeChild(w),0!==f||e||(f=ga(a,b,c,d,!0))),j?-f:f},ha=function(a,b){if("absolute"!==ia(a,"position",!0))return 0;var c="left"===b?"Left":"Top",d=ia(a,"margin"+c,!0);return a["offset"+c]-(ga(a,b,parseFloat(d),(d+"").replace(fa,""))||0)},ia=function(a,b,c){var d,e=(a._gsTransform||{})[b];return e||0===e?e:(a.style[b]?e=a.style[b]:(d=da(a))?(e=d.getPropertyValue(b.replace(/([A-Z])/g,"-$1").toLowerCase()),e=e||d.length?e:d[b]):a.currentStyle&&(e=a.currentStyle[b]),"auto"!==e||"top"!==b&&"left"!==b||(e=ha(a,b)),c?e:parseFloat(e)||0)},ja=function(a,b,c){var d=a.vars,e=d[c],f=a._listeners[b];"function"==typeof e&&e.apply(d[c+"Scope"]||d.callbackScope||a,d[c+"Params"]||[a.pointerEvent]),f&&a.dispatchEvent(b)},ka=function(a,b){var c,d,e,f=aa(a);return f?Ea(f,b):void 0!==a.left?(e=ya(b),{left:a.left-e.x,top:a.top-e.y,width:a.width,height:a.height}):(d=a.min||a.minX||a.minRotation||0,c=a.min||a.minY||0,{left:d,top:c,width:(a.max||a.maxX||a.maxRotation||0)-d,height:(a.max||a.maxY||0)-c})},la=function(){if(!t.createElementNS)return g=0,void(h=!1);var a,b,c,d,e=v("div"),f=t.createElementNS("http://www.w3.org/2000/svg","svg"),l=v("div"),m=e.style,n=t.body||u,o="flex"===ia(n,"display",!0);t.body&&oa&&(m.position="absolute",n.appendChild(l),l.appendChild(e),d=e.offsetParent,l.style[oa]="rotate(1deg)",k=e.offsetParent===d,l.style.position="absolute",m.height="10px",d=e.offsetTop,l.style.border="5px solid red",j=d!==e.offsetTop,n.removeChild(l)),m=f.style,f.setAttributeNS(null,"width","400px"),f.setAttributeNS(null,"height","400px"),f.setAttributeNS(null,"viewBox","0 0 400 400"),m.display="block",m.boxSizing="border-box",m.border="0px solid red",m.transform="none",e.style.cssText="width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;",n.appendChild(e),e.appendChild(f),c=f.createSVGPoint().matrixTransform(f.getScreenCTM()),b=c.y,e.scrollTop=100,c.x=c.y=0,c=c.matrixTransform(f.getScreenCTM()),i=b-c.y<100.1?0:b-c.y-150,e.removeChild(f),n.removeChild(e),n.appendChild(f),o&&(n.style.display="block"),a=f.getScreenCTM(),b=a.e,m.border="50px solid red",a=f.getScreenCTM(),0===b&&0===a.e&&0===a.f&&1===a.a?(g=1,h=!0):(g=b!==a.e?1:0,h=1!==a.a),o&&(n.style.display="flex"),n.removeChild(f)},ma=""!==ba(w,"perspective"),na=ba(w,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),oa=ba(w,"transform"),pa=oa.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),qa={},ra={},sa=_gsScope.SVGElement,ta=function(a){return!!(sa&&"function"==typeof a.getBBox&&a.getCTM&&(!a.parentNode||a.parentNode.getBBox&&a.parentNode.getCTM))},ua=(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent))&&parseFloat(RegExp.$1)<11,va=[],wa=[],xa=function(a){if(!a.getBoundingClientRect||!a.parentNode||!oa)return{offsetTop:0,offsetLeft:0,scaleX:1,scaleY:1,offsetParent:u};if(Ta.cacheSVGData!==!1&&a._dCache&&a._dCache.lastUpdate===b.ticker.frame)return a._dCache;var c,d,e,f,j,k,l,m,n,o,p,q,r=a,s=za(a);if(s.lastUpdate=b.ticker.frame,a.getBBox&&!s.isSVGRoot){for(r=a.parentNode,c=a.getBBox();r&&"svg"!==(r.nodeName+"").toLowerCase();)r=r.parentNode;return f=xa(r),s.offsetTop=c.y*f.scaleY,s.offsetLeft=c.x*f.scaleX,s.scaleX=f.scaleX,s.scaleY=f.scaleY,s.offsetParent=r||u,s}for(e=s.offsetParent,e===t.body&&(e=u),wa.length=va.length=0;r&&(j=ia(r,oa,!0),"matrix(1, 0, 0, 1, 0, 0)"!==j&&"none"!==j&&"translate3d(0px, 0px, 0px)"!==j&&(wa.push(r),va.push(r.style[oa]),r.style[oa]="none"),r!==e);)r=r.parentNode;for(d=e.getBoundingClientRect(),j=a.getScreenCTM(),m=a.createSVGPoint(),l=m.matrixTransform(j),m.x=m.y=10,m=m.matrixTransform(j),s.scaleX=(m.x-l.x)/10,s.scaleY=(m.y-l.y)/10,void 0===g&&la(),s.borderBox&&!h&&a.getAttribute("width")&&(f=da(a)||{},n=parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)||0,o=parseFloat(f.borderTopWidth)+parseFloat(f.borderBottomWidth)||0,p=parseFloat(f.width)||0,q=parseFloat(f.height)||0,s.scaleX*=(p-n)/p,s.scaleY*=(q-o)/q),i?(c=a.getBoundingClientRect(),s.offsetLeft=c.left-d.left,s.offsetTop=c.top-d.top):(s.offsetLeft=l.x-d.left,s.offsetTop=l.y-d.top),s.offsetParent=e,k=wa.length;--k>-1;)wa[k].style[oa]=va[k];return s},ya=function(a,c){if(c=c||{},!a||a===u||!a.parentNode||a===window)return{x:0,y:0};var d=da(a),e=na&&d?d.getPropertyValue(na):"50% 50%",f=e.split(" "),g=-1!==e.indexOf("left")?"0%":-1!==e.indexOf("right")?"100%":f[0],h=-1!==e.indexOf("top")?"0%":-1!==e.indexOf("bottom")?"100%":f[1];return("center"===h||null==h)&&(h="50%"),("center"===g||isNaN(parseFloat(g)))&&(g="50%"),a.getBBox&&ta(a)?(a._gsTransform||(b.set(a,{x:"+=0",overwrite:!1}),void 0===a._gsTransform.xOrigin&&console.log("Draggable requires at least GSAP 1.17.0")),e=a.getBBox(),c.x=a._gsTransform.xOrigin-e.x,c.y=a._gsTransform.yOrigin-e.y):(a.getBBox&&-1!==(g+h).indexOf("%")&&(a=a.getBBox(),a={offsetWidth:a.width,offsetHeight:a.height}),c.x=-1!==g.indexOf("%")?a.offsetWidth*parseFloat(g)/100:parseFloat(g),c.y=-1!==h.indexOf("%")?a.offsetHeight*parseFloat(h)/100:parseFloat(h)),c},za=function(a){if(Ta.cacheSVGData!==!1&&a._dCache&&a._dCache.lastUpdate===b.ticker.frame)return a._dCache;var c,d=a._dCache=a._dCache||{},e=da(a),f=a.getBBox&&ta(a),g="svg"===(a.nodeName+"").toLowerCase();if(d.isSVG=f,d.isSVGRoot=g,d.borderBox="border-box"===e.boxSizing,d.computedStyle=e,g)c=a.parentNode||u,c.insertBefore(w,a),d.offsetParent=w.offsetParent||u,c.removeChild(w);else if(f){for(c=a.parentNode;c&&"svg"!==(c.nodeName+"").toLowerCase();)c=c.parentNode;d.offsetParent=c}else d.offsetParent=a.offsetParent;return d},Aa=function(a,b,c,d,e){if(a===window||!a||!a.style||!a.parentNode)return[1,0,0,1,0,0];var f,h,i,l,m,n,o,p,q,r,s,v,w,x,y=a._dCache||za(a),z=a.parentNode,A=z._dCache||za(z),B=y.computedStyle,C=y.isSVG?A.offsetParent:z.offsetParent;return f=y.isSVG&&-1!==(a.style[oa]+"").indexOf("matrix")?a.style[oa]:B?B.getPropertyValue(pa):a.currentStyle?a.currentStyle[oa]:"1,0,0,1,0,0",a.getBBox&&-1!==(a.getAttribute("transform")+"").indexOf("matrix")&&(f=a.getAttribute("transform")),f=(f+"").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g)||[1,0,0,1,0,0],f.length>6&&(f=[f[0],f[1],f[4],f[5],f[12],f[13]]),d?f[4]=f[5]=0:y.isSVG&&(m=a._gsTransform)&&(m.xOrigin||m.yOrigin)&&(f[0]=parseFloat(f[0]),f[1]=parseFloat(f[1]),f[2]=parseFloat(f[2]),f[3]=parseFloat(f[3]),f[4]=parseFloat(f[4])-(m.xOrigin-(m.xOrigin*f[0]+m.yOrigin*f[2])),f[5]=parseFloat(f[5])-(m.yOrigin-(m.xOrigin*f[1]+m.yOrigin*f[3]))),b&&(void 0===g&&la(),i=y.isSVG||y.isSVGRoot?xa(a):a,y.isSVG?(l=a.getBBox(),r=A.isSVGRoot?{x:0,y:0}:z.getBBox(),i={offsetLeft:l.x-r.x,offsetTop:l.y-r.y,offsetParent:y.offsetParent}):y.isSVGRoot?(s=parseInt(B.borderTopWidth,10)||0,v=parseInt(B.borderLeftWidth,10)||0,w=(f[0]-g)*v+f[2]*s,x=f[1]*v+(f[3]-g)*s,n=b.x,o=b.y,p=n-(n*f[0]+o*f[2]),q=o-(n*f[1]+o*f[3]),f[4]=parseFloat(f[4])+p,f[5]=parseFloat(f[5])+q,b.x-=p,b.y-=q,n=i.scaleX,o=i.scaleY,e||(b.x*=n,b.y*=o),f[0]*=n,f[1]*=o,f[2]*=n,f[3]*=o,ua||(b.x+=w,b.y+=x),C===t.body&&i.offsetParent===u&&(C=u)):!j&&a.offsetParent&&(b.x+=parseInt(ia(a.offsetParent,"borderLeftWidth"),10)||0,b.y+=parseInt(ia(a.offsetParent,"borderTopWidth"),10)||0),h=z===u||z===t.body,f[4]=Number(f[4])+b.x+(i.offsetLeft||0)-c.x-(h?0:z.scrollLeft||0),f[5]=Number(f[5])+b.y+(i.offsetTop||0)-c.y-(h?0:z.scrollTop||0),z&&"fixed"===ia(a,"position",B)&&(f[4]+=V(),f[5]+=U()),!z||z===u||C!==i.offsetParent||A.isSVG||k&&"100100"!==Aa(z).join("")||(i=A.isSVGRoot?xa(z):z,f[4]-=i.offsetLeft||0,f[5]-=i.offsetTop||0,j||!A.offsetParent||y.isSVG||y.isSVGRoot||(f[4]-=parseInt(ia(A.offsetParent,"borderLeftWidth"),10)||0,f[5]-=parseInt(ia(A.offsetParent,"borderTopWidth"),10)||0))),f},Ba=function(a,b){if(!a||a===window||!a.parentNode)return[1,0,0,1,0,0];for(var c,d,e,f,g,h,i,j,k=ya(a,qa),l=ya(a.parentNode,ra),m=Aa(a,k,l,!1,!b);(a=a.parentNode)&&a.parentNode&&a!==u;)k=l,l=ya(a.parentNode,k===qa?ra:qa),i=Aa(a,k,l),c=m[0],d=m[1],e=m[2],f=m[3],g=m[4],h=m[5],m[0]=c*i[0]+d*i[2],m[1]=c*i[1]+d*i[3],m[2]=e*i[0]+f*i[2],m[3]=e*i[1]+f*i[3],m[4]=g*i[0]+h*i[2]+i[4],m[5]=g*i[1]+h*i[3]+i[5];return b&&(c=m[0],d=m[1],e=m[2],f=m[3],g=m[4],h=m[5],j=c*f-d*e,m[0]=f/j,m[1]=-d/j,m[2]=-e/j,m[3]=c/j,m[4]=(e*h-f*g)/j,m[5]=-(c*h-d*g)/j),m},Ca=function(a,b,c,d,e){a=aa(a);var f=Ba(a,!1,e),g=b.x,h=b.y;return c&&(ya(a,b),g-=b.x,h-=b.y),d=d===!0?b:d||{},d.x=g*f[0]+h*f[2]+f[4],d.y=g*f[1]+h*f[3]+f[5],d},Da=function(a,b,c){var d=a.x*b[0]+a.y*b[2]+b[4],e=a.x*b[1]+a.y*b[3]+b[5];return a.x=d*c[0]+e*c[2]+c[4],a.y=d*c[1]+e*c[3]+c[5],a},Ea=function(a,b,c){if(!(a=aa(a)))return null;b=aa(b);var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,v,w,x,y,z,A,B=a.getBBox&&ta(a);if(a===window)g=U(),e=V(),f=e+(u.clientWidth||a.innerWidth||t.body.clientWidth||0),h=g+((a.innerHeight||0)-20<u.clientHeight?u.clientHeight:a.innerHeight||t.body.clientHeight||0);else{if(void 0===b||b===window)return a.getBoundingClientRect();d=ya(a),e=-d.x,g=-d.y,B?(o=a.getBBox(),p=o.width,q=o.height):"svg"!==(a.nodeName+"").toLowerCase()&&a.offsetWidth?(p=a.offsetWidth,q=a.offsetHeight):(z=da(a),p=parseFloat(z.width),q=parseFloat(z.height)),f=e+p,h=g+q,"svg"!==a.nodeName.toLowerCase()||C||(r=xa(a),A=r.computedStyle||{},w=(a.getAttribute("viewBox")||"0 0").split(" "),x=parseFloat(w[0]),y=parseFloat(w[1]),s=parseFloat(A.borderLeftWidth)||0,v=parseFloat(A.borderTopWidth)||0,f-=p-(p-s)/r.scaleX-x,h-=q-(q-v)/r.scaleY-y,e-=s/r.scaleX-x,g-=v/r.scaleY-y,z&&(f+=(parseFloat(A.borderRightWidth)+s)/r.scaleX,h+=(v+parseFloat(A.borderBottomWidth))/r.scaleY))}return a===b?{left:e,top:g,width:f-e,height:h-g}:(i=Ba(a),j=Ba(b,!0),k=Da({x:e,y:g},i,j),l=Da({x:f,y:g},i,j),m=Da({x:f,y:h},i,j),n=Da({x:e,y:h},i,j),e=Math.min(k.x,l.x,m.x,n.x),g=Math.min(k.y,l.y,m.y,n.y),L.x=L.y=0,c&&ya(b,L),{left:e+L.x,top:g+L.y,width:Math.max(k.x,l.x,m.x,n.x)-e,height:Math.max(k.y,l.y,m.y,n.y)-g})},Fa=function(a){return a&&a.length&&a[0]&&(a[0].nodeType&&a[0].style&&!a.nodeType||a[0].length&&a[0][0])?!0:!1},Ga=function(a){var b,c,d,e=[],f=a.length;for(b=0;f>b;b++)if(c=a[b],Fa(c))for(d=c.length,d=0;d<c.length;d++)e.push(c[d]);else c&&0!==c.length&&e.push(c);return e},Ha="ontouchstart"in u&&"orientation"in window,Ia=function(a){for(var b=a.split(","),c=(void 0!==w.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==w.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":a).split(","),d={},e=4;--e>-1;)d[b[e]]=c[e],d[c[e]]=b[e];return d}("touchstart,touchmove,touchend,touchcancel"),Ja=function(a,b,c,d){a.addEventListener?(a.addEventListener(Ia[b],c,d),b!==Ia[b]&&a.addEventListener(b,c,d)):a.attachEvent&&a.attachEvent("on"+b,c)},Ka=function(a,b,c){a.removeEventListener?(a.removeEventListener(Ia[b],c),b!==Ia[b]&&a.removeEventListener(b,c)):a.detachEvent&&a.detachEvent("on"+b,c)},La=function(a,b){for(var c=a.length;--c>-1;)if(a[c].identifier===b)return!0;return!1},Ma=function(a){e=a.touches&&I<a.touches.length,Ka(a.target,"touchend",Ma)},Na=function(a){e=a.touches&&I<a.touches.length,Ja(a.target,"touchend",Ma)},Oa=function(a,b,c,d,e,f){var g,h,i,j={};if(b)if(1!==e&&b instanceof Array){if(j.end=g=[],i=b.length,"object"==typeof b[0])for(h=0;i>h;h++)g[h]=O(b[h],e);else for(h=0;i>h;h++)g[h]=b[h]*e;c+=1.1,d-=1.1}else"function"==typeof b?j.end=function(c){var d,f,g=b.call(a,c);if(1!==e)if("object"==typeof g){d={};for(f in g)d[f]=g[f]*e;g=d}else g*=e;return g}:j.end=b;return(c||0===c)&&(j.max=c),(d||0===d)&&(j.min=d),f&&(j.velocity=0),j},Pa=function(a){var b;return a&&a.getAttribute&&"BODY"!==a.nodeName?"true"===(b=a.getAttribute("data-clickable"))||"false"!==b&&(a.onclick||H.test(a.nodeName+"")||"true"===a.getAttribute("contentEditable"))?!0:Pa(a.parentNode):!1},Qa=function(a,b){for(var c,d=a.length;--d>-1;)c=a[d],c.ondragstart=c.onselectstart=b?null:y,ca(c,"userSelect",b?"text":"none")},Ra=function(){var a,b=t.createElement("div"),c=t.createElement("div"),d=c.style,e=t.body||w;return d.display="inline-block",d.position="relative",b.style.cssText=c.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",b.appendChild(c),e.appendChild(b),l=c.offsetHeight+18>b.scrollHeight,d.width="100%",oa||(d.paddingRight="500px",a=b.scrollLeft=b.scrollWidth-b.clientWidth,d.left="-90px",a=a!==b.scrollLeft),e.removeChild(b),a}(),Sa=function(a,c){a=aa(a),c=c||{};var d,e,f,g,h,i,j=t.createElement("div"),k=j.style,m=a.firstChild,n=0,o=0,p=a.scrollTop,q=a.scrollLeft,r=a.scrollWidth,s=a.scrollHeight,u=0,v=0,w=0;ma&&c.force3D!==!1?(h="translate3d(",i="px,0px)"):oa&&(h="translate(",i="px)"),this.scrollTop=function(a,b){return arguments.length?void this.top(-a,b):-this.top()},this.scrollLeft=function(a,b){return arguments.length?void this.left(-a,b):-this.left()},this.left=function(d,e){if(!arguments.length)return-(a.scrollLeft+o);var f=a.scrollLeft-q,g=o;return(f>2||-2>f)&&!e?(q=a.scrollLeft,b.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-q),void(c.onKill&&c.onKill())):(d=-d,0>d?(o=d-.5|0,d=0):d>v?(o=d-v|0,d=v):o=0,(o||g)&&(h?this._suspendTransforms||(k[oa]=h+-o+"px,"+-n+i):k.left=-o+"px",Ra&&o+u>=0&&(k.paddingRight=o+u+"px")),a.scrollLeft=0|d,void(q=a.scrollLeft))},this.top=function(d,e){if(!arguments.length)return-(a.scrollTop+n);var f=a.scrollTop-p,g=n;return(f>2||-2>f)&&!e?(p=a.scrollTop,b.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-p),void(c.onKill&&c.onKill())):(d=-d,0>d?(n=d-.5|0,d=0):d>w?(n=d-w|0,d=w):n=0,(n||g)&&(h?this._suspendTransforms||(k[oa]=h+-o+"px,"+-n+i):k.top=-n+"px"),a.scrollTop=0|d,void(p=a.scrollTop))},this.maxScrollTop=function(){return w},this.maxScrollLeft=function(){return v},this.disable=function(){for(m=j.firstChild;m;)g=m.nextSibling,a.appendChild(m),m=g;a===j.parentNode&&a.removeChild(j)},this.enable=function(){if(m=a.firstChild,m!==j){for(;m;)g=m.nextSibling,j.appendChild(m),m=g;a.appendChild(j),this.calibrate()}},this.calibrate=function(b){var c,g,h=a.clientWidth===d;p=a.scrollTop,q=a.scrollLeft,(!h||a.clientHeight!==e||j.offsetHeight!==f||r!==a.scrollWidth||s!==a.scrollHeight||b)&&((n||o)&&(c=this.left(),g=this.top(),this.left(-a.scrollLeft),this.top(-a.scrollTop)),(!h||b)&&(k.display="block",k.width="auto",k.paddingRight="0px",u=Math.max(0,a.scrollWidth-a.clientWidth),u&&(u+=ia(a,"paddingLeft")+(l?ia(a,"paddingRight"):0))),k.display="inline-block",k.position="relative",k.overflow="visible",k.verticalAlign="top",k.width="100%",k.paddingRight=u+"px",l&&(k.paddingBottom=ia(a,"paddingBottom",!0)),C&&(k.zoom="1"),d=a.clientWidth,e=a.clientHeight,r=a.scrollWidth,s=a.scrollHeight,v=a.scrollWidth-d,w=a.scrollHeight-e,f=j.offsetHeight,k.display="block",(c||g)&&(this.left(c),this.top(g)))},this.content=j,this.element=a,this._suspendTransforms=!1,this.enable()},Ta=function(d,g){a.call(this,d),d=aa(d),f||(f=q.com.greensock.plugins.ThrowPropsPlugin),this.vars=g=O(g||{}),this.target=d,this.x=this.y=this.rotation=0,this.dragResistance=parseFloat(g.dragResistance)||0,this.edgeResistance=isNaN(g.edgeResistance)?1:parseFloat(g.edgeResistance)||0,this.lockAxis=g.lockAxis,this.autoScroll=g.autoScroll||0,this.lockedAxis=null,this.allowEventDefault=!!g.allowEventDefault;var h,i,j,k,l,r,s,v,w,y,E,H,P,S,U,V,Z,ba,da,ea,fa,ga,ha,la,ma,na,oa,pa,qa,ra,sa,ua,va,wa,xa=(g.type||(C?"top,left":"x,y")).toLowerCase(),ya=-1!==xa.indexOf("x")||-1!==xa.indexOf("y"),za=-1!==xa.indexOf("rotation"),Aa=za?"rotation":ya?"x":"left",Da=ya?"y":"top",Ea=-1!==xa.indexOf("x")||-1!==xa.indexOf("left")||"scroll"===xa,Fa=-1!==xa.indexOf("y")||-1!==xa.indexOf("top")||"scroll"===xa,Ga=g.minimumMovement||2,Ma=this,Ra=N(g.trigger||g.handle||d),Ua={},Va=0,Wa=!1,Ya=g.autoScrollMarginTop||40,Za=g.autoScrollMarginRight||40,$a=g.autoScrollMarginBottom||40,_a=g.autoScrollMarginLeft||40,ab=g.clickableTest||Pa,bb=0,cb=function(a){return Ma.isPressed&&a.which<2?void Ma.endDrag():(a.preventDefault(),a.stopPropagation(),!1)},db=function(a){if(Ma.autoScroll&&Ma.isDragging&&(Wa||ba)){var b,c,e,f,g,h,j,k,l=d,m=15*Ma.autoScroll;for(Wa=!1,M.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=u.scrollTop?u.scrollTop:t.body.scrollTop,M.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=u.scrollLeft?u.scrollLeft:t.body.scrollLeft,f=Ma.pointerX-M.scrollLeft,g=Ma.pointerY-M.scrollTop;l&&!c;)c=Y(l.parentNode),b=c?M:l.parentNode,e=c?{bottom:Math.max(u.clientHeight,window.innerHeight||0),right:Math.max(u.clientWidth,window.innerWidth||0),left:0,top:0}:b.getBoundingClientRect(),h=j=0,Fa&&(k=b._gsMaxScrollY-b.scrollTop,0>k?j=k:g>e.bottom-$a&&k?(Wa=!0,j=Math.min(k,m*(1-Math.max(0,e.bottom-g)/$a)|0)):g<e.top+Ya&&b.scrollTop&&(Wa=!0,j=-Math.min(b.scrollTop,m*(1-Math.max(0,g-e.top)/Ya)|0)),j&&(b.scrollTop+=j)),Ea&&(k=b._gsMaxScrollX-b.scrollLeft,0>k?h=k:f>e.right-Za&&k?(Wa=!0,h=Math.min(k,m*(1-Math.max(0,e.right-f)/Za)|0)):f<e.left+_a&&b.scrollLeft&&(Wa=!0,h=-Math.min(b.scrollLeft,m*(1-Math.max(0,f-e.left)/_a)|0)),h&&(b.scrollLeft+=h)),c&&(h||j)&&(window.scrollTo(b.scrollLeft,b.scrollTop),rb(Ma.pointerX+h,Ma.pointerY+j)),l=b}if(ba){var n=Ma.x,o=Ma.y,p=1e-6;p>n&&n>-p&&(n=0),p>o&&o>-p&&(o=0),za?(Ma.deltaX=n-qa.data.rotation,qa.data.rotation=Ma.rotation=n,qa.setRatio(1)):i?(Fa&&(Ma.deltaY=o-i.top(),i.top(o)),Ea&&(Ma.deltaX=n-i.left(),i.left(n))):ya?(Fa&&(Ma.deltaY=o-qa.data.y,qa.data.y=o),Ea&&(Ma.deltaX=n-qa.data.x,qa.data.x=n),qa.setRatio(1)):(Fa&&(Ma.deltaY=o-parseFloat(d.style.top||0),d.style.top=o+"px"),Ea&&(Ma.deltaY=n-parseFloat(d.style.left||0),d.style.left=n+"px")),!v||a||ua||(ua=!0,ja(Ma,"drag","onDrag"),ua=!1)}ba=!1},eb=function(a,c){var e,f=Ma.x,g=Ma.y;d._gsTransform||!ya&&!za||b.set(d,{x:"+=0",overwrite:!1,data:"_draggable"}),ya?(Ma.y=d._gsTransform.y,Ma.x=d._gsTransform.x):za?Ma.x=Ma.rotation=d._gsTransform.rotation:i?(Ma.y=i.top(),Ma.x=i.left()):(Ma.y=parseInt(d.style.top,10)||0,Ma.x=parseInt(d.style.left,10)||0),(ea||fa||ga)&&!c&&(Ma.isDragging||Ma.isThrowing)&&(ga&&(L.x=Ma.x,L.y=Ma.y,e=ga(L),e.x!==Ma.x&&(Ma.x=e.x,ba=!0),e.y!==Ma.y&&(Ma.y=e.y,ba=!0)),ea&&(e=ea(Ma.x),e!==Ma.x&&(Ma.x=e,za&&(Ma.rotation=e),ba=!0)),fa&&(e=fa(Ma.y),e!==Ma.y&&(Ma.y=e),ba=!0)),ba&&db(!0),a||(Ma.deltaX=Ma.x-f,Ma.deltaY=Ma.y-g,ja(Ma,"throwupdate","onThrowUpdate"))},fb=function(){var a,b,c,e;s=!1,i?(i.calibrate(),Ma.minX=y=-i.maxScrollLeft(),Ma.minY=H=-i.maxScrollTop(),Ma.maxX=w=Ma.maxY=E=0,s=!0):g.bounds&&(a=ka(g.bounds,d.parentNode),za?(Ma.minX=y=a.left,Ma.maxX=w=a.left+a.width,Ma.minY=H=Ma.maxY=E=0):void 0!==g.bounds.maxX||void 0!==g.bounds.maxY?(a=g.bounds,Ma.minX=y=a.minX,Ma.minY=H=a.minY,Ma.maxX=w=a.maxX,Ma.maxY=E=a.maxY):(b=ka(d,d.parentNode),Ma.minX=y=ia(d,Aa)+a.left-b.left,Ma.minY=H=ia(d,Da)+a.top-b.top,Ma.maxX=w=y+(a.width-b.width),Ma.maxY=E=H+(a.height-b.height)),y>w&&(Ma.minX=w,Ma.maxX=w=y,y=Ma.minX),H>E&&(Ma.minY=E,Ma.maxY=E=H,H=Ma.minY),za&&(Ma.minRotation=y,Ma.maxRotation=w),s=!0),g.liveSnap&&(c=g.liveSnap===!0?g.snap||{}:g.liveSnap,e=c instanceof Array||"function"==typeof c,za?(ea=nb(e?c:c.rotation,y,w,1),fa=null):c.points?ga=ob(e?c:c.points,y,w,H,E,c.radius,i?-1:1):(Ea&&(ea=nb(e?c:c.x||c.left||c.scrollLeft,y,w,i?-1:1)),Fa&&(fa=nb(e?c:c.y||c.top||c.scrollTop,H,E,i?-1:1))))},gb=function(){Ma.isThrowing=!1,ja(Ma,"throwcomplete","onThrowComplete")},hb=function(){Ma.isThrowing=!1},ib=function(a,b){var c,e,h,j;a&&f?(a===!0&&(c=g.snap||g.liveSnap||{},e=c instanceof Array||"function"==typeof c,a={resistance:(g.throwResistance||g.resistance||1e3)/(za?10:1)},za?a.rotation=Oa(Ma,e?c:c.rotation,w,y,1,b):(Ea&&(a[Aa]=Oa(Ma,e?c:c.points||c.x||c.left||c.scrollLeft,w,y,i?-1:1,b||"x"===Ma.lockedAxis)),Fa&&(a[Da]=Oa(Ma,e?c:c.points||c.y||c.top||c.scrollTop,E,H,i?-1:1,b||"y"===Ma.lockedAxis)),(c.points||c instanceof Array&&"object"==typeof c[0])&&(a.linkedProps=Aa+","+Da,a.radius=c.radius))),Ma.isThrowing=!0,j=isNaN(g.overshootTolerance)?1===g.edgeResistance?0:1-Ma.edgeResistance+.2:g.overshootTolerance,Ma.tween=h=f.to(i||d,{throwProps:a,data:"_draggable",ease:g.ease||q.Power3.easeOut,onComplete:gb,onOverwrite:hb,onUpdate:g.fastMode?ja:eb,onUpdateParams:g.fastMode?[Ma,"onthrowupdate","onThrowUpdate"]:c&&c.radius?[!1,!0]:x},isNaN(g.maxDuration)?2:g.maxDuration,isNaN(g.minDuration)?0===j||"object"==typeof a&&a.resistance>1e3?0:.5:g.minDuration,j),g.fastMode||(i&&(i._suspendTransforms=!0),h.render(h.duration(),!0,!0),eb(!0,!0),Ma.endX=Ma.x,Ma.endY=Ma.y,za&&(Ma.endRotation=Ma.x),h.play(0),eb(!0,!0),i&&(i._suspendTransforms=!1))):s&&Ma.applyBounds()},jb=function(a){var b,c,e,f,g,h,i,l,m,n=ma||[1,0,0,1,0,0];ma=Ba(d.parentNode,!0),a&&Ma.isPressed&&n.join(",")!==ma.join(",")&&(b=n[0],c=n[1],e=n[2],f=n[3],g=n[4],h=n[5],i=b*f-c*e,l=j*(f/i)+k*(-e/i)+(e*h-f*g)/i,m=j*(-c/i)+k*(b/i)+-(b*h-c*g)/i,k=l*ma[1]+m*ma[3]+ma[5],j=l*ma[0]+m*ma[2]+ma[4]),ma[1]||ma[2]||1!=ma[0]||1!=ma[3]||0!=ma[4]||0!=ma[5]||(ma=null)},kb=function(){var a=1-Ma.edgeResistance;jb(!1),ma&&(j=Ma.pointerX*ma[0]+Ma.pointerY*ma[2]+ma[4],k=Ma.pointerX*ma[1]+Ma.pointerY*ma[3]+ma[5]),ba&&(rb(Ma.pointerX,Ma.pointerY),db(!0)),i?(fb(),r=i.top(),l=i.left()):(lb()?(eb(!0,!0),fb()):Ma.applyBounds(),za?(Z=Ma.rotationOrigin=Ca(d,{x:0,y:0}),eb(!0,!0),l=Ma.x,r=Ma.y=Math.atan2(Z.y-Ma.pointerY,Ma.pointerX-Z.x)*z):(oa=d.parentNode?d.parentNode.scrollTop||0:0,pa=d.parentNode?d.parentNode.scrollLeft||0:0,r=ia(d,Da),l=ia(d,Aa))),s&&a&&(l>w?l=w+(l-w)/a:y>l&&(l=y-(y-l)/a),za||(r>E?r=E+(r-E)/a:H>r&&(r=H-(H-r)/a))),Ma.startX=l,Ma.startY=r},lb=function(){return Ma.tween&&Ma.tween.isActive()},mb=function(){!D.parentNode||lb()||Ma.isDragging||D.parentNode.removeChild(D)},nb=function(a,b,c,d){return"function"==typeof a?function(e){var f=Ma.isPressed?1-Ma.edgeResistance:1;return a.call(Ma,e>c?c+(e-c)*f:b>e?b+(e-b)*f:e)*d}:a instanceof Array?function(d){for(var e,f,g=a.length,h=0,i=A;--g>-1;)e=a[g],f=e-d,0>f&&(f=-f),i>f&&e>=b&&c>=e&&(h=g,i=f);return a[h]}:isNaN(a)?function(a){return a}:function(){return a*d}},ob=function(a,b,c,d,e,f,g){return f=f&&A>f?f*f:A,"function"==typeof a?function(h){var i,j,k,l=Ma.isPressed?1-Ma.edgeResistance:1,m=h.x,n=h.y;return h.x=m=m>c?c+(m-c)*l:b>m?b+(m-b)*l:m,h.y=n=n>e?e+(n-e)*l:d>n?d+(n-d)*l:n,i=a.call(Ma,h),i!==h&&(h.x=i.x,h.y=i.y),1!==g&&(h.x*=g,h.y*=g),A>f&&(j=h.x-m,k=h.y-n,j*j+k*k>f&&(h.x=m,h.y=n)),h}:a instanceof Array?function(b){for(var c,d,e,g,h=a.length,i=0,j=A;--h>-1;)e=a[h],c=e.x-b.x,d=e.y-b.y,g=c*c+d*d,j>g&&(i=h,j=g);return f>=j?a[i]:b}:function(a){return a}},pb=function(a,c){var e;if(h&&!Ma.isPressed&&a&&("mousedown"!==a.type&&"pointerdown"!==a.type||c||!(B()-bb<30)||!Ia[Ma.pointerEvent.type])){if(na=lb(),Ma.pointerEvent=a,Ia[a.type]?(la=-1!==a.type.indexOf("touch")?a.currentTarget||a.target:t,Ja(la,"touchend",sb),Ja(la,"touchmove",qb),Ja(la,"touchcancel",sb),Ja(t,"touchstart",Na)):(la=null,Ja(t,"mousemove",qb)),sa=null,Ja(t,"mouseup",sb),a&&a.target&&Ja(a.target,"mouseup",sb),ha=ab.call(Ma,a.target)&&!g.dragClickables&&!c)return Ja(a.target,"change",sb),ja(Ma,"press","onPress"),void Qa(Ra,!0);if(ra=la&&Ea!==Fa&&Ma.vars.allowNativeTouchScrolling!==!1?Ea?"y":"x":!1,C?a=_(a,!0):ra||Ma.allowEventDefault||(a.preventDefault(),a.preventManipulation&&a.preventManipulation()),a.changedTouches?(a=U=a.changedTouches[0],V=a.identifier):a.pointerId?V=a.pointerId:U=V=null,I++,Q(db),k=Ma.pointerY=a.pageY,j=Ma.pointerX=a.pageX,(ra||Ma.autoScroll)&&$(d.parentNode),!d.parentNode||!Ma.autoScroll||i||za||!d.parentNode._gsMaxScrollX||D.parentNode||d.getBBox||(D.style.width=d.parentNode.scrollWidth+"px",d.parentNode.appendChild(D)),kb(),Ma.tween&&Ma.tween.kill(),Ma.isThrowing=!1,b.killTweensOf(i||d,!0,Ua),i&&b.killTweensOf(d,!0,{scrollTo:1}),Ma.tween=Ma.lockedAxis=null,(g.zIndexBoost||!za&&!i&&g.zIndexBoost!==!1)&&(d.style.zIndex=Ta.zIndex++),Ma.isPressed=!0,v=!(!g.onDrag&&!Ma._listeners.drag),!za)for(e=Ra.length;--e>-1;)ca(Ra[e],"cursor",g.cursor||"move");ja(Ma,"press","onPress")}},qb=function(a){var b,c,d,f,g,i,l=a;if(h&&!e&&Ma.isPressed&&a){if(Ma.pointerEvent=a,b=a.changedTouches){if(a=b[0],a!==U&&a.identifier!==V){for(f=b.length;--f>-1&&(a=b[f]).identifier!==V;);if(0>f)return}}else if(a.pointerId&&V&&a.pointerId!==V)return;if(C)a=_(a,!0);else{if(la&&ra&&!sa&&(c=a.pageX,d=a.pageY,ma&&(f=c*ma[0]+d*ma[2]+ma[4],d=c*ma[1]+d*ma[3]+ma[5],c=f),g=Math.abs(c-j),i=Math.abs(d-k),(g!==i&&(g>Ga||i>Ga)||J&&ra===sa)&&(sa=g>i&&Ea?"x":"y",Ma.vars.lockAxisOnTouchScroll!==!1&&(Ma.lockedAxis="x"===sa?"y":"x","function"==typeof Ma.vars.onLockAxis&&Ma.vars.onLockAxis.call(Ma,l)),J&&ra===sa)))return void sb(l);Ma.allowEventDefault||ra&&(!sa||ra===sa)||l.cancelable===!1||(l.preventDefault(),l.preventManipulation&&l.preventManipulation())}Ma.autoScroll&&(Wa=!0),rb(a.pageX,a.pageY)}},rb=function(a,b){var c,d,e,f,g,h,i=1-Ma.dragResistance,m=1-Ma.edgeResistance;Ma.pointerX=a,Ma.pointerY=b,za?(f=Math.atan2(Z.y-b,a-Z.x)*z,g=Ma.y-f,g>180?(r-=360,Ma.y=f):-180>g&&(r+=360,Ma.y=f),Ma.x!==l||Math.abs(r-f)>Ga?(Ma.y=f,e=l+(r-f)*i):e=l):(ma&&(h=a*ma[0]+b*ma[2]+ma[4],b=a*ma[1]+b*ma[3]+ma[5],a=h),d=b-k,c=a-j,Ga>d&&d>-Ga&&(d=0),Ga>c&&c>-Ga&&(c=0),(Ma.lockAxis||Ma.lockedAxis)&&(c||d)&&(h=Ma.lockedAxis,h||(Ma.lockedAxis=h=Ea&&Math.abs(c)>Math.abs(d)?"y":Fa?"x":null,h&&"function"==typeof Ma.vars.onLockAxis&&Ma.vars.onLockAxis.call(Ma,Ma.pointerEvent)),"y"===h?d=0:"x"===h&&(c=0)),e=l+c*i,f=r+d*i),(ea||fa||ga)&&(Ma.x!==e||Ma.y!==f&&!za)?(ga&&(L.x=e,L.y=f,h=ga(L),e=h.x,f=h.y),ea&&(e=ea(e)),fa&&(f=fa(f))):s&&(e>w?e=w+(e-w)*m:y>e&&(e=y+(e-y)*m),za||(f>E?f=E+(f-E)*m:H>f&&(f=H+(f-H)*m))),za||ma||(e=Math.round(e),f=Math.round(f)),(Ma.x!==e||Ma.y!==f&&!za)&&(za?(Ma.endRotation=Ma.x=Ma.endX=e,ba=!0):(Fa&&(Ma.y=Ma.endY=f,ba=!0),Ea&&(Ma.x=Ma.endX=e,ba=!0)),!Ma.isDragging&&Ma.isPressed&&(Ma.isDragging=!0,ja(Ma,"dragstart","onDragStart")))},sb=function(a,c){if(h&&Ma.isPressed&&(!a||null==V||c||!(a.pointerId&&a.pointerId!==V||a.changedTouches&&!La(a.changedTouches,V)))){Ma.isPressed=!1;var e,f,i,j,k,l=a,m=Ma.isDragging,n=b.delayedCall(.001,mb);if(la?(Ka(la,"touchend",sb),Ka(la,"touchmove",qb),Ka(la,"touchcancel",sb),Ka(t,"touchstart",Na)):Ka(t,"mousemove",qb),Ka(t,"mouseup",sb),a&&a.target&&Ka(a.target,"mouseup",sb),ba=!1,ha)return a&&(Ka(a.target,"change",sb),Ma.pointerEvent=l),Qa(Ra,!1),ja(Ma,"release","onRelease"),ja(Ma,"click","onClick"),void(ha=!1);if(R(db),!za)for(f=Ra.length;--f>-1;)ca(Ra[f],"cursor",g.cursor||"move");if(m&&(Va=K=B(),Ma.isDragging=!1),I--,a){if(C&&(a=_(a,!1)),e=a.changedTouches,e&&(a=e[0],a!==U&&a.identifier!==V)){for(f=e.length;--f>-1&&(a=e[f]).identifier!==V;);if(0>f)return}Ma.pointerEvent=l,Ma.pointerX=a.pageX,Ma.pointerY=a.pageY}return l&&!m?(na&&(g.snap||g.bounds)&&ib(g.throwProps),ja(Ma,"release","onRelease"),J&&"touchmove"===l.type||-1!==l.type.indexOf("cancel")||(ja(Ma,"click","onClick"),B()-bb<300&&ja(Ma,"doubleclick","onDoubleClick"),j=l.target||l.srcElement||d,bb=B(),k=function(){bb!==va&&Ma.enabled()&&!Ma.isPressed&&(j.click?j.click():t.createEvent&&(i=t.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,window,1,Ma.pointerEvent.screenX,Ma.pointerEvent.screenY,Ma.pointerX,Ma.pointerY,!1,!1,!1,!1,0,null),j.dispatchEvent(i)))},J||l.defaultPrevented||b.delayedCall(1e-5,k))):(ib(g.throwProps),C||Ma.allowEventDefault||!l||!g.dragClickables&&ab.call(Ma,l.target)||!m||ra&&(!sa||ra!==sa)||l.cancelable===!1||(l.preventDefault(),l.preventManipulation&&l.preventManipulation()),ja(Ma,"release","onRelease")),lb()&&n.duration(Ma.tween.duration()),m&&ja(Ma,"dragend","onDragEnd"),!0}},tb=function(a){if(a&&Ma.isDragging&&!i){var b=a.target||a.srcElement||d.parentNode,c=b.scrollLeft-b._gsScrollX,e=b.scrollTop-b._gsScrollY;(c||e)&&(ma?(j-=c*ma[0]+e*ma[2],k-=e*ma[3]+c*ma[1]):(j-=c,k-=e),b._gsScrollX+=c,b._gsScrollY+=e,rb(Ma.pointerX,Ma.pointerY))}},ub=function(a){var b=B(),c=40>b-bb,d=40>b-Va,e=c&&va===bb,f=!!a.preventDefault,g=Ma.pointerEvent&&Ma.pointerEvent.defaultPrevented,h=c&&wa===bb,i=a.isTrusted||null==a.isTrusted&&c&&e;return f&&(e||d&&Ma.vars.suppressClickOnDrag!==!1)&&a.stopImmediatePropagation(),!c||Ma.pointerEvent&&Ma.pointerEvent.defaultPrevented||e&&i===h?void((Ma.isPressed||d||c)&&(f?i&&a.detail&&c&&!g||(a.preventDefault(),a.preventManipulation&&a.preventManipulation()):a.returnValue=!1)):(i&&e&&(wa=bb),void(va=bb))},vb=function(a){return ma?{x:a.x*ma[0]+a.y*ma[2]+ma[4],y:a.x*ma[1]+a.y*ma[3]+ma[5]}:{x:a.x,y:a.y}};da=Ta.get(this.target),da&&da.kill(),this.startDrag=function(a,b){var c,e,f,g;pb(a||Ma.pointerEvent,!0),b&&!Ma.hitTest(a||Ma.pointerEvent)&&(c=Xa(a||Ma.pointerEvent),e=Xa(d),f=vb({x:c.left+c.width/2,y:c.top+c.height/2}),g=vb({x:e.left+e.width/2,y:e.top+e.height/2}),j-=f.x-g.x,k-=f.y-g.y),Ma.isDragging||(Ma.isDragging=!0,-ja(Ma,"dragstart","onDragStart"))},this.drag=qb,this.endDrag=function(a){sb(a||Ma.pointerEvent,!0)},this.timeSinceDrag=function(){return Ma.isDragging?0:(B()-Va)/1e3},this.timeSinceClick=function(){return(B()-bb)/1e3},this.hitTest=function(a,b){return Ta.hitTest(Ma.target,a,b)},this.getDirection=function(a,b){var c,d,e,g,h,i,j="velocity"===a&&f?a:"object"!=typeof a||za?"start":"element";return"element"===j&&(h=Xa(Ma.target),i=Xa(a)),c="start"===j?Ma.x-l:"velocity"===j?f.getVelocity(this.target,Aa):h.left+h.width/2-(i.left+i.width/2),za?0>c?"counter-clockwise":"clockwise":(b=b||2,d="start"===j?Ma.y-r:"velocity"===j?f.getVelocity(this.target,Da):h.top+h.height/2-(i.top+i.height/2),e=Math.abs(c/d),g=1/b>e?"":0>c?"left":"right",b>e&&(""!==g&&(g+="-"),g+=0>d?"up":"down"),g)},this.applyBounds=function(a){var b,c,e,f,h,i;if(a&&g.bounds!==a)return g.bounds=a,Ma.update(!0);if(eb(!0),fb(),s){if(b=Ma.x,c=Ma.y,b>w?b=w:y>b&&(b=y),c>E?c=E:H>c&&(c=H),(Ma.x!==b||Ma.y!==c)&&(e=!0,Ma.x=Ma.endX=b,za?Ma.endRotation=b:Ma.y=Ma.endY=c,ba=!0,db(!0),Ma.autoScroll&&!Ma.isDragging))for($(d.parentNode),f=d,M.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=u.scrollTop?u.scrollTop:t.body.scrollTop,M.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=u.scrollLeft?u.scrollLeft:t.body.scrollLeft;f&&!i;)i=Y(f.parentNode),h=i?M:f.parentNode,Fa&&h.scrollTop>h._gsMaxScrollY&&(h.scrollTop=h._gsMaxScrollY),Ea&&h.scrollLeft>h._gsMaxScrollX&&(h.scrollLeft=h._gsMaxScrollX),f=h;Ma.isThrowing&&(e||Ma.endX>w||Ma.endX<y||Ma.endY>E||Ma.endY<H)&&ib(g.throwProps,e)}return Ma},this.update=function(a,b,c){var e=Ma.x,f=Ma.y;return jb(!b),a?Ma.applyBounds():(ba&&c&&db(!0),eb(!0)),b&&(rb(Ma.pointerX,Ma.pointerY),ba&&db(!0)),Ma.isPressed&&!b&&(Ea&&Math.abs(e-Ma.x)>.01||Fa&&Math.abs(f-Ma.y)>.01&&!za)&&kb(),Ma.autoScroll&&($(d.parentNode),Wa=Ma.isDragging,db(!0)),Ma.autoScroll&&(X(d,tb),W(d,tb)),Ma},this.enable=function(a){var e,j,k;if("soft"!==a){for(j=Ra.length;--j>-1;)k=Ra[j],Ja(k,"mousedown",pb),Ja(k,"touchstart",pb),Ja(k,"click",ub,!0),za||ca(k,"cursor",g.cursor||"move"),ca(k,"touchCallout","none"),ca(k,"touchAction",Ea===Fa?"none":Ea?"pan-y":"pan-x"),ta(k)&&ca(k.ownerSVGElement||k,"touchAction",Ea===Fa?"none":Ea?"pan-y":"pan-x"),this.vars.allowContextMenu||Ja(k,"contextmenu",cb);Qa(Ra,!1)}return W(d,tb),h=!0,f&&"soft"!==a&&f.track(i||d,ya?"x,y":za?"rotation":"top,left"),i&&i.enable(),d._gsDragID=e="d"+G++,F[e]=this,i&&(i.element._gsDragID=e),b.set(d,{x:"+=0",overwrite:!1,data:"_draggable"}),qa={t:d,data:C?S:d._gsTransform,tween:{},setRatio:C?function(){b.set(d,P)}:c._internals.setTransformRatio||c._internals.set3DTransformRatio},kb(),Ma.update(!0),Ma},this.disable=function(a){var b,c,e=Ma.isDragging;if(!za)for(b=Ra.length;--b>-1;)ca(Ra[b],"cursor",null);if("soft"!==a){for(b=Ra.length;--b>-1;)c=Ra[b],ca(c,"touchCallout",null),ca(c,"touchAction",null),Ka(c,"mousedown",pb),Ka(c,"touchstart",pb),Ka(c,"click",ub),Ka(c,"contextmenu",cb);Qa(Ra,!0),la&&(Ka(la,"touchcancel",sb),Ka(la,"touchend",sb),Ka(la,"touchmove",qb)),Ka(t,"mouseup",sb),Ka(t,"mousemove",qb)}return X(d,tb),h=!1,f&&"soft"!==a&&f.untrack(i||d,ya?"x,y":za?"rotation":"top,left"),i&&i.disable(),R(db),Ma.isDragging=Ma.isPressed=ha=!1,e&&ja(Ma,"dragend","onDragEnd"),Ma},this.enabled=function(a,b){return arguments.length?a?Ma.enable(b):Ma.disable(b):h},this.kill=function(){return Ma.isThrowing=!1,b.killTweensOf(i||d,!0,Ua),Ma.disable(),delete F[d._gsDragID],Ma},-1!==xa.indexOf("scroll")&&(i=this.scrollProxy=new Sa(d,T({onKill:function(){Ma.isPressed&&sb(null)}},g)),d.style.overflowY=Fa&&!Ha?"auto":"hidden",d.style.overflowX=Ea&&!Ha?"auto":"hidden",d=i.content),g.force3D!==!1&&b.set(d,{force3D:!0}),za?Ua.rotation=1:(Ea&&(Ua[Aa]=1),Fa&&(Ua[Da]=1)),za?(P=p,S=P.css,P.overwrite=!1):ya&&(P=Ea&&Fa?m:Ea?n:o,S=P.css,P.overwrite=!1),this.enable()},Ua=Ta.prototype=new a;Ua.constructor=Ta,Ua.pointerX=Ua.pointerY=Ua.startX=Ua.startY=Ua.deltaX=Ua.deltaY=0,Ua.isDragging=Ua.isPressed=!1,Ta.version="0.16.1",Ta.zIndex=1e3,Ja(t,"touchcancel",function(){}),Ja(t,"contextmenu",function(a){var b;for(b in F)F[b].isPressed&&F[b].endDrag()}),Ta.create=function(a,c){"string"==typeof a&&(a=b.selector(a));for(var d=a&&0!==a.length?Fa(a)?Ga(a):[a]:[],e=d.length;--e>-1;)d[e]=new Ta(d[e],c);return d},Ta.get=function(a){return F[(aa(a)||{})._gsDragID]},Ta.timeSinceDrag=function(){return(B()-K)/1e3};var Va={},Wa=function(a){var b,c,d=0,e=0;for(a=aa(a),b=a.offsetWidth,c=a.offsetHeight;a;)d+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:d,left:e,width:b,height:c}},Xa=function(a,b){if(a===window)return Va.left=Va.top=0,Va.width=Va.right=u.clientWidth||a.innerWidth||t.body.clientWidth||0,Va.height=Va.bottom=(a.innerHeight||0)-20<u.clientHeight?u.clientHeight:a.innerHeight||t.body.clientHeight||0,Va;var c=a.pageX!==b?{left:a.pageX-V(),top:a.pageY-U(),right:a.pageX-V()+1,bottom:a.pageY-U()+1}:a.nodeType||a.left===b||a.top===b?C?Wa(a):aa(a).getBoundingClientRect():a;return c.right===b&&c.width!==b?(c.right=c.left+c.width,c.bottom=c.top+c.height):c.width===b&&(c={width:c.right-c.left,height:c.bottom-c.top,right:c.right,left:c.left,bottom:c.bottom,top:c.top}),c};return Ta.hitTest=function(a,b,c){if(a===b)return!1;var d,e,f,g=Xa(a),h=Xa(b),i=h.left>g.right||h.right<g.left||h.top>g.bottom||h.bottom<g.top;return i||!c?!i:(f=-1!==(c+"").indexOf("%"),c=parseFloat(c)||0,d={left:Math.max(g.left,h.left),top:Math.max(g.top,h.top)},d.width=Math.min(g.right,h.right)-d.left,d.height=Math.min(g.bottom,h.bottom)-d.top,d.width<0||d.height<0?!1:f?(c*=.01,e=d.width*d.height,e>=g.width*g.height*c||e>=h.width*h.height*c):d.width>c&&d.height>c)},D.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;",Ta},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),require("../plugins/CSSPlugin.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite","CSSPlugin"],b)}("Draggable");\ No newline at end of file+var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite","plugins.CSSPlugin"],function(a,b,c){var d,e,f,g,h,i,j,k,l={css:{},data:"_draggable"},m={css:{},data:"_draggable"},n={css:{},data:"_draggable"},o={css:{}},p=_gsScope._gsDefine.globals,q={},r={style:{}},s=_gsScope.document||{createElement:function(){return r}},t=s.documentElement||{},u=function(a){return s.createElementNS?s.createElementNS("http://www.w3.org/1999/xhtml",a):s.createElement(a)},v=u("div"),w=[],x=function(){return!1},y=180/Math.PI,z=999999999999999,A=Date.now||function(){return(new Date).getTime()},B=!(s.addEventListener||!s.all),C=s.createElement("div"),D=[],E={},F=0,G=/^(?:a|input|textarea|button|select)$/i,H=0,I=_gsScope.navigator&&-1!==_gsScope.navigator.userAgent.toLowerCase().indexOf("android"),J=0,K={},L={},M=function(a){if("string"==typeof a&&(a=b.selector(a)),!a||a.nodeType)return[a];var c,d=[],e=a.length;for(c=0;c!==e;d.push(a[c++]));return d},N=function(a,b){var c,d={};if(b)for(c in a)d[c]=a[c]*b;else for(c in a)d[c]=a[c];return d},O=function(){for(var a=D.length;--a>-1;)D[a]()},P=function(a){D.push(a),1===D.length&&b.ticker.addEventListener("tick",O,this,!1,1)},Q=function(a){for(var c=D.length;--c>-1;)D[c]===a&&D.splice(c,1);b.to(R,0,{overwrite:"all",delay:15,onComplete:R,data:"_draggable"})},R=function(){D.length||b.ticker.removeEventListener("tick",O)},S=function(a,b){var c;for(c in b)void 0===a[c]&&(a[c]=b[c]);return a},T=function(){return null!=window.pageYOffset?window.pageYOffset:null!=s.scrollTop?s.scrollTop:t.scrollTop||s.body.scrollTop||0},U=function(){return null!=window.pageXOffset?window.pageXOffset:null!=s.scrollLeft?s.scrollLeft:t.scrollLeft||s.body.scrollLeft||0},V=function(a,b){Ia(a,"scroll",b),X(a.parentNode)||V(a.parentNode,b)},W=function(a,b){Ja(a,"scroll",b),X(a.parentNode)||W(a.parentNode,b)},X=function(a){return!(a&&a!==t&&a!==s&&a!==s.body&&a!==window&&a.nodeType&&a.parentNode)},Y=function(a,b){var c="x"===b?"Width":"Height",d="scroll"+c,e="client"+c,f=s.body;return Math.max(0,X(a)?Math.max(t[d],f[d])-(window["inner"+c]||t[e]||f[e]):a[d]-a[e])},Z=function(a){var b=X(a),c=Y(a,"x"),d=Y(a,"y");b?a=L:Z(a.parentNode),a._gsMaxScrollX=c,a._gsMaxScrollY=d,a._gsScrollX=a.scrollLeft||0,a._gsScrollY=a.scrollTop||0},$=function(a,b){return a=a||window.event,q.pageX=a.clientX+s.body.scrollLeft+t.scrollLeft,q.pageY=a.clientY+s.body.scrollTop+t.scrollTop,b&&(a.returnValue=!1),q},_=function(a){return a?("string"==typeof a&&(a=b.selector(a)),a.length&&a!==window&&a[0]&&a[0].style&&!a.nodeType&&(a=a[0]),a===window||a.nodeType&&a.style?a:null):a},aa=function(a,b){var c,e,f,g=a.style;if(void 0===g[b]){for(f=["O","Moz","ms","Ms","Webkit"],e=5,c=b.charAt(0).toUpperCase()+b.substr(1);--e>-1&&void 0===g[f[e]+c];);if(0>e)return"";d=3===e?"ms":f[e],b=d+c}return b},ba=function(a,b,c){var d=a.style;d&&(void 0===d[b]&&(b=aa(a,b)),null==c?d.removeProperty?d.removeProperty(b.replace(/([A-Z])/g,"-$1").toLowerCase()):d.removeAttribute(b):void 0!==d[b]&&(d[b]=c))},ca=s.defaultView?s.defaultView.getComputedStyle:x,da=/(?:Left|Right|Width)/i,ea=/(?:\d|\-|\+|=|#|\.)*/g,fa=function(a,b,c,d,e){if("px"===d||!d)return c;if("auto"===d||!c)return 0;var f,g=da.test(b),h=a,i=v.style,j=0>c;return j&&(c=-c),"%"===d&&-1!==b.indexOf("border")?f=c/100*(g?a.clientWidth:a.clientHeight):(i.cssText="border:0 solid red;position:"+ha(a,"position",!0)+";line-height:0;","%"!==d&&h.appendChild?i[g?"borderLeftWidth":"borderTopWidth"]=c+d:(h=a.parentNode||s.body,i[g?"width":"height"]=c+d),h.appendChild(v),f=parseFloat(v[g?"offsetWidth":"offsetHeight"]),h.removeChild(v),0!==f||e||(f=fa(a,b,c,d,!0))),j?-f:f},ga=function(a,b){if("absolute"!==ha(a,"position",!0))return 0;var c="left"===b?"Left":"Top",d=ha(a,"margin"+c,!0);return a["offset"+c]-(fa(a,b,parseFloat(d),(d+"").replace(ea,""))||0)},ha=function(a,b,c){var d,e=(a._gsTransform||{})[b];return e||0===e?e:(a.style[b]?e=a.style[b]:(d=ca(a))?(e=d.getPropertyValue(b.replace(/([A-Z])/g,"-$1").toLowerCase()),e=e||d.length?e:d[b]):a.currentStyle&&(e=a.currentStyle[b]),"auto"!==e||"top"!==b&&"left"!==b||(e=ga(a,b)),c?e:parseFloat(e)||0)},ia=function(a,b,c){var d=a.vars,e=d[c],f=a._listeners[b];"function"==typeof e&&e.apply(d[c+"Scope"]||d.callbackScope||a,d[c+"Params"]||[a.pointerEvent]),f&&a.dispatchEvent(b)},ja=function(a,b){var c,d,e,f=_(a);return f?Da(f,b):void 0!==a.left?(e=xa(b),{left:a.left-e.x,top:a.top-e.y,width:a.width,height:a.height}):(d=a.min||a.minX||a.minRotation||0,c=a.min||a.minY||0,{left:d,top:c,width:(a.max||a.maxX||a.maxRotation||0)-d,height:(a.max||a.maxY||0)-c})},ka=function(){if(!s.createElementNS)return g=0,void(h=!1);var a,b,c,d,e=u("div"),f=s.createElementNS("http://www.w3.org/2000/svg","svg"),l=u("div"),m=e.style,n=s.body||t,o="flex"===ha(n,"display",!0);s.body&&na&&(m.position="absolute",n.appendChild(l),l.appendChild(e),d=e.offsetParent,l.style[na]="rotate(1deg)",k=e.offsetParent===d,l.style.position="absolute",m.height="10px",d=e.offsetTop,l.style.border="5px solid red",j=d!==e.offsetTop,n.removeChild(l)),m=f.style,f.setAttributeNS(null,"width","400px"),f.setAttributeNS(null,"height","400px"),f.setAttributeNS(null,"viewBox","0 0 400 400"),m.display="block",m.boxSizing="border-box",m.border="0px solid red",m.transform="none",e.style.cssText="width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;",n.appendChild(e),e.appendChild(f),c=f.createSVGPoint().matrixTransform(f.getScreenCTM()),b=c.y,e.scrollTop=100,c.x=c.y=0,c=c.matrixTransform(f.getScreenCTM()),i=b-c.y<100.1?0:b-c.y-150,e.removeChild(f),n.removeChild(e),n.appendChild(f),o&&(n.style.display="block"),a=f.getScreenCTM(),b=a.e,m.border="50px solid red",a=f.getScreenCTM(),0===b&&0===a.e&&0===a.f&&1===a.a?(g=1,h=!0):(g=b!==a.e?1:0,h=1!==a.a),o&&(n.style.display="flex"),n.removeChild(f)},la=""!==aa(v,"perspective"),ma=aa(v,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),na=aa(v,"transform"),oa=na.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),pa={},qa={},ra=_gsScope.SVGElement,sa=function(a){return!!(ra&&"function"==typeof a.getBBox&&a.getCTM&&(!a.parentNode||a.parentNode.getBBox&&a.parentNode.getCTM))},ta=(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent))&&parseFloat(RegExp.$1)<11,ua=[],va=[],wa=function(a){if(!a.getBoundingClientRect||!a.parentNode||!na)return{offsetTop:0,offsetLeft:0,scaleX:1,scaleY:1,offsetParent:t};if(Sa.cacheSVGData!==!1&&a._dCache&&a._dCache.lastUpdate===b.ticker.frame)return a._dCache;var c,d,e,f,j,k,l,m,n,o,p,q,r=a,u=ya(a);if(u.lastUpdate=b.ticker.frame,a.getBBox&&!u.isSVGRoot){for(r=a.parentNode,c=a.getBBox();r&&"svg"!==(r.nodeName+"").toLowerCase();)r=r.parentNode;return f=wa(r),u.offsetTop=c.y*f.scaleY,u.offsetLeft=c.x*f.scaleX,u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.offsetParent=r||t,u}for(e=u.offsetParent,e===s.body&&(e=t),va.length=ua.length=0;r&&(j=ha(r,na,!0),"matrix(1, 0, 0, 1, 0, 0)"!==j&&"none"!==j&&"translate3d(0px, 0px, 0px)"!==j&&(va.push(r),ua.push(r.style[na]),r.style[na]="none"),r!==e);)r=r.parentNode;for(d=e.getBoundingClientRect(),j=a.getScreenCTM(),m=a.createSVGPoint(),l=m.matrixTransform(j),u.scaleX=Math.sqrt(j.a*j.a+j.b*j.b),u.scaleY=Math.sqrt(j.d*j.d+j.c*j.c),void 0===g&&ka(),u.borderBox&&!h&&a.getAttribute("width")&&(f=ca(a)||{},n=parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)||0,o=parseFloat(f.borderTopWidth)+parseFloat(f.borderBottomWidth)||0,p=parseFloat(f.width)||0,q=parseFloat(f.height)||0,u.scaleX*=(p-n)/p,u.scaleY*=(q-o)/q),i?(c=a.getBoundingClientRect(),u.offsetLeft=c.left-d.left,u.offsetTop=c.top-d.top):(u.offsetLeft=l.x-d.left,u.offsetTop=l.y-d.top),u.offsetParent=e,k=va.length;--k>-1;)va[k].style[na]=ua[k];return u},xa=function(a,c){if(c=c||{},!a||a===t||!a.parentNode||a===window)return{x:0,y:0};var d=ca(a),e=ma&&d?d.getPropertyValue(ma):"50% 50%",f=e.split(" "),g=-1!==e.indexOf("left")?"0%":-1!==e.indexOf("right")?"100%":f[0],h=-1!==e.indexOf("top")?"0%":-1!==e.indexOf("bottom")?"100%":f[1];return("center"===h||null==h)&&(h="50%"),("center"===g||isNaN(parseFloat(g)))&&(g="50%"),a.getBBox&&sa(a)?(a._gsTransform||(b.set(a,{x:"+=0",overwrite:!1}),void 0===a._gsTransform.xOrigin&&console.log("Draggable requires at least GSAP 1.17.0")),e=a.getBBox(),c.x=a._gsTransform.xOrigin-e.x,c.y=a._gsTransform.yOrigin-e.y):(a.getBBox&&-1!==(g+h).indexOf("%")&&(a=a.getBBox(),a={offsetWidth:a.width,offsetHeight:a.height}),c.x=-1!==g.indexOf("%")?a.offsetWidth*parseFloat(g)/100:parseFloat(g),c.y=-1!==h.indexOf("%")?a.offsetHeight*parseFloat(h)/100:parseFloat(h)),c},ya=function(a){if(Sa.cacheSVGData!==!1&&a._dCache&&a._dCache.lastUpdate===b.ticker.frame)return a._dCache;var c,d=a._dCache=a._dCache||{},e=ca(a),f=a.getBBox&&sa(a),g="svg"===(a.nodeName+"").toLowerCase();if(d.isSVG=f,d.isSVGRoot=g,d.borderBox="border-box"===e.boxSizing,d.computedStyle=e,g)c=a.parentNode||t,c.insertBefore(v,a),d.offsetParent=v.offsetParent||t,c.removeChild(v);else if(f){for(c=a.parentNode;c&&"svg"!==(c.nodeName+"").toLowerCase();)c=c.parentNode;d.offsetParent=c}else d.offsetParent=a.offsetParent;return d},za=function(a,b,c,d,e){if(a===window||!a||!a.style||!a.parentNode)return[1,0,0,1,0,0];var f,h,i,l,m,n,o,p,q,r,u,v,w,x,y=a._dCache||ya(a),z=a.parentNode,A=z._dCache||ya(z),B=y.computedStyle,C=y.isSVG?A.offsetParent:z.offsetParent;return f=y.isSVG&&-1!==(a.style[na]+"").indexOf("matrix")?a.style[na]:B?B.getPropertyValue(oa):a.currentStyle?a.currentStyle[na]:"1,0,0,1,0,0",a.getBBox&&-1!==(a.getAttribute("transform")+"").indexOf("matrix")&&(f=a.getAttribute("transform")),f=(f+"").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g)||[1,0,0,1,0,0],f.length>6&&(f=[f[0],f[1],f[4],f[5],f[12],f[13]]),d?f[4]=f[5]=0:y.isSVG&&(m=a._gsTransform)&&(m.xOrigin||m.yOrigin)&&(f[0]=parseFloat(f[0]),f[1]=parseFloat(f[1]),f[2]=parseFloat(f[2]),f[3]=parseFloat(f[3]),f[4]=parseFloat(f[4])-(m.xOrigin-(m.xOrigin*f[0]+m.yOrigin*f[2])),f[5]=parseFloat(f[5])-(m.yOrigin-(m.xOrigin*f[1]+m.yOrigin*f[3]))),b&&(void 0===g&&ka(),i=y.isSVG||y.isSVGRoot?wa(a):a,y.isSVG?(l=a.getBBox(),r=A.isSVGRoot?{x:0,y:0}:z.getBBox(),i={offsetLeft:l.x-r.x,offsetTop:l.y-r.y,offsetParent:y.offsetParent}):y.isSVGRoot?(u=parseInt(B.borderTopWidth,10)||0,v=parseInt(B.borderLeftWidth,10)||0,w=(f[0]-g)*v+f[2]*u,x=f[1]*v+(f[3]-g)*u,n=b.x,o=b.y,p=n-(n*f[0]+o*f[2]),q=o-(n*f[1]+o*f[3]),f[4]=parseFloat(f[4])+p,f[5]=parseFloat(f[5])+q,b.x-=p,b.y-=q,n=i.scaleX,o=i.scaleY,e||(b.x*=n,b.y*=o),f[0]*=n,f[1]*=o,f[2]*=n,f[3]*=o,ta||(b.x+=w,b.y+=x),C===s.body&&i.offsetParent===t&&(C=t)):!j&&a.offsetParent&&(b.x+=parseInt(ha(a.offsetParent,"borderLeftWidth"),10)||0,b.y+=parseInt(ha(a.offsetParent,"borderTopWidth"),10)||0),h=z===t||z===s.body,f[4]=Number(f[4])+b.x+(i.offsetLeft||0)-c.x-(h?0:z.scrollLeft||0),f[5]=Number(f[5])+b.y+(i.offsetTop||0)-c.y-(h?0:z.scrollTop||0),z&&"fixed"===ha(a,"position",B)&&(f[4]+=U(),f[5]+=T()),!z||z===t||C!==i.offsetParent||A.isSVG||k&&"100100"!==za(z).join("")||(i=A.isSVGRoot?wa(z):z,f[4]-=i.offsetLeft||0,f[5]-=i.offsetTop||0,j||!A.offsetParent||y.isSVG||y.isSVGRoot||(f[4]-=parseInt(ha(A.offsetParent,"borderLeftWidth"),10)||0,f[5]-=parseInt(ha(A.offsetParent,"borderTopWidth"),10)||0))),f},Aa=function(a,b){if(!a||a===window||!a.parentNode)return[1,0,0,1,0,0];for(var c,d,e,f,g,h,i,j,k=xa(a,pa),l=xa(a.parentNode,qa),m=za(a,k,l,!1,!b);(a=a.parentNode)&&a.parentNode&&a!==t;)k=l,l=xa(a.parentNode,k===pa?qa:pa),i=za(a,k,l),c=m[0],d=m[1],e=m[2],f=m[3],g=m[4],h=m[5],m[0]=c*i[0]+d*i[2],m[1]=c*i[1]+d*i[3],m[2]=e*i[0]+f*i[2],m[3]=e*i[1]+f*i[3],m[4]=g*i[0]+h*i[2]+i[4],m[5]=g*i[1]+h*i[3]+i[5];return b&&(c=m[0],d=m[1],e=m[2],f=m[3],g=m[4],h=m[5],j=c*f-d*e,m[0]=f/j,m[1]=-d/j,m[2]=-e/j,m[3]=c/j,m[4]=(e*h-f*g)/j,m[5]=-(c*h-d*g)/j),m},Ba=function(a,b,c,d,e){a=_(a);var f=Aa(a,!1,e),g=b.x,h=b.y;return c&&(xa(a,b),g-=b.x,h-=b.y),d=d===!0?b:d||{},d.x=g*f[0]+h*f[2]+f[4],d.y=g*f[1]+h*f[3]+f[5],d},Ca=function(a,b,c){var d=a.x*b[0]+a.y*b[2]+b[4],e=a.x*b[1]+a.y*b[3]+b[5];return a.x=d*c[0]+e*c[2]+c[4],a.y=d*c[1]+e*c[3]+c[5],a},Da=function(a,b,c){if(!(a=_(a)))return null;b=_(b);var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,u,v,w,x,y,z,A,C=a.getBBox&&sa(a);if(a===window)g=T(),e=U(),f=e+(t.clientWidth||a.innerWidth||s.body.clientWidth||0),h=g+((a.innerHeight||0)-20<t.clientHeight?t.clientHeight:a.innerHeight||s.body.clientHeight||0);else{if(void 0===b||b===window)return a.getBoundingClientRect();d=xa(a),e=-d.x,g=-d.y,C?(o=a.getBBox(),p=o.width,q=o.height):"svg"!==(a.nodeName+"").toLowerCase()&&a.offsetWidth?(p=a.offsetWidth,q=a.offsetHeight):(z=ca(a),p=parseFloat(z.width),q=parseFloat(z.height)),f=e+p,h=g+q,"svg"!==a.nodeName.toLowerCase()||B||(r=wa(a),A=r.computedStyle||{},w=(a.getAttribute("viewBox")||"0 0").split(" "),x=parseFloat(w[0]),y=parseFloat(w[1]),u=parseFloat(A.borderLeftWidth)||0,v=parseFloat(A.borderTopWidth)||0,f-=p-(p-u)/r.scaleX-x,h-=q-(q-v)/r.scaleY-y,e-=u/r.scaleX-x,g-=v/r.scaleY-y,z&&(f+=(parseFloat(A.borderRightWidth)+u)/r.scaleX,h+=(v+parseFloat(A.borderBottomWidth))/r.scaleY))}return a===b?{left:e,top:g,width:f-e,height:h-g}:(i=Aa(a),j=Aa(b,!0),k=Ca({x:e,y:g},i,j),l=Ca({x:f,y:g},i,j),m=Ca({x:f,y:h},i,j),n=Ca({x:e,y:h},i,j),e=Math.min(k.x,l.x,m.x,n.x),g=Math.min(k.y,l.y,m.y,n.y),K.x=K.y=0,c&&xa(b,K),{left:e+K.x,top:g+K.y,width:Math.max(k.x,l.x,m.x,n.x)-e,height:Math.max(k.y,l.y,m.y,n.y)-g})},Ea=function(a){return a&&a.length&&a[0]&&(a[0].nodeType&&a[0].style&&!a.nodeType||a[0].length&&a[0][0])?!0:!1},Fa=function(a){var b,c,d,e=[],f=a.length;for(b=0;f>b;b++)if(c=a[b],Ea(c))for(d=c.length,d=0;d<c.length;d++)e.push(c[d]);else c&&0!==c.length&&e.push(c);return e},Ga="ontouchstart"in t&&"orientation"in window,Ha=function(a){for(var b=a.split(","),c=(void 0!==v.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==v.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":a).split(","),d={},e=4;--e>-1;)d[b[e]]=c[e],d[c[e]]=b[e];return d}("touchstart,touchmove,touchend,touchcancel"),Ia=function(a,b,c,d){if(a.addEventListener){var e=Ha[b];d=d||{passive:!1},a.addEventListener(e||b,c,d),e&&b!==e&&a.addEventListener(b,c,d)}else a.attachEvent&&a.attachEvent("on"+b,c)},Ja=function(a,b,c){if(a.removeEventListener){var d=Ha[b];a.removeEventListener(d||b,c),d&&b!==d&&a.removeEventListener(b,c)}else a.detachEvent&&a.detachEvent("on"+b,c)},Ka=function(a,b){for(var c=a.length;--c>-1;)if(a[c].identifier===b)return!0;return!1},La=function(a){e=a.touches&&H<a.touches.length,Ja(a.target,"touchend",La)},Ma=function(a){e=a.touches&&H<a.touches.length,Ia(a.target,"touchend",La)},Na=function(a,b,c,d,e,f){var g,h,i,j={};if(b)if(1!==e&&b instanceof Array){if(j.end=g=[],i=b.length,"object"==typeof b[0])for(h=0;i>h;h++)g[h]=N(b[h],e);else for(h=0;i>h;h++)g[h]=b[h]*e;c+=1.1,d-=1.1}else"function"==typeof b?j.end=function(c){var d,f,g=b.call(a,c);if(1!==e)if("object"==typeof g){d={};for(f in g)d[f]=g[f]*e;g=d}else g*=e;return g}:j.end=b;return(c||0===c)&&(j.max=c),(d||0===d)&&(j.min=d),f&&(j.velocity=0),j},Oa=function(a){var b;return a&&a.getAttribute&&"BODY"!==a.nodeName?"true"===(b=a.getAttribute("data-clickable"))||"false"!==b&&(a.onclick||G.test(a.nodeName+"")||"true"===a.getAttribute("contentEditable"))?!0:Oa(a.parentNode):!1},Pa=function(a,b){for(var c,d=a.length;--d>-1;)c=a[d],c.ondragstart=c.onselectstart=b?null:x,ba(c,"userSelect",b?"text":"none")},Qa=function(){var a,b=s.createElement("div"),c=s.createElement("div"),d=c.style,e=s.body||v;return d.display="inline-block",d.position="relative",b.style.cssText=c.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",b.appendChild(c),e.appendChild(b),a=c.offsetHeight+18>b.scrollHeight,e.removeChild(b),a}(),Ra=function(a,c){a=_(a),c=c||{};var d,e,f,g,h,i,j=s.createElement("div"),k=j.style,l=a.firstChild,m=0,n=0,o=a.scrollTop,p=a.scrollLeft,q=a.scrollWidth,r=a.scrollHeight,t=0,u=0,v=0;la&&c.force3D!==!1?(h="translate3d(",i="px,0px)"):na&&(h="translate(",i="px)"),this.scrollTop=function(a,b){return arguments.length?void this.top(-a,b):-this.top()},this.scrollLeft=function(a,b){return arguments.length?void this.left(-a,b):-this.left()},this.left=function(d,e){if(!arguments.length)return-(a.scrollLeft+n);var f=a.scrollLeft-p,g=n;return(f>2||-2>f)&&!e?(p=a.scrollLeft,b.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-p),void(c.onKill&&c.onKill())):(d=-d,0>d?(n=d-.5|0,d=0):d>u?(n=d-u|0,d=u):n=0,(n||g)&&(h?this._suspendTransforms||(k[na]=h+-n+"px,"+-m+i):k.left=-n+"px",n+t>=0&&(k.paddingRight=n+t+"px")),a.scrollLeft=0|d,void(p=a.scrollLeft))},this.top=function(d,e){if(!arguments.length)return-(a.scrollTop+m);var f=a.scrollTop-o,g=m;return(f>2||-2>f)&&!e?(o=a.scrollTop,b.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-o),void(c.onKill&&c.onKill())):(d=-d,0>d?(m=d-.5|0,d=0):d>v?(m=d-v|0,d=v):m=0,(m||g)&&(h?this._suspendTransforms||(k[na]=h+-n+"px,"+-m+i):k.top=-m+"px"),a.scrollTop=0|d,void(o=a.scrollTop))},this.maxScrollTop=function(){return v},this.maxScrollLeft=function(){return u},this.disable=function(){for(l=j.firstChild;l;)g=l.nextSibling,a.appendChild(l),l=g;a===j.parentNode&&a.removeChild(j)},this.enable=function(){if(l=a.firstChild,l!==j){for(;l;)g=l.nextSibling,j.appendChild(l),l=g;a.appendChild(j),this.calibrate()}},this.calibrate=function(b){var c,g,h=a.clientWidth===d;o=a.scrollTop,p=a.scrollLeft,(!h||a.clientHeight!==e||j.offsetHeight!==f||q!==a.scrollWidth||r!==a.scrollHeight||b)&&((m||n)&&(c=this.left(),g=this.top(),this.left(-a.scrollLeft),this.top(-a.scrollTop)),(!h||b)&&(k.display="block",k.width="auto",k.paddingRight="0px",t=Math.max(0,a.scrollWidth-a.clientWidth),t&&(t+=ha(a,"paddingLeft")+(Qa?ha(a,"paddingRight"):0))),k.display="inline-block",k.position="relative",k.overflow="visible",k.verticalAlign="top",k.width="100%",k.paddingRight=t+"px",Qa&&(k.paddingBottom=ha(a,"paddingBottom",!0)),B&&(k.zoom="1"),d=a.clientWidth,e=a.clientHeight,q=a.scrollWidth,r=a.scrollHeight,u=a.scrollWidth-d,v=a.scrollHeight-e,f=j.offsetHeight,k.display="block",(c||g)&&(this.left(c),this.top(g)))},this.content=j,this.element=a,this._suspendTransforms=!1,this.enable()},Sa=function(d,g){a.call(this,d),d=_(d),f||(f=p.com.greensock.plugins.ThrowPropsPlugin),this.vars=g=N(g||{}),this.target=d,this.x=this.y=this.rotation=0,this.dragResistance=parseFloat(g.dragResistance)||0,this.edgeResistance=isNaN(g.edgeResistance)?1:parseFloat(g.edgeResistance)||0,this.lockAxis=g.lockAxis,this.autoScroll=g.autoScroll||0,this.lockedAxis=null,this.allowEventDefault=!!g.allowEventDefault;var h,i,j,k,q,r,u,v,x,D,G,O,R,T,U,Y,aa,ca,da,ea,fa,ga,ka,la,ma,na,oa,pa,qa,ra,ta,ua,va,wa,xa=(g.type||(B?"top,left":"x,y")).toLowerCase(),ya=-1!==xa.indexOf("x")||-1!==xa.indexOf("y"),za=-1!==xa.indexOf("rotation"),Ca=za?"rotation":ya?"x":"left",Da=ya?"y":"top",Ea=-1!==xa.indexOf("x")||-1!==xa.indexOf("left")||"scroll"===xa,Fa=-1!==xa.indexOf("y")||-1!==xa.indexOf("top")||"scroll"===xa,La=g.minimumMovement||2,Qa=this,Ta=M(g.trigger||g.handle||d),Ua={},Va=0,Xa=!1,Ya=g.autoScrollMarginTop||40,Za=g.autoScrollMarginRight||40,$a=g.autoScrollMarginBottom||40,_a=g.autoScrollMarginLeft||40,ab=g.clickableTest||Oa,bb=0,cb=function(a){return Qa.isPressed&&a.which<2?void Qa.endDrag():(a.preventDefault(),a.stopPropagation(),!1)},db=function(a){if(Qa.autoScroll&&Qa.isDragging&&(Xa||ca)){var b,c,e,f,g,h,j,k,l=d,m=15*Qa.autoScroll;for(Xa=!1,L.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=t.scrollTop?t.scrollTop:s.body.scrollTop,L.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=t.scrollLeft?t.scrollLeft:s.body.scrollLeft,f=Qa.pointerX-L.scrollLeft,g=Qa.pointerY-L.scrollTop;l&&!c;)c=X(l.parentNode),b=c?L:l.parentNode,e=c?{bottom:Math.max(t.clientHeight,window.innerHeight||0),right:Math.max(t.clientWidth,window.innerWidth||0),left:0,top:0}:b.getBoundingClientRect(),h=j=0,Fa&&(k=b._gsMaxScrollY-b.scrollTop,0>k?j=k:g>e.bottom-$a&&k?(Xa=!0,j=Math.min(k,m*(1-Math.max(0,e.bottom-g)/$a)|0)):g<e.top+Ya&&b.scrollTop&&(Xa=!0,j=-Math.min(b.scrollTop,m*(1-Math.max(0,g-e.top)/Ya)|0)),j&&(b.scrollTop+=j)),Ea&&(k=b._gsMaxScrollX-b.scrollLeft,0>k?h=k:f>e.right-Za&&k?(Xa=!0,h=Math.min(k,m*(1-Math.max(0,e.right-f)/Za)|0)):f<e.left+_a&&b.scrollLeft&&(Xa=!0,h=-Math.min(b.scrollLeft,m*(1-Math.max(0,f-e.left)/_a)|0)),h&&(b.scrollLeft+=h)),c&&(h||j)&&(window.scrollTo(b.scrollLeft,b.scrollTop),rb(Qa.pointerX+h,Qa.pointerY+j)),l=b}if(ca){var n=Qa.x,o=Qa.y,p=1e-6;p>n&&n>-p&&(n=0),p>o&&o>-p&&(o=0),za?(Qa.deltaX=n-qa.data.rotation,qa.data.rotation=Qa.rotation=n,qa.setRatio(1)):i?(Fa&&(Qa.deltaY=o-i.top(),i.top(o)),Ea&&(Qa.deltaX=n-i.left(),i.left(n))):ya?(Fa&&(Qa.deltaY=o-qa.data.y,qa.data.y=o),Ea&&(Qa.deltaX=n-qa.data.x,qa.data.x=n),qa.setRatio(1)):(Fa&&(Qa.deltaY=o-parseFloat(d.style.top||0),d.style.top=o+"px"),Ea&&(Qa.deltaY=n-parseFloat(d.style.left||0),d.style.left=n+"px")),!v||a||ua||(ua=!0,ia(Qa,"drag","onDrag"),ua=!1)}ca=!1},eb=function(a,c){var e,f=Qa.x,g=Qa.y;d._gsTransform||!ya&&!za||b.set(d,{x:"+=0",overwrite:!1,data:"_draggable"}),ya?(Qa.y=d._gsTransform.y,Qa.x=d._gsTransform.x):za?Qa.x=Qa.rotation=d._gsTransform.rotation:i?(Qa.y=i.top(),Qa.x=i.left()):(Qa.y=parseInt(d.style.top,10)||0,Qa.x=parseInt(d.style.left,10)||0),(ea||fa||ga)&&!c&&(Qa.isDragging||Qa.isThrowing)&&(ga&&(K.x=Qa.x,K.y=Qa.y,e=ga(K),e.x!==Qa.x&&(Qa.x=e.x,ca=!0),e.y!==Qa.y&&(Qa.y=e.y,ca=!0)),ea&&(e=ea(Qa.x),e!==Qa.x&&(Qa.x=e,za&&(Qa.rotation=e),ca=!0)),fa&&(e=fa(Qa.y),e!==Qa.y&&(Qa.y=e),ca=!0)),ca&&db(!0),a||(Qa.deltaX=Qa.x-f,Qa.deltaY=Qa.y-g,ia(Qa,"throwupdate","onThrowUpdate"))},fb=function(){var a,b,c,e;u=!1,i?(i.calibrate(),Qa.minX=D=-i.maxScrollLeft(),Qa.minY=O=-i.maxScrollTop(),Qa.maxX=x=Qa.maxY=G=0,u=!0):g.bounds&&(a=ja(g.bounds,d.parentNode),za?(Qa.minX=D=a.left,Qa.maxX=x=a.left+a.width,Qa.minY=O=Qa.maxY=G=0):void 0!==g.bounds.maxX||void 0!==g.bounds.maxY?(a=g.bounds,Qa.minX=D=a.minX,Qa.minY=O=a.minY,Qa.maxX=x=a.maxX,Qa.maxY=G=a.maxY):(b=ja(d,d.parentNode),Qa.minX=D=ha(d,Ca)+a.left-b.left,Qa.minY=O=ha(d,Da)+a.top-b.top,Qa.maxX=x=D+(a.width-b.width),Qa.maxY=G=O+(a.height-b.height)),D>x&&(Qa.minX=x,Qa.maxX=x=D,D=Qa.minX),O>G&&(Qa.minY=G,Qa.maxY=G=O,O=Qa.minY),za&&(Qa.minRotation=D,Qa.maxRotation=x),u=!0),g.liveSnap&&(c=g.liveSnap===!0?g.snap||{}:g.liveSnap,e=c instanceof Array||"function"==typeof c,za?(ea=nb(e?c:c.rotation,D,x,1),fa=null):c.points?ga=ob(e?c:c.points,D,x,O,G,c.radius,i?-1:1):(Ea&&(ea=nb(e?c:c.x||c.left||c.scrollLeft,D,x,i?-1:1)),Fa&&(fa=nb(e?c:c.y||c.top||c.scrollTop,O,G,i?-1:1))))},gb=function(){Qa.isThrowing=!1,ia(Qa,"throwcomplete","onThrowComplete")},hb=function(){Qa.isThrowing=!1},ib=function(a,b){var c,e,h,j;a&&f?(a===!0&&(c=g.snap||g.liveSnap||{},e=c instanceof Array||"function"==typeof c,a={resistance:(g.throwResistance||g.resistance||1e3)/(za?10:1)},za?a.rotation=Na(Qa,e?c:c.rotation,x,D,1,b):(Ea&&(a[Ca]=Na(Qa,e?c:c.points||c.x||c.left||c.scrollLeft,x,D,i?-1:1,b||"x"===Qa.lockedAxis)),Fa&&(a[Da]=Na(Qa,e?c:c.points||c.y||c.top||c.scrollTop,G,O,i?-1:1,b||"y"===Qa.lockedAxis)),(c.points||c instanceof Array&&"object"==typeof c[0])&&(a.linkedProps=Ca+","+Da,a.radius=c.radius))),Qa.isThrowing=!0,j=isNaN(g.overshootTolerance)?1===g.edgeResistance?0:1-Qa.edgeResistance+.2:g.overshootTolerance,Qa.tween=h=f.to(i||d,{throwProps:a,data:"_draggable",ease:g.ease||p.Power3.easeOut,onComplete:gb,onOverwrite:hb,onUpdate:g.fastMode?ia:eb,onUpdateParams:g.fastMode?[Qa,"onthrowupdate","onThrowUpdate"]:c&&c.radius?[!1,!0]:w},isNaN(g.maxDuration)?2:g.maxDuration,isNaN(g.minDuration)?0===j||"object"==typeof a&&a.resistance>1e3?0:.5:g.minDuration,j),g.fastMode||(i&&(i._suspendTransforms=!0),h.render(h.duration(),!0,!0),eb(!0,!0),Qa.endX=Qa.x,Qa.endY=Qa.y,za&&(Qa.endRotation=Qa.x),h.play(0),eb(!0,!0),i&&(i._suspendTransforms=!1))):u&&Qa.applyBounds()},jb=function(a){var b,c,e,f,g,h,i,l,m,n=ma||[1,0,0,1,0,0];ma=Aa(d.parentNode,!0),a&&Qa.isPressed&&n.join(",")!==ma.join(",")&&(b=n[0],c=n[1],e=n[2],f=n[3],g=n[4],h=n[5],i=b*f-c*e,l=j*(f/i)+k*(-e/i)+(e*h-f*g)/i,m=j*(-c/i)+k*(b/i)+-(b*h-c*g)/i,k=l*ma[1]+m*ma[3]+ma[5],j=l*ma[0]+m*ma[2]+ma[4]),ma[1]||ma[2]||1!=ma[0]||1!=ma[3]||0!=ma[4]||0!=ma[5]||(ma=null)},kb=function(){var a=1-Qa.edgeResistance;jb(!1),ma&&(j=Qa.pointerX*ma[0]+Qa.pointerY*ma[2]+ma[4],k=Qa.pointerX*ma[1]+Qa.pointerY*ma[3]+ma[5]),ca&&(rb(Qa.pointerX,Qa.pointerY),db(!0)),i?(fb(),r=i.top(),q=i.left()):(lb()?(eb(!0,!0),fb()):Qa.applyBounds(),za?(aa=Qa.rotationOrigin=Ba(d,{x:0,y:0}),eb(!0,!0),q=Qa.x,r=Qa.y=Math.atan2(aa.y-Qa.pointerY,Qa.pointerX-aa.x)*y):(oa=d.parentNode?d.parentNode.scrollTop||0:0,pa=d.parentNode?d.parentNode.scrollLeft||0:0,r=ha(d,Da),q=ha(d,Ca))),u&&a&&(q>x?q=x+(q-x)/a:D>q&&(q=D-(D-q)/a),za||(r>G?r=G+(r-G)/a:O>r&&(r=O-(O-r)/a))),Qa.startX=q,Qa.startY=r},lb=function(){return Qa.tween&&Qa.tween.isActive()},mb=function(){!C.parentNode||lb()||Qa.isDragging||C.parentNode.removeChild(C)},nb=function(a,b,c,d){return"function"==typeof a?function(e){var f=Qa.isPressed?1-Qa.edgeResistance:1;return a.call(Qa,e>c?c+(e-c)*f:b>e?b+(e-b)*f:e)*d}:a instanceof Array?function(d){for(var e,f,g=a.length,h=0,i=z;--g>-1;)e=a[g],f=e-d,0>f&&(f=-f),i>f&&e>=b&&c>=e&&(h=g,i=f);return a[h]}:isNaN(a)?function(a){return a}:function(){return a*d}},ob=function(a,b,c,d,e,f,g){return f=f&&z>f?f*f:z,"function"==typeof a?function(h){var i,j,k,l=Qa.isPressed?1-Qa.edgeResistance:1,m=h.x,n=h.y;return h.x=m=m>c?c+(m-c)*l:b>m?b+(m-b)*l:m,h.y=n=n>e?e+(n-e)*l:d>n?d+(n-d)*l:n,i=a.call(Qa,h),i!==h&&(h.x=i.x,h.y=i.y),1!==g&&(h.x*=g,h.y*=g),z>f&&(j=h.x-m,k=h.y-n,j*j+k*k>f&&(h.x=m,h.y=n)),h}:a instanceof Array?function(b){for(var c,d,e,g,h=a.length,i=0,j=z;--h>-1;)e=a[h],c=e.x-b.x,d=e.y-b.y,g=c*c+d*d,j>g&&(i=h,j=g);return f>=j?a[i]:b}:function(a){return a}},pb=function(a,c){var e;if(h&&!Qa.isPressed&&a&&("mousedown"!==a.type&&"pointerdown"!==a.type||c||!(A()-bb<30)||!Ha[Qa.pointerEvent.type])){if(na=lb(),Qa.pointerEvent=a,Ha[a.type]?(la=-1!==a.type.indexOf("touch")?a.currentTarget||a.target:s,Ia(la,"touchend",sb),Ia(la,"touchmove",qb),Ia(la,"touchcancel",sb),Ia(s,"touchstart",Ma)):(la=null,Ia(s,"mousemove",qb)),ta=null,Ia(s,"mouseup",sb),a&&a.target&&Ia(a.target,"mouseup",sb),ka=ab.call(Qa,a.target)&&!g.dragClickables&&!c)return Ia(a.target,"change",sb),ia(Qa,"press","onPress"),void Pa(Ta,!0);if(ra=!la||Ea===Fa||Qa.vars.allowNativeTouchScrolling===!1||Qa.vars.allowContextMenu&&a&&(a.ctrlKey||a.which>2)?!1:Ea?"y":"x",B?a=$(a,!0):ra||Qa.allowEventDefault||(a.preventDefault(),a.preventManipulation&&a.preventManipulation()),a.changedTouches?(a=U=a.changedTouches[0],Y=a.identifier):a.pointerId?Y=a.pointerId:U=Y=null,H++,P(db),k=Qa.pointerY=a.pageY,j=Qa.pointerX=a.pageX,(ra||Qa.autoScroll)&&Z(d.parentNode),!d.parentNode||!Qa.autoScroll||i||za||!d.parentNode._gsMaxScrollX||C.parentNode||d.getBBox||(C.style.width=d.parentNode.scrollWidth+"px",d.parentNode.appendChild(C)),kb(),Qa.tween&&Qa.tween.kill(),Qa.isThrowing=!1,b.killTweensOf(i||d,!0,Ua),i&&b.killTweensOf(d,!0,{scrollTo:1}),Qa.tween=Qa.lockedAxis=null,(g.zIndexBoost||!za&&!i&&g.zIndexBoost!==!1)&&(d.style.zIndex=Sa.zIndex++),Qa.isPressed=!0,v=!(!g.onDrag&&!Qa._listeners.drag),!za)for(e=Ta.length;--e>-1;)ba(Ta[e],"cursor",g.cursor||"move");ia(Qa,"press","onPress")}},qb=function(a){var b,c,d,f,g,i,l=a;if(h&&!e&&Qa.isPressed&&a){if(Qa.pointerEvent=a,b=a.changedTouches){if(a=b[0],a!==U&&a.identifier!==Y){for(f=b.length;--f>-1&&(a=b[f]).identifier!==Y;);if(0>f)return}}else if(a.pointerId&&Y&&a.pointerId!==Y)return;if(B)a=$(a,!0);else{if(la&&ra&&!ta&&(c=a.pageX,d=a.pageY,ma&&(f=c*ma[0]+d*ma[2]+ma[4],d=c*ma[1]+d*ma[3]+ma[5],c=f),g=Math.abs(c-j),i=Math.abs(d-k),(g!==i&&(g>La||i>La)||I&&ra===ta)&&(ta=g>i&&Ea?"x":"y",Qa.vars.lockAxisOnTouchScroll!==!1&&(Qa.lockedAxis="x"===ta?"y":"x","function"==typeof Qa.vars.onLockAxis&&Qa.vars.onLockAxis.call(Qa,l)),I&&ra===ta)))return void sb(l);Qa.allowEventDefault||ra&&(!ta||ra===ta)||l.cancelable===!1||(l.preventDefault(),l.preventManipulation&&l.preventManipulation())}Qa.autoScroll&&(Xa=!0),rb(a.pageX,a.pageY)}},rb=function(a,b){var c,d,e,f,g,h,i=1-Qa.dragResistance,l=1-Qa.edgeResistance;Qa.pointerX=a,Qa.pointerY=b,za?(f=Math.atan2(aa.y-b,a-aa.x)*y,g=Qa.y-f,g>180?(r-=360,Qa.y=f):-180>g&&(r+=360,Qa.y=f),Qa.x!==q||Math.abs(r-f)>La?(Qa.y=f,e=q+(r-f)*i):e=q):(ma&&(h=a*ma[0]+b*ma[2]+ma[4],b=a*ma[1]+b*ma[3]+ma[5],a=h),d=b-k,c=a-j,La>d&&d>-La&&(d=0),La>c&&c>-La&&(c=0),(Qa.lockAxis||Qa.lockedAxis)&&(c||d)&&(h=Qa.lockedAxis,h||(Qa.lockedAxis=h=Ea&&Math.abs(c)>Math.abs(d)?"y":Fa?"x":null,h&&"function"==typeof Qa.vars.onLockAxis&&Qa.vars.onLockAxis.call(Qa,Qa.pointerEvent)),"y"===h?d=0:"x"===h&&(c=0)),e=q+c*i,f=r+d*i),(ea||fa||ga)&&(Qa.x!==e||Qa.y!==f&&!za)?(ga&&(K.x=e,K.y=f,h=ga(K),e=h.x,f=h.y),ea&&(e=ea(e)),fa&&(f=fa(f))):u&&(e>x?e=x+(e-x)*l:D>e&&(e=D+(e-D)*l),za||(f>G?f=G+(f-G)*l:O>f&&(f=O+(f-O)*l))),za||ma||(e=Math.round(e),f=Math.round(f)),(Qa.x!==e||Qa.y!==f&&!za)&&(za?(Qa.endRotation=Qa.x=Qa.endX=e,ca=!0):(Fa&&(Qa.y=Qa.endY=f,ca=!0),Ea&&(Qa.x=Qa.endX=e,ca=!0)),!Qa.isDragging&&Qa.isPressed&&(Qa.isDragging=!0,ia(Qa,"dragstart","onDragStart")))},sb=function(a,c){if(h&&Qa.isPressed&&(!a||null==Y||c||!(a.pointerId&&a.pointerId!==Y||a.changedTouches&&!Ka(a.changedTouches,Y)))){Qa.isPressed=!1;var e,f,i,j,k,l=a,m=Qa.isDragging,n=Qa.vars.allowContextMenu&&a&&(a.ctrlKey||a.which>2),o=b.delayedCall(.001,mb);if(la?(Ja(la,"touchend",sb),Ja(la,"touchmove",qb),Ja(la,"touchcancel",sb),Ja(s,"touchstart",Ma)):Ja(s,"mousemove",qb),Ja(s,"mouseup",sb),a&&a.target&&Ja(a.target,"mouseup",sb),ca=!1,ka&&!n)return a&&(Ja(a.target,"change",sb),Qa.pointerEvent=l),Pa(Ta,!1),ia(Qa,"release","onRelease"),ia(Qa,"click","onClick"),void(ka=!1);if(Q(db),!za)for(f=Ta.length;--f>-1;)ba(Ta[f],"cursor",g.cursor||"move");if(m&&(Va=J=A(),Qa.isDragging=!1),H--,a){if(B&&(a=$(a,!1)),e=a.changedTouches,e&&(a=e[0],a!==U&&a.identifier!==Y)){for(f=e.length;--f>-1&&(a=e[f]).identifier!==Y;);if(0>f)return}Qa.pointerEvent=l,Qa.pointerX=a.pageX,Qa.pointerY=a.pageY}return n&&l?(l.preventDefault(),l.preventManipulation&&l.preventManipulation(),ia(Qa,"release","onRelease")):l&&!m?(na&&(g.snap||g.bounds)&&ib(g.throwProps),ia(Qa,"release","onRelease"),I&&"touchmove"===l.type||-1!==l.type.indexOf("cancel")||(ia(Qa,"click","onClick"),A()-bb<300&&ia(Qa,"doubleclick","onDoubleClick"),j=l.target||l.srcElement||d,bb=A(),k=function(){bb!==va&&Qa.enabled()&&!Qa.isPressed&&(j.click?j.click():s.createEvent&&(i=s.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,window,1,Qa.pointerEvent.screenX,Qa.pointerEvent.screenY,Qa.pointerX,Qa.pointerY,!1,!1,!1,!1,0,null),j.dispatchEvent(i)))},I||l.defaultPrevented||b.delayedCall(1e-5,k))):(ib(g.throwProps),B||Qa.allowEventDefault||!l||!g.dragClickables&&ab.call(Qa,l.target)||!m||ra&&(!ta||ra!==ta)||l.cancelable===!1||(l.preventDefault(),l.preventManipulation&&l.preventManipulation()),ia(Qa,"release","onRelease")),lb()&&o.duration(Qa.tween.duration()),m&&ia(Qa,"dragend","onDragEnd"),!0}},tb=function(a){if(a&&Qa.isDragging&&!i){var b=a.target||a.srcElement||d.parentNode,c=b.scrollLeft-b._gsScrollX,e=b.scrollTop-b._gsScrollY;(c||e)&&(ma?(j-=c*ma[0]+e*ma[2],k-=e*ma[3]+c*ma[1]):(j-=c,k-=e),b._gsScrollX+=c,b._gsScrollY+=e,rb(Qa.pointerX,Qa.pointerY))}},ub=function(a){var b=A(),c=40>b-bb,d=40>b-Va,e=c&&va===bb,f=!!a.preventDefault,g=Qa.pointerEvent&&Qa.pointerEvent.defaultPrevented,h=c&&wa===bb,i=a.isTrusted||null==a.isTrusted&&c&&e;return f&&(e||d&&Qa.vars.suppressClickOnDrag!==!1)&&a.stopImmediatePropagation(),!c||Qa.pointerEvent&&Qa.pointerEvent.defaultPrevented||e&&i===h?void((Qa.isPressed||d||c)&&(f?i&&a.detail&&c&&!g||(a.preventDefault(),a.preventManipulation&&a.preventManipulation()):a.returnValue=!1)):(i&&e&&(wa=bb),void(va=bb))},vb=function(a){return ma?{x:a.x*ma[0]+a.y*ma[2]+ma[4],y:a.x*ma[1]+a.y*ma[3]+ma[5]}:{x:a.x,y:a.y}};da=Sa.get(this.target),da&&da.kill(),this.startDrag=function(a,b){var c,e,f,g;pb(a||Qa.pointerEvent,!0),b&&!Qa.hitTest(a||Qa.pointerEvent)&&(c=Wa(a||Qa.pointerEvent),e=Wa(d),+f=vb({x:c.left+c.width/2,y:c.top+c.height/2}),g=vb({x:e.left+e.width/2,y:e.top+e.height/2}),j-=f.x-g.x,k-=f.y-g.y),Qa.isDragging||(Qa.isDragging=!0,ia(Qa,"dragstart","onDragStart"))},this.drag=qb,this.endDrag=function(a){sb(a||Qa.pointerEvent,!0)},this.timeSinceDrag=function(){return Qa.isDragging?0:(A()-Va)/1e3},this.timeSinceClick=function(){return(A()-bb)/1e3},this.hitTest=function(a,b){return Sa.hitTest(Qa.target,a,b)},this.getDirection=function(a,b){var c,d,e,g,h,i,j="velocity"===a&&f?a:"object"!=typeof a||za?"start":"element";return"element"===j&&(h=Wa(Qa.target),i=Wa(a)),c="start"===j?Qa.x-q:"velocity"===j?f.getVelocity(this.target,Ca):h.left+h.width/2-(i.left+i.width/2),za?0>c?"counter-clockwise":"clockwise":(b=b||2,d="start"===j?Qa.y-r:"velocity"===j?f.getVelocity(this.target,Da):h.top+h.height/2-(i.top+i.height/2),e=Math.abs(c/d),g=1/b>e?"":0>c?"left":"right",b>e&&(""!==g&&(g+="-"),g+=0>d?"up":"down"),g)},this.applyBounds=function(a){var b,c,e,f,h,i;if(a&&g.bounds!==a)return g.bounds=a,Qa.update(!0);if(eb(!0),fb(),u){if(b=Qa.x,c=Qa.y,b>x?b=x:D>b&&(b=D),c>G?c=G:O>c&&(c=O),(Qa.x!==b||Qa.y!==c)&&(e=!0,Qa.x=Qa.endX=b,za?Qa.endRotation=b:Qa.y=Qa.endY=c,ca=!0,db(!0),Qa.autoScroll&&!Qa.isDragging))for(Z(d.parentNode),f=d,L.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=t.scrollTop?t.scrollTop:s.body.scrollTop,L.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=t.scrollLeft?t.scrollLeft:s.body.scrollLeft;f&&!i;)i=X(f.parentNode),h=i?L:f.parentNode,Fa&&h.scrollTop>h._gsMaxScrollY&&(h.scrollTop=h._gsMaxScrollY),Ea&&h.scrollLeft>h._gsMaxScrollX&&(h.scrollLeft=h._gsMaxScrollX),f=h;Qa.isThrowing&&(e||Qa.endX>x||Qa.endX<D||Qa.endY>G||Qa.endY<O)&&ib(g.throwProps,e)}return Qa},this.update=function(a,b,c){var e=Qa.x,f=Qa.y;return jb(!b),a?Qa.applyBounds():(ca&&c&&db(!0),eb(!0)),b&&(rb(Qa.pointerX,Qa.pointerY),ca&&db(!0)),Qa.isPressed&&!b&&(Ea&&Math.abs(e-Qa.x)>.01||Fa&&Math.abs(f-Qa.y)>.01&&!za)&&kb(),Qa.autoScroll&&(Z(d.parentNode),Xa=Qa.isDragging,db(!0)),Qa.autoScroll&&(W(d,tb),V(d,tb)),Qa},this.enable=function(a){var e,j,k;if("soft"!==a){for(j=Ta.length;--j>-1;)k=Ta[j],Ia(k,"mousedown",pb),Ia(k,"touchstart",pb),Ia(k,"click",ub,!0),za||ba(k,"cursor",g.cursor||"move"),ba(k,"touchCallout","none"),ba(k,"touchAction",Ea===Fa?"none":Ea?"pan-y":"pan-x"),sa(k)&&ba(k.ownerSVGElement||k,"touchAction",Ea===Fa?"none":Ea?"pan-y":"pan-x"),this.vars.allowContextMenu||Ia(k,"contextmenu",cb);Pa(Ta,!1)}return V(d,tb),h=!0,f&&"soft"!==a&&f.track(i||d,ya?"x,y":za?"rotation":"top,left"),i&&i.enable(),d._gsDragID=e="d"+F++,E[e]=this,i&&(i.element._gsDragID=e),b.set(d,{x:"+=0",overwrite:!1,data:"_draggable"}),qa={t:d,data:B?T:d._gsTransform,tween:{},setRatio:B?function(){b.set(d,R)}:c._internals.setTransformRatio||c._internals.set3DTransformRatio},kb(),Qa.update(!0),Qa},this.disable=function(a){var b,c,e=Qa.isDragging;if(!za)for(b=Ta.length;--b>-1;)ba(Ta[b],"cursor",null);if("soft"!==a){for(b=Ta.length;--b>-1;)c=Ta[b],ba(c,"touchCallout",null),ba(c,"touchAction",null),Ja(c,"mousedown",pb),Ja(c,"touchstart",pb),Ja(c,"click",ub),Ja(c,"contextmenu",cb);Pa(Ta,!0),la&&(Ja(la,"touchcancel",sb),Ja(la,"touchend",sb),Ja(la,"touchmove",qb)),Ja(s,"mouseup",sb),Ja(s,"mousemove",qb)}return W(d,tb),h=!1,f&&"soft"!==a&&f.untrack(i||d,ya?"x,y":za?"rotation":"top,left"),i&&i.disable(),Q(db),Qa.isDragging=Qa.isPressed=ka=!1,e&&ia(Qa,"dragend","onDragEnd"),Qa},this.enabled=function(a,b){return arguments.length?a?Qa.enable(b):Qa.disable(b):h},this.kill=function(){return Qa.isThrowing=!1,b.killTweensOf(i||d,!0,Ua),Qa.disable(),delete E[d._gsDragID],Qa},-1!==xa.indexOf("scroll")&&(i=this.scrollProxy=new Ra(d,S({onKill:function(){Qa.isPressed&&sb(null)}},g)),d.style.overflowY=Fa&&!Ga?"auto":"hidden",d.style.overflowX=Ea&&!Ga?"auto":"hidden",d=i.content),g.force3D!==!1&&b.set(d,{force3D:!0}),za?Ua.rotation=1:(Ea&&(Ua[Ca]=1),Fa&&(Ua[Da]=1)),za?(R=o,T=R.css,R.overwrite=!1):ya&&(R=Ea&&Fa?l:Ea?m:n,T=R.css,R.overwrite=!1),this.enable()},Ta=Sa.prototype=new a;Ta.constructor=Sa,Ta.pointerX=Ta.pointerY=Ta.startX=Ta.startY=Ta.deltaX=Ta.deltaY=0,Ta.isDragging=Ta.isPressed=!1,Sa.version="0.16.3",Sa.zIndex=1e3,Ia(s,"touchcancel",function(){}),Ia(s,"contextmenu",function(a){var b;for(b in E)E[b].isPressed&&E[b].endDrag()}),Sa.create=function(a,c){"string"==typeof a&&(a=b.selector(a));for(var d=a&&0!==a.length?Ea(a)?Fa(a):[a]:[],e=d.length;--e>-1;)d[e]=new Sa(d[e],c);return d},Sa.get=function(a){return E[(_(a)||{})._gsDragID]},Sa.timeSinceDrag=function(){return(A()-J)/1e3};var Ua={},Va=function(a){var b,c,d=0,e=0;for(a=_(a),b=a.offsetWidth,c=a.offsetHeight;a;)d+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:d,left:e,width:b,height:c}},Wa=function(a,b){if(a===window)return Ua.left=Ua.top=0,Ua.width=Ua.right=t.clientWidth||a.innerWidth||s.body.clientWidth||0,Ua.height=Ua.bottom=(a.innerHeight||0)-20<t.clientHeight?t.clientHeight:a.innerHeight||s.body.clientHeight||0,Ua;var c=a.pageX!==b?{left:a.pageX-U(),top:a.pageY-T(),right:a.pageX-U()+1,bottom:a.pageY-T()+1}:a.nodeType||a.left===b||a.top===b?B?Va(a):_(a).getBoundingClientRect():a;return c.right===b&&c.width!==b?(c.right=c.left+c.width,c.bottom=c.top+c.height):c.width===b&&(c={width:c.right-c.left,height:c.bottom-c.top,right:c.right,left:c.left,bottom:c.bottom,top:c.top}),c};return Sa.hitTest=function(a,b,c){if(a===b)return!1;var d,e,f,g=Wa(a),h=Wa(b),i=h.left>g.right||h.right<g.left||h.top>g.bottom||h.bottom<g.top;return i||!c?!i:(f=-1!==(c+"").indexOf("%"),c=parseFloat(c)||0,d={left:Math.max(g.left,h.left),top:Math.max(g.top,h.top)},d.width=Math.min(g.right,h.right)-d.left,d.height=Math.min(g.bottom,h.bottom)-d.top,d.width<0||d.height<0?!1:f?(c*=.01,e=d.width*d.height,e>=g.width*g.height*c||e>=h.width*h.height*c):d.width>c&&d.height>c)},C.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;",Sa},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),require("../plugins/CSSPlugin.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite","CSSPlugin"],b)}("Draggable");\ No newline at end of filediff --git a/src/uncompressed/TimelineLite.js b/src/uncompressed/TimelineLite.jsindex bd390ea..ce2829e 100644--- a/src/uncompressed/TimelineLite.js+++ b/src/uncompressed/TimelineLite.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -69,7 +69,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa},p = TimelineLite.prototype = new SimpleTimeline();- TimelineLite.version = "1.20.4";+ TimelineLite.version = "1.20.5";p.constructor = TimelineLite;p.kill()._gc = p._forcingPlayhead = p._hasPause = false;diff --git a/src/uncompressed/TimelineMax.js b/src/uncompressed/TimelineMax.jsindex ce8b226..c5e92f3 100644--- a/src/uncompressed/TimelineMax.js+++ b/src/uncompressed/TimelineMax.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -34,7 +34,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap.constructor = TimelineMax;p.kill()._gc = false;- TimelineMax.version = "1.20.4";+ TimelineMax.version = "1.20.5";p.invalidate = function() {this._yoyo = (this.vars.yoyo === true);@@ -588,7 +588,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa},p = TimelineLite.prototype = new SimpleTimeline();- TimelineLite.version = "1.20.4";+ TimelineLite.version = "1.20.5";p.constructor = TimelineLite;p.kill()._gc = p._forcingPlayhead = p._hasPause = false;diff --git a/src/uncompressed/TweenLite.js b/src/uncompressed/TweenLite.jsindex f5e9585..d82254c 100644--- a/src/uncompressed/TweenLite.js+++ b/src/uncompressed/TweenLite.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -16,7 +16,7 @@_doc = window.document,_globals = window.GreenSockGlobals = window.GreenSockGlobals || window;if (_globals.TweenLite) {- return; //in case the core set of classes is already loaded, don't instantiate twice.+ return _globals.TweenLite; //in case the core set of classes is already loaded, don't instantiate twice.}var _namespace = function(ns) {var a = ns.split("."),@@ -786,7 +786,7 @@var prevTween, st;child._startTime = Number(position || 0) + child._delay;if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).- child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);+ child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime);}if (child.timeline) {child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.@@ -958,7 +958,7 @@p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;p._notifyPluginsOfEnabled = p._lazy = false;- TweenLite.version = "1.20.4";+ TweenLite.version = "1.20.5";TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);TweenLite.defaultOverwrite = "auto";TweenLite.ticker = _ticker;@@ -973,7 +973,10 @@TweenLite.selector = selector;return selector(e);}- return (typeof(_doc) === "undefined") ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));+ if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary.+ _doc = window.document;+ }+ return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));};var _lazyTweens = [],@@ -988,7 +991,7 @@while (pt) {val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;if (pt.m) {- val = pt.m(val, this._target || pt.t);+ val = pt.m.call(this._tween, val, this._target || pt.t, this._tween);} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browserval = 0;}@@ -1287,7 +1290,7 @@startVars.onUpdate = v.onUpdate;startVars.onUpdateParams = v.onUpdateParams;startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;- this._startAt = TweenLite.to(this.target, 0, startVars);+ this._startAt = TweenLite.to(this.target || {}, 0, startVars);if (immediate) {if (this._time > 0) {this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).diff --git a/src/uncompressed/TweenMax.js b/src/uncompressed/TweenMax.jsindex 1ab91d4..1e184da 100644--- a/src/uncompressed/TweenMax.js+++ b/src/uncompressed/TweenMax.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin@@ -52,7 +52,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap = TweenMax.prototype = TweenLite.to({}, 0.1, {}),_blankArray = [];- TweenMax.version = "1.20.4";+ TweenMax.version = "1.20.5";p.constructor = TweenMax;p.kill()._gc = false;TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;@@ -2583,7 +2583,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap = CSSPlugin.prototype = new TweenPlugin("css");p.constructor = CSSPlugin;- CSSPlugin.version = "1.20.4";+ CSSPlugin.version = "1.20.5";CSSPlugin.API = 2;CSSPlugin.defaultTransformPerspective = 0;CSSPlugin.defaultSkewType = "compensated";@@ -2678,7 +2678,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globareturn null;},- _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {},+ _getComputedStyle = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,/*** @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:@@ -3230,7 +3230,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (mpt) {val = proxy[mpt.v];if (mpt.r) {- val = Math.round(val);+ val = mpt.r(val);} else if (val < min && val > -min) {val = 0;}@@ -3238,7 +3238,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globampt = mpt._next;}if (d.autoRotate) {- d.autoRotate.rotation = d.mod ? d.mod(proxy.rotation, this.t) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier+ d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier}//at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.if (v === 1 || v === 0) {@@ -3373,7 +3373,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaif (!(t instanceof CSSPropTween)) {_overwriteProps.push(this.n);}- this.r = r; //round (boolean)+ this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean)this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the workif (pr) {this.pr = pr;@@ -3451,11 +3451,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_colorExp.lastIndex = 0;for (i = 0; i < l; i++) {bv = ba[i];- ev = ea[i];+ ev = ea[i] + "";bn = parseFloat(bv);//if the value begins with a number (most common). It's fine if it has a suffix like pxif (bn || bn === 0) {- pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);+ pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true);//if the value is a color} else if (clrs && _colorExp.test(bv)) {@@ -3478,9 +3478,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa.appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false).appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false);} else {- pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)- .appendXtra("", bv[1], ev[1] - bv[1], ",", true)- .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), true);+ pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true)+ .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round)+ .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round);}if (hasAlpha) {@@ -3508,7 +3508,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globafor (xi = 0; xi < bnums.length; xi++) {cv = bnums[xi];temp = bv.indexOf(cv, ni);- pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0));+ pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0));ni = temp + cv.length;}pt["xs" + pt.l] += bv.substr(ni);@@ -4501,6 +4501,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globacopy[_transformProp] = orig;copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.copy.position = "absolute";+ if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target...+ copy.width = _getStyle(t, "width");+ copy.height = _getStyle(t, "height");+ }_doc.body.appendChild(_tempDiv);m2 = _getTransform(_tempDiv, null, false);if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple".@@ -4737,7 +4741,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}, formatter:_parsePosition});_registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) {v += ""; //ensure it's a string- return _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong).+ return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set.}});_registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});_registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});@@ -5190,7 +5194,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (pt) {if (pt.type !== 2) {if (pt.r && pt.type !== -1) {- val = Math.round(pt.s + pt.c);+ val = pt.r(pt.s + pt.c);if (!pt.type) {pt.t[pt.p] = val + pt.xs0;} else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"@@ -5214,7 +5218,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (pt) {val = pt.c * v + pt.s;if (pt.r) {- val = Math.round(val);+ val = pt.r(val);} else if (val < min) if (val > -min) {val = 0;}@@ -5317,8 +5321,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap._mod = function(lookup) {var pt = this._firstPT;while (pt) {- if (typeof(lookup[pt.p]) === "function" && lookup[pt.p] === Math.round) { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally..- pt.r = 1;+ if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally.+ pt.r = lookup[pt.p];}pt = pt._next;}@@ -5466,7 +5470,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globavar RoundPropsPlugin = _gsScope._gsDefine.plugin({propName: "roundProps",- version: "1.6.0",+ version: "1.7.0",priority: -1,API: 2,@@ -5477,10 +5481,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}}),- _roundLinkedList = function(node) {+ _getRoundFunc = function(v) { //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.+ var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()+ return function(n) {+ return ((Math.round(n / v) * v * p) | 0) / p;+ };+ },+ _roundLinkedList = function(node, mod) {while (node) {if (!node.f && !node.blob) {- node.m = Math.round;+ node.m = mod || Math.round;}node = node._next;}@@ -5489,27 +5499,35 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap._onInitAllProps = function() {var tween = this._tween,- rp = (tween.vars.roundProps.join) ? tween.vars.roundProps : tween.vars.roundProps.split(","),- i = rp.length,+ rp = tween.vars.roundProps,lookup = {},rpt = tween._propLookup.roundProps,- prop, pt, next;- while (--i > -1) {- lookup[rp[i]] = Math.round;+ pt, next, i, p;+ if (typeof(rp) === "object" && !rp.push) {+ for (p in rp) {+ lookup[p] = _getRoundFunc(rp[p]);+ }+ } else {+ if (typeof(rp) === "string") {+ rp = rp.split(",");+ }+ i = rp.length;+ while (--i > -1) {+ lookup[rp[i]] = Math.round;+ }}- i = rp.length;- while (--i > -1) {- prop = rp[i];++ for (p in lookup) {pt = tween._firstPT;while (pt) {next = pt._next; //record here, because it may get removedif (pt.pg) {pt.t._mod(lookup);- } else if (pt.n === prop) {+ } else if (pt.n === p) {if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values)- _roundLinkedList(pt.t._firstPT);+ _roundLinkedList(pt.t._firstPT, lookup[p]);} else {- this._add(pt.t, prop, pt.s, pt.c);+ this._add(pt.t, p, pt.s, pt.c, lookup[p]);//remove from linked listif (next) {next._prev = pt._prev;@@ -5520,7 +5538,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globatween._firstPT = next;}pt._next = pt._prev = null;- tween._propLookup[prop] = rpt;+ tween._propLookup[p] = rpt;}}pt = next;@@ -5529,8 +5547,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globareturn false;};- p._add = function(target, p, s, c) {- this._addTween(target, p, s, s + c, p, Math.round);+ p._add = function(target, p, s, c, mod) {+ this._addTween(target, p, s, s + c, p, mod || Math.round);this._overwriteProps.push(p);};@@ -6051,7 +6069,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween_doc = window.document,_globals = window.GreenSockGlobals = window.GreenSockGlobals || window;if (_globals.TweenLite) {- return; //in case the core set of classes is already loaded, don't instantiate twice.+ return _globals.TweenLite; //in case the core set of classes is already loaded, don't instantiate twice.}var _namespace = function(ns) {var a = ns.split("."),@@ -6821,7 +6839,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tweenvar prevTween, st;child._startTime = Number(position || 0) + child._delay;if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).- child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);+ child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime);}if (child.timeline) {child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.@@ -6993,7 +7011,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tweenp._firstPT = p._targets = p._overwrittenProps = p._startAt = null;p._notifyPluginsOfEnabled = p._lazy = false;- TweenLite.version = "1.20.4";+ TweenLite.version = "1.20.5";TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);TweenLite.defaultOverwrite = "auto";TweenLite.ticker = _ticker;@@ -7008,7 +7026,10 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case TweenTweenLite.selector = selector;return selector(e);}- return (typeof(_doc) === "undefined") ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));+ if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary.+ _doc = window.document;+ }+ return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));};var _lazyTweens = [],@@ -7023,7 +7044,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tweenwhile (pt) {val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;if (pt.m) {- val = pt.m(val, this._target || pt.t);+ val = pt.m.call(this._tween, val, this._target || pt.t, this._tween);} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browserval = 0;}@@ -7322,7 +7343,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case TweenstartVars.onUpdate = v.onUpdate;startVars.onUpdateParams = v.onUpdateParams;startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;- this._startAt = TweenLite.to(this.target, 0, startVars);+ this._startAt = TweenLite.to(this.target || {}, 0, startVars);if (immediate) {if (this._time > 0) {this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).diff --git a/src/uncompressed/plugins/CSSPlugin.js b/src/uncompressed/plugins/CSSPlugin.jsindex 446d1b0..09d99b5 100644--- a/src/uncompressed/plugins/CSSPlugin.js+++ b/src/uncompressed/plugins/CSSPlugin.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.20.4- * DATE: 2018-02-15+ * VERSION: 1.20.5+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap = CSSPlugin.prototype = new TweenPlugin("css");p.constructor = CSSPlugin;- CSSPlugin.version = "1.20.4";+ CSSPlugin.version = "1.20.5";CSSPlugin.API = 2;CSSPlugin.defaultTransformPerspective = 0;CSSPlugin.defaultSkewType = "compensated";@@ -126,7 +126,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globareturn null;},- _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {},+ _getComputedStyle = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,/*** @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:@@ -678,7 +678,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (mpt) {val = proxy[mpt.v];if (mpt.r) {- val = Math.round(val);+ val = mpt.r(val);} else if (val < min && val > -min) {val = 0;}@@ -686,7 +686,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globampt = mpt._next;}if (d.autoRotate) {- d.autoRotate.rotation = d.mod ? d.mod(proxy.rotation, this.t) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier+ d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier}//at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.if (v === 1 || v === 0) {@@ -821,7 +821,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaif (!(t instanceof CSSPropTween)) {_overwriteProps.push(this.n);}- this.r = r; //round (boolean)+ this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean)this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the workif (pr) {this.pr = pr;@@ -899,11 +899,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_colorExp.lastIndex = 0;for (i = 0; i < l; i++) {bv = ba[i];- ev = ea[i];+ ev = ea[i] + "";bn = parseFloat(bv);//if the value begins with a number (most common). It's fine if it has a suffix like pxif (bn || bn === 0) {- pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);+ pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true);//if the value is a color} else if (clrs && _colorExp.test(bv)) {@@ -926,9 +926,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa.appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false).appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false);} else {- pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)- .appendXtra("", bv[1], ev[1] - bv[1], ",", true)- .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), true);+ pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true)+ .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round)+ .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round);}if (hasAlpha) {@@ -956,7 +956,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globafor (xi = 0; xi < bnums.length; xi++) {cv = bnums[xi];temp = bv.indexOf(cv, ni);- pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0));+ pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0));ni = temp + cv.length;}pt["xs" + pt.l] += bv.substr(ni);@@ -1949,6 +1949,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globacopy[_transformProp] = orig;copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.copy.position = "absolute";+ if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target...+ copy.width = _getStyle(t, "width");+ copy.height = _getStyle(t, "height");+ }_doc.body.appendChild(_tempDiv);m2 = _getTransform(_tempDiv, null, false);if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple".@@ -2185,7 +2189,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}, formatter:_parsePosition});_registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) {v += ""; //ensure it's a string- return _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong).+ return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set.}});_registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});_registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});@@ -2638,7 +2642,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (pt) {if (pt.type !== 2) {if (pt.r && pt.type !== -1) {- val = Math.round(pt.s + pt.c);+ val = pt.r(pt.s + pt.c);if (!pt.type) {pt.t[pt.p] = val + pt.xs0;} else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"@@ -2662,7 +2666,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globawhile (pt) {val = pt.c * v + pt.s;if (pt.r) {- val = Math.round(val);+ val = pt.r(val);} else if (val < min) if (val > -min) {val = 0;}@@ -2765,8 +2769,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap._mod = function(lookup) {var pt = this._firstPT;while (pt) {- if (typeof(lookup[pt.p]) === "function" && lookup[pt.p] === Math.round) { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally..- pt.r = 1;+ if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally.+ pt.r = lookup[pt.p];}pt = pt._next;}diff --git a/src/uncompressed/plugins/EaselPlugin.js b/src/uncompressed/plugins/EaselPlugin.jsindex 2e1284d..3a755b1 100644--- a/src/uncompressed/plugins/EaselPlugin.js+++ b/src/uncompressed/plugins/EaselPlugin.js@@ -226,7 +226,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa};- _gsScope._gsDefine.plugin({+ var EaselPlugin = _gsScope._gsDefine.plugin({propName: "easel",priority: -1,version: "0.2.2",diff --git a/src/uncompressed/plugins/ModifiersPlugin.js b/src/uncompressed/plugins/ModifiersPlugin.jsindex 4eab50e..19fa6b7 100644--- a/src/uncompressed/plugins/ModifiersPlugin.js+++ b/src/uncompressed/plugins/ModifiersPlugin.js@@ -1,6 +1,6 @@/*!- * VERSION: 0.0.3- * DATE: 2018-02-15+ * VERSION: 0.0.4+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -30,16 +30,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaif (pt.r && type !== -1) {val = Math.round(pt.s + pt.c);if (!type) {- pt.t[pt.p] = mod(val + pt.xs0, target);+ pt.t[pt.p] = mod.call(tween, val + pt.xs0, target, tween);} else if (type === 1) {str = pt.xs0 + val + pt.xs1;for (i = 1; i < pt.l; i++) {str += pt["xn"+i] + pt["xs"+(i+1)];}- pt.t[pt.p] = mod(str, target);+ pt.t[pt.p] = mod.call(tween, str, target, tween);}} else {- pt.t[pt.p] = mod(pt.e, target);+ pt.t[pt.p] = mod.call(tween, pt.e, target, tween);}} else {oldSetRatio.call(pt, v);@@ -53,16 +53,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaval = 0;}if (!type) {- pt.t[pt.p] = mod(val + pt.xs0, target);+ pt.t[pt.p] = mod.call(tween, val + pt.xs0, target, tween);} else if (type === 1) {str = pt.xs0 + val + pt.xs1;for (i = 1; i < pt.l; i++) {str += pt["xn"+i] + pt["xs"+(i+1)];}- pt.t[pt.p] = mod(str, target);+ pt.t[pt.p] = mod.call(tween, str, target, tween);} else if (type === -1) { //non-tweening value- pt.t[pt.p] = mod(pt.xs0, target);+ pt.t[pt.p] = mod.call(tween, pt.xs0, target, tween);} else if (oldSetRatio) {oldSetRatio.call(pt, v);@@ -70,7 +70,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa} else {if (type !== 2) {- pt.t[pt.p] = mod(pt.b, target);+ pt.t[pt.p] = mod.call(tween, pt.b, target, tween);} else {oldSetRatio.call(pt, v);}@@ -80,6 +80,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_modCSS = function(lookup, cssp) {var pt = cssp._firstPT,hasBezier = (lookup.rotation && cssp._overwriteProps.join("").indexOf("bezier") !== -1); //when a Bezier tween is applying autoRotation, it's a very special case we need to handle differently.+ if (lookup.scale) {+ lookup.scaleX = lookup.scaleY = lookup.scale;+ } else if (lookup.rotationZ) {+ lookup.rotation = lookup.rotationZ;+ }while (pt) {if (typeof(lookup[pt.p]) === "function") {_cssRatioSetter(pt, cssp, lookup[pt.p]);@@ -92,7 +97,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaModifiersPlugin = _gsScope._gsDefine.plugin({propName: "modifiers",- version: "0.0.3",+ version: "0.0.4",API: 2,//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.@@ -108,6 +113,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globampt = this,pt = tween._firstPT,val, next;+ //initAll() gets called for each and every ModifiersPlugin instance in a tween, so if there are multiple targets, there will be multiple instances. Since we're ripping through the whole tween (and all the PropTweens), we only need to run this code ONCE. So we're setting a toggle on the first PropTween that just tells us if we've done it already. We don't set it on the tween instance because if it gets invalidated, we don't want to have to track this property and reset it. PropTweens get blown away when a tween is invalidated.+ if (pt._modInitted) {+ return false;+ } else {+ pt._modInitted = 1;+ }while (pt) {next = pt._next; //record here, because it may get removedval = lookup[pt.n];@@ -116,11 +127,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_modCSS(lookup, pt.t);} else if (pt.t !== mpt) { //don't run modProps on modProps :)val = lookup[pt.t._propName];+ pt.t._tween = tween;pt.t._mod((typeof(val) === "object") ? val : lookup);}} else if (typeof(val) === "function") {if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values)pt.t._applyPT.m = val;+ pt.t._tween = tween;} else {this._add(pt.t, pt.p, pt.s, pt.c, val);//remove from linked listdiff --git a/src/uncompressed/plugins/RoundPropsPlugin.js b/src/uncompressed/plugins/RoundPropsPlugin.jsindex 65959a6..d4aa2d4 100644--- a/src/uncompressed/plugins/RoundPropsPlugin.js+++ b/src/uncompressed/plugins/RoundPropsPlugin.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.6.0- * DATE: 2018-02-15+ * VERSION: 1.7.0+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -16,7 +16,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globavar RoundPropsPlugin = _gsScope._gsDefine.plugin({propName: "roundProps",- version: "1.6.0",+ version: "1.7.0",priority: -1,API: 2,@@ -27,10 +27,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}}),- _roundLinkedList = function(node) {+ _getRoundFunc = function(v) { //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.+ var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()+ return function(n) {+ return ((Math.round(n / v) * v * p) | 0) / p;+ };+ },+ _roundLinkedList = function(node, mod) {while (node) {if (!node.f && !node.blob) {- node.m = Math.round;+ node.m = mod || Math.round;}node = node._next;}@@ -39,27 +45,35 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap._onInitAllProps = function() {var tween = this._tween,- rp = (tween.vars.roundProps.join) ? tween.vars.roundProps : tween.vars.roundProps.split(","),- i = rp.length,+ rp = tween.vars.roundProps,lookup = {},rpt = tween._propLookup.roundProps,- prop, pt, next;- while (--i > -1) {- lookup[rp[i]] = Math.round;+ pt, next, i, p;+ if (typeof(rp) === "object" && !rp.push) {+ for (p in rp) {+ lookup[p] = _getRoundFunc(rp[p]);+ }+ } else {+ if (typeof(rp) === "string") {+ rp = rp.split(",");+ }+ i = rp.length;+ while (--i > -1) {+ lookup[rp[i]] = Math.round;+ }}- i = rp.length;- while (--i > -1) {- prop = rp[i];++ for (p in lookup) {pt = tween._firstPT;while (pt) {next = pt._next; //record here, because it may get removedif (pt.pg) {pt.t._mod(lookup);- } else if (pt.n === prop) {+ } else if (pt.n === p) {if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values)- _roundLinkedList(pt.t._firstPT);+ _roundLinkedList(pt.t._firstPT, lookup[p]);} else {- this._add(pt.t, prop, pt.s, pt.c);+ this._add(pt.t, p, pt.s, pt.c, lookup[p]);//remove from linked listif (next) {next._prev = pt._prev;@@ -70,7 +84,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globatween._firstPT = next;}pt._next = pt._prev = null;- tween._propLookup[prop] = rpt;+ tween._propLookup[p] = rpt;}}pt = next;@@ -79,8 +93,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globareturn false;};- p._add = function(target, p, s, c) {- this._addTween(target, p, s, s + c, p, Math.round);+ p._add = function(target, p, s, c, mod) {+ this._addTween(target, p, s, s + c, p, mod || Math.round);this._overwriteProps.push(p);};diff --git a/src/uncompressed/plugins/ScrollToPlugin.js b/src/uncompressed/plugins/ScrollToPlugin.jsindex b254f86..101f901 100644--- a/src/uncompressed/plugins/ScrollToPlugin.js+++ b/src/uncompressed/plugins/ScrollToPlugin.js@@ -1,6 +1,6 @@/*!- * VERSION: 1.9.0- * DATE: 2018-02-15+ * VERSION: 1.9.1+ * DATE: 2018-05-21* UPDATES AND DOCS AT: http://greensock.com** @license Copyright (c) 2008-2018, GreenSock. All rights reserved.@@ -48,6 +48,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa};},_getOffset = function(element, container) {+ var rect = _unwrapElement(element).getBoundingClientRect(),+ b = document.body,+ isRoot = (!container || container === _window || container === b),+ cRect = isRoot ? {top:_doc.clientTop - (window.pageYOffset || _doc.scrollTop || b.scrollTop || 0), left:_doc.clientLeft - (window.pageXOffset || _doc.scrollLeft || b.scrollLeft || 0)} : container.getBoundingClientRect(),+ offsets = {x: rect.left - cRect.left, y: rect.top - cRect.top};+ if (!isRoot && container) { //only add the current scroll position if it's not the window/body.+ offsets.x += _buildGetter(container, "x")();+ offsets.y += _buildGetter(container, "y")();+ }+ return offsets;+ /* PREVIOUSvar rect = _unwrapElement(element).getBoundingClientRect(),isRoot = (!container || container === _window || container === document.body),cRect = (isRoot ? _doc : container).getBoundingClientRect(),@@ -57,6 +68,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaoffsets.y += _buildGetter(container, "y")();}return offsets;+ */},_parseVal = function(value, target, axis) {var type = typeof(value);@@ -67,7 +79,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globapropName: "scrollTo",API: 2,global: true,- version:"1.9.0",+ version:"1.9.1",//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.init: function(target, value, tween) {diff --git a/src/uncompressed/utils/Draggable.js b/src/uncompressed/utils/Draggable.jsindex 91052e0..d67b7cd 100644--- a/src/uncompressed/utils/Draggable.js+++ b/src/uncompressed/utils/Draggable.js@@ -1,6 +1,6 @@/*!- * VERSION: 0.16.2- * DATE: 2018-02-15+ * VERSION: 0.16.3+ * DATE: 2018-05-04* UPDATES AND DOCS AT: http://greensock.com** Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).@@ -437,12 +437,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}parentRect = offsetParent.getBoundingClientRect();m = e.getScreenCTM();+point2 = e.createSVGPoint();point1 = point2.matrixTransform(m);- point2.x = point2.y = 10;- point2 = point2.matrixTransform(m);- cache.scaleX = (point2.x - point1.x) / 10;- cache.scaleY = (point2.y - point1.y) / 10;+ cache.scaleX = Math.sqrt(m.a * m.a + m.b * m.b);+ cache.scaleY = Math.sqrt(m.d * m.d + m.c * m.c);if (_svgBorderFactor === undefined) {_setEnvironmentVariables();}@@ -802,8 +801,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_addListener = function(element, type, func, capture) {if (element.addEventListener) {- element.addEventListener(_touchEventLookup[type], func, capture);- if (type !== _touchEventLookup[type]) { //some browsers actually support both, so must we.+ var touchType = _touchEventLookup[type];+ capture = capture || {passive:false};+ element.addEventListener(touchType || type, func, capture);+ if (touchType && type !== touchType) { //some browsers actually support both, so must we.element.addEventListener(type, func, capture);}} else if (element.attachEvent) {@@ -813,8 +814,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_removeListener = function(element, type, func) {if (element.removeEventListener) {- element.removeEventListener(_touchEventLookup[type], func);- if (type !== _touchEventLookup[type]) {+ var touchType = _touchEventLookup[type];+ element.removeEventListener(touchType || type, func);+ if (touchType && type !== touchType) {element.removeEventListener(type, func);}} else if (element.detachEvent) {@@ -908,8 +910,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}},- _addPaddingBR,- _addPaddingLeft = (function() { //this function is in charge of analyzing browser behavior related to padding. It sets the _addPaddingBR to true if the browser doesn't normally factor in the bottom or right padding on the element inside the scrolling area, and it sets _addPaddingLeft to true if it's a browser that requires the extra offset (offsetLeft) to be added to the paddingRight (like Opera).+ _addPaddingBR = (function() { //this function is in charge of analyzing browser behavior related to padding. It sets the _addPaddingBR to true if the browser doesn't normally factor in the bottom or right padding on the element inside the scrolling area, and it sets _addPaddingLeft to true if it's a browser that requires the extra offset (offsetLeft) to be added to the paddingRight (like Opera).var div = _doc.createElement("div"),child = _doc.createElement("div"),childStyle = child.style,@@ -920,14 +921,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globadiv.style.cssText = child.innerHTML = "width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden";div.appendChild(child);parent.appendChild(div);- _addPaddingBR = (child.offsetHeight + 18 > div.scrollHeight); //div.scrollHeight should be child.offsetHeight + 20 because of the 10px of padding on each side, but some browsers ignore one side. We allow a 2px margin of error.- childStyle.width = "100%";- if (!_transformProp) {- childStyle.paddingRight = "500px";- val = div.scrollLeft = div.scrollWidth - div.clientWidth;- childStyle.left = "-90px";- val = (val !== div.scrollLeft);- }+ val = (child.offsetHeight + 18 > div.scrollHeight); //div.scrollHeight should be child.offsetHeight + 20 because of the 10px of padding on each side, but some browsers ignore one side. We allow a 2px margin of error.parent.removeChild(div);return val;}()),@@ -1008,7 +1002,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa} else {style.left = -offsetLeft + "px";}- if (_addPaddingLeft && offsetLeft + extraPadRight >= 0) {+ if (offsetLeft + extraPadRight >= 0) {style.paddingRight = offsetLeft + extraPadRight + "px";}}@@ -1686,7 +1680,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_setSelectable(triggers, true); //accommodates things like inputs and elements with contentEditable="true" (otherwise user couldn't drag to select text)return;}- allowNativeTouchScrolling = (!touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false) ? false : allowX ? "y" : "x";+ allowNativeTouchScrolling = (!touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false || (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2))) ? false : allowX ? "y" : "x"; //note: in Chrome, right-clicking (for a context menu) fires onPress and it doesn't have the event.which set properly, so we must look for event.ctrlKey. If the user wants to allow context menus we should of course sense it here and not allow native touch scrolling.if (_isOldIE) {e = _populateIEEvent(e, true);} else if (!allowNativeTouchScrolling && !self.allowEventDefault) {@@ -1916,6 +1910,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaself.isPressed = false;var originalEvent = e,wasDragging = self.isDragging,+ isContextMenuRelease = (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2)),placeholderDelayedCall = TweenLite.delayedCall(0.001, removePlaceholder),touches, i, syntheticEvent, eventTarget, syntheticClick;if (touchEventTarget) {@@ -1931,7 +1926,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa_removeListener(e.target, "mouseup", onRelease);}dirty = false;- if (isClicking) {+ if (isClicking && !isContextMenuRelease) {if (e) {_removeListener(e.target, "change", onRelease);self.pointerEvent = originalEvent;@@ -1973,7 +1968,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globaself.pointerX = e.pageX;self.pointerY = e.pageY;}- if (originalEvent && !wasDragging) {+ if (isContextMenuRelease && originalEvent) {+ originalEvent.preventDefault();+ if (originalEvent.preventManipulation) {+ originalEvent.preventManipulation(); //for some Microsoft browsers+ }+ _dispatchEvent(self, "release", "onRelease");+ } else if (originalEvent && !wasDragging) {if (interrupted && (vars.snap || vars.bounds)) { //otherwise, if the user clicks on the object while it's animating to a snapped position, and then releases without moving 3 pixels, it will just stay there (it should animate/snap)animate(vars.throwProps);}@@ -1985,7 +1986,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa}eventTarget = originalEvent.target || originalEvent.srcElement || target; //old IE uses srcElementclickTime = _getTime();- syntheticClick = function() { // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched.+ syntheticClick = function () { // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched.if (clickTime !== clickDispatch && self.enabled() && !self.isPressed) {if (eventTarget.click) { //some browsers (like mobile Safari) don't properly trigger the click eventeventTarget.click();@@ -2372,7 +2373,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globap.constructor = Draggable;p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;p.isDragging = p.isPressed = false;- Draggable.version = "0.16.1";+ Draggable.version = "0.16.3";Draggable.zIndex = 1000;_addListener(_doc, "touchcancel", function() {