diff --git a/ChangeLog.txt b/ChangeLog.txt index 4c6df3e..4b1da3a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,12 @@ Main Changes +v0.9.11 +> Radial + * Fixed misalignment of threshold indicator +> RadialVertical + * Fixed min/max indicators not displaying in correct place in orientation:North, and + not displaying at all in orientation:West + v0.9.10 > General Changes * Added pointer TYPE16 - the same as Gerrits stopwatch pointer, diff --git a/steelseries-min.js b/steelseries-min.js index 4d24525..28c73ba 100644 --- a/steelseries-min.js +++ b/steelseries-min.js @@ -1,7 +1,7 @@ /*! * Name : steelseries.js * Author : Gerrit Grunwald, Mark Crossley - * Last modified : 11.01.2012 - * Revision : 0.9.10 + * Last modified : 13.01.2012 + * Revision : 0.9.11 */ -var steelseries=function(){var H=document;var ac=function(cO,bG){bG=bG||{};var b0=(undefined===bG.gaugeType?steelseries.GaugeType.TYPE4:bG.gaugeType);var bT=(undefined===bG.size?200:bG.size);var cm=(undefined===bG.minValue?0:bG.minValue);var cj=(undefined===bG.maxValue?(cm+100):bG.maxValue);var b8=(undefined===bG.niceScale?true:bG.niceScale);var cy=(undefined===bG.threshold?(cj-cm)/2:bG.threshold);var cu=(undefined===bG.section?null:bG.section);var a8=(undefined===bG.area?null:bG.area);var b1=(undefined===bG.titleString?"":bG.titleString);var bd=(undefined===bG.unitString?"":bG.unitString);var cJ=(undefined===bG.frameDesign?steelseries.FrameDesign.METAL:bG.frameDesign);var cF=(undefined===bG.frameVisible?true:bG.frameVisible);var bE=(undefined===bG.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bG.backgroundColor);var co=(undefined===bG.pointerType?steelseries.PointerType.TYPE1:bG.pointerType);var cB=(undefined===bG.pointerColor?steelseries.ColorDef.RED:bG.pointerColor);var cH=(undefined===bG.knobType?steelseries.KnobType.STANDARD_KNOB:bG.knobType);var b5=(undefined===bG.knobStyle?steelseries.KnobStyle.SILVER:bG.knobStyle);var cl=(undefined===bG.lcdColor?steelseries.LcdColor.STANDARD:bG.lcdColor);var br=(undefined===bG.lcdVisible?true:bG.lcdVisible);var cK=(undefined===bG.lcdDecimals?2:bG.lcdDecimals);var bC=(undefined===bG.digitalFont?false:bG.digitalFont);var cw=(undefined===bG.fractionalScaleDecimals?1:bG.fractionalScaleDecimals);var bI=(undefined===bG.ledColor?steelseries.LedColor.RED_LED:bG.ledColor);var bc=(undefined===bG.ledVisible?true:bG.ledVisible);var cN=(undefined===bG.thresholdVisible?true:bG.thresholdVisible);var bS=(undefined===bG.minMeasuredValueVisible?false:bG.minMeasuredValueVisible);var bN=(undefined===bG.maxMeasuredValueVisible?false:bG.maxMeasuredValueVisible);var cE=(undefined===bG.foregroundType?steelseries.ForegroundType.TYPE1:bG.foregroundType);var bH=(undefined===bG.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bG.labelNumberFormat);var cG=(undefined===bG.playAlarm?false:bG.playAlarm);var ba=(undefined===bG.alarmSound?false:bG.alarmSound);var cb=(undefined===bG.customLayer?null:bG.customLayer);var b7=(undefined===bG.tickLabelOrientation?(b0===steelseries.GaugeType.TYPE1?steelseries.TickLabelOrientation.TANGENT:steelseries.TickLabelOrientation.NORMAL):bG.tickLabelOrientation);var bY=(undefined===bG.trendVisible?false:bG.trendVisible);if(cG&&ba!==false){var a3=H.createElement("audio");a3.setAttribute("src",ba);a3.setAttribute("preload","auto")}var bU=cm;var cv=this;var bu=cj;var bR=cm;var bA=false;var ci=0;var bi;var cz=steelseries.TrendState.OFF;var bQ=bT*0.06;var bK=bT*0.29;var bJ=bT*0.36;var cA;var ck;var bB;var cr;var cx;var bL=ck+(bU-cm)*cx;var bn=H.getElementById(cO).getContext("2d");bn.save();bn.clearRect(0,0,bn.canvas.width,bn.canvas.height);bn.canvas.width=bT;bn.canvas.height=bT;var be=bT;var cI=bT;var bx=be/2;var bv=cI/2;var bb=0.6*be;var a9=0.4*cI;var b9=Math.floor(be/10)+"px sans-serif";var bF=Math.floor(be/10)+"px LCDMono2Ultra";var b4=Math.PI/2;var bk=Math.PI/180;var a6=false;var bm=cm;var bD=cj;var bf=cj-cm;var bP=bD-bm;var b3=0;var bj=0;var bX=10;var cD=10;var bp=function bp(){if(b8){bf=l(cj-cm,false);bj=l(bf/(cD-1),true);bm=Math.floor(cm/bj)*bj;bD=Math.ceil(cj/bj)*bj;b3=l(bj/(bX-1),true);cm=bm;cj=bD;bP=cj-cm}else{bf=(cj-cm);bm=cm;bD=cj;bP=bf;bj=l(bf/(cD-1),true);b3=l(bj/(bX-1),true)}switch(b0.type){case"type1":cA=0;ck=Math.PI;bB=b4;cr=b4;cx=cr/bP;break;case"type2":cA=0;ck=Math.PI;bB=b4;cr=Math.PI;cx=cr/bP;break;case"type3":cA=0;ck=b4;bB=0;cr=1.5*Math.PI;cx=cr/bP;break;case"type4":default:cA=60*bk;ck=b4+(cA/2);bB=0;cr=2*Math.PI-cA;cx=cr/bP;break}bL=ck+(bU-cm)*cx};var ce=O(bT,bT);var bM=ce.getContext("2d");var bV=O(bT,bT);var bZ=bV.getContext("2d");var cp;var bo=O(bT*0.093457,bT*0.093457);var bO=bo.getContext("2d");var bz=O(bT*0.093457,bT*0.093457);var a5=bz.getContext("2d");var cd=bz;var bs=O(Math.ceil(bT*0.028037),Math.ceil(bT*0.028037));var cC=bs.getContext("2d");var bW=O(Math.ceil(bT*0.028037),Math.ceil(bT*0.028037));var a7=bW.getContext("2d");var b2=O(bT,bT);var cM=b2.getContext("2d");var by=O(bT,bT);var b6=by.getContext("2d");var bl=O(bT,bT);var bt=bl.getContext("2d");var cs=O(bT,bT);var bg=cs.getContext("2d");var ca,cn,bq,bw;var ct=function(cP){bn.save();bn.textAlign="right";bn.textBaseline="middle";bn.strokeStyle=cl.textColor;bn.fillStyle=cl.textColor;if(cl===steelseries.LcdColor.STANDARD||cl===steelseries.LcdColor.STANDARD_GREEN){bn.shadowColor="gray";bn.shadowOffsetX=be*0.007;bn.shadowOffsetY=be*0.007;bn.shadowBlur=be*0.009}if(bC){bn.font=bF}else{bn.font=b9}bn.fillText(cP.toFixed(cK),(be+(be*0.4))/2-3,be*0.6345,be*0.42);bn.restore()};var cf=function(cP){cP.save();if("type1"===b0.type){cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.523364,cI*0.130841)}if("type1"===b0.type||"type2"===b0.type){cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.130841,cI*0.514018)}if("type2"===b0.type||"type3"===b0.type){cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.831775,cI*0.514018)}if("type3"===b0.type){cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.523364,cI*0.831775)}if("type4"===b0.type){cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.336448,cI*0.803738);cP.drawImage(K(Math.ceil(cI*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),be*0.626168,cI*0.803738)}cP.restore()};var cL=function(){var cR=H.createElement("canvas");cR.width=Math.ceil(bT*0.046728);cR.height=Math.ceil(cR.width*0.9);var cQ=cR.getContext("2d");cQ.save();var cP=cQ.createLinearGradient(0,0.1,0,cR.height*0.9);cP.addColorStop(0,"#520000");cP.addColorStop(0.3,"#fc1d00");cP.addColorStop(0.59,"#fc1d00");cP.addColorStop(1,"#520000");cQ.fillStyle=cP;cQ.beginPath();cQ.moveTo(cR.width*0.5,0.1);cQ.lineTo(cR.width*0.9,cR.height*0.9);cQ.lineTo(cR.width*0.1,cR.height*0.9);cQ.lineTo(cR.width*0.5,0.1);cQ.closePath();cQ.fill();cQ.strokeStyle="#FFFFFF";cQ.stroke();cQ.restore();return cR};var a4=function(cP,cV,cS,cQ,cT){cP.save();cP.strokeStyle=cQ;cP.fillStyle=cQ;cP.lineWidth=be*0.035;var cR=(cr/bP*cV-cr/bP*cm);var cU=cR+(cS-cV)/(bP/cr);cP.translate(bx,bv);cP.rotate(ck);cP.beginPath();if(cT){cP.moveTo(0,0);cP.arc(0,0,be*0.365-cP.lineWidth/2,cR,cU,false)}else{cP.arc(0,0,be*0.365,cR,cU,false)}cP.moveTo(0,0);cP.closePath();if(cT){cP.fill()}else{cP.stroke()}cP.translate(-bx,-bv);cP.restore()};var cc=function(c4,cX){bE.labelColor.setAlpha(1);c4.save();c4.textAlign="center";c4.textBaseline="middle";var c5=Math.ceil(be*0.04);c4.font=c5+"px sans-serif";c4.strokeStyle=bE.labelColor.getRgbaColor();c4.fillStyle=bE.labelColor.getRgbaColor();c4.translate(bx,bv);c4.rotate(ck);var cU=ck;var cY=cx*b3;var c0;var cW=cm;var c3=bX-1;var cT=be*0.38;var cR=be*0.35;var cZ=be*0.355;var cQ=be*0.36;var c1=be*0.3;var cP=be*0.1;if(b0.type==="type1"||b0.type==="type2"){cP=be*0.035}var cS=bX/2;var c2=parseFloat(cj.toFixed(2));for(var cV=cm;parseFloat(cV.toFixed(2))<=c2;cV+=b3){c0=cY+b4;c3++;if(c3===bX){c4.lineWidth=1.5;c4.beginPath();c4.moveTo(cT,0);c4.lineTo(cR,0);c4.closePath();c4.stroke();c4.save();c4.translate(c1,0);switch(b7.type){case"horizontal":c0=-cU;break;case"tangent":c0=(cU<=b4+Math.PI?Math.PI:0);break;case"normal":default:c0=b4;break}c4.rotate(c0);switch(cX.format){case"fractional":c4.fillText((cW.toFixed(cw)),0,0,cP);break;case"scientific":c4.fillText((cW.toPrecision(2)),0,0,cP);break;case"standard":default:c4.fillText((cW.toFixed(0)),0,0,cP);break}c4.translate(-c1,0);c4.restore();cW+=bj;c3=0;c4.rotate(cY);cU+=cY;continue}if(0===bX%2&&c3===(cS)){c4.lineWidth=1;c4.beginPath();c4.moveTo(cT,0);c4.lineTo(cZ,0);c4.closePath();c4.stroke()}else{c4.lineWidth=0.5;c4.beginPath();c4.moveTo(cT,0);c4.lineTo(cQ,0);c4.closePath();c4.stroke()}c4.rotate(cY);cU+=cY}c4.translate(-bx,-bv);c4.restore()};var ch=function(cX){cX=cX||{};var cY=(undefined===cX.frame?false:cX.frame);var cQ=(undefined===cX.background?false:cX.background);var cU=(undefined===cX.led?false:cX.led);var cP=(undefined===cX.pointer?false:cX.pointer);var cW=(undefined===cX.foreground?false:cX.foreground);var cS=(undefined===cX.trend?false:cX.trend);a6=true;bp();if(cY&&cF){g(bM,cJ,bx,bv,be,cI)}if(cQ){a0(bZ,bE,bx,bv,be,cI)}if(cQ){W(bZ,cb,bx,bv,be,cI)}if(cU){bO.drawImage(aj(Math.ceil(bT*0.093457),1,bI),0,0);a5.drawImage(aj(Math.ceil(bT*0.093457),0,bI),0,0)}if(bS){cC.drawImage(C(Math.ceil(bT*0.028037),steelseries.ColorDef.BLUE.dark.getRgbaColor(),true,true),0,0)}if(bN){a7.drawImage(C(Math.ceil(bT*0.028037),steelseries.ColorDef.RED.medium.getRgbaColor(),true),0,0)}if(cQ){cf(bZ);if(null!==cu&&0cj?cj:cQ);if(bU!==cP){bU=cP;if(bU>bR){bR=bU}if(bU=cy&&!bA){bA=true;cg(bA);if(cG){a3.play()}}else{if(bUcj?cj:cR));if(bU!==cP){if(undefined!==bi){if(bi.playing){bi.stop()}}bi=new Tween({},"",Tween.regularEaseInOut,bU,cP,1);var cQ=this;bi.onMotionChanged=function(cS){bU=cS.target._pos;if(bU>=cy&&!bA){bA=true;cg(bA)}else{if(bUbR){bR=bU}if(bUcj?cj:cQ);bR=cP;this.repaint()};this.setMinMeasuredValue=function(cQ){var cP=cQcj?cj:cQ);bu=cP;this.repaint()};this.setTitleString=function(cP){b1=cP;ch({background:true})};this.setUnitString=function(cP){bd=cP;ch({background:true})};this.setMinValue=function(cP){cm=cP;ch({frame:true,background:true})};this.getMinValue=function(){return cm};this.setMaxValue=function(cP){cj=cP;ch({frame:true,background:true})};this.getMaxValue=function(){return cj};this.setThreshold=function(cQ){var cP=cQcj?cj:cQ);cy=cP;ch({background:true});this.repaint()};this.setArea=function(cP){a8=cP;bh({foreground:true});ch({background:true,foreground:true});this.repaint()};this.setSection=function(cP){cu=cP;bh({foreground:true});ch({background:true,foreground:true});this.repaint()};this.setThresholdVisible=function(cP){cN=cP;this.repaint()};this.setLcdDecimals=function(cP){cK=cP;this.repaint()};this.setFrameDesign=function(cP){bh({frame:true});cJ=cP;ch({frame:true});this.repaint()};this.setBackgroundColor=function(cP){bh({background:true,pointer:true});bE=cP;ch({background:true,pointer:true});this.repaint()};this.setForegroundType=function(cP){bh({foreground:true});cE=cP;ch({foreground:true});this.repaint()};this.setPointerType=function(cP){bh({pointer:true,foreground:true});co=cP;ch({pointer:true,foreground:true});this.repaint()};this.setPointerColor=function(cP){bh({pointer:true});cB=cP;ch({pointer:true});this.repaint()};this.setLedColor=function(cP){bh({led:true});bI=cP;ch({led:true});this.repaint()};this.setLcdColor=function(cP){cl=cP;ch({background:true});this.repaint()};this.setTrend=function(cP){cz=cP;this.repaint()};this.setTrendVisible=function(cP){bY=cP;this.repaint()};this.repaint=function(){if(!a6){ch({frame:true,background:true,led:true,pointer:true,trend:true,foreground:true})}bn.clearRect(0,0,bn.canvas.width,bn.canvas.height);bn.drawImage(ce,0,0);bn.drawImage(bV,0,0);if(br){ct(bU)}if(bc){if(bUb8?b8:cy));if(bN!==cx){bN=cx;if(bN>=cn&&!bw){bw=true;b5(bw);if(cs){a6.play()}}else{if(bNb8?b8:cz));if(bN!==cx){if(undefined!==bk){if(bk.playing){bk.stop()}}bk=new Tween({},"",Tween.regularEaseInOut,bN,cx,1);var cy=this;bk.onMotionChanged=function(cA){bN=cA.target._pos;if(bN>=cn&&!bw){bw=true;b5(bw)}else{if(bN=bK[cy].start&&cDb7?b7:cy));if(bM!==cx){bM=cx;if(bM>bJ){bJ=bM}if(bM=ci&&!bx){bx=true;b3(bx);if(cp){a3.play()}}else{if(bMb7?b7:cz));if(bM!==cx){if(undefined!==bi){if(bi.playing){bi.stop()}}bi=new Tween({},"",Tween.regularEaseInOut,bM,cx,1);var cy=this;bi.onMotionChanged=function(cA){bM=cA.target._pos;if(bM>=ci&&!bx){bx=true;b3(bx)}else{if(bMbJ){bJ=bM}if(bMbW?bW:cj));if(bG!==ci){bG=ci;if(bG>bE){bE=bG}if(bG=b5&&!bs){bs=true;bT(bs);if(ca){a3.play()}}else{if(bGbW?bW:ck));if(bG!==ci){if(undefined!==bg){if(bg.playing){bg.stop()}}bg=new Tween({},"",Tween.regularEaseInOut,bG,ci,1);var cj=this;bg.onMotionChanged=function(cl){bG=cl.target._pos;if(bG>=b5&&!bs){bs=true;bT(bs)}else{if(bGbE){bE=bG}if(bGbW?bW:cj));bE=ci;this.repaint()};this.setMinMeasuredValue=function(cj){var ci=(cjbW?bW:cj));bp=ci;this.repaint()};this.setTitleString=function(ci){bL=ci;bU({background:true});this.repaint()};this.setUnitString=function(ci){bb=ci;bU({background:true});this.repaint()};this.setMinValue=function(ci){bZ=ci;bU({background:true,foreground:true,pointer:true});this.repaint()};this.getMinValue=function(){return bZ};this.setMaxValue=function(ci){bW=ci;bU({background:true,foreground:true,pointer:true});this.repaint()};this.getMaxValue=function(){return bW};this.setThreshold=function(ci){var cj=(cibW?bW:ci));b5=cj;bU({background:true});this.repaint()};this.repaint=function(){if(!a5){bU({frame:true,background:true,led:true,foreground:true})}var ci;bj.clearRect(0,0,bj.canvas.width,bj.canvas.height);bj.drawImage(bS,0,0);bj.drawImage(bH,0,0);if(bm){b3(bG,bq)}if(ba){if(bG=a8[c3].start&&cX=a8[c3].start&&cYb6?b6:cw));if(bO!==cv){bO=cv;if(bO>bM){bM=bO}if(bO=ch&&!by){by=true;b2(by);if(cm){a4.play()}}else{if(bOb6?b6:cx));if(bO!==cv){if(undefined!==bl){if(bl.playing){bl.stop()}}bl=new Tween({},"",Tween.regularEaseInOut,bO,cv,1);var cw=this;bl.onMotionChanged=function(cy){bO=cy.target._pos;if(bO>=ch&&!by){by=true;b2(by)}else{if(bObM){bM=bO}if(bOb6?b6:cw));if(bM!==cv){bM=cv;this.repaint()}};this.setMinMeasuredValue=function(cw){var cv=(cwb6?b6:cw));if(bv!==cv){bv=cv;this.repaint()}};this.setTitleString=function(cv){bT=cv;b3({background:true});this.repaint()};this.setUnitString=function(cv){bf=cv;b3({background:true});this.repaint()};this.setMinValue=function(cv){b9=cv;b3({background:true,foreground:true,pointer:true});this.repaint()};this.getMinValue=function(){return b9};this.setMaxValue=function(cv){if(b6!==cv){b6=cv;b3({background:true,foreground:true,pointer:true});this.repaint()}};this.getMaxValue=function(){return b6};this.setThreshold=function(cw){var cv=(cwb6?b6:cw));if(ch!==cv){ch=cv;b3({background:true});this.repaint()}};this.repaint=function(){if(!a6){b3({frame:true,background:true,led:true,pointer:true,foreground:true,bargraphled:true})}bp.clearRect(0,0,bp.canvas.width,bp.canvas.height);bp.drawImage(b1,0,0);bp.drawImage(bP,0,0);if(bs){cd(bO,bw)}if(be){if(bObj-4){if(!bm){bu=bj-a4-bj*0.2;bm=true;clearTimeout(bc);bc=setTimeout(bb,200)}}else{if(a9&&a4<=bj-4){bu=0;bm=false}}bk.fillText(bB,bj-2-bu,by*0.5)}bk.restore()};var bd=function(bS,bP,bV,bX){var bD=O(bS,bP);var bE=bD.getContext("2d");bE.save();var bO=0;var bY=0;var bB=bS;var b7=bP;var bL=Math.min(bS,bP)*0.095;var bU=bE.createLinearGradient(0,bY,0,bY+b7);bU.addColorStop(0,"#4c4c4c");bU.addColorStop(0.08,"#666666");bU.addColorStop(0.92,"#666666");bU.addColorStop(1,"#e6e6e6");bE.fillStyle=bU;V(bE,bO,bY,bB,b7,bL);bE.fill();bE.restore();bE.save();var bA=aI(bV);var bQ=aE(bA[0],bA[1],bA[2]);var bF=aI(bX.gradientStartColor);var b5=aE(bF[0],bF[1],bF[2]);var bN=aI(bX.gradientFraction1Color);var b4=aE(bN[0],bN[1],bN[2]);var bK=aI(bX.gradientFraction2Color);var b2=aE(bK[0],bK[1],bK[2]);var bJ=aI(bX.gradientFraction3Color);var b1=aE(bJ[0],bJ[1],bJ[2]);var bC=aI(bX.gradientStopColor);var bH=aE(bC[0],bC[1],bC[2]);var bR=P(bQ[0],bQ[1],b5[2]-0.31);var bW=P(bQ[0],bQ[1],b4[2]-0.31);var b0=P(bQ[0],bQ[1],b2[2]-0.31);var b6=P(bQ[0],bQ[1],b1[2]-0.31);var bZ=P(bQ[0],bQ[1],bH[2]-0.31);var bI=1;var bT=1;var bz=bS-2;var b3=bP-2;var bG=bL-1;var bM=bE.createLinearGradient(0,bT,0,bT+b3);bM.addColorStop(0,"rgb("+bR[0]+", "+bR[1]+", "+bR[2]+")");bM.addColorStop(0.03,"rgb("+bW[0]+","+bW[1]+","+bW[2]+")");bM.addColorStop(0.49,"rgb("+b0[0]+","+b0[1]+","+b0[2]+")");bM.addColorStop(0.5,"rgb("+b6[0]+","+b6[1]+","+b6[2]+")");bM.addColorStop(1,"rgb("+bZ[0]+","+bZ[1]+","+bZ[2]+")");bE.fillStyle=bM;V(bE,bI,bT,bz,b3,bG);bE.fill();bE.restore();return bD};var a7=function(bB){var bA=aI(bB);var bC=aE(bA[0],bA[1],bA[2]);var bz=P(bC[0],0.57,0.83);return"rgb("+bz[0]+", "+bz[1]+", "+bz[2]+")"};var bb=function(){if(bm){if(bu>bj){bu=-a4}bu+=2;bc=setTimeout(bb,60)}else{bu=0}bn.repaint()};var bv=function(){a8=true;a3=ab(bs,bo,bw);if(null!==bg&&0=bg[bB].start&&bt<=bg[bB].stop){bA=bx[bB];bz=bh[bB];break}}}bk.drawImage(bA,0,0);bq(bt,bz)};this.repaint();return this};var X=function(a5,a9){a9=a9||{};var bl=(undefined===a9.width?128:a9.width);var bg=(undefined===a9.height?64:a9.height);var bo=(undefined===a9.lcdColor?steelseries.LcdColor.STANDARD:a9.lcdColor);var bb=(undefined===a9.lcdDecimals?2:a9.lcdDecimals);var a4=(undefined===a9.unitString?"":a9.unitString);var a7=(undefined===a9.unitStringVisible?false:a9.unitStringVisible);var bf=(undefined===a9.digitalFont?false:a9.digitalFont);var bi=(undefined===a9.valuesNumeric?true:a9.valuesNumeric);var bm=(undefined===a9.value?0:a9.value);var bh=0;var be=H.getElementById(a5).getContext("2d");be.save();be.clearRect(0,0,be.canvas.width,be.canvas.height);be.canvas.width=bl;be.canvas.height=bg;var bd=bl;var bp=bg;var a8=Math.floor(bp/1.875)+"px sans-serif";var bk=Math.floor(bp/1.875)+"px LCDMono2Ultra";var bc=Math.floor(bp/3.5)+"px sans-serif";var ba=Math.floor(bp/3.5)+"px LCDMono2Ultra";var a6=false;var a3;var bj=function(bs){be.save();be.textAlign="right";be.textBaseline="middle";be.strokeStyle=bo.textColor;be.fillStyle=bo.textColor;if(bo===steelseries.LcdColor.STANDARD||bo===steelseries.LcdColor.STANDARD_GREEN){be.shadowColor="gray";be.shadowOffsetX=bp*0.05;be.shadowOffsetY=bp*0.05;be.shadowBlur=bp*0.06}if(bi){be.font=Math.floor(bp/2.5)+"px sans-serif";var br=0;if(a7){be.font=Math.floor(bp/2.5)+"px sans-serif";br=be.measureText(a4).width}if(bf){be.font=bk}else{be.font=a8}var bq=bs.toFixed(bb);be.fillText(bq,bd-br-4,bp*0.38);if(a7){be.font=Math.floor(bp/3)+"px sans-serif";be.fillText(a4,bd-2,bp*0.46)}var bt=bh.toFixed(bb);if(bf){be.font=ba}else{be.font=bc}be.textAlign="center";be.fillText(bt,bd/2,bp*0.8)}else{be.font=Math.floor(bp/2.5)+"px sans-serif";be.fillText(bs,bd-2,bp*0.38);be.font=bc;be.textAlign="center";be.fillText(bh,bd/2,bp*0.8)}be.restore()};var bn=function(){a6=true;a3=ab(bl,bg,bo)};this.setValue=function(bq){if(bm!==bq||bh!==bq){bh=bm;bm=bq;this.repaint()}};this.setLcdColor=function(bq){bo=bq;bn();this.repaint()};this.repaint=function(){if(!a6){bn()}be.clearRect(0,0,be.canvas.width,be.canvas.height);be.drawImage(a3,0,0);bj(bm)};this.repaint();return this};var at=function(be,bx){bx=bx||{};var bd=(undefined===bx.size?200:bx.size);var bA=(undefined===bx.decimalsVisible?false:bx.decimalsVisible);var bc=(undefined===bx.textOrientationFixed?false:bx.textOrientationFixed);var a6=(undefined===bx.frameDesign?steelseries.FrameDesign.METAL:bx.frameDesign);var bm=(undefined===bx.frameVisible?true:bx.frameVisible);var a4=(undefined===bx.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bx.backgroundColor);var bC=(undefined===bx.pointerColor?steelseries.ColorDef.RED:bx.pointerColor);var bz=(undefined===bx.foregroundType?steelseries.ForegroundType.TYPE1:bx.foregroundType);var bh;var bs=0;var bp=0;var bn=0;var bt=2*Math.PI/360;var bi=this.value;var bk=bA?1:0;var bw=H.getElementById(be).getContext("2d");bw.save();bw.clearRect(0,0,bw.canvas.width,bw.canvas.height);bw.canvas.width=bd;bw.canvas.height=bd;var bD=bd;var bo=bd;var a9=bD/2;var a8=bo/2;var bf=false;var bq=O(bd,bd);var a3=bq.getContext("2d");var bl=O(bd,bd);var a5=bl.getContext("2d");var br=O(bd,bd);var a7=br.getContext("2d");var bu=O(bd,bd);var bj=bu.getContext("2d");var bB=function(bE){bE.textAlign="center";bE.textBaseline="middle";bE.save();bE.strokeStyle=a4.labelColor.getRgbaColor();bE.fillStyle=a4.labelColor.getRgbaColor();bE.translate(a9,a8);var bG;var bF;for(i=0;360>i;i++){bE.strokeStyle=a4.labelColor.getRgbaColor();bE.lineWidth=0.5;bE.beginPath();bE.moveTo(bD*0.38,0);bE.lineTo(bD*0.37,0);bE.closePath();bE.stroke();if(0===i%5){bE.strokeStyle=a4.labelColor.getRgbaColor();bE.lineWidth=1;bE.beginPath();bE.moveTo(bD*0.38,0);bE.lineTo(bD*0.36,0);bE.closePath();bE.stroke()}if(0===i%45){bE.strokeStyle=a4.labelColor.getRgbaColor();bE.lineWidth=1;bE.beginPath();bE.moveTo(bD*0.38,0);bE.lineTo(bD*0.34,0);bE.closePath();bE.stroke()}if(300=bD){bG="12px sans-serif";bF="10px sans-serif"}if(200>=bD){bG="10px sans-serif";bF="8px sans-serif"}if(100>=bD){bG="8px sans-serif";bF="6px sans-serif"}bE.save();switch(i){case 0:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)+Math.PI/2);bE.font=bG;bE.fillText("0\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)+Math.PI/2);bE.translate(-bD*0.31,0);bE.translate(bD*0.41,0);bE.rotate((i*Math.PI/180)-Math.PI/2);bE.font=bF;bE.fillText("0%",0,0,bD);break;case 45:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)+0.25*Math.PI);bE.font=bG;bE.fillText("45\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)+0.25*Math.PI);bE.translate(-bD*0.31,0);bE.translate(bD*0.31,bD*0.085);bE.rotate((i*Math.PI/180)-0.25*Math.PI);bE.font=bF;bE.fillText("100%",0,0,bD);break;case 90:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180));bE.font=bG;bE.fillText("90\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180));bE.translate(-bD*0.31,0);bE.translate(bD*0.21,0);bE.rotate((i*Math.PI/180));bE.font=bF;bE.fillText("\u221E",0,0,bD);break;case 135:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)-0.25*Math.PI);bE.font=bG;bE.fillText("45\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)-0.25*Math.PI);bE.translate(-bD*0.31,0);bE.translate(bD*0.31,-bD*0.085);bE.rotate((i*Math.PI/180)+0.25*Math.PI);bE.font=bF;bE.fillText("100%",0,0,bD);break;case 180:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)-Math.PI/2);bE.font=bG;bE.fillText("0\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)-Math.PI/2);bE.translate(-bD*0.31,0);bE.translate(bD*0.41,0);bE.rotate((i*Math.PI/180)+Math.PI/2);bE.font=bF;bE.fillText("0%",0,0,bD);bE.translate(-bD*0.41,0);break;case 225:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)-0.75*Math.PI);bE.font=bG;bE.fillText("45\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)-0.75*Math.PI);bE.translate(-bD*0.31,0);bE.translate(bD*0.31,bD*0.085);bE.rotate((i*Math.PI/180)+0.75*Math.PI);bE.font=bF;bE.fillText("100%",0,0,bD);break;case 270:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)-Math.PI);bE.font=bG;bE.fillText("90\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)-Math.PI);bE.translate(-bD*0.31,0);bE.translate(bD*0.21,0);bE.rotate((i*Math.PI/180)-Math.PI);bE.font=bF;bE.fillText("\u221E",0,0,bD);break;case 315:bE.translate(bD*0.31,0);bE.rotate((i*Math.PI/180)-1.25*Math.PI);bE.font=bG;bE.fillText("45\u00B0",0,0,bD);bE.rotate(-(i*Math.PI/180)-1.25*Math.PI);bE.translate(-bD*0.31,0);bE.translate(bD*0.31,-bD*0.085);bE.rotate((i*Math.PI/180)+1.25*Math.PI);bE.font=bF;bE.fillText("100%",0,0,bD);break}bE.restore();bE.rotate(bt)}bE.translate(-a9,-a8);bE.restore()};var ba=function(bE){bE.save();bE.strokeStyle=a4.labelColor.getRgbaColor();bE.fillStyle=a4.labelColor.getRgbaColor();bE.save();bE.beginPath();bE.moveTo(bD*0.200934,bo*0.434579);bE.lineTo(bD*0.163551,bo*0.434579);bE.lineTo(bD*0.163551,bo*0.560747);bE.lineTo(bD*0.200934,bo*0.560747);bE.lineWidth=1;bE.lineCap="square";bE.lineJoin="miter";bE.stroke();bE.save();bE.beginPath();bE.moveTo(bD*0.163551,bo*0.471962);bE.lineTo(bD*0.205607,bo*0.5);bE.lineTo(bD*0.163551,bo*0.523364);bE.lineTo(bD*0.163551,bo*0.471962);bE.closePath();bE.fill();bE.save();bE.beginPath();bE.moveTo(bD*0.799065,bo*0.434579);bE.lineTo(bD*0.836448,bo*0.434579);bE.lineTo(bD*0.836448,bo*0.560747);bE.lineTo(bD*0.799065,bo*0.560747);bE.lineWidth=1;bE.lineCap="square";bE.lineJoin="miter";bE.stroke();bE.save();bE.beginPath();bE.moveTo(bD*0.836448,bo*0.471962);bE.lineTo(bD*0.794392,bo*0.5);bE.lineTo(bD*0.836448,bo*0.523364);bE.lineTo(bD*0.836448,bo*0.471962);bE.closePath();bE.fill();bE.restore()};var bg=function(bF){bF.save();bF.save();bF.beginPath();bF.moveTo(bD*0.523364,bo*0.350467);bF.lineTo(bD*0.5,bo*0.130841);bF.lineTo(bD*0.476635,bo*0.350467);bF.bezierCurveTo(bD*0.476635,bo*0.350467,bD*0.490654,bo*0.345794,bD*0.5,bo*0.345794);bF.bezierCurveTo(bD*0.509345,bo*0.345794,bD*0.523364,bo*0.350467,bD*0.523364,bo*0.350467);bF.closePath();var bE=bF.createLinearGradient(0,0.154205*bo,0,0.350466*bo);var bH=bC.dark;var bG=bC.light;bH.setAlpha(0.70588);bG.setAlpha(0.70588);bE.addColorStop(0,bH.getRgbaColor());bE.addColorStop(0.3,bG.getRgbaColor());bE.addColorStop(0.59,bG.getRgbaColor());bE.addColorStop(1,bH.getRgbaColor());bF.fillStyle=bE;var bI=bC.light.getRgbaColor();bF.lineWidth=1;bF.lineCap="square";bF.lineJoin="miter";bF.strokeStyle=bI;bF.fill();bF.stroke();bH.setAlpha(1);bG.setAlpha(1);bF.restore()};var bb=function(bE){bE.save();var bJ=bC.dark;var bF=bC.light;bJ.setAlpha(0.70588);bF.setAlpha(0.70588);bE.save();bE.beginPath();bE.moveTo(bD*0.285046,bo*0.514018);bE.lineTo(bD*0.21028,bo*0.5);bE.lineTo(bD*0.285046,bo*0.481308);bE.bezierCurveTo(bD*0.285046,bo*0.481308,bD*0.280373,bo*0.490654,bD*0.280373,bo*0.495327);bE.bezierCurveTo(bD*0.280373,bo*0.504672,bD*0.285046,bo*0.514018,bD*0.285046,bo*0.514018);bE.closePath();var bG=bE.createLinearGradient(0.224299*bD,0,0.289719*bD,0);bG.addColorStop(0,bJ.getRgbaColor());bG.addColorStop(0.3,bF.getRgbaColor());bG.addColorStop(0.59,bF.getRgbaColor());bG.addColorStop(1,bJ.getRgbaColor());bE.fillStyle=bG;var bK=bC.light.getRgbaColor();bE.lineWidth=1;bE.lineCap="square";bE.lineJoin="miter";bE.strokeStyle=bK;bE.fill();bE.stroke();bE.save();bE.beginPath();bE.moveTo(bD*0.714953,bo*0.514018);bE.lineTo(bD*0.789719,bo*0.5);bE.lineTo(bD*0.714953,bo*0.481308);bE.bezierCurveTo(bD*0.714953,bo*0.481308,bD*0.719626,bo*0.490654,bD*0.719626,bo*0.495327);bE.bezierCurveTo(bD*0.719626,bo*0.504672,bD*0.714953,bo*0.514018,bD*0.714953,bo*0.514018);bE.closePath();var bH=bE.createLinearGradient(0.7757*bD,0,0.71028*bD,0);bH.addColorStop(0,bJ.getRgbaColor());bH.addColorStop(0.3,bF.getRgbaColor());bH.addColorStop(0.59,bF.getRgbaColor());bH.addColorStop(1,bJ.getRgbaColor());bE.fillStyle=bH;var bI=bC.light.getRgbaColor();bE.lineWidth=1;bE.lineCap="square";bE.lineJoin="miter";bE.strokeStyle=bI;bE.fill();bE.stroke();bJ.setAlpha(1);bF.setAlpha(1);bE.restore()};var bv=function(){bf=true;if(bm){g(a3,a6,a9,a8,bD,bo)}a0(a3,a4,a9,a8,bD,bo);bB(a3);ba(a5);bg(a5);bb(a7);G(bj,bz,bD,bo,false)};var by=function(){bq.width=bd;bq.height=bd;a3=bq.getContext("2d");bl.width=bd;bl.height=bd;a5=bl.getContext("2d");br.width=bd;br.height=bd;a7=br.getContext("2d");bu.width=bd;bu.height=bd;bj=bu.getContext("2d")};this.setValue=function(bF){var bE;bE=0>bF?(360+bF):bF;bE=359.9=bs){bn=(90-bs)}if(90=bs){bn=(bs-90)}if(180=bs){bn=(270-bs)}if(270=bs){bn=(bs-270)}if(0>bs&&bs>=-90){bn=(90-Math.abs(bs))}if(bs<-90&&bs>=-180){bn=Math.abs(bs)-90}if(bs<-180&&bs>=-270){bn=270-Math.abs(bs)}if(bs<-270&&bs>=-360){bn=Math.abs(bs)-270}this.repaint()}};this.getValue=function(){return bs};this.setValueAnimated=function(bF){if(360-bF+bs=bs){bn=(90-bs)}if(90=bs){bn=(bs-90)}if(180=bs){bn=(270-bs)}if(270=bs){bn=(bs-270)}if(0>bs&&bs>=-90){bn=(90-Math.abs(bs))}if(bs<-90&&bs>=-180){bn=Math.abs(bs)-90}if(bs<-180&&bs>=-270){bn=270-Math.abs(bs)}if(bs<-270&&bs>=-360){bn=Math.abs(bs)-270}bE.repaint()};bh.start()}};this.setFrameDesign=function(bE){by();a6=bE;bv();this.repaint()};this.setBackgroundColor=function(bE){by();a4=bE;bv();this.repaint()};this.setForegroundType=function(bE){by();bz=bE;bv();this.repaint()};this.setPointerColor=function(bE){by();bC=bE;bv();this.repaint()};this.repaint=function(){if(!bf){bv()}bw.save();bw.clearRect(0,0,bw.canvas.width,bw.canvas.height);bw.drawImage(bq,0,0);bi=Math.PI/2+bs*bt-Math.PI/2;bw.save();bw.translate(a9,a8);bw.rotate(bi);bw.translate(-a9,-a8);bw.drawImage(bl,0,0);bw.fillStyle=a4.labelColor.getRgbaColor();bw.textAlign="center";bw.textBaseline="middle";if(bc){bw.restore();if(bA){bw.font=bD*0.1+"px sans-serif"}else{bw.font=bD*0.15+"px sans-serif"}bw.fillText(bn.toFixed(bk)+"\u00B0",a9,a8,bD*0.35)}else{if(bA){bw.font=bD*0.15+"px sans-serif"}else{bw.font=bD*0.2+"px sans-serif"}bw.fillText(bn.toFixed(bk)+"\u00B0",a9,a8,bD*0.35);bw.restore()}bw.translate(a9,a8);bw.rotate(bi+bp*Math.PI/180);bw.translate(-a9,-a8);bw.drawImage(br,0,0);bw.restore();bw.drawImage(bu,0,0);bw.restore()};this.repaint();return this};var aA=function(bc,by){by=by||{};var bb=(undefined===by.size?200:by.size);var a7=(undefined===by.frameDesign?steelseries.FrameDesign.METAL:by.frameDesign);var bp=(undefined===by.frameVisible?true:by.frameVisible);var a4=(undefined===by.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:by.backgroundColor);var bl=(undefined===by.pointerType?steelseries.PointerType.TYPE2:by.pointerType);var bC=(undefined===by.pointerColor?steelseries.ColorDef.RED:by.pointerColor);var bD=(undefined===by.knobType?steelseries.KnobType.STANDARD_KNOB:by.knobType);var bq=(undefined===by.knobStyle?steelseries.KnobStyle.SILVER:by.knobStyle);var bA=(undefined===by.foregroundType?steelseries.ForegroundType.TYPE1:by.foregroundType);var bi=(undefined===by.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:by.pointSymbols);var bF=(undefined===by.customLayer?null:by.customLayer);var be=(undefined===by.degreeScale?false:by.degreeScale);var ba=(undefined===by.roseVisible?true:by.roseVisible);var bh;var bt=0;var bu=2*Math.PI/360;var bk=this.value;var bx=H.getElementById(bc).getContext("2d");bx.save();bx.clearRect(0,0,bx.canvas.width,bx.canvas.height);bx.canvas.width=bb;bx.canvas.height=bb;var bE=bb;var br=bb;var a9=bE/2;var a8=br/2;var bf=false;var bs=O(bb,bb);var a3=bs.getContext("2d");var bo=O(bb,bb);var a5=bo.getContext("2d");var a6=O(bb,bb);var bn=a6.getContext("2d");var bj=O(bb,bb);var bd=bj.getContext("2d");var bv=O(bb,bb);var bm=bv.getContext("2d");var bB=function(bG){bG.textAlign="center";bG.textBaseline="middle";var bI,bH;bG.save();bG.strokeStyle=a4.labelColor.getRgbaColor();bG.fillStyle=a4.labelColor.getRgbaColor();bG.translate(a9,a8);if(!be){bI=0.12*bE+"px serif";bH=0.06*bE+"px serif";for(i=0;360>i;i+=2.5){if(0===i%5){bG.lineWidth=1;bG.beginPath();bG.moveTo(bE*0.38,0);bG.lineTo(bE*0.36,0);bG.closePath();bG.stroke()}bG.save();switch(i){case 0:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[2],0,0,bE);bG.translate(-bE*0.35,0);break;case 45:bG.translate(bE*0.29,0);bG.rotate(Math.PI/2);bG.font=bH;bG.fillText(bi[3],0,0,bE);bG.translate(-bE*0.29,0);break;case 90:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[4],0,0,bE);bG.translate(-bE*0.35,0);break;case 135:bG.translate(bE*0.29,0);bG.rotate(Math.PI/2);bG.font=bH;bG.fillText(bi[5],0,0,bE);bG.translate(-bE*0.29,0);break;case 180:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[6],0,0,bE);bG.translate(-bE*0.35,0);break;case 225:bG.translate(bE*0.29,0);bG.rotate(Math.PI/2);bG.font=bH;bG.fillText(bi[7],0,0,bE);bG.translate(-bE*0.29,0);break;case 270:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[0],0,0,bE);bG.translate(-bE*0.35,0);break;case 315:bG.translate(bE*0.29,0);bG.rotate(Math.PI/2);bG.font=bH;bG.fillText(bi[1],0,0,bE);bG.translate(-bE*0.29,0);break}bG.restore();if(ba&&(0===i||22.5===i||45===i||67.5===i||90===i||112.5===i||135===i||157.5===i||180===i||202.5===i||225===i||247.5===i||270===i||292.5===i||315===i||337.5===i||360===i)){bG.save();bG.beginPath();if(i%45){bG.moveTo(bE*0.29,0)}else{bG.moveTo(bE*0.38,0)}bG.lineTo(bE*0.1,0);bG.closePath();bG.restore();bG.lineWidth=1;bG.strokeStyle=a4.symbolColor.getRgbaColor();bG.stroke()}bG.rotate(bu*2.5)}}else{bI=0.08*bE+"px serif";bH=bE*0.033+"px serif";bG.rotate(bu*10);for(i=10;360>=i;i+=10){bG.save();switch(i){case 360:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[2],0,0,bE);bG.translate(-bE*0.35,0);break;case 90:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[4],0,0,bE);bG.translate(-bE*0.35,0);break;case 180:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[6],0,0,bE);bG.translate(-bE*0.35,0);break;case 270:bG.translate(bE*0.35,0);bG.rotate(Math.PI/2);bG.font=bI;bG.fillText(bi[0],0,0,bE);bG.translate(-bE*0.35,0);break;default:var bJ=(i+90)%360;bG.translate(bE*0.37,0);bG.rotate(Math.PI/2);bG.font=bH;bG.fillText(("0".substring(bJ>=100)+bJ),0,0,bE);bG.translate(-bE*0.37,0)}bG.restore();bG.rotate(bu*10)}}bG.translate(-a9,-a8);bG.restore()};var bg=function(bO,bL){bO.save();if(bL){bO.fillStyle="rgba(0, 0, 0, 0.5)";bO.strokeStyle="rgba(0, 0, 0, 0.5)"}switch(bl.type){case"type2":bO.beginPath();bO.moveTo(bE*0.53271,br*0.453271);bO.bezierCurveTo(bE*0.53271,br*0.453271,bE*0.5,br*0.149532,bE*0.5,br*0.149532);bO.bezierCurveTo(bE*0.5,br*0.149532,bE*0.467289,br*0.453271,bE*0.467289,br*0.453271);bO.bezierCurveTo(bE*0.453271,br*0.462616,bE*0.443925,br*0.481308,bE*0.443925,br*0.5);bO.bezierCurveTo(bE*0.443925,br*0.5,bE*0.556074,br*0.5,bE*0.556074,br*0.5);bO.bezierCurveTo(bE*0.556074,br*0.481308,bE*0.546728,br*0.462616,bE*0.53271,br*0.453271);bO.closePath();if(!bL){var bN=bO.createLinearGradient(0.471962*bE,0,0.528036*bE,0);bN.addColorStop(0,bC.light.getRgbaColor());bN.addColorStop(0.46,bC.light.getRgbaColor());bN.addColorStop(0.47,bC.medium.getRgbaColor());bN.addColorStop(1,bC.medium.getRgbaColor());bO.fillStyle=bN;bO.strokeStyle=bC.dark.getRgbaColor()}bO.lineWidth=1;bO.lineCap="square";bO.lineJoin="miter";bO.fill();bO.stroke();bO.beginPath();bO.moveTo(bE*0.467289,br*0.546728);bO.bezierCurveTo(bE*0.467289,br*0.546728,bE*0.5,br*0.850467,bE*0.5,br*0.850467);bO.bezierCurveTo(bE*0.5,br*0.850467,bE*0.53271,br*0.546728,bE*0.53271,br*0.546728);bO.bezierCurveTo(bE*0.546728,br*0.537383,bE*0.556074,br*0.518691,bE*0.556074,br*0.5);bO.bezierCurveTo(bE*0.556074,br*0.5,bE*0.443925,br*0.5,bE*0.443925,br*0.5);bO.bezierCurveTo(bE*0.443925,br*0.518691,bE*0.453271,br*0.537383,bE*0.467289,br*0.546728);bO.closePath();if(!bL){var bH=bO.createLinearGradient(0.471962*bE,0,0.528036*bE,0);bH.addColorStop(0,"#e3e5e8");bH.addColorStop(0.48,"#e3e5e8");bH.addColorStop(0.48,"#abb1b8");bH.addColorStop(1,"#abb1b8");bO.fillStyle=bH;var bI="#abb1b8";bO.strokeStyle=bI}bO.lineWidth=1;bO.lineCap="square";bO.lineJoin="miter";bO.fill();bO.stroke();break;case"type3":bO.beginPath();bO.moveTo(bE*0.5,br*0.149532);bO.bezierCurveTo(bE*0.5,br*0.149532,bE*0.443925,br*0.490654,bE*0.443925,br*0.5);bO.bezierCurveTo(bE*0.443925,br*0.53271,bE*0.467289,br*0.556074,bE*0.5,br*0.556074);bO.bezierCurveTo(bE*0.53271,br*0.556074,bE*0.556074,br*0.53271,bE*0.556074,br*0.5);bO.bezierCurveTo(bE*0.556074,br*0.490654,bE*0.5,br*0.149532,bE*0.5,br*0.149532);bO.closePath();if(!bL){var bJ=bO.createLinearGradient(0.471962*bE,0,0.528036*bE,0);bJ.addColorStop(0,bC.light.getRgbaColor());bJ.addColorStop(0.46,bC.light.getRgbaColor());bJ.addColorStop(0.47,bC.medium.getRgbaColor());bJ.addColorStop(1,bC.medium.getRgbaColor());bO.fillStyle=bJ;bO.strokeStyle=bC.dark.getRgbaColor()}bO.lineWidth=1;bO.lineCap="square";bO.lineJoin="miter";bO.fill();bO.stroke();break;case"type1:":default:bO.beginPath();bO.moveTo(bE*0.5,br*0.495327);bO.lineTo(bE*0.528037,br*0.495327);bO.lineTo(bE*0.5,br*0.149532);bO.lineTo(bE*0.471962,br*0.495327);bO.lineTo(bE*0.5,br*0.495327);bO.closePath();if(!bL){var bK=bO.createLinearGradient(0.471962*bE,0,0.528036*bE,0);bK.addColorStop(0,bC.light.getRgbaColor());bK.addColorStop(0.46,bC.light.getRgbaColor());bK.addColorStop(0.47,bC.medium.getRgbaColor());bK.addColorStop(1,bC.medium.getRgbaColor());bO.fillStyle=bK;bO.strokeStyle=bC.dark.getRgbaColor()}bO.lineWidth=1;bO.lineCap="square";bO.lineJoin="miter";bO.fill();bO.stroke();bO.beginPath();bO.moveTo(bE*0.5,br*0.504672);bO.lineTo(bE*0.471962,br*0.504672);bO.lineTo(bE*0.5,br*0.850467);bO.lineTo(bE*0.528037,br*0.504672);bO.lineTo(bE*0.5,br*0.504672);bO.closePath();if(!bL){var bM=bO.createLinearGradient(0.471962*bE,0,0.528036*bE,0);bM.addColorStop(0,"#e3e5e8");bM.addColorStop(0.48,"#e3e5e8");bM.addColorStop(0.480099,"#abb1b8");bM.addColorStop(1,"#abb1b8");bO.fillStyle=bM;var bG="#abb1b8";bO.strokeStyle=bG}bO.lineWidth=1;bO.lineCap="square";bO.lineJoin="miter";bO.fill();bO.stroke();break}if(bL){al(bO,bE,br,Math.floor(bE*0.006))}bO.restore()};var bw=function(){bf=true;if(bp){g(a3,a7,a9,a8,bE,br)}a0(a3,a4,a9,a8,bE,br);W(a3,bF,a9,a8,bE,br);if(ba){j(a3,a9,a8,bE,br,a4)}bB(a3);bg(a5,false);bg(bn,true);G(bm,bA,bE,br,true,bD,bq)};var bz=function(){bs.width=bb;bs.height=bb;a3=bs.getContext("2d");bo.width=bb;bo.height=bb;a5=bo.getContext("2d");a6.width=bb;a6.height=bb;bn=a6.getContext("2d");bj.width=bb;bj.height=bb;bd=bj.getContext("2d");bv.width=bb;bv.height=bb;bm=bv.getContext("2d")};this.setValue=function(bG){bG=bG%360;if(bt!==bG){bt=bG;this.repaint()}};this.getValue=function(){return bt};this.setValueAnimated=function(bJ){var bG=bJ%360;var bH=this;var bI;if(bt!==bG){if(undefined!==bh){if(bh.playing){bh.stop()}}bI=ap(bt,bG);bh=new Tween({},"",Tween.elasticEaseOut,bt,bt+bI,2);bh.onMotionChanged=function(bK){bt=bK.target._pos%360;bH.repaint()};bh.start()}};this.setFrameDesign=function(bG){bz();a7=bG;bw();this.repaint()};this.setBackgroundColor=function(bG){bz();a4=bG;bw();this.repaint()};this.setForegroundType=function(bG){bz();bA=bG;bw();this.repaint()};this.setPointerColor=function(bG){bz();bC=bG;bw();this.repaint()};this.setPointerType=function(bG){bz();bl=bG;bw();this.repaint()};this.setPointSymbols=function(bG){bz();bi=bG;bw();this.repaint()};this.repaint=function(){if(!bf){bw()}bx.clearRect(0,0,bx.canvas.width,bx.canvas.height);bx.drawImage(bs,0,0);bk=Math.PI/2+bt*bu-Math.PI/2;var bG=bE*0.006;bd.clearRect(0,0,bE,br);bd.save();bd.translate(a9,a8);bd.rotate(bk);bd.translate(-a9,-a8);bd.drawImage(a6,0,0);bd.restore();bx.drawImage(bj,0,0,bE,br,bG,bG,bE+bG,br+bG);bx.save();bx.translate(a9,a8);bx.rotate(bk);bx.translate(-a9,-a8);bx.drawImage(bo,0,0);bx.restore();bx.drawImage(bv,0,0);bx.restore()};this.repaint();return this};var N=function(bc,bR){bR=bR||{};var bb=(undefined===bR.size?200:bR.size);var a5=(undefined===bR.frameDesign?steelseries.FrameDesign.METAL:bR.frameDesign);var bz=(undefined===bR.frameVisible?true:bR.frameVisible);var a4=(undefined===bR.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bR.backgroundColor);var bM=(undefined===bR.pointerTypeLatest?steelseries.PointerType.TYPE1:bR.pointerTypeLatest);var bh=(undefined===bR.pointerTypeAverage?steelseries.PointerType.TYPE8:bR.pointerTypeAverage);var bZ=(undefined===bR.pointerColor?steelseries.ColorDef.RED:bR.pointerColor);var bJ=(undefined===bR.pointerColorAverage?steelseries.ColorDef.BLUE:bR.pointerColorAverage);var b0=(undefined===bR.knobType?steelseries.KnobType.STANDARD_KNOB:bR.knobType);var bB=(undefined===bR.knobStyle?steelseries.KnobStyle.SILVER:bR.knobStyle);var bV=(undefined===bR.foregroundType?steelseries.ForegroundType.TYPE1:bR.foregroundType);var bj=(undefined===bR.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:bR.pointSymbols);var b3=(undefined===bR.customLayer?null:bR.customLayer);var bf=(undefined===bR.degreeScale?true:bR.degreeScale);var a8=(undefined===bR.roseVisible?false:bR.roseVisible);var by=(undefined===bR.lcdColor?steelseries.LcdColor.STANDARD:bR.lcdColor);var bL=(undefined===bR.lcdVisible?true:bR.lcdVisible);var a9=(undefined===bR.digitalFont?false:bR.digitalFont);var bo=(undefined===bR.section?null:bR.section);var bA=(undefined===bR.area?null:bR.area);var bT=(undefined===bR.lcdTitleStrings?["Latest","Average"]:bR.lcdTitleStrings);var bl=(undefined===bR.titleString?"":bR.titleString);var bp;var bn;var bY=0;var bq=0;var bK=2*Math.PI/360;var bC=this.valueLatest;var bU=this.valueAverage;var bO=-Math.PI/2;var br=Math.PI*2;var bd=360;var bQ=H.getElementById(bc).getContext("2d");bQ.save();bQ.clearRect(0,0,bQ.canvas.width,bQ.canvas.height);bQ.canvas.width=bb;bQ.canvas.height=bb;var b2=bb;var bD=bb;var a7=b2/2;var a6=bD/2;var bw=Math.floor(b2/10)+"px sans-serif";var bI=Math.floor(b2/10)+"px LCDMono2Ultra";var bg=false;var bG=O(bb,bb);var a3=bG.getContext("2d");var bX;var bx=O(bb,bb);var ba=bx.getContext("2d");var bF=O(bb,bb);var bE=bF.getContext("2d");var b1=O(bb,bb);var bm=b1.getContext("2d");var bu=O(bb,bb);var bt=bu.getContext("2d");var bk=O(bb,bb);var be=bk.getContext("2d");var bN=O(bb,bb);var bs=bN.getContext("2d");var bi=function(b5,b4){bQ.save();bQ.textAlign="center";bQ.textBaseline="middle";bQ.strokeStyle=by.textColor;bQ.fillStyle=by.textColor;if(b5<0){b5+=360}b5="00"+Math.round(b5);b5=b5.substring(b5.length,b5.length-3);if(by===steelseries.LcdColor.STANDARD||by===steelseries.LcdColor.STANDARD_GREEN){bQ.shadowColor="gray";bQ.shadowOffsetX=b2*0.007;bQ.shadowOffsetY=b2*0.007;bQ.shadowBlur=b2*0.01}if(a9){bQ.font=bI}else{bQ.font=bw}if(b4){bQ.fillText(b5+"\u00B0",b2/2+2,b2*0.385,b2*0.4)}else{bQ.fillText(b5+"\u00B0",b2/2+2,b2*0.63,b2*0.4)}bQ.restore()};var bH=function(b4,ca,b7,b5,b8){b4.save();b4.strokeStyle=b5;b4.fillStyle=b5;b4.lineWidth=b2*0.035;var b6=(br/bd*ca);var b9=b6+(b7-ca)/(bd/br);b4.translate(a7,a6);b4.rotate(bO);b4.beginPath();if(b8){b4.moveTo(0,0);b4.arc(0,0,b2*0.365-b4.lineWidth/2,b6,b9,false)}else{b4.arc(0,0,b2*0.365,b6,b9,false)}b4.moveTo(0,0);b4.closePath();if(b8){b4.fill()}else{b4.stroke()}b4.translate(-a7,-a6);b4.restore()};var bW=function(cf){cf.textAlign="center";cf.textBaseline="middle";var ca=b2*0.38;var b5=b2*0.35;var cc=b2*0.355;var b7=b2*0.36;var b6=b2*0.1;var cd=b2*0.31;var b4=b2*0.36;var ce,b8;cf.save();cf.strokeStyle=a4.labelColor.getRgbaColor();cf.fillStyle=a4.labelColor.getRgbaColor();cf.translate(a7,a6);if(!bf){ce=0.12*b2+"px serif";b8=0.06*b2+"px serif";cf.lineWidth=1;cf.strokeStyle=a4.symbolColor.getRgbaColor();for(i=0;360>i;i+=2.5){if(0===i%5){cf.beginPath();cf.moveTo(b2*0.38,0);cf.lineTo(b2*0.36,0);cf.closePath();cf.stroke()}cf.save();switch(i){case 0:cf.translate(b2*0.35,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[2],0,0);cf.translate(-b2*0.35,0);break;case 45:cf.translate(b2*0.29,0);cf.rotate(Math.PI/2);cf.font=b8;cf.fillText(bj[3],0,0);cf.translate(-b2*0.29,0);break;case 90:cf.translate(b2*0.35,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[4],0,0);cf.translate(-b2*0.35,0);break;case 135:cf.translate(b2*0.29,0);cf.rotate(Math.PI/2);cf.font=b8;cf.fillText(bj[5],0,0);cf.translate(-b2*0.29,0);break;case 180:cf.translate(b2*0.35,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[6],0,0);cf.translate(-b2*0.35,0);break;case 225:cf.translate(b2*0.29,0);cf.rotate(Math.PI/2);cf.font=b8;cf.fillText(bj[7],0,0);cf.translate(-b2*0.29,0);break;case 270:cf.translate(b2*0.35,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[0],0,0);cf.translate(-b2*0.35,0);break;case 315:cf.translate(b2*0.29,0);cf.rotate(Math.PI/2);cf.font=b8;cf.fillText(bj[1],0,0);cf.translate(-b2*0.29,0);break}cf.restore();if(a8&&(0===i||22.5===i||45===i||67.5===i||90===i||112.5===i||135===i||157.5===i||180===i||202.5===i||225===i||247.5===i||270===i||292.5===i||315===i||337.5===i||360===i)){cf.save();cf.beginPath();if(i%45){cf.moveTo(b2*0.29,0)}else{cf.moveTo(b2*0.38,0)}cf.lineTo(b2*0.1,0);cf.closePath();cf.restore();cf.stroke()}cf.rotate(bK*2.5)}}else{ce=Math.floor(0.1*b2)+"px serif bold";b8=Math.floor(b2*0.04)+"px sans-serif";cf.rotate(bK*5);for(i=5;360>=i;i+=5){cf.save();switch(i){case 360:cf.translate(b4,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[2],0,0,b6);cf.translate(-b4,0);break;case 90:cf.translate(b4,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[4],0,0,b6);cf.translate(-b4,0);break;case 180:cf.translate(b4,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[6],0,0,b6);cf.translate(-b4,0);break;case 270:cf.translate(b4,0);cf.rotate(Math.PI/2);cf.font=ce;cf.fillText(bj[0],0,0,b6);cf.translate(-b4,0);break;case 5:case 85:case 95:case 175:case 185:case 265:case 275:case 355:break;default:if((i+90)%20){cf.lineWidth=((i+90)%5)?1.5:1;cf.beginPath();cf.moveTo(ca,0);var cb=(i+90)%10?b7:b5;cf.lineTo(cb,0);cf.closePath();cf.stroke()}else{cf.lineWidth=1.5;cf.beginPath();cf.moveTo(ca,0);cf.lineTo(b5,0);cf.closePath();cf.stroke();var b9=(i+90)%360;cf.translate(cd,0);cf.rotate(Math.PI/2);cf.font=b8;cf.fillText(("0".substring(b9>=100)+b9),0,0,b6);cf.translate(-cd,0)}}cf.restore();cf.rotate(bK*5)}}cf.translate(-a7,-a6);cf.restore()};var bv=function(b4){if(bT.length>0){b4.save();b4.textAlign="center";b4.textBaseline="middle";b4.fillStyle=a4.labelColor.getRgbaColor();b4.font=0.04*b2+"px sans-serif";b4.fillText(bT[0],b2/2,bD*0.29,b2*0.3);b4.fillText(bT[1],b2/2,bD*0.71,b2*0.3);if(bl.length>0){b4.font=0.0467*b2+"px sans-serif";b4.fillText(bl,b2/2,bD*0.5,b2*0.3)}}};var bP=function(b7){b7=b7||{};var b8=(undefined===b7.frame?false:b7.frame);var ca=(undefined===b7.background?false:b7.background);var b6=(undefined===b7.pointer?false:b7.pointer);var b4=(undefined===b7.foreground?false:b7.foreground);bg=true;if(b8&&bz){g(a3,a5,a7,a6,b2,bD)}if(ca){a0(a3,a4,a7,a6,b2,bD);W(a3,b3,a7,a6,b2,bD);if(null!==bo&&00;bD-=bG){if(bA<=90){if(bB){bH.fillText(bA,(bE-(bE*0.2))/2-8,bD,bE*0.375);bH.fillText(bA,bE-(bE-(bE*0.2))/2+8,bD,bE*0.375);bH.beginPath();bH.moveTo((bE-(bE*0.2))/2,bD);bH.lineTo(bE-(bE-(bE*0.2))/2,bD);bH.closePath();bA+=10}else{bH.beginPath();bH.moveTo((bE-(bE*0.1))/2,bD);bH.lineTo(bE-(bE-(bE*0.1))/2,bD);bH.closePath()}bH.stroke()}bB^=true}bB=false;bA=10;bH.strokeStyle="#FFFFFF";bH.lineWidth=1.5;bH.beginPath();bH.moveTo(0,bF/2);bH.lineTo(bE,bF/2);bH.closePath();bH.stroke();bH.fillStyle="#FFFFFF";bH.lineWidth=1;for(bD=bF/2+bG;bD<=bF;bD+=bG){if(bA<=90){if(bB){bH.fillText(-bA,(bE-(bE*0.2))/2-8,bD,bE*0.375);bH.fillText(-bA,bE-(bE-(bE*0.2))/2+8,bD,bE*0.375);bH.beginPath();bH.moveTo((bE-(bE*0.2))/2,bD);bH.lineTo(bE-(bE-(bE*0.2))/2,bD);bH.closePath();bA+=10}else{bH.beginPath();bH.moveTo((bE-(bE*0.1))/2,bD);bH.lineTo(bE-(bE-(bE*0.1))/2,bD);bH.closePath()}bH.stroke()}bB^=true}bH.restore()};var bf=function(bA){bA.save();bA.fillStyle=br.light.getRgbaColor();bA.beginPath();bA.moveTo(bk*0.476635,bx*0.5);bA.bezierCurveTo(bk*0.476635,bx*0.514018,bk*0.485981,bx*0.523364,bk*0.5,bx*0.523364);bA.bezierCurveTo(bk*0.514018,bx*0.523364,bk*0.523364,bx*0.514018,bk*0.523364,bx*0.5);bA.bezierCurveTo(bk*0.523364,bx*0.485981,bk*0.514018,bx*0.476635,bk*0.5,bx*0.476635);bA.bezierCurveTo(bk*0.485981,bx*0.476635,bk*0.476635,bx*0.485981,bk*0.476635,bx*0.5);bA.closePath();bA.moveTo(bk*0.415887,bx*0.504672);bA.lineTo(bk*0.415887,bx*0.495327);bA.bezierCurveTo(bk*0.415887,bx*0.495327,bk*0.467289,bx*0.495327,bk*0.467289,bx*0.495327);bA.bezierCurveTo(bk*0.471962,bx*0.481308,bk*0.481308,bx*0.471962,bk*0.495327,bx*0.467289);bA.bezierCurveTo(bk*0.495327,bx*0.467289,bk*0.495327,bx*0.415887,bk*0.495327,bx*0.415887);bA.lineTo(bk*0.504672,bx*0.415887);bA.bezierCurveTo(bk*0.504672,bx*0.415887,bk*0.504672,bx*0.467289,bk*0.504672,bx*0.467289);bA.bezierCurveTo(bk*0.518691,bx*0.471962,bk*0.528037,bx*0.481308,bk*0.53271,bx*0.495327);bA.bezierCurveTo(bk*0.53271,bx*0.495327,bk*0.584112,bx*0.495327,bk*0.584112,bx*0.495327);bA.lineTo(bk*0.584112,bx*0.504672);bA.bezierCurveTo(bk*0.584112,bx*0.504672,bk*0.53271,bx*0.504672,bk*0.53271,bx*0.504672);bA.bezierCurveTo(bk*0.528037,bx*0.518691,bk*0.518691,bx*0.53271,bk*0.5,bx*0.53271);bA.bezierCurveTo(bk*0.481308,bx*0.53271,bk*0.471962,bx*0.518691,bk*0.467289,bx*0.504672);bA.bezierCurveTo(bk*0.467289,bx*0.504672,bk*0.415887,bx*0.504672,bk*0.415887,bx*0.504672);bA.closePath();bA.fill();var bC=5;var bB=5*Math.PI/180;bA.translate(bh,bg);bA.rotate(-Math.PI/2);bA.translate(-bh,-bg);for(var bD=-90;bD<=90;bD+=bC){if(bD%45===0||bD===0){bA.strokeStyle=br.medium.getRgbaColor();bA.lineWidth=2;bA.beginPath();bA.moveTo(bk*0.5,bx*0.088785);bA.lineTo(bk*0.5,bx*0.113);bA.closePath();bA.stroke()}else{if(bD%15===0){bA.strokeStyle="#FFFFFF";bA.lineWidth=1;bA.beginPath();bA.moveTo(bk*0.5,bx*0.088785);bA.lineTo(bk*0.5,bx*0.103785);bA.closePath();bA.stroke()}else{bA.strokeStyle="#FFFFFF";bA.lineWidth=0.5;bA.beginPath();bA.moveTo(bk*0.5,bx*0.088785);bA.lineTo(bk*0.5,bx*0.093785);bA.closePath();bA.stroke()}}bA.translate(bh,bg);bA.rotate(bB,bh,bg);bA.translate(-bh,-bg)}bA.restore()};var a3=function(bB){bB.save();var bC=bk*0.037383;var bA=bx*0.056074;bB.beginPath();bB.moveTo(bC*0.5,0);bB.lineTo(0,bA);bB.lineTo(bC,bA);bB.closePath();bB.fillStyle=br.light.getRgbaColor();bB.fill();bB.strokeStyle=br.medium.getRgbaColor();bB.stroke();bB.restore()};var bs=function(){ba=true;if(a6){g(bz,bd,bh,bg,bk,bx)}bw(a4);a3(a5);bf(a8);G(a8,bv,bk,bx,true,aS,aa,R)};var bm=function(){a7.width=bo;a7.height=bo;bz=a7.getContext("2d");bb.width=bo;bb.height=bo*Math.PI;a4=bb.getContext("2d");bj.width=bo*0.037383;bj.height=bo*0.056074;a5=bj.getContext("2d");bq.width=bo;bq.height=bo;a8=bq.getContext("2d")};this.setRoll=function(bA){bA=bA%360;if(bt!==bA){bt=bA;this.repaint()}};this.getRoll=function(){return bt};this.setRollAnimated=function(bA){bA=bA%360;if(bt!==bA){var bB=this;if(undefined!==by){if(by.playing){by.stop()}}by=new Tween({},"",Tween.regularEaseInOut,bt,bA,1);by.onMotionChanged=function(bC){bt=bC.target._pos;bB.repaint()};by.start()}};this.setPitch=function(bA){bA=((bA+180-bp)%360)-180;if(bi!==bA){bi=bA;if(bi>90){bi=90-(bi-90);if(!bu){this.setRoll(bt-180)}bu=true}else{if(bi<-90){bi=-90+(-90-bi);if(!bu){this.setRoll(bt+180)}bu=true}else{bu=false}}this.repaint()}};this.getPitch=function(){return bi};this.setPitchAnimated=function(bB){if(bi!==bB){if(undefined!==bc){if(bc.playing){bc.stop()}}var bA=this;bc=new Tween({},"",Tween.regularEaseInOut,bi,bB,1);bc.onMotionChanged=function(bC){bA.setPitch(bC.target._pos)};bc.start()}};this.setPitchOffset=function(bA){bp=bA;this.repaint()};this.setFrameDesign=function(bA){bm();bd=bA;bs();this.repaint()};this.setForegroundType=function(bA){bm();bv=bA;bs();this.repaint()};this.repaint=function(){if(!ba){bs()}bl.save();bl.clearRect(0,0,bl.canvas.width,bl.canvas.height);bl.drawImage(a7,0,0);bl.save();bl.beginPath();bl.arc(bh,bg,bk*0.831775/2,0,Math.PI*2,true);bl.closePath();bl.clip();bl.translate(bh,bg);bl.rotate(-(bt*Math.PI/180));bl.translate(-bh,0);bl.translate(0,(bi*bn));bl.drawImage(bb,0,-bb.height/2);bl.translate(0,-(bi*bn)-bg);bl.drawImage(bj,(bk*0.5-bj.width/2),(bk*0.107476));bl.restore();bl.drawImage(bq,0,0)};this.repaint();return this};var ay=function(a7,be){be=be||{};var bh=(undefined===be.size?32:be.size);var a6=(undefined===be.ledColor?steelseries.LedColor.RED_LED:be.ledColor);var bg=false;var a5=0;var a4=H.getElementById(a7).getContext("2d");a4.save();a4.clearRect(0,0,a4.canvas.width,a4.canvas.height);a4.canvas.width=bh;a4.canvas.height=bh;var a9=false;var bd=H.createElement("canvas");bd.width=bh;bd.height=bh;var bc=bd.getContext("2d");var a3=H.createElement("canvas");a3.width=bh;a3.height=bh;var a8=a3.getContext("2d");var bb=a3;var bf=function(){a9=true;bc.clearRect(0,0,bc.canvas.width,bc.canvas.height);bc.drawImage(aj(bh,1,a6),0,0);a8.clearRect(0,0,a8.canvas.width,a8.canvas.height);a8.drawImage(aj(bh,0,a6),0,0)};this.toggleLed=function(){if(bb===bd){bb=a3}else{bb=bd}ba()};this.setLedColor=function(bi){a6=bi;a9=false;ba()};this.setLedOnOff=function(bi){if(true===bi){bb=bd}else{bb=a3}ba()};this.blink=function(bi){if(bi){if(!bg){a5=setInterval(this.toggleLed,1000);bg=true}}else{if(bg){clearInterval(a5);bg=false}}};var ba=function(){if(!a9){bf()}a4.save();a4.clearRect(0,0,a4.canvas.width,a4.canvas.height);a4.drawImage(bb,0,0);a4.restore()};ba();return this};var f=function(bg,bT){bT=bT||{};var bf=(undefined===bT.size?200:bT.size);var a6=(undefined===bT.frameDesign?steelseries.FrameDesign.METAL:bT.frameDesign);var bG=(undefined===bT.frameVisible?true:bT.frameVisible);var bs=(undefined===bT.pointerType?steelseries.PointerType.TYPE1:bT.pointerType);var b0=(undefined===bT.pointerColor?(bs===steelseries.PointerType.TYPE1?steelseries.ColorDef.GRAY:steelseries.ColorDef.BLACK):bT.pointerColor);var a5=(undefined===bT.backgroundColor?(bs===steelseries.PointerType.TYPE1?steelseries.BackgroundColor.ANTHRACITE:steelseries.BackgroundColor.LIGHT_GRAY):bT.backgroundColor);var bY=(undefined===bT.foregroundType?steelseries.ForegroundType.TYPE1:bT.foregroundType);var b5=(undefined===bT.customLayer?null:bT.customLayer);var bv=(undefined===bT.isAutomatic?true:bT.isAutomatic);var by=(undefined===bT.hour?11:bT.hour);var bj=(undefined===bT.minute?5:bT.minute);var bC=(undefined===bT.second?0:bT.second);var b3=(undefined===bT.secondMovesContinuous?false:bT.secondMovesContinuous);var bN=(undefined===bT.timeZoneOffsetHour?0:bT.timeZoneOffsetHour);var bE=(undefined===bT.timeZoneOffsetMinute?0:bT.timeZoneOffsetMinute);var bu=(undefined===bT.secondPointerVisible?true:bT.secondPointerVisible);var bF=new Date();var bM;var bH;var bV;var bw;var a7=(b3?100:1000);a7=(bu?a7:100);var bi=this;var bP=Math.PI/2;var bb=Math.PI*2;var bO=Math.PI/180;var ba=6;var bS=H.getElementById(bg).getContext("2d");bS.save();bS.clearRect(0,0,bS.canvas.width,bS.canvas.height);bS.canvas.width=bf;bS.canvas.height=bf;var b2=bf;var bJ=bf;var a9=b2/2;var a8=bJ/2;var bl=false;var bm=O(bf,bf);var bc=bm.getContext("2d");var bK=O(bf,bf);var a4=bK.getContext("2d");var bn=O(bf,bf);var bd=bn.getContext("2d");var bU=O(bf,bf);var bh=bU.getContext("2d");var bA=O(bf,bf);var bB=bA.getContext("2d");var b1=O(bf,bf);var bz=b1.getContext("2d");var bL=O(bf,bf);var bX=bL.getContext("2d");var be=O(bf,bf);var bq=be.getContext("2d");var bp=O(bf,bf);var bk=bp.getContext("2d");var bQ=O(bf,bf);var bx=bQ.getContext("2d");var bZ=function(b6,cc){var ca;var b9;var cb;var b7,b8;b7=b2*0.405;b6.save();b6.translate(a9,a8);switch(cc.type){case"type1":b9=b2*0.074766;b8=b7-b9;b6.strokeStyle=a5.labelColor.getRgbaColor();b6.lineWidth=b2*0.014018;for(ca=0;ca<360;ca+=30){b6.beginPath();b6.moveTo(b7,0);b6.lineTo(b8,0);b6.closePath();b6.stroke();b6.rotate(30*bO)}cb=b2*0.126168;b8=b7-cb;b6.lineWidth=b2*0.03271;for(ca=0;ca<360;ca+=90){b6.beginPath();b6.moveTo(b7,0);b6.lineTo(b8,0);b6.closePath();b6.stroke();b6.rotate(90*bO)}break;case"type2":default:b9=b2*0.037383;b8=b7-b9;b6.strokeStyle=a5.labelColor.getRgbaColor();b6.lineWidth=b2*0.009345;for(ca=0;ca<360;ca+=6){b6.beginPath();b6.moveTo(b7,0);b6.lineTo(b8,0);b6.closePath();b6.stroke();b6.rotate(6*bO)}cb=b2*0.084112;b8=b7-cb;b6.lineWidth=b2*0.028037;for(ca=0;ca<360;ca+=30){b6.beginPath();b6.moveTo(b7,0);b6.lineTo(b8,0);b6.closePath();b6.stroke();b6.rotate(30*bO)}break}b6.translate(-a9,-a8);b6.restore()};var b4=function(b6,b7,b9){b6.save();var b8;if(b9){b6.fillStyle="rgba(0, 0, 0, 0.5)";b6.strokeStyle="rgba(0, 0, 0, 0.5)"}switch(b7.type){case"type2":b6.beginPath();b6.lineWidth=b2*0.046728;b6.moveTo(a9,b2*0.289719);b6.lineTo(a9,b2*0.289719+b2*0.224299);if(!b9){b6.strokeStyle=b0.medium.getRgbaColor()}b6.closePath();b6.stroke();break;case"type1":default:b6.beginPath();b6.moveTo(b2*0.471962,bJ*0.560747);b6.lineTo(b2*0.471962,bJ*0.214953);b6.lineTo(b2*0.5,bJ*0.182242);b6.lineTo(b2*0.528037,bJ*0.214953);b6.lineTo(b2*0.528037,bJ*0.560747);b6.lineTo(b2*0.471962,bJ*0.560747);b6.closePath();if(!b9){b8=b6.createLinearGradient(b2*0.471962,bJ*0.560747,b2*0.528037,bJ*0.214953);b8.addColorStop(1,b0.veryLight.getRgbaColor());b8.addColorStop(0,b0.light.getRgbaColor());b6.fillStyle=b8;b6.strokeStyle=b0.light.getRgbaColor()}b6.fill();b6.stroke();break}if(b9){al(b6,b2,bJ,Math.floor(b2*0.006))}b6.restore()};var a3=function(b6,b7,b9){b6.save();var b8;if(b9){b6.fillStyle="rgba(0, 0, 0, 0.4)";b6.strokeStyle="rgba(0, 0, 0, 0.4)"}switch(b7.type){case"type2":b6.beginPath();b6.lineWidth=b2*0.03271;b6.moveTo(a9,b2*0.116822);b6.lineTo(a9,b2*0.116822+b2*0.38785);if(!b9){b6.strokeStyle=b0.medium.getRgbaColor()}b6.closePath();b6.stroke();break;case"type1":default:b6.beginPath();b6.moveTo(b2*0.518691,bJ*0.574766);b6.lineTo(b2*0.523364,bJ*0.135514);b6.lineTo(b2*0.5,bJ*0.107476);b6.lineTo(b2*0.476635,bJ*0.140186);b6.lineTo(b2*0.476635,bJ*0.574766);b6.lineTo(b2*0.518691,bJ*0.574766);b6.closePath();if(!b9){b8=b6.createLinearGradient(b2*0.518691,bJ*0.574766,b2*0.476635,bJ*0.140186);b8.addColorStop(1,b0.veryLight.getRgbaColor());b8.addColorStop(0,b0.light.getRgbaColor());b6.fillStyle=b8;b6.strokeStyle=b0.light.getRgbaColor()}b6.fill();b6.stroke();break}if(b9){al(b6,b2,bJ,Math.floor(b2*0.006))}b6.restore()};var br=function(b6,b7,b9){b6.save();var b8;if(b9){b6.fillStyle="rgba(0, 0, 0, 0.5)";b6.strokeStyle="rgba(0, 0, 0, 0.5)"}else{b6.fillStyle=steelseries.ColorDef.RED.medium.getRgbaColor();b6.strokeStyle=steelseries.ColorDef.RED.medium.getRgbaColor()}switch(b7.type){case"type2":b6.lineWidth=b2*0.009345;b6.beginPath();b6.moveTo(a9,b2*0.09813);b6.lineTo(a9,b2*0.09813+b2*0.126168);b6.closePath();b6.stroke();b6.lineWidth=b2*0.018691;b6.beginPath();b6.moveTo(a9,b2*0.308411);b6.lineTo(a9,b2*0.308411+b2*0.191588);b6.closePath();b6.stroke();b6.lineWidth=b2*0.016;b6.beginPath();b6.arc(a9,b2*0.26,b2*0.085/2,0,bb);b6.closePath();b6.stroke();break;case"type1":default:b6.beginPath();b6.moveTo(b2*0.509345,bJ*0.116822);b6.lineTo(b2*0.509345,bJ*0.574766);b6.lineTo(b2*0.490654,bJ*0.574766);b6.lineTo(b2*0.490654,bJ*0.116822);b6.lineTo(b2*0.509345,bJ*0.116822);b6.closePath();if(!b9){b8=b6.createLinearGradient(b2*0.509345,bJ*0.116822,b2*0.490654,bJ*0.574766);b8.addColorStop(0,steelseries.ColorDef.RED.light.getRgbaColor());b8.addColorStop(0.47,steelseries.ColorDef.RED.medium.getRgbaColor());b8.addColorStop(1,steelseries.ColorDef.RED.dark.getRgbaColor());b6.fillStyle=b8;b6.strokeStyle=steelseries.ColorDef.RED.dark.getRgbaColor()}b6.fill();b6.stroke();break}if(b9){al(b6,b2,bJ,Math.floor(b2*0.006))}b6.restore()};var bt=function(b7){var b6=b2*0.006;var b8;b7.beginPath();b7.arc(a9,a8,b2*0.045,0,bb);b7.closePath();b8=b7.createLinearGradient(a9-b2*0.045/2,a8-b2*0.045/2,a9+b2*0.045/2,a8+b2*0.045/2);b8.addColorStop(0,"#eef0f2");b8.addColorStop(1,"#65696d");b7.fillStyle=b8;b7.fill()};var bI=function(b7,b8){var b6=b2*0.006;var b9;b7.save();switch(b8.type){case"type2":b7.fillStyle="#000000";b7.beginPath();b7.arc(a9,a8,b2*0.088785/2,0,bb);b7.closePath();b7.fill();break;case"type1":default:b9=b7.createLinearGradient(a9-b2*0.027/2,a8-b2*0.027/2,a9+b2*0.027/2,a8+b2*0.027/2);b9.addColorStop(0,"#f3f4f7");b9.addColorStop(0.11,"#f3f5f7");b9.addColorStop(0.12,"#f1f3f5");b9.addColorStop(0.2,"#c0c5cb");b9.addColorStop(0.2,"#bec3c9");b9.addColorStop(1,"#bec3c9");b7.fillStyle=b9;b7.beginPath();b7.arc(a9,a8,b2*0.027,0,bb);b7.closePath();b7.fill();break}b7.restore()};var bD=function(b6,b8,b7){bV=b7*ba*bO;bM=b8*ba*bO;bH=(b6+b8/60)*ba*5*bO};var bo=function(){if(bv){bF=new Date()}else{bF.setHours(by);bF.setMinutes(bj);bF.setSeconds(bC)}bC=bF.getSeconds()+(b3?bF.getMilliseconds()/1000:0);if(bN!=0&&bE!=0){by=bF.getUTCHours()+bN}else{by=bF.getHours()}by=by%12;if(bN!=0&&bE!=0){bj=bF.getUTCMinutes()+bE}else{bj=bF.getMinutes()}if(bj>60){bj-=60;by++}if(bj<0){bj+=60;by--}by=by%12;bD(by,bj,bC);if(bv){bw=setTimeout(bo,a7)}bi.repaint()};var bR=function(b7){b7=b7||{};var b8=(undefined===b7.frame?false:b7.frame);var b9=(undefined===b7.background?false:b7.background);var ca=(undefined===b7.pointers?false:b7.pointers);var b6=(undefined===b7.foreground?false:b7.foreground);bl=true;if(b8&&bG){g(bc,a6,a9,a8,b2,bJ)}if(b9){a0(a4,a5,a9,a8,b2,bJ);W(a4,b5,a9,a8,b2,bJ);bZ(a4,bs)}if(ca){b4(bd,bs,false);b4(bh,bs,true);a3(bB,bs,false);a3(bz,bs,true);br(bX,bs,false);br(bq,bs,true)}if(b6){bI(bx,bs);G(bx,bY,b2,bJ,false)}};var bW=function(b7){b7=b7||{};var b8=(undefined===b7.frame?false:b7.frame);var b9=(undefined===b7.background?false:b7.background);var ca=(undefined===b7.pointers?false:b7.pointers);var b6=(undefined===b7.foreground?false:b7.foreground);if(b8){bm.width=bf;bm.height=bf;bc=bm.getContext("2d")}if(b9){bK.width=bf;bK.height=bf;a4=bK.getContext("2d")}if(ca){bn.width=bf;bn.height=bf;bd=bn.getContext("2d");bU.width=bf;bU.height=bf;bh=bU.getContext("2d");bA.width=bf;bA.height=bf;bB=bA.getContext("2d");b1.width=bf;b1.height=bf;bz=b1.getContext("2d");bL.width=bf;bL.height=bf;bX=bL.getContext("2d");be.width=bf;be.height=bf;bq=be.getContext("2d");bp.width=bf;bp.height=bf;bk=bp.getContext("2d")}if(b6){bQ.width=bf;bQ.height=bf;bx=bQ.getContext("2d")}};this.getAutomatic=function(){return bv};this.setAutomatic=function(b6){if(bv&&!b6){clearTimer(bw);bv=b6}else{if(!bv&&b6){bv=b6;bo()}}};this.getHour=function(){return by};this.setHour=function(b6){b6=b6%12;if(by!==b6){by=b6;bD(by,bj,bC);this.repaint()}};this.getMinute=function(){return bj};this.setMinute=function(b6){b6=b6%60;if(bj!==b6){bj=b6;bD(by,bj,bC);this.repaint()}};this.getSecond=function(){return bC};this.setSecond=function(b6){bC=b6%60;if(bC!==b6){bC=b6;bD(by,bj,bC);this.repaint()}};this.getTimeZoneOffsetHour=function(){return bN};this.setTimeZoneOffsetHour=function(b6){bN=b6;this.repaint()};this.getTimeZoneOffsetMinute=function(){return bE};this.setTimeZoneOffsetMinute=function(b6){bE=b6;this.repaint()};this.getSecondPointerVisible=function(){return bu};this.setSecondPointerVisible=function(b6){bu=b6;this.repaint()};this.getSecondMovesContinuous=function(){return b3};this.setSecondMovesContinuous=function(b6){b3=b6;a7=(b3?100:1000);a7=(bu?a7:100)};this.setFrameDesign=function(b6){bW({frame:true});a6=b6;bR({frame:true});this.repaint()};this.setBackgroundColor=function(b6){bW({frame:true,background:true});a5=b6;bR({frame:true,background:true});this.repaint()};this.setForegroundType=function(b6){bW({foreground:true});bY=b6;bR({foreground:true});this.repaint()};this.setPointerType=function(b6){bW({foreground:true,pointers:true});bs=b6;if(bs.type==="type1"){b0=steelseries.ColorDef.GRAY;a5=steelseries.BackgroundColor.ANTHRACITE}else{b0=steelseries.ColorDef.BLACK;a5=steelseries.BackgroundColor.LIGHT_GRAY}bR({background:true,foreground:true,pointers:true});this.repaint()};this.setPointerColor=function(b6){bW({pointers:true});b0=b6;bR({pointers:true});this.repaint()};this.repaint=function(){if(!bl){bR({frame:true,background:true,pointers:true,foreground:true})}bS.clearRect(0,0,bS.canvas.width,bS.canvas.height);bS.drawImage(bm,0,0);bS.drawImage(bK,0,0);var b6=b2*0.006;bk.clearRect(0,0,b2,bJ);bk.save();bk.translate(a9,a8);bk.rotate(bH);bk.translate(-a9,-a8);bk.drawImage(bU,0,0);bk.restore();bS.drawImage(bp,0,0,b2,bJ,b6,b6,b2+b6,bJ+b6);bS.save();bS.translate(a9,a8);bS.rotate(bH);bS.translate(-a9,-a8);bS.drawImage(bn,0,0);bS.restore();bk.clearRect(0,0,b2,bJ);bk.save();bk.translate(a9,a8);bk.rotate(bM);bk.translate(-a9,-a8);bk.drawImage(b1,0,0);bk.restore();bS.drawImage(bp,0,0,b2,bJ,b6,b6,b2+b6,bJ+b6);bS.save();bS.translate(a9,a8);bS.rotate(bM);bS.translate(-a9,-a8);bS.drawImage(bA,0,0);bS.restore();if(bs.type==="type1"){bt(bS)}if(bu){bk.clearRect(0,0,b2,bJ);bk.save();bk.translate(a9,a8);bk.rotate(bV);bk.translate(-a9,-a8);bk.drawImage(be,0,0);bk.restore();bS.drawImage(bp,0,0,b2,bJ,b6,b6,b2+b6,bJ+b6);bS.save();bS.translate(a9,a8);bS.rotate(bV);bS.translate(-a9,-a8);bS.drawImage(bL,0,0);bS.restore()}bS.drawImage(bQ,0,0)};bo();return this};var ag=function(a6,a9){a9=a9||{};var a8=(undefined===a9.size?50:a9.size);var ba=(undefined===a9.value?50:a9.value);var a5=a8;var a4=Math.ceil(a8*0.45);var a7=H.getElementById(a6).getContext("2d");a7.save();a7.clearRect(0,0,a7.canvas.width,a7.canvas.height);a7.canvas.width=a5;a7.canvas.height=a5;var a3=function(bo,bk,bi,bm){var bl;bo.beginPath();bo.moveTo(bk*0.025,bi*0.055555);bo.lineTo(bk*0.9,bi*0.055555);bo.lineTo(bk*0.9,bi*0.944444);bo.lineTo(bk*0.025,bi*0.944444);bo.lineTo(bk*0.025,bi*0.055555);bo.closePath();bo.beginPath();bo.moveTo(bk*0.925,0);bo.lineTo(0,0);bo.lineTo(0,bi);bo.lineTo(bk*0.925,bi);bo.lineTo(bk*0.925,bi*0.722222);bo.bezierCurveTo(bk*0.925,bi*0.722222,bk*0.975,bi*0.722222,bk*0.975,bi*0.722222);bo.bezierCurveTo(bk,bi*0.722222,bk,bi*0.666666,bk,bi*0.666666);bo.bezierCurveTo(bk,bi*0.666666,bk,bi*0.333333,bk,bi*0.333333);bo.bezierCurveTo(bk,bi*0.333333,bk,bi*0.277777,bk*0.975,bi*0.277777);bo.bezierCurveTo(bk*0.975,bi*0.277777,bk*0.925,bi*0.277777,bk*0.925,bi*0.277777);bo.lineTo(bk*0.925,0);bo.closePath();bl=bo.createLinearGradient(0,0,0,bi);bl.addColorStop(0,"#ffffff");bl.addColorStop(1,"#7e7e7e");bo.fillStyle=bl;bo.fill();bo.beginPath();var bf=Math.max(bk*0.875*(bm/100),Math.ceil(bk*0.01));bo.rect(bk*0.025,bk*0.025,bf,bi*0.888888);bo.closePath();var bb=[0,0.4,1];var bc=[new Q(177,25,2,1),new Q(219,167,21,1),new Q(121,162,75,1)];var be=new M(0,100,bb,bc);bo.fillStyle=be.getColorAt(bm/100).getRgbColor();bo.fill();bo.beginPath();bf=Math.max(bf-bk*0.05,0);bo.rect(bk*0.05,bk*0.05,bf,bi*0.777777);bo.closePath();var bg=[new Q(198,39,5,1),new Q(228,189,32,1),new Q(163,216,102,1)];var bd=[new Q(246,121,48,1),new Q(246,244,157,1),new Q(223,233,86,1)];var bn=[0,0.4,1];var bj=new M(0,100,bn,bg);var bh=new M(0,100,bn,bd);bl=bo.createLinearGradient(bk*0.05,0,bk*0.875,0);bl.addColorStop(0,bj.getColorAt(bm/100).getRgbColor());bl.addColorStop(0.5,bh.getColorAt(bm/100).getRgbColor());bl.addColorStop(1,bj.getColorAt(bm/100).getRgbColor());bo.fillStyle=bl;bo.fill();bo.beginPath();bo.rect(bk*0.025,bk*0.025,bk*0.875,bi*0.444444);bo.closePath();bl=bo.createLinearGradient(bk*0.025,bk*0.025,bk*0.875,bi*0.444444);bl.addColorStop(0,"rgba(255, 255, 255, 0)");bl.addColorStop(1,"rgba(255, 255, 255, 0.8)");bo.fillStyle=bl;bo.fill()};this.setValue=function(bb){bb=(bb<0?0:(bb>100?100:bb));if(ba!==bb){ba=bb;this.repaint()}};this.getValue=function(){return ba};this.repaint=function(){a7.clearRect(0,0,a7.canvas.width,a7.canvas.height);a3(a7,a5,a4,ba)};this.repaint();return this};var ak=function(bh,bN){bN=bN||{};var bg=(undefined===bN.size?200:bN.size);var a6=(undefined===bN.frameDesign?steelseries.FrameDesign.METAL:bN.frameDesign);var bA=(undefined===bN.frameVisible?true:bN.frameVisible);var bT=(undefined===bN.pointerColor?steelseries.ColorDef.BLACK:bN.pointerColor);var a4=(undefined===bN.backgroundColor?steelseries.BackgroundColor.LIGHT_GRAY:bN.backgroundColor);var bR=(undefined===bN.foregroundType?steelseries.ForegroundType.TYPE1:bN.foregroundType);var bV=(undefined===bN.customLayer?null:bN.customLayer);var bE=0;var bO=0;var bt;var a9=6;var bc=Math.PI*2;var bF=Math.PI/180;var bi=this;var bx=0;var bp=0;var bG=0;var bo=0;var bw=0;var bz=false;var bC=false;var bM=H.getElementById(bh).getContext("2d");bM.save();bM.clearRect(0,0,bM.canvas.width,bM.canvas.height);bM.canvas.width=bg;bM.canvas.height=bg;var bU=bg;var bB=bg;var a8=bU/2;var a7=bB/2;var bs=0.285*bU;var bI=a8-bs/2;var bQ=0.17*bU;var bm=false;var bn=O(bg,bg);var bd=bn.getContext("2d");var bD=O(bg,bg);var a3=bD.getContext("2d");var bv=O(bg,bg);var ba=bv.getContext("2d");var bJ=O(bg,bg);var bf=bJ.getContext("2d");var bb=O(bg,bg);var be=bb.getContext("2d");var bk=O(bg,bg);var bL=bk.getContext("2d");var br=O(bg,bg);var bj=br.getContext("2d");var bH=O(bg,bg);var bu=bH.getContext("2d");var bS=function(ck,ch,cd,b9,ce,cc,cf){var ca;ck.width=ck.height=ch;var co=b9*ch;var b0=co+"px sans-serif";var b5=ch*0.15;var bY=0.5;var cb=1;var b7=1.5;var b4=ce*ch;var cg=Math.round(0.025*ch);var b1=Math.round(0.035*ch);var cm=Math.round(0.045*ch);var b8=a4.labelColor.getRgbaColor();var cq=a4.labelColor.getRgbaColor();var cp=ch/2;var cj=ch*0.4;var b6=0;var bX=0;var ci=0;var bW=0;var cn=0;var b2;var bZ=-Math.PI;var b3;var cl=(2*Math.PI)/(cd);ck.save();ck.textAlign="center";ck.textBaseline="middle";ck.font=b0;for(b2=bZ,b3=0;b3<=cd+1;b2-=cl*0.1,b3+=0.1){ck.lineWidth=bY;bW=Math.sin(b2);cn=Math.cos(b2);if(b6%2===0){innerPoint=[cp+(cj-cg)*bW+cc,cp+(cj-cg)*cn+cf];outerPoint=[cp+cj*bW+cc,cp+cj*cn+cf];ck.strokeStyle=cq;ck.beginPath();ck.moveTo(innerPoint[0],innerPoint[1]);ck.lineTo(outerPoint[0],outerPoint[1]);ck.closePath();ck.stroke()}if(b6===10||b6===0){ck.fillStyle=b8;ck.lineWidth=cb;outerPoint=[cp+cj*bW+cc,cp+cj*cn+cf];textPoint=[cp+(cj-b4)*bW+cc,cp+(cj-b4)*cn+cf];if(bX===5){if(b3!==cd){if(Math.round(b3)!==60){ck.fillText(Math.round(b3),textPoint[0],textPoint[1],b5)}}ck.lineWidth=b7;innerPoint=[cp+(cj-cm)*bW+cc,cp+(cj-cm)*cn+cf];bX=0}else{ck.lineWidth=cb;innerPoint=[cp+(cj-b1)*bW+cc,cp+(cj-b1)*cn+cf]}ck.strokeStyle=cq;ck.beginPath();ck.moveTo(innerPoint[0],innerPoint[1]);ck.lineTo(outerPoint[0],outerPoint[1]);ck.closePath();ck.stroke();b6=0;ci++;bX++}b6++}ck.restore()};var a5=function(bX,bZ){var bY;bX.save();bX.beginPath();bX.moveTo(bU*0.509345,bU*0.457943);bX.lineTo(bU*0.5,bU*0.102803);bX.lineTo(bU*0.490654,bU*0.457943);bX.bezierCurveTo(bU*0.490654,bU*0.457943,bU*0.490654,bU*0.457943,bU*0.490654,bU*0.457943);bX.bezierCurveTo(bU*0.471962,bU*0.462616,bU*0.457943,bU*0.481308,bU*0.457943,bU*0.5);bX.bezierCurveTo(bU*0.457943,bU*0.518691,bU*0.471962,bU*0.537383,bU*0.490654,bU*0.542056);bX.bezierCurveTo(bU*0.490654,bU*0.542056,bU*0.490654,bU*0.542056,bU*0.490654,bU*0.542056);bX.lineTo(bU*0.490654,bU*0.621495);bX.lineTo(bU*0.509345,bU*0.621495);bX.lineTo(bU*0.509345,bU*0.542056);bX.bezierCurveTo(bU*0.509345,bU*0.542056,bU*0.509345,bU*0.542056,bU*0.509345,bU*0.542056);bX.bezierCurveTo(bU*0.528037,bU*0.537383,bU*0.542056,bU*0.518691,bU*0.542056,bU*0.5);bX.bezierCurveTo(bU*0.542056,bU*0.481308,bU*0.528037,bU*0.462616,bU*0.509345,bU*0.457943);bX.bezierCurveTo(bU*0.509345,bU*0.457943,bU*0.509345,bU*0.457943,bU*0.509345,bU*0.457943);bX.closePath();if(bZ){bX.fillStyle="rgba(0, 0, 0, 0.5)";bX.strokeStyle="rgba(0, 0, 0, 0.5)";bX.fill()}else{bY=bX.createLinearGradient(0,0,0,bU*0.621495);bY.addColorStop(0,bT.medium.getRgbaColor());bY.addColorStop(0.388888,bT.medium.getRgbaColor());bY.addColorStop(0.5,bT.light.getRgbaColor());bY.addColorStop(0.611111,bT.medium.getRgbaColor());bY.addColorStop(1,bT.medium.getRgbaColor());bX.fillStyle=bY;bX.strokeStyle=bT.dark.getRgbaColor();bX.fill();bX.stroke()}if(!bZ){bX.beginPath();var bW=bU*0.06542/2;bX.arc(a8,a7,bW,0,bc);bY=bX.createLinearGradient(a8-bW,a8+bW,0,a8+bW);bY.addColorStop(0,"#e6b35c");bY.addColorStop(0.01,"#e6b35c");bY.addColorStop(0.99,"#c48200");bY.addColorStop(1,"#c48200");bX.fillStyle=bY;bX.closePath();bX.fill();bX.beginPath();bW=bU*0.046728/2;bX.arc(a8,a7,bW,0,bc);bY=bX.createRadialGradient(a8,a8,0,a8,a8,bW);bY.addColorStop(0,"#c5c5c5");bY.addColorStop(0.19,"#c5c5c5");bY.addColorStop(0.22,"#000000");bY.addColorStop(0.8,"#000000");bY.addColorStop(0.99,"#707070");bY.addColorStop(1,"#707070");bX.fillStyle=bY;bX.closePath();bX.fill()}else{al(bX,bU,bB,Math.floor(bU*0.006))}bX.restore()};var bl=function(bX,bZ){var bY;bX.save();bX.beginPath();bX.moveTo(bU*0.476635,bU*0.313084);bX.bezierCurveTo(bU*0.476635,bU*0.322429,bU*0.485981,bU*0.331775,bU*0.495327,bU*0.336448);bX.bezierCurveTo(bU*0.495327,bU*0.336448,bU*0.495327,bU*0.350467,bU*0.495327,bU*0.350467);bX.lineTo(bU*0.504672,bU*0.350467);bX.bezierCurveTo(bU*0.504672,bU*0.350467,bU*0.504672,bU*0.336448,bU*0.504672,bU*0.336448);bX.bezierCurveTo(bU*0.514018,bU*0.331775,bU*0.523364,bU*0.322429,bU*0.523364,bU*0.313084);bX.bezierCurveTo(bU*0.523364,bU*0.303738,bU*0.514018,bU*0.294392,bU*0.504672,bU*0.289719);bX.bezierCurveTo(bU*0.504672,bU*0.289719,bU*0.5,bU*0.200934,bU*0.5,bU*0.200934);bX.bezierCurveTo(bU*0.5,bU*0.200934,bU*0.495327,bU*0.289719,bU*0.495327,bU*0.289719);bX.bezierCurveTo(bU*0.485981,bU*0.294392,bU*0.476635,bU*0.303738,bU*0.476635,bU*0.313084);bX.closePath();if(bZ){bX.fillStyle="rgba(0, 0, 0, 0.5)";bX.strokeStyle="rgba(0, 0, 0, 0.5)";bX.fill()}else{bY=bX.createLinearGradient(0,0,bU,0);bY.addColorStop(0,bT.medium.getRgbaColor());bY.addColorStop(0.388888,bT.medium.getRgbaColor());bY.addColorStop(0.5,bT.light.getRgbaColor());bY.addColorStop(0.611111,bT.medium.getRgbaColor());bY.addColorStop(1,bT.medium.getRgbaColor());bX.fillStyle=bY;bX.strokeStyle=bT.dark.getRgbaColor();bX.fill();bX.stroke()}if(!bZ){bX.beginPath();var bW=bU*0.037383/2;bX.arc(a8,bQ+bs/2,bW,0,bc);bX.fillStyle="#C48200";bX.closePath();bX.fill();bX.beginPath();bW=bU*0.028037/2;bX.arc(a8,bQ+bs/2,bW,0,bc);bX.fillStyle="#999999";bX.closePath();bX.fill();bX.beginPath();bW=bU*0.018691/2;bX.arc(a8,bQ+bs/2,bW,0,bc);bX.fillStyle="#000000";bX.closePath();bX.fill()}else{al(bX,bU,bB,Math.floor(bU*0.006))}bX.restore()};var by=function(){bp=new Date().getTime()-bx;bO=(bp*a9/1000);bE=(bO%10800)/30;bG=(bp/60000)%30;bo=(bp/1000)%60;bw=(bp)%1000};var bK=function(bX){bX=bX||{};var bY=(undefined===bX.frame?false:bX.frame);var bZ=(undefined===bX.background?false:bX.background);var b0=(undefined===bX.pointers?false:bX.pointers);var bW=(undefined===bX.foreground?false:bX.foreground);bm=true;if(bY&&bA){g(bd,a6,a8,a7,bU,bB)}if(bZ){a0(a3,a4,a8,a7,bU,bB);W(a3,bV,a8,a7,bU,bB);bS(a3,bU,60,0.075,0.1,0,0);bS(a3,bs,30,0.095,0.13,bI,bQ)}if(b0){a5(be,false);a5(bL,true);bl(ba,false);bl(bf,true)}if(bW){G(bu,bR,bU,bB,false)}};var bP=function(bX){bX=bX||{};var bY=(undefined===bX.frame?false:bX.frame);var bZ=(undefined===bX.background?false:bX.background);var b0=(undefined===bX.pointers?false:bX.pointers);var bW=(undefined===bX.foreground?false:bX.foreground);if(bY){bn.width=bg;bn.height=bg;bd=bn.getContext("2d")}if(bZ){bD.width=bg;bD.height=bg;a3=bD.getContext("2d")}if(b0){bv.width=bg;bv.height=bg;ba=bv.getContext("2d");bJ.width=bg;bJ.height=bg;bf=bJ.getContext("2d");bb.width=bg;bb.height=bg;be=bb.getContext("2d");bk.width=bg;bk.height=bg;bL=bk.getContext("2d");br.width=bg;br.height=bg;bj=br.getContext("2d")}if(bW){bH.width=bg;bH.height=bg;bu=bH.getContext("2d")}};var bq=function(){if(!bC){by();bi.repaint()}if(bz){bt=setTimeout(bq,200)}};this.isRunning=function(){return bz};this.start=function(){if(!bz){bz=true;bx=new Date().getTime()-bp;bq()}};this.stop=function(){if(bz){bz=false;clearTimeout(bt)}if(bC){bC=false;by();this.repaint()}};this.reset=function(){if(bz){bz=false;bC=false;clearTimeout(bt)}bx=new Date().getTime();by();this.repaint()};this.lap=function(){if(bz&&!bC){bC=true}else{if(bC){bC=false}}};this.getMeasuredTime=function(){return(bG+":"+bo+":"+bw)};this.setFrameDesign=function(bW){bP({frame:true});a6=bW;bK({frame:true});this.repaint()};this.setBackgroundColor=function(bW){bP({background:true});a4=bW;bK({background:true});this.repaint()};this.setForegroundType=function(bW){bP({foreground:true});bR=bW;bK({foreground:true});this.repaint()};this.setPointerColor=function(bW){bP({pointers:true});bT=bW;bK({pointers:true});this.repaint()};this.repaint=function(){if(!bm){bK({frame:true,background:true,pointers:true,foreground:true})}bM.clearRect(0,0,bM.canvas.width,bM.canvas.height);if(bA){bM.drawImage(bn,0,0)}bM.drawImage(bD,0,0);var bW=bU*0.006;var bX=(bE+(2*Math.sin(bE*bF)))*bF;bj.clearRect(0,0,bU,bB);bj.save();bj.translate(a8,bQ+bs/2);bj.rotate(bX);bj.translate(-a8,-(bQ+bs/2));bj.drawImage(bJ,0,0);bj.restore();bM.drawImage(br,0,0,bU,bB,bW/2,bW/2,bU+bW/2,bB+bW/2);bM.save();bM.translate(a8,bQ+bs/2);bM.rotate(bX);bM.translate(-a8,-(bQ+bs/2));bM.drawImage(bv,0,0);bM.restore();bX=(bO+(2*Math.sin(bO*bF)))*bF;bj.clearRect(0,0,bU,bB);bj.save();bj.translate(a8,a7);bj.rotate(bX);bj.translate(-a8,-a7);bj.drawImage(bk,0,0);bj.restore();bM.drawImage(br,0,0,bU,bB,bW,bW,bU+bW,bB+bW);bM.save();bM.translate(a8,a7);bM.rotate(bX);bM.translate(-a8,-a7);bM.drawImage(bb,0,0);bM.restore();bM.drawImage(bH,0,0)};bx=new Date().getTime();bq();return this};var a2=function(bh,bV){bV=bV||{};var bg=(undefined===bV.size?200:bV.size);var a7=(undefined===bV.frameDesign?steelseries.FrameDesign.METAL:bV.frameDesign);var bF=(undefined===bV.frameVisible?true:bV.frameVisible);var a4=(undefined===bV.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bV.backgroundColor);var b2=(undefined===bV.knobType?steelseries.KnobType.METAL_KNOB:bV.knobType);var bG=(undefined===bV.knobStyle?steelseries.KnobStyle.BLACK:bV.knobStyle);var bE=(undefined===bV.lcdColor?steelseries.LcdColor.BLACK:bV.lcdColor);var bP=(undefined===bV.lcdVisible?true:bV.lcdVisible);var bd=(undefined===bV.digitalFont?false:bV.digitalFont);var bY=(undefined===bV.foregroundType?steelseries.ForegroundType.TYPE1:bV.foregroundType);var b4=(undefined===bV.customLayer?null:bV.customLayer);var bb=0;var bp=10;var bN=bb;var bR=0;var bq=0;var bo=0;var bl;var bJ;var bm;var bS=1;var bs;var bU=H.getElementById(bh).getContext("2d");bU.save();bU.clearRect(0,0,bU.canvas.width,bU.canvas.height);bU.canvas.width=bg;bU.canvas.height=bg;var b3=bg;var bH=bg;var a9=b3/2;var a8=bH/2;var bD=Math.floor(b3*0.09)+"px sans-serif";var bO=Math.PI/2;var bM=Math.PI/180;var bx=Math.PI;var bn=false;var br=O(bg,bg);var bc=br.getContext("2d");var bK=O(bg,bg);var a3=bK.getContext("2d");var b0;var bf=O(bg,bg);var bI=bf.getContext("2d");var ba=O(bg,bg);var bX=ba.getContext("2d");var bv=O(bg,bg);var a5=bv.getContext("2d");var bC=O(bg,bg);var bz=bC.getContext("2d");var bi=O(bg,bg);var bj=bi.getContext("2d");var bB=O(bg,bg);var b1=bB.getContext("2d");var bu=O(bg,bg);var bk=bu.getContext("2d");var bQ=O(bg,bg);var bw=bQ.getContext("2d");var bt=function(b5){bU.save();bU.textAlign="right";bU.textBaseline="middle";bU.strokeStyle=bE.textColor;bU.fillStyle=bE.textColor;if(bE===steelseries.LcdColor.STANDARD||bE===steelseries.LcdColor.STANDARD_GREEN){bU.shadowColor="gray";bU.shadowOffsetX=b3*0.007;bU.shadowOffsetY=b3*0.007;bU.shadowBlur=b3*0.009}if(bd){bU.font=Math.floor(b3*0.075)+"px LCDMono2Ultra"}else{bU.font=Math.floor(b3*0.075)+"px sans-serif"}bU.fillText(Math.round(b5),(b3+(b3*0.4))/2-4,b3*0.607,b3*0.4);bU.restore()};var bZ=function(cl,cr,cb,cp,cd,ch,cn,cg,b6,cj){var ci=Math.max(b3*0.012,2);var b7=Math.max(b3*0.007,1.5);var ce=b3*0.13;var b9=b3*0.05;var co=b3*0.07;var cm=b3*0.4;var cf=0;var ck=0;var b5=0;var cq=0;var ca;var cc;var b8=-cb-(cr/2);cl.save();cl.textAlign="center";cl.textBaseline="middle";cl.font=bD;cl.strokeStyle=a4.labelColor.getRgbaColor();cl.fillStyle=a4.labelColor.getRgbaColor();for(ca=b8,cc=0;cc<=10;ca-=ch*0.1,cc+=0.1){b5=Math.sin(ca);cq=Math.cos(ca);if(cf%2===0){cl.lineWidth=b7;cl.beginPath();cl.moveTo(a9+(cm-b9)*b5,a8+(cm-b9)*cq);cl.lineTo(a9+cm*b5,a8+cm*cq);cl.closePath();cl.stroke()}if(cf===10||cf===0){cl.lineWidth=ci;if(cr===0){if(Math.round(cc)!=bp){cl.fillText(Math.round(cc).toString(),a9+(cm-ce)*b5,a8+(cm-ce)*cq)}}cf=0;ck++;cl.beginPath();cl.moveTo(a9+(cm-co)*b5,a8+(cm-co)*cq);cl.lineTo(a9+cm*b5,a8+cm*cq);cl.closePath();cl.stroke()}cf++}cl.restore()};var be=function(b5,b7){var b6;if(b7){b5.fillStyle="rgba(0, 0, 0, 0.5)";b5.strokeStyle="rgba(0, 0, 0, 0.5)"}else{b6=b5.createLinearGradient(0,bH*0.168224,0,bH*0.626168);b6.addColorStop(0,"#ffffff");b6.addColorStop(0.31,"#ffffff");b6.addColorStop(0.3101,"#ffffff");b6.addColorStop(0.32,"#202020");b6.addColorStop(1,"#202020");b5.fillStyle=b6}b5.save();b5.beginPath();b5.moveTo(b3*0.518691,bH*0.471962);b5.bezierCurveTo(b3*0.514018,bH*0.471962,b3*0.509345,bH*0.467289,b3*0.509345,bH*0.467289);b5.lineTo(b3*0.509345,bH*0.200934);b5.lineTo(b3*0.5,bH*0.168224);b5.lineTo(b3*0.490654,bH*0.200934);b5.lineTo(b3*0.490654,bH*0.467289);b5.bezierCurveTo(b3*0.490654,bH*0.467289,b3*0.481308,bH*0.471962,b3*0.481308,bH*0.471962);b5.bezierCurveTo(b3*0.471962,bH*0.481308,b3*0.467289,bH*0.490654,b3*0.467289,bH*0.5);b5.bezierCurveTo(b3*0.467289,bH*0.514018,b3*0.476635,bH*0.528037,b3*0.490654,bH*0.53271);b5.bezierCurveTo(b3*0.490654,bH*0.53271,b3*0.490654,bH*0.579439,b3*0.490654,bH*0.588785);b5.bezierCurveTo(b3*0.485981,bH*0.593457,b3*0.481308,bH*0.59813,b3*0.481308,bH*0.607476);b5.bezierCurveTo(b3*0.481308,bH*0.616822,b3*0.490654,bH*0.626168,b3*0.5,bH*0.626168);b5.bezierCurveTo(b3*0.509345,bH*0.626168,b3*0.518691,bH*0.616822,b3*0.518691,bH*0.607476);b5.bezierCurveTo(b3*0.518691,bH*0.59813,b3*0.514018,bH*0.593457,b3*0.504672,bH*0.588785);b5.bezierCurveTo(b3*0.504672,bH*0.579439,b3*0.504672,bH*0.53271,b3*0.509345,bH*0.53271);b5.bezierCurveTo(b3*0.523364,bH*0.528037,b3*0.53271,bH*0.514018,b3*0.53271,bH*0.5);b5.bezierCurveTo(b3*0.53271,bH*0.490654,b3*0.528037,bH*0.481308,b3*0.518691,bH*0.471962);b5.closePath();b5.fill();if(b7){al(b5,b3,bH,Math.floor(b3*0.006))}b5.restore()};var by=function(b5,b7){var b6;if(b7){b5.fillStyle="rgba(0, 0, 0, 0.5)";b5.strokeStyle="rgba(0, 0, 0, 0.5)"}else{b6=b5.createLinearGradient(0,bH*0.401869,0,bH*0.616822);b6.addColorStop(0,"#ffffff");b6.addColorStop(0.51,"#ffffff");b6.addColorStop(0.52,"#ffffff");b6.addColorStop(0.5201,"#202020");b6.addColorStop(0.53,"#202020");b6.addColorStop(1,"#202020");b5.fillStyle=b6}b5.beginPath();b5.moveTo(b3*0.518691,bH*0.471962);b5.bezierCurveTo(b3*0.514018,bH*0.462616,b3*0.528037,bH*0.401869,b3*0.528037,bH*0.401869);b5.lineTo(b3*0.5,bH*0.331775);b5.lineTo(b3*0.471962,bH*0.401869);b5.bezierCurveTo(b3*0.471962,bH*0.401869,b3*0.485981,bH*0.462616,b3*0.481308,bH*0.471962);b5.bezierCurveTo(b3*0.471962,bH*0.481308,b3*0.467289,bH*0.490654,b3*0.467289,bH*0.5);b5.bezierCurveTo(b3*0.467289,bH*0.514018,b3*0.476635,bH*0.528037,b3*0.490654,bH*0.53271);b5.bezierCurveTo(b3*0.490654,bH*0.53271,b3*0.462616,bH*0.574766,b3*0.462616,bH*0.593457);b5.bezierCurveTo(b3*0.467289,bH*0.616822,b3*0.5,bH*0.612149,b3*0.5,bH*0.612149);b5.bezierCurveTo(b3*0.5,bH*0.612149,b3*0.53271,bH*0.616822,b3*0.537383,bH*0.593457);b5.bezierCurveTo(b3*0.537383,bH*0.574766,b3*0.509345,bH*0.53271,b3*0.509345,bH*0.53271);b5.bezierCurveTo(b3*0.523364,bH*0.528037,b3*0.53271,bH*0.514018,b3*0.53271,bH*0.5);b5.bezierCurveTo(b3*0.53271,bH*0.490654,b3*0.528037,bH*0.481308,b3*0.518691,bH*0.471962);b5.closePath();b5.fill();if(b7){al(b5,b3,bH,Math.floor(b3*0.006))}b5.restore()};var bL=function(b5,b6){if(b6){b5.fillStyle="rgba(0, 0, 0, 0.5)";b5.strokeStyle="rgba(0, 0, 0, 0.5)"}else{b5.fillStyle="#ffffff"}b5.beginPath();b5.moveTo(b3*0.518691,bH*0.471962);b5.bezierCurveTo(b3*0.514018,bH*0.471962,b3*0.514018,bH*0.467289,b3*0.514018,bH*0.467289);b5.lineTo(b3*0.514018,bH*0.317757);b5.lineTo(b3*0.504672,bH*0.303738);b5.lineTo(b3*0.504672,bH*0.182242);b5.lineTo(b3*0.53271,bH*0.116822);b5.lineTo(b3*0.462616,bH*0.116822);b5.lineTo(b3*0.495327,bH*0.182242);b5.lineTo(b3*0.495327,bH*0.299065);b5.lineTo(b3*0.485981,bH*0.317757);b5.lineTo(b3*0.485981,bH*0.467289);b5.bezierCurveTo(b3*0.485981,bH*0.467289,b3*0.485981,bH*0.471962,b3*0.481308,bH*0.471962);b5.bezierCurveTo(b3*0.471962,bH*0.481308,b3*0.467289,bH*0.490654,b3*0.467289,bH*0.5);b5.bezierCurveTo(b3*0.467289,bH*0.518691,b3*0.481308,bH*0.53271,b3*0.5,bH*0.53271);b5.bezierCurveTo(b3*0.518691,bH*0.53271,b3*0.53271,bH*0.518691,b3*0.53271,bH*0.5);b5.bezierCurveTo(b3*0.53271,bH*0.490654,b3*0.528037,bH*0.481308,b3*0.518691,bH*0.471962);b5.closePath();b5.fill();if(b6){al(b5,b3,bH,Math.floor(b3*0.006))}};function bA(){bl=(2*Math.PI)/(bp-bb);bJ=bl/10;bm=bJ/10}function a6(){bR=(bN%1000)/100;bq=(bN%10000)/100;bo=(bN%100000)/100}var bT=function(b6){b6=b6||{};var b7=(undefined===b6.frame?false:b6.frame);var b8=(undefined===b6.background?false:b6.background);var b9=(undefined===b6.pointers?false:b6.pointers);var b5=(undefined===b6.foreground?false:b6.foreground);bn=true;bA();if(b7&&bF){g(bc,a7,a9,a8,b3,bH)}if(b8){a0(a3,a4,a9,a8,b3,bH);W(a3,b4,a9,a8,b3,bH);bZ(a3,0,bx,0,10,bl,bS,0,true,true,null);if(bP){b0=ab(b3*0.4,bH*0.09,bE);a3.drawImage(b0,(b3-(b3*0.4))/2,bH*0.56)}}if(b9){be(bj,false);be(b1,true);by(a5,false);by(bz,true);bL(bI,false);bL(bX,true)}if(b5){G(bw,bY,b3,bH,true,b2,bG)}};var bW=function(b6){b6=b6||{};var b7=(undefined===b6.frame?false:b6.frame);var b8=(undefined===b6.background?false:b6.background);var b9=(undefined===b6.pointers?false:b6.pointers);var b5=(undefined===b6.foreground?false:b6.foreground);if(b7){br.width=bg;br.height=bg;bc=br.getContext("2d")}if(b8){bK.width=bg;bK.height=bg;a3=bK.getContext("2d")}if(b9){pointer100ftBuffer.width=bg;pointer100ftBuffer.height=bg;pointer100ftContext=pointer100ftBuffer.getContext("2d");pointer100ftShadowBuffer.width=bg;pointer100ftShadowBuffer.height=bg;pointer100ftShadowContext=pointer100ftShadowBuffer.getContext("2d");pointer1000ftBuffer.width=bg;pointer1000ftBuffer.height=bg;pointer1000ftContext=pointer1000ftBuffer.getContext("2d");pointer1000ftShadowBuffer.width=bg;pointer1000ftShadowBuffer.height=bg;pointer1000ftShadowContext=pointer1000ftShadowBuffer.getContext("2d");pointer10000ftBuffer.width=bg;pointer10000ftBuffer.height=bg;pointer10000ftContext=pointer10000ftBuffer.getContext("2d");pointer10000ftShadowBuffer.width=bg;pointer10000ftShadowBuffer.height=bg;pointer10000ftShadowContext=pointer10000ftShadowBuffer.getContext("2d");bu.width=bg;bu.height=bg;bk=bu.getContext("2d")}if(b5){bQ.width=bg;bQ.height=bg;bw=bQ.getContext("2d")}};this.setValue=function(b5){bN=b5;this.repaint()};this.getValue=function(){return bN};this.setValueAnimated=function(b8){var b5=(b8=a6;a6+=90){bd.beginPath();bd.moveTo(ba*0.560747,a7*0.584112);bd.lineTo(ba*0.640186,a7*0.644859);bd.lineTo(ba*0.584112,a7*0.560747);bd.lineTo(ba*0.560747,a7*0.584112);bd.closePath();bd.fillStyle=a3;bd.fill();bd.stroke();bd.beginPath();bd.moveTo(ba*0.523364,a7*0.397196);bd.lineTo(ba*0.5,a7*0.196261);bd.lineTo(ba*0.471962,a7*0.397196);bd.lineTo(ba*0.523364,a7*0.397196);bd.closePath();var a9=bd.createLinearGradient(0.476635*ba,0,0.518691*ba,0);a9.addColorStop(0,"rgb(222, 223, 218)");a9.addColorStop(0.48,"rgb(222, 223, 218)");a9.addColorStop(0.49,bb.symbolColor.getRgbaColor());a9.addColorStop(1,bb.symbolColor.getRgbaColor());bd.fillStyle=a9;bd.fill();bd.stroke();bd.translate(a5,a4);bd.rotate(a6*Math.PI/180);bd.translate(-a5,-a4)}bd.beginPath();bd.translate(a5,a4);bd.arc(0,0,ba*0.1,0,Math.PI*2,false);bd.lineWidth=ba*0.022;bd.strokeStyle=bb.symbolColor.getRgbaColor();bd.stroke();bd.translate(-a5,-a4);bd.restore()};var J=function(a4,a5,a8,a7,a6,ba){a4.save();var a9;if(ba){a4.fillStyle="rgba(0, 0, 0, 0.6)";a4.strokeStyle="rgba(0, 0, 0, 0.5)"}switch(a8.type){case"type2":if(!ba){a9=a4.createLinearGradient(0,a5*0.471962,0,a5*0.130841);a9.addColorStop(0,a6.getRgbaColor());a9.addColorStop(0.36,a6.getRgbaColor());a9.addColorStop(0.361,a7.light.getRgbaColor());a9.addColorStop(1,a7.light.getRgbaColor());a4.fillStyle=a9}a4.beginPath();a4.moveTo(a5*0.518691,a5*0.471962);a4.lineTo(a5*0.509345,a5*0.462616);a4.lineTo(a5*0.509345,a5*0.341121);a4.lineTo(a5*0.504672,a5*0.130841);a4.lineTo(a5*0.495327,a5*0.130841);a4.lineTo(a5*0.490654,a5*0.341121);a4.lineTo(a5*0.490654,a5*0.462616);a4.lineTo(a5*0.481308,a5*0.471962);a4.closePath();a4.fill();break;case"type3":a4.beginPath();a4.rect(a5*0.495327,a5*0.130841,a5*0.009345,a5*0.373831);a4.closePath();if(!ba){a4.fillStyle=a7.light.getRgbaColor()}a4.fill();break;case"type4":if(!ba){a9=a4.createLinearGradient(0.467289*a5,0,0.528036*a5,0);a9.addColorStop(0,a7.dark.getRgbaColor());a9.addColorStop(0.51,a7.dark.getRgbaColor());a9.addColorStop(0.52,a7.light.getRgbaColor());a9.addColorStop(1,a7.light.getRgbaColor());a4.fillStyle=a9}a4.beginPath();a4.moveTo(a5*0.5,a5*0.126168);a4.lineTo(a5*0.514018,a5*0.135514);a4.lineTo(a5*0.53271,a5*0.5);a4.lineTo(a5*0.523364,a5*0.602803);a4.lineTo(a5*0.476635,a5*0.602803);a4.lineTo(a5*0.467289,a5*0.5);a4.lineTo(a5*0.485981,a5*0.135514);a4.lineTo(a5*0.5,a5*0.126168);a4.closePath();a4.fill();break;case"type5":if(!ba){a9=a4.createLinearGradient(0.471962*a5,0,0.528036*a5,0);a9.addColorStop(0,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.medium.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9}a4.beginPath();a4.moveTo(a5*0.5,a5*0.495327);a4.lineTo(a5*0.528037,a5*0.495327);a4.lineTo(a5*0.5,a5*0.149532);a4.lineTo(a5*0.471962,a5*0.495327);a4.lineTo(a5*0.5,a5*0.495327);a4.closePath();a4.fill();a4.lineWidth=1;a4.lineCap="square";a4.lineJoin="miter";if(!ba){a4.strokeStyle=a7.dark.getRgbaColor()}a4.stroke();break;case"type6":if(!ba){a4.fillStyle=a7.medium.getRgbaColor()}a4.beginPath();a4.moveTo(a5*0.481308,a5*0.485981);a4.lineTo(a5*0.481308,a5*0.392523);a4.lineTo(a5*0.485981,a5*0.317757);a4.lineTo(a5*0.495327,a5*0.130841);a4.lineTo(a5*0.504672,a5*0.130841);a4.lineTo(a5*0.514018,a5*0.317757);a4.lineTo(a5*0.518691,a5*0.38785);a4.lineTo(a5*0.518691,a5*0.485981);a4.lineTo(a5*0.504672,a5*0.485981);a4.lineTo(a5*0.504672,a5*0.38785);a4.lineTo(a5*0.5,a5*0.317757);a4.lineTo(a5*0.495327,a5*0.392523);a4.lineTo(a5*0.495327,a5*0.485981);a4.lineTo(a5*0.481308,a5*0.485981);a4.closePath();a4.fill();break;case"type7":if(!ba){a9=a4.createLinearGradient(0.481308*a5,0,0.518691*a5,0);a9.addColorStop(0,a7.dark.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9}a4.beginPath();a4.moveTo(a5*0.490654,a5*0.130841);a4.lineTo(a5*0.481308,a5*0.5);a4.lineTo(a5*0.518691,a5*0.5);a4.lineTo(a5*0.504672,a5*0.130841);a4.lineTo(a5*0.490654,a5*0.130841);a4.closePath();a4.fill();break;case"type8":if(!ba){a9=a4.createLinearGradient(0.471962*a5,0,0.528036*a5,0);a9.addColorStop(0,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.medium.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9;a4.strokeStyle=a7.dark.getRgbaColor()}a4.beginPath();a4.moveTo(a5*0.5,a5*0.53271);a4.lineTo(a5*0.53271,a5*0.5);a4.bezierCurveTo(a5*0.53271,a5*0.5,a5*0.509345,a5*0.457943,a5*0.5,a5*0.149532);a4.bezierCurveTo(a5*0.490654,a5*0.457943,a5*0.467289,a5*0.5,a5*0.467289,a5*0.5);a4.lineTo(a5*0.5,a5*0.53271);a4.closePath();a4.fill();a4.stroke();break;case"type9":if(!ba){a9=a4.createLinearGradient(0.471962*a5,0,0.528036*a5,0);a9.addColorStop(0,"rgb(50, 50, 50)");a9.addColorStop(0.5,"#666666");a9.addColorStop(1,"rgb(50, 50, 50)");a4.fillStyle=a9;a4.strokeStyle="#2E2E2E"}a4.beginPath();a4.moveTo(a5*0.495327,a5*0.233644);a4.lineTo(a5*0.504672,a5*0.233644);a4.lineTo(a5*0.514018,a5*0.439252);a4.lineTo(a5*0.485981,a5*0.439252);a4.lineTo(a5*0.495327,a5*0.233644);a4.closePath();a4.moveTo(a5*0.490654,a5*0.130841);a4.lineTo(a5*0.471962,a5*0.471962);a4.lineTo(a5*0.471962,a5*0.528037);a4.bezierCurveTo(a5*0.471962,a5*0.528037,a5*0.476635,a5*0.602803,a5*0.476635,a5*0.602803);a4.bezierCurveTo(a5*0.476635,a5*0.607476,a5*0.481308,a5*0.607476,a5*0.5,a5*0.607476);a4.bezierCurveTo(a5*0.518691,a5*0.607476,a5*0.523364,a5*0.607476,a5*0.523364,a5*0.602803);a4.bezierCurveTo(a5*0.523364,a5*0.602803,a5*0.528037,a5*0.528037,a5*0.528037,a5*0.528037);a4.lineTo(a5*0.528037,a5*0.471962);a4.lineTo(a5*0.509345,a5*0.130841);a4.lineTo(a5*0.490654,a5*0.130841);a4.closePath();a4.fill();a4.beginPath();a4.moveTo(a5*0.495327,a5*0.219626);a4.lineTo(a5*0.504672,a5*0.219626);a4.lineTo(a5*0.504672,a5*0.135514);a4.lineTo(a5*0.495327,a5*0.135514);a4.lineTo(a5*0.495327,a5*0.219626);a4.closePath();if(!ba){a4.fillStyle=a7.medium.getRgbaColor()}a4.fill();break;case"type10":a4.beginPath();a4.moveTo(a5*0.5,a5*0.149532);a4.bezierCurveTo(a5*0.5,a5*0.149532,a5*0.443925,a5*0.490654,a5*0.443925,a5*0.5);a4.bezierCurveTo(a5*0.443925,a5*0.53271,a5*0.467289,a5*0.556074,a5*0.5,a5*0.556074);a4.bezierCurveTo(a5*0.53271,a5*0.556074,a5*0.556074,a5*0.53271,a5*0.556074,a5*0.5);a4.bezierCurveTo(a5*0.556074,a5*0.490654,a5*0.5,a5*0.149532,a5*0.5,a5*0.149532);a4.closePath();if(!ba){a9=a4.createLinearGradient(0.471962*a5,0,0.528036*a5,0);a9.addColorStop(0,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.light.getRgbaColor());a9.addColorStop(0.5,a7.medium.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9;a4.strokeStyle=a7.medium.getRgbaColor()}a4.lineWidth=1;a4.lineCap="square";a4.lineJoin="miter";a4.fill();a4.stroke();break;case"type11":a4.beginPath();a4.moveTo(0.5*a5,0.168224*a5);a4.lineTo(0.485981*a5,0.5*a5);a4.bezierCurveTo(0.485981*a5,0.5*a5,0.481308*a5,0.584112*a5,0.5*a5,0.584112*a5);a4.bezierCurveTo(0.514018*a5,0.584112*a5,0.509345*a5,0.5*a5,0.509345*a5,0.5*a5);a4.lineTo(0.5*a5,0.168224*a5);a4.closePath();if(!ba){a9=a4.createLinearGradient(0,0.168224*a5,0,0.584112*a5);a9.addColorStop(0,a7.medium.getRgbaColor());a9.addColorStop(1,a7.dark.getRgbaColor());a4.fillStyle=a9;a4.strokeStyle=a7.dark.getRgbaColor()}a4.fill();a4.stroke();break;case"type12":a4.beginPath();a4.moveTo(0.5*a5,0.168224*a5);a4.lineTo(0.485981*a5,0.5*a5);a4.lineTo(0.5*a5,0.504672*a5);a4.lineTo(0.509345*a5,0.5*a5);a4.lineTo(0.5*a5,0.168224*a5);a4.closePath();if(!ba){a9=a4.createLinearGradient(0,0.168224*a5,0,0.504672*a5);a9.addColorStop(0,a7.medium.getRgbaColor());a9.addColorStop(1,a7.dark.getRgbaColor());a4.fillStyle=a9;a4.strokeStyle=a7.dark.getRgbaColor()}a4.fill();a4.stroke();break;case"type13":case"type14":a4.beginPath();a4.moveTo(0.485981*a5,0.168224*a5);a4.lineTo(0.5*a5,0.130841*a5);a4.lineTo(0.509345*a5,0.168224*a5);a4.lineTo(0.509345*a5,0.509345*a5);a4.lineTo(0.485981*a5,0.509345*a5);a4.lineTo(0.485981*a5,0.168224*a5);a4.closePath();if(!ba){if(a8.type==="type13"){a9=a4.createLinearGradient(0,0.5*a5,0,0.130841*a5);a9.addColorStop(0,a6.getRgbaColor());a9.addColorStop(0.85,a6.getRgbaColor());a9.addColorStop(0.85,a7.medium.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9}else{a9=a4.createLinearGradient(0.485981*a5,0,0.509345*a5,0);a9.addColorStop(0,a7.veryDark.getRgbaColor());a9.addColorStop(0.5,a7.light.getRgbaColor());a9.addColorStop(1,a7.veryDark.getRgbaColor());a4.fillStyle=a9}}a4.fill();break;case"type15":case"type16":a4.beginPath();a4.moveTo(a5*0.509345,a5*0.457943);a4.lineTo(a5*0.5015,a5*0.13);a4.lineTo(a5*0.4985,a5*0.13);a4.lineTo(a5*0.490654,a5*0.457943);a4.bezierCurveTo(a5*0.490654,a5*0.457943,a5*0.490654,a5*0.457943,a5*0.490654,a5*0.457943);a4.bezierCurveTo(a5*0.471962,a5*0.462616,a5*0.457943,a5*0.481308,a5*0.457943,a5*0.5);a4.bezierCurveTo(a5*0.457943,a5*0.518691,a5*0.471962,a5*0.537383,a5*0.490654,a5*0.542056);a4.bezierCurveTo(a5*0.490654,a5*0.542056,a5*0.490654,a5*0.542056,a5*0.490654,a5*0.542056);if(a8.type==="type15"){a4.lineTo(a5*0.490654,a5*0.57);a4.bezierCurveTo(a5*0.46,a5*0.58,a5*0.46,a5*0.62,a5*0.490654,a5*0.63);a4.bezierCurveTo(a5*0.47,a5*0.62,a5*0.48,a5*0.59,a5*0.5,a5*0.59);a4.bezierCurveTo(a5*0.53,a5*0.59,a5*0.52,a5*0.62,a5*0.509345,a5*0.63);a4.bezierCurveTo(a5*0.54,a5*0.62,a5*0.54,a5*0.58,a5*0.509345,a5*0.57);a4.lineTo(a5*0.509345,a5*0.57)}else{a4.lineTo(a5*0.490654,a5*0.621495);a4.lineTo(a5*0.509345,a5*0.621495)}a4.lineTo(a5*0.509345,a5*0.542056);a4.bezierCurveTo(a5*0.509345,a5*0.542056,a5*0.509345,a5*0.542056,a5*0.509345,a5*0.542056);a4.bezierCurveTo(a5*0.528037,a5*0.537383,a5*0.542056,a5*0.518691,a5*0.542056,a5*0.5);a4.bezierCurveTo(a5*0.542056,a5*0.481308,a5*0.528037,a5*0.462616,a5*0.509345,a5*0.457943);a4.bezierCurveTo(a5*0.509345,a5*0.457943,a5*0.509345,a5*0.457943,a5*0.509345,a5*0.457943);a4.closePath();if(ba){a4.fill()}else{if(a8.type==="type15"){a9=a4.createLinearGradient(0,0,0,a5*0.63)}else{a9=a4.createLinearGradient(0,0,0,a5*0.621495)}a9.addColorStop(0,a7.medium.getRgbaColor());a9.addColorStop(0.388888,a7.medium.getRgbaColor());a9.addColorStop(0.5,a7.light.getRgbaColor());a9.addColorStop(0.611111,a7.medium.getRgbaColor());a9.addColorStop(1,a7.medium.getRgbaColor());a4.fillStyle=a9;a4.strokeStyle=a7.dark.getRgbaColor();a4.fill();a4.stroke()}if(!ba){a4.beginPath();var a3=a5*0.06542/2;a4.arc(a5*0.5,a5*0.5,a3,0,Math.PI*2);a9=a4.createLinearGradient(a5*0.5-a3,a5*0.5+a3,0,a5*0.5+a3);a9.addColorStop(0,"#e6b35c");a9.addColorStop(0.01,"#e6b35c");a9.addColorStop(0.99,"#c48200");a9.addColorStop(1,"#c48200");a4.fillStyle=a9;a4.closePath();a4.fill();a4.beginPath();a3=a5*0.046728/2;a4.arc(a5*0.5,a5*0.5,a3,0,Math.PI*2);a9=a4.createRadialGradient(a5*0.5,a5*0.5,0,a5*0.5,a5*0.5,a3);a9.addColorStop(0,"#c5c5c5");a9.addColorStop(0.19,"#c5c5c5");a9.addColorStop(0.22,"#000000");a9.addColorStop(0.8,"#000000");a9.addColorStop(0.99,"#707070");a9.addColorStop(1,"#707070");a4.fillStyle=a9;a4.closePath();a4.fill()}break;case"type1":default:if(!ba){a9=a4.createLinearGradient(0,a5*0.471962,0,a5*0.130841);a9.addColorStop(0,a7.veryDark.getRgbaColor());a9.addColorStop(0.3,a7.medium.getRgbaColor());a9.addColorStop(0.59,a7.medium.getRgbaColor());a9.addColorStop(1,a7.veryDark.getRgbaColor());a4.fillStyle=a9}a4.beginPath();a4.moveTo(a5*0.518691,a5*0.471962);a4.bezierCurveTo(a5*0.514018,a5*0.457943,a5*0.509345,a5*0.415887,a5*0.509345,a5*0.401869);a4.bezierCurveTo(a5*0.504672,a5*0.383177,a5*0.5,a5*0.130841,a5*0.5,a5*0.130841);a4.bezierCurveTo(a5*0.5,a5*0.130841,a5*0.490654,a5*0.383177,a5*0.490654,a5*0.397196);a4.bezierCurveTo(a5*0.490654,a5*0.415887,a5*0.485981,a5*0.457943,a5*0.481308,a5*0.471962);a4.bezierCurveTo(a5*0.471962,a5*0.481308,a5*0.467289,a5*0.490654,a5*0.467289,a5*0.5);a4.bezierCurveTo(a5*0.467289,a5*0.518691,a5*0.481308,a5*0.53271,a5*0.5,a5*0.53271);a4.bezierCurveTo(a5*0.518691,a5*0.53271,a5*0.53271,a5*0.518691,a5*0.53271,a5*0.5);a4.bezierCurveTo(a5*0.53271,a5*0.490654,a5*0.528037,a5*0.481308,a5*0.518691,a5*0.471962);a4.closePath();a4.fill();break}if(ba){al(a4,a5,a5,Math.floor(a5*0.006))}a4.restore()};var g=function(be,a9,a7,a6,bc,ba){be.save();if(bc===aC.width&&ba===aC.height&&a9===a1){be.drawImage(aC,0,0);be.restore();return this}a1=a9;aC.width=bc;aC.height=ba;var bb=aC.getContext("2d");bb.fillStyle="#848484";bb.strokeStyle="rgba(132, 132, 132, 0.5)";bb.beginPath();bb.arc(a7,a6,bc/2,0,Math.PI*2,true);bb.closePath();bb.fill();bb.stroke();var bd;var a4;var a8;var a5;var a3;bb.beginPath();bb.arc(a7,a6,bc*0.990654/2,0,Math.PI*2,true);bb.closePath();switch(a9.design){case"metal":bd=bb.createLinearGradient(0,bc*0.004672,0,ba*0.990654);bd.addColorStop(0,"#fefefe");bd.addColorStop(0.07,"rgb(210, 210, 210)");bd.addColorStop(0.12,"rgb(179, 179, 179)");bd.addColorStop(1,"rgb(213, 213, 213)");bb.fillStyle=bd;bb.fill();break;case"brass":bd=bb.createLinearGradient(0,bc*0.004672,0,ba*0.990654);bd.addColorStop(0,"rgb(249, 243, 155)");bd.addColorStop(0.05,"rgb(246, 226, 101)");bd.addColorStop(0.1,"rgb(240, 225, 132)");bd.addColorStop(0.5,"rgb(90, 57, 22)");bd.addColorStop(0.9,"rgb(249, 237, 139)");bd.addColorStop(0.95,"rgb(243, 226, 108)");bd.addColorStop(1,"rgb(202, 182, 113)");bb.fillStyle=bd;bb.fill();break;case"steel":bd=bb.createLinearGradient(0,bc*0.004672,0,ba*0.990654);bd.addColorStop(0,"rgb(231, 237, 237)");bd.addColorStop(0.05,"rgb(189, 199, 198)");bd.addColorStop(0.1,"rgb(192, 201, 200)");bd.addColorStop(0.5,"rgb(23, 31, 33)");bd.addColorStop(0.9,"rgb(196, 205, 204)");bd.addColorStop(0.95,"rgb(194, 204, 203)");bd.addColorStop(1,"rgb(189, 201, 199)");bb.fillStyle=bd;bb.fill();break;case"gold":bd=bb.createLinearGradient(0,bc*0.004672,0,ba*0.990654);bd.addColorStop(0,"rgb(255, 255, 207)");bd.addColorStop(0.15,"rgb(255, 237, 96)");bd.addColorStop(0.22,"rgb(254, 199, 57)");bd.addColorStop(0.3,"rgb(255, 249, 203)");bd.addColorStop(0.38,"rgb(255, 199, 64)");bd.addColorStop(0.44,"rgb(252, 194, 60)");bd.addColorStop(0.51,"rgb(255, 204, 59)");bd.addColorStop(0.6,"rgb(213, 134, 29)");bd.addColorStop(0.68,"rgb(255, 201, 56)");bd.addColorStop(0.75,"rgb(212, 135, 29)");bd.addColorStop(1,"rgb(247, 238, 101)");bb.fillStyle=bd;bb.fill();break;case"anthracite":bd=bb.createLinearGradient(0,0.004672*ba,0,0.995326*ba);bd.addColorStop(0,"rgb(118, 117, 135)");bd.addColorStop(0.06,"rgb(74, 74, 82)");bd.addColorStop(0.12,"rgb(50, 50, 54)");bd.addColorStop(1,"rgb(79, 79, 87)");bb.fillStyle=bd;bb.fill();break;case"tiltedGray":bd=bb.createLinearGradient(0.233644*bc,0.084112*ba,0.81258*bc,0.910919*ba);bd.addColorStop(0,"#ffffff");bd.addColorStop(0.07,"rgb(210, 210, 210)");bd.addColorStop(0.16,"rgb(179, 179, 179)");bd.addColorStop(0.33,"#ffffff");bd.addColorStop(0.55,"#c5c5c5");bd.addColorStop(0.79,"#ffffff");bd.addColorStop(1,"#666666");bb.fillStyle=bd;bb.fill();break;case"tiltedBlack":bd=bb.createLinearGradient(0.228971*bc,0.079439*ba,0.802547*bc,0.898591*ba);bd.addColorStop(0,"#666666");bd.addColorStop(0.21,"#000000");bd.addColorStop(0.47,"#666666");bd.addColorStop(0.99,"#000000");bd.addColorStop(1,"#000000");bb.fillStyle=bd;bb.fill();break;case"glossyMetal":bd=bb.createRadialGradient(0.5*bc,0.5*ba,0,0.5*bc,0.5*bc,0.5*bc);bd.addColorStop(0,"rgb(207, 207, 207)");bd.addColorStop(0.96,"rgb(205, 204, 205)");bd.addColorStop(1,"rgb(244, 244, 244)");bb.fillStyle=bd;bb.fill();bb.beginPath();bb.arc(0.5*bc,0.5*ba,0.973962*bc/2,0,Math.PI*2);bb.closePath();bd=bb.createLinearGradient(0,ba-0.971962*ba,0,0.971962*ba);bd.addColorStop(0,"rgb(249, 249, 249)");bd.addColorStop(0.23,"rgb(200, 195, 191)");bd.addColorStop(0.36,"#ffffff");bd.addColorStop(0.59,"rgb(29, 29, 29)");bd.addColorStop(0.76,"rgb(200, 194, 192)");bd.addColorStop(1,"rgb(209, 209, 209)");bb.fillStyle=bd;bb.fill();bb.beginPath();bb.arc(0.5*bc,0.5*ba,0.869158*bc/2,0,Math.PI*2);bb.closePath();bb.fillStyle="#f6f6f6";bb.fill();bb.beginPath();bb.arc(0.5*bc,0.5*ba,0.85*bc/2,0,Math.PI*2);bb.closePath();bb.fillStyle="#333333";bb.fill();break;case"blackMetal":a5=[0,0.125,0.347222,0.5,0.680555,0.875,1];a3=[new Q(254,254,254,1),new Q(0,0,0,1),new Q(153,153,153,1),new Q(0,0,0,1),new Q(153,153,153,1),new Q(0,0,0,1),new Q(254,254,254,1)];bb.save();bb.clip(bb.arc(a7,a6,bc*0.990654/2,0,Math.PI*2,true));a4=bc*0.495327;a8=bc*0.42056;bd=new aw(a5,a3,-Math.PI/2);bd.fill(bb,a7,a6,a8,a4);bb.strokeStyle="#848484";bb.strokeStyle="rgba(132, 132, 132, 0.8)";bb.beginPath();bb.lineWidth=bc/90;bb.arc(a7,a6,bc/2,0,Math.PI*2,true);bb.closePath();bb.stroke();bb.restore();break;case"shinyMetal":a5=[0,0.125,0.25,0.347222,0.5,0.652777,0.75,0.875,1];a3=[new Q(254,254,254,1),new Q(210,210,210,1),new Q(179,179,179,1),new Q(238,238,238,1),new Q(160,160,160,1),new Q(238,238,238,1),new Q(179,179,179,1),new Q(210,210,210,1),new Q(254,254,254,1)];bb.save();bb.clip(bb.arc(a7,a6,bc*0.990654/2,0,Math.PI*2,true));a4=bc*0.495327;a8=bc*0.42056;bd=new aw(a5,a3,-Math.PI/2);bd.fill(bb,a7,a6,a8,a4);bb.strokeStyle="#848484";bb.strokeStyle="rgba(132, 132, 132, 0.8)";bb.beginPath();bb.lineWidth=bc/90;bb.arc(a7,a6,bc/2,0,Math.PI*2,true);bb.closePath();bb.stroke();bb.restore();break;case"chrome":a5=[0,0.09,0.12,0.16,0.25,0.29,0.33,0.38,0.48,0.52,0.63,0.68,0.8,0.83,0.87,0.97,1];a3=[new Q(255,255,255,1),new Q(255,255,255,1),new Q(136,136,138,1),new Q(164,185,190,1),new Q(158,179,182,1),new Q(112,112,112,1),new Q(221,227,227,1),new Q(155,176,179,1),new Q(156,176,177,1),new Q(254,255,255,1),new Q(255,255,255,1),new Q(156,180,180,1),new Q(198,209,211,1),new Q(246,248,247,1),new Q(204,216,216,1),new Q(164,188,190,1),new Q(255,255,255,1)];bb.save();bb.clip(bb.arc(a7,a6,bc*0.990654/2,0,Math.PI*2,true));a4=bc*0.495327;a8=bc*0.42056;bd=new aw(a5,a3,-Math.PI/2);bd.fill(bb,a7,a6,a8,a4);bb.strokeStyle="#848484";bb.strokeStyle="rgba(132, 132, 132, 0.8)";bb.beginPath();bb.lineWidth=bc/90;bb.arc(a7,a6,bc/2,0,Math.PI*2,true);bb.closePath();bb.stroke();bb.restore();break}bb.fillStyle="rgb(191, 191, 191)";bb.beginPath();bb.arc(a7,a6,bc*0.841121/2,0,Math.PI*2,true);bb.closePath();bb.fill();be.drawImage(aC,0,0);be.restore();return this};var p=function(bc,a6,a8,a7,a4){bc.save();if(a8===aZ.width&&a7===aZ.height&&a6===t){bc.drawImage(aZ,0,0);bc.restore();return this}t=a6;aZ.width=a8;aZ.height=a7;var a3=aZ.getContext("2d");var a5;var ba;var bb;if(a8>=a7){a5=a7*0.05;ba=a5-1;bb=a7*0.028571}else{a5=a8*0.05;ba=a5-1;bb=a8*0.028571}V(a3,0,0,a8,a7,a5);a3.fillStyle="#838383";a3.fill();V(a3,1,1,a8-2,a7-2,ba);var a9=a3.createLinearGradient(0,1,0,a7-1);switch(a6.design){case"metal":a9=a3.createLinearGradient(0,a8*0.004672,0,a7*0.990654);a9.addColorStop(0,"#fefefe");a9.addColorStop(0.07,"rgb(210, 210, 210)");a9.addColorStop(0.12,"rgb(179, 179, 179)");a9.addColorStop(1,"rgb(213, 213, 213)");a3.fillStyle=a9;a3.fill();break;case"brass":a9=a3.createLinearGradient(0,a8*0.004672,0,a7*0.990654);a9.addColorStop(0,"rgb(249, 243, 155)");a9.addColorStop(0.05,"rgb(246, 226, 101)");a9.addColorStop(0.1,"rgb(240, 225, 132)");a9.addColorStop(0.5,"rgb(90, 57, 22)");a9.addColorStop(0.9,"rgb(249, 237, 139)");a9.addColorStop(0.95,"rgb(243, 226, 108)");a9.addColorStop(1,"rgb(202, 182, 113)");a3.fillStyle=a9;a3.fill();break;case"steel":a9=a3.createLinearGradient(0,a8*0.004672,0,a7*0.990654);a9.addColorStop(0,"rgb(231, 237, 237)");a9.addColorStop(0.05,"rgb(189, 199, 198)");a9.addColorStop(0.1,"rgb(192, 201, 200)");a9.addColorStop(0.5,"rgb(23, 31, 33)");a9.addColorStop(0.9,"rgb(196, 205, 204)");a9.addColorStop(0.95,"rgb(194, 204, 203)");a9.addColorStop(1,"rgb(189, 201, 199)");a3.fillStyle=a9;a3.fill();break;case"gold":a9=a3.createLinearGradient(0,a8*0.004672,0,a7*0.990654);a9.addColorStop(0,"rgb(255, 255, 207)");a9.addColorStop(0.15,"rgb(255, 237, 96)");a9.addColorStop(0.22,"rgb(254, 199, 57)");a9.addColorStop(0.3,"rgb(255, 249, 203)");a9.addColorStop(0.38,"rgb(255, 199, 64)");a9.addColorStop(0.44,"rgb(252, 194, 60)");a9.addColorStop(0.51,"rgb(255, 204, 59)");a9.addColorStop(0.6,"rgb(213, 134, 29)");a9.addColorStop(0.68,"rgb(255, 201, 56)");a9.addColorStop(0.75,"rgb(212, 135, 29)");a9.addColorStop(1,"rgb(247, 238, 101)");a3.fillStyle=a9;a3.fill();break;case"anthracite":a9=a3.createLinearGradient(0,0.004672*a7,0,0.995326*a7);a9.addColorStop(0,"rgb(118, 117, 135)");a9.addColorStop(0.06,"rgb(74, 74, 82)");a9.addColorStop(0.12,"rgb(50, 50, 54)");a9.addColorStop(1,"rgb(79, 79, 87)");a3.fillStyle=a9;a3.fill();break;case"tiltedGray":a9=a3.createLinearGradient(0.233644*a8,0.084112*a7,0.81258*a8,0.910919*a7);a9.addColorStop(0,"#ffffff");a9.addColorStop(0.07,"rgb(210, 210, 210)");a9.addColorStop(0.16,"rgb(179, 179, 179)");a9.addColorStop(0.33,"#ffffff");a9.addColorStop(0.55,"#c5c5c5");a9.addColorStop(0.79,"#ffffff");a9.addColorStop(1,"#666666");a3.fillStyle=a9;a3.fill();break;case"tiltedBlack":a9=a3.createLinearGradient(0.228971*a8,0.079439*a7,0.802547*a8,0.898591*a7);a9.addColorStop(0,"#666666");a9.addColorStop(0.21,"#000000");a9.addColorStop(0.47,"#666666");a9.addColorStop(0.99,"#000000");a9.addColorStop(1,"#000000");a3.fillStyle=a9;a3.fill();break;case"glossyMetal":a3.clip(V(a3,1,1,a8-2,a7-2,a5));a3.fillStyle="#cfcfcf";a3.fill();a3.clip(V(a3,2,2,a8-4,a7-4,ba));a9=a3.createLinearGradient(0,2,0,a7-4);a9.addColorStop(0,"rgb(249, 249, 249)");a9.addColorStop(0.2,"rgb(200, 195, 191)");a9.addColorStop(0.3,"#ffffff");a9.addColorStop(0.6,"rgb(29, 29, 29)");a9.addColorStop(0.8,"rgb(200, 194, 192)");a9.addColorStop(1,"rgb(209, 209, 209)");a3.fillStyle=a9;a3.fill();a3.clip(V(a3,12,12,a8-24,a7-24,bb));a3.fillStyle="#f6f6f6";a3.fill();a3.clip(V(a3,13,13,a8-26,a7-26,bb));a3.fillStyle="#333333";a3.fill();break;case"blackMetal":fractions=[0,0.125,0.347222,0.5,0.680555,0.875,1];colors=[new Q(254,254,254,1),new Q(0,0,0,1),new Q(153,153,153,1),new Q(0,0,0,1),new Q(153,153,153,1),new Q(0,0,0,1),new Q(254,254,254,1)];innerX=0;outerX=Math.sqrt(a7*a7+a8*a8)/2;a3.clip(V(a3,1,1,a8-2,a7-2,a5));a9=new aw(fractions,colors,-Math.PI/2);a9.fill(a3,a8/2,a7/2,innerX,outerX);break;case"shinyMetal":fractions=[0,0.125,0.25,0.347222,0.5,0.652777,0.75,0.875,1];colors=[new Q(254,254,254,1),new Q(210,210,210,1),new Q(179,179,179,1),new Q(238,238,238,1),new Q(160,160,160,1),new Q(238,238,238,1),new Q(179,179,179,1),new Q(210,210,210,1),new Q(254,254,254,1)];innerX=0;outerX=Math.sqrt(a7*a7+a8*a8)/2;a3.clip(V(a3,1,1,a8-2,a7-2,a5));a9=new aw(fractions,colors,-Math.PI/2);a9.fill(a3,a8/2,a7/2,innerX,outerX);break;case"chrome":fractions=[0,0.09,0.12,0.16,0.25,0.29,0.33,0.38,0.48,0.52,0.63,0.68,0.8,0.83,0.87,0.97,1];colors=[new Q(255,255,255,1),new Q(255,255,255,1),new Q(136,136,138,1),new Q(164,185,190,1),new Q(158,179,182,1),new Q(112,112,112,1),new Q(221,227,227,1),new Q(155,176,179,1),new Q(156,176,177,1),new Q(254,255,255,1),new Q(255,255,255,1),new Q(156,180,180,1),new Q(198,209,211,1),new Q(246,248,247,1),new Q(204,216,216,1),new Q(164,188,190,1),new Q(255,255,255,1)];innerX=0;outerX=Math.sqrt(a7*a7+a8*a8)/2;a3.clip(V(a3,1,1,a8-2,a7-2,a5));a9=new aw(fractions,colors,-Math.PI/2);a9.fill(a3,a8/2,a7/2,innerX,outerX);break}V(a3,13,13,a8-26,a7-26,bb-1);a3.fillStyle="rgb(192, 192, 192)";bc.drawImage(aZ,0,0);bc.restore();return this};var a0=function(bh,a7,bb,a9,bc,bn){bh.save();if(bc===I.width&&bn===I.height&&a7===L){bh.drawImage(I,0,0);bh.restore();return this}L=a7;I.width=bc;I.height=bn;var be=I.getContext("2d");be.beginPath();be.arc(bb,a9,bc*0.831775/2,0,Math.PI*2,true);be.closePath();if(a7===steelseries.BackgroundColor.CARBON||a7===steelseries.BackgroundColor.PUNCHED_SHEET||a7===steelseries.BackgroundColor.BRUSHED_METAL||a7===steelseries.BackgroundColor.BRUSHED_STAINLESS){if(a7===steelseries.BackgroundColor.CARBON){be.fillStyle=be.createPattern(k,"repeat");be.fill()}if(a7===steelseries.BackgroundColor.PUNCHED_SHEET){be.fillStyle=be.createPattern(ax,"repeat");be.fill()}var bj=bc*0.831775/2;var ba=be.createLinearGradient(bj,0,bc-bj,0);ba.addColorStop(0,"rgba(0, 0, 0, 0.25)");ba.addColorStop(0.5,"rgba(0, 0, 0, 0)");ba.addColorStop(1,"rgba(0, 0, 0, 0.25)");be.fillStyle=ba;be.beginPath();be.arc(bb,a9,bc*0.831775/2,0,Math.PI*2,true);be.closePath();be.fill();if(a7===steelseries.BackgroundColor.BRUSHED_METAL||a7===steelseries.BackgroundColor.BRUSHED_STAINLESS){var bi=(a7===steelseries.BackgroundColor.BRUSHED_METAL?true:false);var a3=parseInt(a7.gradientStop.getHexColor().substr(-6),16);var bf=u(a3,5,0.1,bi,0.5);be.fillStyle=be.createPattern(bf.fill(0,0,bc,bn),"no-repeat");be.fill()}}else{if(a7===steelseries.BackgroundColor.STAINLESS||a7===steelseries.BackgroundColor.TURNED){var bo=[0,0.03,0.1,0.14,0.24,0.33,0.38,0.5,0.62,0.67,0.76,0.81,0.85,0.97,1];var bd=[new Q("#FDFDFD"),new Q("#FDFDFD"),new Q("#B2B2B4"),new Q("#ACACAE"),new Q("#FDFDFD"),new Q("#6E6E70"),new Q("#6E6E70"),new Q("#FDFDFD"),new Q("#6E6E70"),new Q("#6E6E70"),new Q("#FDFDFD"),new Q("#ACACAE"),new Q("#B2B2B4"),new Q("#FDFDFD"),new Q("#FDFDFD")];be.save();outerX=bc*0.831775/2;innerX=0;a8=new aw(bo,bd,Math.PI/1.75);a8.fill(be,bb,a9,innerX,outerX);be.closePath();be.restore();if(a7===steelseries.BackgroundColor.TURNED){var bm=Math.PI*2;var a5=bc*0.831775/2;var bg=a5*0.55;var a6=bm/360*(500/a5);be.save();be.clip(be.arc(bb,a9,a5,0,bm));be.lineWidth=0.5;var a4=bm-a6*0.3;for(var bl=0;bl0&&a5.width>0){bc.save();bc.beginPath();bc.arc(a4,a3,a8*0.831775/2,0,Math.PI*2,true);bc.clip();var bb=a8*0.831775;var a6=a7*0.831775;var ba=(a8-bb)/2;var a9=(a7-a6)/2;bc.drawImage(a5,ba,a9,bb,a6);bc.restore()}return this};var ad=function(bj,a7,be,bn){bj.save();if(be===ao.width&&bn===ao.height&&a7===aq){bj.drawImage(ao,0,0);bj.restore();return this}aq=a7;ao.width=be;ao.height=bn;var a3=ao.getContext("2d");V(a3,14,14,be-28,bn-28,4);if(a7===steelseries.BackgroundColor.CARBON||a7===steelseries.BackgroundColor.PUNCHED_SHEET||a7===steelseries.BackgroundColor.STAINLESS||a7===steelseries.BackgroundColor.BRUSHED_METAL||a7===steelseries.BackgroundColor.BRUSHED_STAINLESS||a7===steelseries.BackgroundColor.TURNED){if(a7===steelseries.BackgroundColor.CARBON){a3.fillStyle=a3.createPattern(k,"repeat");a3.fill()}if(a7===steelseries.BackgroundColor.PUNCHED_SHEET){a3.fillStyle=a3.createPattern(ax,"repeat");a3.fill()}if(a7===steelseries.BackgroundColor.STAINLESS||a7===steelseries.BackgroundColor.TURNED){var bp=60;var ba=O(bp,bp);var bh=ba.getContext("2d");bh.save();var bo=[0,0.03,0.1,0.14,0.24,0.33,0.38,0.5,0.62,0.67,0.76,0.81,0.85,0.97,1];var bf=[new Q("#FDFDFD"),new Q("#FDFDFD"),new Q("#B2B2B4"),new Q("#ACACAE"),new Q("#FDFDFD"),new Q("#6E6E70"),new Q("#6E6E70"),new Q("#FDFDFD"),new Q("#6E6E70"),new Q("#6E6E70"),new Q("#FDFDFD"),new Q("#ACACAE"),new Q("#B2B2B4"),new Q("#FDFDFD"),new Q("#FDFDFD")];a9=new aw(bo,bf,Math.PI/1.75);a3.clip(V(a3,14,14,be-28,bn-28,4));var a6=Math.sqrt((be-28)*(be-28)+(bn-28)*(bn-28))/2;a9.fill(a3,be/2,bn/2,0,a6);var bc=a3.createLinearGradient(0,14,0,bn-28);bc.addColorStop(0,"rgba(0, 0, 0, 0.25)");bc.addColorStop(0.1,"rgba(0, 0, 0, 0.05)");bc.addColorStop(1,"rgba(0, 0, 0, 0)");a3.fillStyle=bc;V(a3,14,14,be-28,bn-28,4);a3.fill();a3.restore();if(a7===steelseries.BackgroundColor.TURNED){var bm=Math.PI*2;var bi=a6*0.55;var bd=be/2;var bb=bn/2;var a8=bm/360*(400/a6);a3.save();a3.lineWidth=0.5;var a5=bm-a8*0.3;for(var bl=0;bl>16)&255;var bp=(a5>>8)&255;var bb=a5&255;var bt=0;var bA=255*a6;if(ba!=0){var br=[];for(var bw=0;bw0){a9(bk,bj,bu,bq,a4,bf);bg.putImageData(bj,bz,bx)}else{bg.putImageData(bk,bz,bx)}return bB};function a7(bb,bc){bb+=((2*Math.random()-1)*bc)|0;return(bb<0?0:(bb>255?255:bb))}function a8(bb){return(bb<0?0:(bb>255?255:bb))}function a9(bm,bc,bb,bn,bi,be){if(bi>=bb){bi=bb-1}var bd=1/(bi*2+1);var bh=0;for(var bk=0;bkbi){var bf=(bh-bi-1)*4;bo-=bm.data[bf];bg-=bm.data[bf+1];bj-=bm.data[bf+2]}if(bl+bia3?0:a3;a5=255a8?0:a8;a7=255a9?0:a9;bb=255ba?0:ba;a6=1bc?0:bc;a5=255bc?0:bc;a7=255bc?0:bc;bb=255bc?0:bc;a6=10){bi.arc(ba,a9,bc,a7+bh,a7,true)}else{bi.moveTo(ba,a9)}bi.arc(ba,a9,a6,a7,a7+bh);bi.fill();bi.stroke()}}bi.restore()}};var M=function(a6,a4,a5,a3){this.getColorAt=function(bc){bc=(bc<0?0:(bc>1?1:bc));var bb=0;var be=0;var ba=1;var bd=1;var a7=0;var a9;for(a9=0;a9bc&&ba>=a5[a9]){ba=a5[a9];bd=a9}}var a8=(bc-bb)/(ba-bb);return aV(a3[be],a3[bd],1,a8)};this.getStart=function(){return a6};this.getEnd=function(){return a4}};function U(a5,a8){var a4=("#"===a5.charAt(0))?a5.substring(1,7):a5;var a7=parseInt((a4).substring(0,2),16);var a6=parseInt((a4).substring(2,4),16);var a3=parseInt((a4).substring(4,6),16);this.color="rgba("+a7+","+a6+","+a3+","+a8+")";return this}function aV(a7,bb,a9,bi){var bc=1/255;var bf=a7.getRed();var a8=a7.getGreen();var bg=a7.getBlue();var a6=a7.getAlpha();var bj=bb.getRed()-a7.getRed();var a4=bb.getGreen()-a7.getGreen();var a5=bb.getBlue()-a7.getBlue();var a3=bb.getAlpha()*bc-a7.getAlpha()*bc;var ba=bj/a9;var be=a4/a9;var bh=a5/a9;var bd=a3/a9;return new Q((bf+ba*bi).toFixed(0),(a8+be*bi).toFixed(0),(bg+bh*bi).toFixed(0),a6+bd*bi)}function aG(a5,a4,a3){return{start:a5,stop:a4,color:a3}}Math.log10=function(a3){return(Math.log(a3)/Math.LN10)};function l(a4,a3){var a7=Math.floor(Math.log10(a4));var a6=a4/Math.pow(10,a7);var a5;if(a3){if(1.5>a6){a5=1}else{if(3>a6){a5=2}else{if(7>a6){a5=5}else{a5=10}}}}else{if(1>=a6){a5=1}else{if(2>=a6){a5=2}else{if(5>=a6){a5=5}else{a5=10}}}}return a5*Math.pow(10,a7)}function V(a7,a5,ba,a6,a8,a4){var a9=a5+a6;var a3=ba+a8;a7.beginPath();a7.moveTo(a5+a4,ba);a7.lineTo(a9-a4,ba);a7.quadraticCurveTo(a9,ba,a9,ba+a4);a7.lineTo(a9,ba+a8-a4);a7.quadraticCurveTo(a9,a3,a9-a4,a3);a7.lineTo(a5+a4,a3);a7.quadraticCurveTo(a5,a3,a5,a3-a4);a7.lineTo(a5,ba+a4);a7.quadraticCurveTo(a5,ba,a5+a4,ba)}function O(a5,a3){var a4=H.createElement("canvas");a4.width=a5;a4.height=a3;return a4}function r(a5,a3,a6){var a4=H.createElement("canvas");a4.width=a5;a4.height=a3;a6(a4.getContext("2d"));return a4}function aI(a3){var a5;var a4=r(1,1,function(a6){a6.fillStyle=a3;a6.beginPath();a6.rect(0,0,1,1);a6.fill()});a5=a4.getContext("2d").getImageData(0,0,2,2).data;return[a5[0],a5[1],a5[2],a5[3]]}function x(a7){var a4;var ba;var a5;var a8;var a9;var a6=aI(a7);var a3=new Q(a6[0],a6[1],a6[2],a6[3]);a4=aW(a3,0.32);ba=aW(a3,0.62);a5=aD(a3,0.84);a8=aD(a3,0.94);a9=aD(a3,1);return new z(a4,ba,a3,a5,a8,a9)}function az(a3,a4,a9){a3/=255;a4/=255;a9/=255;var a8=Math.max(a3,a4,a9);var a5=Math.min(a3,a4,a9);var a7;var a6;var bb=(a8+a5)/2;if(a8===a5){a7=a6=0}else{var ba=a8-a5;a6=bb>0.5?ba/(2-a8-a5):ba/(a8+a5);switch(a8){case a3:a7=(a4-a9)/ba+(a41){bc-=1}if(bc<1/6){return be+(bd-be)*6*bc}if(bc<1/2){return bd}if(bc<2/3){return be+(bd-be)*(2/3-bc)*6}return be}if(a8===0){a6=a7=ba=bb}else{var a3=(bb<0.5?bb*(1+a8):bb+a8-bb*a8);var a4=2*bb-a3;a6=a5(a4,a3,a9+1/3);a7=a5(a4,a3,a9);ba=a5(a4,a3,a9-1/3)}return[Math.floor(a6*255),Math.floor(a7*255),Math.floor(ba*255)]}function aP(a3,a4,a5){var a6=(a5-a4)/2;a6=(a6>1?1:(a6<0?0:a6));return[a3,a4,a6]}function Z(a3,a4,a6){var a5=(a6*2)+a4;return[a3,a4,a5]}function P(a9,a7,bb){var a3,a8,bc;var a6=Math.floor(a9*6);var ba=a9*6-a6;var a5=bb*(1-a7);var a4=bb*(1-ba*a7);var bd=bb*(1-(1-ba)*a7);switch(a6%6){case 0:a3=bb;a8=bd;bc=a5;break;case 1:a3=a4;a8=bb;bc=a5;break;case 2:a3=a5;a8=bb;bc=bd;break;case 3:a3=a5;a8=a4;bc=bb;break;case 4:a3=bd;a8=a5;bc=bb;break;case 5:a3=bb;a8=a5;bc=a4;break}return[Math.floor(a3*255),Math.floor(a8*255),Math.floor(bc*255)]}function aE(a3,a6,a9){a3=a3/255;a6=a6/255;a9=a9/255;var ba=Math.max(a3,a6,a9);var a4=Math.min(a3,a6,a9);var a7;var a5;var a8=ba;var bb=ba-a4;a5=ba==0?0:bb/ba;if(ba==a4){a7=0}else{switch(ba){case a3:a7=(a6-a9)/bb+(a6255?255:a7));a6=(a6<0?0:(a7>255?255:a6));a3=(a3<0?0:(a3>255?255:a3));return new Q(a7,a6,a3,a4.getAlpha())}function aD(a4,a5){var a7=Math.round(a4.getRed()*(1+a5));var a6=Math.round(a4.getGreen()*(1+a5));var a3=Math.round(a4.getBlue()*(1+a5));a7=(a7<0?0:(a7>255?255:a7));a6=(a6<0?0:(a7>255?255:a6));a3=(a3<0?0:(a3>255?255:a3));return new Q(a7,a6,a3,a4.getAlpha())}function s(a5,a3,a4){if(a4<=a3){throw"Rotary bounds are of negative or zero size"}var a7=a4-a3;var a6=Math.floor((a5-a3)/a7);return a5-(a6*a7)}function ap(a4,a3){return s((a3-a4),-180,180)}function al(bd,bc,a9,a3){bd.save();var a4=O(bc,a9);var bi=a4.getContext("2d");var ba;var a8;for(var be=0;be<2;be++){ba=bd.getImageData(0,0,(be===0?bc:a9),(be===0?a9:bc));a8=bd.createImageData((be===0?bc:a9),(be===0?a9:bc));if(be===0){if(a3>=bc){a3=bc-1}}else{if(a3>=a9){a3=a9-1}}var bj=1/(a3*2+1);var bk=0;for(var a6=0;a6<(be===0?a9:bc);a6++){var a5=0;var bb=0;var bg=0;var bh=0;for(var a7=0;a7a3){var bf=(bk-a3-1)*4;a5-=ba.data[bf];bb-=ba.data[bf+1];bg-=ba.data[bf+2];bh-=ba.data[bf+3]}if(a7+a3r?1:3>r?2:7>r?5:10:1.5?u/(2-f-e):u/(f+e);switch(f){case n:r=(t-i)/u+(t255?255:r,f=f<0?0:r>255?255:f,u=u<0?0:u>255?255:u,new n(r,f,u,t.getAlpha())}function ei(t,i){var r=Math.round(t.getRed()*(1+i)),f=Math.round(t.getGreen()*(1+i)),u=Math.round(t.getBlue()*(1+i));return r=r<0?0:r>255?255:r,f=f<0?0:r>255?255:f,u=u<0?0:u>255?255:u,new n(r,f,u,t.getAlpha())}function pu(n,t,i){if(i<=t)throw"Rotary bounds are of negative or zero size";var r=i-t,u=Math.floor((n-t)/r);return n-u*r}function ri(n,t){return pu(t-n,-180,180)}function p(n,i,r,u){var y,b,e,h,o,l,c,k,s,f;for(n.save(),y=t(i,r),b=y.getContext("2d"),o=0;o<2;o++){for(e=n.getImageData(0,0,o===0?i:r,o===0?r:i),h=n.createImageData(o===0?i:r,o===0?r:i),o===0?uu&&(f=(c-u-1)*4,p-=e.data[f],w-=e.data[f+1],a-=e.data[f+2],v-=e.data[f+3]),s+up?p:n;l!==t&&(l=t,l>gt&&(gt=l),lp?p:n,t;l!==i&&(undefined!==ui&&ui.playing&&ui.stop(),ui=new Tween({},"",Tween.regularEaseInOut,l,i,1),t=this,ui.onMotionChanged=function(n){l=n.target._pos,lgt&&(gt=l),lp?p:n;gt=t,this.repaint()},this.setMinMeasuredValue=function(n){var t=np?p:n;bt=t,this.repaint()},this.setTitleString=function(n){wr=n,it({background:!0})},this.setUnitString=function(n){ar=n,it({background:!0})},this.setMinValue=function(n){s=n,it({frame:!0,background:!0})},this.getMinValue=function(){return s},this.setMaxValue=function(n){p=n,it({frame:!0,background:!0})},this.getMaxValue=function(){return p},this.setThreshold=function(n){var t=np?p:n;kt=t,it({background:!0}),this.repaint()},this.setArea=function(n){ti=n,at({foreground:!0}),it({background:!0,foreground:!0}),this.repaint()},this.setSection=function(n){dt=n,at({foreground:!0}),it({background:!0,foreground:!0}),this.repaint()},this.setThresholdVisible=function(n){au=n,this.repaint()},this.setLcdDecimals=function(n){su=n,this.repaint()},this.setFrameDesign=function(n){at({frame:!0}),iu=n,it({frame:!0}),this.repaint()},this.setBackgroundColor=function(n){at({background:!0,pointer:!0}),yt=n,it({background:!0,pointer:!0}),this.repaint()},this.setForegroundType=function(n){at({foreground:!0}),bu=n,it({foreground:!0}),this.repaint()},this.setPointerType=function(n){at({pointer:!0,foreground:!0}),pi=n,it({pointer:!0,foreground:!0}),this.repaint()},this.setPointerColor=function(n){at({pointer:!0}),cr=n,it({pointer:!0}),this.repaint()},this.setLedColor=function(n){at({led:!0}),lr=n,it({led:!0}),this.repaint()},this.setLcdColor=function(n){ri=n,it({background:!0}),this.repaint()},this.setTrend=function(n){ou=n,this.repaint()},this.setTrendVisible=function(n){sr=n,this.repaint()},this.repaint=function(){wu||it({frame:!0,background:!0,led:!0,pointer:!0,trend:!0,foreground:!0}),u.clearRect(0,0,u.canvas.width,u.canvas.height),u.drawImage(bi,0,0),u.drawImage(vi,0,0),hu&&ku(l),vu&&(ll?l:n;tt!==t&&(tt=t,ttl?l:n,t;tt!==i&&(undefined!==ii&&ii.playing&&ii.stop(),ii=new Tween({},"",Tween.regularEaseInOut,tt,i,1),t=this,ii.onMotionChanged=function(n){tt=n.target._pos,tt=wt[t].start&&nd?d:n;p!==t&&(p=t,p>vt&&(vt=p),pd?d:n,t;p!==i&&(undefined!==ti&&ti.playing&&ti.stop(),ti=new Tween({},"",Tween.regularEaseInOut,p,i,1),t=this,ti.onMotionChanged=function(n){p=n.target._pos,pvt&&(vt=p),pc?c:n;l!==t&&(l=t,l>it&&(it=l),lc?c:n,t;l!==i&&(undefined!==et&&et.playing&&et.stop(),et=new Tween({},"",Tween.regularEaseInOut,l,i,1),t=this,et.onMotionChanged=function(n){l=n.target._pos,lit&&(it=l),lc?c:n;it=t,this.repaint()},this.setMinMeasuredValue=function(n){var t=nc?c:n;rt=t,this.repaint()},this.setTitleString=function(n){vi=n,g({background:!0}),this.repaint()},this.setUnitString=function(n){li=n,g({background:!0}),this.repaint()},this.setMinValue=function(n){s=n,g({background:!0,foreground:!0,pointer:!0}),this.repaint()},this.getMinValue=function(){return s},this.setMaxValue=function(n){c=n,g({background:!0,foreground:!0,pointer:!0}),this.repaint()},this.getMaxValue=function(){return c},this.setThreshold=function(n){var t=nc?c:n;tt=t,g({background:!0}),this.repaint()},this.repaint=function(){er||g({frame:!0,background:!0,led:!0,foreground:!0});var n;e.clearRect(0,0,e.canvas.width,e.canvas.height),e.drawImage(pt,0,0),e.drawImage(at,0,0),ti&&nu(l,y),wi&&(l=it[s].start&&o=it[s].start&&ec?c:n;l!==t&&(l=t,l>rt&&(rt=l),lc?c:n,t;l!==i&&(undefined!==yt&&yt.playing&&yt.stop(),yt=new Tween({},"",Tween.regularEaseInOut,l,i,1),t=this,yt.onMotionChanged=function(n){l=n.target._pos,lrt&&(rt=l),lc?c:n;rt!==t&&(rt=t,this.repaint())},this.setMinMeasuredValue=function(n){var t=nc?c:n;ft!==t&&(ft=t,this.repaint())},this.setTitleString=function(n){nr=n,w({background:!0}),this.repaint()},this.setUnitString=function(n){tr=n,w({background:!0}),this.repaint()},this.setMinValue=function(n){f=n,w({background:!0,foreground:!0,pointer:!0}),this.repaint()},this.getMinValue=function(){return f},this.setMaxValue=function(n){c!==n&&(c=n,w({background:!0,foreground:!0,pointer:!0}),this.repaint())},this.getMaxValue=function(){return c},this.setThreshold=function(n){var t=nc?c:n;ut!==t&&(ut=t,w({background:!0}),this.repaint())},this.repaint=function(){dr||w({frame:!0,background:!0,led:!0,pointer:!0,foreground:!0,bargraphled:!0}),s.clearRect(0,0,s.canvas.width,s.canvas.height),s.drawImage(kt,0,0),s.drawImage(ri,0,0),hi&&vu(l,v),hr&&(lh-4?c||(s=h-l-h*.2,c=!0,clearTimeout(d),d=setTimeout(w,200)):st&&l<=h-4&&(s=0,c=!1),u.fillText(n,h-2-s,e*.5)),u.restore()},yt=function(n,i,r,u){var ut=t(n,i),e=ut.getContext("2d");e.save();var pt=0,d=0,kt=n,ot=i,ft=Math.min(n,i)*.095,h=e.createLinearGradient(0,d,0,d+ot);h.addColorStop(0,"#4c4c4c"),h.addColorStop(.08,"#666666"),h.addColorStop(.92,"#666666"),h.addColorStop(1,"#e6e6e6"),e.fillStyle=h,f(e,pt,d,kt,ot,ft),e.fill(),e.restore(),e.save();var nt=tt(r),o=it(nt[0],nt[1],nt[2]),g=tt(u.gradientStartColor),ht=it(g[0],g[1],g[2]),rt=tt(u.gradientFraction1Color),lt=it(rt[0],rt[1],rt[2]),a=tt(u.gradientFraction2Color),ct=it(a[0],a[1],a[2]),v=tt(u.gradientFraction3Color),wt=it(v[0],v[1],v[2]),c=tt(u.gradientStopColor),yt=it(c[0],c[1],c[2]),l=at(o[0],o[1],ht[2]-.31),y=at(o[0],o[1],lt[2]-.31),k=at(o[0],o[1],ct[2]-.31),p=at(o[0],o[1],wt[2]-.31),w=at(o[0],o[1],yt[2]-.31),bt=1,b=1,st=n-2,et=i-2,vt=ft-1,s=e.createLinearGradient(0,b,0,b+et);return s.addColorStop(0,"rgb("+l[0]+", "+l[1]+", "+l[2]+")"),s.addColorStop(.03,"rgb("+y[0]+","+y[1]+","+y[2]+")"),s.addColorStop(.49,"rgb("+k[0]+","+k[1]+","+k[2]+")"),s.addColorStop(.5,"rgb("+p[0]+","+p[1]+","+p[2]+")"),s.addColorStop(1,"rgb("+w[0]+","+w[1]+","+w[2]+")"),e.fillStyle=s,f(e,bt,b,st,et,vt),e.fill(),e.restore(),ut},lt=function(n){var i=tt(n),r=it(i[0],i[1],i[2]),t=at(r[0],.57,.83);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},w=function(){c?(s>h&&(s=-l),s+=2,d=setTimeout(w,60)):s=0,wt.repaint()},b=function(){ot=!0,rt=k(y,p,a);if(null!==o&&0=o[n].start&&v<=o[n].stop){t=ft[n],i=ut[n];break}u.drawImage(t,0,0),bt(v,i)},this.repaint(),this},lu=function(n,t){t=t||{};var h=undefined===t.width?128:t.width,c=undefined===t.height?64:t.height,f=undefined===t.lcdColor?steelseries.LcdColor.STANDARD:t.lcdColor,b=undefined===t.lcdDecimals?2:t.lcdDecimals,d=undefined===t.unitString?"":t.unitString,w=undefined===t.unitStringVisible?!1:t.unitStringVisible,p=undefined===t.digitalFont?!1:t.digitalFont,rt=undefined===t.valuesNumeric?!0:t.valuesNumeric,o=undefined===t.value?0:t.value,s=0,i=r.getElementById(n).getContext("2d");i.save(),i.clearRect(0,0,i.canvas.width,i.canvas.height),i.canvas.width=h,i.canvas.height=c;var e=h,u=c,g=Math.floor(u/1.875)+"px sans-serif",tt=Math.floor(u/1.875)+"px LCDMono2Ultra",y=Math.floor(u/3.5)+"px sans-serif",it=Math.floor(u/3.5)+"px LCDMono2Ultra",v=!1,l,nt=function(n){var t,o,r;i.save(),i.textAlign="right",i.textBaseline="middle",i.strokeStyle=f.textColor,i.fillStyle=f.textColor,(f===steelseries.LcdColor.STANDARD||f===steelseries.LcdColor.STANDARD_GREEN)&&(i.shadowColor="gray",i.shadowOffsetX=u*.05,i.shadowOffsetY=u*.05,i.shadowBlur=u*.06),rt?(i.font=Math.floor(u/2.5)+"px sans-serif",t=0,w&&(i.font=Math.floor(u/2.5)+"px sans-serif",t=i.measureText(d).width),i.font=p?tt:g,o=n.toFixed(b),i.fillText(o,e-t-4,u*.38),w&&(i.font=Math.floor(u/3)+"px sans-serif",i.fillText(d,e-2,u*.46)),r=s.toFixed(b),i.font=p?it:y,i.textAlign="center",i.fillText(r,e/2,u*.8)):(i.font=Math.floor(u/2.5)+"px sans-serif",i.fillText(n,e-2,u*.38),i.font=y,i.textAlign="center",i.fillText(s,e/2,u*.8)),i.restore()},a=function(){v=!0,l=k(h,c,f)};return this.setValue=function(n){(o!==n||s!==n)&&(s=o,o=n,this.repaint())},this.setLcdColor=function(n){f=n,a(),this.repaint()},this.repaint=function(){v||a(),i.clearRect(0,0,i.canvas.width,i.canvas.height),i.drawImage(l,0,0),nt(o)},this.repaint(),this},yu=function(n,u){u=u||{};var c=undefined===u.size?200:u.size,ot=undefined===u.decimalsVisible?!1:u.decimalsVisible,bt=undefined===u.textOrientationFixed?!1:u.textOrientationFixed,ht=undefined===u.frameDesign?steelseries.FrameDesign.METAL:u.frameDesign,kt=undefined===u.frameVisible?!0:u.frameVisible,a=undefined===u.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:u.backgroundColor,p=undefined===u.pointerColor?steelseries.ColorDef.RED:u.pointerColor,vt=undefined===u.foregroundType?steelseries.ForegroundType.TYPE1:u.foregroundType,d,e=0,k=0,h=0,pt=Math.PI/180,st=this.value,ct=ot?1:0,s=r.getElementById(n).getContext("2d");s.save(),s.clearRect(0,0,s.canvas.width,s.canvas.height),s.canvas.width=c,s.canvas.height=c;var f=c,o=c,v=f/2,l=o/2,yt=!1,it=t(c,c),ut=it.getContext("2d"),g=t(c,c),et=g.getContext("2d"),nt=t(c,c),lt=nt.getContext("2d"),tt=t(c,c),at=tt.getContext("2d"),dt=function(n){n.textAlign="center",n.textBaseline="middle",n.save(),n.strokeStyle=a.labelColor.getRgbaColor(),n.fillStyle=a.labelColor.getRgbaColor(),n.translate(v,l);var r,t;for(i=0;360>i;i++){n.strokeStyle=a.labelColor.getRgbaColor(),n.lineWidth=.5,n.beginPath(),n.moveTo(f*.38,0),n.lineTo(f*.37,0),n.closePath(),n.stroke(),0==i%5&&(n.strokeStyle=a.labelColor.getRgbaColor(),n.lineWidth=1,n.beginPath(),n.moveTo(f*.38,0),n.lineTo(f*.36,0),n.closePath(),n.stroke()),0==i%45&&(n.strokeStyle=a.labelColor.getRgbaColor(),n.lineWidth=1,n.beginPath(),n.moveTo(f*.38,0),n.lineTo(f*.34,0),n.closePath(),n.stroke()),300n?360+n:n,t=359.9=e&&(h=90-e),90=e&&(h=e-90),180=e&&(h=270-e),270=e&&(h=e-270),0>e&&e>=-90&&(h=90-Math.abs(e)),e<-90&&e>=-180&&(h=Math.abs(e)-90),e<-180&&e>=-270&&(h=270-Math.abs(e)),e<-270&&e>=-360&&(h=Math.abs(e)-270),this.repaint())},this.getValue=function(){return e},this.setValueAnimated=function(n){360-n+e=e&&(h=90-e),90=e&&(h=e-90),180=e&&(h=270-e),270=e&&(h=e-270),0>e&&e>=-90&&(h=90-Math.abs(e)),e<-90&&e>=-180&&(h=Math.abs(e)-90),e<-180&&e>=-270&&(h=270-Math.abs(e)),e<-270&&e>=-360&&(h=Math.abs(e)-270),t.repaint()},d.start()}},this.setFrameDesign=function(n){ft(),ht=n,rt(),this.repaint()},this.setBackgroundColor=function(n){ft(),a=n,rt(),this.repaint()},this.setForegroundType=function(n){ft(),vt=n,rt(),this.repaint()},this.setPointerColor=function(n){ft(),p=n,rt(),this.repaint()},this.repaint=function(){yt||rt(),s.save(),s.clearRect(0,0,s.canvas.width,s.canvas.height),s.drawImage(it,0,0),st=Math.PI/2+e*pt-Math.PI/2,s.save(),s.translate(v,l),s.rotate(st),s.translate(-v,-l),s.drawImage(g,0,0),s.fillStyle=a.labelColor.getRgbaColor(),s.textAlign="center",s.textBaseline="middle",bt?(s.restore(),s.font=ot?f*.1+"px sans-serif":f*.15+"px sans-serif",s.fillText(h.toFixed(ct)+"\u00b0",v,l,f*.35)):(s.font=ot?f*.15+"px sans-serif":f*.2+"px sans-serif",s.fillText(h.toFixed(ct)+"\u00b0",v,l,f*.35),s.restore()),s.translate(v,l),s.rotate(st+k*Math.PI/180),s.translate(-v,-l),s.drawImage(nt,0,0),s.restore(),s.drawImage(tt,0,0),s.restore()},this.repaint(),this},bu=function(n,u){u=u||{};var o=undefined===u.size?200:u.size,wt=undefined===u.frameDesign?steelseries.FrameDesign.METAL:u.frameDesign,ui=undefined===u.frameVisible?!0:u.frameVisible,nt=undefined===u.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:u.backgroundColor,at=undefined===u.pointerType?steelseries.PointerType.TYPE2:u.pointerType,h=undefined===u.pointerColor?steelseries.ColorDef.RED:u.pointerColor,ni=undefined===u.knobType?steelseries.KnobType.STANDARD_KNOB:u.knobType,ii=undefined===u.knobStyle?steelseries.KnobStyle.SILVER:u.knobStyle,dt=undefined===u.foregroundType?steelseries.ForegroundType.TYPE1:u.foregroundType,c=undefined===u.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:u.pointSymbols,fi=undefined===u.customLayer?null:u.customLayer,gt=undefined===u.degreeScale?!1:u.degreeScale,lt=undefined===u.roseVisible?!0:u.roseVisible,it,v=0,ht=Math.PI/180,ct=this.value,s=r.getElementById(n).getContext("2d");s.save(),s.clearRect(0,0,s.canvas.width,s.canvas.height),s.canvas.width=o,s.canvas.height=o;var f=o,e=o,l=f/2,a=e/2,kt=!1,ft=t(o,o),g=ft.getContext("2d"),ut=t(o,o),pt=ut.getContext("2d"),et=t(o,o),bt=et.getContext("2d"),st=t(o,o),k=st.getContext("2d"),ot=t(o,o),vt=ot.getContext("2d"),ti=function(n){var t,r,u;n.textAlign="center",n.textBaseline="middle",n.save(),n.strokeStyle=nt.labelColor.getRgbaColor(),n.fillStyle=nt.labelColor.getRgbaColor(),n.translate(l,a);if(gt)for(t=.08*f+"px serif",r=f*.033+"px serif",n.rotate(ht*10),i=10;360>=i;i+=10){n.save();switch(i){case 360:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[2],0,0,f),n.translate(-f*.35,0);break;case 90:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[4],0,0,f),n.translate(-f*.35,0);break;case 180:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[6],0,0,f),n.translate(-f*.35,0);break;case 270:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[0],0,0,f),n.translate(-f*.35,0);break;default:u=(i+90)%360,n.translate(f*.37,0),n.rotate(Math.PI/2),n.font=r,n.fillText("0".substring(u>=100)+u,0,0,f),n.translate(-f*.37,0)}n.restore(),n.rotate(ht*10)}else for(t=.12*f+"px serif",r=.06*f+"px serif",i=0;360>i;i+=2.5){0==i%5&&(n.lineWidth=1,n.beginPath(),n.moveTo(f*.38,0),n.lineTo(f*.36,0),n.closePath(),n.stroke()),n.save();switch(i){case 0:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[2],0,0,f),n.translate(-f*.35,0);break;case 45:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=r,n.fillText(c[3],0,0,f),n.translate(-f*.29,0);break;case 90:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[4],0,0,f),n.translate(-f*.35,0);break;case 135:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=r,n.fillText(c[5],0,0,f),n.translate(-f*.29,0);break;case 180:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[6],0,0,f),n.translate(-f*.35,0);break;case 225:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=r,n.fillText(c[7],0,0,f),n.translate(-f*.29,0);break;case 270:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(c[0],0,0,f),n.translate(-f*.35,0);break;case 315:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=r,n.fillText(c[1],0,0,f),n.translate(-f*.29,0)}n.restore(),lt&&(0===i||22.5===i||45===i||67.5===i||90===i||112.5===i||135===i||157.5===i||180===i||202.5===i||225===i||247.5===i||270===i||292.5===i||315===i||337.5===i||360===i)&&(n.save(),n.beginPath(),i%45?n.moveTo(f*.29,0):n.moveTo(f*.38,0),n.lineTo(f*.1,0),n.closePath(),n.restore(),n.lineWidth=1,n.strokeStyle=nt.symbolColor.getRgbaColor(),n.stroke()),n.rotate(ht*2.5)}n.translate(-l,-a),n.restore()},yt=function(n,t){var o,s,l,i,r,u,c;n.save(),t&&(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)");switch(at.type){case"type2":n.beginPath(),n.moveTo(f*.53271,e*.453271),n.bezierCurveTo(f*.53271,e*.453271,f*.5,e*.149532,f*.5,e*.149532),n.bezierCurveTo(f*.5,e*.149532,f*.467289,e*.453271,f*.467289,e*.453271),n.bezierCurveTo(f*.453271,e*.462616,f*.443925,e*.481308,f*.443925,e*.5),n.bezierCurveTo(f*.443925,e*.5,f*.556074,e*.5,f*.556074,e*.5),n.bezierCurveTo(f*.556074,e*.481308,f*.546728,e*.462616,f*.53271,e*.453271),n.closePath(),t||(o=n.createLinearGradient(.471962*f,0,.528036*f,0),o.addColorStop(0,h.light.getRgbaColor()),o.addColorStop(.46,h.light.getRgbaColor()),o.addColorStop(.47,h.medium.getRgbaColor()),o.addColorStop(1,h.medium.getRgbaColor()),n.fillStyle=o,n.strokeStyle=h.dark.getRgbaColor()),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke(),n.beginPath(),n.moveTo(f*.467289,e*.546728),n.bezierCurveTo(f*.467289,e*.546728,f*.5,e*.850467,f*.5,e*.850467),n.bezierCurveTo(f*.5,e*.850467,f*.53271,e*.546728,f*.53271,e*.546728),n.bezierCurveTo(f*.546728,e*.537383,f*.556074,e*.518691,f*.556074,e*.5),n.bezierCurveTo(f*.556074,e*.5,f*.443925,e*.5,f*.443925,e*.5),n.bezierCurveTo(f*.443925,e*.518691,f*.453271,e*.537383,f*.467289,e*.546728),n.closePath(),t||(s=n.createLinearGradient(.471962*f,0,.528036*f,0),s.addColorStop(0,"#e3e5e8"),s.addColorStop(.48,"#e3e5e8"),s.addColorStop(.48,"#abb1b8"),s.addColorStop(1,"#abb1b8"),n.fillStyle=s,l="#abb1b8",n.strokeStyle=l),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke();break;case"type3":n.beginPath(),n.moveTo(f*.5,e*.149532),n.bezierCurveTo(f*.5,e*.149532,f*.443925,e*.490654,f*.443925,e*.5),n.bezierCurveTo(f*.443925,e*.53271,f*.467289,e*.556074,f*.5,e*.556074),n.bezierCurveTo(f*.53271,e*.556074,f*.556074,e*.53271,f*.556074,e*.5),n.bezierCurveTo(f*.556074,e*.490654,f*.5,e*.149532,f*.5,e*.149532),n.closePath(),t||(i=n.createLinearGradient(.471962*f,0,.528036*f,0),i.addColorStop(0,h.light.getRgbaColor()),i.addColorStop(.46,h.light.getRgbaColor()),i.addColorStop(.47,h.medium.getRgbaColor()),i.addColorStop(1,h.medium.getRgbaColor()),n.fillStyle=i,n.strokeStyle=h.dark.getRgbaColor()),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke();break;case"type1:":default:n.beginPath(),n.moveTo(f*.5,e*.495327),n.lineTo(f*.528037,e*.495327),n.lineTo(f*.5,e*.149532),n.lineTo(f*.471962,e*.495327),n.lineTo(f*.5,e*.495327),n.closePath(),t||(r=n.createLinearGradient(.471962*f,0,.528036*f,0),r.addColorStop(0,h.light.getRgbaColor()),r.addColorStop(.46,h.light.getRgbaColor()),r.addColorStop(.47,h.medium.getRgbaColor()),r.addColorStop(1,h.medium.getRgbaColor()),n.fillStyle=r,n.strokeStyle=h.dark.getRgbaColor()),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke(),n.beginPath(),n.moveTo(f*.5,e*.504672),n.lineTo(f*.471962,e*.504672),n.lineTo(f*.5,e*.850467),n.lineTo(f*.528037,e*.504672),n.lineTo(f*.5,e*.504672),n.closePath(),t||(u=n.createLinearGradient(.471962*f,0,.528036*f,0),u.addColorStop(0,"#e3e5e8"),u.addColorStop(.48,"#e3e5e8"),u.addColorStop(.480099,"#abb1b8"),u.addColorStop(1,"#abb1b8"),n.fillStyle=u,c="#abb1b8",n.strokeStyle=c),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke()}t&&p(n,f,e,Math.floor(f*.006)),n.restore()},d=function(){kt=!0,ui&&w(g,wt,l,a,f,e),b(g,nt,l,a,f,e),rt(g,fi,l,a,f,e),lt&&di(g,l,a,f,e,nt),ti(g),yt(pt,!1),yt(bt,!0),y(vt,dt,f,e,!0,ni,ii)},tt=function(){ft.width=o,ft.height=o,g=ft.getContext("2d"),ut.width=o,ut.height=o,pt=ut.getContext("2d"),et.width=o,et.height=o,bt=et.getContext("2d"),st.width=o,st.height=o,k=st.getContext("2d"),ot.width=o,ot.height=o,vt=ot.getContext("2d")};return this.setValue=function(n){n=n%360,v!==n&&(v=n,this.repaint())},this.getValue=function(){return v},this.setValueAnimated=function(n){var i=n%360,r=this,t;v!==i&&(undefined!==it&&it.playing&&it.stop(),t=ri(v,i),it=new Tween({},"",Tween.elasticEaseOut,v,v+t,2),it.onMotionChanged=function(n){v=n.target._pos%360,r.repaint()},it.start())},this.setFrameDesign=function(n){tt(),wt=n,d(),this.repaint()},this.setBackgroundColor=function(n){tt(),nt=n,d(),this.repaint()},this.setForegroundType=function(n){tt(),dt=n,d(),this.repaint()},this.setPointerColor=function(n){tt(),h=n,d(),this.repaint()},this.setPointerType=function(n){tt(),at=n,d(),this.repaint()},this.setPointSymbols=function(n){tt(),c=n,d(),this.repaint()},this.repaint=function(){kt||d(),s.clearRect(0,0,s.canvas.width,s.canvas.height),s.drawImage(ft,0,0),ct=Math.PI/2+v*ht-Math.PI/2;var n=f*.006;k.clearRect(0,0,f,e),k.save(),k.translate(l,a),k.rotate(ct),k.translate(-l,-a),k.drawImage(et,0,0),k.restore(),s.drawImage(st,0,0,f,e,n,n,f+n,e+n),s.save(),s.translate(l,a),s.rotate(ct),s.translate(-l,-a),s.drawImage(ut,0,0),s.restore(),s.drawImage(ot,0,0),s.restore()},this.repaint(),this},ku=function(n,u){u=u||{};var o=undefined===u.size?200:u.size,yi=undefined===u.frameDesign?steelseries.FrameDesign.METAL:u.frameDesign,rr=undefined===u.frameVisible?!0:u.frameVisible,tt=undefined===u.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:u.backgroundColor,bt=undefined===u.pointerTypeLatest?steelseries.PointerType.TYPE1:u.pointerTypeLatest,ni=undefined===u.pointerTypeAverage?steelseries.PointerType.TYPE8:u.pointerTypeAverage,kt=undefined===u.pointerColor?steelseries.ColorDef.RED:u.pointerColor,ci=undefined===u.pointerColorAverage?steelseries.ColorDef.BLUE:u.pointerColorAverage,sr=undefined===u.knobType?steelseries.KnobType.STANDARD_KNOB:u.knobType,hr=undefined===u.knobStyle?steelseries.KnobStyle.SILVER:u.knobStyle,bi=undefined===u.foregroundType?steelseries.ForegroundType.TYPE1:u.foregroundType,a=undefined===u.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:u.pointSymbols,cr=undefined===u.customLayer?null:u.customLayer,fr=undefined===u.degreeScale?!0:u.degreeScale,pi=undefined===u.roseVisible?!1:u.roseVisible,st=undefined===u.lcdColor?steelseries.LcdColor.STANDARD:u.lcdColor,wi=undefined===u.lcdVisible?!0:u.lcdVisible,er=undefined===u.digitalFont?!1:u.digitalFont,ut=undefined===u.section?null:u.section,ft=undefined===u.area?null:u.area,ti=undefined===u.lcdTitleStrings?["Latest","Average"]:u.lcdTitleStrings,si=undefined===u.titleString?"":u.titleString,it,et,d=0,p=0,wt=Math.PI/180,dt=this.valueLatest,ii=this.valueAverage,nr=-Math.PI/2,vi=Math.PI*2,gi=360,e=r.getElementById(n).getContext("2d");e.save(),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.canvas.width=o,e.canvas.height=o;var f=o,s=o,h=f/2,c=s/2,ur=Math.floor(f/10)+"px sans-serif",or=Math.floor(f/10)+"px LCDMono2Ultra",ai=!1,at=t(o,o),nt=at.getContext("2d"),gt,yt=t(o,o),oi=yt.getContext("2d"),ct=t(o,o),fi=ct.getContext("2d"),pt=t(o,o),li=pt.getContext("2d"),lt=t(o,o),hi=lt.getContext("2d"),ot=t(o,o),l=ot.getContext("2d"),vt=t(o,o),ui=vt.getContext("2d"),ei=function(n,t){e.save(),e.textAlign="center",e.textBaseline="middle",e.strokeStyle=st.textColor,e.fillStyle=st.textColor,n<0&&(n+=360),n="00"+Math.round(n),n=n.substring(n.length,n.length-3),(st===steelseries.LcdColor.STANDARD||st===steelseries.LcdColor.STANDARD_GREEN)&&(e.shadowColor="gray",e.shadowOffsetX=f*.007,e.shadowOffsetY=f*.007,e.shadowBlur=f*.01),e.font=er?or:ur,t?e.fillText(n+"\u00b0",f/2+2,f*.385,f*.4):e.fillText(n+"\u00b0",f/2+2,f*.63,f*.4),e.restore()},ki=function(n,t,i,r,u){n.save(),n.strokeStyle=r,n.fillStyle=r,n.lineWidth=f*.035;var e=vi/gi*t,o=e+(i-t)/(gi/vi);n.translate(h,c),n.rotate(nr),n.beginPath(),u?(n.moveTo(0,0),n.arc(0,0,f*.365-n.lineWidth/2,e,o,!1)):n.arc(0,0,f*.365,e,o,!1),n.moveTo(0,0),n.closePath(),u?n.fill():n.stroke(),n.translate(-h,-c),n.restore()},tr=function(n){var l,o;n.textAlign="center",n.textBaseline="middle";var s=f*.38,v=f*.35,w=f*.355,p=f*.36,e=f*.1,y=f*.31,r=f*.36,t,u;n.save(),n.strokeStyle=tt.labelColor.getRgbaColor(),n.fillStyle=tt.labelColor.getRgbaColor(),n.translate(h,c);if(fr)for(t=Math.floor(.1*f)+"px serif bold",u=Math.floor(f*.04)+"px sans-serif",n.rotate(wt*5),i=5;360>=i;i+=5){n.save();switch(i){case 360:n.translate(r,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[2],0,0,e),n.translate(-r,0);break;case 90:n.translate(r,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[4],0,0,e),n.translate(-r,0);break;case 180:n.translate(r,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[6],0,0,e),n.translate(-r,0);break;case 270:n.translate(r,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[0],0,0,e),n.translate(-r,0);break;case 5:case 85:case 95:case 175:case 185:case 265:case 275:case 355:break;default:(i+90)%20?(n.lineWidth=(i+90)%5?1.5:1,n.beginPath(),n.moveTo(s,0),l=(i+90)%10?p:v,n.lineTo(l,0),n.closePath(),n.stroke()):(n.lineWidth=1.5,n.beginPath(),n.moveTo(s,0),n.lineTo(v,0),n.closePath(),n.stroke(),o=(i+90)%360,n.translate(y,0),n.rotate(Math.PI/2),n.font=u,n.fillText("0".substring(o>=100)+o,0,0,e),n.translate(-y,0))}n.restore(),n.rotate(wt*5)}else for(t=.12*f+"px serif",u=.06*f+"px serif",n.lineWidth=1,n.strokeStyle=tt.symbolColor.getRgbaColor(),i=0;360>i;i+=2.5){0==i%5&&(n.beginPath(),n.moveTo(f*.38,0),n.lineTo(f*.36,0),n.closePath(),n.stroke()),n.save();switch(i){case 0:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[2],0,0),n.translate(-f*.35,0);break;case 45:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=u,n.fillText(a[3],0,0),n.translate(-f*.29,0);break;case 90:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[4],0,0),n.translate(-f*.35,0);break;case 135:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=u,n.fillText(a[5],0,0),n.translate(-f*.29,0);break;case 180:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[6],0,0),n.translate(-f*.35,0);break;case 225:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=u,n.fillText(a[7],0,0),n.translate(-f*.29,0);break;case 270:n.translate(f*.35,0),n.rotate(Math.PI/2),n.font=t,n.fillText(a[0],0,0),n.translate(-f*.35,0);break;case 315:n.translate(f*.29,0),n.rotate(Math.PI/2),n.font=u,n.fillText(a[1],0,0),n.translate(-f*.29,0)}n.restore(),pi&&(0===i||22.5===i||45===i||67.5===i||90===i||112.5===i||135===i||157.5===i||180===i||202.5===i||225===i||247.5===i||270===i||292.5===i||315===i||337.5===i||360===i)&&(n.save(),n.beginPath(),i%45?n.moveTo(f*.29,0):n.moveTo(f*.38,0),n.lineTo(f*.1,0),n.closePath(),n.restore(),n.stroke()),n.rotate(wt*2.5)}n.translate(-h,-c),n.restore()},ir=function(n){ti.length>0&&(n.save(),n.textAlign="center",n.textBaseline="middle",n.fillStyle=tt.labelColor.getRgbaColor(),n.font=.04*f+"px sans-serif",n.fillText(ti[0],f/2,s*.29,f*.3),n.fillText(ti[1],f/2,s*.71,f*.3),si.length>0&&(n.font=.0467*f+"px sans-serif",n.fillText(si,f/2,s*.5,f*.3)))},v=function(n){var t,i,r;n=n||{};var u=undefined===n.frame?!1:n.frame,l=undefined===n.background?!1:n.background,e=undefined===n.pointer?!1:n.pointer,o=undefined===n.foreground?!1:n.foreground;ai=!0,u&&rr&&w(nt,yi,h,c,f,s);if(l){b(nt,tt,h,c,f,s),rt(nt,cr,h,c,f,s);if(null!==ut&&00;i-=s)r>90||(e?(n.fillText(r,(t-t*.2)/2-8,i,t*.375),n.fillText(r,t-(t-t*.2)/2+8,i,t*.375),n.beginPath(),n.moveTo((t-t*.2)/2,i),n.lineTo(t-(t-t*.2)/2,i),n.closePath(),r+=10):(n.beginPath(),n.moveTo((t-t*.1)/2,i),n.lineTo(t-(t-t*.1)/2,i),n.closePath()),n.stroke()),e^=!0;for(e=!1,r=10,n.strokeStyle="#FFFFFF",n.lineWidth=1.5,n.beginPath(),n.moveTo(0,u/2),n.lineTo(t,u/2),n.closePath(),n.stroke(),n.fillStyle="#FFFFFF",n.lineWidth=1,i=u/2+s;i<=u;i+=s)r>90||(e?(n.fillText(-r,(t-t*.2)/2-8,i,t*.375),n.fillText(-r,t-(t-t*.2)/2+8,i,t*.375),n.beginPath(),n.moveTo((t-t*.2)/2,i),n.lineTo(t-(t-t*.2)/2,i),n.closePath(),r+=10):(n.beginPath(),n.moveTo((t-t*.1)/2,i),n.lineTo(t-(t-t*.1)/2,i),n.closePath()),n.stroke()),e^=!0;n.restore()},pt=function(n){var i,r,t;for(n.save(),n.fillStyle=nt.light.getRgbaColor(),n.beginPath(),n.moveTo(u*.476635,f*.5),n.bezierCurveTo(u*.476635,f*.514018,u*.485981,f*.523364,u*.5,f*.523364),n.bezierCurveTo(u*.514018,f*.523364,u*.523364,f*.514018,u*.523364,f*.5),n.bezierCurveTo(u*.523364,f*.485981,u*.514018,f*.476635,u*.5,f*.476635),n.bezierCurveTo(u*.485981,f*.476635,u*.476635,f*.485981,u*.476635,f*.5),n.closePath(),n.moveTo(u*.415887,f*.504672),n.lineTo(u*.415887,f*.495327),n.bezierCurveTo(u*.415887,f*.495327,u*.467289,f*.495327,u*.467289,f*.495327),n.bezierCurveTo(u*.471962,f*.481308,u*.481308,f*.471962,u*.495327,f*.467289),n.bezierCurveTo(u*.495327,f*.467289,u*.495327,f*.415887,u*.495327,f*.415887),n.lineTo(u*.504672,f*.415887),n.bezierCurveTo(u*.504672,f*.415887,u*.504672,f*.467289,u*.504672,f*.467289),n.bezierCurveTo(u*.518691,f*.471962,u*.528037,f*.481308,u*.53271,f*.495327),n.bezierCurveTo(u*.53271,f*.495327,u*.584112,f*.495327,u*.584112,f*.495327),n.lineTo(u*.584112,f*.504672),n.bezierCurveTo(u*.584112,f*.504672,u*.53271,f*.504672,u*.53271,f*.504672),n.bezierCurveTo(u*.528037,f*.518691,u*.518691,f*.53271,u*.5,f*.53271),n.bezierCurveTo(u*.481308,f*.53271,u*.471962,f*.518691,u*.467289,f*.504672),n.bezierCurveTo(u*.467289,f*.504672,u*.415887,f*.504672,u*.415887,f*.504672),n.closePath(),n.fill(),i=5,r=Math.PI/36,n.translate(c,l),n.rotate(-Math.PI/2),n.translate(-c,-l),t=-90;t<=90;t+=i)t%45==0||t===0?(n.strokeStyle=nt.medium.getRgbaColor(),n.lineWidth=2,n.beginPath(),n.moveTo(u*.5,f*.088785),n.lineTo(u*.5,f*.113),n.closePath(),n.stroke()):t%15==0?(n.strokeStyle="#FFFFFF",n.lineWidth=1,n.beginPath(),n.moveTo(u*.5,f*.088785),n.lineTo(u*.5,f*.103785),n.closePath(),n.stroke()):(n.strokeStyle="#FFFFFF",n.lineWidth=.5,n.beginPath(),n.moveTo(u*.5,f*.088785),n.lineTo(u*.5,f*.093785),n.closePath(),n.stroke()),n.translate(c,l),n.rotate(r,c,l),n.translate(-c,-l);n.restore()},vt=function(n){n.save();var i=u*.037383,t=f*.056074;n.beginPath(),n.moveTo(i*.5,0),n.lineTo(0,t),n.lineTo(i,t),n.closePath(),n.fillStyle=nt.light.getRgbaColor(),n.fill(),n.strokeStyle=nt.medium.getRgbaColor(),n.stroke(),n.restore()},it=function(){ct=!0,at&&w(ht,st,c,l,u,f),yt(ut),vt(rt),pt(tt),y(tt,ot,u,f,!0,ai,li,vi)},lt=function(){d.width=o,d.height=o,ht=d.getContext("2d"),a.width=o,a.height=o*Math.PI,ut=a.getContext("2d"),v.width=o*.037383,v.height=o*.056074,rt=v.getContext("2d"),k.width=o,k.height=o,tt=k.getContext("2d")};return this.setRoll=function(n){n=n%360,h!==n&&(h=n,this.repaint())},this.getRoll=function(){return h},this.setRollAnimated=function(n){n=n%360;if(h!==n){var t=this;undefined!==b&&b.playing&&b.stop(),b=new Tween({},"",Tween.regularEaseInOut,h,n,1),b.onMotionChanged=function(n){h=n.target._pos,t.repaint()},b.start()}},this.setPitch=function(n){n=(n+180-ft)%360-180,s!==n&&(s=n,s>90?(s=180-s,g||this.setRoll(h-180),g=!0):s<-90?(s=-180-s,g||this.setRoll(h+180),g=!0):g=!1,this.repaint())},this.getPitch=function(){return s},this.setPitchAnimated=function(n){if(s!==n){undefined!==p&&p.playing&&p.stop();var t=this;p=new Tween({},"",Tween.regularEaseInOut,s,n,1),p.onMotionChanged=function(n){t.setPitch(n.target._pos)},p.start()}},this.setPitchOffset=function(n){ft=n,this.repaint()},this.setFrameDesign=function(n){lt(),st=n,it(),this.repaint()},this.setForegroundType=function(n){lt(),ot=n,it(),this.repaint()},this.repaint=function(){ct||it(),e.save(),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.drawImage(d,0,0),e.save(),e.beginPath(),e.arc(c,l,u*.831775/2,0,Math.PI*2,!0),e.closePath(),e.clip(),e.translate(c,l),e.rotate(-(h*Math.PI/180)),e.translate(-c,0),e.translate(0,s*et),e.drawImage(a,0,-a.height/2),e.translate(0,-(s*et)-l),e.drawImage(v,u*.5-v.width/2,u*.107476),e.restore(),e.drawImage(k,0,0)},this.repaint(),this},ru=function(n,t){var a,e,s,f,c;t=t||{};var u=undefined===t.size?32:t.size,y=undefined===t.ledColor?steelseries.LedColor.RED_LED:t.ledColor,v=!1,p=0,i=r.getElementById(n).getContext("2d");i.save(),i.clearRect(0,0,i.canvas.width,i.canvas.height),i.canvas.width=u,i.canvas.height=u,a=!1,e=r.createElement("canvas"),e.width=u,e.height=u,s=e.getContext("2d"),f=r.createElement("canvas"),f.width=u,f.height=u;var l=f.getContext("2d"),o=f,w=function(){a=!0,s.clearRect(0,0,s.canvas.width,s.canvas.height),s.drawImage(h(u,1,y),0,0),l.clearRect(0,0,l.canvas.width,l.canvas.height),l.drawImage(h(u,0,y),0,0)};return this.toggleLed=function(){o=o===e?f:e,c()},this.setLedColor=function(n){y=n,a=!1,c()},this.setLedOnOff=function(n){o=!0===n?e:f,c()},this.blink=function(n){n?v||(p=setInterval(this.toggleLed,1e3),v=!0):v&&(clearInterval(p),v=!1)},c=function(){a||w(),i.save(),i.clearRect(0,0,i.canvas.width,i.canvas.height),i.drawImage(o,0,0),i.restore()},c(),this},tu=function(n,i){i=i||{};var f=undefined===i.size?200:i.size,yi=undefined===i.frameDesign?steelseries.FrameDesign.METAL:i.frameDesign,rr=undefined===i.frameVisible?!0:i.frameVisible,v=undefined===i.pointerType?steelseries.PointerType.TYPE1:i.pointerType,k=undefined===i.pointerColor?v===steelseries.PointerType.TYPE1?steelseries.ColorDef.GRAY:steelseries.ColorDef.BLACK:i.pointerColor,et=undefined===i.backgroundColor?v===steelseries.PointerType.TYPE1?steelseries.BackgroundColor.ANTHRACITE:steelseries.BackgroundColor.LIGHT_GRAY:i.backgroundColor,nr=undefined===i.foregroundType?steelseries.ForegroundType.TYPE1:i.foregroundType,ir=undefined===i.customLayer?null:i.customLayer,nt=undefined===i.isAutomatic?!0:i.isAutomatic,l=undefined===i.hour?11:i.hour,a=undefined===i.minute?5:i.minute,g=undefined===i.second?0:i.second,bt=undefined===i.secondMovesContinuous?!1:i.secondMovesContinuous,kt=undefined===i.timeZoneOffsetHour?0:i.timeZoneOffsetHour,dt=undefined===i.timeZoneOffsetMinute?0:i.timeZoneOffsetMinute,gt=undefined===i.secondPointerVisible?!0:i.secondPointerVisible,d=new Date,si,ui,ri,ki,ft=bt?100:1e3;ft=gt?ft:100;var fr=this,sr=Math.PI/2,ti=Math.PI*2,it=Math.PI/180,ei=6,o=r.getElementById(n).getContext("2d");o.save(),o.clearRect(0,0,o.canvas.width,o.canvas.height),o.canvas.width=f,o.canvas.height=f;var u=f,e=f,s=u/2,h=e/2,wi=!1,st=t(f,f),bi=st.getContext("2d"),ot=t(f,f),ni=ot.getContext("2d"),yt=t(f,f),pi=yt.getContext("2d"),pt=t(f,f),tr=pt.getContext("2d"),wt=t(f,f),di=wt.getContext("2d"),lt=t(f,f),gi=lt.getContext("2d"),at=t(f,f),vi=at.getContext("2d"),vt=t(f,f),hi=vt.getContext("2d"),tt=t(f,f),c=tt.getContext("2d"),ht=t(f,f),fi=ht.getContext("2d"),er=function(n,t){var i,e,o,r,f;r=u*.405,n.save(),n.translate(s,h);switch(t.type){case"type1":for(e=u*.074766,f=r-e,n.strokeStyle=et.labelColor.getRgbaColor(),n.lineWidth=u*.014018,i=0;i<360;i+=30)n.beginPath(),n.moveTo(r,0),n.lineTo(f,0),n.closePath(),n.stroke(),n.rotate(30*it);for(o=u*.126168,f=r-o,n.lineWidth=u*.03271,i=0;i<360;i+=90)n.beginPath(),n.moveTo(r,0),n.lineTo(f,0),n.closePath(),n.stroke(),n.rotate(90*it);break;case"type2":default:for(e=u*.037383,f=r-e,n.strokeStyle=et.labelColor.getRgbaColor(),n.lineWidth=u*.009345,i=0;i<360;i+=6)n.beginPath(),n.moveTo(r,0),n.lineTo(f,0),n.closePath(),n.stroke(),n.rotate(6*it);for(o=u*.084112,f=r-o,n.lineWidth=u*.028037,i=0;i<360;i+=30)n.beginPath(),n.moveTo(r,0),n.lineTo(f,0),n.closePath(),n.stroke(),n.rotate(30*it)}n.translate(-s,-h),n.restore()},ci=function(n,t,i){n.save();var r;i&&(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)");switch(t.type){case"type2":n.beginPath(),n.lineWidth=u*.046728,n.moveTo(s,u*.289719),n.lineTo(s,u*.289719+u*.224299),i||(n.strokeStyle=k.medium.getRgbaColor()),n.closePath(),n.stroke();break;case"type1":default:n.beginPath(),n.moveTo(u*.471962,e*.560747),n.lineTo(u*.471962,e*.214953),n.lineTo(u*.5,e*.182242),n.lineTo(u*.528037,e*.214953),n.lineTo(u*.528037,e*.560747),n.lineTo(u*.471962,e*.560747),n.closePath(),i||(r=n.createLinearGradient(u*.471962,e*.560747,u*.528037,e*.214953),r.addColorStop(1,k.veryLight.getRgbaColor()),r.addColorStop(0,k.light.getRgbaColor()),n.fillStyle=r,n.strokeStyle=k.light.getRgbaColor()),n.fill(),n.stroke()}i&&p(n,u,e,Math.floor(u*.006)),n.restore()},li=function(n,t,i){n.save();var r;i&&(n.fillStyle="rgba(0, 0, 0, 0.4)",n.strokeStyle="rgba(0, 0, 0, 0.4)");switch(t.type){case"type2":n.beginPath(),n.lineWidth=u*.03271,n.moveTo(s,u*.116822),n.lineTo(s,u*.116822+u*.38785),i||(n.strokeStyle=k.medium.getRgbaColor()),n.closePath(),n.stroke();break;case"type1":default:n.beginPath(),n.moveTo(u*.518691,e*.574766),n.lineTo(u*.523364,e*.135514),n.lineTo(u*.5,e*.107476),n.lineTo(u*.476635,e*.140186),n.lineTo(u*.476635,e*.574766),n.lineTo(u*.518691,e*.574766),n.closePath(),i||(r=n.createLinearGradient(u*.518691,e*.574766,u*.476635,e*.140186),r.addColorStop(1,k.veryLight.getRgbaColor()),r.addColorStop(0,k.light.getRgbaColor()),n.fillStyle=r,n.strokeStyle=k.light.getRgbaColor()),n.fill(),n.stroke()}i&&p(n,u,e,Math.floor(u*.006)),n.restore()},ai=function(n,t,i){n.save();var r;i?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)"):(n.fillStyle=steelseries.ColorDef.RED.medium.getRgbaColor(),n.strokeStyle=steelseries.ColorDef.RED.medium.getRgbaColor());switch(t.type){case"type2":n.lineWidth=u*.009345,n.beginPath(),n.moveTo(s,u*.09813),n.lineTo(s,u*.09813+u*.126168),n.closePath(),n.stroke(),n.lineWidth=u*.018691,n.beginPath(),n.moveTo(s,u*.308411),n.lineTo(s,u*.308411+u*.191588),n.closePath(),n.stroke(),n.lineWidth=u*.016,n.beginPath(),n.arc(s,u*.26,u*.085/2,0,ti),n.closePath(),n.stroke();break;case"type1":default:n.beginPath(),n.moveTo(u*.509345,e*.116822),n.lineTo(u*.509345,e*.574766),n.lineTo(u*.490654,e*.574766),n.lineTo(u*.490654,e*.116822),n.lineTo(u*.509345,e*.116822),n.closePath(),i||(r=n.createLinearGradient(u*.509345,e*.116822,u*.490654,e*.574766),r.addColorStop(0,steelseries.ColorDef.RED.light.getRgbaColor()),r.addColorStop(.47,steelseries.ColorDef.RED.medium.getRgbaColor()),r.addColorStop(1,steelseries.ColorDef.RED.dark.getRgbaColor()),n.fillStyle=r,n.strokeStyle=steelseries.ColorDef.RED.dark.getRgbaColor()),n.fill(),n.stroke()}i&&p(n,u,e,Math.floor(u*.006)),n.restore()},or=function(n){var i=u*.006,t;n.beginPath(),n.arc(s,h,u*.045,0,ti),n.closePath(),t=n.createLinearGradient(s-u*.045/2,h-u*.045/2,s+u*.045/2,h+u*.045/2),t.addColorStop(0,"#eef0f2"),t.addColorStop(1,"#65696d"),n.fillStyle=t,n.fill()},ur=function(n,t){var r=u*.006,i;n.save();switch(t.type){case"type2":n.fillStyle="#000000",n.beginPath(),n.arc(s,h,u*.088785/2,0,ti),n.closePath(),n.fill();break;case"type1":default:i=n.createLinearGradient(s-u*.027/2,h-u*.027/2,s+u*.027/2,h+u*.027/2),i.addColorStop(0,"#f3f4f7"),i.addColorStop(.11,"#f3f5f7"),i.addColorStop(.12,"#f1f3f5"),i.addColorStop(.2,"#c0c5cb"),i.addColorStop(.2,"#bec3c9"),i.addColorStop(1,"#bec3c9"),n.fillStyle=i,n.beginPath(),n.arc(s,h,u*.027,0,ti),n.closePath(),n.fill()}n.restore()},ii=function(n,t,i){ri=i*ei*it,si=t*ei*it,ui=(n+t/60)*ei*5*it},oi=function(){nt?d=new Date:(d.setHours(l),d.setMinutes(a),d.setSeconds(g)),g=d.getSeconds()+(bt?d.getMilliseconds()/1e3:0),l=kt!=0&&dt!=0?d.getUTCHours()+kt:d.getHours(),l=l%12,a=kt!=0&&dt!=0?d.getUTCMinutes()+dt:d.getMinutes(),a>60&&(a-=60,l++),a<0&&(a+=60,l--),l=l%12,ii(l,a,g),nt&&(ki=setTimeout(oi,ft)),fr.repaint()},ut=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,f=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;wi=!0,r&&rr&&w(bi,yi,s,h,u,e),f&&(b(ni,et,s,h,u,e),rt(ni,ir,s,h,u,e),er(ni,v)),t&&(ci(pi,v,!1),ci(tr,v,!0),li(di,v,!1),li(gi,v,!0),ai(vi,v,!1),ai(hi,v,!0)),i&&(ur(fi,v),y(fi,nr,u,e,!1))},ct=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,u=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;r&&(st.width=f,st.height=f,bi=st.getContext("2d")),u&&(ot.width=f,ot.height=f,ni=ot.getContext("2d")),t&&(yt.width=f,yt.height=f,pi=yt.getContext("2d"),pt.width=f,pt.height=f,tr=pt.getContext("2d"),wt.width=f,wt.height=f,di=wt.getContext("2d"),lt.width=f,lt.height=f,gi=lt.getContext("2d"),at.width=f,at.height=f,vi=at.getContext("2d"),vt.width=f,vt.height=f,hi=vt.getContext("2d"),tt.width=f,tt.height=f,c=tt.getContext("2d")),i&&(ht.width=f,ht.height=f,fi=ht.getContext("2d"))};return this.getAutomatic=function(){return nt},this.setAutomatic=function(n){nt&&!n?(clearTimer(ki),nt=n):!nt&&n&&(nt=n,oi())},this.getHour=function(){return l},this.setHour=function(n){n=n%12,l!==n&&(l=n,ii(l,a,g),this.repaint())},this.getMinute=function(){return a},this.setMinute=function(n){n=n%60,a!==n&&(a=n,ii(l,a,g),this.repaint())},this.getSecond=function(){return g},this.setSecond=function(n){g=n%60,g!==n&&(g=n,ii(l,a,g),this.repaint())},this.getTimeZoneOffsetHour=function(){return kt},this.setTimeZoneOffsetHour=function(n){kt=n,this.repaint()},this.getTimeZoneOffsetMinute=function(){return dt},this.setTimeZoneOffsetMinute=function(n){dt=n,this.repaint()},this.getSecondPointerVisible=function(){return gt},this.setSecondPointerVisible=function(n){gt=n,this.repaint()},this.getSecondMovesContinuous=function(){return bt},this.setSecondMovesContinuous=function(n){bt=n,ft=bt?100:1e3,ft=gt?ft:100},this.setFrameDesign=function(n){ct({frame:!0}),yi=n,ut({frame:!0}),this.repaint()},this.setBackgroundColor=function(n){ct({frame:!0,background:!0}),et=n,ut({frame:!0,background:!0}),this.repaint()},this.setForegroundType=function(n){ct({foreground:!0}),nr=n,ut({foreground:!0}),this.repaint()},this.setPointerType=function(n){ct({foreground:!0,pointers:!0}),v=n,v.type==="type1"?(k=steelseries.ColorDef.GRAY,et=steelseries.BackgroundColor.ANTHRACITE):(k=steelseries.ColorDef.BLACK,et=steelseries.BackgroundColor.LIGHT_GRAY),ut({background:!0,foreground:!0,pointers:!0}),this.repaint()},this.setPointerColor=function(n){ct({pointers:!0}),k=n,ut({pointers:!0}),this.repaint()},this.repaint=function(){wi||ut({frame:!0,background:!0,pointers:!0,foreground:!0}),o.clearRect(0,0,o.canvas.width,o.canvas.height),o.drawImage(st,0,0),o.drawImage(ot,0,0);var n=u*.006;c.clearRect(0,0,u,e),c.save(),c.translate(s,h),c.rotate(ui),c.translate(-s,-h),c.drawImage(pt,0,0),c.restore(),o.drawImage(tt,0,0,u,e,n,n,u+n,e+n),o.save(),o.translate(s,h),o.rotate(ui),o.translate(-s,-h),o.drawImage(yt,0,0),o.restore(),c.clearRect(0,0,u,e),c.save(),c.translate(s,h),c.rotate(si),c.translate(-s,-h),c.drawImage(lt,0,0),c.restore(),o.drawImage(tt,0,0,u,e,n,n,u+n,e+n),o.save(),o.translate(s,h),o.rotate(si),o.translate(-s,-h),o.drawImage(wt,0,0),o.restore(),v.type==="type1"&&or(o),gt&&(c.clearRect(0,0,u,e),c.save(),c.translate(s,h),c.rotate(ri),c.translate(-s,-h),c.drawImage(vt,0,0),c.restore(),o.drawImage(tt,0,0,u,e,n,n,u+n,e+n),o.save(),o.translate(s,h),o.rotate(ri),o.translate(-s,-h),o.drawImage(at,0,0),o.restore()),o.drawImage(ht,0,0)},oi(),this},iu=function(t,i){var s;i=i||{};var o=undefined===i.size?50:i.size,f=undefined===i.value?50:i.value,e=o,h=Math.ceil(o*.45),u=r.getElementById(t).getContext("2d");return u.save(),u.clearRect(0,0,u.canvas.width,u.canvas.height),u.canvas.width=e,u.canvas.height=e,s=function(t,i,r,u){var f,e;t.beginPath(),t.moveTo(i*.025,r*.055555),t.lineTo(i*.9,r*.055555),t.lineTo(i*.9,r*.944444),t.lineTo(i*.025,r*.944444),t.lineTo(i*.025,r*.055555),t.closePath(),t.beginPath(),t.moveTo(i*.925,0),t.lineTo(0,0),t.lineTo(0,r),t.lineTo(i*.925,r),t.lineTo(i*.925,r*.722222),t.bezierCurveTo(i*.925,r*.722222,i*.975,r*.722222,i*.975,r*.722222),t.bezierCurveTo(i,r*.722222,i,r*.666666,i,r*.666666),t.bezierCurveTo(i,r*.666666,i,r*.333333,i,r*.333333),t.bezierCurveTo(i,r*.333333,i,r*.277777,i*.975,r*.277777),t.bezierCurveTo(i*.975,r*.277777,i*.925,r*.277777,i*.925,r*.277777),t.lineTo(i*.925,0),t.closePath(),f=t.createLinearGradient(0,0,0,r),f.addColorStop(0,"#ffffff"),f.addColorStop(1,"#7e7e7e"),t.fillStyle=f,t.fill(),t.beginPath(),e=Math.max(i*.875*(u/100),Math.ceil(i*.01)),t.rect(i*.025,i*.025,e,r*.888888),t.closePath();var a=[0,.4,1],l=[new n(177,25,2,1),new n(219,167,21,1),new n(121,162,75,1)],y=new ii(0,100,a,l);t.fillStyle=y.getColorAt(u/100).getRgbColor(),t.fill(),t.beginPath(),e=Math.max(e-i*.05,0),t.rect(i*.05,i*.05,e,r*.777777),t.closePath();var v=[new n(198,39,5,1),new n(228,189,32,1),new n(163,216,102,1)],h=[new n(246,121,48,1),new n(246,244,157,1),new n(223,233,86,1)],o=[0,.4,1],s=new ii(0,100,o,v),c=new ii(0,100,o,h);f=t.createLinearGradient(i*.05,0,i*.875,0),f.addColorStop(0,s.getColorAt(u/100).getRgbColor()),f.addColorStop(.5,c.getColorAt(u/100).getRgbColor()),f.addColorStop(1,s.getColorAt(u/100).getRgbColor()),t.fillStyle=f,t.fill(),t.beginPath(),t.rect(i*.025,i*.025,i*.875,r*.444444),t.closePath(),f=t.createLinearGradient(i*.025,i*.025,i*.875,r*.444444),f.addColorStop(0,"rgba(255, 255, 255, 0)"),f.addColorStop(1,"rgba(255, 255, 255, 0.8)"),t.fillStyle=f,t.fill()},this.setValue=function(n){n=n<0?0:n>100?100:n,f!==n&&(f=n,this.repaint())},this.getValue=function(){return f},this.repaint=function(){u.clearRect(0,0,u.canvas.width,u.canvas.height),s(u,e,h,f)},this.repaint(),this},fu=function(n,i){i=i||{};var f=undefined===i.size?200:i.size,fi=undefined===i.frameDesign?steelseries.FrameDesign.METAL:i.frameDesign,si=undefined===i.frameVisible?!0:i.frameVisible,c=undefined===i.pointerColor?steelseries.ColorDef.BLACK:i.pointerColor,wt=undefined===i.backgroundColor?steelseries.BackgroundColor.LIGHT_GRAY:i.backgroundColor,oi=undefined===i.foregroundType?steelseries.ForegroundType.TYPE1:i.foregroundType,ki=undefined===i.customLayer?null:i.customLayer,gt=0,pt=0,kt,wi=6,ht=Math.PI*2,at=Math.PI/180,bi=this,vt=0,nt=0,ci=0,li=0,hi=0,l=!1,k=!1,e=r.getElementById(n).getContext("2d");e.save(),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.canvas.width=f,e.canvas.height=f;var u=f,h=f,o=u/2,v=h/2,a=.285*u,di=o-a/2,d=.17*u,pi=!1,ft=t(f,f),yi=ft.getContext("2d"),ut=t(f,f),tt=ut.getContext("2d"),ot=t(f,f),vi=ot.getContext("2d"),lt=t(f,f),ai=lt.getContext("2d"),it=t(f,f),ei=it.getContext("2d"),ct=t(f,f),ii=ct.getContext("2d"),g=t(f,f),s=g.getContext("2d"),et=t(f,f),ri=et.getContext("2d"),ni=function(n,t,i,r,u,f,e){var ht;n.width=n.height=t;var nt=r*t,tt=nt+"px sans-serif",ut=t*.15,st=.5,k=1,ft=1.5,b=u*t,d=Math.round(.025*t),g=Math.round(.035*t),p=Math.round(.045*t),et=wt.labelColor.getRgbaColor(),w=wt.labelColor.getRgbaColor(),s=t/2,o=t*.4,a=0,y=0,ot=0,h=0,c=0,v,it=-Math.PI,l,rt=2*Math.PI/i;for(n.save(),n.textAlign="center",n.textBaseline="middle",n.font=tt,v=it,l=0;l<=i+1;v-=rt*.1,l+=.1)n.lineWidth=st,h=Math.sin(v),c=Math.cos(v),a%2==0&&(innerPoint=[s+(o-d)*h+f,s+(o-d)*c+e],outerPoint=[s+o*h+f,s+o*c+e],n.strokeStyle=w,n.beginPath(),n.moveTo(innerPoint[0],innerPoint[1]),n.lineTo(outerPoint[0],outerPoint[1]),n.closePath(),n.stroke()),(a===10||a===0)&&(n.fillStyle=et,n.lineWidth=k,outerPoint=[s+o*h+f,s+o*c+e],textPoint=[s+(o-b)*h+f,s+(o-b)*c+e],y===5?(l!==i&&Math.round(l)!==60&&n.fillText(Math.round(l),textPoint[0],textPoint[1],ut),n.lineWidth=ft,innerPoint=[s+(o-p)*h+f,s+(o-p)*c+e],y=0):(n.lineWidth=k,innerPoint=[s+(o-g)*h+f,s+(o-g)*c+e]),n.strokeStyle=w,n.beginPath(),n.moveTo(innerPoint[0],innerPoint[1]),n.lineTo(outerPoint[0],outerPoint[1]),n.closePath(),n.stroke(),a=0,ot++,y++),a++;n.restore()},ui=function(n,t){var i,r;n.save(),n.beginPath(),n.moveTo(u*.509345,u*.457943),n.lineTo(u*.5,u*.102803),n.lineTo(u*.490654,u*.457943),n.bezierCurveTo(u*.490654,u*.457943,u*.490654,u*.457943,u*.490654,u*.457943),n.bezierCurveTo(u*.471962,u*.462616,u*.457943,u*.481308,u*.457943,u*.5),n.bezierCurveTo(u*.457943,u*.518691,u*.471962,u*.537383,u*.490654,u*.542056),n.bezierCurveTo(u*.490654,u*.542056,u*.490654,u*.542056,u*.490654,u*.542056),n.lineTo(u*.490654,u*.621495),n.lineTo(u*.509345,u*.621495),n.lineTo(u*.509345,u*.542056),n.bezierCurveTo(u*.509345,u*.542056,u*.509345,u*.542056,u*.509345,u*.542056),n.bezierCurveTo(u*.528037,u*.537383,u*.542056,u*.518691,u*.542056,u*.5),n.bezierCurveTo(u*.542056,u*.481308,u*.528037,u*.462616,u*.509345,u*.457943),n.bezierCurveTo(u*.509345,u*.457943,u*.509345,u*.457943,u*.509345,u*.457943),n.closePath(),t?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)",n.fill()):(i=n.createLinearGradient(0,0,0,u*.621495),i.addColorStop(0,c.medium.getRgbaColor()),i.addColorStop(.388888,c.medium.getRgbaColor()),i.addColorStop(.5,c.light.getRgbaColor()),i.addColorStop(.611111,c.medium.getRgbaColor()),i.addColorStop(1,c.medium.getRgbaColor()),n.fillStyle=i,n.strokeStyle=c.dark.getRgbaColor(),n.fill(),n.stroke()),t?p(n,u,h,Math.floor(u*.006)):(n.beginPath(),r=u*.06542/2,n.arc(o,v,r,0,ht),i=n.createLinearGradient(o-r,o+r,0,o+r),i.addColorStop(0,"#e6b35c"),i.addColorStop(.01,"#e6b35c"),i.addColorStop(.99,"#c48200"),i.addColorStop(1,"#c48200"),n.fillStyle=i,n.closePath(),n.fill(),n.beginPath(),r=u*.046728/2,n.arc(o,v,r,0,ht),i=n.createRadialGradient(o,o,0,o,o,r),i.addColorStop(0,"#c5c5c5"),i.addColorStop(.19,"#c5c5c5"),i.addColorStop(.22,"#000000"),i.addColorStop(.8,"#000000"),i.addColorStop(.99,"#707070"),i.addColorStop(1,"#707070"),n.fillStyle=i,n.closePath(),n.fill()),n.restore()},ti=function(n,t){var i,r;n.save(),n.beginPath(),n.moveTo(u*.476635,u*.313084),n.bezierCurveTo(u*.476635,u*.322429,u*.485981,u*.331775,u*.495327,u*.336448),n.bezierCurveTo(u*.495327,u*.336448,u*.495327,u*.350467,u*.495327,u*.350467),n.lineTo(u*.504672,u*.350467),n.bezierCurveTo(u*.504672,u*.350467,u*.504672,u*.336448,u*.504672,u*.336448),n.bezierCurveTo(u*.514018,u*.331775,u*.523364,u*.322429,u*.523364,u*.313084),n.bezierCurveTo(u*.523364,u*.303738,u*.514018,u*.294392,u*.504672,u*.289719),n.bezierCurveTo(u*.504672,u*.289719,u*.5,u*.200934,u*.5,u*.200934),n.bezierCurveTo(u*.5,u*.200934,u*.495327,u*.289719,u*.495327,u*.289719),n.bezierCurveTo(u*.485981,u*.294392,u*.476635,u*.303738,u*.476635,u*.313084),n.closePath(),t?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)",n.fill()):(i=n.createLinearGradient(0,0,u,0),i.addColorStop(0,c.medium.getRgbaColor()),i.addColorStop(.388888,c.medium.getRgbaColor()),i.addColorStop(.5,c.light.getRgbaColor()),i.addColorStop(.611111,c.medium.getRgbaColor()),i.addColorStop(1,c.medium.getRgbaColor()),n.fillStyle=i,n.strokeStyle=c.dark.getRgbaColor(),n.fill(),n.stroke()),t?p(n,u,h,Math.floor(u*.006)):(n.beginPath(),r=u*.037383/2,n.arc(o,d+a/2,r,0,ht),n.fillStyle="#C48200",n.closePath(),n.fill(),n.beginPath(),r=u*.028037/2,n.arc(o,d+a/2,r,0,ht),n.fillStyle="#999999",n.closePath(),n.fill(),n.beginPath(),r=u*.018691/2,n.arc(o,d+a/2,r,0,ht),n.fillStyle="#000000",n.closePath(),n.fill()),n.restore()},bt=function(){nt=+new Date-vt,pt=nt*wi/1e3,gt=pt%10800/30,ci=nt/6e4%30,li=nt/1e3%60,hi=nt%1e3},st=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,f=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;pi=!0,r&&si&&w(yi,fi,o,v,u,h),f&&(b(tt,wt,o,v,u,h),rt(tt,ki,o,v,u,h),ni(tt,u,60,.075,.1,0,0),ni(tt,a,30,.095,.13,di,d)),t&&(ui(ei,!1),ui(ii,!0),ti(vi,!1),ti(ai,!0)),i&&y(ri,oi,u,h,!1)},yt=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,u=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;r&&(ft.width=f,ft.height=f,yi=ft.getContext("2d")),u&&(ut.width=f,ut.height=f,tt=ut.getContext("2d")),t&&(ot.width=f,ot.height=f,vi=ot.getContext("2d"),lt.width=f,lt.height=f,ai=lt.getContext("2d"),it.width=f,it.height=f,ei=it.getContext("2d"),ct.width=f,ct.height=f,ii=ct.getContext("2d"),g.width=f,g.height=f,s=g.getContext("2d")),i&&(et.width=f,et.height=f,ri=et.getContext("2d"))},dt=function(){k||(bt(),bi.repaint()),l&&(kt=setTimeout(dt,200))};return this.isRunning=function(){return l},this.start=function(){l||(l=!0,vt=+new Date-nt,dt())},this.stop=function(){l&&(l=!1,clearTimeout(kt)),k&&(k=!1,bt(),this.repaint())},this.reset=function(){l&&(l=!1,k=!1,clearTimeout(kt)),vt=+new Date,bt(),this.repaint()},this.lap=function(){l&&!k?k=!0:k&&(k=!1)},this.getMeasuredTime=function(){return ci+":"+li+":"+hi},this.setFrameDesign=function(n){yt({frame:!0}),fi=n,st({frame:!0}),this.repaint()},this.setBackgroundColor=function(n){yt({background:!0}),wt=n,st({background:!0}),this.repaint()},this.setForegroundType=function(n){yt({foreground:!0}),oi=n,st({foreground:!0}),this.repaint()},this.setPointerColor=function(n){yt({pointers:!0}),c=n,st({pointers:!0}),this.repaint()},this.repaint=function(){pi||st({frame:!0,background:!0,pointers:!0,foreground:!0}),e.clearRect(0,0,e.canvas.width,e.canvas.height),si&&e.drawImage(ft,0,0),e.drawImage(ut,0,0);var n=u*.006,t=(gt+2*Math.sin(gt*at))*at;s.clearRect(0,0,u,h),s.save(),s.translate(o,d+a/2),s.rotate(t),s.translate(-o,-(d+a/2)),s.drawImage(lt,0,0),s.restore(),e.drawImage(g,0,0,u,h,n/2,n/2,u+n/2,h+n/2),e.save(),e.translate(o,d+a/2),e.rotate(t),e.translate(-o,-(d+a/2)),e.drawImage(ot,0,0),e.restore(),t=(pt+2*Math.sin(pt*at))*at,s.clearRect(0,0,u,h),s.save(),s.translate(o,v),s.rotate(t),s.translate(-o,-v),s.drawImage(ct,0,0),s.restore(),e.drawImage(g,0,0,u,h,n,n,u+n,h+n),e.save(),e.translate(o,v),e.rotate(t),e.translate(-o,-v),e.drawImage(it,0,0),e.restore(),e.drawImage(et,0,0)},vt=+new Date,dt(),this},su=function(n,i){function yi(){it=2*Math.PI/(ei-l),st=it/10,lt=st/10}function pi(){ct=a%1e3/100,at=a%1e4/100,vt=a%1e5/100}var nt,ot;i=i||{};var o=undefined===i.size?200:i.size,fi=undefined===i.frameDesign?steelseries.FrameDesign.METAL:i.frameDesign,vi=undefined===i.frameVisible?!0:i.frameVisible,ht=undefined===i.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:i.backgroundColor,li=undefined===i.knobType?steelseries.KnobType.METAL_KNOB:i.knobType,tr=undefined===i.knobStyle?steelseries.KnobStyle.BLACK:i.knobStyle,d=undefined===i.lcdColor?steelseries.LcdColor.BLACK:i.lcdColor,wt=undefined===i.lcdVisible?!0:i.lcdVisible,ki=undefined===i.digitalFont?!1:i.digitalFont,ii=undefined===i.foregroundType?steelseries.ForegroundType.TYPE1:i.foregroundType,nr=undefined===i.customLayer?null:i.customLayer,l=0,ei=10,a=l,ct=0,at=0,vt=0,it,st,lt,gi=1,g,e=r.getElementById(n).getContext("2d");e.save(),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.canvas.width=o,e.canvas.height=o;var u=o,f=o,h=u/2,c=f/2,di=Math.floor(u*.09)+"px sans-serif",sr=Math.PI/2,or=Math.PI/180,bi=Math.PI,si=!1,et=t(o,o),hi=et.getContext("2d"),ft=t(o,o),ut=ft.getContext("2d"),bt,yt=t(o,o),fr=yt.getContext("2d"),pt=t(o,o),er=pt.getContext("2d"),ni=t(o,o),ir=ni.getContext("2d"),ti=t(o,o),rr=ti.getContext("2d"),gt=t(o,o),ur=gt.getContext("2d"),dt=t(o,o),wi=dt.getContext("2d"),v=t(o,o),s=v.getContext("2d"),tt=t(o,o),kt=tt.getContext("2d"),ai=function(n){e.save(),e.textAlign="right",e.textBaseline="middle",e.strokeStyle=d.textColor,e.fillStyle=d.textColor,(d===steelseries.LcdColor.STANDARD||d===steelseries.LcdColor.STANDARD_GREEN)&&(e.shadowColor="gray",e.shadowOffsetX=u*.007,e.shadowOffsetY=u*.007,e.shadowBlur=u*.009),e.font=ki?Math.floor(u*.075)+"px LCDMono2Ultra":Math.floor(u*.075)+"px sans-serif",e.fillText(Math.round(n),(u+u*.4)/2-4,u*.607,u*.4),e.restore()},ci=function(n,t,i,r,f,e){var it=Math.max(u*.012,2),rt=Math.max(u*.007,1.5),d=u*.13,g=u*.05,nt=u*.07,v=u*.4,b=0,ut=0,p=0,y=0,k,w,tt=-i-t/2;for(n.save(),n.textAlign="center",n.textBaseline="middle",n.font=di,n.strokeStyle=ht.labelColor.getRgbaColor(),n.fillStyle=ht.labelColor.getRgbaColor(),k=tt,w=0;w<=10;k-=e*.1,w+=.1)p=Math.sin(k),y=Math.cos(k),b%2==0&&(n.lineWidth=rt,n.beginPath(),n.moveTo(h+(v-g)*p,c+(v-g)*y),n.lineTo(h+v*p,c+v*y),n.closePath(),n.stroke()),(b===10||b===0)&&(n.lineWidth=it,t===0&&Math.round(w)!=ei&&n.fillText(Math.round(w).toString(),h+(v-d)*p,c+(v-d)*y),b=0,ut++,n.beginPath(),n.moveTo(h+(v-nt)*p,c+(v-nt)*y),n.lineTo(h+v*p,c+v*y),n.closePath(),n.stroke()),b++;n.restore()},oi=function(n,t){var i;t?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)"):(i=n.createLinearGradient(0,f*.168224,0,f*.626168),i.addColorStop(0,"#ffffff"),i.addColorStop(.31,"#ffffff"),i.addColorStop(.3101,"#ffffff"),i.addColorStop(.32,"#202020"),i.addColorStop(1,"#202020"),n.fillStyle=i),n.save(),n.beginPath(),n.moveTo(u*.518691,f*.471962),n.bezierCurveTo(u*.514018,f*.471962,u*.509345,f*.467289,u*.509345,f*.467289),n.lineTo(u*.509345,f*.200934),n.lineTo(u*.5,f*.168224),n.lineTo(u*.490654,f*.200934),n.lineTo(u*.490654,f*.467289),n.bezierCurveTo(u*.490654,f*.467289,u*.481308,f*.471962,u*.481308,f*.471962),n.bezierCurveTo(u*.471962,f*.481308,u*.467289,f*.490654,u*.467289,f*.5),n.bezierCurveTo(u*.467289,f*.514018,u*.476635,f*.528037,u*.490654,f*.53271),n.bezierCurveTo(u*.490654,f*.53271,u*.490654,f*.579439,u*.490654,f*.588785),n.bezierCurveTo(u*.485981,f*.593457,u*.481308,f*.59813,u*.481308,f*.607476),n.bezierCurveTo(u*.481308,f*.616822,u*.490654,f*.626168,u*.5,f*.626168),n.bezierCurveTo(u*.509345,f*.626168,u*.518691,f*.616822,u*.518691,f*.607476),n.bezierCurveTo(u*.518691,f*.59813,u*.514018,f*.593457,u*.504672,f*.588785),n.bezierCurveTo(u*.504672,f*.579439,u*.504672,f*.53271,u*.509345,f*.53271),n.bezierCurveTo(u*.523364,f*.528037,u*.53271,f*.514018,u*.53271,f*.5),n.bezierCurveTo(u*.53271,f*.490654,u*.528037,f*.481308,u*.518691,f*.471962),n.closePath(),n.fill(),t&&p(n,u,f,Math.floor(u*.006)),n.restore()},ri=function(n,t){var i;t?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)"):(i=n.createLinearGradient(0,f*.401869,0,f*.616822),i.addColorStop(0,"#ffffff"),i.addColorStop(.51,"#ffffff"),i.addColorStop(.52,"#ffffff"),i.addColorStop(.5201,"#202020"),i.addColorStop(.53,"#202020"),i.addColorStop(1,"#202020"),n.fillStyle=i),n.beginPath(),n.moveTo(u*.518691,f*.471962),n.bezierCurveTo(u*.514018,f*.462616,u*.528037,f*.401869,u*.528037,f*.401869),n.lineTo(u*.5,f*.331775),n.lineTo(u*.471962,f*.401869),n.bezierCurveTo(u*.471962,f*.401869,u*.485981,f*.462616,u*.481308,f*.471962),n.bezierCurveTo(u*.471962,f*.481308,u*.467289,f*.490654,u*.467289,f*.5),n.bezierCurveTo(u*.467289,f*.514018,u*.476635,f*.528037,u*.490654,f*.53271),n.bezierCurveTo(u*.490654,f*.53271,u*.462616,f*.574766,u*.462616,f*.593457),n.bezierCurveTo(u*.467289,f*.616822,u*.5,f*.612149,u*.5,f*.612149),n.bezierCurveTo(u*.5,f*.612149,u*.53271,f*.616822,u*.537383,f*.593457),n.bezierCurveTo(u*.537383,f*.574766,u*.509345,f*.53271,u*.509345,f*.53271),n.bezierCurveTo(u*.523364,f*.528037,u*.53271,f*.514018,u*.53271,f*.5),n.bezierCurveTo(u*.53271,f*.490654,u*.528037,f*.481308,u*.518691,f*.471962),n.closePath(),n.fill(),t&&p(n,u,f,Math.floor(u*.006)),n.restore()},ui=function(n,t){t?(n.fillStyle="rgba(0, 0, 0, 0.5)",n.strokeStyle="rgba(0, 0, 0, 0.5)"):n.fillStyle="#ffffff",n.beginPath(),n.moveTo(u*.518691,f*.471962),n.bezierCurveTo(u*.514018,f*.471962,u*.514018,f*.467289,u*.514018,f*.467289),n.lineTo(u*.514018,f*.317757),n.lineTo(u*.504672,f*.303738),n.lineTo(u*.504672,f*.182242),n.lineTo(u*.53271,f*.116822),n.lineTo(u*.462616,f*.116822),n.lineTo(u*.495327,f*.182242),n.lineTo(u*.495327,f*.299065),n.lineTo(u*.485981,f*.317757),n.lineTo(u*.485981,f*.467289),n.bezierCurveTo(u*.485981,f*.467289,u*.485981,f*.471962,u*.481308,f*.471962),n.bezierCurveTo(u*.471962,f*.481308,u*.467289,f*.490654,u*.467289,f*.5),n.bezierCurveTo(u*.467289,f*.518691,u*.481308,f*.53271,u*.5,f*.53271),n.bezierCurveTo(u*.518691,f*.53271,u*.53271,f*.518691,u*.53271,f*.5),n.bezierCurveTo(u*.53271,f*.490654,u*.528037,f*.481308,u*.518691,f*.471962),n.closePath(),n.fill(),t&&p(n,u,f,Math.floor(u*.006))};return nt=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,e=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;si=!0,yi(),r&&vi&&w(hi,fi,h,c,u,f),e&&(b(ut,ht,h,c,u,f),rt(ut,nr,h,c,u,f),ci(ut,0,bi,0,10,it,gi,0,!0,!0,null),wt&&(bt=k(u*.4,f*.09,d),ut.drawImage(bt,(u-u*.4)/2,f*.56))),t&&(oi(ur,!1),oi(wi,!0),ri(ir,!1),ri(rr,!0),ui(fr,!1),ui(er,!0)),i&&y(kt,ii,u,f,!0,li,tr)},ot=function(n){n=n||{};var r=undefined===n.frame?!1:n.frame,u=undefined===n.background?!1:n.background,t=undefined===n.pointers?!1:n.pointers,i=undefined===n.foreground?!1:n.foreground;r&&(et.width=o,et.height=o,hi=et.getContext("2d")),u&&(ft.width=o,ft.height=o,ut=ft.getContext("2d")),t&&(pointer100ftBuffer.width=o,pointer100ftBuffer.height=o,pointer100ftContext=pointer100ftBuffer.getContext("2d"),pointer100ftShadowBuffer.width=o,pointer100ftShadowBuffer.height=o,pointer100ftShadowContext=pointer100ftShadowBuffer.getContext("2d"),pointer1000ftBuffer.width=o,pointer1000ftBuffer.height=o,pointer1000ftContext=pointer1000ftBuffer.getContext("2d"),pointer1000ftShadowBuffer.width=o,pointer1000ftShadowBuffer.height=o,pointer1000ftShadowContext=pointer1000ftShadowBuffer.getContext("2d"),pointer10000ftBuffer.width=o,pointer10000ftBuffer.height=o,pointer10000ftContext=pointer10000ftBuffer.getContext("2d"),pointer10000ftShadowBuffer.width=o,pointer10000ftShadowBuffer.height=o,pointer10000ftShadowContext=pointer10000ftShadowBuffer.getContext("2d"),v.width=o,v.height=o,s=v.getContext("2d")),i&&(tt.width=o,tt.height=o,kt=tt.getContext("2d"))},this.setValue=function(n){a=n,this.repaint()},this.getValue=function(){return a},this.setValueAnimated=function(n){var t=n=e;e+=90)n.beginPath(),n.moveTo(r*.560747,u*.584112),n.lineTo(r*.640186,u*.644859),n.lineTo(r*.584112,u*.560747),n.lineTo(r*.560747,u*.584112),n.closePath(),n.fillStyle=c,n.fill(),n.stroke(),n.beginPath(),n.moveTo(r*.523364,u*.397196),n.lineTo(r*.5,u*.196261),n.lineTo(r*.471962,u*.397196),n.lineTo(r*.523364,u*.397196),n.closePath(),o=n.createLinearGradient(.476635*r,0,.518691*r,0),o.addColorStop(0,"rgb(222, 223, 218)"),o.addColorStop(.48,"rgb(222, 223, 218)"),o.addColorStop(.49,f.symbolColor.getRgbaColor()),o.addColorStop(1,f.symbolColor.getRgbaColor()),n.fillStyle=o,n.fill(),n.stroke(),n.translate(t,i),n.rotate(e*Math.PI/180),n.translate(-t,-i);n.beginPath(),n.translate(t,i),n.arc(0,0,r*.1,0,Math.PI*2,!1),n.lineWidth=r*.022,n.strokeStyle=f.symbolColor.getRgbaColor(),n.stroke(),n.translate(-t,-i),n.restore()},g=function(n,t,i,r,u,f){var e,o;n.save(),f&&(n.fillStyle="rgba(0, 0, 0, 0.6)",n.strokeStyle="rgba(0, 0, 0, 0.5)");switch(i.type){case"type2":f||(e=n.createLinearGradient(0,t*.471962,0,t*.130841),e.addColorStop(0,u.getRgbaColor()),e.addColorStop(.36,u.getRgbaColor()),e.addColorStop(.361,r.light.getRgbaColor()),e.addColorStop(1,r.light.getRgbaColor()),n.fillStyle=e),n.beginPath(),n.moveTo(t*.518691,t*.471962),n.lineTo(t*.509345,t*.462616),n.lineTo(t*.509345,t*.341121),n.lineTo(t*.504672,t*.130841),n.lineTo(t*.495327,t*.130841),n.lineTo(t*.490654,t*.341121),n.lineTo(t*.490654,t*.462616),n.lineTo(t*.481308,t*.471962),n.closePath(),n.fill();break;case"type3":n.beginPath(),n.rect(t*.495327,t*.130841,t*.009345,t*.373831),n.closePath(),f||(n.fillStyle=r.light.getRgbaColor()),n.fill();break;case"type4":f||(e=n.createLinearGradient(.467289*t,0,.528036*t,0),e.addColorStop(0,r.dark.getRgbaColor()),e.addColorStop(.51,r.dark.getRgbaColor()),e.addColorStop(.52,r.light.getRgbaColor()),e.addColorStop(1,r.light.getRgbaColor()),n.fillStyle=e),n.beginPath(),n.moveTo(t*.5,t*.126168),n.lineTo(t*.514018,t*.135514),n.lineTo(t*.53271,t*.5),n.lineTo(t*.523364,t*.602803),n.lineTo(t*.476635,t*.602803),n.lineTo(t*.467289,t*.5),n.lineTo(t*.485981,t*.135514),n.lineTo(t*.5,t*.126168),n.closePath(),n.fill();break;case"type5":f||(e=n.createLinearGradient(.471962*t,0,.528036*t,0),e.addColorStop(0,r.light.getRgbaColor()),e.addColorStop(.5,r.light.getRgbaColor()),e.addColorStop(.5,r.medium.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e),n.beginPath(),n.moveTo(t*.5,t*.495327),n.lineTo(t*.528037,t*.495327),n.lineTo(t*.5,t*.149532),n.lineTo(t*.471962,t*.495327),n.lineTo(t*.5,t*.495327),n.closePath(),n.fill(),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",f||(n.strokeStyle=r.dark.getRgbaColor()),n.stroke();break;case"type6":f||(n.fillStyle=r.medium.getRgbaColor()),n.beginPath(),n.moveTo(t*.481308,t*.485981),n.lineTo(t*.481308,t*.392523),n.lineTo(t*.485981,t*.317757),n.lineTo(t*.495327,t*.130841),n.lineTo(t*.504672,t*.130841),n.lineTo(t*.514018,t*.317757),n.lineTo(t*.518691,t*.38785),n.lineTo(t*.518691,t*.485981),n.lineTo(t*.504672,t*.485981),n.lineTo(t*.504672,t*.38785),n.lineTo(t*.5,t*.317757),n.lineTo(t*.495327,t*.392523),n.lineTo(t*.495327,t*.485981),n.lineTo(t*.481308,t*.485981),n.closePath(),n.fill();break;case"type7":f||(e=n.createLinearGradient(.481308*t,0,.518691*t,0),e.addColorStop(0,r.dark.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e),n.beginPath(),n.moveTo(t*.490654,t*.130841),n.lineTo(t*.481308,t*.5),n.lineTo(t*.518691,t*.5),n.lineTo(t*.504672,t*.130841),n.lineTo(t*.490654,t*.130841),n.closePath(),n.fill();break;case"type8":f||(e=n.createLinearGradient(.471962*t,0,.528036*t,0),e.addColorStop(0,r.light.getRgbaColor()),e.addColorStop(.5,r.light.getRgbaColor()),e.addColorStop(.5,r.medium.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e,n.strokeStyle=r.dark.getRgbaColor()),n.beginPath(),n.moveTo(t*.5,t*.53271),n.lineTo(t*.53271,t*.5),n.bezierCurveTo(t*.53271,t*.5,t*.509345,t*.457943,t*.5,t*.149532),n.bezierCurveTo(t*.490654,t*.457943,t*.467289,t*.5,t*.467289,t*.5),n.lineTo(t*.5,t*.53271),n.closePath(),n.fill(),n.stroke();break;case"type9":f||(e=n.createLinearGradient(.471962*t,0,.528036*t,0),e.addColorStop(0,"rgb(50, 50, 50)"),e.addColorStop(.5,"#666666"),e.addColorStop(1,"rgb(50, 50, 50)"),n.fillStyle=e,n.strokeStyle="#2E2E2E"),n.beginPath(),n.moveTo(t*.495327,t*.233644),n.lineTo(t*.504672,t*.233644),n.lineTo(t*.514018,t*.439252),n.lineTo(t*.485981,t*.439252),n.lineTo(t*.495327,t*.233644),n.closePath(),n.moveTo(t*.490654,t*.130841),n.lineTo(t*.471962,t*.471962),n.lineTo(t*.471962,t*.528037),n.bezierCurveTo(t*.471962,t*.528037,t*.476635,t*.602803,t*.476635,t*.602803),n.bezierCurveTo(t*.476635,t*.607476,t*.481308,t*.607476,t*.5,t*.607476),n.bezierCurveTo(t*.518691,t*.607476,t*.523364,t*.607476,t*.523364,t*.602803),n.bezierCurveTo(t*.523364,t*.602803,t*.528037,t*.528037,t*.528037,t*.528037),n.lineTo(t*.528037,t*.471962),n.lineTo(t*.509345,t*.130841),n.lineTo(t*.490654,t*.130841),n.closePath(),n.fill(),n.beginPath(),n.moveTo(t*.495327,t*.219626),n.lineTo(t*.504672,t*.219626),n.lineTo(t*.504672,t*.135514),n.lineTo(t*.495327,t*.135514),n.lineTo(t*.495327,t*.219626),n.closePath(),f||(n.fillStyle=r.medium.getRgbaColor()),n.fill();break;case"type10":n.beginPath(),n.moveTo(t*.5,t*.149532),n.bezierCurveTo(t*.5,t*.149532,t*.443925,t*.490654,t*.443925,t*.5),n.bezierCurveTo(t*.443925,t*.53271,t*.467289,t*.556074,t*.5,t*.556074),n.bezierCurveTo(t*.53271,t*.556074,t*.556074,t*.53271,t*.556074,t*.5),n.bezierCurveTo(t*.556074,t*.490654,t*.5,t*.149532,t*.5,t*.149532),n.closePath(),f||(e=n.createLinearGradient(.471962*t,0,.528036*t,0),e.addColorStop(0,r.light.getRgbaColor()),e.addColorStop(.5,r.light.getRgbaColor()),e.addColorStop(.5,r.medium.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e,n.strokeStyle=r.medium.getRgbaColor()),n.lineWidth=1,n.lineCap="square",n.lineJoin="miter",n.fill(),n.stroke();break;case"type11":n.beginPath(),n.moveTo(.5*t,.168224*t),n.lineTo(.485981*t,.5*t),n.bezierCurveTo(.485981*t,.5*t,.481308*t,.584112*t,.5*t,.584112*t),n.bezierCurveTo(.514018*t,.584112*t,.509345*t,.5*t,.509345*t,.5*t),n.lineTo(.5*t,.168224*t),n.closePath(),f||(e=n.createLinearGradient(0,.168224*t,0,.584112*t),e.addColorStop(0,r.medium.getRgbaColor()),e.addColorStop(1,r.dark.getRgbaColor()),n.fillStyle=e,n.strokeStyle=r.dark.getRgbaColor()),n.fill(),n.stroke();break;case"type12":n.beginPath(),n.moveTo(.5*t,.168224*t),n.lineTo(.485981*t,.5*t),n.lineTo(.5*t,.504672*t),n.lineTo(.509345*t,.5*t),n.lineTo(.5*t,.168224*t),n.closePath(),f||(e=n.createLinearGradient(0,.168224*t,0,.504672*t),e.addColorStop(0,r.medium.getRgbaColor()),e.addColorStop(1,r.dark.getRgbaColor()),n.fillStyle=e,n.strokeStyle=r.dark.getRgbaColor()),n.fill(),n.stroke();break;case"type13":case"type14":n.beginPath(),n.moveTo(.485981*t,.168224*t),n.lineTo(.5*t,.130841*t),n.lineTo(.509345*t,.168224*t),n.lineTo(.509345*t,.509345*t),n.lineTo(.485981*t,.509345*t),n.lineTo(.485981*t,.168224*t),n.closePath(),f||(i.type==="type13"?(e=n.createLinearGradient(0,.5*t,0,.130841*t),e.addColorStop(0,u.getRgbaColor()),e.addColorStop(.85,u.getRgbaColor()),e.addColorStop(.85,r.medium.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e):(e=n.createLinearGradient(.485981*t,0,.509345*t,0),e.addColorStop(0,r.veryDark.getRgbaColor()),e.addColorStop(.5,r.light.getRgbaColor()),e.addColorStop(1,r.veryDark.getRgbaColor()),n.fillStyle=e)),n.fill();break;case"type15":case"type16":n.beginPath(),n.moveTo(t*.509345,t*.457943),n.lineTo(t*.5015,t*.13),n.lineTo(t*.4985,t*.13),n.lineTo(t*.490654,t*.457943),n.bezierCurveTo(t*.490654,t*.457943,t*.490654,t*.457943,t*.490654,t*.457943),n.bezierCurveTo(t*.471962,t*.462616,t*.457943,t*.481308,t*.457943,t*.5),n.bezierCurveTo(t*.457943,t*.518691,t*.471962,t*.537383,t*.490654,t*.542056),n.bezierCurveTo(t*.490654,t*.542056,t*.490654,t*.542056,t*.490654,t*.542056),i.type==="type15"?(n.lineTo(t*.490654,t*.57),n.bezierCurveTo(t*.46,t*.58,t*.46,t*.62,t*.490654,t*.63),n.bezierCurveTo(t*.47,t*.62,t*.48,t*.59,t*.5,t*.59),n.bezierCurveTo(t*.53,t*.59,t*.52,t*.62,t*.509345,t*.63),n.bezierCurveTo(t*.54,t*.62,t*.54,t*.58,t*.509345,t*.57),n.lineTo(t*.509345,t*.57)):(n.lineTo(t*.490654,t*.621495),n.lineTo(t*.509345,t*.621495)),n.lineTo(t*.509345,t*.542056),n.bezierCurveTo(t*.509345,t*.542056,t*.509345,t*.542056,t*.509345,t*.542056),n.bezierCurveTo(t*.528037,t*.537383,t*.542056,t*.518691,t*.542056,t*.5),n.bezierCurveTo(t*.542056,t*.481308,t*.528037,t*.462616,t*.509345,t*.457943),n.bezierCurveTo(t*.509345,t*.457943,t*.509345,t*.457943,t*.509345,t*.457943),n.closePath(),f?n.fill():(e=i.type==="type15"?n.createLinearGradient(0,0,0,t*.63):n.createLinearGradient(0,0,0,t*.621495),e.addColorStop(0,r.medium.getRgbaColor()),e.addColorStop(.388888,r.medium.getRgbaColor()),e.addColorStop(.5,r.light.getRgbaColor()),e.addColorStop(.611111,r.medium.getRgbaColor()),e.addColorStop(1,r.medium.getRgbaColor()),n.fillStyle=e,n.strokeStyle=r.dark.getRgbaColor(),n.fill(),n.stroke()),f||(n.beginPath(),o=t*.06542/2,n.arc(t*.5,t*.5,o,0,Math.PI*2),e=n.createLinearGradient(t*.5-o,t*.5+o,0,t*.5+o),e.addColorStop(0,"#e6b35c"),e.addColorStop(.01,"#e6b35c"),e.addColorStop(.99,"#c48200"),e.addColorStop(1,"#c48200"),n.fillStyle=e,n.closePath(),n.fill(),n.beginPath(),o=t*.046728/2,n.arc(t*.5,t*.5,o,0,Math.PI*2),e=n.createRadialGradient(t*.5,t*.5,0,t*.5,t*.5,o),e.addColorStop(0,"#c5c5c5"),e.addColorStop(.19,"#c5c5c5"),e.addColorStop(.22,"#000000"),e.addColorStop(.8,"#000000"),e.addColorStop(.99,"#707070"),e.addColorStop(1,"#707070"),n.fillStyle=e,n.closePath(),n.fill());break;case"type1":default:f||(e=n.createLinearGradient(0,t*.471962,0,t*.130841),e.addColorStop(0,r.veryDark.getRgbaColor()),e.addColorStop(.3,r.medium.getRgbaColor()),e.addColorStop(.59,r.medium.getRgbaColor()),e.addColorStop(1,r.veryDark.getRgbaColor()),n.fillStyle=e),n.beginPath(),n.moveTo(t*.518691,t*.471962),n.bezierCurveTo(t*.514018,t*.457943,t*.509345,t*.415887,t*.509345,t*.401869),n.bezierCurveTo(t*.504672,t*.383177,t*.5,t*.130841,t*.5,t*.130841),n.bezierCurveTo(t*.5,t*.130841,t*.490654,t*.383177,t*.490654,t*.397196),n.bezierCurveTo(t*.490654,t*.415887,t*.485981,t*.457943,t*.481308,t*.471962),n.bezierCurveTo(t*.471962,t*.481308,t*.467289,t*.490654,t*.467289,t*.5),n.bezierCurveTo(t*.467289,t*.518691,t*.481308,t*.53271,t*.5,t*.53271),n.bezierCurveTo(t*.518691,t*.53271,t*.53271,t*.518691,t*.53271,t*.5),n.bezierCurveTo(t*.53271,t*.490654,t*.528037,t*.481308,t*.518691,t*.471962),n.closePath(),n.fill()}f&&p(n,t,t,Math.floor(t*.006)),n.restore()},w=function(t,i,r,u,f,e){var o,s,l,a,h,c;t.save();if(f===st.width&&e===st.height&&i===sr)return t.drawImage(st,0,0),t.restore(),this;sr=i,st.width=f,st.height=e,o=st.getContext("2d"),o.fillStyle="#848484",o.strokeStyle="rgba(132, 132, 132, 0.5)",o.beginPath(),o.arc(r,u,f/2,0,Math.PI*2,!0),o.closePath(),o.fill(),o.stroke(),o.beginPath(),o.arc(r,u,f*.990654/2,0,Math.PI*2,!0),o.closePath();switch(i.design){case"metal":s=o.createLinearGradient(0,f*.004672,0,e*.990654),s.addColorStop(0,"#fefefe"),s.addColorStop(.07,"rgb(210, 210, 210)"),s.addColorStop(.12,"rgb(179, 179, 179)"),s.addColorStop(1,"rgb(213, 213, 213)"),o.fillStyle=s,o.fill();break;case"brass":s=o.createLinearGradient(0,f*.004672,0,e*.990654),s.addColorStop(0,"rgb(249, 243, 155)"),s.addColorStop(.05,"rgb(246, 226, 101)"),s.addColorStop(.1,"rgb(240, 225, 132)"),s.addColorStop(.5,"rgb(90, 57, 22)"),s.addColorStop(.9,"rgb(249, 237, 139)"),s.addColorStop(.95,"rgb(243, 226, 108)"),s.addColorStop(1,"rgb(202, 182, 113)"),o.fillStyle=s,o.fill();break;case"steel":s=o.createLinearGradient(0,f*.004672,0,e*.990654),s.addColorStop(0,"rgb(231, 237, 237)"),s.addColorStop(.05,"rgb(189, 199, 198)"),s.addColorStop(.1,"rgb(192, 201, 200)"),s.addColorStop(.5,"rgb(23, 31, 33)"),s.addColorStop(.9,"rgb(196, 205, 204)"),s.addColorStop(.95,"rgb(194, 204, 203)"),s.addColorStop(1,"rgb(189, 201, 199)"),o.fillStyle=s,o.fill();break;case"gold":s=o.createLinearGradient(0,f*.004672,0,e*.990654),s.addColorStop(0,"rgb(255, 255, 207)"),s.addColorStop(.15,"rgb(255, 237, 96)"),s.addColorStop(.22,"rgb(254, 199, 57)"),s.addColorStop(.3,"rgb(255, 249, 203)"),s.addColorStop(.38,"rgb(255, 199, 64)"),s.addColorStop(.44,"rgb(252, 194, 60)"),s.addColorStop(.51,"rgb(255, 204, 59)"),s.addColorStop(.6,"rgb(213, 134, 29)"),s.addColorStop(.68,"rgb(255, 201, 56)"),s.addColorStop(.75,"rgb(212, 135, 29)"),s.addColorStop(1,"rgb(247, 238, 101)"),o.fillStyle=s,o.fill();break;case"anthracite":s=o.createLinearGradient(0,.004672*e,0,.995326*e),s.addColorStop(0,"rgb(118, 117, 135)"),s.addColorStop(.06,"rgb(74, 74, 82)"),s.addColorStop(.12,"rgb(50, 50, 54)"),s.addColorStop(1,"rgb(79, 79, 87)"),o.fillStyle=s,o.fill();break;case"tiltedGray":s=o.createLinearGradient(.233644*f,.084112*e,.81258*f,.910919*e),s.addColorStop(0,"#ffffff"),s.addColorStop(.07,"rgb(210, 210, 210)"),s.addColorStop(.16,"rgb(179, 179, 179)"),s.addColorStop(.33,"#ffffff"),s.addColorStop(.55,"#c5c5c5"),s.addColorStop(.79,"#ffffff"),s.addColorStop(1,"#666666"),o.fillStyle=s,o.fill();break;case"tiltedBlack":s=o.createLinearGradient(.228971*f,.079439*e,.802547*f,.898591*e),s.addColorStop(0,"#666666"),s.addColorStop(.21,"#000000"),s.addColorStop(.47,"#666666"),s.addColorStop(.99,"#000000"),s.addColorStop(1,"#000000"),o.fillStyle=s,o.fill();break;case"glossyMetal":s=o.createRadialGradient(.5*f,.5*e,0,.5*f,.5*f,.5*f),s.addColorStop(0,"rgb(207, 207, 207)"),s.addColorStop(.96,"rgb(205, 204, 205)"),s.addColorStop(1,"rgb(244, 244, 244)"),o.fillStyle=s,o.fill(),o.beginPath(),o.arc(.5*f,.5*e,.973962*f/2,0,Math.PI*2),o.closePath(),s=o.createLinearGradient(0,e-.971962*e,0,.971962*e),s.addColorStop(0,"rgb(249, 249, 249)"),s.addColorStop(.23,"rgb(200, 195, 191)"),s.addColorStop(.36,"#ffffff"),s.addColorStop(.59,"rgb(29, 29, 29)"),s.addColorStop(.76,"rgb(200, 194, 192)"),s.addColorStop(1,"rgb(209, 209, 209)"),o.fillStyle=s,o.fill(),o.beginPath(),o.arc(.5*f,.5*e,.869158*f/2,0,Math.PI*2),o.closePath(),o.fillStyle="#f6f6f6",o.fill(),o.beginPath(),o.arc(.5*f,.5*e,.85*f/2,0,Math.PI*2),o.closePath(),o.fillStyle="#333333",o.fill();break;case"blackMetal":h=[0,.125,.347222,.5,.680555,.875,1],c=[new n(254,254,254,1),new n(0,0,0,1),new n(153,153,153,1),new n(0,0,0,1),new n(153,153,153,1),new n(0,0,0,1),new n(254,254,254,1)],o.save(),o.clip(o.arc(r,u,f*.990654/2,0,Math.PI*2,!0)),l=f*.495327,a=f*.42056,s=new d(h,c,-Math.PI/2),s.fill(o,r,u,a,l),o.strokeStyle="#848484",o.strokeStyle="rgba(132, 132, 132, 0.8)",o.beginPath(),o.lineWidth=f/90,o.arc(r,u,f/2,0,Math.PI*2,!0),o.closePath(),o.stroke(),o.restore();break;case"shinyMetal":h=[0,.125,.25,.347222,.5,.652777,.75,.875,1],c=[new n(254,254,254,1),new n(210,210,210,1),new n(179,179,179,1),new n(238,238,238,1),new n(160,160,160,1),new n(238,238,238,1),new n(179,179,179,1),new n(210,210,210,1),new n(254,254,254,1)],o.save(),o.clip(o.arc(r,u,f*.990654/2,0,Math.PI*2,!0)),l=f*.495327,a=f*.42056,s=new d(h,c,-Math.PI/2),s.fill(o,r,u,a,l),o.strokeStyle="#848484",o.strokeStyle="rgba(132, 132, 132, 0.8)",o.beginPath(),o.lineWidth=f/90,o.arc(r,u,f/2,0,Math.PI*2,!0),o.closePath(),o.stroke(),o.restore();break;case"chrome":h=[0,.09,.12,.16,.25,.29,.33,.38,.48,.52,.63,.68,.8,.83,.87,.97,1],c=[new n(255,255,255,1),new n(255,255,255,1),new n(136,136,138,1),new n(164,185,190,1),new n(158,179,182,1),new n(112,112,112,1),new n(221,227,227,1),new n(155,176,179,1),new n(156,176,177,1),new n(254,255,255,1),new n(255,255,255,1),new n(156,180,180,1),new n(198,209,211,1),new n(246,248,247,1),new n(204,216,216,1),new n(164,188,190,1),new n(255,255,255,1)],o.save(),o.clip(o.arc(r,u,f*.990654/2,0,Math.PI*2,!0)),l=f*.495327,a=f*.42056,s=new d(h,c,-Math.PI/2),s.fill(o,r,u,a,l),o.strokeStyle="#848484",o.strokeStyle="rgba(132, 132, 132, 0.8)",o.beginPath(),o.lineWidth=f/90,o.arc(r,u,f/2,0,Math.PI*2,!0),o.closePath(),o.stroke(),o.restore()}return o.fillStyle="rgb(191, 191, 191)",o.beginPath(),o.arc(r,u,f*.841121/2,0,Math.PI*2,!0),o.closePath(),o.fill(),t.drawImage(st,0,0),t.restore(),this},gi=function(t,i,r,u){var s,h,l,c,o;t.save();if(r===ct.width&&u===ct.height&&i===er)return t.drawImage(ct,0,0),t.restore(),this;er=i,ct.width=r,ct.height=u,s=ct.getContext("2d"),r0&&t.width>0){n.save(),n.beginPath(),n.arc(i,r,u*.831775/2,0,Math.PI*2,!0),n.clip();var o=u*.831775,e=f*.831775,h=(u-o)/2,s=(f-e)/2;n.drawImage(t,h,s,o,e),n.restore()}return this},bi=function(i,r,u,e){var o,nt,p,k,h,a,y,s;i.save();if(u===lt.width&&e===lt.height&&r===hr)return i.drawImage(lt,0,0),i.restore(),this;hr=r,lt.width=u,lt.height=e,o=lt.getContext("2d"),f(o,14,14,u-28,e-28,4);if(r===steelseries.BackgroundColor.CARBON||r===steelseries.BackgroundColor.PUNCHED_SHEET||r===steelseries.BackgroundColor.STAINLESS||r===steelseries.BackgroundColor.BRUSHED_METAL||r===steelseries.BackgroundColor.BRUSHED_STAINLESS||r===steelseries.BackgroundColor.TURNED){r===steelseries.BackgroundColor.CARBON&&(o.fillStyle=o.createPattern(or,"repeat"),o.fill()),r===steelseries.BackgroundColor.PUNCHED_SHEET&&(o.fillStyle=o.createPattern(ir,"repeat"),o.fill());if(r===steelseries.BackgroundColor.STAINLESS||r===steelseries.BackgroundColor.TURNED){var g=60,ut=t(g,g),it=ut.getContext("2d");it.save(),nt=[0,.03,.1,.14,.24,.33,.38,.5,.62,.67,.76,.81,.85,.97,1],y=[new n("#FDFDFD"),new n("#FDFDFD"),new n("#B2B2B4"),new n("#ACACAE"),new n("#FDFDFD"),new n("#6E6E70"),new n("#6E6E70"),new n("#FDFDFD"),new n("#6E6E70"),new n("#6E6E70"),new n("#FDFDFD"),new n("#ACACAE"),new n("#B2B2B4"),new n("#FDFDFD"),new n("#FDFDFD")],a=new d(nt,y,Math.PI/1.75),o.clip(f(o,14,14,u-28,e-28,4)),p=Math.sqrt((u-28)*(u-28)+(e-28)*(e-28))/2,a.fill(o,u/2,e/2,0,p),h=o.createLinearGradient(0,14,0,e-28),h.addColorStop(0,"rgba(0, 0, 0, 0.25)"),h.addColorStop(.1,"rgba(0, 0, 0, 0.05)"),h.addColorStop(1,"rgba(0, 0, 0, 0)"),o.fillStyle=h,f(o,14,14,u-28,e-28,4),o.fill(),o.restore();if(r===steelseries.BackgroundColor.TURNED){var b=Math.PI*2,w=p*.55,l=u/2,c=e/2,v=b/360*(400/p);for(o.save(),o.lineWidth=.5,k=b-v*.3,s=0;s255?255:n}function e(n){return n<0?0:n>255?255:n}function s(n,t,i,r,u,f){var c,s,v,o,e;for(uu&&(e=(s-u-1)*4,l-=n.data[e],a-=n.data[e+1],h-=n.data[e+2]),o+u>16&255,ct=n>>8&255,at=n&255,d=0,g=255*r;if(f!=0)for(ot=[],w=0;w0?(s(v,st,p,b,i,ft),it.putImageData(st,h,c)):it.putImageData(v,h,c),ht},this},n=function(n,t,i,r){function s(){e=0>n?0:n,e=255t?0:t,f=255i?0:i,u=255r?0:r,o=1n?0:n,e=255n?0:n,f=255n?0:n,u=255n?0:n,o=10?r.arc(u,f,e,s+l,s,!0):r.moveTo(u,f),r.arc(u,f,o,s,s+l),r.fill(),r.stroke();r.restore()}},ii=function(n,t,i,r){this.getColorAt=function(n){var o;n=n<0?0:n>1?1:n;for(var u=0,e=0,f=1,s=1,h=0,t=0;tn&&f>=i[t]&&(f=i[t],s=t)}return o=(n-u)/(f-u),fi(r[e],r[s],1,o)},this.getStart=function(){return n},this.getEnd=function(){return t}},e,u,l,nt,yt,wt,ui,ti,v,s,pt,dt,gt,kt;Math.log10=function(n){return Math.log(n)/Math.LN10},function(){e=function(n,t,i,r,u){this.gradientStart=n,this.gradientFraction=t,this.gradientStop=i,this.labelColor=r,this.symbolColor=u}}(),function(){u=function(n,t,i,r,u,f){this.gradientStartColor=n,this.gradientFraction1Color=t,this.gradientFraction2Color=i,this.gradientFraction3Color=r,this.gradientStopColor=u,this.textColor=f}}(),function(){l=function(n,t,i,r,u,f){this.veryDark=n,this.dark=t,this.medium=i,this.light=r,this.lighter=u,this.veryLight=f}}(),function(){nt=function(n,t,i,r,u,f,e){this.innerColor1_ON=n,this.innerColor2_ON=t,this.outerColor_ON=i,this.coronaColor=r,this.innerColor1_OFF=u,this.innerColor2_OFF=f,this.outerColor_OFF=e}}(),function(){yt=function(n){this.type=n}}(),function(){wt=function(n){this.type=n}}(),function(){ui=function(n){this.type=n}}(),function(){ti=function(n){this.style=n}}(),function(){v=function(n){this.design=n}}(),function(){s=function(n){this.type=n}}(),function(){pt=function(n){this.type=n}}(),function(){dt=function(n){this.format=n}}(),function(){gt=function(n){this.type=n}}(),function(){kt=function(n){this.state=n}}();var cr={DARK_GRAY:new e(new n(0,0,0,1),new n(51,51,51,1),new n(153,153,153,1),new n(255,255,255,1),new n(180,180,180,1)),SATIN_GRAY:new e(new n(45,57,57,1),new n(45,57,57,1),new n(45,57,57,1),new n(167,184,180,1),new n(137,154,150,1)),LIGHT_GRAY:new e(new n(130,130,130,1),new n(181,181,181,1),new n(253,253,253,1),new n(0,0,0,1),new n(80,80,80,1)),WHITE:new e(new n(255,255,255,1),new n(255,255,255,1),new n(255,255,255,1),new n(0,0,0,1),new n(80,80,80,1)),BLACK:new e(new n(0,0,0,1),new n(0,0,0,1),new n(0,0,0,1),new n(255,255,255,1),new n(150,150,150,1)),BEIGE:new e(new n(178,172,150,1),new n(204,205,184,1),new n(231,231,214,1),new n(0,0,0,1),new n(80,80,80,1)),BROWN:new e(new n(245,225,193,1),new n(245,225,193,1),new n(255,250,240,1),new n(109,73,47,1),new n(89,53,27,1)),RED:new e(new n(198,93,95,1),new n(212,132,134,1),new n(242,218,218,1),new n(0,0,0,1),new n(90,0,0,1)),GREEN:new e(new n(65,120,40,1),new n(129,171,95,1),new n(218,237,202,1),new n(0,0,0,1),new n(0,90,0,1)),BLUE:new e(new n(45,83,122,1),new n(115,144,170,1),new n(227,234,238,1),new n(0,0,0,1),new n(0,0,90,1)),ANTHRACITE:new e(new n(50,50,54,1),new n(47,47,51,1),new n(69,69,74,1),new n(250,250,250,1),new n(180,180,180,1)),MUD:new e(new n(80,86,82,1),new n(70,76,72,1),new n(57,62,58,1),new n(255,255,240,1),new n(225,225,210,1)),PUNCHED_SHEET:new e(new n(50,50,54,1),new n(47,47,51,1),new n(69,69,74,1),new n(255,255,255,1),new n(180,180,180,1)),CARBON:new e(new n(50,50,54,1),new n(47,47,51,1),new n(69,69,74,1),new n(255,255,255,1),new n(180,180,180,1)),STAINLESS:new e(new n(130,130,130,1),new n(181,181,181,1),new n(253,253,253,1),new n(0,0,0,1),new n(80,80,80,1)),BRUSHED_METAL:new e(new n(50,50,54,1),new n(47,47,51,1),new n(69,69,74,1),new n(0,0,0,1),new n(80,80,80,1)),BRUSHED_STAINLESS:new e(new n(50,50,54,1),new n(47,47,51,1),new n(110,110,112,1),new n(0,0,0,1),new n(80,80,80,1)),TURNED:new e(new n(130,130,130,1),new n(181,181,181,1),new n(253,253,253,1),new n(0,0,0,1),new n(80,80,80,1))},ar={BEIGE:new u("#c8c8b1","rgb(241, 237, 207)","rgb(234, 230, 194)","rgb(225, 220, 183)","rgb(237, 232, 191)","#000000"),BLUE:new u("#ffffff","rgb(231, 246, 255)","rgb(170, 224, 255)","rgb(136, 212, 255)","rgb(192, 232, 255)","#124564"),ORANGE:new u("#ffffff","rgb(255, 245, 225)","rgb(255, 217, 147)","rgb(255, 201, 104)","rgb(255, 227, 173)","#503700"),RED:new u("#ffffff","rgb(255, 225, 225)","rgb(253, 152, 152)","rgb(252, 114, 115)","rgb(254, 178, 178)","#4f0c0e"),YELLOW:new u("#ffffff","rgb(245, 255, 186)","rgb(210, 255, 0)","rgb(158, 205, 0)","rgb(210, 255, 0)","#405300"),WHITE:new u("#ffffff","#ffffff","rgb(241, 246, 242)","rgb(229, 239, 244)","#ffffff","#000000"),GRAY:new u("#414141","rgb(117, 117, 117)","rgb(87, 87, 87)","#414141","rgb(81, 81, 81)","#ffffff"),BLACK:new u("#414141","#666666","#333333","#000000","#333333","#cccccc"),GREEN:new u("rgb(33, 67, 67)","rgb(33, 67, 67)","rgb(29, 58, 58)","rgb(28, 57, 57)","rgb(23, 46, 46)","rgba(0, 185, 165, 255)"),BLUE2:new u("rgb(0, 68, 103)","rgb(8, 109, 165)","rgb(0, 72, 117)","rgb(0, 72, 117)","rgb(0, 68, 103)","rgb(111, 182, 228)"),BLUE_BLACK:new u("rgb(22, 125, 212)","rgb(3, 162, 254)","rgb(3, 162, 254)","rgb(3, 162, 254)","rgb(11, 172, 244)","#000000"),BLUE_DARKBLUE:new u("rgb(18, 33, 88)","rgb(18, 33, 88)","rgb(19, 30, 90)","rgb(17, 31, 94)","rgb(21, 25, 90)","rgb(23, 99, 221)"),BLUE_GRAY:new u("rgb(135, 174, 255)","rgb(101, 159, 255)","rgb(44, 93, 255)","rgb(27, 65, 254)","rgb(12, 50, 255)","#b2b4ed"),STANDARD:new u("rgb(131, 133, 119)","rgb(176, 183, 167)","rgb(165, 174, 153)","rgb(166, 175, 156)","rgb(175, 184, 165)","rgb(35, 42, 52)"),STANDARD_GREEN:new u("#ffffff","rgb(219, 230, 220)","rgb(179, 194, 178)","rgb(153, 176, 151)","rgb(114, 138, 109)","#080C06"),BLUE_BLUE:new u("rgb(100, 168, 253)","rgb(100, 168, 253)","rgb(95, 160, 250)","rgb(80, 144, 252)","rgb(74, 134, 255)","#002cbb"),RED_DARKRED:new u("rgb(72, 36, 50)","rgb(185, 111, 110)","rgb(148, 66, 72)","rgb(83, 19, 20)","rgb(7, 6, 14)","#FE8B92"),DARKBLUE:new u("rgb(14, 24, 31)","rgb(46, 105, 144)","rgb(19, 64, 96)","rgb(6, 20, 29)","rgb(8, 9, 10)","#3DB3FF"),LILA:new u("rgb(175, 164, 255)","rgb(188, 168, 253)","rgb(176, 159, 255)","rgb(174, 147, 252)","rgb(168, 136, 233)","#076148"),BLACKRED:new u("rgb(8, 12, 11)","rgb(10, 11, 13)","rgb(11, 10, 15)","rgb(7, 13, 9)","rgb(9, 13, 14)","#B50026"),DARKGREEN:new u("rgb(25, 85, 0)","rgb(47, 154, 0)","rgb(30, 101, 0)","rgb(30, 101, 0)","rgb(25, 85, 0)","#233123"),AMBER:new u("rgb(182, 71, 0)","rgb(236, 155, 25)","rgb(212, 93, 5)","rgb(212, 93, 5)","rgb(182, 71, 0)","#593A0A"),LIGHTBLUE:new u("rgb(125, 146, 184)","rgb(197, 212, 231)","rgb(138, 155, 194)","rgb(138, 155, 194)","rgb(125, 146, 184)","#090051"),SECTIONS:new u("#b2b2b2","#ffffff","#c4c4c4","#c4c4c4","#b2b2b2","#000000")},kr={RED:new l(new n(82,0,0,1),new n(158,0,19,1),new n(213,0,25,1),new n(240,82,88,1),new n(255,171,173,1),new n(255,217,218,1)),GREEN:new l(new n(8,54,4,1),new n(0,107,14,1),new n(15,148,0,1),new n(121,186,37,1),new n(190,231,141,1),new n(234,247,218,1)),BLUE:new l(new n(0,11,68,1),new n(0,73,135,1),new n(0,108,201,1),new n(0,141,242,1),new n(122,200,255,1),new n(204,236,255,1)),ORANGE:new l(new n(118,83,30,1),new n(215,67,0,1),new n(240,117,0,1),new n(255,166,0,1),new n(255,255,128,1),new n(255,247,194,1)),YELLOW:new l(new n(41,41,0,1),new n(102,102,0,1),new n(177,165,0,1),new n(255,242,0,1),new n(255,250,153,1),new n(255,252,204,1)),CYAN:new l(new n(15,109,109,1),new n(0,109,144,1),new n(0,144,191,1),new n(0,174,239,1),new n(153,223,249,1),new n(204,239,252,1)),MAGENTA:new l(new n(98,0,114,1),new n(128,24,72,1),new n(191,36,107,1),new n(255,48,143,1),new n(255,172,210,1),new n(255,214,23,1)),WHITE:new l(new n(210,210,210,1),new n(220,220,220,1),new n(235,235,235,1),new n(255,255,255,1),new n(255,255,255,1),new n(255,255,255,1)),GRAY:new l(new n(25,25,25,1),new n(51,51,51,1),new n(76,76,76,1),new n(128,128,128,1),new n(204,204,204,1),new n(243,243,243,1)),BLACK:new l(new n(0,0,0,1),new n(5,5,5,1),new n(10,10,10,1),new n(15,15,15,1),new n(20,20,20,1),new n(25,25,25,1)),RAITH:new l(new n(0,32,65,1),new n(0,65,125,1),new n(0,106,172,1),new n(130,180,214,1),new n(148,203,242,1),new n(191,229,255,1)),GREEN_LCD:new l(new n(0,55,45,1),new n(15,109,93,1),new n(0,185,165,1),new n(48,255,204,1),new n(153,255,227,1),new n(204,255,241,1)),JUG_GREEN:new l(new n(0,56,0,1),new n(32,69,36,1),new n(50,161,0,1),new n(129,206,0,1),new n(190,231,141,1),new n(234,247,218,1))},et={RED_LED:new nt("#FF9A89","#FF9A89","#FF3300","#FF8D70","#7E1C00","#7E1C00","#641B00"),GREEN_LED:new nt("#9AFF89","#9AFF89","#59FF2A","#A5FF00","#1C7E00","#1C7E00","#1B6400"),BLUE_LED:new nt("#899AFF","#899AFF","#0033FF","#708DFF","#001C7E","#001C7E","#001B64"),ORANGE_LED:new nt("#FEA23F","#FEA23F","#FD6C00","#FD6C00","#592800","#592800","#421F00"),YELLOW_LED:new nt("#FFFF62","#FFFF62","#FFFF00","#FFFF00","#6B6D00","#6B6D00","#515300"),CYAN_LED:new nt("#00FFFF","#00FFFF","#1BC3C3","#00FFFF","#083B3B","#083B3B","#052727"),MAGENTA_LED:new nt("#D300FF","#D300FF","#8600CB","#C300FF","#38004B","#38004B","#280035")},vi={TYPE1:new yt("type1"),TYPE2:new yt("type2"),TYPE3:new yt("type3"),TYPE4:new yt("type4"),TYPE5:new yt("type5")},br={NORTH:new wt("north"),SOUTH:new wt("south"),EAST:new wt("east"),WEST:new wt("west")},ai={STANDARD_KNOB:new ui("standardKnob"),METAL_KNOB:new ui("metalKnob")},li={BLACK:new ti("black"),BRASS:new ti("brass"),SILVER:new ti("silver")},gr={BLACK_METAL:new v("blackMetal"),METAL:new v("metal"),SHINY_METAL:new v("shinyMetal"),BRASS:new v("brass"),STEEL:new v("steel"),CHROME:new v("chrome"),GOLD:new v("gold"),ANTHRACITE:new v("anthracite"),TILTED_GRAY:new v("tiltedGray"),TILTED_BLACK:new v("tiltedBlack"),GLOSSY_METAL:new v("glossyMetal")},dr={TYPE1:new s("type1"),TYPE2:new s("type2"),TYPE3:new s("type3"),TYPE4:new s("type4"),TYPE5:new s("type5"),TYPE6:new s("type6"),TYPE7:new s("type7"),TYPE8:new s("type8"),TYPE9:new s("type9"),TYPE10:new s("type10"),TYPE11:new s("type11"),TYPE12:new s("type12"),TYPE13:new s("type13"),TYPE14:new s("type14"),TYPE15:new s("type15"),TYPE16:new s("type16")},yr={TYPE1:new pt("type1"),TYPE2:new pt("type2"),TYPE3:new pt("type3"),TYPE4:new pt("type4"),TYPE5:new pt("type5")},vr={STANDARD:new dt("standard"),FRACTIONAL:new dt("fractional"),SCIENTIFIC:new dt("scientific")},wr={NORMAL:new gt("normal"),HORIZONTAL:new gt("horizontal"),TANGENT:new gt("tangent")},pr={UP:new kt("up"),STEADY:new kt("steady"),DOWN:new kt("down"),OFF:new kt("off")};return{Radial:ci,RadialBargraph:lr,RadialVertical:nu,Linear:au,LinearBargraph:vu,DisplaySingle:cu,DisplayMulti:lu,Level:yu,Compass:bu,WindDirection:ku,Horizon:wu,Led:ru,Clock:tu,Battery:iu,StopWatch:fu,Altimeter:su,TrafficLight:eu,LightBulb:ou,drawFrame:w,drawBackground:b,drawForeground:y,rgbaColor:n,conicalGradient:d,setAlpha:ut,getColorFromFraction:fi,gradientWrapper:ii,BackgroundColor:cr,LcdColor:ar,ColorDef:kr,LedColor:et,GaugeType:vi,Orientation:br,FrameDesign:gr,PointerType:dr,ForegroundType:yr,KnobType:ai,KnobStyle:li,LabelNumberFormat:vr,TickLabelOrientation:wr,TrendState:pr,Section:hu}}() \ No newline at end of file diff --git a/steelseries.js b/steelseries.js index f5f32f2..0998b6f 100644 --- a/steelseries.js +++ b/steelseries.js @@ -1,8 +1,8 @@ /*! * Name : steelseries.js * Author : Gerrit Grunwald, Mark Crossley - * Last modified : 11.01.2012 - * Revision : 0.9.10 + * Last modified : 13.01.2012 + * Revision : 0.9.11 */ var steelseries = function() { @@ -580,7 +580,7 @@ var steelseries = function() { backgroundContext.translate(centerX, centerY); backgroundContext.rotate(rotationOffset + (threshold - minValue) * angleStep + HALF_PI); backgroundContext.translate(-centerX, -centerY); - backgroundContext.drawImage(createThresholdImage(), imageWidth * 0.480369, imageHeight * 0.13); + backgroundContext.drawImage(createThresholdImage(), imageWidth * 0.475, imageHeight * 0.13); backgroundContext.translate(centerX, centerY); backgroundContext.restore(); } @@ -2294,22 +2294,12 @@ var steelseries = function() { // Draw min measured value indicator in minMeasuredValueBuffer if (minMeasuredValueVisible) { - if (steelseries.Orientation.WEST === orientation) { - minMeasuredValueCtx.translate(centerX, centerX); - minMeasuredValueCtx.rotate(-Math.PI / 2); - minMeasuredValueCtx.translate(-centerX, -centerX); - } minMeasuredValueCtx.drawImage(createMeasuredValueImage(Math.ceil(size * 0.028037), steelseries.ColorDef.BLUE.dark.getRgbaColor(), true, true), 0, 0); minMeasuredValueCtx.restore(); } // Draw max measured value indicator in maxMeasuredValueBuffer if (maxMeasuredValueVisible) { - if (steelseries.Orientation.WEST === orientation) { - maxMeasuredValueCtx.translate(centerX, centerX); - maxMeasuredValueCtx.rotate(-Math.PI / 2); - maxMeasuredValueCtx.translate(-centerX, -centerX); - } maxMeasuredValueCtx.drawImage(createMeasuredValueImage(Math.ceil(size * 0.028037), steelseries.ColorDef.RED.medium.getRgbaColor(), true), 0, 0); maxMeasuredValueCtx.restore(); } @@ -2365,7 +2355,7 @@ var steelseries = function() { backgroundContext.translate(centerX, centerY); backgroundContext.rotate(rotationOffset + (threshold - minValue) * angleStep + HALF_PI); backgroundContext.translate(-centerX, -centerY); - backgroundContext.drawImage(createThresholdImage(), imageWidth * 0.475, imageHeight * 0.33); + backgroundContext.drawImage(createThresholdImage(), imageWidth * 0.475, imageHeight * 0.32); backgroundContext.restore(); } @@ -2649,7 +2639,7 @@ var steelseries = function() { mainCtx.translate(centerX, centerY); mainCtx.rotate(rotationOffset + HALF_PI + (minMeasuredValue - minValue) * angleStep); mainCtx.translate(-centerX, -centerY); - mainCtx.drawImage(minMeasuredValueBuffer, mainCtx.canvas.width * 0.4865, mainCtx.canvas.height * 0.105); + mainCtx.drawImage(minMeasuredValueBuffer, mainCtx.canvas.width * 0.4865, mainCtx.canvas.height * 0.27); mainCtx.restore(); } @@ -2659,7 +2649,7 @@ var steelseries = function() { mainCtx.translate(centerX, centerY); mainCtx.rotate(rotationOffset + HALF_PI + (maxMeasuredValue - minValue) * angleStep); mainCtx.translate(-centerX, -centerY); - mainCtx.drawImage(maxMeasuredValueBuffer, mainCtx.canvas.width * 0.4865, mainCtx.canvas.height * 0.105); + mainCtx.drawImage(maxMeasuredValueBuffer, mainCtx.canvas.width * 0.4865, mainCtx.canvas.height * 0.27); mainCtx.restore(); }