//>>built
define("dojox/fx/Timeline","dojo/_base/lang,dojo/fx/easing,dojo/_base/fx,dojo/dom,./_base,dojo/_base/connect,dojo/_base/html,dojo/_base/array,dojo/_base/Color".split(","),function(o,j,p,q,l,n,r,s,m){l.animateTimeline=function(e,f){var c=new k(e.keys),d=p.animateProperty({node:q.byId(f||e.node),duration:e.duration||1E3,properties:c._properties,easing:j.linear,onAnimate:function(){}});n.connect(d,"onEnd",function(c){var b=d.curve.getValue(d.reversed?0:1);r.style(c,b)});n.connect(d,"beforeBegin",function(){d.curve&&
delete d.curve;d.curve=c;c.ani=d});return d};var k=function(e){this.keys=o.isArray(e)?this.flatten(e):e};k.prototype.flatten=function(e){var f={},c={};s.forEach(e,function(d,h){var b;b=d.step;b="from"==b?0:"to"==b?1:void 0===b?0==h?0:h/(e.length-1):0.01*parseInt(b,10);var g=j[d.ease]||j.linear,a;for(a in d)if(!("step"==a||"ease"==a||"from"==a||"to"==a)){if(!c[a])c[a]={steps:[],values:[],eases:[],ease:g},f[a]={},f[a].units=/#/.test(d[a])?c[a].units="isColor":c[a].units=/\D{1,}/.exec(d[a]).join("");
c[a].eases.push(j[d.ease||"linear"]);c[a].steps.push(b);"isColor"==f[a].units?c[a].values.push(new m(d[a])):c[a].values.push(parseInt(/\d{1,}/.exec(d[a]).join("")));void 0===f[a].start?f[a].start=c[a].values[c[a].values.length-1]:f[a].end=c[a].values[c[a].values.length-1]}});this._properties=f;return c};k.prototype.getValue=function(e){var e=this.ani._reversed?1-e:e,f={},c=this,d=function(a,b){return"isColor"!=c._properties[a].units?c.keys[a].values[b]+c._properties[a].units:c.keys[a].values[b].toCss()},
h;for(h in this.keys)for(var b=this.keys[h],g=0;g<b.steps.length;g++){var a=b.steps[g],j=b.steps[g+1],i=g<b.steps.length?!0:!1,k=b.eases[g]||function(a){return a};if(e==a){if(f[h]=d(h,g),!i||i&&this.ani._reversed)break}else if(e>a)if(i&&e<b.steps[g+1]){i=b.values[g+1];b=b.values[g];a=1/(j-a)*(e-a);a=k(a);f[h]=b instanceof m?m.blendColors(b,i,a).toCss(!1):b+a*(i-b)+this._properties[h].units;break}else f[h]=d(h,g);else if(i&&!this.ani._reversed||!i&&this.ani._reversed)f[h]=d(h,g)}return f};l._Timeline=
k;return l});