//>>built
define("dojox/image/Badge","dojo dijit dojox/main dijit/_Widget dijit/_TemplatedMixin dojo/fx/easing".split(" "),function(c,q,m,n,p){c.experimental("dojox.image.Badge");c.getObject("image",!0,m);return c.declare("dojox.image.Badge",[n,p],{baseClass:"dojoxBadge",templateString:'\x3cdiv class\x3d"dojoxBadge" dojoAttachPoint\x3d"containerNode"\x3e\x3c/div\x3e',children:"div.dojoxBadgeImage",rows:4,cols:5,cellSize:50,cellMargin:1,delay:2E3,threads:1,easing:"dojo.fx.easing.backOut",startup:function(){this._started||
(c.isString(this.easing)&&(this.easing=c.getObject(this.easing)),this.inherited(arguments),this._init())},_init:function(){var a=0,b=this.cellSize;c.style(this.domNode,{width:b*this.cols+"px",height:b*this.rows+"px"});this._nl=c.query(this.children,this.containerNode).forEach(function(e,g){var f=g%this.cols,h=2*this.cellMargin;c.style(e,{top:a*b+"px",left:f*b+"px",width:b-h+"px",height:b-h+"px"});f==this.cols-1&&a++;c.addClass(e,this.baseClass+"Image")},this);for(var d=this._nl.length;this.threads--;)setTimeout(c.hitch(this,
"_enbiggen",{target:this._nl[Math.floor(Math.random()*d)]}),this.delay*this.threads)},_getCell:function(a){a=this._nl.indexOf(a);if(0<=a)return{x:a%this.cols,y:Math.floor(a/this.cols),n:this._nl[a],io:a}},_getImage:function(){return"url('')"},_enbiggen:function(a){if(a=this._getCell(a.target||a)){var b=this.cellMargin,d=2*this.cellSize-2*b;d={height:d,width:d};if(a.x==this.cols-1||0<a.x&&Math.round(Math.random()))d.left=this.cellSize*(a.x-b);if(a.y==this.rows-1||0<a.y&&Math.round(Math.random()))d.top=
this.cellSize*(a.y-b);b=this.baseClass;c.addClass(a.n,b+"Top");c.addClass(a.n,b+"Seen");c.animateProperty({node:a.n,properties:d,onEnd:c.hitch(this,"_loadUnder",a,d),easing:this.easing}).play()}},_loadUnder:function(a,b){var d=a.io,e=0<=b.left,g=0<=b.top,f=this.cols,h=d+(e?-1:1);d+=g?-f:f;var l=this.baseClass;c.forEach([h,d,g?e?h-f:d+1:e?d-1:h+f],function(k){(k=this._nl[k])&&c.hasClass(k,l+"Seen")&&c.removeClass(k,l+"Seen")},this);setTimeout(c.hitch(this,"_disenbiggen",a,b),1.25*this.delay)},_disenbiggen:function(a,
b){0<=b.top&&(b.top+=this.cellSize);0<=b.left&&(b.left+=this.cellSize);var d=this.cellSize-2*this.cellMargin;c.animateProperty({node:a.n,properties:c.mixin(b,{width:d,height:d}),onEnd:c.hitch(this,"_cycle",a,b)}).play(5)},_cycle:function(a,b){var d=this.baseClass;c.removeClass(a.n,d+"Top");var e=this._nl.filter(function(g){return!c.hasClass(g,d+"Seen")});setTimeout(c.hitch(this,"_enbiggen",{target:e[Math.floor(Math.random()*e.length)]}),this.delay/2)}})});