(function(){vare,t,n,r,i=[].slice,s=function(e,t){returnfunction(){returne.apply(t,arguments)}},o={}.hasOwnProperty,u=function(e,t){functionr(){this.constructor=e}for(varnint)o.call(t,n)&&(e[n]=t[n]);returnr.prototype=t.prototype,e.prototype=newr,e.__super__=t.prototype,e};t=window.Morris={},e=jQuery,t.EventEmitter=function(){functione(){}returne.prototype.on=function(e,t){returnthis.handlers==null&&(this.handlers={}),this.handlers[e]==null&&(this.handlers[e]=[]),this.handlers[e].push(t)},e.prototype.fire=function(){vare,t,n,r,s,o,u;n=arguments[0],e=2<=arguments.length?i.call(arguments,1):[];if(this.handlers!=null&&this.handlers[n]!=null){o=this.handlers[n],u=[];for(r=0,s=o.length;r<s;r++)t=o[r],u.push(t.apply(null,e));returnu}},e}(),t.commas=function(e){vart,n,r,i;returne===null?"n/a":(r=e<0?"-":"",t=Math.abs(e),n=Math.floor(t).toFixed(0),r+=n.replace(/(?=(?:\d{3})+$)(?!^)/g,","),i=t.toString(),i.length>n.length&&(r+=i.slice(n.length)),r)},t.pad2=function(e){return(e<10?"0":"")+e},t.Donut=function(){functionn(n){this.select=s(this.select,this);if(!(thisinstanceoft.Donut))returnnewt.Donut(n);typeofn.element=="string"?this.el=e(document.getElementById(n.element)):this.el=e(n.element),this.options=e.extend({},this.defaults,n);if(this.el===null||this.el.length===0)thrownewError("Graph placeholder not found.");if(n.data===void0||n.data.length===0)return;this.data=n.data,this.el.addClass("graph-initialised"),this.redraw()}returnn.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],formatter:t.commas},n.prototype.redraw=function(){vare,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x;this.el.empty(),this.r=newRaphael(this.el[0]),n=this.el.width()/2,r=this.el.height()/2,h=(Math.min(n,r)-10)/3,c=0,w=this.data;for(d=0,g=w.length;d<g;d++)p=w[d],c+=p.value;a=5/(2*h),e=1.9999*Math.PI-a*this.data.length,o=0,s=0,this.segments=[],E=this.data;for(v=0,y=E.length;v<y;v++)i=E[v],f=o+a+e*(i.value/c),l=newt.DonutSegment(n,r,h*2,h,o,f,this.options.colors[s%this.options.colors.length],i),l.render(this.r),this.segments.push(l),l.on("hover",this.select),o=f,s+=1;this.text1=this.r.text(n,r-10,"").attr({"font-size":15,"font-weight":800}),this.text2=this.r.text(n,r+10,"").attr({"font-size":14}),u=Math.max.apply(null,function(){vare,t,n,r;n=this.data,r=[];for(e=0,t=n.length;e<t;e++)i=n[e],r.push(i.value);returnr}.call(this)),s=0,S=this.data,x=[];for(m=0,b=S.length;m<b;m++){i=S[m];if(i.value===u){this.select(s);break}x.push(s+=1)}returnx},n.prototype.select=function(e){vart,n,r,i,s;s=this.segments;for(r=0,i=s.length;r<i;r++)t=s[r],t.deselect();returntypeofe=="number"?n=this.segments[e]:n=e,n.select(),this.setLabels(n.data.label,this.options.formatter(n.data.value))},n.prototype.setLabels=function(e,t){varn,r,i,s,o,u,a,f;returnn=(Math.min(this.el.width()/2,this.el.height()/2)-10)*2/3,s=1.8*n,i=n/2,r=n/3,this.text1.attr({text:e,transform:""}),o=this.text1.getBBox(),u=Math.min(s/o.width,i/o.height),this.text1.attr({transform:"S"+u+","+u+","+(o.x+o.width/2)+","+(o.y+o.height)}),this.text2.attr({text:t,transform:""}),a=this.text2.getBBox(),f=Math.min(s/a.width,r/a.height),this.text2.attr({transform:"S"+f+","+f+","+(a.x+a.width/2)+","+a.y})},n}(),t.DonutSegment=function(e){functiont(e,t,n,r,i,o,u,a){this.cx=e,this.cy=t,this.inner=n,this.outer=r,this.color=u,this.data=a,this.deselect=s(this.deselect,this),this.select=s(this.select,this),this.sin_p0=Math.sin(i),this.cos_p0=Math.cos(i),this.sin_p1=Math.sin(o),this.cos_p1=Math.cos(o),this.long=o-i>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}returnu(t,e),t.prototype.calcArcPoints=function(e){return[this.cx+e*this.sin_p0,this.cy+e*this.cos_p0,this.cx+e*this.sin_p1,this.cy+e*this.cos_p1]},t.prototype.calcSegment=function(e,t){varn,r,i,s,o,u,a,f,l,c;returnl=this.calcArcPoints(e),n=l[0],i=l[1],r=l[2],s=l[3],c=this.calcArcPoints(t),o=c[0],a=c[1],u=c[2],f=c[3],"M"+n