/** * jquery-circle-progress - jquery plugin to draw animated circular progress bars: * {@link http://kottenator.github.io/jquery-circle-progress/} * * @author rostyslav bryzgunov * @version 1.2.2 * @licence mit * @preserve */ !function(i){if("function"==typeof define&&define.amd)define(["jquery"],i);else if("object"==typeof module&&module.exports){var t=require("jquery");i(t),module.exports=t}else i(jquery)}(function(i){function t(i){this.init(i)}t.prototype={value:0,size:100,startangle:-math.pi,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyfill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleprogresseasing"},animationstartvalue:0,reverse:!1,linecap:"butt",insertmode:"prepend",constructor:t,el:null,canvas:null,ctx:null,radius:0,arcfill:null,lastframevalue:0,init:function(t){i.extend(this,t),this.radius=this.size/2,this.initwidget(),this.initfill(),this.draw(),this.el.trigger("circle-inited")},initwidget:function(){this.canvas||(this.canvas=i("")["prepend"==this.insertmode?"prependto":"appendto"](this.el)[0]);var t=this.canvas;if(t.width=this.size,t.height=this.size,this.ctx=t.getcontext("2d"),window.devicepixelratio>1){var e=window.devicepixelratio;t.style.width=t.style.height=this.size+"px",t.width=t.height=this.size*e,this.ctx.scale(e,e)}},initfill:function(){function t(){var t=i("")[0];t.width=e.size,t.height=e.size,t.getcontext("2d").drawimage(g,0,0,r,r),e.arcfill=e.ctx.createpattern(t,"no-repeat"),e.drawframe(e.lastframevalue)}var e=this,a=this.fill,n=this.ctx,r=this.size;if(!a)throw error("the fill is not specified!");if("string"==typeof a&&(a={color:a}),a.color&&(this.arcfill=a.color),a.gradient){var s=a.gradient;if(1==s.length)this.arcfill=s[0];else if(s.length>1){for(var l=a.gradientangle||0,o=a.gradientdirection||[r/2*(1-math.cos(l)),r/2*(1+math.sin(l)),r/2*(1+math.cos(l)),r/2*(1-math.sin(l))],h=n.createlineargradient.apply(n,o),c=0;c