!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Barba",[],e):"object"==typeof exports?exports.Barba=e():t.Barba=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="http://localhost:8080/dist",e(0)}([function(t,e,n){"function"!=typeof Promise&&(window.Promise=n(1));var r={version:"1.0.0",BaseTransition:n(4),BaseView:n(6),BaseCache:n(8),Dispatcher:n(7),HistoryManager:n(9),Pjax:n(10),Prefetch:n(13),Utils:n(5)};t.exports=r},function(t,e,n){(function(e){!function(n){function r(){}function i(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void l(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:c)(e.promise,t._value);var r;try{r=n(t._value)}catch(t){return void c(e.promise,t)}a(e.promise,r)}))}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void h(i(n,e),t)}t._state=1,t._value=e,u(t)}catch(e){c(t,e)}}function c(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&l(function(){t._handled||p(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)s(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function h(t,e){var n=!1;try{t(function(t){n||(n=!0,a(e,t))},function(t){n||(n=!0,c(e,t))})}catch(t){if(n)return;n=!0,c(e,t)}}var d=setTimeout,l="function"==typeof e&&e||function(t){d(t,0)},p=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return s(this,new f(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function r(o,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(t){r(o,t)},n)}e[o]=s,0===--i&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._setImmediateFn=function(t){l=t},o._setUnhandledRejectionFn=function(t){p=t},"undefined"!=typeof t&&t.exports?t.exports=o:n.Promise||(n.Promise=o)}(this)}).call(e,n(2).setImmediate)},function(t,e,n){(function(t,r){function i(t,e){this._id=t,this._clearFn=e}var o=n(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=u++,r=!(arguments.length<2)&&a.call(arguments,1);return c[n]=!0,o(function(){c[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete c[t]}}).call(e,n(2).setImmediate,n(2).clearImmediate)},function(t,e){function n(){h&&u&&(h=!1,u.length?f=u.concat(f):d=-1,f.length&&r())}function r(){if(!h){var t=s(n);h=!0;for(var e=f.length;e;){for(u=f,f=[];++d<e;)u&&u[d].run();d=-1,e=f.length}u=null,h=!1,a(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a,c=t.exports={};!function(){try{s=setTimeout}catch(t){s=function(){throw new Error("setTimeout is not defined")}}try{a=clearTimeout}catch(t){a=function(){throw new Error("clearTimeout is not defined")}}}();var u,f=[],h=!1,d=-1;c.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new i(t,e)),1!==f.length||h||s(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=o,c.addListener=o,c.once=o,c.off=o,c.removeListener=o,c.removeAllListeners=o,c.emit=o,c.binding=function(t){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(t,e,n){var r=n(5),i={oldContainer:void 0,newContainer:void 0,newContainerLoading:void 0,extend:function(t){return r.extend(this,t)},init:function(t,e){var n=this;return this.oldContainer=t,this._newContainerPromise=e,this.deferred=r.deferred(),this.newContainerReady=r.deferred(),this.newContainerLoading=this.newContainerReady.promise,this.start(),this._newContainerPromise.then(function(t){n.newContainer=t,n.newContainerReady.resolve()}),this.deferred.promise},done:function(){this.oldContainer.parentNode.removeChild(this.oldContainer),this.newContainer.style.visibility="visible",this.deferred.resolve()},start:function(){}};t.exports=i},function(t,e){var n={getCurrentUrl:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search},cleanLink:function(t){return t.replace(/#.*/,"")},xhrTimeout:5e3,xhr:function(t){var e=this.deferred(),n=new XMLHttpRequest;return n.onreadystatechange=function(){if(4===n.readyState)return 200===n.status?e.resolve(n.responseText):e.reject(new Error("xhr: HTTP code is not 200"))},n.ontimeout=function(){return e.reject(new Error("xhr: Timeout exceeded"))},n.open("GET",t),n.timeout=this.xhrTimeout,n.setRequestHeader("x-barba","yes"),n.send(),e.promise},extend:function(t,e){var n=Object.create(t);for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n},deferred:function(){return new function(){this.resolve=null,this.reject=null,this.promise=new Promise(function(t,e){this.resolve=t,this.reject=e}.bind(this))}},getPort:function(t){var e="undefined"!=typeof t?t:window.location.port,n=window.location.protocol;return""!=e?parseInt(e):"http:"===n?80:"https:"===n?443:void 0}};t.exports=n},function(t,e,n){var r=n(7),i=n(5),o={namespace:null,extend:function(t){return i.extend(this,t)},init:function(){var t=this;r.on("initStateChange",function(e,n){n&&n.namespace===t.namespace&&t.onLeave()}),r.on("newPageReady",function(e,n,r){t.container=r,e.namespace===t.namespace&&t.onEnter()}),r.on("transitionCompleted",function(e,n){e.namespace===t.namespace&&t.onEnterCompleted(),n&&n.namespace===t.namespace&&t.onLeaveCompleted()})},onEnter:function(){},onEnterCompleted:function(){},onLeave:function(){},onLeaveCompleted:function(){}};t.exports=o},function(t,e){var n={events:{},on:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},off:function(t,e){t in this.events!=!1&&this.events[t].splice(this.events[t].indexOf(e),1)},trigger:function(t){if(t in this.events!=!1)for(var e=0;e<this.events[t].length;e++)this.events[t][e].apply(this,Array.prototype.slice.call(arguments,1))}};t.exports=n},function(t,e,n){var r=n(5),i={data:{},extend:function(t){return r.extend(this,t)},set:function(t,e){this.data[t]=e},get:function(t){return this.data[t]},reset:function(){this.data={}}};t.exports=i},function(t,e){var n={history:[],add:function(t,e){e||(e=void 0),this.history.push({url:t,namespace:e})},currentStatus:function(){return this.history[this.history.length-1]},prevStatus:function(){var t=this.history;return t.length<2?null:t[t.length-2]}};t.exports=n},function(t,e,n){var r=n(5),i=n(7),o=n(11),s=n(8),a=n(9),c=n(12),u={Dom:c,History:a,Cache:s,cacheEnabled:!0,transitionProgress:!1,ignoreClassLink:"no-barba",start:function(){this.init()},init:function(){var t=this.Dom.getContainer(),e=this.Dom.getWrapper();e.setAttribute("aria-live","polite"),this.History.add(this.getCurrentUrl(),this.Dom.getNamespace(t)),i.trigger("initStateChange",this.History.currentStatus()),i.trigger("newPageReady",this.History.currentStatus(),{},t,this.Dom.currentHTML),i.trigger("transitionCompleted",this.History.currentStatus()),this.bindEvents()},bindEvents:function(){document.addEventListener("click",this.onLinkClick.bind(this)),window.addEventListener("popstate",this.onStateChange.bind(this))},getCurrentUrl:function(){return r.cleanLink(r.getCurrentUrl())},goTo:function(t){window.history.pushState(null,null,t),this.onStateChange()},forceGoTo:function(t){window.location=t},load:function(t){var e,n=r.deferred(),i=this;return e=this.Cache.get(t),e||(e=r.xhr(t),this.Cache.set(t,e)),e.then(function(t){var e=i.Dom.parseResponse(t);i.Dom.putContainer(e),i.cacheEnabled||i.Cache.reset(),n.resolve(e)},function(){i.forceGoTo(t),n.reject()}),n.promise},getHref:function(t){if(t)return t.getAttribute&&"string"==typeof t.getAttribute("xlink:href")?t.getAttribute("xlink:href"):"string"==typeof t.href?t.href:void 0},onLinkClick:function(t){for(var e=t.target;e&&!this.getHref(e);)e=e.parentNode;if(this.preventCheck(t,e)){t.stopPropagation(),t.preventDefault(),i.trigger("linkClicked",e,t);var n=this.getHref(e);this.goTo(n)}},preventCheck:function(t,e){if(!window.history.pushState)return!1;var n=this.getHref(e);return!(!e||!n)&&(!(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&((!e.target||"_blank"!==e.target)&&(window.location.protocol===e.protocol&&window.location.hostname===e.hostname&&(r.getPort()===r.getPort(e.port)&&(!(n.indexOf("#")>-1)&&((!e.getAttribute||"string"!=typeof e.getAttribute("download"))&&(r.cleanLink(n)!=r.cleanLink(location.href)&&!e.classList.contains(this.ignoreClassLink))))))))},getTransition:function(){return o},onStateChange:function(){var t=this.getCurrentUrl();if(this.transitionProgress&&this.forceGoTo(t),this.History.currentStatus().url===t)return!1;this.History.add(t);var e=this.load(t),n=Object.create(this.getTransition());this.transitionProgress=!0,i.trigger("initStateChange",this.History.currentStatus(),this.History.prevStatus());var r=n.init(this.Dom.getContainer(),e);e.then(this.onNewContainerLoaded.bind(this)),r.then(this.onTransitionEnd.bind(this))},onNewContainerLoaded:function(t){var e=this.History.currentStatus();e.namespace=this.Dom.getNamespace(t),i.trigger("newPageReady",this.History.currentStatus(),this.History.prevStatus(),t,this.Dom.currentHTML)},onTransitionEnd:function(){this.transitionProgress=!1,i.trigger("transitionCompleted",this.History.currentStatus(),this.History.prevStatus())}};t.exports=u},function(t,e,n){var r=n(4),i=r.extend({start:function(){this.newContainerLoading.then(this.finish.bind(this))},finish:function(){document.body.scrollTop=0,this.done()}});t.exports=i},function(t,e){var n={dataNamespace:"namespace",wrapperId:"barba-wrapper",containerClass:"barba-container",currentHTML:document.documentElement.innerHTML,parseResponse:function(t){this.currentHTML=t;var e=document.createElement("div");e.innerHTML=t;var n=e.querySelector("title");return n&&(document.title=n.textContent),this.getContainer(e)},getWrapper:function(){var t=document.getElementById(this.wrapperId);if(!t)throw new Error("Barba.js: wrapper not found!");return t},getContainer:function(t){if(t||(t=document.body),!t)throw new Error("Barba.js: DOM not ready!");var e=this.parseContainer(t);if(e&&e.jquery&&(e=e[0]),!e)throw new Error("Barba.js: no container found");return e},getNamespace:function(t){return t&&t.dataset?t.dataset[this.dataNamespace]:t?t.getAttribute("data-"+this.dataNamespace):null},putContainer:function(t){t.style.visibility="hidden";var e=this.getWrapper();e.appendChild(t)},parseContainer:function(t){return t.querySelector("."+this.containerClass)}};t.exports=n},function(t,e,n){var r=n(5),i=n(10),o={ignoreClassLink:"no-barba-prefetch",init:function(){return!!window.history.pushState&&(document.body.addEventListener("mouseover",this.onLinkEnter.bind(this)),void document.body.addEventListener("touchstart",this.onLinkEnter.bind(this)))},onLinkEnter:function(t){for(var e=t.target;e&&!i.getHref(e);)e=e.parentNode;if(e&&!e.classList.contains(this.ignoreClassLink)){var n=i.getHref(e);if(i.preventCheck(t,e)&&!i.Cache.get(n)){var o=r.xhr(n);i.Cache.set(n,o)}}}};t.exports=o}])});
var _gsScope=(typeof(module)!=="undefined"&&module.exports&&typeof(global)!=="undefined") ? global:this||window;
(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){
"use strict";
_gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease){
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.19.1";
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},
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.duration(Math.abs(t.vars.time - t.target.time()) / t.target._timeScale);
}
if(vars.onStart){
vars.onStart.apply(vars.onStartScope||vars.callbackScope||t, vars.onStartParams||[]);
}};
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);
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 totalDur=(!this._dirty) ? this._totalDuration:this.totalDuration(),
dur=this._duration,
prevTime=this._time,
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(time >=totalDur - 0.0000001&&time >=0){
if(!this._locked){
this._totalTime=totalDur;
this._cycle=this._repeat;
}
if(!this._reversed) if(!this._hasPausedChild()){
isComplete=true;
callback="onComplete";
internalForce = !!this._timeline.autoRemoveChildren;
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;
if(this._yoyo&&(this._cycle & 1)!==0){
this._time=time=0;
}else{
this._time=dur;
time=dur + 0.0001;
}}else if(time < 0.0000001){
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)){
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){
internalForce=true;
}
this._rawPrevTime=time;
}else{
this._rawPrevTime=(dur||!suppressEvents||time||this._rawPrevTime===time) ? time:_tinyNum;
if(time===0&&isComplete){
tween=this._first;
while (tween&&tween._startTime===0){
if(!tween._duration){
isComplete=false;
}
tween=tween._next;
}}
time=0;
if(!this._initted){
internalForce=true;
}}
}else{
if(dur===0&&prevRawPrevTime < 0){
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;
if(this._cycle!==0) if(this._cycle===this._totalTime / cycleDuration&&prevTotalTime <=time){
this._cycle--;
}
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;
}else if(this._time < 0){
this._time=time=0;
}else{
time=this._time;
}}
}
if(this._hasPause&&!this._forcingPlayhead&&!suppressEvents&&time < dur){
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){
this._time=time=pauseTween._startTime;
this._totalTime=time + (this._cycle * (this._totalDuration + this._repeatDelay));
}}
}
if(this._cycle!==prevCycle) if(!this._locked){
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;
this._rawPrevTime=(dur===0) ? prevRawPrevTime - 0.0001:prevRawPrevTime;
this._cycle=prevCycle;
this._locked=true;
prevTime=(backwards) ? 0:dur;
this.render(prevTime, suppressEvents, (dur===0));
if(!suppressEvents) if(!this._gc){
if(this.vars.onRepeat){
this._cycle=recCycle;
this._locked=false;
this._callback("onRepeat");
}}
if(prevTime!==this._time){
return;
}
if(wrap){
this._cycle=prevCycle;
this._locked=true;
prevTime=(backwards) ? dur + 0.0001:-0.0001;
this.render(prevTime, true, false);
}
this._locked=false;
if(this._paused&&!prevPaused){
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){
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;
}
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;
if(curTime!==this._time||(this._paused&&!prevPaused)){
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;
if(curTime!==this._time||(this._paused&&!prevPaused)){
break;
}else if(tween._active||(tween._startTime <=prevTime&&!tween._paused&&!tween._gc)){
if(pauseTween===tween){
pauseTween=tween._prev;
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){
_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(isComplete){
if(_lazyTweens.length){
_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){
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;
return TimelineLite.prototype.invalidate.call(this);
};
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.totalDuration=function(value){
if(!arguments.length){
if(this._dirty){
TimelineLite.prototype.totalDuration.call(this);
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);
_gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite){
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){
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.19.1";
p.constructor=TimelineLite;
p.kill()._gc=p._forcingPlayhead=p._hasPause=false;
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)){
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,
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)){
tl.add(tween, tween._startTime - tween._delay);
}
tween=next;
}
root.add(tl, 0);
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(this._gc||this._time===this._duration) if(!this._paused) if(this._duration < this.duration()){
tl=this;
beforeRawTime=(tl.rawTime() > value._startTime);
while (tl._timeline){
if(beforeRawTime&&tl._timeline.smoothChildTiming){
tl.totalTime(tl._totalTime, true);
}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;
value._startTime=(value._paused ? value._pauseTime:tl._time) - ((!value._reversed ? value._totalTime:value.totalDuration() - value._totalTime) / value._timeScale);
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 i;
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]);
}}
}
if(typeof(offsetOrLabel)==="string"){
return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent&&typeof(timeOrLabel)==="number"&&this._labels[offsetOrLabel]==null) ? timeOrLabel - this.duration():0, appendIfAbsent);
}
offsetOrLabel=offsetOrLabel||0;
if(typeof(timeOrLabel)==="string"&&(isNaN(timeOrLabel)||this._labels[timeOrLabel]!=null)){
i=timeOrLabel.indexOf("=");
if(i===-1){
if(this._labels[timeOrLabel]==null){
return appendIfAbsent ? (this._labels[timeOrLabel]=this.duration() + 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):this.duration();
}else if(timeOrLabel==null){
timeOrLabel=this.duration();
}
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 totalDur=(!this._dirty) ? this._totalDuration:this.totalDuration(),
prevTime=this._time,
prevStart=this._startTime,
prevTimeScale=this._timeScale,
prevPaused=this._paused,
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
if(time >=totalDur - 0.0000001&&time >=0){
this._totalTime=this._time=totalDur;
if(!this._reversed) if(!this._hasPausedChild()){
isComplete=true;
callback="onComplete";
internalForce = !!this._timeline.autoRemoveChildren;
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;
time=totalDur + 0.0001;
}else if(time < 0.0000001){
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){
internalForce=isComplete=true;
callback="onReverseComplete";
}else if(this._rawPrevTime >=0&&this._first){
internalForce=true;
}
this._rawPrevTime=time;
}else{
this._rawPrevTime=(this._duration||!suppressEvents||time||this._rawPrevTime===time) ? time:_tinyNum;
if(time===0&&isComplete){
tween=this._first;
while (tween&&tween._startTime===0){
if(!tween._duration){
isComplete=false;
}
tween=tween._next;
}}
time=0;
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;
}
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;
if(curTime!==this._time||(this._paused&&!prevPaused)){
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;
if(curTime!==this._time||(this._paused&&!prevPaused)){
break;
}else if(tween._active||(tween._startTime <=prevTime&&!tween._paused&&!tween._gc)){
if(pauseTween===tween){
pauseTween=tween._prev;
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){
_lazyRender();
}
this._callback("onUpdate");
}
if(callback) if(!this._gc) if(prevStart===this._startTime||prevTimeScale!==this._timeScale) if(this._time===0||totalDur >=this.totalDuration()){
if(isComplete){
if(_lazyTweens.length){
_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){
}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);
}
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();
}
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;
if(tween._dirty){
tween.totalDuration();
}
if(tween._startTime > prevStart&&this._sortChildren&&!tween._paused){
this.add(tween, tween._startTime - tween._delay);
}else{
prevStart=tween._startTime;
}
if(tween._startTime < 0&&!tween._paused){
max -=tween._startTime;
if(this._timeline.smoothChildTiming){
this._startTime +=tween._startTime / this._timeScale;
}
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){
var tween=this._first,
time=this._time;
while (tween){
if(tween._startTime===time&&tween.data==="isPause"){
tween._rawPrevTime=0;
}
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);
});if(_gsScope._gsDefine){ _gsScope._gsQueue.pop()(); }
(function(name){
"use strict";
var getGlobal=function(){
return (_gsScope.GreenSockGlobals||_gsScope)[name];
};
if(typeof(define)==="function"&&define.amd){
define(["TweenLite"], getGlobal);
}else if(typeof(module)!=="undefined"&&module.exports){
require("./TweenLite.js");
module.exports=getGlobal();
}}("TimelineMax"));